:root {
  color-scheme: dark;
  --ink: #e8f0ed;
  --muted: #91a5a8;
  --teal: #6de3cd;
  --gold: #e9bd73;
  --line: rgba(167, 201, 202, .16);
  --panel: rgba(7, 23, 33, .85);
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: #071c28; }
body { color: var(--ink); font-family: Manrope, "Segoe UI", sans-serif; }
button, a { color: inherit; font: inherit; }
button { cursor: pointer; }
.game-shell { position: relative; width: 100%; height: 100%; min-height: 580px; overflow: hidden; background: #0a3444; isolation: isolate; }
#ocean { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -3; }
.screen-grain { position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .14; background: radial-gradient(ellipse at 42% 48%, transparent 20%, #03121c 100%), linear-gradient(90deg, rgba(3, 17, 26, .4), transparent 70%); }
.topbar { height: 76px; position: absolute; z-index: 3; inset: 0 0 auto; display: flex; align-items: center; padding: 0 4.2vw; border-bottom: 1px solid rgba(220, 245, 239, .09); background: linear-gradient(180deg, rgba(3, 18, 27, .7), rgba(3, 18, 27, .18)); }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; letter-spacing: .12em; font-size: 11px; line-height: 1.15; }
.brand strong { display: block; font-size: 12px; font-weight: 800; letter-spacing: .16em; }
.brand small { display: block; padding-top: 4px; color: #8ca4a7; font: 9px "DM Mono", monospace; letter-spacing: .25em; }
.brand-mark { width: 28px; height: 28px; position: relative; display: flex; align-items: center; justify-content: center; gap: 3px; border: 1px solid rgba(109, 227, 205, .45); transform: rotate(45deg); }
.brand-mark i { width: 2px; height: 12px; background: var(--teal); display: block; }
.brand-mark i:nth-child(2) { height: 17px; }
.topbar-center { position: absolute; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 9px; color: #a7babe; font: 9px "DM Mono", monospace; letter-spacing: .18em; }
.live-dot, .objective-dot { width: 6px; height: 6px; background: var(--teal); border-radius: 50%; box-shadow: 0 0 10px var(--teal); }
.edition { margin-left: auto; font: 9px "DM Mono", monospace; letter-spacing: .16em; color: #789094; }
.edition b { color: var(--teal); font-weight: 500; margin-left: 5px; }
.landing { position: absolute; z-index: 1; inset: 76px 0 0; display: grid; grid-template-columns: minmax(360px, 1fr) minmax(400px, 470px); align-items: center; gap: 4vw; padding: 0 10.5vw 44px 11vw; }
.landing-copy { max-width: 550px; margin-top: -28px; }
.eyebrow { color: var(--teal); font: 9px "DM Mono", monospace; letter-spacing: .2em; }
.eyebrow-rule { display: inline-block; vertical-align: middle; width: 25px; height: 1px; margin-right: 9px; background: var(--teal); }
h1 { margin: 24px 0 17px; font: 700 clamp(58px, 6vw, 88px)/.87 "Barlow Condensed", Impact, sans-serif; letter-spacing: .025em; }
h1 em { color: var(--teal); font-style: normal; }
.landing-copy > p { max-width: 390px; margin: 0; color: #b0c1c1; font-size: 13px; line-height: 1.85; }
.mission-stamp { display: flex; align-items: center; gap: 12px; margin-top: 38px; padding: 12px 15px; width: 302px; border: 1px solid rgba(223, 237, 228, .19); background: rgba(4, 20, 29, .42); }
.stamp-icon { font-size: 21px; color: var(--gold); }
.mission-stamp b, .mission-stamp small { display: block; }
.mission-stamp b { font: 10px "DM Mono", monospace; letter-spacing: .14em; }
.mission-stamp small { margin-top: 5px; font: 8px "DM Mono", monospace; color: #839b9e; letter-spacing: .1em; }
.stamp-arrow { margin-left: auto; color: #779296; }
.launch-card { padding: 23px 24px 16px; border: 1px solid rgba(163, 205, 198, .23); background: linear-gradient(145deg, rgba(7, 28, 38, .95), rgba(6, 22, 32, .91)); box-shadow: 0 24px 70px rgba(0, 10, 17, .36); backdrop-filter: blur(18px); }
.card-heading { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 15px; }
.card-heading h2 { margin: 6px 0 0; font: 600 25px "Barlow Condensed", Impact, sans-serif; letter-spacing: .03em; }
.fleet-count { color: #7f999d; font: 8px "DM Mono", monospace; letter-spacing: .13em; }
.fleet-count b { color: var(--gold); font-weight: 400; }
.ship-list { display: grid; gap: 5px; }
.ship-option { width: 100%; min-height: 59px; display: flex; align-items: center; gap: 12px; text-align: left; padding: 5px 10px; border: 1px solid transparent; background: rgba(147, 177, 174, .035); transition: background .16s, border-color .16s, transform .16s; }
.ship-option:hover { background: rgba(121, 186, 174, .09); transform: translateX(2px); }
.ship-option.selected { background: linear-gradient(90deg, rgba(59, 145, 132, .18), rgba(80, 148, 135, .035)); border-color: rgba(109, 227, 205, .37); }
.ship-silhouette { position: relative; width: 45px; height: 41px; flex: 0 0 45px; }
.silhouette-hull { position: absolute; left: 9px; top: 4px; width: 25px; height: 34px; background: #789497; clip-path: polygon(50% 0, 84% 21%, 73% 80%, 50% 100%, 27% 80%, 16% 21%); }
.selected .silhouette-hull { background: #a7cec4; }
.silhouette-bridge { position: absolute; left: 17px; top: 15px; width: 9px; height: 12px; background: #264b52; border: 1px solid rgba(218, 237, 219, .52); clip-path: polygon(50% 0, 100% 20%, 85% 100%, 15% 100%, 0 20%); }
.aegis .silhouette-hull { clip-path: polygon(50% 0, 88% 20%, 76% 76%, 50% 100%, 24% 76%, 12% 20%); }
.cruiser .silhouette-hull { width: 30px; left: 7px; clip-path: polygon(50% 0, 82% 17%, 76% 82%, 50% 100%, 24% 82%, 18% 17%); }
.frigate .silhouette-hull { width: 22px; left: 10px; clip-path: polygon(50% 0, 90% 22%, 70% 82%, 50% 100%, 30% 82%, 10% 22%); }
.submarine .silhouette-hull { top: 8px; height: 25px; width: 31px; left: 6px; border-radius: 50%; clip-path: ellipse(49% 50% at 50% 50%); }
.submarine .silhouette-bridge { top: 14px; left: 18px; width: 5px; height: 8px; clip-path: none; }
.ship-info { min-width: 0; flex: 1; }
.ship-info > b { display: block; font-size: 10px; font-weight: 700; letter-spacing: .01em; }
.ship-info > small { display: block; margin-top: 3px; color: #80999c; font: 7px "DM Mono", monospace; letter-spacing: .1em; }
.ship-bars { display: flex; gap: 3px; margin-top: 6px; }
.ship-bars i { width: 22px; height: 2px; display: block; background: linear-gradient(90deg, var(--teal) var(--level), rgba(153, 183, 179, .16) var(--level)); }
.option-index { align-self: flex-start; margin: 8px 0 0 auto; color: #637c80; font: 8px "DM Mono", monospace; }
.launch-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line); }
.launch-footer > span { display: flex; align-items: center; gap: 4px; }
.launch-footer small { margin-left: 5px; color: #81989b; font: 7px "DM Mono", monospace; letter-spacing: .08em; }
.keycap, kbd { display: inline-flex; min-width: 20px; height: 20px; align-items: center; justify-content: center; padding: 0 5px; border: 1px solid rgba(174, 202, 198, .24); color: #b6c8c4; font: 8px "DM Mono", monospace; }
.launch-button { display: inline-flex; align-items: center; gap: 25px; min-height: 41px; padding: 0 14px 0 17px; border: 1px solid var(--teal); background: var(--teal); color: #06242a; font: 800 9px "DM Mono", monospace; letter-spacing: .12em; transition: background .15s, transform .15s; }
.launch-button:hover { transform: translateY(-1px); background: #a1f2df; border-color: #a1f2df; }
.launch-button b { font: 17px Manrope, sans-serif; }
.landing-foot { position: absolute; left: 4.2vw; right: 4.2vw; bottom: 20px; display: flex; justify-content: space-between; color: #6f888c; font: 8px "DM Mono", monospace; letter-spacing: .1em; }
.landing-foot b { color: var(--teal); font-weight: 400; }
.landing-foot i { color: #a6babb; font-style: normal; }
.is-hidden { display: none !important; }
.pause-button { display: flex; gap: 9px; align-items: center; margin-left: auto; border: 1px solid rgba(178, 208, 202, .25); background: rgba(7, 23, 33, .45); height: 32px; padding: 0 9px; font: 8px "DM Mono", monospace; letter-spacing: .08em; }
.pause-button kbd { min-width: auto; height: 19px; margin-left: 4px; padding: 0 5px; color: #91a9aa; font-size: 7px; }
.pause-glyph { color: var(--teal); font-size: 13px; }
.hud { position: absolute; z-index: 2; inset: 76px 0 0; pointer-events: none; }
.hud-left, .hud-right { position: absolute; top: 22px; display: grid; gap: 9px; width: 270px; }
.hud-left { left: 4.2vw; }
.hud-right { right: 4.2vw; width: 254px; }
.hud-panel { padding: 12px 14px; border: 1px solid rgba(160, 202, 198, .17); background: var(--panel); box-shadow: 0 8px 24px rgba(0, 10, 18, .16); backdrop-filter: blur(8px); }
.panel-label { display: flex; align-items: center; justify-content: space-between; color: #87a2a3; font: 8px "DM Mono", monospace; letter-spacing: .13em; }
.panel-label span:last-child { color: #b2c7c3; }
.ship-status .panel-label span:last-child { font-size: 7px; color: var(--teal); }
.health-line { display: flex; justify-content: space-between; margin-top: 13px; color: #b7c8c6; font: 8px "DM Mono", monospace; letter-spacing: .08em; }
.health-line b { color: var(--teal); font-weight: 500; }
.health-track { height: 4px; margin-top: 7px; background: rgba(203, 229, 220, .13); }
.health-track i { display: block; width: 100%; height: 100%; background: var(--teal); transition: width .2s, background .2s; box-shadow: 0 0 8px rgba(109, 227, 205, .35); }
.status-bottom { display: flex; justify-content: space-between; margin-top: 10px; color: #8da3a3; font: 7px "DM Mono", monospace; letter-spacing: .09em; }
.status-bottom > span:first-child { display: flex; align-items: center; gap: 6px; }
.system-dot { width: 5px; height: 5px; border-radius: 50%; background: #6de3cd; }
.objective-panel { padding-top: 11px; padding-bottom: 10px; }
.objective-panel .panel-label { margin-bottom: 10px; }
.objective-panel .objective-dot { width: 5px; height: 5px; }
.objective-panel > b { font: 600 10px "Barlow Condensed", Impact, sans-serif; letter-spacing: .1em; }
.objective-progress { display: flex; justify-content: space-between; margin-top: 9px; font: 7px "DM Mono", monospace; letter-spacing: .09em; color: #8da3a3; }
.objective-progress span:last-child { color: var(--gold); }
.weapons-panel { padding-bottom: 4px; }
.weapons-panel .panel-label { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.weapon-row { min-height: 48px; display: flex; align-items: center; gap: 9px; border-bottom: 1px solid rgba(167, 201, 202, .1); }
.weapon-row:last-child { border-bottom: 0; }
.weapon-icon { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid rgba(109, 227, 205, .24); color: var(--teal); font-size: 15px; }
.missile-icon { color: var(--gold); border-color: rgba(233, 189, 115, .25); }
.torpedo-icon { color: #87cbd2; border-color: rgba(135, 203, 210, .28); }
.flare-icon { color: #a7d6ef; border-color: rgba(167, 214, 239, .3); }
.weapon-row > span:nth-child(2) { flex: 1; }
.weapon-row b, .weapon-row small { display: block; }
.weapon-row b { font: 8px "DM Mono", monospace; letter-spacing: .04em; }
.weapon-row small { margin-top: 4px; color: #82999b; font: 7px "DM Mono", monospace; }
.weapon-row kbd { height: 18px; min-width: 37px; font-size: 7px; }
.radar-panel { padding-bottom: 7px; }
.radar-panel .panel-label { margin-bottom: 6px; }
#radar { display: block; width: 100%; height: 93px; }
.radar-panel .panel-label span:last-child { color: var(--teal); font-size: 7px; }
.aim-reticle { position: absolute; display: none; width: 29px; height: 29px; transform: translate(-50%, -50%); border: 1px solid rgba(233, 189, 115, .72); border-radius: 50%; }
.aim-reticle::before, .aim-reticle::after { content: ""; position: absolute; background: rgba(233, 189, 115, .8); }
.aim-reticle::before { width: 1px; height: 39px; left: 13px; top: -6px; }
.aim-reticle::after { height: 1px; width: 39px; top: 13px; left: -6px; }
.aim-reticle i { position: absolute; inset: 10px; border: 1px solid var(--gold); border-radius: 50%; }
.aim-reticle b { position: absolute; inset: -5px; border: 1px dashed rgba(233, 189, 115, .6); border-radius: 50%; }
.toast { position: absolute; top: 36px; left: 50%; transform: translate(-50%, -8px); padding: 9px 14px; border: 1px solid rgba(233, 189, 115, .45); background: rgba(7, 23, 33, .9); color: var(--gold); opacity: 0; transition: opacity .2s, transform .2s; font: 9px "DM Mono", monospace; letter-spacing: .1em; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.controls-hint { position: absolute; bottom: 17px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 4px; color: #9fb2af; font: 7px "DM Mono", monospace; letter-spacing: .08em; white-space: nowrap; text-shadow: 0 1px 5px #071820; }
.controls-hint .keycap { min-width: 17px; height: 18px; font-size: 7px; }
.hint-divider { display: inline-block; width: 1px; height: 12px; margin: 0 7px; background: rgba(183, 209, 200, .3); }
.center-overlay { position: absolute; z-index: 4; inset: 76px 0 0; display: grid; place-items: center; background: rgba(3, 15, 23, .42); backdrop-filter: blur(4px); }
.overlay-card { width: min(390px, calc(100vw - 32px)); padding: 30px; border: 1px solid rgba(160, 202, 198, .25); background: rgba(6, 24, 34, .96); box-shadow: 0 18px 70px rgba(0, 9, 15, .48); }
.overlay-card h2 { margin: 10px 0; font: 700 40px "Barlow Condensed", Impact, sans-serif; letter-spacing: .04em; }
.overlay-card p { margin: 0 0 23px; color: #9db1b0; font-size: 12px; line-height: 1.7; }
.overlay-card .launch-button { width: 100%; justify-content: space-between; }
.end-score { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; margin-bottom: 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #99adad; font: 8px "DM Mono", monospace; letter-spacing: .1em; }
.end-score b { color: var(--gold); font-size: 18px; font-weight: 500; }

@media (max-width: 900px) {
  .landing { grid-template-columns: minmax(260px, .75fr) minmax(360px, 1fr); gap: 3vw; padding-left: 6vw; padding-right: 6vw; }
  h1 { font-size: clamp(52px, 7vw, 72px); }
  .hud-left { left: 2vw; width: 240px; }
  .hud-right { right: 2vw; width: 220px; }
}
@media (max-width: 680px) {
  .game-shell { min-height: 520px; }
  .topbar { height: 62px; padding: 0 18px; }
  .topbar-center, .edition { display: none; }
  .pause-button { margin-left: auto; }
  .landing { inset: 62px 0 0; display: flex; flex-direction: column; justify-content: flex-start; gap: 18px; overflow: auto; padding: 24px 18px 65px; }
  .landing-copy { margin: 0; }
  .eyebrow { font-size: 8px; }
  h1 { margin: 13px 0 8px; font-size: 53px; }
  .landing-copy > p { max-width: 430px; font-size: 11px; line-height: 1.55; }
  .mission-stamp { display: none; }
  .launch-card { width: min(100%, 460px); padding: 15px 14px 12px; }
  .card-heading { margin-bottom: 9px; }
  .card-heading h2 { font-size: 21px; }
  .ship-option { min-height: 52px; }
  .ship-silhouette { transform: scale(.83); transform-origin: center; margin: 0 -3px; }
  .ship-info > b { font-size: 9px; }
  .ship-info > small { font-size: 6px; }
  .landing-foot { left: 18px; right: 18px; bottom: 14px; font-size: 6px; }
  .landing-foot span:last-child { display: none; }
  .hud { inset: 62px 0 0; }
  .hud-left { top: 10px; left: 10px; width: min(190px, 48vw); gap: 6px; }
  .hud-right { top: 10px; right: 10px; width: min(180px, 45vw); gap: 6px; }
  .hud-panel { padding: 9px 9px; }
  .panel-label { font-size: 6px; }
  .ship-status .panel-label span:last-child { font-size: 5px; }
  .health-line { font-size: 6px; margin-top: 9px; }
  .status-bottom { font-size: 5px; margin-top: 7px; }
  .objective-panel > b { font-size: 8px; }
  .objective-progress { font-size: 5px; }
  .weapon-row { min-height: 33px; gap: 5px; }
  .weapon-icon { width: 20px; height: 20px; }
  .weapon-row b { font-size: 6px; }
  .weapon-row small { font-size: 5px; }
  .weapon-row kbd { min-width: 31px; height: 16px; font-size: 6px; }
  #radar { height: 68px; }
  .controls-hint { bottom: 12px; }
  .controls-hint > .keycap:nth-of-type(3), .controls-hint > .keycap:nth-of-type(4) { display: none; }
  .center-overlay { inset: 62px 0 0; }
}
@media (max-width: 390px) {
  .launch-footer > span { display: none; }
  .launch-footer { justify-content: flex-end; }
  .hud-right { width: 160px; }
  .hud-left { width: 160px; }
  .controls-hint { font-size: 6px; }
}
