/* Fruit Slash - all UI styles. Sizes use rem (scaled by the shorter screen side); safe-area insets and 100dvh keep phones tidy.
   Sections: base, top bar, HUD, banner + hint, overlays (menu, blades, how to play, settings, cards), responsive */
:root { --acc: #FF3B5C; --sat: env(safe-area-inset-top, 0px); --sar: env(safe-area-inset-right, 0px); --sab: env(safe-area-inset-bottom, 0px); --sal: env(safe-area-inset-left, 0px); }
html { font-size: clamp(14px, calc(8px + .85vmin), 26px); height: 100%; }
html, body { margin: 0; height: 100%; height: 100dvh; overflow: hidden; background: #14062E; overscroll-behavior: none; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
body { font-family: var(--font-b); color: var(--paper); }
button { font-family: inherit; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
svg { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
svg.fill, .fill svg { fill: currentColor; stroke: none; }
img { -webkit-user-drag: none; }
#app, .fs { position: fixed; inset: 0; width: 100%; height: 100dvh; overflow: hidden; background: #14062E; }
.fs-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; will-change: transform; cursor: crosshair; }
kbd { font-family: var(--font-b); font-weight: 800; font-size: .85em; padding: .05em .45em; border-radius: 6px; background: rgba(255, 255, 255, .14); box-shadow: 0 2px 0 rgba(0, 0, 0, .35); }

/* ---------- buttons (extends brand .btn) ---------- */
.btn { gap: .5em; white-space: nowrap; touch-action: manipulation; min-height: 2.9em; }
.btn svg { width: 1.2em; height: 1.2em; flex: none; }
.btn svg.fill { fill: currentColor; stroke: none; }
.btn em { font-style: normal; opacity: .75; font-size: .8em; }
.btn--fs { --bg: var(--acc); --fg: #fff; --sh: #A3102B; }
.btn--ghost { --bg: rgba(255, 255, 255, .1); --sh: rgba(0, 0, 0, .35); font-size: .9rem; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.btn--sm { min-height: 0; }
.btn.armed { --bg: #FF5B2E; --fg: #fff; }
.shake { animation: fsshake .35s; }
@keyframes fsshake { 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }

/* ---------- top bar ---------- */
.fs-top { position: absolute; z-index: 45; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: flex-start; padding: calc(var(--sat) + 10px) calc(var(--sar) + 12px) 0 calc(var(--sal) + 12px); pointer-events: none; }
.fs-top > * { pointer-events: auto; }
.fs-home { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; padding: 6px 14px 6px 6px; border-radius: 14px; background: rgba(15, 12, 34, .55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .14) inset; }
.fs-home img { width: 34px; height: 34px; }
.fs-home b { font-family: var(--font-d); font-size: .95rem; font-weight: 400; line-height: 1; }
.fs-home b i { font-style: normal; color: var(--lime); }
.fs-tools { display: flex; gap: 8px; margin-left: auto; }
.fs-tool { width: 46px; height: 46px; border: 0; padding: 0; display: grid; place-items: center; border-radius: 13px; background: rgba(15, 12, 34, .55); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .14) inset; }
.fs-tool:hover { background: rgba(60, 30, 90, .7); }
.fs-tool svg { width: 21px; height: 21px; }
.fs-top.tb-menu .tool-pause { display: none; }
.fs-top.tb-play .fs-home { display: none; }

/* ---------- HUD ---------- */
.hud { position: absolute; inset: 0; z-index: 10; pointer-events: none; font-size: 1rem; }
.hud[hidden] { display: none; }
.hud-score { position: absolute; left: calc(var(--sal) + 16px); top: calc(var(--sat) + 10px); line-height: 1; text-shadow: 0 .1em 0 rgba(0, 0, 0, .45), 0 0 .6em rgba(0, 0, 0, .35); }
.hud-score small { display: block; font-size: max(12px, .62em); font-weight: 800; letter-spacing: .16em; color: #FFE9D0; opacity: .85; }
.hud-score b { display: block; font-family: var(--font-d); font-weight: 400; font-size: 2.7em; letter-spacing: .01em; font-variant-numeric: tabular-nums; margin: .05em 0 .02em; color: #fff; -webkit-text-stroke: .09em #5A0F2A; paint-order: stroke fill; text-shadow: 0 .07em 0 rgba(90, 15, 42, .8), 0 0 .5em rgba(0, 0, 0, .35); }
.hud-score b.pop { animation: fspop .3s var(--ease); }
@keyframes fspop { 0% { transform: scale(1.28); transform-origin: left center; } 100% { transform: none; } }
.hud-best { display: block; font-size: max(12px, .62em); font-weight: 800; letter-spacing: .12em; color: #FFE9D0; opacity: .8; }
.hud-score .hud-best b { display: inline; font: inherit; font-size: 1em; letter-spacing: inherit; color: #FFD34A; -webkit-text-stroke: 0; text-shadow: inherit; margin: 0; }
.hud-mid { position: absolute; left: 50%; top: calc(var(--sat) + 12px); transform: translateX(-50%); display: grid; justify-items: center; gap: .5em; }
.hud-lives { display: none; gap: .3em; filter: drop-shadow(0 .1em 0 rgba(0, 0, 0, .45)); }
.mode-classic .hud-lives { display: flex; }
.lv svg { width: 2.1em; height: 2.1em; color: rgba(255, 255, 255, .2); transition: color .2s; }
.lv.on svg { color: #FF4D77; filter: drop-shadow(0 0 .4em rgba(255, 60, 110, .7)); }
.lv.lost svg { animation: fslost .5s; }
@keyframes fslost { 0% { transform: scale(1.7) rotate(-14deg); color: #fff; } 100% { transform: none; } }
.hud-time { display: none; text-align: center; width: 9em; }
.mode-arcade .hud-time, .mode-zen .hud-time { display: block; }
.hud-time b { display: block; font-family: var(--font-d); font-weight: 400; font-size: 2.4em; line-height: 1; font-variant-numeric: tabular-nums; text-shadow: 0 .08em 0 rgba(0, 0, 0, .5); }
.hud-time i { display: block; height: .5em; border-radius: 99px; background: rgba(15, 12, 34, .6); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .16) inset; overflow: hidden; margin-top: .3em; }
.hud-time u { display: block; height: 100%; width: 100%; border-radius: inherit; background: linear-gradient(90deg, #5EE08F, #C6FF3D); transition: width .25s linear; }
.mode-arcade .hud-time u { background: linear-gradient(90deg, #FFB02E, #FFE65A); }
.hud-time.low b { color: #FF5B5B; animation: fslow .5s infinite; }
.hud-time.low u { background: #FF3B5C; }
@keyframes fslow { 50% { transform: scale(1.12); } }
.hud-state:empty { display: none; }
.pill { display: flex; align-items: center; gap: .6em; padding: .3em .9em; border-radius: 99px; font-family: var(--font-d); font-size: .95em; letter-spacing: .08em; box-shadow: 0 .15em 0 rgba(0, 0, 0, .35); animation: fsrise .3s var(--ease); }
.pill i { display: block; width: 5em; height: .45em; border-radius: 99px; background: rgba(0, 40, 80, .5); overflow: hidden; }
.pill u { display: block; height: 100%; background: #fff; border-radius: inherit; }
.pill--ice { background: linear-gradient(180deg, #8FE0FF, #4FA8FF); color: #04204A; }
.pill--frenzy { background: linear-gradient(180deg, #FFF07A, #FFB02E); color: #4A2400; animation: fsrise .3s var(--ease), fsbeat .45s infinite .3s; }
@keyframes fsbeat { 50% { transform: scale(1.1); } }

/* ---------- banner + hint ---------- */
.fs-banner { position: absolute; z-index: 20; left: 50%; top: 22%; transform: translate(-50%, 0); text-align: center; pointer-events: none; opacity: 0; width: 90%; }
.fs-banner.show { animation: fsban 2.6s ease both; }
.fs-banner small { display: block; font-weight: 800; letter-spacing: .24em; text-transform: uppercase; font-size: max(12px, .72rem); color: #FFE9D0; text-shadow: 0 2px 6px rgba(0, 0, 0, .7); }
.fs-banner b { display: block; font-family: var(--font-d); font-weight: 400; text-transform: uppercase; font-size: clamp(1.8rem, 1rem + 3vmin, 4.2rem); line-height: 1.05; color: #fff; text-shadow: 0 .06em 0 rgba(120, 20, 40, .8), 0 0 .5em rgba(0, 0, 0, .5); }
@keyframes fsban { 0% { opacity: 0; transform: translate(-50%, 14px) scale(.92); } 12% { opacity: 1; transform: translate(-50%, 0) scale(1); } 78% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -10px); } }
.fs-hint { position: absolute; z-index: 20; left: 50%; bottom: calc(var(--sab) + 7%); transform: translateX(-50%); max-width: 88%; padding: .6em 1.3em; border-radius: 99px; background: rgba(15, 12, 34, .72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .18) inset; font-weight: 800; font-size: .95rem; text-align: center; opacity: 0; pointer-events: none; }
.fs-hint.show { animation: fshint 4.4s ease both; }
@keyframes fshint { 0% { opacity: 0; transform: translate(-50%, 12px); } 8% { opacity: 1; transform: translate(-50%, 0); } 88% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- overlays ---------- */
.fs-ov { position: absolute; inset: 0; z-index: 40; display: none; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; pointer-events: none; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.fs-ov::-webkit-scrollbar { display: none; }
.fs-ov.show { display: block; animation: fsfade .25s ease; }
.fs-ov.fs-ui.show { pointer-events: auto; touch-action: pan-y; }
@keyframes fsfade { from { opacity: 0; } }
@keyframes fsrise { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.ov--screen.show { background: rgba(14, 5, 34, .82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.ov--center.show { background: rgba(14, 5, 34, .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: flex; padding: calc(var(--sat) + 1rem) 1rem calc(var(--sab) + 1rem); }

/* menu: click-through except buttons */
.ov--menu.show { background: linear-gradient(0deg, rgba(14, 4, 30, .55) 0%, rgba(14, 4, 30, 0) 34%), linear-gradient(180deg, rgba(14, 4, 30, .4) 0%, rgba(14, 4, 30, 0) 30%); }
.mn { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 1rem; padding: calc(var(--sat) + 4.4rem) calc(var(--sar) + 1rem) calc(var(--sab) + 1.1rem) calc(var(--sal) + 1rem); pointer-events: none; text-align: center; }
.mn > * { pointer-events: none; }
.mn-title small { display: block; font-weight: 800; letter-spacing: .4em; font-size: max(12px, .8rem); color: #FFE9D0; text-shadow: 0 2px 8px rgba(0, 0, 0, .6); margin-bottom: .5rem; }
.mn-title h1 { margin: 0; font-family: var(--font-d); font-weight: 400; text-transform: uppercase; line-height: .88; font-size: clamp(3.2rem, calc(4rem + 8vmin), 12rem); }
.mn-title h1 span { display: block; -webkit-background-clip: text; background-clip: text; color: transparent; padding: 0 .06em; }
.mn-title h1 span:first-child { background-image: linear-gradient(180deg, #F4FF9A 0%, #C6FF3D 45%, #3FD06A 100%); filter: drop-shadow(0 .05em 0 #0F5A2A) drop-shadow(0 .1em .22em rgba(0, 0, 0, .55)); }
.mn-title h1 span:last-child { background-image: linear-gradient(180deg, #FFF3A0 0%, #FF8A4D 42%, #FF3B5C 100%); filter: drop-shadow(0 .05em 0 #7A0E24) drop-shadow(0 .1em .22em rgba(0, 0, 0, .55)); margin-top: -.04em; }
.mn-title p { margin: .8rem 0 0; font-weight: 800; font-size: clamp(.95rem, .7rem + 1vmin, 1.5rem); color: #FFF4E2; text-shadow: 0 2px 8px rgba(0, 0, 0, .75); }
.mn-modes { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; width: 100%; }
.mode { pointer-events: auto; position: relative; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .9rem; width: min(25rem, 31vw); min-width: 15rem; text-align: left; border: 0; cursor: pointer; padding: 1rem 1.2rem 1rem 1rem; border-radius: 1.4rem; color: #fff; background: linear-gradient(180deg, rgba(48, 22, 86, .86), rgba(24, 8, 50, .9)); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 0 0 2px color-mix(in srgb, var(--mc) 70%, transparent) inset, 0 .35rem 0 rgba(0, 0, 0, .35), 0 1.4rem 3rem rgba(0, 0, 0, .4); transition: transform .15s var(--ease), box-shadow .15s; animation: fsrise .5s var(--ease) both; }
.mode:nth-child(2) { animation-delay: .08s; } .mode:nth-child(3) { animation-delay: .16s; }
.mode:hover, .mode:focus-visible { transform: translateY(-.3rem) scale(1.02); box-shadow: 0 0 0 3px var(--mc) inset, 0 .5rem 0 rgba(0, 0, 0, .35), 0 1.8rem 3.4rem rgba(0, 0, 0, .45), 0 0 2.5rem color-mix(in srgb, var(--mc) 45%, transparent); }
.mode:active { transform: translateY(.1rem); }
.mode-ic { width: 5.2rem; height: 5.2rem; display: grid; place-items: center; }
.mode-ic img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 .3rem .3rem rgba(0, 0, 0, .45)); transform: rotate(-8deg); transition: transform .25s var(--ease); }
.mode:hover .mode-ic img { transform: rotate(8deg) scale(1.1); }
.mode-tx b { display: block; font-family: var(--font-d); font-weight: 400; font-size: 1.55rem; text-transform: uppercase; line-height: 1; color: var(--mc); text-shadow: 0 .08em 0 rgba(0, 0, 0, .4); }
.mode-tx i { display: block; font-style: normal; font-weight: 700; font-size: .9rem; color: #DCD2F5; margin-top: .3rem; line-height: 1.3; }
.mode em { position: absolute; top: .6rem; right: .9rem; font-style: normal; font-family: var(--font-d); font-size: 1rem; color: #FFE9A8; text-align: right; line-height: 1; }
.mode em small { display: block; font-family: var(--font-b); font-weight: 800; font-size: max(12px, .55rem); letter-spacing: .14em; color: #B9AEE0; margin-bottom: .15rem; }
.mn-row { display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; }
.mn-row .btn { pointer-events: auto; }
.mn-foot { font-weight: 700; font-size: max(12px, .8rem); color: #E6DDF8; text-shadow: 0 2px 6px rgba(0, 0, 0, .8); }

/* screens (blades, how to play, settings) */
.scr { width: min(78rem, 100%); margin: 0 auto; padding: calc(var(--sat) + 4.6rem) 1.4rem calc(var(--sab) + 2rem); animation: fsrise .35s var(--ease); }
.scr--narrow { width: min(40rem, 100%); }
.scr-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.scr-head h2 { margin: 0; font-family: var(--font-d); font-weight: 400; text-transform: uppercase; font-size: clamp(1.8rem, 1rem + 2.4vmin, 3.2rem); line-height: 1; text-shadow: 0 .06em 0 rgba(0, 0, 0, .4); }
.scr-sub { font-weight: 700; font-size: .9rem; color: #CFC6EE; margin-left: auto; }
.bgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); gap: 1rem; }
.bcard { position: relative; text-align: left; border: 0; cursor: pointer; padding: .8rem .9rem 1rem; border-radius: 1.1rem; color: #fff; background: linear-gradient(180deg, #2A1558, #1A0A3C); box-shadow: 0 0 0 2px rgba(255, 255, 255, .1) inset, 0 .25rem 0 rgba(0, 0, 0, .35); display: grid; gap: .2rem; transition: transform .15s var(--ease), box-shadow .15s; }
.bcard:hover { transform: translateY(-.2rem); box-shadow: 0 0 0 2px var(--bc) inset, 0 .35rem 0 rgba(0, 0, 0, .35), 0 0 1.6rem color-mix(in srgb, var(--bc) 40%, transparent); }
.bcard.sel { box-shadow: 0 0 0 3px var(--bc) inset, 0 .25rem 0 rgba(0, 0, 0, .35), 0 0 2rem color-mix(in srgb, var(--bc) 50%, transparent); }
.bl-cv { width: 100%; height: auto; aspect-ratio: 300 / 120; border-radius: .7rem; background: radial-gradient(120% 120% at 30% 30%, #26134F, #0C0420); display: block; }
.bcard b { font-family: var(--font-d); font-weight: 400; font-size: 1.1rem; text-transform: uppercase; margin-top: .4rem; }
.bcard i { font-style: normal; font-weight: 600; font-size: .85rem; color: #CFC6EE; }
.bstate { display: inline-flex; align-items: center; gap: .4em; margin-top: .3rem; font-weight: 800; font-size: .85rem; letter-spacing: .04em; color: var(--bc); }
.bstate svg { width: 1.1em; height: 1.1em; }
.bstate.lk { color: #B9AEE0; }
.bcard.lock .bl-cv { filter: grayscale(.8) brightness(.55); }
.bcard.lock b { opacity: .75; }
.bcard u { display: block; height: .4rem; border-radius: 99px; background: rgba(255, 255, 255, .12); overflow: hidden; margin-top: .3rem; }
.bcard u s { display: block; height: 100%; background: var(--bc); border-radius: inherit; }
.how { display: grid; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: .9rem; }
.how-r { display: grid; grid-template-columns: 4.6rem 1fr; gap: 1rem; align-items: center; padding: .8rem 1rem; border-radius: 1.1rem; background: rgba(255, 255, 255, .07); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .1) inset; }
.how-ic { width: 4.6rem; height: 4.6rem; display: grid; place-items: center; }
.how-ic img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 .2rem .2rem rgba(0, 0, 0, .4)); }
.how-r b { font-family: var(--font-d); font-weight: 400; text-transform: uppercase; font-size: 1.05rem; }
.how-r p, .how-modes p { margin: .25rem 0 0; font-weight: 600; font-size: .92rem; color: #DCD2F5; line-height: 1.45; }
.how-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .9rem; margin-top: 1.2rem; }
.how-modes b { font-family: var(--font-d); font-weight: 400; text-transform: uppercase; color: var(--acc); }
.how-keys { margin: 1.2rem 0 0; font-weight: 700; font-size: .9rem; color: #CFC6EE; }
.setlist { display: grid; gap: .7rem; }
.set { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .7rem 1rem; border-radius: 1rem; background: rgba(255, 255, 255, .07); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .1) inset; }
.set > span { font-weight: 800; }
.seg { display: inline-flex; border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 2px rgba(255, 255, 255, .14) inset; }
.seg button { border: 0; background: transparent; color: #CFC6EE; padding: .6em 1em; min-height: 44px; font-weight: 800; cursor: pointer; }
.seg button.on { background: var(--acc); color: #fff; }
.set-note { color: #BDB3E3; font-weight: 600; font-size: .85rem; margin-top: 1rem; }

/* cards (pause, result) */
.card { width: min(34rem, 100%); max-height: 100%; overflow-y: auto; scrollbar-width: none; text-align: center; padding: 1.6rem 1.6rem 1.4rem; border-radius: 1.8rem; background: linear-gradient(180deg, #34195F, #1B0A40); box-shadow: 0 0 0 2px rgba(255, 255, 255, .13) inset, 0 2rem 5rem rgba(0, 0, 0, .55); animation: fsrise .35s var(--ease); margin: auto; }
.card::-webkit-scrollbar { display: none; }
.card h2 { font-family: var(--font-d); font-weight: 400; font-size: clamp(2rem, 1rem + 2.6vmin, 3.4rem); line-height: 1; margin: 0 0 .3em; text-transform: uppercase; text-shadow: 0 .06em 0 rgba(0, 0, 0, .4); }
.card .k { display: block; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; font-size: max(12px, .75rem); color: var(--acc); margin-bottom: .4em; }
.card .acts { display: grid; gap: .6rem; margin-top: 1.1rem; }
.card .acts .row { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.card .acts .btn { width: 100%; }
.rs-score { margin: .2rem 0 .1rem; }
.rs-score small { display: block; font-weight: 800; letter-spacing: .18em; color: #B9AEE0; font-size: max(12px, .75rem); }
.rs-score b { display: block; font-family: var(--font-d); font-weight: 400; font-size: clamp(3.4rem, 2rem + 5vmin, 6rem); line-height: 1; background: linear-gradient(180deg, #fff, #FFD66E); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 .05em 0 rgba(160, 30, 40, .6)); animation: fspop .6s var(--ease); }
.rs-best { font-weight: 800; color: #CFC6EE; }
.rec { display: inline-block; margin: .4rem 0; padding: .3em 1.1em; border-radius: 99px; background: var(--sun); color: var(--ink); font-family: var(--font-d); font-size: 1rem; transform: rotate(-3deg); box-shadow: 0 3px 0 #B68A00; animation: fsbeat .8s infinite; }
.rs-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-top: .9rem; }
.rs-stats div { padding: .5rem .3rem; border-radius: .9rem; background: rgba(255, 255, 255, .07); }
.rs-stats b { display: block; font-family: var(--font-d); font-weight: 400; font-size: 1.2rem; }
.rs-stats small { font-weight: 700; font-size: max(12px, .72rem); color: #B9AEE0; }
.rs-unlock { margin-top: 1rem; padding: .8rem; border-radius: 1rem; background: rgba(255, 220, 120, .1); box-shadow: 0 0 0 1.5px rgba(255, 210, 90, .4) inset; }
.rs-unlock .k { color: var(--sun); }
.rs-unlock .ul { display: grid; gap: .2rem; justify-items: center; }
.rs-unlock .ul b { font-family: var(--font-d); font-weight: 400; text-transform: uppercase; color: var(--bc); }
.rs-unlock .bl-cv { max-width: 15rem; }
.is-best { box-shadow: 0 0 0 2px rgba(255, 210, 63, .6) inset, 0 2rem 5rem rgba(0, 0, 0, .55), 0 0 4rem rgba(255, 210, 63, .25); }

/* ---------- responsive ---------- */
@media (max-aspect-ratio: 1/1) {
  .mn { justify-content: flex-start; gap: 1.2rem; }
  .mn-title { margin-bottom: auto; }
  .mn-modes { flex-direction: column; align-items: center; gap: .7rem; }
  .mode { width: min(26rem, 94%); min-width: 0; padding: .7rem 1rem .7rem .8rem; }
  .mode-ic { width: 4rem; height: 4rem; }
  .mode-tx b { font-size: 1.3rem; }
  .mn-title h1 { font-size: clamp(3.2rem, 20vw, 9rem); }
}
@media (max-width: 640px) {
  .bgrid { grid-template-columns: 1fr 1fr; gap: .6rem; } .bcard { padding: .5rem .55rem .7rem; } .bcard i { display: none; } .bcard b { font-size: .95rem; } .scr { padding-left: .8rem; padding-right: .8rem; } .scr-sub { margin-left: 0; width: 100%; }
  .bgrid .bstate { font-size: .78rem; }
  .hud-mid { left: calc(var(--sal) + 16px); top: calc(var(--sat) + 5.6rem); transform: none; justify-items: start; }
  .hud-time { text-align: left; width: 7em; } .hud-time b { font-size: 1.9em; }
  .lv svg { width: 1.7em; height: 1.7em; }
  .fs-tool { width: 42px; height: 42px; }
  .hud-score b { font-size: 2.3em; }
  .ov--center.show { align-items: center; }
  .how-r { grid-template-columns: 3.6rem 1fr; } .how-ic { width: 3.6rem; height: 3.6rem; }
}
@media (max-height: 520px) {
  .mn { padding-top: calc(var(--sat) + 2.7rem); padding-bottom: calc(var(--sab) + .6rem); gap: .5rem; }
  .mn-title small { display: none; } .mn-title h1 { font-size: clamp(2.2rem, 17vh, 4.4rem); display: flex; gap: .25em; justify-content: center; } .mn-title h1 span:last-child { margin-top: 0; }
  .mn-title p { margin-top: .3rem; font-size: .85rem; }
  .mode { padding: .5rem .8rem .5rem .6rem; width: min(17rem, 31vw); min-width: 13rem; gap: .5rem; } .mode-ic { width: 3.2rem; height: 3.2rem; } .mode-tx b { font-size: 1.1rem; } .mode-tx i { font-size: .75rem; } .mode em { top: .35rem; right: .6rem; font-size: .8rem; }
  .mn-row .btn { min-height: 0; padding: .5em 1em; font-size: .8rem; } .mn-foot { display: none; }
  .fs-home { padding: 3px 10px 3px 3px; } .fs-home img { width: 28px; height: 28px; } .fs-home b { font-size: .8rem; }
  .fs-tool { width: 38px; height: 38px; }
  .hud-score b { font-size: 2.1em; } .hud-time b { font-size: 1.9em; } .lv svg { width: 1.7em; height: 1.7em; }
  .card { padding: 1rem 1.2rem; } .card h2 { font-size: 1.8rem; } .rs-score b { font-size: 3rem; } .card .acts { margin-top: .6rem; } .rs-stats { margin-top: .5rem; }
  .scr { padding-top: calc(var(--sat) + 3.4rem); } .fs-banner { top: 28%; }
}
@media (max-height: 520px) and (max-width: 760px) {
  .mn-modes { gap: .5rem; flex-wrap: nowrap; } .mode { min-width: 0; width: 32%; grid-template-columns: auto 1fr; padding: .4rem .5rem; } .mode-tx i { display: none; } .mode-tx b { font-size: .95rem; } .mode em { position: static; grid-column: 1 / -1; text-align: left; display: flex; gap: .4em; align-items: baseline; } .mode em small { margin: 0; }
}
@media (max-height: 520px) and (min-width: 600px) {
  .card--result { display: grid; grid-template-columns: 1fr 1fr; column-gap: 1.3rem; align-items: center; width: min(50rem, 100%); padding: .8rem 1.3rem; }
  .card--result > .k, .card--result > h2 { grid-column: 1 / -1; margin-bottom: .1em; }
  .card--result .rs-score b { font-size: 3rem; } .card--result .rs-stats b { font-size: 1rem; }
  .card--result .rs-unlock { margin-top: 0; padding: .4rem; } .card--result .rs-unlock .bl-cv { max-width: 8rem; } .card--result .rs-unlock .k { margin-bottom: .1em; }
  .card--result .acts { margin-top: .5rem; } .card--result .btn--big { font-size: 1.1rem; }
  .hud-score b { font-size: 2em; }
}
@media (prefers-reduced-motion: reduce) { .mode, .scr, .card, .fs-banner.show, .fs-hint.show, .rec, .pill { animation-duration: .01s !important; animation-iteration-count: 1 !important; } }
