/* Second visual edition. Local fonts and artwork also work offline. */
@font-face{font-family:'Metal Mania';src:url('../assets/fonts/MetalMania-Regular.woff') format('woff');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:'Barlow Condensed';src:url('../assets/fonts/BarlowCondensed-Medium.woff') format('woff');font-weight:400 500;font-style:normal;font-display:swap}
@font-face{font-family:'Barlow Condensed';src:url('../assets/fonts/BarlowCondensed-SemiBold.woff') format('woff');font-weight:600 900;font-style:normal;font-display:swap}
:root{color-scheme:dark;--ink:#fff0dc;--muted:#c4b6b3;--red:#e4463d;--panel:#191216;--line:#d8b49c38;--display:'Metal Mania',Georgia,serif;--body:'Barlow Condensed','Arial Narrow',sans-serif}
*{box-sizing:border-box}html{font-size:16px}body{margin:0;min-height:100vh;background:radial-gradient(ellipse at 50% 0,#36121966,transparent 65%),#0c0b10;color:var(--ink);font-family:var(--body);font-weight:500;overscroll-behavior-y:none}
button,a,canvas{touch-action:manipulation;-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit;cursor:pointer}button:disabled{cursor:wait;opacity:.6}a{color:inherit;text-decoration:none}button:focus-visible,a:focus-visible,input:focus-visible,canvas:focus-visible{outline:3px solid #fff0dc;outline-offset:4px}[hidden]{display:none!important}
button svg{width:20px;height:20px;display:block;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.app{max-width:1192px;margin:0 auto;padding:0 32px env(safe-area-inset-bottom)}.topbar{height:88px;display:flex;align-items:center;justify-content:space-between;gap:16px}.brand{display:flex;align-items:center;gap:14px}.creator-logo{display:block;width:64px;height:64px;object-fit:contain;flex-shrink:0}.brand-name{font-size:16px;font-weight:600;letter-spacing:2px}.brand-sub{display:block;color:#ce8e87;font-size:11px;letter-spacing:4px;margin-top:3px}.nav-actions{display:flex;align-items:center;gap:8px}.text-button{border:0;background:transparent;min-height:44px;padding:10px 14px;font-size:16px;letter-spacing:.6px;color:#dcc8bf}.text-button:hover{color:#fff0dc}.icon-button{display:grid;place-items:center;min-width:44px;width:44px;height:44px;flex-shrink:0;border:1px solid #b9947d52;border-radius:3px;background:#1a121bd9;color:#f4ddcb;transition:background .16s,border-color .16s}.icon-button:hover{background:#4a1c26;border-color:#e98975}.icon-button:active{background:#6c2330}
.stage{position:relative;isolation:isolate;width:100%;aspect-ratio:16/10;max-height:720px;overflow:hidden;border:1px solid #98685e;border-top:3px solid #de453b;border-radius:4px;background:#151322;box-shadow:0 28px 80px #0008,0 0 0 5px #1c121580,inset 0 0 0 1px #f5d6aa20}.stage canvas{display:block;width:100%;height:100%;touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}.stage:fullscreen{border:0;border-radius:0;width:100%;height:100%;min-height:0;max-height:none;aspect-ratio:auto}
/* Menu: the supplied title art leads, with one strong red action. */
.menu{position:absolute;inset:0;z-index:4;display:flex;align-items:center;padding:44px 52px;overflow-y:auto;background:linear-gradient(90deg,#160c15ef 0%,#190e19c9 40%,#230f1b55 68%,#110d120d)}.menu-copy{width:56%;max-width:500px}.eyebrow{font-size:13px;font-weight:600;letter-spacing:3px;color:#f0b8a5;margin:0 0 15px}.menu .eyebrow{display:flex;align-items:center;gap:12px}.menu .eyebrow:before{content:'';width:29px;height:2px;background:var(--red);flex-shrink:0}.game-logo{display:block;width:min(445px,100%);height:auto;max-height:252px;object-fit:contain;object-position:left center;margin:0 0 12px;filter:drop-shadow(0 7px 16px #10040abb)}.intro{font-size:19px;line-height:1.5;color:#e2cdc4;max-width:340px;margin:0 0 24px}
.primary{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:24px;min-height:57px;padding:14px 26px;border:1px solid #f4886c;border-bottom:3px solid #63141e;border-radius:2px;background:linear-gradient(115deg,#b12730,#d44335);box-shadow:inset 0 0 0 3px #7c1b233d,0 4px 0 #46131c,0 10px 25px #500c2850;color:#fff0dc;font-family:var(--display);font-size:26px;font-weight:400;line-height:1.2;letter-spacing:.6px;text-shadow:0 2px 1px #571222;transition:transform .15s,background .15s,box-shadow .15s}.primary:hover{background:linear-gradient(115deg,#cf3336,#eb5140);transform:translateY(-2px);box-shadow:inset 0 0 0 3px #7c1b233d,0 6px 0 #46131c,0 12px 30px #941c3250}.primary:active{transform:translateY(2px);box-shadow:inset 0 0 0 3px #7c1b233d,0 2px 0 #46131c}.primary svg{fill:currentColor;stroke:none;width:19px;height:19px}.primary:disabled{transform:none}.secondary{display:block;min-height:44px;margin:14px auto 0;padding:10px 16px;border:1px solid #bc958353;background:#27182080;border-radius:2px;font-size:17px;letter-spacing:.4px;color:#e7caba}.secondary:hover{background:#49212a;border-color:#c99780}
.control-hint{display:flex;align-items:center;gap:10px;margin-top:24px;font-size:15px;line-height:1.4;color:#d1bcb9}.hint-keys{display:flex;gap:5px}.keycap{display:inline-flex;align-items:center;justify-content:center;min-width:27px;height:27px;border:1px solid #c09b8259;border-bottom:3px solid #98705c;border-radius:2px;background:#17101ccc;color:#f2d7c1;font:600 14px var(--body)}.mobile-hint{display:none}.menu-best{margin-top:18px;color:#c2aaa8;font-size:13px;letter-spacing:1.4px}.menu-best b{margin-left:8px;color:#fff0dc;font-size:17px;font-weight:600;font-variant-numeric:tabular-nums;letter-spacing:.5px}.collection-link{display:inline-flex;align-items:center;justify-content:space-between;gap:20px;min-height:47px;padding:10px 14px;border:1px solid #cb9b765e;border-left:3px solid #cb8065;border-radius:2px;background:#170f1bbd;color:#f6d7bd;font-family:var(--display);font-size:21px;font-weight:400;line-height:1.2;letter-spacing:.3px}.collection-link:hover{background:#43202a;border-color:#e29879}.collection-link span{font:600 15px var(--body);letter-spacing:1px;color:#f0b097;white-space:nowrap}.menu .collection-link{margin-top:17px}.loading-note{font-size:15px;color:#e8c4b8;margin:12px 0 0}
/* Compact, high-contrast instruments keep the sky clear. */
.hud{position:absolute;top:22px;left:24px;right:24px;z-index:2;display:flex;align-items:flex-start;justify-content:space-between;gap:12px;pointer-events:none}.hud button{pointer-events:auto}.score-area{display:flex;align-items:center;gap:23px;padding:8px 13px;background:#160d17e6;border:1px solid #a2786b70;border-left:3px solid #dc584b;border-radius:2px;box-shadow:0 4px 14px #0004}.stat-label{display:block;color:#dfbdaa;font-size:12px;font-weight:600;letter-spacing:2px;margin-bottom:3px}.score-number{display:block;font-size:37px;line-height:1;letter-spacing:1px;font-weight:600;font-variant-numeric:tabular-nums}.best-number{font-size:23px;line-height:1.1;color:#e6cfc1;font-weight:600;font-variant-numeric:tabular-nums}.status-group{display:flex;align-items:center;gap:8px}.state-pill{display:flex;align-items:center;gap:7px;min-height:44px;padding:10px 13px;border:1px solid #c995766b;border-radius:2px;background:#21131ce8;color:#ffe8ce;font-size:14px;font-weight:600;letter-spacing:1px}.state-pill svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.6}.state-pill.danger{background:#721e2aeb;border-color:#ff8574;color:#fff1d8}
.level-bar{position:absolute;left:24px;right:24px;bottom:23px;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:16px;pointer-events:none}.level-meta{display:flex;align-items:center;gap:12px;padding:7px 11px 8px;background:#160d17df;border:1px solid #d9b59840;border-radius:2px}.level-badge{font-family:var(--display);font-size:21px;color:var(--sky-accent,#f3ba95);white-space:nowrap;border-right:1px solid #ddbb9561;padding-right:11px}.level-name{display:block;font-size:16px;line-height:1.15;color:#f8e9dc}.level-progress{width:130px;height:3px;background:#d9b7992e;margin-top:6px;overflow:hidden}.level-progress i{display:block;height:100%;width:0;background:var(--sky-accent,#e7a98b);transition:width .2s linear}.time{padding:8px 11px;background:#160d17df;border:1px solid #d9b59840;border-radius:2px;font-size:20px;font-weight:600;font-variant-numeric:tabular-nums}.time small{font-size:11px;color:#dbb79f;letter-spacing:1.5px;margin-right:10px}
.toast{position:absolute;top:109px;left:50%;transform:translateX(-50%);z-index:3;max-width:calc(100% - 32px);width:max-content;padding:11px 18px;border:1px solid #bf92796e;border-left:3px solid #d99c7e;border-radius:2px;background:#21131df5;box-shadow:0 6px 24px #0005;color:#ffe7d3;font-size:17px;line-height:1.3;text-align:center;pointer-events:none}.toast.danger{background:#651c2bf5;color:#ffe6d7;border-color:#eb746b}.toast.warning{background:#4d2c24f5;border-color:#df9a64;color:#ffe4b8}.toast.good{background:#183b36f5;border-color:#8bcabb;color:#d8ffef}.power-status{position:absolute;top:103px;left:24px;z-index:2;width:183px;padding:9px 11px;background:#112e34ef;border:1px solid #8cdddd75;border-left:3px solid #9ef1e6;border-radius:2px;color:#e2fff5;pointer-events:none}.power-status>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:10px}.power-status strong{font-size:17px;font-weight:600}.power-status span{font-size:15px;font-variant-numeric:tabular-nums}.power-track{height:3px;overflow:hidden;background:#87cfcc38;margin-top:7px}.power-track i{display:block;width:100%;height:100%;background:#b2ffed}.has-power .toast{top:167px}
.touch-controls{position:absolute;left:18px;right:18px;bottom:74px;z-index:3;display:none;justify-content:space-between;pointer-events:none}.touch-control{display:grid;place-items:center;width:80px;height:64px;pointer-events:auto;touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;border:1px solid #e6b29099;border-bottom:3px solid #b86a59;border-radius:4px;background:#20121fe0;box-shadow:inset 0 0 0 3px #efbc8f10,0 4px 18px #09020c45;color:#ffe5c9}.touch-control svg{width:29px;height:29px}.touch-control.held,.touch-control:active{background:#8b2937f0;border-color:#ffaf87;box-shadow:inset 0 0 0 3px #ffbd941f}
/* Pause and illustrated endings share the new type hierarchy. */
.center-overlay{position:absolute;inset:0;z-index:7;display:flex;align-items:center;justify-content:center;padding:28px;overflow-y:auto;background:#150d19eb;backdrop-filter:blur(9px);text-align:center;overscroll-behavior:contain}.result-card{width:100%;max-width:390px;padding:27px 24px;border:1px solid #cda0885e;border-top:3px solid #d6473e;background:#1d1218ed;box-shadow:0 20px 50px #0004}.result-card h2{font:400 45px/1.1 var(--display);margin:0 0 14px;color:var(--ink)}.result-card p{font-size:18px;line-height:1.5;color:#dbbfb7;margin:0 0 22px}.result-card .eyebrow{font-size:12px;letter-spacing:3px;color:#f0a58a}.result-card .primary,.result-card .secondary{width:100%}
.ending-overlay{padding:26px;background:#150d18f5}.ending-card{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(260px,1fr);align-items:center;gap:30px;max-width:1000px;width:100%;max-height:100%;overflow:auto;text-align:left;overscroll-behavior:contain;padding:4px}.ending-scene,.ending-summary{min-width:0}.ending-art{position:relative;display:grid;place-items:center;width:100%;aspect-ratio:3/2;overflow:hidden;border:1px solid #d1a48288;border-radius:2px;background:#0b0810;color:#e5cabc;padding:0;cursor:zoom-in}.ending-art:disabled{opacity:1;cursor:default}.ending-art img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;display:block}.ending-loading{padding:24px;font-size:17px;line-height:1.5}.ending-description{padding:16px 0 0}.scene-badge{display:inline-block;color:#f3aa8f;font-size:12px;font-weight:600;letter-spacing:2px}.ending-description h2{font:400 34px/1.15 var(--display);margin:9px 0;color:var(--ink)}.ending-description p{color:#dec1b7;font-size:17px;line-height:1.5;margin:0}.ending-scene>.secondary{margin:8px auto}.ending-summary>.eyebrow{font:400 22px/1.2 var(--display);letter-spacing:1px;color:#f1ad90;margin:0 0 10px}.ending-scoreline{display:flex;align-items:baseline;gap:12px}.result-score{font-size:67px;font-weight:600;line-height:1;font-variant-numeric:tabular-nums;letter-spacing:1px}.ending-scoreline .stat-label{margin:0}.record-tag{color:#ffe1a2;font-size:13px;font-weight:600;letter-spacing:1.5px;margin:9px 0}.result-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;padding:17px 0;margin:19px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.result-stats b{display:block;font-size:24px;font-weight:600;font-variant-numeric:tabular-nums}.result-stats span{display:block;font-size:12px;letter-spacing:1px;color:#d0aca0;margin-top:3px}.ending-summary .collection-link{width:100%;font-size:21px}.collection-note{font-size:15px;line-height:1.4;color:#d3b6ad;margin:10px 0 18px}.ending-actions .primary{width:100%}.ending-actions .secondary{width:100%;margin-top:13px}
/* Secondary information stays quiet until needed. */
.below{display:flex;align-items:center;justify-content:space-between;gap:18px;min-height:66px;padding:10px 2px;font-size:14px;color:#bda6a4}.keys{display:flex;align-items:center;gap:9px}.keys>span:last-child{margin-left:12px}.download{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:7px 0;font-size:15px;color:#e5b59b}.download:hover{color:#ffe6cd}.download svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7}.rules-strip{display:grid;grid-template-columns:repeat(3,1fr);gap:28px;border-top:1px solid var(--line);padding:25px 0 31px}.rule{display:flex;align-items:flex-start;gap:13px}.rule-number{font:400 26px/1 var(--display);color:#d27360;margin-top:4px}.rule strong{display:block;font:400 23px/1.2 var(--display);color:#f0d8c5;margin-bottom:8px}.rule p{font-size:16px;line-height:1.5;color:#c0a9a5;margin:0}.footer{display:flex;justify-content:space-between;gap:20px;padding:0 0 24px;font-size:13px;line-height:1.5;color:#ad9795}.footer span:last-child{text-align:right}
.rules-dialog,.gallery-dialog{width:min(560px,calc(100% - 28px));max-height:calc(100svh - 32px);overflow:auto;padding:29px;border:1px solid #b5836d;border-top:3px solid #e34b40;border-radius:3px;background:#1b1218;color:var(--ink);box-shadow:0 30px 100px #0009;overscroll-behavior:contain}.rules-dialog::backdrop,.gallery-dialog::backdrop{background:#0a080ee3;backdrop-filter:blur(8px)}.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:23px}.dialog-heading h2{font:400 36px/1.1 var(--display);margin:0}.dialog-heading .icon-button{align-self:flex-start}.instructions{padding:0;margin:0;list-style:none;counter-reset:rules}.instructions li{position:relative;padding:17px 0 17px 32px;border-top:1px solid var(--line);counter-increment:rules}.instructions li:before{position:absolute;left:0;top:18px;content:counter(rules,decimal-leading-zero);font:400 18px var(--display);color:#e88e75}.instructions strong{display:block;font-size:20px;font-weight:600;margin-bottom:5px}.instructions p{font-size:17px;line-height:1.5;color:#d5bdb5;margin:0}.instructions p+p{margin-top:12px}.instructions .points{color:#ffd5ac}
.gallery-dialog{width:min(1000px,calc(100% - 28px))}.gallery-dialog .dialog-heading{position:sticky;top:-29px;z-index:1;padding:12px 0;background:#1b1218;margin-bottom:15px}.gallery-dialog .eyebrow{font-size:12px;letter-spacing:2px;margin:0 0 8px}.gallery-progress{font-size:19px;margin:0 0 7px;color:#ffdac0}.gallery-tip{font-size:16px;line-height:1.4;color:#c4a9a4;margin:0 0 24px}.gallery-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.scene-tile{overflow:hidden;padding:0;text-align:left;border:1px solid #bd907361;border-radius:2px;background:#281921;color:#ffe3ca}.scene-tile:hover:not(:disabled){border-color:#f5b295;background:#41222c}.scene-tile img{display:block;width:100%;height:auto;aspect-ratio:3/2;object-fit:cover}.scene-tile-label{display:block;padding:14px;font:400 23px/1.2 var(--display)}.scene-tile.locked{opacity:1;cursor:default;color:#c4a69e}.locked-art{display:grid;place-items:center;aspect-ratio:3/2;background:radial-gradient(ellipse at 50% 90%,#52252e66,transparent),#1d131d;font:400 60px var(--display);color:#b17666}.scene-viewer{text-align:center}.scene-viewer .secondary{margin:0 0 14px;text-align:left}.scene-viewer h3{font:400 32px/1.15 var(--display);margin:15px 0}.scene-viewer img{width:100%;height:auto;max-height:65svh;object-fit:contain;background:#0c0810;border:1px solid #af826650}.scene-viewer p{font-size:19px;line-height:1.5;color:#e1c3b4;margin:16px 0 5px}
.music-dialog{max-width:480px}.music-intro{font-size:18px;line-height:1.5;color:#d6b9b0;margin:0 0 20px}.track-list{display:grid;gap:11px}.track-choice{display:flex;gap:15px;align-items:center;text-align:left;min-height:69px;padding:13px 15px;border:1px solid #d6a68852;border-left:3px solid #c59a7f66;border-radius:2px;background:#281820;font-size:20px;line-height:1.25}.track-choice[aria-pressed=true]{border-color:#ef937b;background:#53232b}.track-choice:hover{background:#452029}.track-number{color:#ffc7a4;font:400 24px var(--display)}.track-choice small{display:block;font-size:15px;color:#d4aaa1;margin-top:3px}.volume-label{display:flex;justify-content:space-between;gap:15px;font-size:18px;margin-top:24px}.volume-label output{color:#ffc9a7;font-variant-numeric:tabular-nums}.music-volume{width:100%;min-height:44px;margin:3px 0;accent-color:#eb7761}.music-status{min-height:43px;color:#d3b8ae;font-size:16px;line-height:1.4;margin:4px 0}.audio-toggle{width:100%;margin-top:12px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
@media(pointer:coarse){.touch-controls{display:flex;left:max(18px,env(safe-area-inset-left));right:max(18px,env(safe-area-inset-right))}.mobile-hint{display:inline}.desktop-hint,.hint-keys{display:none}.primary:hover{transform:none}}
@media(max-width:760px){
 .app{padding-left:max(10px,env(safe-area-inset-left));padding-right:max(10px,env(safe-area-inset-right))}.topbar{height:66px;gap:8px}.creator-logo{width:54px;height:54px}.brand-name{font-size:13px;letter-spacing:1px}.brand-sub{font-size:10px;letter-spacing:2px}.nav-actions{gap:5px}.text-button{font-size:15px;padding:8px}.icon-button{min-width:44px;width:44px;height:44px}
 .stage{height:calc(100svh - 112px - env(safe-area-inset-top) - env(safe-area-inset-bottom));min-height:370px;max-height:none;aspect-ratio:auto;border-radius:3px}.menu{align-items:center;padding:25px;background:linear-gradient(90deg,#180d18f2,#1f101ac9 75%,#1b0e1c75)}.menu-copy{width:100%;max-width:410px}.menu .eyebrow{font-size:12px;letter-spacing:2px;margin-bottom:11px}.game-logo{width:min(315px,94%);max-height:178px;margin-bottom:14px}.intro{max-width:290px;font-size:18px;line-height:1.45;margin-bottom:21px}.primary{font-size:25px;min-height:54px;padding:13px 21px;gap:20px}.control-hint{font-size:15px;margin-top:19px;max-width:270px}.menu-best{font-size:12px;margin-top:15px}.menu .collection-link{margin-top:15px;font-size:21px}.mobile-hint{display:inline}.desktop-hint,.hint-keys{display:none}
 .hud{top:13px;left:12px;right:12px;gap:9px}.score-area{gap:15px;padding:6px 9px}.stat-label{font-size:11px;letter-spacing:1.4px}.score-number{font-size:30px}.best-number{font-size:20px}.status-group{gap:6px}.state-pill{font-size:13px;letter-spacing:.4px;padding:9px}.state-pill svg{display:none}.level-bar{left:13px;right:13px;bottom:14px;gap:10px}.level-meta{gap:9px;padding:7px 9px}.level-badge{font-size:19px;padding-right:9px}.level-name{font-size:15px}.level-progress{width:105px}.time{font-size:19px;padding:9px}.time small{display:none}.toast{top:90px;font-size:16px;padding:10px 13px}.power-status{top:84px;left:12px;width:176px;padding:8px 10px}.has-power .toast{top:143px}.touch-controls{display:flex;left:16px;right:16px;bottom:75px}.touch-control{width:80px;height:63px}
 .below{min-height:43px;padding:0;gap:10px}.below .keys{font-size:13px}.below .keycap,.below .keys>span:last-child{display:none}.below .download{font-size:13px;min-height:40px;white-space:nowrap}.below .download svg{display:none}.below .keys .desktop-hint{display:none}.rules-strip{grid-template-columns:1fr;gap:20px;padding:24px 4px}.rule{gap:14px}.rule strong{font-size:23px}.rule p{font-size:16px}.footer{font-size:12px;gap:15px}.footer span:last-child{max-width:180px}
 .center-overlay{padding:18px}.ending-overlay{align-items:flex-start;padding:17px}.ending-card{grid-template-columns:1fr;gap:16px;max-width:480px;max-height:none;overflow:visible;align-content:start;padding:2px}.ending-description{padding-top:12px}.ending-description h2{font-size:30px;margin:7px 0}.ending-description p{font-size:16px}.scene-badge{font-size:11px;letter-spacing:1.5px}.ending-summary>.eyebrow{font-size:20px;margin-bottom:7px}.result-score{font-size:44px}.result-stats{padding:11px 0;margin:12px 0;gap:10px}.result-stats b{font-size:22px}.result-stats span{font-size:11px}.collection-note{font-size:14px;margin:8px 0 13px}.ending-actions{display:grid;grid-template-columns:1.25fr 1fr;gap:11px;align-items:stretch}.ending-actions .primary{font-size:22px;padding:12px 10px;gap:12px;min-height:49px}.ending-actions .secondary{font-size:16px;margin:0;padding:10px}.ending-summary .collection-link{font-size:21px}
 .rules-dialog,.gallery-dialog{padding:21px;max-height:calc(100svh - 24px)}.dialog-heading h2{font-size:32px}.gallery-dialog .dialog-heading{top:-21px}.gallery-grid{gap:13px}.scene-tile-label{font-size:21px;padding:12px}.scene-viewer img{max-height:58svh}.instructions p{font-size:17px}.gallery-dialog .eyebrow{font-size:11px;letter-spacing:1.5px}
}
@media(max-width:540px){.brand-name{display:none}.menu-copy{max-width:370px}.state-pill{font-size:12px}.result-card h2{font-size:39px}.result-card{padding:23px 20px}.rules-dialog,.gallery-dialog{width:calc(100% - 20px)}.gallery-dialog .dialog-heading h2{font-size:29px}}
@media(max-width:420px){.score-area>div:nth-child(2){display:none}.score-number{font-size:31px}.menu{padding:22px}.game-logo{max-height:165px}.menu .intro{font-size:17px}.level-name{font-size:14px}.level-badge{font-size:18px}.level-progress{width:93px}.status-group{gap:7px}}
@media(max-width:360px){#fullBtn{display:none}.creator-logo{width:48px;height:48px}.nav-actions{gap:4px}.text-button{font-size:14px;padding:6px}.menu{padding:19px}.menu .intro{font-size:16px}.gallery-grid{grid-template-columns:1fr}.gallery-dialog .dialog-heading h2{font-size:27px}.level-meta{gap:7px}.level-name{font-size:13px}.level-badge{font-size:17px}.level-progress{width:80px}.touch-control{width:74px;height:59px}.ending-overlay{padding:12px}}
@media(max-height:740px) and (max-width:760px) and (orientation:portrait){.menu{padding:20px}.game-logo{width:245px;max-height:132px;margin-bottom:10px}.menu .eyebrow{font-size:11px;margin-bottom:8px}.intro{font-size:16px;margin-bottom:15px}.menu .control-hint{margin-top:16px;font-size:14px}.menu-best{margin-top:12px}.menu .collection-link{margin-top:13px;min-height:44px;font-size:20px}.ending-art{aspect-ratio:16/9}}
@media(max-height:620px) and (max-width:760px) and (orientation:portrait){.game-logo{width:203px;max-height:110px;margin-bottom:8px}.menu .eyebrow{display:none}.intro{font-size:15px;margin-bottom:13px}.menu .control-hint{margin-top:13px}.menu-best{margin-top:9px}.menu .collection-link{margin-top:9px}.primary{min-height:49px;font-size:23px;padding:11px 18px}}
@media(orientation:landscape) and (max-height:540px){
 .app{max-width:1100px;padding:0 max(8px,env(safe-area-inset-left)) 0 max(8px,env(safe-area-inset-right))}.topbar{height:54px}.creator-logo{width:44px;height:44px}.brand-name{display:none}.stage{height:calc(100svh - 60px);min-height:240px;max-height:none;aspect-ratio:auto;border-radius:3px}.below,.rules-strip,.footer{display:none}.menu{padding:15px 28px;align-items:center}.menu-copy{width:70%;max-width:550px}.menu .eyebrow,.menu .intro,.menu .control-hint,.menu .menu-best{display:none}.game-logo{width:228px;max-height:125px;margin-bottom:12px}.menu .primary{min-height:47px;font-size:23px;padding:11px 17px;gap:14px}.menu .collection-link{font-size:19px;min-height:46px;margin:0 0 0 11px;padding:10px;gap:13px}
 .hud{top:9px;left:13px;right:13px}.score-area{padding:5px 9px;gap:18px}.score-number{font-size:26px}.stat-label{font-size:10px;margin-bottom:2px}.best-number{font-size:19px}.state-pill{font-size:12px;padding:8px}.level-bar{left:13px;right:13px;bottom:10px}.level-meta{padding:6px 9px;gap:10px}.level-badge{font-size:18px}.level-name{font-size:14px}.time{padding:7px 9px;font-size:18px}.time small{display:none}.touch-controls{bottom:57px}.touch-control{width:75px;height:54px}.toast{top:74px;font-size:15px;padding:8px 12px}.power-status{top:72px;left:13px;width:172px;padding:6px 9px}.has-power .toast{top:127px}
 .ending-overlay{padding:12px;align-items:flex-start}.ending-card{grid-template-columns:minmax(0,1.25fr) minmax(245px,1fr);max-width:1000px;gap:20px;max-height:100%;overflow:auto}.ending-art{aspect-ratio:16/9;max-height:calc(100svh - 167px)}.ending-description{padding-top:8px}.ending-description h2{font-size:27px;margin:5px 0}.ending-description p{font-size:15px;line-height:1.35}.ending-summary>.eyebrow{display:none}.result-score{font-size:38px}.result-stats{margin:9px 0;padding:8px 0;gap:8px}.result-stats b{font-size:20px}.result-stats span{font-size:11px;letter-spacing:.5px}.ending-summary .record-tag{font-size:11px;margin:5px 0}.ending-summary .collection-link{font-size:19px;min-height:42px;padding:8px 10px}.collection-note{font-size:13px;margin:7px 0 10px}.ending-actions{display:flex;gap:9px}.ending-actions .primary{font-size:21px;min-height:44px;padding:10px 12px;gap:10px;width:auto}.ending-actions .secondary{font-size:15px;margin:0;white-space:nowrap;width:auto;padding:10px}.scene-badge{font-size:11px}.gallery-dialog{max-height:calc(100svh - 16px)}.result-card{max-width:430px;padding:18px 23px}.result-card h2{font-size:34px;margin-bottom:9px}.result-card p{margin-bottom:12px}.result-card .eyebrow{margin-bottom:10px}.result-card .primary{min-height:47px;font-size:23px;padding:10px 20px}.result-card .secondary{margin-top:12px}.stage:fullscreen{height:100%;min-height:0}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}.primary,.icon-button,.level-progress i{transition:none}.primary:hover,.primary:active{transform:none}}
/* Keep replay and the landing caption visible on short landscape phones. */
@media(orientation:landscape) and (max-height:360px){.ending-card{gap:16px}.ending-art{max-height:calc(100svh - 190px)}.ending-description h2{font-size:24px;margin:4px 0}.ending-description p{font-size:14px;line-height:1.3}.result-score{font-size:30px}.ending-summary .record-tag{font-size:10px;margin:3px 0}.result-stats{margin:5px 0;padding:6px 0}.result-stats b{font-size:18px}.ending-summary .collection-link{font-size:18px;min-height:39px;padding:7px 9px}.collection-note{font-size:12px;margin:5px 0 8px}}
/* v9: mobile instruments live above, never on top of, the falling character. */
.power-icon{display:none}.hud .power-status{top:81px;left:0}
.stage.compact-play canvas{position:absolute;top:54px;left:0;width:100%;height:calc(100% - 54px)}
.stage.compact-play .hud{top:0;left:0;right:0;height:54px;padding:5px 8px;gap:7px;align-items:center;background:#160d17f5;border-bottom:1px solid #a2786b70}
.stage.compact-play .score-area{flex:1;min-width:0;padding:0 4px;border:0;background:none;box-shadow:none;gap:0}
.stage.compact-play .score-area>div:nth-child(2){display:none}
.stage.compact-play .stat-label{font-size:9px;line-height:1;letter-spacing:1px;margin-bottom:3px}
.stage.compact-play .score-number{font-size:24px;line-height:1;letter-spacing:0}
.stage.compact-play .status-group{gap:6px}.stage.compact-play .state-pill{font-size:11px;letter-spacing:.2px;padding:6px;min-height:36px;white-space:nowrap}
.stage.compact-play .state-pill svg{display:none}
.stage.compact-play .power-status{position:static;flex:0 0 60px;width:60px;padding:3px 4px;background:none;border:0;box-shadow:none}
.stage.compact-play .power-status strong{display:none}.stage.compact-play .power-status>div:first-child{gap:4px}
.stage.compact-play .power-icon{display:block;width:14px;height:18px;fill:#b2ffed;flex-shrink:0}
.stage.compact-play .power-status span{font-size:14px;white-space:nowrap}
.stage.compact-play .power-track{margin-top:4px;height:3px}
.stage.compact-play .toast{display:none!important}
/* Edition selection and a separate boss strip keep the playing field unobstructed. */
.mode-picker{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:10px 0 14px}
.mode-picker button{min-height:53px;padding:8px 6px;border:1px solid #926452;background:#20141ce8;color:#ddc2b6;font-size:16px;line-height:1.15;border-radius:2px}
.mode-picker button span{display:block;font-size:11px;letter-spacing:1.5px;text-transform:uppercase;margin-top:5px;color:#c99c8d}
.mode-picker button[aria-pressed=true]{background:#70212b;border-color:#fa9e80;color:#fff5e3;box-shadow:inset 0 -3px #e46b54}
.menu .game-logo{max-height:186px}.menu .intro{font-size:17px;margin-bottom:16px}.menu .control-hint{margin-top:16px}
.continue-story{margin:12px 0 0;font-size:16px}.clear-score{display:block;color:#ffbe99;font-size:26px;margin:14px 0 22px}
.chapter-clear .result-card{max-width:560px}.chapter-clear .primary{font-size:24px}.chapter-clear{overflow-y:auto}
.stage.story-boss.compact-play canvas{top:90px;height:calc(100% - 90px)}
.stage.story-boss.compact-play .level-bar{top:54px;bottom:auto;left:0;right:0;height:36px;padding:2px 9px;gap:5px;background:#160d17f5;border-bottom:1px solid #a2786b70}
.stage.story-boss.compact-play .level-meta{background:none;border:0;padding:0;gap:8px;min-width:0}
.stage.story-boss.compact-play .level-name{font-size:13px;white-space:nowrap}
.stage.story-boss.compact-play .level-badge{font-size:17px;padding-right:8px}
.stage.story-boss.compact-play .level-progress{width:100%;min-width:105px;margin-top:3px}
.stage.story-boss.compact-play .time{padding:0;border:0;background:none;font-size:16px}.stage.story-boss.compact-play .time small{display:none}
.stage.story-boss.compact-play .touch-controls{bottom:10px}
@media(max-width:760px){.menu .game-logo{max-height:160px}.mode-picker{width:100%;max-width:390px;margin:8px 0 12px}.menu-copy{width:100%}.menu .intro{font-size:16px}.mode-picker button{font-size:15px}.menu .menu-best{margin-top:12px}.menu .collection-link{margin-top:10px}}
@media(max-height:740px) and (max-width:760px) and (orientation:portrait){.menu{align-items:flex-start}.menu .game-logo{max-height:107px;width:210px}.menu .control-hint{display:none}.menu .eyebrow{margin-bottom:4px}.menu .intro{margin-bottom:12px}.menu .primary{min-height:47px;font-size:23px}.mode-picker button{min-height:49px}}
@media(orientation:landscape) and (max-height:540px){.menu{align-items:flex-start;padding:10px 24px}.menu-copy{width:100%;max-width:650px;display:grid;grid-template-columns:1fr 1.25fr;column-gap:25px;align-items:center}.menu .game-logo{grid-column:1;grid-row:1/4;width:100%;max-height:153px;margin:0}.mode-picker{grid-column:2;margin:0 0 8px}.menu .primary,.menu .continue-story{grid-column:2}.menu .collection-link{grid-column:1;margin:4px 0}.menu .continue-story{margin:9px 0 0;font-size:14px;min-height:38px}.menu .loading-note{grid-column:2}.chapter-clear .result-card{padding:15px 22px}.chapter-clear .clear-score{margin:6px 0 12px}.chapter-clear .result-card h2{font-size:30px}.chapter-clear .result-card p{font-size:15px}.chapter-clear .primary{font-size:20px;min-height:43px}}

.menu{align-items:flex-start}
.boss-practice{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:7px;margin:0 0 14px}
.boss-practice>span{font-size:14px;font-weight:600;color:#ebc9b6}
.boss-practice button{min-height:44px;padding:7px 9px;border:1px solid #b28a70;background:#39212d;font:600 16px var(--body);color:#fff0dc;line-height:1.15;border-radius:3px}
.boss-practice button:hover:not(:disabled){background:#67313f;border-color:#fac49e}
.boss-practice button:disabled{opacity:.5;cursor:wait}
@media(max-width:360px){.boss-practice{grid-template-columns:1fr 1fr;gap:5px}.boss-practice>span{grid-column:1/-1}}

/* Halloween keeps the same clear, accessible playfield and a dedicated skill button. */
.stage.boss-hurt .level-progress i{background:#fff0a0;box-shadow:0 0 10px #ffd072}
.mode-picker button span{font-size:12px}
#halloweenModeBtn{border-color:#aa794d;color:#ffdfac}
#halloweenModeBtn[aria-pressed=true]{background:#63351f;border-color:#ffc079;box-shadow:inset 0 -3px #ee9649}
.stage.is-halloween{border-color:#b17b48;--red:#e89950}
.stage.is-halloween .menu{background:linear-gradient(90deg,#211024f2 0%,#251025c9 46%,#17082322)}
.stage.is-halloween .primary{background:linear-gradient(#f7bf72,#dd8b44);color:#251124;border-color:#ffd69b}
.stage.has-speed-control .touch-controls{display:flex;align-items:center}
/* Compact three-way speed control: large tap targets, below Sarah's path. */
.speed-controls{display:flex;flex-direction:column;gap:5px;padding:6px;background:#1e112bed;border:1px solid #be956570;border-radius:4px;pointer-events:auto;text-align:center}
.speed-controls>span{font:600 11px/1.1 var(--body);letter-spacing:.7px;color:#ffe0ac;white-space:nowrap}
.speed-controls>div{display:flex;gap:4px}
.speed-controls button{min-width:48px;min-height:44px;padding:7px 5px;border:1px solid #9c74528c;border-radius:3px;background:#382438;color:#e6cbbb;font:700 20px/1 var(--body);touch-action:manipulation}
.speed-controls button[aria-pressed=true]{color:#281522;background:#ffc777;border-color:#ffe5b9;box-shadow:0 0 12px #edaa5730}
.speed-controls #speed3[aria-pressed=true]{color:#fff4ed;background:#b83354;border-color:#ffa5b5}
.stage.overdrive{border-color:#f088aa}
.collection-tabs{display:flex;gap:8px;margin:0 0 18px}.collection-tabs button{flex:1;min-height:44px;padding:9px;border:1px solid #a1766480;background:#281b28;color:#dec4b7;font-size:18px;border-radius:3px}.collection-tabs button[aria-pressed=true]{background:#663243;color:#fff1dc;border-color:#f5b981}
.goal-progress{display:block;padding:0 14px 14px;color:#c5ada1;font-size:15px}.scene-tile.locked .scene-tile-label{font:600 17px/1.35 var(--body);padding-bottom:8px}
.scene-how,.viewer-how{margin:6px 0 8px;color:#f3aa8f;font-size:14px;font-weight:600;letter-spacing:.3px}
.scene-tile .goal-progress{line-height:1.35}
@media(pointer:fine) and (min-width:761px) and (min-height:541px){.stage.has-speed-control .touch-controls{justify-content:flex-end}.stage.has-speed-control #leftBtn,.stage.has-speed-control #rightBtn{display:none}}
@media(max-width:420px){.stage.has-speed-control .touch-controls{left:10px;right:10px;gap:5px}.stage.has-speed-control .touch-control{width:54px;height:59px}.speed-controls{padding:5px}.speed-controls button{min-width:44px;min-height:44px}.speed-controls>span{font-size:10px;letter-spacing:.3px}}
@media(orientation:landscape) and (max-height:540px){.boss-practice{grid-column:2;margin-bottom:8px;grid-template-columns:1fr}.boss-practice>span{display:none}.boss-practice button{min-height:40px}.stage.has-speed-control .touch-controls{bottom:54px}.speed-controls{flex-direction:row;align-items:center;gap:8px;padding:4px}.speed-controls>span{max-width:70px;white-space:normal}.speed-controls button{min-height:44px}.stage.story-boss.has-speed-control .touch-controls{bottom:10px}}

.speed-controls>span{font-size:9px;letter-spacing:0}
@media(max-width:420px){.mode-picker button{font-size:14px}.mode-picker button span{font-size:10px;letter-spacing:.5px}.speed-controls>span{font-size:8px;letter-spacing:0}}

/* Halloween mobile: instruments share the existing 54px header. Classic and boss layouts stay intact. */
.mobile-run-stats{display:none}
.stage.has-speed-control.compact-play:not(.story-boss) .score-area{gap:12px;padding:0;flex:1;min-width:0}
.stage.has-speed-control.compact-play:not(.story-boss) .score-area>div:first-child{min-width:0}
.stage.has-speed-control.compact-play:not(.story-boss) .score-number{font-size:clamp(18px,6vw,24px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.stage.has-speed-control.compact-play:not(.story-boss) .mobile-run-stats{display:flex;gap:12px;flex-shrink:0;padding-left:10px;border-left:1px solid #a2786b55}
.stage.has-speed-control.compact-play:not(.story-boss) .mobile-stat-value{display:block;font:600 20px/1 var(--body);font-variant-numeric:tabular-nums;color:#ffe6bf;white-space:nowrap}
.stage.has-speed-control.compact-play:not(.story-boss) .status-group{height:44px;align-items:center;flex-shrink:0}
.stage.has-speed-control.compact-play:not(.story-boss) .state-pill{justify-content:center;min-width:62px;max-width:62px;min-height:44px;padding:3px;font-size:10px;letter-spacing:0;white-space:nowrap;text-align:center;line-height:1.1}
.stage.has-speed-control.compact-play.has-power:not(.story-boss) .state-pill{height:44px;align-items:flex-start;padding-top:3px}
.stage.has-speed-control.compact-play:not(.story-boss) .power-status{position:absolute;top:23px;left:auto;right:60px;width:56px;height:23px;padding:1px 3px;z-index:1}
.stage.has-speed-control.compact-play:not(.story-boss) .power-status>div:first-child{justify-content:center;gap:3px}
.stage.has-speed-control.compact-play:not(.story-boss) .power-status span{font-size:12px;line-height:1}
.stage.has-speed-control.compact-play:not(.story-boss) .power-icon{width:9px;height:12px}
.stage.has-speed-control.compact-play:not(.story-boss) .power-track{height:2px;margin-top:2px}
.stage.has-speed-control.fits-viewport{height:var(--mobile-stage-height);min-height:0;max-height:none;aspect-ratio:auto}
.stage.has-speed-control.compact-play:not(.story-boss) .touch-controls{bottom:max(36px,calc(env(safe-area-inset-bottom,0px) + 18px));left:max(12px,env(safe-area-inset-left,0px));right:max(12px,env(safe-area-inset-right,0px));gap:8px;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.stage.has-speed-control.compact-play:not(.story-boss) .touch-control{width:60px;height:60px;flex-shrink:0}
.stage.has-speed-control.compact-play:not(.story-boss) .speed-controls{flex-direction:column;gap:4px;padding:5px}
.stage.has-speed-control.compact-play:not(.story-boss) .speed-controls>span{max-width:none;white-space:nowrap;font-size:9px;letter-spacing:0}
.stage.has-speed-control.compact-play:not(.story-boss) .speed-controls button{min-width:48px;min-height:48px}
@media(max-width:360px){.stage.has-speed-control.compact-play:not(.story-boss) .score-area{gap:8px}.stage.has-speed-control.compact-play:not(.story-boss) .mobile-run-stats{gap:9px;padding-left:8px}.stage.has-speed-control.compact-play:not(.story-boss) .mobile-stat-value{font-size:18px}}
@media(max-width:360px){.stage.has-speed-control.compact-play:not(.story-boss) .touch-controls{left:10px;right:10px;gap:6px}.stage.has-speed-control.compact-play:not(.story-boss) .touch-control{width:52px;height:56px}.stage.has-speed-control.compact-play:not(.story-boss) .speed-controls button{min-width:44px}}
@media(orientation:landscape) and (max-height:540px){.stage.has-speed-control.compact-play:not(.story-boss) .touch-controls{bottom:max(20px,calc(env(safe-area-inset-bottom,0px) + 10px))}.stage.has-speed-control.compact-play:not(.story-boss) .touch-control{width:60px;height:52px}}

/* Desktop gets a permanent click target beside the keyboard controls, outside
   the playfield. Touch keeps the existing raised iPhone control row. */
.desktop-speed-controls{display:flex;align-items:center;gap:10px;padding:6px 10px;background:#20121f;border:1px solid #bd906577;border-radius:4px;flex-shrink:0}
.desktop-speed-controls>span{font:600 12px/1.2 var(--body);color:#f7cc9e;max-width:105px;letter-spacing:.4px}
.desktop-speed-controls>div{display:flex;gap:5px}
.desktop-speed-controls button{min-width:42px;min-height:38px;border:1px solid #9c74528c;border-radius:3px;background:#382438;color:#ffe5c9;font:700 19px/1 var(--body)}
.desktop-speed-controls button[aria-pressed=true]{color:#281522;background:#ffc777;border-color:#ffe5b9}
.desktop-speed-controls button:disabled{opacity:.6;cursor:default}
@media(pointer:fine) and (min-width:761px) and (min-height:541px){.stage.has-speed-control .touch-controls{display:none}.below{flex-wrap:wrap;gap:12px}.below .keys{flex:1}}
@media(pointer:coarse),(max-width:760px),(max-height:540px){.desktop-speed-controls{display:none}}
.stage.story-boss.has-speed-control .touch-controls{bottom:max(36px,calc(env(safe-area-inset-bottom,0px) + 18px));justify-content:space-between}
@media(orientation:landscape) and (max-height:540px){.stage.story-boss.has-speed-control .touch-controls{bottom:max(20px,calc(env(safe-area-inset-bottom,0px) + 10px))}}

@media(pointer:fine) and (min-width:761px) and (min-height:541px){.stage.has-speed-control:fullscreen .touch-controls{display:flex;justify-content:flex-end}}

/* Visible keyboard instructions: menu, desktop selector and fullscreen selector. */
.speed-key-hint{display:flex;align-items:center;gap:6px;font:500 15px/1.4 var(--body);color:#f7d7ac}
.menu .speed-key-hint{margin:10px 0 0}
.speed-controls>.speed-key-hint{margin:0;font-size:13px;justify-content:center}
.desktop-speed-controls>.speed-control-copy{display:flex;flex-direction:column;gap:4px;max-width:none;min-width:0;letter-spacing:0}
.speed-control-copy>small{font:500 14px/1.25 var(--body);color:#fff0dc;white-space:nowrap}
.desktop-speed-controls button{min-width:50px;min-height:48px;padding:5px 7px}
.desktop-speed-controls button>small{display:block;margin-top:4px;font:600 10px/1 var(--body);letter-spacing:.7px}
.desktop-speed-controls button kbd{font:inherit}
@media(pointer:coarse){.menu .speed-key-hint,.speed-controls>.speed-key-hint{display:none}}

/* Home-only episode banner, outside the canvas so Sarah stays unobstructed. */
.watch-card{display:flex;align-items:center;gap:18px;min-width:0;width:100%;margin:14px 0 0;padding:10px 14px 10px 10px;border:1px solid #c59c7c80;border-left:3px solid #dcaa78;border-radius:4px;background:linear-gradient(110deg,#271823,#160e19);color:#fff0dc}
.watch-thumbnail{display:block;position:relative;flex:0 0 144px;aspect-ratio:16/9;overflow:hidden;border:1px solid #c59c7c50;border-radius:2px;background:#171029 url('../assets/background.webp') center/cover}
.watch-thumbnail img{display:block;width:100%;height:100%;object-fit:cover}
.watch-play{position:absolute;right:6px;bottom:6px;display:grid;place-items:center;width:28px;height:28px;border:1px solid #ffe5bf80;border-radius:50%;background:#251320e8;font-size:12px;padding-left:2px}
.watch-copy{display:flex;flex-direction:column;gap:4px;min-width:0}
.watch-copy>small{font-size:10px;letter-spacing:2px;color:#d6aa91}
.watch-copy>strong{font:400 clamp(21px,2.2vw,28px)/1.15 var(--display);overflow-wrap:break-word}
.watch-copy>span{font-size:14px;color:#f0bc9a}
.watch-card[href]:hover{border-color:#ffcca1;background:#36202c}
.watch-card[aria-disabled=true]{cursor:default}
@media(max-width:760px){.watch-card{gap:12px;margin-top:10px;padding:8px}.watch-thumbnail{flex-basis:112px}.watch-copy>strong{font-size:22px}.watch-copy>small{font-size:9px;letter-spacing:1.4px}.watch-copy>span{font-size:13px}}
@media(max-width:360px){.watch-card{gap:9px}.watch-thumbnail{flex-basis:92px}.watch-copy>strong{font-size:20px}}
