/* Sky Jumper - 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 + toast + hint, overlays (menu, heroes, missions, how to play, settings, cards), responsive.
   --col (set by game.js) is the pixel width of the playfield column; the menu leaves that middle column open so the demo run shows. */
:root { --acc: #35C8FF; --acc2: #FFD23F; --glass: rgba(14, 26, 85, .72); --glass2: rgba(10, 18, 62, .86); --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); --col: 100vw; }
html { font-size: clamp(14px, calc(8px + .85vmin), 26px); height: 100%; }
html, body { margin: 0; height: 100%; height: 100dvh; overflow: hidden; background: #0E1A55; 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, .sj { position: fixed; inset: 0; width: 100%; height: 100dvh; overflow: hidden; background: #0E1A55; }
.sj-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; will-change: transform; }
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--sj { --bg: var(--acc); --fg: #06204A; --sh: #1580B0; }
.btn--play { font-size: 1.7rem; padding: .7em 2.2em; border-radius: 1.2rem; animation: sjpulse 2s ease-in-out infinite; }
@keyframes sjpulse { 50% { transform: scale(1.04); } }
.btn--ghost { --bg: rgba(255, 255, 255, .12); --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: sjshake .35s; }
@keyframes sjshake { 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }

/* ---------- top bar ---------- */
.sj-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; }
.sj-top > * { pointer-events: auto; }
.sj-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, .5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .14) inset; }
.sj-home img { width: 34px; height: 34px; }
.sj-home b { font-family: var(--font-d); font-size: .95rem; font-weight: 400; line-height: 1; }
.sj-home b i { font-style: normal; color: var(--lime); }
.sj-tools { display: flex; gap: 8px; margin-left: auto; }
.sj-tool { width: 46px; height: 46px; border: 0; padding: 0; display: grid; place-items: center; border-radius: 13px; background: rgba(15, 12, 34, .5); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .14) inset; }
.sj-tool:hover { background: rgba(40, 60, 140, .7); }
.sj-tool svg { width: 21px; height: 21px; }
.sj-top.tb-menu .tool-pause { display: none; }
.sj-top.tb-play .sj-home { display: none; }

/* ---------- HUD ---------- */
.hud { position: absolute; inset: 0; z-index: 10; pointer-events: none; font-size: 1rem; }
.hud[hidden] { display: none; }
.hud-main { position: absolute; left: max(calc(var(--sal) + 16px), calc(50% - var(--col) / 2 + 14px)); top: calc(var(--sat) + 10px); line-height: 1; text-shadow: 0 .1em 0 rgba(0, 0, 0, .4), 0 0 .6em rgba(0, 0, 0, .3); }
.hud-main small { display: block; font-size: max(12px, .62em); font-weight: 800; letter-spacing: .18em; color: #E8F4FF; opacity: .9; }
.hud-h { display: flex; align-items: baseline; gap: .2em; margin: .05em 0 .1em; }
.hud-h b { font-family: var(--font-d); font-weight: 400; font-size: 2.8em; letter-spacing: .01em; font-variant-numeric: tabular-nums; color: #fff; -webkit-text-stroke: .09em #0B2A6A; paint-order: stroke fill; text-shadow: 0 .07em 0 rgba(11, 42, 106, .8); display: inline-block; transform-origin: left center; }
.hud-h b.pop { animation: sjpop .3s var(--ease); }
.hud-h i { font-family: var(--font-d); font-style: normal; font-size: 1.2em; color: var(--acc2); -webkit-text-stroke: .08em #5A3A00; paint-order: stroke fill; }
@keyframes sjpop { 0% { transform: scale(1.22); } 100% { transform: none; } }
.hud-best { display: block; font-size: max(12px, .62em); font-weight: 800; letter-spacing: .12em; color: #E8F4FF; opacity: .85; }
.hud-best b { font: inherit; color: #FFD34A; }
.hud-coins { display: inline-flex; align-items: center; gap: .4em; margin-top: .6em; padding: .25em .8em .25em .4em; border-radius: 99px; background: rgba(15, 12, 34, .5); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .14) inset; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.hud-coins svg { width: 1.6em; height: 1.6em; color: #FFC83A; }
.hud-coins b { font-family: var(--font-d); font-weight: 400; font-size: 1.15em; font-variant-numeric: tabular-nums; }
.hud-coins.pop { animation: sjpop2 .25s var(--ease); }
@keyframes sjpop2 { 0% { transform: scale(1.18); } 100% { transform: none; } }
.hud-pills { position: absolute; left: 50%; transform: translateX(-50%); top: calc(var(--sat) + 12px); display: grid; gap: .5em; justify-items: center; }
.hud-pills:empty { display: none; }
.pill { display: flex; align-items: center; gap: .7em; padding: .3em .9em; border-radius: 99px; font-family: var(--font-d); font-size: .85em; letter-spacing: .06em; text-transform: uppercase; box-shadow: 0 .15em 0 rgba(0, 0, 0, .35); animation: sjrise .3s var(--ease); white-space: nowrap; }
.pill i { display: block; width: 4.5em; height: .45em; border-radius: 99px; background: rgba(0, 20, 60, .4); overflow: hidden; }
.pill u { display: block; height: 100%; background: #fff; border-radius: inherit; }
.pill--hat { background: linear-gradient(180deg, #FF9A7A, #F2483A); color: #fff; }
.pill--jet { background: linear-gradient(180deg, #8FF0FF, #2FA8F0); color: #04204A; }
.pill--rocket { background: linear-gradient(180deg, #FFD27A, #FF7A2E); color: #4A1A00; }
.pill--shield { background: linear-gradient(180deg, #BFD4FF, #6F94FF); color: #0A1E5A; }

/* ---------- banner + toast + hint ---------- */
.sj-banner { position: absolute; z-index: 20; left: 50%; top: 24%; transform: translate(-50%, 0); text-align: center; pointer-events: none; opacity: 0; width: 90%; --bc: #fff; }
.sj-banner.show { animation: sjban 2.9s ease both; }
.sj-banner small { display: block; font-weight: 800; letter-spacing: .24em; text-transform: uppercase; font-size: max(12px, .72rem); color: #fff; text-shadow: 0 2px 6px rgba(0, 0, 0, .7); }
.sj-banner b { display: block; font-family: var(--font-d); font-weight: 400; text-transform: uppercase; font-size: clamp(1.8rem, 1rem + 3vmin, 4rem); line-height: 1.05; color: var(--bc); -webkit-text-stroke: .06em rgba(10, 20, 80, .85); paint-order: stroke fill; text-shadow: 0 .06em 0 rgba(10, 20, 80, .8), 0 0 .6em rgba(0, 0, 0, .4); }
@keyframes sjban { 0% { opacity: 0; transform: translate(-50%, 14px) scale(.9); } 12% { opacity: 1; transform: translate(-50%, 0) scale(1); } 78% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -10px); } }
.sj-toast { position: absolute; z-index: 22; left: 50%; top: calc(var(--sat) + 5.6rem); transform: translateX(-50%); display: flex; align-items: center; gap: .8em; padding: .5em 1.1em .5em .6em; border-radius: 1em; background: linear-gradient(180deg, #2E7A3A, #1B5A2B); box-shadow: 0 0 0 2px rgba(198, 255, 61, .6) inset, 0 .5rem 1.4rem rgba(0, 0, 0, .4); opacity: 0; pointer-events: none; width: max-content; max-width: calc(100% - 2rem); }
.sj-toast.show { animation: sjtoast 3.6s ease both; }
.sj-toast span { width: 2em; height: 2em; border-radius: 50%; background: var(--lime); color: #123; display: grid; place-items: center; flex: none; }
.sj-toast span svg { width: 1.2em; height: 1.2em; stroke-width: 3; }
.sj-toast small { display: block; font-weight: 800; letter-spacing: .08em; font-size: max(12px, .7rem); color: #D7FFB0; text-transform: uppercase; }
.sj-toast b { font-weight: 800; font-size: .95rem; }
@keyframes sjtoast { 0% { opacity: 0; transform: translate(-50%, -14px); } 10% { opacity: 1; transform: translate(-50%, 0); } 88% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -8px); } }
.sj-hint { position: absolute; z-index: 20; left: 50%; bottom: calc(var(--sab) + 9%); transform: translateX(-50%); width: max-content; max-width: min(calc(100% - 2rem), 30rem); padding: .6em 1.3em; border-radius: 99px; background: rgba(15, 12, 34, .74); 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; }
.sj-hint.show { animation: sjhint 4.4s ease both; }
@keyframes sjhint { 0% { opacity: 0; transform: translate(-50%, 12px); } 8% { opacity: 1; transform: translate(-50%, 0); } 88% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- overlays ---------- */
.sj-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; }
.sj-ov::-webkit-scrollbar { display: none; }
.sj-ov.show { display: block; animation: sjfade .25s ease; }
.sj-ov.sj-ui.show { pointer-events: auto; touch-action: pan-y; }
@keyframes sjfade { from { opacity: 0; } }
@keyframes sjrise { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.ov--screen.show { background: rgba(8, 14, 58, .84); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.ov--center.show { background: rgba(8, 14, 58, .5); 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 panels; the middle column stays open for the demo run */
.mn { min-height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) var(--col) minmax(0, 1fr); grid-template-rows: 1fr auto; align-items: center; padding: calc(var(--sat) + 4.2rem) calc(var(--sar) + 1.4rem) calc(var(--sab) + .8rem) calc(var(--sal) + 1.4rem); pointer-events: none; }
.mn > * { pointer-events: none; }
.mn-left { grid-column: 1; grid-row: 1; justify-self: end; display: grid; gap: 1.6rem; justify-items: start; max-width: min(28rem, 100%); min-width: 0; padding-right: 1rem; }
.mn-right { grid-column: 3; grid-row: 1; justify-self: start; display: grid; gap: .8rem; width: min(24rem, 100%); min-width: 0; padding-left: 1rem; }
.mn-foot { grid-column: 1 / -1; grid-row: 2; text-align: center; font-weight: 700; font-size: max(12px, .8rem); color: #EAF4FF; text-shadow: 0 2px 6px rgba(0, 0, 0, .8); padding-top: .6rem; }
.mn-title small { display: block; font-weight: 800; letter-spacing: .4em; margin-top: .4rem; font-size: max(12px, .8rem); color: #fff; 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(2.4rem, min(calc(3rem + 6vmin), calc(((100vw - var(--col)) / 2 - 3.5rem) / 4.7)), 9rem); }
.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, #FFFFFF 0%, #B8F0FF 45%, #35C8FF 100%); filter: drop-shadow(0 .05em 0 #0B4A8A) drop-shadow(0 .1em .22em rgba(0, 0, 0, .5)); }
.mn-title h1 span:last-child { background-image: linear-gradient(180deg, #FFF3A0 0%, #FFB02E 45%, #FF5B2E 100%); filter: drop-shadow(0 .05em 0 #8A2A08) drop-shadow(0 .1em .22em rgba(0, 0, 0, .5)); margin-top: -.04em; }
.mn-title p { margin: .9rem 0 0; font-weight: 800; font-size: clamp(.95rem, .7rem + .9vmin, 1.4rem); color: #fff; text-shadow: 0 2px 8px rgba(0, 0, 0, .7); max-width: 22rem; line-height: 1.35; }
.mn-play .btn { pointer-events: auto; }
.mcard { pointer-events: auto; border-radius: 1.2rem; padding: .8rem 1rem; background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .16) inset, 0 .9rem 2rem rgba(0, 0, 0, .3); animation: sjrise .5s var(--ease) both; }
.mcard small { display: block; font-weight: 800; letter-spacing: .16em; font-size: max(12px, .62rem); color: #B9CBFF; }
.mcard--hero { display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: center; }
.mc-hero { width: 4.6rem; height: 4.6rem; }
.mc-hero img { width: 100%; height: 100%; object-fit: contain; animation: sjbob 1.1s ease-in-out infinite; filter: drop-shadow(0 .3rem .25rem rgba(0, 0, 0, .35)); }
@keyframes sjbob { 0%, 100% { transform: translateY(0) scale(1.04, .94); } 50% { transform: translateY(-.55rem) scale(.97, 1.04); } }
.mc-tx b { display: block; font-family: var(--font-d); font-weight: 400; font-size: 1.3rem; text-transform: uppercase; line-height: 1.1; }
.mc-tx i { display: block; font-style: normal; font-weight: 600; font-size: .78rem; color: #D7E2FF; line-height: 1.3; margin-top: .15rem; }
.mcard--best { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: .5rem; text-align: left; }
.mcard--best b { font-family: var(--font-d); font-weight: 400; font-size: 1.5rem; color: #FFE9A8; line-height: 1.1; }
.mcard--best b i { font-style: normal; font-size: .6em; margin-left: .15em; color: #FFD34A; }
.mc-h { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-d); text-transform: uppercase; font-size: .95rem; margin-bottom: .4rem; }
.mc-h span { display: inline-flex; align-items: center; gap: .4em; } .mc-h svg { width: 1.1em; height: 1.1em; }
.mc-h em { font-style: normal; font-size: .85em; color: #B9CBFF; }
.mc-done { margin: .4rem 0 0; font-weight: 700; font-size: .85rem; color: #D7E2FF; }
.ms { margin-top: .5rem; } .ms:first-of-type { margin-top: 0; }
.ms-t { display: flex; justify-content: space-between; gap: .6rem; font-weight: 700; font-size: .88rem; line-height: 1.3; }
.ms-t em { font-style: normal; font-family: var(--font-d); color: #FFD34A; font-size: .85em; white-space: nowrap; display: inline-flex; align-items: center; gap: .25em; } .ms-t em svg { width: 1.1em; height: 1.1em; color: #FFC83A; }
.ms small { display: block; font-weight: 600; font-size: max(12px, .7rem); letter-spacing: 0; color: #B9CBFF; margin-top: .1rem; }
.ms u { display: block; height: .4rem; border-radius: 99px; background: rgba(255, 255, 255, .14); overflow: hidden; margin-top: .3rem; } .ms u s { display: block; height: 100%; background: linear-gradient(90deg, #35C8FF, #C6FF3D); border-radius: inherit; }
.ms--big { padding: .8rem 1rem; border-radius: 1rem; background: rgba(255, 255, 255, .08); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .1) inset; margin-top: .6rem; } .ms--big .ms-t { font-size: 1.02rem; }
.ms--mini .ms-t { font-size: .85rem; }
.mn-row { pointer-events: none; display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.mn-row .btn { pointer-events: auto; }

/* screens */
.scr { width: min(78rem, 100%); margin: 0 auto; padding: calc(var(--sat) + 4.6rem) 1.4rem calc(var(--sab) + 2rem); animation: sjrise .35s var(--ease); }
.scr--narrow { width: min(42rem, 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: #C5D3FF; margin-left: auto; }
.sub { margin: 1.4rem 0 .6rem; font-family: var(--font-d); font-weight: 400; text-transform: uppercase; font-size: 1.1rem; color: var(--acc2); }
.hgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 1rem; }
.hcard { position: relative; text-align: left; border: 0; cursor: pointer; padding: .8rem .9rem 1rem; border-radius: 1.2rem; color: #fff; background: linear-gradient(180deg, #25398C, #131F5E); 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; }
.hcard:hover { transform: translateY(-.2rem); box-shadow: 0 0 0 2px var(--hc) inset, 0 .35rem 0 rgba(0, 0, 0, .35), 0 0 1.6rem color-mix(in srgb, var(--hc) 40%, transparent); }
.hcard.sel { box-shadow: 0 0 0 3px var(--hc) inset, 0 .25rem 0 rgba(0, 0, 0, .35), 0 0 2rem color-mix(in srgb, var(--hc) 50%, transparent); }
.hc-img { height: 8rem; display: grid; place-items: center; border-radius: .8rem; background: radial-gradient(120% 120% at 50% 20%, #3A57C8, #101A58); }
.hc-img img { height: 7.4rem; width: auto; max-width: none; filter: drop-shadow(0 .3rem .25rem rgba(0, 0, 0, .4)); }
.hcard:hover .hc-img img, .hcard.sel .hc-img img { animation: sjbob 1.1s ease-in-out infinite; }
.hcard b { font-family: var(--font-d); font-weight: 400; font-size: 1.2rem; text-transform: uppercase; margin-top: .4rem; }
.hcard i { font-style: normal; font-weight: 600; font-size: .85rem; color: #D0DCFF; min-height: 2.5em; line-height: 1.25; }
.bstate { display: inline-flex; align-items: center; gap: .4em; margin-top: .3rem; font-weight: 800; font-size: .85rem; letter-spacing: .04em; color: var(--hc, var(--acc)); }
.bstate svg { width: 1.1em; height: 1.1em; }
.bstate.lk { color: #B9CBFF; }
.hcard.lock .hc-img img { filter: grayscale(1) brightness(.35); }
.hcard.lock b { opacity: .75; }
.hcard u { display: block; height: .4rem; border-radius: 99px; background: rgba(255, 255, 255, .12); overflow: hidden; margin-top: .3rem; } .hcard u s { display: block; height: 100%; background: var(--hc); border-radius: inherit; }
.mlist, .mdone { display: grid; gap: .1rem; }
.md { display: flex; align-items: center; gap: .6rem; padding: .35rem .2rem; font-weight: 700; font-size: .92rem; color: #D7E2FF; } .md svg { width: 1.1em; height: 1.1em; color: var(--lime); flex: none; stroke-width: 3; } .md em { margin-left: auto; font-style: normal; font-family: var(--font-d); color: #FFD34A; }
.how-ctl { padding: .9rem 1.1rem; border-radius: 1.1rem; background: rgba(255, 255, 255, .08); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .1) inset; } .how-ctl b { font-family: var(--font-d); font-weight: 400; text-transform: uppercase; color: var(--acc); } .how-ctl p { margin: .3rem 0 0; font-weight: 600; font-size: .95rem; line-height: 1.45; color: #E0E8FF; }
.how { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: .8rem; }
.how-r { display: grid; grid-template-columns: 4.4rem 1fr; gap: 1rem; align-items: center; padding: .7rem 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.4rem; height: 4.4rem; display: grid; place-items: center; }
.how-ic img { transform: scale(1.0); }
.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.02rem; }
.how-r p { margin: .25rem 0 0; font-weight: 600; font-size: .9rem; color: #DCE6FF; line-height: 1.4; }
.how-keys { margin: 1.4rem 0 0; font-weight: 700; font-size: .9rem; color: #C5D3FF; line-height: 1.6; }
.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: #06204A; }
.set-note { color: #B9CBFF; font-weight: 600; font-size: .85rem; margin-top: 1rem; }

/* cards (pause, result) */
.card { width: min(36rem, 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, #25398C, #111C58); box-shadow: 0 0 0 2px rgba(255, 255, 255, .13) inset, 0 2rem 5rem rgba(0, 0, 0, .55); animation: sjrise .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: #B9CBFF; 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, #9FE6FF); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 .05em 0 rgba(10, 60, 130, .7)); animation: sjpop .6s var(--ease); }
.rs-score b i { font-style: normal; font-size: .42em; margin-left: .1em; }
.rs-best { font-weight: 800; color: #CFDAFF; }
.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: sjbeat .8s infinite; }
@keyframes sjbeat { 50% { transform: rotate(-3deg) scale(1.1); } }
.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, .08); }
.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: #B9CBFF; }
.rs-unlock, .rs-ms { margin-top: 1rem; padding: .7rem .8rem; border-radius: 1rem; text-align: left; }
.rs-unlock { background: rgba(255, 220, 120, .1); box-shadow: 0 0 0 1.5px rgba(255, 210, 90, .4) inset; text-align: center; }
.rs-unlock .k { color: var(--sun); }
.rs-unlock .ul { display: grid; justify-items: center; gap: .1rem; } .rs-unlock .ul img { width: 5rem; height: 5rem; } .rs-unlock .ul b { font-family: var(--font-d); font-weight: 400; text-transform: uppercase; }
.rs-ms { background: rgba(198, 255, 61, .09); box-shadow: 0 0 0 1.5px rgba(198, 255, 61, .35) inset; } .rs-ms .k { color: var(--lime); }
.rs-ms--next { background: rgba(255, 255, 255, .06); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .1) inset; } .rs-ms--next .k { color: #B9CBFF; }
.md--ok { padding: .2rem 0; }
.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 { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: .7rem; padding-top: calc(var(--sat) + 3.6rem); }
  .mn-left { display: contents; }
  .mn-title { text-align: center; margin-bottom: auto; }
  .mn-title h1 { font-size: clamp(3rem, 17vw, 8rem); }
  .mn-title p { margin-left: auto; margin-right: auto; font-size: .95rem; }
  .mn-play { display: flex; justify-content: center; order: 3; } .btn--play { width: min(26rem, 100%); font-size: 1.4rem; padding: .6em 1em; }
  .mn-right { order: 4; width: min(26rem, 100%); padding: 0; margin: 0 auto; gap: .5rem; justify-self: center; }
  .mn-foot { order: 5; padding-top: .2rem; font-size: max(12px, .72rem); }
  .mc-hero { width: 3.6rem; height: 3.6rem; } .mcard { padding: .6rem .8rem; } .mc-tx i { display: none; }
  .mcard--ms .ms ~ .ms { display: none; } .mcard--ms .mc-h { margin-bottom: .2rem; }
  .mn-row { grid-template-columns: repeat(4, 1fr); gap: .4rem; } .mn-row .btn { flex-direction: column; gap: .15em; font-size: .68rem; padding: .5em .2em; min-height: 3.6em; } .mn-row .btn em { display: none; } .mn-row .btn svg { width: 1.5em; height: 1.5em; }
}
@media (max-aspect-ratio: 1/1) and (max-height: 720px) { .mcard--best, .mcard--ms { display: none; } .mn-title p { display: none; } }
@media (max-aspect-ratio: 1/1) and (max-height: 760px) {
  .card--result { display: flex; flex-direction: column; max-height: calc(100dvh - 2rem); overflow: hidden; }
  .card--result .rs-l { flex: none; } .card--result .rs-r { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; } .card--result .rs-x { overflow-y: auto; scrollbar-width: none; min-height: 0; flex: 1 1 auto; } .card--result .rs-x::-webkit-scrollbar { display: none; }
  .card--result .rs-score b { font-size: 3.6rem; } .card--result .rs-ms--next { display: none; }
}
@media (max-width: 640px) {
  .hgrid { grid-template-columns: 1fr 1fr; gap: .6rem; } .hcard { padding: .5rem .55rem .7rem; } .hc-img { height: 6rem; } .hcard i { font-size: .78rem; } .hcard b { font-size: 1rem; } .scr { padding-left: .8rem; padding-right: .8rem; } .scr-sub { margin-left: 0; width: 100%; }
  .hud-pills { left: calc(var(--sal) + 16px); transform: none; top: calc(var(--sat) + 8.6rem); justify-items: start; }
  .sj-tool { width: 42px; height: 42px; } .hud-h b { font-size: 2.4em; }
  .ov--center.show { align-items: center; }
  .how-r { grid-template-columns: 3.6rem 1fr; } .how-ic { width: 3.6rem; height: 3.6rem; }
  .sj-toast { top: calc(var(--sat) + 9.4rem); }
}
@media (max-height: 520px) {
  .mn { padding-top: calc(var(--sat) + 2.7rem); padding-bottom: calc(var(--sab) + .4rem); }
  .mn-left { gap: .7rem; } .mn-title small { display: none; } .mn-title h1 { font-size: clamp(2.2rem, 17vh, 4.6rem); } .mn-title p { margin-top: .3rem; font-size: .82rem; }
  .btn--play { font-size: 1.2rem; padding: .5em 1.6em; }
  .mn-right { gap: .4rem; } .mcard { padding: .45rem .7rem; } .mc-hero { width: 3rem; height: 3rem; } .mc-tx b { font-size: 1rem; } .mc-tx i { display: none; } .mcard--best b { font-size: 1.1rem; } .mcard--ms { display: none; }
  .mn-row { gap: .4rem; } .mn-row .btn { min-height: 0; padding: .45em .6em; font-size: .75rem; } .mn-foot { display: none; }
  .sj-home { padding: 3px 10px 3px 3px; } .sj-home img { width: 28px; height: 28px; } .sj-home b { font-size: .8rem; }
  .sj-tool { width: 38px; height: 38px; }
  .hud-h b { font-size: 2em; } .hud-coins { margin-top: .3em; }
  .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); } .sj-banner { top: 28%; } .hgrid { grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); } .hc-img { height: 5.4rem; }
}
@media (max-height: 520px) and (max-width: 720px) {
  .mn { padding-left: calc(var(--sal) + .5rem); padding-right: calc(var(--sar) + .5rem); }
  .mn-left { padding-right: 0; } .mn-right { padding-left: 0; width: 100%; gap: .35rem; }
  .mn-title h1 { font-size: clamp(2rem, min(14vh, calc(((100vw - var(--col)) / 2 - 1.5rem) / 4.7)), 3.4rem); } .mn-title p { display: none; }
  .btn--play { font-size: 1.05rem; padding: .45em 1.1em; }
  .mcard--hero { grid-template-columns: auto 1fr; padding: .3rem .5rem; } .mcard--hero .btn { display: none; } .mcard--hero .mc-tx small { display: none; } .mcard--hero { cursor: default; }
  .mcard--best { display: none; }
  .mn-row { grid-template-columns: 1fr 1fr; gap: .3rem; } .mn-row .btn { flex-direction: column; gap: .1em; font-size: .6rem; padding: .35em .2em; line-height: 1.1; } .mn-row .btn svg { width: 1.3em; height: 1.3em; } .mn-row .btn em { display: none; }
}
@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(52rem, 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, .card--result .rs-ms { margin-top: .4rem; padding: .35rem .6rem; } .card--result .rs-ms--next { display: none; } .card--result .rs-unlock .ul img { width: 3.4rem; height: 3.4rem; }
  .card--result .acts { margin-top: .5rem; } .card--result .btn--big { font-size: 1.1rem; }
  .card--result { max-height: calc(100dvh - 4rem); }
  .card--result .rs-r { display: flex; flex-direction: column; min-height: 0; max-height: calc(100dvh - 8rem); } .card--result .rs-x { overflow-y: auto; scrollbar-width: none; min-height: 0; flex: 1 1 auto; } .card--result .rs-x::-webkit-scrollbar { display: none; }
  .card--result .rs-l { align-self: center; }
}
@media (max-height: 520px) { .ov--center.show { padding-top: calc(var(--sat) + 3.4rem); } .sj-toast { top: auto; bottom: calc(var(--sab) + 20%); } .sj-hint { bottom: calc(var(--sab) + 5%); } .mcard small, .mn-title small { letter-spacing: .08em; } }
@media (prefers-reduced-motion: reduce) { .mcard, .scr, .card, .sj-banner.show, .sj-hint.show, .sj-toast.show, .rec, .pill, .btn--play, .mc-hero img { animation-duration: .01s !important; animation-iteration-count: 1 !important; } }
