:root {
  --bg: #080e14;
  --panel: rgba(11, 19, 26, 0.88);
  --line: rgba(155, 191, 208, 0.16);
  --text: #e5edf2;
  --muted: #83929e;
  --cyan: #84dbed;
  --amber: #efb878;
  --red: #ff7168;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  font-family: inherit;
  color: inherit;
  cursor: pointer;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 5px;
}
button {
  border: 0;
}
button:disabled {
  opacity: 0.4;
  cursor: wait;
}
.hidden {
  display: none !important;
}
#app {
  height: 100dvh;
  min-height: 560px;
  position: relative;
  isolation: isolate;
}
#space {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  outline: none;
}
.vignette {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 8, 13, 0.76), transparent 62%),
    linear-gradient(
      0deg,
      rgba(3, 8, 13, 0.9),
      transparent 22%,
      transparent 85%,
      rgba(3, 8, 13, 0.6)
    );
}
.scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.06;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    #65b7d3 4px
  );
}
.topbar {
  height: 92px;
  margin: 0 40px;
  border-bottom: 1px solid var(--line);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  z-index: 10;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  font-size: 21px;
  font-weight: 750;
  letter-spacing: 5px;
}
.brandmark {
  font-size: 43px;
  font-weight: 900;
  font-family: Arial;
  letter-spacing: -6px;
  transform: scaleX(1.15);
  margin-right: 6px;
}
.brand small {
  display: block;
  font: 9px var(--mono);
  letter-spacing: 3.3px;
  margin-top: 7px;
  color: var(--muted);
}
nav {
  display: flex;
  height: 100%;
  gap: 32px;
  align-items: stretch;
}
.nav {
  background: none;
  position: relative;
  font: 11px var(--mono);
  letter-spacing: 1.2px;
  color: #99a5af;
  white-space: nowrap;
  padding: 0 0 1px;
}
.nav.active {
  color: var(--text);
}
.nav.active:after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--amber);
}
.nav:hover {
  color: var(--amber);
}
.key {
  font-size: 9px;
  border: 1px solid var(--line);
  padding: 2px 4px;
  margin-left: 8px;
}
.external {
  margin-left: 8px;
}
.header-tools {
  display: flex;
  align-items: center;
  gap: 20px;
}
.connection {
  font: 10px var(--mono);
  letter-spacing: 1px;
  white-space: nowrap;
}
.connection i,
.statusbar i,
.ready-system i,
.sector-top i {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px #80dfee80;
  margin-right: 8px;
}
.icon-button {
  background: none;
  display: flex;
  gap: 7px;
  align-items: center;
  color: #9faeb9;
  font-size: 20px;
  padding: 7px;
}
.icon-button span {
  font: 9px var(--mono);
}
.planning {
  position: relative;
  height: calc(100% - 128px);
  padding: 34px 40px 24px;
  display: flex;
  flex-direction: column;
  z-index: 2;
}
.planning-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.eyebrow {
  font: 10px var(--mono);
  letter-spacing: 1.8px;
  color: var(--muted);
}
.eyebrow span {
  margin: 0 10px;
  color: #526471;
}
h1 {
  font-size: 36px;
  letter-spacing: -1.3px;
  font-weight: 500;
  margin: 12px 0 9px;
}
p {
  color: #94a5b2;
  font-size: 14px;
  line-height: 1.7;
  margin: 0;
}
.pilot-badge {
  display: flex;
  align-items: center;
  gap: 15px;
  font: 11px var(--mono);
  letter-spacing: 1.3px;
}
.pilot-badge small {
  display: block;
  font-size: 9px;
  letter-spacing: 0.7px;
  color: #7f919f;
  margin-top: 8px;
}
.pilot-icon {
  width: 43px;
  height: 43px;
  border: 1px solid #697b88;
  display: grid;
  place-items: center;
  font-size: 31px;
  color: var(--amber);
  clip-path: polygon(
    25% 0,
    75% 0,
    100% 25%,
    100% 75%,
    75% 100%,
    25% 100%,
    0 75%,
    0 25%
  );
}
.mission-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 38px;
  min-height: 0;
  flex: 1;
}
.mission-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.section-label {
  display: flex;
  justify-content: space-between;
  font: 10px var(--mono);
  letter-spacing: 1.6px;
  color: #91a0aa;
  margin-bottom: 13px;
}
.section-label span {
  color: #536571;
}
.mission-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mission-option {
  padding: 14px 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: rgba(10, 18, 25, 0.75);
  position: relative;
}
.mission-option:hover {
  background: rgba(36, 51, 63, 0.8);
}
.mission-option.selected {
  border-color: #b38d62;
  background: linear-gradient(
    90deg,
    rgba(80, 58, 36, 0.35),
    rgba(20, 28, 32, 0.7)
  );
}
.mission-option.selected:before {
  content: "";
  position: absolute;
  width: 3px;
  background: var(--amber);
  left: -1px;
  top: 12px;
  bottom: 12px;
}
.mission-num {
  font: 13px var(--mono);
  color: #8293a1;
  width: 25px;
}
.selected .mission-num {
  color: var(--amber);
}
.mission-name {
  font-size: 14px;
  letter-spacing: 0.2px;
  flex: 1;
}
.mission-name small {
  display: block;
  color: #6e8392;
  font: 9px var(--mono);
  letter-spacing: 1px;
  margin-top: 6px;
}
.mission-option .mission-arrow {
  color: var(--amber);
  font-size: 18px;
}
.briefing {
  margin-top: 23px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.briefing .eyebrow {
  font-size: 9px;
  color: var(--amber);
}
h2 {
  font-weight: 500;
  letter-spacing: -0.5px;
  font-size: 24px;
  margin: 10px 0 12px;
}
.briefing p {
  font-size: 13px;
  line-height: 1.7;
}
.objective-label {
  font: 9px var(--mono);
  letter-spacing: 1.5px;
  margin: 20px 0 12px;
  color: #8499a9;
}
.briefing ul {
  padding: 0;
  margin: 0;
  list-style: none;
  font-size: 12px;
  color: #b6c3cc;
}
.briefing li {
  margin: 9px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.briefing li:before {
  content: "◇";
  color: var(--cyan);
  font-size: 15px;
}
.mission-specs {
  display: flex;
  margin-top: 20px;
  gap: 40px;
}
.mission-specs small,
.ship-info small,
.loadout small {
  display: block;
  font: 9px var(--mono);
  letter-spacing: 1.2px;
  color: #738694;
  margin-bottom: 8px;
}
.mission-specs span {
  font: 10px var(--mono);
  color: #c4d0d8;
  display: flex;
  gap: 10px;
}
.threat-bars {
  color: var(--amber);
  letter-spacing: 3px;
  font-weight: 400;
}
.comms {
  margin-top: auto;
  padding-top: 21px;
  display: flex;
  gap: 14px;
  align-items: center;
}
.signal {
  font: 18px var(--mono);
  letter-spacing: 2px;
  color: var(--cyan);
}
.comms small {
  font: 8px var(--mono);
  letter-spacing: 1.5px;
  color: #668597;
}
.comms p {
  font-size: 11px;
  font-style: italic;
  margin-top: 5px;
}
.sector-view {
  position: relative;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: radial-gradient(
    ellipse at 55% 55%,
    transparent 30%,
    rgba(3, 9, 14, 0.16)
  );
  min-height: 250px;
  overflow: hidden;
}
.sector-view:before,
.sector-view:after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-left: 1px solid #7394a6;
  left: 0;
}
.sector-view:before {
  top: 0;
  border-top: 1px solid #7394a6;
}
.sector-view:after {
  bottom: 0;
  border-bottom: 1px solid #7394a6;
}
.sector-top,
.sector-bottom {
  display: flex;
  justify-content: space-between;
  position: absolute;
  left: 20px;
  right: 20px;
  font: 9px var(--mono);
  letter-spacing: 1px;
  color: #93a8b8;
}
.sector-top {
  top: 16px;
}
.sector-bottom {
  bottom: 17px;
  font-size: 8px;
}
.sector-top i {
  width: 4px;
  height: 4px;
}
.sector-bottom span:first-child {
  color: var(--cyan);
}
.sector-bottom b {
  color: var(--amber);
  font-weight: 400;
  margin-left: 8px;
}
.planet-label {
  position: absolute;
  top: 36%;
  left: 13%;
  text-shadow: 0 2px 10px #000;
}
.label-rule {
  display: block;
  width: 30px;
  height: 1px;
  background: #aac5d1;
  margin-bottom: 13px;
}
.planet-label small {
  font: 8px var(--mono);
  letter-spacing: 2px;
  color: #a0bfca;
}
.planet-label h3 {
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 5px;
  margin: 8px 0;
}
.planet-label > span:last-child {
  font: 8px var(--mono);
  letter-spacing: 1px;
  color: #78919f;
}
.planet-label b {
  margin: 0 7px;
}
.map-node {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 11px;
  font: 8px var(--mono);
  letter-spacing: 1px;
  white-space: nowrap;
}
.map-node i {
  width: 10px;
  height: 10px;
  border: 1px solid var(--cyan);
  transform: rotate(45deg);
  background: #68b8cb44;
  box-shadow: 0 0 20px #62dcff33;
}
.map-node span {
  color: var(--cyan);
}
.map-node b {
  color: #9ab5c2;
  display: block;
  font-size: 8px;
  margin-top: 5px;
  font-weight: 400;
}
.node-entry {
  left: 22%;
  bottom: 24%;
}
.node-hostile {
  left: 64%;
  top: 31%;
}
.node-hostile i {
  border-color: var(--red);
  background: #fc786455;
}
.node-hostile span,
.node-hostile b {
  color: #e18b80;
}
.node-exit {
  left: 73%;
  bottom: 22%;
}
.launchbar {
  margin-top: 25px;
  border: 1px solid var(--line);
  min-height: 96px;
  display: flex;
  align-items: center;
  background: rgba(9, 17, 24, 0.92);
  padding: 16px 20px;
  gap: 21px;
}
.ship-insignia {
  font-size: 66px;
  color: #92b7c6;
  line-height: 1;
  width: 68px;
  text-align: center;
  transform: rotate(-45deg);
}
.ship-info {
  min-width: 170px;
}
.ship-info strong,
.loadout strong {
  display: block;
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0.3px;
}
.ship-info > span,
.loadout > span {
  display: block;
  font: 8px var(--mono);
  letter-spacing: 1px;
  color: #607988;
  margin-top: 8px;
}
.ready-system {
  border-left: 1px solid var(--line);
  padding-left: 27px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  font: 8px var(--mono);
  color: #8298a8;
  min-width: 230px;
}
.ready-system b {
  font-weight: 400;
  color: #b6d6df;
  margin-left: 12px;
}
.ready-system i {
  width: 4px;
  height: 4px;
  margin-right: 5px;
}
.loadout {
  border-left: 1px solid var(--line);
  padding-left: 28px;
  margin-right: auto;
}
.launch-button {
  background: var(--amber);
  color: #251d16;
  min-height: 54px;
  padding: 0 22px;
  display: flex;
  gap: 35px;
  align-items: center;
  justify-content: space-between;
  font: 11px var(--mono);
  font-weight: 700;
  letter-spacing: 1.3px;
  transition:
    background 0.15s,
    box-shadow 0.15s;
  white-space: nowrap;
}
.launch-button:hover {
  background: #ffd19a;
  box-shadow: 0 0 28px #dfab7130;
}
.launch-button b {
  font: 22px Arial;
}
.statusbar {
  height: 36px;
  position: absolute;
  bottom: 0;
  left: 40px;
  right: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  font: 8px var(--mono);
  letter-spacing: 1px;
  color: #668293;
  z-index: 3;
}
.statusbar b {
  font-weight: 400;
  margin: 0 12px;
  color: #465766;
}
.statusbar i {
  width: 4px;
  height: 4px;
}
.hud {
  position: absolute;
  inset: 92px 40px 36px;
  pointer-events: none;
}
.hud button {
  pointer-events: auto;
}
.flight-top {
  display: flex;
  justify-content: space-between;
  margin-top: 26px;
}
.flight-top h2 {
  font-size: 17px;
  font-weight: 400;
  color: #abc5d1;
}
.flight-stats {
  display: flex;
  gap: 30px;
  font: 9px var(--mono);
  color: #718d9f;
  align-items: flex-start;
}
.flight-stats b {
  display: block;
  font-size: 17px;
  font-weight: 400;
  color: #cee1e9;
  margin-top: 8px;
}
.heading-tape {
  position: absolute;
  top: 12%;
  left: 50%;
  transform: translateX(-50%);
  font: 10px var(--mono);
  word-spacing: 15px;
  color: #547e93;
  white-space: nowrap;
}
.heading-tape b {
  color: #b1e8f5;
  border-bottom: 2px solid #b1e8f5;
  padding-bottom: 12px;
}
.crosshair {
  position: absolute;
  top: 46%;
  left: 50%;
  width: 52px;
  height: 52px;
  transform: translate(-50%, -50%);
  border: 1px solid #90e4ef77;
  border-radius: 50%;
}
.crosshair:before,
.crosshair:after {
  content: "";
  position: absolute;
  background: #9ceafa;
  width: 20px;
  height: 1px;
  top: 50%;
}
.crosshair:before {
  left: -27px;
}
.crosshair:after {
  right: -27px;
}
.crosshair i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3px;
  height: 3px;
  background: #bbf0fc;
  box-shadow: 0 0 7px #acf;
}
.crosshair b {
  position: absolute;
  bottom: -18px;
  height: 9px;
  width: 1px;
  background: #9ceafa;
  left: 50%;
}
.speed-readout {
  position: absolute;
  left: 9%;
  top: 35%;
  display: flex;
  flex-direction: column;
  color: var(--cyan);
  font: 10px var(--mono);
  letter-spacing: 2px;
}
.speed-readout strong {
  font-size: 36px;
  font-weight: 400;
  margin: 7px 0;
}
.speed-readout small {
  font-size: 8px;
  color: #7babbe;
}
.speed-track {
  height: 90px;
  width: 4px;
  background: #69b3c233;
  position: absolute;
  right: -20px;
  top: 0;
}
.speed-track i {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: #9fe9f5;
  height: 40%;
}
.speed-readout > span:last-child {
  font-size: 8px;
  margin-top: 20px;
}
.instrument-deck {
  position: absolute;
  bottom: 44px;
  left: 9%;
  right: 9%;
  display: grid;
  grid-template-columns: 1fr 0.9fr 1fr;
  gap: 18px;
}
.instrument {
  height: 156px;
  padding: 15px 18px;
  border: 1px solid #496b8177;
  background: linear-gradient(130deg, #0a2031e0, #071725ee);
  box-shadow:
    0 0 0 5px #050c13cc,
    inset 0 0 35px #226b9520;
  position: relative;
}
.instrument:after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    #57aef506 4px
  );
  pointer-events: none;
}
.instrument-title {
  font: 9px var(--mono);
  letter-spacing: 1px;
  color: #a1c7d7;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #4a7c902e;
  padding-bottom: 13px;
}
.instrument-title > span {
  font-size: 8px;
  color: #678da0;
}
.status-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font: 9px var(--mono);
  color: #80b1c5;
  margin-top: 20px;
}
.status-row > span {
  width: 39px;
}
.status-row b {
  width: 27px;
  font-size: 10px;
  font-weight: 400;
}
.meter {
  height: 5px;
  flex: 1;
  background: #90c9df19;
  overflow: hidden;
}
.meter i {
  height: 100%;
  width: 100%;
  display: block;
  background: #8cd8ed;
  box-shadow: 0 0 10px #7cdbff66;
  transition: width 0.1s;
}
.instrument > small {
  display: block;
  font: 8px var(--mono);
  color: #5a859a;
  letter-spacing: 1px;
  margin-top: 18px;
}
.radar-panel {
  padding: 12px 14px;
}
.radar-panel canvas {
  position: absolute;
  bottom: 1px;
  left: 10%;
  width: 80%;
  height: 115px;
  object-fit: contain;
}
.weapon-symbol {
  font-size: 29px;
  letter-spacing: 15px;
  text-align: center;
  color: #78aec4;
  height: 42px;
  margin-top: 4px;
}
.weapon-symbol span {
  font: 10px var(--mono);
  letter-spacing: 0;
}
.weapons .status-row {
  margin-top: 5px;
}
.weapons > small {
  margin-top: 14px;
}
.heat i {
  background: var(--amber);
  width: 0;
}
.controls-strip {
  position: absolute;
  bottom: 12px;
  display: flex;
  justify-content: center;
  width: 100%;
  gap: 22px;
  font: 8px var(--mono);
  color: #668da2;
  letter-spacing: 0.5px;
}
kbd {
  border: 1px solid #52738955;
  padding: 3px 4px;
  margin-right: 4px;
  font: 8px var(--mono);
  color: #97b3c2;
}
.target {
  position: fixed;
  width: 65px;
  height: 65px;
  border: 1px solid #ff837177;
  transform: translate(-50%, -50%);
  color: #ff9681;
}
.target:before,
.target:after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border: 2px solid #ff9681;
}
.target:before {
  top: -2px;
  left: -2px;
  border-right: 0;
  border-bottom: 0;
}
.target:after {
  bottom: -2px;
  right: -2px;
  border-left: 0;
  border-top: 0;
}
.target span {
  position: absolute;
  top: -17px;
  font: 9px var(--mono);
  white-space: nowrap;
}
.target small {
  position: absolute;
  bottom: -18px;
  right: 0;
  font: 9px var(--mono);
  white-space: nowrap;
}
.combat-notice {
  position: absolute;
  top: 65%;
  left: 50%;
  transform: translateX(-50%);
  font: 11px var(--mono);
  color: var(--amber);
  letter-spacing: 2px;
  white-space: nowrap;
}
.hit-flash {
  position: fixed;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse, transparent 30%, #349fed55 70%, #99e5ff99),
    repeating-linear-gradient(45deg, transparent 0 39px, #8ee9ff22 40px 41px),
    repeating-linear-gradient(-45deg, transparent 0 39px, #8ee9ff22 40px 41px);
}
dialog {
  background: rgba(9, 20, 30, 0.98);
  color: var(--text);
  border: 1px solid #647888;
  max-width: 530px;
  width: calc(100% - 32px);
  padding: 37px;
  box-shadow: 0 20px 100px #000a;
}
dialog::backdrop {
  background: #020910b8;
  backdrop-filter: blur(9px);
}
dialog h2 {
  font-size: 32px;
  margin-top: 15px;
}
dialog p {
  font-size: 14px;
}
dialog .launch-button {
  width: 100%;
  margin-top: 26px;
}
.close-dialog {
  position: absolute;
  right: 18px;
  top: 13px;
  font-size: 25px;
  background: none;
  color: #9eb6c5;
}
.guide-grid {
  margin: 25px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px;
  font: 12px var(--mono);
}
.guide-grid span {
  color: var(--cyan);
}
.guide-grid b {
  font-weight: 400;
  color: #95a9b8;
}
.guide-note {
  font-size: 12px !important;
}
.secondary-button {
  background: none;
  border: 1px solid var(--line);
  width: 100%;
  min-height: 45px;
  margin-top: 14px;
  font: 10px var(--mono);
  letter-spacing: 1px;
  color: #a9c6d5;
}
.secondary-button:hover {
  background: #80a0b318;
}
.result-stats {
  display: flex;
  justify-content: space-between;
  margin: 26px 0;
}
.result-stats small {
  display: block;
  font: 8px var(--mono);
  color: #8199aa;
  letter-spacing: 1px;
}
.result-stats strong {
  display: block;
  font: 24px var(--mono);
  margin-top: 13px;
  color: var(--amber);
}
#touch-controls {
  display: none;
}
#loading-error {
  position: fixed;
  top: 35%;
  left: 20%;
  right: 20%;
  padding: 30px;
  background: #112432;
  border: 1px solid var(--amber);
  z-index: 100;
}
body[data-state="playing"] .vignette {
  background: radial-gradient(ellipse, transparent 35%, #03090f70 90%);
}
body[data-state="playing"] .topbar {
  height: 75px;
}
body[data-state="playing"] .hud {
  top: 75px;
}
body[data-state="playing"] .pilot-badge {
  display: none;
}
@media (min-height: 880px) {
  .planning {
    padding-top: 44px;
    padding-bottom: 30px;
  }
  .planning-heading {
    margin-bottom: 38px;
  }
  .mission-option {
    padding: 18px 15px;
  }
  .briefing {
    margin-top: 30px;
    padding-top: 26px;
  }
  .briefing p {
    font-size: 14px;
  }
  .briefing li {
    font-size: 13px;
    margin: 13px 0;
  }
  .objective-label {
    margin-top: 24px;
  }
  .launchbar {
    margin-top: 32px;
    min-height: 106px;
  }
  .mission-specs {
    margin-top: 27px;
  }
  .comms {
    padding-bottom: 5px;
  }
}
@media (max-height: 780px) and (min-width: 901px) {
  .planning {
    padding-top: 23px;
    padding-bottom: 16px;
  }
  .planning-heading {
    margin-bottom: 22px;
  }
  h1 {
    font-size: 30px;
    margin: 8px 0;
  }
  .planning-heading p {
    font-size: 12px;
  }
  .mission-option {
    padding: 11px 12px;
  }
  .briefing {
    margin-top: 16px;
    padding-top: 14px;
  }
  .briefing h2 {
    font-size: 21px;
    margin: 8px 0;
  }
  .briefing p {
    font-size: 12px;
  }
  .objective-label {
    margin: 14px 0 8px;
  }
  .briefing li {
    margin: 7px 0;
    font-size: 11px;
  }
  .mission-specs {
    margin-top: 13px;
  }
  .comms {
    padding-top: 12px;
  }
  .launchbar {
    min-height: 80px;
    margin-top: 18px;
    padding: 12px 18px;
  }
  .topbar {
    height: 78px;
  }
  .planning {
    height: calc(100% - 114px);
  }
}
@media (max-width: 1150px) {
  .topbar {
    margin: 0 26px;
    gap: 20px;
  }
  .header-tools {
    gap: 9px;
  }
  .connection {
    display: none;
  }
  nav {
    gap: 22px;
  }
  .planning {
    padding-left: 26px;
    padding-right: 26px;
  }
  .mission-layout {
    grid-template-columns: 300px 1fr;
    gap: 25px;
  }
  .ready-system {
    display: none;
  }
  .loadout {
    margin-left: auto;
  }
  .launchbar {
    gap: 15px;
  }
  .ship-info {
    min-width: 150px;
  }
  .statusbar {
    left: 26px;
    right: 26px;
  }
  .mission-specs {
    gap: 25px;
  }
  .hud {
    left: 26px;
    right: 26px;
  }
  .instrument-deck {
    left: 4%;
    right: 4%;
  }
  .instrument-title {
    font-size: 8px;
  }
}
@media (max-width: 900px) {
  .topbar {
    height: 76px;
    margin: 0 20px;
    gap: 10px;
  }
  .brand {
    font-size: 17px;
    letter-spacing: 3px;
  }
  .brand small {
    font-size: 7px;
    letter-spacing: 2px;
  }
  .brandmark {
    font-size: 35px;
  }
  nav {
    gap: 18px;
  }
  .nav {
    font-size: 9px;
    letter-spacing: 0.4px;
  }
  .key,
  .external {
    display: none;
  }
  .header-tools {
    gap: 3px;
  }
  .icon-button {
    font-size: 17px;
    padding: 4px;
  }
  .planning {
    height: calc(100% - 109px);
    padding: 24px 20px 18px;
  }
  .planning-heading {
    margin-bottom: 24px;
  }
  .pilot-badge {
    display: none;
  }
  h1 {
    font-size: 29px;
  }
  .planning-heading p {
    font-size: 12px;
  }
  .mission-layout {
    grid-template-columns: 280px 1fr;
    gap: 22px;
  }
  .sector-top span:last-child,
  .sector-bottom span:last-child,
  .footer-coordinates {
    display: none;
  }
  .planet-label {
    left: 10%;
    top: 35%;
  }
  .planet-label h3 {
    font-size: 17px;
    letter-spacing: 3px;
  }
  .node-hostile {
    left: 40%;
    top: 24%;
  }
  .node-entry {
    left: 15%;
    bottom: 31%;
  }
  .node-exit {
    left: 48%;
    bottom: 20%;
  }
  .map-node b {
    font-size: 6px;
  }
  .loadout {
    display: none;
  }
  .launchbar {
    gap: 12px;
    margin-top: 20px;
    padding: 14px;
    min-height: 87px;
  }
  .ship-insignia {
    width: 42px;
    font-size: 45px;
  }
  .launch-button {
    margin-left: auto;
    font-size: 10px;
    padding: 0 17px;
    gap: 20px;
  }
  .statusbar {
    left: 20px;
    right: 20px;
  }
  .comms {
    display: none;
  }
  .flight-stats {
    gap: 15px;
  }
  .flight-stats b {
    font-size: 14px;
  }
  .instrument-deck {
    left: 0;
    right: 0;
    gap: 10px;
  }
  .instrument {
    padding: 12px;
    height: 145px;
  }
  .instrument-title > span {
    display: none;
  }
  .controls-strip {
    gap: 10px;
  }
  .speed-readout {
    left: 4%;
  }
}
@media (max-width: 600px) {
  html,
  body {
    overflow: auto;
  }
  #app {
    min-height: 850px;
    height: 100dvh;
  }
  .topbar {
    height: 69px;
    margin: 0 16px;
  }
  .brand {
    font-size: 16px;
  }
  .brandmark {
    font-size: 30px;
  }
  .brand small {
    font-size: 6px;
  }
  .header-tools {
    gap: 7px;
  }
  nav {
    position: absolute;
    top: 69px;
    left: 0;
    right: 0;
    height: 43px;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
  }
  .planning {
    padding: 66px 16px 16px;
    height: calc(100% - 102px);
  }
  .planning-heading {
    margin-bottom: 20px;
  }
  .eyebrow {
    font-size: 8px;
    letter-spacing: 1px;
  }
  h1 {
    font-size: 28px;
  }
  .planning-heading p {
    font-size: 11px;
  }
  .mission-layout {
    display: block;
    position: relative;
    flex: 1;
  }
  .mission-panel {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 2;
    pointer-events: none;
  }
  .mission-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    pointer-events: auto;
  }
  .mission-option {
    padding: 10px 7px;
    display: block;
    min-height: 67px;
    background: #0a121cdb;
  }
  .mission-num {
    font-size: 9px;
    display: block;
    margin-bottom: 7px;
  }
  .mission-name {
    font-size: 10px;
  }
  .mission-name small,
  .mission-arrow {
    display: none;
  }
  .briefing {
    margin-top: 175px;
    background: #07111cc9;
    padding: 16px 13px 10px;
    pointer-events: auto;
  }
  .briefing h2 {
    font-size: 22px;
    margin-top: 8px;
    margin-bottom: 9px;
  }
  .briefing p {
    font-size: 12px;
  }
  .objective-label {
    font-size: 8px;
    margin-top: 12px;
  }
  .briefing li {
    font-size: 11px;
    margin: 8px 0;
  }
  .mission-specs {
    margin-top: 14px;
    gap: 38px;
  }
  .mission-specs small {
    font-size: 8px;
  }
  .section-label {
    font-size: 9px;
  }
  .sector-view {
    position: absolute;
    left: 0;
    right: 0;
    top: 115px;
    height: 150px;
    min-height: 150px;
  }
  .sector-top {
    left: 10px;
    right: 10px;
    top: 9px;
    font-size: 7px;
  }
  .planet-label {
    left: 10px;
    top: 35%;
  }
  .planet-label small {
    font-size: 6px;
  }
  .planet-label h3 {
    font-size: 16px;
    margin: 6px 0;
    letter-spacing: 2px;
  }
  .planet-label > span:last-child {
    font-size: 6px;
  }
  .label-rule {
    display: none;
  }
  .sector-bottom,
  .node-entry,
  .node-exit {
    display: none;
  }
  .node-hostile {
    top: 45%;
    left: 63%;
    font-size: 7px;
  }
  .launchbar {
    padding: 10px;
    gap: 12px;
    min-height: 79px;
    margin-top: 15px;
  }
  .ship-insignia {
    display: none;
  }
  .ship-info {
    min-width: 0;
    flex: 1;
  }
  .ship-info small {
    font-size: 7px;
  }
  .ship-info strong {
    font-size: 12px;
  }
  .ship-info > span {
    font-size: 6px;
  }
  .launch-button {
    font-size: 9px;
    letter-spacing: 0.6px;
    gap: 15px;
    padding: 0 13px;
    min-height: 47px;
  }
  .statusbar {
    left: 16px;
    right: 16px;
    font-size: 6px;
    height: 30px;
    letter-spacing: 0.5px;
  }
  .statusbar b {
    margin: 0 4px;
  }
  .hud {
    inset: 113px 16px 30px;
  }
  .flight-top {
    margin-top: 18px;
  }
  .flight-top .eyebrow {
    font-size: 7px;
    letter-spacing: 0.5px;
  }
  .flight-top h2 {
    font-size: 11px;
    margin-top: 8px;
  }
  .flight-stats {
    gap: 10px;
    font-size: 7px;
  }
  .flight-stats b {
    font-size: 11px;
  }
  .flight-stats > span:last-of-type {
    display: none;
  }
  .heading-tape {
    font-size: 8px;
    word-spacing: 8px;
    top: 16%;
  }
  .speed-readout {
    top: 32%;
    font-size: 8px;
  }
  .speed-readout strong {
    font-size: 29px;
  }
  .speed-readout > span:last-child {
    font-size: 6px;
  }
  .instrument-deck {
    bottom: 91px;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }
  .instrument {
    height: 135px;
    padding: 10px;
  }
  .radar-panel {
    display: none;
  }
  .instrument-title {
    font-size: 7px;
    letter-spacing: 0.3px;
  }
  .status-row {
    font-size: 7px;
    gap: 7px;
  }
  .instrument > small {
    font-size: 6px;
    letter-spacing: 0.3px;
  }
  .weapon-symbol {
    font-size: 27px;
  }
  .controls-strip {
    display: none;
  }
  #touch-controls {
    display: flex;
    position: absolute;
    bottom: 26px;
    gap: 9px;
    right: 0;
    left: 0;
    justify-content: space-between;
    pointer-events: auto;
  }
  #touch-controls button {
    height: 48px;
    min-width: 48px;
    background: #0a233bdd;
    border: 1px solid #6bbed588;
    color: var(--cyan);
    font: 11px var(--mono);
    padding: 0 18px;
    touch-action: none;
  }
  #touch-controls button:last-child {
    background: #765839bb;
    border-color: var(--amber);
    color: #ffe0b9;
  }
  body[data-state="playing"] #app,
  body[data-state="paused"] #app,
  body[data-state="results"] #app {
    height: 100dvh;
    min-height: 550px;
  }
  body[data-state="playing"] .topbar {
    height: 69px;
  }
  .result-stats {
    gap: 15px;
  }
  dialog {
    padding: 28px;
  }
  .guide-grid {
    font-size: 10px;
    gap: 14px;
  }
  .guide-note {
    font-size: 11px !important;
  }
  .combat-notice {
    font-size: 8px;
    top: 57%;
  }
  .crosshair {
    top: 43%;
  }
}
/* The fixed aim point always matches the camera's projection center. */
.crosshair {
  position: fixed;
  top: 50%;
  left: 50%;
}
body[data-state="playing"] #space {
  touch-action: none;
}
body[data-state="playing"],
body[data-state="paused"],
body[data-state="results"] {
  overscroll-behavior: none;
}
.mission-option:focus-visible {
  outline-offset: 1px;
}
@media (prefers-reduced-motion: reduce) {
  .scanlines {
    display: none;
  }
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* Instrument labels remain legible across the tactical and cockpit views. */
.eyebrow,
.section-label,
.nav,
.connection,
.mission-name small,
.briefing .eyebrow,
.objective-label,
.mission-specs small,
.mission-specs span,
.comms small,
.comms p,
.sector-top,
.sector-bottom,
.planet-label small,
.planet-label > span:last-child,
.map-node,
.map-node b,
.ship-info small,
.loadout small,
.ship-info > span,
.loadout > span,
.ready-system,
.pilot-badge,
.pilot-badge small,
.instrument-title,
.instrument-title > span,
.instrument > small,
.status-row,
.status-row b,
.speed-readout > span:last-child,
.speed-readout small,
.target span,
.target small,
.controls-strip,
kbd,
.flight-stats,
.guide-grid,
.guide-note,
.result-stats small,
.secondary-button,
.launch-button {
  font-size: 12px;
}
.mission-name,
.briefing p,
.briefing li {
  font-size: 14px;
}
.eyebrow,
.section-label,
.objective-label {
  letter-spacing: 1.1px;
}
.mission-panel {
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #446070 transparent;
  padding-right: 2px;
}
.mission-name small {
  font-size: 10px;
}
.map-node b {
  font-size: 10px;
}
.comms small {
  font-size: 10px;
}
.comms p {
  font-size: 12px;
}
.sector-top,
.sector-bottom {
  font-size: 10px;
}
.instrument-deck {
  bottom: 48px;
}
.instrument {
  height: 165px;
}
.instrument-title {
  letter-spacing: 0.4px;
}
.controls-strip {
  font-size: 10px;
  gap: 18px;
}
kbd {
  font-size: 10px;
}
.statusbar {
  font-size: 10px;
  letter-spacing: 0.5px;
}
.loadout small,
.ship-info small,
.ship-info > span,
.loadout > span {
  font-size: 10px;
}
.ready-system {
  font-size: 10px;
  min-width: 220px;
}
.ready-system b {
  margin-left: 5px;
}
.pilot-badge small {
  font-size: 10px;
}
.briefing {
  flex-shrink: 0;
}
.comms {
  padding-bottom: 4px;
}
.launchbar {
  flex-shrink: 0;
}
.planet-label > span:last-child {
  font-size: 10px;
}
.planet-label small {
  font-size: 10px;
}
@media (max-width: 1150px) {
  .instrument-title > span {
    display: none;
  }
  .header-tools {
    gap: 7px;
  }
  .nav {
    font-size: 11px;
  }
  .controls-strip {
    gap: 10px;
    font-size: 9px;
  }
  .statusbar {
    font-size: 8px;
  }
  .comms {
    display: none;
  }
  .pilot-badge {
    font-size: 10px;
  }
}
@media (max-width: 900px) {
  .nav {
    font-size: 10px;
  }
  .instrument {
    height: 155px;
  }
  .instrument-title {
    font-size: 10px;
  }
  .instrument > small {
    font-size: 9px;
  }
  .ready-system {
    display: none;
  }
  .mission-specs small {
    font-size: 10px;
  }
  .map-node {
    font-size: 9px;
  }
  .map-node b {
    font-size: 8px;
  }
  .launch-button {
    font-size: 11px;
  }
  .ship-info > span {
    font-size: 9px;
  }
  .controls-strip {
    font-size: 8px;
  }
}
@media (max-width: 600px) {
  .mission-panel {
    overflow: visible;
    padding: 0;
  }
  .mission-name {
    font-size: 12px;
  }
  .planning-heading p {
    font-size: 12px;
  }
  .planning-heading .eyebrow {
    font-size: 9px;
  }
  .briefing .eyebrow {
    font-size: 10px;
  }
  .briefing p,
  .briefing li {
    font-size: 12px;
  }
  .mission-specs small,
  .mission-specs span {
    font-size: 10px;
  }
  .objective-label {
    font-size: 10px;
  }
  .launch-button {
    font-size: 10px;
  }
  .sector-top,
  .sector-bottom {
    font-size: 9px;
  }
  .planet-label small,
  .planet-label > span:last-child {
    font-size: 8px;
  }
  .ship-info small,
  .ship-info > span {
    font-size: 8px;
  }
  .statusbar {
    font-size: 7px;
  }
  .instrument-title {
    font-size: 9px;
  }
  .instrument > small {
    font-size: 8px;
  }
  .status-row,
  .status-row b {
    font-size: 10px;
  }
  .instrument {
    height: 143px;
  }
  .instrument-deck {
    bottom: 91px;
  }
  .flight-stats {
    font-size: 9px;
  }
  .target span,
  .target small {
    font-size: 10px;
  }
  .speed-readout small,
  .speed-readout > span:last-child {
    font-size: 8px;
  }
  .heading-tape {
    font-size: 8px;
  }
  .controls-strip {
    display: none;
  }
  .pilot-badge {
    display: none;
  }
  .planning {
    min-height: 817px;
  }
  #app {
    min-height: 922px;
  }
}
@media (pointer: coarse) and (min-width: 601px) {
  #touch-controls {
    display: flex;
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    justify-content: center;
    gap: 18px;
  }
  #touch-controls button {
    pointer-events: auto;
    touch-action: none;
    background: #152939;
    border: 1px solid #6bbed577;
    padding: 12px 24px;
    color: var(--cyan);
  }
  .controls-strip {
    display: none;
  }
  .instrument-deck {
    bottom: 75px;
  }
}
@media(max-width:600px){body[data-state=playing] .hud{top:113px}}

/* Six-operation campaign: the selected briefing shares the sector display. */
.mission-layout { grid-template-columns: 320px minmax(0, 1fr); gap: 26px; }
.mission-panel { padding: 0 7px 0 0; }
.mission-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mission-option { display: flex; flex-wrap: wrap; align-content: center; min-height: 94px; padding: 13px 12px; gap: 10px; }
.mission-num { order: 0; width: auto; margin: 0; font-size: 12px; }
.mission-name { order: 2; flex-basis: 100%; font-size: 16px; line-height: 1.4; }
.mission-name small { display: none; }
.mission-badge { order: 1; margin-left: auto; font: 12px var(--mono); color: var(--amber); white-space: nowrap; }
.campaign-summary { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 18px; display: grid; gap: 8px; }
.campaign-summary strong { font-size: 14px; font-weight: 400; color: var(--cyan); }
.campaign-summary span { font-size: 12px; color: #98aebb; line-height: 1.5; }
.sector-view { overflow: auto; scrollbar-width: thin; scrollbar-color: #446070 transparent; }
.sector-view .briefing { position: relative; margin: 53px 20px 58px; padding: 20px; width: min(440px, 67%); border: 1px solid var(--line); background: linear-gradient(110deg, #07111def, #07111dc9); z-index: 2; }
.briefing .eyebrow { font-size: 12px; line-height: 1.5; }
.briefing h2 { font-size: 30px; }
.briefing p { font-size: 16px; line-height: 1.65; }
.briefing li { font-size: 14px; line-height: 1.5; margin: 10px 0; }
.objective-label { font-size: 12px; }
.mission-specs { flex-wrap: wrap; gap: 20px; }
.mission-specs span { font-size: 14px; }
.mission-record { color: var(--amber); font: 12px var(--mono); padding-top: 18px; margin-top: 18px; border-top: 1px solid var(--line); line-height: 1.5; }
.briefing .medal-hint { font-size: 12px; color: #9bb2c3; margin-top: 8px; }
.sector-view .comms { display: none; }
.planet-label { left: 72%; top: 38%; max-width: 26%; }
.planet-label h3 { font-size: 20px; letter-spacing: 2px; overflow-wrap: anywhere; }
.planet-label small, .planet-label > span:last-child { font-size: 12px; line-height: 1.7; }
.node-entry, .node-exit { display: none; }
.node-hostile { left: 74%; top: 68%; }
.node-hostile b { white-space: normal; font-size: 12px; }
.sector-top { position: sticky; top: 0; z-index: 3; padding: 16px 20px; margin-bottom: -43px; background: #080f18d9; font-size: 12px; gap: 10px; }
.sector-bottom { display: none; }
.planning-heading p { font-size: 16px; }
.launch-button, .secondary-button { font-size: 14px; }
.loadout > span { color: #a3c4d0; font-size: 12px; letter-spacing: .3px; }
.ship-info strong { font-size: 16px; }
.loadout { padding-left: 20px; }
.ready-system { min-width: 200px; }
.nav { font-size: 12px; }
.guide-grid { font-size: 14px; line-height: 1.5; }
.guide-note { font-size: 14px !important; margin-bottom: 14px; }
.result-medals { display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 18px; color: #889dab; font-size: 14px; }
.result-medals .earned { color: var(--amber); }
.result-record { margin-top: 15px; font-size: 14px; }
.tactical-controls { position: absolute; right: 9%; bottom: 236px; display: flex; gap: 10px; z-index: 4; }
.tactical-button { min-width: 160px; min-height: 64px; padding: 11px 14px; text-align: left; background: #081e2deb; border: 1px solid #668ea477; color: #c0e9f3; position: relative; touch-action: manipulation; }
.tactical-button > span { display: flex; align-items: center; gap: 8px; font: 14px var(--mono); }
.tactical-button b { margin-left: auto; color: var(--amber); }
.tactical-button small { display: block; font: 12px var(--mono); margin-top: 7px; color: #90b6c8; }
.tactical-button i { position: absolute; bottom: 0; left: 0; height: 2px; background: var(--amber); }
.tactical-button.ready { border-color: var(--amber); background: #493626df; }
.tactical-button.ready small { color: #ffdaa7; }
.tactical-button:disabled { cursor: default; opacity: .65; }
.target.locked { border-color: var(--amber); color: var(--amber); }
.target.locked:before, .target.locked:after { border-color: var(--amber); }
.target span, .target small { font-size: 12px; }
.operation-status { position: absolute; top: 95px; left: 0; width: min(360px, 40%); padding: 12px 14px; background: #071c2adb; border-left: 2px solid var(--cyan); }
.operation-status > div:first-child { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font: 12px var(--mono); color: #a7d6e5; }
.operation-status strong { font-size: 14px; font-weight: 400; }
.operation-track { height: 4px; margin-top: 10px; background: #8bccd528; }
.operation-track i { display: block; height: 100%; background: var(--cyan); transition: width .15s; }
.operation-status p { font-size: 12px; line-height: 1.4; margin-top: 8px; color: #9fbcca; }
.operation-status.danger { border-color: var(--amber); }
.operation-status.danger .operation-track i { background: var(--amber); }
.storm-glow { position: fixed; inset: 0; pointer-events: none; opacity: 0; transition: opacity 1s; background: radial-gradient(ellipse, transparent 35%, #845adb4f 90%); }
.ally-target { position: fixed; width: 85px; height: 62px; border: 1px dashed #8de6c88c; transform: translate(-50%, -50%); color: #a0f8d7; }
.ally-target span, .ally-target small { position: absolute; left: 0; top: -20px; font: 12px var(--mono); }
.ally-target small { top: auto; bottom: -20px; }
.combat-notice { white-space: normal; text-align: center; width: min(600px, 80%); font-size: 14px; line-height: 1.5; top: 58%; }
.flight-top h2 { max-width: 480px; }
.instrument-deck { z-index: 3; }
body[data-state="paused"] .hud, body[data-state="results"] .hud { top: 75px; }
@media (max-width: 1150px) {
  .mission-layout { grid-template-columns: 280px minmax(0, 1fr); gap: 20px; }
  .sector-view .briefing { width: calc(100% - 36px); margin: 53px 18px 20px; padding: 18px; background: #07111dd6; }
  .planet-label, .node-hostile { display: none; }
  .tactical-controls { right: 4%; }
  .loadout { display: block; border: 0; padding-left: 0; }
  .ship-insignia { display: none; }
}
@media (max-width: 900px) {
  .topbar { gap: 12px; }
  .nav { font-size: 11px; }
  .loadout { display: none; }
  .mission-layout { grid-template-columns: 240px minmax(0, 1fr); gap: 16px; }
  .mission-name { font-size: 14px; }
  .mission-name small { font-size: 12px; line-height: 1.4; }
  .mission-option { padding: 12px 8px; }
  .sector-view .briefing { padding: 16px; margin-left: 10px; margin-right: 10px; width: calc(100% - 20px); }
  .sector-top { padding: 16px 12px; }
  .tactical-controls { right: 0; bottom: 223px; }
  .operation-status { top: 90px; width: 310px; max-width: 52%; }
}
@media (max-width: 600px) {
  body[data-state="planning"] #app { height: auto; min-height: 100dvh; padding-bottom: 36px; }
  body[data-state="planning"] #space { position: fixed; height: 100dvh; }
  .planning { height: auto; min-height: 0; padding: 66px 16px 18px; }
  .planning-heading { margin-bottom: 24px; }
  .planning-heading p { font-size: 14px; }
  .planning-heading .eyebrow { font-size: 12px; line-height: 1.6; }
  .mission-layout { display: flex; flex-direction: column; gap: 20px; }
  .mission-panel { height: auto; padding: 0; pointer-events: auto; }
  .mission-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .mission-option { display: flex; flex-wrap: wrap; gap: 6px; min-height: 86px; align-content: center; padding: 12px; }
  .mission-num { font-size: 12px; margin: 0; width: auto; }
  .mission-name { flex-basis: 100%; font-size: 14px; line-height: 1.3; }
  .mission-name small { display: none; }
  .mission-badge { margin-left: auto; font-size: 12px; }
  .section-label { font-size: 12px; }
  .campaign-summary { margin-top: 12px; padding-top: 12px; }
  .sector-view { position: relative; inset: auto; height: auto; min-height: 0; overflow: visible; }
  .sector-view .briefing { margin: 47px 0 0; width: 100%; padding: 18px; }
  .sector-top { position: absolute; top: 0; left: 0; right: 0; margin: 0; padding: 13px; }
  .briefing h2 { font-size: 28px; }
  .briefing p { font-size: 16px; }
  .briefing li { font-size: 14px; }
  .briefing .eyebrow, .objective-label, .mission-specs small, .mission-specs span { font-size: 12px; }
  .briefing .medal-hint { font-size: 12px; }
  .launchbar { padding: 14px; flex-wrap: wrap; gap: 14px; }
  .launch-button { font-size: 14px; }
  .launchbar .launch-button { width: 100%; }
  .ship-info small, .ship-info > span { font-size: 12px; }
  .ship-info strong { font-size: 18px; }
  .loadout { display: block; margin: 0; }
  .loadout small, .loadout > span { font-size: 12px; }
  .loadout strong { display: none; }
  .statusbar { font-size: 9px; }
  .statusbar > span:last-child { display: none; }
  .nav { font-size: 11px; }
  .hud, body[data-state="playing"] .hud, body[data-state="paused"] .hud, body[data-state="results"] .hud { top: 113px; }
  .flight-top { gap: 12px; margin-top: 12px; }
  .flight-top .eyebrow { font-size: 12px; line-height: 1.4; }
  .flight-top h2 { font-size: 14px; line-height: 1.35; margin-bottom: 0; }
  .flight-stats { font-size: 12px; gap: 9px; flex-shrink: 0; }
  .flight-stats b { font-size: 14px; }
  .flight-stats > span:nth-child(2) { display: none; }
  .operation-status { top: 99px; left: 0; width: 100%; max-width: none; padding: 9px 12px; }
  .operation-status > div:first-child { font-size: 12px; }
  .operation-status p { font-size: 12px; }
  .has-operation .heading-tape { display: none; }
  .tactical-controls { bottom: 230px; right: 0; left: 0; gap: 8px; }
  .tactical-button { flex: 1; min-width: 0; min-height: 60px; padding: 9px 10px; }
  .tactical-button > span { font-size: 14px; }
  .tactical-button kbd { display: none; }
  .tactical-button small { font-size: 12px; letter-spacing: -.2px; }
  .instrument-deck { bottom: 82px; }
  .instrument { height: 135px; padding: 10px; }
  .instrument-title, .status-row, .status-row b { font-size: 12px; }
  .instrument > small { font-size: 10px; margin-top: 12px; }
  .weapon-symbol { height: 36px; }
  .status-row { gap: 9px; margin-top: 17px; }
  .status-row > span { width: 45px; }
  .speed-readout { top: 35%; }
  .speed-readout small, .speed-readout > span:last-child { font-size: 12px; }
  .speed-readout > span:last-child { max-width: 100px; line-height: 1.5; }
  .speed-track { display: none; }
  .combat-notice { top: 40%; font-size: 12px; width: 84%; padding: 4px 8px; background: #061322bd; }
  .combat-notice:empty { display: none; }
  #touch-controls { bottom: 18px; gap: 8px; }
  #touch-controls button { font-size: 14px; padding: 0 14px; }
  .result-stats { flex-wrap: wrap; }
  .result-stats small { font-size: 12px; }
  dialog { padding: 24px; max-height: calc(100dvh - 30px); }
  .guide-grid { font-size: 14px; gap: 12px; }
}
@media (pointer: coarse) and (min-width: 601px) {
  .tactical-controls { bottom: 255px; }
  .tactical-button kbd { display: none; }
}
@media (max-height: 540px) and (min-width: 601px) {
  #app { min-height: 100dvh; }
  .topbar, body[data-state="playing"] .topbar { height: 52px; }
  .brand small, .planning-heading p, .pilot-badge, .ship-info > span { display: none; }
  .planning { height: calc(100% - 88px); padding: 12px 20px; }
  .planning-heading { margin-bottom: 12px; }
  .planning-heading .eyebrow { display: none; }
  .planning-heading h1 { margin: 0; font-size: 24px; }
  .launchbar { min-height: 56px; padding: 5px 12px; margin-top: 10px; }
  .launch-button { min-height: 42px; }
  .hud, body[data-state="playing"] .hud, body[data-state="paused"] .hud, body[data-state="results"] .hud { top: 52px; left: 16px; right: 16px; }
  .flight-top { margin-top: 9px; }
  .flight-top h2 { font-size: 14px; margin: 5px 0; }
  .heading-tape, .radar-panel, .weapon-symbol, .instrument > small, .controls-strip, .speed-readout { display: none; }
  .instrument-deck { left: 0; right: auto; width: 48%; grid-template-columns: 1fr 1fr; bottom: 8px; gap: 8px; }
  .instrument { padding: 8px; height: 88px; box-shadow: none; }
  .instrument-title { font-size: 10px; padding-bottom: 5px; }
  .status-row { margin-top: 12px; font-size: 12px; }
  .weapons .status-row { margin-top: 18px; }
  .operation-status { top: 65px; width: 280px; padding: 8px; }
  .operation-status p { font-size: 12px; }
  .tactical-controls { left: auto; right: 0; bottom: 66px; }
  .tactical-button { min-width: 140px; min-height: 55px; padding: 7px 10px; }
  #touch-controls { left: auto; right: 0; bottom: 8px; gap: 8px; }
  #touch-controls button { padding: 9px 15px; font-size: 14px; }
  .combat-notice { top: 42%; font-size: 12px; }
}
