/* VOICE: playful and gentle, a kids' picture book that sings
   IDEA: a music staff is a running track; notes are stepping stones
   PICTURE: full-screen staff with the yellow note character running across it
   COLOUR and TYPE: sky blue field, warm yellow hero, tomato-red accent from the sneakers; Rubik rounded weights
   LAYOUT: canvas fills the screen, slim HUD on top, progress dots below */
:root{color-scheme:light dark;--card:light-dark(#fffffff0,#232a4df0);--ink:light-dark(#1f2340,#f3efe2);--accent:#e8453c;--yes:#2fa86a;--sun:#ffc928;--mute:light-dark(#1f234022,#f3efe233)}
:root[data-theme=light]{color-scheme:light}:root[data-theme=dark]{color-scheme:dark}
*{box-sizing:border-box;min-width:0}
html,body{margin:0;height:100%;overflow:hidden;color:var(--ink);font:16px/1.5 Rubik,system-ui,sans-serif;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}
canvas{position:fixed;inset:0;width:100%;height:100%;display:block;touch-action:none}
.hud{position:fixed;top:max(12px,env(safe-area-inset-top));left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));display:flex;align-items:center;justify-content:space-between;gap:10px;pointer-events:none}
.pill{background:var(--card);border-radius:999px;padding:6px 14px;font-weight:700;box-shadow:0 4px 14px #0002;white-space:nowrap}
.hearts span{color:var(--accent);font-size:20px;transition:opacity .5s ease,transform .5s ease;display:inline-block}
.hearts span.off{opacity:.18;transform:scale(.7)}
.ask{pointer-events:auto;background:var(--card);color:var(--ink);border:0;border-radius:999px;padding:8px 18px;font:700 clamp(19px,4.6vw,30px) Rubik,system-ui,sans-serif;box-shadow:0 5px 0 #0001,0 10px 24px #0002;display:flex;gap:10px;align-items:center;cursor:pointer;min-height:48px;white-space:nowrap;opacity:0;transform:translateY(-8px);transition:opacity .45s ease,transform .45s ease}
.ask.on{opacity:1;transform:none}
.ask b{color:var(--accent);font-weight:800}
.ask svg{width:22px;height:22px;flex:none}
.betaOnly{display:none!important}
[data-feature="songks"]{display:none!important}
.ask svg{width:22px;height:22px;flex:none}
.dots{position:fixed;bottom:max(14px,env(safe-area-inset-bottom));left:0;right:0;display:flex;justify-content:center;gap:6px;pointer-events:none;flex-wrap:wrap;padding:0 12px}
.dots i{width:11px;height:11px;border-radius:50%;background:var(--mute);transition:background .4s ease,transform .4s ease}
.dots i.ok{background:var(--yes)}.dots i.bad{background:var(--accent)}.dots i.cur{transform:scale(1.35);background:var(--sun)}
.overlay{position:fixed;inset:0;display:grid;place-items:center;padding:20px;transition:opacity .6s ease}
#start{padding-bottom:calc(var(--kbh) + 24px)}
.key.startHint{outline:3px solid #e5483f;outline-offset:-3px;z-index:1}
.overlay.hide{opacity:0;pointer-events:none}
.panel{background:var(--card);border-radius:28px;padding:22px 26px 26px;max-width:440px;width:100%;text-align:center;box-shadow:0 18px 50px #0003;transition:transform .6s cubic-bezier(.45,0,.2,1)}
.overlay.hide .panel{transform:translateY(16px) scale(.97)}
.panel img{height:clamp(110px,22vh,170px);display:block;margin:0 auto 4px}
h1{font:800 clamp(30px,6vw,42px)/1.05 Rubik,system-ui,sans-serif;margin:4px 0 10px;text-wrap:balance}
.panel p{margin:0 0 18px;font-size:16px}
.go{font:700 20px Rubik,system-ui,sans-serif;background:var(--accent);color:#fff;border:0;border-radius:999px;padding:12px 36px;min-height:50px;cursor:pointer;box-shadow:0 5px 0 #a8261f;transition:transform .15s ease,box-shadow .15s ease}
.go:active{transform:translateY(3px);box-shadow:0 2px 0 #a8261f}
.go:focus-visible,.ask:focus-visible{outline:3px solid var(--sun);outline-offset:3px}
.stars{font-size:42px;letter-spacing:6px;line-height:1;margin-bottom:6px}
.stars span{color:var(--mute)}.stars span.on{color:var(--sun)}
.songDone{width:64px;height:64px;margin:0 auto 8px;border-radius:50%;background:#2fa86a;color:#fff;display:grid;place-items:center;font:800 38px/1 Rubik,system-ui,sans-serif;letter-spacing:0;box-shadow:0 5px 0 #23804f;animation:pop .5s cubic-bezier(.3,1.6,.5,1)}
@keyframes pop{from{transform:scale(.3);opacity:0}to{transform:scale(1);opacity:1}}
.toast{position:fixed;left:50%;top:22%;display:flex;align-items:center;gap:12px;background:var(--card);border-radius:22px;padding:10px 22px 10px 14px;box-shadow:0 12px 34px #0003;font:800 clamp(20px,4.5vw,28px) Rubik,system-ui,sans-serif;opacity:0;transform:translate(-50%,10px) scale(.94);transition:opacity .55s cubic-bezier(.45,0,.2,1),transform .55s cubic-bezier(.45,0,.2,1);pointer-events:none;white-space:nowrap}
.toast.on{opacity:1;transform:translate(-50%,0) scale(1)}
.toast img{height:64px}
.toast small{display:block;font:500 15px Rubik,system-ui,sans-serif}
@media (prefers-reduced-motion:reduce){.overlay,.panel,.toast,.ask{transition:none}}
.kb{position:fixed;left:0;right:0;bottom:0;padding:0 max(6px,env(safe-area-inset-left)) max(6px,env(safe-area-inset-bottom))}
.keys{position:relative;height:var(--kbh);direction:ltr;display:flex;max-width:calc(var(--nw,7) * 110px);margin-inline:auto;transition:max-width .7s cubic-bezier(.45,0,.2,1)}
/* each white key lives in a slot; a new slot opens from zero width so the other keys make room smoothly, then the key fades in */
.slot{flex:1 1 0;min-width:0;position:relative;display:flex}
.slot>.key{flex:1;min-width:0}
@keyframes slotIn{from{flex-grow:0}to{flex-grow:1}}
@keyframes keyFade{0%,35%{opacity:0;transform:translateY(10px)}100%{opacity:1;transform:none}}
.slot.enter{animation:slotIn .9s cubic-bezier(.45,0,.2,1) both}
.slot.enter>.key,.slot.enter>.bk{animation:keyFade 1.3s cubic-bezier(.45,0,.2,1) both}
.key{position:relative;background:light-dark(#fffdf6,#f4efe2);color:#1f2340;border:2px solid #3a3f63;border-top:0;margin-left:-2px;border-radius:0 0 14px 14px;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;padding:0 0 8px;font:800 clamp(17px,3.8vw,24px)/1.1 Rubik,system-ui,sans-serif;cursor:pointer;box-shadow:inset 0 -7px 0 #0000001c;transition:background .25s ease,opacity .4s ease,transform .12s ease}
.slot:first-child>.key{margin-left:0}
.key small{font:500 12px Rubik,system-ui,sans-serif;opacity:.55;margin-top:2px}
.bk{position:absolute;top:0;width:9%;height:56%;z-index:2;background:#23263f;color:#fff;border:0;border-radius:0 0 8px 8px;display:flex;align-items:flex-end;justify-content:center;padding:0 0 7px;font:700 clamp(11px,2.6vw,15px)/1 Rubik,system-ui,sans-serif;cursor:pointer;transition:background .25s ease,opacity .4s ease,transform .12s ease}
.key:active,.bk:active{transform:translateY(2px)}
.keys[data-pend=sharp] .bk,.keys[data-pend=flat] .bk{outline:3px solid var(--sun);outline-offset:-3px}
@keyframes nope{0%,100%{transform:none}25%{transform:translateX(-4px)}75%{transform:translateX(4px)}}
.key.nope,.bk.nope{animation:nope .3s ease-in-out 2}
.lockHint{position:fixed;left:50%;bottom:calc(var(--kbh) + max(6px,env(safe-area-inset-bottom)) + 14px);transform:translate(-50%,8px);background:var(--card);color:var(--ink);border-radius:999px;padding:8px 16px;font:600 15px Rubik,system-ui,sans-serif;box-shadow:0 6px 18px #0002;opacity:0;pointer-events:none;transition:opacity .35s ease,transform .35s ease;white-space:nowrap;z-index:3}
.lockHint.on{opacity:1;transform:translate(-50%,0)}
.readyHint{font-size:19px;padding:12px 22px;bottom:auto;top:calc(max(12px,env(safe-area-inset-top)) + 76px)}.readyHint b{color:#e5483f}
.kb.colored .key{box-shadow:inset 0 -9px 0 var(--nc)}
.key.dim{opacity:.4;cursor:default}.bk.dim{background:#c9ccd8;color:transparent;cursor:default;box-shadow:none}
.key.sel{background:#fff1b8}.bk.sel{background:#7a6a1c}
.key.ok,.bk.ok{background:#7fd6a5;color:#1f2340}.key.bad,.bk.bad{background:#f59a95;color:#1f2340}
.key:focus-visible,.bk:focus-visible{outline:3px solid var(--sun);outline-offset:-5px}
.top{position:fixed;top:max(12px,env(safe-area-inset-top));left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));display:flex;justify-content:center;gap:10px;pointer-events:none}
.stars .lvlnum{display:inline-grid;place-items:center;width:92px;height:92px;border-radius:50%;background:var(--sun);color:#1f2340;font:800 48px/1 Rubik,system-ui,sans-serif;box-shadow:0 6px 0 #d9a514;letter-spacing:0;margin:4px 0 6px}
.panel{max-height:calc(100dvh - 32px);overflow:auto}
.hof{margin-top:16px;border-top:2px dashed var(--mute);padding-top:14px;text-align:center}
.hof[hidden]{display:none}
.hof h2{font:800 22px/1.2 Rubik,system-ui,sans-serif;margin:0 0 10px}
.ghost{background:none;border:2px solid var(--ink);color:var(--ink);border-radius:999px;padding:10px 22px;min-height:46px;font:700 17px Rubik,system-ui,sans-serif;cursor:pointer}
.nick{width:100%;font:600 18px Rubik,system-ui,sans-serif;padding:10px 14px;border-radius:14px;border:2px solid var(--mute);background:transparent;color:var(--ink);text-align:center;margin:4px 0 10px}
.nick:focus{outline:3px solid var(--sun);outline-offset:1px}
.avs{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;margin-bottom:12px}
.avs button{width:46px;height:46px;border-radius:50%;border:2px solid transparent;background:var(--mute);font-size:24px;cursor:pointer}
.avs button.on{border-color:var(--accent);background:#fff1b8}
.hint{font-size:13px;opacity:.7;margin:0 0 10px}
.err{color:var(--accent);font-size:14px;min-height:1.2em;margin:0 0 6px}
.board{list-style:none;margin:0;padding:0;text-align:start}
.board li{display:grid;grid-template-columns:2em 1.8em minmax(0,1fr) auto;gap:6px;align-items:center;padding:7px 10px;border-radius:12px}
.board li:nth-child(odd){background:var(--mute)}
.board li.me{background:#fff1b8;color:#1f2340;font-weight:700}
.board .rk{font-weight:800;text-align:center}.board .nm{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.board .lv{white-space:nowrap;font-size:14px}
.trophy{position:fixed;bottom:calc(var(--kbh) + 46px);inset-inline-start:max(12px,env(safe-area-inset-left));z-index:3}
.only-touch{display:none}
@media (hover:none) and (pointer:coarse){.only-touch{display:inline}.only-desk{display:none}}
.insts{display:flex;flex-wrap:wrap;justify-content:center;gap:6px}
.insts button{border:2px solid var(--mute);background:transparent;color:var(--ink);border-radius:999px;padding:6px 12px;min-height:38px;font:600 14px Rubik,system-ui,sans-serif;cursor:pointer;transition:background .25s ease,border-color .25s ease}
.instBr{flex-basis:100%;height:4px}
.insts button.on{background:var(--sun);border-color:var(--sun);color:#1f2340}
.podium{margin-top:16px;border-top:2px dashed var(--mute);padding-top:12px}
.podium h2{font:800 20px/1.2 Rubik,system-ui,sans-serif;margin:0 0 8px}
.more{background:none;border:0;color:inherit;text-decoration:underline;font:600 14px Rubik,system-ui,sans-serif;cursor:pointer;min-height:40px;opacity:.75}
.gear{pointer-events:auto;flex:none;width:48px;height:48px;border-radius:50%;border:0;background:var(--card);color:var(--ink);box-shadow:0 4px 14px #0002;display:grid;place-items:center;cursor:pointer;align-self:flex-start}
.gear[hidden]{display:none}
.gear svg{width:24px;height:24px;transition:transform .5s cubic-bezier(.45,0,.2,1)}#gearBtn[aria-expanded=true] svg{transform:rotate(60deg)}
.gear{transition:opacity .35s ease}
.gear[aria-disabled=true]{opacity:.38;cursor:default;box-shadow:none}
#pauseBtn svg .ic-play,#pauseBtn.paused svg .ic-pause{display:none}#pauseBtn.paused svg .ic-play{display:inline}
.gear:focus-visible{outline:3px solid var(--sun);outline-offset:2px}
.overlay{z-index:4}
.gearPop{position:fixed;top:calc(max(12px,env(safe-area-inset-top)) + 58px);inset-inline-end:max(12px,env(safe-area-inset-right));z-index:5;background:var(--card);border-radius:20px;padding:12px 14px;box-shadow:0 12px 34px #0003;width:min(320px,calc(100vw - 24px));text-align:center}
.gearPop b{display:block;margin-bottom:8px}
/* the popup opens from its button: placed right under it, with a small pointer, growing out of that spot */
.gearPop{overflow:auto;transform-origin:var(--ox,50%) -10px}
.gearPop:not([hidden]){animation:popIn .32s cubic-bezier(.2,.8,.25,1) both}
@keyframes popIn{from{opacity:0;transform:translateY(-6px) scale(.86)}to{opacity:1;transform:none}}
.popWrap{position:fixed;inset:0;pointer-events:none;z-index:5}
.popArrow{position:fixed;width:16px;height:16px;background:light-dark(#fff,#232a4d);transform:rotate(45deg);border-radius:3px;z-index:6;pointer-events:none;animation:popIn .32s cubic-bezier(.2,.8,.25,1) both}
@media (prefers-reduced-motion:reduce){.gearPop:not([hidden]),.popArrow{animation:none}}
@media (max-width:440px){.top{gap:5px}.gear{width:37px;height:37px}.gear svg{width:20px;height:20px}.prog{padding:6px 10px 8px}.prog .row{font-size:13px}.betaTag{display:none}}
.dbg{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:6px}
.dbg button{border:2px solid var(--mute);background:transparent;color:var(--ink);border-radius:999px;padding:6px 14px;min-height:40px;font:600 14px Rubik,system-ui,sans-serif;cursor:pointer}
.dbg span,.dbg select{min-width:56px;text-align:center;font-weight:700}
.dbg select{font:700 15px Rubik,system-ui,sans-serif;color:var(--ink);background:var(--card);border:2px solid var(--mute);border-radius:12px;padding:6px 8px;min-height:40px}
.intro{position:fixed;left:50%;top:calc(max(12px,env(safe-area-inset-top)) + 84px);transform:translate(-50%,-10px);background:var(--card);border-radius:22px;padding:14px 26px;box-shadow:0 12px 34px #0003;text-align:center;opacity:0;pointer-events:none;transition:opacity .5s cubic-bezier(.45,0,.2,1),transform .5s cubic-bezier(.45,0,.2,1);z-index:4;max-width:calc(100vw - 32px)}
.intro.on{opacity:1;transform:translate(-50%,0)}
.intro div{font:800 clamp(22px,4.6vw,30px)/1.2 Rubik,system-ui,sans-serif}
.intro{min-width:min(300px,calc(100vw - 32px))}.intro div{white-space:nowrap}
.introHint{margin:8px 0 0;font:700 17px Rubik,system-ui,sans-serif}.introHint:empty{display:none}.introHint b{color:#e5483f}
.intro small{display:block;font:500 16px/1.4 Rubik,system-ui,sans-serif;opacity:.75;margin-top:4px}
.tog{display:flex;align-items:center;gap:10px;justify-content:flex-start;padding:8px 4px;font:600 15px Rubik,system-ui,sans-serif;cursor:pointer;min-height:44px}
.tog input{width:22px;height:22px;accent-color:#e8453c}
.songPop{inset-inline-end:auto;inset-inline-start:max(12px,env(safe-area-inset-left));text-align:start}
.songPop b{text-align:center}.songPop .hint{text-align:center}
.songs{list-style:none;margin:0;padding:0;display:grid;gap:4px}
.songs li{display:flex;align-items:center;gap:6px;border-bottom:1px solid var(--mute)}
.songs .hear{flex:none;width:36px;height:36px;border-radius:50%;border:2px solid var(--mute);background:transparent;color:var(--ink);display:grid;place-items:center;cursor:pointer}
.songs .pick{flex:1;display:flex;justify-content:space-between;align-items:center;gap:8px;background:transparent;border:0;color:var(--ink);padding:8px 4px;min-height:48px;font:600 16px Rubik,system-ui,sans-serif;cursor:pointer;text-align:start;border-radius:10px}
.songs .pick span{display:flex;flex-direction:column;min-width:0}
.songs .pick:hover:not(:disabled),.songs .pick:focus-visible{background:var(--mute)}
.songs small{font-weight:400;opacity:.65;font-size:13px}
.songs em{font-style:normal;font-size:12px;opacity:.7;display:flex;align-items:center;gap:3px;white-space:nowrap}
.songs li.locked .pick{cursor:default;opacity:.55}
.songPop{max-height:calc(100dvh - 160px);overflow:auto}
.gearPop{background:light-dark(#fff,#232a4d)}
.betaTag{font:700 11px Rubik,system-ui,sans-serif;background:var(--accent);color:#fff;border-radius:6px;padding:1px 6px;vertical-align:2px}
.songEnd[hidden]{display:none}
.sheetPrint{position:fixed;z-index:3;display:flex;flex-direction:column;align-items:center;gap:3px;background:none;border:0;color:var(--ink);padding:6px 8px;min-width:56px;font:600 14px Rubik,system-ui,sans-serif;cursor:pointer;border-radius:14px}
.sheetPrint svg{width:30px;height:30px}
.sheetPrint:hover{background:#1f234010}.sheetPrint:focus-visible{outline:3px solid var(--sun);outline-offset:2px}.sheetPrint[hidden]{display:none}
.songEnd{margin-top:12px;display:flex;gap:8px;justify-content:center;flex-wrap:wrap}
.top{z-index:5}
.prog{background:var(--card);border-radius:20px;padding:8px 16px 10px;box-shadow:0 4px 14px #0002;width:min(560px,100%)}
.prog .row{display:flex;justify-content:space-between;align-items:baseline;gap:10px;font-weight:700;font-size:15px;margin-bottom:6px;white-space:nowrap}
.prog .row>span{min-width:0;overflow:hidden;text-overflow:ellipsis}.prog .row>span:last-child{flex:none}
.prog .row span:last-child{font-weight:500;opacity:.7;font-size:14px}
.track{height:14px;border-radius:99px;background:var(--mute);overflow:hidden;position:relative}
.fill{height:100%;width:0;border-radius:99px;background:linear-gradient(90deg,#ffc928,#ff9f2e);transition:width .9s cubic-bezier(.45,0,.2,1)}
.ticks{position:absolute;inset:0;display:flex;direction:ltr}
.ticks i{flex:1;border-right:2px solid light-dark(#ffffffaa,#232a4daa)}.ticks i:last-child{border:0}
.streak{display:flex;gap:5px;justify-content:center;margin-top:6px}
.streak b{width:9px;height:9px;border-radius:50%;background:var(--mute);transition:background .3s ease,transform .3s ease}.streak b.on{background:var(--yes);transform:scale(1.2)}

/* one clear toolbar: progress on the right, then a tidy row of tools in the same bar (labels under the icons on wide screens) */
.top{background:var(--card);border-radius:22px;box-shadow:0 4px 16px #0002;padding:6px 8px 6px 6px;width:min(780px,calc(100% - 24px));left:50%!important;right:auto!important;transform:translateX(-50%);align-items:center;gap:0!important;pointer-events:auto}
.top .prog{background:none;box-shadow:none;flex:1;width:auto;padding:4px 10px 6px}
.tools{display:flex;align-items:stretch;gap:2px;padding-inline-start:8px;margin-inline-start:4px;border-inline-start:1.5px solid var(--mute)}
.tools .gear{box-shadow:none;background:transparent;border-radius:14px;width:44px;height:44px;align-self:center;transition:background .2s ease,opacity .35s ease}
.tools .gear:not([aria-disabled=true]):hover,.tools .gear[aria-expanded=true]{background:light-dark(#0000000d,#ffffff14)}
.gear .lbl{display:none}
@media (min-width:760px){.tools .gear{width:auto;min-width:62px;height:54px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:0 8px}
  .gear .lbl{display:block;font:600 12px Rubik,system-ui,sans-serif}#pauseBtn .lbl.ic-play{display:none}#pauseBtn.paused .lbl.ic-pause{display:none}#pauseBtn.paused .lbl.ic-play{display:block}}
@media (max-width:440px){.top{width:calc(100% - 16px);padding:4px;border-radius:18px}.tools{padding-inline-start:4px;gap:0}.tools .gear{width:34px;height:40px}.tools .gear svg{width:19px;height:19px}.top .prog{padding:3px 6px 5px}.prog .row{gap:6px}}
#muteBtn .ic-off,#muteBtn.muted .ic-on{display:none}#muteBtn.muted svg .ic-off{display:inline}
@media (min-width:760px){#muteBtn.muted .lbl.ic-off{display:block}}
/* the game's name and logo at the start of the bar */
.brand{display:flex;align-items:center;gap:8px;padding-inline:6px 12px;margin-inline-end:6px;border-inline-end:1.5px solid var(--mute);flex:none;align-self:stretch}
.brand svg{width:34px;height:40px;flex:none}
.brand span{font:700 19px/1 Rubik,system-ui,sans-serif;white-space:nowrap;letter-spacing:-.2px}
.bname{display:flex;flex-direction:column;gap:3px}
.bname small{font:600 12px/1 Rubik,system-ui,sans-serif;opacity:.6}
.vh{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;margin:0;padding:0}
@media (max-width:760px){.brand span{display:none}.brand{padding-inline:2px 8px;margin-inline-end:2px}}
/* phone: the name gets its own thin line at the top of the bar */
.brandRow{display:none}
@media (max-width:760px){.brandRow{display:flex;grid-column:1/-1;justify-content:center;align-items:baseline;gap:8px;padding:3px 0 5px;margin-bottom:4px;border-bottom:1px solid #1f234014}.brandRow b{font:700 15px/1 Rubik,system-ui,sans-serif}.brandRow span{font:600 11px/1 Rubik,system-ui,sans-serif;opacity:.6}}
.brand svg{width:34px;height:40px}@media (max-width:440px){.brand svg{width:28px;height:33px}.brand{padding-inline:0 6px}}
@media (max-width:400px){.lvlN{display:none}}
/* full-width bar: logo pinned right, tools pinned left, progress in the middle */
.top{left:0!important;right:0!important;top:0!important;transform:none;width:auto;border-radius:0;padding:max(6px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-left)) 6px max(16px,env(safe-area-inset-right));box-shadow:0 2px 12px #0000001f;
  display:grid!important;grid-template-columns:minmax(max-content,1fr) minmax(0,560px) minmax(max-content,1fr);column-gap:14px!important}
.top .brand{border:0;margin:0;padding:0;justify-self:start}
.top .prog{min-width:0;width:auto}
.top .tools{border:0;margin:0;padding:0;justify-self:end}
@media (max-width:760px){.top{grid-template-columns:max-content minmax(0,1fr) max-content;column-gap:6px!important}}
@media (max-width:440px){.top{padding-inline:8px}}
.brand img{height:46px;width:auto;flex:none;margin-block:-4px}@media (max-width:440px){.brand img{height:36px}}
/* profile */
.av{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;font:800 15px/1 Rubik,system-ui,sans-serif}
.av svg{width:24px;height:24px}
.av.has{background:#ffc928;color:#1f2340}
.profPop{width:min(360px,calc(100vw - 20px));text-align:start}
.profHead{display:flex;align-items:center;gap:12px;margin-bottom:14px}.profHead .who{flex:1;min-width:0}
.profHead b{display:block;font:800 20px/1.2 Rubik,system-ui,sans-serif;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.profHead small{opacity:.65;font-size:13px}
.avatar{width:52px;height:52px;border-radius:50%;background:#ffc928;color:#1f2340;display:grid;place-items:center;font:800 24px Rubik,system-ui,sans-serif;flex:none;overflow:hidden}
.avatar svg{width:30px;height:30px}.avatar.empty{background:light-dark(#e3ecfb,#2b3157);color:#5b8bd8}
.editBtn{flex:none;width:38px;height:38px;border-radius:12px;border:1.5px solid var(--mute);background:transparent;color:inherit;display:grid;place-items:center;cursor:pointer}
.editBtn svg{width:18px;height:18px}.editBtn[aria-expanded=true]{background:light-dark(#f4f5fa,#1a1f3a)}
.subRow{display:flex;justify-content:space-between;align-items:baseline}.subRow small{opacity:.6;font-size:12.5px}
.stats{grid-template-columns:repeat(2,1fr)!important}
.stat{display:flex;align-items:center;gap:8px;text-align:start!important;padding:8px 10px!important;border:1.5px solid var(--mute);background:transparent!important}
.stat .ic{font-size:20px;line-height:1;flex:none}.stat b{font-size:18px!important}
.achs{display:grid;gap:6px;margin-bottom:12px}
.ach{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:12px;border:1.5px solid var(--mute)}
.ach .medal{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;font-size:21px;flex:none;background:var(--bg);position:relative}
.ach .medal em{position:absolute;bottom:-5px;inset-inline-start:-5px;font:800 10px/1 Rubik,system-ui,sans-serif;font-style:normal;background:#1f2340;color:#fff;border-radius:6px;padding:2px 4px}
.ach .txt{flex:1;min-width:0}.ach .txt b{display:block;font-size:14px}.ach .txt small{font-size:12px;opacity:.7}
.ach .bar{height:6px;border-radius:4px;background:light-dark(#eceef5,#2b3157);margin-top:4px;overflow:hidden}.ach .bar i{display:block;height:100%;background:#ffc928;border-radius:4px}
.ach.locked .medal{filter:grayscale(1);opacity:.45}
.achNew{display:inline-block;margin-top:6px;background:#fff4c7;color:#5a4300;border-radius:10px;padding:6px 10px;font-weight:600}
.fields{display:grid;gap:8px;margin-bottom:12px}
.fld{display:grid;grid-template-columns:44px 1fr;align-items:center;gap:8px;font-weight:600;font-size:14px}
.fld input{font:500 16px Rubik,system-ui,sans-serif;padding:8px 10px;border-radius:10px;border:1.5px solid var(--mute);background:light-dark(#fff,#1a1f3a);color:inherit;min-width:0}
.fld input:focus{outline:2px solid #ffc928;border-color:transparent}
.fields[hidden]{display:none}
.fields .hint{margin:0;font-size:12px;opacity:.6}
.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-bottom:12px}
.stat{background:light-dark(#f4f5fa,#1a1f3a);border-radius:12px;padding:8px 4px;text-align:center}
.stat b{display:block;font:800 20px/1.1 Rubik,system-ui,sans-serif}.stat small{font-size:11.5px;opacity:.7}
.profPop .sub{display:block;margin:4px 0 6px;font-size:14px}
.noteBars{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:6px}
.nb{width:40px;text-align:center;font:700 12px Rubik,system-ui,sans-serif}
.nb i{display:block;height:34px;border-radius:8px;background:light-dark(#eceef5,#2b3157);position:relative;overflow:hidden;margin-bottom:2px}
.nb i::after{content:"";position:absolute;inset:auto 0 0;height:var(--m);background:var(--c);opacity:.85}
.tip{font-size:13px;margin:4px 0 10px;opacity:.8}
.hist{list-style:none;padding:0;margin:0;display:grid;gap:4px;font-size:13px}
.hist li{display:flex;justify-content:space-between;gap:8px;padding:6px 8px;border-radius:10px;background:light-dark(#f4f5fa,#1a1f3a)}
.hist li span:last-child{opacity:.7}
.hist .none{justify-content:center;opacity:.6}
/* profile as its own page: a wide card over a soft veil */
.gearPop.profPop{inset:0!important;left:0!important;top:0!important;width:auto!important;max-height:none!important;border-radius:0;padding:0;background:#1f234055;box-shadow:none;overflow:auto;animation:profFade .3s ease both!important;z-index:7}
@keyframes profFade{from{opacity:0}to{opacity:1}}
.profCard{position:relative;background:light-dark(#fff,#232a4d);width:min(620px,calc(100% - 24px));margin:max(76px,calc(env(safe-area-inset-top) + 70px)) auto 24px 12px;border-radius:24px;padding:22px 22px 18px;box-shadow:0 18px 50px #0003;animation:profUp .38s cubic-bezier(.2,.8,.25,1) both}
@keyframes profUp{from{transform:translateY(16px);opacity:.4}to{transform:none;opacity:1}}
.profClose{position:absolute;top:14px;inset-inline-end:14px;width:38px;height:38px;border-radius:12px;border:0;background:light-dark(#f4f5fa,#1a1f3a);color:inherit;font-size:16px;cursor:pointer}
.profCard .profHead{padding-inline-end:48px}
.profCard .avatar{width:72px;height:72px;font-size:32px}.profCard .avatar svg{width:42px;height:42px}
.profCard .profHead b{font-size:24px}
.profCard .sub{font:800 19px/1.2 Rubik,system-ui,sans-serif!important;margin:18px 0 10px!important}
.profCard .sub small{font:500 13px Rubik,system-ui,sans-serif;opacity:.6;margin-inline-start:6px}
.profCard .stats{gap:10px}.profCard .stat{padding:12px 14px!important;border-radius:16px;border-width:2px}.profCard .stat .ic{font-size:26px}.profCard .stat b{font-size:22px!important}.profCard .stat small{font-size:13.5px}
.linkBtn{border:0;background:none;color:#2f86d8;font:700 14px Rubik,system-ui,sans-serif;cursor:pointer;padding:4px}
.profCard .achs{border:2px solid var(--mute);border-radius:18px;gap:0;overflow:hidden}
.profCard .ach{border:0;border-radius:0;padding:14px 16px;gap:16px}.profCard .ach+.ach{border-top:2px solid var(--mute)}
.profCard .ach .medal{width:72px;height:80px;border-radius:16px;font-size:34px;background:linear-gradient(135deg,#ffd84d,#ffc21a);box-shadow:inset 0 -5px 0 #e9a800;display:flex;flex-direction:column;gap:2px}
.profCard .ach .medal em{position:static;background:none;color:#8a5a00;font:800 11px/1 Rubik,system-ui,sans-serif;padding:0}
.profCard .ach.locked .medal{background:light-dark(#eceef5,#2b3157);box-shadow:inset 0 -5px 0 light-dark(#d6d9e4,#1a1f3a);filter:none;opacity:1}
.profCard .ach.locked .medal span{filter:grayscale(1);opacity:.4}.profCard .ach.locked .medal em{color:#8a8fa3}
.profCard .ach .txt b{font-size:17px}.profCard .ach .txt small{font-size:14px}
.profCard .ach .bar{height:10px;border-radius:6px;margin-top:8px}
.profCard .achs:not(.all) .ach.later{display:none}
.profCard .ach.next .medal{background:light-dark(#fff3c4,#3a3a2a);box-shadow:inset 0 -5px 0 light-dark(#f1d77a,#55502c)}.profCard .ach.next .medal span{filter:none;opacity:.85}
.achNext{font:700 12px Rubik,system-ui,sans-serif;color:#b07800;display:block;margin-bottom:2px}
.profCard .noteBars{gap:8px}.profCard .nb{width:48px;font-size:13px}.profCard .nb i{height:46px}
@media (max-width:520px){.profCard{margin:0;width:100%;border-radius:0;min-height:100%;padding:18px 14px calc(18px + env(safe-area-inset-bottom));padding-top:max(18px,env(safe-area-inset-top))}
  .profCard .ach .medal{width:58px;height:66px;font-size:28px}}
.profBanner{position:relative;background:light-dark(#dff0fd,#1d3355);border-radius:18px;height:170px;display:grid;place-items:center;margin-bottom:14px;overflow:hidden}
.profCard .profBanner .avatar{width:118px;height:118px;font-size:54px;box-shadow:0 0 0 6px light-dark(#ffffffaa,#ffffff22)}
.profCard .profBanner .avatar.empty{background:light-dark(#b9dcfb,#2b4a7a);color:#fff}.profCard .profBanner .avatar svg{width:70px;height:70px}
.profBanner .editBtn{position:absolute;top:12px;inset-inline-start:12px;background:light-dark(#fff,#232a4d);border-width:2px;box-shadow:0 3px 0 var(--mute)}
.profCard .profHead{padding:0;margin-bottom:6px}.profCard .profHead b{font-size:26px}.profCard .profHead small{font-size:14.5px}
.profCard .profClose{z-index:2;background:light-dark(#fff,#232a4d);top:34px;inset-inline-end:34px}
.profCard .fields{border-bottom:2px solid var(--mute);padding-bottom:12px}
@media (max-width:520px){.profCard .profClose{top:max(30px,calc(env(safe-area-inset-top) + 12px));inset-inline-end:26px}.profBanner{height:150px}}
/* settings and songs share the profile's look */
.gearPop.sheet{inset:0!important;left:0!important;top:0!important;width:auto!important;max-height:none!important;border-radius:0;padding:0;background:#1f234055;box-shadow:none;overflow:auto;animation:profFade .3s ease both!important;z-index:7;text-align:center}
.menuCard{width:min(400px,calc(100% - 24px))!important;padding:20px 18px 18px!important}
.menuCard>b:first-of-type{font:800 20px/1.2 Rubik,system-ui,sans-serif;margin:4px 48px 12px}
.menuCard .profClose{top:14px;inset-inline-end:14px}
@media (max-width:520px){.menuCard{width:100%!important;padding-top:max(20px,env(safe-area-inset-top))!important}}
/* character picker */
.avPick{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin-bottom:6px}
.avPick button{width:54px;height:54px;border-radius:50%;border:3px solid transparent;background:#ffc928;padding:0;overflow:hidden;cursor:pointer;display:grid;place-items:center;font:800 22px Rubik,system-ui,sans-serif;color:#1f2340;transition:transform .2s ease,border-color .2s ease}
.avPick button svg{width:30px;height:30px}.avPick button img{width:100%;height:100%;object-fit:cover}
.avPick button:hover{transform:translateY(-2px)}.avPick button[aria-checked=true]{border-color:#2f86d8;box-shadow:0 0 0 3px light-dark(#fff,#232a4d) inset}
.profCard .profBanner{height:210px;place-items:end center}
.profCard .profBanner .avatar{align-self:center}
.profCard .profBanner .avatar.full{width:auto;height:196px;border-radius:0;background:none;box-shadow:none;align-self:end;overflow:visible}
.profCard .profBanner .avatar.full img{height:100%;width:auto;margin:0}
.av.pic{overflow:hidden;background:#ffc928}.av.pic img{width:100%;height:100%;object-fit:cover}
@media (max-width:520px){.profCard .profBanner{height:190px}.profCard .profBanner .avatar.full{height:178px}}
/* banner: name and details on the right, the whole character on the left */
.profCard .profBanner{display:flex!important;align-items:center;justify-content:space-between;gap:12px;height:auto!important;min-height:200px;padding:16px 20px 0;place-items:initial}
.profBanner .who{flex:1;min-width:0;padding-bottom:16px;align-self:center}
.profBanner .who b{display:block;font:800 28px/1.15 Rubik,system-ui,sans-serif;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.profBanner .who small{display:block;font-size:14.5px;opacity:.7;margin-top:4px}
.profBanner .editBtn{position:static!important;width:auto!important;height:auto!important;display:inline-flex!important;align-items:center;gap:6px;margin-top:12px;padding:7px 12px;font:600 14px Rubik,system-ui,sans-serif}
.profCard .profBanner .avatar{align-self:center;margin-bottom:16px;flex:none}
.profCard .profBanner .avatar.full{height:auto!important;width:auto;align-self:flex-end;margin:0}
.profCard .profBanner .avatar.full img{height:auto!important;max-height:270px;width:auto;max-width:250px;display:block;margin:0 0 -2px!important}
.profCard .profClose{top:14px!important;inset-inline-end:14px!important;background:light-dark(#f4f5fa,#1a1f3a)!important}
.profCard>.profBanner{margin-top:44px}
@media (max-width:520px){.profBanner .who b{font-size:23px}.profCard .profBanner .avatar.full img{max-height:220px;max-width:175px}.profCard .profBanner{padding:12px 14px 0}}
/* cards in the middle of the screen start below the top bar, never under it */
.overlay{padding-top:calc(var(--barH,64px) + 12px);padding-bottom:max(16px,env(safe-area-inset-bottom))}
.panel{max-height:calc(100dvh - var(--barH,64px) - 28px - env(safe-area-inset-bottom))}
@media (max-height:760px){.panel img{height:clamp(80px,16vh,140px)}.panel{padding:16px 20px 20px}}
/* the profile and menu cards never get wider than the screen */
.profCard,.profCard *{box-sizing:border-box}.gearPop.sheet,.gearPop.profPop{overflow-x:hidden}
.profCard .fld{grid-template-columns:auto minmax(0,1fr)}.profCard .fld input{width:100%}
input,select,textarea{font-size:max(16px,1em)}
.errNote{position:fixed;bottom:max(8px,env(safe-area-inset-bottom));left:8px;right:8px;z-index:20;background:#fff3f2;color:#8a1c14;border:1.5px solid #f3b4ae;border-radius:12px;padding:8px 12px;font:500 13px/1.4 Rubik,system-ui,sans-serif;direction:ltr;text-align:left}.errNote[hidden]{display:none}
/* round summary */
.sumRow{display:flex;gap:8px;justify-content:center;margin:4px 0 10px;letter-spacing:0}
.sum{flex:1;max-width:120px;border:2px solid var(--mute);border-radius:16px;padding:10px 6px 8px;text-align:center}
.sum b{display:block;font:800 26px/1.1 Rubik,system-ui,sans-serif;position:relative}.sum b small{font-size:15px;opacity:.55;font-weight:700}
.sum b em{font:800 12px/1 Rubik,system-ui,sans-serif;font-style:normal;background:#3fae5a;color:#fff;border-radius:8px;padding:3px 6px;margin-inline-start:4px;vertical-align:middle}
.stars .sum span{display:block;font:600 13px Rubik,system-ui,sans-serif;opacity:1;color:var(--ink);margin-top:3px;letter-spacing:0}
.sum.up{border-color:#3fae5a;background:light-dark(#effaf2,#1e3527)}
.stars .sumNew span{opacity:1;color:var(--ink)}
.sumNew{display:flex;flex-wrap:wrap;gap:6px;justify-content:center;align-items:center;margin:0 0 8px;font:600 14px Rubik,system-ui,sans-serif;letter-spacing:0}
.noteChip{border:0;border-radius:999px;padding:6px 12px;background:var(--c);color:#fff;font:700 14px Rubik,system-ui,sans-serif;cursor:pointer;box-shadow:0 3px 0 #0002}
/* keys drawn instead of written */
kbd{display:inline-grid;place-items:center;min-width:26px;height:26px;padding:0 6px;border-radius:7px;background:light-dark(#fff,#2b3157);border:1.5px solid var(--mute);box-shadow:0 2px 0 var(--mute);font:700 13px/1 Rubik,system-ui,sans-serif;color:var(--ink);margin:0 1px;vertical-align:middle}
.keysLine{display:flex;justify-content:center;align-items:center;gap:4px;margin:-6px 0 6px}.keysLine span{opacity:.5;font-weight:700}.keysLine .or{opacity:.7;font-weight:500;margin:0 8px;font-size:14px}
#kbHelpBtn{display:block;margin:0 auto 8px;font-size:13px}
.kbHelp{display:grid;gap:6px;margin:0 auto 14px;max-width:340px;font-size:13.5px;text-align:start}.kbHelp[hidden]{display:none}
.kbHelp div{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:4px 0;border-bottom:1px solid var(--mute)}
.introKbd{display:block;margin-top:8px;font-size:14px}
@media (hover:none) and (pointer:coarse){.keysLine.only-desk,#kbHelpBtn.only-desk{display:none}}
/* key combos always read left to right, like on the keyboard */
.kbHelp [dir=ltr],.introKbd [dir=ltr]{display:inline-flex;direction:ltr;align-items:center;gap:2px;vertical-align:middle}
/* home: the stage stays visible; a small card offers to start */
#start.home{place-items:center;padding-bottom:calc(var(--kbh,140px) + 12px);pointer-events:none}
#start.home .panel{pointer-events:auto;max-width:360px;padding:16px 22px 14px}
#start.home h1,#start.home .howTo,#start.home .keysLine,#start.home #kbHelpBtn,#start.home #kbHelp,#start.home .podium{display:none!important}
#start .homeInfo,#start .howBtn{display:none}
#start.home .homeInfo{display:block;margin-bottom:10px}#start.home .homeInfo b{display:block;font:800 22px/1.2 Rubik,system-ui,sans-serif}#start.home .homeInfo span{font-size:14px;opacity:.7}
#start.home .howBtn{display:block;margin:8px auto 0;font-size:13px}
#start.home #resetBtn{margin-top:2px!important;font-size:12.5px!important;min-height:32px!important}
#start.home .podium+br{display:none}
.endPanel{position:relative}.endClose{position:absolute;top:14px;inset-inline-end:14px;width:38px;height:38px;border-radius:12px;border:0;background:light-dark(#f4f5fa,#1a1f3a);color:inherit;font-size:16px;cursor:pointer;z-index:2}
.rankLine{margin:-6px 0 12px;font:700 15px Rubik,system-ui,sans-serif}
#lbPop .board{margin:6px 0}
#lbJoin .hint{margin:12px 0 4px}
#lbBtn .lbl{white-space:nowrap}
.panel img{width:auto;max-width:100%;object-fit:contain}   /* keep the drawing's proportions */

/* the song a song page linked to */
#songList li.linked{outline:3px solid var(--sun);outline-offset:2px;border-radius:14px}

/* listening mode (mic) */
#micBtn .ic-on{display:none}#micBtn.on .ic-off{display:none}#micBtn.on svg path.ic-off{display:none}
#micBtn.on{color:#d93a3a}#micBtn.on svg{animation:micBreath 1.8s ease-in-out infinite}
@media (min-width:760px){#micBtn.on .lbl.ic-on{display:block}}
@keyframes micBreath{0%,100%{transform:scale(1)}50%{transform:scale(1.1)}}
.micPill{position:fixed;left:max(12px,env(safe-area-inset-left));bottom:calc(var(--kbh) + max(6px,env(safe-area-inset-bottom)) + 14px);display:flex;align-items:center;gap:8px;
  background:var(--card);color:var(--ink);border-radius:999px;padding:7px 14px 7px 12px;font:600 15px Rubik,system-ui,sans-serif;box-shadow:0 6px 18px #0002;
  opacity:0;transform:translateY(8px);pointer-events:none;transition:opacity .4s ease,transform .4s cubic-bezier(.3,0,.2,1);--lv:0}
.micPill.on{opacity:1;transform:none}
.micDot{width:9px;height:9px;border-radius:50%;background:#d93a3a;opacity:calc(.35 + var(--lv)*.65)}
#micNote{min-width:3.2em;text-align:center;transition:color .2s ease}.micPill.hit #micNote{color:#2fa65a}
.micLv{width:44px;height:6px;border-radius:3px;background:light-dark(#0000001a,#ffffff22);overflow:hidden}
.micLv i{display:block;height:100%;width:calc(var(--lv)*100%);background:#3fae5a;border-radius:3px;transition:width .08s linear}
@media (max-width:600px){.micPill{bottom:calc(var(--kbh) + max(6px,env(safe-area-inset-bottom)) + 66px)}}
@media (max-width:440px){.hasMic .tools .gear{width:30px}.hasMic .tools .gear svg{width:18px;height:18px}}
.insts.trans{flex-direction:column;align-items:stretch;gap:6px}
.insts.trans button{display:flex;flex-direction:column;align-items:flex-start;gap:2px;border-radius:14px;padding:7px 14px;text-align:start}
.insts.trans small{font:500 12px Rubik,system-ui,sans-serif;opacity:.7}
.trHint{margin:6px 2px 0;font-size:12.5px;opacity:.7}
