*{box-sizing:border-box}
html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#040b14;color:#f1f5f4;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
button{font:inherit;color:inherit;cursor:pointer;border:1px solid #89bad64a;background:#0a1b2ad9;min-width:44px;min-height:44px;border-radius:8px;touch-action:none;-webkit-tap-highlight-color:transparent}
button:hover{background:#17384b;border-color:#80dede}
button:focus-visible{outline:3px solid #ffc971;outline-offset:3px}
button:active,button.pressed{background:#317487;color:#fff;transform:translateY(1px)}
[hidden]{display:none!important}
#game{position:relative;width:100%;height:100%;isolation:isolate;overflow:hidden;touch-action:none}
#space{display:block;width:100%;height:100%}
.vignette{position:absolute;inset:0;pointer-events:none;background:linear-gradient(180deg,#030e1980,transparent 17%,transparent 76%,#030e197a),radial-gradient(ellipse at center,transparent 64%,#01071244)}
small{display:block;font-size:9px;letter-spacing:1.7px;color:#b2cbd8}
strong{font-weight:650}
#hud{position:absolute;top:max(15px,env(safe-area-inset-top));left:20px;right:184px;display:flex;align-items:center;gap:30px;pointer-events:none;text-shadow:0 2px 7px #000}
.brand{display:flex;align-items:center;gap:8px;font-weight:750;letter-spacing:2.5px;font-size:12px}
.diamond{color:#80e6df;font-size:29px}
.brand span:not(.diamond){display:block;font-size:8px;letter-spacing:1.5px;color:#b2c7d5;margin-top:3px}
.readouts{display:flex;gap:24px;padding:4px 0}
.readouts small{font-size:8px}
.readouts strong{font-size:16px;font-variant-numeric:tabular-nums}
.system{position:absolute;right:16px;top:max(13px,env(safe-area-inset-top));display:flex;gap:5px;z-index:4}
.system button{font-size:20px;background:#06121b9c;border-color:#6d9cab4a}
.system #sound{font-size:10px;letter-spacing:1px;padding:0 8px}
#navigation{position:absolute;top:84px;left:20px;width:208px;pointer-events:none;padding:0;color:#fff;text-shadow:0 2px 6px #000}
.nav-heading{display:flex;gap:9px;align-items:center;border-left:2px solid #efbd75;padding:4px 0 4px 8px;width:fit-content}
.nav-heading #navArrow{font-size:25px;color:#ffc779;display:block;width:23px;text-align:center}
.nav-heading>div{display:grid;grid-template-columns:1fr auto;column-gap:12px;align-items:center}
.nav-heading small{grid-column:1/-1;font-size:8px;color:#ffcf8f;letter-spacing:2px}
.nav-heading strong{font-size:12px;display:block;margin:3px 0}
.nav-heading #navDistance{font-size:11px;color:#ffc779;white-space:nowrap}
.delivering .nav-heading{border-color:#7ce7d4}
.delivering .nav-heading small,.delivering #navArrow,.delivering #navDistance{color:#87f2da}
#radar{width:104px;height:85px;display:block;margin:13px 0 0;opacity:.85;background:radial-gradient(ellipse,#04121bc9,transparent 75%);border-radius:50%}
.map-key{font-size:7px;letter-spacing:1px;display:flex;gap:6px;align-items:center;color:#a8c0ce;margin:3px 0 0 5px}
.map-key i{width:4px;height:4px;border-radius:50%}
.gold{background:#ffc779}.cyan{background:#72f9e0}
#bayLabel{position:absolute;pointer-events:none;font-size:9px;font-weight:700;letter-spacing:1.5px;color:#b5fff4;text-shadow:0 1px 7px #000;transform:translate(-50%,-100%);white-space:nowrap}
#bayLabel span{display:block;font-size:7px;text-align:center;color:#81c9c4}
#flight{position:absolute;bottom:98px;left:20px;right:20px;display:flex;align-items:center;gap:25px;pointer-events:none;text-shadow:0 2px 6px #000}
.speed{width:155px;display:grid;grid-template-columns:1fr auto;align-items:center;gap:3px 8px}
.speed>small{display:none}
.speed strong{font-size:20px;font-variant-numeric:tabular-nums;white-space:nowrap}
.speed em{font-size:10px;color:#b3cbd4;font-style:normal}
.bar{grid-column:1/-1;height:2px;background:#47616b55;width:100%}
.bar span{display:block;height:100%;background:#73e2df;width:0}
.speed #tetherState{grid-row:1;grid-column:2;max-width:81px;font-size:8px;letter-spacing:.7px;color:#a0c7d6;text-align:right}
#message{font-size:11px;color:#d8eae9;max-width:440px;line-height:1.5;background:linear-gradient(90deg,#06162470,transparent);padding:4px 9px;border-left:1px solid #75afa55c}
#message.warning{border-color:#ff997e;color:#ffbb99}
#controls{position:absolute;bottom:max(20px,env(safe-area-inset-bottom));left:20px;right:20px;display:flex;justify-content:space-between;align-items:flex-end;gap:16px}
#controls button{width:64px;height:62px;font-size:26px;border-radius:10px;user-select:none;background:#081722c7;border-color:#8ac9d53d;box-shadow:0 3px 12px #0003}
#controls small{font-size:8px;color:inherit;letter-spacing:1px;margin-top:2px}
.steering,.actions{display:flex;gap:7px}
#controls .thrust{border-color:#7ce3d86b;background:#164039c2}
#controls .brake{border-color:#eab77955}
#controls #tether{border-color:#efbf726b;color:#ffd291}
#controls button.pressed{background:#317487;border-color:#a1f0e1}
.overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:flex-start;padding:28px 6vw;background:linear-gradient(90deg,#030c17e6 0%,#03101bba 35%,#020b1430 75%);overflow:auto;overscroll-behavior:contain;touch-action:pan-y;z-index:3}
.panel{width:min(460px,100%);max-width:100%;padding:25px 26px;background:#041221b8;border:1px solid #6d9caa3b;border-radius:15px;box-shadow:0 24px 75px #0005;backdrop-filter:blur(14px)}
.eyebrow{font-size:8px;letter-spacing:2.4px;color:#9cdbdc;font-weight:600}
h1{font-weight:800;font-size:clamp(42px,5.5vw,72px);line-height:.96;letter-spacing:-3px;margin:25px 0 17px}
h1 span{color:#ffc77c}
.tagline{color:#b5c9d4;line-height:1.55;font-size:14px}
.rule{height:1px;background:linear-gradient(90deg,#74b1bf69,transparent);margin:23px 0}
h2{font-size:24px;letter-spacing:-.6px;margin:9px 0 12px}
#brief{font-size:12px;line-height:1.65;color:#c0d1db;margin-bottom:16px}
.mission-select{display:flex;gap:6px;margin-bottom:15px}
.mission-select button{flex:1;padding:8px 4px;font-size:10px;min-height:48px}
.mission-select button.selected{border-color:#ffcb80;color:#ffce83;background:#3b3024aa}
.mission-select span{display:block;font-size:9px;color:#f5c77a;margin-top:3px}
.primary{width:100%;display:flex;justify-content:space-between;align-items:center;font-size:11px;letter-spacing:1.6px;font-weight:750;background:#ffd08c;color:#10202a;border:0;min-height:52px;padding:13px 18px}
.primary:hover{background:#ffe5bd;color:#10202a}
.instructions{font-size:10px;line-height:1.85;color:#bed3dd;margin:16px 0 10px}
.instructions b{color:#e6eeed}
.assist{font-size:9px;line-height:1.7;color:#91acbb}
.save-note{font-size:9px;color:#daba8a;margin:6px 0 0}
.compact{max-width:400px}
.compact h2{font-size:34px;margin:23px 0 17px}
.compact p{color:#b5cbd5;font-size:12px;line-height:1.7}
.secondary{display:block;width:100%;margin-top:8px;font-size:10px;letter-spacing:1.5px}
.stars{font-size:33px;color:#ffd18b;letter-spacing:8px;margin:15px 0}
#error{position:absolute;inset:25%;background:#132233;padding:30px;border:1px solid #fca;border-radius:12px;font-size:16px;z-index:10}
@media(max-width:600px){
  #hud{left:12px;right:12px;top:max(10px,env(safe-area-inset-top));gap:10px;align-items:flex-start}
  .brand{font-size:10px;letter-spacing:2px;gap:5px}
  .brand .diamond{font-size:25px}
  .brand span:not(.diamond){font-size:7px;letter-spacing:1px}
  .readouts{position:absolute;top:47px;left:0;right:0;justify-content:space-between;padding:2px 0;gap:10px}
  .readouts small{font-size:7px}
  .readouts strong{font-size:14px}
  .system{top:max(10px,env(safe-area-inset-top));right:10px;gap:4px}
  .system button{min-width:44px;height:44px}
  #navigation{top:105px;left:12px;right:12px;width:auto}
  .nav-heading{gap:6px;padding:3px 0 3px 6px}
  .nav-heading strong{font-size:11px}
  .nav-heading small{font-size:7px}
  #radar{position:absolute;right:0;top:45px;width:88px;height:72px;margin:0}
  .map-key{display:none}
  #flight{left:12px;right:12px;bottom:101px;gap:5px;align-items:flex-start;flex-direction:column}
  .speed{width:178px;gap:1px 8px}
  .speed strong{font-size:18px}
  .speed #tetherState{font-size:8px}
  #message{max-width:100%;font-size:10px;line-height:1.45;padding:3px 7px;min-height:20px}
  #controls{left:12px;right:12px;bottom:max(18px,env(safe-area-inset-bottom));gap:8px}
  #controls button{width:59px;height:62px;font-size:25px}
  .steering,.actions{gap:5px}
  .overlay{padding:70px 16px 16px;align-items:center;justify-content:center;background:linear-gradient(180deg,#030c177a,#030c17d9)}
  .panel{padding:19px 20px}
  h1{font-size:48px;margin:18px 0 13px}
  .tagline{font-size:12px;margin-bottom:14px}
  .rule{margin:15px 0}
  h2{font-size:21px}
  #brief{font-size:11px;margin-bottom:12px}
  .eyebrow{font-size:7px;letter-spacing:1.5px}
  .instructions{font-size:9px;margin:12px 0 8px}
  .assist{font-size:8px}
  .compact h2{font-size:30px}
  .mission-select{margin-bottom:12px}
  .primary{min-height:48px}
  #bayLabel{font-size:8px}
  #error{inset:20% 8%}
}
@media(max-height:500px){
  .overlay{padding:14px 18px;align-items:center;justify-content:flex-start}
  .panel{width:430px;padding:15px 20px}
  .eyebrow{font-size:7px}
  h1{font-size:32px;line-height:1;margin:10px 0}
  h1 br{display:none}
  h1 span{margin-left:8px}
  .tagline,.rule,.assist{display:none}
  h2{font-size:18px;margin:6px 0}
  #brief{font-size:10px;margin:8px 0;line-height:1.45}
  .mission-select{margin:8px 0}
  .mission-select button{min-height:44px;padding:5px}
  .primary{min-height:44px}
  .instructions{font-size:9px;margin:8px 0 0}
  .compact h2{font-size:27px;margin:12px 0}
  .compact p{margin:8px 0}
  .stars{margin:8px 0;font-size:26px}
  #hud{left:14px;top:10px;right:180px;gap:25px}
  .readouts{padding:2px 0;gap:20px}
  .system{top:10px;right:12px}
  #navigation{left:14px;right:14px;top:69px;width:auto}
  .nav-heading strong{font-size:10px}
  .nav-heading small{font-size:7px}
  #radar{position:absolute;right:0;top:2px;width:90px;height:73px;margin:0}
  .map-key{display:none}
  #flight{bottom:84px;left:14px;right:14px;gap:14px}
  .speed{width:155px}
  .speed strong{font-size:18px}
  #message{font-size:10px;max-width:390px}
  #controls{bottom:12px;left:14px;right:14px}
  #controls button{width:58px;height:62px}
}
@media(prefers-reduced-motion:reduce){button:active{transform:none}}
html,body{font-family:"Trebuchet MS",system-ui,sans-serif}
small,.brand,.brand span:not(.diamond),.nav-heading small,.speed #tetherState,#controls small,.system #sound{letter-spacing:0}
.brand{font-size:15px;font-weight:900}
.brand span:not(.diamond){font-size:10px}
.readouts small{font-size:11px;font-weight:800}
.readouts strong{font-size:24px;font-weight:900;text-shadow:0 2px 0 #06121e}
.nav-heading small{font-size:12px;font-weight:900}
.nav-heading strong{font-size:16px;font-weight:900}
.nav-heading #navDistance{font-size:14px;font-weight:800}
.speed{width:190px}
.speed strong{font-size:24px;font-weight:900}
.speed #tetherState{font-size:10px;font-weight:800}
#message{font-size:13px;font-weight:800;background:none;border:0;padding:3px 0}
#controls small{font-size:11px;font-weight:900}
.panel{width:min(430px,100%);padding:0 8px;background:none;border:0;box-shadow:none;backdrop-filter:none}
.eyebrow{font-size:15px;font-weight:900;letter-spacing:0;color:#87ecda}
h1{font-size:clamp(72px,7vw,98px);font-weight:900;letter-spacing:-3px;margin:15px 0;text-shadow:3px 5px 0 #082c39,0 8px 22px #000;paint-order:stroke fill;-webkit-text-stroke:1px #092334}
.tagline{font-size:18px;font-weight:800;margin:10px 0 20px;color:#f0f5f4}
.rule{display:none}
#chapter{font-size:11px;font-weight:800;letter-spacing:0;color:#8cdae0}
h2{font-size:25px;font-weight:900;letter-spacing:-.5px}
#brief{font-size:14px;line-height:1.5}
.mission-select{max-width:290px;gap:10px;margin:16px 0}
.mission-select button{font-size:24px;font-weight:900;min-height:58px;border:2px solid #61a3b46b;background:#071d29c9}
.mission-select span{font-size:13px;margin-top:0}
.primary{font-size:18px;font-weight:900;letter-spacing:0;min-height:54px;border-radius:12px;box-shadow:0 4px 0 #926037}
.secondary{font-size:15px;font-weight:900;letter-spacing:0;min-height:46px}
.instructions{font-size:12px;line-height:1.65}
.assist{font-size:12px;line-height:1.5}
.save-note{font-size:11px;color:#a6c1ce}
#pauseOverlay,#result{justify-content:center;text-align:center;background:#030e198f}
.compact{max-width:365px}
.compact h2{font-size:44px;font-weight:900;color:#ffcf86;margin:18px 0;text-shadow:3px 4px 0 #17303e}
.compact p{font-size:14px;line-height:1.5}
.stars{font-size:48px;letter-spacing:5px;margin:12px 0}
@media(max-width:600px){
  .brand{font-size:12px}
  .brand span:not(.diamond){font-size:9px}
  .readouts small{font-size:10px}
  .readouts strong{font-size:21px}
  .nav-heading small{font-size:11px}
  .nav-heading strong{font-size:14px}
  .nav-heading #navDistance{font-size:12px}
  #radar{top:52px}
  .speed{width:195px}
  .speed strong{font-size:22px}
  #message{font-size:12px;line-height:1.4}
  h1{font-size:66px;margin:12px 0}
  .panel{padding:0 8px}
  .eyebrow{font-size:14px}
  .tagline{font-size:16px;margin:10px 0 15px}
  h2{font-size:23px}
  #brief{font-size:13px}
  .mission-select{margin:13px 0}
  .primary{font-size:17px;min-height:52px}
  .instructions{font-size:11px}
  .assist{font-size:11px}
  .compact h2{font-size:36px}
  .compact p{font-size:13px}
  .stars{font-size:43px}
}
@media(max-height:500px){
  h1{font-size:42px;line-height:1;margin:6px 0}
  .panel{width:390px;padding:0 8px}
  #brief,#chapter,.instructions,.save-note{display:none}
  #overlay .eyebrow{display:none}
  #briefing h2{font-size:21px;margin:7px 0}
  .mission-select{margin:10px 0}
  .mission-select button{min-height:48px;font-size:20px}
  .primary{min-height:48px;font-size:16px}
  .readouts strong{font-size:21px}
  .readouts small{font-size:10px}
  .nav-heading strong{font-size:13px}
  .nav-heading small{font-size:10px}
  .speed strong{font-size:20px}
  .speed{width:175px}
  #message{font-size:11px;max-width:390px}
  .compact h2{font-size:32px;margin:6px 0}
  .compact p{font-size:12px;margin:5px 0;line-height:1.4}
  .secondary{min-height:44px;margin-top:6px}
  .stars{font-size:36px;margin:6px 0}
}
