@font-face {
  font-family: Fleet;
  src: url('./assets/barlow-500.woff2') format('woff2');
  font-weight: 400 500;
  font-display: swap;
}
@font-face {
  font-family: Fleet;
  src: url('./assets/barlow-600.woff2') format('woff2');
  font-weight: 600 900;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --ink: #b3dce1;
  --light: #d3f6f7;
  --line: #497b89;
  --amber: #ffc46a;
  --glass: rgba(4, 20, 29, 0.91);
  font-family: Fleet, Bahnschrift, 'Arial Narrow', 'Segoe UI', sans-serif;
  font-weight: 450;
  color: var(--ink);
}
* {
  box-sizing: border-box;
}
html,
body,
main {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #060b15;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  color: var(--ink);
  border: 1px solid var(--line);
  background: linear-gradient(110deg, #0b202a, #071922);
  padding: 8px 15px;
  letter-spacing: 0.035em;
  touch-action: manipulation;
}
button:hover,
button:focus-visible {
  outline: 1px solid #9ee8ed;
  color: #dcffff;
  background: #14343f;
}
button.active {
  border-color: #92e0df;
  box-shadow: inset 0 -2px #76caca;
}
button.gold,
.gold {
  border-color: #bd893e;
  color: var(--amber);
  background: linear-gradient(105deg, #302616, #191e1c);
}
button:disabled {
  opacity: 0.46;
  cursor: default;
}
button small {
  font-size: 0.75em;
  color: #8eabb2;
}
button svg {
  vertical-align: middle;
}
#game {
  isolation: isolate;
}
#space,
#markers {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  display: block;
}
#space {
  /* An XR runtime can return this canvas at the end of the game element. */
  z-index: -1;
  touch-action: none;
}
#markers {
  pointer-events: none;
}
header {
  position: absolute;
  inset: max(14px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) auto
    max(16px, env(safe-area-inset-left));
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
}
header button {
  pointer-events: auto;
}
#objective {
  text-align: left;
  background: linear-gradient(105deg, rgba(4, 20, 27, 0.94), rgba(5, 21, 31, 0.72));
  min-width: min(300px, 45vw);
  border-color: #6ba2ad;
  padding: 9px 17px;
}
#objective strong {
  display: block;
  text-transform: uppercase;
  color: #b7e8eb;
  font-size: clamp(16px, 1.8vw, 27px);
  line-height: 1.06;
  letter-spacing: 0.075em;
  font-stretch: condensed;
}
#objective span {
  display: block;
  margin-top: 4px;
  font-size: clamp(12px, 1.22vw, 18px);
  letter-spacing: 0.038em;
}
#contact-display { display:flex; align-items:center; gap:9px; font-variant-numeric:tabular-nums; }
#contact-display[hidden] { display:none; }
#contact-display span:nth-child(1) { color:#9ce1dd; }
#contact-display span:nth-child(2) { color:#b5da91; }
#contact-display span:nth-child(3) { color:#ff9984; }
#contact-display[aria-pressed="true"] { border-color:#e7bc85; }
#utilities {
  display: flex;
  gap: 6px;
}
#passage-clock {
  pointer-events: auto;
  width: min(236px, 27vw);
  display: flex;
  align-items: stretch;
  flex-direction: column;
  color: #d4dfdd;
  font-variant-numeric: tabular-nums;
}
#passage-clock[hidden], #passage-clock [hidden] { display: none; }
#passage-toggle {
  align-self: center;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 5px 10px;
  color: #bcd0ce;
  background: #101b25e8;
  border: 1px solid #61767585;
}
#passage-toggle strong { font-size: 13px; font-weight: 600; }
#passage-toggle i { color: #dcb27b; font-size: 19px; line-height: .8; font-style: normal; }
#passage-clock[data-state='flight'] #passage-toggle { color: #c2f2de; border-color: #82b8a9; }
#passage-clock[data-state='flight'] #passage-toggle i { color: #98d6bf; }
#passage-clock:not([data-state='ready']) #passage-toggle {
  align-self: stretch;
  border: 0;
  border-top: 2px solid #78b1a2;
  background: #13222cf2;
}
#passage-clock:not([data-state='ready']) #passage-toggle kbd { margin-left: auto; }
#passage-clock :is(#passage-report,#passage-track) {
  margin-top: 0;
  padding: 9px 12px;
  background: linear-gradient(110deg,#101d28f5,#0c1720e3);
  border: 0;
  border-left: 2px solid #7eb5ac;
  text-align: left;
}
#passage-clock #passage-report { border-color: #d8aa72; }
#passage-clock :is(b,span) { display: block; }
#passage-clock b { font-size: 14px; font-weight: 600; color: #f5eedf; }
#passage-clock span { font-size: 12px; margin-top: 3px; }
#passage-track small { display: block; color: #a8ccb9; font-size: 12px; margin-top: 5px; }
#passage-track small:empty { display: none; }
#passage-track progress { display: block; width: 100%; height: 3px; margin-top: 8px; accent-color: #8ecdb6; }
@media (max-width: 720px) {
  #passage-toggle { gap: 4px; padding: 5px; }
  #passage-toggle kbd { display: none; }
}
#matter {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--glass);
  font-size: clamp(14px, 1.3vw, 20px);
  padding: 6px 12px;
}
#matter b {
  color: var(--light);
  font-variant-numeric: tabular-nums;
}
.square {
  padding: 4px 9px;
  font-size: 17px;
}
#bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: clamp(7px, 1.05vw, 17px) max(14px, env(safe-area-inset-right))
    max(9px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  min-height: 64px;
  border-top: 1px solid #72a8b2;
  background: linear-gradient(110deg, rgba(4, 23, 32, 0.98), rgba(5, 18, 26, 0.96));
  display: flex;
  align-items: stretch;
  gap: 7px;
}
#bar button {
  padding: 6px clamp(9px, 1vw, 19px);
  min-width: clamp(70px, 8.1vw, 145px);
  font-size: clamp(13px, 1.18vw, 19px);
  white-space: nowrap;
}
#bar .unit {
  margin-left: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  border: 0;
  border-left: 1px solid #385b65;
  background: transparent;
  min-width: 145px;
}
#bar .unit svg {
  width: 39px;
  height: 24px;
}
#bar .unit span {
  display: block;
}
#bar .unit small {
  letter-spacing: 0.1em;
  font-size: 10px;
  color: #83b89c;
}
#bar .order {
  margin-left: 8px;
  min-width: 128px;
}
#bar .context {
  margin-left: auto;
  min-width: 0;
  color: #dfbd83;
  border-color: #866e48;
}
#bar .minor {
  min-width: 38px;
  padding: 5px 9px;
}
#panel {
  position: absolute;
  left: max(15px, env(safe-area-inset-left));
  bottom: 84px;
  max-height: calc(100% - 175px);
  overflow: auto;
  width: min(397px, calc(100% - 30px));
  padding: 14px;
  border: 1px solid #7098a4;
  background: linear-gradient(125deg, rgba(8, 28, 39, 0.98), rgba(4, 17, 24, 0.98));
  box-shadow: 0 5px 32px #0007;
}
#panel h2 {
  margin: 0;
  font-size: 19px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #bce4e6;
}
#panel .heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
#panel .heading button {
  padding: 1px 8px;
}
#panel .grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
#panel .list {
  display: grid;
  gap: 6px;
}
#panel .row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
}
#panel p {
  font-size: 14px;
  line-height: 1.5;
  margin: 8px 0;
  color: #a6bdc4;
}
#panel .wide {
  grid-column: 1/-1;
}
#panel hr {
  border: 0;
  border-top: 1px solid #334f59;
  margin: 10px 0;
}
#panel label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}
input[type='range'] {
  width: 55%;
  accent-color: #fbc071;
}
#notice {
  pointer-events: none;
  position: absolute;
  left: 50%;
  bottom: 90px;
  transform: translateX(-50%);
  background: #071921d9;
  padding: 6px 12px;
  border-left: 2px solid #cc9e5e;
  color: #f0d4aa;
  max-width: 83vw;
  text-align: center;
  font-size: 14px;
}
#notice:empty {
  display: none;
}
#selection-box {
  position: absolute;
  border: 1px solid #8ce4df;
  background: #8ce4df20;
  pointer-events: none;
}
body.pilot #bar {
  left: auto;
  right: 14px;
  bottom: auto;
  top: 61px;
  background: none;
  border: 0;
  padding: 0;
  min-height: 0;
  opacity: 0.75;
}
body.pilot #bar button {
  font-size: 12px;
  min-width: 0;
  background: #071923ac;
}
body.pilot #objective {
  min-width: 0;
  font-size: 12px;
  padding: 6px 11px;
}
body.pilot #objective strong {
  font-size: 15px;
}
body.pilot #objective span {
  font-size: 12px;
}
body.pilot #panel {
  bottom: auto;
  top: 120px;
}
body.pilot #notice {
  bottom: 27%;
}
#touchflight {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
#touchflight button,
.stick {
  pointer-events: auto;
  touch-action: none;
  position: absolute;
}
#touchflight button {
  bottom: 24%;
  right: 11px;
  border-radius: 4px;
  padding: 8px 13px;
}
#touchflight [data-hold='brake'] {
  right: auto;
  left: 12px;
}
#touchflight [data-action='lift'] {
  right: auto;
  left: 70px;
}
.stick {
  width: 86px;
  height: 86px;
  bottom: 12px;
  border: 1px solid #83ced395;
  border-radius: 50%;
  background: #142e384d;
  display: grid;
  place-items: center;
}
.stick[data-stick='left'] {
  left: 18px;
}
.stick[data-stick='right'] {
  right: 18px;
}
.stick i {
  height: 27px;
  width: 27px;
  border-radius: 50%;
  background: #93d5d89c;
}
#rotate,
#fatal {
  position: absolute;
  inset: 0;
  background: #06141e;
  display: grid;
  place-items: center;
  padding: 40px;
  text-align: center;
  font-size: 22px;
}
#fatal {
  z-index: 8;
}
#rotate {
  z-index: 9;
}
[hidden] {
  display: none !important;
}
@media (max-height: 520px), (max-width: 750px) {
  header {
    inset: 7px 9px auto;
  }
  #objective {
    min-width: 170px;
    padding: 5px 9px;
  }
  #objective strong {
    font-size: 16px;
  }
  #objective span {
    font-size: 12px;
  }
  #bar {
    min-height: 44px;
    padding: 5px 7px;
    gap: 4px;
  }
  #bar button {
    min-width: 0;
    font-size: 12px;
    padding: 5px 8px;
  }
  #bar .unit {
    min-width: 0;
    margin-left: 1px;
    gap: 4px;
  }
  #bar .unit svg {
    width: 21px;
  }
  #bar .unit small {
    display: none;
  }
  #bar .order {
    min-width: 65px;
    margin-left: 0;
  }
  #panel {
    bottom: 48px;
    max-height: calc(100% - 112px);
    padding: 9px;
    width: 330px;
  }
  #panel .heading {
    margin-bottom: 5px;
  }
  #panel button {
    padding: 6px;
  }
  #notice {
    bottom: 53px;
    font-size: 12px;
  }
  body.pilot #bar {
    top: 43px;
    right: 8px;
  }
  body.pilot #panel {
    top: 68px;
  }
  #matter {
    gap: 9px;
  }
  .square {
    font-size: 13px;
  }
}
.survivors {
  max-height: min(26vh, 14rem);
  overflow: auto;
  margin: 0 0 0.8rem;
}
.survivors > div {
  display: flex;
  justify-content: space-between;
  gap: 1.2rem;
  border-bottom: 1px solid #28414a;
  padding: 0.2rem 0;
}
.survivors > div > :last-child {
  color: #aec5c6;
  font-variant-numeric: tabular-nums;
}
.unit-filters {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin: 4px 0;
}
#selection-info .unit-filters button {
  margin: 0;
  font-size: 12px;
  background: #122630;
}
.contact-readout {
  border-top: 1px solid #654840;
  padding-top: 4px;
  color: #efab98;
}
.plan-layout {
  display: grid;
  gap: 18px;
}
.sortie-map { min-width:0; border:1px solid #38535b; background:#101e27; color:#dce9e6; }
.sortie-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:9px 13px; }
.sortie-heading small { color:#9cc3c3; font-size:12px; }
.sortie-heading h3 { margin:1px 0 0; font-size:22px; line-height:1.05; color:#f1e9d8; }
.sortie-map figure { margin:0; }
.sortie-map canvas { width:100%; height:clamp(154px,27vh,258px); display:block; border-block:1px solid #38535b; }
.sortie-tabs { display:grid; grid-template-columns:repeat(3,1fr); border-bottom:1px solid #334951; }
.sortie-tabs button { border:0; border-right:1px solid #334951; border-radius:0; min-height:30px; }
.sortie-tabs button[aria-pressed=true] { box-shadow:inset 0 -2px #9cd6c9; background:#244044; color:#ddf4e7; }
.sortie-readout { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:3px 12px; padding:8px 12px 0; }
.sortie-readout strong { font-size:16px; color:#ffcf89; }
.sortie-readout span,.sortie-numbers { font-size:13px; color:#becdcf; }
.sortie-numbers { padding:2px 12px 8px; }
.sortie-order { margin:0 12px 10px; }
.sortie-desk { display:grid; align-items:start; gap:14px; }
#panel.sortie-command { width:min(860px,calc(100% - 28px)); }
@media (min-width:760px) {
  .sortie-desk:has(.sortie-tools) { grid-template-columns:1.35fr 1fr; }
  .planning .plan-layout { align-items:start; }
}
@media(max-height:650px) and (min-width:760px){
  .sortie-map canvas { height:135px; }
  .sortie-heading { padding:5px 10px; }
  .sortie-map .sortie-order { margin-bottom:5px; }
}
.plan-chart {
  order: -1;
}
.plan-launch {
  display: grid;
  gap: 6px;
}
.plan-launch .ops-row {
  border-color: #ac8450;
  color: #ffcc85;
  background: #332819;
}
.plan-launch .ops-row small {
  color: #d7bd9a;
}
@media (min-width: 760px) {
  .front-open #panel.planning {
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(94%, 1040px);
    padding: 22px 26px;
  }
  .planning .plan-layout {
    grid-template-columns: minmax(310px, 1.05fr) minmax(265px, 0.95fr);
    gap: 24px;
  }
  .planning .plan-chart {
    order: 0;
    position: sticky;
    align-self: start;
    top: 0;
  }
  .planning .plan-preview canvas {
    height: clamp(170px, 34vh, 320px);
  }
  .planning .ops-list {
    gap: 3px;
  }
  .planning .ops-row {
    padding: 6px 9px;
  }
  .planning .plan-launch .ops-row {
    padding: 12px;
  }
}
.breach-report { display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px; margin:5px 0 0; }
.breach-report span { color:#eeb994; font-weight:600; }

#panel.operations {
  width: min(465px, calc(100% - 30px));
  padding: 18px 19px;
  border-color: #547b86;
  border-left: 3px solid #81c6cc;
  scrollbar-color: #527782 #10222e;
}
#panel.operations .heading {
  border-bottom: 1px solid #3b5962;
  padding-bottom: 10px;
}
.ops-list {
  display: grid;
  gap: 3px;
}
.ops-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  text-align: left;
  padding: 8px 10px;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid #2c4650;
  background: #112935;
}
.ops-row b {
  font-weight: 600;
  color: #d8e9e6;
}
.ops-row small {
  text-align: right;
  color: #a2babf;
  font-size: 13px;
}
.ops-row:not(:disabled):hover,
.ops-row:focus-visible {
  outline: 1px solid #8cc7c8;
  background: #1f3d49;
}
.ops-row:disabled {
  opacity: 0.63;
}
.ops-field input {
  font: inherit;
  color: #e9ddbd;
  border: 1px solid #557782;
  background: #0c2029;
  padding: 5px 8px;
  min-width: 0;
  flex: 1;
}
@media (max-width: 930px) {
  #bar {
    max-width: calc(100% - 20px);
    overflow-x: auto;
  }
  #bar button {
    flex-shrink: 0;
  }
}

.armory .armory-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(200px, 1fr);
  gap: 16px;
}
#panel.operations.armory {
  width: min(850px, calc(100% - 30px));
}
.armory-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin: 12px 0 3px;
}
.armory-tabs button {
  background: transparent;
  border: 0;
  border-bottom: 1px solid #4c626b;
  font-size: 13px;
}
.armory-tabs [aria-pressed='true'] {
  border-color: #ffbf74;
  color: #ffdbac;
}
.model-plate {
  margin: 0 0 5px;
  border: 1px solid #3b515b;
  background: #101c25;
}
.plate-image {
  position: relative;
  overflow: hidden;
}
.model-plate .hull-preview {
  width: 100%;
  height: auto;
  border: 0;
}
.plate-image svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.socket {
  stroke: #f3be78;
  stroke-width: 1.6;
  fill: #101b2590;
}
.socket.active {
  fill: #fff3c5;
}
.test-salvo {
  color: var(--shot-color);
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 4;
  animation: proof-flash 0.55s ease-out both;
}
.model-plate figcaption {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid #314751;
  padding: 7px 9px;
  color: #dfd8c6;
}
.model-plate figcaption span {
  color: #becbd0;
  font-variant-numeric: tabular-nums;
}
.armory-equipment {
  align-self: start;
  margin-top: 12px;
}
.armory .ops-row {
  width: 100%;
  margin-bottom: 2px;
}
.armory-equipment h3 {
  margin: 12px 0 4px;
  font-size: 14px;
  color: #e0c39a;
}
.armory-equipment [data-action^='op/weapon-'] b {
  white-space: nowrap;
}
.armory .ops-field {
  margin-top: 12px;
}
.test-trigger {
  border-color: #a07f59;
  color: #ffdda5;
}
@keyframes proof-flash {
  from {
    opacity: 1;
  }
  40% {
    opacity: 0.8;
  }
  to {
    opacity: 0;
  }
}
@media (max-width: 700px) {
  .armory .armory-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
}
.hull-preview {
  display: block;
  width: 100%;
  height: 134px;
  object-fit: contain;
  border: 1px solid #294651;
  background: #0a1d27;
}
#front {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #050f1bf2, #07131d99 33%, transparent 68%),
    url('./assets/fleet-orbit.jpg') center 52% / cover;
  display: flex;
  align-items: center;
  overflow-y: auto;
}
.front-inner {
  width: min(88%, 650px);
  margin: auto 0 auto clamp(28px, 8vw, 160px);
  padding: 24px 0;
}
.front-inner h1 {
  margin: 0 0 clamp(24px, 5vh, 68px);
  color: #fff7e8;
  font-size: clamp(52px, 8vw, 138px);
  line-height: 0.9;
  letter-spacing: -0.065em;
  font-weight: 600;
}
.front-inner h1 span {
  display: block;
  letter-spacing: 0.115em;
  color: #e6b67a;
  font-size: 0.56em;
  margin: 0.22em 0 0 0.07em;
}
.front-primary {
  display: grid;
  max-width: 360px;
}
.front-primary button {
  color: #edf3ed;
  padding: clamp(6px, 1.05vh, 15px) 16px;
  border: 0;
  border-left: 2px solid #81a2a666;
  background: none;
  text-align: left;
  font-size: clamp(19px, 1.7vw, 29px);
  letter-spacing: 0.015em;
}
.front-primary button:is(:hover, :focus-visible) {
  border-color: #ffbf77;
  outline: none;
  color: #ffdaa1;
  background: linear-gradient(90deg, #a7783533, transparent);
}
.front-primary button:first-child {
  color: #ffda9d;
  border-left-color: #edae61;
}
.front-secondary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: clamp(18px, 4vh, 48px);
}
.front-secondary button,
#chart-key button,
#selection-info button {
  background: #0d1b22ca;
  border: 1px solid #667b7e88;
  border-radius: 2px;
  color: #e4eae3;
  font-size: 13px;
  padding: 6px 10px;
}
.front-open header,
.front-open #bar,
.front-open #rotate,
.front-open #touchflight,
.front-open .subpage .front-inner {
  display: none;
}
.front-open #panel {
  left: clamp(18px, 6.5vw, 148px);
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  width: min(94vw, 625px);
  max-height: 90%;
  padding: clamp(15px, 2.1vw, 30px);
  border: 1px solid #667d7f;
  border-top: 3px solid #d8ad73;
  background: linear-gradient(130deg, #101f29fa, #091722fa);
}
.front-open #panel h2 {
  color: #f4e9d6;
  letter-spacing: 0.025em;
  font-size: clamp(22px, 2.3vw, 34px);
  text-transform: none;
}
.front-open #notice {
  z-index: 2;
  bottom: 14px;
}
.plan-preview {
  margin: 0 0 10px;
  position: relative;
  border: 1px solid #38525b;
}
.plan-preview canvas {
  display: block;
  width: 100%;
  height: 142px;
}
.plan-preview figcaption {
  position: absolute;
  top: 7px;
  left: 10px;
  font-size: 12px;
  color: #c6d7ce;
  background: #0a1721bf;
  padding: 2px 5px;
}
.plan-options h3 { margin:12px 0 6px; color:#b4cfcd; font-size:14px; }
.plan-options h3:first-child { margin-top:0; }
.sortie-seed { display:flex; align-items:flex-end; gap:7px; margin-bottom:8px; }
.sortie-seed .ops-field { flex:1; margin:0; min-width:0; }
.sortie-seed .ops-field input { min-width:0; }
.sortie-seed .ops-row { flex:none; min-height:31px; width:auto; }
.sortie-victory { margin:6px 0; color:#d3d8cf; }
.sortie-readout button { margin-left:auto; padding:2px 5px; }
.sortie-map .sortie-order { border-color:#94764e; background:#382c20; color:#f7d599; }
.plan-launch .ops-row:last-child { color:#c7d9da; background:#1b2c34; border-color:#425961; }
.plan-launch .ops-row:last-child small { color:#bbcbcd; }
@media(min-width:760px){
  .front-open #panel.planning { width:min(94%,1120px); }
  .planning .plan-layout { grid-template-columns:minmax(0,1.35fr) minmax(289px,.86fr); grid-template-areas:"chart options"; }
  .planning .plan-options { grid-area:options; }
  .planning .plan-chart { grid-area:chart; position:static; }
  .planning .sortie-map canvas { height:clamp(175px,29vh,285px); }
  .planning .plan-launch { grid-template-columns:1fr 1fr; }
  .planning .plan-launch .ops-row { display:grid; gap:2px; align-content:start; padding:7px 10px; }
  .planning .plan-launch .ops-row small { white-space:normal; text-align:left; }
  .planning .sortie-heading h3 { font-size:26px; }
}
@media(min-width:760px) and (max-height:650px){
  .planning .sortie-map canvas { height:145px; }
}
#selection-info,
#chart-key {
  position: absolute;
  bottom: 80px;
  padding: 12px 15px;
  border: 1px solid #62818a88;
  border-radius: 2px;
  background: linear-gradient(115deg, #0b1a24ed, #0a1922e8);
  box-shadow: 0 3px 14px #0004;
  font-variant-numeric: tabular-nums;
}
#selection-info {
  left: 16px;
  max-width: min(390px, 43vw);
  border-left: 3px solid #e7bd79;
}
#selection-info > small,
#chart-key > small {
  display: block;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #bac9c7;
}
#selection-info > strong {
  display: block;
  font-size: 21px;
  color: #f2e8d6;
  line-height: 1.2;
  margin: 3px 0;
}
#selection-info > span,
#chart-key > span {
  display: block;
  font-size: 13px;
  line-height: 1.4;
  color: #bfd3d4;
}
#selection-info button,
#chart-key button {
  padding: 3px 8px;
  margin-top: 6px;
}
.field-inspect {
  border-top: 1px solid #634e38;
  margin-top: 8px;
  padding-top: 5px;
  font-size: 13px;
  color: #e6bc80;
}
.field-inspect button {
  display: block;
}
#chart-key {
  right: 16px;
  text-align: right;
  border-right: 3px solid #78c7c8;
}
#chart-key > b {
  display: block;
  color: #d5eeed;
  font-size: 22px;
}
#chart-key i,
#chart-key em,
#chart-key strong {
  font-style: normal;
  font-size: 12px;
  color: #f8db99;
}
#chart-key strong {
  color: #88dcd6;
}
#selection-box {
  border: 1px solid #ffdc97;
  background: #dab97021;
  box-shadow: inset 0 0 0 1px #19232bc4;
}
#selection-box span {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  white-space: nowrap;
  color: #221e18;
  background: #f1d299;
  font-size: 12px;
  padding: 1px 5px;
  font-weight: 600;
}
kbd {
  font-family: inherit;
  font-size: 10px;
  line-height: 1.2;
  padding: 1px 4px;
  border: 1px solid currentColor;
  border-radius: 2px;
  opacity: 0.7;
  vertical-align: middle;
}
#bar button.bar-build {
  margin-left: auto;
}
#bar {
  overflow-x: auto;
}
@media (max-width: 900px) {
  #bar button {
    min-width: 0;
  }
  #bar kbd {
    display: none;
  }
}
@media (max-height: 560px) {
  .front-inner h1 {
    font-size: 44px;
    margin-bottom: 13px;
  }
  .front-inner {
    padding: 12px 0;
  }
  .front-primary button {
    font-size: 16px;
    padding: 3px 12px;
  }
  .front-secondary {
    margin-top: 10px;
  }
  #selection-info,
  #chart-key {
    bottom: 50px;
    padding: 5px 9px;
  }
  #selection-info > strong {
    font-size: 16px;
  }
  .plan-preview canvas {
    height: 94px;
  }
}
@media (max-width: 600px) {
  .front-inner {
    margin-left: 7vw;
  }
  #front {
    background-position: 58% center;
  }
  .front-open #panel {
    left: 3vw;
  }
  #chart-key {
    right: 6px;
  }
  #selection-info {
    left: 6px;
  }
  #bar button {
    padding: 5px 7px;
  }
}
#panel.operations.workbench {
  width: min(580px, 92vw);
}
#panel.operations.laboratory {
  width:min(850px,calc(100vw - 32px));
  max-height:calc(100dvh - 132px);
  background:linear-gradient(120deg,#101f28f9,#0b1d25fa);
  border-top:2px solid #96bec0;
}
.laboratory h2 small { font-size:14px;color:#a8c3bf;font-weight:500; }
.lab-tabs,.lab-controls,.lab-footer,.lab-related { display:flex;align-items:center;gap:6px;flex-wrap:wrap; }
.lab-tabs { border-bottom:1px solid #465d64;margin:4px 0 12px; }
.lab-tabs button { background:none;border:0;border-bottom:2px solid transparent;border-radius:0;padding:7px 12px;color:#b3c6c7; }
.lab-tabs button[aria-pressed=true] { color:#ffe0aa;border-color:#e7b779; }
.lab-layout { display:grid;grid-template-columns:minmax(144px,24%) minmax(0,1fr);gap:16px; }
.lab-index { display:flex;flex-direction:column;gap:4px;max-height:340px;overflow:auto; }
.lab-index .lab-index-item { padding:7px 9px;text-align:left;background:#122630;border:1px solid #364c56; }
.lab-index-item b,.lab-index-item small,.lab-stop b,.lab-stop small { display:block;line-height:1.2; }
.lab-index-item small,.lab-stop small,.lab-footer span,.lab-detail small { font-size:12px;color:#a4bdc2; }
.lab-index-item[aria-pressed=true] { border-left:3px solid #e6b577;background:#20353e; }
.lab-title { display:flex;align-items:center;justify-content:space-between;gap:10px; }
.lab-title small,.lab-related>small { color:#9bb8bf;letter-spacing:.08em;font-size:11px;text-transform:uppercase; }
.lab-title span { color:#bed2d1;font-size:13px; }
.lab-plan h3 { margin:1px 0 4px;font-size:clamp(20px,2vw,28px);line-height:1.15; }
.lab-graph { height:128px;position:relative;overflow:hidden;margin:7px 0;border:1px solid #405761;
  background:radial-gradient(#41616b70 .8px,transparent .9px) 0 0/10px 10px,#0c202a; }
.lab-graph svg { position:absolute;width:100%;height:100%;fill:none;stroke-width:2.2; }
.lab-stop { position:absolute;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;min-height:0;
  padding:2px 6px;background:#132b35;border:1px solid #456470;border-radius:2px;text-align:left; }
.lab-stop b { color:#e0edeb;font-size:13px;overflow-wrap:anywhere; }
.lab-stop.done { border-color:#74a98e; }
.lab-stop.active,.lab-stop.goal { border-color:#a2845c; }
.lab-stop[aria-pressed=true] { background:#24414a;outline:2px solid #b4d9d4;outline-offset:-1px; }
.lab-detail { display:flex;align-items:center;gap:14px; }
.lab-detail figure { margin:0;flex:0 0 28%;text-align:center;border-right:1px solid #384e57; }
.lab-detail img { display:block;width:100%;height:62px;object-fit:contain; }
.lab-detail figcaption { color:#a9bfc2;font-size:12px; }
.lab-detail h4 { font-size:17px;margin:3px 0; }
#panel .lab-detail p { margin:0;color:#c2d4d6;font-size:14px;line-height:1.4; }
.lab-effects { list-style:none;padding:0;margin:6px 0;max-height:86px;overflow:auto; }
.lab-effects li { display:flex;flex-wrap:wrap;justify-content:space-between;gap:6px;padding:3px 0;border-bottom:1px solid #354950;font-size:13px; }
.lab-effects strong { color:#a6d6bf;font-weight:500; }
.lab-related { margin:8px 0; }
.lab-related button,.lab-footer button { border:0;border-bottom:1px solid #627e80;background:transparent;padding:3px 5px;color:#c7dfdf;font-size:13px; }
.lab-plan progress { width:100%;height:5px;margin:7px 0 2px;accent-color:#e8bd85; }
.lab-controls { margin-top:10px; }
.lab-controls button:first-child:enabled { background:#dfbb86;color:#17242a;border:1px solid #f4d6a8;font-weight:700; }
.lab-footer { border-top:1px solid #3a535b;padding-top:8px;margin-top:12px;font-size:13px; }
.lab-footer button:last-child[data-action="op/build-lab"] { margin-left:auto; }
.ship-offer[data-action^="op/path-"] small { color:#edc793; }
@media(max-width:650px) {
  .lab-layout { grid-template-columns:1fr;gap:8px; }
  .lab-index { flex-direction:row;max-width:100%; }
  .lab-index .lab-index-item { flex:0 0 auto; }
  .lab-graph { height:155px; }
  .lab-stop { padding:2px; }
  .lab-stop b,.lab-stop small { font-size:11px; }
  .lab-tabs button { padding:5px; }
}
.catalog-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 6px 0 12px;
}
.catalog-tabs button {
  background: transparent;
  border: 0;
  border-bottom: 1px solid #486069;
  padding: 6px 11px;
  color: #b3c7c9;
}
.catalog-tabs button[aria-pressed='true'] {
  border-bottom: 2px solid #e7b478;
  color: #ffdbac;
}
.yard-catalog {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  max-height: 38vh;
  overflow: auto;
}
.ship-offer {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #3e535c;
  background: #111e28;
  padding: 5px;
  text-align: left;
}
.ship-offer img {
  width: 36%;
  height: 53px;
  object-fit: contain;
}
.ship-offer b,
.ship-offer small {
  display: block;
}
.ship-offer b {
  color: #e3e8e1;
  font-size: 15px;
}
.ship-offer small {
  font-size: 12px;
  line-height: 1.25;
}
.ship-offer:disabled {
  opacity: 0.64;
}
#panel .production-line {
  margin: 10px 0;
  padding: 6px 0;
  border-top: 1px solid #3a4b50;
  color: #e1bd8e;
}
.yard-tools {
  margin-top:8px;
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.yard-tools .ops-row {
  width: auto;
  flex: 1 1 100px;
  display: grid;
  align-content: center;
  gap: 3px;
}
.yard-tools .ops-row small {
  text-align: left;
}
.yard-progress {display:block;width:100%;height:4px;margin:-8px 0 10px;accent-color:#e6b679}
.yard-readout {margin-top:6px;border-top:1px solid #354c50;padding-top:6px;display:grid;grid-template-columns:auto 1fr;gap:3px 9px}
#selection-info .yard-readout strong,#selection-info .yard-readout span {font-size:13px;line-height:1.25}
.yard-readout span {text-align:right;color:#d1dacb}
.yard-readout small,.yard-readout progress {grid-column:1/-1}
.yard-readout progress {width:100%;height:4px;accent-color:#9ccbb0}
.yard-dispatch {border:1px solid #415b5c;border-left:3px solid #89c6ac;background:#152428;padding:9px 12px}
.yard-dispatch small,.yard-dispatch strong {display:block}
.yard-dispatch small {color:#a4c5ba;font-size:12px}
.yard-dispatch strong {color:#e3ece3;font-size:17px;margin:2px 0 7px}
.dispatch-actions {display:flex;gap:6px;flex-wrap:wrap}
.dispatch-actions button {padding:4px 9px;font-size:13px}
.research-list {
  margin-bottom: 10px;
  padding-left: 13px;
  border-left: 1px solid #7c8f8880;
  display: grid;
  gap: 7px;
}
.tech-node {
  position: relative;
}
.tech-node::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -14px;
  width: 12px;
  border-top: 1px solid #7c8f88;
}
.tech-node progress {
  width: 100%;
  height: 4px;
  display: block;
  accent-color: #8cc9be;
}
@media (max-width: 580px) {
  .yard-catalog {
    grid-template-columns: minmax(0, 1fr);
  }
  .ship-offer img {
    height: 35px;
    max-width: 75px;
  }
}
#transmission {
  position: absolute;
  right: max(18px, env(safe-area-inset-right));
  top: 70px;
  width: min(320px, 30vw);
  text-align: left;
  padding: 10px 15px;
  background: linear-gradient(100deg, #101e24f2, #0b131dc9);
  border: 0;
  border-left: 2px solid #80b8bb;
  color: #e0e8e5;
  box-shadow: 0 4px 18px #0003;
}
#transmission small {
  display: block;
  text-transform: uppercase;
  color: #9dd0cb;
  letter-spacing: 0.14em;
  font-size: 10px;
  margin-bottom: 4px;
}
#rescue-call {
  position: absolute;
  left: max(16px, env(safe-area-inset-left));
  top: 118px;
  padding: 8px 14px;
  border: 1px solid #a57549;
  border-left: 3px solid #ffbc77;
  text-align: left;
  background: #172028f0;
  color: #f4d4ac;
  display: flex;
  gap: 17px;
  align-items: center;
}
#rescue-call[hidden] {
  display: none;
}
#contact-call {
  position: absolute;
  top: 116px;
  left: max(16px, env(safe-area-inset-left));
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  gap: 2px 15px;
  padding: 8px 13px;
  text-align: left;
  color: #f8ece4;
  background: linear-gradient(105deg, #332623f5, #152127f2);
  border: 1px solid #77554a;
  border-left: 3px solid #f09170;
}
#contact-call[hidden] {
  display: none;
}
#rescue-call:not([hidden]) + #contact-call {
  margin-top: 49px;
}
#contact-call small {
  grid-column: 1 / -1;
  color: #ffc29e;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-size: 10px;
}
#contact-call span {
  font-size: 13px;
  color: #ead9cd;
}
.contact-heading {
  border-top-color: #ef9876;
}
.contact-orders {
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
.contact-orders > strong {
  font-size: 19px;
  color: #ffd0b7;
}
#panel .contact-orders label {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 3px 8px;
  font-size: 13px;
  color: #acbfc0;
  margin-bottom: 5px;
}
.contact-orders label b {
  white-space: nowrap;
  color: #e4ece5;
}
.contact-orders meter {
  grid-column: 1 / -1;
  display: block;
  width: 100%;
  height: 8px;
  accent-color: #81cabe;
}
.contact-orders .ops-row {
  width: 100%;
  text-align: left;
}
.contact-orders .ops-row small {
  display: block;
  white-space: normal;
}
.desk-chart #contact-plot {
  height: 204px;
  min-height: 165px;
}
@media (max-height: 530px) {
  #contact-call {
    top: 80px;
  }
  .contact-orders {
    padding: 8px;
    gap: 4px;
  }
}
#rescue-call span {
  color: #cad8d9;
  font-size: 13px;
}
.rescue-id small {
  font:
    600 10px Fleet,
    sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #ffc181;
}
#panel .rescue-brief h2 {
  font-size: 27px;
  margin: 4px 0 7px;
}
.rescue-brief figure {
  margin: 0;
  height: 106px;
  background: linear-gradient(95deg, #131e26, #19252b);
  border-block: 1px solid #35454b;
}
.rescue-brief img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
#panel .rescue-brief p {
  font:
    14px/1.4 'Segoe UI',
    sans-serif;
  margin: 12px 0;
}
.rescue-brief ul {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 0;
  list-style: none;
  gap: 5px;
  margin: 9px 0;
}
.rescue-brief li {
  padding: 6px 9px;
  border-top: 2px solid #d99e64;
  background: #263239;
}
.rescue-brief li.secured {
  border-color: #85c6b2;
}
.rescue-brief li span {
  display: block;
  color: #c0d0ce;
  font-size: 13px;
}
.rescue-status {
  padding: 7px 2px;
  color: #c1e2dc;
}
.rescue-brief [data-action='op/mission-rescue-send'] {
  border-left: 2px solid #f6bd7e;
}
.ops-list [data-action^='op/transmission-'] {
  display: grid;
  gap: 5px;
  text-align: left;
}
.ops-list [data-action^='op/transmission-'] small {
  max-width: none;
  text-align: left;
  color: #cbdbdb;
}
@media (max-height: 520px) {
  #rescue-call {
    top: 80px;
  }
  .rescue-brief figure {
    height: 54px;
  }
}
#transmission span {
  display: block;
  font-size: 15px;
  line-height: 1.38;
  letter-spacing: 0;
}
.ops-list [data-action^='op/transmission-']:disabled {
  opacity: 1;
  display: grid;
  gap: 4px;
}
.ops-list [data-action^='op/transmission-'] small {
  max-width: none;
  text-align: left;
  color: #bfcfcf;
}
@media (max-width: 700px), (max-height: 490px) {
  #transmission {
    top: 48px;
    width: 32vw;
    padding: 6px 9px;
  }
  #transmission span {
    font-size: 12px;
  }
}
/* In-flight controls share the materials and signal colours of the flight deck. */
.sector-hud #objective {
  background: linear-gradient(110deg, #0b131bf2 35%, #111d24bb);
  border: 0;
  border-left: 3px solid #e7ad69;
  box-shadow: 0 6px 25px #05091144;
  padding: 10px 17px 12px;
}
.sector-hud #objective[data-chapter]:not([data-chapter=''])::before,
.brief-copy > small {
  content: attr(data-chapter);
  display: block;
  margin-bottom: 5px;
  color: #efbd81;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
}
.sector-hud #objective strong {
  color: #fff3df;
  letter-spacing: 0.018em;
  text-transform: none;
}
.sector-hud #objective span {
  color: #c6d4d5;
}
.sector-hud #matter {
  color: #dcb681;
  border-color: #736554;
  background: #101923ed;
}
.sector-hud #matter b {
  color: #fff3da;
}
.sector-hud #bar {
  border-color: #a7c2c24a;
  background: linear-gradient(0deg, #07111bfa, #101c24f2);
  gap: 3px;
}
.sector-hud #bar button {
  border-color: transparent;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #ccdbda;
  border-radius: 0;
  font-weight: 500;
}
.sector-hud #bar button:is(:hover, :focus-visible) {
  color: white;
  background: #a0c4ce17;
}
.sector-hud #bar button.active {
  color: #aef1e1;
  background: #73b8ae10;
  border-bottom-color: #79c7b5;
  box-shadow: none;
}
.sector-hud #bar button[data-action='op/page-sector'],
.sector-hud #bar button.gold {
  color: #ffdaa0;
  background: linear-gradient(120deg, #76553356, #49352144);
  border-color: #ab805344;
}
.sector-hud #bar button[data-action='roster'],
.sector-hud #bar .bar-build {
  border-left: 1px solid #b9c5c637;
}
.sector-hud #bar button[data-action='tempo'] {
  min-width: 49px;
  color: #b7c9c9;
}
#selection-info:has(.ship-record) {
  width: min(410px, 42vw);
  max-width: none;
  padding: 10px 14px;
  border: 1px solid #6c828269;
  border-left: 2px solid #c6a471;
  background: linear-gradient(122deg, #101c25f5, #0a131cee);
}
.ship-record {
  display: grid;
  grid-template-columns: 104px auto;
  align-items: center;
  gap: 12px;
}
.ship-record img {
  width: 100%;
  height: 65px;
  object-fit: contain;
  background: #101c25;
  border-bottom: 1px solid #63817b55;
}
.ship-record strong,
.ship-record small,
.ship-record span {
  display: block;
}
.ship-record strong {
  font-size: 21px;
  color: #f1ece1;
  line-height: 1.15;
}
.ship-record small,
.integrity label,
.brief-chart figcaption {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #adbfc0;
}
.ship-record span {
  font-size: 13px;
  color: #b7c6c7;
}
.ship-record .unit-filters button {
  border: 0;
  background: transparent;
  margin: 0;
  padding: 2px 7px 1px 0;
  text-align: left;
  font-size: 12px;
  color: #9fd4d2;
}
.integrity {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 6px;
  color: #bdcec9;
  font-size: 12px;
}
.integrity label {
  white-space: nowrap;
}
.integrity label b {
  font-weight: 500;
  letter-spacing: 0;
  color: #e1e8df;
}
.integrity meter {
  width: 62px;
  height: 8px;
  accent-color: #9dd1b5;
}
.integrity meter::-webkit-meter-bar {
  background: #26323b;
  border: 0;
  border-radius: 0;
}
.integrity meter::-webkit-meter-optimum-value {
  background: #92c6ac;
}
#panel.operations.briefing {
  width: min(940px, 94vw);
  padding: 0;
  border: 1px solid #566566;
  border-top: 3px solid #dda665;
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) minmax(250px, 1.1fr);
  background: linear-gradient(115deg, #101b24fa, #0a121af8);
}
.brief-copy {
  padding: clamp(18px, 2.5vw, 36px);
}
#panel.operations.briefing h2 {
  color: #f6ecdb;
  font-size: clamp(27px, 3.1vw, 50px);
  line-height: 1.04;
  text-transform: none;
  letter-spacing: -0.02em;
}
#panel.operations.briefing p {
  color: #c7d3d4;
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.48;
  margin: 17px 0 24px;
}
.brief-actions {
  display: grid;
  gap: 6px;
}
.brief-actions .ops-row:first-child {
  background: #9a6c3938;
  color: #ffddac;
  border-left: 2px solid #e4b27b;
}
.brief-chart {
  position: relative;
  margin: 0;
  min-height: 245px;
  background:
    linear-gradient(125deg, #101c25eb, #101c25bb),
    url('./assets/ilyra-dust.jpg') 74% 48% / cover;
  border-left: 1px solid #53656780;
  display: flex;
  flex-direction: column;
}
.brief-chart figcaption {
  padding: 20px 18px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #b7cec9;
}
.brief-chart figcaption b {
  font-size: 20px;
  color: #e1e4da;
  letter-spacing: 0;
  text-transform: none;
}
.brief-chart canvas {
  width: 100%;
  flex: 1;
  min-height: 160px;
  height: 0;
}
.audio-mix {
  display: grid;
  gap: 8px;
}
#panel .audio-mix label {
  display: grid;
  grid-template-columns: 6em 1fr 3em;
  padding: 9px 0;
  color: #e0e5df;
}
.audio-mix input {
  width: 100%;
}
.audio-mix output {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 720px), (max-height: 515px) {
  #panel.operations.briefing {
    grid-template-columns: minmax(0, 1fr);
    max-height: 89vh;
  }
  .brief-chart {
    min-height: 136px;
    border-top: 1px solid #53656780;
    border-left: 0;
  }
  .brief-chart canvas {
    min-height: 106px;
  }
  #panel.operations.briefing p {
    margin: 9px 0 13px;
  }
  .brief-copy,
  .brief-chart figcaption {
    padding: 12px 16px;
  }
  .ship-record {
    grid-template-columns: 65px auto;
    gap: 5px;
  }
  .ship-record img {
    height: 45px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .brief-copy,
  .brief-chart {
    animation: brief-in 0.24s ease-out both;
  }
  @keyframes brief-in {
    from {
      opacity: 0.82;
      transform: translateY(4px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
.desk-chart #pass-plot { min-height: 188px; height: clamp(215px,35vh,360px); }
.pass-orders { display: flex; flex-direction: column; gap: 7px; padding: 9px; }
.pass-orders > strong { color: #e1e9e6; font-size: 17px; }
.pass-reach { font-size:14px; color:#e2b192; }
.pass-orders .pass-fix { display: grid; grid-template-columns: 45px 1fr; gap: 2px 8px; text-align: left; border-left: 2px dashed #bb9e71; padding: 5px 9px; }
.pass-fix[data-live="true"] { border-left: 2px solid #ef9b83; }
.pass-fix[aria-pressed="true"] { background: #273b40; }
.pass-fix b { grid-row: span 2; align-self: center; color: #f2d4ae; }
.pass-fix small { color: #acc1c4; }
#panel.operations.mission-desk:has(#pass-plot) { width: min(1060px,calc(100% - 30px)); }
.desk-body.pass-room { grid-template-columns: minmax(260px,1.7fr) minmax(255px,1fr); }
@media(max-width:640px) {
  .desk-body.pass-room { grid-template-columns: 1fr; overflow:auto; }
  .pass-room .desk-chart { min-height:205px; }
}

.incoming-manifest {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  max-height: 46vh;
  overflow: auto;
}
#panel:not([hidden]):has(> .incoming-manifest) {
  display: flex;
  flex-direction: column;
}
#panel:has(> .incoming-manifest) > :not(.incoming-manifest) { flex: 0 0 auto; }
#panel:has(> .incoming-manifest) .heading { margin-bottom: 5px; }
#panel:has(> .incoming-manifest) .ops-row { align-self: start; }
.manifest-chapter { color: #f1ca90; font-size: 14px; }
.manifest-chapter + p { margin: 5px 0 10px; }
.manifest-duty { margin: 4px 0 10px; color: #d4ece7; line-height: 1.3; }
.damage-report { display:flex; align-items:center; gap:8px; margin-top:6px; border-top:1px solid #36505a; }
.screen-duty { display:flex; align-items:center; flex-wrap:wrap; gap:4px 10px; }
.screen-duty span { color:#a3dfe4; font-size:13px; }
.damage-report canvas { width:48px; height:48px; flex:none; }
.damage-report .inspect-strike { margin-left:auto; flex:none; }
@media (max-width:1100px) {
  .damage-report .inspect-strike { padding-inline:5px; }
}
.damage-report div { min-width:0; }
.damage-report b,.damage-report span { display:block; font-size:14px; line-height:1.25; }
.damage-report b { color:#f4d5b3; }
.damage-report span { color:#d5e6e6; font-variant-numeric:tabular-nums; }
#selection-info .quick-intercept { border-color:#ca9571; color:#ffe1c1; }
.incoming-manifest { min-height: 4em; margin-bottom: 6px; }
.incoming-manifest li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 5px 12px;
  padding: 8px 4px;
  border-bottom: 1px solid #314850;
  color: #e1eeec;
}
.dock-slips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}
.dock-slip {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 10px;
  border: 1px solid #415a62;
  background: linear-gradient(145deg, #182a33, #0a171e);
  gap: 5px;
}
.dock-slip .dock-side {
  font-size: 12px;
  color: #edb979;
  text-transform: uppercase;
  letter-spacing: 0.13em;
}
.dock-slip img {
  width: 100%;
  aspect-ratio: 2.4;
  object-fit: contain;
}
.dock-slip span,
.dock-slip small {
  color: #b6c9ce;
  font-size: 13px;
}
.dock-slip strong {
  margin: auto 0;
  color: #adbebc;
  font-weight: 500;
}
.dock-slip meter {
  width: 100%;
  height: 8px;
  accent-color: #86dcd0;
}
.dock-slip meter::-webkit-meter-bar {
  background: #273e47;
  border: 0;
  height: 5px;
}
.dock-slip meter::-webkit-meter-optimum-value {
  background: #83d6c5;
}
.dock-slip button {
  margin-top: auto;
}
.dock-slips ~ .ops-row {
  width: 100%;
  margin-bottom: 3px;
}
.dock-slips ~ h3 {
  font-size: 14px;
  color: #d8bc99;
  margin: 13px 0 4px;
}
.manifest-hull {
  color: #c9d6d5;
  font-variant-numeric: tabular-nums;
}
.gate-traffic h3, .ilyra-arrival h3 {
  color: #b3ded8;
  margin: 0 0 6px;
  font-size: 17px;
}
.gate-traffic dl, .ilyra-arrival ol { padding: 0; margin: 5px 0 12px; }
.gate-traffic dl > div, .ilyra-arrival li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid #314850;
}
.gate-traffic dd { margin: 0; color: #b7d4d0; }
.gate-traffic .ops-row { width: 100%; }
.ilyra-arrival li { grid-template-columns: 4em minmax(4em, 1fr) minmax(0, 2fr); }
.ilyra-arrival time { color: #e3b875; font-variant-numeric: tabular-nums; }
.ilyra-arrival details { margin: 12px 0; color: #c5d8d8; }
.ilyra-arrival summary { cursor: pointer; padding: 4px 0; }
.ilyra-arrival details div { padding: 3px 0; }
#panel:has(.ilyra-arrival) { width: min(540px, calc(100vw - 32px)); max-height: 76vh; overflow: auto; }
.manifest-detail {
  grid-column: 1 / -1;
  overflow-wrap: anywhere;
  color: #adc2c4;
  font-size: 13px;
  line-height: 1.35;
}
.incoming-manifest .berth {
  grid-column: 1/-1;
  justify-self: start;
  padding: 4px 9px;
  font-size: 13px;
}
.incoming-manifest .berth[aria-pressed='true'] {
  border-color: #c39256;
  color: #ffdbac;
}
.passage-note {
  margin: 10px 0 15px;
  padding: 6px 10px;
  border-left: 2px solid #c39256;
  color: #d4ddd9;
}
.passage-note strong,
.passage-note span {
  display: block;
}
.passage-note strong {
  color: #e4b780;
  margin-bottom: 2px;
  font-size: 13px;
}
.incoming-manifest meter {
  width: 100%;
  height: 6px;
  grid-column: 1/-1;
}
.incoming-manifest meter::-webkit-meter-bar {
  background: #273e44;
  border: 0;
  border-radius: 0;
}
.incoming-manifest meter::-webkit-meter-optimum-value {
  background: #6bb6a9;
}
.incoming-manifest meter::-webkit-meter-suboptimum-value {
  background: #c5a15d;
}
.incoming-manifest meter::-webkit-meter-even-less-good-value {
  background: #e08068;
}
.brief-copy p,
#transmission span {
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-weight: 400;
}
#panel.operations.briefing .brief-copy p {
  font-size: clamp(14px, 1.13vw, 17px);
  line-height: 1.55;
}
#transmission span {
  font-size: 14px;
}
.front-open #panel.operations.briefing {
  left: 50%;
  transform: translate(-50%, -50%);
}
#panel.operations.corridor-book {
  width:min(950px,calc(100% - 32px)); max-height:calc(100% - 108px); overflow:auto;
  padding:0; border:1px solid #526568; border-top:3px solid #d8ac72;
  background:linear-gradient(112deg,#17282d,#101b23 76%); color:#e7efeb;
}
.front-open #panel.operations.corridor-book { left:50%; top:50%; bottom:auto; transform:translate(-50%,-50%); max-height:calc(100% - 24px); }
.corr-heading,.corr-orders,.corr-readout,.corr-choices,.corr-stops { display:flex; align-items:center; gap:8px; }
.corr-heading { justify-content:space-between; padding:13px 20px 12px; border-bottom:1px solid #40555b; }
.corr-heading small,.corr-site small { color:#e5bb87; text-transform:uppercase; letter-spacing:.15em; font-size:11px; font-weight:600; }
#panel .corr-heading h2 { margin:2px 0 0; font-size:clamp(22px,2.4vw,32px); }
.corr-heading button { min-width:36px; font-size:22px; }
.corr-grid { display:grid; grid-template-columns:1.45fr 1fr; gap:1px; background:#3d5359; }
.corr-map { display:grid; grid-template-rows:auto minmax(116px,1fr) auto; min-width:0; background:#0c1920; }
.corr-choices,.corr-stops { padding:7px 10px; flex-wrap:wrap; }
.corr-choices button,.corr-stops button { text-align:left; font:inherit; font-size:14px; padding:4px 8px; min-height:30px; }
.corr-choices b { font-size:12px; font-variant-numeric:tabular-nums; margin-left:5px; }
.corr-choices .corr-projection { margin-inline-start:auto; border-color:#567779; color:#c3e3e3; }
.corr-choices [data-action*="corridor-route-"]::before { content:""; display:inline-block; width:12px; margin-right:5px; vertical-align:middle; border-top:2px solid #80dfd8; }
.corr-choices [data-action$="-inner"]::before { border-top:2px dashed #ffca87; }
.corr-site .corr-observe { padding:5px 9px; margin-top:4px; background:#0d232ce8; }
.corr-choices [aria-pressed="true"],.corr-stops [aria-pressed="true"] { color:#ffdaa4; border-color:#cea36b; background:#41382e; }
.corr-stops { border-top:1px solid #253a41; }
#corridor-chart { display:block; width:100%; height:clamp(135px,24vh,235px); cursor:crosshair; }
.corr-site { position:relative; margin:0; background:#12222b; overflow:hidden; }
.corr-site img { position:absolute; width:100%; height:100%; object-fit:cover; inset:0; }
.corr-site figcaption { position:absolute; inset:auto 0 0; padding:32px 16px 12px; background:linear-gradient(transparent,#0b161de8); }
.corr-site h3 { margin:2px 0; font-size:24px; color:white; }
.corr-readout { padding:10px 18px; gap:36px; border-top:1px solid #40555b; }
.corr-readout span,.corr-readout strong { display:block; }
.corr-readout strong { font-size:17px; font-variant-numeric:tabular-nums; }
.corr-readout span { font-size:13px; color:#b0c5c5; }
#panel .corr-caption { margin:0; padding:1px 18px 12px; font-size:15px; color:#ccdad6; }
.corr-orders { border-top:1px solid #42565a; padding:10px 15px; }
.corr-orders span { margin-right:auto; font-size:14px; color:#a6d8d1; }
.corr-orders button,.chart-compare { padding:6px 10px; min-height:34px; }
.corr-orders .corr-send { color:#172125; background:#e9c18b; border-color:#f0cc9f; font-weight:600; }
.corr-orders button:disabled { opacity:.55; }
.chart-compare { margin-left:auto; margin-right:8px; }
@media(max-width:680px) {
  .corr-grid { grid-template-columns:1.2fr 1fr; }
  .corr-choices,.corr-stops { gap:3px; padding:4px; }
  .corr-orders { flex-wrap:wrap; }
  .corr-orders span { flex-basis:100%; }
  .corr-choices b { display:none; }
}
.flight-order {
  border-top: 1px solid #31424b;
  padding: 6px 0 3px;
  margin-top: 5px;
  font-size: 13px;
  color: #b8d3d1;
}

#panel.operations.mission-desk {
  width: min(890px, calc(100% - 30px));
  padding: 0;
  border: 1px solid #596c70;
  border-top: 3px solid #c9a06c;
  background: linear-gradient(118deg, #16242afc, #0a141cf9 74%);
}
.desk-heading,
.desk-chart figcaption,
.desk-tools,
.desk-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.desk-heading {
  padding: 13px 18px 12px;
  border-bottom: 1px solid #42565a;
}
.desk-heading small,
.sensor-report > small,
.desk-chart figcaption {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.15em;
  font-weight: 600;
  color: #c8a97a;
}
#panel .desk-heading h2 {
  margin: 2px 0 0;
  font-size: 26px;
  letter-spacing: 0.015em;
  text-transform: none;
  color: #fff1dc;
}
.desk-heading > button {
  width: 34px;
  height: 32px;
  font-size: 18px;
  padding: 0;
}
.desk-body {
  display: grid;
  grid-template-columns: minmax(260px, 1.14fr) minmax(265px, 1fr);
}
.desk-chart {
  display: flex;
  flex-direction: column;
  margin: 0;
  min-width: 0;
  border-right: 1px solid #3b5056;
  background: radial-gradient(ellipse at 48% 49%, #19323b 0%, #11232d 45%, #0b171f 90%);
}
.desk-chart figcaption {
  padding: 13px 15px 9px;
  color: #a5c9c7;
}
.desk-chart figcaption b {
  font-size: 13px;
  color: #dbe2da;
  letter-spacing: 0.04em;
}
.desk-chart canvas {
  display: block;
  width: 100%;
  height: 200px;
  flex: 1;
  min-height: 145px;
  cursor: crosshair;
}
.desk-legend {
  justify-content: flex-start;
  gap: 16px;
  padding: 9px 15px;
  font-size: 12px;
  color: #c9ad86;
}
.desk-legend span + span {
  color: #97cfc8;
}
.desk-orders {
  padding: 13px;
  min-width: 0;
}
.passage-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.passage {
  text-align: left;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  background: #312b23;
  border: 1px solid #7d6346;
  border-top: 2px solid #dfac70;
  color: #f5dbb4;
  min-width: 0;
}
.passage.outer {
  background: #162e32;
  border-color: #3c6769;
  border-top-color: #74c6be;
  color: #bfece2;
}
.passage:disabled {
  opacity: 0.8;
}
.passage span {
  font-size: 16px;
  font-weight: 600;
}
.passage strong {
  color: #fff2de;
  font-size: 29px;
  line-height: 1.05;
}
.passage small {
  font-size: 13px;
  font-weight: 500;
}
.passage em {
  font-size: 12px;
  font-style: normal;
  color: #d2cfbc;
}
.passage-command {
  padding-top: 4px;
  font-size: 13px;
  font-weight: 600;
}
.passage:is(:hover, :focus-visible):enabled {
  outline: 2px solid currentColor;
  outline-offset: -2px;
}
.sensor-report {
  display: grid;
  gap: 3px;
  margin: 11px 0 8px;
  padding: 8px 10px;
  border-left: 2px solid #ccaa73;
  background: #1b292e;
}
.sensor-report.hostile {
  border-color: #ff9278;
  background: #302522;
}
.sensor-report.clear {
  border-color: #83c6b1;
}
.sensor-report small {
  color: #b6c3c2;
}
.sensor-report strong {
  font-size: 15px;
  color: #e6ece0;
}
.sensor-report button {
  justify-self: start;
  min-height: 28px;
  margin-top: 4px;
  border: 1px solid #486760;
}
.desk-task-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.exposure-list { display: grid; gap: 6px; margin: 0 0 8px; }
.exposure-axis, .exposure-heading, .exposure-dispatch { display: flex; align-items: center; justify-content: space-between; }
.exposure-axis { color: #b4c5c5; font-size: 11px; padding: 0 9px; }
.exposure-card { padding: 6px 9px; background: #192b30; border: 1px solid #384d50; }
.exposure-heading strong { color: #e9eeea; font-size: 15px; }
.exposure-heading button, .exposure-dispatch { min-height: 24px; padding: 2px 6px; font-size: 12px; }
.exposure-card small { color: #c0cfca; font-size: 12px; }
.exposure-card .exposure-eta { display: block; margin: 1px 0 3px; color: #e0c8a9; }
.exposure-track { display: flex; height: 6px; margin: 5px 0; }
.exposure-track .clear { background: #68a6a1; }
.exposure-track .storm { background: repeating-linear-gradient(115deg,#bc8057 0 3px,#533f3a 3px 6px); }
.exposure-dispatch { width: 100%; gap: 7px; text-align: left; }
.exposure-dispatch:disabled { opacity: 1; border-color: transparent; background: transparent; color: #cad5cf; }
.exposure-dispatch b { color: #f8cc8e; }
.desk-legend span.weather-key { color: #e8ae83; }
.relief-manifest { margin-bottom: 6px; }
.relief-manifest .ops-row { width: 100%; border-left: 2px solid #bd9560; }
.relief-card small { color: #d1ba91; font-size: 12px; }
.relief-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.relief-actions button { min-height: 26px; padding: 2px 6px; font-size: 12px; }
.wreck-list {
  display: grid;
  gap: 5px;
  margin: 0 0 7px;
}
.wreck-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: stretch;
  overflow: hidden;
  border: 1px solid #394b50;
  background: #17262d;
}
.wreck-photo {
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 0;
  background: #101c25;
  color: #b3d8d4;
  border: none;
  border-right: 1px solid #394b50;
}
.wreck-photo img { width: 100%; height: 43px; object-fit: contain; }
.wreck-photo small { font-size: 11px; padding-bottom: 4px; }
.wreck-card > div:last-child {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 3px;
  padding: 7px 9px;
}
.wreck-card strong { font-size: 15px; }
.wreck-card span { font-size: 12px; color: #b8c9c8; line-height: 1.15; }
.wreck-card > div > button { min-height: 25px; padding: 2px 8px; font-size: 12px; }
.wreck-photo:focus-visible { outline: 2px solid #ffd49d; outline-offset: -3px; }
.desk-task-list .ops-row {
  display: grid;
  align-content: start;
  gap: 3px;
  min-width: 0;
  padding: 6px 8px;
}
.desk-task-list .ops-row small {
  text-align: left;
  font-size: 12px;
  line-height: 1.1;
}
.desk-task-list .ops-row b {
  font-size: 14px;
}
.desk-task-list .ops-row:disabled {
  opacity: 1;
  background: #17242b;
  border-color: #34434a;
}
.desk-task-list .ops-row:disabled b {
  color: #bfcdcf;
}
.desk-task-list .ops-row:disabled small,
.report-origin {
  color: #adbfbe;
}
.report-origin {
  font-size: 12px;
}
body:has(#panel.mission-desk:not([hidden])) #objective {
  visibility: hidden;
}
.desk-tools {
  justify-content: flex-start;
  flex-wrap: wrap;
  padding: 7px 12px;
  gap: 3px;
  border-top: 1px solid #3b5056;
}
.desk-tools button {
  border: 0;
  background: transparent;
  gap: 5px;
  padding: 5px 8px;
  font-size: 13px;
  min-height: 28px;
}
.desk-tools button small:empty {
  display: none;
}
@media (min-width: 671px) {
  #panel.operations.mission-desk:not([hidden]):has(.desk-body) {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .mission-desk .desk-heading, .mission-desk .desk-tools { flex-shrink: 0; }
  .mission-desk .desk-body { min-height: 0; }
  .mission-desk .desk-orders { overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
}
@media (max-width: 670px) {
  .desk-body {
    grid-template-columns: 1fr;
  }
  .desk-chart {
    border: 0;
    border-bottom: 1px solid #3b5056;
  }
  .desk-chart canvas {
    height: 145px;
    flex: none;
  }
  .desk-heading {
    padding: 7px 12px;
  }
}
@media (max-height: 530px) and (min-width: 671px) {
  .desk-chart canvas {
    height: 130px;
    min-height: 100px;
  }
  .desk-heading {
    padding: 4px 10px;
  }
  .desk-orders {
    padding: 6px;
  }
}
.flight-order > div {
  display: flex;
  align-items: baseline;
  gap: 7px;
}
.flight-order i {
  color: #81e5d0;
  font-style: normal;
}
.flight-order span {
  margin-left: auto;
  color: #e6e6d9;
  font-variant-numeric: tabular-nums;
}
.flight-order small {
  color: #ffb48a;
}

#panel.operations.journal {
  width: min(1080px, calc(100% - 44px));
  max-height: calc(100% - 32px);
  padding: 0;
  border: 1px solid #51646b;
  background: #0e1a21;
  color: #edeae0;
  overflow: auto;
}
.front-open #panel.operations.journal { left: 50%; top: 50%; bottom: auto; transform: translate(-50%,-50%); }
.journal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 24px; border-bottom: 1px solid #435156;
  background: linear-gradient(110deg,#1c2a30,#0b151e);
}
.journal-head small,.journal-copy small {
  display: block; color: #e4b279; font-size: 11px; font-weight: 600;
  line-height: 1.4; letter-spacing: .15em; text-transform: uppercase;
}
#panel.journal .journal-head h2 { margin: 0; font-size: 29px; line-height: 1.14; color: #fff3df; letter-spacing: .01em; }
.journal-head button,.journal-commands button,.journal-itinerary > button {
  padding: 8px 14px; border: 1px solid #52666e; border-radius: 2px;
  background: #17262e; color: #e1e6df; font-size: 15px;
}
.journal-layout { display: grid; grid-template-columns: minmax(0,1.9fr) minmax(245px,1fr); }
.journal-feature { min-width: 0; background: #101c23; }
.journal-frame { position: relative; background: #070f17; aspect-ratio: 2.5; overflow: hidden; }
.journal-frame img { width: 100%; height: 100%; display: block; object-fit: cover; }
.journal-coordinate { position: absolute; bottom: 10px; right: 13px; font-size: 13px; color: #d2dcda; background: #0b121bd6; padding: 3px 7px; }
.journal-coordinate b { color: #fff1d8; }
.journal-copy { border-top: 2px solid #b98b56; padding: 17px 25px 22px; }
.journal-copy h3 { font-size: clamp(25px,3.1vw,42px); line-height: 1.08; letter-spacing: -.025em; margin: 5px 0 8px; color: #f6edda; }
#panel.journal .journal-copy p { max-width: 62ch; margin: 0; font-size: 16px; line-height: 1.4; color: #d5e0df; }
#panel.journal .journal-copy .journal-convoy { margin-top: 8px; color: #a0bbb9; font-size: 14px; }
.journal-copy blockquote { border-left: 2px solid #57afad; padding-left: 10px; margin: 10px 0 0; font-size: 15px; color: #b8d4d3; }
.journal-commands { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 15px; }
.journal-commands .journal-go { color: #1b2022; background: #e1b47d; border-color: #f0c797; font-weight: 600; }
.journal-condition { font-size: 15px; color: #ebc089; }
.journal-itinerary { padding: 17px; border-left: 1px solid #3a4d53; background: linear-gradient(145deg,#182830,#0a161e); }
.journal-progress { display: flex; gap: 8px; justify-content: space-between; align-items: baseline; padding: 0 4px 12px; }
.journal-progress b { color: #ede7d8; font-size: 18px; }
.journal-progress span { font-size: 13px; color: #aec2c6; }
.journal-itinerary nav { display: grid; }
.journal-stop { display: grid; grid-template-columns: 30px 1fr 16px; gap: 10px; align-items: center; text-align: left;
  width: 100%; min-height: 45px; padding: 7px 12px; border-width: 0 0 1px 2px; border-style: solid;
  border-color: transparent transparent #31434b; border-radius: 0; color: #c4d1d2; background: transparent; font-size: 16px; }
.journal-stop[aria-pressed=true] { background: #334044; border-left-color: #edbc83; color: #fff2d9; }
.journal-stop:hover,.journal-head button:hover,.journal-commands button:hover { filter: brightness(1.15); }
.journal-stop:focus-visible,.journal-commands button:focus-visible,.journal-head button:focus-visible { outline: 2px solid #87e2dc; outline-offset: -2px; }
.journal-index { font-variant-numeric: tabular-nums; color: #9aadb0; font-size: 13px; letter-spacing: .08em; }
.journal-stop[aria-pressed=true] .journal-index { color: #edbc83; }
.journal-lock { position: relative; width: 9px; height: 7px; border: 1px solid #839b9e; border-radius: 1px; }
.journal-lock::before { content: ''; position: absolute; left: 1px; top: -6px; width: 5px; height: 5px; border: 1px solid #839b9e; border-bottom: 0; border-radius: 4px 4px 0 0; }
.journal-ready { width: 8px; height: 8px; transform: rotate(45deg); background: #e5ad73; }
.journal-done { font-style: normal; color: #91d8c9; }
.journal-itinerary > button { margin-top: 10px; }
@media (max-height: 670px) and (min-width: 761px) {
  .journal-frame { aspect-ratio: 3.5; }.journal-copy { padding: 12px 19px; }.journal-stop { min-height: 39px; }
}
@media (max-width: 760px) {
  #panel.operations.journal { width: calc(100% - 16px); max-height: calc(100% - 16px); }
  .journal-layout { grid-template-columns: 1fr; }.journal-frame { aspect-ratio: 3; }
  .journal-head,.journal-copy,.journal-itinerary { padding: 10px 15px; }
  .journal-itinerary { border: 0; border-top: 1px solid #3a4d53; }
  .journal-stop { min-height: 40px; }.journal-commands { margin-top: 10px; }
}

/* Numbered wings stay within reach of the command bar, clear of the tactical key. */
#control-groups { position:absolute; left:calc(min(410px,42vw) + 27px); right:16px; bottom:80px; pointer-events:none; }
#game:has(#chart-key:not([hidden])) #control-groups { right:min(27vw,258px); }
.wing-strip { display:flex; align-items:center; gap:4px; max-width:100%; width:max-content; overflow:auto; scrollbar-width:thin; pointer-events:auto; }
.wing-strip button { display:flex; gap:7px; align-items:center; white-space:nowrap; font-size:13px; border-color:#738a8c6b; padding:5px 7px; background:#0b1822ef; }
.wing-strip button[aria-pressed=true], .wing-slots [aria-pressed=true] { border-color:#e2ba7b; color:#ffe3b5; background:#31291e; }
.wing-strip kbd { font:600 13px Fleet,sans-serif; color:#e9c691; border-right:1px solid #9c865d88; padding-right:7px; }
.wing-strip b { color:#b8dad5; font-weight:500; }
.wing-strip i { color:#ffb381; font-style:normal; }
#panel.wing-panel { width:min(745px,calc(100% - 32px)); max-height:calc(100% - 138px); padding:16px 18px; background:linear-gradient(115deg,#10212bf9,#0a151dfb 74%); border-color:#62777b; }
.wing-desk { display:grid; grid-template-columns:1fr 1.08fr; gap:20px; margin-top:14px; }
.wing-desk section { min-width:0; }
.wing-heading { display:flex; justify-content:space-between; align-items:baseline; gap:6px; margin-bottom:10px; }
.wing-heading h3, .wing-summary h3, .wing-summary p { margin:0; }
.wing-heading h3 { font-size:17px; color:#dce6df; }
.wing-heading span, .wing-summary small { font-size:12px; color:#a1b7ba; }
.wing-scroll { max-height:min(35vh,308px); overflow-y:auto; scrollbar-width:thin; }
.wing-ship { display:flex; align-items:stretch; border-bottom:1px solid #48616d6b; }
.wing-ship.chosen { background:#34534f4d; }
.wing-ship button { border:0; background:transparent; min-height:33px; }
.wing-ship .wing-check { color:#b6ccc6; font-size:18px; padding:6px 10px; }
.wing-ship.chosen .wing-check { color:#9aead6; }
.wing-unit { flex:1; display:grid; grid-template-columns:30px 1fr 32px auto; align-items:center; gap:4px; text-align:left; padding:4px 8px 4px 2px; }
.wing-membership { font-size:11px; font-style:normal; color:#dcc392; }
.wing-unit small, .wing-unit span { color:#9fb6ba; font-size:12px; }
.wing-unit strong { font-weight:500; color:#e4e6dc; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wing-manifest>button { margin-top:10px; padding:5px 10px; font-size:13px; }
.wing-detail { border-left:1px solid #465c64; padding-left:18px; }
.wing-slots { display:grid; grid-template-columns:repeat(9,1fr); gap:3px; }
.wing-slots button { padding:6px 0; color:#8a9fa7; border-color:#3e525e; }
.wing-slots .occupied { color:#e0e8dc; border-bottom-color:#85b7a9; }
.wing-slots [aria-pressed=true] { color:#ffe2ba; border-color:#d5ae73; }
.wing-summary { margin:16px 0 8px; }
.wing-summary small { text-transform:uppercase; letter-spacing:.13em; color:#dcb983; }
.wing-summary h3 { font-size:25px; color:#e5e7dc; }
.wing-summary p { margin-top:4px; font-size:13px; color:#b9c9c7; }
.wing-portraits { display:flex; gap:4px; margin:10px 0; }
.wing-portrait { flex:1; min-width:0; padding:0; border:0; background:transparent; text-align:left; }
.wing-portraits img { width:100%; height:54px; object-fit:contain; display:block; background:#101c25; }
.wing-portrait span { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; border-top:1px solid #42575c; font-size:12px; padding:3px; color:#c3cecb; }
.wing-portrait b { font-weight:500; color:#a1b8af; }
.wing-portrait.damaged span { border-color:#c6895e; }
.wing-portrait.damaged b { color:#edba82; }
.wing-actions { display:flex; flex-wrap:wrap; gap:5px; }
.wing-actions button { padding:5px 8px; font-size:13px; }
.wing-actions [data-action^=wing-repair] { border-color:#a98859; color:#f1cf9f; }
@media (max-height:680px) { #control-groups, #panel.wing-panel { bottom:72px; } #panel.wing-panel { max-height:calc(100% - 128px); } .wing-scroll {max-height:min(43vh,254px);} }
@media (max-width:740px) { .wing-strip button span { display:none; } .wing-desk { gap:10px; } .wing-detail { padding-left:10px; } }
@media (max-width:500px) { .wing-desk { grid-template-columns:1fr; } .wing-scroll { max-height:110px; } .wing-detail { border:0; padding:0; } }
