.io-page {
  width: min(100% - 2 * clamp(16px, 4.5vw, 72px), 1480px);
  margin: auto;
  padding: 28px 0 64px;
}
.io-crumb a, .io-notes a { color: var(--aqua); text-decoration: underline; text-underline-offset: .24em; }
.io-intro { margin: 34px 0 26px; }
.io-intro h1 {
  font: normal clamp(50px, 7vw, 108px)/1 var(--display);
  letter-spacing: -.055em;
  margin: 0 0 12px;
}
.io-intro h1 em { color: var(--copper); }
.io-intro p:last-child { color: #c7d4d2; font: clamp(17px, 2vw, 23px)/1.4 var(--display); }
.io-player { border: 1px solid var(--line); background: #0d171d; }
#io-viewport {
  height: clamp(360px, 54vw, 725px);
  height: clamp(360px, 67svh, 725px);
  background: #100e11 url('/assets/maps/io-flight/launch-1400.jpg') center 56% / cover no-repeat;
  position: relative;
  overflow: hidden;
}
#io-canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
#io-canvas:active { cursor: grabbing; }
#io-canvas:focus-visible { outline: 2px solid var(--aqua); outline-offset: -3px; }
.io-overlay { position: absolute; inset: 0; display: grid; place-items: center; }
.io-overlay[hidden] { display: none; }
#io-launch:has(button[hidden]) { display: none; }
#io-launch {
  background: radial-gradient(ellipse at center, #090b0dc0, transparent 52%);
}
.io-load-card {
  width: min(86%, 410px);
  padding: 24px;
  background: #0c171ef5;
  border: 1px solid #d5aa86;
  color: #f0ede5;
}
.io-load-card p { margin: 0; }
.io-load-card progress { display: block; width: 100%; height: 12px; margin-top: 15px; accent-color: #e7a766; }
.io-load-card progress[hidden] { display: none; }
.io-telemetry {
  position: absolute; inset: 14px 14px auto; display: flex; flex-wrap: wrap; gap: 6px 16px;
  justify-content: space-between; pointer-events: none;
}
.io-telemetry span:not(:empty) { background: #090e15e8; border: 1px solid #ffffff40; padding: 7px 10px; font-size: .75rem; }
.io-controls {
  border: 0; border-top: 1px solid var(--line); margin: 0;
  min-width: 0; padding: 15px;
  display: grid;
  grid-template-columns: minmax(170px, 1.3fr) repeat(2, minmax(105px, 1fr)) auto auto;
  align-items: end; gap: 12px;
}
.io-controls label { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; color: #dce6e2; font-size: .83rem; }
.io-controls output { color: var(--copper); white-space: nowrap; }
.io-controls select, .io-controls button {
  color: var(--cream); background: #18262d; border: 1px solid #596768;
  border-radius: 2px; min-height: 44px; padding: 7px 9px;
}
.io-controls button[aria-pressed=true] { border-color: var(--copper); }
.io-controls button:disabled, .io-controls select:disabled { opacity: .55; }
.io-controls button:focus-visible, .io-controls input:focus-visible, .io-controls select:focus-visible { outline: 2px solid var(--aqua); outline-offset: 3px; }
.io-route select { width: 100%; }
.io-range input { width: 100%; min-height: 44px; accent-color: #eeb982; margin: 0; }
.io-flight-actions, .io-steer { display: flex; gap: 5px; flex-wrap: wrap; }
.io-steer button { min-width: 44px; }
.io-sr { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); white-space: nowrap; }
#io-instructions { margin: 0; padding: 0 15px 15px; color: #b6c8c7; font-size: .86rem; line-height: 1.5; }
.io-notes { max-width: 78ch; padding: 28px 0 0; line-height: 1.65; }
.io-notes h2 { font: clamp(27px, 3.5vw, 42px)/1.1 var(--display); margin: 0 0 .5em; }
.io-notes a + a { margin-left: 1em; }
.io-inquiry { border-top: 1px solid var(--line); margin-top: 22px; }
@media (max-width: 1100px) { .io-controls { grid-template-columns: 1.3fr 1fr 1fr; } }
@media (max-width: 700px) {
  #io-viewport { height: clamp(295px, 54svh, 570px); background-image: url('/assets/maps/io-flight/launch-700.jpg'); }
  .io-controls { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .io-route, .io-steer { grid-column: 1 / -1; }
  .io-flight-actions { grid-column: 1 / -1; }
  .io-notes a { display: inline-block; margin-right: .8em; }
  .io-notes a + a { margin-left: 0; }
}

.io-telemetry #io-debris:not([hidden]) { color: #ffdb91; border-color: #d29e5b; }
.io-telemetry #io-debris[hidden] { display: none; }
.io-notes h3 { font: normal 25px/1.25 var(--display); margin: 24px 0 8px; }
.io-globe {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: min(192px, 35%);
  color: #edf6ef;
  background: #0b141bea;
  border: 1px solid #a9c2c475;
  border-radius: 5px;
  z-index: 2;
  font-size: .72rem;
}
.io-globe[hidden] { display: none; }
.io-globe summary { cursor: pointer; padding: 7px 9px; font-weight: 700; }
.io-globe canvas {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  cursor: grab;
  touch-action: none;
}
.io-globe canvas:active { cursor: grabbing; }
.io-globe output { display: block; text-align: center; color: #b4e9ed; margin: 0 5px 4px; min-height: 1.25em; }
.io-globe button {
  width: 100%;
  display: block;
  padding: 6px 4px;
  min-height: 32px;
  color: #ecf5f3;
  background: #172830;
  border: 0;
  border-top: 1px solid #a9c2c44d;
}
.io-globe :focus-visible { outline: 2px solid #78eaf2; outline-offset: -2px; }
@media (max-width: 700px) {
  .io-globe { right: 7px; bottom: 7px; width: min(124px, 38%); font-size: .66rem; }
  .io-globe summary { padding: 7px 5px; }
  .io-globe button { min-height: 34px; padding: 4px; }
}
.io-trap { position:absolute; left:16px; bottom:16px; z-index:4; max-width:min(440px,60%); background:#1c1512f2; border:1px solid #e49d65; padding:16px; }
.io-trap[hidden] { display:none; }
.io-trap p { font-size:14px; line-height:1.45; margin:0 0 10px; }
.io-trap button { min-height:44px; background:#e7c29c; color:#17110f; border:0; padding:10px 15px; }

.io-mobile-steer { display: none; }
@media (max-width: 760px), (pointer: coarse) {
  .io-mobile-steer:not([hidden]) {
    position: absolute;
    left: 7px;
    bottom: 7px;
    z-index: 3;
    display: grid;
    grid-template-columns: repeat(3, 44px);
    grid-template-areas: ". up ." "left down right" "flight flight flight";
    gap: 4px;
  }
  .io-mobile-steer button {
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    color: #f0ede5;
    background: #0b141bf5;
    border: 1px solid #a9c2c4;
    border-radius: 5px;
    touch-action: manipulation;
  }
  .io-mobile-steer button:focus-visible { outline: 2px solid var(--aqua); outline-offset: -3px; }
  .io-mobile-steer button[data-io-turn] { font-size: 22px; }
  .io-mobile-steer button:nth-child(1) { grid-area: left; }
  .io-mobile-steer button:nth-child(2) { grid-area: up; }
  .io-mobile-steer button:nth-child(3) { grid-area: down; }
  .io-mobile-steer button:nth-child(4) { grid-area: right; }
  #io-mobile-play { grid-area: flight; }
  #io-mobile-play[aria-pressed=true] { border-color: var(--copper); }
}
