@font-face {
  font-family: 'Barlow Condensed';
  font-style: italic;
  font-weight: 700;
  src: url('../fonts/BarlowCondensed-BoldItalic.55c43b3df0fc.woff2') format('woff2');
  font-display: swap;
}
:root {
  color-scheme: dark;
  --ink: #f4f7f3;
  --soft: #b7cdcf;
  --mint: #a2f9e7;
  --gold: #ffd28d;
  --border: rgba(207, 235, 237, 0.27);
  --mono: ui-monospace, 'Cascadia Mono', 'Consolas', monospace;
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --pad: clamp(17px, 4.3vw, 84px);
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0a1b2b;
  color: var(--ink);
  font-family: Inter, 'Segoe UI', Arial, sans-serif;
}
body {
  user-select: none;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  cursor: pointer;
  border: 0;
  padding: 0;
  touch-action: manipulation;
}
button:focus-visible {
  outline: 3px solid #ffe4a6;
  outline-offset: 4px;
}
button:disabled {
  opacity: 0.4;
}
button:hover {
  color: #fff;
}
#world,
.shade,
#feedback {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.shade,
#feedback {
  pointer-events: none;
}
.shade {
  background:
    linear-gradient(
      90deg,
      rgba(3, 12, 22, 0.9),
      rgba(4, 17, 30, 0.76) 25%,
      rgba(7, 20, 32, 0.12) 64%,
      transparent
    ),
    linear-gradient(0deg, rgba(3, 12, 21, 0.6), transparent 26%);
  transition: opacity 0.35s;
}
body.in-flight .shade {
  background: linear-gradient(
    0deg,
    rgba(4, 12, 20, 0.65),
    transparent 20%,
    transparent 78%,
    rgba(4, 12, 20, 0.68)
  );
  opacity: 1;
}
#feedback {
  opacity: 0;
  box-shadow: inset 0 0 12vw #f36b82;
  z-index: 2;
}
.bar {
  position: fixed;
  z-index: 6;
  top: max(17px, env(safe-area-inset-top));
  left: var(--pad);
  right: var(--pad);
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}
.bar > * {
  pointer-events: auto;
}
.brand,
.tools,
.actions,
.subactions,
.kicker,
.card-label,
.map-stops,
.mode-select {
  display: flex;
  align-items: center;
}
.brand {
  gap: 10px;
  font-size: 14px;
  letter-spacing: 0.03em;
  text-shadow: 0 2px 7px #0b1a25;
}
.brand b {
  font-weight: 700;
}
.brand > span {
  color: #d1e1e0;
  font-size: 12px;
}
.brand-mark {
  display: block;
  width: 32px;
  height: 32px;
  flex: none;
}
.tools {
  gap: 7px;
}
.tools button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 38px;
  border: 1px solid var(--border);
  background: rgba(7, 22, 33, 0.77);
  border-radius: 4px;
}
.tools button:hover,
.quiet:hover,
.mode-select button:hover {
  background: #274151;
}
.tools svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.tools .slash,
#sound[aria-pressed='true'] .waves {
  display: none;
}
#sound[aria-pressed='true'] .slash {
  display: block;
}
#intro {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 78px var(--pad) 44px;
  overflow: auto;
  scrollbar-width: thin;
}
.intro-copy {
  position: relative;
  max-width: 54vw;
  flex-shrink: 0;
}
.kicker,
.card-label,
.map-stops,
small,
.record,
#distance,
.speed span,
.pulse-line kbd,
#radioWho,
.guide-icon,
#guideDist {
  font-family: var(--mono);
}
.kicker {
  gap: 10px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.22em;
  color: var(--mint);
}
.kicker i,
#radio i {
  display: block;
  width: 22px;
  height: 3px;
  background: var(--mint);
  transform: skewX(-27deg);
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  font: italic 700 clamp(85px, 11.9vw, 200px)/0.9 var(--display);
  letter-spacing: -0.035em;
  margin: 9px 0 17px -3px;
  white-space: nowrap;
  text-shadow: 0 3px 22px rgba(5, 17, 24, 0.28);
}
h1 span {
  color: var(--mint);
}
.premise {
  font-size: clamp(18px, 1.8vw, 31px);
  line-height: 1.25;
  letter-spacing: -0.025em;
  font-weight: 500;
}
.mode-select {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: rgba(3, 16, 27, 0.68);
  margin: clamp(18px, 3.9vh, 40px) 0 8px;
}
.mode-select button {
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 620;
  border-radius: 3px;
  color: var(--soft);
}
.mode-select button[aria-pressed='true'] {
  background: #285251;
  color: #d2fff2;
}
#brief {
  font-size: 14px;
  line-height: 1.5;
  max-width: 350px;
  min-height: 3em;
  color: #d5e6e5;
}
.actions {
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.primary,
.quiet,
#failure button {
  min-height: 45px;
  padding: 0 20px;
  border-radius: 3px;
  font-size: 14px;
  font-weight: 650;
}
.primary,
#failure button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 34px;
  background: var(--mint);
  color: #122d2c;
}
.primary:hover,
#failure button:hover {
  background: #c1fff1;
  color: #07201e;
}
.primary span {
  font-size: 19px;
}
.quiet {
  background: rgba(7, 24, 34, 0.57);
  border: 1px solid var(--border);
  color: var(--ink);
}
.record {
  margin-top: 11px;
  letter-spacing: 0.035em;
  font-size: 12px;
  color: var(--gold);
}
.course-card {
  position: absolute;
  right: var(--pad);
  bottom: 5.6vh;
  width: min(27vw, 385px);
  padding: 14px 17px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: rgba(6, 24, 36, 0.76);
}
.card-label,
.map-stops {
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #d6e8e8;
}
.card-label b {
  font-weight: 500;
  color: var(--mint);
}
#map {
  width: 100%;
  height: 50px;
  display: block;
}
.map-stops {
  font-size: 10px;
  letter-spacing: 0.015em;
  color: #c5d9d9;
}
#hud {
  position: fixed;
  inset: 0;
  pointer-events: none;
}
.in-flight .brand {
  display: none;
}
.in-flight .bar {
  justify-content: flex-end;
}
.route-head,
.race-stats,
.instruments,
#guide,
#radio,
#count {
  position: absolute;
}
.route-head {
  left: var(--pad);
  top: max(19px, env(safe-area-inset-top));
  width: clamp(128px, 15vw, 235px);
}
small {
  display: block;
  color: #d6e7e6;
  letter-spacing: 0.14em;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.4;
}
.route-head strong {
  font: italic 700 clamp(24px, 2.6vw, 38px)/1 var(--display);
  display: block;
  text-shadow: 0 2px 8px #08202c;
}
.route-track {
  height: 3px;
  background: #ffffff38;
  margin-top: 9px;
  position: relative;
}
.route-track i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--mint);
}
.route-track b {
  position: absolute;
  top: -2px;
  bottom: -2px;
  background: #d6fff3;
  width: 1px;
  left: 32.5%;
}
.route-track b:last-child {
  left: 65.42%;
}
.race-stats {
  top: max(17px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 23px;
  padding: 7px 18px 8px;
  background: rgba(7, 24, 35, 0.76);
  border: 1px solid var(--border);
  border-radius: 4px;
}
.race-stats strong {
  font: italic 700 clamp(23px, 2.35vw, 33px)/1 var(--display);
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
#guide {
  left: 50%;
  bottom: clamp(20px, 4.8vh, 55px);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: 40vw;
  white-space: nowrap;
  padding: 8px 12px;
  border: 1px solid #bfe5db42;
  border-radius: 3px;
  background: rgba(6, 23, 31, 0.83);
  font-size: 13px;
}
.guide-icon {
  font-size: 19px;
  line-height: 1;
  color: var(--mint);
}
#guideDist {
  font-size: 11px;
  color: var(--mint);
  font-weight: 550;
}
#guide[data-tone='danger'] .guide-icon,
#guide[data-tone='danger'] b {
  color: #ffb2c2;
}
.instruments {
  bottom: max(18px, 3.8vh, env(safe-area-inset-bottom));
  left: var(--pad);
  right: var(--pad);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.speed strong {
  font: italic 700 clamp(47px, 6vw, 92px)/0.88 var(--display);
  letter-spacing: -0.04em;
  text-shadow: 0 3px 10px #0a1a24;
}
.speed span {
  font-size: 10px;
  color: #d0e3e2;
}
#distance {
  font-size: 10px;
  letter-spacing: 0.07em;
  color: #d8e7e9;
  margin-top: 8px;
}
.systems {
  width: clamp(145px, 16.5vw, 248px);
  background: rgba(6, 23, 31, 0.75);
  border-left: 2px solid var(--mint);
  padding: 10px 12px;
  border-radius: 0 3px 3px 0;
}
.meter,
.pulse-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}
.meter + .meter,
.pulse-line {
  margin-top: 6px;
}
.meter label {
  width: 34px;
}
.meter b {
  font: 10px var(--mono);
  min-width: 22px;
  text-align: right;
}
meter {
  appearance: none;
  flex: 1;
  width: 38px;
  min-width: 20px;
  height: 4px;
  border: 0;
  background: #48606c;
  color: var(--mint);
}
meter::-webkit-meter-bar {
  background: #48606c;
  border: none;
  border-radius: 0;
}
meter::-webkit-meter-optimum-value {
  background: var(--mint);
}
meter::-moz-meter-bar {
  background: var(--mint);
}
.boost-meter meter::-webkit-meter-optimum-value {
  background: var(--gold);
}
.boost-meter meter::-moz-meter-bar {
  background: var(--gold);
}
.pulse-line b {
  color: #d9c6ff;
  letter-spacing: 0.14em;
}
.pulse-line kbd {
  margin-left: auto;
  color: #d5e2e1;
  font-size: 10px;
  border: 1px solid #47616b;
  border-radius: 2px;
  padding: 0 3px;
}
#radio {
  z-index: 3;
  top: 19%;
  left: var(--pad);
  display: flex;
  align-items: flex-start;
  gap: 9px;
  max-width: 280px;
  padding: 9px 12px;
  background: rgba(7, 23, 34, 0.83);
  border-radius: 2px;
  pointer-events: none;
}
#radio i {
  width: 3px;
  height: 28px;
  transform: none;
}
#radioWho {
  color: var(--mint);
  font-size: 9px;
  letter-spacing: 0.14em;
}
#radioText {
  font-size: 14px;
  line-height: 1.38;
  font-weight: 520;
}
#count {
  top: 37%;
  left: 50%;
  transform: translate(-50%, -50%);
  font: italic 700 clamp(70px, 9vw, 155px)/1 var(--display);
  text-shadow: 0 2px 25px #102e39;
  color: #dbfff5;
  pointer-events: none;
}
.touch {
  display: none;
}
.touch button {
  min-width: 40px;
  height: 40px;
  padding: 0 11px;
  border: 1px solid #c0e0df88;
  border-radius: 5px;
  background: #0b2336d9;
  font-size: 12px;
  color: white;
  font-weight: 600;
}
.touch button[data-action='left'],
.touch button[data-action='right'] {
  font-size: 27px;
}
.touch button[data-action='boost'] {
  background: #27625de8;
}
.touch button.down {
  background: #5a8b8e;
}
dialog,
#failure {
  background: linear-gradient(140deg, #14303c, #0a1926);
  color: var(--ink);
  border: 1px solid #779194;
  border-radius: 7px;
  padding: clamp(19px, 3.5vw, 44px);
  max-width: min(510px, 94vw);
  max-height: 91dvh;
  overflow: auto;
  box-shadow: 0 22px 100px #01081399;
}
dialog::backdrop {
  background: #05101cba;
}
dialog .kicker {
  font-size: 10px;
}
dialog h2,
#failure h2 {
  font: italic 700 clamp(36px, 4.3vw, 64px)/0.99 var(--display);
  margin: 11px 0;
}
dialog p,
#failure p {
  font-size: 14px;
  line-height: 1.53;
  color: #c9d9da;
}
.subactions {
  gap: 20px;
  margin-top: 22px;
}
.subactions button {
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.keys {
  margin: 14px 0;
  font-size: 13px;
}
.keys > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 6px 0;
  border-top: 1px solid #b5dbdb27;
}
.keys dt {
  font-weight: 600;
}
.keys dd {
  margin: 0;
  font: 11px var(--mono);
  color: var(--mint);
  text-align: right;
}
#helpBack {
  margin-top: 16px;
}
.result-stats {
  display: flex;
  gap: clamp(20px, 4vw, 47px);
  margin: 18px 0;
  padding: 12px 0;
  border-block: 1px solid var(--border);
}
.result-stats strong {
  font: italic 700 28px/1.1 var(--display);
}
dialog .record {
  color: var(--gold);
}
#failure {
  position: fixed;
  z-index: 20;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
#failure button {
  margin-top: 14px;
}
@media (max-width: 760px) {
  .course-card {
    display: none;
  }
  .brand {
    gap: 7px;
  }
  .race-stats {
    gap: 12px;
    padding: 6px 9px;
  }
  .tools {
    gap: 4px;
  }
  .tools button {
    width: 34px;
    height: 34px;
  }
  #guide {
    font-size: 12px;
    padding: 6px 8px;
    gap: 5px;
  }
  #radio {
    max-width: 215px;
  }
}
@media (max-width: 600px) and (orientation: portrait) {
  #intro {
    align-items: flex-end;
    padding: 60px var(--pad) max(32px, env(safe-area-inset-bottom));
  }
  .intro-copy {
    max-width: 100%;
  }
  h1 {
    font-size: clamp(85px, 22vw, 130px);
  }
  .shade {
    background: linear-gradient(
      0deg,
      rgba(3, 12, 21, 0.97),
      rgba(3, 15, 25, 0.78) 30%,
      rgba(5, 14, 22, 0.1) 62%,
      transparent
    );
  }
  .route-head {
    top: 18px;
    width: 112px;
  }
  .race-stats {
    top: 68px;
    left: var(--pad);
    transform: none;
  }
  .tools button {
    width: 36px;
    height: 36px;
  }
  .bar {
    top: 16px;
  }
  .systems {
    width: 145px;
  }
  .instruments {
    align-items: flex-end;
  }
  #radio {
    top: 132px;
  }
  #guide {
    bottom: 136px;
    max-width: 94vw;
  }
  .speed strong {
    font-size: 50px;
  }
}
@media (max-height: 570px) and (orientation: landscape) {
  #intro {
    padding-top: 47px;
    padding-bottom: 12px;
  }
  .intro-copy {
    max-width: 60vw;
  }
  h1 {
    font-size: clamp(57px, 15vh, 89px);
    margin: 4px 0 8px;
  }
  .premise {
    font-size: 16px;
  }
  .mode-select {
    margin-top: 12px;
  }
  .actions {
    margin-top: 7px;
  }
  .primary,
  .quiet {
    min-height: 35px;
  }
  .course-card {
    bottom: 15px;
    width: 258px;
    padding: 8px 12px;
  }
  #map {
    height: 32px;
  }
  .tools button {
    height: 32px;
  }
  .route-head {
    top: 13px;
  }
  .race-stats {
    top: 12px;
  }
  .route-head strong {
    font-size: 25px;
  }
  #radio {
    top: 76px;
  }
  .speed strong {
    font-size: 42px;
  }
  .systems {
    padding: 6px 9px;
  }
  .meter + .meter,
  .pulse-line {
    margin-top: 3px;
  }
}
@media (pointer: coarse) {
  .touch {
    pointer-events: auto;
    position: absolute;
    bottom: max(9px, env(safe-area-inset-bottom));
    left: var(--pad);
    right: var(--pad);
    display: flex;
    justify-content: space-between;
    gap: 6px;
  }
  .touch > div {
    display: flex;
    gap: 4px;
  }
  .instruments {
    bottom: 59px;
  }
  #guide {
    bottom: 78px;
  }
  .pulse-line kbd {
    display: none;
  }
  .touch button {
    touch-action: none;
  }
  .bar,
  .touch {
    z-index: 6;
  }
}
@media (pointer: coarse) and (orientation: portrait) {
  #guide {
    bottom: 148px;
  }
  .touch button {
    min-width: 39px;
    padding: 0 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
#towStatus {
  margin: 0 0 7px;
  color: var(--gold);
  font: 10px var(--mono);
}
#guide[data-tone='rescue'] .guide-icon,
#guide[data-tone='rescue'] b {
  color: var(--gold);
}
@media (min-aspect-ratio: 23/9) and (min-width: 1600px) {
  :root {
    --pad: max(5vw, calc((100vw - 2000px) / 2));
  }
}
.drive-hint {
  margin-top: 12px;
  font-size: 11px;
  color: #c6d8dc;
}
.drive-hint kbd {
  font: 10px var(--mono);
  padding: 2px 4px;
  border: 1px solid #6c8186;
  border-radius: 3px;
  margin-right: 2px;
}
.drive-hint span {
  padding: 0 4px;
  color: #91a5a7;
}
@media (pointer: coarse) {
  .drive-hint {
    display: none;
  }
}
@media (max-height: 480px) and (orientation: landscape) {
  .drive-hint {
    margin-top: 8px;
  }
}
/* The four original paintings are embedded offline; actual flight uses WebGL. */
:root {
  --fjord-art: url('../img/fjord.7fa1c99ad911.webp'); --yard-art: url('../img/yard.1ca56a1cef2e.webp');
  --storm-art: url('../img/storm.165bf7c38c51.webp'); --harbor-art: url('../img/harbor.b5eda26f78c0.webp');
}
#missionPhoto[data-art="fjord"] { background-image:var(--fjord-caption),var(--fjord-art); }
#missionPhoto[data-art="yard"] { background-image:var(--yard-art); }
#missionPhoto[data-art="storm"] { background-image:var(--storm-caption),var(--storm-art); }
#missionPhoto[data-art="harbor"] { background-image:var(--harbor-art); }
#intro.cover {
  background: linear-gradient(90deg,rgba(3,13,22,.94),rgba(4,17,28,.81) 25%,rgba(3,14,25,.18) 57%, transparent 80%), var(--fjord-caption, linear-gradient(transparent,transparent)) center / cover, var(--fjord-art) center / cover;
  z-index: 3;
}
#intro .intro-copy {max-width:min(540px,82vw)}
#intro h1 {font-size:clamp(84px,10.8vw,178px)}
#intro #brief {max-width:390px;min-height:3.2em}
#intro .premise {color:#edf9f7}
.text-button {padding:8px 3px;color:#c6e5e4;text-decoration:underline;text-underline-offset:4px;font-size:13px}
#hub {position:fixed;inset:0;z-index:3;overflow:auto;display:grid;grid-template-columns:1fr minmax(375px,450px);
  align-items:end;gap:24px;padding:78px var(--pad) 5vh;
  background:linear-gradient(0deg,#05111de0 0%,transparent 44%),linear-gradient(270deg,#04131ad9,transparent 63%),var(--harbor-art) 45% center / cover;}
.hub-head h2 {font:italic 700 clamp(60px,6.7vw,116px)/1 var(--display);letter-spacing:-.025em}
.board {align-self:center;padding:20px 21px;background:rgba(7,23,32,.94);border:1px solid #69858777;border-top:2px solid var(--mint);border-radius:5px}
.board-head,.loadout {display:flex;align-items:center;justify-content:space-between;gap:8px}
.board h3 {margin:0;font:italic 700 34px/.98 var(--display)}
.board-head small,.mission-txt small {color:var(--mint);font-size:9px}
.missions {margin:14px 0 12px;display:grid;grid-template-columns:1fr 1fr;gap:6px}
.missions button {padding:8px 9px;text-align:left;border:1px solid #78999a50;background:#162e38;border-radius:3px;font-size:13px;font-weight:600;min-height:44px}
.missions button small {font-size:8px;letter-spacing:.08em;font-weight:500;margin-bottom:3px;color:#b3c8ca}
.missions button[aria-pressed=true] {border-color:#a2f9e7;background:#234747}
.missions button:disabled {opacity:.67}
.briefing {border:1px solid #80999a50;border-radius:2px;overflow:hidden}
.mission-photo {height:clamp(74px,14vh,145px);background-position:50% 57%;background-size:cover}
.mission-txt {padding:11px 13px 13px;background:#0c202a}
.mission-txt h3 {margin:5px 0 6px;font-size:31px}
.mission-txt p,.board #gearNote {color:#d0e0df;font-size:13px;line-height:1.45}
.loadout {margin-top:12px;font-size:12px}
.loadout select {background:#1b353f;color:#f2fffa;border:1px solid #668888;border-radius:3px;padding:6px}
.board #gearNote {margin:4px 0 0;font-size:11px;color:#a6c3c3}
.board .actions {margin-top:13px}
#lesson {position:absolute;top:22%;left:var(--pad);max-width:300px;background:#091e29f2;border-left:3px solid var(--mint);padding:14px 16px;box-shadow:0 4px 20px #030c1566}
#lesson strong {display:block;font:italic 700 29px/1.05 var(--display);margin:6px 0}
#lesson p {font-size:13px;line-height:1.4;color:#d6e5e4}
#lesson b {display:inline-block;color:var(--mint);font-size:13px;margin-top:8px}
body.learning #radio {display:none!important}
.touch button.teach {border:2px solid var(--mint);background:#31645e}
#guide[data-tone='lee'] {border-color:#a2f9e7b3}
@media(max-width:700px) {
  #intro.cover {background:linear-gradient(0deg,#04101bf5,#041323c7 45%,#10233312 80%),var(--fjord-caption, linear-gradient(transparent,transparent)) 58% center/cover, var(--fjord-art) 58% center/cover}
  #hub {display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:9px;padding:68px var(--pad) 18px;background-position:center}
  .hub-head h2 {font-size:48px}.hub-head .kicker {display:none}
  .board {align-self:stretch}.mission-photo {height:100px}
}
@media(max-height:640px) and (orientation:landscape) {
  #hub {display:block;padding:55px max(18px,var(--pad)) 13px}
  .hub-head {position:fixed;bottom:20px;left:var(--pad);width:28vw}
  .hub-head h2 {font-size:5.7vw}
  .board {margin-left:auto;width:62vw;max-width:650px;padding:12px}
  .board h3 {font-size:24px}.board-head small {font-size:8px}
  .missions {margin:8px 0;grid-template-columns:repeat(4,1fr);gap:4px}.missions button {font-size:11px;padding:4px;min-height:38px}
  .briefing {display:grid;grid-template-columns:25% 1fr}.mission-photo {height:auto;min-height:62px}.mission-txt {padding:6px 9px}.mission-txt p {font-size:12px}.mission-txt h3 {font-size:22px}
  .loadout,.board .actions {margin-top:7px}
  #intro h1 {font-size:clamp(52px,15vh,84px)}
  #lesson {max-width:210px;top:24%;padding:8px}#lesson strong{font-size:21px}
}
@media(max-width:600px) and (orientation:portrait) {
  #intro #brief {max-width:95%}
  #lesson {left:var(--pad);right:var(--pad);max-width:none;top:142px}
}
@media(min-width:701px) and (max-height:745px) and (min-height:641px) {
  #hub{padding-top:60px;padding-bottom:14px}.mission-photo{height:75px}.board{padding:14px 17px}
}
.atlas {margin:12px 0;position:relative;background:#102c36;border:1px solid #73979850;border-radius:3px;overflow:hidden}
#coastMap {width:100%;height:64px;display:block}
.atlas .missions {margin:0;gap:1px;background:#35505b;grid-template-columns:repeat(2,1fr)}
.atlas .missions button {border-radius:0;min-height:35px;border-width:0 0 2px;padding:5px 8px}
@media(max-height:640px) and (orientation:landscape) {
  #coastMap {height:25px}.atlas {margin:6px 0}.atlas .missions {grid-template-columns:repeat(4,1fr)}
}
@media(max-height:745px) and (min-height:641px) {#coastMap{height:47px}}

#guide[data-tone="survey"] {border-color:#6bd6ff;color:#c7f3ff}
.atlas .missions {grid-template-columns:repeat(3,minmax(0,1fr))}
.board .actions {flex-wrap:wrap}
@media(max-width:520px){.atlas .missions{grid-template-columns:repeat(2,minmax(0,1fr))}}

#inspection {position:fixed;z-index:3;bottom:max(24px,5vh);left:var(--pad);right:var(--pad);display:flex;align-items:end;justify-content:space-between;gap:10px;pointer-events:none;color:#f6f4e9}
#inspection>div {pointer-events:auto;background:#0a1923ec;color:#f6f4e9;border-left:3px solid #eabc70;padding:13px 17px}
#inspection small {font:11px var(--mono);color:#f4ce88;letter-spacing:.14em}
#inspection h2 {font:italic 700 clamp(32px,4vw,66px)/1 var(--display);margin:3px 0}
#inspection p {font-size:13px;line-height:1.4;margin:3px 0}
#inspection .inspect-tools {display:flex;gap:6px;flex-wrap:wrap;border-left:0}
.inspect-tools button {border:1px solid #82949377;padding:6px 12px;min-height:38px}
#world.inspecting {touch-action:none;cursor:grab}#world.inspecting:active {cursor:grabbing}
@media(max-width:680px){#inspection{align-items:start;flex-direction:column;bottom:12px}#inspection>div{padding:8px 11px}#inspection .inspect-tools{gap:4px}.inspect-tools button{padding:5px 8px}}
@media(max-height:500px) and (orientation:landscape){#inspection{bottom:8px}#inspection>div{padding:6px 10px}#inspection h2{font-size:29px}#inspection p{display:none}}
.start-links {display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin-top:5px}
#toBoard {min-width:105px;border-color:#88b2b0}
#journalPage h3 {font:italic 700 24px/1.2 var(--display);color:#edf5f0;margin:18px 0 5px}
.journal-filters {display:flex;gap:13px;flex-wrap:wrap;margin:12px 0}
.journal-filters label,.fleet-label {font-size:12px;color:#cbdfdd;display:flex;align-items:center;gap:6px}
.journal-filters select,.fleet-label select {font:inherit;color:#e5f5ee;background:#172d34;border:1px solid #5b7979;border-radius:3px;max-width:100%;padding:5px 6px}
.fleet-label {margin-top:7px}
.journal-bests,.journal-rows {font-size:13px;line-height:1.4;color:#c4d5d4}
.journal-bests>div,.journal-rows>div {display:grid;grid-template-columns:1fr auto;border-top:1px solid #7fa6a937;padding:7px 0;gap:2px 8px}
.journal-bests strong,.journal-rows strong {color:#e4f3ef}
.journal-bests small,.journal-rows small {font:12px var(--mono);color:#bdf3e9;align-self:center}
.journal-bests span,.journal-rows span {grid-column:1/-1;font-size:11px;color:#aabfbd}
.journal-bests small {color:#ffdb9c}
#journalBack {margin-top:16px}
#resultFlight {font-size:13px;color:#b3cbc9;margin-top:4px}
#sheet:has(#journalPage:not([hidden])) {width:min(600px,94vw);max-height:88dvh;overflow:auto}
@media(max-height:520px) and (orientation:landscape){.start-links {margin-top:0;gap:12px}.start-links button {padding:4px 2px}#intro.cover {overflow:auto}}
@media(max-width:420px){.journal-filters {gap:6px}.journal-rows>div,.journal-bests>div {grid-template-columns:1fr}.journal-filters label {font-size:11px}}
.coast-guide {margin:0 0 11px;color:#dbece8;border-block:1px solid #72989755}
.coast-guide summary {cursor:pointer;padding:8px 2px;font-weight:650;font-size:13px}
.coast-guide summary span {float:right;color:#a7c8c4;font:11px var(--mono);margin-top:2px}
.sector-links {max-height:22vh;overflow:auto;overscroll-behavior:contain;padding-bottom:4px}
.sector-links button {display:flex;justify-content:space-between;text-align:left;align-items:center;padding:6px;gap:8px;font-size:12px;width:100%;border-top:1px solid #55727755}
.sector-links button:hover,.sector-links button:focus-visible {background:#264747}
.sector-links small {color:#b2c8c4;font-size:10px;text-align:right}

.language-switch {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px;
  background: rgba(7,22,33,.91);
}
.tools .language-switch button {
  width: auto;
  min-width: 42px;
  height: 32px;
  padding: 0 9px;
  border: 0;
  background: transparent;
  color: #c5d9d9;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}
.tools .language-switch button[aria-pressed="true"] { color: #08221e; background: #9af1df; }
.tools .language-switch button:focus-visible { outline: 2px solid white; outline-offset: 1px; }
@media (max-width: 420px) {
  .tools .language-switch button { min-width: 37px; padding: 0 5px; height: 29px; }
}

/* English instrument lettering over the two illustrated backdrops, in the original coordinate space. */
:root:lang(en) {
  --fjord-caption: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%221672%22%20height%3D%22941%22%20viewBox%3D%220%200%201672%20941%22%3E%3Crect%20x%3D%22162%22%20y%3D%22879%22%20width%3D%2218%22%20height%3D%2222%22%20fill%3D%22%2319262e%22%2F%3E%3Cpath%20d%3D%22M166%20882.5l-2%2015m13-15-2%2015m-10-8h11%22%20fill%3D%22none%22%20stroke%3D%22%2387cbd0%22%20stroke-width%3D%222.3%22%2F%3E%3C%2Fsvg%3E");
  --storm-caption: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%221672%22%20height%3D%22941%22%20viewBox%3D%220%200%201672%20941%22%3E%3Cpath%20d%3D%22M1160.5%20869.2l-10.8-.6.5%2016.4%2011%20.6m-11.3-9%209.2.5%22%20fill%3D%22none%22%20stroke%3D%22%23ffae55%22%20stroke-width%3D%222.15%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E");
}

.flight-readiness {
  margin-top: 6px;
  min-height: 1.4em;
  color: #c2d7d7;
  font-size: 12px;
  line-height: 1.4;
}
.flight-readiness .retry-flight { margin-left: 8px; }
button:disabled { opacity: .6; cursor: wait; }
