:root {
  --bg: #F6F7F7; --surface: #FFFFFF; --surface-2: #EEF0F1; --line: #D9DEE1; --line-soft: #E3E7E9; --line-input: #868F96;
  --ink: #1A2126; --ink-2: #59646C; --ink-3: #6B757C;
  --action: #2A44B0; --action-hover: #22399A; --action-soft: #E9EDFB; --warn: #A3470F; --warn-soft: #FCEEE4; --ok: #2F6B4F;
  --font: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Segoe UI", sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
h1 { font-size: 22px; margin: 0; letter-spacing: -0.3px; }
h2 { font-size: 15px; margin: 0 0 12px; }
.small { font-size: 12px; } .muted { color: var(--ink-3); }
code { font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; background: var(--surface-2); padding: 2px 6px; border-radius: 4px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; margin: 0; }
.dot { width: 10px; height: 10px; border-radius: 3px; background: var(--action); display: inline-block; }
.card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 12px; padding: 20px; margin-bottom: 16px; }
label { display: block; margin: 12px 0 0; font-size: 13px; color: var(--ink-2); }
input { display: block; width: 100%; margin-top: 4px; padding: 9px 11px; border: 1px solid var(--line-input); border-radius: 8px; font: inherit; color: var(--ink); background: var(--surface); }
input:focus-visible, .btn:focus-visible, .tab:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.btn.primary { background: var(--action); border-color: var(--action); color: #fff; }
.btn.primary:hover { background: var(--action-hover); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn.link { border: 0; background: none; color: var(--action); padding: 0 6px; min-height: 28px; font-weight: 600; }
.btn[disabled] { opacity: .55; cursor: default; }

.gate { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.gate-card { width: 100%; max-width: 380px; padding: 28px; }
.gate-card.wide { max-width: 520px; }
.gate-card h1 { margin: 14px 0 4px; }
.gate-card .btn.primary { width: 100%; margin-top: 18px; min-height: 42px; }
.steps { padding-left: 20px; margin: 12px 0 0; } .steps li { margin: 0 0 16px; }
.qr-row { display: flex; gap: 16px; align-items: center; margin-top: 10px; }
.qr { width: 160px; height: 160px; flex: none; border: 1px solid var(--line-soft); border-radius: 8px; padding: 6px; background: #fff; }
.qr svg { width: 100%; height: 100%; display: block; }

.top { display: flex; align-items: center; gap: 24px; padding: 0 24px; height: 56px; background: var(--surface); border-bottom: 1px solid var(--line-soft); position: sticky; top: 0; z-index: 2; }
.tabs { display: flex; gap: 4px; flex: 1; }
.tab { padding: 6px 12px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-weight: 600; }
.tab.on { background: var(--action-soft); color: var(--action); }
.who { display: flex; align-items: center; gap: 8px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 24px; }
.row-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 12px; padding: 16px 18px; }
.stat .k { font-size: 12px; color: var(--ink-3); }
.stat .v { font-size: 26px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat .s { font-size: 12px; color: var(--ink-3); }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .top { gap: 12px; padding: 0 12px; } .wrap { padding: 16px 12px; } }

.chart { position: relative; }
.chart svg { display: block; max-width: 100%; }
.chart .bar { fill: var(--action); }
.chart .bar.zero { fill: var(--line-soft); }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:hover + .bar, .chart .bar.hl { fill: var(--action-hover); }
.chart .axis { fill: var(--ink-3); font-size: 11px; font-family: var(--font); }
.chart .base { stroke: var(--line); stroke-width: 1; }
.tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; font-size: 12px; padding: 5px 8px; border-radius: 6px; white-space: nowrap; transform: translate(-50%, -100%); }

.tbl-scroll { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; min-width: 760px; }
.tbl th { text-align: left; font-size: 12px; color: var(--ink-3); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; white-space: nowrap; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tr:last-child td { border-bottom: 0; }
.chip { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); margin-left: 6px; }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.audit { list-style: none; margin: 0; padding: 0; }
.audit li { display: flex; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.audit li:last-child { border-bottom: 0; }
.audit .t { color: var(--ink-3); width: 120px; flex: none; font-variant-numeric: tabular-nums; }

.dlg { border: 0; border-radius: 14px; padding: 24px; width: min(440px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(26, 33, 38, .25); }
.dlg::backdrop { background: rgba(26, 33, 38, .35); }
.dlg h2 { font-size: 18px; margin: 0 0 4px; }
.btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 10; max-width: calc(100vw - 32px); }
