/* A single little theatre: the instruments sit in the same world as Glee. */
body[data-theme=sound]{background:radial-gradient(ellipse at 50% -20%,#e9dbff 0,transparent 58%),#fff7e7}
.sound-game{--purple:#58347e;--coral:#ed7765;--gold:#f2ca62;--teal:#71dcd2;max-width:1050px;margin:auto;color:#fff}
.sound-game [hidden]{display:none!important}
.sound-stage{position:relative;isolation:isolate;overflow:hidden;background:linear-gradient(#36214f,#65428a 52%,#74519a 78%,#513564);border-radius:32px;padding:22px 34px 18px;box-shadow:0 13px 35px #38244325;border:1px solid #ffffff91}
.sound-scenery{position:absolute;inset:0;z-index:-1;overflow:hidden;pointer-events:none}
.sound-spotlight{position:absolute;top:-65px;width:36%;height:80%;background:linear-gradient(#ffebb147,#fff5da08);clip-path:polygon(47% 0,57% 0,100% 100%,0 100%);transform-origin:50% 0;transition:opacity .15s}
.sound-spotlight.left{left:4%;transform:rotate(-15deg)}.sound-spotlight.right{right:4%;transform:rotate(15deg)}
.sound-curtain{position:absolute;top:0;width:12%;height:69%;background:repeating-linear-gradient(90deg,#2f173c,#503059 21%,#341942 43%);box-shadow:0 6px 16px #230e3933;border-bottom:8px solid #e3a556;border-radius:0 0 50% 45%}
.sound-curtain.left{left:-6%}.sound-curtain.right{right:-6%}
.sound-back-wall{position:absolute;left:12%;right:12%;top:12%;height:46%;border-radius:50% 50% 12% 12%;border:3px solid #b49ad035;box-shadow:0 0 0 10px #3a204632,inset 0 0 50px #c7abec15}
.sound-stage-top{display:flex;align-items:center;justify-content:space-between;min-height:166px;gap:12px;max-width:760px;margin:auto}
.sound-stage-copy{position:relative;z-index:2;max-width:65%}
.sound-stage .round-label{display:inline-block;color:#ffe4a4;background:#2715386b;border-radius:15px;padding:4px 12px;font-size:.85rem;font-weight:800}
.sound-stage h2{color:#fff4dc;font-size:clamp(1.5rem,2.8vw,2rem);line-height:1.06;margin:9px 0 6px;max-width:16ch;text-wrap:balance}
.sound-stage-copy p{font-size:.94rem;line-height:1.25;color:#eadff8;max-width:32ch}
.sound-glee-wrap{position:relative;align-self:stretch;display:flex;align-items:flex-end;justify-content:center;min-width:145px;width:29%;transform-origin:50% 90%}
.sound-glee{position:relative;width:150px;height:155px;object-fit:contain;z-index:1;filter:drop-shadow(0 9px 6px #1d0b3a55)}
.sound-glee-plinth{position:absolute;bottom:0;width:150px;height:25px;border-radius:50%;background:linear-gradient(#a07ec7,#483366);box-shadow:0 5px 0 #39234e}
.sound-starburst{position:absolute;inset:7% 4%;border-radius:50%;background:radial-gradient(ellipse,#ffeac55c,transparent 69%);transition:background .15s}
.sound-pattern-wrap{position:relative;z-index:2;background:linear-gradient(#291a43d9,#332045eb);border:1px solid #d9c5f34f;border-radius:19px;max-width:760px;margin:10px auto 0;padding:10px 14px 12px;box-shadow:0 3px 0 #1b102457,0 1px 0 #fff2 inset}
.sound-pattern-label{display:flex;justify-content:space-between;color:#e4d6f0;font-size:.78rem;line-height:1.15;font-weight:700;margin:0 2px 8px}
.sound-pattern-label span:last-child{font-variant-numeric:tabular-nums;color:#ffe1a0}
.sound-pattern{display:flex;list-style:none;padding:0;margin:0;gap:9px;min-height:65px;justify-content:center}
.sound-beat{position:relative;flex:1;min-width:0;max-width:160px;background:linear-gradient(#654c7b80,#45335480);border:2px solid #d9c1ef33;border-radius:12px;text-align:center;padding:6px 2px;color:#ffb7a6;transition:background .12s,border-color .12s}
.sound-beat.gold{color:#ffda69}.sound-beat.teal{color:#83ebe0}
.sound-beat-icon{display:block;width:28px;height:28px;margin:auto}.sound-beat-icon svg{width:100%;height:100%}
.sound-beat-name{display:block;margin-top:3px;font-size:.65rem;line-height:1.1;font-weight:800;color:#fff3df}
.sound-beat-check{display:none;position:absolute;top:-5px;right:-5px;border-radius:50%;width:18px;height:18px;font:bold 12px/18px sans-serif;background:#9ae8cf;color:#13594d}
.sound-beat.is-matched{border-color:#94e9c9;background:#78d8c02b}.sound-beat.is-matched .sound-beat-check{display:block}
.sound-beat.is-next{border-color:#ffe9ae;border-style:dashed}.sound-beat.is-playing{background:#fbecc340;border-color:#fff4c9;box-shadow:0 0 14px #ffecbd3a}
.sound-actions{position:relative;z-index:3;min-height:49px;margin:16px auto 14px;display:flex;justify-content:center;align-items:center;gap:12px;max-width:760px}
.sound-actions button{font-family:inherit;font-weight:800;line-height:1.05;min-height:46px;cursor:pointer}
.sound-actions .primary{background:#ffe4a3;color:#4d285b;border:1px solid #fff1c8;border-bottom:4px solid #d5a761;border-radius:16px;box-shadow:0 3px 0 #311f46;padding:10px 22px;font-size:.95rem;display:flex;gap:7px;align-items:center;justify-content:center}
.sound-actions .primary:disabled{opacity:.68;cursor:default}
.sound-watch svg{width:18px;height:18px}
.sound-tempo{display:flex;padding:3px;gap:3px;background:#28173d80;border:1px solid #ffffff30;border-radius:15px}
.sound-tempo button{min-height:44px;background:transparent;border:0;padding:7px 13px;font-size:.79rem;border-radius:11px;color:#f0e5fc}
.sound-tempo button[aria-pressed=true]{background:#f7edff;color:#5d387d;box-shadow:0 2px 0 #1e142c3b}
.sound-actions .secondary{background:#b8ece0;color:#1b5750;border-bottom:4px solid #6cbeb1;box-shadow:0 3px 0 #311f46;font-size:.85rem;padding:9px 15px;border-radius:16px}
.sound-actions .secondary:disabled{opacity:.55;cursor:default}
.sound-instruments{position:relative;z-index:2;max-width:790px;margin:0 auto;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}
.sound-instrument{position:relative;isolation:isolate;overflow:visible;border:0;border-radius:25px;min-width:0;min-height:187px;padding:0 5px 10px;background:radial-gradient(ellipse at 50% 80%,#f8bda54d,transparent 65%);color:#ffdbc5;touch-action:manipulation;cursor:pointer;font:inherit;transition:background .13s}
.sound-instrument.gold{background:radial-gradient(ellipse at 50% 80%,#f8d8804f,transparent 65%);color:#ffe9a6}
.sound-instrument.teal{background:radial-gradient(ellipse at 50% 80%,#7ee3d84f,transparent 65%);color:#c2f9ee}
.sound-instrument:before{content:'';position:absolute;z-index:-1;bottom:21px;left:3%;right:3%;height:38px;border-radius:50%;background:linear-gradient(#b68151,#70452d);box-shadow:0 8px 0 #573626,0 11px 7px #24132655;border:1px solid #e6b36a6b}
.sound-object{display:block;width:100%;max-width:185px;height:160px;margin:auto;transform-origin:50% 80%;filter:drop-shadow(0 3px 4px #28142a44)}
.sound-object svg{width:100%;height:100%;overflow:visible}
.sound-name{position:relative;display:block;margin-top:1px;font-weight:800;font-size:1.05rem;line-height:1.1;text-shadow:0 1px 2px #321c44}
.sound-key{position:absolute;right:15%;top:0;width:20px;height:20px;border:1px solid #ffffff42;border-radius:5px;color:#e4d8f3;font-size:.7rem;line-height:19px;opacity:.6}
.sound-ripple{position:absolute;z-index:-1;left:12%;right:12%;bottom:31px;height:20px;border:3px solid currentColor;border-radius:50%;opacity:0;pointer-events:none}
.sound-instrument.is-lit{background:radial-gradient(ellipse at 50% 80%,#f8c6a58a,transparent 70%)}
.sound-instrument.is-lit.gold{background:radial-gradient(ellipse at 50% 80%,#ffe0898a,transparent 70%)}
.sound-instrument.is-lit.teal{background:radial-gradient(ellipse at 50% 80%,#9aece18a,transparent 70%)}
.sound-instrument.is-lit .sound-ripple{animation:sound-ring .4s ease-out}
.sound-instrument.coral.is-lit .sound-object{animation:sound-drum .3s ease-out}
.sound-instrument.gold.is-lit .sound-object{animation:sound-shake .28s ease-in-out}
.sound-instrument.teal.is-lit .sound-object svg .chime-bar{transform-box:fill-box;transform-origin:50% 0;animation:sound-chime .52s ease-out}
.sound-glee-wrap.is-dancing{animation:sound-dance .4s ease-in-out}
.sound-game[data-strike=coral] .sound-starburst{background:radial-gradient(ellipse,#ffad8580,transparent 70%)}
.sound-game[data-strike=gold] .sound-starburst{background:radial-gradient(ellipse,#ffe7879c,transparent 70%)}
.sound-game[data-strike=teal] .sound-starburst{background:radial-gradient(ellipse,#7de4d99c,transparent 70%)}
.sound-floor{position:absolute;z-index:-1;left:0;right:0;bottom:0;height:28%;background:repeating-linear-gradient(90deg,transparent 0 75px,#48292d30 76px 79px),linear-gradient(#98633c,#d39c60 18%,#bd8450 70%,#99633f);border-top:5px solid #edbd7b;box-shadow:0 -10px 20px #28182f21;transform-origin:bottom}
.sound-feedback{position:relative;z-index:2;text-align:center;min-height:26px;margin:15px auto 0;max-width:700px;color:#fff1d8;text-shadow:0 1px 2px #4a2f2e;font-size:.93rem;font-weight:700;line-height:1.25}
.sound-stage button:focus-visible{outline:3px solid #ffedb1;outline-offset:3px;box-shadow:0 0 0 6px #43215d}
.sound-stage .sound-instrument[aria-disabled=true]{cursor:default}
.sound-game.is-concert .sound-spotlight{background:linear-gradient(#ffe7a67a,#f9e4bc16)}
.sound-game.is-concert .sound-tempo{visibility:hidden}
.sound-game.is-free .sound-pattern{min-height:57px;gap:4px}.sound-game.is-free .sound-beat{padding:5px 1px}.sound-game.is-free .sound-beat-name{display:none}.sound-game.is-free .sound-beat-icon{width:24px;height:24px}
@keyframes sound-drum{0%,100%{transform:scale(1)}25%{transform:scale(1.07,.91)}60%{transform:scale(.98,1.035)}}
@keyframes sound-shake{0%,100%{transform:rotate(0)}22%{transform:rotate(-12deg)}48%{transform:rotate(11deg)}76%{transform:rotate(-7deg)}}
@keyframes sound-chime{0%,100%{transform:rotate(0)}15%{transform:rotate(7deg)}35%{transform:rotate(-5deg)}60%{transform:rotate(3deg)}}
@keyframes sound-dance{0%,100%{transform:translateY(0) rotate(0)}40%{transform:translateY(-5px) rotate(-3deg)}70%{transform:translateY(-2px) rotate(2deg)}}
@keyframes sound-ring{0%{transform:scale(.6);opacity:.8}100%{transform:scale(1.3,1.5);opacity:0}}
@media(max-width:600px){
 body[data-theme=sound] .game-shell{padding-bottom:8px}body[data-theme=sound] .game-heading{padding-bottom:9px}body[data-theme=sound] .game-subtitle{font-size:.84rem}
 .sound-stage{border-radius:24px;padding:12px 13px 13px}.sound-stage-top{min-height:115px;gap:5px}.sound-stage-copy{max-width:68%}.sound-stage .round-label{font-size:.68rem;padding:3px 9px}.sound-stage h2{font-size:1.38rem;margin:6px 0 4px;max-width:15ch}.sound-stage-copy p{font-size:.75rem;line-height:1.2;max-width:25ch}
 .sound-glee-wrap{min-width:83px;width:30%}.sound-glee{width:100px;height:106px}.sound-glee-plinth{width:86px;height:15px}.sound-starburst{inset:0 -18%}
 .sound-pattern-wrap{margin-top:4px;padding:8px 9px 9px;border-radius:15px}.sound-pattern-label{font-size:.69rem;margin-bottom:6px}.sound-pattern{min-height:54px;gap:6px}.sound-beat{padding:4px 1px;border-radius:10px}.sound-beat-icon{width:24px;height:24px}.sound-beat-name{font-size:.57rem}.sound-beat-check{width:16px;height:16px;line-height:16px;font-size:10px}
 .sound-actions{min-height:48px;gap:8px;margin:10px auto 8px}.sound-actions .primary{min-height:44px;padding:9px 12px;font-size:.81rem;border-radius:13px}.sound-watch svg{width:15px;height:15px}.sound-tempo{padding:2px;gap:2px;border-radius:13px}.sound-tempo button{font-size:.69rem;min-height:44px;padding:7px 10px;border-radius:10px}.sound-actions .secondary{font-size:.74rem;padding:8px 9px;min-height:44px;border-radius:13px}
 .sound-instruments{gap:7px}.sound-instrument{min-height:120px;padding:0 0 6px;border-radius:17px}.sound-object{height:98px;max-width:114px}.sound-name{font-size:.85rem;margin-top:0}.sound-key{display:none}.sound-instrument:before{bottom:17px;left:0;right:0;height:25px;box-shadow:0 5px 0 #573626,0 8px 6px #24132655}.sound-ripple{bottom:23px}
 .sound-feedback{font-size:.75rem;min-height:29px;margin-top:8px;line-height:1.2;max-width:37ch}.sound-floor{height:30%;border-top-width:3px}
 .sound-game.is-free .sound-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.sound-game.is-free .sound-actions .primary,.sound-game.is-free .sound-actions .secondary{padding:7px 4px;font-size:.7rem;min-height:45px}.sound-game.is-free .sound-watch svg{display:none}
}
@media(max-width:360px){
 body[data-theme=sound] .game-nav{padding-top:5px;padding-bottom:3px}body[data-theme=sound] .game-shell{padding-top:4px}body[data-theme=sound] .game-heading{padding-bottom:7px}body[data-theme=sound] h1{font-size:1.5rem}body[data-theme=sound] .game-subtitle{font-size:.77rem;margin-top:3px}
 .sound-stage{padding:10px 11px 10px;border-radius:21px}.sound-stage-top{min-height:100px}.sound-stage h2{font-size:1.2rem;max-width:15ch}.sound-stage-copy p{font-size:.7rem}.sound-stage .round-label{font-size:.63rem;padding:3px 7px}.sound-glee-wrap{min-width:74px}.sound-glee{height:93px;width:86px}.sound-glee-plinth{width:74px}
 .sound-pattern-wrap{padding:7px 7px 8px}.sound-pattern{min-height:49px;gap:5px}.sound-beat-icon{width:22px;height:22px}.sound-beat-name{font-size:.52rem}.sound-pattern-label{font-size:.64rem;margin-bottom:5px}.sound-actions{margin:8px auto 6px;gap:6px}.sound-actions .primary{font-size:.75rem;padding:8px 10px}.sound-tempo button{font-size:.65rem;padding-inline:8px}
 .sound-instrument{min-height:110px}.sound-object{height:90px}.sound-name{font-size:.78rem}.sound-feedback{font-size:.7rem;min-height:27px;margin-top:7px}.sound-game.is-free .sound-pattern{min-height:49px}
}
@media(prefers-reduced-motion:reduce){.sound-game *{animation:none!important;transition:none!important}.sound-instrument.is-lit{outline:3px solid currentColor;outline-offset:-3px}.sound-glee-wrap.is-dancing .sound-starburst{opacity:1}}
