:root {
  color-scheme: dark;
  --ink: #08090a;
  --panel: rgba(13, 15, 17, 0.7);
  --panel-strong: rgba(10, 12, 14, 0.9);
  --line: rgba(232, 236, 238, 0.16);
  --text: #f4fbff;
  --muted: #a7b0b4;
  --accent: #e7ad4d;
  --accent-2: #91d6bc;
  --danger: #ff4c4c;
  --frame-cut: 10px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  font-family: "Avenir Next", "Trebuchet MS", "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--ink);
  -webkit-text-size-adjust: 100%;
}

html.legal-page {
  width: auto;
  height: auto;
  min-height: 100%;
  max-height: none;
  position: static;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: auto;
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--ink);
  color: var(--text);
}

body:not(.legal-page) {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  overscroll-behavior: none;
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

body.legal-page {
  position: static;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  height: auto;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: auto;
  -webkit-touch-callout: default;
  -webkit-user-select: text;
  user-select: text;
  background:
    linear-gradient(180deg, rgba(6, 17, 28, 0.94), rgba(3, 8, 14, 0.98)),
    url("https://hamfs-assets.743.world/releases/r20261031-1514/assets/ui/auth-runway-hero.jpg") center center / cover no-repeat;
}

canvas,
svg,
button,
.link-button,
#app-shell,
#auth-screen,
#select-screen,
#game-screen {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

button,
input,
select,
textarea {
  font: inherit;
  border-radius: 0;
}

.panel,
.hud-panel,
button,
.link-button,
#minimap,
#annunciator,
#chat-form,
.aircraft-card,
.aircraft-status,
.room-chip {
  clip-path: polygon(
    var(--frame-cut) 0,
    calc(100% - var(--frame-cut)) 0,
    100% var(--frame-cut),
    100% calc(100% - var(--frame-cut)),
    calc(100% - var(--frame-cut)) 100%,
    var(--frame-cut) 100%,
    0 calc(100% - var(--frame-cut)),
    0 var(--frame-cut)
  );
}

#app-shell {
  width: 100vw;
  height: 100%;
  height: 100vh;
  height: 100svh;
  position: relative;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}

html.app-store-screenshot-mode #app-shell {
  width: 100vw;
  height: 75vw;
  max-height: 100vh;
  max-height: 100svh;
}

#auth-screen,
#select-screen,
#game-screen {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

#auth-screen {
  --auth-pad: clamp(22px, 5vw, 72px);
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(320px, 390px);
  gap: clamp(24px, 6vw, 88px);
  align-items: center;
  padding:
    max(var(--auth-pad), calc(var(--safe-top) + 16px))
    max(var(--auth-pad), calc(var(--safe-right) + 22px))
    max(var(--auth-pad), calc(var(--safe-bottom) + 18px))
    max(var(--auth-pad), calc(var(--safe-left) + 22px));
  background: #07121d;
  overflow: hidden;
  overscroll-behavior: none;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4, 10, 16, 0.88) 0 18%, rgba(4, 10, 16, 0.56) 38%, rgba(4, 10, 16, 0.18) 60%, rgba(4, 10, 16, 0.54) 100%),
    linear-gradient(180deg, rgba(4, 10, 16, 0.32), rgba(4, 10, 16, 0.58)),
    url("https://hamfs-assets.743.world/releases/r20261031-1514/assets/ui/auth-runway-hero.jpg") center center / cover no-repeat;
  filter: saturate(1.02) contrast(1.02);
}

#auth-screen::before {
  content: "";
  position: absolute;
  inset: auto auto 6% 5%;
  width: min(420px, 36vw);
  height: 1px;
  transform: perspective(600px) rotateX(64deg);
  background:
    repeating-linear-gradient(180deg, transparent 0 84px, rgba(255, 255, 255, 0.85) 84px 126px, transparent 126px 190px),
    linear-gradient(90deg, #2f3537, #4b5254 46%, #2f3537);
  border-left: 4px solid rgba(255, 255, 255, 0.75);
  border-right: 4px solid rgba(255, 255, 255, 0.75);
  opacity: 0.42;
}

#auth-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 26%, rgba(255, 180, 74, 0.16), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 28%, transparent 72%, rgba(255, 255, 255, 0.05));
  pointer-events: none;
}

#select-screen {
  --select-pad: clamp(18px, 3vw, 34px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 20px;
  padding:
    max(var(--select-pad), calc(var(--safe-top) + 14px))
    max(var(--select-pad), calc(var(--safe-right) + 18px))
    max(var(--select-pad), calc(var(--safe-bottom) + 18px))
    max(var(--select-pad), calc(var(--safe-left) + 18px));
  background:
    linear-gradient(180deg, rgba(7, 8, 9, 0.94) 0 38%, rgba(20, 22, 22, 0.9) 58%, rgba(31, 33, 29, 0.94) 100%),
    linear-gradient(120deg, rgba(231, 173, 77, 0.14), transparent 34% 100%),
    url("https://hamfs-assets.743.world/releases/r20261031-1514/assets/ui/auth-runway-hero.jpg") center center / cover no-repeat;
}

#select-screen::before {
  content: "";
  position: absolute;
  inset: 54% -8% -18% -8%;
  transform: perspective(760px) rotateX(63deg);
  background:
    linear-gradient(90deg, transparent 0 45%, rgba(245, 251, 255, 0.8) 45% 46%, transparent 46% 54%, rgba(245, 251, 255, 0.8) 54% 55%, transparent 55% 100%),
    repeating-linear-gradient(180deg, transparent 0 82px, rgba(245, 251, 255, 0.74) 82px 114px, transparent 114px 190px),
    linear-gradient(90deg, #252b2d, #4b5558 50%, #252b2d);
  opacity: 0.34;
  filter: saturate(0.8);
}

#select-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.26), transparent 26% 66%, rgba(0, 0, 0, 0.24)),
    linear-gradient(90deg, rgba(0, 0, 0, 0.42), transparent 24% 72%, rgba(0, 0, 0, 0.34));
}

#select-header {
  position: relative;
  z-index: 2;
  grid-column: 1 / -1;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding: 0 0 16px;
  border-bottom: 1px solid rgba(245, 251, 255, 0.16);
}

#select-header h1 {
  max-width: none;
  text-shadow: 0 12px 34px rgba(0, 0, 0, 0.42);
}

.select-account {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.select-account span {
  max-width: 180px;
  overflow: hidden;
  color: #f5fbff;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.28);
}

.select-account button {
  min-height: 36px;
  padding: 0 12px;
}

.select-account .account-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.select-account-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#changelog-modal {
  position: absolute;
  inset: 0;
  z-index: 40;
}

#changelog-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

#changelog-dialog {
  position: absolute;
  inset: 8vh 50% auto auto;
  transform: translateX(50%);
  width: min(720px, calc(100vw - 28px));
  max-height: 78vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

#changelog-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 12px;
  border-bottom: 1px solid rgba(245, 251, 255, 0.14);
}

.changelog-body {
  padding: 16px 18px 18px;
  overflow: auto;
}

.changelog-entry {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(245, 251, 255, 0.1);
}

.changelog-entry:last-child {
  border-bottom: none;
}

.changelog-date {
  font-weight: 650;
  color: rgba(245, 251, 255, 0.88);
}

.changelog-notes {
  color: rgba(245, 251, 255, 0.9);
  line-height: 1.4;
}

.changelog-notes ul {
  margin: 0;
  padding-left: 18px;
}

.changelog-notes li {
  margin: 0 0 6px;
}

.changelog-notes li:last-child {
  margin-bottom: 0;
}

#aircraft-grid {
  position: relative;
  z-index: 2;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: auto;
  padding: 14px;
  border: 1px solid rgba(245, 251, 255, 0.16);
  border-radius: 0;
  background: rgba(4, 13, 21, 0.72);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.32);
  scrollbar-color: rgba(255, 176, 0, 0.72) rgba(255, 255, 255, 0.08);
}

.aircraft-group {
  display: grid;
  gap: 10px;
  min-width: 0;
  align-content: start;
}

.aircraft-group.compact {
  gap: 8px;
}

.aircraft-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #f5fbff;
  font-size: 0.9rem;
  font-weight: 800;
}

.aircraft-group-header small {
  color: var(--muted);
  font-size: 0.78rem;
}

.aircraft-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.aircraft-group-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.aircraft-card {
  min-height: 156px;
  display: grid;
  grid-template-rows: auto minmax(44px, 1fr) auto;
  align-content: space-between;
  gap: 12px;
  border: 1px solid rgba(245, 251, 255, 0.2);
  border-radius: 0;
  padding: 15px;
  color: var(--text);
  background: rgba(12, 14, 16, 0.88);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06);
  text-align: left;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.aircraft-card:hover {
  transform: translateY(-1px);
  border-color: rgba(245, 251, 255, 0.48);
  background: rgba(18, 21, 23, 0.96);
}

.aircraft-card.active {
  border-color: rgba(231, 173, 77, 0.92);
  background: rgba(26, 24, 19, 0.94);
  box-shadow: 0 0 0 3px rgba(231, 173, 77, 0.2), inset 0 1px rgba(255, 255, 255, 0.09);
}

.aircraft-card.missing {
  opacity: 0.74;
}

.aircraft-card strong {
  display: block;
  color: #ffffff;
  font-size: 1.08rem;
  line-height: 1.16;
}

.aircraft-card small,
.aircraft-card span {
  color: #c8d6de;
  line-height: 1.35;
}

.aircraft-card-stats {
  color: #d5e2e8;
}

.aircraft-card-preview {
  display: none;
}

.aircraft-card-thumbnail {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 7px;
  opacity: 0;
  transform: scale(0.94);
  filter:
    drop-shadow(0 8px 10px rgba(0, 0, 0, 0.34))
    drop-shadow(0 0 12px rgba(145, 214, 188, 0.12))
    brightness(1.08);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
  user-select: none;
}

.aircraft-card-preview.has-thumbnail .aircraft-card-thumbnail {
  opacity: 0.88;
  transform: scale(1);
}

.aircraft-card-preview.live-preview .aircraft-card-thumbnail {
  opacity: 0.12;
}

.aircraft-status {
  justify-self: start;
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0;
  font-size: 0.72rem;
  font-weight: 800;
}

.aircraft-status.ready {
  color: #0f302d;
  background: var(--accent-2);
}

.aircraft-status.missing {
  color: #1f1602;
  background: var(--accent);
}

#aircraft-detail {
  position: relative;
  z-index: 2;
  align-self: start;
  justify-self: end;
  width: 100%;
  background: rgba(5, 14, 22, 0.94);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
  border-radius: 0;
}

#aircraft-preview {
  position: relative;
  width: 100%;
  height: 112px;
  height: clamp(96px, 18vh, 136px);
  height: clamp(96px, 18svh, 136px);
  display: block;
  overflow: hidden;
  border: 1px solid rgba(232, 236, 238, 0.16);
  border-radius: 8px;
  background:
    radial-gradient(circle at 52% 38%, rgba(145, 214, 188, 0.12), transparent 46%),
    linear-gradient(180deg, rgba(16, 19, 20, 0.72), rgba(5, 7, 8, 0.36));
}

#aircraft-preview::after {
  content: "";
  position: absolute;
  inset: auto 16% 10px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 251, 255, 0.28), transparent);
  opacity: 0.72;
}

#aircraft-preview-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#aircraft-detail h2 {
  line-height: 1.05;
}

#aircraft-detail .message {
  color: #cbd8df;
  line-height: 1.38;
  min-height: 2.76em;
}

#select-message {
  color: #f4e8c3;
}

.room-chip {
  justify-self: start;
  margin: 0;
  padding: 7px 10px;
  border: 1px solid rgba(245, 251, 255, 0.18);
  border-radius: 0;
  color: #d7e5ec;
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.86rem;
  font-weight: 800;
}

.auth-copy {
  position: relative;
  z-index: 2;
  align-self: end;
  display: grid;
  gap: 18px;
  padding-bottom: min(10vh, 84px);
}

.auth-copy h1 {
  max-width: 8ch;
  font-size: clamp(2.8rem, 7vw, 5.4rem);
  text-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.auth-copy p:not(.eyebrow) {
  max-width: 40ch;
  margin: 0;
  color: #ebf8fb;
  font-size: 1.08rem;
  line-height: 1.45;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.28);
}

.auth-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(6, 17, 27, 0.4);
  color: #eef8ff;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.auth-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: min(820px, 100%);
}

.auth-feature {
  min-height: 148px;
  padding: 16px 16px 14px;
  display: grid;
  align-content: start;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(7, 18, 29, 0.54), rgba(7, 18, 29, 0.68));
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.auth-feature-label {
  color: #84d8e4;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-feature strong {
  font-size: clamp(1.2rem, 3vw, 2rem);
  line-height: 1;
}

.auth-feature p,
.auth-briefing p {
  margin: 0;
  color: rgba(234, 244, 250, 0.88);
  font-size: 0.92rem;
  line-height: 1.45;
}

.auth-briefing {
  max-width: min(760px, 100%);
  padding: 18px 18px 16px;
  display: grid;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(90deg, rgba(7, 18, 29, 0.74), rgba(7, 18, 29, 0.52));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.auth-briefing-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: baseline;
}

.auth-briefing-head strong {
  font-size: 1rem;
  letter-spacing: 0.01em;
}

#flight-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  background: #8fd0ed;
}

#flight-canvas:focus {
  outline: none;
}

.panel {
  position: absolute;
  z-index: 5;
  width: min(390px, calc(100vw - 32px));
  padding: 22px;
  border: 1px solid rgba(133, 239, 255, 0.22);
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(10, 22, 34, 0.92), rgba(5, 12, 21, 0.94)),
    var(--panel);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.34),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(77, 225, 223, 0.15), transparent 26%),
    linear-gradient(315deg, rgba(255, 209, 102, 0.1), transparent 24%);
  opacity: 0.9;
}

#auth-panel {
  position: relative;
  z-index: 3;
  justify-self: end;
  width: min(420px, calc(100vw - 32px));
  background:
    linear-gradient(180deg, rgba(11, 22, 35, 0.92), rgba(5, 12, 21, 0.96)),
    var(--panel);
}

#settings-button {
  position: absolute;
  right: max(24px, calc(var(--safe-right) + 16px));
  top: max(24px, calc(var(--safe-top) + 12px));
  z-index: 6;
  min-height: 42px;
  padding: 0 18px;
  border-color: rgba(77, 225, 223, 0.34);
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(14, 28, 42, 0.92), rgba(8, 16, 25, 0.96));
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow:
    0 16px 50px rgba(0, 0, 0, 0.26),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#hud-mode-button {
  position: absolute;
  right: max(92px, calc(var(--safe-right) + 84px));
  top: max(24px, calc(var(--safe-top) + 12px));
  z-index: 6;
  min-height: 42px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-color: rgba(231, 173, 77, 0.28);
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(28, 22, 14, 0.9), rgba(17, 13, 9, 0.96));
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow:
    0 16px 50px rgba(0, 0, 0, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hud-mode-button-label {
  font-size: 0.68rem;
  color: rgba(255, 245, 219, 0.7);
}

#hud-mode-indicator {
  font-size: 0.8rem;
}

.settings-icon {
  width: 20px;
  height: 20px;
  display: block;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.settings-icon circle,
.settings-icon path {
  vector-effect: non-scaling-stroke;
}

#settings-modal {
  position: absolute;
  inset: 0;
  z-index: 20;
}

#settings-scrim {
  position: absolute;
  inset: 0;
  background: rgba(2, 8, 13, 0.46);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

#settings-dialog {
  position: absolute;
  right: max(24px, calc(var(--safe-right) + 16px));
  top: max(76px, calc(var(--safe-top) + 64px));
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - var(--safe-top) - var(--safe-bottom) - 104px);
  max-height: calc(100svh - var(--safe-top) - var(--safe-bottom) - 104px);
  overflow: auto;
  background: rgba(5, 14, 22, 0.96);
}

#server-node-modal {
  position: absolute;
  inset: 0;
  z-index: 21;
}

#server-node-scrim {
  position: absolute;
  inset: 0;
  background: rgba(2, 8, 13, 0.5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

#server-node-dialog {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(436px, calc(100vw - 28px));
  max-height: min(86vh, calc(100vh - 24px));
  max-height: min(86svh, calc(100svh - 24px));
  overflow: auto;
  padding: 18px;
  transform: translate(-50%, -50%);
  background: rgba(6, 13, 19, 0.97);
  border-color: rgba(232, 236, 238, 0.14);
}

#server-node-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(245, 251, 255, 0.12);
}

#server-node-header h2 {
  margin: 0;
}

#server-node-close-button {
  min-height: 36px;
  padding: 0 12px;
}

#settings-header,
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#settings-header {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(245, 251, 255, 0.14);
}

#settings-close-button {
  min-height: 36px;
  padding: 0 12px;
}

.settings-section {
  display: grid;
  gap: 10px;
}

.settings-label {
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.settings-row strong {
  min-width: 0;
  overflow: hidden;
  font-size: 1.35rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#settings-aircraft-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-aircraft-card {
  min-height: 92px;
  padding: 12px;
  display: grid;
  align-content: space-between;
  gap: 8px;
}

.settings-aircraft-card strong {
  font-size: 0.98rem;
}

.settings-aircraft-card small {
  display: block;
  margin-top: 2px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 0.96;
}

h1 {
  max-width: 11ch;
  font-size: clamp(2.35rem, 9vw, 4rem);
}

h2 {
  font-size: 1.7rem;
}

.brief {
  max-width: 30ch;
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

form,
.panel {
  display: grid;
  gap: 14px;
}

.language-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.language-toggle button {
  min-height: 36px;
  color: #d7e5ec;
  background: rgba(255, 255, 255, 0.06);
}

.language-toggle button.active {
  border-color: rgba(64, 199, 192, 0.82);
  color: #06131b;
  background: var(--accent-2);
  font-weight: 900;
}

label {
  display: grid;
  gap: 7px;
}

.toggle-row,
.range-row {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(245, 251, 255, 0.14);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.055);
}

.toggle-row {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.range-row {
  grid-template-columns: 1fr minmax(120px, 180px) auto;
  align-items: center;
}

.toggle-row span,
.range-row span,
.range-row strong {
  color: #d7e5ec;
  font-size: 0.88rem;
  font-weight: 800;
  text-transform: none;
}

label span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

input,
textarea {
  min-height: 42px;
  width: 100%;
  border: 1px solid rgba(133, 239, 255, 0.22);
  border-radius: 0;
  color: var(--text);
  background: rgba(10, 20, 30, 0.78);
  padding: 0 12px;
  outline: none;
  touch-action: manipulation;
  -webkit-touch-callout: default;
  -webkit-user-select: text;
  user-select: text;
}

select {
  min-height: 38px;
  width: 100%;
  border: 1px solid rgba(133, 239, 255, 0.22);
  color: var(--text);
  background: rgba(10, 20, 30, 0.78);
  padding: 0 10px;
  outline: none;
}

select:focus {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(77, 225, 223, 0.18);
}

.server-node-picker {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.server-node-card {
  min-height: 68px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  text-align: left;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(232, 236, 238, 0.12);
}

.server-node-card[aria-pressed="true"] {
  border-color: rgba(145, 214, 188, 0.7);
  box-shadow: 0 0 0 1px rgba(145, 214, 188, 0.26) inset;
  background: rgba(145, 214, 188, 0.08);
}

.server-node-card-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(232, 236, 238, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.server-node-card-icon svg,
.server-node-card-arrow {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.server-node-card-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.server-node-card-copy strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.96rem;
}

.server-node-card-copy small {
  min-width: 0;
  overflow: hidden;
  color: rgba(245, 251, 255, 0.66);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.72rem;
}

.server-node-card-arrow {
  opacity: 0.65;
}

.server-node-card:focus-visible {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(77, 225, 223, 0.18);
}

input:focus {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(77, 225, 223, 0.18);
}

input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  padding: 0;
  accent-color: var(--accent-2);
}

input[type="range"] {
  min-height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  accent-color: var(--accent);
  box-shadow: none;
}

.mode-toggle,
.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.select-action-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: 2px 10px;
  padding: 10px 12px;
  text-align: left;
}

.select-action-icon {
  grid-row: 1 / span 2;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.select-action-label {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.05;
}

.select-action-card small {
  color: rgba(232, 236, 238, 0.68);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  text-transform: none;
}

button {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 42px;
  border: 1px solid rgba(232, 236, 238, 0.14);
  border-radius: 0;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(18, 20, 22, 0.9), rgba(8, 9, 10, 0.9)),
    linear-gradient(135deg, rgba(145, 214, 188, 0.06), transparent 34%),
    linear-gradient(315deg, rgba(231, 173, 77, 0.06), transparent 30%);
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 10px 24px rgba(0, 0, 0, 0.18);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

button:hover {
  border-color: rgba(232, 236, 238, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(145, 214, 188, 0.08),
    0 10px 24px rgba(0, 0, 0, 0.18);
}

button::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 34%),
    linear-gradient(315deg, rgba(145, 214, 188, 0.12), transparent 28%);
  opacity: 0.55;
  mix-blend-mode: screen;
}

button:focus-visible,
input:focus-visible {
  outline: 2px solid rgba(145, 214, 188, 0.82);
  outline-offset: 2px;
}

button.active,
button.primary {
  border-color: rgba(231, 173, 77, 0.76);
  color: #15120a;
  background:
    linear-gradient(180deg, rgba(243, 210, 138, 0.98), rgba(228, 168, 61, 0.92)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent 34%),
    linear-gradient(315deg, rgba(145, 214, 188, 0.12), transparent 30%);
  font-weight: 800;
}

button.ghost {
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(18, 20, 22, 0.72), rgba(8, 9, 10, 0.82));
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid rgba(232, 236, 238, 0.14);
  color: var(--text);
  background: linear-gradient(180deg, rgba(18, 20, 22, 0.62), rgba(8, 9, 10, 0.78));
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-decoration: none;
  text-transform: uppercase;
}

.link-button:hover,
.link-button:focus-visible {
  border-color: rgba(232, 236, 238, 0.3);
  outline: none;
}

.link-button.primary-link {
  border-color: rgba(231, 173, 77, 0.72);
  color: #15120a;
  background: linear-gradient(180deg, rgba(243, 210, 138, 0.98), rgba(228, 168, 61, 0.92));
}

.legal-links {
  display: flex;
  justify-content: center;
}

.legal-shell {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(28px, 6vw, 68px) 0;
  overflow: visible;
}

.legal-hero {
  padding: clamp(28px, 6vw, 56px) 0 18px;
}

.legal-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.legal-hero h1 {
  max-width: none;
  margin: 0;
  font-size: clamp(2.1rem, 6vw, 4.2rem);
}

.legal-hero p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
}

.legal-language-toggle {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border: 1px solid rgba(232, 236, 238, 0.14);
  background: rgba(5, 12, 18, 0.7);
}

.legal-language-toggle button {
  min-height: 34px;
  min-width: 52px;
  padding: 0 10px;
  color: rgba(245, 251, 255, 0.82);
  background: transparent;
  border-color: transparent;
  font-size: 0.72rem;
  letter-spacing: 0;
}

.legal-language-toggle button.active,
.legal-language-toggle button[aria-pressed="true"] {
  color: #07120e;
  background: var(--accent-2);
  border-color: rgba(145, 214, 188, 0.74);
}

.legal-copy.hidden {
  display: none;
}

.legal-section {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid rgba(133, 239, 255, 0.16);
  background: rgba(6, 16, 26, 0.78);
}

.legal-section h2 {
  margin: 0 0 8px;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.legal-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.legal-section strong {
  color: rgba(245, 251, 255, 0.92);
}

.legal-section p + p {
  margin-top: 10px;
}

.legal-section-zh h2 {
  letter-spacing: 0;
}

.legal-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  padding-bottom: max(18px, var(--safe-bottom));
}

@media (max-width: 620px) {
  .legal-shell {
    width: min(100% - 24px, 920px);
    padding: max(18px, var(--safe-top)) 0 max(24px, var(--safe-bottom));
  }

  .legal-hero {
    padding: 22px 0 12px;
  }

  .legal-title-row {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .legal-hero h1 {
    font-size: 2rem;
    line-height: 1.02;
  }

  .legal-language-toggle {
    width: 100%;
  }

  .legal-language-toggle button {
    min-height: 38px;
  }

  .legal-section {
    margin-top: 12px;
    padding: 14px;
  }

  .legal-section h2 {
    font-size: 0.92rem;
  }

  .legal-section p {
    font-size: 0.92rem;
    line-height: 1.58;
  }

  .legal-footer {
    display: grid;
    grid-template-columns: 1fr;
  }
}

.message {
  min-height: 1.2em;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

#hud {
  position: absolute;
  left: max(22px, calc(var(--safe-left) + 16px));
  bottom: max(22px, calc(var(--safe-bottom) + 16px));
  top: auto;
  z-index: 4;
  display: flex;
  align-items: stretch;
  gap: 10px;
  width: min(390px, calc(100vw - 44px));
  height: clamp(286px, 31vh, 326px);
  opacity: 0.9;
}

.hud-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 12px;
  border: 1px solid rgba(232, 236, 238, 0.16);
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(12, 18, 18, 0.74), rgba(4, 7, 7, 0.78));
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow:
    0 22px 64px rgba(0, 0, 0, 0.3),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.hud-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(145, 214, 188, 0.08), transparent 28%),
    linear-gradient(315deg, rgba(231, 173, 77, 0.08), transparent 30%);
}

#attitude-card {
  padding: 8px;
  align-content: start;
  flex: 0 0 176px;
  height: 100%;
}

.hud-panel-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hud-label-stack {
  display: grid;
  gap: 3px;
}

.hud-label {
  color: var(--accent-2);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.hud-label-stack strong {
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
}

.hud-heading-readout {
  display: grid;
  justify-items: end;
  gap: 2px;
}

.hud-heading-readout span,
.hud-attitude-foot span,
.hud-metric span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.hud-heading-readout strong {
  color: var(--text);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

#attitude-canvas {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  display: block;
  border-radius: 0;
  background: radial-gradient(circle at 50% 45%, rgba(145, 214, 188, 0.14), rgba(7, 8, 9, 0.94) 68%);
}

.hud-attitude-foot {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.hud-attitude-foot > div {
  display: grid;
  gap: 2px;
}

.hud-attitude-foot strong {
  color: var(--text);
  font-size: 0.72rem;
}

#hud-strip {
  flex: 0 0 190px;
  min-width: 190px;
  align-self: stretch;
  height: 100%;
  display: grid;
  gap: 8px;
  padding: 8px 8px 9px;
  border: 1px solid rgba(232, 236, 238, 0.14);
  background:
    linear-gradient(180deg, rgba(10, 20, 19, 0.62), rgba(4, 8, 8, 0.72)),
    var(--panel);
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.hud-data-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(232, 236, 238, 0.11);
}

.hud-data-header strong {
  color: var(--text);
  font-size: 0.74rem;
  letter-spacing: 0.05em;
}

.hud-data-state {
  color: var(--accent-2);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hud-data-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 8px;
}

.hud-metric {
  display: grid;
  gap: 4px;
  padding: 4px 0 6px;
  border-bottom: 1px solid rgba(232, 236, 238, 0.1);
}

.hud-data-grid .hud-metric:nth-last-child(-n + 2) {
  border-bottom: 0;
  padding-bottom: 0;
}

.hud-metric:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.hud-metric strong {
  color: var(--text);
  font-size: 0.84rem;
  font-variant-numeric: tabular-nums;
}

.hud-data-grid-secondary {
  padding-top: 2px;
}

.hud-lever-bank {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding-top: 2px;
}

.hud-lever {
  display: grid;
  gap: 6px;
  padding: 6px 6px 7px;
  border: 1px solid rgba(232, 236, 238, 0.11);
  background: rgba(255, 255, 255, 0.02);
}

.hud-lever-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.hud-lever-label span {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.hud-lever-label strong {
  color: var(--text);
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hud-lever-track {
  position: relative;
  height: 86px;
  border: 1px solid rgba(232, 236, 238, 0.12);
  background:
    linear-gradient(180deg, rgba(14, 16, 18, 0.82), rgba(5, 6, 7, 0.92)),
    linear-gradient(180deg, transparent 0 20%, rgba(255, 255, 255, 0.04) 20% 21%, transparent 21% 40%, rgba(255, 255, 255, 0.04) 40% 41%, transparent 41% 60%, rgba(255, 255, 255, 0.04) 60% 61%, transparent 61% 80%, rgba(255, 255, 255, 0.04) 80% 81%, transparent 81% 100%);
  overflow: hidden;
}

.hud-lever-rail {
  position: absolute;
  left: 50%;
  top: 10px;
  bottom: 10px;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(145, 214, 188, 0.2), rgba(145, 214, 188, 0.82), rgba(145, 214, 188, 0.18));
  box-shadow: 0 0 12px rgba(145, 214, 188, 0.22);
}

.hud-lever-thumb {
  position: absolute;
  left: 50%;
  top: auto;
  bottom: 9px;
  width: 50px;
  height: 15px;
  transform: translateX(-50%);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(145, 214, 188, 0.86)),
    linear-gradient(90deg, rgba(231, 173, 77, 0.24), rgba(231, 173, 77, 0.02));
  border: 1px solid rgba(245, 251, 255, 0.22);
  box-shadow:
    0 0 0 1px rgba(145, 214, 188, 0.14),
    0 8px 16px rgba(0, 0, 0, 0.22),
    0 0 18px rgba(145, 214, 188, 0.16);
}

.hud-lever-thumb::before,
.hud-lever-thumb::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 10px;
  height: 2px;
  transform: translateY(-50%);
  background: rgba(8, 16, 24, 0.92);
}

.hud-lever-thumb::before {
  left: 6px;
}

.hud-lever-thumb::after {
  right: 6px;
}

.hud-lever-thumb.gear {
  width: 36px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(231, 173, 77, 0.9)),
    linear-gradient(90deg, rgba(145, 214, 188, 0.2), rgba(145, 214, 188, 0.02));
}

.hud-lever.disabled {
  border-color: rgba(133, 239, 255, 0.08);
  background: rgba(255, 255, 255, 0.015);
}

.hud-lever-thumb.disabled {
  opacity: 0.38;
  filter: grayscale(1) saturate(0.2);
  box-shadow:
    0 0 0 1px rgba(245, 251, 255, 0.08),
    0 8px 14px rgba(0, 0, 0, 0.18);
}

.keybind-grid {
  display: grid;
  gap: 6px;
}

.keybind-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid rgba(245, 251, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.keybind-row span {
  color: #d7e5ec;
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: none;
}

.keybind-row strong {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

#minimap {
  position: absolute;
  right: max(24px, calc(var(--safe-right) + 16px));
  bottom: max(24px, calc(var(--safe-bottom) + 16px));
  z-index: 4;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(133, 239, 255, 0.38);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(27, 103, 96, 0.38), rgba(4, 14, 13, 0.78) 68%, rgba(0, 0, 0, 0.88));
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  overflow: hidden;
  box-shadow:
    0 22px 60px rgba(0, 0, 0, 0.26),
    inset 0 0 18px rgba(133, 239, 255, 0.18),
    0 0 18px rgba(133, 239, 255, 0.08);
}

#minimap::before,
#minimap::after {
  content: "";
  position: absolute;
  inset: 10px;
  pointer-events: none;
  border-radius: 50%;
}

#minimap::before {
  border: 1px solid rgba(133, 239, 255, 0.18);
  box-shadow:
    inset 0 0 0 1px rgba(133, 239, 255, 0.04),
    inset 0 0 12px rgba(133, 239, 255, 0.06);
}

#minimap::after {
  inset: 18px;
  border: 1px solid rgba(133, 239, 255, 0.08);
  opacity: 0.45;
  box-shadow: inset 0 0 0 1px rgba(133, 239, 255, 0.02);
}

#minimap-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

#annunciator {
  position: absolute;
  left: 50%;
  top: max(24px, calc(var(--safe-top) + 12px));
  z-index: 4;
  width: min(360px, calc(100vw - 48px));
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 11px 16px;
  border: 1px solid rgba(133, 239, 255, 0.18);
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(10, 22, 34, 0.86), rgba(5, 12, 21, 0.9));
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  text-align: center;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.22);
}

#annunciator strong {
  color: var(--accent-2);
}

#annunciator.warning strong {
  color: var(--accent);
}

#annunciator.danger strong {
  color: var(--danger);
}

#annunciator span {
  color: var(--muted);
  font-size: 0.86rem;
}

#danmaku-layer {
  position: absolute;
  inset: max(78px, calc(var(--safe-top) + 64px)) 0 auto;
  z-index: 3;
  height: min(42vh, 360px);
  height: min(42svh, 360px);
  overflow: hidden;
  pointer-events: none;
}

.danmaku-message {
  position: absolute;
  left: 100%;
  top: var(--danmaku-top, 24px);
  max-width: min(72vw, 760px);
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 0;
  color: #ffffff;
  background: rgba(5, 14, 22, 0.58);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
  font-size: clamp(0.9rem, 2vw, 1.08rem);
  font-weight: 900;
  line-height: 1.25;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.82);
  white-space: nowrap;
  animation: hfs-danmaku var(--danmaku-duration, 8s) linear forwards;
}

.danmaku-message strong {
  margin-right: 7px;
  color: var(--accent);
}

@keyframes hfs-danmaku {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(calc(-100vw - 100% - 80px));
  }
}

#chat-form {
  position: absolute;
  left: 50%;
  bottom: max(74px, calc(var(--safe-bottom) + 58px));
  z-index: 8;
  width: min(520px, calc(100vw - 32px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(245, 251, 255, 0.2);
  border-radius: 0;
  background: rgba(5, 14, 22, 0.88);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.34);
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-touch-callout: default;
  -webkit-user-select: text;
  user-select: text;
}

#chat-form label {
  display: grid;
  gap: 4px;
}

#chat-form label span {
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 900;
}

#chat-form input {
  min-height: 40px;
  width: 100%;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-touch-callout: default;
  -webkit-user-select: text;
  user-select: text;
}

#chat-form button {
  align-self: end;
}

#chat-form,
#chat-form * {
  pointer-events: auto;
}

#game-screen.chat-open #chat-form {
  z-index: 24;
}

#game-screen.chat-open .mobile-stick-panel,
#game-screen.chat-open .mobile-stick-zone,
#game-screen.chat-open .mobile-button-bank,
#game-screen.chat-open .mobile-throttle,
#game-screen.chat-open .mobile-camera-zone,
#game-screen.chat-open #mobile-flight-strip,
#game-screen.chat-open #hud,
#game-screen.chat-open #minimap,
#game-screen.chat-open #annunciator {
  pointer-events: none;
}

.chat-safety-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.chat-safety-actions button {
  min-height: 30px;
  padding: 6px 10px;
  font-size: 0.72rem;
}

#mobile-controls {
  --mobile-edge: max(8px, calc(var(--safe-right) + 6px));
  --mobile-control-bottom: max(14px, calc(var(--safe-bottom) + 10px));
  --mobile-stick-size: 132px;
  --mobile-stick-size: clamp(116px, 30vh, 154px);
  --mobile-stick-size: clamp(116px, 30svh, 154px);
  --mobile-stick-knob-size: 48px;
  --mobile-stick-knob-size: clamp(42px, 10vh, 54px);
  --mobile-stick-knob-size: clamp(42px, 10svh, 54px);
  --mobile-button-size: 48px;
  --mobile-button-size: clamp(48px, 8vh, 56px);
  --mobile-button-size: clamp(48px, 8svh, 56px);
  --mobile-button-gap: 6px;
  --mobile-button-gap: clamp(5px, 1.15vh, 8px);
  --mobile-button-gap: clamp(5px, 1.15svh, 8px);
  --mobile-throttle-width: clamp(52px, 8vw, 62px);
  --mobile-throttle-length: 150px;
  --mobile-throttle-length: clamp(132px, 33vh, 190px);
  --mobile-throttle-length: clamp(132px, 33svh, 190px);
  --mobile-throttle-level: 0;
  position: absolute;
  inset: 0;
  z-index: 8;
  display: none;
  pointer-events: none;
}

#game-screen.mobile-controls-enabled #mobile-controls {
  display: block;
}

#game-screen.compact-mobile-hud #danmaku-layer {
  display: block;
  inset-block-start: max(62px, calc(var(--safe-top) + 50px));
  height: min(24vh, 168px);
  height: min(24svh, 168px);
}

#mobile-flight-strip {
  position: fixed;
  top: max(8px, calc(var(--safe-top) + 6px));
  left: 50%;
  z-index: 9;
  width: fit-content;
  max-width: min(276px, 40vw);
  min-width: 0;
  min-height: 24px;
  display: grid;
  grid-template-columns: repeat(4, max-content);
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(232, 236, 238, 0.1);
  border-radius: 8px;
  background: rgba(7, 8, 9, 0.16);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transform: translateX(-50%);
  opacity: 0.74;
  pointer-events: auto;
  touch-action: manipulation;
}

#mobile-flight-strip div {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 3px;
  padding: 3px 5px;
  background: transparent;
}

#mobile-flight-strip div + div {
  border-left: 1px solid rgba(232, 236, 238, 0.08);
}

#mobile-flight-strip span,
#mobile-flight-strip strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#mobile-flight-strip span {
  color: rgba(190, 198, 201, 0.72);
  font-size: 0.42rem;
  font-weight: 850;
  letter-spacing: 0;
}

#mobile-flight-strip strong {
  color: #f7fbff;
  font-size: 0.55rem;
  font-weight: 900;
  line-height: 1.05;
}

#game-screen.mobile-controls-enabled #mobile-flight-strip > :nth-child(3),
#game-screen.mobile-controls-enabled #mobile-flight-strip > :nth-child(4) {
  display: none;
}

.mobile-stick-zone,
.mobile-camera-zone {
  position: fixed;
  z-index: 2;
  display: none;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
}

.mobile-stick-zone {
  inset: 0 55% 0 0;
}

.mobile-camera-zone {
  inset: 0 0 0 45%;
}

#game-screen.mobile-controls-enabled .mobile-stick-zone,
#game-screen.mobile-controls-enabled .mobile-camera-zone {
  display: block;
}

.mobile-camera-zone span {
  position: absolute;
  top: 50%;
  right: calc(var(--mobile-edge) + var(--mobile-throttle-width) + 14px);
  padding: 5px 7px;
  border: 1px solid rgba(232, 236, 238, 0.12);
  border-radius: 999px;
  color: rgba(245, 251, 255, 0.46);
  background: rgba(7, 8, 9, 0.14);
  font-size: 0.52rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1;
  transform: translateY(-50%);
  opacity: 0.34;
  transition: opacity 120ms ease, border-color 120ms ease, color 120ms ease;
}

.mobile-camera-zone.active span {
  border-color: rgba(231, 173, 77, 0.46);
  color: rgba(255, 226, 169, 0.92);
  opacity: 0.92;
}

#game-screen.mobile-controls-enabled #settings-button {
  left: max(10px, calc(var(--safe-left) + 8px));
  right: auto;
  top: max(8px, calc(var(--safe-top) + 6px));
  z-index: 10;
  width: 48px;
  height: 48px;
  min-height: 48px;
  padding: 0;
  font-size: 0;
  border-radius: 10px;
  clip-path: none;
  border-color: rgba(245, 251, 255, 0.16);
  color: rgba(247, 251, 255, 0.94);
  background:
    linear-gradient(180deg, rgba(247, 251, 255, 0.13), rgba(247, 251, 255, 0.04)),
    rgba(5, 8, 10, 0.28);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.18),
    inset 0 1px rgba(255, 255, 255, 0.11);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

#game-screen.mobile-controls-enabled #hud-mode-button {
  left: max(66px, calc(var(--safe-left) + 60px));
  right: auto;
  top: max(8px, calc(var(--safe-top) + 6px));
  z-index: 10;
  min-width: 82px;
  width: auto;
  height: 48px;
  min-height: 48px;
  padding: 0 10px;
  border-radius: 10px;
  clip-path: none;
  border-color: rgba(245, 251, 255, 0.16);
  color: rgba(247, 251, 255, 0.94);
  background:
    linear-gradient(180deg, rgba(247, 251, 255, 0.13), rgba(247, 251, 255, 0.04)),
    rgba(5, 8, 10, 0.28);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.18),
    inset 0 1px rgba(255, 255, 255, 0.11);
}

#game-screen.mobile-controls-enabled #hud-mode-button:active,
#game-screen.mobile-controls-enabled #hud-mode-button[aria-pressed="true"] {
  border-color: rgba(231, 173, 77, 0.38);
  color: rgba(255, 226, 169, 0.96);
}

#game-screen.hud-mode-hidden #hud,
#game-screen.hud-mode-hidden #minimap,
#game-screen.hud-mode-hidden #mobile-flight-strip,
#game-screen.hud-mode-hidden #annunciator {
  opacity: 0;
  pointer-events: none;
}

/* Hiding the flight instruments must never hide the only control that can
   restore them. This also keeps keyboard/mouse and touch routes consistent. */
#game-screen.hud-mode-hidden #hud-mode-button {
  opacity: 0.55;
  pointer-events: auto;
}

#game-screen.mobile-controls-enabled.hud-mode-hidden #hud {
  transform: translateY(-10px) scale(0.72);
  opacity: 0;
}

#game-screen.mobile-controls-enabled.hud-mode-hidden #minimap {
  transform: scale(0.76);
  opacity: 0;
}

#game-screen.mobile-controls-enabled.hud-mode-hidden #mobile-flight-strip {
  transform: translateX(-50%) scale(0.82);
  opacity: 0;
}

#game-screen.mobile-controls-enabled.hud-mode-hidden #hud-mode-button {
  opacity: 0.55;
  pointer-events: auto;
}

#game-screen.mobile-controls-enabled.hud-mode-compact #hud {
  top: max(52px, calc(var(--safe-top) + 48px));
  width: clamp(72px, 8.6vw, 94px);
  transform: scale(0.78);
  transform-origin: top left;
  opacity: 0.56;
}

#game-screen.mobile-controls-enabled.hud-mode-compact #attitude-card {
  padding: 0;
  border-color: rgba(232, 236, 238, 0.06);
  background: rgba(7, 8, 9, 0.12);
}

#game-screen.mobile-controls-enabled.hud-mode-compact #minimap {
  top: max(6px, calc(var(--safe-top) + 4px));
  width: clamp(56px, 7.2vw, 76px);
  height: clamp(56px, 7.2vw, 76px);
  transform: scale(0.84);
  transform-origin: top right;
  opacity: 0.66;
}

#game-screen.mobile-controls-enabled.hud-mode-compact #mobile-flight-strip {
  top: max(8px, calc(var(--safe-top) + 6px));
  left: 50%;
  width: min(232px, calc(100vw - var(--safe-left) - var(--safe-right) - 102px));
  padding: 3px 6px;
  gap: 4px;
  opacity: 0.6;
  transform: translateX(-50%) scale(0.92);
  transform-origin: top center;
}

#game-screen.mobile-controls-enabled.hud-mode-compact #mobile-flight-strip span {
  font-size: 0.5rem;
}

#game-screen.mobile-controls-enabled.hud-mode-compact #mobile-flight-strip strong {
  font-size: 0.68rem;
}

#game-screen.mobile-controls-enabled.hud-mode-compact #mobile-flight-strip > :nth-child(4) {
  display: none;
}

#game-screen.mobile-controls-enabled #settings-button .settings-icon {
  display: block;
  margin: auto;
}

#game-screen.mobile-controls-enabled #settings-button:active,
#game-screen.mobile-controls-enabled #settings-button[aria-expanded="true"] {
  border-color: rgba(231, 173, 77, 0.38);
  color: rgba(255, 226, 169, 0.96);
  background:
    linear-gradient(180deg, rgba(231, 173, 77, 0.16), rgba(247, 251, 255, 0.05)),
    rgba(5, 8, 10, 0.36);
}

.mobile-stick-panel,
.mobile-stick-zone,
.mobile-button-bank,
.mobile-throttle,
.mobile-camera-zone {
  pointer-events: auto;
}

.mobile-stick-panel,
.mobile-throttle {
  display: grid;
  gap: 5px;
  justify-items: center;
}

.mobile-stick-panel {
  position: fixed;
  left: max(16px, calc(var(--safe-left) + 12px));
  bottom: var(--mobile-control-bottom);
  z-index: 6;
  width: var(--mobile-stick-size);
  height: auto;
  grid-template-rows: var(--mobile-stick-size);
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  transform: translate(0, 0);
}

.mobile-stick-panel span,
.mobile-throttle-label {
  color: rgba(245, 251, 255, 0.78);
  font-size: 0.52rem;
  font-weight: 900;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
  text-transform: uppercase;
}

.mobile-stick-panel span {
  display: none;
}

.mobile-stick {
  position: relative;
  width: 100%;
  height: var(--mobile-stick-size);
  aspect-ratio: 1;
  border: 1px solid rgba(232, 236, 238, 0.18);
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 49%, rgba(232, 236, 238, 0.1) 49% 51%, transparent 51%),
    linear-gradient(0deg, transparent 49%, rgba(232, 236, 238, 0.1) 49% 51%, transparent 51%),
    rgba(7, 8, 9, 0.3);
  box-shadow: inset 0 0 18px rgba(145, 214, 188, 0.08), 0 12px 34px rgba(0, 0, 0, 0.2);
  touch-action: none;
  user-select: none;
  transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

#mobile-stick-knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--mobile-stick-knob-size);
  height: var(--mobile-stick-knob-size);
  border: 1px solid rgba(231, 173, 77, 0.82);
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 28%, rgba(255, 255, 255, 0.34), transparent 28%),
    rgba(231, 173, 77, 0.7);
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.28),
    0 0 18px rgba(231, 173, 77, 0.16);
  transform: translate(-50%, -50%);
  transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.mobile-stick-panel.active .mobile-stick {
  border-color: rgba(231, 173, 77, 0.36);
  background:
    linear-gradient(90deg, transparent 49%, rgba(255, 225, 163, 0.18) 49% 51%, transparent 51%),
    linear-gradient(0deg, transparent 49%, rgba(255, 225, 163, 0.18) 49% 51%, transparent 51%),
    rgba(7, 8, 9, 0.36);
  box-shadow:
    inset 0 0 22px rgba(231, 173, 77, 0.12),
    0 12px 34px rgba(0, 0, 0, 0.22);
}

.mobile-stick-panel.active #mobile-stick-knob {
  border-color: rgba(255, 225, 163, 0.95);
  background:
    radial-gradient(circle at 38% 28%, rgba(255, 255, 255, 0.38), transparent 28%),
    rgba(231, 173, 77, 0.84);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.3),
    0 0 22px rgba(231, 173, 77, 0.24);
}

.mobile-button-bank {
  position: fixed;
  right: calc(var(--mobile-edge) + var(--mobile-throttle-width) + 12px);
  bottom: var(--mobile-control-bottom);
  z-index: 7;
  display: block;
  width: calc(var(--mobile-button-size) + var(--mobile-button-size) + var(--mobile-button-gap));
  max-width: calc(100vw - var(--mobile-throttle-width) - 48px);
  padding: 0;
  border: 0;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.mobile-primary-actions,
.mobile-secondary-actions {
  display: grid;
  grid-template-columns: repeat(2, var(--mobile-button-size));
  gap: var(--mobile-button-gap);
}

.mobile-secondary-actions {
  position: absolute;
  right: 0;
  bottom: calc(100% + var(--mobile-button-gap));
  opacity: 0.52;
  transition: opacity 140ms ease;
}

.mobile-secondary-actions:hover,
.mobile-secondary-actions:focus-within {
  opacity: 0.94;
}

.mobile-rudder-row,
.mobile-system-row,
.mobile-action-row {
  display: contents;
}

.mobile-button-bank button {
  width: var(--mobile-button-size);
  min-width: var(--mobile-button-size);
  height: var(--mobile-button-size);
  min-height: var(--mobile-button-size);
  aspect-ratio: 1;
  display: grid;
  grid-template-rows: 1fr auto;
  place-items: center;
  gap: 1px;
  padding: 0;
  border-color: rgba(232, 236, 238, 0.12);
  border-radius: 8px;
  clip-path: none;
  color: rgba(245, 251, 255, 0.88);
  background: rgba(7, 8, 9, 0.3);
  box-shadow:
    0 9px 20px rgba(0, 0, 0, 0.15),
    inset 0 1px rgba(255, 255, 255, 0.07);
  font-size: 0;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  touch-action: none;
  user-select: none;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition:
    transform 110ms ease,
    border-color 120ms ease,
    background 120ms ease,
    color 120ms ease,
    opacity 120ms ease;
}

.mobile-button-bank button::after {
  content: attr(data-cockpit-label);
  max-width: 100%;
  overflow: hidden;
  color: rgba(245, 251, 255, 0.7);
  font-size: 0.48rem;
  font-size: clamp(0.44rem, 1.35vh, 0.52rem);
  font-size: clamp(0.44rem, 1.35svh, 0.52rem);
  font-weight: 900;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-action-row button {
  min-height: var(--mobile-button-size);
}

.mobile-icon {
  width: 19px;
  width: clamp(17px, 4.4vh, 21px);
  width: clamp(17px, 4.4svh, 21px);
  height: 19px;
  height: clamp(17px, 4.4vh, 21px);
  height: clamp(17px, 4.4svh, 21px);
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.mobile-action-row .mobile-icon,
.mobile-secondary-actions .mobile-icon {
  width: 18px;
  width: clamp(16px, 4vh, 20px);
  width: clamp(16px, 4svh, 20px);
  height: 18px;
  height: clamp(16px, 4vh, 20px);
  height: clamp(16px, 4svh, 20px);
}

.mobile-button-bank button.active {
  border-color: rgba(231, 173, 77, 0.84);
  color: #15120a;
  background: var(--accent);
}

.mobile-button-bank button.active::after {
  color: rgba(16, 15, 10, 0.92);
}

.mobile-button-bank button:active {
  transform: translateY(1px) scale(0.96);
}

.mobile-button-bank button:disabled {
  opacity: 0.46;
  color: rgba(245, 251, 255, 0.62);
  background: rgba(7, 8, 9, 0.42);
}

.mobile-button-bank button:disabled::after {
  color: rgba(245, 251, 255, 0.42);
}

.mobile-throttle {
  position: fixed;
  right: var(--mobile-edge);
  bottom: var(--mobile-control-bottom);
  z-index: 7;
  width: var(--mobile-throttle-width);
  min-height: calc(var(--mobile-throttle-length) + 40px);
  padding: 6px 6px 7px;
  border: 1px solid rgba(232, 236, 238, 0.12);
  border-radius: 8px;
  background: rgba(7, 8, 9, 0.26);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.2),
    inset 0 1px rgba(255, 255, 255, 0.04);
  align-content: space-between;
  touch-action: none;
  user-select: none;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.mobile-throttle input {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  min-height: 0;
  opacity: 0;
  appearance: none;
  -webkit-appearance: none;
  touch-action: none;
}

.mobile-throttle-rail {
  position: relative;
  justify-self: center;
  width: 16px;
  height: var(--mobile-throttle-length);
  display: block;
  overflow: visible;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(232, 236, 238, 0.18), rgba(232, 236, 238, 0.06)),
    rgba(255, 255, 255, 0.06);
  box-shadow:
    inset 0 0 0 1px rgba(232, 236, 238, 0.14),
    inset 0 -12px 18px rgba(0, 0, 0, 0.2);
}

.mobile-throttle-fill {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 4px;
  height: calc(100% - 8px);
  display: block;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(231, 173, 77, 0.96), rgba(145, 214, 188, 0.76));
  box-shadow: 0 0 12px rgba(231, 173, 77, 0.22);
  transform: scaleY(var(--mobile-throttle-level));
  transform-origin: center bottom;
}

#mobile-throttle-thumb {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 34px;
  height: 22px;
  display: block;
  border: 1px solid rgba(255, 231, 166, 0.8);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 226, 155, 0.96), rgba(231, 173, 77, 0.9));
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.3),
    inset 0 1px rgba(255, 255, 255, 0.32);
  transform: translateX(-50%);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.mobile-throttle.active {
  border-color: rgba(231, 173, 77, 0.34);
  background: rgba(7, 8, 9, 0.34);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.22),
    inset 0 1px rgba(255, 255, 255, 0.06),
    0 0 18px rgba(231, 173, 77, 0.08);
}

.mobile-throttle.active #mobile-throttle-thumb {
  transform: translateX(-50%) scale(1.04);
  box-shadow:
    0 9px 20px rgba(0, 0, 0, 0.32),
    0 0 16px rgba(231, 173, 77, 0.16),
    inset 0 1px rgba(255, 255, 255, 0.36);
}

.mobile-throttle strong {
  color: rgba(255, 225, 163, 0.92);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
}

.mobile-throttle-label {
  width: 22px;
  height: 18px;
  display: grid;
  place-items: center;
}

.mobile-throttle-label .mobile-icon {
  width: 17px;
  height: 17px;
  color: rgba(245, 251, 255, 0.78);
  stroke-width: 2.2;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 760px) {
  #select-screen {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr) auto;
    padding:
      max(16px, calc(var(--safe-top) + 12px))
      max(16px, calc(var(--safe-right) + 12px))
      max(16px, calc(var(--safe-bottom) + 12px))
      max(16px, calc(var(--safe-left) + 12px));
    overflow: hidden;
  }

  #select-header {
    display: grid;
    padding-bottom: 12px;
  }

  .select-account {
    flex-wrap: wrap;
  }

  #aircraft-grid {
    overflow: visible;
    padding: 12px;
  }

  #aircraft-detail {
    width: auto;
    justify-self: stretch;
    margin-bottom: 16px;
  }

  #auth-screen {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 18px;
    padding:
      max(16px, calc(var(--safe-top) + 12px))
      max(16px, calc(var(--safe-right) + 12px))
      max(28px, calc(var(--safe-bottom) + 20px))
      max(16px, calc(var(--safe-left) + 12px));
    align-items: start;
  }

  .auth-backdrop {
    background-position: 64% center;
  }

  #auth-screen::before {
    inset: auto auto 3% 6%;
    width: 120px;
  }

  .auth-copy {
    align-self: end;
    padding-bottom: 0;
  }

  .auth-copy h1 {
    max-width: 10ch;
  }

  .auth-copy p:not(.eyebrow) {
    margin-top: 10px;
    font-size: 0.95rem;
  }

  .auth-feature-grid {
    grid-template-columns: 1fr;
  }

  .auth-feature {
    min-height: 0;
  }

  #auth-panel {
    left: auto;
    right: auto;
    top: auto;
    width: auto;
    padding: 16px;
  }

  #auth-panel {
    justify-self: stretch;
  }

  h1 {
    max-width: 14ch;
    font-size: 2.25rem;
  }

  .brief {
    display: none;
  }

  #hud {
    left: max(12px, calc(var(--safe-left) + 10px));
    bottom: max(12px, calc(var(--safe-bottom) + 10px));
    top: auto;
    width: min(296px, calc(100vw - 24px));
    height: auto;
    gap: 6px;
    flex-direction: column;
    align-items: stretch;
  }

  #minimap {
    right: max(12px, calc(var(--safe-right) + 10px));
    top: max(12px, calc(var(--safe-top) + 10px));
    bottom: auto;
    width: 92px;
    height: 92px;
  }

  #settings-button {
    left: max(16px, calc(var(--safe-left) + 12px));
    right: auto;
    top: max(16px, calc(var(--safe-top) + 12px));
  }

  #settings-dialog {
    left: max(16px, calc(var(--safe-left) + 12px));
    right: max(16px, calc(var(--safe-right) + 12px));
    top: max(72px, calc(var(--safe-top) + 60px));
    width: auto;
    max-height: calc(100vh - var(--safe-top) - var(--safe-bottom) - 88px);
    max-height: calc(100svh - var(--safe-top) - var(--safe-bottom) - 88px);
    padding: 16px;
  }

  #settings-aircraft-grid {
    grid-template-columns: 1fr;
  }

  .range-row {
    grid-template-columns: 1fr auto;
  }

  .range-row input {
    grid-column: 1 / -1;
  }

  #attitude-card {
    padding: 6px;
    flex-basis: auto;
    flex: 0 0 auto;
    min-height: 176px;
  }

  #attitude-canvas {
    max-width: 162px;
    justify-self: center;
  }

  #annunciator {
    top: auto;
    right: max(12px, calc(var(--safe-right) + 10px));
    left: auto;
    bottom: max(108px, calc(var(--safe-bottom) + 96px));
    width: min(188px, calc(100vw - 24px));
    padding: 10px 12px;
  }

  #game-screen.mobile-controls-enabled #annunciator {
    bottom: max(262px, calc(var(--safe-bottom) + 250px));
  }

  #game-screen.mobile-controls-enabled #danmaku-layer {
    inset-block-start: 142px;
    height: 32vh;
    height: 32svh;
  }

  #game-screen.mobile-controls-enabled #hud {
    bottom: max(262px, calc(var(--safe-bottom) + 250px));
  }

  #chat-form {
    bottom: max(142px, calc(var(--safe-bottom) + 130px));
    grid-template-columns: minmax(0, 1fr);
    width: min(480px, calc(100vw - 24px));
  }

  #game-screen.mobile-controls-enabled #chat-form {
    bottom: max(278px, calc(var(--safe-bottom) + 264px));
    z-index: 24;
  }

  #hud-strip {
    min-width: 0;
    width: 100%;
    padding: 6px;
    gap: 6px;
  }

  .hud-panel-header {
    gap: 8px;
  }

  .hud-label {
    font-size: 0.58rem;
  }

  .hud-label-stack strong,
  .hud-heading-readout strong,
  .hud-attitude-foot strong {
    font-size: 0.66rem;
  }

  .hud-heading-readout span,
  .hud-attitude-foot span,
  .hud-metric span,
  .hud-data-state,
  .hud-lever-label span {
    font-size: 0.56rem;
  }

  .hud-metric {
    gap: 3px;
    padding: 3px 0 5px;
  }

  .hud-metric strong {
    font-size: 0.74rem;
  }

  .hud-lever-bank {
    gap: 5px;
  }

  .hud-lever {
    padding: 5px 5px 6px;
    gap: 5px;
  }

  .hud-lever-label strong {
    font-size: 0.62rem;
  }

  .hud-lever-track {
    height: 62px;
  }

  .hud-lever-thumb {
    top: auto;
    bottom: 7px;
    width: 40px;
    height: 12px;
  }

  #minimap-canvas {
    width: 100%;
    height: 100%;
  }

  #annunciator strong {
    font-size: 0.82rem;
  }

  #annunciator span {
    font-size: 0.68rem;
    line-height: 1.3;
  }
}

@media (max-height: 560px) and (orientation: landscape) {
  #auth-screen {
    --auth-pad: clamp(12px, 2.2vw, 24px);
    grid-template-columns: minmax(0, 1fr) minmax(270px, 340px);
    gap: clamp(14px, 3vw, 28px);
    align-items: center;
  }

  .auth-copy {
    gap: 10px;
    align-self: center;
    padding-bottom: 0;
  }

  .auth-copy h1 {
    max-width: 9ch;
    font-size: clamp(2.4rem, 13vh, 4.2rem);
    line-height: 0.92;
  }

  .auth-copy p:not(.eyebrow) {
    max-width: 34ch;
    font-size: clamp(0.82rem, 2.6vh, 1rem);
    line-height: 1.35;
  }

  .auth-meta-row {
    gap: 8px;
  }

  .auth-chip {
    min-height: 30px;
    padding: 0 10px;
    font-size: 0.72rem;
  }

  .auth-feature-grid,
  .auth-briefing {
    display: none;
  }

  #auth-panel {
    align-self: center;
    width: 100%;
    padding: 16px;
  }

  #select-screen {
    --select-pad: clamp(12px, 2vw, 22px);
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  }

  #select-header {
    gap: 12px;
    padding-bottom: 10px;
  }

  #select-header h1 {
    max-width: 9ch;
    font-size: clamp(2.25rem, 13vh, 3.6rem);
    line-height: 0.94;
  }

  .select-account {
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: min(520px, 48vw);
    gap: 6px;
  }

  .select-account span {
    max-width: 118px;
    font-size: 0.84rem;
  }

  .select-account button,
  .select-account .link-button {
    min-height: 32px;
    padding: 0 9px;
    font-size: 0.72rem;
    line-height: 1.08;
  }

  #aircraft-grid {
    gap: 10px;
    padding: 10px;
  }

  .aircraft-group {
    gap: 8px;
  }

  .aircraft-group-grid {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 10px;
  }

  .aircraft-card {
    min-height: 132px;
    grid-template-rows: auto minmax(34px, 1fr) auto;
    gap: 8px;
    padding: 12px;
  }

  .aircraft-card strong {
    font-size: 0.94rem;
  }

  .aircraft-card small,
  .aircraft-card span {
    font-size: 0.76rem;
    line-height: 1.28;
  }

  #aircraft-detail {
    align-self: stretch;
    overflow: auto;
    padding: 16px;
  }

  #aircraft-detail h2 {
    font-size: 1.55rem;
  }

  #aircraft-detail .button-row {
    grid-template-columns: 1fr;
  }

  #aircraft-detail .button-row button {
    min-height: 36px;
  }
}

@media (max-width: 430px) {
  .auth-meta-row {
    gap: 8px;
  }

  .auth-chip {
    min-height: 30px;
    padding: 0 10px;
    font-size: 0.75rem;
  }

  .auth-briefing {
    padding: 14px 14px 12px;
  }

  #hud {
    left: max(10px, calc(var(--safe-left) + 8px));
    bottom: max(10px, calc(var(--safe-bottom) + 8px));
    width: min(258px, calc(100vw - 20px));
  }

  #attitude-card {
    min-height: 156px;
  }

  #attitude-canvas {
    max-width: 138px;
  }

  #minimap {
    right: max(10px, calc(var(--safe-right) + 8px));
    top: max(10px, calc(var(--safe-top) + 8px));
    width: 82px;
    height: 82px;
  }

  #annunciator {
    right: max(10px, calc(var(--safe-right) + 8px));
    bottom: max(96px, calc(var(--safe-bottom) + 88px));
    width: min(162px, calc(100vw - 20px));
    padding: 8px 10px;
  }

  #game-screen.mobile-controls-enabled #hud {
    bottom: max(248px, calc(var(--safe-bottom) + 238px));
  }

  #game-screen.mobile-controls-enabled #annunciator {
    bottom: max(248px, calc(var(--safe-bottom) + 238px));
  }

  .hud-data-grid {
    gap: 5px 6px;
  }

  .hud-metric strong {
    font-size: 0.68rem;
  }

  .hud-lever-track {
    height: 56px;
  }

  .hud-lever-thumb {
    top: auto;
    bottom: 7px;
    width: 36px;
  }
}

@media (max-width: 700px) and (max-height: 430px) and (orientation: landscape) {
  #mobile-controls {
    --mobile-stick-size: 108px;
    --mobile-stick-size: clamp(96px, 29.5vh, 118px);
    --mobile-stick-size: clamp(96px, 29.5svh, 118px);
    --mobile-stick-knob-size: 42px;
    --mobile-stick-knob-size: clamp(38px, 10vh, 46px);
    --mobile-stick-knob-size: clamp(38px, 10svh, 46px);
    --mobile-button-size: 48px;
    --mobile-button-gap: 5px;
    --mobile-throttle-width: 52px;
    --mobile-throttle-length: 128px;
    --mobile-throttle-length: clamp(118px, 31vh, 140px);
    --mobile-throttle-length: clamp(118px, 31svh, 140px);
  }

  .mobile-button-bank button {
    font-size: 0;
  }

  #mobile-flight-strip {
    max-width: min(300px, 46vw);
    min-width: 0;
  }

  #mobile-flight-strip div {
    gap: 4px;
    padding-inline: 6px;
  }
}

/* --------------------------------------------------------------------------
   Hangar Operations v2

   The hangar is a dispatch surface, not a catalogue of equal-weight cards.
   The selected aircraft owns the large central bay; the rail is deliberately
   subordinate navigation.  This layer uses project-owned imagery when it is
   present and falls back to the existing local runway art while assets load.
   -------------------------------------------------------------------------- */

#select-screen {
  isolation: isolate;
  background: #061019;
}

.hangar-environment {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(3, 12, 20, 0.88), rgba(3, 12, 20, 0.54) 52%, rgba(3, 12, 20, 0.82)),
    linear-gradient(180deg, rgba(3, 12, 20, 0.26), rgba(3, 12, 20, 0.82)),
    url("https://hamfs-assets.743.world/releases/r20261031-1514/assets/ui/hangar-operations-bg-v1.png") center center / cover no-repeat,
    url("https://hamfs-assets.743.world/releases/r20261031-1514/assets/ui/auth-runway-hero.jpg") center center / cover no-repeat;
  filter: saturate(0.8) contrast(1.06);
}

#select-screen > :not(.hangar-environment) {
  position: relative;
  z-index: 1;
}

#select-header {
  min-height: 62px;
  padding: 2px 2px 14px;
  border-color: rgba(150, 176, 194, 0.22);
}

#select-header .eyebrow {
  margin-bottom: 4px;
  color: var(--hfs-brand);
}

#select-header h1 {
  font-size: clamp(1.55rem, 2.8vw, 2.32rem);
  font-weight: 730;
}

#select-header::after {
  content: "FLIGHT OPERATIONS / LOCAL READY";
  position: absolute;
  left: 0;
  bottom: -1px;
  color: var(--hfs-text-muted);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.58rem;
  font-weight: 750;
  letter-spacing: 0.12em;
}

.select-account {
  gap: 8px;
}

.select-account > span {
  padding: 0 4px;
  color: var(--hfs-text-1);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

#aircraft-detail {
  border-color: rgba(150, 176, 194, 0.34);
  border-radius: 18px;
  background:
    linear-gradient(120deg, rgba(5, 19, 29, 0.94), rgba(5, 17, 27, 0.78)),
    rgba(5, 17, 27, 0.86);
  box-shadow: 0 28px 76px rgba(0, 0, 0, 0.34), inset 0 1px rgba(255, 255, 255, 0.05);
}

.aircraft-detail-visual {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(150, 176, 194, 0.22);
  border-radius: 13px;
  background:
    radial-gradient(circle at 50% 42%, rgba(45, 184, 208, 0.15), transparent 44%),
    linear-gradient(90deg, transparent 0 49.8%, rgba(150, 176, 194, 0.1) 49.8% 50.2%, transparent 50.2%),
    linear-gradient(180deg, rgba(17, 46, 64, 0.76), rgba(3, 13, 22, 0.84));
}

.aircraft-detail-visual::before {
  content: "";
  position: absolute;
  right: -8%;
  bottom: -18%;
  width: 68%;
  height: 66%;
  border: 1px solid rgba(150, 176, 194, 0.16);
  border-radius: 50%;
  box-shadow: 0 0 0 18px rgba(150, 176, 194, 0.035), 0 0 0 46px rgba(150, 176, 194, 0.022);
  pointer-events: none;
}

.hangar-stage-header {
  position: absolute;
  left: 15px;
  top: 13px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hangar-stage-header .eyebrow {
  margin: 0;
}

.hangar-stage-bay {
  padding: 4px 7px;
  border: 1px solid rgba(120, 199, 255, 0.3);
  border-radius: 6px;
  color: var(--hfs-info);
  background: rgba(5, 19, 29, 0.68);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

#aircraft-preview {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: auto;
  height: auto;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

#aircraft-preview::after {
  bottom: 16px;
  height: 1px;
  opacity: 0.72;
}

#aircraft-preview-canvas {
  width: 100%;
  height: 100%;
}

.hangar-stage-readout {
  position: absolute;
  left: 15px;
  right: 15px;
  bottom: 13px;
  z-index: 3;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-top: 9px;
  border-top: 1px solid rgba(150, 176, 194, 0.18);
  color: var(--hfs-text-muted);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.58rem;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.hangar-stage-readout strong {
  color: var(--hfs-text-1);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
}

.aircraft-detail-copy {
  padding: 12px 10px 10px 2px;
  gap: 14px;
}

#aircraft-detail h2 {
  max-width: 12ch;
  font-size: clamp(1.8rem, 3.2vw, 2.72rem);
  line-height: 0.94;
}

#selected-aircraft-role {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(150, 176, 194, 0.2);
}

.aircraft-capability-grid > div {
  min-height: 64px;
  padding: 10px;
  border-color: rgba(150, 176, 194, 0.2);
  background: rgba(14, 40, 56, 0.58);
}

.aircraft-capability-grid strong {
  white-space: normal;
}

#aircraft-detail .button-row {
  gap: 9px;
}

#aircraft-detail .select-action-card {
  min-height: 64px;
  border-radius: 10px;
}

#aircraft-detail #fly-practice-button {
  border-color: rgba(45, 184, 208, 0.88);
  background: linear-gradient(135deg, #42c3d9, #2babc5);
}

#aircraft-detail #select-join-button {
  border-color: rgba(150, 176, 194, 0.38);
  background: rgba(13, 34, 49, 0.86);
}

#aircraft-grid {
  align-items: stretch;
  padding: 8px;
  border-color: rgba(150, 176, 194, 0.24);
  background: rgba(4, 15, 24, 0.86);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24);
}

#aircraft-grid .aircraft-card {
  height: 132px;
  padding: 8px;
  border-color: rgba(150, 176, 194, 0.2);
  background: linear-gradient(180deg, rgba(13, 34, 49, 0.94), rgba(5, 17, 27, 0.94));
}

#aircraft-grid .aircraft-card-preview {
  min-height: 70px;
  border: 1px solid rgba(150, 176, 194, 0.16);
  background:
    radial-gradient(circle at 50% 45%, rgba(45, 184, 208, 0.11), transparent 52%),
    linear-gradient(90deg, transparent 0 49%, rgba(150, 176, 194, 0.08) 49% 51%, transparent 51%);
}

#aircraft-grid .aircraft-card.active {
  border-color: rgba(242, 184, 75, 0.84);
  background: linear-gradient(180deg, rgba(53, 42, 21, 0.94), rgba(20, 26, 26, 0.96));
}

#aircraft-grid .aircraft-card.active .aircraft-card-preview {
  border-color: rgba(242, 184, 75, 0.44);
  background:
    radial-gradient(circle at 50% 45%, rgba(242, 184, 75, 0.18), transparent 52%),
    linear-gradient(90deg, transparent 0 49%, rgba(242, 184, 75, 0.12) 49% 51%, transparent 51%);
}

#aircraft-grid .aircraft-card strong {
  font-size: 0.8rem;
}

/* Phone landscape uses a usable dispatch board: compact vertical fleet rail
   on the left, a real live aircraft stage and the two high-value actions on
   the right.  This replaces the former three-row layout that overlapped. */
@media (max-width: 700px) and (max-height: 430px) and (orientation: landscape) {
  html.mobile-flight-ui.mobile-side-preview-selector #select-screen {
    grid-template-columns: minmax(140px, 0.76fr) minmax(0, 1.24fr);
    grid-template-rows: 38px minmax(0, 1fr);
    gap: 6px;
    padding:
      max(8px, calc(var(--safe-top) + 4px))
      max(10px, calc(var(--safe-right) + 8px))
      max(8px, calc(var(--safe-bottom) + 4px))
      max(10px, calc(var(--safe-left) + 8px));
  }

  html.mobile-flight-ui.mobile-side-preview-selector #select-header {
    grid-column: 1 / -1;
    grid-row: 1;
    min-height: 38px;
    padding: 0 0 5px;
  }

  html.mobile-flight-ui.mobile-side-preview-selector #select-header::after,
  html.mobile-flight-ui.mobile-side-preview-selector #select-header .eyebrow,
  html.mobile-flight-ui.mobile-side-preview-selector .select-account .account-action {
    display: none;
  }

  html.mobile-flight-ui.mobile-side-preview-selector #select-header h1 {
    font-size: 1rem;
    line-height: 1;
  }

  html.mobile-flight-ui.mobile-side-preview-selector .select-account {
    max-width: 44vw;
  }

  html.mobile-flight-ui.mobile-side-preview-selector .select-account > span {
    max-width: 132px;
    min-height: 28px;
    padding: 7px 0;
    border: 0;
    background: transparent;
    font-size: 0.6rem;
  }

  html.mobile-flight-ui.mobile-side-preview-selector #aircraft-grid {
    grid-column: 1;
    grid-row: 2;
    display: block;
    min-height: 0;
    padding: 5px;
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: 10px;
    background: rgba(4, 15, 24, 0.9);
  }

  html.mobile-flight-ui.mobile-side-preview-selector .aircraft-group,
  html.mobile-flight-ui.mobile-side-preview-selector .aircraft-group-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 0;
  }

  html.mobile-flight-ui.mobile-side-preview-selector .aircraft-group-header,
  html.mobile-flight-ui.mobile-side-preview-selector .aircraft-card-preview,
  html.mobile-flight-ui.mobile-side-preview-selector .aircraft-card-stats,
  html.mobile-flight-ui.mobile-side-preview-selector .aircraft-card small,
  html.mobile-flight-ui.mobile-side-preview-selector .aircraft-card .aircraft-status {
    display: none;
  }

  html.mobile-flight-ui.mobile-side-preview-selector .aircraft-card {
    min-height: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    padding: 7px 8px;
    border-radius: 7px;
  }

  html.mobile-flight-ui.mobile-side-preview-selector .aircraft-card strong {
    display: block;
    overflow: hidden;
    font-size: 0.64rem;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html.mobile-flight-ui.mobile-side-preview-selector #aircraft-detail {
    grid-column: 2;
    grid-row: 2;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 6px;
    padding: 7px;
    overflow: hidden;
    border: 1px solid rgba(150, 176, 194, 0.26);
    border-radius: 10px;
    background: rgba(5, 18, 28, 0.92);
  }

  html.mobile-flight-ui.mobile-side-preview-selector #aircraft-detail-visual {
    min-height: 0;
    display: block;
    border-radius: 8px;
  }

  html.mobile-flight-ui.mobile-side-preview-selector .hangar-stage-header {
    left: 9px;
    top: 8px;
  }

  html.mobile-flight-ui.mobile-side-preview-selector .hangar-stage-header .eyebrow {
    display: block;
    font-size: 0.5rem;
  }

  html.mobile-flight-ui.mobile-side-preview-selector .hangar-stage-bay {
    padding: 3px 5px;
    font-size: 0.48rem;
  }

  html.mobile-flight-ui.mobile-side-preview-selector #aircraft-preview {
    display: block;
    min-height: 0;
  }

  html.mobile-flight-ui.mobile-side-preview-selector .hangar-stage-readout {
    left: 9px;
    right: 9px;
    bottom: 7px;
    gap: 5px;
    padding-top: 5px;
    font-size: 0.45rem;
  }

  html.mobile-flight-ui.mobile-side-preview-selector .hangar-stage-readout strong {
    font-size: 0.57rem;
  }

  html.mobile-flight-ui.mobile-side-preview-selector #aircraft-detail .aircraft-detail-copy {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(148px, 0.92fr);
    align-items: center;
    gap: 7px;
    padding: 0;
  }

  html.mobile-flight-ui.mobile-side-preview-selector #aircraft-detail h2 {
    display: block;
    margin: 0;
    overflow: hidden;
    font-size: 0.78rem;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html.mobile-flight-ui.mobile-side-preview-selector #selected-aircraft-role,
  html.mobile-flight-ui.mobile-side-preview-selector #selected-aircraft-status,
  html.mobile-flight-ui.mobile-side-preview-selector #select-message,
  html.mobile-flight-ui.mobile-side-preview-selector .aircraft-capability-grid {
    display: none;
  }

  html.mobile-flight-ui.mobile-side-preview-selector #aircraft-detail .button-row {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    margin: 0;
  }

  html.mobile-flight-ui.mobile-side-preview-selector #aircraft-detail .button-row button {
    min-height: 44px;
    padding: 4px 5px;
    grid-template-columns: auto;
    grid-template-rows: auto auto;
    gap: 1px;
    font-size: 0;
  }

  html.mobile-flight-ui.mobile-side-preview-selector #aircraft-detail .select-action-icon {
    grid-row: auto;
    width: 14px;
    height: 14px;
  }

  html.mobile-flight-ui.mobile-side-preview-selector #aircraft-detail .select-action-label {
    font-size: 0.52rem;
    line-height: 1;
  }

  html.mobile-flight-ui.mobile-side-preview-selector #aircraft-detail .select-action-card small {
    display: none;
  }
}

/* Flight operations -------------------------------------------------------
   The route planner is a short pre-flight surface, deliberately isolated
   from the live HUD so it cannot compete with the 3D playfield. */
#aircraft-detail .flight-ops-summary {
  width: 100%;
  min-height: 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 10px;
  row-gap: 2px;
  padding: 8px 10px;
  overflow: hidden;
  border: 1px solid rgba(133, 239, 255, 0.24);
  border-radius: var(--hfs-radius-control);
  color: var(--hfs-text-1);
  background:
    linear-gradient(90deg, rgba(45, 184, 208, 0.12), rgba(9, 25, 36, 0.52));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
  text-align: left;
}

#aircraft-detail .flight-ops-summary:hover,
#aircraft-detail .flight-ops-summary[aria-expanded="true"] {
  border-color: rgba(133, 239, 255, 0.54);
  background:
    linear-gradient(90deg, rgba(45, 184, 208, 0.2), rgba(9, 25, 36, 0.74));
}

.flight-ops-summary-kicker {
  grid-column: 1;
  min-width: 0;
  color: var(--hfs-info);
  font-size: 0.56rem;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#flight-ops-summary {
  grid-column: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--hfs-text-1);
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flight-ops-summary svg {
  grid-column: 2;
  grid-row: 1 / -1;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--hfs-info);
}

#select-screen > #flight-ops-modal {
  position: absolute;
  inset: 0;
  z-index: 48;
}

#flight-ops-scrim {
  position: absolute;
  inset: 0;
  background: rgba(2, 8, 13, 0.74);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

#flight-ops-dialog {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(620px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 28px));
  max-height: min(760px, calc(100svh - 28px));
  display: grid;
  gap: 14px;
  padding: 20px;
  overflow: auto;
  transform: translate(-50%, -50%);
  border-color: rgba(133, 239, 255, 0.26);
  border-radius: var(--hfs-radius-panel);
  background: rgba(5, 18, 28, 0.98);
}

#flight-ops-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hfs-border-soft);
}

#flight-ops-header h2 {
  margin: 0;
  font-size: clamp(1.25rem, 2.8vw, 1.85rem);
}

#flight-ops-close-button {
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
}

.flight-ops-intro,
.flight-ops-offline-note {
  margin: 0;
  color: var(--hfs-text-2);
  font-size: 0.86rem;
  line-height: 1.45;
}

.flight-ops-route {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border-left: 2px solid var(--hfs-flight);
  background: rgba(45, 184, 208, 0.08);
}

.flight-ops-route > span,
.flight-ops-field > span {
  color: var(--hfs-text-muted);
  font-size: 0.64rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.flight-ops-route strong {
  overflow: hidden;
  color: var(--hfs-text-1);
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flight-ops-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.flight-ops-field {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.flight-ops-field select {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border-radius: var(--hfs-radius-control);
}

#flight-ops-status {
  min-height: 1.25em;
  margin: -2px 0 0;
  color: var(--hfs-success);
}

.flight-ops-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 2px;
}

.flight-ops-actions button {
  min-width: 178px;
  min-height: 48px;
}

html.mobile-flight-ui #flight-ops-dialog {
  width: min(420px, calc(100vw - var(--safe-left) - var(--safe-right) - 20px));
  max-height: calc(100vh - var(--safe-top) - var(--safe-bottom) - 20px);
  max-height: calc(100svh - var(--safe-top) - var(--safe-bottom) - 20px);
  padding: 15px;
  border-radius: 10px;
}

html.mobile-flight-ui #flight-ops-header h2 {
  font-size: 1.08rem;
}

html.mobile-flight-ui .flight-ops-intro,
html.mobile-flight-ui .flight-ops-offline-note {
  font-size: 0.76rem;
}

html.mobile-flight-ui .flight-ops-route {
  padding: 10px 11px;
}

html.mobile-flight-ui .flight-ops-route strong {
  font-size: 0.76rem;
}

html.mobile-flight-ui .flight-ops-field select {
  min-height: 44px;
  font-size: 0.78rem;
}

@media (max-width: 700px) and (max-height: 430px) and (orientation: landscape) {
  #select-screen #aircraft-detail .aircraft-detail-copy {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    grid-template-rows: auto minmax(44px, 1fr);
  }

  #select-screen #aircraft-detail h2 {
    grid-column: 1;
    grid-row: 1;
  }

  #select-screen #flight-ops-button {
    grid-column: 2;
    grid-row: 1;
    min-height: 28px;
    padding: 4px 6px;
    border-radius: 6px;
  }

  #select-screen .flight-ops-summary-kicker,
  #select-screen .flight-ops-summary svg {
    display: none;
  }

  #select-screen #flight-ops-summary {
    font-size: 0.54rem;
  }

  #select-screen #aircraft-detail .button-row {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  #flight-ops-dialog {
    width: min(560px, calc(100vw - 24px));
    max-height: calc(100vh - 16px);
    max-height: calc(100svh - 16px);
    gap: 8px;
    padding: 12px;
  }

  #flight-ops-header {
    padding-bottom: 7px;
  }

  #flight-ops-header .eyebrow,
  .flight-ops-intro,
  .flight-ops-offline-note {
    display: none;
  }

  .flight-ops-route {
    padding: 7px 9px;
  }

  .flight-ops-fields {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
  }

  .flight-ops-field {
    gap: 3px;
  }

  .flight-ops-field > span {
    overflow: hidden;
    font-size: 0.48rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .flight-ops-field select {
    min-height: 36px;
    padding: 0 5px;
    font-size: 0.62rem;
  }

  #flight-ops-status {
    min-height: 0;
    margin: 0;
    font-size: 0.62rem;
  }

  .flight-ops-actions button {
    min-width: 142px;
    min-height: 40px;
  }
}

/* Core-loop multiplayer recovery ----------------------------------------- */

#connection-notice {
  position: absolute;
  right: max(16px, calc(var(--safe-right) + 12px));
  top: max(176px, calc(var(--safe-top) + 172px));
  z-index: 7;
  width: min(316px, calc(100vw - var(--safe-left) - var(--safe-right) - 32px));
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--hfs-border);
  border-radius: var(--hfs-radius-control);
  color: var(--hfs-text-1);
  background: rgba(8, 24, 36, 0.96);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}

#connection-notice[data-phase="connecting"] {
  border-color: rgba(120, 199, 255, 0.48);
}

#connection-notice[data-phase="recoverable"] {
  border-color: rgba(255, 180, 84, 0.52);
}

.connection-notice-copy {
  display: grid;
  gap: 3px;
}

.connection-notice-copy > span {
  color: var(--hfs-text-muted);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.connection-notice-copy strong {
  color: var(--hfs-info);
  font-size: 0.82rem;
}

#connection-notice[data-phase="recoverable"] .connection-notice-copy strong {
  color: var(--hfs-warning);
}

.connection-notice-copy p {
  margin: 0;
  color: var(--hfs-text-2);
  font-size: 0.74rem;
  line-height: 1.35;
}

.connection-notice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.connection-notice-actions button {
  min-height: 44px;
  flex: 1 1 132px;
  padding: 0 12px;
  border-radius: var(--hfs-radius-sm);
}

#game-screen.mobile-controls-enabled #connection-notice {
  right: max(10px, calc(var(--safe-right) + 8px));
  top: max(122px, calc(var(--safe-top) + 118px));
  width: min(278px, calc(100vw - var(--safe-left) - var(--safe-right) - 20px));
  gap: 8px;
  padding: 10px;
}

#game-screen.mobile-controls-enabled .connection-notice-copy p {
  font-size: 0.68rem;
}

#game-screen.mobile-controls-enabled .connection-notice-actions {
  gap: 6px;
}

#game-screen.mobile-controls-enabled .connection-notice-actions button {
  min-height: 44px;
  flex-basis: 112px;
  font-size: 0.72rem;
}

/* P2 avionics: detailed data stays behind FULL, while COMPACT retains the
   four primary flight readings and an unobstructed runway view. */
#hud-strip .hud-metric-advanced {
  display: none;
}

#hud-strip .hud-metric[data-system="vertical-speed"] strong.engaged,
#hud-strip .hud-metric[data-system="engine"] strong.engaged {
  color: var(--hfs-flight);
}

#hud-strip .hud-metric[data-system="brake"] strong.engaged,
#hud-strip .hud-metric[data-system="spoiler"] strong.engaged {
  color: var(--hfs-warning);
}

#hud-strip .hud-metric strong.disabled {
  color: var(--hfs-text-muted);
  opacity: 0.72;
}

#game-screen:not(.mobile-controls-enabled).hud-mode-full #hud {
  width: min(568px, calc(100vw - 48px));
  height: 244px;
}

#game-screen:not(.mobile-controls-enabled).hud-mode-full #hud #attitude-card {
  flex-basis: 208px;
  height: 244px;
}

#game-screen:not(.mobile-controls-enabled).hud-mode-full #hud #hud-strip {
  height: 244px;
}

#game-screen:not(.mobile-controls-enabled).hud-mode-full #hud-strip .hud-data-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
  gap: 4px 8px;
}

#game-screen:not(.mobile-controls-enabled).hud-mode-full #hud-strip .hud-metric,
#game-screen:not(.mobile-controls-enabled).hud-mode-full #hud-strip .hud-metric-primary,
#game-screen:not(.mobile-controls-enabled).hud-mode-full #hud-strip .hud-metric-advanced {
  min-height: 30px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 3px 5px;
}

#game-screen:not(.mobile-controls-enabled).hud-mode-full #hud-strip .hud-metric strong {
  font-size: 0.76rem;
}

#game-screen:not(.mobile-controls-enabled).hud-mode-full #hud-strip .hud-metric span {
  font-size: 0.56rem;
}

#game-screen:not(.mobile-controls-enabled).hud-mode-full #hud-strip .hud-lever-bank {
  display: none;
}

#game-screen.mobile-controls-enabled #hud-strip .hud-metric-advanced {
  display: none;
}

#game-screen.mobile-controls-enabled.hud-mode-full #hud-strip .hud-metric-advanced {
  display: grid;
}

#game-screen.mobile-controls-enabled.hud-mode-full #hud-strip .hud-metric-primary,
#game-screen.mobile-controls-enabled.hud-mode-full #hud-strip .hud-metric-network {
  display: none !important;
}

#game-screen.mobile-controls-enabled.hud-mode-full #hud-strip .hud-data-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
}

/* Annunciators are short stateful cues, not modal error surfaces. The DOM is
   updated only on a state change, so assistive technology does not repeat a
   warning every render frame. */
#annunciator .annunciator-stack {
  width: 100%;
  display: grid;
  gap: 4px;
}

#annunciator .annunciator-item {
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 7px;
}

#annunciator .annunciator-item strong {
  flex: 0 0 auto;
  color: var(--hfs-success);
}

#annunciator .annunciator-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#annunciator .annunciator-item-warning strong {
  color: var(--hfs-warning);
}

#annunciator .annunciator-item-danger strong {
  color: var(--hfs-danger);
}

#annunciator[data-alert-count="2"],
#annunciator[data-alert-count="3"] {
  min-width: 238px;
}

#game-screen.mobile-controls-enabled #annunciator .annunciator-stack {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  overflow: hidden;
}

#game-screen.mobile-controls-enabled #annunciator .annunciator-item {
  min-width: 0;
  gap: 0;
}

#game-screen.mobile-controls-enabled #annunciator .annunciator-item span,
#game-screen.mobile-controls-enabled #annunciator .annunciator-item:nth-child(n + 3) {
  display: none;
}

#game-screen.mobile-controls-enabled #annunciator[data-alert-count="2"],
#game-screen.mobile-controls-enabled #annunciator[data-alert-count="3"] {
  min-width: 0;
}

/* Final precedence for a 667 × 375-class hangar.  This deliberately follows
   the legacy mobile selectors above: a layout decision may not depend on a
   user-agent-derived class when CSS already knows the physical viewport. */
@media (max-width: 700px) and (max-height: 430px) and (orientation: landscape) {
  #select-screen,
  html.mobile-flight-ui #select-screen,
  html.mobile-flight-ui.mobile-side-preview-selector #select-screen {
    grid-template-columns: minmax(138px, 156px) minmax(0, 1fr);
    grid-template-rows: 36px minmax(0, 1fr);
    gap: 6px;
    padding:
      max(8px, calc(var(--safe-top) + 4px))
      max(10px, calc(var(--safe-right) + 8px))
      max(8px, calc(var(--safe-bottom) + 4px))
      max(10px, calc(var(--safe-left) + 8px));
  }

  .hangar-environment {
    background:
      linear-gradient(90deg, rgba(3, 12, 20, 0.84), rgba(3, 12, 20, 0.42) 60%, rgba(3, 12, 20, 0.78)),
      linear-gradient(180deg, rgba(3, 12, 20, 0.2), rgba(3, 12, 20, 0.78)),
      url("https://hamfs-assets.743.world/releases/r20261031-1514/assets/ui/hangar-operations-mobile-v1.png") center center / cover no-repeat,
      url("https://hamfs-assets.743.world/releases/r20261031-1514/assets/ui/hangar-operations-bg-v1.png") center center / cover no-repeat;
  }

  #select-header,
  html.mobile-flight-ui #select-header,
  html.mobile-flight-ui.mobile-side-preview-selector #select-header {
    grid-column: 1 / -1;
    grid-row: 1;
    min-height: 36px;
    align-items: center;
    padding: 0;
  }

  #select-header::after,
  #select-header .eyebrow,
  .select-account .account-action {
    display: none;
  }

  #select-header h1 {
    margin: 0;
    font-size: clamp(0.96rem, 4.2vh, 1.16rem);
    line-height: 1;
    white-space: nowrap;
  }

  .select-account {
    margin-left: auto;
  }

  .select-account > span {
    max-width: 136px;
    min-height: 28px;
    padding: 7px 0;
    border: 0;
    background: transparent;
    font-size: 0.6rem;
  }

  #aircraft-grid,
  #aircraft-grid.aircraft-flat-row,
  html.mobile-flight-ui #aircraft-grid,
  html.mobile-flight-ui #aircraft-grid.aircraft-flat-row,
  html.mobile-flight-ui.mobile-side-preview-selector #aircraft-grid {
    grid-column: 1;
    grid-row: 2;
    display: block;
    min-height: 0;
    padding: 5px;
    overflow-x: hidden;
    overflow-y: auto;
    border-radius: 10px;
    background: rgba(4, 15, 24, 0.9);
  }

  #select-screen #aircraft-grid .aircraft-group,
  #select-screen #aircraft-grid .aircraft-group-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 0;
  }

  #select-screen #aircraft-grid .aircraft-group-header,
  #select-screen #aircraft-grid .aircraft-card-preview,
  #select-screen #aircraft-grid .aircraft-card-stats,
  #select-screen #aircraft-grid .aircraft-card small,
  #select-screen #aircraft-grid .aircraft-card .aircraft-status {
    display: none;
  }

  #select-screen #aircraft-grid .aircraft-card {
    min-height: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    width: 100%;
    padding: 7px 8px;
    border-radius: 7px;
  }

  #select-screen #aircraft-grid .aircraft-card strong {
    display: block;
    overflow: hidden;
    font-size: 0.64rem;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #aircraft-detail,
  html.mobile-flight-ui #aircraft-detail,
  html.mobile-flight-ui.mobile-side-preview-selector #aircraft-detail {
    grid-column: 2;
    grid-row: 2;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) 48px;
    gap: 6px;
    padding: 7px;
    overflow: hidden;
    border: 1px solid rgba(150, 176, 194, 0.26);
    border-radius: 10px;
    background: rgba(5, 18, 28, 0.92);
    box-shadow: none;
  }

  #select-screen #aircraft-detail-visual,
  html.mobile-flight-ui #select-screen #aircraft-detail-visual,
  html.mobile-flight-ui.mobile-side-preview-selector #select-screen #aircraft-detail-visual {
    min-height: 0;
    display: block;
    border-radius: 8px;
  }

  #select-screen #aircraft-preview,
  html.mobile-flight-ui #select-screen #aircraft-preview,
  html.mobile-flight-ui.mobile-side-preview-selector #select-screen #aircraft-preview {
    min-height: 0;
    display: block;
    height: 100%;
  }

  .hangar-stage-header {
    left: 9px;
    top: 8px;
  }

  .hangar-stage-header .eyebrow {
    display: block;
    font-size: 0.5rem;
  }

  .hangar-stage-bay {
    padding: 3px 5px;
    font-size: 0.48rem;
  }

  .hangar-stage-readout {
    left: 9px;
    right: 9px;
    bottom: 7px;
    gap: 5px;
    padding-top: 5px;
    font-size: 0.45rem;
  }

  .hangar-stage-readout strong {
    font-size: 0.57rem;
  }

  #select-screen #aircraft-detail .aircraft-detail-copy,
  html.mobile-flight-ui #select-screen #aircraft-detail .aircraft-detail-copy,
  html.mobile-flight-ui.mobile-side-preview-selector #select-screen #aircraft-detail .aircraft-detail-copy {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(150px, 0.86fr);
    align-items: center;
    gap: 7px;
    padding: 0;
  }

  #select-screen #aircraft-detail h2 {
    display: block;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    font-size: 0.78rem;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #select-screen #selected-aircraft-role,
  #select-screen #selected-aircraft-status,
  #select-screen #select-message,
  #select-screen #aircraft-detail .aircraft-capability-grid {
    display: none;
  }

  #select-screen #aircraft-detail .button-row {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    margin: 0;
  }

  #select-screen #aircraft-detail .button-row button {
    min-height: 44px;
    padding: 4px 5px;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: 1fr;
    gap: 4px;
    font-size: 0;
  }

  #select-screen #aircraft-detail .select-action-icon {
    grid-row: auto;
    width: 14px;
    height: 14px;
  }

  #select-screen #aircraft-detail .select-action-label {
    overflow: hidden;
    font-size: 0.52rem;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #select-screen #aircraft-detail .select-action-card small {
    display: none;
  }
}

/* Narrow landscape must not rely on the JavaScript mobile-class heuristic.
   WKWebView and desktop responsive previews can have the same 667 × 375
   working area, so this final rule makes the operational hangar legible based
   on viewport geometry alone.  The stage remains visible: pilots can compare
   the actual aircraft while retaining a compact, scrollable fleet rail. */
@media (max-width: 700px) and (max-height: 430px) and (orientation: landscape) {
  #select-screen,
  html.mobile-flight-ui #select-screen,
  html.mobile-flight-ui.mobile-side-preview-selector #select-screen {
    grid-template-columns: minmax(138px, 156px) minmax(0, 1fr);
    grid-template-rows: 36px minmax(0, 1fr);
    gap: 6px;
    padding:
      max(8px, calc(var(--safe-top) + 4px))
      max(10px, calc(var(--safe-right) + 8px))
      max(8px, calc(var(--safe-bottom) + 4px))
      max(10px, calc(var(--safe-left) + 8px));
  }

  .hangar-environment {
    background:
      linear-gradient(90deg, rgba(3, 12, 20, 0.84), rgba(3, 12, 20, 0.42) 60%, rgba(3, 12, 20, 0.78)),
      linear-gradient(180deg, rgba(3, 12, 20, 0.2), rgba(3, 12, 20, 0.78)),
      url("https://hamfs-assets.743.world/releases/r20261031-1514/assets/ui/hangar-operations-mobile-v1.png") center center / cover no-repeat,
      url("https://hamfs-assets.743.world/releases/r20261031-1514/assets/ui/hangar-operations-bg-v1.png") center center / cover no-repeat;
  }

  #select-header,
  html.mobile-flight-ui #select-header,
  html.mobile-flight-ui.mobile-side-preview-selector #select-header {
    grid-column: 1 / -1;
    grid-row: 1;
    min-height: 36px;
    align-items: center;
    padding: 0;
  }

  #select-header::after,
  #select-header .eyebrow,
  .select-account .account-action {
    display: none;
  }

  #select-header > div:first-child {
    min-width: 0;
  }

  #select-header h1,
  html.mobile-flight-ui #select-header h1,
  html.mobile-flight-ui.mobile-side-preview-selector #select-header h1 {
    margin: 0;
    font-size: clamp(0.96rem, 4.2vh, 1.16rem);
    line-height: 1;
    white-space: nowrap;
  }

  .select-account {
    margin-left: auto;
  }

  .select-account > span {
    max-width: 136px;
    min-height: 28px;
    padding: 7px 0;
    border: 0;
    background: transparent;
    font-size: 0.6rem;
  }

  #aircraft-grid,
  #aircraft-grid.aircraft-flat-row,
  html.mobile-flight-ui #aircraft-grid,
  html.mobile-flight-ui #aircraft-grid.aircraft-flat-row,
  html.mobile-flight-ui.mobile-side-preview-selector #aircraft-grid {
    grid-column: 1;
    grid-row: 2;
    display: block;
    min-height: 0;
    padding: 5px;
    overflow-x: hidden;
    overflow-y: auto;
    border-radius: 10px;
    background: rgba(4, 15, 24, 0.9);
  }

  #select-screen #aircraft-grid .aircraft-group,
  #select-screen #aircraft-grid .aircraft-group-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 0;
  }

  #select-screen #aircraft-grid .aircraft-group-header,
  #select-screen #aircraft-grid .aircraft-card-preview,
  #select-screen #aircraft-grid .aircraft-card-stats,
  #select-screen #aircraft-grid .aircraft-card small,
  #select-screen #aircraft-grid .aircraft-card .aircraft-status {
    display: none;
  }

  #select-screen #aircraft-grid .aircraft-card {
    min-height: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    width: 100%;
    padding: 7px 8px;
    border-radius: 7px;
  }

  #select-screen #aircraft-grid .aircraft-card strong {
    display: block;
    overflow: hidden;
    font-size: 0.64rem;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #aircraft-detail,
  html.mobile-flight-ui #aircraft-detail,
  html.mobile-flight-ui.mobile-side-preview-selector #aircraft-detail {
    grid-column: 2;
    grid-row: 2;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) 48px;
    gap: 6px;
    padding: 7px;
    overflow: hidden;
    border: 1px solid rgba(150, 176, 194, 0.26);
    border-radius: 10px;
    background: rgba(5, 18, 28, 0.92);
    box-shadow: none;
  }

  #select-screen #aircraft-detail-visual,
  html.mobile-flight-ui #select-screen #aircraft-detail-visual,
  html.mobile-flight-ui.mobile-side-preview-selector #select-screen #aircraft-detail-visual {
    min-height: 0;
    display: block;
    border-radius: 8px;
  }

  #select-screen #aircraft-preview,
  html.mobile-flight-ui #select-screen #aircraft-preview,
  html.mobile-flight-ui.mobile-side-preview-selector #select-screen #aircraft-preview {
    min-height: 0;
    display: block;
    height: 100%;
  }

  .hangar-stage-header {
    left: 9px;
    top: 8px;
  }

  .hangar-stage-header .eyebrow {
    display: block;
    font-size: 0.5rem;
  }

  .hangar-stage-bay {
    padding: 3px 5px;
    font-size: 0.48rem;
  }

  .hangar-stage-readout {
    left: 9px;
    right: 9px;
    bottom: 7px;
    gap: 5px;
    padding-top: 5px;
    font-size: 0.45rem;
  }

  .hangar-stage-readout strong {
    font-size: 0.57rem;
  }

  #select-screen #aircraft-detail .aircraft-detail-copy,
  html.mobile-flight-ui #select-screen #aircraft-detail .aircraft-detail-copy,
  html.mobile-flight-ui.mobile-side-preview-selector #select-screen #aircraft-detail .aircraft-detail-copy {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(150px, 0.86fr);
    align-items: center;
    gap: 7px;
    padding: 0;
  }

  #select-screen #aircraft-detail h2 {
    display: block;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    font-size: 0.78rem;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #select-screen #selected-aircraft-role,
  #select-screen #selected-aircraft-status,
  #select-screen #select-message,
  #select-screen #aircraft-detail .aircraft-capability-grid {
    display: none;
  }

  #select-screen #aircraft-detail .button-row {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    margin: 0;
  }

  #select-screen #aircraft-detail .button-row button {
    min-height: 44px;
    padding: 4px 5px;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: 1fr;
    gap: 4px;
    font-size: 0;
  }

  #select-screen #aircraft-detail .select-action-icon {
    grid-row: auto;
    width: 14px;
    height: 14px;
  }

  #select-screen #aircraft-detail .select-action-label {
    overflow: hidden;
    font-size: 0.52rem;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #select-screen #aircraft-detail .select-action-card small {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Precision Runway UI foundation

   Shared professional-flight visual language for the Web client and bundled
   WKWebView route.  It deliberately keeps the live scene dominant, assigns
   colors semantic roles, and treats offline flight as a normal operating
   mode.  Keep these tokens aligned with the native UIKit HFS theme.
   -------------------------------------------------------------------------- */

:root {
  --hfs-canvas: #061019;
  --hfs-surface-1: rgba(8, 24, 36, 0.9);
  --hfs-surface-2: #102636;
  --hfs-surface-pressed: #16384a;
  --hfs-border: rgba(150, 176, 194, 0.32);
  --hfs-border-soft: rgba(150, 176, 194, 0.18);
  --hfs-text-1: #f4f8fb;
  --hfs-text-2: #b5c1ca;
  --hfs-text-muted: #7e909e;
  --hfs-brand: #f2b84b;
  --hfs-flight: #2db8d0;
  --hfs-success: #53d6aa;
  --hfs-info: #78c7ff;
  --hfs-warning: #ffb454;
  --hfs-danger: #ff6574;
  --hfs-scrim: rgba(3, 9, 14, 0.72);
  --hfs-radius-sm: 8px;
  --hfs-radius-control: 12px;
  --hfs-radius-panel: 16px;
  --hfs-touch-min: 48px;

  /* Backwards-compatible aliases while components migrate to semantic names. */
  --ink: var(--hfs-canvas);
  --panel: var(--hfs-surface-1);
  --panel-strong: rgba(5, 16, 25, 0.96);
  --line: var(--hfs-border-soft);
  --text: var(--hfs-text-1);
  --muted: var(--hfs-text-2);
  --accent: var(--hfs-brand);
  --accent-2: var(--hfs-flight);
  --danger: var(--hfs-danger);

  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Segoe UI", sans-serif;
}

.panel,
.hud-panel,
button,
.link-button,
#minimap,
#annunciator,
#chat-form,
.aircraft-card,
.aircraft-status,
.room-chip {
  clip-path: none;
}

.panel,
.hud-panel {
  border: 1px solid var(--hfs-border);
  border-radius: var(--hfs-radius-panel);
  background: var(--hfs-surface-1);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
}

.panel::before,
.hud-panel::before,
button::after {
  display: none;
}

button,
.link-button,
input,
select,
.toggle-row,
.range-row,
.aircraft-card,
.server-node-card {
  border-radius: var(--hfs-radius-control);
}

button,
.link-button {
  min-height: 44px;
  border-color: var(--hfs-border);
  color: var(--hfs-text-1);
  background: rgba(16, 38, 54, 0.9);
  box-shadow: none;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: none;
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease, transform 120ms ease;
}

button:hover,
.link-button:hover {
  border-color: rgba(183, 207, 222, 0.56);
  background: rgba(22, 56, 74, 0.94);
  box-shadow: none;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
.link-button:focus-visible {
  outline: 2px solid var(--hfs-flight);
  outline-offset: 3px;
}

button.active,
button.primary,
.link-button.primary-link {
  border-color: rgba(45, 184, 208, 0.88);
  color: #061019;
  background: var(--hfs-flight);
  font-weight: 800;
}

button.active:hover,
button.primary:hover {
  background: #54c8da;
}

button.ghost {
  color: var(--hfs-text-1);
  background: rgba(16, 38, 54, 0.58);
}

.eyebrow,
.settings-label,
.hud-label,
.auth-feature-label {
  color: var(--hfs-brand);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2 {
  line-height: 1.04;
  letter-spacing: -0.025em;
}

.message,
.brief {
  color: var(--hfs-text-2);
}

.status-chip {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--hfs-border);
  border-radius: 999px;
  color: var(--hfs-text-1);
  background: rgba(8, 24, 36, 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-chip-local {
  border-color: rgba(120, 199, 255, 0.34);
  color: var(--hfs-info);
}

/* Launch / local identity -------------------------------------------------- */

#auth-screen {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 390px);
  gap: clamp(36px, 7vw, 110px);
  padding:
    max(32px, calc(var(--safe-top) + 24px))
    max(42px, calc(var(--safe-right) + 28px))
    max(32px, calc(var(--safe-bottom) + 24px))
    max(42px, calc(var(--safe-left) + 28px));
  background: var(--hfs-canvas);
}

.auth-backdrop {
  background:
    linear-gradient(90deg, rgba(4, 13, 21, 0.9) 0%, rgba(4, 13, 21, 0.54) 46%, rgba(4, 13, 21, 0.76) 100%),
    linear-gradient(180deg, rgba(4, 13, 21, 0.2), rgba(4, 13, 21, 0.72)),
    url("https://hamfs-assets.743.world/releases/r20261031-1514/assets/ui/auth-runway-hero.jpg") center center / cover no-repeat;
  filter: saturate(0.82) contrast(1.04);
}

#auth-screen::before,
#auth-screen::after {
  opacity: 0.22;
}

.auth-copy {
  align-self: center;
  gap: 14px;
  max-width: 720px;
  padding-bottom: 0;
}

.auth-copy h1 {
  max-width: 10ch;
  font-size: clamp(3rem, 6.6vw, 5.25rem);
  font-weight: 720;
  line-height: 0.94;
  letter-spacing: -0.055em;
  text-shadow: 0 14px 44px rgba(0, 0, 0, 0.42);
}

.auth-copy p:not(.eyebrow) {
  max-width: 43ch;
  color: var(--hfs-text-2);
  font-size: clamp(1rem, 1.7vw, 1.16rem);
}

.auth-meta-row,
.auth-feature-grid,
.auth-briefing {
  display: none;
}

#auth-panel {
  width: min(390px, calc(100vw - 32px));
  padding: 24px;
  border-color: rgba(150, 176, 194, 0.38);
  border-radius: var(--hfs-radius-panel);
  background: rgba(6, 22, 33, 0.94);
}

.auth-panel-heading {
  display: grid;
  gap: 14px;
  padding-bottom: 4px;
}

.auth-panel-heading .status-chip {
  justify-self: start;
}

.auth-panel-heading .eyebrow {
  margin-bottom: 5px;
}

.auth-panel-heading h2 {
  font-size: 1.55rem;
}

.auth-connection-note {
  margin: 0;
  color: var(--hfs-text-2);
  font-size: 0.85rem;
  line-height: 1.45;
}

.language-toggle {
  padding: 4px;
  border: 1px solid var(--hfs-border-soft);
  border-radius: var(--hfs-radius-control);
  background: rgba(255, 255, 255, 0.03);
}

.language-toggle button {
  min-height: 40px;
  border: 0;
  background: transparent;
}

.language-toggle button.active {
  color: #061019;
  background: var(--hfs-flight);
}

input,
select,
textarea {
  border-color: var(--hfs-border);
  color: var(--hfs-text-1);
  background: rgba(3, 13, 21, 0.78);
}

#auth-submit {
  min-height: 52px;
}

/* Hangar ------------------------------------------------------------------ */

#select-screen {
  --select-pad: clamp(18px, 2.4vw, 30px);
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) 150px;
  gap: 14px;
  background:
    linear-gradient(180deg, rgba(4, 13, 21, 0.86), rgba(4, 13, 21, 0.72)),
    url("https://hamfs-assets.743.world/releases/r20261031-1514/assets/ui/auth-runway-hero.jpg") center 58% / cover no-repeat;
}

#select-screen::before,
#select-screen::after {
  opacity: 0.18;
}

#select-header {
  grid-column: 1;
  grid-row: 1;
  align-items: center;
  padding-bottom: 12px;
  border-color: var(--hfs-border-soft);
}

#select-header h1 {
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  font-weight: 680;
}

.select-account span {
  font-weight: 650;
}

.select-account .account-action {
  min-width: 44px;
  min-height: 44px;
}

#aircraft-detail {
  grid-column: 1;
  grid-row: 2;
  align-self: stretch;
  justify-self: stretch;
  width: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 370px);
  gap: 18px;
  padding: 18px;
  overflow: hidden;
  border-radius: var(--hfs-radius-panel);
  background: rgba(4, 16, 25, 0.82);
}

.aircraft-detail-visual {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
}

#aircraft-preview {
  height: 100%;
  min-height: 220px;
  border-color: var(--hfs-border-soft);
  border-radius: var(--hfs-radius-control);
  background:
    radial-gradient(circle at 50% 42%, rgba(45, 184, 208, 0.13), transparent 48%),
    linear-gradient(180deg, rgba(14, 36, 51, 0.72), rgba(3, 12, 20, 0.5));
}

.aircraft-detail-copy {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 8px 6px 8px 0;
}

#aircraft-detail h2 {
  font-size: clamp(1.75rem, 3vw, 2.65rem);
  font-weight: 700;
}

#selected-aircraft-role {
  display: block;
  max-width: none;
  margin: -4px 0 0;
  color: var(--hfs-text-2);
}

.aircraft-capability-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.aircraft-capability-grid > div {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--hfs-border-soft);
  border-radius: var(--hfs-radius-sm);
  background: rgba(16, 38, 54, 0.48);
}

.aircraft-capability-grid span {
  color: var(--hfs-text-muted);
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.aircraft-capability-grid strong {
  min-width: 0;
  overflow: hidden;
  color: var(--hfs-text-1);
  font-size: 0.8rem;
  line-height: 1.2;
  text-overflow: ellipsis;
}

#aircraft-detail .button-row {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 10px;
}

#aircraft-detail .select-action-card {
  min-height: 58px;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  justify-items: start;
  padding: 10px 14px;
  text-align: left;
}

#aircraft-detail .select-action-icon {
  grid-row: 1 / -1;
}

#aircraft-grid {
  grid-column: 1;
  grid-row: 3;
  align-self: stretch;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(160px, 14vw, 196px);
  gap: 10px;
  padding: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  border-color: var(--hfs-border-soft);
  border-radius: var(--hfs-radius-panel);
  background: rgba(4, 16, 25, 0.78);
  scroll-snap-type: x proximity;
}

#aircraft-grid .aircraft-group,
#aircraft-grid .aircraft-group-grid {
  display: contents;
}

#aircraft-grid .aircraft-group-header {
  display: none;
}

#aircraft-grid .aircraft-card {
  min-width: 0;
  min-height: 0;
  height: 128px;
  grid-template-rows: minmax(64px, 1fr) auto;
  gap: 6px;
  padding: 8px;
  overflow: hidden;
  border-color: var(--hfs-border-soft);
  border-radius: var(--hfs-radius-control);
  background: rgba(9, 25, 36, 0.86);
  scroll-snap-align: center;
}

#aircraft-grid .aircraft-card:hover {
  transform: none;
  border-color: rgba(150, 176, 194, 0.54);
  background: rgba(16, 38, 54, 0.94);
}

#aircraft-grid .aircraft-card.active {
  border-color: var(--hfs-brand);
  background: rgba(46, 39, 23, 0.76);
  box-shadow: inset 0 0 0 1px rgba(242, 184, 75, 0.32);
}

#aircraft-grid .aircraft-card-preview {
  position: relative;
  min-height: 64px;
  display: block;
  overflow: hidden;
  border-radius: var(--hfs-radius-sm);
  background: rgba(255, 255, 255, 0.025);
}

#aircraft-grid .aircraft-card-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

#aircraft-grid .aircraft-card strong {
  overflow: hidden;
  font-size: 0.78rem;
  font-weight: 720;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#aircraft-grid .aircraft-card small {
  overflow: hidden;
  color: var(--hfs-text-muted);
  font-size: 0.62rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#aircraft-grid .aircraft-card-stats,
#aircraft-grid .aircraft-status {
  display: none;
}

/* Flight HUD -------------------------------------------------------------- */

#settings-button {
  left: max(16px, calc(var(--safe-left) + 12px));
  right: auto;
  top: max(14px, calc(var(--safe-top) + 10px));
  min-width: 108px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 14px;
  border-color: var(--hfs-border);
  border-radius: var(--hfs-radius-control);
  background: var(--hfs-surface-1);
  letter-spacing: 0.02em;
  text-transform: none;
}

.settings-button-label {
  font-size: 0.78rem;
  font-weight: 750;
}

#hud-mode-button {
  left: max(134px, calc(var(--safe-left) + 130px));
  right: auto;
  top: max(14px, calc(var(--safe-top) + 10px));
  min-height: 48px;
  border-color: var(--hfs-border);
  border-radius: var(--hfs-radius-control);
  background: var(--hfs-surface-1);
}

.hud-mode-button-label {
  color: var(--hfs-text-muted);
}

#hud {
  left: 50%;
  top: max(14px, calc(var(--safe-top) + 10px));
  right: auto;
  bottom: auto;
  width: min(520px, calc(100vw - 500px));
  min-width: 360px;
  height: 48px;
  display: block;
  transform: translateX(-50%);
  opacity: 1;
}

#hud #attitude-card {
  display: none;
}

#hud #hud-strip {
  width: 100%;
  min-width: 0;
  height: 48px;
  display: block;
  padding: 5px 8px;
  border-radius: var(--hfs-radius-control);
  background: rgba(8, 24, 36, 0.84);
}

#hud-strip .hud-data-header,
#hud-strip .hud-lever-bank,
#hud-strip .hud-metric-network {
  display: none;
}

#hud-strip .hud-data-grid {
  height: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
}

#hud-strip .hud-metric {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 1px;
  padding: 0 10px;
  border: 0;
  border-left: 1px solid var(--hfs-border-soft);
}

#hud-strip .hud-metric:first-child {
  border-left: 0;
}

#hud-strip .hud-metric span {
  color: var(--hfs-text-muted);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
}

#hud-strip .hud-metric strong {
  overflow: hidden;
  color: var(--hfs-text-1);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#hud-strip #hud-gear-compact:not(.disabled) {
  color: var(--hfs-success);
}

#minimap {
  right: max(16px, calc(var(--safe-right) + 12px));
  top: max(14px, calc(var(--safe-top) + 10px));
  bottom: auto;
  width: 118px;
  height: 118px;
  border-color: var(--hfs-border);
  border-radius: var(--hfs-radius-control);
  background: rgba(8, 24, 36, 0.8);
  opacity: 0.82;
}

#flight-network-chip {
  position: absolute;
  right: max(16px, calc(var(--safe-right) + 12px));
  top: max(140px, calc(var(--safe-top) + 136px));
  z-index: 6;
  min-width: 86px;
  justify-content: center;
  color: var(--hfs-info);
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
}

#flight-network-chip:hover,
#game-screen.multiplayer-drawer-open #flight-network-chip {
  border-color: rgba(120, 199, 255, 0.74);
  background: rgba(15, 47, 65, 0.94);
}

#flight-network-chip:focus-visible {
  outline: 2px solid var(--hfs-flight);
  outline-offset: 3px;
}

#flight-network-chip > span {
  color: var(--hfs-text-muted);
  font-size: 0.56rem;
}

#flight-network-chip.is-live {
  border-color: rgba(83, 214, 170, 0.44);
  color: var(--hfs-success);
}

#flight-network-chip.is-connecting {
  border-color: rgba(120, 199, 255, 0.44);
  color: var(--hfs-info);
}

#flight-network-count {
  min-width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #061019;
  background: var(--hfs-success);
  font-size: 0.62rem;
}

/* Nonblocking multiplayer session drawer -------------------------------- */

.multiplayer-drawer {
  position: absolute;
  right: max(16px, calc(var(--safe-right) + 12px));
  top: max(176px, calc(var(--safe-top) + 172px));
  z-index: 18;
  width: min(352px, calc(100vw - var(--safe-left) - var(--safe-right) - 32px));
  max-height: min(620px, calc(100vh - var(--safe-top) - var(--safe-bottom) - 194px));
  max-height: min(620px, calc(100svh - var(--safe-top) - var(--safe-bottom) - 194px));
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 14px;
  overflow: auto;
  border: 1px solid var(--hfs-border);
  border-radius: var(--hfs-radius-panel);
  color: var(--hfs-text-1);
  background: rgba(5, 18, 28, 0.98);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.36);
  -webkit-overflow-scrolling: touch;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  touch-action: pan-y;
}

.multiplayer-drawer:focus {
  outline: none;
}

.multiplayer-drawer-header,
.multiplayer-section-heading,
.multiplayer-roster-item,
.multiplayer-drawer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.multiplayer-drawer-header {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--hfs-border-soft);
}

.multiplayer-drawer-header .eyebrow,
.multiplayer-section-heading span {
  margin: 0 0 3px;
  color: var(--hfs-text-muted);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.multiplayer-drawer-header h2 {
  margin: 0;
  font-size: 1.08rem;
}

.multiplayer-drawer-header button {
  min-width: 44px;
  min-height: 40px;
}

.multiplayer-session-status {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 9px;
  padding: 10px;
  border: 1px solid var(--hfs-border-soft);
  border-radius: var(--hfs-radius-sm);
  background: rgba(16, 38, 54, 0.42);
}

.multiplayer-session-status > span {
  color: var(--hfs-text-muted);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.09em;
}

.multiplayer-session-status strong {
  color: var(--hfs-info);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
}

.multiplayer-drawer[data-phase="live"] .multiplayer-session-status {
  border-color: rgba(83, 214, 170, 0.42);
}

.multiplayer-drawer[data-phase="live"] .multiplayer-session-status strong {
  color: var(--hfs-success);
}

.multiplayer-drawer[data-phase="connecting"] .multiplayer-session-status {
  border-color: rgba(120, 199, 255, 0.46);
}

.multiplayer-session-status p {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  color: var(--hfs-text-2);
  font-size: 0.73rem;
  line-height: 1.4;
}

.multiplayer-drawer-actions {
  flex-wrap: wrap;
}

.multiplayer-drawer-actions button {
  min-height: 42px;
  flex: 1 1 130px;
  padding: 0 12px;
}

.multiplayer-roster-section {
  display: grid;
  gap: 8px;
  min-height: 0;
  padding-top: 2px;
}

.multiplayer-section-heading {
  align-items: end;
}

.multiplayer-section-heading > div {
  display: grid;
  gap: 0;
}

.multiplayer-section-heading strong {
  color: var(--hfs-text-1);
  font-size: 0.82rem;
}

.multiplayer-section-heading small {
  color: var(--hfs-text-muted);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.58rem;
  font-variant-numeric: tabular-nums;
}

.multiplayer-roster {
  min-height: 42px;
}

.multiplayer-roster-empty {
  margin: 0;
  padding: 12px;
  border: 1px dashed rgba(150, 176, 194, 0.3);
  border-radius: var(--hfs-radius-sm);
  color: var(--hfs-text-muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.multiplayer-roster-list {
  display: grid;
  gap: 7px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.multiplayer-roster-item {
  align-items: stretch;
  padding: 9px 8px 9px 10px;
  border: 1px solid var(--hfs-border-soft);
  border-radius: var(--hfs-radius-sm);
  background: rgba(13, 34, 49, 0.5);
}

.multiplayer-roster-item[data-muted="true"] {
  opacity: 0.7;
}

.multiplayer-roster-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.multiplayer-roster-name {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.multiplayer-roster-name strong {
  min-width: 0;
  overflow: hidden;
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multiplayer-roster-name span {
  flex: 0 0 auto;
  padding: 2px 5px;
  border-radius: 999px;
  color: var(--hfs-warning);
  background: rgba(255, 180, 84, 0.14);
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.multiplayer-roster-copy p {
  margin: 0;
  overflow: hidden;
  color: var(--hfs-text-muted);
  font-size: 0.65rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multiplayer-roster-mute {
  min-width: 66px;
  min-height: 36px;
  align-self: center;
  padding: 0 8px;
  font-size: 0.62rem;
}

.multiplayer-diagnostics {
  padding-top: 10px;
  border-top: 1px solid var(--hfs-border-soft);
}

.multiplayer-diagnostics summary {
  cursor: pointer;
  color: var(--hfs-text-muted);
  font-size: 0.68rem;
}

.multiplayer-diagnostics dl {
  display: grid;
  gap: 7px;
  margin: 10px 0 0;
}

.multiplayer-diagnostics dl > div {
  display: grid;
  grid-template-columns: minmax(86px, 0.7fr) minmax(0, 1.3fr);
  gap: 8px;
}

.multiplayer-diagnostics dt,
.multiplayer-diagnostics dd {
  margin: 0;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.58rem;
  line-height: 1.35;
}

.multiplayer-diagnostics dt {
  color: var(--hfs-text-muted);
}

.multiplayer-diagnostics dd {
  overflow-wrap: anywhere;
  color: var(--hfs-text-2);
}

#annunciator {
  top: max(70px, calc(var(--safe-top) + 66px));
  width: auto;
  min-width: 150px;
  max-width: min(420px, calc(100vw - 380px));
  min-height: 34px;
  padding: 7px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-color: var(--hfs-border-soft);
  border-radius: 999px;
  background: rgba(8, 24, 36, 0.76);
  box-shadow: none;
}

#annunciator strong {
  color: var(--hfs-success);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}

#annunciator span {
  color: var(--hfs-text-2);
  font-size: 0.72rem;
}

#annunciator.standby {
  visibility: hidden;
  opacity: 0;
}

#annunciator.notice,
#annunciator.warning,
#annunciator.danger {
  visibility: visible;
  opacity: 1;
}

#annunciator.warning {
  border-color: rgba(255, 180, 84, 0.48);
}

#annunciator.danger {
  border-color: rgba(255, 101, 116, 0.56);
}

#game-screen:not(.mobile-controls-enabled).hud-mode-full #hud {
  left: max(16px, calc(var(--safe-left) + 12px));
  top: auto;
  bottom: max(16px, calc(var(--safe-bottom) + 12px));
  width: 386px;
  min-width: 0;
  height: 214px;
  display: flex;
  gap: 8px;
  transform: none;
}

#game-screen:not(.mobile-controls-enabled).hud-mode-full #hud #attitude-card {
  flex: 0 0 184px;
  height: 214px;
  display: grid;
  padding: 8px;
  border-radius: var(--hfs-radius-control);
}

#game-screen:not(.mobile-controls-enabled).hud-mode-full #hud #hud-strip {
  flex: 1 1 auto;
  height: 214px;
  display: grid;
  padding: 9px;
}

#game-screen:not(.mobile-controls-enabled).hud-mode-full #hud-strip .hud-data-header,
#game-screen:not(.mobile-controls-enabled).hud-mode-full #hud-strip .hud-lever-bank {
  display: flex;
}

#game-screen:not(.mobile-controls-enabled).hud-mode-full #hud-strip .hud-data-grid {
  height: auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#game-screen:not(.mobile-controls-enabled).hud-mode-full #hud-strip .hud-metric {
  padding: 3px 5px;
}

#game-screen:not(.mobile-controls-enabled).hud-mode-full #hud-strip .hud-metric-network {
  display: grid;
}

#game-screen:not(.mobile-controls-enabled).hud-mode-full #hud-strip .hud-metric-primary,
#game-screen:not(.mobile-controls-enabled).hud-mode-full #hud-strip .hud-lever-bank {
  display: none;
}

#game-screen.hud-mode-hidden #flight-network-chip {
  opacity: 0.46;
}

/* Pause / settings -------------------------------------------------------- */

#settings-scrim {
  background: var(--hfs-scrim);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

#settings-dialog {
  right: max(18px, calc(var(--safe-right) + 14px));
  top: max(18px, calc(var(--safe-top) + 14px));
  bottom: max(18px, calc(var(--safe-bottom) + 14px));
  width: min(460px, calc(100vw - 32px));
  max-height: none;
  padding: 20px;
  border-radius: var(--hfs-radius-panel);
  background: rgba(5, 18, 28, 0.97);
}

#settings-header {
  position: sticky;
  top: -20px;
  z-index: 2;
  margin: -20px -20px 0;
  padding: 20px 20px 14px;
  background: rgba(5, 18, 28, 0.98);
}

#settings-close-button {
  min-width: 44px;
  min-height: 44px;
}

.settings-resume-button {
  min-height: 52px;
}

.settings-section {
  gap: 10px;
  padding-top: 4px;
}

.settings-aircraft-section {
  display: none;
}

.toggle-row,
.range-row,
.keybind-row {
  border-color: var(--hfs-border-soft);
  background: rgba(16, 38, 54, 0.4);
}

.settings-session-actions {
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--hfs-border-soft);
}

.settings-session-actions .settings-label {
  color: var(--hfs-warning);
}

.settings-session-actions .button-row button:first-child {
  border-color: rgba(255, 180, 84, 0.4);
}

#server-node-dialog {
  border-radius: var(--hfs-radius-panel);
  background: rgba(5, 18, 28, 0.98);
}

/* Touch layout ------------------------------------------------------------ */

#game-screen.mobile-controls-enabled #settings-button {
  left: max(10px, calc(var(--safe-left) + 8px));
  top: max(8px, calc(var(--safe-top) + 6px));
  width: 48px;
  min-width: 48px;
  height: 48px;
  min-height: 48px;
  padding: 0;
  border-radius: var(--hfs-radius-control);
  background: rgba(8, 24, 36, 0.78);
}

#game-screen.mobile-controls-enabled #settings-button .settings-button-label {
  display: none;
}

#game-screen.mobile-controls-enabled #hud-mode-button {
  left: max(66px, calc(var(--safe-left) + 64px));
  top: max(8px, calc(var(--safe-top) + 6px));
  height: 48px;
  min-height: 48px;
  border-radius: var(--hfs-radius-control);
  background: rgba(8, 24, 36, 0.72);
}

#mobile-flight-strip,
#game-screen.mobile-controls-enabled #mobile-flight-strip,
#game-screen.mobile-controls-enabled.hud-mode-compact #mobile-flight-strip {
  top: max(8px, calc(var(--safe-top) + 6px));
  width: min(326px, calc(100vw - var(--safe-left) - var(--safe-right) - 190px));
  max-width: none;
  min-height: 38px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0 6px;
  border-color: var(--hfs-border);
  border-radius: var(--hfs-radius-control);
  background: rgba(8, 24, 36, 0.8);
  transform: translateX(-50%);
  opacity: 1;
}

#mobile-flight-strip div {
  min-width: 0;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 0;
  padding: 3px 7px;
}

#mobile-flight-strip span {
  color: var(--hfs-text-muted);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.48rem;
  font-weight: 700;
}

#mobile-flight-strip strong {
  color: var(--hfs-text-1);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
}

#game-screen.mobile-controls-enabled #mobile-flight-strip > :nth-child(3),
#game-screen.mobile-controls-enabled #mobile-flight-strip > :nth-child(4) {
  display: grid;
}

#game-screen.mobile-controls-enabled #hud {
  display: none;
}

#game-screen.mobile-controls-enabled.mobile-hud-expanded #hud,
#game-screen.mobile-controls-enabled.hud-mode-full #hud {
  display: flex;
}

#game-screen.mobile-controls-enabled #minimap,
#game-screen.mobile-controls-enabled.hud-mode-compact #minimap {
  right: max(10px, calc(var(--safe-right) + 8px));
  top: max(8px, calc(var(--safe-top) + 6px));
  width: 72px;
  height: 72px;
  border-color: var(--hfs-border);
  border-radius: var(--hfs-radius-control);
  background: rgba(8, 24, 36, 0.78);
  opacity: 0.78;
}

#game-screen.mobile-controls-enabled #flight-network-chip {
  right: max(10px, calc(var(--safe-right) + 8px));
  top: max(88px, calc(var(--safe-top) + 84px));
  min-width: 72px;
  min-height: 26px;
  padding: 0 8px;
  font-size: 0.62rem;
}

#game-screen.mobile-controls-enabled .multiplayer-drawer {
  right: max(10px, calc(var(--safe-right) + 8px));
  top: max(122px, calc(var(--safe-top) + 118px));
  bottom: max(8px, calc(var(--safe-bottom) + 6px));
  width: min(356px, calc(100vw - var(--safe-left) - var(--safe-right) - 20px));
  max-height: none;
  gap: 10px;
  padding: 12px;
}

#game-screen.mobile-controls-enabled .multiplayer-drawer-header h2 {
  font-size: 0.98rem;
}

#game-screen.mobile-controls-enabled .multiplayer-drawer-header button {
  min-width: 40px;
  min-height: 38px;
}

#game-screen.mobile-controls-enabled .multiplayer-session-status {
  padding: 9px;
}

#game-screen.mobile-controls-enabled .multiplayer-drawer-actions button {
  min-height: 40px;
}

@media (max-width: 700px) and (max-height: 430px) and (orientation: landscape) {
  #game-screen.mobile-controls-enabled .multiplayer-drawer {
    top: max(58px, calc(var(--safe-top) + 54px));
    width: min(330px, calc(100vw - var(--safe-left) - var(--safe-right) - 20px));
    gap: 7px;
    padding: 10px;
  }

  #game-screen.mobile-controls-enabled .multiplayer-drawer-header {
    padding-bottom: 7px;
  }

  #game-screen.mobile-controls-enabled .multiplayer-drawer-header .eyebrow,
  #game-screen.mobile-controls-enabled .multiplayer-diagnostics {
    display: none;
  }
}

#game-screen.mobile-controls-enabled #annunciator {
  top: max(52px, calc(var(--safe-top) + 48px));
  width: auto;
  max-width: min(300px, 42vw);
  min-width: 0;
  min-height: 28px;
  padding: 5px 10px;
  opacity: 0.94;
}

#game-screen.mobile-controls-enabled #annunciator.standby {
  visibility: hidden;
  opacity: 0;
}

#mobile-controls {
  --mobile-button-size: clamp(50px, 13vh, 56px);
  --mobile-button-size: clamp(50px, 13svh, 56px);
  --mobile-button-gap: 7px;
  --mobile-stick-size: clamp(112px, 32vh, 152px);
  --mobile-stick-size: clamp(112px, 32svh, 152px);
  --mobile-stick-knob-size: clamp(42px, 11vh, 54px);
  --mobile-stick-knob-size: clamp(42px, 11svh, 54px);
  --mobile-throttle-width: 56px;
  --mobile-throttle-length: clamp(124px, 34vh, 190px);
  --mobile-throttle-length: clamp(124px, 34svh, 190px);
}

.mobile-stick {
  border-color: rgba(150, 176, 194, 0.32);
  background:
    linear-gradient(90deg, transparent 49.5%, rgba(150, 176, 194, 0.2) 49.5% 50.5%, transparent 50.5%),
    linear-gradient(0deg, transparent 49.5%, rgba(150, 176, 194, 0.2) 49.5% 50.5%, transparent 50.5%),
    rgba(8, 24, 36, 0.32);
}

#mobile-stick-knob {
  border-color: rgba(45, 184, 208, 0.94);
  background: rgba(45, 184, 208, 0.78);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28), 0 0 18px rgba(45, 184, 208, 0.18);
}

.mobile-stick-panel.active #mobile-stick-knob {
  border-color: #9ceaf3;
  background: var(--hfs-flight);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 20px rgba(45, 184, 208, 0.34);
}

.mobile-button-bank {
  position: fixed;
  inset: 0;
  z-index: 7;
  width: auto;
  max-width: none;
  pointer-events: none;
}

.mobile-primary-actions,
.mobile-secondary-actions,
.mobile-rudder-row,
.mobile-system-row,
.mobile-action-row {
  display: contents;
}

.mobile-secondary-actions {
  position: static;
  opacity: 1;
}

.mobile-button-bank button {
  position: fixed;
  width: var(--mobile-button-size);
  min-width: var(--mobile-button-size);
  height: var(--mobile-button-size);
  min-height: var(--mobile-button-size);
  padding: 0;
  border-color: var(--hfs-border);
  border-radius: var(--hfs-radius-control);
  color: var(--hfs-text-1);
  background: rgba(8, 24, 36, 0.76);
  pointer-events: auto;
}

.mobile-button-bank button.active {
  border-color: var(--hfs-flight);
  color: #061019;
  background: var(--hfs-flight);
}

.mobile-button-bank button[data-mobile-hold="yaw-left"] {
  left: calc(max(16px, calc(var(--safe-left) + 12px)) + var(--mobile-stick-size) + 12px);
  bottom: calc(var(--mobile-control-bottom) + var(--mobile-button-size) + var(--mobile-button-gap));
}

.mobile-button-bank button[data-mobile-hold="yaw-right"] {
  left: calc(max(16px, calc(var(--safe-left) + 12px)) + var(--mobile-stick-size) + 12px + var(--mobile-button-size) + var(--mobile-button-gap));
  bottom: calc(var(--mobile-control-bottom) + var(--mobile-button-size) + var(--mobile-button-gap));
}

#mobile-brake-button {
  left: calc(max(16px, calc(var(--safe-left) + 12px)) + var(--mobile-stick-size) + 12px);
  bottom: var(--mobile-control-bottom);
}

#mobile-spoiler-button {
  left: calc(max(16px, calc(var(--safe-left) + 12px)) + var(--mobile-stick-size) + 12px + var(--mobile-button-size) + var(--mobile-button-gap));
  bottom: var(--mobile-control-bottom);
}

#mobile-gear-button {
  right: calc(var(--mobile-edge) + var(--mobile-throttle-width) + 12px);
  bottom: var(--mobile-control-bottom);
}

#mobile-camera-button {
  right: calc(var(--mobile-edge) + var(--mobile-throttle-width) + 12px);
  bottom: calc(var(--mobile-control-bottom) + var(--mobile-button-size) + var(--mobile-button-gap));
}

#mobile-chat-button {
  right: calc(var(--mobile-edge) + var(--mobile-throttle-width) + 12px);
  bottom: calc(var(--mobile-control-bottom) + var(--mobile-button-size) + var(--mobile-button-gap) + var(--mobile-button-size) + var(--mobile-button-gap));
  opacity: 0.72;
}

#mobile-reset-button {
  display: none;
}

.mobile-throttle {
  border-color: var(--hfs-border);
  border-radius: var(--hfs-radius-control);
  background: rgba(8, 24, 36, 0.76);
}

.mobile-throttle-fill {
  background: linear-gradient(180deg, #66d5e5, var(--hfs-flight));
}

#mobile-throttle-thumb {
  border-color: #9ceaf3;
  background: var(--hfs-flight);
}

html.mobile-flight-ui #settings-dialog {
  right: max(10px, calc(var(--safe-right) + 8px));
  top: max(8px, calc(var(--safe-top) + 6px));
  bottom: max(8px, calc(var(--safe-bottom) + 6px));
  width: min(390px, calc(100vw - var(--safe-left) - var(--safe-right) - 20px));
  max-height: none;
  padding: 16px;
  border-radius: var(--hfs-radius-panel);
  background: rgba(5, 18, 28, 0.97);
}

html.mobile-flight-ui #settings-header {
  top: -16px;
  margin: -16px -16px 0;
  padding: 16px 16px 12px;
}

html.mobile-flight-ui #settings-header h2 {
  font-size: 1.25rem;
}

html.mobile-flight-ui #settings-close-button {
  width: 44px;
  min-width: 44px;
  min-height: 44px;
}

html.mobile-flight-ui .settings-aircraft-section,
html.mobile-flight-ui .keybind-grid {
  display: none;
}

/* Mobile hangar keeps the proven single-row interaction while adopting the
   same professional surfaces and action hierarchy. */
html.mobile-flight-ui #select-screen,
html.mobile-flight-ui.mobile-side-preview-selector #select-screen {
  grid-template-columns: 1fr;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 8px;
  padding:
    max(10px, calc(var(--safe-top) + 6px))
    max(12px, calc(var(--safe-right) + 8px))
    max(10px, calc(var(--safe-bottom) + 6px))
    max(12px, calc(var(--safe-left) + 8px));
}

html.mobile-flight-ui #select-header,
html.mobile-flight-ui.mobile-side-preview-selector #select-header {
  grid-column: 1;
  grid-row: 1;
  min-height: 48px;
  padding-bottom: 8px;
}

html.mobile-flight-ui #select-header h1,
html.mobile-flight-ui.mobile-side-preview-selector #select-header h1 {
  font-size: clamp(1.25rem, 5.4vh, 1.65rem);
  font-size: clamp(1.25rem, 5.4svh, 1.65rem);
}

html.mobile-flight-ui #aircraft-grid,
html.mobile-flight-ui #aircraft-grid.aircraft-flat-row,
html.mobile-flight-ui.mobile-side-preview-selector #aircraft-grid {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  gap: 10px;
  padding: 9px;
  border-radius: var(--hfs-radius-panel);
  background: rgba(4, 16, 25, 0.76);
}

html.mobile-flight-ui #aircraft-grid .aircraft-card,
html.mobile-flight-ui #aircraft-grid.aircraft-flat-row .aircraft-card,
html.mobile-flight-ui.mobile-side-preview-selector #aircraft-grid .aircraft-card {
  flex: 0 0 clamp(144px, 23vw, 184px);
  width: auto;
  height: clamp(164px, 45vh, 204px);
  height: clamp(164px, 45svh, 204px);
  padding: 8px;
  border-radius: var(--hfs-radius-control);
}

html.mobile-flight-ui #aircraft-detail,
html.mobile-flight-ui.mobile-side-preview-selector #aircraft-detail {
  position: relative;
  inset: auto;
  grid-column: 1;
  grid-row: 3;
  width: 100%;
  min-height: 58px;
  display: block;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

html.mobile-flight-ui #aircraft-detail .aircraft-detail-visual,
html.mobile-flight-ui #aircraft-detail .aircraft-detail-copy > h2,
html.mobile-flight-ui #aircraft-detail .aircraft-detail-copy > .brief,
html.mobile-flight-ui #aircraft-detail .aircraft-capability-grid,
html.mobile-flight-ui #aircraft-detail #selected-aircraft-status,
html.mobile-flight-ui #aircraft-detail #select-message,
html.mobile-flight-ui.mobile-side-preview-selector #aircraft-detail .aircraft-detail-visual,
html.mobile-flight-ui.mobile-side-preview-selector #aircraft-detail .aircraft-detail-copy > h2,
html.mobile-flight-ui.mobile-side-preview-selector #aircraft-detail .aircraft-detail-copy > .brief,
html.mobile-flight-ui.mobile-side-preview-selector #aircraft-detail .aircraft-capability-grid,
html.mobile-flight-ui.mobile-side-preview-selector #aircraft-detail #selected-aircraft-status,
html.mobile-flight-ui.mobile-side-preview-selector #aircraft-detail #select-message {
  display: none;
}

html.mobile-flight-ui #aircraft-detail .aircraft-detail-copy,
html.mobile-flight-ui.mobile-side-preview-selector #aircraft-detail .aircraft-detail-copy {
  display: block;
  padding: 0;
}

html.mobile-flight-ui #aircraft-detail .button-row,
html.mobile-flight-ui.mobile-side-preview-selector #aircraft-detail .button-row {
  width: min(390px, 54vw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

html.mobile-flight-ui #aircraft-detail .button-row button,
html.mobile-flight-ui.mobile-side-preview-selector #aircraft-detail .button-row button {
  min-height: 54px;
  padding: 8px 12px;
  border-radius: var(--hfs-radius-control);
}

@media (max-height: 560px) and (orientation: landscape) {
  #auth-screen {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
    gap: clamp(24px, 5vw, 62px);
  }

  .auth-copy h1 {
    font-size: clamp(2.45rem, 12.5vh, 4rem);
  }

  #auth-panel {
    padding: 16px;
  }

  .auth-panel-heading {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
  }

  .auth-panel-heading h2 {
    font-size: 1.16rem;
  }

  .auth-connection-note {
    font-size: 0.76rem;
  }
}

@media (max-width: 760px) and (orientation: portrait) {
  #auth-screen {
    grid-template-columns: 1fr;
    align-content: end;
    gap: 20px;
    padding: max(24px, calc(var(--safe-top) + 18px)) 18px max(26px, calc(var(--safe-bottom) + 18px));
  }

  .auth-copy {
    align-self: end;
  }

  .auth-copy h1 {
    font-size: clamp(2.5rem, 13vw, 4rem);
  }

  #auth-panel {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 430px) {
  #mobile-controls {
    --mobile-stick-size: clamp(108px, 31vh, 146px);
    --mobile-stick-size: clamp(108px, 31svh, 146px);
    --mobile-stick-knob-size: clamp(40px, 10vh, 52px);
    --mobile-stick-knob-size: clamp(40px, 10svh, 52px);
    --mobile-button-size: 48px;
    --mobile-throttle-width: 52px;
    --mobile-throttle-length: clamp(124px, 31vh, 148px);
    --mobile-throttle-length: clamp(124px, 31svh, 148px);
  }

  .mobile-stick {
    width: 100%;
  }

  .mobile-button-bank button {
    font-size: 0;
  }
}

#game-screen.mobile-controls-enabled #hud {
  position: fixed;
  left: max(10px, calc(var(--safe-left) + 8px));
  top: max(56px, calc(var(--safe-top) + 52px));
  right: auto;
  bottom: auto;
  z-index: 9;
  display: none;
  width: clamp(84px, 10vw, 118px);
  height: auto;
  opacity: 0.46;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
}

#game-screen.mobile-controls-enabled #hud:hover {
  opacity: 0.62;
}

#game-screen.mobile-controls-enabled #attitude-card {
  width: 100%;
  height: auto;
  min-height: 0;
  display: grid;
  gap: 0;
  padding: 4px;
  clip-path: none;
  border-radius: 8px;
  border-color: rgba(232, 236, 238, 0.1);
  background: rgba(7, 8, 9, 0.26);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

#game-screen.mobile-controls-enabled #attitude-card .hud-panel-header,
#game-screen.mobile-controls-enabled #attitude-card .hud-attitude-foot,
#game-screen.mobile-controls-enabled #hud-strip {
  display: none;
}

#game-screen.mobile-controls-enabled #attitude-canvas {
  width: 100%;
  max-width: none;
  aspect-ratio: 1 / 1;
  opacity: 0.92;
}

#game-screen.mobile-controls-enabled #minimap {
  position: fixed;
  right: max(10px, calc(var(--safe-right) + 8px));
  top: max(8px, calc(var(--safe-top) + 6px));
  bottom: auto;
  z-index: 9;
  width: clamp(62px, 8.2vw, 88px);
  height: clamp(62px, 8.2vw, 88px);
  clip-path: none;
  border-radius: 8px;
  border-color: rgba(232, 236, 238, 0.1);
  opacity: 0.5;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
}

#game-screen.mobile-controls-enabled #annunciator {
  position: fixed;
  left: 50%;
  top: max(46px, calc(var(--safe-top) + 42px));
  right: auto;
  bottom: auto;
  z-index: 5;
  width: min(260px, 31vw);
  min-height: 0;
  padding: 5px 9px;
  clip-path: none;
  border-radius: 8px;
  border-color: rgba(232, 236, 238, 0.14);
  background: rgba(7, 8, 9, 0.32);
  opacity: 0.58;
  pointer-events: none;
  transform: translateX(-50%);
}

#game-screen.mobile-controls-enabled #annunciator.standby {
  width: auto;
  min-width: 76px;
  padding: 4px 9px;
  border-color: rgba(145, 214, 188, 0.12);
  background: rgba(7, 8, 9, 0.2);
  visibility: hidden;
  opacity: 0;
}

#game-screen.mobile-controls-enabled #annunciator.notice {
  visibility: visible;
  opacity: 0.48;
}

#game-screen.mobile-controls-enabled #annunciator.warning,
#game-screen.mobile-controls-enabled #annunciator.danger {
  width: min(280px, 34vw);
  background: rgba(7, 8, 9, 0.48);
  visibility: visible;
  opacity: 0.86;
}

#game-screen.mobile-controls-enabled #annunciator strong {
  color: rgba(232, 255, 244, 0.92);
  font-size: 0.72rem;
  line-height: 1;
}

#game-screen.mobile-controls-enabled #annunciator.warning strong {
  color: var(--accent);
}

#game-screen.mobile-controls-enabled #annunciator.danger strong {
  color: var(--danger);
}

#game-screen.mobile-controls-enabled #annunciator span {
  color: rgba(245, 251, 255, 0.76);
  font-size: 0.62rem;
  line-height: 1.24;
}

#game-screen.mobile-controls-enabled #annunciator.standby span {
  display: none;
}

#game-screen.mobile-controls-enabled.mobile-hud-expanded #mobile-flight-strip {
  border-color: rgba(231, 173, 77, 0.18);
  background: rgba(7, 8, 9, 0.28);
  opacity: 0.92;
  width: min(344px, calc(100vw - var(--safe-left) - var(--safe-right) - 156px));
  padding: 8px 12px;
  gap: 10px;
}

#game-screen.mobile-controls-enabled.hud-mode-full #mobile-flight-strip {
  border-color: rgba(231, 173, 77, 0.22);
  background: rgba(7, 8, 9, 0.3);
  opacity: 0.94;
}

#game-screen.mobile-controls-enabled.mobile-hud-expanded #hud {
  top: max(56px, calc(var(--safe-top) + 52px));
  width: min(344px, calc(100vw - 144px));
  height: clamp(108px, 24vh, 132px);
  height: clamp(108px, 24svh, 132px);
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 6px;
  opacity: 0.94;
}

#game-screen.mobile-controls-enabled.mobile-hud-expanded #attitude-card {
  flex: 0 0 clamp(98px, 22vh, 120px);
  flex: 0 0 clamp(98px, 22svh, 120px);
  width: clamp(98px, 22vh, 120px);
  width: clamp(98px, 22svh, 120px);
  max-width: clamp(98px, 22vh, 120px);
  max-width: clamp(98px, 22svh, 120px);
  height: 100%;
  align-content: center;
  border-color: rgba(231, 173, 77, 0.18);
  background: rgba(7, 8, 9, 0.42);
}

#game-screen.mobile-controls-enabled.mobile-hud-expanded #attitude-canvas {
  width: 100%;
  height: auto;
  max-width: none;
  aspect-ratio: 1 / 1;
}

#game-screen.mobile-controls-enabled.mobile-hud-expanded #hud-strip {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  display: grid;
  gap: 6px;
  padding: 8px;
  clip-path: none;
  border-radius: 8px;
  border-color: rgba(232, 236, 238, 0.12);
  background: rgba(7, 8, 9, 0.4);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

#game-screen.mobile-controls-enabled.mobile-hud-expanded #hud-strip .hud-data-header,
#game-screen.mobile-controls-enabled.mobile-hud-expanded #hud-strip .hud-lever-bank {
  display: none;
}

#game-screen.mobile-controls-enabled.mobile-hud-expanded #hud-strip .hud-data-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 10px;
  align-content: center;
}

#game-screen.mobile-controls-enabled.mobile-hud-expanded #hud-strip .hud-metric {
  gap: 2px;
  padding: 2px 0 4px;
}

#game-screen.mobile-controls-enabled.mobile-hud-expanded #hud-strip .hud-metric span {
  font-size: 0.56rem;
  color: rgba(190, 198, 201, 0.78);
}

#game-screen.mobile-controls-enabled.mobile-hud-expanded #hud-strip .hud-metric strong {
  font-size: 0.8rem;
  color: rgba(245, 251, 255, 0.94);
}

#game-screen.mobile-controls-enabled.mobile-hud-expanded #minimap {
  top: max(6px, calc(var(--safe-top) + 4px));
  width: clamp(96px, 23vh, 124px);
  width: clamp(96px, 23svh, 124px);
  height: clamp(96px, 23vh, 124px);
  height: clamp(96px, 23svh, 124px);
  border-color: rgba(145, 214, 188, 0.18);
  opacity: 0.9;
}

#game-screen.mobile-controls-enabled.mobile-hud-expanded.hud-mode-compact #hud {
  opacity: 0.72;
}

#game-screen.mobile-controls-enabled.mobile-hud-expanded.hud-mode-compact #attitude-card {
  padding: 1px;
  background: rgba(7, 8, 9, 0.24);
}

#game-screen.mobile-controls-enabled.mobile-hud-expanded.hud-mode-compact #hud-strip {
  padding: 6px;
  opacity: 0.82;
}

@media (min-width: 900px) and (min-height: 600px) {
  #game-screen.mobile-controls-enabled #hud {
    top: max(76px, calc(var(--safe-top) + 70px));
    width: clamp(98px, 8.4vw, 124px);
    height: auto;
    display: block;
    opacity: 0.46;
  }

  #game-screen.mobile-controls-enabled #attitude-card {
    height: auto;
    align-content: center;
  }

  #game-screen.mobile-controls-enabled #hud-strip {
    display: none;
  }

  #game-screen.mobile-controls-enabled #minimap {
    width: clamp(88px, 7.8vw, 108px);
    height: clamp(88px, 7.8vw, 108px);
    opacity: 0.5;
  }

  #game-screen.mobile-controls-enabled #annunciator {
    top: max(48px, calc(var(--safe-top) + 44px));
    width: min(280px, 28vw);
  }
}

html.mobile-flight-ui #settings-scrim {
  background: rgba(2, 5, 8, 0.42);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

html.mobile-flight-ui #settings-dialog {
  left: auto;
  right: max(10px, calc(var(--safe-right) + 8px));
  top: max(50px, calc(var(--safe-top) + 46px));
  bottom: max(10px, calc(var(--safe-bottom) + 8px));
  width: min(350px, calc(100vw - var(--safe-left) - var(--safe-right) - 20px));
  max-height: none;
  padding: 14px;
  border-radius: 10px;
  clip-path: none;
  border-color: rgba(232, 236, 238, 0.14);
  background: rgba(7, 9, 10, 0.76);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

html.mobile-flight-ui #settings-header {
  align-items: center;
  min-height: 34px;
  padding-bottom: 10px;
}

html.mobile-flight-ui #settings-header .eyebrow {
  margin-bottom: 2px;
  font-size: 0.56rem;
}

html.mobile-flight-ui #settings-header h2 {
  font-size: 1rem;
  line-height: 1;
}

html.mobile-flight-ui #settings-close-button {
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  clip-path: none;
  border-radius: 8px;
  color: rgba(245, 251, 255, 0.9);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0;
  letter-spacing: 0;
}

html.mobile-flight-ui #settings-close-button::before,
html.mobile-flight-ui #settings-close-button::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: 14px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  opacity: 1;
  mix-blend-mode: normal;
}

html.mobile-flight-ui #settings-close-button::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

html.mobile-flight-ui #settings-close-button::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

html.mobile-flight-ui #server-node-dialog {
  width: min(320px, calc(100vw - var(--safe-left) - var(--safe-right) - 20px));
  padding: 14px;
  border-radius: 10px;
  clip-path: none;
  border-color: rgba(232, 236, 238, 0.14);
  background: rgba(7, 9, 10, 0.82);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

html.mobile-flight-ui #server-node-header {
  align-items: center;
  padding-bottom: 10px;
}

html.mobile-flight-ui #server-node-header .eyebrow {
  margin-bottom: 2px;
  font-size: 0.56rem;
}

html.mobile-flight-ui #server-node-header h2 {
  font-size: 1rem;
  line-height: 1;
}

html.mobile-flight-ui #server-node-close-button {
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  clip-path: none;
  border-radius: 8px;
  color: rgba(245, 251, 255, 0.9);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0;
  letter-spacing: 0;
}

html.mobile-flight-ui #server-node-close-button::before,
html.mobile-flight-ui #server-node-close-button::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: 14px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  opacity: 1;
  mix-blend-mode: normal;
}

html.mobile-flight-ui #server-node-close-button::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

html.mobile-flight-ui #server-node-close-button::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

html.mobile-flight-ui .server-node-picker {
  gap: 8px;
  margin-top: 12px;
}

html.mobile-flight-ui .server-node-card {
  min-height: 60px;
  padding: 8px 10px;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 8px;
  border-radius: 8px;
  clip-path: none;
  background: rgba(255, 255, 255, 0.045);
}

html.mobile-flight-ui .server-node-card-icon {
  width: 30px;
  height: 30px;
}

html.mobile-flight-ui .server-node-card-copy strong {
  font-size: 0.86rem;
}

html.mobile-flight-ui .server-node-card-copy small {
  font-size: 0.64rem;
}

html.mobile-flight-ui #settings-dialog .settings-section {
  gap: 8px;
}

html.mobile-flight-ui #settings-dialog .settings-label {
  font-size: 0.62rem;
}

html.mobile-flight-ui #settings-dialog .settings-row strong {
  font-size: 1rem;
}

html.mobile-flight-ui #settings-dialog button,
html.mobile-flight-ui #settings-dialog .link-button {
  min-height: 34px;
  border-radius: 8px;
  clip-path: none;
  background: rgba(255, 255, 255, 0.06);
  letter-spacing: 0;
  text-transform: none;
}

html.mobile-flight-ui #settings-dialog .button-row {
  gap: 7px;
}

html.mobile-flight-ui #settings-dialog .toggle-row,
html.mobile-flight-ui #settings-dialog .range-row,
html.mobile-flight-ui #settings-dialog .keybind-row {
  border-color: rgba(232, 236, 238, 0.1);
  background: rgba(255, 255, 255, 0.045);
}

html.mobile-flight-ui #settings-dialog .range-row {
  grid-template-columns: 1fr auto;
}

html.mobile-flight-ui #settings-dialog .range-row input {
  grid-column: 1 / -1;
}

html.mobile-flight-ui #settings-aircraft-grid {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 7px;
  overflow-x: auto;
  overflow-y: hidden;
  max-height: 70px;
  padding-bottom: 2px;
  scrollbar-width: none;
  touch-action: pan-x;
}

html.mobile-flight-ui #logout-button {
  min-width: 86px;
  padding: 0 10px;
  font-size: 0.66rem;
  font-weight: 850;
  line-height: 1.08;
}

html.mobile-flight-ui #settings-aircraft-grid::-webkit-scrollbar {
  display: none;
}

html.mobile-flight-ui #settings-aircraft-grid.settings-aircraft-flat-row .settings-aircraft-card {
  flex: 0 0 112px;
  align-self: flex-start;
  height: 64px;
  min-height: 64px;
  padding: 8px;
  gap: 5px;
  overflow: hidden;
}

html.mobile-flight-ui #settings-aircraft-grid.settings-aircraft-flat-row .settings-aircraft-card strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.7rem;
  line-height: 1.08;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

html.mobile-flight-ui #settings-aircraft-grid.settings-aircraft-flat-row .settings-aircraft-card small {
  display: none;
}

html.mobile-flight-ui #settings-aircraft-grid.settings-aircraft-flat-row .aircraft-status {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  clip-path: none;
  font-size: 0;
}

html.mobile-flight-ui #settings-dialog .settings-section[aria-label="Key bindings"] {
  display: none;
}

html.mobile-flight-ui #select-screen {
  --select-dock-height: clamp(42px, 10.6vh, 50px);
  --select-dock-height: clamp(42px, 10.6svh, 50px);
  grid-template-columns: 1fr;
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(6px, 1.3vh, 10px);
  gap: clamp(6px, 1.3svh, 10px);
  padding:
    max(12px, calc(var(--safe-top) + 8px))
    max(14px, calc(var(--safe-right) + 10px))
    calc(var(--select-dock-height) + max(16px, calc(var(--safe-bottom) + 12px)))
    max(14px, calc(var(--safe-left) + 10px));
  background:
    linear-gradient(180deg, rgba(7, 8, 9, 0.82), rgba(11, 12, 12, 0.72) 46%, rgba(7, 8, 8, 0.9)),
    url("https://hamfs-assets.743.world/releases/r20261031-1514/assets/ui/auth-runway-hero.jpg") center center / cover no-repeat;
  overflow: hidden;
}

html.mobile-flight-ui #select-header {
  grid-column: 1;
  display: flex;
  align-items: center;
  min-height: 30px;
  padding-bottom: 2px;
}

html.mobile-flight-ui #select-header .eyebrow {
  margin-bottom: 2px;
  font-size: 0.56rem;
}

html.mobile-flight-ui #select-header h1 {
  max-width: none;
  font-size: clamp(0.98rem, 4vh, 1.34rem);
  font-size: clamp(0.98rem, 4svh, 1.34rem);
  line-height: 0.96;
}

html.mobile-flight-ui .select-account {
  justify-content: flex-end;
  flex-wrap: nowrap;
  max-width: 64vw;
  gap: 5px;
}

html.mobile-flight-ui .select-account span {
  max-width: min(108px, 24vw);
  padding: 4px 7px;
  overflow: hidden;
  border: 1px solid rgba(232, 236, 238, 0.08);
  border-radius: 8px;
  color: rgba(245, 251, 255, 0.88);
  background: rgba(8, 10, 11, 0.22);
  font-size: 0.66rem;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

html.mobile-flight-ui .select-account button,
html.mobile-flight-ui .select-account .link-button {
  width: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 8px;
  clip-path: none;
  border-color: rgba(232, 236, 238, 0.12);
  background: rgba(8, 10, 11, 0.34);
  font-size: 0;
  letter-spacing: 0;
  white-space: nowrap;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

html.mobile-flight-ui .select-account .account-action-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html.mobile-flight-ui .select-account-icon {
  width: 17px;
  height: 17px;
}

html.mobile-flight-ui #changelog-button {
  display: none;
}

html.mobile-flight-ui #aircraft-grid {
  grid-column: 1;
  gap: clamp(8px, 1.6vh, 12px);
  gap: clamp(8px, 1.6svh, 12px);
  overflow: hidden;
  padding: 4px 2px 8px;
  border: 0;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  scrollbar-width: none;
}

html.mobile-flight-ui #aircraft-grid::-webkit-scrollbar,
html.mobile-flight-ui .aircraft-group-grid::-webkit-scrollbar {
  display: none;
}

html.mobile-flight-ui #aircraft-grid.aircraft-flat-row {
  height: 100%;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 7px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: clamp(4px, 1.6vh, 8px) 2px 6px;
  padding: clamp(4px, 1.6svh, 8px) 2px 6px;
  scroll-padding-inline: 2px;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: none;
  touch-action: pan-x;
  -webkit-overflow-scrolling: touch;
}

html.mobile-flight-ui #aircraft-grid.aircraft-flat-row::-webkit-scrollbar {
  display: none;
}

html.mobile-flight-ui .aircraft-group {
  gap: 6px;
}

html.mobile-flight-ui .aircraft-group-header {
  padding: 0 3px;
  font-size: 0.72rem;
}

html.mobile-flight-ui .aircraft-group-header small {
  font-size: 0.64rem;
}

html.mobile-flight-ui .aircraft-group-grid {
  display: flex;
  grid-template-columns: none;
  gap: 9px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 2px 7px;
  scroll-padding-inline: 2px;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: none;
  touch-action: pan-x;
  -webkit-overflow-scrolling: touch;
}

html.mobile-flight-ui .aircraft-card {
  flex: 0 0 clamp(144px, 19.8vw, 176px);
  height: clamp(164px, 45vh, 194px);
  height: clamp(164px, 45svh, 194px);
  min-height: 0;
  grid-template-rows: minmax(96px, 1fr) auto;
  align-content: stretch;
  gap: 6px;
  padding: clamp(7px, 1.45vh, 9px);
  padding: clamp(7px, 1.45svh, 9px);
  border-radius: 8px;
  clip-path: none;
  scroll-snap-align: start;
  border-color: rgba(232, 236, 238, 0.14);
  background:
    linear-gradient(180deg, rgba(22, 25, 24, 0.48), rgba(7, 8, 9, 0.36)),
    rgba(10, 12, 13, 0.34);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.22),
    inset 0 1px rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

html.mobile-flight-ui #aircraft-grid.aircraft-flat-row .aircraft-card {
  flex: 0 0 clamp(144px, 19.8vw, 176px);
  height: clamp(164px, 45vh, 194px);
  height: clamp(164px, 45svh, 194px);
  align-self: flex-start;
}

html.mobile-flight-ui #aircraft-grid.aircraft-flat-row .aircraft-card.active {
  flex-basis: clamp(144px, 19.8vw, 176px);
  min-height: 0;
}

html.mobile-flight-ui .aircraft-card-stats {
  display: none;
}

html.mobile-flight-ui .aircraft-card-preview {
  position: relative;
  height: clamp(96px, 27vh, 120px);
  height: clamp(96px, 27svh, 120px);
  min-height: 0;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(232, 236, 238, 0.12);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 38%, rgba(145, 214, 188, 0.18), transparent 48%),
    linear-gradient(90deg, transparent 0 44%, rgba(232, 236, 238, 0.055) 44% 45%, transparent 45% 55%, rgba(232, 236, 238, 0.045) 55% 56%, transparent 56%),
    linear-gradient(180deg, rgba(232, 236, 238, 0.075), rgba(3, 4, 5, 0.16));
}

html.mobile-flight-ui .aircraft-card.active .aircraft-card-preview {
  height: clamp(96px, 27vh, 120px);
  height: clamp(96px, 27svh, 120px);
  min-height: 0;
  border-color: rgba(231, 173, 77, 0.4);
  background:
    radial-gradient(circle at 50% 40%, rgba(231, 173, 77, 0.16), transparent 45%),
    radial-gradient(circle at 50% 38%, rgba(145, 214, 188, 0.16), transparent 54%),
    linear-gradient(180deg, rgba(232, 236, 238, 0.085), rgba(3, 4, 5, 0.16));
}

html.mobile-flight-ui .aircraft-preview-placeholder {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  background:
    linear-gradient(90deg, transparent 0 44%, rgba(232, 236, 238, 0.08) 44% 45%, transparent 45% 55%, rgba(232, 236, 238, 0.08) 55% 56%, transparent 56%),
    linear-gradient(180deg, rgba(232, 236, 238, 0.04), transparent 62%);
  opacity: 0.76;
}

html.mobile-flight-ui .aircraft-card-preview.has-thumbnail .aircraft-preview-placeholder {
  opacity: 0.18;
}

html.mobile-flight-ui .aircraft-card-thumbnail {
  padding: 2px 4px 0;
  filter:
    drop-shadow(0 10px 12px rgba(0, 0, 0, 0.42))
    drop-shadow(0 0 18px rgba(145, 214, 188, 0.18))
    brightness(1.16)
    saturate(1.06);
}

html.mobile-flight-ui .aircraft-card-preview.has-thumbnail .aircraft-card-thumbnail {
  opacity: 0.96;
  transform: scale(1.08);
}

html.mobile-flight-ui #aircraft-preview.in-card {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
}

html.mobile-flight-ui #aircraft-preview.in-card::after {
  inset: auto 15% 7px;
  background: linear-gradient(90deg, transparent, rgba(255, 223, 156, 0.38), transparent);
}

html.mobile-flight-ui .aircraft-card.active {
  border-color: rgba(231, 173, 77, 0.72);
  background:
    linear-gradient(180deg, rgba(34, 29, 18, 0.58), rgba(8, 8, 8, 0.38)),
    rgba(22, 20, 16, 0.48);
  box-shadow:
    0 0 0 1px rgba(231, 173, 77, 0.34),
    0 0 20px rgba(231, 173, 77, 0.1),
    0 12px 28px rgba(0, 0, 0, 0.24),
    inset 0 1px rgba(255, 255, 255, 0.08);
}

html.mobile-flight-ui .aircraft-card strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: clamp(0.66rem, 1.95vh, 0.82rem);
  font-size: clamp(0.66rem, 1.95svh, 0.82rem);
  line-height: 1.08;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

html.mobile-flight-ui .aircraft-card small,
html.mobile-flight-ui .aircraft-card span {
  font-size: clamp(0.5rem, 1.5vh, 0.62rem);
  font-size: clamp(0.5rem, 1.5svh, 0.62rem);
  line-height: 1.16;
}

html.mobile-flight-ui .aircraft-card .aircraft-status {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 10px;
  height: 10px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 999px;
  clip-path: none;
  font-size: 0;
  box-shadow:
    0 0 0 3px rgba(5, 6, 7, 0.42),
    0 0 12px currentColor;
}

html.mobile-flight-ui .aircraft-card .aircraft-status::before {
  content: "";
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
}

html.mobile-flight-ui .aircraft-card .aircraft-status.ready {
  color: rgba(145, 214, 188, 0.62);
  border-color: rgba(145, 214, 188, 0.24);
  background: currentColor;
  opacity: 0.68;
  box-shadow:
    0 0 0 2px rgba(5, 6, 7, 0.34),
    0 0 8px rgba(145, 214, 188, 0.34);
}

html.mobile-flight-ui .aircraft-card.active .aircraft-status.ready {
  top: 7px;
  right: 7px;
  width: 15px;
  height: 15px;
  color: rgba(255, 220, 150, 0.98);
  border: 1px solid rgba(255, 220, 150, 0.46);
  background: rgba(231, 173, 77, 0.16);
  opacity: 1;
  box-shadow:
    0 0 0 3px rgba(5, 6, 7, 0.42),
    0 0 14px rgba(231, 173, 77, 0.34);
}

html.mobile-flight-ui .aircraft-card.active .aircraft-status.ready::before {
  background: transparent;
  box-shadow: none;
}

html.mobile-flight-ui .aircraft-card.active .aircraft-status.ready::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 2px;
  width: 5px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

html.mobile-flight-ui .aircraft-card .aircraft-status.missing {
  color: rgba(231, 173, 77, 0.96);
  border-color: rgba(231, 173, 77, 0.4);
  background: currentColor;
}

html.mobile-flight-ui #aircraft-detail {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: max(10px, calc(var(--safe-bottom) + 8px));
  z-index: 14;
  width: min(224px, calc(100vw - var(--safe-left) - var(--safe-right) - 24px));
  max-width: none;
  justify-self: center;
  min-height: auto;
  display: block;
  padding: 0;
  border: 0;
  border-radius: 8px;
  clip-path: none;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  transform: translateX(-50%);
}

html.mobile-flight-ui #aircraft-detail .eyebrow,
html.mobile-flight-ui #aircraft-detail > #aircraft-preview,
html.mobile-flight-ui #aircraft-detail h2,
html.mobile-flight-ui #selected-aircraft-role,
html.mobile-flight-ui #selected-aircraft-status,
html.mobile-flight-ui #select-message {
  display: none;
}

html.mobile-flight-ui #aircraft-detail .button-row {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

html.mobile-flight-ui #aircraft-detail .button-row button {
  min-height: var(--select-dock-height);
  padding: 4px 7px;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  justify-items: center;
  align-content: center;
  gap: 3px;
  border: 1px solid rgba(232, 236, 238, 0.14);
  border-radius: 8px;
  clip-path: none;
  color: rgba(245, 251, 255, 0.92);
  background: rgba(9, 11, 12, 0.3);
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.24),
    inset 0 1px rgba(255, 255, 255, 0.08);
  font-size: 0;
  letter-spacing: 0;
  text-align: center;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

html.mobile-flight-ui #fly-practice-button {
  border-color: rgba(231, 173, 77, 0.38);
}

html.mobile-flight-ui #select-join-button {
  border-color: rgba(145, 214, 188, 0.32);
}

html.mobile-flight-ui .select-action-icon {
  width: clamp(16px, 3.9vh, 19px);
  width: clamp(16px, 3.9svh, 19px);
  height: clamp(16px, 3.9vh, 19px);
  height: clamp(16px, 3.9svh, 19px);
}

html.mobile-flight-ui .select-action-label {
  font-size: clamp(0.52rem, 1.5vh, 0.6rem);
  font-size: clamp(0.52rem, 1.5svh, 0.6rem);
  line-height: 1;
}

html.mobile-flight-ui .select-action-card small {
  display: none;
}

html.mobile-flight-ui.mobile-side-preview-selector #select-screen {
  --select-dock-height: auto;
  grid-template-columns: minmax(0, 0.74fr) minmax(0, 1.26fr);
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(8px, 1.8vw, 14px);
  padding:
    max(16px, calc(var(--safe-top) + 12px))
    max(18px, calc(var(--safe-right) + 16px))
    max(20px, calc(var(--safe-bottom) + 16px))
    max(18px, calc(var(--safe-left) + 16px));
}

html.mobile-flight-ui.mobile-side-preview-selector #select-header {
  grid-column: 1 / -1;
  align-items: flex-start;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(245, 251, 255, 0.14);
}

html.mobile-flight-ui.mobile-side-preview-selector #aircraft-grid {
  grid-column: 1;
  grid-row: 2;
  height: 100%;
  overflow: auto;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(245, 251, 255, 0.12);
  background: rgba(5, 12, 16, 0.42);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.24);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

html.mobile-flight-ui.mobile-side-preview-selector .aircraft-group {
  gap: 10px;
}

html.mobile-flight-ui.mobile-side-preview-selector .aircraft-group-header {
  padding: 0 2px;
  font-size: 0.8rem;
}

html.mobile-flight-ui.mobile-side-preview-selector .aircraft-group-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  overflow: visible;
  padding: 0;
  touch-action: auto;
}

html.mobile-flight-ui.mobile-side-preview-selector .aircraft-card {
  min-height: 108px;
  height: auto;
  display: grid;
  grid-template-rows: auto minmax(18px, 1fr) auto;
  gap: 4px;
  padding: 7px 9px;
  border-radius: 10px;
}

html.mobile-flight-ui.mobile-side-preview-selector .aircraft-card-preview {
  display: none;
}

html.mobile-flight-ui.mobile-side-preview-selector .aircraft-card-stats {
  display: block;
}

html.mobile-flight-ui.mobile-side-preview-selector .aircraft-card strong {
  font-size: clamp(0.72rem, 1.2vw, 0.86rem);
}

html.mobile-flight-ui.mobile-side-preview-selector .aircraft-card small,
html.mobile-flight-ui.mobile-side-preview-selector .aircraft-card span {
  font-size: clamp(0.54rem, 0.92vw, 0.64rem);
}

html.mobile-flight-ui.mobile-side-preview-selector .aircraft-card .aircraft-status {
  position: static;
  width: auto;
  height: auto;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.66rem;
  box-shadow: none;
}

html.mobile-flight-ui.mobile-side-preview-selector .aircraft-card .aircraft-status::before,
html.mobile-flight-ui.mobile-side-preview-selector .aircraft-card.active .aircraft-status.ready::after {
  display: none;
}

html.mobile-flight-ui.mobile-side-preview-selector .aircraft-card.active .aircraft-status.ready {
  top: auto;
  right: auto;
  width: auto;
  height: auto;
  border-width: 1px;
  box-shadow: none;
}

html.mobile-flight-ui.mobile-side-preview-selector .aircraft-card.active .aircraft-card-preview {
  background:
    radial-gradient(circle at 50% 40%, rgba(231, 173, 77, 0.12), transparent 40%),
    linear-gradient(180deg, rgba(10, 12, 14, 0.5), rgba(6, 7, 8, 0.24));
}

html.mobile-flight-ui.mobile-side-preview-selector .aircraft-card.active .aircraft-preview-placeholder {
  opacity: 0;
}

html.mobile-flight-ui.mobile-side-preview-selector .aircraft-card.active .aircraft-card-thumbnail {
  opacity: 1;
  transform: scale(1.04);
}

html.mobile-flight-ui.mobile-side-preview-selector #aircraft-detail {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  grid-column: 2;
  grid-row: 2;
  transform: none;
  z-index: 2;
  width: 100%;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  align-content: start;
  gap: 6px;
  padding: clamp(8px, 1.1vw, 10px);
  border: 1px solid rgba(245, 251, 255, 0.12);
  border-radius: 10px;
  background: rgba(5, 14, 22, 0.8);
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.28);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

html.mobile-flight-ui.mobile-side-preview-selector #aircraft-detail .eyebrow,
html.mobile-flight-ui.mobile-side-preview-selector #aircraft-detail > #aircraft-preview,
html.mobile-flight-ui.mobile-side-preview-selector #aircraft-detail h2,
html.mobile-flight-ui.mobile-side-preview-selector #selected-aircraft-role,
html.mobile-flight-ui.mobile-side-preview-selector #selected-aircraft-status,
html.mobile-flight-ui.mobile-side-preview-selector #select-message {
  display: block;
}

html.mobile-flight-ui.mobile-side-preview-selector #aircraft-preview {
  height: clamp(54px, 8vh, 78px);
  height: clamp(54px, 8svh, 78px);
  min-height: 54px;
  background: transparent;
  border-color: rgba(232, 236, 238, 0.12);
}

html.mobile-flight-ui.mobile-side-preview-selector #aircraft-preview::after {
  opacity: 0;
}

html.mobile-flight-ui.mobile-side-preview-selector #aircraft-detail h2 {
  font-size: clamp(0.64rem, 0.95vw, 0.8rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

html.mobile-flight-ui.mobile-side-preview-selector #aircraft-detail .button-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin-top: 0;
  min-width: 0;
}

html.mobile-flight-ui.mobile-side-preview-selector #aircraft-detail .button-row button {
  min-height: 34px;
  width: 100%;
  min-width: 0;
  grid-template-columns: auto;
  grid-template-rows: auto auto;
  justify-items: center;
  align-items: center;
  gap: 2px;
  padding: 5px 7px;
  font-size: clamp(0.5rem, 0.82vw, 0.58rem);
  text-align: center;
}

html.mobile-flight-ui.mobile-side-preview-selector .select-action-icon {
  grid-row: 1 / span 2;
  width: 18px;
  height: 18px;
}

html.mobile-flight-ui.mobile-side-preview-selector .select-action-label {
  font-size: clamp(0.5rem, 0.82vw, 0.56rem);
  min-width: 0;
  line-height: 1;
}

html.mobile-flight-ui.mobile-side-preview-selector .select-action-card small {
  display: block;
  font-size: clamp(0.4rem, 0.68vw, 0.46rem);
  color: rgba(232, 236, 238, 0.68);
}

@media (max-width: 430px) and (orientation: landscape) {
  html.mobile-flight-ui.mobile-side-preview-selector #aircraft-detail .button-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) and (max-height: 430px) and (orientation: landscape) {
  html.mobile-flight-ui.mobile-side-preview-selector #select-screen {
    grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
    gap: 8px;
  }

  html.mobile-flight-ui.mobile-side-preview-selector #aircraft-detail {
    padding: 8px 9px;
  }

  html.mobile-flight-ui.mobile-side-preview-selector #aircraft-detail .button-row {
    gap: 4px;
  }

  html.mobile-flight-ui.mobile-side-preview-selector #aircraft-detail .button-row button {
    min-height: 32px;
    padding: 5px 6px;
  }
}

html.mobile-flight-ui.mobile-side-preview-selector #aircraft-detail .eyebrow {
  font-size: clamp(0.44rem, 0.8vw, 0.52rem);
}

html.mobile-flight-ui.mobile-side-preview-selector #selected-aircraft-role,
html.mobile-flight-ui.mobile-side-preview-selector #selected-aircraft-status,
html.mobile-flight-ui.mobile-side-preview-selector #select-message,
html.mobile-flight-ui.mobile-side-preview-selector #aircraft-detail .message {
  font-size: clamp(0.48rem, 0.84vw, 0.58rem);
  line-height: 1.16;
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (min-width: 820px) {
  html.mobile-flight-ui.mobile-side-preview-selector .aircraft-group-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) and (max-height: 430px) and (orientation: landscape) {
  html.mobile-flight-ui #select-screen {
    --select-dock-height: clamp(44px, 11.4vh, 52px);
    --select-dock-height: clamp(44px, 11.4svh, 52px);
    gap: 6px;
    padding-top: max(10px, calc(var(--safe-top) + 6px));
  }

  html.mobile-flight-ui .aircraft-card {
    flex-basis: clamp(136px, 21vw, 154px);
    height: clamp(158px, 44vh, 174px);
    height: clamp(158px, 44svh, 174px);
  }

  html.mobile-flight-ui #aircraft-grid.aircraft-flat-row .aircraft-card {
    flex-basis: clamp(136px, 21vw, 154px);
    height: clamp(158px, 44vh, 174px);
    height: clamp(158px, 44svh, 174px);
  }

  html.mobile-flight-ui #aircraft-grid.aircraft-flat-row .aircraft-card.active {
    flex-basis: clamp(136px, 21vw, 154px);
    min-height: 0;
  }
}

/* Safari 13 and narrow-landscape operational safeguards ------------------ */

/* `aspect-ratio` is progressive enhancement here. The canvas has square
   intrinsic dimensions, while touch controls already declare equal width and
   height; these declarations preserve that geometry on iOS 13.0. */
@supports not (aspect-ratio: 1 / 1) {
  #attitude-canvas,
  #game-screen.mobile-controls-enabled #attitude-canvas,
  #game-screen.mobile-controls-enabled.mobile-hud-expanded #attitude-canvas {
    height: auto;
  }

  .mobile-stick {
    height: var(--mobile-stick-size);
  }

  .mobile-button-bank button {
    height: var(--mobile-button-size);
    min-height: var(--mobile-button-size);
  }
}

/* The compact strip has exactly four primary flight readouts. The legacy
   SERVER and ONLINE metrics remain available in the expanded/full HUD only. */
#game-screen:not(.mobile-controls-enabled):not(.hud-mode-full) #hud-strip .hud-metric-network {
  display: none !important;
}

#game-screen:not(.mobile-controls-enabled).hud-mode-full #hud-strip .hud-metric-network {
  display: grid !important;
}

/* A 667 x 375-class landscape device uses the side-by-side hangar. Its old
   information-dense detail panel could hide the two primary actions below the
   viewport. Keep the aircraft rail and action dock in separate grid space. */
@media (max-width: 700px) and (max-height: 430px) and (orientation: landscape) {
  html.mobile-flight-ui.mobile-side-preview-selector #select-screen {
    grid-template-columns: minmax(142px, 0.7fr) minmax(0, 1.3fr);
    grid-template-rows: 38px minmax(0, 1fr);
    gap: 6px;
    padding:
      max(8px, calc(var(--safe-top) + 4px))
      max(10px, calc(var(--safe-right) + 8px))
      max(10px, calc(var(--safe-bottom) + 6px))
      max(10px, calc(var(--safe-left) + 8px));
  }

  html.mobile-flight-ui.mobile-side-preview-selector #select-header {
    min-height: 38px;
    align-items: center;
    padding-bottom: 0;
  }

  html.mobile-flight-ui.mobile-side-preview-selector #select-header .eyebrow,
  html.mobile-flight-ui.mobile-side-preview-selector .select-account .account-action {
    display: none;
  }

  html.mobile-flight-ui.mobile-side-preview-selector #select-header h1 {
    font-size: clamp(1rem, 4.2vh, 1.24rem);
    line-height: 1;
  }

  html.mobile-flight-ui.mobile-side-preview-selector .select-account {
    max-width: 42vw;
  }

  html.mobile-flight-ui.mobile-side-preview-selector .select-account span {
    max-width: 128px;
    min-height: 28px;
    font-size: 0.62rem;
  }

  html.mobile-flight-ui.mobile-side-preview-selector #aircraft-grid {
    padding: 6px;
    border-radius: var(--hfs-radius-control);
  }

  html.mobile-flight-ui.mobile-side-preview-selector .aircraft-group,
  html.mobile-flight-ui.mobile-side-preview-selector .aircraft-group-grid {
    gap: 5px;
  }

  html.mobile-flight-ui.mobile-side-preview-selector .aircraft-group-header,
  html.mobile-flight-ui.mobile-side-preview-selector .aircraft-card small,
  html.mobile-flight-ui.mobile-side-preview-selector .aircraft-card-stats {
    display: none;
  }

  html.mobile-flight-ui.mobile-side-preview-selector .aircraft-card {
    min-height: 72px;
    padding: 6px 8px;
  }

  html.mobile-flight-ui.mobile-side-preview-selector #aircraft-detail {
    grid-template-rows: minmax(0, 1fr);
    align-content: stretch;
    gap: 0;
    padding: 8px;
  }

  html.mobile-flight-ui.mobile-side-preview-selector #aircraft-detail-visual,
  html.mobile-flight-ui.mobile-side-preview-selector #selected-aircraft-role,
  html.mobile-flight-ui.mobile-side-preview-selector #aircraft-detail .aircraft-capability-grid,
  html.mobile-flight-ui.mobile-side-preview-selector #selected-aircraft-status,
  html.mobile-flight-ui.mobile-side-preview-selector #select-message {
    display: none;
  }

  html.mobile-flight-ui.mobile-side-preview-selector #aircraft-detail .aircraft-detail-copy {
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(44px, 1fr);
    gap: 6px;
  }

  html.mobile-flight-ui.mobile-side-preview-selector #aircraft-detail h2 {
    display: block;
    min-width: 0;
    margin: 0;
    font-size: clamp(0.72rem, 2.7vh, 0.9rem);
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html.mobile-flight-ui.mobile-side-preview-selector #aircraft-detail .button-row {
    align-self: end;
    margin: 0;
    gap: 6px;
  }

  html.mobile-flight-ui.mobile-side-preview-selector #aircraft-detail .button-row button {
    min-height: 44px;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: 1fr;
    gap: 5px;
    padding: 4px 6px;
  }

  html.mobile-flight-ui.mobile-side-preview-selector #aircraft-detail .select-action-icon {
    grid-row: auto;
    width: 16px;
    height: 16px;
  }

  html.mobile-flight-ui.mobile-side-preview-selector #aircraft-detail .select-action-label {
    font-size: 0.58rem;
  }

  html.mobile-flight-ui.mobile-side-preview-selector #aircraft-detail .select-action-card small {
    display: none;
  }
}
