:root{--green:#064e3b;--deep:#033b2c;--leaf:#17a653;--mint:#b9efc8;--ink:#17231b;--muted:#77877d;--line:#e4eee6;--body:"DM Sans",system-ui,sans-serif;--display:"Outfit",var(--body)}
*{box-sizing:border-box}html{min-height:100%;background:#f5faf6}body{margin:0;color:var(--ink);font-family:var(--body);background:radial-gradient(ellipse at 50% -10%,#e3f8e8 0,transparent 45%),#f5faf6}.game-header{height:70px;padding:0 max(4%,calc((100% - 1200px)/2));display:flex;align-items:center;justify-content:space-between;background:#ffffffec;border-bottom:1px solid #e9f0ea;backdrop-filter:blur(12px)}.back-link,.all-games{text-decoration:none;color:var(--green);font-size:12px;font-weight:800}.back-link span{font-size:18px;margin-right:7px}.game-brand{display:flex;align-items:center;gap:9px;color:var(--green);font:800 19px var(--display);letter-spacing:.4px}.brand-mark{width:32px;height:32px;border-radius:10px;background:var(--green);color:#c5f4d0;display:grid;place-items:center;font-size:22px}.game-brand b{color:#21a65a}.game-brand small{display:block;font:900 7px var(--body);letter-spacing:2px;color:#839188;margin-top:1px}.all-games{background:#eaf7ed;border-radius:9px;padding:10px 13px}.all-games span{margin-left:7px}.page-wrap{max-width:1200px;margin:0 auto;padding:34px 25px 50px}.intro-row{display:flex;align-items:center;justify-content:space-between;margin:0 auto 22px;max-width:1080px}.eyebrow{font-size:9px;letter-spacing:2px;font-weight:900;color:#16864a}.eyebrow i{display:inline-block;width:7px;height:7px;border-radius:50%;background:#2ac064;margin-right:8px;box-shadow:0 0 0 4px #22c55e20}.intro-row h1{font:800 39px/1.05 var(--display);letter-spacing:-1.2px;color:var(--green);margin:8px 0 5px}.intro-row h1 span{color:#e9b548;font-size:25px;vertical-align:6px}.intro-row p{font-size:12px;color:var(--muted);margin:0;line-height:1.7}.intro-stamp{display:flex;align-items:center;gap:10px;border:1px solid #dcebe0;background:#fff;padding:10px 14px;border-radius:12px;color:var(--green);font-size:8px;letter-spacing:1px;line-height:1.5}.intro-stamp span{font-size:27px}.cabinet{max-width:1080px;margin:auto;padding:11px;background:#fff;border:1px solid #dce9df;border-radius:19px;box-shadow:0 18px 48px #064e3b11}.hud{height:49px;display:flex;align-items:center;gap:24px;padding:0 8px 10px}.hud-stat{display:flex;flex-direction:column;gap:1px;min-width:72px}.hud-stat small{font-size:7px;font-weight:900;letter-spacing:1.4px;color:#95a199}.hud-stat b{font:800 17px var(--display);color:var(--green);font-variant-numeric:tabular-nums}.hud-region{margin-left:auto;display:flex;align-items:center;gap:8px;font-size:8px;font-weight:900;letter-spacing:1.25px;color:#16844b}.hud-region span:first-child{font-size:17px;color:#dcae44}.hud-life{font-size:14px;letter-spacing:3px;color:#e66d82;white-space:nowrap}.hud-button{width:32px;height:32px;border:1px solid #e1ece3;border-radius:9px;background:#f7fbf7;color:var(--green);font-size:17px}.stage{position:relative;width:100%;aspect-ratio:16/9;overflow:hidden;border-radius:12px;background:#d9f2e1;isolation:isolate}.stage canvas{display:block;width:100%;height:100%;touch-action:none}.stage-overlay{position:absolute;inset:0;display:grid;place-items:center;padding:16px;background:linear-gradient(90deg,#063f2a70,#063f2a30 55%,#063f2a50);transition:opacity .2s}.stage-overlay.hidden{opacity:0;pointer-events:none}.overlay-card{position:relative;width:min(470px,90%);padding:25px 34px 21px;border:1px solid #ffffffc7;border-radius:18px;background:#fffffff0;box-shadow:0 24px 80px #002d1e45;text-align:center;overflow:hidden}.overlay-card:before{content:"";position:absolute;width:190px;height:190px;right:-115px;top:-125px;border:1px solid #9bd7aa;border-radius:50%;box-shadow:0 0 0 17px #e9f8ec,0 0 0 18px #b6dfc1}.overlay-flag{display:flex;align-items:center;justify-content:center;gap:8px;font-size:7px;font-weight:900;letter-spacing:1.5px;color:#16844b}.overlay-flag>span:last-child{color:#e6b348;font-size:12px}.mini-flag{width:23px;height:15px;display:block;background:#006b3f;border-left:5px solid white;position:relative;border-radius:1px;overflow:hidden}.mini-flag:before{content:"";position:absolute;width:8px;height:8px;border-radius:50%;border:1.5px solid white;left:8px;top:3px}.mini-flag:after{content:"★";position:absolute;left:14px;top:1px;font-size:5px;color:white}.cover-plane{font-size:43px;color:#087648;text-shadow:3px 4px 0 #b4e9c1;margin:8px 0 0;transform:rotate(-8deg)}.overlay-kicker{font-size:8px;font-weight:900;letter-spacing:2px;color:#839389;margin-top:6px}.overlay-card h2{font:900 38px/.98 var(--display);letter-spacing:2px;color:var(--green);margin:7px 0 0}.overlay-card h2 em{color:#18a854;font-style:normal}.overlay-subtitle{font-size:9px;letter-spacing:3px;font-weight:900;color:#c28e2c;margin-top:5px}.overlay-card p{max-width:370px;margin:12px auto 15px;color:#738178;font-size:11px;line-height:1.7}.control-hints{display:flex;justify-content:center;gap:7px;margin-bottom:15px}.control-hints span{padding:6px 8px;border-radius:7px;background:#f0f8f1;color:#75847a;font-size:7px;font-weight:900;letter-spacing:.7px}.control-hints b{color:var(--green);margin-right:4px}.takeoff-button{width:100%;border:0;border-radius:10px;padding:13px 16px;background:linear-gradient(90deg,#07563a,#139650);color:#fff;font:900 11px var(--body);letter-spacing:1.4px;box-shadow:0 7px 18px #07563a35}.takeoff-button span{margin-left:8px;font-size:15px}.overlay-foot{display:block;color:#99a69c;font-size:6px;font-weight:900;letter-spacing:1.25px;margin-top:12px}.touch-controls{display:none;align-items:center;justify-content:space-between;padding:11px 5px 2px}.steer-controls{display:flex;align-items:center;gap:8px}.steer-controls button,.shield-control{height:44px;min-width:48px;border:1px solid #dfece2;background:#f5faf6;border-radius:11px;color:var(--green);font-size:21px;font-weight:800;touch-action:none}.steer-controls span{font-size:8px;letter-spacing:1px;font-weight:900;color:#87958b;margin-left:4px}.shield-control{padding:4px 12px;font-size:9px;letter-spacing:.8px}.shield-control span{font-size:17px;color:#18a455;vertical-align:-2px;margin-right:4px}.shield-control small{display:block;font-size:6px;color:#91a097;margin-top:1px}.cabinet-footer{display:flex;justify-content:space-between;gap:12px;padding:12px 5px 3px;color:#87958b;font-size:7px;letter-spacing:.8px;font-weight:900}.cabinet-footer b{color:#d2a339;margin-right:4px}.below-grid{max-width:1080px;margin:23px auto 0;display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.mission-card{display:flex;align-items:flex-start;gap:12px;padding:16px 17px;background:#fff;border:1px solid #e3eee5;border-radius:13px}.card-icon{width:36px;height:36px;flex:0 0 36px;display:grid;place-items:center;border-radius:10px;background:#eef8f0;font-size:18px}.mission-card h3{font:800 10px var(--display);letter-spacing:.4px;color:var(--green);margin:1px 0 5px}.mission-card p{font-size:9px;line-height:1.65;color:#7f8d83;margin:0}.tip-line{max-width:1080px;margin:14px auto 0;padding:12px 14px;border-radius:10px;background:#eaf6ec;color:#74847a;font-size:9px;line-height:1.6}.tip-line span{display:inline-block;padding:3px 6px;border-radius:5px;background:#d6efd9;color:var(--green);font-size:7px;font-weight:900;letter-spacing:1px;margin-right:7px}.game-footer{max-width:1080px;margin:0 auto;padding:0 25px 24px;display:flex;align-items:center;justify-content:space-between;color:#98a49b;font-size:8px;font-weight:800;letter-spacing:1px}.game-footer b{color:#18a653}.game-footer a{color:#16834a;text-decoration:none}
@media(max-width:720px){.game-header{height:62px;padding:0 15px}.game-brand{font-size:15px}.brand-mark{width:28px;height:28px;font-size:19px}.game-brand small{font-size:6px}.all-games{font-size:10px;padding:9px 10px}.page-wrap{padding:24px 12px 35px}.intro-row{padding:0 5px;margin-bottom:16px}.intro-row h1{font-size:31px}.intro-row p{max-width:280px;font-size:10px}.intro-stamp{padding:8px 9px;font-size:7px}.intro-stamp span{font-size:21px}.cabinet{padding:7px;border-radius:14px}.hud{height:42px;gap:11px;padding:0 4px 7px}.hud-stat{min-width:48px}.hud-stat small{font-size:6px;letter-spacing:1px}.hud-stat b{font-size:13px}.hud-region{font-size:6px;letter-spacing:.5px;gap:4px}.hud-region span:first-child{font-size:12px}.hud-life{font-size:11px;letter-spacing:1px}.hud-button{height:28px;width:28px;font-size:14px}.stage{border-radius:8px}.overlay-card{padding:13px 15px 11px;width:min(355px,94%);border-radius:13px}.overlay-flag{font-size:6px}.cover-plane{font-size:28px;margin-top:3px}.overlay-kicker{font-size:6px;margin-top:3px}.overlay-card h2{font-size:27px}.overlay-subtitle{font-size:6px;letter-spacing:2px;margin-top:3px}.overlay-card p{font-size:8px;line-height:1.45;margin:7px auto 8px}.control-hints{gap:4px;margin-bottom:8px}.control-hints span{padding:4px 5px;font-size:6px}.takeoff-button{padding:9px;font-size:9px}.overlay-foot{font-size:5px;margin-top:7px}.touch-controls{display:flex}.steer-controls button,.shield-control{height:40px;min-width:43px}.cabinet-footer{font-size:5px;letter-spacing:.25px;gap:4px;padding:9px 2px 2px}.cabinet-footer span{max-width:33%;line-height:1.5}.below-grid{grid-template-columns:1fr;gap:8px;margin-top:13px}.mission-card{padding:12px}.mission-card h3{font-size:9px}.mission-card p{font-size:8px}.tip-line{font-size:8px;margin-top:10px}.game-footer{padding:0 14px 18px;font-size:6px}}
@media(max-width:430px){.intro-stamp{display:none}.hud{gap:7px}.hud-region{margin-left:auto}.hud-stat{min-width:43px}.hud-life{font-size:10px}.hud-button{width:25px;height:25px}.cabinet-footer{font-size:4.6px}}
@media(hover:none){.hud-button:active,.steer-controls button:active,.shield-control:active{background:#dff3e3;transform:scale(.97)}}
@media(max-width:720px){.overlay-card{padding:9px 14px 8px}.cover-plane{font-size:24px;margin-top:1px}.overlay-kicker{margin-top:2px}.overlay-card h2{font-size:24px}.overlay-subtitle{margin-top:2px}.overlay-card p{font-size:7.5px;line-height:1.35;margin:5px auto 6px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.control-hints{margin-bottom:6px}.control-hints span{padding:4px 5px}.takeoff-button{padding:8px}.overlay-foot{display:none}}
/* Readable in-game labels and supporting copy */
.hud-stat small{font-size:8px}.hud-region{font-size:9px}.cabinet-footer{font-size:8px}.mission-card h3{font-size:11px}.mission-card p{font-size:10px}.tip-line{font-size:10px}.overlay-kicker{font-size:9px}.overlay-subtitle{font-size:10px}.overlay-card p{font-size:12px}.control-hints span{font-size:8px}.overlay-foot{font-size:7px}
@media(max-width:720px){.hud-stat small{font-size:7px}.hud-region{font-size:7px}.cabinet-footer{font-size:6px}.mission-card h3{font-size:10px}.mission-card p{font-size:9px}.tip-line{font-size:9px}.overlay-kicker{font-size:7px}.overlay-subtitle{font-size:7px}.overlay-card p{font-size:8px}.control-hints span{font-size:6px}}

.level-progress{padding:10px 18px 12px;background:#073f30;color:#fff}
.progress-label{display:flex;justify-content:space-between;align-items:center;font:800 10px "DM Sans",sans-serif;letter-spacing:1px;margin-bottom:7px}
.progress-label b{font-size:12px;color:#aaf0bd}
.progress-track{height:8px;border-radius:20px;background:#ffffff35;overflow:hidden}
#progressFill{height:100%;width:0;background:linear-gradient(90deg,#22c55e,#d4f8a8);border-radius:20px;transition:width .12s linear}

/* Four-direction touch pad */
.dpad-controls{display:grid!important;grid-template-columns:repeat(3,44px);grid-template-rows:38px 38px;gap:5px;align-items:center;justify-items:center}
.dpad-controls button{width:44px;min-width:44px;height:38px;border:1px solid #c9dfce;border-radius:10px;background:#fff;color:#075437;font-size:19px;font-weight:900;touch-action:none}
.dpad-controls .dpad-spacer{display:block;width:44px;height:1px}
.dpad-controls .dpad-label{grid-column:1/4;font-size:8px;font-weight:900;letter-spacing:1.5px;color:#718078}
.touch-controls{align-items:center;justify-content:space-between;gap:12px}
#fireButton{min-width:105px;min-height:55px;touch-action:none}
@media(max-width:720px){.touch-controls{padding:8px 4px 4px}.dpad-controls{grid-template-columns:repeat(3,38px);grid-template-rows:34px 34px;gap:3px}.dpad-controls button{width:38px;min-width:38px;height:34px}.dpad-controls .dpad-spacer{width:38px}#fireButton{min-width:92px;min-height:52px}}
/* Space-combat presentation */
.stage{background:#07172e;border:1px solid #163e5c;box-shadow:inset 0 0 45px #00111f}
.stage canvas{background:#07172e}
.level-progress{background:linear-gradient(90deg,#052b27,#092f4a)}
#progressFill{background:linear-gradient(90deg,#1edb83,#8ef6c2,#f4d16a)}

.combat-controls{display:flex;gap:9px;align-items:center}


/* Direct finger steering */
.stage,.stage canvas{touch-action:none;-webkit-user-select:none;user-select:none}
.stage canvas{cursor:crosshair}
.touch-hint{display:none;position:absolute;z-index:2;top:10px;left:50%;transform:translateX(-50%);padding:7px 12px;border:1px solid #ffffff40;border-radius:20px;background:#06182bc9;color:#eafbf1;font:900 9px/1.2 'DM Sans',sans-serif;letter-spacing:1px;white-space:nowrap;pointer-events:none;opacity:.9;transition:opacity .2s}
.touch-hint span{color:#f3c85a;padding:0 5px}
.stage.touch-active .touch-hint{opacity:0}
.touch-mode-label{display:none;color:#718078;font-size:8px;font-weight:900;letter-spacing:.8px;margin-right:auto}
@media(max-width:720px){
 .touch-hint{display:block}
 .steer-controls{display:none!important}
 .touch-controls{justify-content:flex-end}
 .touch-mode-label{display:block}
}
@media(hover:none){.stage canvas{cursor:default}}

/* Cinematic crash report */
.stage-overlay.game-over-overlay{
  place-items:center end;
  padding:14px 16px;
  background:linear-gradient(90deg,rgba(3,10,20,.05) 0%,rgba(3,10,20,.12) 42%,rgba(3,10,20,.72) 100%),url("assets/sprites/screens/game-over-crash-background.jpg");
  background-size:cover;
  background-position:center;
}
.game-over-card{
  width:min(430px,49%);
  margin-left:auto;
  padding:22px 25px 19px;
  color:#fff;
  text-align:left;
  border:1px solid rgba(255,145,92,.8);
  border-radius:17px;
  background:linear-gradient(145deg,rgba(5,18,34,.94),rgba(20,24,35,.88));
  box-shadow:0 20px 55px rgba(0,0,0,.55),inset 0 0 28px rgba(255,93,52,.08);
  backdrop-filter:blur(7px);
}
.game-over-card:before{display:none}
.gameover-topline{display:flex;align-items:center;justify-content:space-between;color:#9fb5c8;font-size:8px;font-weight:900;letter-spacing:1.4px}
.gameover-topline b{color:#6be2a0;font-size:10px;letter-spacing:1px}
.game-over-card .overlay-kicker{color:#ffb17a;font-size:8px;margin-top:15px}
.game-over-card h2{color:#fff;font-size:39px;line-height:1;margin:8px 0 0;letter-spacing:1.2px}
.game-over-card h2 em{color:#ff684e}
.gameover-subtitle{color:#d6dce6;font-size:8px;font-weight:900;letter-spacing:1.7px;margin:6px 0 15px}
.gameover-stats{display:grid;grid-template-columns:1.25fr .75fr 1fr;gap:7px;padding:11px 10px;border:1px solid rgba(126,166,198,.35);border-radius:10px;background:rgba(3,10,20,.68)}
.gameover-stats>div{display:flex;flex-direction:column;gap:3px;min-width:0}
.gameover-stats small{font-size:6px;font-weight:900;letter-spacing:.8px;color:#9fb0c4;white-space:nowrap}
.gameover-stats b{font:800 16px var(--display);color:#ffd56b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.game-over-card p{color:#c0ccd9;font-size:9px;line-height:1.5;margin:13px 0 12px;max-width:none}
.game-over-card .takeoff-button{background:linear-gradient(90deg,#b52e2a,#f05a32);box-shadow:0 8px 22px rgba(212,64,40,.3);text-align:center}
.gameover-home{display:block;text-align:center;margin-top:10px;color:#b8c8db;text-decoration:none;font-size:8px;font-weight:900;letter-spacing:1px}
@media(max-width:720px){
 .stage-overlay.game-over-overlay{padding:8px;}
 .game-over-card{width:min(310px,78%);padding:11px 12px 10px;border-radius:12px}
 .gameover-topline{font-size:6px}.gameover-topline b{font-size:7px}
 .game-over-card .overlay-kicker{font-size:6px;margin-top:8px}
 .game-over-card h2{font-size:27px;margin-top:5px}
 .gameover-subtitle{font-size:6px;letter-spacing:1px;margin:4px 0 8px}
 .gameover-stats{gap:4px;padding:7px 6px}
 .gameover-stats small{font-size:5px;letter-spacing:.2px}
 .gameover-stats b{font-size:11px}
 .game-over-card p{font-size:7px;line-height:1.35;margin:7px 0}
 .game-over-card .takeoff-button{padding:8px;font-size:8px}
 .gameover-home{font-size:6px;margin-top:6px}
}


/* Larger desktop play area */
@media (min-width:721px){
 .page-wrap{max-width:1450px;padding:26px clamp(18px,2vw,38px) 44px}
 .intro-row,.below-grid,.tip-line{max-width:1300px}
 .cabinet{max-width:1300px;width:100%;padding:14px}
 .hud{gap:clamp(14px,1.7vw,30px);height:56px}
 .hud-stat{min-width:88px}
 .hud-stat small{font-size:9px}
 .hud-stat b{font-size:20px}
 .hud-region{font-size:10px}
 .hud-button{width:38px;height:38px;font-size:20px;cursor:pointer}
 .stage{border-radius:14px}
}

/* Desktop fullscreen cabinet: game fills the monitor while preserving the HUD. */
.cabinet:fullscreen,.cabinet:-webkit-full-screen{
 width:100vw;max-width:none;height:100vh;max-height:100vh;margin:0;padding:12px;
 display:flex;flex-direction:column;gap:9px;border:0;border-radius:0;box-shadow:none;
 background:#061321;overflow:hidden;
}
.cabinet:fullscreen::backdrop,.cabinet:-webkit-full-screen::backdrop{background:#061321}
.cabinet:fullscreen .hud,.cabinet:-webkit-full-screen .hud{
 flex:0 0 48px;height:48px;padding:0 8px;gap:clamp(14px,2vw,34px);color:#fff
}
.cabinet:fullscreen .hud-stat b,.cabinet:-webkit-full-screen .hud-stat b{color:#e9fff1}
.cabinet:fullscreen .hud-stat small,.cabinet:-webkit-full-screen .hud-stat small{color:#9db7ab}
.cabinet:fullscreen .hud-region,.cabinet:-webkit-full-screen .hud-region{color:#8ff0b5}
.cabinet:fullscreen .hud-button,.cabinet:-webkit-full-screen .hud-button{background:#102638;border-color:#31526b;color:#e9f8ff}
.cabinet:fullscreen .level-progress,.cabinet:-webkit-full-screen .level-progress{
 flex:0 0 35px;padding:4px 14px;border-radius:8px
}
.cabinet:fullscreen .progress-label,.cabinet:-webkit-full-screen .progress-label{font-size:9px;margin-bottom:4px}
.cabinet:fullscreen .progress-track,.cabinet:-webkit-full-screen .progress-track{height:5px}
.cabinet:fullscreen .stage,.cabinet:-webkit-full-screen .stage{
 flex:1 1 auto;min-height:0;width:100%;height:auto;aspect-ratio:auto;border-radius:10px
}
.cabinet:fullscreen .stage canvas,.cabinet:-webkit-full-screen .stage canvas{
 width:100%;height:100%;object-fit:contain
}
.cabinet:fullscreen .cabinet-footer,.cabinet:-webkit-full-screen .cabinet-footer{display:none}
.cabinet:fullscreen .touch-controls,.cabinet:-webkit-full-screen .touch-controls{display:none}

/* Keep the Game Over report centered over the crash artwork. */
.stage-overlay.game-over-overlay{
 place-items:center;
 padding:20px;
 background:
  linear-gradient(180deg,rgba(2,8,18,.34),rgba(2,8,18,.48)),
  url("assets/sprites/screens/game-over-crash-background.jpg");
 background-size:cover;
 background-position:center;
}
.game-over-card{
 width:min(540px,90%);
 max-width:calc(100% - 24px);
 margin:0;
 padding:clamp(18px,2.4vw,30px) clamp(20px,3vw,38px);
 text-align:center;
}
.game-over-card .gameover-topline{justify-content:center;gap:22px}
.game-over-card .gameover-stats{text-align:left}
@media(max-width:720px){
 .stage-overlay.game-over-overlay{place-items:center;padding:8px}
 .game-over-card{width:min(370px,92%);max-width:92%;margin:0;padding:13px 14px 12px}
}
@media(max-width:720px){.fullscreen-button{display:none}}

/* Balanced desktop scale: slightly larger than the compact layout, without oversized 100% zoom. */
@media (min-width:721px){.page-wrap{max-width:1450px}.intro-row,.below-grid,.tip-line{max-width:1300px}.cabinet{max-width:1300px}}


/* Always-visible three-heart life counter inside the playfield. */
.stage-lives{
 position:absolute;left:14px;bottom:14px;z-index:4;
 display:flex;align-items:center;gap:7px;padding:6px 10px;
 border:1px solid #ffffff70;border-radius:10px;
 background:#071a2dcc;box-shadow:0 3px 12px #00111d55;
 pointer-events:none;
}
.stage-lives .heart{font:900 23px/1 Arial,sans-serif;text-shadow:0 1px 5px #0008}
.stage-lives .heart.full{color:#ff526d}
.stage-lives .heart.lost{color:#d7e0e5;opacity:.48}
@media(max-width:720px){.stage-lives{left:9px;bottom:9px;padding:4px 8px;gap:5px}.stage-lives .heart{font-size:19px}}
