/* Drumroll — clean game UI over a fixed first-person 3D view */
:root {
  --accent: #ffb454; --accent-2: #ffd27a; --accent-dim: #4a2d10;
  --ink: #f4f4f8; --muted: rgba(244, 244, 248, .6); --panel: rgba(20, 19, 27, .96); --panel-2: rgba(255, 255, 255, .06); --line: rgba(255, 255, 255, .1);
  --r: 20px; --shadow: 0 20px 50px rgba(0, 0, 0, .45);
  --bg1: #2a1810; --bg2: #120b08; --bg3: #3d2415;
  --font-head: 'Fredoka', 'Nunito', system-ui, sans-serif; --font: 'Nunito', system-ui, -apple-system, sans-serif;
  --dock-h: 74px; --top-h: 60px;
}
.scene-rooftop { --bg1: #1c1546; --bg2: #090818; --bg3: #2f1b63; } .scene-forest { --bg1: #0f2d1d; --bg2: #05120c; --bg3: #1d4a2d; } .scene-cabin { --bg1: #2c1a12; --bg2: #110906; --bg3: #4a2a18; }
.scene-space { --bg1: #0a1333; --bg2: #02041a; --bg3: #172c60; } .scene-beach { --bg1: #4a2250; --bg2: #1c0f2e; --bg3: #d85a3a; } .scene-arcade { --bg1: #1c0a33; --bg2: #090415; --bg3: #3a0f66; } .scene-snow { --bg1: #233c62; --bg2: #0f1c33; --bg3: #5e82b8; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); color: var(--ink); background: var(--bg2); overflow: hidden; -webkit-font-smoothing: antialiased; }
h1, h2 { font-family: var(--font-head); font-weight: 700; letter-spacing: .01em; margin: 0; } h1 { font-size: 26px; line-height: 1.1; } h2 { font-size: 20px; }
h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 800; margin: 16px 0 8px; }
p { margin: 0; line-height: 1.5; } button, input, select { font: inherit; color: inherit; } button { cursor: pointer; border: 0; background: none; }
.muted { color: var(--muted); } .small { font-size: 13px; } .center { text-align: center; } .hidden { display: none !important; }
svg { width: 22px; height: 22px; flex: none; }
kbd { font-family: var(--font); font-weight: 800; background: rgba(255, 255, 255, .14); border: 1px solid var(--line); border-bottom-width: 3px; border-radius: 7px; padding: 1px 7px; font-size: 12px; }

/* 3D stage + fallback */
#stage { position: fixed; inset: 0; z-index: 0; } .stage3d { display: block; width: 100%; height: 100%; touch-action: none; }
#bg { position: fixed; inset: 0; z-index: 0; background: radial-gradient(120% 90% at 50% 0%, var(--bg3) 0%, var(--bg1) 45%, var(--bg2) 100%); overflow: hidden; } .has3d #bg { display: none; }
#scenery { position: absolute; inset: 0; } #scenery svg { position: absolute; left: 0; bottom: 0; width: 100%; height: 100%; opacity: .9; } #particles { position: absolute; inset: 0; width: 100%; height: 100%; } .vignette { position: absolute; inset: 0; background: radial-gradient(80% 70% at 50% 40%, transparent 50%, rgba(0, 0, 0, .55) 100%); }
.bulb { animation: flicker 6s infinite; } .win { animation: twinkle 3s infinite alternate; } .flame { transform-origin: bottom; animation: flame .6s infinite alternate; } .pulse { animation: pulse 2.4s infinite; } .shimmer { animation: shimmer 2s infinite alternate; } .flicker { animation: flicker 2s infinite; }
@keyframes flicker { 0%, 100% { opacity: .9 } 50% { opacity: .75 } 92% { opacity: .5 } } @keyframes twinkle { from { opacity: .3 } to { opacity: .9 } } @keyframes flame { from { transform: scaleY(1) } to { transform: scaleY(1.12) skewX(3deg) } } @keyframes pulse { 0%, 100% { opacity: .4 } 50% { opacity: 1 } } @keyframes shimmer { from { opacity: .2 } to { opacity: .7 } }
.reduce-motion * { animation-duration: .001s !important; transition-duration: .001s !important; }

/* top bar */
.topbar { position: fixed; top: 0; left: 0; right: 0; height: var(--top-h); z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; background: linear-gradient(to bottom, rgba(0, 0, 0, .55), transparent); pointer-events: none; }
.topbar > * { pointer-events: auto; }
.status { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); }
.status-name { font-family: var(--font-head); font-weight: 700; font-size: 15px; }
.chip-lv { padding: 2px 8px; border-radius: 999px; background: var(--accent); color: #1a1208; font-size: 11px; font-weight: 800; }
.chip-streak { font-size: 12px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.xpbar { width: 80px; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .12); overflow: hidden; } .xpbar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width .6s; }
.topbar-right { display: flex; gap: 8px; }
.icon-btn { width: 42px; height: 42px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink); transition: background .15s, transform .1s; } .icon-btn:hover { background: #2a2834; } .icon-btn:active { transform: scale(.95); }
.popover { position: absolute; right: 14px; top: 58px; width: min(420px, calc(100vw - 28px)); padding: 14px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); display: none; z-index: 25; } .popover.show { display: block; }
.pop-title { font-family: var(--font-head); font-size: 15px; margin-bottom: 10px; }
.coach { position: fixed; left: 50%; top: calc(var(--top-h) + 6px); transform: translateX(-50%) translateY(-6px); z-index: 21; padding: 8px 14px; border-radius: 999px; background: #fff; color: #1a1620; font-weight: 800; font-size: 13px; box-shadow: var(--shadow); opacity: 0; transition: all .3s; pointer-events: none; max-width: min(70vw, 420px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .coach.show { opacity: 1; transform: translateX(-50%); }

/* bottom nav */
.dock { position: fixed; left: 0; right: 0; bottom: 0; height: var(--dock-h); z-index: 20; display: flex; justify-content: center; gap: 4px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: var(--panel); border-top: 1px solid var(--line); }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; width: 92px; border-radius: 14px; color: var(--muted); font-weight: 800; font-size: 11px; transition: all .15s; }
.tab svg { width: 24px; height: 24px; } .tab:hover { color: var(--ink); background: var(--panel-2); } .tab.active { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }

/* screens & windows */
main { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
.screen { display: none; } .screen.active { display: block; }
.dim { position: fixed; inset: 0; background: rgba(5, 4, 10, .55); pointer-events: auto; animation: fade .25s; } @keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.window { position: fixed; left: 50%; top: calc(var(--top-h) + 10px); transform: translateX(-50%); width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - var(--top-h) - var(--dock-h) - 20px); display: flex; flex-direction: column; pointer-events: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); animation: rise .3s cubic-bezier(.2, 1, .3, 1); }
.window.wide { width: min(1000px, calc(100vw - 24px)); }
@keyframes rise { from { opacity: 0; transform: translateX(-50%) translateY(16px) } to { opacity: 1; transform: translateX(-50%) } }
.window-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px 8px; flex: none; }
.window-body { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 18px 18px; scrollbar-width: thin; }

/* home */
.home-card { position: fixed; right: 16px; bottom: calc(var(--dock-h) + 16px); width: 360px; pointer-events: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; display: flex; flex-direction: column; gap: 14px; animation: rise2 .3s cubic-bezier(.2, 1, .3, 1); }
@keyframes rise2 { from { opacity: 0; transform: translateY(16px) } to { opacity: 1; transform: none } }
.home-hint { display: none; position: fixed; left: 16px; bottom: calc(var(--dock-h) + 16px); max-width: 300px; pointer-events: none; text-shadow: 0 1px 8px rgba(0, 0, 0, .8); }
.quest-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; font-size: 13px; font-weight: 700; } .quest-line .progress-line { width: 100%; margin: 0; } .quest.done .pill { background: var(--accent); color: #1a1208; }

/* lesson */
.lesson-card { width: min(720px, calc(100vw - 24px)); }
.tip { font-size: 15px; line-height: 1.6; margin-top: 8px; } .tip b { color: var(--accent); }
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.mode-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px; border-radius: 16px; background: var(--panel-2); border: 1px solid var(--line); transition: all .15s; }
.mode-btn svg { width: 28px; height: 28px; margin-bottom: 2px; } .mode-btn b { font-family: var(--font-head); font-size: 16px; } .mode-btn small { color: var(--muted); font-size: 11px; font-weight: 700; }
.mode-btn:hover { background: rgba(255, 255, 255, .12); transform: translateY(-2px); }
.mode-btn.primary { background: var(--accent); color: #1a1208; border-color: transparent; } .mode-btn.primary small { color: rgba(26, 18, 8, .7); } .mode-btn.primary:hover { background: var(--accent-2); }
.options { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.crumb { color: var(--accent); font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
.stick-line { margin-top: 8px; font-weight: 800; letter-spacing: .15em; font-size: 13px; } .stick-line b { letter-spacing: 0; color: var(--accent); margin-right: 6px; }
.notation-wrap { overflow-x: auto; margin: 12px 0 0; padding: 6px; border-radius: 14px; background: rgba(0, 0, 0, .35); scrollbar-width: thin; } .notation-wrap canvas { display: block; }
.keytags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; } .keytag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; background: color-mix(in srgb, var(--c) 22%, transparent); border: 1px solid color-mix(in srgb, var(--c) 50%, transparent); }
/* playing state: card + dim hidden, bar + highway shown */
.playbar { position: fixed; top: 0; left: 0; right: 0; height: var(--top-h); z-index: 22; display: none; align-items: center; gap: 12px; padding: 10px 14px; background: var(--panel); border-bottom: 1px solid var(--line); pointer-events: auto; }
.playbar-title { font-family: var(--font-head); font-size: 16px; font-weight: 700; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud { display: none; gap: 18px; } .hud.show { display: flex; } .hud span { display: flex; flex-direction: column; align-items: flex-end; line-height: 1; } .hud small { color: var(--muted); font-weight: 800; font-size: 9px; text-transform: uppercase; } .hud b { font-family: var(--font-head); font-size: 18px; }
#screen-lesson.live .lesson-card, #screen-lesson.live .lesson-dim, body.playing .topbar, body.playing .coach { display: none; } #screen-lesson.live .playbar { display: flex; }
.play { position: fixed; top: calc(var(--top-h) + 8px); left: 50%; transform: translateX(-50%); width: min(820px, calc(100vw - 16px)); z-index: 11; pointer-events: auto; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: rgba(10, 8, 16, .7); box-shadow: var(--shadow); display: none; } .play.live { display: block; }
.highway-wrap { position: relative; height: 170px; } #highway { width: 100%; height: 100%; display: block; }
.count { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-family: var(--font-head); font-size: 90px; font-weight: 700; color: var(--accent); text-shadow: 0 0 40px var(--accent); pointer-events: none; }
.count.pop { animation: countpop .5s ease-out; } @keyframes countpop { from { transform: translate(-50%, -50%) scale(1.5); opacity: 0 } 30% { opacity: 1 } to { transform: translate(-50%, -50%) scale(1); opacity: .9 } }
.judge { position: absolute; right: 16px; top: 8px; font-family: var(--font-head); font-size: 24px; font-weight: 700; opacity: 0; pointer-events: none; } .judge.pop { animation: judgepop .6s ease-out; } @keyframes judgepop { 0% { opacity: 1; transform: scale(1.3) } 100% { opacity: 0; transform: scale(1) translateY(-10px) } }
.judge.perfect { color: #7cffb2; } .judge.good, .judge.ok { color: #ffe97a; } .judge.miss { color: #ff6b8a; }

/* jam */
.jambar { position: fixed; left: 50%; bottom: calc(var(--dock-h) + 12px); transform: translateX(-50%); width: min(980px, calc(100vw - 24px)); z-index: 11; pointer-events: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); animation: rise .3s cubic-bezier(.2, 1, .3, 1); }
.jam-more { display: none; } #screen-jam.more .jam-more { display: flex; }
.beats { display: inline-flex; gap: 8px; } .beat-dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(255, 255, 255, .15); transition: all .1s; } .beat-dot.on { background: var(--accent); box-shadow: 0 0 14px var(--accent); transform: scale(1.3); } .beat-dot:first-child.on { background: #fff; } .beats.muted .beat-dot.on { background: #ff6b8a; box-shadow: none; }

/* pads */
.pads-wrap { position: fixed; left: 8px; right: 8px; bottom: calc(var(--dock-h) + 10px); z-index: 11; pointer-events: auto; display: none; }
.pads { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; max-width: 560px; margin: 0 auto; }
.pad { aspect-ratio: 1.25; border-radius: 14px; background: color-mix(in srgb, var(--c) 30%, rgba(14, 11, 22, .85)); border: 2px solid color-mix(in srgb, var(--c) 60%, transparent); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-weight: 800; font-size: 12px; touch-action: none; user-select: none; -webkit-user-select: none; }
.pad-key { font-size: 10px; color: var(--muted); } .pad.hit { animation: padhit .2s ease-out; } @keyframes padhit { 0% { background: var(--c); transform: scale(.95) } 100% { transform: scale(1) } }
.force-pads .pads-wrap { display: block; } .force-pads .jambar { bottom: calc(var(--dock-h) + 230px); }
/* legacy 2D kit (only without WebGL) */
.stage-legacy { display: none; } body:not(.has3d) .stage-legacy { display: block; position: fixed; left: 50%; bottom: calc(var(--dock-h) + 10px); transform: translateX(-50%); width: min(900px, 100vw); pointer-events: auto; }
.kit-wrap { width: 100%; } .kit-svg { width: 100%; height: auto; display: block; overflow: visible; }
.kit-part { transform-box: fill-box; transform-origin: center; cursor: pointer; } .kit-part.hit { animation: kithit .22s ease-out; } @keyframes kithit { 0% { transform: scale(.94) } 60% { transform: scale(1.02) } 100% { transform: scale(1) } }
.kit-part.wobble { animation: wobble .6s ease-out; } @keyframes wobble { 0% { transform: scale(1.03, .96) rotate(2deg) } 30% { transform: scale(.98, 1.03) rotate(-2deg) } 100% { transform: none } }
.kit-ring { transform-box: fill-box; transform-origin: center; animation: ring .5s ease-out forwards; pointer-events: none; } @keyframes ring { from { transform: scale(1); opacity: 1 } to { transform: scale(3.2); opacity: 0 } }
.kit-label { fill: rgba(255, 255, 255, .9); font-family: var(--font); font-weight: 800; font-size: 20px; paint-order: stroke; stroke: rgba(0, 0, 0, .6); stroke-width: 5px; pointer-events: none; } .zone-hint { fill: rgba(255, 255, 255, .5); font-size: 13px; font-weight: 800; pointer-events: none; } .clap-ico { font-size: 28px; pointer-events: none; }

/* controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 13px; background: rgba(255, 255, 255, .1); border: 1px solid var(--line); font-weight: 800; transition: transform .12s, background .2s; white-space: nowrap; }
.btn:hover { background: rgba(255, 255, 255, .17); } .btn:active { transform: scale(.98); }
.btn-accent { background: var(--accent); color: #1a1208; border-color: transparent; } .btn-accent:hover { background: var(--accent-2); }
.btn-ghost { background: transparent; } .btn-sm { padding: 8px 12px; font-size: 13px; border-radius: 11px; } .btn-sm svg { width: 18px; height: 18px; }
.btn-big { width: 100%; justify-content: flex-start; padding: 14px 18px; border-radius: 16px; font-size: 18px; text-align: left; } .btn-big svg { width: 28px; height: 28px; } .btn-big span { display: flex; flex-direction: column; line-height: 1.15; } .btn-big small { font-size: 12px; font-weight: 700; opacity: .75; }
.btn-round { width: 50px; height: 50px; border-radius: 50%; padding: 0; background: var(--accent); color: #1a1208; border: 0; } .btn-round.on { background: rgba(255, 255, 255, .15); color: var(--ink); }
.btn-rec.on { background: #ff3b5c; color: #fff; animation: recpulse 1s infinite; } @keyframes recpulse { 50% { box-shadow: 0 0 0 8px rgba(255, 59, 92, .25) } }
.btn-danger { background: rgba(255, 70, 90, .18); border-color: rgba(255, 70, 90, .4); } #jam-loop-play.on { background: var(--accent); color: #1a1208; }
.pill { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; padding: 4px 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); font-weight: 800; font-size: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 8px 13px; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid var(--line); font-weight: 800; font-size: 13px; display: inline-flex; align-items: center; gap: 8px; transition: all .15s; } .chip:hover { background: rgba(255, 255, 255, .15); } .chip.on { background: var(--accent); color: #1a1208; border-color: transparent; }
.scene-chip .sw { width: 16px; height: 16px; border-radius: 50%; display: inline-block; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25); }
.sw-garage { background: linear-gradient(135deg, #ffb454, #3d2415) } .sw-rooftop { background: linear-gradient(135deg, #b388ff, #0b0a1f) } .sw-forest { background: linear-gradient(135deg, #8be28b, #06140d) } .sw-cabin { background: linear-gradient(135deg, #ff9f6e, #140b07) } .sw-space { background: linear-gradient(135deg, #5de4ff, #03061a) } .sw-beach { background: linear-gradient(135deg, #ff8fa3, #d85a3a) } .sw-arcade { background: linear-gradient(135deg, #ff4fd8, #2bf0ff) } .sw-snow { background: linear-gradient(135deg, #fff, #5e82b8) }
.seg { display: inline-flex; background: rgba(255, 255, 255, .07); border: 1px solid var(--line); border-radius: 13px; padding: 4px; gap: 4px; flex-wrap: wrap; }
.seg-btn { padding: 8px 14px; border-radius: 10px; font-weight: 800; font-size: 13px; color: var(--muted); transition: all .15s; } .seg-btn.on { background: var(--accent); color: #1a1208; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; cursor: pointer; padding: 4px 0; }
.switch input { appearance: none; width: 40px; height: 22px; border-radius: 99px; background: rgba(255, 255, 255, .15); position: relative; transition: background .2s; margin: 0; flex: none; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; } .switch input:checked { background: var(--accent); } .switch input:checked::after { transform: translateX(18px); }
.ctrl { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 13px; } .ctrl b { min-width: 3em; text-align: right; font-variant-numeric: tabular-nums; }
input[type=range] { accent-color: var(--accent); width: 140px; } input[type=color] { width: 44px; height: 34px; border: 0; background: none; padding: 0; border-radius: 10px; cursor: pointer; }
.select, .text, .num { background: rgba(255, 255, 255, .08); border: 1px solid var(--line); border-radius: 11px; padding: 8px 10px; color: var(--ink); font-weight: 700; } .select option { color: #000; } .text { min-width: 180px; } .num { width: 54px; text-align: center; }
.ctrl-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 10px; } .inline-opts { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.progress-line { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .12); overflow: hidden; margin-top: 8px; } .progress-line.thin { height: 5px; } .progress-line i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .8s cubic-bezier(.2, .8, .2, 1); border-radius: 99px; }

/* learn list */
.chapter { margin-top: 10px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.chapter-head { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-align: left; }
.chapter-num { width: 34px; height: 34px; border-radius: 11px; background: var(--accent); color: #1a1208; font-family: var(--font-head); font-size: 17px; display: grid; place-items: center; font-weight: 700; flex: none; }
.chapter-title { font-family: var(--font-head); font-size: 17px; font-weight: 700; flex: 1; } .chapter-meta { color: var(--muted); font-size: 11px; font-weight: 800; }
.ring { width: 26px; height: 26px; border-radius: 50%; background: conic-gradient(var(--accent) calc(var(--p) * 1%), rgba(255, 255, 255, .12) 0); position: relative; flex: none; } .ring::after { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: #1a1922; }
.chapter.complete .ring::after { content: '✓'; display: grid; place-items: center; font-size: 11px; font-weight: 900; color: var(--accent); }
.lessons { display: none; padding: 0 8px 8px; } .chapter.open .lessons { display: block; }
.lesson-row { width: 100%; display: grid; grid-template-columns: 24px 1fr auto auto; align-items: center; gap: 10px; padding: 11px 8px; border-radius: 12px; text-align: left; transition: background .15s; } .lesson-row:hover { background: rgba(255, 255, 255, .08); }
.lesson-idx { color: var(--muted); font-weight: 800; font-size: 12px; } .lesson-name { font-weight: 800; font-size: 14px; } .lesson-bpm { color: var(--muted); font-size: 11px; font-weight: 800; } .lesson-stars { color: var(--accent); letter-spacing: 1px; font-size: 14px; } .dimstar { color: rgba(255, 255, 255, .18); } .lesson-row.played .lesson-idx { color: var(--accent); }

/* compose */
.grid-wrap { overflow-x: auto; margin: 10px -6px; padding: 6px; } .grid { display: flex; flex-direction: column; gap: 5px; min-width: 560px; }
.grow { display: grid; grid-template-columns: 90px repeat(var(--steps), 1fr); gap: 4px; align-items: center; } .glabel { font-size: 11px; font-weight: 800; color: var(--c); padding-right: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gcell { height: 28px; border-radius: 7px; background: rgba(255, 255, 255, .07); border: 1px solid transparent; transition: all .1s; position: relative; } .gcell.beat { border-left: 2px solid rgba(255, 255, 255, .25); } .gcell:hover { background: rgba(255, 255, 255, .16); }
.gcell.on { background: var(--c); } .gcell.acc::after { content: '>'; position: absolute; inset: 0; display: grid; place-items: center; color: #000; font-weight: 900; } .gcell.ghost { opacity: .45; } .gcell.ghost::after { content: '( )'; position: absolute; inset: 0; display: grid; place-items: center; color: #000; font-weight: 900; font-size: 10px; } .gcell.now { outline: 2px solid #fff; }
.mine-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; cursor: pointer; } .mine-row:hover { background: rgba(255, 255, 255, .08); } .mine-name { font-weight: 800; } .mine-meta { color: var(--muted); font-size: 12px; margin-left: auto; }

/* progress */
.level-card { text-align: center; padding: 10px 0 6px; } .level-big h2 { font-size: 30px; margin: 4px 0; }
.stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 14px; } @media (max-width: 760px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.stat { background: var(--panel-2); border: 1px solid var(--line); border-radius: 16px; padding: 12px; text-align: center; } .stat b { display: block; font-family: var(--font-head); font-size: 26px; color: var(--accent); } .stat span { font-size: 11px; color: var(--muted); font-weight: 800; }
.pg-ch { display: grid; grid-template-columns: 1fr 2fr auto; gap: 12px; align-items: center; padding: 6px 0; font-weight: 800; font-size: 13px; } .pg-ch i { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .12); overflow: hidden; display: block; } .pg-ch b { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.badge { padding: 12px 8px; border-radius: 16px; background: var(--panel-2); border: 1px solid var(--line); text-align: center; opacity: .45; filter: grayscale(1); display: flex; flex-direction: column; gap: 3px; } .badge.on { opacity: 1; filter: none; border-color: color-mix(in srgb, var(--accent) 60%, transparent); } .badge-ico { font-size: 28px; } .badge b { font-size: 12px; } .badge span:last-child { font-size: 10px; color: var(--muted); }

/* modal, sheet */
.modal { position: fixed; inset: 0; z-index: 50; display: none; place-items: center; background: rgba(0, 0, 0, .6); padding: 16px; } .modal.show { display: grid; }
.modal-box { background: var(--panel); border: 1px solid var(--line); border-radius: 24px; padding: 26px; width: min(520px, 100%); text-align: center; box-shadow: var(--shadow); animation: rise2 .35s cubic-bezier(.2, 1, .3, 1); }
.res-stars { font-size: 54px; letter-spacing: 6px; } .star { color: rgba(255, 255, 255, .15); display: inline-block; } .star.on { color: #ffd166; text-shadow: 0 0 24px #ffd166; animation: starpop .5s cubic-bezier(.2, 1.6, .3, 1) both; } @keyframes starpop { from { transform: scale(0) rotate(-40deg) } to { transform: none } }
.res-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 18px 0 10px; } .res-grid div { display: flex; flex-direction: column; } .res-grid small { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; } .res-grid b { font-family: var(--font-head); font-size: 22px; }
.res-xp { font-weight: 800; color: var(--accent); font-size: 18px; margin-bottom: 14px; } .res-btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 8px; }
.sheet { position: fixed; inset: 0; z-index: 60; display: none; } .sheet.show { display: block; } .sheet-bg { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); }
.sheet-box { position: absolute; right: 0; top: 0; bottom: 0; width: min(520px, 100%); background: var(--panel); border-left: 1px solid var(--line); overflow-y: auto; padding: 6px 20px 40px; animation: slidein .3s cubic-bezier(.2, .9, .2, 1); } @keyframes slidein { from { transform: translateX(40px); opacity: 0 } to { transform: none; opacity: 1 } }
.sheet-box .window-head { padding: 14px 0 6px; }
.set-group { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; } .set-group h3 { margin: 0; } .set-group.two { flex-direction: row; flex-wrap: wrap; gap: 18px; } .set-group.switches { gap: 2px; }
.set-group .ctrl { justify-content: space-between; } .set-group .ctrl input[type=range] { flex: 1; max-width: 220px; }
.keys { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.keybtn { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 8px 10px; border-radius: 12px; background: color-mix(in srgb, var(--c) 16%, transparent); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); font-size: 12px; font-weight: 800; text-align: left; } .keybtn.wait { outline: 2px solid var(--accent); animation: recpulse 1s infinite; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* alerts, toast, wake, confetti */
#alerts { position: fixed; top: calc(var(--top-h) + 8px); left: 50%; transform: translateX(-50%); z-index: 70; width: min(680px, calc(100% - 24px)); display: flex; flex-direction: column; gap: 8px; pointer-events: none; } #alerts > * { pointer-events: auto; }
.alert { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: #3a1420; border: 1px solid #ff4d6d; box-shadow: var(--shadow); } .alert-txt { display: flex; flex-direction: column; flex: 1; font-size: 14px; } .alert-txt span { color: var(--muted); font-size: 13px; } .alert-btns { display: flex; gap: 6px; } .alert-ico { font-size: 22px; }
#toast { position: fixed; left: 50%; bottom: calc(var(--dock-h) + 20px); transform: translate(-50%, 20px); background: #fff; color: #1a1620; padding: 10px 18px; border-radius: 999px; font-weight: 800; opacity: 0; transition: all .3s; z-index: 80; pointer-events: none; box-shadow: var(--shadow); max-width: 90vw; text-align: center; } #toast.show { opacity: 1; transform: translate(-50%, 0); }
.wake { position: fixed; left: 50%; bottom: calc(var(--dock-h) + 20px); transform: translateX(-50%); z-index: 40; display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 999px; background: var(--accent); color: #1a1208; font-weight: 800; box-shadow: var(--shadow); cursor: pointer; } .wake.hide { display: none; }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; } #confetti i { position: absolute; top: -12px; width: 10px; height: 14px; border-radius: 3px; animation: fall 2s linear forwards; } @keyframes fall { to { transform: translateY(110vh) rotate(720deg); opacity: .3 } }
#tassh-mark { bottom: calc(var(--dock-h) + 8px) !important; right: auto !important; left: 12px !important; transform: scale(.85); transform-origin: bottom left; }

/* phones */
@media (max-width: 760px) {
  :root { --dock-h: 66px; --top-h: 56px; }
  .topbar { padding: 8px 10px; } .status { gap: 8px; padding: 6px 10px; } .status-name { font-size: 13px; } .xpbar { width: 50px; } .chip-streak { display: none; } .icon-btn { width: 40px; height: 40px; }
  .tab { width: auto; flex: 1; font-size: 10px; } .tab svg { width: 22px; height: 22px; }
  .home-card { left: 10px; right: 10px; width: auto; padding: 14px; gap: 10px; bottom: calc(var(--dock-h) + 10px); } .home-card h1 { font-size: 20px; } .home-hint { display: none; }
  .window { width: calc(100vw - 16px); top: calc(var(--top-h) + 6px); max-height: calc(100vh - var(--top-h) - var(--dock-h) - 12px); }
  .modes { grid-template-columns: 1fr; } .mode-btn { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 12px 14px; } .mode-btn small { margin-left: auto; }
  .play { top: calc(var(--top-h) + 6px); width: calc(100vw - 12px); } .highway-wrap { height: 140px; } .count { font-size: 70px; }
  .hud { gap: 12px; } .hud b { font-size: 15px; }
  .jambar { width: calc(100vw - 16px); padding: 10px 12px; gap: 8px 12px; bottom: calc(var(--dock-h) + 8px); } .jambar .ctrl input[type=range] { width: 100px; }
  #tassh-mark { top: calc(var(--top-h) + 4px) !important; bottom: auto !important; left: auto !important; right: 8px !important; transform: scale(.65); transform-origin: top right; }
}
