*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#0a1822;color:#fff1cf;font-family:Trebuchet MS,Arial,sans-serif;touch-action:manipulation}button{font:inherit;cursor:pointer;color:inherit;border:1px solid #779290;background:#203d49;border-radius:9px;padding:11px 19px;box-shadow:0 4px 0 #081d27;transition:background .15s,transform .15s}button:hover{background:#315767}button:active{transform:translateY(3px);box-shadow:0 1px 0 #081d27}button:focus-visible{outline:3px solid #ffe19b;outline-offset:3px}button.primary{background:#f7b957;color:#23303c;border-color:#ffda83;font-weight:bold}button:disabled{opacity:.4;cursor:default}#game{position:absolute;width:min(100vw,133.333333vh);height:min(100vh,75vw);left:50%;top:50%;transform:translate(-50%,-50%);overflow:hidden;background:#182f43;isolation:isolate}canvas{touch-action:none;width:100%;height:100%;display:block}#hud{position:absolute;inset:0 0 auto;display:flex;justify-content:space-between;align-items:flex-start;padding:calc(12px + env(safe-area-inset-top)) calc(17px + env(safe-area-inset-right)) 12px calc(17px + env(safe-area-inset-left));background:linear-gradient(#102936ed,transparent);pointer-events:none;gap:14px}#hud[hidden],#touch[hidden]{display:none}.status{width:24%;max-width:215px}.status strong{font-size:15px;letter-spacing:1px}.health{height:11px;background:#0b202b;border:2px solid #fff1cf99;border-radius:8px;margin-top:6px;overflow:hidden}.health i{display:block;width:100%;height:100%;background:#ffbe65;transition:width .2s}small{font-size:11px;display:block;margin-top:4px}.chapter{text-align:center}.chapter b{font-size:15px}.chapter small{color:#c2dedd}.utility{display:flex;align-items:center;gap:8px}.utility button{pointer-events:auto;padding:7px 12px}.utility span{font-weight:bold;color:#ffcf76;font-size:14px}#overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:18px;pointer-events:none}#overlay>*{pointer-events:auto}.panel{background:linear-gradient(135deg,#173240f5,#102431f7);border:1px solid #b7b68f65;border-radius:18px;padding:26px 34px;max-width:720px;text-align:center;box-shadow:0 18px 60px #07111c80}.eyebrow{font-size:11px;letter-spacing:4px;font-weight:bold;color:#f6c97f;text-transform:uppercase;margin-bottom:10px}h1{font-size:60px;line-height:.9;letter-spacing:-3px;margin:0;color:#fff0c9;text-shadow:0 5px #142835}h1 span{display:block;color:#ffbc58;font-size:30px;letter-spacing:8px;line-height:1.6}h2{font-size:30px;margin:6px 0 12px}p{line-height:1.5;color:#c6dcda;font-size:14px;margin:12px 0}.row{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}.hero-select{display:flex;gap:9px;margin:20px 0 14px}.hero-select button{flex:1;padding:12px 8px;background:#1c3a49}.hero-select button.selected{border:2px solid #ffd082;background:#36545b}.hero-select b{display:block;font-size:16px}.hero-select small{font-size:10px;color:#c6dcda}.menu{margin-right:27%;max-width:620px;background:linear-gradient(100deg,#142f40f5,#142f40ba);text-align:left}.menu .row{justify-content:flex-start}.menu p{max-width:430px}.foot{font-size:10px;letter-spacing:1px;color:#adc2c2;margin-top:17px}.choice{flex:1;min-width:155px;padding:20px 12px}.choice strong{display:block;color:#ffd082;font-size:18px}.choice small{max-width:175px;font-size:12px;margin:10px auto}.key{padding:3px 7px;background:#33515c;border-radius:4px;color:#fff1cf;white-space:nowrap}.stats{font-size:13px;color:#ffcd82}.panel.compact{max-width:570px}.chapter-map{display:flex;justify-content:center;gap:12px;margin:18px 0}.chapter-map i{font-style:normal;width:32px;height:32px;border:1px solid #87988d;border-radius:50%;line-height:30px;background:#243e47}.chapter-map i.done{background:#d59848;color:#142635}#touch{position:absolute;inset:auto 0 0;height:135px;pointer-events:none;padding:0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}.pad{position:absolute;left:18px;bottom:13px;width:145px;height:115px}.pad button{position:absolute;width:46px;height:43px;padding:0;pointer-events:auto;background:#193441bb;border:1px solid #acc7c980;box-shadow:none;user-select:none}.up{top:0;left:48px}.down{bottom:0;left:48px}.left{left:0;top:37px}.right{right:0;top:37px}.actions{position:absolute;right:20px;bottom:25px;display:flex;align-items:center;gap:9px}.actions button{pointer-events:auto;border-radius:50%;width:60px;height:60px;padding:0;font-size:10px;background:#234353cc;user-select:none}.actions .strike{width:77px;height:77px;background:#cc9145dd;color:#112637;font-weight:bold}#rotate{display:none;position:absolute;bottom:0;left:0;right:0;background:#102a36e8;text-align:center;padding:6px;font-size:11px}@media(pointer:coarse){#touch:not([hidden]){display:block}}@media(max-width:900px),(max-height:500px){.panel{padding:14px 22px;border-radius:12px}h1{font-size:38px}h1 span{font-size:20px;letter-spacing:5px}h2{font-size:23px}p{font-size:12px;margin:8px 0}.eyebrow{font-size:9px;margin-bottom:6px}.hero-select{margin:10px 0;gap:5px}.hero-select button{padding:8px 5px}.hero-select b{font-size:12px}.hero-select small{font-size:9px}button{padding:8px 13px}.foot{font-size:8px;margin-top:11px}.menu{margin-right:24%}.status strong,.chapter b{font-size:11px}.chapter small,small{font-size:9px}.utility{gap:5px}.utility span{font-size:11px}.utility button{padding:5px 9px}#hud{padding:8px 12px;gap:7px}.choice{padding:12px 8px;min-width:120px}.choice strong{font-size:14px}.choice small{font-size:10px}.panel .row{gap:7px}.chapter-map{margin:10px 0}.chapter-map i{width:26px;height:26px;line-height:24px}.pad{transform:scale(.82);transform-origin:bottom left;left:10px;bottom:8px}.actions{transform:scale(.82);transform-origin:bottom right;right:10px;bottom:13px}}
.route-panel{width:800px;max-width:95%;padding:18px 24px}.route-panel h2{font-size:24px}.route-scroll{max-height:270px;overflow-y:auto;touch-action:pan-y}.route-nodes{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:5px}.route-nodes button{text-align:left;padding:10px;box-shadow:none;border-color:#ffce78}.route-nodes button b{display:block;font-size:13px;margin:4px 0}.route-nodes button.visited{border-color:#577577;background:#142e3c}.route-nodes small{font-size:9px}.route-flags span{display:inline-block;margin:2px 5px;opacity:.6;font-size:11px}.route-flags .found{color:#ffd38b;opacity:1}@media(max-height:500px){.route-panel{padding:10px 16px}.route-panel h2{font-size:20px;margin:2px}.route-scroll{max-height:170px}.route-panel p{margin:5px 0}.route-nodes button{padding:7px}.route-nodes button b{font-size:11px}}

#touch button{touch-action:none}.route-scroll{overscroll-behavior:contain}#overlay{touch-action:pan-y}

.audio-controls{display:flex;justify-content:center;gap:24px;margin:14px auto}.audio-controls label{display:flex;align-items:center;gap:8px;font-size:13px}.audio-controls input{width:110px;accent-color:#e8bf74}

/* The canvas and DOM share one proportionally fitted 4:3 presentation. */
#game{width:min(100vw,133.333333vh);height:min(100vh,75vw);width:min(100vw,133.333333dvh);height:min(100dvh,75vw);aspect-ratio:4/3;container-type:inline-size}
#hud{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 12px;padding:12px 16px}
#hud .status{width:100%;max-width:240px}#hud .status strong,#hud .chapter b{font-size:clamp(11px,2cqw,16px)}
#hud .chapter{grid-row:2;grid-column:1/-1;text-align:center}#hud small{font-size:clamp(10px,1.55cqw,12px)}
#hud .utility{grid-column:2;grid-row:1}.utility button{min-width:40px;min-height:40px}.utility span{font-size:14px}
#overlay{padding:12px}.panel{max-height:100%;overflow-y:auto;overscroll-behavior:contain}.menu{margin-right:0;width:min(560px,100%)}
.menu .row{justify-content:center}.menu{text-align:center}.menu p{max-width:none}.route-scroll{max-height:38cqw}
#touch{height:135px}.pad{transform:none;left:12px;bottom:10px}.actions{transform:none;right:12px;bottom:18px}
@container (max-width:560px){#hud{padding:6px 10px;gap:2px 6px}.utility button{padding:4px;min-width:34px;min-height:34px}.utility span{font-size:11px}.health{margin-top:3px}.panel{padding:10px}h1{font-size:30px}h1 span{font-size:17px}h2{font-size:21px}.menu p,.foot{display:none}.hero-select{margin:8px 0}.hero-select small{font-size:9px}.route-nodes{grid-template-columns:repeat(2,1fr)}.route-panel h2{font-size:20px}.pad{width:132px;height:103px}.pad button{width:42px;height:39px}.up,.down{left:45px}.left,.right{top:32px}.actions{gap:6px;right:8px;bottom:12px}.actions button{width:46px;height:46px;font-size:9px}.actions .strike{width:56px;height:56px}.audio-controls{gap:10px;flex-wrap:wrap}.audio-controls input{width:90px}}

/* Fit the longer display title without changing artwork or camera. */
.menu h1{font-size:clamp(28px,7cqw,48px)}

/* One entry action; configuration stays inside Options. */
.start-actions{margin-top:26px}.start-actions #play{min-width:160px;font-size:22px}
.utility #scrap,.utility #mute{display:none}.utility #pause{width:auto;padding:8px 14px}
.options-actions{margin-top:20px}.options-panel .hero-select{margin-top:12px}

/* GameMonetize menu actions. */
.more-games{display:inline-flex;align-items:center;justify-content:center;padding:12px 18px;border:1px solid currentColor;text-decoration:none;color:inherit;font:inherit;font-weight:bold;cursor:pointer}.more-games:hover{filter:brightness(1.2)}#gm-ad-status{position:absolute;bottom:16px;left:50%;transform:translateX(-50%);z-index:120;background:#101820;color:white;padding:10px 18px;border-radius:5px;pointer-events:none}.gm-ad-active{cursor:wait}
