/* Unkrillion: a krill climbs from a violet trench to a sunlit surface. The sea behind the page brightens as the day's
   score grows (--lift 0..1 on .sea); all text sits on paper cards or on the dark bar, never on the sea itself. */
@font-face { font-family: "Baloo 2"; src: url("/fonts/baloo2.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: Lexend; src: url("/fonts/lexend.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }

:root {
  --ink: #22163f;
  --ink-soft: #5d5378;
  --paper: #fffaf2;
  --paper-2: #f4eefc;
  --line: #e4d9f2;
  --accent: #6a3de8;
  --accent-2: #5429cf;
  --accent-soft: #ece4ff;
  --on-accent: #fff;
  --glow: #2fd4c6;
  --sun: #ffc23d;
  --bad: #c93a48;
  --bad-soft: #ffe6e8;
  --bar: rgba(20, 10, 48, 0.86);
  --head: "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
  --body: Lexend, "Segoe UI", system-ui, sans-serif;
  --radius: 26px;
  --sb-thumb: rgba(255, 255, 255, 0.42);
  --sb-thumb-hover: rgba(255, 255, 255, 0.62);
  --sb-track: transparent;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: #0d0626; }
body { margin: 0; min-height: 100vh; font-family: var(--body); font-size: 16px; line-height: 1.55; color: var(--ink); }
img, svg { display: block; max-width: 100%; }
a { color: var(--accent-2); }
button, input, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--head); line-height: 1.1; margin: 0 0 .4em; }
:focus-visible { outline: 3px solid var(--glow); outline-offset: 2px; border-radius: 10px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- scrollbars: a pill, no track ---------- */
::-webkit-scrollbar { width: 14px; height: 14px; }
::-webkit-scrollbar-track { background: var(--sb-track); }
::-webkit-scrollbar-thumb { background: var(--sb-thumb); border: 3px solid transparent; border-right-width: 6px; background-clip: padding-box; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--sb-thumb-hover); background-clip: padding-box; }
::-webkit-scrollbar-corner { background: transparent; }
.paper-scroll { --sb-thumb: rgba(106, 61, 232, 0.55); --sb-thumb-hover: rgba(106, 61, 232, 0.8); }
.paper-scroll::-webkit-scrollbar { width: 12px; }
.paper-scroll::-webkit-scrollbar-track { margin: 22px 0; }
@supports not selector(::-webkit-scrollbar) {
  html { scrollbar-color: rgba(255, 255, 255, 0.45) transparent; }
  .paper-scroll { scrollbar-color: rgba(106, 61, 232, 0.55) transparent; scrollbar-width: thin; }
}

/* ---------- the sea ---------- */
.sea { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: linear-gradient(180deg, #2a1559 0%, #170b3c 46%, #08031b 100%); }
.sea > div { position: absolute; inset: 0; transition: opacity 1.6s ease; }
.sea-mid { background: linear-gradient(180deg, #3a8fc0 0%, #2a5c9e 40%, #1d2f6c 100%); opacity: clamp(0, calc(var(--lift) * 1.8), 1); }
.sea-sun { background: linear-gradient(180deg, #fff4cc 0%, #ffdc8f 16%, #9fe0dc 46%, #3f9cc0 78%, #2c78ad 100%); opacity: clamp(0, calc((var(--lift) - 0.48) * 2), 1); }
.sea-rays { background: repeating-linear-gradient(104deg, rgba(255, 250, 220, 0) 0 70px, rgba(255, 250, 220, 0.16) 90px 120px, rgba(255, 250, 220, 0) 150px 230px); -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 72%); mask-image: linear-gradient(180deg, #000 0%, transparent 72%); opacity: clamp(0, calc(var(--lift) * 1.1 - 0.1), 0.9); }
.sea-snow { inset: -200px 0 0 0 !important; background-image: radial-gradient(circle, rgba(190, 240, 255, 0.55) 0 1.3px, transparent 2px), radial-gradient(circle, rgba(255, 190, 230, 0.4) 0 1px, transparent 1.6px); background-size: 190px 210px, 130px 150px; background-position: 0 0, 60px 80px; opacity: clamp(0.1, calc(0.85 - var(--lift)), 0.85); animation: snow 38s linear infinite; }
@keyframes snow { to { transform: translateY(200px); } }

/* ---------- top bar ---------- */
.bar { position: sticky; top: 0; z-index: 30; background: var(--bar); color: #fff; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.bar-row { max-width: 1120px; margin: 0 auto; height: 60px; padding: 0 16px; display: flex; align-items: center; gap: 14px; }
.logo { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-family: var(--head); font-weight: 800; font-size: 24px; letter-spacing: .01em; }
.logo-krill { width: 48px; height: 32px; filter: drop-shadow(0 0 6px rgba(143, 252, 255, 0.45)); }
.site-nav { display: flex; gap: 4px; margin-left: 10px; }
.site-nav a { color: rgba(255, 255, 255, 0.82); text-decoration: none; padding: 6px 11px; border-radius: 99px; font-size: 15px; }
.site-nav a:hover, .site-nav a[aria-current] { color: #fff; background: rgba(255, 255, 255, 0.12); }
.bar-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.depth { margin: 0; display: flex; align-items: baseline; gap: 3px; padding: 5px 12px; border-radius: 99px; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.18); font-family: var(--head); font-weight: 700; font-size: 18px; line-height: 1.2; white-space: nowrap; min-width: 98px; justify-content: center; }
.depth small { font-size: 13px; opacity: .8; }
.icon-btn { width: 40px; height: 40px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.08); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.icon-btn:hover { background: rgba(255, 255, 255, 0.18); }
.icon-btn svg { width: 20px; height: 20px; }
.menu { position: absolute; right: 16px; top: 64px; width: 250px; padding: 8px; border-radius: 20px; background: var(--paper); color: var(--ink); box-shadow: 0 18px 50px rgba(5, 2, 20, 0.5); display: grid; gap: 2px; animation: pop .16s ease-out; }
.menu[hidden] { display: none; }
.menu a, .menu button { display: block; text-align: left; width: 100%; padding: 10px 14px; border-radius: 12px; border: 0; background: none; color: var(--ink); text-decoration: none; cursor: pointer; font-size: 15px; }
.menu a:hover, .menu button:hover, .menu a:focus-visible, .menu button:focus-visible { background: var(--accent-soft); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 8px; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
@media (max-width: 820px) { .gamepage .site-nav { display: none; } }
@media (max-width: 760px) {
  .textpage .bar-row { height: auto; flex-wrap: wrap; padding: 8px 12px 0; gap: 6px; }
  .textpage .site-nav { order: 3; width: 100%; margin: 0 -4px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
  .textpage .site-nav::-webkit-scrollbar { display: none; }
  .logo { font-size: 21px; }
  .depth { min-width: 86px; font-size: 16px; }
}
@media (max-width: 440px) {
  .bar-row { gap: 10px; padding: 0 12px; }
  .logo { font-size: 20px; gap: 6px; flex-shrink: 0; }
  .logo-krill { width: 40px; height: 27px; }
  .bar-tools { gap: 6px; }
  .depth { min-width: 0; padding: 5px 10px; font-size: 15px; }
  #stats-btn { display: none; }
}

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 24px; border-radius: 99px; border: 0; cursor: pointer; font-family: var(--head); font-weight: 700; font-size: 18px; line-height: 1.1; text-decoration: none; transition: transform .12s ease, background .15s ease, box-shadow .15s ease; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn svg { width: 19px; height: 19px; }
.btn-go { background: linear-gradient(180deg, #7b52f2, var(--accent-2)); color: var(--on-accent); box-shadow: 0 10px 24px rgba(84, 41, 207, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.btn-go:hover { box-shadow: 0 12px 30px rgba(84, 41, 207, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.btn-go[disabled] { opacity: .55; cursor: default; }
.btn-soft { background: var(--accent-soft); color: var(--accent-2); }
.btn-soft:hover { background: #e0d4ff; }
.btn-line { background: transparent; color: var(--ink); border: 2px solid var(--line); }
.btn-line:hover { border-color: #cbb9ec; }
.btn-small { min-height: 38px; padding: 6px 16px; font-size: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* ---------- game layout ---------- */
.stage { max-width: 660px; margin: 0 auto; padding: 18px 14px 30px; }
.card { position: relative; background: var(--paper); border-radius: var(--radius); box-shadow: 0 24px 60px rgba(6, 2, 26, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.6); padding: 26px 24px; }
#app { min-height: 520px; }
.hero { text-align: center; padding-top: 4px; }
.hero-krill { width: 220px; height: auto; aspect-ratio: 3 / 2; margin: -6px auto 2px; }
.krill { display: block; }
.krill-svg { width: 100%; height: auto; overflow: visible; }
.hero .krill, .end .krill { width: 220px; margin: -6px auto 2px; }
.kicker { margin: 0 0 6px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; font-size: 14px; color: var(--ink-soft); }
.kicker b { color: var(--accent-2); background: var(--accent-soft); padding: 2px 10px; border-radius: 99px; font-weight: 600; }
.title { font-size: clamp(52px, 13vw, 78px); font-weight: 800; letter-spacing: -.01em; margin: 0; background: linear-gradient(180deg, #8a4dff 10%, #e2489c 95%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-top: .08em; }
.tagline { max-width: 460px; margin: 6px auto 20px; color: var(--ink-soft); font-size: 17px; }
.hero .btn-go { min-width: 260px; font-size: 20px; min-height: 54px; }
.hero .row { margin-top: 14px; }
.hero .note { margin: 16px 0 0; font-size: 14px; color: var(--ink-soft); }

/* krill motion */
.krill-svg .kr-legs { transform-origin: 90px 80px; animation: paddle 1.1s ease-in-out infinite; }
.krill-svg .kr-ant { transform-origin: 145px 45px; animation: feel 3.2s ease-in-out infinite; }
.krill-svg .kr-ant2 { animation-delay: -1.4s; }
.krill-svg .kr-glow { animation: glow 2.4s ease-in-out infinite; }
.krill[data-mood="wait"] .krill-svg, .hero-krill { animation: bob 3.4s ease-in-out infinite; }
.krill[data-mood="joy"] .krill-svg { animation: hop .9s ease-out; }
.krill[data-mood="sad"] .krill-svg { animation: sulk .6s ease-out; }
.kr-spark { animation: twinkle 1.2s ease-in-out infinite; transform-origin: 140px 30px; }
.kr-bubble { animation: rise 2.2s ease-in infinite; }
@keyframes paddle { 50% { transform: skewX(-9deg); } }
@keyframes feel { 50% { transform: rotate(-5deg); } }
@keyframes glow { 50% { opacity: .45; } }
@keyframes bob { 50% { transform: translateY(-7px) rotate(-1.5deg); } }
@keyframes hop { 30% { transform: translateY(-22px) rotate(-6deg); } 60% { transform: translateY(-8px); } }
@keyframes sulk { 30% { transform: translateX(-6px) rotate(3deg); } 60% { transform: translateX(5px); } }
@keyframes twinkle { 50% { opacity: .35; transform: scale(.85); } }
@keyframes rise { to { transform: translateY(-16px); opacity: 0; } }

/* ---------- a round ---------- */
.round-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.round-no { font-size: 14px; color: var(--ink-soft); }
.round-no b { color: var(--ink); }
.tiles { display: flex; gap: 5px; }
.tile { width: 22px; height: 22px; border-radius: 7px; background: var(--paper-2); border: 2px solid var(--line); }
.tile.now { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(106, 61, 232, 0.18); }
.answer-box { position: relative; text-align: center; padding: 20px 16px 22px; border-radius: 22px; background: linear-gradient(180deg, #1e0f4a, #2c1868); color: #fff; overflow: hidden; }
.answer-box::after { content: ""; position: absolute; inset: auto -20% -60% -20%; height: 120%; background: radial-gradient(closest-side, rgba(47, 212, 198, 0.25), transparent); pointer-events: none; }
.answer-box .krill { position: absolute; width: 92px; right: 10px; top: 8px; opacity: .95; }
.cat-chip { display: inline-block; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; padding: 3px 12px; border-radius: 99px; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.22); }
.answer-label { margin: 12px 0 0; font-size: 14px; opacity: .75; }
.answer-word { position: relative; z-index: 1; margin: 2px 0 0; font-family: var(--head); font-weight: 800; font-size: clamp(34px, 9.5vw, 58px); line-height: 1.02; text-transform: uppercase; letter-spacing: .015em; overflow-wrap: anywhere; text-wrap: balance; color: #fff; text-shadow: 0 0 24px rgba(143, 252, 255, 0.35); }
.clue-form { margin-top: 16px; display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: start; }
.clue-field { position: relative; }
.clue-field textarea { display: block; width: 100%; min-height: 96px; resize: none; padding: 14px 16px 26px; border-radius: 18px; border: 2px solid var(--line); background: #fff; font-size: 17px; line-height: 1.4; }
.clue-field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(106, 61, 232, 0.15); }
.clue-field textarea[disabled] { background: var(--paper-2); }
.count { position: absolute; right: 14px; bottom: 8px; font-size: 12px; color: var(--ink-soft); }
.clock { position: relative; width: 74px; height: 74px; }
.clock svg { width: 74px; height: 74px; transform: rotate(-90deg); }
.clock circle { fill: none; stroke-width: 7; }
.clock .bg { stroke: var(--paper-2); }
.clock .fg { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .25s linear, stroke .3s; }
.clock.low .fg { stroke: var(--bad); }
.clock.paused .fg { stroke: var(--glow); }
.clock b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--head); font-size: 24px; font-weight: 800; }
.clock small { position: absolute; left: 0; right: 0; bottom: -18px; text-align: center; font-size: 11px; color: var(--ink-soft); white-space: nowrap; }
.send-row { display: flex; gap: 10px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.send-row .btn-go { flex: 1 1 200px; }
.tries { font-size: 13px; color: var(--ink-soft); }
.msg { min-height: 26px; margin: 12px 0 0; font-size: 15px; }
.msg.bad { padding: 10px 14px; border-radius: 14px; background: var(--bad-soft); color: #8d1f2b; }
.msg.wait { color: var(--accent-2); }
.msg.wait::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px; border-radius: 50%; border: 2.5px solid var(--accent-soft); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hint-line { margin: 10px 0 0; font-size: 13px; color: var(--ink-soft); }

/* verdict */
.verdict { margin-top: 16px; padding: 18px; border-radius: 22px; background: var(--paper-2); text-align: center; animation: pop .25s ease-out; }
.verdict .krill { width: 130px; margin: -4px auto 0; }
.verdict .your { margin: 6px 0 10px; font-size: 16px; font-style: italic; color: var(--ink); overflow-wrap: anywhere; }
.verdict .why { margin: 10px auto 0; max-width: 460px; color: var(--ink-soft); font-size: 15px; }
.verdict .lift { margin: 8px 0 0; font-family: var(--head); font-weight: 700; font-size: 20px; }
.verdict .crowd { margin: 6px 0 0; font-size: 13px; color: var(--ink-soft); }
.verdict .btn { margin-top: 14px; min-width: 220px; }

/* level badges: pale fill, dark text */
.badge { display: inline-flex; align-items: center; gap: 7px; padding: 4px 13px 4px 10px; border-radius: 99px; font-weight: 600; font-size: 15px; white-space: nowrap; }
.badge::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.big { font-family: var(--head); font-size: 24px; padding: 6px 20px 6px 16px; }
.t-p100 { background: #fff0bd; color: #6f4a00; } .t-p100::before { background: #f0a800; opacity: 1; }
.t-p85 { background: #ffe2cc; color: #873600; } .t-p85::before { background: #ff7a26; opacity: 1; }
.t-p60 { background: #d6f6e4; color: #0f5f3b; } .t-p60::before { background: #1fb877; opacity: 1; }
.t-p30 { background: #dae7ff; color: #1a46a0; } .t-p30::before { background: #3b82f6; opacity: 1; }
.t-p15 { background: #eedfff; color: #5a2899; } .t-p15::before { background: #9b4dff; opacity: 1; }
.t-p10 { background: #eceaf2; color: #474359; } .t-p10::before { background: #9d98ae; opacity: 1; }
.t-none { background: #2c2446; color: #fff; } .t-none::before { background: #fff; opacity: .6; }
.tile.t-p100 { background: #f0a800; border-color: #f0a800; } .tile.t-p85 { background: #ff7a26; border-color: #ff7a26; }
.tile.t-p60 { background: #1fb877; border-color: #1fb877; } .tile.t-p30 { background: #3b82f6; border-color: #3b82f6; }
.tile.t-p15 { background: #9b4dff; border-color: #9b4dff; } .tile.t-p10 { background: #c9c5d6; border-color: #c9c5d6; }
.tile.t-none { background: #2c2446; border-color: #2c2446; }

/* ---------- end of a day ---------- */
.end { text-align: center; }
.end .score { margin: 0; font-family: var(--head); font-weight: 800; font-size: clamp(56px, 16vw, 84px); line-height: 1; color: var(--ink); }
.end .score small { font-size: .42em; color: var(--ink-soft); font-weight: 700; }
.end .rank { margin: 6px 0 0; font-family: var(--head); font-size: 26px; font-weight: 700; color: var(--accent-2); }
.end .where { margin: 4px 0 0; color: var(--ink-soft); }
.end .tiles { justify-content: center; margin: 16px 0 6px; }
.end .tiles .tile { width: 32px; height: 32px; border-radius: 9px; }
.end .stats-line { margin: 10px 0 0; font-size: 14px; color: var(--ink-soft); }
.end .row { margin-top: 16px; }
.breakdown { margin: 22px 0 0; padding: 0; list-style: none; text-align: left; display: grid; gap: 10px; }
.breakdown > li { border: 2px solid var(--line); border-radius: 20px; padding: 14px 16px; background: #fff; }
.bd-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.bd-head h3 { margin: 0; font-size: 22px; }
.bd-head .cat { display: block; font-family: var(--body); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
.bd-clue { margin: 8px 0 0; font-style: italic; overflow-wrap: anywhere; }
.bd-why { margin: 4px 0 0; font-size: 14px; color: var(--ink-soft); }
.examples { margin-top: 10px; }
.examples summary, .faq summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--accent-2); }
.examples summary::-webkit-details-marker, .faq summary::-webkit-details-marker { display: none; }
.examples summary::after, .faq summary::after { content: ""; width: 9px; height: 9px; border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s; margin-left: 2px; }
.examples[open] summary::after, .faq details[open] summary::after { transform: rotate(225deg) translate(-2px, -2px); }
.ex-list { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.ex-list li { display: grid; grid-template-columns: 132px 1fr; gap: 10px; align-items: start; font-size: 15px; }
.ex-list .badge { font-size: 13px; justify-self: start; }
.fact { margin: 10px 0 0; padding: 10px 14px; border-radius: 14px; background: var(--paper-2); font-size: 14px; }
@media (max-width: 480px) { .ex-list li { grid-template-columns: 1fr; gap: 3px; } .card { padding: 20px 16px; } .clue-form { grid-template-columns: 1fr; } .clock { justify-self: center; order: -1; margin-bottom: 14px; } }

/* ---------- unlimited and challenges ---------- */
.ul-tools { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 12px; }
.challenge { margin-top: 22px; padding: 18px; border-radius: 22px; border: 2px dashed #cbb9ec; text-align: left; }
.challenge h2 { font-size: 22px; margin: 0 0 4px; }
.challenge p { margin: 0 0 10px; font-size: 15px; color: var(--ink-soft); }
.challenge form { display: flex; gap: 10px; flex-wrap: wrap; }
.challenge input { flex: 1 1 220px; min-height: 48px; padding: 10px 16px; border-radius: 99px; border: 2px solid var(--line); background: #fff; }
.challenge input:focus { outline: none; border-color: var(--accent); }
.link-out { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.link-out code { flex: 1 1 220px; padding: 10px 14px; border-radius: 14px; background: var(--paper-2); font-size: 14px; overflow-wrap: anywhere; }
.session { margin: 0 0 12px; font-size: 14px; color: var(--ink-soft); text-align: center; }

/* ---------- windows (stats, tutorial) ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(8, 3, 26, 0.62); animation: fade .15s ease-out; }
@keyframes fade { from { opacity: 0; } }
.window { position: relative; width: min(520px, 100%); max-height: min(720px, calc(100vh - 32px)); overflow: hidden; display: flex; flex-direction: column; background: var(--paper); border-radius: 26px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5); animation: pop .2s ease-out; }
.window-scroll { overflow-y: auto; padding: 24px 22px 22px; }
.window h2 { font-size: 28px; padding-right: 40px; }
.close { position: absolute; right: 12px; top: 12px; z-index: 2; width: 40px; height: 40px; border-radius: 14px; border: 0; background: var(--paper-2); cursor: pointer; display: grid; place-items: center; }
.close svg { width: 20px; height: 20px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0 16px; text-align: center; }
.stat-grid b { display: block; font-family: var(--head); font-size: 30px; line-height: 1.1; }
.stat-grid span { font-size: 12px; color: var(--ink-soft); }
.bars { display: grid; gap: 6px; }
.bars div { display: grid; grid-template-columns: 120px 1fr 32px; gap: 8px; align-items: center; font-size: 13px; }
.bars i { display: block; height: 14px; border-radius: 99px; background: linear-gradient(90deg, #7b52f2, #e2489c); min-width: 4px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.switch input { width: 22px; height: 22px; accent-color: var(--accent); }

/* tutorial */
.tour-step { min-height: 300px; }
.tour-step .eyebrow { margin: 0 0 4px; font-size: 13px; color: var(--accent-2); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.tour-demo { margin: 12px 0; }
.tour-demo .answer-box { padding: 16px; }
.tour-demo .answer-word { font-size: 40px; }
.tour-picks { display: grid; gap: 8px; margin: 12px 0; }
.tour-picks button { text-align: left; padding: 12px 14px; border-radius: 16px; border: 2px solid var(--line); background: #fff; cursor: pointer; font-size: 15px; }
.tour-picks button:hover, .tour-picks button[aria-pressed="true"] { border-color: var(--accent); }
.tour-out { min-height: 56px; margin: 4px 0 0; font-size: 15px; }
.ladder { margin: 12px 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.ladder li { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; }
.tour-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.dots { display: flex; gap: 6px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.dots i.on { background: var(--accent); }

/* ---------- the guide under the game and the footer ---------- */
.guide { max-width: 760px; margin: 8px auto 0; padding: 0 14px; }
.guide .doc { margin-bottom: 18px; }
.foot { margin-top: 30px; background: var(--bar); color: rgba(255, 255, 255, 0.82); font-size: 14px; }
.foot-in { max-width: 1000px; margin: 0 auto; padding: 26px 18px 34px; text-align: center; }
.foot-brand { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 0 0 8px; font-family: var(--head); font-size: 22px; color: #fff; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; }
.foot a { color: #fff; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; padding: 10px 18px; border-radius: 99px; background: #1a0f3d; color: #fff; font-size: 15px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); animation: pop .2s ease-out; }

body.calm *, body.calm *::before, body.calm *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
