*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#031c2a;color:#e8f7f5;font-family:system-ui,-apple-system,sans-serif}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit;background:#0a3440;border:1px solid #8ae6d340;border-radius:9px;cursor:pointer;min-height:46px;padding:10px 16px}button:hover{background:#165463}button:focus-visible,a:focus-visible{outline:3px solid #ffd580;outline-offset:3px}button:disabled{opacity:.45;cursor:default}[hidden]{display:none!important}#app,#world,.vignette{position:absolute;inset:0}#world canvas{display:block;width:100%;height:100%}.vignette{pointer-events:none;background:radial-gradient(ellipse at 62% 43%,transparent 35%,#00141c85 100%)}#top{position:absolute;left:max(22px,env(safe-area-inset-left));right:max(22px,env(safe-area-inset-right));top:max(18px,env(safe-area-inset-top));display:flex;justify-content:space-between;align-items:center;z-index:5}.brand{text-decoration:none;color:#b2ece3;font-weight:800;letter-spacing:2px;font-size:19px}.brand span{font-size:10px;margin-left:12px;letter-spacing:3px}.tools{display:flex;gap:8px}.tools button{width:46px;padding:8px;font-size:22px;background:#052634bd}.panel{position:absolute;top:50%;left:7%;transform:translateY(-45%);width:min(410px,86vw);max-height:calc(100% - 100px);overflow-y:auto;padding:24px;background:linear-gradient(120deg,#022531ed,#042535c7);border:1px solid #85d7ce30;border-radius:18px;box-shadow:0 24px 90px #00101688;backdrop-filter:blur(12px)}.eyebrow{font-size:10px;font-weight:700;letter-spacing:2.6px;color:#8cded3}h1{font-size:62px;line-height:.93;letter-spacing:-3px;margin:19px 0 15px;font-weight:850}h1 em{font-style:normal;color:#a8f1df}h2{font-size:36px;margin:15px 0}.intro{font-size:14px;line-height:1.65;color:#c4d9df}#missions{display:flex;gap:8px;margin-top:19px}#missions button{flex:1;font-size:12px;padding:8px}#missions button.selected{border-color:#b7ecdc;background:#216d72}#briefing{font-size:13px;line-height:1.6;color:#c4dae0;margin:17px 0}.primary{width:100%;background:#b1efdc;color:#053440;font-weight:800;border:0;display:flex;justify-content:space-between}.primary:hover{background:#ddfff4}.legend{font-size:11px;line-height:1.7;color:#91b4bc;margin-bottom:4px}#save-note{color:#ffdb90;font-size:10px}.compact{left:50%;transform:translate(-50%,-50%);text-align:center}.compact>button{width:100%;margin:5px 0}.compact p{font-size:14px;line-height:1.7;color:#bcd8dc}.mission-line{position:absolute;top:83px;left:26px;right:26px;display:flex;justify-content:space-between;font-size:11px;letter-spacing:2px;color:#b4e2da}.instrument{position:absolute;top:115px;left:50%;transform:translateX(-50%);width:280px;text-align:center;text-shadow:0 2px 10px #001820}#beacon{display:block;color:#ffd48c;font-size:14px;letter-spacing:2px}.instrument strong{display:block;font-size:17px;margin:6px}.instrument small{color:#b2d5de;font-size:11px}.progress{height:3px;width:130px;background:#ffffff20;margin:10px auto}.progress i{display:block;height:3px;background:#ffd48c;width:0}.telemetry{position:absolute;bottom:25px;left:50%;transform:translateX(-50%);display:flex;gap:22px;font-size:11px;white-space:nowrap;font-variant-numeric:tabular-nums}#chart{position:absolute;left:23px;bottom:22px;width:150px;height:150px;border:1px solid #82dbd52e;border-radius:50%;background:#022432be}#toast{position:absolute;bottom:65px;left:50%;transform:translateX(-50%);font-size:12px;color:#f0dfb5;white-space:nowrap;max-width:90vw;overflow:hidden;text-overflow:ellipsis}#touch{position:absolute;bottom:max(18px,env(safe-area-inset-bottom));left:16px;right:16px;pointer-events:none;display:flex;justify-content:space-between;align-items:flex-end}#touch button{touch-action:none;user-select:none;pointer-events:auto;background:#063342c9;min-width:48px;min-height:48px;padding:5px;font-size:20px;border-color:#99f2e75c}#touch button.active{background:#68bdae;color:#032531}.helm{display:grid;grid-template-columns:48px 48px 48px;grid-template-rows:48px 48px 48px;gap:5px}.helm button:first-child{grid-column:2}.helm button:nth-child(2){grid-column:1;grid-row:2}.helm button:nth-child(3){grid-column:2;grid-row:2}.helm button:nth-child(4){grid-column:3;grid-row:2}.helm button:nth-child(5){grid-column:2;grid-row:3}.ballast{display:flex;flex-direction:column;gap:8px}.ballast button{width:64px;height:60px}.ballast small{display:block;font-size:8px;letter-spacing:1px}@media(pointer:coarse){.legend{font-size:10px}#chart{width:92px;height:92px;left:20px;bottom:192px}.telemetry{bottom:12px;gap:11px;font-size:9px}#toast{bottom:182px;font-size:10px}.mission-line{font-size:9px;letter-spacing:1px}.instrument{top:110px;width:250px}.instrument strong{font-size:15px}}@media(max-width:600px){#top{left:17px;right:17px;top:14px}.brand span{font-size:8px;letter-spacing:1.7px;margin-left:7px}.panel{left:5%;width:90%;padding:21px;max-height:calc(100% - 88px)}h1{font-size:55px}.compact{left:50%}.mission-line{left:17px;right:17px}.telemetry{gap:11px;font-size:9px}}@media(max-height:500px){#top{top:10px}.brand span{display:none}.panel{left:5%;width:390px;top:55%;max-height:calc(100% - 68px);padding:16px}h1{font-size:36px;margin:10px 0}.intro{display:none}#missions{margin-top:8px}#briefing{margin:9px 0;font-size:11px}.legend{font-size:9px;margin:7px 0}.compact{left:50%;width:360px}.mission-line{top:64px}.instrument{top:86px}.telemetry{bottom:10px}#chart{bottom:22px;left:190px;width:90px;height:90px}#toast{bottom:45px}#touch{bottom:15px}.helm{grid-template-rows:44px 44px 44px;grid-template-columns:48px 48px 48px;gap:3px}#touch button{min-height:44px}.ballast button{height:52px}}

@media (pointer:coarse) {
  #touch{bottom:calc(env(safe-area-inset-bottom) + 16px);left:max(16px,env(safe-area-inset-left));right:max(16px,env(safe-area-inset-right))}
  .telemetry{padding:9px 12px;border:1px solid #8ae6d340;border-radius:10px;background:#032634e8;color:#e8fff6;font-weight:600;text-shadow:0 1px 3px #00171d}
}
@media (pointer:coarse) and (min-height:501px) {
  .telemetry{left:16px;right:16px;bottom:calc(env(safe-area-inset-bottom) + 188px);transform:none;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px 8px;font-size:11px}
  .telemetry #air{grid-column:1 / 3}
  #chart{width:82px;height:82px;bottom:calc(env(safe-area-inset-bottom) + 268px)}
  #toast{bottom:calc(env(safe-area-inset-bottom) + 241px);font-size:11px}
}
@media (pointer:coarse) and (max-height:500px) {
  .telemetry{bottom:calc(env(safe-area-inset-bottom) + 14px);font-size:10px;gap:14px;max-width:calc(100% - 360px)}
  #chart{top:91px;bottom:auto;left:20px;width:82px;height:82px}
  #toast{bottom:calc(env(safe-area-inset-bottom) + 53px)}
}

/* Game screens sit directly over the ocean; only transient pause/results need a backing. */
.panel{background:none;border:0;box-shadow:none;backdrop-filter:none;padding:0}
#menu{width:min(460px,86vw);transform:translateY(-50%);text-shadow:0 2px 5px #001923}
h1,h2,.primary,#missions button,.instrument strong{font-family:Impact,"Arial Narrow",system-ui,sans-serif;font-weight:900}
h1{font-size:96px;line-height:.86;letter-spacing:-1px;margin:14px 0 10px;-webkit-text-stroke:2px #052634;text-shadow:0 5px 0 #052634,0 8px 25px #001923}
h2{font-size:48px;line-height:1;letter-spacing:0;-webkit-text-stroke:1px #052634;text-shadow:0 3px 0 #052634}
.eyebrow{font-size:14px;letter-spacing:1px;color:#b2efdc;font-weight:900}
.intro{font-size:19px;font-weight:750;line-height:1.3;margin:12px 0}
#missions{margin:18px 0 0;gap:9px}
#missions button{font-size:20px;min-height:48px;padding:8px;background:#043344c9;border:2px solid #8fd8cb70;border-radius:8px}
#missions button.selected{color:#032634;background:#b1efdc;border-color:#e5fff3}
#briefing{font-size:15px;line-height:1.4;color:#f0fff8;font-weight:700;margin:13px 0 17px}
.primary{font-size:26px;min-height:57px;background:#ffd18c;color:#062936;border-radius:8px;box-shadow:0 4px 0 #052431}
.primary:hover{background:#ffe1ad}
#field-guide{margin-top:16px;font-size:13px;color:#c6e2dd;font-weight:650}
#field-guide summary{cursor:pointer;min-height:30px;text-decoration:underline;text-underline-offset:4px}
#field-guide p{font-size:12px;line-height:1.55;max-width:430px;font-weight:500}
#save-note:empty{display:none}
.brand span{letter-spacing:1px;font-weight:900;font-size:12px}
.mission-line{font-size:14px;letter-spacing:0;font-weight:850;text-shadow:0 2px 4px #001a24}
#beacon{font-size:19px;letter-spacing:.5px;font-weight:900;text-shadow:0 2px 3px #001c27}
.instrument strong{font-size:24px;line-height:1.05;text-shadow:0 2px 0 #052634}
.instrument small{font-size:12px;color:#ddf8ef;font-weight:650}
.telemetry{font-size:13px;font-weight:800;letter-spacing:0;text-shadow:0 2px 3px #002431}
#overlay{padding:24px;background:linear-gradient(145deg,#032634ef,#032634b0);border-radius:12px;max-width:410px}
#overlay-copy{font-weight:800;color:#f3fff7}
#overlay>button{font-weight:850;font-size:18px}
#overlay .primary{font-size:25px;justify-content:center}
@media(max-width:600px){
  #menu{left:7%;width:86%}h1{font-size:70px}.intro{font-size:17px}
  #missions button{font-size:18px}#briefing{font-size:14px}
  .brand span{font-size:10px}.mission-line{font-size:12px}
  #beacon{font-size:18px}.instrument strong{font-size:22px}
  #overlay{width:90%;padding:21px}h2{font-size:41px}
}
@media(pointer:coarse) and (min-height:501px){
  .telemetry{font-size:12px;border:0;border-radius:0;background:linear-gradient(90deg,#032634d9,#032634b0)}
}
@media(pointer:coarse) and (max-height:500px){
  .telemetry{font-size:11px;border:0;border-radius:0;background:#032634c9}
}
@media(max-height:500px){
  #menu{width:370px;top:54%;max-height:calc(100% - 68px)}
  h1{font-size:48px;margin:7px 0}#missions{margin-top:12px}
  #briefing{font-size:12px;margin:10px 0}.primary{min-height:49px;font-size:23px}
  #field-guide{margin-top:11px}.eyebrow{font-size:12px}
  #overlay{padding:17px;max-height:calc(100% - 48px)}#overlay h2{font-size:34px;margin:10px 0}
  #overlay-copy{margin:8px 0;font-size:12px}#overlay>button{min-height:44px;padding:7px}
  .mission-line{font-size:12px}#beacon{font-size:17px}.instrument strong{font-size:21px}
}
