:root {
  --accent: #3182f6;
  --accent-soft: #e8f3ff;
  --ink: #191f28;
  --sub: #4e5968;
  --mute: #8b95a1;
  --surface: #f2f4f6;
  --line: #e5e8eb;
  --good: #1b8b4b;
  --bad: #e5484d;
  --grid-minor: #fbe3e4;
  --grid-major: #f4b9bc;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: #fff; color: var(--ink); }
body { font: 17px/1.5 -apple-system, BlinkMacSystemFont, "Pretendard", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
button:focus-visible, input:focus-visible, summary:focus-visible, .drop:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }

.screen { min-height: 100vh; min-height: 100dvh; }
.wrap { max-width: 960px; margin: 0 auto; padding: 24px 20px 48px; }
.wrap.narrow { max-width: 560px; padding-top: 12vh; }
.brand { font-weight: 700; color: var(--accent); margin: 0 0 12px; }
h1 { font-size: 36px; line-height: 1.25; letter-spacing: -0.02em; margin: 0 0 16px; font-weight: 800; }
.h1s { font-size: 28px; margin: 8px 0 8px; }
h2 { font-size: 24px; line-height: 1.3; letter-spacing: -0.01em; margin: 24px 0 16px; font-weight: 800; }
.accent { color: var(--accent); }
.lede { color: var(--sub); font-size: 18px; margin: 0 0 32px; }
.fine { color: var(--mute); font-size: 15px; margin-top: 20px; }
code { background: var(--surface); padding: 1px 6px; border-radius: 6px; font-size: 15px; }

.primary { display: block; width: 100%; height: 56px; border-radius: 16px; background: var(--accent); color: #fff; font-weight: 700; font-size: 18px; transition: transform .12s cubic-bezier(.3,1.6,.5,1), background .15s; }
.primary:active { transform: scale(.98); }
.primary:disabled { background: #c9d9f2; cursor: default; transform: none; }
.secondary { display: block; width: 100%; height: 56px; margin-top: 10px; border-radius: 16px; background: var(--surface); font-weight: 600; font-size: 17px; color: var(--ink); transition: transform .12s cubic-bezier(.3,1.6,.5,1); }
.secondary:active { transform: scale(.98); }
.secondary.small { height: 48px; width: auto; padding: 0 18px; margin: 0; font-size: 16px; }
.ghost { height: 40px; padding: 0 14px; border-radius: 12px; background: var(--surface); font-weight: 600; font-size: 15px; }

.topbar { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.progress { flex: 1; height: 6px; background: var(--surface); border-radius: 3px; overflow: hidden; }
#bar { height: 100%; width: 5%; background: var(--accent); border-radius: 3px; transition: width .35s cubic-bezier(.3,1.3,.5,1); }
.count { font-weight: 700; color: var(--sub); font-variant-numeric: tabular-nums; min-width: 56px; text-align: right; }

.stripcard { background: var(--surface); border-radius: 20px; padding: 14px 0 6px; }
.striphead { display: flex; justify-content: space-between; gap: 12px; padding: 0 16px 10px; font-size: 15px; color: var(--sub); font-weight: 600; }
.hint { color: var(--mute); font-weight: 500; text-align: right; }
.scroller { overflow-x: auto; overflow-y: hidden; padding: 0 16px 8px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
canvas { display: block; border-radius: 10px; background: #fff; touch-action: pan-x; }

.options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.opt { text-align: left; padding: 16px 18px; border-radius: 16px; background: var(--surface); display: flex; flex-direction: column; gap: 2px; transition: transform .12s cubic-bezier(.3,1.6,.5,1), background .15s, box-shadow .15s; }
.opt b { font-size: 19px; }
.opt span { font-size: 15px; color: var(--sub); }
.opt:active { transform: scale(.97); }
.opt[aria-checked="true"] { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.opt[aria-checked="true"] b { color: var(--accent); }

.facts { background: var(--surface); border-radius: 18px; padding: 6px 18px; margin-bottom: 14px; }
.fact { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.fact:last-child { border-bottom: 0; }
.fact .k { color: var(--sub); }
.fact .v { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.fact .v small { display: block; font-weight: 500; color: var(--mute); font-size: 14px; }
.good { color: var(--good); }
.bad { color: var(--bad); }
.blue { color: var(--accent); }
.bars { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.barrow { display: grid; grid-template-columns: 92px 1fr 44px; align-items: center; gap: 10px; font-size: 15px; }
.barrow .track { height: 10px; background: #fff; border-radius: 5px; overflow: hidden; }
.barrow .fill { height: 100%; background: #b0b8c1; border-radius: 5px; }
.barrow.top .fill { background: var(--accent); }
.barrow .pct { text-align: right; font-variant-numeric: tabular-nums; color: var(--sub); }

.learn { background: var(--surface); border-radius: 18px; padding: 0 18px; margin-bottom: 18px; }
.learn summary { padding: 16px 0; font-weight: 700; cursor: pointer; list-style: none; }
.learn summary::after { content: "+"; float: right; color: var(--mute); }
.learn[open] summary::after { content: "-"; }
.learn ul { margin: 0 0 16px; padding-left: 20px; color: var(--sub); }
.learn li { margin-bottom: 6px; }

#verdict, #ownverdict { font-size: 28px; }

.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 150px; border-radius: 20px; background: var(--surface); cursor: pointer; margin-bottom: 14px; transition: background .15s; }
.drop.over { background: var(--accent-soft); }
.drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.drop b { font-size: 19px; color: var(--accent); }
.drop span { color: var(--sub); }
.row2 { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 18px; }
.field { color: var(--sub); font-size: 15px; }
.field input { width: 84px; height: 40px; border: 0; background: var(--surface); border-radius: 10px; padding: 0 10px; font: inherit; margin: 0 4px; }
.err { color: var(--bad); font-weight: 600; }

@media (max-width: 600px) {
  h1 { font-size: 30px; }
  .wrap.narrow { padding-top: 8vh; }
  .hint { display: none; }
  .barrow { grid-template-columns: 80px 1fr 40px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
