@font-face{font-family:'Bricolage Grotesque';font-weight:400;font-display:swap;src:url(/fonts/bricolage-grotesque-latin-400-normal.woff2) format('woff2')}
@font-face{font-family:'Bricolage Grotesque';font-weight:600;font-display:swap;src:url(/fonts/bricolage-grotesque-latin-600-normal.woff2) format('woff2')}
@font-face{font-family:'Bricolage Grotesque';font-weight:700;font-display:swap;src:url(/fonts/bricolage-grotesque-latin-700-normal.woff2) format('woff2')}
[hidden]{display:none!important}
:root{--night:#0d1424;--night2:#16213a;--paper:#f3f5f9;--surface:#fff;--ink:#111a27;--muted:#5b6879;--line:#dbe2ec;--accent:#1f5fd1;--accent-ink:#fff;--accent-soft:#e4ecfb;--curl:#ff5a5f;--bad:#c2410c;--bad-soft:#fdece3;--ok:#1f8a4c;color-scheme:light}
@media (prefers-color-scheme:dark){:root{--paper:#0b111d;--surface:#141c2b;--ink:#e8eef6;--muted:#93a1b4;--line:#253247;--accent:#6ea8ff;--accent-ink:#0b111d;--accent-soft:#18284a;--bad:#ff9a6b;--bad-soft:#3a2016;color-scheme:dark}}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--paper);color:var(--ink);font:16px/1.55 "Bricolage Grotesque",ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;-webkit-font-smoothing:antialiased}
button,input,select,textarea{font:inherit;color:inherit}
a{color:var(--accent)}
.skip{position:absolute;left:-999px;top:8px;background:var(--surface);padding:8px 12px;border-radius:8px;z-index:9}.skip:focus{left:8px}

/* header + hero on a night-blue band with a faint hexagon lattice */
.top{position:relative;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px max(16px,4vw) 0;padding-top:max(14px,env(safe-area-inset-top));color:#fff}
.brand{display:flex;align-items:center;gap:10px;color:#fff;text-decoration:none;font-weight:700;font-size:21px;letter-spacing:-.02em}
.brand svg{width:34px;height:34px}.brand .hx{fill:none;stroke:#33476b;stroke-width:5}.brand .hx-o{fill:#33476b}
.tools{display:flex;align-items:center;gap:6px}
.icon{width:40px;height:40px;border-radius:12px;border:1px solid #2a3a5a;background:#16213a;color:#fff;display:grid;place-items:center;cursor:pointer}
.icon:hover{background:#1f2d4d}
.icon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.pill-link{color:#fff;text-decoration:none;font-weight:600;font-size:14px;border:1px solid #2a3a5a;border-radius:999px;padding:9px 14px;background:#16213a}
.pill-link:hover{background:#1f2d4d}
body::before{content:"";position:absolute;inset:0 0 auto 0;height:400px;z-index:0;background:
 radial-gradient(circle at 20% 0%,#24365e 0,transparent 55%),
 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 0l28 16v32L28 64 0 48V16zM28 64v33' fill='none' stroke='%23ffffff' stroke-opacity='.05' stroke-width='1.2'/%3E%3C/svg%3E"),var(--night)}
main{position:relative;z-index:1;max-width:1120px;margin:0 auto;padding:0 max(16px,4vw) 40px;display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:20px 24px;grid-template-areas:"hero hero" "game side" "about about"}
.hero{grid-area:hero;color:#fff;padding:26px 0 18px;text-align:center}
.hero h1{margin:0;font-size:clamp(46px,9vw,82px);line-height:.95;letter-spacing:-.05em}
.tag{max-width:600px;margin:10px auto 6px;color:#c7d2e4;font-size:clamp(15px,2.2vw,17.5px)}
.meta{margin:0;color:#93a3bd;font-size:14px;font-variant-numeric:tabular-nums}.meta b{color:#fff}

.game{grid-area:game;position:relative;background:var(--surface);border:1px solid var(--line);border-radius:26px;padding:26px 28px 28px;box-shadow:0 40px 80px -40px rgba(5,10,25,.55);min-height:420px;overflow:hidden;scroll-margin-top:12px;outline:none}
.side{grid-area:side;display:flex;flex-direction:column;gap:16px}
.panel{background:var(--surface);border:1px solid var(--line);border-radius:20px;padding:18px}
.panel h2{margin:0;font-size:17px}
.sub{margin:2px 0 12px;color:var(--muted);font-size:13.5px}
.days{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.days li{display:grid;grid-template-columns:40px 1fr auto;grid-template-rows:auto auto;column-gap:8px;align-items:center;padding:8px 0;border-bottom:1px solid var(--line);font-size:14px}
.days li:last-child{border-bottom:0}
.dn{grid-row:1/3;font-weight:700;color:var(--muted);font-variant-numeric:tabular-nums}
.dd{font-weight:600}
.ds{grid-column:2;font-size:13px;letter-spacing:.5px}
.days li>button{grid-column:3;grid-row:1/3}
.muted{color:var(--muted)}
.prac{display:grid;grid-template-columns:1fr;gap:8px}
.prac .btn{justify-content:flex-start}

.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid var(--line);background:var(--surface);color:var(--ink);border-radius:12px;padding:10px 16px;font-weight:700;cursor:pointer;text-decoration:none;transition:transform .12s,border-color .15s}
.btn:hover{border-color:var(--accent)}
.btn:active{transform:scale(.98)}
.btn.primary{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.btn.small{padding:6px 12px;font-size:13.5px;border-radius:10px}
.btn.huge{padding:14px 22px;font-size:17px;border-radius:14px}
.link{border:0;background:none;color:var(--accent);font-weight:700;cursor:pointer;padding:0}
.load{display:flex;flex-direction:column;align-items:center;gap:14px;padding:120px 0;color:var(--muted)}
.spin{width:30px;height:30px;border-radius:50%;border:3px solid var(--line);border-top-color:var(--accent);animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.ns{padding:40px;text-align:center}

.kick{font-size:12px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
.big{font-size:clamp(25px,4.4vw,34px);line-height:1.1;letter-spacing:-.03em;margin:8px 0 12px}
.theme{display:inline-block;background:#e9f7ef;color:var(--ok);font-weight:700;border-radius:999px;padding:4px 12px;font-size:13.5px;margin-bottom:10px}
.today{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:0 0 16px;color:var(--muted);font-size:14px}
.topic{display:inline-flex;align-items:center;gap:5px;border-radius:999px;padding:3px 10px;font-size:12.5px;font-weight:700;background:var(--accent-soft);color:var(--accent)}
.topic.t-chem{background:#fdecec;color:#c43a3f}.topic.t-phys{background:#e7f0fd;color:#1f5fd1}.topic.t-bio{background:#e6f6ee;color:#178a52}.topic.t-earth{background:#fdf1e3;color:#b4610c}.topic.t-space{background:#efe9fb;color:#6c42c4}.topic.t-sci{background:#eef1f5;color:#4a5869}
@media (prefers-color-scheme:dark){.topic.t-chem{background:#3a1c20;color:#ff8a8e}.topic.t-phys{background:#172a4d;color:#8fbaff}.topic.t-bio{background:#123224;color:#6fdaa2}.topic.t-earth{background:#3a2814;color:#f5b06b}.topic.t-space{background:#2a1f47;color:#c3a5ff}.topic.t-sci{background:#1e2836;color:#b2bfd0}.theme{background:#123224}}
.tiers{list-style:none;margin:0 0 18px;padding:0;display:grid;grid-template-columns:repeat(5,1fr);gap:8px}
.tiers li{display:flex;flex-direction:column;align-items:center;gap:2px;text-align:center;border-radius:14px;padding:10px 4px;background:color-mix(in srgb,var(--c) 12%,var(--surface));border:1px solid color-mix(in srgb,var(--c) 35%,transparent)}
.tiers i{font-style:normal;font-size:24px}
.tiers b{font-size:12.5px;line-height:1.15}
.tiers small{font-size:11.5px;color:var(--muted);font-weight:700}
.tiers.compact i{font-size:20px}
.go{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.chk{display:flex;align-items:center;gap:8px;font-size:14px;color:var(--muted);cursor:pointer}
.chk input{accent-color:var(--accent);width:16px;height:16px}
.mini{display:flex;flex-wrap:wrap;gap:6px 18px;margin-top:18px;font-size:14px;color:var(--muted)}.mini b{color:var(--ink)}
.fine{font-size:13px;color:var(--muted);margin:14px 0 0}

.rtop{display:flex;align-items:center;gap:14px;margin-bottom:14px}
.prog{width:60px;height:60px;flex:none}
.rtop>div{flex:1;min-width:0}
.run{font-size:14px;color:var(--muted);font-variant-numeric:tabular-nums}.run b{font-size:24px;color:var(--ink);letter-spacing:-.02em}
.quit{width:34px;height:34px;border-radius:10px;border:1px solid var(--line);background:none;color:var(--muted);font-size:20px;line-height:1;cursor:pointer;flex:none}
.q{font-size:clamp(25px,4.8vw,36px);line-height:1.12;letter-spacing:-.03em;margin:10px 0 6px;text-wrap:balance}
.q.sm{font-size:19px;color:var(--muted);letter-spacing:-.01em}
.hint{margin:0 0 10px;color:var(--muted);font-size:14.5px}
.timer{position:relative;height:9px;border-radius:99px;background:var(--line);margin:16px 0 14px}
.timer i{position:absolute;inset:0 auto 0 0;border-radius:99px;background:var(--accent);transition:width .1s linear}
.timer i.low{background:var(--curl)}
.timer span{position:absolute;right:0;top:13px;font-size:12.5px;font-weight:700;color:var(--muted);font-variant-numeric:tabular-nums}
.answer{display:flex;gap:8px;margin-top:24px}
.answer input{flex:1;min-width:0;font-size:19px;padding:13px 16px;border-radius:14px;border:2px solid var(--line);background:var(--paper)}
.answer input:focus{outline:none;border-color:var(--accent)}
.answer .btn{border-radius:14px;padding:0 22px;font-size:17px}
.shake{animation:shake .4s}@keyframes shake{20%,60%{transform:translateX(-6px)}40%,80%{transform:translateX(6px)}}
.tries{font-size:13px;color:var(--muted);margin-top:8px}
.msg{min-height:22px;margin-top:6px;font-size:14.5px}.miss{color:var(--bad);font-weight:600}

.verdict{display:flex;align-items:center;gap:14px;margin:14px 0 10px;padding:16px 18px;border-radius:20px;background:color-mix(in srgb,var(--c) 14%,var(--surface));border:1.5px solid color-mix(in srgb,var(--c) 45%,transparent);animation:pop .45s cubic-bezier(.2,1.5,.4,1)}
.ve{font-size:40px;line-height:1}
.verdict>div{flex:1;min-width:0}
.vt{font-weight:800;font-size:22px;letter-spacing:-.01em;color:color-mix(in srgb,var(--c) 75%,var(--ink))}
.vs{font-size:15px;margin-top:2px}.vs small{color:var(--muted)}
.vp{font-weight:800;font-size:24px;font-variant-numeric:tabular-nums}
.verdict.t0{--c:var(--muted)}
.deeper{font-size:14.5px;color:var(--muted);margin:4px 0}.deeper b{color:var(--ink);font-weight:600}
.fact{font-size:14.5px;line-height:1.5;background:var(--paper);border-radius:14px;padding:12px 14px;margin:12px 0 0}
.after .huge{margin-top:20px}
@keyframes pop{0%{transform:scale(.85);opacity:0}100%{transform:none;opacity:1}}
.p{position:absolute;left:50%;top:42%;pointer-events:none;font-size:19px;z-index:5;animation:fly 1.2s cubic-bezier(.2,.8,.3,1) forwards}
@keyframes fly{0%{transform:translate(-50%,-50%) scale(.4);opacity:1}100%{transform:translate(calc(-50% + var(--x)),calc(-50% + var(--y))) rotate(var(--r));opacity:0}}

.hx-ring{fill:none;stroke:var(--line);stroke-width:3;stroke-linejoin:round}
.hx-in{fill:none;stroke:var(--line);stroke-width:2;stroke-dasharray:4 5}
.hx-d{fill:var(--surface);stroke:var(--line);stroke-width:2.5;transition:fill .4s}
.hx-d.on{stroke:var(--surface)}
.hx-d.cur{stroke:var(--accent);stroke-width:3;animation:pulse 1.4s ease-in-out infinite}
@keyframes pulse{50%{stroke-opacity:.35}}

.res{text-align:center}
.score{position:relative;width:180px;height:180px;margin:12px auto 4px}
.bighex{width:100%;height:100%}
.total{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center}
.total b{font-size:44px;letter-spacing:-.04em;line-height:1;font-variant-numeric:tabular-nums}
.total span{font-size:13px;color:var(--muted);font-weight:700}
.bond{font-size:16px;margin:4px auto 6px;max-width:440px}
.emo{font-size:28px;letter-spacing:4px;margin:2px 0 16px}
.acts{display:flex;justify-content:center;gap:8px;flex-wrap:wrap}
.pct{min-height:22px;margin:14px 0 4px;font-size:15px}
.stats4{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin:12px 0}
.stats4 div{display:flex;flex-direction:column}.stats4 b{font-size:24px;font-variant-numeric:tabular-nums}.stats4 span{font-size:12px;color:var(--muted);font-weight:600}
.next{margin:12px 0 0;font-size:14.5px;color:var(--muted)}.next b{color:var(--ink);font-variant-numeric:tabular-nums;font-size:17px}
.rh{text-align:left;font-size:16px;margin:24px 0 8px}.rh.c{text-align:center;font-size:13px;color:var(--muted);margin:14px 0 6px}
.rl{list-style:none;margin:0;padding:0;text-align:left;display:flex;flex-direction:column;gap:6px}
.rr{border:1px solid var(--line);border-radius:14px;padding:10px 12px}
.rrh{display:flex;align-items:center;gap:10px}
.rre{width:36px;height:36px;flex:none;border-radius:10px;display:grid;place-items:center;background:color-mix(in srgb,var(--c) 15%,var(--surface));font-size:19px}
.rrq{flex:1;min-width:0;display:flex;flex-direction:column}.rrq b{font-size:14.5px}.rrq small{color:var(--muted);font-size:13px}
.rrp{font-weight:800;font-variant-numeric:tabular-nums}
.rr summary{cursor:pointer;font-size:13px;color:var(--accent);font-weight:700;margin-top:6px}
.ag{display:flex;flex-direction:column;gap:2px;margin-top:8px}
.agt{font-size:12px;font-weight:800;color:color-mix(in srgb,var(--c) 75%,var(--ink))}
.agl{font-size:13.5px;line-height:1.5}
.dist{display:flex;flex-direction:column;gap:4px;max-width:360px;margin:0 auto}
.drow{display:grid;grid-template-columns:44px 1fr 28px;align-items:center;gap:8px;font-size:12.5px;color:var(--muted);font-variant-numeric:tabular-nums}
.drow i{display:block;height:14px;border-radius:4px;background:var(--accent);width:var(--w)}
.drow b{text-align:right}

.about{grid-area:about;background:var(--surface);border:1px solid var(--line);border-radius:26px;padding:28px clamp(18px,4vw,40px);margin-top:12px}
.about h2{font-size:24px;letter-spacing:-.02em;margin:0 0 14px}
.about h2:not(:first-child){margin-top:28px}
.about h3{font-size:16.5px;margin:0 0 4px}
.about p{margin:0;color:var(--muted)}
.cols{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.tiers-h{margin:24px 0 10px!important}
.about details{border-top:1px solid var(--line);padding:12px 0}
.about details:last-of-type{border-bottom:1px solid var(--line)}
.about summary{cursor:pointer;font-weight:700}
.about details p{margin-top:8px}
.foot{display:flex;flex-wrap:wrap;justify-content:center;gap:8px 22px;padding:10px 16px 40px;font-size:14px}
.foot a{color:var(--muted);text-decoration:none}.foot a:hover{color:var(--accent)}

.dlg{border:1px solid var(--line);border-radius:22px;background:var(--surface);color:var(--ink);padding:24px;width:min(460px,calc(100vw - 32px));box-shadow:0 40px 90px -30px rgba(0,0,0,.55)}
.dlg::backdrop{background:rgba(6,10,20,.6);backdrop-filter:blur(2px)}
.dlg h2{margin:0 0 12px;font-size:22px}
.dlg-x{position:absolute;top:12px;right:12px;margin:0}.dlg-x button{width:34px;height:34px;border-radius:10px;border:1px solid var(--line);background:none;font-size:20px;cursor:pointer;color:var(--muted)}
.rules{padding-left:20px;margin:0 0 16px;display:flex;flex-direction:column;gap:6px}
.dlg .tiers{grid-template-columns:repeat(5,1fr);gap:5px}.dlg .tiers b{font-size:10.5px}
.sug{display:flex;flex-direction:column;gap:6px}
.sug label{font-weight:700;font-size:13.5px;margin-top:4px}.sug label small{font-weight:500;color:var(--muted)}
.sug select,.sug textarea,.sug input{border:1px solid var(--line);border-radius:10px;padding:9px 11px;background:var(--paper);width:100%}
.sug .btn{margin-top:8px;align-self:flex-end}
.err{color:var(--bad);background:var(--bad-soft);border-radius:10px;padding:8px 11px;font-size:13.5px;margin:4px 0 0}
.thx{font-weight:700;font-size:16px}
.toast{position:fixed;left:50%;bottom:calc(20px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);background:var(--ink);color:var(--paper);border-radius:10px;padding:10px 16px;font-size:14px;z-index:50}

@media (max-width:900px){
  main{grid-template-columns:1fr;grid-template-areas:"hero" "game" "side" "about"}
  .side{display:grid;grid-template-columns:1fr 1fr;gap:16px}
  .cols{grid-template-columns:1fr}
}
@media (max-width:620px){
  body::before{height:330px}
  .pill-link{display:none}
  .hero{padding:16px 0 12px}.tag{font-size:14.5px}
  .game{padding:18px 16px 22px;border-radius:22px;min-height:380px}
  .side{grid-template-columns:1fr}
  .tiers{gap:4px}.tiers li{padding:8px 2px}.tiers b{font-size:10px}.tiers small{font-size:10px}
  .answer input{font-size:17px}
  .stats4 b{font-size:20px}
  .about{padding:22px 18px}
}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}html{scroll-behavior:auto}}
.days li.note{display:block;color:var(--muted);font-size:14px;border:0;padding:4px 0}
