:root{--bg:#090e19;--panel:#101d32;--ink:#eef4ff;--muted:#94a5be;--line:#34445c;--red:#e6404c;--blue:#5ea5f6;--gold:#dfbc76;--mono:ui-monospace,SFMono-Regular,Consolas,monospace;--font:"Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,sans-serif;color-scheme:dark;font-family:var(--font);font-synthesis:none;background:var(--bg);color:var(--ink)}*{box-sizing:border-box}body{margin:0;min-width:320px;background:radial-gradient(ellipse at 50% 15%,#1b293b 0,#090e19 70%)}button{font:inherit;color:inherit;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;border:1px solid var(--line);border-radius:3px;background:linear-gradient(#23324b,#17233a);min-height:44px;transition:background .15s,border-color .15s,transform .15s}button:hover:not(:disabled){border-color:#89a6cd;background:#2b4161}button:active:not(:disabled){transform:translateY(1px)}button:focus-visible,[role=button]:focus-visible{outline:3px solid #f3c975;outline-offset:3px}button:disabled{opacity:.35;cursor:default}img{max-width:100%;user-select:none}button img{pointer-events:none}b,strong{font-weight:800}small{font-size:11px}#app{max-width:1080px;margin:auto;min-height:100svh}p{line-height:1.7}.primary{background:linear-gradient(110deg,#d1303e,#b31d2b);border:1px solid #fa6570;box-shadow:inset 0 1px #ffffff25,0 5px 20px #0005;font-weight:800}.primary:hover:not(:disabled){background:#e1404c;border-color:#ff8991}.secondary{background:linear-gradient(#1e2b42,#131d30);border-color:#53617a}.quiet{border:0;background:transparent;min-height:40px;color:#bac9e0;font-size:12px}.icon-button{width:44px;min-width:44px;font-family:var(--mono);font-size:13px;background:#101b2b}.brand{display:inline-flex;align-items:center;gap:8px;font-family:var(--mono);letter-spacing:.15em}.brand-logo{width:74px;height:46px;object-fit:contain}.brand b{font-size:12px;border-left:1px solid #6d7380;padding-left:10px}.game-header,.title-header{height:68px;display:flex;align-items:center;justify-content:space-between;padding:0 26px;border-bottom:1px solid #ffffff14;position:relative;z-index:2}.header-label{font:11px var(--mono);letter-spacing:.08em;color:#b7c3d7}.header-tools{display:flex;gap:6px}.title-screen{position:relative;isolation:isolate;min-height:100svh;overflow:hidden;display:flex;flex-direction:column;background:#0b111c}.title-background{position:absolute;inset:0;z-index:-2;background:linear-gradient(0deg,#090e19 0%,#09101bc7 45%,#09101b77 100%),url('assets/industrial_background.webp') center/cover;opacity:.85}.title-screen:after,.ending-screen:after{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background:repeating-linear-gradient(0deg,transparent 0 3px,#00000018 3px 4px)}.title-header{border-bottom:1px solid #8c9eaf36}.edition{font:10px var(--mono);letter-spacing:.15em;color:#a3b3c6}.eyebrow{font:10px var(--mono);letter-spacing:.2em;color:#c7d3e5;margin:0 0 22px;display:flex;align-items:center;gap:9px}.eyebrow i{width:6px;height:6px;background:var(--red);box-shadow:0 0 12px #f45c68}.stage-stamp{display:flex;align-items:center;gap:16px}.stage-stamp>span{font:9px var(--mono);color:var(--red);border-right:1px solid #80505c;padding-right:16px;display:grid;gap:4px}.stage-stamp>span b{font-size:35px;color:#f7d4d6}.stage-stamp strong{font-size:17px;letter-spacing:.15em}.stage-stamp small{display:block;color:#9caec5;margin-top:7px;font-size:10px}.hero-unit{position:absolute;width:32%;height:70%;bottom:15%;display:flex;align-items:end;justify-content:center}.hero-unit img{max-height:100%;width:100%;object-fit:contain;image-rendering:pixelated;position:relative;z-index:2}.hero-unit span{position:absolute;bottom:-17px;left:0;right:0;text-align:center;font-size:9px;color:#c4d4e9;opacity:.6;letter-spacing:.16em}.hero-0{left:0;bottom:21%;z-index:4}.hero-1{left:18%;bottom:34%;z-index:1;height:60%}.hero-2{left:38%;bottom:39%;z-index:0;height:59%}.hero-3{left:51%;bottom:21%;z-index:3;height:67%}.hero-4{left:72%;bottom:19%;z-index:4;width:30%}.title-horizon{position:absolute;bottom:15%;width:95%;height:34%;transform:perspective(300px) rotateX(60deg);background:repeating-linear-gradient(0deg,transparent 0 22px,#a2bbdc22 23px 24px),repeating-linear-gradient(90deg,transparent 0 35px,#a2bbdc22 36px 37px);border-top:1px solid #b8c5df66}.art-caption{position:absolute;bottom:3%;left:16%;right:0;text-align:center;letter-spacing:.3em;font:9px var(--mono);color:#9bafc4}.title-actions button{display:flex;justify-content:space-between;align-items:center;padding:0 18px;font:700 11px var(--mono);letter-spacing:.08em;height:56px}.title-actions small{font:8px var(--mono);letter-spacing:0;color:#b4c3d9}.title-footer{padding:20px 26px;font:8px var(--mono);letter-spacing:.12em;color:#74869f;display:flex;justify-content:space-between;border-top:1px solid #ffffff0a}.tactical-screen{min-height:100svh;background:#0c1420}.tactical-top{padding:16px 24px 12px;border-bottom:1px solid #2a3849;display:flex;justify-content:space-between;align-items:center;gap:12px}.tactical-top>div{display:flex;align-items:center;gap:18px;white-space:nowrap}.phase-label{font:700 10px var(--mono);letter-spacing:.1em;color:#94c5ff;border-left:3px solid #529aee;padding:4px 0 4px 8px}.phase-label.enemy{color:#ff9b9b;border-color:#ef5964}.tactical-top strong{font:11px var(--mono);color:#7c8faa}.tactical-top strong b{font-size:21px;color:white}.tactical-top p{font-size:11px;margin:0;color:#c3d1e3}.tactical-top p span{color:#e6be76;font:8px var(--mono);display:block}.tactical-layout{display:grid;grid-template-columns:1.1fr 1fr;gap:30px;padding:22px 28px}.map-column{min-width:0;max-width:460px;margin:auto;width:100%}.map-meta{display:flex;justify-content:space-between;font:9px var(--mono);color:#a2b5ce;margin-bottom:8px}.board-shell{position:relative;padding:4px;border:1px solid #64738a;background:#0a111d;box-shadow:0 7px 35px #0007}.board{display:grid;grid-template-columns:repeat(8,1fr);grid-template-rows:repeat(10,1fr);aspect-ratio:4/5;background:url('assets/map_background.svg') center/100% 100%;isolation:isolate}.cell{position:relative;min-height:0;min-width:0;padding:0;border:0;border-right:1px solid #b0c7e820;border-bottom:1px solid #b0c7e820;border-radius:0;background:transparent;transition:none;overflow:visible}.cell:hover:not(:disabled){background:#789ac522}.cell.obstacle{opacity:1}.cell.reachable{background:#4c9dff3d;box-shadow:inset 0 0 0 1px #7bb8ff50}.cell.selected{box-shadow:inset 0 0 0 2px #e3d69c;z-index:3;background:#e7c67b26}.map-unit{position:absolute;width:118%;height:128%;max-width:none;bottom:8%;left:-9%;object-fit:contain;image-rendering:pixelated;z-index:2;filter:drop-shadow(0 2px 2px #000a)}.unit-base{position:absolute;bottom:7%;left:10%;width:80%;height:24%;border-radius:50%;border:2px solid #57a9ff;background:#1b6ec259;box-shadow:0 0 9px #5a9bff66}.enemy .unit-base{border-color:#ff6671;background:#b82d436b;box-shadow:0 0 9px #fa4e7166}.mini-hp{position:absolute;bottom:1px;left:7%;width:86%;height:3px;z-index:4;background:#0b1320}.mini-hp i{display:block;background:#6cefb2;height:100%}.enemy .mini-hp i{background:#ff7884}.acted .map-unit{filter:grayscale(.8) brightness(.65)}.done-mark{position:absolute;top:0;right:0;font:bold 10px var(--mono);background:#172536e8;color:#9cb3d0;z-index:5;padding:0 2px}.stun-mark{position:absolute;font:6px var(--mono);background:#edbe5d;color:#142033;top:0;left:0;z-index:5;padding:2px}.move-dot{position:absolute;width:6px;height:6px;border:1px solid #a2d9ff;left:calc(50% - 3px);top:calc(50% - 3px);background:#a2d9ff66;transform:rotate(45deg)}.targetable{background:#f9515a3b!important;box-shadow:inset 0 0 0 1px #ff7b85}.target-cross{position:absolute;inset:0;display:grid;place-items:center;font:35px var(--mono);color:#fff;z-index:5;text-shadow:0 0 4px #b21e32;pointer-events:none}.map-corners{position:absolute;inset:-2px;pointer-events:none}.map-corners i{position:absolute;width:9px;height:9px;border:2px solid #bcc8da}.map-corners i:nth-child(1){top:0;left:0;border-right:0;border-bottom:0}.map-corners i:nth-child(2){top:0;right:0;border-left:0;border-bottom:0}.map-corners i:nth-child(3){bottom:0;left:0;border-right:0;border-top:0}.map-corners i:nth-child(4){bottom:0;right:0;border-left:0;border-top:0}.map-legend{display:flex;justify-content:space-between;font-size:9px;color:#879fb8;padding-top:9px}.map-legend i{display:inline-block;width:6px;height:6px;border-radius:50%;margin-right:3px}.blue{background:#71b1fa}.red{background:#f36977}.command-column{padding-top:0;min-width:0}.operation-hint{border-left:2px solid #e2be78;padding:10px 12px;margin-bottom:12px;background:#172335;font-size:12px;min-height:40px;color:#dfd3b9}.unit-inspector{display:flex;min-height:135px;background:linear-gradient(120deg,#172841,#111e33);border:1px solid #53637c;box-shadow:inset 0 0 0 2px #101725;padding:10px;gap:12px}.inspect-portrait{width:85px;min-width:85px;overflow:hidden;border:1px solid #65758b;background:#0b1525}.portrait{width:100%;height:100%;object-fit:cover;object-position:center 22%;display:block}.inspect-mecha{width:100%;height:100%;object-fit:contain;image-rendering:pixelated}.inspect-info{flex:1;min-width:0}.inspect-name{display:flex;align-items:center;gap:9px;margin-bottom:3px}.inspect-name strong{font-size:17px}.side-tag{font:7px var(--mono);padding:3px 4px;border:1px solid #5379ab;color:#9cc7ff}.side-tag.enemy{border-color:#9d4655;color:#ed959e}.role{color:#a1b5ce;font-size:9px;display:block;margin-bottom:7px}.meter{height:18px;position:relative;border:1px solid #475b71;background:#080f1d;overflow:hidden;margin-top:4px;font:10px var(--mono)}.meter i{display:block;height:100%;background:linear-gradient(90deg,#1c886e,#6ed39e);transition:width .45s}.meter.en{height:14px;font-size:8px}.meter.en i{background:linear-gradient(90deg,#1d6baa,#52b8de)}.meter span{position:absolute;inset:0;padding:2px 5px;line-height:1;z-index:1;color:#fff;text-shadow:0 1px 2px #000}.meter small{font:inherit;opacity:.8}.inspect-stats{font-size:9px;color:#d1dded;margin-top:7px;white-space:nowrap}.empty-inspector{padding:9px 5px;color:#a7bad3}.empty-inspector>span{font:11px var(--mono);letter-spacing:.15em;color:#7189a7}.empty-inspector p{font-size:14px;color:#d9e5f6}.empty-inspector small{font-size:11px;line-height:1.5}.commands{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;margin-top:12px}.commands button{font-size:12px;font-weight:700}.commands .active{background:#23558c;border-color:#8fc8ff;box-shadow:inset 0 0 8px #62a7ff33}.commands .special-button{color:#ebcc8b}.commands .special-button.active{border-color:#e3be79;background:#5a4727}.weapon-note{display:flex;justify-content:space-between;font-size:9px;color:#c1cfe1;margin-top:9px;gap:8px}.weapon-note b{white-space:nowrap;color:#d5bc86}.roster{display:flex;gap:5px;margin-top:20px}.roster button{flex:1;min-width:0;min-height:66px;position:relative;background:#111e30;padding:4px 1px;border-color:#2f435e}.roster img{height:36px;width:100%;object-fit:contain;image-rendering:pixelated}.roster span{display:block;font-size:9px;color:#bdcde3}.roster .current{border-color:#dfc47d;background:#27364a}.roster .destroyed{filter:grayscale(1)}.turn-footer{display:flex;justify-content:space-between;align-items:center;border-top:1px solid #2b3d57;margin-top:16px;padding-top:12px;gap:12px}.turn-footer>span{font-size:11px;color:#bccce1}.turn-footer small{display:block;color:#73aa9b;font-size:8px;margin-top:5px}.end-turn{padding:0 20px;border-color:#856649;background:linear-gradient(#3d342a,#28251f);font-size:12px;font-weight:700;color:#f1d6a2}.end-turn b{margin-left:15px}.desktop-brief{padding-top:30px;color:#7a90ac}.desktop-brief>p:first-child{font:8px var(--mono);letter-spacing:.2em}.desktop-brief h2{font-size:25px;letter-spacing:.2em;color:#c7d8ed;margin:9px 0}.desktop-brief>span{color:#b99b66;font-size:10px}.desktop-brief p{font-size:11px}.desktop-brief small{font-size:10px;line-height:1.8}.dialogue-screen{min-height:100svh;background:#0c1421;padding-bottom:20px;display:flex;flex-direction:column}.dialogue-backdrop{position:relative;min-height:350px;flex:1;background:linear-gradient(#0a152346,#091320ab),url('assets/industrial_background.webp') center/cover;border-bottom:3px solid #75839a;display:flex;flex-direction:column}.scene-label{padding:16px 25px;color:#cad5e7;font:10px var(--mono);letter-spacing:.06em;display:flex;gap:17px;background:#09101b88}.scene-label span{color:#ddc58c}.scene-window{position:relative;min-height:280px;display:grid;place-items:center;flex:1;overflow:hidden}.scene-mecha{height:280px;max-height:40svh;width:70%;object-fit:contain;image-rendering:pixelated;filter:drop-shadow(0 8px 12px #000b)}.venue-mark{font:900 65px var(--mono);letter-spacing:.12em;color:#ebecf322;text-align:center;text-shadow:1px 1px #ffffff14}.venue-mark small{display:block;font:9px var(--mono);letter-spacing:.22em}.dialogue-box{position:relative;display:flex;gap:22px;min-height:185px;background:linear-gradient(120deg,#1d3150,#101e37 75%);border:2px solid #8093b1;margin:20px 25px 0;box-shadow:inset 0 0 0 3px #101726,0 6px 25px #0007;padding:18px;cursor:pointer;touch-action:manipulation}.portrait-frame{width:112px;min-width:112px;height:140px;border:2px solid #657b98;background:#090f1a;overflow:hidden;box-shadow:inset 0 0 10px black}.dialogue-content{flex:1;min-width:0;position:relative;padding-bottom:25px}.speaker{display:flex;align-items:center;gap:18px;border-bottom:1px solid #6a7f9d66;padding-bottom:9px}.speaker b{font-size:16px;color:#f5d99a}.speaker span{font:8px var(--mono);letter-spacing:.16em;color:#8ea6c9}.dialogue-content p{font-size:17px;line-height:1.85;margin:13px 0 5px}.next-hint{position:absolute;bottom:0;right:0;font:8px var(--mono);letter-spacing:.13em;color:#98aec9}.next-hint b{color:#f2cc83;font-size:10px}.dialogue-controls{display:flex;justify-content:space-between;align-items:center;margin:10px 25px 0;color:#7b91ae;font:10px var(--mono)}.comms-portrait{width:100%;height:100%;background:repeating-linear-gradient(0deg,#172c41 0 3px,#112237 3px 5px);display:flex;flex-direction:column;align-items:center;justify-content:center;color:#f08a91;border:4px solid #2b455b}.comms-portrait span{font:700 35px var(--mono);letter-spacing:-.08em}.comms-portrait small{font:6px var(--mono);margin-top:14px;color:#99a9ba}.comms-portrait.local{color:#7cacdb}.battle-screen{min-height:100svh;background:#0a1321;padding-bottom:20px}.battle-status{display:grid;grid-template-columns:1fr 36px 1fr;align-items:center;padding:20px 25px;background:#101c2e}.battle-stat{min-width:0}.battle-stat>span{font:8px var(--mono);letter-spacing:.13em;color:#72a9ec;display:block;margin-bottom:7px}.battle-stat>strong{font-size:13px;display:block;margin-bottom:10px;min-height:20px}.battle-stat.enemy>span{color:#eb8192}.battle-stat.enemy .hp i{background:linear-gradient(90deg,#9e3046,#e06572)}.versus{text-align:center;font:bold 12px var(--mono);color:#dcba7d}.battle-arena{height:360px;background:url('assets/industrial_background.webp') center 60%/cover;position:relative;overflow:hidden;isolation:isolate;border-top:1px solid #7587a4;border-bottom:1px solid #7587a4}.battle-overlay{position:absolute;inset:0;background:linear-gradient(#0a142255,#0a142200 45%,#0a1422aa);z-index:-1}.fighter{position:absolute;width:37%;height:73%;bottom:7%;display:flex;align-items:end;justify-content:center}.fighter.left{left:7%}.fighter.right{right:7%}.battle-mecha{width:100%;height:100%;object-fit:contain;object-position:center bottom;image-rendering:pixelated;filter:drop-shadow(2px 5px 5px #000a);z-index:2}.ground-shadow{position:absolute;bottom:0;width:72%;height:12%;background:#02091591;border-radius:50%;filter:blur(5px);z-index:1}.hit-effect{position:absolute;bottom:18%;width:38%;height:58%;opacity:0;mix-blend-mode:screen;z-index:4;pointer-events:none}.hit-effect.left{left:5%}.hit-effect.right{right:5%}.hit-effect img{height:100%;width:100%;object-fit:contain;image-rendering:pixelated}.damage-number{position:absolute;bottom:39%;width:35%;text-align:center;z-index:6;opacity:0;pointer-events:none;transform:translateY(15px);text-shadow:2px 2px #52131b,-2px -2px #331b29,0 0 10px #000}.damage-number.left{left:6%}.damage-number.right{right:6%}.damage-number small{font:8px var(--mono);display:block;letter-spacing:.12em;color:#ffb5a4}.damage-number strong{font:900 42px var(--mono);color:#fff4c8}.arena-caption{position:absolute;bottom:10px;left:16px;font:7px var(--mono);letter-spacing:.12em;color:#bdc5d1a1}.resolved .damage-number{opacity:1;transform:translateY(0)}.battle-dialogue{display:flex;gap:20px;margin:20px 25px 0;background:linear-gradient(110deg,#203654,#12223e);border:2px solid #7186a4;padding:12px;box-shadow:inset 0 0 0 2px #101725;min-height:125px}.battle-dialogue .portrait-frame{width:85px;min-width:85px;height:106px}.battle-dialogue>div:last-child{padding:4px 4px 4px 0}.battle-dialogue b{font-size:13px;color:#f4d58b}.battle-dialogue p{font-size:15px;line-height:1.8;margin:10px 0 0}.battle-result{display:flex;justify-content:space-between;align-items:center;padding:18px 25px;gap:15px}.battle-result>div{min-width:0}.battle-result span{display:block;font-size:10px;color:#a7bed8;margin-bottom:6px}.battle-result strong{display:block;font:14px var(--mono);color:#e0c58e}.battle-result button{font-size:12px;padding:0 17px;min-width:145px}.battle-result .ready{border-color:#b7a170;color:#e8cd92}.battle-settings{display:flex;justify-content:space-between;align-items:center;padding:0 25px}.battle-settings small{font-size:9px;color:#778eab}.ending-screen{position:relative;isolation:isolate;min-height:100svh;overflow:hidden}.ending-content{max-width:640px;margin:auto;text-align:center;padding:38px 30px}.ending-content .eyebrow{justify-content:center}.ending-content h1{font:900 68px/.95 var(--mono);letter-spacing:-.065em;margin:28px 0 24px;color:#e1e5eb;text-shadow:3px 3px #0b1423}.ending-content h1 em{font-style:normal;color:#e7bd6d;letter-spacing:.02em}.failed .ending-content h1 em{color:#e45464}.ending-message{font-size:18px;letter-spacing:.12em;line-height:1.8}.ending-units{display:flex;align-items:end;justify-content:center;gap:4px;margin:30px -10px 25px}.ending-units img{width:20%;height:110px;object-fit:contain;object-position:center bottom;image-rendering:pixelated;filter:drop-shadow(0 6px 4px #0008)}.result-grid{display:grid;grid-template-columns:repeat(4,1fr);border-top:1px solid #7280946b;border-bottom:1px solid #7280946b;padding:18px 0}.result-grid>div{border-right:1px solid #53657c66}.result-grid>div:last-child{border:0}.result-grid small{display:block;font:9px var(--mono);color:#a4b2c6;margin-bottom:8px}.result-grid b{font:28px var(--mono)}.result-grid b small{display:inline;font:11px var(--mono)}.next-chapter{font:12px var(--mono);letter-spacing:.15em;color:#d0b474;margin:24px 0}.next-chapter small{font:10px var(--font);display:block;color:#8294b0;margin-top:10px;letter-spacing:0}.ending-buttons{display:flex;gap:10px;margin:25px 0}.ending-buttons button{flex:1;font-size:12px;padding:0 10px}.fiction-note{font-size:9px;color:#7e91ac;line-height:1.9;max-width:450px;margin:20px auto 0;text-align:left}.modal-backdrop{position:fixed;inset:0;background:#03070dd9;backdrop-filter:blur(5px);z-index:100;display:grid;place-items:center;padding:20px}.modal{width:min(100%,490px);max-height:90svh;background:linear-gradient(120deg,#1a2b44,#101c30);border:2px solid #7487a5;box-shadow:0 15px 80px #000b;display:flex;flex-direction:column;border-radius:4px}.modal>header{display:flex;align-items:center;justify-content:space-between;padding:13px 18px;border-bottom:1px solid #3b4e69}.modal h2{font:700 14px var(--mono);color:#e9cd91;margin:0;letter-spacing:.08em}.modal-body{padding:20px;overflow:auto}.modal-body>p{font-size:14px;margin:0 0 20px}.modal-body>.primary{width:100%}.help-steps{padding:0 0 0 22px;margin:0 0 20px}.help-steps li{padding-left:5px;margin-bottom:18px;color:#edc77c;font-size:13px}.help-steps b{display:block;color:#e2edff}.help-steps span{display:block;font-size:11px;color:#9fb4ce;margin-top:6px;line-height:1.6}.help-box{background:#0b1729;border-left:2px solid #c6a26a;padding:13px}.help-box b{font-size:12px;color:#e3c78f}.help-box p{font-size:11px;color:#b7c6db}.modal-note{font-size:10px!important;color:#8fa4c1;line-height:1.9;margin:16px 0!important}.modal-buttons,.menu-list{display:grid;gap:10px}.modal-buttons button,.menu-list button{font-size:13px}.credits p{font-size:12px;color:#b6c6de}.credits b{color:#e0ca9f;font-size:12px}#toast{position:fixed;left:50%;bottom:calc(20px + env(safe-area-inset-bottom));transform:translate(-50%,10px);opacity:0;pointer-events:none;background:#1a2d47f5;border:1px solid #8b9fba;box-shadow:0 8px 28px #0008;color:#e4efff;padding:12px 18px;font-size:12px;line-height:1.5;z-index:200;max-width:90%;width:max-content;transition:.2s}#toast.show{opacity:1;transform:translate(-50%,0)}.image-fallback{display:grid!important;place-items:center;background:#17283d;color:#91a9c7;font:9px var(--font);padding:5px;text-align:center;overflow:hidden;min-width:20px;min-height:20px}
@keyframes impact{0%,100%{opacity:0;transform:scale(.6)}35%,65%{opacity:1;transform:scale(1.12)}}@keyframes damage{0%{opacity:0;transform:translateY(15px)}40%,100%{opacity:1;transform:translateY(0)}}
@media(min-width:780px){.dialogue-screen,.battle-screen{min-height:780px;max-width:940px;margin:auto;border-left:1px solid #263c56;border-right:1px solid #263c56}.battle-arena{height:390px}.dialogue-backdrop{min-height:410px}}
@media(max-width:779px){.game-header,.title-header{padding:0 15px;height:56px}.brand-logo{width:58px;height:36px}.brand b{font-size:10px;padding-left:8px}.brand{gap:7px}.header-label{font-size:8px;letter-spacing:0}.header-tools{gap:4px}.icon-button{width:39px;min-width:39px;min-height:39px;font-size:11px}.edition{font-size:7px;letter-spacing:.04em}.eyebrow{font-size:8px;letter-spacing:.16em;margin-bottom:18px}.stage-stamp{gap:10px;margin:15px 0 0}.stage-stamp>span{font-size:7px;padding-right:10px;gap:1px}.stage-stamp>span b{font-size:23px}.stage-stamp strong{font-size:12px;letter-spacing:.12em}.stage-stamp small{font-size:8px;margin-top:3px}.hero-unit{width:31%;height:75%;bottom:16%}.hero-0{left:-2%;z-index:4}.hero-1{left:17%;bottom:27%;height:67%}.hero-2{left:37%;bottom:31%;height:65%}.hero-3{left:52%;height:72%}.hero-4{left:74%;width:28%;height:69%}.hero-unit span{font-size:7px;bottom:-11px}.art-caption{font-size:7px;bottom:2%;left:0;letter-spacing:.18em}.title-actions .start-button{grid-column:1/-1;height:51px;font-size:13px;padding:0 20px}.title-actions button{height:44px;min-height:44px;font-size:9px;letter-spacing:.04em;padding:0 12px}.title-actions small{font-size:6px}.title-footer{padding:15px 20px;font-size:7px}.title-screen{min-height:100svh}.tactical-top{padding:10px 15px;gap:10px}.tactical-top>div{gap:12px}.phase-label{font-size:8px;padding-left:6px}.tactical-top strong{font-size:8px}.tactical-top strong b{font-size:18px}.tactical-top p{font-size:9px;line-height:1.4;max-width:135px}.tactical-top p span{font-size:7px;margin-bottom:2px}.tactical-layout{display:flex;flex-direction:column;padding:12px 14px 18px;gap:10px}.map-column{width:min(100%,400px,calc((100svh - 310px)*.8));min-width:268px}.map-meta{font-size:8px;margin-bottom:6px}.board-shell{padding:3px}.map-legend{font-size:8px;padding-top:6px}.command-column{width:min(100%,500px);margin:auto;position:relative}.operation-hint{font-size:10px;min-height:25px;padding:5px 8px;margin-bottom:6px}.unit-inspector{min-height:98px;padding:7px;gap:9px}.inspect-portrait{width:62px;min-width:62px;height:85px}.inspect-name{margin-bottom:2px;gap:8px}.inspect-name strong{font-size:14px}.side-tag{font-size:6px;padding:2px 4px}.role{font-size:8px;margin-bottom:4px}.meter{height:16px;font-size:9px;margin-top:3px}.meter.en{height:12px;font-size:7px}.meter span{padding:2px 4px}.inspect-stats{font-size:8px;margin-top:5px}.empty-inspector{padding:5px 2px}.empty-inspector>span{font-size:9px}.empty-inspector p{font-size:12px;margin:9px 0 5px}.empty-inspector small{font-size:9px}.commands{margin-top:7px;gap:6px}.commands button{font-size:11px;min-height:42px}.weapon-note{font-size:8px;margin-top:5px;min-height:13px}.roster{margin-top:8px;gap:5px}.roster button{min-height:44px;display:flex;align-items:center;justify-content:center;gap:2px;padding:3px 1px}.roster img{width:23px;height:30px}.roster span{font-size:8px}.turn-footer{margin-top:7px;padding-top:8px}.turn-footer>span{font-size:10px}.turn-footer small{font-size:7px;margin-top:3px}.end-turn{min-height:40px;font-size:11px;padding:0 15px}.desktop-brief{display:none}.dialogue-backdrop{min-height:260px}.scene-label{font-size:8px;padding:13px 16px;gap:10px}.scene-window{min-height:220px}.scene-mecha{height:250px;max-height:35svh}.venue-mark{font-size:44px}.venue-mark small{font-size:6px}.dialogue-box{margin:14px 13px 0;padding:12px;gap:12px;min-height:185px}.portrait-frame{width:82px;min-width:82px;height:116px}.speaker{padding-bottom:8px;gap:8px;align-items:start}.speaker b{font-size:12px;line-height:1.5}.speaker span{font-size:6px;white-space:nowrap;padding-top:3px}.dialogue-content p{font-size:14px;line-height:1.9;margin:10px 0 0}.dialogue-content{padding-bottom:23px}.next-hint{font-size:7px}.dialogue-controls{margin:8px 15px 0}.comms-portrait{border-width:3px}.comms-portrait span{font-size:28px}.comms-portrait small{font-size:5px}.battle-status{padding:14px 14px 13px;grid-template-columns:1fr 25px 1fr}.battle-stat>span{font-size:6px;letter-spacing:.04em;margin-bottom:5px}.battle-stat>strong{font-size:10px;min-height:24px;line-height:1.4;margin-bottom:5px}.versus{font-size:10px}.battle-stat .meter{font-size:8px;height:16px}.battle-stat .en{font-size:7px;height:12px}.battle-arena{height:clamp(245px,38svh,370px)}.fighter{width:43%;height:68%;bottom:10%}.fighter.left{left:3%}.fighter.right{right:3%}.damage-number strong{font-size:32px}.damage-number small{font-size:6px}.arena-caption{font-size:6px;bottom:8px;left:12px}.battle-dialogue{margin:13px 13px 0;padding:10px;gap:12px;min-height:118px}.battle-dialogue .portrait-frame{width:69px;min-width:69px;height:94px}.battle-dialogue b{font-size:11px}.battle-dialogue p{font-size:13px;margin-top:8px}.battle-result{padding:16px 14px;gap:10px}.battle-result span{font-size:9px}.battle-result strong{font-size:11px}.battle-result button{font-size:10px;padding:0 11px;min-width:125px;min-height:44px}.battle-settings{padding:0 13px;gap:8px}.battle-settings small{font-size:7px;max-width:155px;text-align:right}.battle-settings .quiet{font-size:10px}.ending-content{padding:27px 22px}.ending-content h1{font-size:58px;margin:24px 0}.ending-message{font-size:15px}.ending-units{margin:25px -9px 20px}.ending-units img{height:85px}.result-grid{padding:16px 0}.result-grid b{font-size:24px}.result-grid small{font-size:8px}.ending-buttons{margin-top:22px}.ending-buttons button{font-size:10px}.fiction-note{font-size:8px}.modal-backdrop{padding:15px}.modal>header{padding:10px 14px}.modal h2{font-size:12px}.modal-body{padding:17px}.help-steps li{margin-bottom:14px}.modal{max-height:92svh}}
@media(max-width:360px){.header-label{font-size:7px}.brand-logo{width:49px}.brand b{font-size:9px}.title-copy .eyebrow{font-size:7px}.title-actions button{font-size:8px}.map-column{min-width:260px}.tactical-layout{padding-left:10px;padding-right:10px}.dialogue-box{gap:9px;padding:10px}.portrait-frame{width:70px;min-width:70px;height:106px}.dialogue-content p{font-size:13px}.speaker b{font-size:11px}.battle-stat>strong{font-size:9px}.roster img{width:21px}.roster span{font-size:7px}.inspect-stats{font-size:7px}.commands button{font-size:10px}.header-tools .icon-button{width:34px;min-width:34px}}
@media(prefers-reduced-motion:reduce){*{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
/* Keep the map and active commands together on portrait phones. */
@media(max-width:779px){.map-column{width:min(100%,400px,calc((100svh - 450px)*.8))}.roster{display:none}.empty-inspector p{margin:8px 0 5px}.header-tools .icon-button{white-space:nowrap}}

/* Ver.2 prologue, square pilot windows, and the enemy action camera. */
.opening-screen {
  min-height:100svh;
  position:relative;
  display:flex;
  flex-direction:column;
  isolation:isolate;
  background:#0d192b;
}
.opening-art {
  flex:1 1 370px;
  min-height:260px;
  position:relative;
  background:linear-gradient(0deg,#0e1a2d 0%,transparent 48%),url('assets/industrial_background.webp') center 46%/cover;
  border-bottom:1px solid #667a968c;
}
.opening-sector {
  position:absolute;
  left:6%;
  bottom:18px;
  display:grid;
  gap:7px;
  color:#e8d0a2;
  font-size:12px;
  letter-spacing:.14em;
  text-shadow:0 2px 5px #000;
}
.opening-sector span {font-size:9px;color:#afbad0}
.opening-page {
  margin:0 auto;
  width:min(100%,860px);
  display:grid;
  grid-template-rows:auto auto 1fr auto;
  gap:12px;
  text-align:left;
  min-height:246px;
  padding:23px 30px 18px;
  background:linear-gradient(115deg,#202f4b,#101b2d);
  border:1px solid #788aa6;
  border-top:3px solid #d7b776;
  box-shadow:inset 0 0 0 3px #111c2c,0 14px 32px #0007;
  border-radius:0;
}
.opening-page:hover:not(:disabled) {background:linear-gradient(115deg,#243653,#14223a)}
.opening-kicker {font:10px var(--mono);letter-spacing:.18em;color:#dbc08f;display:flex;align-items:center;gap:12px}
.opening-kicker i {height:1px;width:22px;background:#7d90ad}
.opening-page strong {font-size:22px;letter-spacing:.19em}
.opening-copy {font-size:17px;line-height:1.9;color:#e6eefb;min-height:92px}
.opening-next {font-size:10px;color:#bdcbe1;text-align:right}
.opening-next b {color:#efca83;margin-left:6px}
.opening-controls {display:flex;justify-content:flex-end;max-width:860px;width:100%;margin:auto;padding:8px 13px 16px}
.screen-reader-only {position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
.portrait-frame,.battle-dialogue .portrait-frame {width:108px;height:108px;min-width:108px;aspect-ratio:1;flex:none;border-color:#858dbc}
.portrait-frame .portrait,.inspect-portrait .portrait {object-fit:contain;image-rendering:pixelated}
.inspect-portrait {width:84px;min-width:84px;height:84px;aspect-ratio:1;align-self:center}
.map-pawn {position:absolute;inset:0;pointer-events:none}
.cell.enemy-focus {box-shadow:inset 0 0 0 2px #f6cb76,0 0 10px #f1a85a80;z-index:6;background:#e392433b}
.cell.enemy-target {box-shadow:inset 0 0 0 2px #ff737e;z-index:5;background:#de424738}
.cell.enemy-path:not(.enemy-focus):not(.enemy-target) {background:#f194462c}
.cell.enemy-path:not(.occupied)::before {
  content:"";
  position:absolute;
  width:6px;
  height:6px;
  border:1px solid #edbd75;
  background:#e1954670;
  left:calc(50% - 3px);
  top:calc(50% - 3px);
  transform:rotate(45deg);
}
.board.locked .cell:disabled {opacity:1}
.cell .map-pawn.traveling {z-index:12}
.battle-return {font-size:11px;color:#d5c194;text-align:right}
.sound-level {display:grid;grid-template-columns:auto minmax(60px,1fr) 43px;gap:10px;align-items:center;min-height:44px;padding:4px 7px;font-size:12px;color:#d7e3f5}
.sound-level input {width:100%;accent-color:#edc480;min-height:34px}
.sound-level output {text-align:right;font-family:var(--mono)}
@media(max-width:779px){
  .opening-art {flex-basis:260px;min-height:215px}
  .opening-page {width:calc(100% - 26px);padding:17px 15px 13px;min-height:242px;gap:11px}
  .opening-page strong {font-size:19px}
  .opening-copy {font-size:15px;min-height:118px;line-height:1.9}
  .opening-sector {left:18px;bottom:15px}
  .portrait-frame,.battle-dialogue .portrait-frame {width:86px;height:86px;min-width:86px}
  .inspect-portrait {width:62px;min-width:62px;height:62px}
  .battle-dialogue {min-height:111px}
}
@media(max-width:360px){
  .portrait-frame,.battle-dialogue .portrait-frame {width:74px;height:74px;min-width:74px}
}

.battle-entry {
  --entry-accent:#ff943e;
  --entry-highlight:#fff1b7;
  position:fixed;
  inset:0;
  z-index:99;
  display:grid;
  place-items:center;
  overflow:hidden;
  isolation:isolate;
}
.battle-entry-special {
  --entry-accent:#ff622c;
  --entry-highlight:#effaff;
}
.entry-shutter {
  position:absolute;
  inset:0;
  background:
    repeating-linear-gradient(164deg,transparent 0 15px,#ffd3910c 15px 16px),
    linear-gradient(108deg,#151220 8%,#431923 57%,#211021 94%);
}
.entry-upper {
  clip-path:polygon(0 0,100% 0,100% 38%,0 63%);
  animation:entry-upper var(--entry-duration) cubic-bezier(.2,.8,.2,1) both;
}
.entry-lower {
  clip-path:polygon(0 61%,100% 36%,100% 100%,0 100%);
  animation:entry-lower var(--entry-duration) cubic-bezier(.2,.8,.2,1) both;
}
.entry-streaks {
  position:absolute;
  inset:-26% -24%;
  background:
    linear-gradient(transparent 43%,#ff642250 46%,var(--entry-accent) 49%,var(--entry-highlight) 50%,var(--entry-accent) 51%,#ff642250 54%,transparent 57%),
    repeating-linear-gradient(0deg,transparent 0 12px,#ffb97959 12px 13px,transparent 13px 26px,#fff0c07a 26px 28px);
  animation:entry-streaks var(--entry-duration) ease-out both;
}
.entry-signal {
  display:flex;
  align-items:center;
  gap:9px;
  position:relative;
  color:#fff9e7;
  animation:entry-signal var(--entry-duration) ease-out both;
}
.entry-signal span {
  padding:2px .45em 4px .53em;
  border-block:2px solid var(--entry-highlight);
  background:#1a101bea;
  font:italic 900 clamp(38px,12vw,70px)/1 var(--mono);
  letter-spacing:.07em;
  text-shadow:2px 2px var(--entry-accent),0 0 15px #ff8e54;
  transform:skewX(-12deg);
}
.entry-signal::before,.entry-signal::after {
  content:"";
  width:clamp(25px,11vw,86px);
  height:6px;
  background:linear-gradient(90deg,transparent,var(--entry-highlight));
  transform:skewX(-32deg);
}
.entry-signal::after {transform:scaleX(-1) skewX(-32deg)}
.entry-flash {
  position:absolute;
  inset:0;
  background:radial-gradient(ellipse at 50% 49%,#fffbeb 4%,#ffdeb6 32%,transparent 76%);
  animation:entry-flash var(--entry-duration) ease-out both;
}
@keyframes entry-upper {
  from {transform:translate3d(-12%,-68%,0)}
  53%,to {transform:translate3d(0,0,0)}
}
@keyframes entry-lower {
  from {transform:translate3d(12%,68%,0)}
  53%,to {transform:translate3d(0,0,0)}
}
@keyframes entry-streaks {
  0% {opacity:0;transform:translate3d(16%,6%,0) rotate(-14deg) scale(1.15)}
  32%,62% {opacity:1}
  100% {opacity:0;transform:translate3d(-15%,-3%,0) rotate(-14deg) scale(1.03)}
}
@keyframes entry-signal {
  0%,19% {opacity:0;transform:translateX(24px) scale(1.16)}
  40%,72% {opacity:1;transform:translateX(0) scale(1)}
  100% {opacity:0;transform:translateX(-16px) scale(.96)}
}
@keyframes entry-flash {
  0%,14%,78%,100% {opacity:0}
  33% {opacity:.55}
}

.weapon-banner {
  --plate-edge:#b6d8f2;
  --plate-fill:linear-gradient(105deg,#102033,#1b3046 52%,#0d1929);
  position:absolute;
  inset-inline:0;
  top:clamp(9px,2vw,16px);
  width:min(calc(100% - 20px),580px);
  margin-inline:auto;
  padding:8px 12px 10px;
  display:grid;
  justify-items:center;
  gap:3px;
  text-align:center;
  isolation:isolate;
  z-index:7;
}
.weapon-banner::before,.weapon-banner::after {
  content:"";
  position:absolute;
  clip-path:polygon(13px 0,100% 0,100% calc(100% - 13px),calc(100% - 13px) 100%,0 100%,0 13px);
}
.weapon-banner::before {inset:0;z-index:-2;background:var(--plate-edge)}
.weapon-banner::after {inset:1px;z-index:-1;background:var(--plate-fill)}
.weapon-banner>span {
  display:flex;
  align-items:center;
  gap:8px;
  color:var(--plate-edge);
  font-size:11px;
  font-weight:800;
  letter-spacing:.16em;
}
.weapon-banner>span::before,.weapon-banner>span::after {
  content:"";
  width:20px;
  height:1px;
  background:currentColor;
}
.weapon-banner strong {
  color:#f2f8ff;
  font-size:clamp(22px,6vw,38px);
  font-weight:900;
  line-height:1.24;
  letter-spacing:.035em;
  white-space:nowrap;
  text-shadow:2px 2px #070d18;
}
.special-attack .weapon-banner {
  --plate-edge:#ffcf7c;
  --plate-fill:linear-gradient(105deg,#271125,#65251b 52%,#271125);
  filter:drop-shadow(0 0 7px #f279386b);
}
.special-attack .weapon-banner strong {
  color:#fff0c2;
  font-size:clamp(23px,6.6vw,42px);
  text-shadow:2px 2px #351223,0 0 9px #f8884073;
}
.animating {
  --dash-start:calc(var(--strike-duration) * .12);
  --dash-time:calc(var(--strike-duration) * .49);
  --dash-shift:clamp(27px,7vw,62px);
  --dash-scale:1.04;
  --hit-shift:6px;
}
.animating.special-attack {
  --dash-start:calc(var(--strike-duration) * .22);
  --dash-shift:clamp(35px,9vw,75px);
  --dash-scale:1.1;
  --hit-shift:9px;
}
.animating .weapon-banner {
  animation:weapon-reveal min(160ms,calc(var(--strike-duration) * .24)) ease-out both;
}
.animating .attacker.left {animation:lunge-left var(--dash-time) var(--dash-start) ease-out both}
.animating .attacker.right {animation:lunge-right var(--dash-time) var(--dash-start) ease-out both}
.animating .defender {animation:shake calc(var(--strike-duration) * .32) var(--hit-at)}
.animating .hit-effect {animation:impact calc(var(--strike-duration) * .44) var(--hit-at)}
.animating .damage-number {
  animation:damage calc(var(--strike-duration) * .32) calc(var(--hit-at) + var(--strike-duration) * .15) forwards;
}
.strike-flash {
  --hit-x:72%;
  position:absolute;
  inset:0;
  z-index:3;
  pointer-events:none;
  background:
    radial-gradient(ellipse at var(--hit-x) 63%,#fff6e0 1%,#ffbe647d 17%,transparent 53%),
    linear-gradient(159deg,transparent 44%,#ffcc8733 49%,#fbfbff6e 50%,transparent 56%);
  opacity:0;
  animation:special-impact calc(var(--strike-duration) * .27) var(--hit-at) ease-out;
}
.strike-flash.left {--hit-x:28%}
@keyframes weapon-reveal {
  from {opacity:.24;transform:translateY(-6px) scaleX(1.035)}
  to {opacity:1;transform:translateY(0) scaleX(1)}
}
@keyframes lunge-left {
  0%,100% {transform:translateX(0)}
  45% {transform:translateX(var(--dash-shift)) scale(var(--dash-scale))}
}
@keyframes lunge-right {
  0%,100% {transform:translateX(0)}
  45% {transform:translateX(calc(0px - var(--dash-shift))) scale(var(--dash-scale))}
}
@keyframes shake {
  0%,100% {transform:translateX(0);filter:none}
  20%,60% {transform:translateX(var(--hit-shift));filter:brightness(1.4)}
  40%,80% {transform:translateX(calc(0px - var(--hit-shift)))}
}
@keyframes special-impact {
  0%,100% {opacity:0}
  28% {opacity:.82}
}
@media(prefers-reduced-motion:reduce){
  .battle-entry {background:#181625}
  .entry-shutter,.entry-streaks,.entry-flash,.strike-flash {display:none}
  .entry-signal,.animating .weapon-banner {animation:none}
}

.title-layout {
  flex:1;
  display:grid;
  align-content:center;
  justify-items:center;
  padding:18px 34px 24px;
}
.title-copy {width:min(100%,800px)}
.title-copy .eyebrow {justify-content:center;margin:0 0 6px}
.title-copy h1 {margin:0}
.title-logo {
  display:block;
  width:100%;
  height:auto;
  aspect-ratio:1536 / 513;
  mix-blend-mode:screen;
}
.title-art {
  width:min(100%,680px);
  height:clamp(170px,26svh,244px);
  position:relative;
  margin:-9px 0 10px;
  filter:drop-shadow(0 12px 8px #0009);
}
.title-brief,.title-actions {width:min(100%,760px)}
.title-brief {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:9px;
  padding:8px 0;
  border-block:1px solid #8c9eaf40;
}
.title-story {
  margin:0;
  color:#c8d7e8;
  font-size:14px;
  font-weight:700;
  line-height:1.55;
  letter-spacing:.08em;
  text-align:right;
}
.title-actions {
  display:grid;
  grid-template-columns:1.25fr 1fr 1fr;
  gap:12px;
  margin-top:4px;
}
@media(max-width:779px) {
  .title-layout {padding:18px 16px 22px}
  .title-art {width:calc(100% + 10px);height:clamp(169px,26svh,222px);margin:8px -5px}
  .title-brief {padding:9px 0;gap:8px}
  .title-brief .stage-stamp {margin:0}
  .title-story {max-width:12em;font-size:11px}
  .title-actions {grid-template-columns:1fr 1fr;gap:9px}
}
@media(max-width:360px) {
  .title-layout {padding-inline:14px}
  .title-story {font-size:10px}
}

.map-dialogue-layer {
  position:fixed;
  inset:0;
  z-index:80;
  display:grid;
  align-items:end;
  justify-items:center;
  overflow:auto;
  overscroll-behavior:contain;
  padding:12px 12px max(12px,env(safe-area-inset-bottom));
  background:linear-gradient(0deg,#060b14d9 0%,#060b1444 44%,#060b141f 100%);
}
.map-dialogue-panel {
  width:min(100%,700px);
  background:#0c1728;
  border:1px solid #8093b1;
  border-top:3px solid #d7b776;
  box-shadow:0 8px 34px #000b;
}
.map-dialogue-panel .scene-label {padding:9px 14px;border-bottom:1px solid #384b66}
.map-dialogue-panel .dialogue-box {
  margin:0;
  min-height:148px;
  padding:14px;
  border:0;
  box-shadow:none;
}
.map-dialogue-panel .dialogue-box:focus-visible {outline-offset:-3px}
.map-dialogue-panel .dialogue-controls {margin:0;padding:0 14px;border-top:1px solid #384b66}
.map-dialogue-panel .dialogue-controls button,.narration-panel .dialogue-controls button {min-height:44px}

.map-knockout {position:absolute;inset:0;z-index:15;pointer-events:none}
.map-blast {
  position:absolute;
  left:var(--blast-x,50%);
  top:var(--blast-y,42%);
  width:175%;
  height:175%;
  max-width:none;
  object-fit:contain;
  image-rendering:pixelated;
  transform:translate(-50%,-50%);
  animation:map-blast 190ms ease-out both;
}
.map-blast.upper-left {--blast-x:22%;--blast-y:22%}
.map-blast.lower-right {--blast-x:76%;--blast-y:65%}
.map-blast.upper-right {--blast-x:72%;--blast-y:21%}
.map-blast.final {
  width:330%;
  height:330%;
  filter:drop-shadow(0 0 12px #ffae49);
  animation-duration:480ms;
}
@keyframes map-blast {
  0% {opacity:.65;transform:translate(-50%,-50%) scale(.5)}
  30% {opacity:1}
  100% {opacity:0;transform:translate(-50%,-50%) scale(1.15)}
}
.narration-screen {
  display:grid;
  place-items:center;
  min-height:100svh;
  padding:24px 16px;
  background:#05070d;
}
.narration-panel {width:min(100%,620px);animation:narration-reveal .45s ease-out both}
.narration-panel .eyebrow {margin:0;color:#d7b776}
.narration-panel h2 {font-size:18px;margin:12px 0 18px}
.narration-page {
  position:relative;
  width:100%;
  min-height:146px;
  padding:18px 18px 35px;
  border-color:#405675;
  background:#0d1727;
  font-size:clamp(16px,3.7vw,20px);
  line-height:1.85;
  text-align:left;
}
.narration-page .next-hint {bottom:12px;right:14px}
.narration-panel .dialogue-controls {margin:4px 0 0}
@keyframes narration-reveal {from {opacity:0} to {opacity:1}}
@media(prefers-reduced-motion:reduce) {
  .map-blast {animation:none;opacity:.85}
}

.palette-definitions {position:absolute;overflow:hidden}
.portrait-frame {position:relative}
.portrait-frame .portrait-source {
  position:absolute;
  left:calc((1 - var(--portrait-zoom)) * 50%);
  top:var(--portrait-top,0%);
  width:calc(var(--portrait-zoom) * 100%);
  height:calc(var(--portrait-zoom) * 100%);
  max-width:none;
  object-fit:cover;
  object-position:center top;
  filter:url(#pilot-indigo);
}
.cell[data-unit-type="kaiser"] .map-unit {
  width:174%;
  height:184%;
  left:-37%;
  bottom:6%;
  object-position:center bottom;
}
.battle-arena.boss-battle {height:520px}
.boss-battle .fighter.left {height:284.7px;z-index:3}
.boss-battle .fighter.kaiser-mecha {
  width:70%;
  height:auto;
  top:88px;
  right:3%;
  bottom:10%;
  z-index:2;
}
@media(max-width:779px) {
  .battle-arena.boss-battle {height:clamp(300px,45svh,430px)}
  .boss-battle .fighter.left {height:calc(clamp(245px,38svh,370px) * .68)}
  .boss-battle .fighter.kaiser-mecha {top:68px}
}

.end-roll-screen {position:fixed;inset:0;z-index:20;overflow:hidden;background:#000;color:#fff;text-align:center;overscroll-behavior:none}
.end-roll-prelude {position:absolute;inset:0;display:grid;place-items:center;padding:24px}
.end-roll-prelude h1 {font-size:clamp(34px,8vw,64px);letter-spacing:.08em;margin:0;color:#fff}
.end-roll-screen:not([data-roll-phase="intro"]) .end-roll-prelude {display:none}
.end-roll-skip {position:absolute;z-index:2;top:max(12px,env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right));min-width:62px;min-height:44px;padding:0 12px;border-color:#ffffff55;background:#000;color:#fff;font:12px var(--mono);letter-spacing:.12em;opacity:var(--roll-opacity,1)}
.end-roll-track {position:absolute;top:0;left:50%;width:min(650px,calc(100% - 48px));will-change:transform;transform:translate3d(-50%,100vh,0);opacity:var(--roll-opacity,1);overflow-wrap:anywhere;font-size:clamp(15px,3.9vw,19px);line-height:1.95}
.end-roll-heading {margin:0 0 100px}
.end-roll-heading h1 {margin:0;font-size:clamp(21px,5.4vw,34px);line-height:1.65}
.end-roll-heading p {margin:22px 0 0;font:700 18px var(--mono);letter-spacing:.23em}
.end-roll-story p {margin:0 0 52px;line-height:1.95}
.end-roll-credits {margin-top:160px}
.end-roll-credits h2 {font-size:clamp(15px,3.8vw,21px);letter-spacing:.08em;margin:0 0 90px}
.end-roll-credit {margin-bottom:82px}
.end-roll-credit h3 {font-size:15px;font-weight:400;margin:0 0 16px}
.end-roll-credit p {font-size:clamp(18px,4.5vw,24px);line-height:1.8;margin:0}
.end-roll-credit .end-roll-url {font-size:clamp(13px,3.4vw,16px);margin-top:12px}
.end-roll-closing {margin-top:190px}
.end-roll-closing h2 {font-size:clamp(18px,4.6vw,28px);line-height:1.6;margin:0 0 42px}
.end-roll-closing>p {font-size:clamp(17px,4.4vw,24px);margin:0}
.end-roll-closing .end-roll-final {font:700 clamp(32px,8.5vw,52px) var(--mono);letter-spacing:.16em;line-height:1.4;margin:60px 0 38px}
.end-roll-closing .end-roll-copyright {font-size:13px;letter-spacing:.08em}
/* The trial gate pauses the shared game flow; no gameplay parameters change. */
body:has(.unlock-screen) { min-width: 0; }
.unlock-screen { min-height: 100dvh; padding: 22px 18px 40px; background: radial-gradient(ellipse at top, #1c3156, #090e19 65%); }
.unlock-header { display: flex; align-items: center; justify-content: space-between; max-width: 760px; margin: 0 auto 28px; color: #9eabc1; font-size: 12px; }
.unlock-panel { max-width: 520px; margin: auto; padding: clamp(20px, 5vw, 36px); background: #101d34; border: 2px solid #8c9bb0; box-shadow: 0 0 0 4px #050910, 8px 8px 0 #0008; }
.unlock-kicker { color: #b5c7e5; font-size: 12px; letter-spacing: .08em; }
.unlock-panel h1 { color: #ffd76e; font: 900 clamp(24px, 7vw, 38px)/1.2 Impact, sans-serif; letter-spacing: .04em; margin: 14px 0 24px; white-space: nowrap; }
.unlock-panel p { line-height: 1.8; }
.unlock-lead { font-weight: 800; font-size: 18px; }
#unlock-form { display: grid; gap: 10px; margin-top: 24px; }
#unlock-form label { font-size: 14px; font-weight: 700; }
#unlock-password { width: 100%; min-height: 50px; border: 1px solid #9eabc1; border-radius: 3px; background: #071222; color: white; padding: 10px 12px; font-size: 18px; }
#unlock-password:focus { outline: 2px solid #ffd76e; outline-offset: 2px; }
.unlock-panel button { width: 100%; min-height: 48px; padding: 12px; font-size: 15px; }
.unlock-panel > .secondary { margin-top: 15px; }
.unlock-error { min-height: 22px; margin: 0; color: #ffabac; font-size: 14px; }
.unlock-purchase { margin-top: 24px; padding: 14px; border: 1px solid #586e90; background: #09152a; }
.unlock-purchase summary { cursor: pointer; font-size: 15px; font-weight: 700; min-height: 28px; }
.unlock-purchase ul { padding-left: 1.3em; margin: 14px 0 0; }
.unlock-purchase li { margin-top: 12px; line-height: 1.8; font-size: 14px; }
.unlock-purchase a { color: #ffd76e; text-decoration: underline; overflow-wrap: anywhere; }
.purchase-pending { display: block; font-size: 12px; color: #aab9cf; }
.unlock-note { margin-top: 20px; color: #b5c4da; font-size: 12px; }
.trial-label { margin: 0 0 4px; color: #e8cf8a; font-size: 12px; text-align: center; line-height: 1.5; }
