:root{color-scheme:light;--paper:#f3eee3;--ink:#302f29;--muted:#838576;--red:#b7473f;--line:#d6d1c4;--screen:#101b21;font-family:"PingFang SC","Microsoft YaHei",system-ui,sans-serif}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink)}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer}button:focus-visible,a:focus-visible,canvas:focus-visible{outline:3px solid #bf8537;outline-offset:3px}button:disabled{opacity:.4;cursor:default}a{color:inherit}button{touch-action:manipulation}.site-header{height:74px;border-bottom:1px solid var(--line);padding:0 5%;display:flex;align-items:center;justify-content:space-between;max-width:1440px;margin:auto}.brand{display:flex;align-items:center;gap:11px;font-size:16px;font-weight:800;text-decoration:none;letter-spacing:.06em}.brand-mark{font-size:24px;color:var(--red)}.brand small{font:9px ui-monospace,monospace;color:var(--muted);letter-spacing:.12em}.back-link{font-size:11px;text-decoration:none;color:#777a6b}.back-link:hover{color:var(--red)}main{max-width:1080px;margin:auto;padding:37px 48px 23px}.intro{display:flex;justify-content:space-between;align-items:center;margin-bottom:29px}.eyebrow{font:9px ui-monospace,monospace;letter-spacing:.16em;color:#898b7c;margin:0 0 12px}h1{font-size:39px;margin:0 0 11px;letter-spacing:.01em;font-weight:850}h1>span{color:var(--red)}h1 small{display:block;font-size:13px;font-weight:500;color:#777c6a;letter-spacing:.06em;margin-top:9px}.intro-copy{font-size:11px;color:#8c8d7f;margin:0;line-height:1.8}.cartridge{display:flex;flex-direction:column;justify-content:center;align-items:center;width:78px;height:83px;border:1px solid #c5c0b2;background:#ebe5d8;transform:rotate(5deg);box-shadow:4px 4px #dfd7c8;border-radius:2px;position:relative}.cartridge:after{content:"";position:absolute;bottom:0;height:6px;width:52px;border-left:1px solid #c5c0b2;border-right:1px solid #c5c0b2}.cartridge span{font:8px ui-monospace,monospace;color:#8f7d66;line-height:1.6}.cartridge b{font:bold 29px ui-monospace,monospace;color:var(--red)}.arcade-layout{display:grid;grid-template-columns:minmax(0,620px) 232px;gap:39px;align-items:start}.cabinet{background:#e6e1d6;border:1px solid #c7c2b5;border-radius:5px;padding:13px 13px 0;box-shadow:0 3px 0 #c6bfb0,0 14px 28px #54472d08;min-width:0}.cabinet-top{height:26px;display:flex;gap:7px;align-items:center;margin-bottom:10px;color:#858574}.power-light{width:5px;height:5px;background:#bb5545;border-radius:50%;box-shadow:0 0 5px #cf7769}.player-label{font:8px ui-monospace,monospace;letter-spacing:.1em}.toolbar{display:flex;gap:4px;margin-left:auto}.toolbar button{background:#f0ece2;border:1px solid #c9c4b7;border-radius:3px;font-size:9px;line-height:1;padding:6px 7px;color:#747766}.toolbar button:hover:not(:disabled){background:#fff9ea}.screen-frame{position:relative;aspect-ratio:4/5;background:var(--screen);border:6px solid #353a34;border-top-color:#2b302b;border-radius:3px;overflow:hidden;isolation:isolate;max-height:650px;margin:auto}#game{width:100%;height:100%;display:block;image-rendering:pixelated;touch-action:none;outline-offset:-3px}.glass{position:absolute;inset:0;pointer-events:none;z-index:1;background:repeating-linear-gradient(0deg,transparent,transparent 3px,#00000008 3px,#00000008 4px);box-shadow:inset 0 0 26px #0004}.overlay{position:absolute;inset:0;display:flex;justify-content:center;align-items:flex-end;padding:0 20px 13%;z-index:2;text-align:center;color:#e9ead5;background:linear-gradient(transparent 39%,#101b2188 49%,#101b21e8 63%,#101b21c9 100%)}.overlay.is-paused,.overlay.is-finished{align-items:center;padding:25px;background:#0a141dcc;backdrop-filter:blur(2px)}.overlay-panel{width:100%;max-width:325px}.screen-kicker{font:8px ui-monospace,monospace;letter-spacing:.14em;color:#b5bf9d;margin:0 0 12px}.overlay h2{font-size:26px;letter-spacing:.04em;margin:0 0 12px}.overlay p:not(.screen-kicker){color:#a1ac9d;font-size:11px;line-height:1.9;margin:0 0 18px}.primary{display:block;min-width:174px;border:0;background:#d2dd9b;color:#2a3a2a;padding:12px 22px;margin:0 auto 12px;font-size:12px;font-weight:750;letter-spacing:.07em;box-shadow:0 3px #7e9063;border-radius:1px}.primary span{margin-left:14px;font-size:9px}.primary:hover{background:#e3ebbb;transform:translateY(-1px)}.primary:active{transform:translateY(2px);box-shadow:0 1px #7e9063}.secondary{display:block;border:0;background:none;color:#a4b096;font-size:10px;margin:15px auto 14px;padding:3px 7px;text-decoration:underline;text-underline-offset:4px}.screen-shortcut{font:7px ui-monospace,monospace;color:#74877b;letter-spacing:.06em}.result-score{font:bold 36px ui-monospace,monospace;color:#e3d48c;margin:17px 0 23px;letter-spacing:.08em}.toast{position:absolute;top:58%;left:50%;transform:translateX(-50%);z-index:3;white-space:nowrap;background:#192923ed;border:1px solid #8b9b69;color:#e0e5b7;padding:8px 12px;font-size:10px;pointer-events:none}.cabinet-bottom{height:32px;display:flex;justify-content:space-between;align-items:center;color:#8c8c7b;font:7px ui-monospace,monospace;letter-spacing:.06em}.cabinet-bottom span:first-child{display:flex;align-items:center;gap:5px;font-size:8px}.cabinet-bottom i{width:4px;height:4px;background:#aaa98c}.touch-controls{border-top:1px solid #d0c9b9;display:flex;align-items:center;gap:10px;padding:13px 3px 16px}.move-buttons{display:flex;gap:7px}.move-buttons button{border:1px solid #c5beb0;border-radius:4px;background:#f0eadc;color:#6b6f61;width:45px;height:38px;box-shadow:0 2px #c4bdad;touch-action:none}.move-buttons button.active{transform:translateY(2px);box-shadow:none;background:#d7d5c4}.touch-label{font-size:8px;color:#8d8c7a}.action-button{margin-left:auto;background:#ac4940;color:#f9ecdb;min-width:93px;height:41px;border:1px solid #9e4139;border-radius:5px;box-shadow:0 3px #8c3e36;touch-action:none}.action-button span{display:block;font-size:10px;font-weight:700}.action-button small{display:block;font:6px ui-monospace,monospace;letter-spacing:.18em;margin-top:3px;color:#e6bdb0}.action-button.active{transform:translateY(2px);box-shadow:0 1px #8c3e36}.guide{padding-top:4px}.guide-heading{font:9px ui-monospace,monospace;color:#838777;letter-spacing:.12em;border-bottom:1px solid var(--line);padding-bottom:13px;display:flex;justify-content:space-between}.guide-heading span{color:#b1b2a3}.guide h2{font-size:24px;line-height:1.45;font-weight:750;margin:21px 0 14px;letter-spacing:.02em}.guide-copy{font-size:11px;line-height:1.9;color:#898b7a;margin:0 0 19px}.key-row{display:flex;justify-content:space-between;align-items:center;font-size:10px;color:#7c826f;margin:10px 0}kbd{display:inline-flex;align-items:center;justify-content:center;padding:5px 7px;min-height:25px;border:1px solid #cbc8b8;background:#f8f5eb;border-radius:3px;box-shadow:0 2px #ded8c8;font:9px ui-monospace,monospace;color:#68745b}.tip{display:flex;gap:12px;align-items:center;padding:14px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);margin:23px 0}.tip>b{font-size:35px;color:#b6b99c;font-weight:400}.tip p{font-size:10px;line-height:1.9;color:#818671;margin:0}.small-label{font-size:9px;color:#8e9381;margin:0 0 12px}.brick-legend>div{display:flex;gap:10px;align-items:center;margin:9px 0;font-size:10px;color:#7c8470}.brick-legend b{font:9px ui-monospace,monospace;margin-left:auto;color:#69755e}.brick{display:inline-block;width:24px;height:10px;box-shadow:inset 0 2px #ffffff66,inset 0 -2px #00000020}.brick.normal{background:#97ad78}.brick.silver{background:#a4afb1}.brick.gold{background:#d4b45b}.power-legend{margin:23px 0 0;padding-top:18px;border-top:1px solid var(--line)}.power-legend>div{display:grid;grid-template-columns:22px 1fr 22px 1fr;align-items:center;gap:9px;margin:10px 0;font-size:10px;color:#7b826f}.capsule{font:bold 9px ui-monospace,monospace;color:#fff7df;font-style:normal;width:23px;height:13px;border-radius:7px;display:flex;justify-content:center;align-items:center;box-shadow:inset 0 2px #ffffff45,inset 0 -2px #00000020}.expand{background:#657bb9}.laser{background:#c96055}.catch{background:#b9a449}.multi{background:#61aab4}.slow{background:#c38950}.life{background:#8b9d8c}.power-note{font-size:9px;line-height:1.8;color:#999a8a;margin:14px 0 0}.level-note{margin-top:22px;padding-top:17px;border-top:1px solid var(--line)}.level-note>span{font:8px ui-monospace,monospace;letter-spacing:.14em;color:#a68a68}.level-note strong{display:block;font-size:14px;font-weight:600;margin:7px 0;color:#5c6555}.level-note p{font-size:9px;color:#929584;margin:0 0 15px}.text-button{border:0;background:none;width:100%;text-align:left;padding:0;color:#6e775f;font-size:10px;display:flex;justify-content:space-between;text-decoration:underline;text-underline-offset:4px}.text-button:hover{color:var(--red)}.reference-link{margin-top:23px;color:#939785}footer{display:flex;justify-content:space-between;gap:15px;font-size:9px;color:#a0a08f;padding-top:18px;margin-top:30px;border-top:1px solid var(--line);line-height:1.8}dialog{width:min(570px,calc(100% - 32px));max-height:calc(100% - 40px);overflow:auto;border:1px solid #c7c0ad;background:var(--paper);border-radius:5px;padding:30px;color:var(--ink);box-shadow:0 25px 90px #0005}dialog::backdrop{background:#10170fd1;backdrop-filter:blur(3px)}dialog h2{font-size:24px;line-height:1.4;margin:0 0 16px}dialog p:not(.eyebrow),dialog li{font-size:12px;line-height:1.9;color:#7a806e}dialog ul{padding-left:18px}dialog li{margin-bottom:9px}dialog button{font-size:12px;background:#f9f4e9;border:1px solid #cdc5b3;border-radius:3px;padding:10px 15px;color:#69735c}.close-dialog{position:absolute;right:14px;top:9px;border:0;background:none;font-size:24px;padding:5px 8px}.dialog-primary{background:#ac4940;border-color:#ac4940;color:#fff0dc}dialog>.dialog-primary{width:100%;margin-top:13px}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}.reference-links{display:flex;flex-direction:column;gap:12px;font-size:12px;color:#9c674a;margin:24px 0}.level-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:20px}.level-card{padding:7px 6px 10px;text-align:left;background:#ebe6d8;border:1px solid #d0c7b5}.level-card:hover{border-color:#b7473f;background:#f4eddd}.level-card canvas{width:100%;height:auto;background:#17212a;image-rendering:pixelated;display:block;border-radius:2px;margin-bottom:8px}.level-card b{font:9px ui-monospace,monospace;color:#aa6f55;display:block;margin:4px 0}.level-card span{font-size:10px;color:#737a64}.hidden{display:none!important}@media(min-width:1200px){.screen-frame{max-width:100%}}@media(max-width:900px){main{padding:30px 30px 23px}.arcade-layout{grid-template-columns:minmax(0,1fr) 210px;gap:27px}.guide h2{font-size:22px}.site-header{padding:0 30px}.overlay h2{font-size:23px}.screen-kicker{font-size:7px}.touch-label{display:none}}@media(max-width:670px){.site-header{height:58px;padding:0 18px}.brand{font-size:14px;gap:7px}.brand small{display:none}.brand-mark{font-size:21px}.back-link{font-size:10px}main{padding:24px 17px 20px}.intro{margin-bottom:23px}.eyebrow{font-size:7px;letter-spacing:.12em;margin-bottom:10px}h1{font-size:31px;margin-bottom:9px}h1 small{font-size:11px;margin-top:8px}.intro-copy{font-size:9px}.cartridge{width:63px;height:68px;margin-left:12px}.cartridge b{font-size:25px}.cartridge span{font-size:7px}.arcade-layout{display:block}.cabinet{padding:8px 8px 0;max-width:460px;margin:auto}.cabinet-top{height:25px;margin-bottom:7px;gap:5px}.toolbar button{font-size:8px;padding:6px}.player-label{font-size:7px}.screen-frame{border-width:4px}.overlay h2{font-size:23px}.overlay p:not(.screen-kicker){font-size:10px}.screen-shortcut{font-size:6px}.primary{padding:11px 18px;min-width:160px;font-size:11px}.screen-kicker{font-size:7px}.touch-controls{padding:11px 1px 14px}.touch-label{display:inline;font-size:7px}.action-button{min-width:94px;height:41px}.move-buttons button{width:42px;height:38px}.cabinet-bottom{height:28px;font-size:6px}.cabinet-bottom span:first-child{font-size:7px}.guide{display:grid;grid-template-columns:1fr 1fr;column-gap:25px;margin:28px 6px 0}.guide-heading{grid-column:1/-1}.guide h2{font-size:22px;margin:18px 0 13px}.guide-copy{font-size:10px;align-self:center;margin:10px 0 0}.key-row{font-size:9px;margin:7px 0}kbd{font-size:8px;padding:4px 5px}.tip{grid-column:1/-1;margin:20px 0 17px;padding:12px 0}.tip b{font-size:28px}.tip p{font-size:10px}.brick-legend{grid-column:1}.power-legend{grid-column:2;grid-row:6 / 9;margin:0;padding:0;border:0}.power-legend>div{gap:6px;font-size:9px}.power-note{font-size:8px}.level-note{grid-column:1/-1;margin-top:18px}.level-note strong{display:inline-block;margin:0 10px}.level-note p{margin:8px 0 13px}.reference-link{grid-column:1/-1;margin-top:20px}.small-label{font-size:8px}.brick-legend>div{font-size:9px;gap:8px}.brick-legend b{font-size:8px}footer{font-size:8px;margin-top:25px;gap:20px;align-items:flex-start}footer>span{max-width:48%}dialog{padding:27px 22px}dialog h2{font-size:21px}.level-grid{grid-template-columns:repeat(2,1fr)}.level-card canvas{max-height:110px;object-fit:contain;background:#17212a}.dialog-actions{gap:8px}.dialog-actions button{font-size:11px;padding:9px 11px}}@media(max-width:360px){main{padding-left:10px;padding-right:10px}.toolbar{gap:3px}.toolbar button{padding:6px 4px}.touch-label{display:none}.overlay h2{font-size:20px}.guide{column-gap:17px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition:none!important}}
/* Keep the entire active cabinet, HUD and touch controls inside a normal viewport.
   Width is derived from height, preserving the 320:400 pixel coordinate ratio. */
.screen-frame{max-height:none;width:100%}.arcade-layout{grid-template-columns:minmax(0,480px) 232px;justify-content:center}
.is-running .intro{display:none}.is-running main{padding-top:20px}.is-running .site-header{height:58px}
.is-running .arcade-layout{grid-template-columns:minmax(0,calc((100svh - 231px) * .8 + 28px)) 232px}
.is-running .screen-frame{width:100%;aspect-ratio:4/5}.is-running .cabinet{width:100%}
@media(max-width:900px) and (min-width:671px){.arcade-layout{grid-template-columns:minmax(0,440px) 210px}.is-running .arcade-layout{grid-template-columns:minmax(0,calc((100svh - 231px) * .8 + 28px)) 210px}}
@media(max-width:670px){.arcade-layout,.is-running .arcade-layout{display:block}.is-running main{padding-top:14px}.is-running .cabinet{max-width:min(460px,calc((100svh - 208px) * .8 + 20px))}.is-running .guide{margin-top:29px}}
@media(max-height:500px){.is-running .arcade-layout{grid-template-columns:minmax(240px,360px) 200px}.is-running .cabinet{max-width:360px}.is-running .screen-frame{min-height:300px}.is-running .guide{font-size:10px}}

.capsule.warp{background:#c387b7}

/* 36-stage campaign: three compact pages, never a 36-card wall. */
#levels-dialog{width:min(650px,calc(100% - 32px))}.level-pages{display:flex;gap:8px;margin:18px 0 12px}.level-page{flex:1;font:11px ui-monospace,monospace;padding:9px 12px}.level-page[aria-pressed="true"]{background:#ac4940;border-color:#ac4940;color:#fff0dc}.level-grid{margin-top:0;max-height:min(54svh,490px);overflow:auto;overscroll-behavior:contain;padding:3px 4px 5px;scrollbar-color:#b8ac91 #e9e2d4}.level-card[hidden]{display:none}.level-card canvas{aspect-ratio:9/7;object-fit:contain}.level-card{min-width:0}.level-card span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media(max-width:670px){#levels-dialog{padding:27px 18px 18px}.level-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;max-height:52svh}.level-card{padding:5px 4px 7px}.level-card b{font-size:8px}.level-card span{font-size:9px}.level-card canvas{margin-bottom:6px}.level-pages{gap:6px}.level-page{padding:9px 6px}}
/* Longer translated labels stay inside the existing cabinet and mobile layout. */
html[lang="en"] .intro h1{font-size:clamp(29px,5vw,52px)}
html[lang="en"] .overlay-panel h2{font-size:clamp(21px,4.5vw,30px)}
html[lang="en"] .level-card span{white-space:normal;overflow-wrap:anywhere}
html[lang="en"] .key-row kbd{font-size:11px}
html[lang="en"] .toolbar{flex-wrap:wrap}
