:root {
  --bg: #ffffff; --fg: #191f28; --sub: #4e5968; --muted: #8b95a1; --line: #e5e8eb; --card: #f9fafb;
  --brand: #1b64da; --brand-ink: #ffffff; --ok: #0f9d58; --warn: #c26a00; --no: #d22030;
  --on: #3182f6; --off: #e8590c; --dysk: #7048e8; --unsure: #6b7684;
  --radius: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #101317; --fg: #f2f4f6; --sub: #b0b8c1; --muted: #8b95a1; --line: #2b3036; --card: #191d22; --brand: #4c8dff; --brand-ink: #0b1220; }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); }
body { font-size: 16px; line-height: 1.55; -webkit-text-size-adjust: 100%; }
.top { display: flex; align-items: center; justify-content: space-between; max-width: 720px; margin: 0 auto; padding: 14px 20px; }
.brand { all: unset; cursor: pointer; font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.brand:focus-visible { outline: 3px solid var(--brand); border-radius: 6px; }
.lock { font-size: 13px; color: var(--sub); background: var(--card); border: 1px solid var(--line); padding: 4px 10px; border-radius: 999px; }
main { max-width: 720px; margin: 0 auto; padding: 8px 20px 190px; outline: none; }
h1 { font-size: 28px; line-height: 1.3; letter-spacing: -0.02em; margin: 16px 0 8px; }
h2 { font-size: 22px; line-height: 1.35; margin: 28px 0 8px; }
p { margin: 8px 0; }
.sub { color: var(--sub); }
.small { font-size: 15px; color: var(--sub); }
.note { font-size: 14px; color: var(--sub); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 16px 0; }
.stack > * + * { margin-top: 24px; }
.cta { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 70%, transparent); }
.cta .inner { max-width: 680px; margin: 0 auto; display: grid; gap: 8px; }
button.primary, a.primary { display: block; width: 100%; min-height: 56px; border: 0; border-radius: 14px; background: var(--brand); color: var(--brand-ink); font-size: 17px; font-weight: 700; cursor: pointer; text-align: center; line-height: 56px; text-decoration: none; }
button.primary[disabled] { opacity: .45; cursor: not-allowed; }
button.secondary { min-height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); font-size: 15px; font-weight: 600; padding: 0 16px; cursor: pointer; }
button.link { all: unset; color: var(--brand); cursor: pointer; font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.choices { display: grid; gap: 10px; }
.choice { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 12px 16px; border: 2px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--fg); font-size: 17px; font-weight: 600; text-align: left; cursor: pointer; }
.choice small { display: block; font-weight: 400; color: var(--sub); font-size: 13px; }
.choice[aria-pressed="true"] { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, var(--bg)); }
.steps { display: flex; gap: 6px; margin: 8px 0 0; }
.steps i { flex: 1; height: 4px; border-radius: 4px; background: var(--line); }
.steps i.on { background: var(--brand); }
.stage { position: relative; border-radius: var(--radius); overflow: hidden; background: #000; aspect-ratio: 4 / 3; }
.stage video, .stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.stage.file video, .stage.file canvas { transform: none; object-fit: contain; }
.guide { position: absolute; inset: 14% 22%; border: 3px dashed rgba(255,255,255,.7); border-radius: 24px; pointer-events: none; }
.chip { position: absolute; left: 12px; top: 12px; padding: 6px 12px; border-radius: 999px; font-size: 14px; font-weight: 700; background: rgba(0,0,0,.6); color: #fff; }
.chip.ok { background: #0b7a43; }
.timer { position: absolute; right: 12px; top: 12px; font-size: 44px; font-weight: 800; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.5); font-variant-numeric: tabular-nums; }
.big { font-size: 56px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.big small { font-size: 20px; font-weight: 700; color: var(--sub); margin-left: 8px; letter-spacing: normal; }
.verdict { font-size: 17px; font-weight: 600; margin-top: 6px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat b { display: block; font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat span { font-size: 14px; color: var(--sub); }
.warnbox { border-left: 4px solid var(--warn); }
.nobox { border-left: 4px solid var(--no); }
details { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 12px 0; }
summary { cursor: pointer; font-weight: 600; min-height: 32px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }
svg { width: 100%; height: auto; display: block; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--sub); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
input[type=number] { font-size: 17px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); width: 120px; }
.sheet { background: #fff; color: #111; }
@media print {
  .top, .cta, .noprint { display: none !important; }
  main { padding: 0; max-width: none; }
  body, .sheet { background: #fff; color: #111; font-size: 11pt; }
  .card, .stat { break-inside: avoid; }
  @page { size: A4; margin: 14mm; }
}
@media (max-width: 420px) { .big { font-size: 48px; } .grid2 { gap: 8px; } }

.badge { display: inline-block; background: #ffb020; color: #111; font-weight: 800; font-size: 13px; padding: 3px 10px; border-radius: 8px; letter-spacing: .02em; }
.howto { display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; margin: 12px 0; }
.howto video { width: 120px; height: 90px; object-fit: cover; border-radius: 10px; background: #ddd; flex: none; }
label.check { display: flex; gap: 10px; align-items: center; min-height: 44px; font-size: 16px; }
label.check input { width: 22px; height: 22px; }
.links { display: grid; gap: 4px; }
.truth { border-left: 4px solid var(--ok); }

.chipbtn { min-height: 44px; padding: 0 14px; }
.chipbtn[aria-pressed="true"] { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, var(--bg)); color: var(--brand); }
.chipbtn[disabled], input[disabled] { opacity: .4; }
.choice small { font-size: 15px; }
.legend { font-size: 15px; }
@media print {
  .sheet h1 { font-size: 18pt; margin: 0 0 4px; }
  .sheet svg { max-height: 120px; }
  .sheet table { font-size: 9.5pt; }
  .sheet th, .sheet td { padding: 3px 6px; }
  .sheet .small { font-size: 8.5pt; margin: 3px 0; }
  .sheet .legend { font-size: 9pt; }
}
