/*************************
 * Flat, minimal, #121212. No shadows, no borders: depth comes from tonal surfaces.
 * HiverGo / Copyright 2026
 *************************/
@font-face { font-family: "Fredoka"; src: url("../@fonts/fredoka.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }

:root {
  --bg: #121212; --s1: #1a1a1d; --s2: #222226; --s3: #2b2b31; --s4: #35353c;
  --tx: #f4f4f6; --tx2: #aeaeb8; --tx3: #74747f;
  --y: #ffc93c; --b: #3db8ff; --r: #ff5b7f; --g: #4ade80; --o: #ff8a3d; --p: #b583ff;
  --ff: "Fredoka", "Baloo 2", "Varela Round", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --st: env(safe-area-inset-top, 0px); --sb: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.2, .9, .2, 1);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--tx); font: 500 16px/1.35 var(--ff); overflow: hidden; overscroll-behavior: none; touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; margin: 0; }
input, textarea, select { font: inherit; color: inherit; -webkit-user-select: text; user-select: text; }
h1, h2, h3, p { margin: 0; }
img { max-width: 100%; }
.muted { color: var(--tx2); } .small { font-size: 13px; } .tiny { font-size: 11px; color: var(--tx3); }
[hidden] { display: none !important; }

/* icon font + fallback */
.ms { font-family: "MSR"; font-weight: 200; font-style: normal; font-size: var(--s, 24px); line-height: 1; letter-spacing: normal; text-transform: none; display: inline-block; white-space: nowrap; direction: ltr; font-variation-settings: "FILL" 0, "wght" 200, "GRAD" 0, "opsz" 24; font-feature-settings: "liga"; -webkit-font-feature-settings: "liga"; flex: none; vertical-align: middle; }
.ms.sm { --s: 18px; } .ms.lg { --s: 32px; } .ms.xl { --s: 44px; }
.no-ms .ms { font-family: var(--ff); font-size: 0; font-variation-settings: normal; }
.no-ms .ms::before { content: attr(data-g); font-size: calc(var(--s, 24px) * .8); line-height: 1; }

#bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
#fx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 52; pointer-events: none; }
#app { position: fixed; inset: 0; z-index: 1; max-width: 560px; margin: 0 auto; }
.screen { position: absolute; inset: 0; display: none; flex-direction: column; padding: calc(10px + var(--st)) 16px calc(12px + var(--sb)); overflow: hidden; }
.screen.on { display: flex; animation: scrIn .38s var(--ease) both; }
.screen.center { align-items: center; justify-content: center; gap: 18px; }
.scroll { overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; flex: 1; min-height: 0; padding-bottom: 20px; }
.scroll::-webkit-scrollbar { width: 0; }
@keyframes scrIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- buttons, chips, controls ---------- */
.btn { position: relative; overflow: hidden; height: 52px; padding: 0 24px; border-radius: 26px; background: var(--s3); color: var(--tx); display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; font-size: 17px; transition: transform .12s var(--ease), background .2s, opacity .2s; width: 100%; }
.btn:active { transform: scale(.97); }
.btn.pri { background: var(--y); color: #1c1400; }
.btn.blue { background: var(--b); color: #00202f; }
.btn.sm { height: 40px; font-size: 15px; padding: 0 16px; width: auto; border-radius: 20px; }
.btn.ghost { background: transparent; color: var(--tx2); }
.btn[disabled] { opacity: .4; pointer-events: none; }
.ripple { position: absolute; border-radius: 50%; background: currentColor; opacity: .18; transform: scale(0); animation: rip .6s ease-out forwards; pointer-events: none; }
@keyframes rip { to { transform: scale(1); opacity: 0; } }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; background: var(--s2); display: grid; place-items: center; flex: none; }
.bar { display: flex; align-items: center; gap: 10px; min-height: 48px; margin-bottom: 6px; }
.bar h1 { font-size: 22px; font-weight: 600; flex: 1; }
.chip { height: 36px; padding: 0 14px; border-radius: 18px; background: var(--s2); color: var(--tx2); display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; position: relative; overflow: hidden; white-space: nowrap; transition: background .2s, color .2s; }
.chip.on { background: var(--y); color: #1c1400; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.nowrap { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
.chips.nowrap::-webkit-scrollbar { height: 0; }
.seg { display: flex; background: var(--s2); border-radius: 22px; padding: 3px; gap: 2px; }
.seg button { flex: 1; height: 38px; border-radius: 19px; color: var(--tx2); font-weight: 500; position: relative; overflow: hidden; transition: background .2s, color .2s; }
.seg button.on { background: var(--y); color: #1c1400; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 14px 0; }
.field > label, .lbl { font-size: 14px; color: var(--tx2); }
.inp { height: 48px; border-radius: 16px; background: var(--s2); padding: 0 16px; outline: none; width: 100%; font-size: 17px; border: 0; }
.inp:focus { background: var(--s3); }
textarea.inp { height: 96px; padding: 12px 16px; resize: none; }
.card { background: var(--s2); border-radius: 22px; padding: 14px 16px; }
.card + .card { margin-top: 10px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; }
.sw { width: 52px; height: 32px; border-radius: 16px; background: var(--s4); position: relative; transition: background .2s; flex: none; }
.sw::after { content: ""; position: absolute; left: 4px; top: 4px; width: 24px; height: 24px; border-radius: 50%; background: var(--tx2); transition: transform .25s var(--ease), background .2s; }
.sw.on { background: var(--y); } .sw.on::after { transform: translateX(20px); background: #1c1400; }
h2 { font-size: 22px; font-weight: 600; margin: 4px 0 8px; }
h3 { font-size: 16px; font-weight: 600; color: var(--tx2); margin: 18px 0 8px; }

/* ---------- time dial (range) ---------- */
.dial { background: var(--s2); border-radius: 22px; padding: 14px 16px 12px; }
.dial-top { display: flex; align-items: baseline; justify-content: space-between; }
.dial-val { font-size: 40px; font-weight: 700; color: var(--y); line-height: 1; font-variant-numeric: tabular-nums; }
.dial-tag { font-size: 14px; color: var(--tx2); }
.dial input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 36px; background: transparent; margin: 8px 0 0; --p: 30%; }
.dial input[type=range]::-webkit-slider-runnable-track { height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--y) var(--p), var(--s4) var(--p)); }
.dial input[type=range]::-moz-range-track { height: 14px; border-radius: 7px; background: var(--s4); }
.dial input[type=range]::-moz-range-progress { height: 14px; border-radius: 7px; background: var(--y); }
.dial input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 34px; height: 34px; border-radius: 50%; background: var(--tx); margin-top: -10px; transition: transform .15s; }
.dial input[type=range]::-moz-range-thumb { width: 34px; height: 34px; border-radius: 50%; background: var(--tx); border: 0; }
.dial input[type=range]:active::-webkit-slider-thumb { transform: scale(1.18); }
.dial-ticks { display: flex; justify-content: space-between; font-size: 11px; color: var(--tx3); padding: 0 4px; }

/* ---------- toasts, sheets ---------- */
#toasts { position: fixed; left: 0; right: 0; bottom: calc(96px + var(--sb)); z-index: 70; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { background: var(--s4); color: var(--tx); border-radius: 22px; padding: 10px 16px; display: flex; gap: 8px; align-items: center; font-size: 15px; max-width: min(92vw, 440px); opacity: 0; transform: translateY(14px) scale(.96); transition: all .35s var(--ease); }
.toast.in { opacity: 1; transform: none; }
.sheet-wrap { position: fixed; inset: 0; z-index: 40; pointer-events: none; }
.sheet-wrap.open { pointer-events: auto; }
.scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); opacity: 0; transition: opacity .3s; }
.sheet-wrap.open .scrim { opacity: 1; }
.sheet { position: absolute; left: 50%; bottom: 0; width: 100%; max-width: 560px; max-height: 92dvh; background: var(--s1); border-radius: 28px 28px 0 0; padding: 8px 18px calc(18px + var(--sb)); overflow-y: auto; transform: translate(-50%, 100%); transition: transform .4s var(--ease); }
.sheet-wrap.open .sheet { transform: translate(-50%, 0); }
.grab { width: 40px; height: 5px; border-radius: 3px; background: var(--s4); margin: 4px auto 10px; }
.sheet-body > .btn { margin-top: 10px; }

/* ---------- boot + menu ---------- */
.boot-mark img { width: min(72vw, 340px); animation: float 4s ease-in-out infinite; }
.boot-text { font-size: 44px; font-weight: 700; color: var(--y); }
.pbar { width: min(60vw, 260px); height: 14px; border-radius: 7px; background: var(--s3); overflow: hidden; }
.pbar.slim { height: 6px; border-radius: 3px; }
.pbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--b), var(--y)); border-radius: inherit; transition: width .25s; position: relative; overflow: hidden; }
.pbar i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent); transform: translateX(-100%); animation: shim 1.3s linear infinite; }
@keyframes shim { to { transform: translateX(100%); } }
@keyframes float { 50% { transform: translateY(-8px) rotate(-.6deg); } }
.menu-top { display: flex; align-items: center; justify-content: space-between; min-height: 48px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--s2); display: grid; place-items: center; font-size: 24px; }
.tokchip { height: 40px; border-radius: 20px; background: var(--s2); display: inline-flex; align-items: center; gap: 6px; padding: 0 14px 0 10px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tokchip .ms { color: var(--y); --s: 22px; }
.menu-hero { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 0; gap: 10px; text-align: center; }
.menu-hero img { width: min(78%, 360px); animation: float 5s ease-in-out infinite; }
.menu-hero .tag { color: var(--tx2); font-size: 16px; }
.play { height: 64px; font-size: 22px; border-radius: 32px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.tile { background: var(--s2); border-radius: 22px; padding: 14px 14px 12px; display: flex; flex-direction: column; gap: 2px; min-height: 82px; text-align: left; position: relative; overflow: hidden; align-items: flex-start; justify-content: space-between; }
.tile .ms { --s: 28px; color: var(--y); }
.tile b { font-weight: 600; font-size: 16px; }
.tile small { color: var(--tx3); font-size: 12px; }
.banner { background: var(--s2); border-radius: 18px; padding: 10px 14px; display: flex; align-items: center; gap: 10px; font-size: 14px; margin: 10px 0 12px; color: var(--tx2); }
.banner .ms { color: var(--b); }
.banner button { margin-left: auto; color: var(--y); font-weight: 600; }

/* ---------- lists / packs / library ---------- */
.list { display: flex; flex-direction: column; gap: 10px; }
.pack { background: var(--s2); border-radius: 20px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; }
.pack .info { flex: 1; min-width: 0; }
.pack b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pack .emo { font-size: 26px; width: 46px; height: 46px; border-radius: 14px; background: var(--s3); display: grid; place-items: center; }
.code { background: var(--s2); border-radius: 14px; padding: 10px 12px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; color: var(--tx2); white-space: pre-wrap; word-break: break-all; -webkit-user-select: text; user-select: text; max-height: 220px; overflow: auto; }
.picked { display: flex; flex-wrap: wrap; gap: 6px; min-height: 56px; background: var(--s2); border-radius: 18px; padding: 8px; align-items: center; }
.picked button { font-size: 30px; width: 44px; height: 44px; border-radius: 12px; background: var(--s3); display: grid; place-items: center; animation: pick .25s var(--ease); }
@keyframes pick { from { transform: scale(.3); opacity: 0; } }
.egrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 6px; max-height: 38dvh; overflow-y: auto; margin-top: 10px; }
.egrid button { font-size: 28px; height: 48px; border-radius: 12px; background: var(--s2); display: grid; place-items: center; }
.egrid button:active { background: var(--s4); }
.hint-row { display: flex; gap: 8px; margin-bottom: 8px; }
.hint-row .inp { flex: 1; }

/* ---------- dictionary import ---------- */
.dcard { background: var(--s2); border-radius: 22px; padding: 16px; }
.dcard + .dcard { margin-top: 12px; }
.steps { list-style: none; margin: 12px 0 4px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.steps li { display: flex; align-items: center; gap: 10px; color: var(--tx3); font-size: 14px; transition: color .3s; }
.steps li .dot { width: 22px; height: 22px; border-radius: 50%; background: var(--s4); display: grid; place-items: center; flex: none; transition: background .3s; }
.steps li.now { color: var(--tx); } .steps li.now .dot { background: var(--b); animation: pulse 1s ease-in-out infinite; }
.steps li.ok { color: var(--tx2); } .steps li.ok .dot { background: var(--g); }
.steps li .dot .ms { --s: 14px; color: #06210f; }
@keyframes pulse { 50% { transform: scale(1.25); } }
.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; text-align: center; }
.stats3 div { background: var(--s3); border-radius: 14px; padding: 8px 4px; }
.stats3 b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.stats3 small { color: var(--tx3); font-size: 11px; }

/* ---------- profile / versus / codex ---------- */
.hero-card { display: flex; gap: 14px; align-items: center; }
.hero-card .avatar { width: 72px; height: 72px; font-size: 40px; }
.xpbar { height: 10px; border-radius: 5px; background: var(--s4); overflow: hidden; margin-top: 6px; }
.xpbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--p), var(--y)); border-radius: 5px; transition: width .8s var(--ease); }
.agrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.ach { background: var(--s2); border-radius: 18px; padding: 12px; text-align: center; opacity: .4; }
.ach.on { opacity: 1; }
.ach .e { font-size: 30px; } .ach b { display: block; font-size: 14px; margin-top: 4px; } .ach small { color: var(--tx3); font-size: 11px; line-height: 1.2; display: block; }
.avs { display: flex; flex-wrap: wrap; gap: 8px; }
.avs button { width: 46px; height: 46px; border-radius: 14px; background: var(--s2); font-size: 26px; display: grid; place-items: center; }
.avs button.on { background: var(--y); }
.lb { display: flex; flex-direction: column; gap: 8px; }
.lb .r { display: flex; align-items: center; gap: 12px; background: var(--s2); border-radius: 18px; padding: 10px 14px; }
.lb .r.me { background: var(--s4); }
.lb .r .n { width: 24px; text-align: center; color: var(--tx3); font-weight: 600; }
.lb .r .a { font-size: 24px; } .lb .r .t { flex: 1; min-width: 0; } .lb .r .s { font-weight: 700; color: var(--y); font-variant-numeric: tabular-nums; }
.ghost-tag { font-size: 11px; color: var(--tx3); margin-left: 6px; }
.lore { background: var(--s2); border-radius: 22px; padding: 16px; }
.lore + .lore { margin-top: 10px; }
.lore .big { font-size: 30px; } .lore b { display: block; font-size: 18px; margin: 4px 0; } .lore p { color: var(--tx2); font-size: 15px; line-height: 1.45; }
.bars { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.bars div { display: grid; grid-template-columns: 64px 1fr 30px; gap: 8px; align-items: center; font-size: 13px; color: var(--tx2); }
.bars i { display: block; height: 8px; border-radius: 4px; background: var(--s4); position: relative; overflow: hidden; }
.bars i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--b); border-radius: 4px; }

/* ---------- ARENA ---------- */
#arena { padding: calc(10px + var(--st)) 14px calc(10px + var(--sb)); }
.hud { flex: none; }
.hud-row { display: flex; align-items: center; justify-content: center; gap: 10px; }
.tools { display: flex; gap: 10px; }
.tool { position: relative; width: 40px; height: 40px; border-radius: 50%; background: var(--s2); display: grid; place-items: center; overflow: visible; transition: opacity .2s, transform .12s, background .2s; }
.tool .ms { --s: 22px; color: var(--tx); }
.tool:active { transform: scale(.9); }
.tool .cost { position: absolute; top: 43px; left: 50%; transform: translateX(-50%); font-size: 11px; color: var(--tx3); font-variant-numeric: tabular-nums; }
.tool.dis { opacity: .3; pointer-events: none; }
.tool.spin .ms { animation: spin 1s linear infinite; color: var(--b); }
@keyframes spin { to { transform: rotate(360deg); } }
.tool.flash { animation: flash .5s; }
@keyframes flash { 40% { background: var(--y); } }
.clock { position: relative; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.clock svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.clock circle { fill: none; stroke-width: 8; }
.ring-t { stroke: var(--s3); }
.ring-p { stroke: var(--b); stroke-linecap: round; stroke-dasharray: 226.2; stroke-dashoffset: 0; }
.deg { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; z-index: 1; }
.clock.low .deg { color: var(--r); animation: beat .9s ease-in-out infinite; }
@keyframes beat { 50% { transform: scale(1.14); } }
.diff { position: absolute; left: -4px; top: -4px; width: 30px; height: 30px; border-radius: 50%; background: var(--s4); display: grid; place-items: center; z-index: 2; }
.diff .ms { --s: 18px; }
.diff.easy .ms { color: var(--g); } .diff.medium .ms { color: var(--y); } .diff.hard .ms { color: var(--o); } .diff.expert .ms { color: var(--p); }
.bowlrow { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 22px; }
.bowl { width: 156px; height: 124px; flex: none; transition: width .3s var(--ease), height .3s var(--ease); }
.pill { min-width: 62px; height: 44px; border-radius: 22px; background: var(--s2); display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.pill small { font-size: 10px; font-weight: 500; color: var(--tx3); }
.pill .ms { --s: 18px; color: var(--o); }
.pill.pop { animation: bump .5s var(--ease); }
@keyframes bump { 40% { transform: scale(1.25); } }
.kb .bowl { width: 92px; height: 72px; } .kb .bowlrow { margin-top: 10px; } .kb .tool .cost { display: none; }
.stage { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; margin-top: 12px; }
.cat { text-align: center; min-height: 28px; font-size: 18px; font-weight: 500; color: var(--tx2); letter-spacing: .03em; flex: none; padding-top: 4px; }
.cat span { display: inline-block; white-space: pre; animation: matter .7s both; }
@keyframes matter { from { opacity: 0; filter: blur(9px); transform: translateY(6px) scale(1.4); } to { opacity: 1; filter: blur(0); transform: none; } }
.emojis { flex: 1; position: relative; min-height: 50px; }
.slot { position: absolute; left: 0; top: 0; transition: transform .5s var(--ease), width .4s, height .4s; }
.slot .pop { width: 100%; height: 100%; opacity: 0; filter: blur(18px); transform: scale(.45) translateY(16px); transition: opacity .9s ease, filter 1.1s ease, transform 1s cubic-bezier(.2, 1.3, .3, 1); display: grid; place-items: center; }
.slot.in .pop { opacity: 1; filter: blur(0); transform: none; }
.slot.out .pop { opacity: 0; filter: blur(16px); transform: scale(.5); transition-duration: .45s; }
.slot .host { position: relative; display: grid; place-items: center; }
.slot canvas { width: 100% !important; height: 100% !important; }
.glyph { display: block; font-size: var(--es, 64px); line-height: 1; text-align: center; animation: bob 2.8s ease-in-out infinite; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
@keyframes bob { 50% { transform: translateY(-6%) rotate(2deg); } }
.slot.hop .pop { animation: hop .7s var(--ease) both; animation-delay: var(--d, 0s); }
@keyframes hop { 30% { transform: translateY(-22%) scale(1.12); } 60% { transform: translateY(2%) scale(.96); } }
.stage.fail .slot .pop { filter: grayscale(1) brightness(.8); transition: filter .6s; }
.mist { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
.clues { flex: none; display: flex; flex-direction: column; gap: 6px; max-height: 36%; overflow-y: auto; padding: 4px 0; }
.clues::-webkit-scrollbar { width: 0; }
.clue { display: flex; gap: 10px; align-items: flex-start; background: var(--s2); border-radius: 16px; padding: 8px 12px; font-size: 15px; line-height: 1.3; animation: clueIn .5s var(--ease) both; }
.clue .ms { --s: 20px; color: var(--y); margin-top: 1px; }
.clue.word .ms { color: var(--b); } .clue.swap .ms { color: var(--p); }
.clue .mask { display: block; letter-spacing: .14em; font-weight: 700; color: var(--y); font-size: 17px; margin-top: 2px; word-break: break-all; }
.clue .t span { display: inline-block; white-space: pre; animation: matter .4s both; }
@keyframes clueIn { from { opacity: 0; transform: translateY(12px); filter: blur(6px); } }

/* result */
.result { display: none; flex: none; flex-direction: column; align-items: center; gap: 10px; padding: 6px 0; }
.stage.done .result { display: flex; } .stage.done .clues { display: none; }
.stage.done .emojis { flex: 0 0 34%; }
.answer { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; perspective: 500px; }
.aw { display: flex; gap: 3px; }
.lt { width: 25px; height: 33px; border-radius: 8px; background: var(--s3); display: grid; place-items: center; font-weight: 700; font-size: 19px; opacity: 0; transform: rotateX(90deg); text-transform: uppercase; }
.lt.in { animation: flip .55s var(--ease) forwards; }
.lt.p { background: none; width: 12px; }
.win .lt { color: var(--y); } .lose .lt { color: var(--r); } .lose .lt.hid { color: var(--tx3); }
@keyframes flip { 0% { opacity: 0; transform: rotateX(90deg) scale(.7); } 60% { opacity: 1; transform: rotateX(-12deg) scale(1.1); } 100% { opacity: 1; transform: none; } }
.bk { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 4px; }
.bk div { display: flex; justify-content: space-between; color: var(--tx2); font-size: 14px; opacity: 0; transform: translateX(-14px); animation: rowIn .4s var(--ease) forwards; animation-delay: var(--d); }
.bk div b { color: var(--tx); font-variant-numeric: tabular-nums; }
.bk .tot { color: var(--tx); font-size: 22px; font-weight: 700; margin-top: 4px; }
.bk .tot b { color: var(--y); }
@keyframes rowIn { to { opacity: 1; transform: none; } }
.verdict { font-size: 15px; color: var(--tx2); text-align: center; }
.stage.spot::before { content: ""; position: absolute; inset: -10% -20%; background: radial-gradient(circle at 50% 30%, rgba(255, 201, 60, .22), transparent 60%); animation: spot 1.6s ease-out both; pointer-events: none; z-index: 0; }
@keyframes spot { from { opacity: 0; transform: scale(.4); } 30% { opacity: 1; } to { opacity: .55; transform: scale(1.1); } }

/* dock */
.dock { flex: none; padding-top: 6px; }
.typer { position: relative; height: 45px; border-radius: 23px; background: var(--s2); overflow: hidden; transition: background .2s, transform .15s; --tfs: 24px; }
.typer:focus-within { background: var(--s3); }
.typer.shake { animation: shake .45s; background: #3a1c26; }
@keyframes shake { 20%, 60% { transform: translateX(-9px); } 40%, 80% { transform: translateX(9px); } }
.typer input { position: absolute; inset: 0; width: 100%; height: 100%; background: transparent; border: 0; outline: 0; color: transparent; caret-color: var(--y); font: 600 var(--tfs) / 45px var(--ff); text-align: center; padding: 0 16px; letter-spacing: 0; }
.mirror { position: absolute; inset: 0; font: 600 var(--tfs) / 45px var(--ff); text-align: center; white-space: pre; pointer-events: none; padding: 0 16px; overflow: hidden; letter-spacing: 0; }
.mirror span { display: inline-block; white-space: pre; }
.mirror span.n { animation: letterIn .42s var(--ease) both; }
@keyframes letterIn { 0% { opacity: 0; transform: translateY(-26px) scale(2.2) rotate(var(--rt, -10deg)); color: var(--b); filter: blur(3px); } 55% { color: var(--y); transform: translateY(2px) scale(.92); filter: none; } 100% { opacity: 1; transform: none; color: var(--tx); } }
.mirror.toss span { animation: toss .35s ease-in both; animation-delay: var(--d); }
@keyframes toss { to { opacity: 0; transform: translateY(40px) rotate(var(--rt, 20deg)); } }
.mirror.win span { color: var(--g); transition: color .3s; }
.ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--tx3); font-size: 17px; pointer-events: none; }
.warm { min-height: 24px; text-align: center; font-size: 14px; color: var(--tx2); padding: 3px 0; }
.warm.pop { animation: bump .4s var(--ease); }
.cta { margin-top: 2px; }
.dock.done .typer, .dock.done .warm { display: none; }

/* overlays */
#overlay { position: fixed; inset: 0; z-index: 45; pointer-events: none; }
.ov { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: rgba(18, 18, 18, .88); pointer-events: auto; padding: 24px; text-align: center; animation: fade .3s both; }
@keyframes fade { from { opacity: 0; } }
.ov .btn { max-width: 320px; }
.cd { font-size: min(48vw, 220px); font-weight: 700; color: var(--y); line-height: 1; animation: cdpop .85s var(--ease) both; }
.cd.go { color: var(--g); font-size: min(34vw, 160px); }
@keyframes cdpop { 0% { opacity: 0; transform: scale(2.6); filter: blur(14px); } 35% { opacity: 1; transform: scale(.94); filter: none; } 100% { opacity: .0; transform: scale(.7); } }
.cd.go { animation-name: gopop; }
@keyframes gopop { 0% { opacity: 0; transform: scale(.4); } 30% { opacity: 1; transform: scale(1.15); } 100% { opacity: 0; transform: scale(1.5); } }
.cd-sub { color: var(--tx2); }
#pops { position: fixed; inset: 0; z-index: 55; pointer-events: none; }
.tpop { position: fixed; display: flex; align-items: center; gap: 6px; font-size: 28px; font-weight: 700; color: var(--y); transform: translate(-50%, -50%); animation: tpop 2.6s both; white-space: nowrap; }
.tpop .ms { --s: 26px; }
.tpop.plus { color: var(--g); } .tpop.time { color: var(--b); } .tpop.pts { color: var(--r); }
@keyframes tpop { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.3); } 10% { opacity: 1; transform: translate(-50%, -50%) scale(1.3); } 18% { transform: translate(-50%, -50%) scale(1); } 82% { opacity: 1; transform: translate(-50%, -90%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -110%) scale(.9); } }

/* summary */
.sum-hero { text-align: center; padding: 8px 0 4px; }
.sum-score { font-size: 64px; font-weight: 700; color: var(--y); line-height: 1; font-variant-numeric: tabular-nums; }
.rgrid { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 10px 0; }
.rgrid span { width: 52px; height: 52px; border-radius: 14px; background: var(--s2); display: grid; place-items: center; font-size: 26px; position: relative; }
.rgrid span.ok::after, .rgrid span.no::after { content: ""; position: absolute; right: 4px; bottom: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--g); }
.rgrid span.no::after { background: var(--r); }
.vs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; text-align: center; }
.vs .big { font-size: 34px; font-weight: 700; } .vs .w { color: var(--y); }

body.rm *, body.rm *::before, body.rm *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
@media (min-width: 600px) { .screen { padding-left: 22px; padding-right: 22px; } }
@media (max-height: 640px) { .bowl { width: 128px; height: 100px; } .bowlrow { margin-top: 18px; } .clock { width: 76px; height: 76px; } }
