:root {
  --paper: #f6f0e4;
  --paper-deep: #ece0cd;
  --paper-light: #fffaf1;
  --ink: #2f2823;
  --ink-soft: #5d5146;
  --muted: #8a7c6d;
  --line: #dacbb8;
  --line-strong: #c4b09a;
  --cinnabar: #a84432;
  --cinnabar-deep: #873224;
  --gold: #b28a52;
  --green: #586f5b;
  --danger: #a13d33;
  --shadow: 0 18px 50px rgba(66, 48, 30, .12);
  --shadow-soft: 0 8px 24px rgba(66, 48, 30, .08);
  --serif: "Noto Serif KR", "Noto Serif SC", "Songti SC", "STSong", "Batang", "Times New Roman", serif;
  --sans: "PingFang SC", "Apple SD Gothic Neo", "Noto Sans KR", "Microsoft YaHei", system-ui, sans-serif;
  --radius: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(1200px 700px at 10% -10%, rgba(255,255,255,.78), transparent 65%),
    radial-gradient(900px 600px at 100% 100%, rgba(177, 137, 84, .10), transparent 60%),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  opacity: .20;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
  z-index: -1;
}
a { color: var(--cinnabar-deep); text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
.zh { color: var(--muted); font-size: 11px; font-weight: 400; letter-spacing: .02em; }
.btn .zh { margin-left: 3px; }
.shell { width: min(1240px, calc(100% - 40px)); margin: 0 auto; padding: 22px 0 64px; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 4px 0 22px;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; }
.seal {
  width: 44px; height: 44px; border-radius: 6px;
  display: grid; place-items: center;
  background: var(--cinnabar); color: #fff8ee;
  font-family: var(--serif); font-size: 22px; font-weight: 700;
  box-shadow: 0 6px 18px rgba(116, 45, 32, .18);
}
.brand h1 { margin: 0; font-family: var(--serif); font-size: 18px; font-weight: 650; letter-spacing: .02em; }
.brand p { margin: 1px 0 0; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.btn {
  border: 1px solid var(--line-strong); background: rgba(255,250,241,.72);
  border-radius: 999px; padding: 7px 13px; font-size: 12px; color: var(--ink-soft);
  transition: background .2s, border-color .2s, transform .2s;
}
.btn:hover { background: var(--paper-light); border-color: var(--cinnabar); transform: translateY(-1px); }
.btn.primary { background: var(--cinnabar); border-color: var(--cinnabar); color: #fff8ee; }
.btn.primary:hover { background: var(--cinnabar-deep); }
.btn.ghost { border-color: transparent; color: var(--muted); }
.btn:disabled { opacity: .55; cursor: wait; transform: none; }
.hero { padding: 34px 0 22px; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.eyebrow { color: var(--cinnabar-deep); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; font-weight: 650; }
.hero h2 { margin: 7px 0 5px; font-family: var(--serif); font-size: clamp(28px, 4vw, 40px); font-weight: 650; letter-spacing: -.02em; }
.hero p { margin: 0; color: var(--muted); font-size: 13px; max-width: 620px; }
.stamp { text-align: right; color: var(--muted); font-size: 11px; white-space: nowrap; }
.stamp b { display: block; color: var(--ink-soft); font-family: var(--serif); font-size: 15px; font-weight: 550; }
.grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 14px 0 22px; }
.metric {
  background: rgba(255,250,241,.76); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 15px; box-shadow: var(--shadow-soft); min-height: 92px;
}
.metric .l { color: var(--muted); font-size: 11px; line-height: 1.4; }
.metric .n { margin-top: 7px; font-family: var(--serif); font-size: 24px; font-weight: 650; letter-spacing: -.02em; }
.metric .n small { font-size: 12px; color: var(--muted); font-family: var(--sans); margin-left: 2px; }
.metric.accent { background: var(--cinnabar); border-color: var(--cinnabar); color: #fff8ee; }
.metric.accent .l, .metric.accent .n small { color: rgba(255,248,238,.72); }
.section {
  background: rgba(255,250,241,.72); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-soft); overflow: hidden; margin-bottom: 16px;
}
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.section-head h3 { margin: 0; font-family: var(--serif); font-size: 17px; font-weight: 600; }
.section-head .hint { color: var(--muted); font-size: 11px; }
.tabs { display: flex; gap: 4px; padding: 12px 14px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tab { border: 0; background: transparent; padding: 9px 12px 11px; font-size: 12px; color: var(--muted); border-bottom: 2px solid transparent; }
.tab.active { color: var(--cinnabar-deep); border-bottom-color: var(--cinnabar); font-weight: 650; }
.toolbar { padding: 12px 16px; display: flex; justify-content: space-between; gap: 10px; align-items: center; border-bottom: 1px solid var(--line); }
.search { width: min(320px, 100%); border: 1px solid var(--line); background: #fffdf8; border-radius: 999px; padding: 8px 13px; font-size: 12px; outline: none; }
.search:focus { border-color: var(--cinnabar); box-shadow: 0 0 0 3px rgba(168,68,50,.10); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid rgba(196,176,154,.45); font-size: 12px; vertical-align: middle; }
th { color: var(--muted); font-weight: 550; background: rgba(236,224,205,.34); white-space: nowrap; }
tbody tr:hover { background: rgba(255,255,255,.45); }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.name { font-family: var(--serif); font-size: 14px; font-weight: 550; }
.sub { color: var(--muted); font-size: 11px; margin-top: 1px; }
.pill { display: inline-flex; align-items: center; gap: 3px; border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; font-size: 10px; color: var(--muted); white-space: nowrap; }
.pill.ok { border-color: rgba(88,111,91,.45); color: var(--green); background: rgba(88,111,91,.06); }
.pill.warn { border-color: rgba(178,138,82,.5); color: #8a6429; background: rgba(178,138,82,.08); }
.pill.danger { border-color: rgba(161,61,51,.4); color: var(--danger); background: rgba(161,61,51,.06); }
.empty { padding: 26px 18px; color: var(--muted); text-align: center; font-size: 12px; }
.trend { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; padding: 16px 18px; align-items: end; min-height: 142px; }
.bar { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: end; }
.bar .stick { width: 100%; max-width: 44px; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, rgba(168,68,50,.62), rgba(168,68,50,.28)); min-height: 3px; }
.bar .d { color: var(--muted); font-size: 10px; }
.bar .v { color: var(--ink-soft); font-size: 10px; font-variant-numeric: tabular-nums; }
.gate { max-width: 560px; margin: 9vh auto 0; text-align: center; background: rgba(255,250,241,.8); border: 1px solid var(--line); border-radius: 22px; padding: 38px 28px; box-shadow: var(--shadow); }
.gate .seal { margin: 0 auto 16px; }
.gate h2 { margin: 0 0 6px; font-family: var(--serif); font-size: 25px; }
.gate p { margin: 0 auto 20px; color: var(--muted); font-size: 13px; max-width: 400px; }
.foot { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(10px); background: var(--ink); color: #fff8ee; padding: 9px 16px; border-radius: 999px; font-size: 12px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 20; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (max-width: 1000px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 620px) {
  .shell { width: calc(100% - 24px); padding-top: 14px; }
  .topbar { display: block; padding-bottom: 16px; }
  .brand { align-items: center; }
  .brand .zh { display: none; }
  .brand h1 { font-size: 16px; white-space: nowrap; }
  .brand p { font-size: 9px; letter-spacing: .12em; }
  .actions { margin-top: 12px; gap: 6px; flex-wrap: nowrap; }
  .actions .btn { padding: 6px 10px; font-size: 11px; }
  .actions .btn.ghost { display: inline-flex; }
  .hero { padding-top: 24px; display: block; }
  .hero h2 { font-size: 27px; }
  .stamp { text-align: left; margin-top: 12px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .metric { min-height: 84px; padding: 12px; }
  .metric .n { font-size: 20px; }
  .section-head { padding: 13px 14px; }
  .toolbar { padding: 10px 12px; display: block; }
  .search { width: 100%; }
  .foot { display: block; }
}
