:root {
  --g50: #f9fafb; --g100: #f2f4f6; --g200: #e5e8eb; --g300: #d1d6db; --g400: #b0b8c1; --g500: #8b95a1;
  --g600: #6b7684; --g700: #4e5968; --g800: #333d4b; --g900: #191f28;
  --b50: #e8f3ff; --b100: #c9e2ff; --b500: #3182f6; --b600: #2272eb; --b700: #1b64da;
  --red: #f04452; --green: #03b26c; --orange: #fe9800;
  --r: 16px;
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", Roboto, sans-serif;
  color: var(--g900); background: var(--g100);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; line-height: 1.5; font-size: 15px; }
h1, h2, h3 { letter-spacing: -0.02em; margin: 0 0 8px; }
h1 { font-size: 32px; line-height: 1.25; }
h2 { font-size: 20px; }
h3.mini { font-size: 13px; color: var(--g600); font-weight: 600; margin: 20px 0 8px; }
p { margin: 0 0 12px; }
a { color: var(--b600); }
code { background: var(--g100); padding: 1px 6px; border-radius: 6px; font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.top { background: #fff; position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--g200); }
.top-in { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 19px; color: var(--g900); text-decoration: none; letter-spacing: -0.02em; }
.tabs { display: flex; gap: 4px; flex: 1; }
.tabs a { padding: 8px 12px; border-radius: 10px; color: var(--g600); text-decoration: none; font-weight: 600; font-size: 15px; white-space: nowrap; }
.tabs a:hover { background: var(--g100); }
.tabs a[aria-selected="true"] { color: var(--g900); background: var(--g100); }
.city select { font: inherit; font-weight: 700; border: 0; background: var(--b50); color: var(--b700); padding: 8px 12px; border-radius: 10px; cursor: pointer; }
main { padding: 28px 20px 40px; }
.hero { margin: 8px 0 20px; }
.lead { color: var(--g700); font-size: 17px; max-width: 720px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.card { background: #fff; border-radius: 20px; padding: 24px; margin-bottom: 16px; }
.row { display: flex; align-items: center; }
.row.gap { gap: 8px; }
.row.between { justify-content: space-between; }
.wrap-row { flex-wrap: wrap; }
.grow { flex: 1; }
.btn { font: inherit; font-weight: 700; font-size: 16px; border: 0; border-radius: 14px; height: 52px; padding: 0 18px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-align: center; transition: transform .08s, background .15s; text-decoration: none; }
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--b500); color: #fff; }
.btn.primary:hover { background: var(--b600); }
.btn.secondary { background: var(--b50); color: var(--b700); }
.btn.ghost { background: var(--g100); color: var(--g800); }
.btn.small { height: 40px; font-size: 14px; border-radius: 10px; padding: 0 14px; }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn { border: 0; background: var(--g100); width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 16px; }
.input { font: inherit; font-size: 16px; height: 48px; border: 1px solid var(--g200); border-radius: 12px; padding: 0 14px; background: var(--g50); width: 100%; }
.input:focus { outline: 2px solid var(--b100); border-color: var(--b500); background: #fff; }
.viewer { position: relative; aspect-ratio: 1 / 1; background: var(--g900); border-radius: 16px; overflow: hidden; margin-bottom: 12px; }
.viewer video, .viewer img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.frame { position: absolute; inset: 9%; border: 3px solid rgba(255,255,255,.85); border-radius: 20px; pointer-events: none; box-shadow: 0 0 0 2000px rgba(0,0,0,.18); }
.viewer-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; text-align: center; padding: 20px; }
.viewer-empty p { color: var(--g300); }
.big-emoji { font-size: 44px; margin-bottom: 8px; }
.model-status { font-size: 13px; color: var(--g600); min-height: 20px; margin-top: 10px; }
.progress { height: 6px; background: var(--g200); border-radius: 3px; overflow: hidden; margin-top: 6px; }
.progress > i { display: block; height: 100%; background: var(--b500); width: 0; transition: width .2s; }
.samples { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.samples button { border: 0; padding: 0; background: var(--g100); border-radius: 12px; overflow: hidden; cursor: pointer; aspect-ratio: 1; position: relative; }
.samples img { width: 100%; height: 100%; object-fit: cover; display: block; }
.samples button:focus-visible { outline: 3px solid var(--b500); }
.placeholder h2 { color: var(--g800); }
.checklist { padding-left: 18px; color: var(--g700); }
.checklist li { margin-bottom: 10px; }
.binhero { border-radius: 18px; padding: 22px; color: #fff; margin-bottom: 16px; }
.binhero .k { font-size: 14px; opacity: .85; font-weight: 600; }
.binhero .v { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.binhero .s { font-size: 15px; opacity: .9; margin-top: 2px; }
.item-line { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.muted { color: var(--g600); }
.prep { background: var(--g50); border-radius: 14px; padding: 14px 16px; margin: 12px 0; font-size: 16px; }
.prep .ko { color: var(--g600); font-size: 14px; margin-top: 4px; }
.chip { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 10px; background: var(--g100); color: var(--g700); vertical-align: middle; }
.chip.warn { background: #fff4e0; color: #b25e00; }
.chip.ok { background: #e3f8ef; color: #027a4b; }
.chip.blue { background: var(--b50); color: var(--b700); }
.src { font-size: 13px; color: var(--g600); }
.qcard h2 { font-size: 22px; }
.qcard .ko { color: var(--g600); margin-bottom: 14px; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.opts .btn { height: auto; min-height: 52px; padding: 10px 14px; }
.opts .btn.full { grid-column: 1 / -1; }
.why { margin-top: 16px; border-top: 1px solid var(--g100); padding-top: 14px; }
.why summary { cursor: pointer; font-weight: 700; color: var(--g700); }
.bar { display: grid; grid-template-columns: 140px 1fr 48px; align-items: center; gap: 8px; font-size: 13px; margin: 6px 0; }
.bar .t { height: 10px; border-radius: 5px; background: var(--g100); overflow: hidden; }
.bar .t > i { display: block; height: 100%; border-radius: 5px; }
.bar .n { text-align: right; color: var(--g600); font-variant-numeric: tabular-nums; }
.steps { font-size: 13px; color: var(--g700); padding-left: 18px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.audit-banner { background: var(--b50); color: var(--b700); border-radius: 14px; padding: 12px 16px; font-weight: 600; margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.kpi { display: flex; gap: 12px; margin: 12px 0 16px; }
.kpi > div { flex: 1; background: var(--g50); border-radius: 14px; padding: 14px; }
.kpi .n { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.kpi .l { font-size: 13px; color: var(--g600); }
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.li .dot { width: 34px; height: 34px; border-radius: 10px; flex: none; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; font-weight: 800; }
.li .t { flex: 1; min-width: 0; }
.li .t b { display: block; }
.li .t span { font-size: 13px; color: var(--g600); }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--g700); margin-bottom: 6px; }
.field select { font: inherit; font-size: 16px; height: 48px; border: 1px solid var(--g200); border-radius: 12px; padding: 0 12px; width: 100%; background: var(--g50); }
.hist { width: 100%; border-collapse: collapse; font-size: 14px; }
.hist th { text-align: left; color: var(--g600); font-weight: 600; font-size: 13px; padding: 8px 6px; }
.hist td { padding: 10px 6px; border-top: 1px solid var(--g100); }
.delta-good { color: var(--green); font-weight: 800; }
.delta-bad { color: var(--red); font-weight: 800; }
.bins-legend { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0; }
.bins-legend span { font-size: 13px; font-weight: 700; color: #fff; padding: 4px 10px; border-radius: 999px; }
.rules-list .li { border-top: 1px solid var(--g100); }
.note { font-size: 13px; color: var(--g600); margin-top: 12px; }
.prose li { margin-bottom: 8px; }
.numbers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.numbers > div { background: var(--g50); border-radius: 14px; padding: 16px; }
.numbers .n { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.numbers .l { font-size: 13px; color: var(--g600); }
.mtable { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 12px; }
.mtable th, .mtable td { padding: 8px 6px; text-align: right; border-top: 1px solid var(--g100); font-variant-numeric: tabular-nums; }
.mtable th:first-child, .mtable td:first-child { text-align: left; }
.mtable thead th { color: var(--g600); font-weight: 600; font-size: 12px; border-top: 0; }
.sheet { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet[hidden] { display: none; }
.sheet-card { background: #fff; width: 100%; max-width: 560px; max-height: 80vh; border-radius: 24px 24px 0 0; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.sheet-list { overflow: auto; }
.sheet-list button { display: flex; width: 100%; text-align: left; border: 0; background: none; padding: 12px 6px; font: inherit; font-size: 16px; border-radius: 10px; cursor: pointer; justify-content: space-between; gap: 8px; }
.sheet-list button:hover { background: var(--g100); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--g900); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 600; z-index: 60; max-width: 90vw; }
.foot { color: var(--g600); font-size: 13px; padding-bottom: 40px; }
.spinner { width: 22px; height: 22px; border: 3px solid var(--g200); border-top-color: var(--b500); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; vertical-align: middle; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 860px) {
  .grid2 { grid-template-columns: 1fr; }
  h1 { font-size: 26px; }
  .top-in { flex-wrap: wrap; height: auto; padding: 10px 0; gap: 8px 12px; }
  .tabs { order: 3; width: 100%; overflow-x: auto; flex: none; }
  .logo { flex: 1; }
  .samples { grid-template-columns: repeat(4, 1fr); }
  .numbers { grid-template-columns: 1fr; }
  .bar { grid-template-columns: 110px 1fr 44px; }
  .card { padding: 18px; }
}
@media print {
  .top, .foot, .tab:not(#tab-print) { display: none !important; }
}
