:root{color-scheme:dark;--ink:#f8eace;--muted:#bba8ae;--gold:#f2c878}*{box-sizing:border-box}body{margin:0;background:#191622;color:var(--ink);font-family:system-ui,sans-serif;background:radial-gradient(ellipse at 50% 0,#443040,#151623 80%)}button,input,select{font:inherit}button{cursor:pointer;border:1px solid #b6917655;border-radius:8px;background:#493345;color:#f6e4c4;min-height:42px;padding:10px 16px;touch-action:manipulation}button:hover{background:#644553}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #f5c986;outline-offset:3px}button.primary{background:#f0c784;color:#3c2634;font-weight:750;border-color:#f9d899}button:disabled{opacity:.5;cursor:default}header{height:58px;display:flex;align-items:center;justify-content:space-between;gap:15px;padding:0 24px;border-bottom:1px solid #d4b38a25;background:#281e30}header>span{font-size:10px;letter-spacing:2px;color:#c7b0a9}header nav{display:flex;gap:6px}header nav button{padding:5px 12px;min-width:38px;min-height:36px}.game-brand{display:flex;align-items:center;gap:8px;text-decoration:none;flex-shrink:0}.game-brand>span{font-family:monospace;font-size:14px;font-weight:bold;color:#f5dfb7;line-height:1.15}.game-brand small{display:block;font:6px system-ui;letter-spacing:1.6px;margin-top:4px;color:#d5ab7e}.game-brand svg{width:28px;height:28px;shape-rendering:crispEdges}.star-core{animation:star-glow 4s ease-in-out infinite}@keyframes star-glow{50%{filter:drop-shadow(0 0 2px #e3a660)}}main{max-width:1440px;margin:auto;padding:12px 16px 0}#stage{position:relative;border:1px solid #d3ac7755;border-radius:14px;overflow:hidden;box-shadow:0 24px 80px #08071499;background:#252239;isolation:isolate;margin:auto;width:100%}#game{display:block;width:100%;height:auto;image-rendering:pixelated;outline:none;touch-action:none}#overlay{position:absolute;inset:0;background:#161428a6;backdrop-filter:blur(5px);display:flex;align-items:center;justify-content:center;padding:24px;overflow:auto}#overlay[hidden]{display:none}#panel{width:min(590px,100%);max-height:100%;overflow:auto;padding:32px;border:1px solid #d7af735c;border-radius:18px;background:linear-gradient(145deg,#443045f5,#232139fc);box-shadow:0 24px 80px #08071699;text-align:center}#panel h1{font:750 clamp(28px,5vw,56px)/1.05 monospace;letter-spacing:2px;color:#f6d397;margin:8px 0 12px;text-shadow:3px 3px #6b394a}#panel h2{font:400 32px/1.1 Georgia,serif;margin:8px 0 18px;color:#f9dfae}#panel p{font-size:14px;line-height:1.65;color:#dfc5b7}.eyebrow{text-transform:uppercase;letter-spacing:3px;font-size:9px!important;color:#e6b57b!important}.actions{display:flex;gap:9px;flex-wrap:wrap;justify-content:center;margin-top:20px}.actions button{font-size:13px}.mode-list{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px}.mode-list button{font-size:12px;padding:12px 8px}.mode-list button strong{display:block;font-size:15px;color:#f5d399;margin-bottom:4px}.mode-list button small{display:block;font-size:10px;color:#c9b3b2;line-height:1.5}.mode-list button[aria-pressed=true]{border-color:#f2ce86;background:#694455}.badges{display:flex;gap:7px;justify-content:center;flex-wrap:wrap;margin:17px 0}.badges span{font:10px monospace;letter-spacing:.5px;padding:6px 10px;border:1px solid #cda37244;border-radius:20px;color:#edd1ab}.controls{display:flex;gap:8px;justify-content:center;padding:10px}.controls button{width:58px;min-height:45px;font-size:21px;user-select:none;-webkit-user-select:none}.controls button:active,.controls button.active{background:#956750;transform:translateY(1px)}footer{display:flex;align-items:center;justify-content:center;gap:15px;padding:4px 0 10px;color:#ae9daa;font-size:10px}footer button{font-size:10px;min-height:28px;padding:5px 9px;background:transparent}#notice{position:absolute;bottom:16px;left:50%;transform:translateX(-50%);pointer-events:none;background:#efd4a6;color:#3f2e39;max-width:90%;padding:9px 16px;border-radius:8px;font-size:12px;box-shadow:0 4px 20px #0004;opacity:0;transition:opacity .2s}#notice.show{opacity:1}.setting{display:grid;grid-template-columns:130px 1fr;gap:14px;align-items:center;margin:16px 0;text-align:left;font-size:13px}.setting input[type=range]{width:100%;accent-color:#e8ba78}.setting select{width:100%;padding:8px;background:#30263a;color:#f5dfbd;border:1px solid #b3937955;border-radius:7px}.help-grid{text-align:left;font-size:13px;line-height:1.6}.help-grid dt{color:#f0c98b;font-weight:700;margin-top:8px}.help-grid dd{margin:3px 0;color:#d4bcba}.result-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:20px 0}.result-grid strong{display:block;font:22px monospace;color:#f3d393}.result-grid span{font-size:10px;color:#cab4b1}.celebration-panel{background:linear-gradient(#312638e0,#35283de0)!important;margin-top:-210px}.celebration-panel h2{margin-bottom:10px!important}body.immersive header>span{display:none}body.immersive main{max-width:none;padding:0}body.immersive #stage{border:0;border-radius:0}body.immersive footer{display:none}:fullscreen main{max-width:none;padding:0}:fullscreen footer{display:none}:fullscreen #stage{border:0;border-radius:0}body.immersive #stage,:fullscreen #stage{width:auto}#stage.portrait{max-width:470px}@media(max-width:650px){header{padding:0 10px;height:52px;gap:8px}header>span{display:none}header nav{gap:4px}header nav button{padding:5px 9px}.game-brand>span{font-size:12px}.game-brand svg{width:24px;height:24px}main{padding:6px 6px 0}#stage{border-radius:9px}#overlay{padding:10px}#panel{padding:20px 15px;border-radius:12px}#panel h1{font-size:33px}#panel h2{font-size:26px}.mode-list{grid-template-columns:1fr}.mode-list button{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;text-align:left}.mode-list button strong{font-size:13px;margin:0}.mode-list button small{max-width:140px;text-align:right}.controls{padding:7px 0;gap:5px}.controls button{width:calc((100vw - 42px)/6);max-width:58px;min-height:42px;padding:6px;font-size:20px}footer{font-size:9px;gap:4px}footer span{display:none}#panel p{font-size:12px}.setting{grid-template-columns:100px 1fr;font-size:12px}.celebration-panel{margin-top:-180px}.badges{margin:10px 0}.badges span{font-size:9px;padding:4px 7px}.result-grid{gap:5px}.result-grid strong{font-size:18px}}@media(max-height:550px)and(min-width:651px){header{height:42px}.controls{display:none}footer{display:none}main{padding:4px 8px}#panel{padding:18px}.celebration-panel{margin-top:-80px}#panel h1{font-size:34px}.badges{margin:7px 0}.actions{margin-top:12px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}

@media(pointer:coarse) and(orientation:landscape){.controls{display:flex;padding:5px}.controls button{min-height:36px;height:36px;font-size:17px}header{height:42px}}

#overlay:has(.celebration-panel){backdrop-filter:none;background:linear-gradient(#21152b22,#17132508)}

/* Bonus occupies the upper stage; the ensemble has its own unobstructed floor. */
#overlay:has(.celebration-panel){align-items:flex-start;padding-top:20px;pointer-events:none}
#panel.celebration-panel{margin:0;width:min(560px,95%);max-height:44%;padding:16px 24px;pointer-events:auto}
.celebration-panel .result-grid{margin:10px 0}.celebration-panel .actions{margin-top:10px}.celebration-panel p{margin:8px 0}
@media(max-width:650px){#overlay:has(.celebration-panel){padding-top:12px}#panel.celebration-panel{padding:12px;max-height:48%}.celebration-panel h2{font-size:24px}}
