:root{color-scheme:dark;--ink:#060914;--cream:#f5f7ff;--muted:#a9b8d0;--cyan:#40d4ff;--pink:#fb57d4;--edge:#b9d5ff24;font-family:Inter,ui-sans-serif,system-ui,-apple-system,sans-serif;background:var(--ink);color:var(--cream);font-size:16px}
*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 20% 35%,#0d274655,transparent 50%),radial-gradient(ellipse at 85% 65%,#5b17422b,transparent 45%),var(--ink)}[hidden]{display:none!important}button,input,summary,select{font:inherit}button,summary{cursor:pointer}button{color:inherit}button:disabled{opacity:.45;cursor:wait}button,input,select,summary,a{touch-action:manipulation}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible,[tabindex]:focus-visible{outline:3px solid var(--cyan);outline-offset:5px}h1,h2,h3,p{margin:0}a{color:inherit;text-decoration:none}button,input,select{border-radius:8px}input,select{background:#142033;color:white;border:1px solid #566581;min-height:40px}label{display:grid;gap:8px}input[type=range]{accent-color:var(--cyan)}.button{padding:16px 26px;min-height:52px;border:1px solid transparent;font-weight:700;font-size:1.125rem;display:inline-flex;justify-content:center;align-items:center;gap:22px}.button-cream{background:var(--cream);color:#081324}.button-outline{border-color:#7b8ba566;background:#10203966}.button-coral{background:var(--cyan);color:#07131e}.text-button{background:none;border:0}.small{font-size:.875rem;line-height:1.6}.section-label{letter-spacing:.18em;font-size:.875rem;color:var(--cyan);font-weight:700}
#player-shell{min-height:100dvh;display:flex;flex-direction:column;padding:0 clamp(20px,4vw,90px)}.player-header{height:100px;display:flex;align-items:center;gap:26px;flex:none;border-bottom:1px solid var(--edge)}.player-brand{font-size:2.15rem;font-weight:850;letter-spacing:-.07em}.player-brand span{color:var(--cyan);padding-left:3px}.player-edition{letter-spacing:.28em;font-size:.8rem;color:var(--muted)}#browse-settings{margin-left:auto;z-index:100;position:relative;font-size:1rem}#browse-settings :is(summary,.browse-settings-toggle){padding:12px;border:1px solid var(--edge);border-radius:8px;list-style:none}.browse-panel{position:absolute;top:calc(100% + 12px);right:0;width:min(430px,calc(100vw - 40px));max-height:75dvh;overflow:auto;background:#101929;border:1px solid #62728b;border-radius:12px;padding:24px;box-shadow:0 30px 80px #000b;display:grid;gap:18px;line-height:1.5}.browse-panel h2{font-size:1.35rem}.browse-panel h3{font-size:1.1rem}.browse-panel p{color:var(--muted);font-size:.9rem}.browse-panel button{background:#1d304a;border:1px solid #7a91af;padding:12px;min-height:48px}.browse-panel button[aria-pressed=true]{background:#164c55;border-color:var(--cyan)}#gesture-camera{width:100%;max-height:160px;object-fit:contain;transform:scaleX(-1);background:black}#gesture-progress{width:100%;accent-color:var(--cyan)}
#song-selection{flex:1;display:flex;flex-direction:column;justify-content:center;padding:24px 0}.selection-title{text-align:center}.selection-title>span{color:var(--cyan);font-size:.8rem;font-weight:750;letter-spacing:.2em}.selection-title h1{font-size:clamp(1.5rem,2.7vw,2.6rem);margin:8px 0;letter-spacing:-.03em}.selection-title p{font-size:.9rem;color:var(--muted);min-height:1.4em}.song-carousel{position:relative;height:clamp(220px,34vh,420px);margin:18px auto 6px;width:100%;max-width:1380px;touch-action:pan-y;outline:none;overflow:hidden}.song-carousel #carousel-cards{position:relative;height:100%;width:100%;perspective:1200px}.song-card{position:absolute;top:10px;left:50%;height:calc(100% - 25px);aspect-ratio:1;max-width:65vw;border:1px solid #b0c6e344;border-radius:14px;padding:0;overflow:hidden;background:#142a3b;color:white;transform:translateX(calc(-50% + var(--offset)*85%)) scale(var(--scale));z-index:var(--layer);opacity:var(--opacity);transition:transform .35s cubic-bezier(.18,.7,.2,1),opacity .25s,border-color .25s;box-shadow:0 18px 45px #0006;text-align:left}.song-card[data-selected=true]{border:2px solid var(--cyan);box-shadow:0 0 0 5px #40d4ff13,0 16px 45px #0009}.song-card img{width:100%;height:100%;object-fit:cover}.cover-type{height:100%;background:linear-gradient(145deg,hsl(var(--hue) 64% 29%),#11172c 72%);padding:clamp(16px,2.6vw,38px);display:flex;flex-direction:column;justify-content:space-between}.cover-type strong{font-size:clamp(4rem,9vw,10rem);letter-spacing:-.09em;line-height:.9;font-weight:850;opacity:.95}.cover-type small{font-size:.875rem;letter-spacing:.12em;text-transform:uppercase}.cover-type span{font-size:clamp(1.1rem,2vw,1.8rem);line-height:1.12;font-weight:700;max-height:3.4em;overflow:hidden}.song-card .cover-tag{position:absolute;top:14px;right:14px;font-size:.75rem;letter-spacing:.08em;padding:6px 9px;border-radius:5px;background:#020914d9}.carousel-arrow{position:absolute;top:45%;z-index:10;min-width:52px;min-height:52px;font-size:1.6rem;border:1px solid #bfd7f966;background:#091422df;border-radius:50%}.carousel-arrow.previous{left:0}.carousel-arrow.next{right:0}.song-choice{text-align:center;min-height:100px;padding:8px 0}.song-choice>p:first-child{color:var(--cyan);font-size:1rem;margin-bottom:6px}.song-choice h2{font-size:clamp(1.6rem,3vw,3rem);letter-spacing:-.045em;line-height:1.12}.song-choice>p:last-child{color:var(--muted);font-size:.875rem;margin-top:10px}.selection-actions,.result-actions{display:flex;justify-content:center;gap:18px;margin:16px 0}.control-hints{text-align:center;font-size:.875rem;color:var(--muted);margin-top:8px}.control-hints span{margin:0 12px}kbd{font:inherit;color:var(--cream);border:1px solid var(--edge);padding:2px 7px;border-radius:4px}.player-footer{font-size:.8rem;color:var(--muted);display:flex;justify-content:space-between;gap:20px;padding:20px 0;border-top:1px solid var(--edge)}
#player-loading,#player-results{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:24px;padding:45px 0}#player-loading h1,#player-results h1{font-size:clamp(2rem,5vw,4.5rem);letter-spacing:-.05em}#loading-detail,#results-song{font-size:1.2rem;color:var(--muted);max-width:800px;line-height:1.5}#result-scores{display:flex;justify-content:center;flex-wrap:wrap;gap:24px;width:100%}.result-score{width:min(440px,100%);padding:30px;border:1px solid var(--edge);border-top:3px solid var(--cyan);background:#10223966;border-radius:14px;text-align:left}.result-score[data-player="2"]{border-top-color:var(--pink)}.result-score>span{color:var(--cyan);font-weight:700}.result-score strong{display:block;font-size:clamp(4rem,8vw,7rem);letter-spacing:-.07em;line-height:1.2}.result-score dl{display:grid;grid-template-columns:1fr auto;gap:10px;color:var(--muted);font-size:.95rem}.result-score dd{margin:0;color:var(--cream)}#results-note{max-width:730px;line-height:1.6;color:var(--muted);font-size:.95rem}.result-actions button[data-selected=true]{outline:3px solid var(--cyan);outline-offset:5px}#player-message{position:fixed;z-index:110;bottom:18px;left:50%;transform:translateX(-50%);max-width:90vw;padding:14px 20px;background:#ecf4ff;color:#132039;border-radius:10px;pointer-events:none}.standalone-player .game-shortcuts{font-size:.875rem}.standalone-player .game-volume-controls{display:flex;gap:20px}.standalone-player .game-volume-controls label{flex:1}.standalone-player[data-phase=finishing] .game-bottom{pointer-events:none;opacity:.5}
@media(min-width:1900px){:root:not(:has(body[data-phase=catalogue])){font-size:21px}.song-carousel{height:43vh}.player-header{height:120px}}@media(max-width:650px){.player-header{height:76px;gap:12px}.player-edition{display:none}.player-brand{font-size:1.9rem}#browse-settings :is(summary,.browse-settings-toggle){font-size:.85rem}.song-carousel{height:32vh;min-height:230px}.song-card{max-width:66vw}.cover-type strong{font-size:5rem}.carousel-arrow{min-width:42px;min-height:42px}.song-choice{min-height:95px}.song-choice h2{font-size:1.7rem}.player-footer{flex-direction:column;gap:7px;font-size:.75rem}.control-hints{line-height:1.9}.control-hints span{margin:0 5px}.selection-actions,.result-actions{flex-wrap:wrap}.result-score{padding:22px}.player-header+section{padding-top:20px}.result-actions .button{font-size:1rem}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;scroll-behavior:auto!important}}
#handsfree-progress{width:120px;max-width:25vw;accent-color:var(--cyan)}#song-carousel:focus-visible{outline:none}#song-carousel:focus-visible .song-card[data-selected=true]{outline:2px solid var(--cyan);outline-offset:5px}
.gesture-main{align-self:center;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:10px 14px;max-width:min(720px,100%);margin:4px 0 16px;padding:9px 14px;border:1px solid #7691a644;border-radius:12px;background:#0c1925de;color:var(--muted);font-size:.82rem;line-height:1.4;transition:border-color .18s,box-shadow .18s}.gesture-main>span:first-child{font-size:1.3rem;line-height:1}.gesture-main>span:nth-child(2){flex:1;min-width:140px}.gesture-main button{padding:7px 10px;border:1px solid #7896ac70;border-radius:7px;background:#173141;font:inherit;color:var(--cream);white-space:nowrap;min-height:36px}.gesture-main progress{width:110px;max-width:30vw;height:7px;accent-color:var(--cyan)}.gesture-main[data-gesture-state=palm-ready],.gesture-main[data-gesture-state=swiping],.gesture-main[data-gesture-state=holding],.gesture-main[data-gesture-state=confirmed]{border-color:#6cdce998;color:#d9faff;box-shadow:0 0 18px #36d4ce17}.gesture-main[data-gesture-state=confirmed]{border-color:#b2ffe4;box-shadow:0 0 24px #6fffb82b}#player-shell:is([data-gesture-state=palm-ready],[data-gesture-state=swiping],[data-gesture-state=holding]) .song-card[data-selected=true]{border-color:#a8fff2;box-shadow:0 0 0 5px #70f8e22a,0 0 28px #46ddd745,0 16px 45px #0009}#player-shell[data-gesture-state=confirmed] .song-card[data-selected=true]{border-color:#d2ffe8;box-shadow:0 0 0 6px #9afbd43d,0 0 34px #68f7c35c,0 16px 45px #0009}#player-shell[data-gesture-direction=left]:is([data-gesture-state=swiping],[data-gesture-state=confirmed]) #previous-song,#player-shell[data-gesture-direction=right]:is([data-gesture-state=swiping],[data-gesture-state=confirmed]) #next-song{border-color:#c0ffec;color:#d8fff4;background:#185455;box-shadow:0 0 22px #58eac965}#player-shell:is([data-gesture-state=palm-ready],[data-gesture-state=swiping],[data-gesture-state=holding],[data-gesture-state=confirmed]) .result-actions button[data-selected=true]{outline-color:#b8fff0;box-shadow:0 0 28px #49daba48}body:not([data-phase=catalogue]):not([data-phase=results]) #gesture-main{display:none}@media(prefers-reduced-motion:reduce){.gesture-main,.gesture-guide>div{transition:none}}@media(max-width:650px){.gesture-main{font-size:.75rem;gap:8px;padding:8px 10px;margin-bottom:10px}.gesture-main>span:nth-child(2){min-width:120px}.gesture-main progress{width:90px}.gesture-main button{min-height:40px}}
.gesture-guide{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.gesture-guide>div{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:3px;min-width:0;padding:10px 4px;border:1px solid var(--edge);border-radius:10px;background:#0b1422;transition:background .15s,border-color .15s}.gesture-guide span{font-size:1.65rem;color:var(--cyan);line-height:1.3}.gesture-guide strong{font-size:.8rem}.gesture-guide small{font-size:.71rem;color:var(--muted);line-height:1.4}.gesture-guide>div[data-active=true]{border-color:var(--cyan);background:#164c55;box-shadow:inset 0 0 0 1px #40d4ff44}.gesture-guide>div[data-active=true] small{color:var(--cream)}#camera-status{min-height:2.8em;color:var(--cream)}#gesture-preview{position:relative;overflow:hidden;border:1px solid #536881;border-radius:10px;background:#030812}#gesture-camera{display:block;width:100%;height:190px;max-height:none;object-fit:contain;object-position:center}#gesture-overlay{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.gesture-preview-caption{position:absolute;bottom:7px;left:8px;padding:2px 7px;border-radius:4px;background:#03101bc9;color:#d6e6f5;font-size:.65rem;pointer-events:none}#gesture-preview[data-state=holding],#gesture-preview[data-state=confirmed]{border-color:var(--cyan)}#gesture-readout{display:grid;gap:8px;min-height:2.7em}#gesture-feedback{font-size:.8rem;color:var(--cyan)}#gesture-progress,#gesture-swipe-progress{display:block;width:100%;height:9px;accent-color:var(--cyan)}
.game-preview-open #browse-settings{visibility:hidden}
#browse-waveform-canvas{position:absolute;inset:38% 0 auto;width:100%;height:52%;display:block;pointer-events:none}.waveform-option{display:flex;align-items:center;gap:10px}.waveform-option input{min-height:20px;width:20px;height:20px;accent-color:var(--cyan)}
#browse-waveform-canvas{mask-image:linear-gradient(to right,#000 18%,#0006 42%,#0006 58%,#000 82%);-webkit-mask-image:linear-gradient(to right,#000 18%,#0006 42%,#0006 58%,#000 82%)}
.song-card[data-artwork=true] .cover-type span,.song-card[data-artwork=true] .cover-type small{text-shadow:0 1px 3px #000,0 0 16px #000}
#player-shell{position:relative;isolation:isolate}#browse-backdrop{position:fixed;inset:0;z-index:-1;pointer-events:none;overflow:hidden}#browse-party{width:100%;height:100%;opacity:.82;display:block}.browse-backdrop-shade{position:absolute;inset:0;background:radial-gradient(ellipse at 50% 45%,#060914bb,transparent 75%),linear-gradient(#06091488,transparent 30%,#060914a0)}.player-header{background:#06091466}body:not([data-phase=catalogue]) #browse-backdrop{display:none}#selected-preview{font-size:.75rem;color:#85c8dc;min-height:1.2em;margin-top:7px}.song-card[data-artwork=true] .cover-type{position:absolute;inset:0;background:linear-gradient(transparent 42%,#030914ed);justify-content:end;gap:8px}.song-card[data-artwork=true] .cover-type>strong{display:none}
.preview-controls{display:flex;flex-wrap:wrap;gap:10px}.preview-controls button{flex:1 1 140px}.preview-controls button:disabled{cursor:default}
.reactivity-control>span{display:flex;justify-content:space-between;align-items:baseline;gap:12px}.reactivity-control output{font-size:.85rem;color:var(--muted);font-variant-numeric:tabular-nums}.reactivity-control input{width:100%;margin:0;min-width:0}
.vocal-lab-link{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:15px 16px;border:1px solid #40d4ff66;border-radius:10px;background:#123043;color:var(--cream);min-height:64px}
.vocal-lab-link strong,.vocal-lab-link small{display:block}.vocal-lab-link small{color:var(--muted);font-size:.8rem;margin-top:3px;line-height:1.4}
.vocal-lab-link>span:last-child{color:var(--cyan);font-size:1.5rem}.vocal-lab-link:hover{border-color:var(--cyan);background:#163d50}
.selection-actions{align-items:end;flex-wrap:wrap}
/* Keep the sound-reactive scenes visible at the edges without washing out the song title. */
.result-score .result-detail-hint{font-size:.72rem;line-height:1.55;color:var(--muted);margin-top:16px}
.result-score dl{grid-template-columns:minmax(0,1fr) auto;column-gap:16px}
.result-score dt{overflow-wrap:anywhere}.result-score dd{font-variant-numeric:tabular-nums}
#browse-backdrop:is([data-scene="neon-ribbons"],[data-scene="glitter"]) #browse-party{opacity:1}
#browse-backdrop:is([data-scene="neon-ribbons"],[data-scene="glitter"]) .browse-backdrop-shade{background:radial-gradient(ellipse at 50% 52%,#060914a8,transparent 64%),linear-gradient(#06091466,transparent 28%,#06091430)}
#game-song-credits,#results-credits{font-size:.875rem;line-height:1.6;margin:16px 0;color:var(--muted)}#game-song-credits p,#results-credits p{margin:10px 0;white-space:pre-wrap}#game-song-credits a,#results-credits a{text-decoration:underline;color:var(--cyan)}body:not([data-phase=results]) #results-credits{display:none}.song-card:has(img) .cover-type{position:absolute;inset:0;background:linear-gradient(transparent 45%,#030914e8);justify-content:end;gap:8px}.song-card:has(img) .cover-type>strong{display:none}

/* The songbook is a full-bleed two-axis screen. Pad content, not the frame:
   covers/background/dividers reach the edges even on ultrawide displays.
   Gameplay/results retain their previous layout and large-screen text scale. */
body[data-phase=catalogue]{--browse-inset-left:max(16px,env(safe-area-inset-left,0px));--browse-inset-right:max(16px,env(safe-area-inset-right,0px));height:100dvh;overflow:hidden}
body[data-phase=catalogue] #player-shell{height:100dvh;min-height:0;padding:0 0 env(safe-area-inset-bottom,0px);overflow:clip}
body[data-phase=catalogue] .player-header{height:calc(72px + env(safe-area-inset-top,0px));padding-top:env(safe-area-inset-top,0px);padding-left:var(--browse-inset-left);padding-right:var(--browse-inset-right)}
body[data-phase=catalogue] :is(.selection-title,.collection-switcher,.song-details,.browse-navigation-hint){padding-left:var(--browse-inset-left);padding-right:var(--browse-inset-right)}
body[data-phase=catalogue] .player-footer{display:none}
body[data-phase=catalogue] #song-selection{min-height:0;min-width:0;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto minmax(0,1fr) auto auto;justify-content:stretch;gap:6px;padding:12px 0 14px}
body[data-phase=catalogue] .selection-title h1{font-size:clamp(1.3rem,2.3vw,2.15rem);margin:3px 0}
body[data-phase=catalogue] .selection-title>span{font-size:.65rem}
#catalogue-status:empty{display:none}
.collection-switcher{display:flex;align-items:center;justify-content:center;gap:16px;min-width:0}
.collection-switcher>button{flex:none}
/* Quiet directional marks, with full-size invisible hit areas. */
#song-selection :is(.carousel-arrow,.collection-switcher>button){display:grid;place-items:center;width:44px;height:44px;min-width:44px;min-height:44px;padding:0;border:0;border-radius:4px;background:transparent;color:var(--muted);box-shadow:none;transition:color .16s}
#song-selection :is(.carousel-arrow,.collection-switcher>button) svg{display:block;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;pointer-events:none;filter:drop-shadow(0 1px 2px #000c)}
#song-selection .collection-switcher>button svg{width:18px;height:18px}
#song-selection :is(.carousel-arrow,.collection-switcher>button):hover:not(:disabled){color:var(--cream)}
#song-selection :is(.carousel-arrow,.collection-switcher>button):active:not(:disabled){color:var(--cyan)}
#song-selection :is(.carousel-arrow,.collection-switcher>button):focus-visible{color:var(--cream);outline:2px solid var(--cyan);outline-offset:-3px}
#song-selection :is(.carousel-arrow,.collection-switcher>button):disabled{cursor:default}
#player-shell[data-gesture-direction=left]:is([data-gesture-state=swiping],[data-gesture-state=confirmed]) #song-selection #next-song,
#player-shell[data-gesture-direction=right]:is([data-gesture-state=swiping],[data-gesture-state=confirmed]) #song-selection #previous-song{color:var(--cyan);background:transparent;box-shadow:none}
#player-shell[data-gesture-direction=left]:is([data-gesture-state=swiping],[data-gesture-state=confirmed]) #song-selection #next-song svg,
#player-shell[data-gesture-direction=right]:is([data-gesture-state=swiping],[data-gesture-state=confirmed]) #song-selection #previous-song svg{filter:drop-shadow(0 0 4px #40d4ff66)}
.collection-picker{position:relative;display:grid;text-align:center;gap:1px;max-width:min(60vw,440px);min-width:180px;padding:4px 26px 4px 10px;border-radius:8px}
.collection-picker:focus-within{outline:2px solid var(--cyan);outline-offset:2px}
.collection-picker>span:first-child{font-size:.6rem;letter-spacing:.17em;color:var(--muted)}
.collection-picker>strong{font-size:clamp(1rem,1.6vw,1.4rem);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--cream)}
.collection-chevron{position:absolute;right:7px;bottom:8px;color:var(--cyan);pointer-events:none}
#collection-select{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
body[data-phase=catalogue] .song-carousel{height:100%;min-height:0;min-width:0;max-width:none;margin:0;container-type:size;touch-action:pinch-zoom}
body[data-phase=catalogue] .song-card{top:50%;height:auto;width:min(80cqh,64vw,370px);max-width:none;transform:translate(-50%,-50%) translateX(calc(var(--offset)*85%)) scale(var(--scale));transition:border-color .2s}
body[data-phase=catalogue] .cover-type{padding:clamp(10px,5cqh,26px);gap:8px}
body[data-phase=catalogue] .cover-type strong{font-size:clamp(2rem,22cqh,6rem)}
body[data-phase=catalogue] .cover-type span{font-size:clamp(.85rem,5cqh,1.5rem)}
body[data-phase=catalogue] .cover-type small{font-size:clamp(.6rem,2.7cqh,.8rem);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
body[data-phase=catalogue] .cover-tag{top:10px;right:10px;font-size:.6rem}
body[data-phase=catalogue] .carousel-arrow{top:calc(50% - 22px);min-width:44px;min-height:44px}
body[data-phase=catalogue] .carousel-arrow.previous{left:max(8px,env(safe-area-inset-left,0px))}
body[data-phase=catalogue] .carousel-arrow.next{right:max(8px,env(safe-area-inset-right,0px))}
.song-details{min-width:0;align-self:center;display:flex;flex-direction:column;align-items:center;gap:8px}
body[data-phase=catalogue] .song-choice{min-height:0;padding:2px 0;text-align:center}
body[data-phase=catalogue] #selected-artist{font-size:.85rem;margin:0 0 3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#selected-artist-link{display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom;border-bottom:1px solid #40d4ff44;line-height:1.4}
#selected-artist-link:hover{color:var(--cream);border-color:var(--cyan)}
body[data-phase=catalogue] #selected-artist:focus-within{overflow:visible}
body[data-phase=catalogue] .song-choice h2{font-size:clamp(1.2rem,2.3vw,2rem);line-height:1.15;overflow-wrap:anywhere;text-wrap:balance;max-width:80ch}
body[data-phase=catalogue] #selected-meta{font-size:.75rem;color:var(--muted);margin-top:4px}
body[data-phase=catalogue] #selected-preview{font-size:.68rem;min-height:0;margin:3px 0 0}
#selected-preview:empty{display:none}
body[data-phase=catalogue] .selection-actions{order:-1;flex-wrap:nowrap;gap:10px;margin:0;align-items:center}
.selection-actions:not(:has(>:not([hidden]))){display:none}
body[data-phase=catalogue] .selection-actions:has(#retry-catalogue:not([hidden])){flex-wrap:wrap}


body[data-phase=catalogue] .selection-actions .button{min-height:46px;padding:10px 20px;font-size:1rem;gap:14px}
/* A quiet length picker, aligned with the selected album. Native keyboard and
   touch selection remain available without a second play action. */
.song-length{position:relative;display:block;width:10.4rem;max-width:100%;color:#c4d4da;line-height:1}
.song-length select{appearance:none;-webkit-appearance:none;width:100%;min-height:44px;padding:10px 28px 10px 31px;margin:0;border:0;border-radius:6px;background:transparent;color:inherit;font:inherit;font-size:.9rem;text-align:center;cursor:pointer;box-shadow:none}
.song-length svg{position:absolute;top:50%;transform:translateY(-50%);width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.song-length-clock{left:8px;opacity:.65}.song-length-chevron{right:5px;opacity:.7}
.song-length:hover{color:var(--cream)}
.song-length:focus-within{color:var(--cream)}
.song-length select:focus-visible{outline:2px solid var(--cyan);outline-offset:1px;background:#b5dddc0c}
.song-length select:disabled{cursor:default;opacity:.55}
.song-length:has(select:disabled) svg{opacity:.3}
.song-length select option{background:#101d2c;color:var(--cream)}

/* Independent native buttons inside the cover shell; no nested click target. */
.song-card-play{position:absolute;inset:0;display:block;width:100%;height:100%;min-width:0;min-height:0;margin:0;padding:0;border:0;border-radius:inherit;background:transparent;color:inherit;font:inherit;text-align:inherit;line-height:normal;overflow:hidden;cursor:pointer}
.song-card-play img{display:block}
.song-card-play:focus-visible{outline:3px solid #bbfff4;outline-offset:-6px}
.song-card:has(>.song-card-play:focus-visible){outline:2px solid var(--cyan);outline-offset:5px}
.song-card[data-selected=true] .cover-type small{padding-right:48px}
#favourite-song{position:absolute;right:8px;bottom:8px;z-index:4;display:grid;place-items:center;width:44px;height:44px;min-width:44px;min-height:44px;margin:0;padding:10px;border:0;border-radius:6px;background:transparent;color:#e2eaf4;line-height:1;box-shadow:none;transition:color .16s}
#favourite-song .favourite-icon{display:block;width:24px;height:24px;fill:transparent;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;pointer-events:none;filter:drop-shadow(0 1px 2px #000c);transition:fill .16s}
#favourite-song:hover:not(:disabled){color:#fff}
#favourite-song[aria-pressed=true],#favourite-song[aria-pressed=true]:hover:not(:disabled){color:#b9dad2}
#favourite-song[aria-pressed=true] .favourite-icon{fill:currentColor}
#favourite-song:focus-visible{outline:2px solid #baffef;outline-offset:-3px;background:#07142380}
.favourite-status{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

/* A small, finite chrome sweep confirms a favourite without covering its art. */
.favourite-ceremony{position:absolute;inset:0;z-index:2;border-radius:inherit;overflow:hidden;pointer-events:none}
.favourite-ceremony *{pointer-events:none}
.favourite-sweep{position:absolute;inset:-40% -75%;background:linear-gradient(115deg,transparent 45%,#d0ece70a 49%,#e5fff13b 50%,transparent 53%);transform:translateX(-35%);opacity:0}
.favourite-caption{position:absolute;bottom:16px;left:16px;right:52px;color:#d3e5e4;text-align:left;font-size:.56rem;font-weight:550;line-height:1.6;letter-spacing:.16em;background:#061116d9;border-left:1px solid #9ec7be;padding:9px 10px;opacity:0}
.song-card[data-favourite-celebration=true] .favourite-sweep{animation:favourite-sweep 1500ms ease-in-out both}
.song-card[data-favourite-celebration=true] .favourite-caption{animation:favourite-caption 1500ms ease-out both}
@keyframes favourite-sweep{0%{opacity:0;transform:translateX(-35%)}30%{opacity:.7}75%,100%{opacity:0;transform:translateX(40%)}}
@keyframes favourite-caption{0%{opacity:0;transform:translateY(3px)}22%,76%{opacity:1;transform:none}100%{opacity:0;transform:none}}
.favourite-ceremony[data-reduced=true] .favourite-sweep{display:none;animation:none}
.favourite-ceremony[data-reduced=true] .favourite-caption{animation:none;opacity:1;transform:none}
@media(prefers-reduced-motion:reduce){.favourite-sweep{display:none!important;animation:none!important}.favourite-caption{animation:none!important;opacity:1;transform:none}}
body[data-phase=catalogue] .control-hints{font-size:.68rem;line-height:1.4;margin-top:5px}
.browse-navigation-hint{display:flex;justify-content:center;gap:18px;align-items:center;flex-wrap:wrap}
body[data-phase=catalogue] .browse-navigation-hint{margin:0;padding-top:4px}
body[data-phase=catalogue] .browse-navigation-hint span{margin:0;white-space:nowrap}
body[data-phase=catalogue] .browse-navigation-hint kbd{padding:0 4px}
#collection-empty{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;gap:10px;padding:12px 56px}
#collection-empty>span{color:var(--cyan);font-size:2.5rem}
#collection-empty h2{font-size:clamp(1.15rem,2vw,1.8rem)}
#collection-empty p{max-width:420px;color:var(--muted);font-size:.85rem;line-height:1.4;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}
#song-selection[data-empty=true] .song-choice{display:none}
body[data-phase=catalogue] .gesture-main{flex-shrink:0;max-width:min(720px,calc(100% - var(--browse-inset-left) - var(--browse-inset-right)));font-size:.75rem;margin:0 0 8px;padding:6px 10px}
body[data-phase=catalogue] .browse-panel{width:min(430px,calc(100vw - var(--browse-inset-left) - var(--browse-inset-right)));max-height:calc(100dvh - 110px);overscroll-behavior:contain}
@media(max-width:650px){
  body[data-phase=catalogue] .player-header{height:calc(60px + env(safe-area-inset-top,0px))}
  body[data-phase=catalogue] #song-selection{padding-block:8px 12px;gap:5px}
  body[data-phase=catalogue] .collection-switcher{gap:8px}
  /* Preserve the existing small-screen cover fit and readable fallback initials. */
  body[data-phase=catalogue] .song-card{width:min(calc(100cqh - 22px),64vw,370px)}
  body[data-phase=catalogue] .cover-type strong{font-size:clamp(2rem,26cqh,7rem)}
  body[data-phase=catalogue] .selection-actions{gap:7px}

  body[data-phase=catalogue] .selection-actions .button{padding:10px 14px;font-size:.9rem;gap:7px}
  body[data-phase=catalogue] .selection-actions .button span{display:none}
  .browse-navigation-hint{gap:12px}
  body[data-phase=catalogue] .browse-panel{max-height:calc(100dvh - 92px)}
}
@media(max-height:700px){
  body[data-phase=catalogue] .selection-title>span{display:none}
  body[data-phase=catalogue] .selection-title h1{font-size:1.3rem}
  body[data-phase=catalogue] .player-header{height:calc(56px + env(safe-area-inset-top,0px))}
}
@media(max-height:500px) and (min-width:650px){
  body[data-phase=catalogue] #song-selection{grid-template-columns:minmax(0,1fr) minmax(280px,.9fr);grid-template-rows:auto minmax(0,1fr) auto;column-gap:20px;padding-block:6px}
  body[data-phase=catalogue] .selection-title{display:none}
  .collection-switcher{grid-column:1/-1}
  body[data-phase=catalogue] .song-carousel{grid-column:1;grid-row:2}
  .song-details{grid-column:2;grid-row:2}
  body[data-phase=catalogue] .browse-navigation-hint{grid-column:1/-1;grid-row:3}
  body[data-phase=catalogue] .song-card{width:min(calc(100cqh - 16px),32vw)}
  body[data-phase=catalogue] .selection-actions{gap:7px}
  body[data-phase=catalogue] .selection-actions .button{font-size:.85rem;padding-inline:12px;gap:6px}

  body[data-phase=catalogue] .cover-type strong{font-size:clamp(2rem,22cqh,4.5rem)}
  body[data-phase=catalogue] .cover-type span{font-size:clamp(.75rem,5cqh,1rem)}
  body[data-phase=catalogue] .cover-tag{font-size:.5rem;padding:4px}
}

/* Menu-only presentation tokens. The performance stage is a sibling of this
   shell: player colours, pitch feedback and scoring never inherit a season. */
#player-shell[data-theme]{
  --ink:var(--menu-background);--cream:var(--menu-text);--muted:var(--menu-muted);
  --cyan:var(--menu-accent);--pink:var(--menu-secondary);--edge:var(--menu-border);
  color:var(--menu-text);
}
#player-shell[data-theme] .browse-panel{background:var(--menu-surface);border-color:var(--menu-border)}
#player-shell[data-theme] .browse-panel button{background:var(--menu-surface-raised)}
/* Theme the idle ring without overriding recognised-hand state feedback. */
:where(#player-shell[data-theme]) .song-card[data-selected=true]{box-shadow:0 0 0 5px color-mix(in srgb,var(--menu-accent) 9%,transparent),0 16px 45px #0009}
#player-shell[data-theme] #selected-artist-link{border-bottom-color:color-mix(in srgb,var(--menu-accent) 27%,transparent)}
#player-shell[data-theme] #selected-artist-link:hover{border-bottom-color:var(--menu-accent)}
#player-shell[data-theme] :is(.player-brand,.player-edition,.collection-picker,.song-card,#selected-artist-link){transition:color .45s,border-color .45s}
#player-shell[data-theme]:not([data-theme=classic]) #browse-backdrop{background:radial-gradient(ellipse at 15% 25%,var(--menu-glow),transparent 60%),radial-gradient(ellipse at 88% 76%,color-mix(in srgb,var(--menu-accent) 15%,transparent),transparent 55%),var(--menu-background)}
#player-shell[data-theme]:not([data-theme=classic]) .browse-backdrop-shade{background:radial-gradient(ellipse at 50% 45%,color-mix(in srgb,var(--menu-background) 66%,transparent),transparent 75%),linear-gradient(color-mix(in srgb,var(--menu-background) 40%,transparent),transparent 30%,color-mix(in srgb,var(--menu-background) 40%,transparent))}
#player-shell[data-theme]:not([data-theme=classic]) .player-header{background:color-mix(in srgb,var(--menu-background) 40%,transparent)}
#player-shell[data-theme]:not([data-theme=classic]) :is(input,select){background:var(--menu-surface);border-color:var(--menu-border);color:var(--menu-text)}
#player-shell[data-theme]:not([data-theme=classic]) .button-cream{color:var(--menu-background)}
#menu-event-collection{background:none;border:0;padding:6px 0;min-height:44px;min-width:44px;max-width:260px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-align:left;color:var(--cyan);font-size:.8rem}
#menu-event-collection:hover{text-decoration:underline;text-underline-offset:4px}
@media(max-width:650px){#menu-event-collection{max-width:110px;flex:1;font-size:.7rem}body:has(#menu-event-collection:not([hidden])) .player-header{gap:8px}body:has(#menu-event-collection:not([hidden])) .player-brand{font-size:1.65rem}}

#browse-backdrop[data-scene="winter-wonderland"] #browse-party { opacity:1; }
#browse-backdrop[data-scene="winter-wonderland"] .browse-backdrop-shade { background:radial-gradient(ellipse at 50% 45%,#101d2a99,transparent 78%),linear-gradient(#17283755,transparent 30%,#09152577); }

/* Ambient optics and satin balloons remain visible with no music playing. */
#browse-backdrop:is([data-scene="birthday"],[data-scene="spectral-flares"],[data-scene="anamorphic-flares"]) #browse-party{opacity:1}
#browse-backdrop:is([data-scene="birthday"],[data-scene="spectral-flares"],[data-scene="anamorphic-flares"]) .browse-backdrop-shade{background:radial-gradient(ellipse at 50% 52%,#06091455,transparent 64%),linear-gradient(#06091433,transparent 28%,#06091430)}

/* One music switch, visible in the header; the audio controller owns its state. */
#menu-music-toggle.header-music{display:inline-flex;align-items:center;justify-content:center;gap:9px;flex:none;min-width:44px;min-height:44px;padding:10px 13px;border:1px solid #879ba448;border-radius:9px;background:#0c1524a8;color:#a5b4c7;font:inherit;font-size:.8rem;cursor:pointer;transition:color .25s,border-color .25s,box-shadow .3s,background .3s}
#menu-music-toggle svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round}
#menu-music-switch-state{font-size:.59rem;letter-spacing:.1em;text-transform:uppercase;border-left:1px solid currentColor;padding-left:9px;opacity:.8}
#menu-music-toggle[aria-pressed=true]{color:#b9fff1;border-color:#86edda99;background:#153433cc;box-shadow:0 0 18px #64ead626,inset 0 0 16px #64ead616}
#menu-music-toggle[aria-pressed=true] svg{filter:drop-shadow(0 0 4px #86edda70)}
#menu-music-toggle:hover{border-color:#d1efe5;color:#e3fff8}
#menu-music-toggle:focus-visible{outline:2px solid #e3fff8;outline-offset:4px}
#menu-music-toggle+#browse-settings{margin-left:0}
html[data-room-view=true] #menu-music-toggle{font-size:clamp(16px,1.8vh,28px);padding:12px 18px;gap:12px}
html[data-room-view=true] #menu-music-toggle svg{width:1.2em;height:1.2em}
html[data-room-view=true] #menu-music-switch-state{font-size:.65em}
@media(max-width:700px){#menu-music-toggle .header-music-label,#menu-music-switch-state{display:none}#menu-music-toggle.header-music{padding:10px;gap:0}html[data-room-view=true] #menu-music-toggle{font-size:16px;padding:10px}}
@media(max-width:520px){body[data-phase=catalogue] .player-header{flex-wrap:wrap;height:auto;min-height:72px;padding-block:8px;row-gap:8px}.player-header #browse-settings{margin-left:auto}}
@media(prefers-reduced-motion:reduce){#menu-music-toggle.header-music{transition:none}}

/* Grab gestures stay on the carousel; page scrolling and native controls elsewhere stay native. */
body[data-phase=catalogue] .song-carousel, .song-card-play{cursor:grab}
.song-carousel img,.song-card-play{-webkit-user-drag:none;user-select:none;-webkit-user-select:none}
.carousel-grabbing,.carousel-grabbing .song-card-play{cursor:grabbing!important}
.collection-switcher{touch-action:pinch-zoom}
#song-selection .collection-grip{width:24px;min-width:24px;cursor:grab;font-size:1.2rem;color:#8da5b2}

#body-ghost{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
#body-camera-dock{position:fixed;right:16px;bottom:16px;width:clamp(160px,16vw,240px);z-index:40;border:1px solid #92b5c44d;border-radius:12px;background:#09131fec;box-shadow:0 10px 36px #0005;overflow:hidden;color:#d0e5eb}
.body-dock-heading{display:flex;align-items:center;justify-content:space-between;padding:8px 10px;font-size:9px;letter-spacing:.15em}
.body-dock-heading button,#body-retry{font:inherit;letter-spacing:normal;background:transparent;border:1px solid #9bbbb450;border-radius:5px;color:#e5f5f0;padding:5px 8px;min-height:30px}
#body-camera-dock #gesture-preview{border:0;border-radius:0;background:#030812}
#body-camera-dock #gesture-camera{height:clamp(115px,12vw,180px);max-height:none}
#body-camera-status{font-size:11px;line-height:1.45;padding:8px 10px;min-height:44px;margin:0}
#body-retry{margin:0 10px 10px}
body:not([data-phase=catalogue]):not([data-phase=results]) #body-camera-dock{display:none}
#player-shell[data-gesture-direction=left]:is([data-gesture-state=swiping],[data-gesture-state=confirmed]) #previous-song,#player-shell[data-gesture-direction=right]:is([data-gesture-state=swiping],[data-gesture-state=confirmed]) #next-song{color:#d1fff1;background:#14444488;box-shadow:0 0 18px #67dcc733}
@media(max-width:650px){#body-camera-dock{width:145px;bottom:66px;right:8px}.body-dock-heading{letter-spacing:.06em;font-size:8px}#body-camera-status{font-size:10px}#body-camera-dock #gesture-camera{height:105px}}

.carousel-row-preview { position:absolute; inset:0; pointer-events:none; contain:layout style; }
.carousel-row-preview .song-card { transition:none; }
.carousel-row-preview .song-card-play { display:block; }
.carousel-row-name { position:absolute; top:12px; left:50%; transform:translateX(-50%); font-size:12px; letter-spacing:.16em; color:#c8e7ef; text-transform:uppercase; white-space:nowrap; }
.carousel-row-empty { position:absolute; inset:40% 0; text-align:center; color:#9eb4bf; }


/* The wet pane carries its own optical depth; preserve that detail in menus. */
#browse-backdrop[data-scene="rain-window"] #browse-party{opacity:1}
#browse-backdrop[data-scene="rain-window"] .browse-backdrop-shade{background:linear-gradient(#06091444,transparent 24%,#06091455)}

/* Small deck: vertical fader, tactile cap, lit scale and numerical level. */
/* A digital level well: volume fills the button from the bottom. */
.header-music-deck{--level:30%;position:relative;isolation:isolate;display:inline-flex;align-items:center;gap:0;flex:none;padding:3px;border:0;border-radius:11px;background:#0b1822;overflow:hidden}
.header-music-deck::before{content:"";position:absolute;z-index:-1;inset:0;background:linear-gradient(to top,#54d7b96b,#63e5d638);clip-path:inset(calc(100% - var(--level)) 0 0);opacity:0;transition:clip-path .12s ease-out,opacity .2s}
.header-music-deck[data-enabled=true]::before{opacity:1}
.header-music-deck[data-enabled=true]{box-shadow:0 0 18px #64ead61b}
.header-music-deck #menu-music-toggle{border:0;background:transparent;box-shadow:none;min-height:44px;padding:8px 10px;display:grid;grid-template-columns:21px auto;gap:2px 7px}
.header-music-deck #menu-music-toggle svg{grid-row:1/3}
.header-music-deck #menu-music-switch-state{border:0;padding:0;text-align:left;font-size:.55rem;letter-spacing:.16em}
.header-menu-fader{display:flex;align-items:center;padding:0 4px;height:48px;border:0}
.header-menu-fader[hidden],#header-menu-level{display:none}
#header-menu-volume{writing-mode:vertical-lr;direction:rtl;appearance:none;-webkit-appearance:none;width:24px;height:42px;margin:0;cursor:ns-resize;background:transparent;touch-action:none;border:0!important;border-radius:0;padding:0;box-shadow:none}
#header-menu-volume::-webkit-slider-runnable-track{width:22px;background:transparent;border:0;box-shadow:none}
#header-menu-volume::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:22px;height:3px;border:0;border-radius:1px;background:#d1fff1;box-shadow:0 0 7px #b0ffee66}
#header-menu-volume::-moz-range-track{width:22px;background:transparent;border:0}
#header-menu-volume::-moz-range-progress{background:transparent}
#header-menu-volume::-moz-range-thumb{width:22px;height:3px;border:0;border-radius:1px;background:#d1fff1;box-shadow:0 0 7px #b0ffee66}
#header-menu-volume:focus-visible{outline:2px solid #d5fff1;outline-offset:2px}
.header-music-deck+#browse-settings{margin-left:0}
html[data-room-view=true] .header-menu-fader{height:58px}html[data-room-view=true] #header-menu-volume{height:52px}
@media(max-width:700px){.header-music-deck #menu-music-toggle{display:flex;padding:8px}.header-menu-fader{padding:0 3px}}
@media(prefers-reduced-motion:reduce){.header-music-deck::before{transition:none}}

@media(max-height:500px) and (min-width:650px){
  body[data-phase=catalogue] #song-selection:has(#song-readability[hidden]):has(#practice-panel[hidden]){grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto auto}
  #song-selection:has(#song-readability[hidden]):has(#practice-panel[hidden]) .song-details{grid-column:1;grid-row:3}
  body[data-phase=catalogue] #song-selection:has(#song-readability[hidden]):has(#practice-panel[hidden]) .browse-navigation-hint{grid-column:1;grid-row:4}
}

/* Results are one screen. The long measurements and credits live in a
   separate dialog, so neither player count nor a saved take adds page height. */
body[data-phase=results]{height:100dvh;overflow:hidden}
body[data-phase=results] #player-shell{height:100dvh;min-height:0;padding-bottom:env(safe-area-inset-bottom,0px)}
body[data-phase=results] .player-header{height:calc(clamp(56px,8dvh,86px) + env(safe-area-inset-top,0px));padding-top:env(safe-area-inset-top,0px)}
body[data-phase=results] .player-footer{display:none}
body[data-phase=results] #player-results{min-height:0;gap:clamp(4px,1dvh,12px);padding:clamp(8px,1.5dvh,18px) 0}
.results-heading{flex:none;min-width:0;max-width:100%}
body[data-phase=results] #results-title{font-size:clamp(24px,4dvh,52px);line-height:1.1}
body[data-phase=results] #results-song{font-size:clamp(14px,2dvh,24px);line-height:1.25;margin-top:5px;overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
body[data-phase=results] #result-scores{flex:1 1 0;min-height:0;max-height:440px;max-width:1000px;display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:clamp(8px,2vw,24px);container-type:size}
body[data-phase=results] .result-score{width:100%;max-width:480px;justify-self:center;display:flex;flex-direction:column;justify-content:center;gap:clamp(3px,2cqh,10px);padding:clamp(8px,5cqh,28px);min-height:0}
body[data-phase=results] .result-score h2{font-size:clamp(12px,6cqh,24px);line-height:1.1;letter-spacing:.07em;font-weight:650}
body[data-phase=results] .result-score strong{font-size:clamp(26px,min(25cqh,calc(145cqw / var(--score-digits,5))),114px);line-height:1;letter-spacing:-.065em}
body[data-phase=results] .result-score>p{font-size:clamp(11px,4cqh,16px);line-height:1.3;color:var(--muted)}
body[data-phase=results] .result-score dl{font-size:clamp(11px,5cqh,20px);line-height:1.3;gap:clamp(3px,2cqh,10px) 10px;margin:clamp(3px,2cqh,10px) 0 0}
body[data-phase=results] .result-combo-summary{display:flex;flex-wrap:wrap;align-items:baseline;gap:3px 12px;font-size:clamp(10px,3cqh,13px);line-height:1.4;color:#d4dfed;font-variant-numeric:tabular-nums}
body[data-phase=results] .result-combo-summary span:first-child{color:#ffe29b;font-weight:650}
body[data-phase=results] .result-combo-summary span{max-width:100%;overflow-wrap:anywhere}
body[data-phase=results] .result-actions{flex:none;margin:4px 0;gap:clamp(10px,2vw,22px);flex-wrap:nowrap}
body[data-phase=results] .result-actions button{min-height:44px;padding:10px clamp(10px,2vw,26px);font-size:clamp(14px,2.2dvh,26px);gap:8px;white-space:nowrap}
.result-tools{display:flex;align-items:center;justify-content:center;gap:20px;flex:none}
.result-tools button{border:0;background:transparent;color:var(--muted);padding:8px 10px;min-height:36px;font-size:clamp(13px,1.8dvh,20px)}
.result-tools button:hover{color:var(--cream)}
body[data-phase=results] .gesture-main{flex:none;margin-bottom:6px;padding-block:5px}
.result-details{width:min(860px,94vw);max-height:90dvh;padding:0;border:1px solid var(--edge);border-radius:16px;background:#101b2b;color:var(--cream)}
.result-details[open]{display:flex;flex-direction:column}
.result-details::backdrop{background:#030910cc;backdrop-filter:blur(7px)}
.result-details>header{display:flex;flex:none;align-items:center;justify-content:space-between;gap:16px;padding:18px 24px;border-bottom:1px solid var(--edge)}
.result-details h2{font-size:clamp(18px,2.5vh,30px)}
#result-details-close{min-height:44px;padding:9px 18px;border:0;background:#d4e9e3;color:#0e2026;font-weight:650}
.result-details-body{padding:20px 24px;overflow:auto;overscroll-behavior:contain;min-height:0}
.result-detail-score+article{margin-top:28px}.result-detail-score dl{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px 20px}.result-detail-score dt{color:var(--muted)}.result-detail-score dd{margin:0;font-variant-numeric:tabular-nums}.result-detail-hint{font-size:.875rem;color:var(--muted);line-height:1.6}.result-detail-score small:empty{display:none}
.result-details #results-note{margin-top:24px;font-size:.875rem}.result-details #results-credits{margin-bottom:0}
@media(max-width:500px){body[data-phase=results] #player-shell{padding-inline:12px}body[data-phase=results] .result-score dl{grid-template-columns:1fr;gap:2px}body[data-phase=results] .result-score dd{margin-bottom:3px}body[data-phase=results] .result-actions{max-width:100%;flex-wrap:wrap}body[data-phase=results] .result-actions button{font-size:14px;padding-inline:10px}}
@media(max-height:550px){body[data-phase=results] .player-header{height:48px}body[data-phase=results] .player-edition{display:none}body[data-phase=results] .results-heading{display:flex;align-items:baseline;gap:12px}body[data-phase=results] #results-song{margin:0;-webkit-line-clamp:1}body[data-phase=results] .result-tools button{padding-block:4px;min-height:30px}}

/* The lobby mic matches the music deck; the rising light is live input,
   not the monitor gain. The native toggle stays clickable while connecting. */
.header-audio-controls{display:flex;align-items:center;gap:8px;flex:none}
.header-mic{--mic-level:0%;position:relative;isolation:isolate;overflow:hidden;display:grid;grid-template-columns:21px auto;gap:2px 7px;align-items:center;min-height:50px;min-width:78px;padding:8px 12px;border:0;border-radius:11px;background:#0b1822;color:#a5b4c7;font-size:.8rem;line-height:1.1}
.header-mic::before{content:"";position:absolute;z-index:-1;inset:0;background:linear-gradient(to top,#55ddbd88,#79eed951);clip-path:inset(calc(100% - var(--mic-level)) 0 0);opacity:0}
.header-mic[data-state=on]{color:#d5fff1;box-shadow:0 0 18px #64ead622}
.header-mic:is([data-state=on],[data-state=muted])::before{opacity:1}
.header-mic[data-clipping=true]::before{background:linear-gradient(to top,#dc856480,#ecbf7055)}
.header-mic[data-state=error]{color:#ffbd99}.header-mic[data-state=ready]{color:#c0ddd8}
.header-mic svg{grid-row:1/3;display:block;width:21px;height:24px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
.header-mic [data-mic-state]{font-size:.55rem;letter-spacing:.1em;text-align:left}
.header-audio-controls+#browse-settings{margin-left:0}
html[data-room-view=true] .header-mic{min-height:64px;font-size:clamp(16px,1.8vh,25px);padding-inline:14px}
html[data-room-view=true] .header-mic [data-mic-state]{font-size:clamp(9px,1vh,14px)}
@media(max-width:700px){.header-audio-controls{gap:5px}.header-mic{min-width:44px;min-height:50px;padding:8px}.header-mic-label{display:none}.header-mic svg{grid-row:1}.header-mic{grid-template-columns:1fr;justify-items:center}.header-mic [data-mic-state]{font-size:8px}html[data-room-view=true] .header-mic{min-height:50px;padding-inline:8px}}

#lobby-mic-two-toggle::before{background:linear-gradient(to top,#c6a56888,#edcf9651)}#lobby-mic-two-toggle[data-state=on]{color:#f9dfac;box-shadow:0 0 18px #eac48622}#lobby-mic-two-toggle[hidden]{display:none!important}

body[data-phase=results] .result-score .result-total{font-variant-numeric:tabular-nums;color:var(--cyan)}
body[data-phase=results] .result-score[data-player="2"] .result-total{color:#ff80dd}
body[data-phase=results] .result-score .result-practice{color:var(--cream);font-weight:650}

body[data-phase=results] .result-score{container-type:inline-size}

/* The completed take stays still behind a small, readable glass score. */
#player-results{position:relative;isolation:isolate}
#player-results>.results-artwork{position:absolute;inset:0;width:100%;height:100%;z-index:-1;pointer-events:none;border-radius:24px;opacity:.82}
body[data-phase=results] #player-results[data-artwork=true] .result-score{background:#0a1726b8;border-color:#d1e5ea3a;box-shadow:0 18px 50px #0003;backdrop-filter:blur(15px);-webkit-backdrop-filter:blur(15px)}
body[data-phase=results] #player-results[data-artwork=true] .results-heading{padding:7px 20px;border-radius:18px;background:#09121f9e;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
.result-chart-actions{display:flex;flex:none;flex-wrap:wrap;justify-content:center;align-items:center;gap:5px 16px;max-width:100%;font-size:clamp(12px,1.6dvh,16px)}
.result-chart-actions button{background:#101e2cc9;border:1px solid #c2d4dd4a;border-radius:30px;padding:8px 16px;min-height:38px;color:var(--cream)}
.result-chart-actions button:hover{border-color:#c9e4dd;background:#173040}
#result-chart-status{color:var(--muted);font-size:.8em;line-height:1.3;max-width:400px}
.result-artwork{width:min(1240px,96vw);height:94dvh;max-height:94dvh;padding:0;border:1px solid #bfd9e24d;border-radius:22px;background:#09121f;color:var(--cream)}
.result-artwork[open]{display:flex;flex-direction:column}
.result-artwork::backdrop{background:#030711dc;backdrop-filter:blur(12px)}
.result-artwork>header{display:flex;flex:none;justify-content:space-between;align-items:center;gap:16px;padding:20px 26px;border-bottom:1px solid #bfd9e224}
.result-artwork>header>div:last-child{display:flex;gap:10px;align-items:center}
.result-artwork h2{margin:4px 0 0;font-size:clamp(18px,3vw,30px);letter-spacing:-.035em}
.result-artwork button{min-height:42px;padding:10px 17px;border:1px solid #bfd9e24d;border-radius:24px;background:#162737;color:var(--cream)}
#result-artwork-close{background:#f1eddf;color:#152536;border-color:transparent}
#result-artwork-status{flex:none;margin:0;padding:12px 26px;color:var(--muted);font-size:13px;line-height:1.5}
.result-artwork-scroll{overflow:auto;min-height:0;overscroll-behavior:contain;padding:0 22px 22px}
#result-artwork-canvas{display:block;width:100%;height:auto;border-radius:8px}
@media(max-width:600px){.result-artwork>header{padding:15px;gap:10px}.result-artwork>header>div:last-child{gap:5px}.result-artwork .section-label{font-size:9px}.result-artwork button{padding:8px 11px;font-size:12px}.result-artwork-scroll{padding:0 8px 10px}#result-artwork-status{padding:10px 15px;font-size:12px}.result-chart-actions{gap:4px 8px}.result-chart-actions button{padding:6px 12px;min-height:34px}}
@media(max-height:600px){.result-chart-actions button{padding-block:5px;min-height:30px}.result-chart-actions{font-size:12px}#result-chart-status{max-width:270px}}
@media(max-width:700px){
  /* These controls cannot fit the desktop's single results-header row. */
  body[data-phase=results] .player-header{height:auto;min-height:62px;flex-wrap:wrap;padding-block:8px;row-gap:6px;column-gap:8px}
  body[data-phase=results] .player-header #browse-settings{margin-left:auto}
  body[data-phase=results] #player-results[data-artwork=true]{justify-content:flex-start;gap:6px}
  body[data-phase=results] #player-results[data-artwork=true]>.results-artwork{position:relative;inset:auto;order:1;z-index:0;flex:0 0 clamp(72px,13dvh,110px);height:clamp(72px,13dvh,110px);width:100%;opacity:1;border-radius:12px}
  body[data-phase=results] #player-results[data-artwork=true]>.results-heading{order:0;padding:5px 12px}
  body[data-phase=results] #player-results[data-artwork=true]>#result-scores{order:2}
  body[data-phase=results] #player-results[data-artwork=true]>#practice-result{order:3}
  body[data-phase=results] #player-results[data-artwork=true]>.result-actions{order:4}
  body[data-phase=results] #player-results[data-artwork=true]>.result-chart-actions{order:5}
  body[data-phase=results] #player-results[data-artwork=true]>.result-tools{order:6}
  body[data-phase=results] #results-title{font-size:clamp(22px,3.6dvh,32px)}
  body[data-phase=results] .result-score dl{grid-template-columns:minmax(0,1fr) auto;gap:6px 8px;font-size:clamp(11px,1.8dvh,15px)}
  body[data-phase=results] .result-score dd{margin-bottom:0;text-align:right}
}
@media(max-width:520px){
  body[data-phase=results] .player-header{display:grid;grid-template-columns:minmax(0,1fr) auto}
  body[data-phase=results] .player-header .player-brand{grid-column:1;grid-row:1}
  body[data-phase=results] .player-header #open-rewards{grid-column:2;grid-row:1}
  body[data-phase=results] .player-header .header-audio-controls{grid-column:1;grid-row:2;justify-self:start}
  body[data-phase=results] .player-header #browse-settings{grid-column:2;grid-row:2}
  body[data-phase=results] .player-header #menu-event-collection:not([hidden]){grid-column:1/-1;grid-row:3;max-width:100%}
}

body[data-phase=results] .result-score .result-ratio{position:relative;min-width:6.5em;text-align:right;isolation:isolate;padding-left:4em}
.result-score .result-ratio::before,.result-score .result-ratio::after{content:"";position:absolute;left:0;top:calc(50% - 2px);height:4px;width:3.2em;border-radius:2px;background:#b1d3d128}
.result-score .result-ratio::after{width:3.2em;transform:scaleX(var(--ratio-scale,0));transform-origin:left;background:#a7ddd0}
body[data-phase=results] .result-score[data-player="2"] .result-ratio::after{background:#e2b4d5}
@media(max-width:500px){body[data-phase=results] .result-score .result-ratio{min-width:0;padding-left:0;text-align:left}.result-score .result-ratio::before,.result-score .result-ratio::after{display:none}}

/* Keep the two mic identities visible even on a compact header. */
@media(max-width:700px){.header-mic .header-mic-label{display:block;font-size:11px;white-space:nowrap}.header-mic svg{display:none}.header-mic{gap:3px;min-width:48px}.header-mic [data-mic-state]{text-align:center}}

/* Header-anchored disclosure: a stable button hit box in fullscreen and a
   viewport-bounded panel even when the audio controls wrap onto another row. */
.player-header{position:relative;z-index:100}
#browse-settings{position:static;flex:none}
#browse-settings>.browse-settings-toggle{display:flex;align-items:center;justify-content:center;position:relative;min-height:50px;background:transparent;color:inherit;white-space:nowrap}
body:is([data-phase=catalogue],[data-phase=results]) #browse-settings>.browse-panel{top:calc(100% + 8px);right:0;width:min(520px,100%);overscroll-behavior:contain}
@media(min-width:701px) and (max-width:1000px){.player-header{gap:12px}.player-edition{display:none}.player-header .header-audio-controls{gap:5px}#browse-settings>.browse-settings-toggle{padding-inline:12px;font-size:15px}}

/* Fullscreen shares the normal edge-to-edge header. Device safe-area padding
   belongs inside the header, never in an extra gap above the whole shell. */

/* Electric midnight carries its own quiet pocket behind the song tiles. */
#browse-backdrop[data-scene="electric-midnight"] #browse-party { opacity:1; }
#player-shell #browse-backdrop[data-scene="electric-midnight"] .browse-backdrop-shade { background:linear-gradient(#06091438,transparent 27%,transparent 72%,#06091450); }

/* Optional local vocal take: concise consent in the songbook and a visible stage stop. */
.record-take-choice{display:inline-flex;align-items:center;gap:8px;padding:9px 13px;border:1px solid #ffffff28;border-radius:999px;background:#0a1c2688;font-size:12px;cursor:pointer}
.record-take-choice input{accent-color:#ef9caa;width:15px;height:15px;margin:0}
.record-take-note{max-width:560px;margin:10px auto 0;color:#a9b8c9;font-size:11px;line-height:1.5;text-align:center}
.game-bottom .game-record-control{display:flex;flex:0 0 auto;align-items:center;gap:8px;min-width:0}
.game-bottom #game-record-take{inline-size:11em;white-space:nowrap;border-color:#ff879a50;color:#ffc1ca;background:#23131bcc;cursor:pointer}
.game-bottom #game-record-take[aria-pressed=true]{color:#ffd6dc;border-color:#ff879a99}
.game-bottom #game-record-take[data-recording=true]{background:#58222fcc;border-color:#ff8195}
.game-bottom #game-record-take:focus-visible{outline:2px solid #b2e3ee;outline-offset:3px}
.game-bottom:has(.game-record-control){position:relative;isolation:isolate}
.game-bottom[data-recording=true]::before{content:"";position:absolute;inset:2px 4px;border:1px solid #ff758b;border-radius:7px;box-shadow:inset 0 0 16px #ee395326,0 0 10px #ee395333;pointer-events:none;opacity:.85;animation:game-record-pulse 2.2s ease-in-out infinite}
@keyframes game-record-pulse{0%,100%{opacity:.4}50%{opacity:1}}
#game-record-status:not(.game-record-error){position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
#game-record-status.game-record-error{display:block;margin-top:7px;color:#ffc1ca;font-size:11px;line-height:1.4}
@media(max-width:899px){.game-bottom:has(.game-record-control) .game-transport{flex-wrap:wrap}.game-bottom:has(.game-record-control) .game-seek-wrap{flex-basis:180px}}
@media(max-width:560px){.game-bottom:has(.game-record-control) .game-seek-wrap{flex-basis:100%}.game-bottom .game-record-control{gap:7px}}
@media(max-width:480px){.record-take-note{max-width:290px}}
@media(prefers-reduced-motion:reduce){.game-bottom[data-recording=true]::before{animation:none;opacity:.85}}
