﻿:root {
  color-scheme: dark;
  --bg: #080d16;
  --card: #101a2b;
  --card-border: #223552;
  --text: #ebf0f7;
  --muted: #9db0ce;
  --accent: #5f8fff;
  --accent-strong: #3a6ef2;
  --danger: #ff7373;
  --success: #67c98e;
  /* Ship console uses nearly full viewport height; vitals HUD sits bottom-right. */
  --ship-console-top: 4rem;
  --ship-console-bottom-gap: 0.7rem;
  --ship-console-max-height: calc(
    100vh - var(--ship-console-top) - var(--ship-console-bottom-gap)
  );
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #11213b, var(--bg) 60%);
  color: var(--text);
}

a {
  color: #9fc0ff;
}

.auth-layout {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.card {
  width: min(96vw, 480px);
  background: rgba(16, 26, 43, 0.95);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 1.15rem 1.2rem;
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.35);
}

.card h1,
.card h2 {
  margin: 0 0 0.65rem;
  font-size: 1.25rem;
}

.muted {
  color: var(--muted);
}

.auth-note {
  margin: 0;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(90, 150, 120, 0.45);
  background: rgba(24, 48, 36, 0.55);
  color: #c8e8d4;
  font-size: 0.88rem;
  line-height: 1.35;
}

.auth-desktop-download {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0.15rem 0 0;
}

.auth-desktop-download .btn {
  text-align: center;
  text-decoration: none;
}

.auth-desktop-download__hint {
  font-size: 0.82rem;
  line-height: 1.3;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.92rem;
}

input {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #2f4362;
  background: #0b1220;
  color: var(--text);
  padding: 0.58rem 0.68rem;
}

input:focus-visible {
  outline: 2px solid #6e9fff;
  outline-offset: 1px;
}

.btn {
  border: 0;
  border-radius: 8px;
  padding: 0.58rem 0.78rem;
  background: #243958;
  color: #fff;
  cursor: pointer;
  font-weight: 600;
}

.btn:hover {
  background: #2b4570;
}

.btn.primary {
  background: var(--accent);
}

.btn.primary:hover {
  background: var(--accent-strong);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.message {
  margin: 0;
  border-radius: 8px;
  padding: 0.52rem 0.62rem;
  font-size: 0.9rem;
}

.message.error {
  background: rgba(255, 115, 115, 0.12);
  border: 1px solid rgba(255, 115, 115, 0.4);
  color: #ffd2d2;
}

.message.success {
  background: rgba(103, 201, 142, 0.12);
  border: 1px solid rgba(103, 201, 142, 0.45);
  color: #d9ffe7;
}

.top-nav {
  position: fixed;
  inset: 0 0 auto;
  /* Above ship-console (13) / maps (12) so Log Out stays tappable on mobile. */
  z-index: 40;
  padding: calc(0.55rem + env(safe-area-inset-top, 0px)) 0.9rem 0.55rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 0.75rem;
  background: rgba(5, 11, 22, 0.85);
  border-bottom: 1px solid #203656;
  backdrop-filter: blur(4px);
  pointer-events: auto;
}

.top-nav .group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

.top-nav__build,
.pbi-build-label,
.starship-build-label {
  font: 500 0.78rem/1.2 ui-monospace, "Cascadia Code", "Segoe UI Mono", Menlo, Consolas, monospace;
  letter-spacing: 0.02em;
  color: #8aa0c0;
  opacity: 0.95;
  white-space: nowrap;
  max-width: none;
  overflow: visible;
  text-overflow: clip;
}

.pbi-env-badge {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  margin: 0;
  padding: 0.08rem 0.32rem;
  border-radius: 3px;
  border: 1px solid rgba(220, 160, 50, 0.75);
  background: rgba(72, 48, 8, 0.9);
  color: #ffe6a0;
  font: 700 0.58rem/1 ui-sans-serif, "Segoe UI", system-ui, sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pbi-env-badge--auth {
  display: inline-flex;
  margin: 0 0 0.55rem;
  padding: 0.12rem 0.42rem;
  font-size: 0.68rem;
}

body.is-staging .top-nav {
  box-shadow: inset 0 2px 0 0 rgba(220, 160, 50, 0.95);
}

.pbi-build-label,
.starship-build-label {
  position: fixed;
  top: calc(0.45rem + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  pointer-events: none;
  max-width: min(92vw, 22rem);
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(5, 11, 22, 0.72);
  border: 1px solid rgba(32, 54, 86, 0.85);
}

.top-nav .btn,
.top-nav button.btn {
  position: relative;
  z-index: 1;
  min-height: 2.5rem;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(120, 170, 255, 0.35);
}

/* Wide desktop keeps Maps/Assets/Settings inline; hamburger from 1400px down. */
.top-nav__menu-toggle {
  display: none;
}

.top-nav__hamburger,
.top-nav__hamburger::before,
.top-nav__hamburger::after {
  display: block;
  width: 1.1rem;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
}

.top-nav__hamburger {
  position: relative;
}

.top-nav__hamburger::before,
.top-nav__hamburger::after {
  content: "";
  position: absolute;
  left: 0;
}

.top-nav__hamburger::before {
  top: -0.35rem;
}

.top-nav__hamburger::after {
  top: 0.35rem;
}

/* Open: rotate bars into an X. */
.top-nav.is-menu-open .top-nav__hamburger {
  background: transparent;
}

.top-nav.is-menu-open .top-nav__hamburger::before {
  top: 0;
  transform: rotate(45deg);
}

.top-nav.is-menu-open .top-nav__hamburger::after {
  top: 0;
  transform: rotate(-45deg);
}

#whoami {
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.perf-hud {
  position: fixed;
  top: calc(0.55rem + env(safe-area-inset-top, 0px));
  right: calc(0.65rem + env(safe-area-inset-right, 0px));
  z-index: 40;
  padding: 0.22rem 0.45rem;
  border: 1px solid rgba(120, 160, 210, 0.35);
  border-radius: 0.3rem;
  background: rgba(6, 12, 22, 0.72);
  color: #c8dcf5;
  font-size: 0.72rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  letter-spacing: 0.02em;
  pointer-events: none;
  user-select: none;
}

.perf-hud[hidden] {
  display: none !important;
}

.status-controls {
  margin: 0.75rem 0 0.35rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(80, 120, 180, 0.35);
  border-radius: 0.4rem;
  background: rgba(12, 22, 40, 0.45);
}

.status-controls__toggle {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.5rem;
  font-size: 0.92rem;
  color: #d6e6ff;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
}

.status-controls__toggle input {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
}

.status-controls__hint {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #8aa0c0;
}

.status-controls__volume {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.45rem 0.65rem;
  margin-top: 0.55rem;
  font-size: 0.88rem;
  color: #d6e6ff;
}

.status-controls__volume input[type="range"] {
  width: 100%;
  min-width: 0;
  accent-color: #7eb0e8;
}

.status-controls__volume-value {
  min-width: 3.2rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: #9eb6d4;
  font-size: 0.8rem;
}

.status-account-actions {
  margin: 0.65rem 0 0.35rem;
}

.status-account-actions .btn {
  min-height: 2.75rem;
  width: 100%;
  touch-action: manipulation;
}

.status-pill {
  border: 1px solid #355688;
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
  font-size: 0.77rem;
  color: #c9ddff;
}

.status-pill.good {
  border-color: rgba(103, 201, 142, 0.65);
  color: #dafbe7;
}

.status-pill.bad {
  border-color: rgba(255, 115, 115, 0.65);
  color: #ffd4d4;
}

.page-shell {
  min-height: 100vh;
  padding-top: 3.5rem;
}

.settings-panel {
  width: min(96vw, 560px);
  margin: 0 auto;
}

.game-layout {
  min-height: 100vh;
}

#game-canvas {
  width: 100%;
  height: calc(100vh - 3.5rem);
  display: block;
  background: #05070c;
}

/* Covers the black WebGL void until bootstrap + star system are ready. */
.world-boot-overlay {
  position: fixed;
  left: 0;
  right: 0;
  top: 3.5rem;
  bottom: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin: 0;
  padding: 1.5rem;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 50% 42%, rgba(28, 48, 78, 0.55) 0%, transparent 70%),
    #05070c;
}

.world-boot-overlay[hidden] {
  display: none !important;
}

.world-boot-overlay__brand {
  margin: 0;
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgba(230, 238, 250, 0.92);
}

.world-boot-overlay__status {
  margin: 0;
  max-width: 28rem;
  text-align: center;
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(160, 184, 214, 0.9);
}

.world-boot-overlay.is-error .world-boot-overlay__status {
  color: rgba(255, 168, 148, 0.95);
}

body.is-docked .world-boot-overlay {
  top: 0;
}

/* Bottom stack: lock/AP lines + Dock/Jump buttons (flex, never overlap). */
.flight-toast-stack {
  position: fixed;
  left: 50%;
  bottom: 1.35rem;
  transform: translateX(-50%);
  /* Above look-pad / tray so Dock/Jump stay clickable when bands overlap. */
  z-index: 17;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  width: min(22rem, 88vw);
  pointer-events: none;
}

body.is-docked .flight-toast-stack {
  display: none !important;
}

.context-actions {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  align-items: stretch;
  z-index: 8;
  pointer-events: none;
}

.context-actions[hidden] {
  display: none !important;
}

.context-actions:not([hidden]) {
  pointer-events: auto;
  position: relative;
}

.context-actions--floating {
  position: static;
  left: auto;
  bottom: auto;
  transform: none;
  width: 100%;
  z-index: auto;
}

.context-actions--embedded {
  position: static;
  transform: none;
  width: auto;
  margin: 0 0 0.15rem;
}

.context-action {
  margin: 0;
  border-radius: 8px;
  padding: 0.48rem 0.7rem;
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.context-action[hidden] {
  display: none !important;
}

.context-action--dock {
  border: 1px solid rgba(90, 210, 160, 0.55);
  background: linear-gradient(180deg, rgba(18, 48, 40, 0.94), rgba(8, 24, 20, 0.96));
  color: #d8ffe8;
}

.context-action--industry {
  border: 1px solid rgba(120, 190, 230, 0.62);
  background: linear-gradient(180deg, rgba(18, 38, 58, 0.94), rgba(8, 18, 32, 0.96));
  color: #e0f2ff;
}

.context-action--jump {
  border: 1px solid rgba(230, 150, 80, 0.6);
  background: linear-gradient(180deg, rgba(48, 28, 12, 0.94), rgba(24, 12, 6, 0.96));
  color: #ffe8d0;
}

.context-action--dock:hover,
.context-action--dock:focus-visible {
  border-color: rgba(120, 230, 180, 0.85);
  outline: none;
}

.context-action--dock.is-cancel,
.context-action--industry.is-cancel {
  border-color: rgba(230, 150, 90, 0.7);
  background: linear-gradient(180deg, rgba(52, 28, 14, 0.94), rgba(26, 12, 6, 0.96));
  color: #ffe6d0;
}

.context-action--dock.is-cancel:hover,
.context-action--dock.is-cancel:focus-visible,
.context-action--industry.is-cancel:hover,
.context-action--industry.is-cancel:focus-visible {
  border-color: rgba(255, 180, 110, 0.9);
  outline: none;
}

.context-action--industry:hover,
.context-action--industry:focus-visible {
  border-color: rgba(155, 215, 255, 0.9);
  background: linear-gradient(180deg, rgba(24, 52, 76, 0.96), rgba(10, 24, 42, 0.98));
  outline: none;
}

.context-action--jump:hover,
.context-action--jump:focus-visible {
  border-color: rgba(255, 180, 100, 0.85);
  outline: none;
}

.context-action--container {
  border: 1px solid rgba(110, 170, 210, 0.65);
  background: linear-gradient(180deg, rgba(20, 36, 52, 0.94), rgba(10, 18, 28, 0.96));
  color: #d8eefc;
}

.context-action--container:hover,
.context-action--container:focus-visible {
  border-color: rgba(140, 200, 240, 0.9);
  background: linear-gradient(180deg, rgba(28, 48, 68, 0.96), rgba(14, 24, 36, 0.98));
  outline: none;
}

.context-action--mine {
  border: 1px solid rgba(200, 140, 80, 0.65);
  background: linear-gradient(180deg, rgba(48, 30, 14, 0.94), rgba(24, 14, 6, 0.96));
  color: #ffe0c0;
}

.context-action--mine:hover,
.context-action--mine:focus-visible {
  border-color: rgba(240, 170, 100, 0.9);
  background: linear-gradient(180deg, rgba(62, 40, 16, 0.96), rgba(30, 18, 8, 0.98));
  outline: none;
}

/* Shared in-space dialog chrome (Nav / Ship / Hull / Status / Chat / Help). */
.flight-dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  overflow: hidden;
}

/* Blocking fetch overlay (Ship inspect, hangar refresh, maps, …). */
.panel-loader {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(6, 12, 22, 0.72);
  backdrop-filter: blur(2px);
  pointer-events: all;
}

.panel-loader[hidden] {
  display: none !important;
}

.panel-loader__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  max-width: min(16rem, 100%);
  text-align: center;
}

.panel-loader__spinner {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  border: 2px solid rgba(140, 170, 210, 0.28);
  border-top-color: #9ec4f0;
  animation: panel-loader-spin 0.7s linear infinite;
}

.panel-loader__label {
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #d7e6ff;
}

@keyframes panel-loader-spin {
  to {
    transform: rotate(360deg);
  }
}

.flight-dialog.is-loading .flight-dialog__body,
.nav-maps.is-loading .nav-maps__stage,
.dock-overlay.is-loading .dock-overlay__inner,
.industrial-overlay.is-loading .industrial-overlay__card {
  pointer-events: none;
}

.dock-overlay > .panel-loader,
.industrial-overlay > .panel-loader {
  z-index: 40;
}

.flight-dialog__header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid rgba(72, 107, 156, 0.45);
}

.flight-dialog__title {
  margin: 0;
  min-width: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: #e7f0ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.flight-dialog__header-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.flight-dialog__close,
.flight-dialog__raise {
  flex: 0 0 auto;
  border: 1px solid #3a5988;
  border-radius: 7px;
  background: rgba(20, 37, 66, 0.85);
  color: #dce8ff;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.flight-dialog__raise[aria-pressed="true"] {
  border-color: rgba(160, 200, 255, 0.85);
  background: rgba(55, 95, 160, 0.55);
  color: #f0f6ff;
}

.flight-dialog__close:hover,
.flight-dialog__close:focus-visible,
.flight-dialog__raise:hover,
.flight-dialog__raise:focus-visible {
  border-color: rgba(140, 180, 230, 0.75);
  outline: none;
}

body.mobile-look-dock .flight-dialog__raise {
  display: none;
}

.flight-dialog__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0.62rem 0.72rem;
}

.chat-panel {
  position: fixed;
  right: 0.85rem;
  bottom: 0.85rem;
  z-index: 9;
  width: min(320px, calc(100vw - 1.4rem));
  max-height: min(42vh, 360px);
  display: none;
  border: 1px solid rgba(70, 110, 90, 0.45);
  border-radius: 10px;
  background: linear-gradient(165deg, rgba(10, 22, 18, 0.92), rgba(8, 14, 16, 0.94));
  color: #e6f0ea;
  font-family: "Sora", "Segoe UI", sans-serif;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.chat-panel.is-open {
  display: flex;
}

/* Docked desktop: float chat above the station console. */
body.is-docked .chat-panel.is-open {
  z-index: 16;
}

/* Mobile already has Chat in the tray — hide the header duplicate. */
body.is-docked.mobile-look-dock #dock-chat-btn {
  display: none;
}

.flight-dialog--chat .flight-dialog__header {
  padding: 0.45rem 0.65rem;
  border-bottom-color: rgba(70, 110, 90, 0.35);
}

.flight-dialog--chat .flight-dialog__title {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  font-weight: 600;
  color: #9ecbb0;
}

.flight-dialog--chat .flight-dialog__close {
  border-color: rgba(90, 140, 110, 0.45);
  background: rgba(12, 28, 22, 0.85);
  color: #d8f0e0;
}

.flight-dialog--chat .flight-dialog__close:hover,
.flight-dialog--chat .flight-dialog__close:focus-visible {
  border-color: rgba(140, 200, 160, 0.75);
}

.flight-dialog--chat .flight-dialog__body,
.chat-panel__body {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.chat-panel__target-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.65rem;
  border-bottom: 1px solid rgba(70, 110, 90, 0.28);
}

.chat-panel__target-label {
  flex: 0 0 auto;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: #7a9a88;
  text-transform: uppercase;
}

.chat-panel__target {
  flex: 1 1 auto;
  min-width: 0;
  border: 1px solid rgba(70, 110, 90, 0.5);
  border-radius: 6px;
  padding: 0.28rem 0.4rem;
  background: rgba(6, 14, 12, 0.85);
  color: #e6f0ea;
  font: inherit;
  font-size: 0.78rem;
}

.chat-panel__target:focus {
  outline: 1px solid rgba(120, 200, 150, 0.55);
  border-color: rgba(120, 200, 150, 0.55);
}

.chat-panel__line.is-direct .chat-alias {
  color: #f0e0a8;
}

.chat-panel__log {
  flex: 1 1 auto;
  min-height: 8rem;
  max-height: 14rem;
  overflow-y: auto;
  padding: 0.45rem 0.65rem;
  font-size: 0.8rem;
  line-height: 1.35;
}

.chat-panel__line {
  margin: 0 0 0.35rem;
  word-break: break-word;
}

.chat-panel__line .chat-alias {
  color: #c8f0d4;
  font-weight: 600;
}

.chat-panel__line .chat-meta {
  color: #7a9a88;
  font-size: 0.72rem;
}

.chat-panel__form {
  display: flex;
  gap: 0.35rem;
  padding: 0.45rem 0.55rem 0.55rem;
  border-top: 1px solid rgba(70, 110, 90, 0.35);
}

.chat-panel__input {
  flex: 1 1 auto;
  min-width: 0;
  border: 1px solid rgba(70, 110, 90, 0.5);
  border-radius: 6px;
  padding: 0.4rem 0.5rem;
  background: rgba(6, 14, 12, 0.85);
  color: #e6f0ea;
  font: inherit;
  font-size: 0.82rem;
}

.chat-panel__input:focus {
  outline: 1px solid rgba(120, 200, 150, 0.55);
  border-color: rgba(120, 200, 150, 0.55);
}

.dock-jump-wrap {
  display: inline-flex;
}

.dock-pilot-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0.45rem;
  border: 1px solid rgba(70, 110, 90, 0.35);
  border-radius: 6px;
  background: rgba(8, 18, 14, 0.65);
  font-size: 0.82rem;
}

.dock-overlay {
  position: fixed;
  left: 0;
  right: 0;
  top: 3.5rem;
  bottom: 0;
  z-index: 7;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* Containing block for #dock-storage-prompt */
  background:
    radial-gradient(ellipse at 18% 0%, rgba(48, 86, 68, 0.42), transparent 42%),
    radial-gradient(ellipse at 88% 100%, rgba(28, 48, 40, 0.4), transparent 46%),
    linear-gradient(165deg, #0a1210 0%, #101816 42%, #080e0c 100%);
  color: #e6f0ea;
}

/* Author display:flex must not keep the console up after undock sets [hidden]. */
.dock-overlay[hidden] {
  display: none !important;
}

@media (max-width: 720px) {
  body.is-docked .chat-panel.is-open {
    z-index: 16;
  }
}

.mobile-tray {
  display: none;
}

.mobile-tray.is-active {
  position: fixed;
  left: 0.35rem;
  right: 0.35rem;
  bottom: calc(0.35rem + env(safe-area-inset-bottom, 0px));
  z-index: 15;
  display: flex;
  flex-wrap: nowrap;
  justify-content: stretch;
  align-items: stretch;
  gap: 0.12rem;
  padding: 0.22rem;
  border: 1px solid rgba(70, 110, 140, 0.5);
  border-radius: 14px;
  background: rgba(6, 12, 22, 0.92);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
}

.mobile-tray__btn {
  flex: 1 1 0;
  min-width: 0;
  border: 0;
  border-radius: 10px;
  padding: 0.38rem 0.12rem;
  min-height: 2.35rem;
  background: transparent;
  color: #9db4d4;
  font: inherit;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Ninth Admin tab: keep one row, slightly tighter type. */
.mobile-tray.is-active:has([data-panel="admin"]:not([hidden])) .mobile-tray__btn {
  font-size: 0.56rem;
}

/* Phones: two rows of four so labels stay readable (Nav no longer clips off-screen). */
@media (max-width: 400px) {
  body:not(.is-docked) {
    --mobile-tray-h: 5.2rem;
  }

  body:not(.is-docked) .mobile-tray.is-active {
    flex-wrap: wrap;
  }

  body:not(.is-docked) .mobile-tray__btn {
    flex: 1 1 calc(25% - 0.12rem);
    font-size: 0.68rem;
  }

  body:not(.is-docked) .mobile-tray.is-active:has([data-panel="admin"]:not([hidden])) .mobile-tray__btn {
    flex-basis: calc(20% - 0.12rem);
    font-size: 0.62rem;
  }
}

/* Docked tray is only Market / Chat (+ Admin) — compact centered pill. */
body.is-docked .mobile-tray.is-active {
  left: 50%;
  right: auto;
  width: max-content;
  max-width: calc(100vw - 0.7rem);
  transform: translateX(-50%);
  gap: 0.28rem;
  padding: 0.28rem;
  border-radius: 999px;
}

body.is-docked .mobile-tray__btn {
  flex: 0 0 auto;
  min-width: 3.1rem;
  padding: 0.42rem 0.7rem;
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  overflow: visible;
  text-overflow: unset;
}

.mobile-tray__btn[aria-pressed="true"] {
  background: rgba(70, 120, 190, 0.35);
  color: #e8f2ff;
}

.mobile-tray__btn:focus-visible {
  outline: 1px solid rgba(140, 180, 230, 0.8);
}

.mobile-tray__btn[hidden] {
  display: none !important;
}

/* Autopilot-only: keep look stick + combat; hide manual move (thrust/lift/roll). */
body.autopilot-only #onscreen-controls-toggle {
  display: none !important;
}

body.autopilot-only .touch-controls__row--move {
  display: none !important;
}

/* Desktop vitals: compact HUD — dialog close hidden until mobile sheet. */
.flight-dialog--vitals .flight-dialog__header {
  padding: 0;
  border-bottom: 0;
  pointer-events: none;
}

.flight-dialog--vitals .flight-dialog__title.vitals-hud__ship {
  margin: 0;
  pointer-events: none;
}

.flight-dialog--vitals .flight-dialog__close {
  display: none;
  pointer-events: auto;
}

.flight-dialog--vitals .flight-dialog__body,
.vitals-hud__body {
  padding: 0;
  overflow: visible;
}

.dock-overlay__inner {
  width: min(1520px, 100%);
  margin: 0 auto;
  padding: 0.55rem 0.85rem 0.75rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  box-sizing: border-box;
}

.dock-overlay__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.dock-overlay__eyebrow {
  margin: 0 0 0.15rem;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7fad92;
}

.dock-overlay__header h2 {
  margin: 0;
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: clamp(1.4rem, 2.6vw, 1.95rem);
  font-weight: 700;
  color: #f2fff7;
  letter-spacing: -0.02em;
}

.dock-overlay__owner,
.industrial-overlay__owner {
  margin: 0.12rem 0 0;
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #c6e4d4;
}

.industrial-overlay__owner {
  color: #c5d8ee;
}

.dock-corp-link {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 600;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  cursor: pointer;
}

.dock-corp-link:hover,
.dock-corp-link:focus-visible {
  color: #f4fff8;
}

.industrial-overlay__owner .dock-corp-link:hover,
.industrial-overlay__owner .dock-corp-link:focus-visible {
  color: #f0f6ff;
}

.corp-sheet {
  position: fixed;
  inset: 0;
  z-index: 88;
  display: none;
  place-items: center;
  padding: 1.1rem;
  background: rgba(4, 8, 12, 0.62);
}

.corp-sheet.is-open {
  display: grid;
}

.corp-sheet[hidden] {
  display: none !important;
}

.corp-sheet.is-open[hidden] {
  display: grid !important;
}

.corp-sheet__card {
  width: min(36rem, 100%);
  max-height: min(78vh, 40rem);
  overflow: auto;
  padding: 0.9rem 1rem 1.05rem;
  border: 1px solid rgba(90, 140, 180, 0.4);
  border-radius: 8px;
  background: linear-gradient(165deg, rgba(16, 30, 42, 0.98), rgba(8, 14, 20, 0.98));
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  color: #e6eef8;
}

.corp-sheet__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}

.corp-sheet__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  flex-shrink: 0;
}

.corp-sheet__header h2 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.corp-sheet__kind {
  margin: 0.15rem 0 0;
  color: #9eb8c8;
  font-size: 0.78rem;
}

.corp-sheet__body {
  display: grid;
  gap: 0.7rem;
}

.corp-sheet__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  margin: 0;
}

.corp-sheet__stats div {
  padding: 0.4rem 0.5rem;
  border: 1px solid rgba(90, 140, 180, 0.22);
  border-radius: 6px;
  background: rgba(8, 16, 24, 0.55);
}

.corp-sheet__stats dt {
  margin: 0;
  color: #9eb8c8;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.corp-sheet__stats dd {
  margin: 0.15rem 0 0;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}

.corp-sheet__stats div.is-debt,
.corp-sheet__stats dd.is-debt {
  color: #e8b86d;
}

.corp-sheet__section {
  margin: 0;
  border: 1px solid rgba(90, 140, 180, 0.22);
  border-radius: 6px;
  background: rgba(8, 16, 24, 0.35);
}

.corp-sheet__h {
  margin: 0;
  padding: 0.4rem 0.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #9eb8c8;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.corp-sheet__h::-webkit-details-marker {
  display: none;
}

.corp-sheet__h::before {
  content: "▸ ";
  color: rgba(150, 180, 220, 0.7);
}

.corp-sheet__section[open] .corp-sheet__h::before {
  content: "▾ ";
}

.corp-sheet__h:hover,
.corp-sheet__h:focus-visible {
  color: #c8dce8;
  outline: none;
}

.corp-sheet__section-body {
  display: grid;
  gap: 0.45rem;
  padding: 0 0.5rem 0.55rem;
  border-top: 1px solid rgba(90, 140, 180, 0.16);
}

.corp-sheet__structure {
  padding: 0.45rem 0.5rem 0.55rem;
  border: 1px solid rgba(90, 140, 180, 0.2);
  border-radius: 6px;
  background: rgba(8, 16, 24, 0.4);
}

.corp-sheet__structure h4 {
  margin: 0 0 0.35rem;
  font-size: 0.88rem;
}

.corp-sheet__type,
.corp-sheet__op {
  font-weight: 500;
  color: #9eb8c8;
  font-size: 0.72rem;
}

.corp-sheet__hold {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.corp-sheet__hold th,
.corp-sheet__hold td {
  padding: 0.18rem 0.3rem;
  text-align: left;
  border-bottom: 1px solid rgba(90, 140, 180, 0.14);
}

.corp-sheet__hold .is-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.corp-sheet__hold tr.is-debt td {
  color: #e8b86d;
}

.corp-sheet__hold tfoot td {
  padding-top: 0.35rem;
  font-weight: 600;
  border-bottom: none;
}

.corp-sheet__empty {
  margin: 0;
  color: #8aa0b4;
  font-size: 0.78rem;
}

.dock-overlay__meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dock-overlay__actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.hold-credits {
  margin: 0 auto 0 0;
  padding: 0.22rem 0.55rem;
  border: 1px solid rgba(120, 180, 140, 0.35);
  border-radius: 999px;
  background: rgba(12, 28, 22, 0.8);
  font-size: 0.78rem;
  font-weight: 650;
  color: #c8f0d4;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

body.is-docked #hold-credits {
  display: none;
}

.dock-credits {
  margin: 0;
  padding: 0.42rem 0.75rem;
  border: 1px solid rgba(120, 180, 140, 0.35);
  border-radius: 999px;
  background: rgba(12, 28, 22, 0.8);
  font-size: 0.86rem;
  font-weight: 650;
  color: #c8f0d4;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.dock-credits[data-open-credits],
.vitals-hud__credits[data-open-credits],
.ind-credits-open {
  cursor: pointer;
}

.dock-credits[data-open-credits]:hover,
.dock-credits[data-open-credits]:focus-visible,
.vitals-hud__credits[data-open-credits]:hover,
.vitals-hud__credits[data-open-credits]:focus-visible,
.ind-credits-open:hover,
.ind-credits-open:focus-visible {
  color: #f4fff8;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.ind-credits-open {
  font: inherit;
  font-weight: 650;
  color: inherit;
}

#credit-history-sheet .corp-sheet__card {
  width: min(48rem, 100%);
}

.corp-sheet .dock-market-table td.is-debt {
  color: #ff9a8a;
}

.dock-status {
  margin: 0.45rem 0 0.55rem;
  min-height: 1.15em;
  font-size: 0.84rem;
  color: #a8c4b4;
  flex-shrink: 0;
}

.dock-status.is-error {
  color: #ff9a8a;
}

.dock-status.is-success {
  color: #9eecc0;
}

.dock-nav {
  display: flex;
  gap: 0.28rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 0.2rem;
  margin-bottom: 0.7rem;
  border: 1px solid rgba(70, 110, 90, 0.4);
  border-radius: 12px;
  background: rgba(6, 14, 12, 0.72);
  flex-shrink: 0;
  scrollbar-width: thin;
}

.dock-nav__tab {
  appearance: none;
  border: 0;
  margin: 0;
  border-radius: 9px;
  padding: 0.5rem 0.9rem;
  background: transparent;
  color: #8eae9c;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  white-space: nowrap;
}

.dock-nav__tab:hover {
  color: #d8efe0;
  background: rgba(40, 70, 55, 0.35);
}

.dock-nav__tab.is-active,
.dock-nav__tab[aria-selected="true"] {
  color: #f2fff7;
  background: linear-gradient(180deg, rgba(56, 110, 82, 0.7), rgba(34, 72, 52, 0.85));
  box-shadow: inset 0 0 0 1px rgba(130, 200, 160, 0.28);
}

.dock-nav__tab:focus-visible {
  outline: 1px solid rgba(140, 210, 170, 0.8);
  outline-offset: 1px;
}

.dock-panels {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.dock-panel {
  display: none;
  animation: dock-panel-in 160ms ease-out;
}

.dock-panel.is-active {
  display: block;
}

@keyframes dock-panel-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.dock-panel.is-active[data-dock-panel="hangar"],
.dock-panel.is-active[data-dock-panel="fit"] {
  display: flex;
  flex-direction: column;
  min-height: min(78vh, 920px);
}

.dock-panel.is-active[data-dock-panel="maps"],
.dock-panel.is-active[data-dock-panel="assets"],
.dock-panel.is-active[data-dock-panel="market"] {
  display: flex;
  flex-direction: column;
  min-height: min(70vh, 820px);
}

.dock-maps-host {
  flex: 1 1 auto;
  min-height: 22rem;
  display: flex;
  flex-direction: column;
}

.dock-panel.is-active[data-dock-panel="refinery"],
.dock-panel.is-active[data-dock-panel="factory"] {
  display: flex;
  flex-direction: column;
  min-height: min(52vh, 640px);
}

.dock-hangar {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(18rem, 1.05fr);
  grid-template-rows: minmax(0, 1fr) minmax(0, 1.35fr);
  grid-template-areas:
    "bay cargo"
    "bay locker";
  gap: 0.5rem;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
}

.dock-fit {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1.2fr) auto;
  grid-template-areas:
    "blueprint ship"
    "parts parts";
  gap: 0.5rem;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
}

.dock-pane--fit-blueprint {
  grid-area: blueprint;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: auto;
}

.dock-pane--fit-ship {
  grid-area: ship;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: auto;
}

.dock-pane--fit-parts {
  grid-area: parts;
  min-height: 0;
  overflow: auto;
}

.dock-pane--preview {
  grid-area: bay;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.dock-ship-picker {
  display: flex;
  align-items: center;
  min-width: 0;
  max-width: min(100%, 22rem);
  margin-left: auto;
}

.dock-ship-picker__btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0.32rem 0.55rem;
  border: 1px solid rgba(90, 140, 115, 0.55);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(14, 32, 24, 0.95), rgba(8, 18, 14, 0.98));
  color: #d8efe0;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.dock-ship-picker__btn:hover,
.dock-ship-picker__btn:focus-visible {
  border-color: rgba(130, 210, 170, 0.8);
  outline: none;
}

.dock-ship-picker__btn[aria-expanded="true"] {
  border-color: rgba(140, 220, 180, 0.9);
  box-shadow: inset 0 0 0 1px rgba(140, 210, 170, 0.28);
}

.dock-ship-picker__summary {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dock-ship-picker__chev {
  flex: 0 0 auto;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 1.5px solid #9ecfb8;
  border-bottom: 1.5px solid #9ecfb8;
  transform: rotate(45deg) translateY(-0.1rem);
  opacity: 0.85;
}

.dock-ship-picker__btn[aria-expanded="true"] .dock-ship-picker__chev {
  transform: rotate(225deg) translateY(-0.05rem);
}

.dock-ship-picker__backdrop {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: rgba(2, 8, 6, 0.55);
}

.dock-ship-picker__backdrop[hidden],
.dock-ship-picker__panel[hidden] {
  display: none !important;
}

.dock-ship-picker__panel {
  position: absolute;
  z-index: 21;
  top: 0.55rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(28rem, calc(100% - 1rem));
  max-height: min(78%, calc(100% - 1.1rem));
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.55rem 0.6rem 0.65rem;
  border: 1px solid rgba(100, 160, 130, 0.55);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(10, 22, 17, 0.98), rgba(5, 12, 9, 0.99));
  box-shadow:
    0 12px 36px rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px rgba(0, 0, 0, 0.25);
}

.dock-ship-picker__panel-head,
.dock-ship-picker__panel-foot {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 0 0 auto;
}

.dock-ship-picker__panel-head {
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}

.dock-ship-picker__panel-head h3 {
  margin: 0;
  font-size: 0.9rem;
}

.dock-ship-picker__panel-head .dock-hint,
.dock-ship-picker__panel-foot .dock-hint {
  margin: 0;
}

.dock-ship-picker__panel .dock-hangar-list {
  flex: 1 1 auto;
  min-height: 4rem;
  max-height: none;
  overflow: auto;
}

.dock-preview__bay {
  display: flex;
  align-items: stretch;
  gap: 0.45rem;
  min-width: 0;
  margin: 0 0 0.35rem;
}

.dock-preview__bay .dock-preview__stage {
  flex: 1 1 auto;
  min-width: 0;
}

.dock-paint {
  flex: 0 0 auto;
  width: 12.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0;
  padding: 0.4rem 0.45rem 0.5rem;
  border: 1px solid rgba(120, 150, 190, 0.28);
  border-radius: 8px;
  background: rgba(12, 22, 36, 0.55);
  min-height: 0;
  max-height: min(30vh, 260px);
  box-sizing: border-box;
  transition: width 0.16s ease;
}

.dock-paint[hidden] {
  display: none !important;
}

.dock-paint.is-collapsed {
  width: 2.35rem;
  padding: 0.3rem 0.2rem;
  align-items: center;
}

.dock-paint__head {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 0 0 auto;
}

.dock-paint.is-collapsed .dock-paint__head {
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
}

.dock-paint__toggle {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  width: 100%;
  margin: 0;
  padding: 0.28rem 0.35rem;
  border: 1px solid rgba(120, 160, 200, 0.4);
  border-radius: 5px;
  background: rgba(16, 30, 48, 0.85);
  color: #d8e8f8;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 650;
  cursor: pointer;
}

.dock-paint__toggle:hover,
.dock-paint__toggle:focus-visible {
  border-color: rgba(160, 200, 240, 0.75);
  outline: none;
}

.dock-paint.is-collapsed .dock-paint__toggle {
  flex-direction: column;
  justify-content: center;
  gap: 0.45rem;
  height: 100%;
  min-height: 7rem;
  padding: 0.35rem 0.1rem;
}

.dock-paint__toggle-label {
  min-width: 0;
}

.dock-paint.is-collapsed .dock-paint__toggle-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.68rem;
}

.dock-paint__chev {
  flex: 0 0 auto;
  width: 0.4rem;
  height: 0.4rem;
  border-right: 1.5px solid rgba(180, 210, 240, 0.85);
  border-bottom: 1.5px solid rgba(180, 210, 240, 0.85);
  transform: rotate(-45deg);
  opacity: 0.85;
}

.dock-paint.is-collapsed .dock-paint__chev {
  transform: rotate(45deg);
}

.dock-paint__apply {
  align-self: stretch;
  padding: 0.28rem 0.45rem;
  font-size: 0.72rem;
}

.dock-paint.is-collapsed .dock-paint__apply,
.dock-paint.is-collapsed .dock-paint__body {
  display: none !important;
}

.dock-paint__body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.dock-paint__body > .dock-hint {
  margin: 0;
  font-size: 0.68rem;
}

.dock-paint__row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.4rem;
  min-height: 0;
  flex: 1 1 auto;
}

.dock-paint__picker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  color: rgba(210, 225, 245, 0.88);
}

.dock-paint__picker input[type="color"] {
  width: 2.2rem;
  height: 1.6rem;
  padding: 0;
  border: 1px solid rgba(160, 190, 220, 0.45);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
}

.dock-paint__swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.24rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0.05rem 0.1rem 0.15rem 0;
  align-content: flex-start;
}

.dock-paint__swatch {
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid rgba(200, 220, 240, 0.35);
  border-radius: 3px;
  background: var(--swatch, #b0bcc8);
  cursor: pointer;
}

.dock-paint__swatch:hover,
.dock-paint__swatch:focus-visible {
  outline: none;
  border-color: rgba(240, 250, 255, 0.85);
  box-shadow: 0 0 0 1px rgba(240, 250, 255, 0.35);
}

.dock-paint__swatch.is-active {
  border-color: #f0e6a8;
  box-shadow: 0 0 0 2px rgba(240, 220, 120, 0.55);
}

.dock-bay-loadout {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-top: 0.45rem;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(70, 110, 90, 0.35);
  min-height: 0;
  flex: 1 1 auto;
}

.dock-bay-loadout > .dock-pane__head {
  margin: 0;
}

.dock-bay-loadout > .dock-hint {
  margin: 0;
}

.dock-pane--cargo {
  grid-area: cargo;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.dock-pane--locker {
  grid-area: locker;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.dock-pane--workshop-storage {
  grid-area: workshop-store;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.dock-pane__head--row {
  flex-direction: row;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.dock-pane--preview > .dock-pane__head--row {
  align-items: center;
}

.dock-pane__head--row .dock-hint,
.dock-pane__head--row .dock-preview__label {
  margin: 0;
  text-align: right;
  font-size: 0.72rem;
}

.dock-pane__head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  min-width: 0;
}

.dock-pane__head-actions .btn {
  flex: 0 0 auto;
  padding: 0.28rem 0.5rem;
  font-size: 0.72rem;
}

.dock-pane__head-actions .dock-hint {
  flex: 0 1 auto;
}

.dock-buy-bar {
  display: flex;
  gap: 0.35rem;
  align-items: flex-end;
  margin-top: 0.45rem;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(70, 110, 90, 0.35);
}

.dock-buy-bar__model {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 0.72rem;
  color: #a8c4b4;
}

.dock-buy-bar__model select {
  width: 100%;
  margin-top: 0.15rem;
}

.dock-buy-bar .btn {
  flex: 0 0 auto;
  padding: 0.38rem 0.7rem;
  font-size: 0.74rem;
}

.dock-transfer-hint {
  margin: 0.45rem 0 0.2rem;
  font-size: 0.68rem;
  color: #8fa6c8;
}

.dock-storage-prompt {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: none;
  place-items: center;
  padding: 1rem;
  background: rgba(4, 10, 14, 0.62);
  pointer-events: none;
}

/* Only .is-open shows the dialog — never key off :not([hidden]) (fights the hidden attribute). */
.dock-storage-prompt.is-open {
  display: grid;
  pointer-events: auto;
}

/* Standalone qty dialog for Hold eject (and container transfers when overlay is open). */
.container-qty-prompt {
  position: fixed;
  inset: 0;
  z-index: 90;
}

.dock-storage-prompt__card {
  width: min(22rem, 100%);
  padding: 1rem 1.1rem;
  border: 1px solid rgba(90, 140, 110, 0.45);
  border-radius: 6px;
  background: linear-gradient(165deg, rgba(18, 36, 30, 0.98), rgba(10, 20, 18, 0.98));
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.dock-storage-prompt__card h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 650;
  color: #e4f0ea;
}

.dock-storage-prompt__card .dock-hint {
  margin: 0 0 0.75rem;
}

.dock-storage-prompt__qty {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0 0 0.85rem;
  font-size: 0.72rem;
  color: #a8c4b4;
}

.dock-storage-prompt__qty input {
  width: 100%;
  margin: 0;
  padding: 0.4rem 0.5rem;
  font-size: 0.9rem;
}

.dock-storage-prompt__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
}

.dock-transfer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
  margin-top: 0.15rem;
}

.dock-transfer select,
.dock-transfer input {
  margin: 0;
  width: auto;
  min-width: 0;
  flex: 1 1 5.5rem;
  padding: 0.32rem 0.4rem;
  font-size: 0.74rem;
}

.dock-transfer input[type="number"] {
  flex: 0 0 3.6rem;
  width: 3.6rem;
}

.dock-transfer .btn {
  flex: 0 0 auto;
  padding: 0.32rem 0.55rem;
  font-size: 0.72rem;
}

.dock-ship-specs {
  margin-top: 0.45rem;
  padding-top: 0.4rem;
  border-top: 1px solid rgba(70, 110, 90, 0.35);
}

.dock-ship-specs__head {
  margin: 0 0 0.2rem;
  font-size: 0.78rem;
  color: #e4f6ec;
}

.dock-ship-specs__compare {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  color: #8aa898;
}

.dock-ship-specs__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0;
}

.dock-ship-specs__chip {
  display: inline-flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 4.4rem;
  padding: 0.28rem 0.4rem;
  border: 1px solid rgba(70, 110, 90, 0.4);
  border-radius: 7px;
  background: rgba(6, 14, 12, 0.55);
  font-variant-numeric: tabular-nums;
}

.dock-ship-specs__chip[title] {
  cursor: help;
}

.dock-ship-specs__chip em {
  font-style: normal;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #7f9a8c;
}

.dock-ship-specs__chip strong {
  font-size: 0.74rem;
  font-weight: 650;
  color: #d8efe0;
}

.dock-ship-specs__delta {
  font-size: 0.62rem;
  font-weight: 650;
}

.dock-ship-specs__delta.is-up {
  color: #9eecc0;
}

.dock-ship-specs__delta.is-down {
  color: #ffb0a0;
}

.dock-ship-specs__note {
  margin-left: 0.2rem;
  font-size: 0.72rem;
  font-weight: 500;
  color: #8fb5a4;
}

.dock-ship-specs__note.is-up {
  color: #9eecc0;
}

.dock-ship-specs__note.is-down {
  color: #ffb0a0;
}

.dock-ship-specs__delta.is-same {
  color: #7f9a8c;
  font-weight: 500;
}

.dock-hangar .hold-list {
  flex: 1 1 auto;
  max-height: none;
  min-height: 3.5rem;
  overflow: auto;
  margin-top: 0.3rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.25rem, 1fr));
  gap: 0.3rem;
  align-content: start;
}

.dock-hangar .hold-list__empty {
  grid-column: 1 / -1;
}

.dock-hangar .hold-list__row--cargo {
  margin: 0;
  padding: 0.3rem 0.4rem;
  border-radius: 6px;
  border: 1px solid rgba(70, 110, 90, 0.4);
  background: rgba(6, 14, 12, 0.55);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 0.12rem 0.3rem;
  min-width: 0;
}

.dock-hangar .hold-list__row--cargo .hold-list__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.dock-hangar .hold-list__row--cargo .hold-list__qty {
  font-variant-numeric: tabular-nums;
  color: #9eb8a8;
  white-space: nowrap;
  font-size: 0.64rem;
  line-height: 1.25;
}

.dock-hangar .hold-list__row--cargo .hold-list__phys {
  color: #7f9a8c;
  font-weight: 500;
}

.hold-list__phys {
  color: #7f9a8c;
  font-weight: 500;
}

.dock-hangar .dock-hangar-list {
  align-content: start;
  grid-auto-rows: max-content;
}

.dock-hangar .dock-bay-loadout .dock-slot-board {
  margin-top: 0.2rem;
  max-height: min(34vh, 320px);
  overflow: auto;
  flex: 1 1 auto;
  min-height: 4.5rem;
  padding: 0.45rem 0.5rem;
  border-radius: 7px;
  border: 1px solid rgba(90, 130, 110, 0.55);
  background:
    linear-gradient(180deg, rgba(6, 14, 11, 0.92), rgba(4, 10, 8, 0.96));
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
  scrollbar-gutter: stable;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12.75rem, 1fr));
  gap: 0.5rem 0.65rem;
  align-content: start;
}

.dock-hangar .dock-bay-loadout .dock-slot-bank {
  min-width: 0;
}

.dock-hangar .dock-bay-loadout .dock-slot-bank__slots {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.3rem;
}

.dock-hangar .dock-bay-loadout .dock-slot {
  width: 100%;
  max-width: none;
}

.dock-slot-board {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.dock-slot-bank {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.dock-slot-bank__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8fb5a4;
}

.dock-slot-bank__count {
  font-variant-numeric: tabular-nums;
  color: #6f8f82;
  letter-spacing: 0;
  text-transform: none;
}

.dock-slot-bank__slots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: stretch;
}

.dock-slot {
  appearance: none;
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto auto auto;
  column-gap: 0.45rem;
  row-gap: 0.1rem;
  align-items: center;
  box-sizing: border-box;
  width: 12.5rem;
  max-width: 100%;
  min-height: 3.4rem;
  min-width: 0;
  margin: 0;
  padding: 0.4rem 0.45rem;
  border-radius: 6px;
  border: 1px solid rgba(90, 130, 110, 0.45);
  background: rgba(10, 20, 16, 0.72);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: default;
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}

.dock-slot.is-interactive {
  cursor: pointer;
}

.dock-slot.is-interactive:hover,
.dock-slot.is-interactive:focus-visible {
  border-color: rgba(140, 200, 170, 0.75);
  background: rgba(18, 36, 28, 0.9);
  outline: none;
}

.dock-slot.is-picking {
  border-color: rgba(180, 210, 120, 0.9);
  background: rgba(28, 44, 22, 0.95);
  box-shadow: inset 0 0 0 1px rgba(160, 190, 90, 0.35);
}

.dock-slot.is-filled {
  border-color: rgba(110, 170, 140, 0.7);
  background:
    linear-gradient(160deg, rgba(40, 70, 55, 0.55), rgba(12, 22, 18, 0.85));
  box-shadow: inset 0 0 0 1px rgba(90, 150, 120, 0.18);
}

.dock-slot.is-empty {
  border-style: dashed;
  border-color: rgba(70, 100, 85, 0.55);
  background: rgba(8, 14, 12, 0.35);
  color: #6a8578;
}

.dock-slot.is-empty .dock-slot__name {
  font-style: italic;
  font-weight: 400;
  opacity: 0.85;
}

.dock-slot__icon {
  grid-row: 1 / span 3;
  grid-column: 1;
  display: grid;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 5px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #d7efe4;
  background: rgba(30, 55, 42, 0.9);
  border: 1px solid rgba(100, 150, 120, 0.45);
}

.dock-slot-bank--weapon .dock-slot__icon {
  background: rgba(50, 40, 28, 0.95);
  border-color: rgba(180, 130, 70, 0.5);
  color: #f0d4a8;
}

.dock-slot-bank--mining .dock-slot__icon {
  background: rgba(28, 48, 55, 0.95);
  border-color: rgba(80, 150, 170, 0.5);
  color: #b7e0ec;
}

.dock-slot-bank--cargo .dock-slot__icon {
  background: rgba(40, 38, 55, 0.95);
  border-color: rgba(130, 120, 180, 0.45);
  color: #d2c8f0;
}

.dock-slot-bank--cyber .dock-slot__icon {
  background: rgba(30, 40, 70, 0.95);
  border-color: rgba(110, 140, 200, 0.5);
  color: #c4d4f5;
}

.dock-slot.is-empty .dock-slot__icon {
  opacity: 0.45;
  background: transparent;
  border-style: dashed;
}

.dock-slot__kind {
  grid-column: 2;
  grid-row: 1;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #7ea894;
}

.dock-slot.is-filled .dock-slot__kind {
  color: #b8e0cc;
}

.dock-slot__name {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.25;
  color: #e4f2ea;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.dock-slot__stats {
  grid-column: 2;
  grid-row: 3;
  min-width: 0;
  font-size: 0.62rem;
  line-height: 1.25;
  color: #9eb8a8;
}

.dock-slot.is-empty .dock-slot__name {
  color: #7a9588;
  white-space: normal;
}

.dock-slot__meta {
  display: none;
}

.dock-slot__remove {
  grid-column: 3;
  grid-row: 1 / span 3;
  appearance: none;
  align-self: center;
  width: 1.55rem;
  height: 1.55rem;
  margin: 0;
  padding: 0;
  border-radius: 4px;
  border: 1px solid rgba(160, 90, 70, 0.55);
  background: rgba(50, 22, 16, 0.75);
  color: #ffcfc2;
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.dock-slot__remove:hover,
.dock-slot__remove:focus-visible {
  background: rgba(90, 35, 24, 0.95);
  border-color: rgba(220, 120, 90, 0.75);
  outline: none;
}

.dock-slot-board__empty {
  margin: 0;
  font-size: 0.74rem;
  color: #8fa6c8;
}

.dock-slot-bank--cyber .dock-slot.is-filled {
  border-color: rgba(120, 140, 180, 0.65);
  background:
    linear-gradient(160deg, rgba(40, 50, 80, 0.5), rgba(12, 16, 28, 0.85));
}

.dock-slot-bank--cyber .dock-slot__kind {
  color: #9ab0d4;
}

.dock-equip-picker {
  margin-top: 0.35rem;
  padding: 0.45rem 0.5rem;
  border-radius: 7px;
  border: 1px solid rgba(120, 160, 100, 0.45);
  background: rgba(12, 22, 16, 0.92);
}

.dock-equip-picker__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.dock-equip-picker__title {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #b7d4c2;
}

.dock-equip-picker__cancel {
  appearance: none;
  margin: 0;
  padding: 0.1rem 0.35rem;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #9eb8a8;
  font: inherit;
  font-size: 0.72rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dock-equip-picker__cancel:hover,
.dock-equip-picker__cancel:focus-visible {
  color: #e4f2ea;
  outline: none;
}

.dock-equip-picker__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.dock-equip-chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(100, 150, 120, 0.5);
  background: rgba(22, 40, 30, 0.95);
  color: #e4f2ea;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}

.dock-equip-chip:hover,
.dock-equip-chip:focus-visible {
  border-color: rgba(160, 210, 170, 0.85);
  background: rgba(32, 58, 42, 0.98);
  outline: none;
  transform: translateY(-1px);
}

.dock-equip-chip__mark {
  display: grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 4px;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  background: rgba(40, 70, 55, 0.9);
  color: #d7efe4;
}

.dock-equip-chip__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  text-align: left;
}

.dock-equip-chip__name {
  line-height: 1.2;
}

.dock-equip-chip__stats {
  font-size: 0.64rem;
  color: #9eb8a8;
  line-height: 1.25;
}

.dock-equip-chip__qty {
  color: #9eb8a8;
  font-size: 0.7rem;
}

.dock-equip-picker__empty {
  margin: 0;
  font-size: 0.74rem;
  color: #9aae9f;
}

.dock-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.dock-pane {
  border: 1px solid rgba(70, 110, 90, 0.45);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  background:
    linear-gradient(180deg, rgba(16, 30, 24, 0.88), rgba(8, 16, 13, 0.9));
}

.dock-pane--preview {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(70, 120, 100, 0.22), transparent 55%),
    linear-gradient(180deg, rgba(14, 26, 20, 0.92), rgba(8, 16, 13, 0.95));
}

.dock-pane--wide {
  min-height: 16rem;
}

.dock-pane--schematics {
  min-height: 18rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.dock-craft-bay {
  display: grid;
  grid-template-columns: minmax(11rem, 15rem) minmax(0, 1fr);
  gap: 0.65rem;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
}

.dock-pane--craft-bay-storage {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(70, 110, 90, 0.35);
  background: rgba(8, 16, 12, 0.55);
}

.dock-pane--craft-bay-storage .hold-list {
  flex: 1 1 auto;
  overflow: auto;
  margin: 0.35rem 0 0;
  padding: 0;
  list-style: none;
  min-height: 8rem;
  max-height: min(48vh, 22rem);
  border-radius: 4px;
  transition: background-color 0.12s ease, box-shadow 0.12s ease;
}

.dock-pane--craft-bay-storage .hold-list.is-drop-target {
  background: rgba(90, 160, 120, 0.12);
  box-shadow: inset 0 0 0 1px rgba(120, 190, 150, 0.55);
}

.dock-pane--craft-bay-storage .hold-list__row--cargo[draggable="true"] {
  cursor: grab;
  user-select: none;
  padding: 0.18rem 0.28rem;
  margin: 0 -0.28rem;
  border-radius: 3px;
}

.dock-pane--craft-bay-storage .hold-list__row--cargo[draggable="true"]:active {
  cursor: grabbing;
}

.dock-pane--craft-bay-storage .hold-list__row--cargo.is-dragging {
  opacity: 0.4;
}

.dock-craft-bay__hint {
  margin: 0.45rem 0 0;
  font-size: 0.72rem;
  line-height: 1.35;
}

.dock-pane--refinery,
.dock-pane--factory {
  min-height: 18rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.dock-pane--refinery {
  background:
    radial-gradient(ellipse at 12% 0%, rgba(90, 140, 70, 0.18), transparent 45%),
    radial-gradient(ellipse at 88% 100%, rgba(40, 80, 100, 0.12), transparent 50%),
    linear-gradient(180deg, rgba(14, 28, 20, 0.94), rgba(8, 16, 13, 0.96));
}

.dock-pane--factory {
  background:
    radial-gradient(ellipse at 14% 0%, rgba(70, 110, 150, 0.2), transparent 48%),
    radial-gradient(ellipse at 90% 100%, rgba(50, 80, 70, 0.14), transparent 52%),
    linear-gradient(180deg, rgba(14, 22, 30, 0.95), rgba(8, 14, 18, 0.97));
}

.dock-factory-ships {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 0;
}

.dock-factory-ships[hidden] {
  display: none !important;
}

.dock-ship-builds {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: 0.65rem;
  max-height: min(58vh, 32rem);
  min-height: 14rem;
  overflow: auto;
  align-content: start;
}

/* Ship cards reuse .dock-craft-card chrome; only ship-specific extras below. */
.dock-ship-build__kind {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.dock-ship-build__badge {
  display: inline-block;
  padding: 0.06rem 0.35rem;
  border-radius: 4px;
  font-size: 0.58rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #c4ddf0;
  border: 1px solid rgba(120, 160, 200, 0.55);
  background: rgba(40, 70, 100, 0.45);
}

.dock-ship-build__badge--private {
  color: #c8c4b8;
  border-color: rgba(140, 130, 100, 0.45);
  background: rgba(50, 45, 30, 0.4);
}

.dock-ship-build__badge--replacement {
  color: #d8f0c8;
  border-color: rgba(120, 180, 90, 0.55);
  background: rgba(40, 80, 35, 0.45);
}

.dock-blueprint-builds {
  margin-top: 0.85rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(70, 110, 90, 0.35);
}

.dock-blueprint-builds .dock-factory-templates {
  max-height: min(42vh, 22rem);
}

.ap-flight-log__select {
  display: block;
  margin: 0.35rem 0 0.45rem;
}

.ap-flight-log__select select {
  width: 100%;
  max-width: 18rem;
  border: 1px solid rgba(120, 160, 200, 0.45);
  border-radius: 6px;
  padding: 0.35rem 0.45rem;
  background: rgba(12, 22, 36, 0.9);
  color: #e8f2ff;
}

.dock-blueprint-global {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0.35rem 0 0.15rem;
  cursor: pointer;
}

.dock-blueprint-global input {
  margin-top: 0.15rem;
}

.dock-ship-build__bom {
  margin: 0;
}

.dock-ship-build__actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: auto;
}

.dock-ship-build__manage {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.dock-ship-build__manage .btn {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.28rem 0.45rem;
  font-size: 0.72rem;
}

.dock-blueprint-callout {
  margin-top: 0.55rem;
  padding: 0.55rem 0.65rem;
  border-radius: 6px;
  border: 1px solid rgba(100, 150, 120, 0.4);
  background: rgba(12, 28, 20, 0.55);
}

.dock-blueprint-callout__title {
  margin: 0 0 0.3rem;
  font-size: 0.84rem;
  font-weight: 650;
  color: #d8f0e2;
}

.dock-blueprint-callout__steps {
  margin: 0 0 0.2rem;
  padding-left: 1.15rem;
  font-size: 0.78rem;
  line-height: 1.4;
  color: #9bb5a8;
}

.dock-blueprint-callout__steps li + li {
  margin-top: 0.12rem;
}

.dock-ship-builds-empty {
  padding: 0.65rem 0.75rem;
  border-radius: 6px;
  border: 1px dashed rgba(90, 130, 110, 0.45);
  background: rgba(8, 16, 12, 0.4);
}

.dock-ship-builds-empty__title {
  margin: 0 0 0.35rem;
  font-size: 0.88rem;
  font-weight: 650;
  color: #d8f0e2;
}

.dock-ship-builds-empty__steps {
  margin: 0 0 0.55rem;
  padding-left: 1.15rem;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #9bb5a8;
}

.dock-ship-builds-empty__steps li + li {
  margin-top: 0.2rem;
}

.dock-factory-browse {
  display: grid;
  grid-template-columns: minmax(8.5rem, 11rem) minmax(0, 1fr);
  gap: 0.65rem;
  flex: 1;
  min-height: 0;
}

.dock-factory-browse__main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.dock-factory-browse .dock-refinery__grid {
  max-height: min(48vh, 26rem);
}

@media (max-width: 720px) {
  .dock-factory-browse {
    grid-template-columns: 1fr;
  }

  .dock-factory-browse .dock-schematics__nav {
    flex-direction: row;
    flex-wrap: wrap;
    border-right: 0;
    border-bottom: 1px solid rgba(70, 110, 90, 0.35);
    padding-right: 0;
    padding-bottom: 0.35rem;
    max-height: none;
  }
}

.dock-craft-feed {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) minmax(14rem, 1.2fr);
  gap: 0.75rem;
  margin: 0 0 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(70, 110, 90, 0.35);
  background: rgba(8, 16, 12, 0.55);
}

.dock-craft-feed__bay h4 {
  margin: 0 0 0.2rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #d8efe4;
}

.dock-craft-feed__bay .dock-hint {
  margin: 0 0 0.4rem;
}

.dock-craft-feed__bay .hold-list {
  max-height: 9.5rem;
  overflow: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dock-craft-feed__load {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.35rem 0.45rem;
  align-items: end;
}

.dock-craft-feed__load label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin: 0;
  font-size: 0.72rem;
  color: #9bb5a8;
}

.dock-craft-feed__load select,
.dock-craft-feed__load input {
  margin: 0;
  min-width: 0;
}

.dock-craft-feed__qty {
  width: 4.2rem;
}

.dock-craft-feed__qty input {
  width: 100%;
}

.dock-craft-feed .hold-list__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0;
  border-bottom: 1px solid rgba(60, 90, 75, 0.35);
  font-size: 0.78rem;
}

.dock-craft-feed .hold-list__row:last-child {
  border-bottom: 0;
}

.dock-craft-feed .hold-list__meta {
  margin-left: auto;
  display: inline-flex;
  gap: 0.25rem;
}

.dock-craft-feed .hold-list__meta .btn {
  font-size: 0.68rem;
  padding: 0.15rem 0.4rem;
}

@media (max-width: 720px) {
  .dock-craft-feed {
    grid-template-columns: 1fr;
  }

  .dock-craft-feed__load {
    grid-template-columns: 1fr 4.2rem auto;
  }
}

.dock-refinery__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  justify-content: flex-end;
}

.dock-refinery__filters {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.15rem;
  border-radius: 8px;
  background: rgba(6, 14, 10, 0.55);
  border: 1px solid rgba(70, 110, 90, 0.4);
}

.dock-refinery__filter {
  appearance: none;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #8aa898;
  font: inherit;
  font-size: 0.74rem;
  padding: 0.32rem 0.55rem;
  cursor: pointer;
}

.dock-refinery__filter:hover,
.dock-refinery__filter:focus-visible {
  color: #e4f6ec;
  outline: none;
}

.dock-refinery__filter.is-active {
  background: rgba(70, 120, 90, 0.45);
  color: #f0fff6;
}

.dock-refinery__runs {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  font-size: 0.74rem;
  color: #a8c4b4;
}

.dock-refinery__slots {
  margin: 0;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  border: 1px solid rgba(70, 110, 90, 0.4);
  background: rgba(10, 20, 14, 0.45);
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
  color: #c5ddd0;
  white-space: nowrap;
}

.dock-refinery__runs input {
  width: 3.6rem;
  margin: 0;
}

.dock-refinery__banner {
  margin: 0;
  /* Reserve progress + track + queue header + items so cards below don't jump. */
  min-height: 6.5rem;
  box-sizing: border-box;
  padding: 0.45rem 0.55rem;
  border-radius: 7px;
  font-size: 0.78rem;
  color: #b7d0c2;
  background: rgba(10, 20, 14, 0.55);
  border: 1px solid rgba(70, 110, 90, 0.35);
  overflow: hidden;
}

.dock-refinery__banner .dock-craft-progress__label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.35rem;
  margin-bottom: 0.35rem;
  min-height: 1.25rem;
}

.dock-refinery__banner .dock-craft-progress__text {
  flex: 1 1 auto;
  min-width: 0;
  font-variant-numeric: tabular-nums;
}

.dock-refinery__banner .dock-craft-progress__track {
  /* Keep track row reserved even while idle fill updates. */
  min-height: 0.45rem;
}

.dock-refinery__banner .dock-craft-queue {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.28rem;
  margin-top: 0.45rem;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(70, 110, 90, 0.28);
  min-height: 0;
  font-size: 0.72rem;
  line-height: 1.35;
  color: #9eb8a8;
}

.dock-craft-queue__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  width: 100%;
  margin: 0;
  padding: 0.1rem 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.dock-craft-queue__toggle:hover .dock-craft-queue__title {
  color: #d4ebe0;
}

.dock-craft-queue__chev {
  flex: 0 0 auto;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid #8fad9c;
  border-bottom: 2px solid #8fad9c;
  transform: rotate(45deg);
  margin-top: -0.15rem;
  opacity: 0.85;
}

.dock-craft-queue.is-collapsed .dock-craft-queue__chev {
  transform: rotate(-45deg);
  margin-top: 0.1rem;
}

.dock-craft-queue__items {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
}

.dock-craft-queue.is-collapsed .dock-craft-queue__items {
  display: none;
}

/* Mobile jobbar: keep progress visible; queue scrolls / collapses. */
@media (pointer: coarse), (max-width: 900px) {
  .industrial-overlay__jobbar .dock-refinery__banner {
    min-height: 0;
  }

  .industrial-overlay__jobbar .dock-craft-queue__items {
    max-height: 4.75rem;
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-right: 0.15rem;
  }
}

.dock-craft-queue__dur {
  margin-left: 0.28em;
  font-style: normal;
  opacity: 0.72;
  font-variant-numeric: tabular-nums;
}

.dock-craft-cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.28em;
  width: 1.15rem;
  height: 1.15rem;
  padding: 0;
  border: 1px solid rgba(160, 90, 80, 0.55);
  border-radius: 3px;
  background: rgba(40, 16, 14, 0.75);
  color: #f0c4bc;
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
}

.dock-craft-cancel:hover {
  background: rgba(70, 24, 20, 0.9);
  color: #ffe0da;
}

.dock-craft-progress__label .dock-craft-cancel {
  vertical-align: middle;
}

.dock-craft-queue__title {
  flex: 0 0 auto;
  color: #8fad9c;
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  text-transform: none;
  font-variant-numeric: tabular-nums;
}

.dock-craft-queue__item {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  border: 1px solid rgba(80, 120, 100, 0.45);
  background: rgba(12, 24, 18, 0.65);
  color: #d4ebe0;
  font-variant-numeric: tabular-nums;
}

.dock-craft-queue__sep {
  color: #6f917f;
  flex: 0 0 auto;
}

.dock-craft-progress__track {
  display: block;
  height: 0.45rem;
  border-radius: 999px;
  background: rgba(20, 36, 28, 0.9);
  overflow: hidden;
  border: 1px solid rgba(80, 120, 95, 0.45);
}

.dock-craft-progress__fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #3d7a58, #7ecf9a);
  transition: width 0.2s linear;
}

.dock-refinery__banner.is-empty {
  opacity: 0.55;
}

.dock-refinery__banner.is-error {
  color: #ffc4b8;
  background: rgba(70, 24, 18, 0.45);
  border-color: rgba(180, 80, 60, 0.45);
}

.dock-refinery__banner.is-success {
  color: #c6f0d4;
  background: rgba(24, 70, 42, 0.4);
  border-color: rgba(90, 170, 120, 0.45);
}

.dock-refinery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: 0.65rem;
  max-height: min(54vh, 30rem);
  overflow: auto;
  padding-right: 0.1rem;
}

.dock-craft-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.65rem 0.7rem 0.7rem;
  border-radius: 10px;
  border: 1px solid rgba(70, 110, 90, 0.45);
  background:
    linear-gradient(160deg, rgba(22, 40, 30, 0.95), rgba(10, 18, 14, 0.96));
  transition: border-color 140ms ease, transform 140ms ease, opacity 140ms ease;
}

.dock-craft-card.is-ready {
  border-color: rgba(110, 180, 130, 0.55);
}

.dock-craft-card.is-blocked {
  opacity: 0.92;
}

.dock-craft-card.is-fabricate {
  background:
    linear-gradient(160deg, rgba(28, 38, 48, 0.96), rgba(12, 18, 24, 0.96));
  border-color: rgba(80, 110, 140, 0.5);
}

.dock-craft-card.is-fabricate.is-ready {
  border-color: rgba(120, 160, 200, 0.55);
}

.dock-craft-card__head {
  display: grid;
  gap: 0.12rem;
}

.dock-craft-card__kind {
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7fa892;
}

.dock-craft-card.is-fabricate .dock-craft-card__kind {
  color: #8aa8c4;
}

.dock-craft-card__title {
  margin: 0;
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: 1rem;
  color: #f0fff6;
}

.dock-craft-card__out {
  margin: 0;
  font-size: 0.72rem;
  color: #8aa898;
}

.dock-craft-card__stats,
.dock-craft-card__output em.dock-craft-card__stats {
  margin: 0.12rem 0 0;
  font-style: normal;
  font-size: 0.7rem;
  line-height: 1.3;
  color: #b8dcc8;
  font-variant-numeric: tabular-nums;
}

.dock-craft-card__head > .dock-craft-card__stats {
  margin-top: 0.15rem;
}

.dock-craft-card__flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(4.5rem, 0.7fr);
  gap: 0.35rem;
  align-items: center;
}

.dock-craft-card__inputs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
}

.dock-craft-chip {
  display: inline-flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 4.2rem;
  padding: 0.28rem 0.35rem;
  border-radius: 6px;
  border: 1px solid rgba(70, 110, 90, 0.4);
  background: rgba(6, 14, 10, 0.55);
}

button.dock-craft-chip {
  appearance: none;
  margin: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

button.dock-craft-chip.is-jump strong {
  text-decoration: underline;
  text-decoration-color: rgba(160, 200, 175, 0.45);
  text-underline-offset: 0.12em;
}

button.dock-craft-chip.is-jump:hover,
button.dock-craft-chip.is-jump:focus-visible {
  border-color: rgba(130, 190, 150, 0.7);
  background: rgba(20, 40, 28, 0.7);
  outline: none;
}

button.dock-craft-chip.is-jump:hover strong,
button.dock-craft-chip.is-jump:focus-visible strong {
  text-decoration-color: rgba(190, 230, 200, 0.85);
  color: #f2fff6;
}

.dock-craft-chip em {
  font-style: normal;
  font-size: 0.68rem;
  color: #9bb5a6;
}

.dock-craft-chip strong {
  font-size: 0.72rem;
  font-weight: 600;
  color: #e4f6ec;
  line-height: 1.2;
}

.dock-craft-chip.is-ok {
  border-color: rgba(90, 160, 110, 0.5);
}

.dock-craft-chip.is-ok em {
  color: #b8f0c8;
}

.dock-craft-chip.is-short {
  border-color: rgba(180, 100, 70, 0.55);
  background: rgba(50, 22, 14, 0.35);
}

.dock-craft-chip.is-short em {
  color: #ffc4b8;
}

.dock-craft-card__arrow {
  color: #6f917f;
  font-size: 1.1rem;
}

.dock-craft-card__output {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.35rem 0.4rem;
  border-radius: 7px;
  border: 1px solid rgba(120, 180, 140, 0.35);
  background: rgba(30, 60, 42, 0.35);
}

.dock-craft-card.is-fabricate .dock-craft-card__output {
  border-color: rgba(120, 160, 200, 0.4);
  background: rgba(30, 48, 70, 0.4);
}

.dock-craft-card__output strong {
  font-size: 0.78rem;
  color: #f0fff6;
}

.dock-craft-card__output span {
  font-size: 0.68rem;
  color: #9bb5a6;
}

.dock-craft-card__block,
.dock-craft-card__ready {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.35;
  min-height: 2.1em;
}

.dock-craft-card__byproduct {
  margin: 0 0 0.2rem;
  font-size: 0.68rem;
  line-height: 1.35;
  color: #a8b4c4;
}

.dock-craft-card__block {
  color: #ffc4b8;
}

.dock-craft-card__ready {
  color: #b8f0c8;
}

.dock-craft-card__actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.35rem;
  margin-top: auto;
  align-items: stretch;
}

.dock-craft-card__tree-btn {
  flex: 0 0 auto;
  min-width: 6.5rem;
  padding-inline: 0.55rem;
  font-size: 0.72rem;
  background: rgba(8, 16, 14, 0.55);
  border-color: rgba(90, 130, 110, 0.5);
  color: #c5e0d0;
}

.dock-craft-card__tree-btn.is-open {
  border-color: rgba(140, 190, 160, 0.7);
  color: #e8fff2;
}

.dock-craft-card.is-fabricate .dock-craft-card__tree-btn {
  border-color: rgba(90, 120, 150, 0.55);
  color: #c5d8ea;
}

.dock-craft-card__btn {
  width: 100%;
  min-width: 0;
}

.dock-craft-card__btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.dock-craft-card__tree-link {
  appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: #9ed0b4;
  text-decoration: underline;
  text-underline-offset: 0.12em;
  cursor: pointer;
}

.dock-craft-card__tree-link:hover,
.dock-craft-card__tree-link:focus-visible {
  color: #d0ffe4;
  outline: none;
}

.dock-craft-card__tree {
  margin: 0.1rem 0 0;
  padding: 0.5rem 0.55rem 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(80, 120, 100, 0.45);
  background:
    linear-gradient(180deg, rgba(6, 14, 12, 0.92), rgba(4, 10, 9, 0.96));
  max-height: min(42vh, 22rem);
  overflow: auto;
}

.dock-craft-card.is-fabricate .dock-craft-card__tree {
  border-color: rgba(80, 110, 145, 0.5);
  background:
    linear-gradient(180deg, rgba(8, 14, 22, 0.94), rgba(4, 8, 14, 0.96));
}

.dock-craft-tree {
  display: grid;
  gap: 0.4rem;
}

.dock-craft-tree__lead {
  margin: 0;
  font-size: 0.68rem;
  line-height: 1.35;
  color: #9eb8a8;
}

.dock-craft-tree__empty {
  margin: 0;
  font-size: 0.72rem;
  color: #ffc4b8;
}

.dock-craft-tree__leaves {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
}

.dock-craft-tree__leaves li {
  display: inline-flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 4.5rem;
  padding: 0.22rem 0.35rem;
  border-radius: 6px;
  border: 1px solid rgba(70, 110, 90, 0.4);
  background: rgba(6, 14, 10, 0.55);
  font-size: 0.68rem;
}

.dock-craft-tree__leaves li strong {
  color: #e8f6ee;
  font-size: 0.72rem;
}

.dock-craft-tree__leaves li span {
  color: #8fa898;
}

.dock-craft-tree__leaves li.is-ok {
  border-color: rgba(110, 180, 130, 0.45);
}

.dock-craft-tree__leaves li.is-short {
  border-color: rgba(180, 100, 70, 0.55);
  background: rgba(50, 22, 14, 0.35);
}

.dock-craft-tree__list {
  list-style: none;
  margin: 0;
  padding: 0 0 0 0.65rem;
  border-left: 1px solid rgba(90, 130, 110, 0.35);
  display: grid;
  gap: 0.28rem;
}

.dock-craft-tree__list.is-root {
  padding-left: 0;
  border-left: 0;
}

.dock-craft-tree__node {
  margin: 0;
}

.dock-craft-tree__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.45rem;
}

.dock-craft-tree__jump {
  appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: #e8fff2;
  cursor: pointer;
  text-align: left;
}

.dock-craft-tree__jump strong {
  text-decoration: underline;
  text-decoration-color: rgba(160, 200, 175, 0.4);
  text-underline-offset: 0.12em;
}

.dock-craft-tree__jump:hover strong,
.dock-craft-tree__jump:focus-visible strong {
  color: #fff;
  text-decoration-color: rgba(190, 230, 205, 0.75);
  outline: none;
}

.dock-craft-tree__meta {
  font-size: 0.64rem;
  color: #7f9a8c;
}

.dock-craft-tree__node.is-leaf.is-short .dock-craft-tree__meta {
  color: #ffc4b8;
}

.dock-craft-tree__node.is-leaf.is-ok .dock-craft-tree__meta {
  color: #9ed0b4;
}

.dock-craft-tree__plan {
  display: grid;
  gap: 0.35rem;
  padding: 0.4rem 0.45rem;
  border-radius: 7px;
  border: 1px solid rgba(120, 170, 140, 0.35);
  background: rgba(20, 40, 30, 0.35);
}

.dock-craft-tree__queue {
  margin: 0;
  padding: 0 0 0 0.1rem;
  list-style: none;
  display: grid;
  gap: 0.18rem;
  font-size: 0.7rem;
  color: #d5ebe0;
}

.dock-craft-tree__q-n {
  color: #8fb5a4;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 720px) {
  .dock-craft-card__actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .dock-craft-bay {
    grid-template-columns: 1fr;
  }

  .dock-pane--craft-bay-storage .hold-list {
    max-height: 10rem;
    min-height: 5rem;
  }

  .dock-refinery__toolbar {
    justify-content: flex-start;
  }

  .dock-craft-card__flow {
    grid-template-columns: 1fr;
  }

  .dock-craft-card__arrow {
    display: none;
  }
}

.dock-schematics__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
  margin: 0;
}

.dock-schematics {
  display: grid;
  grid-template-columns: minmax(8.5rem, 11rem) minmax(0, 1fr);
  gap: 0.65rem;
  min-height: 14rem;
  flex: 1;
}

.dock-schematics__nav {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  padding-right: 0.35rem;
  border-right: 1px solid rgba(70, 110, 90, 0.35);
  max-height: min(52vh, 28rem);
  overflow: auto;
}

.dock-schematics__nav-btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #a8c4b4;
  text-align: left;
  padding: 0.4rem 0.5rem;
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.dock-schematics__nav-btn:hover,
.dock-schematics__nav-btn:focus-visible {
  background: rgba(40, 70, 55, 0.45);
  border-color: rgba(90, 140, 110, 0.45);
  color: #e4f6ec;
  outline: none;
}

.dock-schematics__nav-btn.is-active {
  background: rgba(50, 90, 70, 0.55);
  border-color: rgba(120, 180, 140, 0.55);
  color: #f0fff6;
}

.dock-schematics__tree {
  min-width: 0;
  max-height: min(52vh, 28rem);
  overflow: auto;
  padding-right: 0.15rem;
}

.dock-schematics__summary {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  color: #9bb5a6;
  line-height: 1.4;
}

.dock-tree-lane {
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(70, 110, 90, 0.28);
}

.dock-tree-lane:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.dock-tree-lane__title {
  margin: 0 0 0.2rem;
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: 0.88rem;
  color: #e4f6ec;
}

.dock-tree-lane__note {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  color: #8aa898;
}

.dock-tree-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.35rem;
}

.dock-tree-step {
  position: relative;
  min-width: 7.5rem;
  max-width: 11.5rem;
  flex: 1 1 7.5rem;
  border: 1px solid rgba(70, 110, 90, 0.5);
  border-radius: 8px;
  padding: 0.4rem 0.45rem 0.45rem;
  background:
    linear-gradient(165deg, rgba(22, 40, 32, 0.95), rgba(10, 18, 14, 0.96));
}

.dock-tree-step::after {
  content: "→";
  position: absolute;
  right: -0.55rem;
  top: 50%;
  transform: translateY(-50%);
  color: #6f917f;
  font-size: 0.85rem;
  pointer-events: none;
}

.dock-tree-step:last-child::after {
  content: none;
}

.dock-tree-step__kind {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #7fa892;
  margin-bottom: 0.15rem;
}

.dock-tree-step__label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #eef8f1;
  line-height: 1.25;
}

.dock-tree-step__detail {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.68rem;
  color: #8aa898;
  line-height: 1.3;
}

/* Category (kind) colors — border + kind/label tint; status stays on the badge */
.dock-tree-step.kind-ore {
  border-color: rgba(196, 140, 52, 0.72);
  background:
    linear-gradient(165deg, rgba(48, 36, 18, 0.96), rgba(14, 16, 12, 0.97));
}
.dock-tree-step.kind-ore .dock-tree-step__kind { color: #e0b060; }
.dock-tree-step.kind-ore .dock-tree-step__label { color: #f6e8c4; }

.dock-tree-step.kind-metal {
  border-color: rgba(160, 168, 180, 0.72);
  background:
    linear-gradient(165deg, rgba(36, 40, 48, 0.96), rgba(12, 14, 18, 0.97));
}
.dock-tree-step.kind-metal .dock-tree-step__kind { color: #c0c8d4; }
.dock-tree-step.kind-metal .dock-tree-step__label { color: #e8ecf2; }

.dock-tree-step.kind-component {
  border-color: rgba(72, 168, 176, 0.7);
  background:
    linear-gradient(165deg, rgba(18, 40, 44, 0.96), rgba(10, 16, 18, 0.97));
}
.dock-tree-step.kind-component .dock-tree-step__kind { color: #7ec8d0; }
.dock-tree-step.kind-component .dock-tree-step__label { color: #dff4f6; }

.dock-tree-step.kind-tool {
  border-color: rgba(90, 170, 120, 0.7);
  background:
    linear-gradient(165deg, rgba(18, 42, 28, 0.96), rgba(10, 18, 14, 0.97));
}
.dock-tree-step.kind-tool .dock-tree-step__kind { color: #8fd4a8; }
.dock-tree-step.kind-tool .dock-tree-step__label { color: #e8f8ee; }

.dock-tree-step.kind-weapon {
  border-color: rgba(200, 88, 72, 0.72);
  background:
    linear-gradient(165deg, rgba(48, 24, 22, 0.96), rgba(16, 12, 12, 0.97));
}
.dock-tree-step.kind-weapon .dock-tree-step__kind { color: #e89888; }
.dock-tree-step.kind-weapon .dock-tree-step__label { color: #f8e4e0; }

.dock-tree-step.kind-module {
  border-color: rgba(96, 140, 188, 0.7);
  background:
    linear-gradient(165deg, rgba(22, 32, 48, 0.96), rgba(10, 14, 20, 0.97));
}
.dock-tree-step.kind-module .dock-tree-step__kind { color: #9ab8e0; }
.dock-tree-step.kind-module .dock-tree-step__label { color: #e6eef8; }

.dock-tree-step.kind-ship {
  border-color: rgba(188, 156, 72, 0.72);
  background:
    linear-gradient(165deg, rgba(44, 36, 18, 0.96), rgba(14, 14, 12, 0.97));
}
.dock-tree-step.kind-ship .dock-tree-step__kind { color: #d8c078; }
.dock-tree-step.kind-ship .dock-tree-step__label { color: #f4ecd0; }

.dock-tree-step.kind-cyber {
  border-color: rgba(196, 96, 140, 0.7);
  background:
    linear-gradient(165deg, rgba(44, 22, 36, 0.96), rgba(16, 12, 16, 0.97));
}
.dock-tree-step.kind-cyber .dock-tree-step__kind { color: #e0a0bc; }
.dock-tree-step.kind-cyber .dock-tree-step__label { color: #f6e4ec; }

.dock-tree-step.kind-consumable {
  border-color: rgba(208, 120, 56, 0.72);
  background:
    linear-gradient(165deg, rgba(48, 30, 16, 0.96), rgba(16, 14, 10, 0.97));
}
.dock-tree-step.kind-consumable .dock-tree-step__kind { color: #e8a870; }
.dock-tree-step.kind-consumable .dock-tree-step__label { color: #f8e8d4; }

.dock-tree-step.kind-structure {
  border-color: rgba(120, 160, 200, 0.72);
  background:
    linear-gradient(165deg, rgba(22, 32, 48, 0.96), rgba(10, 14, 20, 0.97));
}
.dock-tree-step.kind-structure .dock-tree-step__kind { color: #a8c8e8; }
.dock-tree-step.kind-structure .dock-tree-step__label { color: #e8f0f8; }

.dock-tree-step.kind-structure {
  border-color: rgba(120, 160, 200, 0.72);
  background:
    linear-gradient(165deg, rgba(22, 32, 48, 0.96), rgba(10, 14, 20, 0.97));
}
.dock-tree-step.kind-structure .dock-tree-step__kind { color: #a8c8e8; }
.dock-tree-step.kind-structure .dock-tree-step__label { color: #e8f0f8; }

.dock-tree-step__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.35rem;
}

.dock-tree-step__craft {
  appearance: none;
  margin: 0;
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  border: 1px solid rgba(120, 170, 140, 0.55);
  background: rgba(36, 70, 52, 0.55);
  color: #d8f0e2;
  font: inherit;
  font-size: 0.62rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.dock-tree-step__craft:hover,
.dock-tree-step__craft:focus-visible {
  background: rgba(50, 100, 72, 0.7);
  border-color: rgba(150, 210, 170, 0.7);
  color: #f2fff6;
  outline: none;
}

.dock-tree-step__ing {
  appearance: none;
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(160, 200, 175, 0.45);
  text-underline-offset: 0.12em;
  cursor: pointer;
}

.dock-tree-step__ing:hover,
.dock-tree-step__ing:focus-visible {
  color: #f2fff8;
  text-decoration-color: rgba(190, 230, 200, 0.85);
  outline: none;
}

.dock-tree-status {
  display: inline-block;
  margin: 0;
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
  font-size: 0.62rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.dock-craft-card.is-jump-target {
  border-color: rgba(150, 210, 170, 0.85);
  box-shadow: 0 0 0 1px rgba(130, 190, 150, 0.35);
  animation: dock-craft-jump-pulse 1.4s ease;
}

@keyframes dock-craft-jump-pulse {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1);
  }
}

.dock-industrial-redirect {
  min-height: 18rem;
  justify-content: center;
  background:
    radial-gradient(circle at 18% 0%, rgba(95, 143, 255, 0.16), transparent 42%),
    linear-gradient(160deg, rgba(16, 26, 43, 0.96), rgba(8, 14, 24, 0.98));
}

.dock-industrial-redirect__copy {
  margin: 0.75rem 0 0;
  color: #b8cbe8;
  line-height: 1.5;
}

.industrial-overlay {
  position: fixed;
  /* Full-bleed console under .top-nav — same pattern as .dock-overlay (not a modal card). */
  left: 0;
  right: 0;
  top: calc(3.5rem + env(safe-area-inset-top, 0px));
  bottom: 0;
  z-index: 35;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: #e6eef8;
  background:
    radial-gradient(ellipse at 18% 0%, rgba(48, 86, 120, 0.42), transparent 42%),
    radial-gradient(ellipse at 88% 100%, rgba(28, 48, 70, 0.4), transparent 46%),
    linear-gradient(165deg, #0a1218 0%, #101820 42%, #080e14 100%);
}

.industrial-overlay[hidden] {
  display: none !important;
}

.industrial-overlay__card {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0;
  height: 100%;
  max-height: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-sizing: border-box;
  background: transparent;
  box-shadow: none;
}

.industrial-overlay__header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0;
  padding: 0.55rem 0.85rem;
  background: transparent;
  border-bottom: 1px solid rgba(90, 140, 190, 0.28);
}

.industrial-overlay__heading {
  min-width: 0;
}

.industrial-overlay__view-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-left: auto;
}

.industrial-overlay__assets,
.industrial-overlay__maps,
.industrial-overlay__market {
  flex: 1 1 auto;
  min-height: 0;
}

.industrial-overlay__assets[hidden],
.industrial-overlay__maps[hidden],
.industrial-overlay__market[hidden] {
  display: none !important;
}

.industrial-overlay__assets {
  overflow: auto;
  padding: 0.15rem 0 0.35rem;
}

.industrial-overlay__maps {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.industrial-overlay__maps-host {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.industrial-overlay__market {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.industrial-overlay__market-host {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.industrial-overlay__market-host .market-panel {
  position: static;
  inset: auto;
  width: 100% !important;
  height: 100% !important;
  max-height: none;
  display: flex;
  flex-direction: column;
  background: transparent;
  box-shadow: none;
}

.industrial-overlay__market-host .market-panel[hidden] {
  display: flex !important;
}

.industrial-overlay__market-host .flight-dialog__header {
  padding: 0 0 0.35rem;
}

.industrial-overlay__market-host .flight-dialog__close,
.industrial-overlay__market-host .panel-resize-handle {
  display: none;
}

.industrial-overlay__market-host .market-panel__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.assets-host {
  min-height: 12rem;
}

.assets-panel {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 0;
}

/* In-space Assets overlay (left-rail Maps/Assets) — same tree as dock/industrial. */
.flight-assets {
  position: fixed;
  right: 0.7rem;
  left: auto;
  top: 4.1rem;
  z-index: 12;
  width: min(560px, 92vw);
  max-height: calc(100vh - 5.2rem);
  display: none;
  flex-direction: column;
  border: 1px solid rgba(90, 120, 160, 0.4);
  border-radius: 12px;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(30, 48, 72, 0.35), transparent 55%),
    rgba(4, 8, 16, 0.92);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  backdrop-filter: blur(2px);
}

.flight-assets.is-open,
.flight-assets:not([hidden]) {
  display: flex;
}

.flight-assets[hidden] {
  display: none !important;
}

.flight-assets__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.55rem;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid rgba(80, 120, 160, 0.35);
  background: rgba(6, 14, 20, 0.45);
  flex-shrink: 0;
}

.flight-assets__header h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
  color: rgba(230, 240, 248, 0.96);
}

.flight-assets__subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  color: rgba(160, 190, 210, 0.85);
}

.flight-assets__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0.65rem 0.75rem 0.9rem;
}

/* In-space Account settings overlay — same chrome as Assets / Maps. */
.account-settings {
  position: fixed;
  right: 0.7rem;
  left: auto;
  top: 4.1rem;
  z-index: 13;
  width: min(420px, 92vw);
  max-height: calc(100vh - 5.2rem);
  display: none;
  flex-direction: column;
  border: 1px solid rgba(90, 120, 160, 0.4);
  border-radius: 12px;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(30, 48, 72, 0.35), transparent 55%),
    rgba(4, 8, 16, 0.92);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  backdrop-filter: blur(2px);
}

.account-settings.is-open,
.account-settings:not([hidden]) {
  display: flex;
}

.account-settings[hidden] {
  display: none !important;
}

.account-settings__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.55rem;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid rgba(80, 120, 160, 0.35);
  background: rgba(6, 14, 20, 0.45);
  flex-shrink: 0;
}

.account-settings__header h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
  color: rgba(230, 240, 248, 0.96);
}

.account-settings__subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  color: rgba(160, 190, 210, 0.85);
}

.account-settings__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0.65rem 0.75rem 0.9rem;
}

.account-settings__body h3 {
  margin: 0.15rem 0 0;
  font-size: 0.92rem;
  font-weight: 650;
  color: rgba(210, 225, 238, 0.94);
}

.assets-panel__refresh {
  flex: 0 0 auto;
}

.assets-tree {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.assets-tree__section-title {
  margin: 0.75rem 0 0.35rem;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(200, 220, 235, 0.9);
}

.assets-tree__node {
  border: 1px solid rgba(90, 140, 190, 0.22);
  border-radius: 0.35rem;
  background: rgba(10, 22, 34, 0.35);
  padding: 0.15rem 0.4rem 0.35rem;
}

.assets-tree__node > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
  cursor: pointer;
  list-style: none;
  padding: 0.35rem 0.15rem;
}

.assets-tree__node > summary::-webkit-details-marker {
  display: none;
}

.assets-tree__label {
  font-weight: 600;
  color: rgba(230, 240, 248, 0.95);
}

.assets-tree__meta {
  font-size: 0.85rem;
  color: rgba(160, 190, 210, 0.85);
}

.assets-tree__children {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.15rem 0 0.25rem 0.55rem;
}

.assets-tree__list {
  list-style: none;
  margin: 0;
  padding: 0.15rem 0 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.assets-tree__item {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: rgba(210, 225, 235, 0.92);
}

.assets-tree__qty {
  color: rgba(150, 185, 205, 0.9);
  font-variant-numeric: tabular-nums;
}

.assets-tree__empty,
.assets-tree__empty-page,
.assets-tree__meta-row {
  margin: 0;
  font-size: 0.88rem;
  color: rgba(150, 175, 195, 0.85);
}

.assets-tree__node--boarded {
  border-color: rgba(120, 170, 140, 0.35);
  background: rgba(16, 36, 28, 0.4);
}

.industrial-overlay__header h3 {
  margin: 0;
  font-size: 1.22rem;
  font-family: "Sora", "Segoe UI", sans-serif;
}

/* Craft progress + queue. Desktop: right of title/Runs meta. Mobile: under title. */
.industrial-overlay__jobbar {
  flex: 0 0 auto;
  padding: 0.45rem 0.85rem 0.2rem;
  background: transparent;
  border-bottom: 1px solid rgba(90, 140, 190, 0.22);
}

/* Beat later `.dock-pane__head { flex-direction: column }` (same single-class specificity). */
.dock-pane__head.industrial-overlay__recipes-head {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: stretch;
  gap: 0.75rem 1rem;
}

.industrial-overlay__recipes-meta {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  min-width: 0;
  max-width: 18rem;
}

.industrial-overlay__recipes-heading {
  min-width: 0;
}

.industrial-overlay__recipes-heading .dock-hint {
  text-align: left;
}

.industrial-overlay__recipes-meta > .dock-refinery__runs {
  margin-top: 0.1rem;
}

.industrial-overlay__recipes-head > .industrial-overlay__jobbar {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0;
  margin: 0;
  border-bottom: 0;
  display: flex;
  flex-direction: column;
}

.industrial-overlay__recipes-head .dock-refinery__banner,
.industrial-overlay__recipes-head .industrial-job-banner {
  /* Fill the right cell; drop the tall stacked-column reserve. */
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  box-sizing: border-box;
  padding: 0.4rem 0.55rem;
}

.industrial-overlay__recipes-head .dock-refinery__banner .dock-craft-progress__label {
  margin-bottom: 0.25rem;
  min-height: 0;
}

.industrial-overlay__recipes-head .dock-refinery__banner .dock-craft-queue {
  margin-top: 0.3rem;
  padding-top: 0.25rem;
}

.industrial-overlay__jobbar .industrial-job-banner,
.industrial-overlay__jobbar .dock-refinery__banner {
  margin: 0;
}

/* Desktop split: keep meta | jobbar on one row (don't wrap jobbar under Runs). */
@media (min-width: 981px) {
  body.industrial-factory-split .dock-pane__head.industrial-overlay__recipes-head,
  body.industrial-refinery-split .dock-pane__head.industrial-overlay__recipes-head {
    flex-wrap: nowrap;
  }
}

.industrial-overlay__body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0.65rem 0.85rem 0.75rem;
}

.industrial-overlay__meta {
  margin: 0.2rem 0 0;
  color: #9fb8d8;
  font-size: 0.82rem;
}

/* Transient toast — does not reserve layout (flight stack is hidden while docked). */
.industrial-overlay__toast {
  position: absolute;
  left: 50%;
  bottom: calc(0.85rem + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 6;
  width: min(28rem, calc(100% - 1.5rem));
  margin: 0;
  padding: 0.55rem 0.75rem;
  box-sizing: border-box;
  pointer-events: none;
  text-align: center;
  font-size: 0.88rem;
  line-height: 1.35;
  color: #d8e8f8;
  border: 1px solid rgba(80, 130, 180, 0.45);
  border-radius: 10px;
  background: rgba(8, 18, 32, 0.92);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.industrial-overlay__toast[hidden] {
  display: none !important;
}

.industrial-overlay__toast.is-error {
  border-color: rgba(220, 90, 80, 0.55);
  background: rgba(48, 16, 16, 0.94);
  color: #ffc8c0;
}

.industrial-overlay__toast.is-success {
  border-color: rgba(90, 190, 130, 0.5);
  background: rgba(14, 42, 28, 0.94);
  color: #c8f4d6;
}

/* Desktop: footer is Esc-only — keep toast above that strip. */
@media (min-width: 981px) {
  .industrial-overlay__header {
    padding: 0.4rem 0.85rem;
  }

  .industrial-overlay__jobbar {
    padding: 0.3rem 0.85rem 0.15rem;
  }

  .industrial-overlay__body {
    padding: 0.45rem 0.85rem 0.55rem;
  }

  .industrial-overlay__footer {
    padding: 0.35rem 0.85rem;
  }

  .industrial-overlay__toast {
    bottom: calc(2.4rem + env(safe-area-inset-bottom, 0px));
  }
}

.industrial-overlay__close {
  flex: 0 0 auto;
  min-height: 2.5rem;
  padding: 0.45rem 1.15rem;
  font-size: 0.95rem;
  white-space: nowrap;
}

.industrial-overlay__footer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(90, 140, 190, 0.28);
  background: transparent;
}

.industrial-overlay__footer .btn {
  min-height: 2.5rem;
  min-width: 7.5rem;
  font-size: 0.95rem;
}

/* No Escape key on phones / tablets. */
@media (pointer: coarse), (max-width: 900px) {
  .industrial-overlay__esc-hint {
    display: none !important;
  }

  /* One Undock is enough on mobile — keep the sticky footer control. */
  .industrial-overlay__close {
    display: none !important;
  }

  .industrial-overlay__toast {
    bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px));
  }
}

.industrial-overlay__grid {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  align-items: stretch;
  position: relative;
}

.industrial-overlay__grid[hidden] {
  display: none !important;
}

.industrial-overlay__cargo {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.industrial-overlay__cargo[hidden] {
  display: none !important;
}

.industrial-overlay__cargo-pockets {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Desktop: one Undock (header). Mobile keeps the sticky footer control. */
@media (min-width: 981px) {
  .industrial-overlay__footer .btn {
    display: none !important;
  }

  .industrial-overlay__footer {
    justify-content: flex-start;
  }

  /* Page scroll inside the console so recipe lists can grow with content. */
  .industrial-overlay {
    overflow-x: hidden;
    overflow-y: auto;
  }

  .industrial-overlay__card {
    height: auto;
    min-height: 100%;
    max-height: none;
    overflow: visible;
  }

  .industrial-overlay__header {
    position: sticky;
    top: 0;
    z-index: 3;
    background: rgba(10, 18, 24, 0.96);
    backdrop-filter: blur(6px);
  }

  .industrial-overlay__body {
    overflow: visible;
    flex: 0 0 auto;
  }

  .industrial-overlay__grid {
    flex: 0 0 auto;
    height: auto;
    align-items: start;
  }

  .industrial-overlay__pane {
    height: auto;
  }

  .industrial-overlay__pane .hold-list {
    flex: 1 1 auto;
    min-height: 0;
    max-height: min(22vh, 11rem);
    overflow: auto;
  }

  .industrial-overlay__pane--recipes .industrial-factory-browse,
  .industrial-overlay__pane--recipes .dock-factory-browse__main,
  .industrial-recipes {
    flex: 0 0 auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
  }
}

/* Desktop industrial chrome: fill viewport under header/jobbar. */
@media (min-width: 981px) {
  body.industrial-factory-split .industrial-overlay,
  body.industrial-refinery-split .industrial-overlay {
    overflow: hidden;
  }

  body.industrial-factory-split .industrial-overlay__card,
  body.industrial-refinery-split .industrial-overlay__card {
    height: 100%;
    max-height: 100%;
    overflow: hidden;
  }

  body.industrial-factory-split .industrial-overlay__body,
  body.industrial-refinery-split .industrial-overlay__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  body.industrial-factory-split .industrial-overlay__grid,
  body.industrial-refinery-split .industrial-overlay__grid {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    align-items: stretch;
  }

  body.industrial-factory-split .industrial-overlay__grid,
  body.industrial-refinery-split .industrial-overlay__grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
  }

  body.industrial-factory-split .industrial-overlay__pane--recipes,
  body.industrial-refinery-split .industrial-overlay__pane--recipes {
    max-height: none;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  body.industrial-factory-split .industrial-overlay__recipes-main,
  body.industrial-refinery-split .industrial-overlay__recipes-main {
    flex: 1 1 auto;
    min-height: 0;
  }

  body.industrial-factory-split .industrial-overlay__pane--recipes .industrial-factory-browse,
  body.industrial-factory-split .industrial-overlay__pane--recipes .dock-factory-browse__main,
  body.industrial-factory-split .industrial-recipes,
  body.industrial-refinery-split .industrial-overlay__pane--recipes .industrial-factory-browse,
  body.industrial-refinery-split .industrial-overlay__pane--recipes .dock-factory-browse__main,
  body.industrial-refinery-split .industrial-recipes {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow: auto;
  }

  body.industrial-factory-split .industrial-recipes {
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    align-content: start;
  }

  body.industrial-refinery-split .industrial-recipes {
    grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
    align-content: start;
  }

  /* Desktop Cargo tab: hold | locker | storage across the console. */
  body.industrial-factory-split .industrial-overlay__cargo,
  body.industrial-refinery-split .industrial-overlay__cargo {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
  }

  body.industrial-factory-split .industrial-overlay__cargo-pockets,
  body.industrial-refinery-split .industrial-overlay__cargo-pockets {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    height: 100%;
    min-height: 0;
  }

  body.industrial-factory-split .industrial-overlay__cargo .industrial-overlay__pane--hold,
  body.industrial-factory-split .industrial-overlay__cargo .industrial-overlay__pane--locker,
  body.industrial-factory-split .industrial-overlay__cargo .industrial-overlay__pane--storage,
  body.industrial-refinery-split .industrial-overlay__cargo .industrial-overlay__pane--hold,
  body.industrial-refinery-split .industrial-overlay__cargo .industrial-overlay__pane--locker,
  body.industrial-refinery-split .industrial-overlay__cargo .industrial-overlay__pane--storage {
    max-height: none;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  body.industrial-factory-split .industrial-overlay__cargo .industrial-overlay__pane .hold-list,
  body.industrial-refinery-split .industrial-overlay__cargo .industrial-overlay__pane .hold-list {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow: auto;
  }
}

/* Hold / storage / recipes panes fill the grid row; lists scroll inside. */
.industrial-overlay__pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

/* Author display:flex must not keep Ore/Refined visible when Factory hides them. */
.industrial-overlay__pane[hidden] {
  display: none !important;
}

.industrial-overlay__pane.dock-pane--wide {
  min-height: 0;
}

.industrial-overlay__pane > .dock-pane__head,
.industrial-overlay__pane > .hold-meter,
.industrial-overlay__pane > .industrial-overlay__jobbar {
  flex: 0 0 auto;
}

.industrial-overlay__pane .hold-list {
  flex: 1 1 auto;
  min-height: 6rem;
  max-height: none;
  overflow: auto;
}

.industrial-overlay__pane .hold-list.is-drop-target {
  outline: 2px solid rgba(120, 190, 140, 0.75);
  background: rgba(30, 70, 45, 0.28);
}

.industrial-cargo-row {
  cursor: grab;
}

.industrial-cargo-row:has(.hold-select) {
  grid-template-columns: auto 1fr auto auto;
  cursor: pointer;
}

.industrial-cargo-row:active {
  cursor: grabbing;
}

.industrial-cargo-row.is-dragging {
  opacity: 0.45;
}

.industrial-cargo-row.is-selected {
  background: rgba(60, 110, 160, 0.22);
  border-radius: 3px;
}

.industrial-cargo-row .hold-list__meta {
  margin-left: auto;
  display: inline-flex;
  gap: 0.28rem;
  align-items: center;
}

.industrial-cargo-btn {
  padding: 0.18rem 0.46rem;
  font-size: 0.68rem;
}

.industrial-overlay__recipes-main {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.industrial-overlay__pane--recipes .industrial-factory-browse {
  flex: 1 1 auto;
  min-height: 0;
}

.industrial-overlay__pane--recipes .dock-factory-browse__main {
  flex: 1 1 auto;
  min-height: 0;
}

.industrial-recipes {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
}

.industrial-factory-browse.is-refinery {
  grid-template-columns: 1fr;
}

.industrial-factory-browse.is-refinery .dock-schematics__nav {
  display: none;
}

.industrial-ships-note {
  margin: 0 0 0.55rem;
}

.industrial-factory-browse .dock-refinery__grid {
  max-height: none;
}

@media (max-width: 980px) {
  .industrial-overlay__body {
    overflow: auto;
  }

  .industrial-overlay__grid {
    grid-template-columns: 1fr;
    flex: 0 0 auto;
    height: auto;
    align-items: start;
  }

  /* D3 phone: stack hold / locker / storage. Do not let the three panes
     shrink to share one viewport height — that overflows lists under the
     next pocket header. Body scrolls the stack. */
  .industrial-overlay__cargo,
  body.industrial-factory-split .industrial-overlay__cargo,
  body.industrial-refinery-split .industrial-overlay__cargo {
    flex: 0 0 auto;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .industrial-overlay__cargo-pockets,
  body.industrial-factory-split .industrial-overlay__cargo-pockets,
  body.industrial-refinery-split .industrial-overlay__cargo-pockets {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .industrial-overlay__cargo .industrial-overlay__pane,
  body.industrial-factory-split .industrial-overlay__cargo .industrial-overlay__pane,
  body.industrial-refinery-split .industrial-overlay__cargo .industrial-overlay__pane {
    flex: 0 0 auto;
    height: auto;
    max-height: none;
    min-height: 0;
    overflow: visible;
  }

  .industrial-overlay__pane .hold-list,
  .industrial-overlay__cargo .industrial-overlay__pane .hold-list {
    flex: 0 0 auto;
    min-height: 3.5rem;
    max-height: min(36vh, 18rem);
    overflow: auto;
  }

  .industrial-overlay__recipes-main,
  .industrial-overlay__pane--recipes .industrial-factory-browse,
  .industrial-overlay__pane--recipes .dock-factory-browse__main {
    flex: 0 0 auto;
  }

  .industrial-recipes {
    flex: 0 0 auto;
    max-height: min(52vh, 28rem);
  }

  .industrial-overlay__header {
    flex-wrap: wrap;
  }

  .industrial-overlay__close,
  .industrial-overlay__footer .btn {
    width: 100%;
  }
}

.dock-tree-status.is-live {
  color: #b8f0c8;
  background: rgba(40, 110, 70, 0.35);
  border-color: rgba(90, 170, 120, 0.45);
}

.dock-tree-status.is-mount {
  color: #f0e0a8;
  background: rgba(110, 90, 30, 0.35);
  border-color: rgba(180, 150, 60, 0.45);
}

.dock-tree-status.is-planned {
  color: #a8b8c4;
  background: rgba(40, 55, 70, 0.4);
  border-color: rgba(90, 110, 130, 0.45);
}

.dock-tree-step.is-planned {
  opacity: 0.9;
}

@media (max-width: 720px) {
  .dock-schematics {
    grid-template-columns: 1fr;
  }

  .dock-schematics__nav {
    flex-direction: row;
    flex-wrap: wrap;
    border-right: 0;
    border-bottom: 1px solid rgba(70, 110, 90, 0.35);
    padding-right: 0;
    padding-bottom: 0.4rem;
    max-height: none;
  }

  .dock-tree-step::after {
    content: none;
  }
}

.dock-pane__head {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: 0.55rem;
}

.dock-pane__head h3 {
  margin: 0;
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: 0.98rem;
  color: #e4f6ec;
}

.dock-hint {
  margin: 0;
  font-size: 0.74rem;
  color: #8aa898;
  line-height: 1.35;
}

.dock-pane label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
  color: #a8c4b4;
}

.dock-pane select,
.dock-pane input {
  width: 100%;
  margin-top: 0.2rem;
  border-radius: 7px;
  border: 1px solid #2f4a3c;
  background: #0a1410;
  color: var(--text);
  padding: 0.38rem 0.46rem;
}

.dock-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: flex-end;
  margin: 0.35rem 0;
}

.dock-inline .btn {
  padding: 0.42rem 0.6rem;
  font-size: 0.78rem;
}

.dock-inline--create label {
  min-width: 6.5rem;
  flex: 1 1 6.5rem;
}

.dock-pane--cargo .hold-cargo-toolbar,
.dock-pane--locker .hold-cargo-toolbar {
  flex: 0 0 auto;
}

/* Hangar hold/locker: same list rows as industrial Cargo (not the compact card grid). */
.dock-hangar .dock-pane--cargo .hold-list,
.dock-hangar .dock-pane--locker .hold-list {
  display: flex;
  flex-direction: column;
  grid-template-columns: none;
  gap: 0.28rem;
}

.dock-hangar .dock-pane--cargo .hold-list__row--cargo:has(.hold-select),
.dock-hangar .dock-pane--locker .hold-list__row--cargo:has(.hold-select) {
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
}

.dock-pane--cargo .hold-list,
.dock-pane--locker .hold-list,
.dock-pane--workshop-storage .hold-list {
  overflow: auto;
  margin-top: 0.45rem;
  min-height: 3.2rem;
  border-radius: 4px;
  transition: background-color 0.12s ease, box-shadow 0.12s ease;
}

.dock-hangar .hold-list.is-drop-target {
  background: rgba(90, 160, 120, 0.12);
  box-shadow: inset 0 0 0 1px rgba(120, 190, 150, 0.55);
}

.dock-hangar .hold-list__row--cargo[draggable="true"] {
  cursor: grab;
  user-select: none;
}

.dock-hangar .hold-list__row--cargo[draggable="true"]:hover,
.dock-hangar .hold-list__row--cargo[draggable="true"]:focus-visible {
  border-color: rgba(120, 190, 150, 0.7);
  background: rgba(14, 32, 24, 0.75);
  outline: none;
}

.dock-hangar .hold-list__row--cargo[draggable="true"]:active {
  cursor: grabbing;
}

.dock-hangar .hold-list__row--cargo.is-dragging {
  opacity: 0.4;
}

@media (min-width: 1181px) {
  .dock-hangar .dock-pane--workshop-storage .hold-list {
    grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
  }
}

.dock-panel:not([data-dock-panel="hangar"]) .dock-pane--cargo .hold-list,
.dock-panel:not([data-dock-panel="hangar"]) .dock-pane--locker .hold-list {
  max-height: min(38vh, 280px);
}

.dock-hangar-list,
.dock-market-list,
.dock-pilots-list {
  display: grid;
  gap: 0.28rem;
  margin: 0;
  max-height: min(32vh, 240px);
  overflow: auto;
  min-height: 3rem;
  align-content: start;
  grid-auto-rows: max-content;
}

.dock-market-list,
.dock-pilots-list,
.dock-courier-list {
  max-height: min(42vh, 320px);
}

.dock-courier-post {
  display: grid;
  gap: 0.45rem;
  margin: 0 0 0.75rem;
}

.dock-courier-post .dock-field {
  margin-bottom: 0;
}

.dock-courier-cargo-pick {
  display: grid;
  gap: 0.28rem;
  max-height: min(28vh, 200px);
  overflow: auto;
  border: 1px solid rgba(60, 100, 80, 0.35);
  border-radius: 8px;
  padding: 0.4rem;
  background: rgba(6, 16, 12, 0.45);
}

.dock-pane label.dock-courier-pick-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0;
  font-size: 0.74rem;
}

.dock-pane label.dock-courier-pick-row input[type="number"] {
  width: 4.2rem;
  margin-top: 0;
  flex: 0 0 auto;
}

.dock-courier-list {
  display: grid;
  gap: 0.35rem;
  margin: 0.35rem 0 0.85rem;
  overflow: auto;
}

.dock-courier-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.45rem;
  flex-wrap: wrap;
  border: 1px solid rgba(60, 100, 80, 0.4);
  border-radius: 8px;
  padding: 0.4rem 0.5rem;
  background: rgba(6, 16, 12, 0.65);
  font-size: 0.74rem;
}

.dock-courier-row__meta {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
  flex: 1 1 auto;
}

.dock-courier-row__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  flex: 0 0 auto;
}

.dock-courier-row__status {
  color: #9eb8a8;
  font-size: 0.68rem;
}

.dock-market-list {
  margin-top: 0.55rem;
  max-height: min(48vh, 380px);
}

.dock-hangar-row,
.dock-market-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: nowrap;
  border: 1px solid rgba(60, 100, 80, 0.4);
  border-radius: 6px;
  padding: 0.28rem 0.4rem;
  background: rgba(6, 16, 12, 0.65);
  font-size: 0.74rem;
  min-height: 0;
  height: auto;
}

.dock-market-row__stats {
  color: #9eb8a8;
  font-size: 0.68rem;
}

.dock-market-heading {
  margin: 0.7rem 0 0.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9eb8a8;
}

.dock-market-row--buy {
  border-color: rgba(90, 140, 180, 0.45);
}

.dock-market-table .dock-market-row--history td:first-child {
  font-variant-numeric: tabular-nums;
  color: #9eb8c8;
}

.dock-market-table-wrap {
  overflow: auto;
  margin: 0 0 0.15rem;
  border: 1px solid rgba(90, 140, 180, 0.32);
  border-radius: 8px;
  background: rgba(6, 14, 20, 0.55);
}

.dock-market-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.dock-market-table th,
.dock-market-table td {
  padding: 0.34rem 0.5rem;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid rgba(90, 140, 180, 0.16);
  white-space: nowrap;
}

.dock-market-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(10, 22, 32, 0.96);
  color: #9eb8c8;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dock-market-table .is-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.dock-market-table tbody tr:last-child td {
  border-bottom: 0;
}

.dock-market-table tbody tr:hover {
  background: rgba(18, 40, 54, 0.55);
}

.dock-market-table .dock-market-row {
  display: table-row;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  min-height: 0;
  height: auto;
}

.dock-market-table__fill {
  width: 1%;
  min-width: 18.5rem;
  white-space: nowrap;
}

.dock-market-table .dock-market-row-actions {
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.dock-hangar-row {
  cursor: pointer;
  user-select: none;
}

.dock-hangar-row:hover,
.dock-hangar-row:focus-visible {
  border-color: rgba(120, 200, 170, 0.75);
  background: rgba(14, 36, 26, 0.85);
  outline: none;
}

.dock-hangar-row.is-active {
  border-color: rgba(110, 210, 150, 0.65);
  background: rgba(18, 42, 30, 0.75);
}

.dock-hangar-row.is-selected {
  border-color: rgba(140, 210, 170, 0.85);
  box-shadow: inset 0 0 0 1px rgba(140, 210, 170, 0.35);
}

.dock-hangar-row__meta {
  display: flex;
  flex-direction: column;
  gap: 0.06rem;
  min-width: 0;
  flex: 1 1 auto;
  line-height: 1.25;
}

.dock-hangar-row__meta .warn {
  color: #e0a070;
}

.dock-fitting-summary {
  margin-top: 0.35rem;
}

.dock-cube-blueprint {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 0;
}

.dock-cube-blueprint canvas {
  width: 100%;
  height: min(42vh, 360px);
  border: 1px solid rgba(70, 110, 90, 0.45);
  border-radius: 4px;
  background: #0b1411;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

.dock-cube-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.75rem;
  margin: 0 0 0.4rem;
  /* Opaque — sticky-over-canvas with a translucent bar flickered every WebGL frame. */
  background: #0a120e;
  border: 1px solid rgba(70, 110, 90, 0.35);
  border-radius: 6px;
  padding: 0.4rem 0.5rem;
}

.dock-cube-tools__mode {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.1rem;
  padding: 0.2rem 0.35rem;
  font-size: 0.82rem;
  color: #c8e6d4;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.dock-cube-tools__mode input {
  margin: 0;
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
}

.dock-cube-tools__mode--erase {
  color: #f0a8a8;
}

.dock-cube-tools__part select {
  min-width: 10rem;
}

.dock-cube-attach {
  display: grid;
  gap: 0.5rem;
  max-height: min(40vh, 360px);
  overflow: auto;
}

.dock-cube-attach__card {
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(70, 110, 90, 0.4);
  border-radius: 4px;
  background: rgba(12, 24, 18, 0.55);
}

.dock-cube-attach__title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 650;
  color: #c8e6d4;
}

.dock-cube-attach__block + .dock-cube-attach__block {
  margin-top: 0.55rem;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(70, 110, 90, 0.3);
}

.dock-cube-attach__label {
  margin: 0 0 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #a8c4b4;
}

.dock-cube-attach__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}

.dock-cube-attach__row select {
  min-width: 8rem;
  max-width: 16rem;
}

.dock-cube-attach__list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.78rem;
  color: #b7d0c2;
}

.dock-cube-attach__list li + li {
  margin-top: 0.25rem;
}

.dock-cube-attach__list .btn {
  margin-left: 0.35rem;
  padding: 0.1rem 0.4rem;
  font-size: 0.7rem;
}

.dock-part-models {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.45rem;
  margin-top: 0.4rem;
  max-height: min(48vh, 26rem);
  overflow: auto;
  padding-right: 0.15rem;
}

.dock-part-model {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.35rem;
  border-radius: 5px;
  border: 1px solid rgba(80, 120, 100, 0.35);
  background: rgba(8, 16, 12, 0.45);
  min-width: 0;
}

.dock-part-model__canvas {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
  border-radius: 3px;
  background: #0b1411;
  cursor: grab;
}

.dock-part-model__canvas:active {
  cursor: grabbing;
}

.dock-part-model__meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.dock-part-model__name {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dock-part-model__role {
  font-size: 0.7rem;
  color: #9bb5a8;
  line-height: 1.25;
}

.dock-part-model__swatch {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 2px;
  margin-right: 0.25rem;
  vertical-align: -0.05rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.dock-fit-board {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.35rem;
  max-height: min(42vh, 22rem);
  overflow: auto;
}

.dock-fit-slot {
  display: grid;
  grid-template-columns: minmax(5.5rem, 7.5rem) minmax(0, 1fr);
  gap: 0.35rem;
  align-items: start;
  padding: 0.35rem 0.4rem;
  border-radius: 5px;
  border: 1px solid rgba(80, 120, 100, 0.35);
  background: rgba(8, 16, 12, 0.45);
}

.dock-fit-slot.is-empty {
  border-style: dashed;
}

.dock-fit-slot.is-picking {
  border-color: rgba(140, 190, 160, 0.65);
}

.dock-fit-slot__label {
  font-size: 0.78rem;
  line-height: 1.3;
  padding-top: 0.2rem;
}

.dock-fit-slot__body {
  display: flex;
  gap: 0.3rem;
  align-items: stretch;
  min-width: 0;
}

.dock-fit-slot__main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  margin: 0;
  padding: 0.25rem 0.4rem;
  border: 0;
  border-radius: 4px;
  background: rgba(20, 36, 28, 0.75);
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.dock-fit-slot__main:hover,
.dock-fit-slot__main:focus-visible {
  background: rgba(36, 60, 48, 0.9);
}

.dock-fit-slot__main.is-empty {
  background: rgba(14, 24, 18, 0.55);
  color: rgba(180, 200, 190, 0.85);
}

.dock-fit-slot__x {
  flex: 0 0 auto;
  width: 1.7rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: rgba(60, 30, 24, 0.75);
  color: #f0c8b8;
  cursor: pointer;
  font: inherit;
  font-size: 1.1rem;
  line-height: 1;
}

.dock-fit-slot__x:hover,
.dock-fit-slot__x:focus-visible {
  background: rgba(90, 40, 30, 0.9);
}

.dock-fit-picker {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  width: 100%;
}

.dock-fit-pick {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.28rem 0.4rem;
  border: 1px solid rgba(90, 130, 110, 0.4);
  border-radius: 4px;
  background: rgba(16, 28, 22, 0.85);
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
}

.dock-fit-pick:hover:not(:disabled),
.dock-fit-pick:focus-visible:not(:disabled) {
  border-color: rgba(140, 190, 160, 0.7);
}

.dock-fit-pick:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.dock-fitting__list {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  max-height: 9rem;
  overflow: auto;
  font-size: 0.78rem;
}

.dock-fitting__list li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.2rem 0;
  border-bottom: 1px solid rgba(120, 160, 140, 0.18);
}

.dock-fitting__role {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.68rem;
  color: #8eb9a0;
  min-width: 4.5rem;
}

.dock-fitting__ok {
  color: #9fd9b8;
}

.dock-fitting__bad {
  color: #e0a070;
}

.dock-fit-cube-list {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  max-height: 16rem;
  overflow: auto;
}

.dock-fit-cube-part {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.35rem 0.45rem;
  border: 1px solid rgba(120, 150, 140, 0.28);
  background: rgba(20, 32, 28, 0.45);
}

.dock-fit-cube-part strong {
  font-size: 0.84rem;
}

.dock-blueprint-flyable {
  margin: 0.45rem 0 0.15rem;
  padding: 0.55rem 0.7rem 0.6rem;
  border: 1px solid rgba(180, 140, 70, 0.45);
  border-left: 3px solid rgba(220, 170, 80, 0.9);
  background: linear-gradient(135deg, rgba(55, 42, 18, 0.55), rgba(28, 40, 34, 0.72));
}

.dock-blueprint-flyable__title {
  margin: 0;
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #f0d090;
}

.dock-blueprint-flyable__copy {
  margin: 0.28rem 0 0;
  font-size: 0.76rem;
  line-height: 1.4;
  color: #d8c8a0;
}

.dock-blueprint-flyable__roles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.45rem;
  list-style: none;
  margin: 0.45rem 0 0;
  padding: 0;
}

.dock-blueprint-flyable__roles li {
  margin: 0;
  padding: 0.16rem 0.5rem 0.16rem 0.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: #c8b890;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(200, 160, 80, 0.28);
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  transition: color 120ms ease, background 120ms ease, border-color 120ms ease;
}

.dock-blueprint-flyable__roles li::before {
  content: "○";
  font-size: 0.78rem;
  line-height: 1;
  color: #a89060;
}

.dock-blueprint-flyable__roles li.is-done {
  color: #d8f5e4;
  background: rgba(36, 90, 62, 0.55);
  border-color: rgba(120, 210, 160, 0.55);
}

.dock-blueprint-flyable__roles li.is-done::before {
  content: "✓";
  color: #7ddea8;
  font-weight: 700;
}

.dock-blueprint-flyable__roles li.is-missing {
  color: #e8d8a8;
}

.dock-blueprint-flight-req {
  margin: 0.45rem 0 0;
  font-size: 0.76rem;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
  color: #e0a070;
}

.dock-blueprint-flight-req.dock-fitting__ok {
  color: #9fd9b8;
}

.dock-blueprint-flight-req.dock-fitting__bad {
  color: #e0a070;
}

.dock-blueprint-stats {
  margin: 0.5rem 0 0.1rem;
  padding: 0.5rem 0.65rem 0.55rem;
  border: 1px solid rgba(90, 140, 120, 0.4);
  border-left: 3px solid rgba(120, 190, 160, 0.85);
  background: linear-gradient(135deg, rgba(22, 40, 34, 0.75), rgba(18, 32, 28, 0.9));
}

.dock-blueprint-stats__title {
  margin: 0;
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #a8d4c0;
}

.dock-blueprint-stats__empty {
  margin: 0.3rem 0 0;
  font-size: 0.74rem;
  line-height: 1.35;
  color: #8aa898;
}

.dock-blueprint-stats__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(6.8rem, 1fr));
  gap: 0.35rem 0.55rem;
  margin: 0.4rem 0 0;
  padding: 0;
  list-style: none;
}

.dock-blueprint-stats__grid li {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  min-width: 0;
}

.dock-blueprint-stats__label {
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #7a9a8a;
}

.dock-blueprint-stats__value {
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
  color: #e4f6ec;
  line-height: 1.2;
}

.dock-blueprint-stats__value.is-warn {
  color: #e0a070;
}

.dock-blueprint-stats__value.is-ok {
  color: #9fd9b8;
}

.dock-blueprint-stats__note {
  margin: 0.4rem 0 0;
  font-size: 0.7rem;
  line-height: 1.35;
  color: #7a9a8a;
}

.dock-hangar-row__actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
}

.dock-hangar-row__board {
  padding: 0.28rem 0.65rem;
  font-size: 0.72rem;
}

.dock-hangar-row__badge {
  color: #9fd9b8;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.dock-preview__label {
  margin: 0;
  font-size: 0.8rem;
  color: #b7d8c6;
}

.dock-preview__stage {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(90, 140, 110, 0.35);
  background:
    radial-gradient(circle at 50% 70%, rgba(40, 80, 60, 0.35), transparent 50%),
    linear-gradient(180deg, #0a1210 0%, #121c18 100%);
  aspect-ratio: 16 / 10;
  max-height: min(30vh, 260px);
  flex: 0 1 auto;
  touch-action: none;
  cursor: grab;
  user-select: none;
}

.dock-pane--preview .dock-ship-specs {
  flex: 0 0 auto;
  min-height: 0;
}

.dock-preview__stage.is-dragging {
  cursor: grabbing;
}

#dock-ship-preview {
  display: block;
  width: 100%;
  height: 100%;
}

.dock-preview__hint {
  position: absolute;
  left: 0.65rem;
  bottom: 0.45rem;
  margin: 0;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  background: rgba(6, 14, 12, 0.65);
  font-size: 0.72rem;
  color: #9ebfad;
  pointer-events: none;
}

.dock-market-row-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.28rem;
  align-items: center;
}

.dock-market-row-actions input {
  width: 4.5rem;
  margin: 0;
}

.dock-market-qty-max {
  padding: 0.18rem 0.4rem;
  font-size: 0.72rem;
}

.dock-market-row-actions.is-empty {
  color: #8b97a8;
  font-size: 0.75rem;
}

.dock-market-qty-math {
  margin: 0;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  color: #c6e0a8;
  white-space: nowrap;
}

.dock-market-qty-math--create {
  align-self: flex-end;
  padding-bottom: 0.42rem;
}

.dock-empty {
  margin: 0;
  font-size: 0.78rem;
  color: #8aa898;
}

.dock-hint {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #8aa898;
}

/* Gate jump subspace tube — keep canvas; dim chrome around the tunnel. */
body.is-jump-transit::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 12;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 48% at 50% 50%, transparent 0%, transparent 38%, rgba(3, 14, 22, 0.55) 72%, rgba(2, 8, 14, 0.88) 100%),
    radial-gradient(circle at 50% 50%, rgba(90, 210, 230, 0.1), transparent 42%);
}

/* Eat clicks for the whole tube. Console tabs/panels set pointer-events:auto, so
   parent none is not enough; top-nav (z 40) sits above the vignette. */
body.is-jump-transit::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 45;
  pointer-events: auto;
}

body.is-jump-transit #vitals-hud,
body.is-jump-transit #canvas-hint,
body.is-jump-transit #hud-panel,
body.is-jump-transit #touch-controls,
body.is-jump-transit #context-actions,
body.is-jump-transit .ship-console,
body.is-jump-transit #mobile-tray,
body.is-jump-transit .top-nav,
body.is-jump-transit #nav-maps-panel,
body.is-jump-transit .flight-assets,
body.is-jump-transit .account-settings {
  opacity: 0.22;
  pointer-events: none;
}

body.is-docked #game-canvas,
body.is-docked #hit-flash,
body.is-docked #vitals-hud,
body.is-docked #canvas-hint,
body.is-docked #hud-panel,
body.is-docked #touch-controls,
body.is-docked #context-actions {
  display: none !important;
}

body.is-docked .ship-console {
  display: none;
}

/* Docked Maps/Assets/Market fill the station or industrial pane — do not
 * raise the flight console overlay. Hosted maps stay in-flow. */
body.is-docked .flight-assets:not(.is-open) {
  display: none !important;
}

body.is-docked #nav-maps-panel.nav-maps--hosted {
  z-index: auto;
}

/* Docked: only Chat from the flight tray (Hangar owns cargo/trade). */
body.is-docked .mobile-tray__btn[data-panel="fly"],
body.is-docked .mobile-tray__btn[data-panel="hull"],
body.is-docked .mobile-tray__btn[data-panel="status"],
body.is-docked .mobile-tray__btn[data-panel="nav"],
body.is-docked .mobile-tray__btn[data-panel="hold"],
body.is-docked .mobile-tray__btn[data-panel="maps"],
body.is-docked .mobile-tray__btn[data-panel="assets"] {
  display: none !important;
}

body.is-docked.mobile-look-dock #touch-controls,
body.is-docked #combat-feedback {
  display: none !important;
}

/* Leave room for the Chat tray over the station console. */
body.is-docked.mobile-look-dock .dock-overlay {
  bottom: calc(3.55rem + env(safe-area-inset-bottom, 0px));
}

body.is-docked.mobile-look-dock .chat-panel.is-open {
  top: calc(3.55rem + env(safe-area-inset-top, 0px));
  bottom: calc(3.7rem + env(safe-area-inset-bottom, 0px));
  max-height: none;
  height: auto;
  z-index: 16;
}

@media (max-width: 1180px) {
  .dock-hangar {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    grid-template-rows: auto;
    grid-template-areas:
      "bay cargo"
      "bay locker";
  }

  .dock-fit {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    grid-template-areas:
      "blueprint"
      "ship"
      "parts";
  }

  .dock-panel.is-active[data-dock-panel="hangar"],
  .dock-panel.is-active[data-dock-panel="fit"] {
    min-height: 0;
  }
}

@media (max-width: 760px) {
  .dock-hangar,
  .dock-split {
    grid-template-columns: 1fr;
    grid-template-areas:
      "bay"
      "cargo"
      "locker";
  }

  .dock-preview__bay {
    flex-direction: column;
  }

  .dock-paint,
  .dock-paint.is-collapsed {
    width: 100%;
    max-height: none;
  }

  .dock-paint.is-collapsed {
    width: 100%;
    padding: 0.3rem 0.4rem;
    align-items: stretch;
  }

  .dock-paint.is-collapsed .dock-paint__head {
    flex: 0 0 auto;
    align-items: stretch;
  }

  .dock-paint.is-collapsed .dock-paint__toggle {
    flex-direction: row;
    justify-content: space-between;
    height: auto;
    min-height: 0;
    padding: 0.28rem 0.4rem;
  }

  .dock-paint.is-collapsed .dock-paint__toggle-label {
    writing-mode: horizontal-tb;
    transform: none;
    text-transform: none;
    letter-spacing: normal;
    font-size: 0.72rem;
  }

  .dock-paint.is-collapsed .dock-paint__chev {
    transform: rotate(45deg);
  }

  .dock-ship-picker {
    max-width: none;
    width: min(100%, 18rem);
  }

  .dock-ship-picker__panel {
    width: calc(100% - 0.8rem);
    max-height: min(82%, calc(100% - 0.8rem));
  }

  .dock-fit {
    grid-template-columns: 1fr;
    grid-template-areas:
      "blueprint"
      "ship"
      "parts";
  }

  .dock-panel.is-active[data-dock-panel="fit"] {
    min-height: 0;
  }

  .dock-cube-blueprint canvas {
    height: min(56vh, 480px);
    min-height: 240px;
  }

  .dock-cube-tools {
    position: sticky;
    top: 0;
    z-index: 3;
    /* Fully opaque so the live blueprint canvas cannot show through / flicker. */
    background: #0a120e;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.45);
  }

  .dock-cube-tools__mode {
    min-height: 2.4rem;
    padding: 0.28rem 0.45rem;
    border-radius: 6px;
    background: rgba(16, 32, 24, 0.95);
  }

  .dock-cube-tools__mode input {
    width: 1.15rem;
    height: 1.15rem;
  }

  .dock-cube-tools__part select {
    min-width: 12rem;
    min-height: 2.4rem;
    font-size: 1rem;
  }

  .dock-hangar-row {
    flex-wrap: wrap;
  }

  .dock-overlay__header {
    flex-direction: column;
    align-items: stretch;
  }

  .dock-overlay__meta {
    justify-content: space-between;
  }

  .dock-overlay {
    overflow: auto;
  }

  .dock-overlay__inner {
    height: auto;
    min-height: 100%;
  }

  .dock-preview__stage {
    max-height: min(36vh, 280px);
  }
}

.ship-console {
  position: fixed;
  left: 0.7rem;
  top: var(--ship-console-top);
  /* Below flight-toast-stack (17) by default so Dock/Jump stay reachable. */
  z-index: 4;
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  max-height: var(--ship-console-max-height);
  pointer-events: none;
}

/*
 * Tall panels can cover the center toast stack. Raise above toasts (17) while
 * hovering the open panel, or while .is-raised (Front pin). Top-nav stays 40.
 */
@media (hover: hover) and (pointer: fine) {
  body:not(.mobile-look-dock)
    .ship-console:has(.ship-console__panel:not([hidden]):hover),
  body:not(.mobile-look-dock) .ship-console.is-raised {
    z-index: 22;
  }
}

body:not(.mobile-look-dock) .ship-console.is-raised {
  z-index: 22;
}

body:not(.mobile-look-dock) .ship-console.is-raised .ship-console__panel:not([hidden]) {
  box-shadow:
    0 16px 42px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(140, 180, 230, 0.28);
}

.ship-console__rail,
.ship-console__stage,
.ship-console__panel,
.ship-console__tab,
.ship-console__close,
.flight-dialog__close,
.flight-dialog__raise {
  pointer-events: auto;
}

.ship-console__rail {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  padding: 0.28rem;
  border: 1px solid #2e4569;
  border-radius: 12px;
  background: rgba(8, 16, 31, 0.9);
  backdrop-filter: blur(5px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.ship-console__tab {
  border: 0;
  border-radius: 8px;
  min-width: 3.4rem;
  padding: 0.48rem 0.55rem;
  background: transparent;
  color: #9db4d4;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.ship-console__tab[aria-pressed="true"] {
  background: rgba(70, 120, 190, 0.35);
  color: #e8f2ff;
}

.ship-console__tab:focus-visible {
  outline: 1px solid rgba(140, 180, 230, 0.8);
}

.ship-console__stage {
  min-width: 0;
}

.ship-console__panel {
  width: min(46vw, 560px);
  max-height: var(--ship-console-max-height);
  border: 1px solid #2e4569;
  border-radius: 12px;
  background: rgba(8, 16, 31, 0.92);
  backdrop-filter: blur(5px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.ship-console__panel[hidden] {
  display: none !important;
}

.ship-console__panel-body {
  /* padding/overflow live on .flight-dialog__body; keep class for layout hooks */
  max-height: none;
}

.ap-flight-log {
  margin-top: 0.85rem;
  padding-top: 0.7rem;
  border-top: 1px solid rgba(120, 150, 190, 0.22);
}

/* Admin tray — same default footprint as Nav / Ship (shared resize caps). */
.ship-console__panel.admin-panel {
  position: relative;
  max-height: var(--ship-console-max-height);
}

.ship-console__panel.admin-panel .ap-flight-log {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.admin-panel__nav {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  margin: 0 0 0.75rem;
  padding: 0.12rem 0 0.55rem;
  border-bottom: 1px solid rgba(120, 150, 190, 0.28);
  background: linear-gradient(
    180deg,
    rgba(8, 16, 31, 0.98) 0%,
    rgba(8, 16, 31, 0.96) 72%,
    rgba(8, 16, 31, 0.88) 100%
  );
  backdrop-filter: blur(4px);
}

.admin-panel__nav-btn {
  appearance: none;
  border: 1px solid rgba(120, 150, 190, 0.35);
  background: rgba(12, 22, 38, 0.55);
  color: rgba(210, 225, 245, 0.88);
  font: inherit;
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  padding: 0.22rem 0.52rem;
  border-radius: 2px;
  cursor: pointer;
}

.admin-panel__nav-btn:hover {
  border-color: rgba(160, 195, 235, 0.55);
  color: #eef5ff;
}

.admin-panel__nav-btn[aria-pressed="true"] {
  background: rgba(70, 120, 180, 0.35);
  border-color: rgba(140, 190, 240, 0.65);
  color: #f4f8ff;
}

.admin-compare-wrap {
  margin-top: 0.55rem;
  overflow: auto;
  max-height: min(52vh, 520px);
  border: 1px solid rgba(120, 150, 190, 0.22);
  background: rgba(6, 12, 22, 0.45);
}

.admin-compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.admin-compare-table th,
.admin-compare-table td {
  padding: 0.28rem 0.45rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(120, 150, 190, 0.12);
}

.admin-compare-table thead th {
  position: sticky;
  top: 0;
  background: rgba(12, 22, 38, 0.96);
  font-weight: 600;
  letter-spacing: 0.03em;
}

.admin-compare-table__group th {
  background: rgba(40, 70, 110, 0.35);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.68rem;
  color: rgba(200, 220, 245, 0.9);
}

.admin-compare-table__row--diff td,
.admin-compare-table__row--diff th {
  background: rgba(160, 70, 40, 0.22);
}

.admin-compare-table tbody th {
  font-weight: 500;
  width: 38%;
}

.admin-logs {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

.admin-logs[hidden],
[data-admin-view-pane][hidden] {
  display: none !important;
}

.admin-logs-list {
  list-style: none;
  margin: 0.55rem 0 0;
  padding: 0;
  overflow: auto;
  max-height: min(52vh, 520px);
  border: 1px solid rgba(120, 150, 190, 0.22);
  background: rgba(6, 12, 22, 0.45);
}

.admin-logs-list__item {
  display: grid;
  grid-template-columns: 4.6rem 3.4rem minmax(5rem, 9rem) 1fr;
  gap: 0.35rem 0.55rem;
  align-items: baseline;
  padding: 0.38rem 0.55rem;
  border-bottom: 1px solid rgba(100, 130, 170, 0.14);
  font-size: 0.78rem;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}

.admin-logs-list__item--wire {
  grid-template-columns: 4.6rem 3.4rem minmax(4.5rem, 8rem) 3.6rem 1fr;
  cursor: pointer;
}

.admin-logs-list__item--wire:hover,
.admin-logs-list__item--wire:focus-visible {
  background: rgba(120, 160, 210, 0.08);
}

.admin-logs-list__item--wire.is-open {
  background: rgba(120, 160, 210, 0.1);
}

.admin-logs-list__item:last-child {
  border-bottom: 0;
}

.admin-logs-list__time {
  color: rgba(170, 190, 215, 0.72);
}

.admin-logs-list__sev {
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.7rem;
}

.admin-logs-list__item--error .admin-logs-list__sev {
  color: #ff8f8f;
}

.admin-logs-list__item--warn .admin-logs-list__sev {
  color: #ffd27a;
}

.admin-logs-list__item--info .admin-logs-list__sev {
  color: #9ec8ff;
}

.admin-logs-list__item--tx .admin-logs-list__sev {
  color: #7ee0b8;
}

.admin-logs-list__item--api .admin-logs-list__sev {
  color: #e0c07e;
}

.admin-logs-list__kind {
  color: rgba(220, 235, 255, 0.92);
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
  font-size: 0.74rem;
}

.admin-logs-list__detail {
  color: rgba(190, 208, 230, 0.88);
  word-break: break-word;
}

.admin-logs-list__size {
  color: rgba(170, 190, 215, 0.78);
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
  font-size: 0.72rem;
  text-align: right;
}

.admin-logs-list__json-wrap {
  grid-column: 1 / -1;
  position: relative;
  margin: 0.15rem 0 0;
}

.admin-logs-list__json {
  margin: 0;
  padding: 0.5rem 3.6rem 0.55rem 0.55rem;
  max-height: 18rem;
  overflow: auto;
  cursor: text;
  white-space: pre;
  color: rgba(210, 228, 245, 0.92);
  background: rgba(4, 8, 16, 0.55);
  border: 1px solid rgba(120, 150, 190, 0.18);
  border-radius: 4px;
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
  font-size: 0.72rem;
  line-height: 1.4;
}

.admin-logs-list__json-copy {
  position: absolute;
  top: 0.28rem;
  right: 0.28rem;
  z-index: 1;
  font: inherit;
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.14rem 0.38rem;
  border: 1px solid rgba(90, 200, 250, 0.35);
  background: rgba(8, 14, 22, 0.88);
  color: #9ec9e8;
  border-radius: 3px;
  cursor: pointer;
}

.admin-logs-list__json-copy:hover {
  border-color: rgba(90, 200, 250, 0.7);
  color: #dff4ff;
}

.admin-logs-list__json-copy.is-copied {
  color: #9ee6b8;
  border-color: rgba(80, 200, 140, 0.55);
}

.admin-logs-list__empty {
  padding: 0.85rem 0.65rem;
  color: rgba(170, 190, 215, 0.7);
  font-size: 0.82rem;
}

@media (max-width: 720px) {
  .admin-logs-list__item {
    grid-template-columns: 4.2rem 3.2rem 1fr;
  }
  .admin-logs-list__item--wire {
    grid-template-columns: 4.2rem 3.2rem 3.2rem 1fr;
  }
  .admin-logs-list__detail {
    grid-column: 1 / -1;
  }
}

.ship-console__panel.admin-panel.is-resizing {
  user-select: none;
}

/* Admin UI debug mode — control outlines + selector labels */
.ui-debug-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  pointer-events: none;
  overflow: hidden;
}

.ui-debug-marker {
  position: fixed;
  box-sizing: border-box;
  pointer-events: none;
  border-radius: 2px;
}

.ui-debug-marker--control {
  border: 1.5px solid rgba(255, 210, 70, 0.95);
  background: rgba(255, 200, 40, 0.08);
  box-shadow: inset 0 0 0 1px rgba(20, 20, 10, 0.35);
}

.ui-debug-marker--region {
  border: 1.5px dashed rgba(80, 220, 200, 0.9);
  background: rgba(40, 180, 160, 0.05);
}

.ui-debug-marker__label {
  position: absolute;
  left: 0;
  top: 0;
  transform: translateY(-100%);
  max-width: min(300px, 75vw);
  padding: 0.05rem 0.28rem;
  border-radius: 2px 2px 0 0;
  background: rgba(12, 16, 10, 0.92);
  color: #ffe28a;
  font: 600 10px/1.25 ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
  white-space: pre-line;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.01em;
}

.ui-debug-marker--region > .ui-debug-marker__label {
  color: #9cf0e4;
}

.ui-debug-marker--control.is-label-inside > .ui-debug-marker__label,
.ui-debug-marker--region.is-label-inside > .ui-debug-marker__label {
  transform: none;
  border-radius: 0 0 2px 0;
}

.ap-flight-log__title {
  margin: 0 0 0.35rem;
  font-weight: 700;
  font-size: 0.92rem;
}

.ap-flight-log__subtitle {
  margin: 0.75rem 0 0.35rem;
  font-weight: 700;
  font-size: 0.88rem;
  color: rgba(200, 220, 245, 0.9);
}

.ap-flight-log__toggle {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.2rem 0;
  cursor: pointer;
  font-size: 0.88rem;
}

.ap-flight-log__radios {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin: 0.15rem 0 0.1rem;
}

.ap-flight-log__radios .ap-flight-log__toggle {
  margin: 0;
}

.ap-flight-log__meta {
  margin: 0.25rem 0 0.45rem;
  color: rgba(200, 220, 245, 0.78);
  font-size: 0.8rem;
}

.npc-assets-panel {
  margin: 0.2rem 0 0.45rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.22);
  max-height: 18rem;
  overflow: auto;
}

.npc-assets-panel__section {
  margin: 0 0 0.55rem;
}

.npc-assets-panel__section:last-child {
  margin-bottom: 0;
}

.npc-assets-panel__title {
  margin: 0 0 0.25rem;
  color: rgba(200, 220, 245, 0.9);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.npc-assets-panel__list {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.12rem 0.65rem;
}

.npc-assets-panel__list > div {
  display: contents;
}

.npc-assets-panel__list dt {
  margin: 0;
  color: rgba(200, 220, 245, 0.78);
  font-size: 0.78rem;
  font-weight: 400;
}

.npc-assets-panel__list dd {
  margin: 0;
  color: rgba(230, 240, 255, 0.92);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.npc-assets-panel__place {
  margin: 0.35rem 0 0;
}

.npc-assets-panel__place > summary {
  cursor: pointer;
  color: rgba(200, 220, 245, 0.88);
  font-size: 0.78rem;
  font-weight: 600;
}

.npc-assets-panel__bay {
  margin: 0.25rem 0 0 0.35rem;
  color: rgba(180, 200, 230, 0.7);
  font-size: 0.72rem;
}

.npc-assets-panel__empty {
  margin: 0;
  color: rgba(180, 200, 230, 0.65);
  font-size: 0.78rem;
}

.npc-tick-slow-wrap {
  margin: 0.15rem 0 0;
  max-height: 18rem;
  overflow: auto;
}

.npc-tick-slow-wrap[hidden] {
  display: none;
}

.npc-tick-slow {
  width: 100%;
  border-collapse: collapse;
  color: rgba(200, 220, 245, 0.88);
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}

.npc-tick-slow th,
.npc-tick-slow td {
  margin: 0;
  padding: 0.18rem 0.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: right;
  white-space: nowrap;
  vertical-align: baseline;
}

.npc-tick-slow th:first-child,
.npc-tick-slow td:first-child,
.npc-tick-slow th:nth-child(2),
.npc-tick-slow td:nth-child(2),
.npc-tick-slow th:nth-child(6),
.npc-tick-slow td:nth-child(6),
.npc-tick-slow th:last-child,
.npc-tick-slow td:last-child {
  text-align: left;
}

.npc-tick-slow__act-h {
  min-width: 7.5rem;
}

.npc-tick-slow__act {
  white-space: nowrap;
  vertical-align: middle;
}

.npc-tick-slow__btn {
  display: inline-block;
  margin: 0 0.2rem 0.15rem 0;
  padding: 0.1rem 0.35rem;
  font-size: 0.68rem;
  line-height: 1.2;
}

.npc-tick-slow__btn.is-active {
  border-color: rgba(200, 180, 80, 0.55);
  color: #e8d48a;
  background: rgba(90, 70, 20, 0.45);
}

.npc-tick-slow tbody tr.is-leased {
  background: rgba(90, 70, 20, 0.22);
}

.npc-tick-slow tbody tr.is-spectating td:first-child code {
  color: #e8d48a;
}

.npc-tick-slow thead th {
  color: rgba(170, 195, 225, 0.72);
  font-weight: 600;
  font-size: 0.64rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

.npc-tick-slow thead th.is-sortable {
  cursor: pointer;
  user-select: none;
}

.npc-tick-slow thead th.is-sortable:hover {
  color: rgba(220, 235, 255, 0.95);
}

.npc-tick-slow thead th.is-sorted {
  color: rgba(255, 220, 140, 0.95);
}

.npc-tick-slow thead th.is-sorted::after {
  display: inline-block;
  margin-left: 0.2rem;
  font-size: 0.58rem;
  opacity: 0.9;
}

.npc-tick-slow thead th.is-sorted-asc::after {
  content: "▲";
}

.npc-tick-slow thead th.is-sorted-desc::after {
  content: "▼";
}

.npc-tick-slow tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.16);
}

.npc-tick-slow td.is-hot {
  color: rgba(255, 196, 120, 0.95);
  font-weight: 600;
}

.npc-tick-slow__id {
  color: rgba(230, 240, 255, 0.95);
  font-size: inherit;
}

.npc-tick-slow__note {
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(180, 200, 230, 0.7);
}

.npc-tick-slow__note.is-err {
  color: rgba(255, 150, 140, 0.92);
}

.npc-tick-panel {
  margin: 0.2rem 0 0.45rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.22);
}

.npc-tick-panel__status {
  margin: 0 0 0.35rem;
  color: rgba(200, 220, 245, 0.88);
  font-size: 0.8rem;
  font-weight: 600;
}

.npc-tick-panel__status.is-ok {
  color: #9dffc2;
}

.npc-tick-panel__status.is-warn {
  color: #ffc27a;
}

.npc-tick-panel__status.is-bad {
  color: #ff9b8a;
}

.npc-tick-panel__grid {
  display: grid;
  grid-template-columns: 7.25rem 1fr;
  gap: 0.2rem 0.55rem;
  margin: 0;
}

.npc-tick-panel__grid > div {
  display: contents;
}

.npc-tick-panel__grid dt {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem;
  margin: 0;
  color: rgba(170, 190, 220, 0.65);
  font-size: 0.72rem;
  font-weight: 500;
}

.npc-tick-panel__grid dd {
  margin: 0;
  color: rgba(220, 232, 248, 0.92);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.npc-tick-panel__phases-label {
  margin: 0.45rem 0 0.2rem;
  color: rgba(170, 190, 220, 0.65);
  font-size: 0.72rem;
  font-weight: 500;
}

.npc-tick-phases-wrap {
  margin: 0.15rem 0 0;
  overflow-x: auto;
}

.npc-tick-phases-wrap[hidden] {
  display: none;
}

.npc-tick-phases {
  width: 100%;
  border-collapse: collapse;
  color: rgba(200, 220, 245, 0.88);
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}

.npc-tick-phases th,
.npc-tick-phases td {
  margin: 0;
  padding: 0.18rem 0.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: right;
  white-space: nowrap;
  vertical-align: baseline;
}

.npc-tick-phases th:first-child,
.npc-tick-phases td:first-child,
.npc-tick-phases th:nth-child(2),
.npc-tick-phases td:nth-child(2),
.npc-tick-phases th:last-child,
.npc-tick-phases td:last-child {
  text-align: left;
}

.npc-tick-phases thead th {
  color: rgba(170, 195, 225, 0.72);
  font-weight: 600;
  font-size: 0.64rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

.npc-tick-phases tbody tr:nth-child(even):not(.npc-tick-phases__sep) {
  background: rgba(0, 0, 0, 0.16);
}

.npc-tick-phases tbody tr.is-hot td {
  color: rgba(255, 196, 120, 0.95);
  font-weight: 600;
}

.npc-tick-phases__name {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  color: rgba(230, 240, 255, 0.95);
}

.npc-tick-phases__kinds {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  align-items: center;
}

.npc-tick-phases__note {
  max-width: 8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(180, 200, 230, 0.7);
}

.npc-tick-phases__sep td {
  padding-top: 0.4rem;
  border-bottom-color: rgba(80, 120, 180, 0.28);
  color: rgba(170, 190, 220, 0.65);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-align: left;
}

.npc-tick-kind {
  display: inline-block;
  padding: 0.02rem 0.28rem;
  border-radius: 3px;
  border: 1px solid transparent;
  font-size: 0.62rem;
  font-weight: 700;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  letter-spacing: 0.02em;
  line-height: 1.25;
  text-transform: uppercase;
  white-space: nowrap;
  vertical-align: middle;
}

.npc-tick-kind--api {
  color: #9ec8ff;
  background: rgba(70, 130, 220, 0.18);
  border-color: rgba(110, 160, 230, 0.35);
}

.npc-tick-kind--db {
  color: #9ae0ff;
  background: rgba(40, 150, 180, 0.18);
  border-color: rgba(80, 180, 210, 0.38);
}

.npc-tick-kind--ws {
  color: #9dffc8;
  background: rgba(50, 160, 110, 0.18);
  border-color: rgba(90, 200, 140, 0.35);
}

.npc-tick-kind--file {
  color: #ffd59a;
  background: rgba(180, 130, 50, 0.16);
  border-color: rgba(220, 170, 80, 0.35);
}

.npc-tick-kind--cpu {
  color: #d4c2ff;
  background: rgba(120, 90, 200, 0.16);
  border-color: rgba(160, 130, 230, 0.32);
}

.npc-tick-kind--wall {
  color: #c8d4e8;
  background: rgba(140, 160, 190, 0.14);
  border-color: rgba(160, 180, 210, 0.3);
}

.npc-tick-kind--meta {
  color: #b8c0d0;
  background: rgba(120, 130, 150, 0.14);
  border-color: rgba(150, 160, 180, 0.28);
}

.npc-tick-panel__grid[hidden],
.npc-tick-phases-wrap[hidden],
.npc-tick-panel__phases-label[hidden] {
  display: none !important;
}

.npc-tick-help {
  margin: 0.15rem 0 0.55rem;
  border: 1px solid rgba(100, 130, 175, 0.28);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.16);
}

.npc-tick-help__summary {
  cursor: pointer;
  list-style: none;
  padding: 0.35rem 0.55rem;
  color: rgba(180, 205, 235, 0.88);
  font-size: 0.74rem;
  font-weight: 600;
  user-select: none;
}

.npc-tick-help__summary::-webkit-details-marker {
  display: none;
}

.npc-tick-help__summary::before {
  content: "▸ ";
  color: rgba(150, 180, 220, 0.7);
}

.npc-tick-help[open] .npc-tick-help__summary::before {
  content: "▾ ";
}

.npc-tick-help__summary:hover,
.npc-tick-help__summary:focus-visible {
  color: rgba(210, 225, 250, 0.98);
  outline: none;
}

.npc-tick-help__body {
  padding: 0 0.55rem 0.55rem;
  border-top: 1px solid rgba(100, 130, 175, 0.2);
}

.npc-tick-help__body > p {
  margin: 0.4rem 0 0.35rem;
  color: rgba(180, 200, 230, 0.72);
  font-size: 0.7rem;
  line-height: 1.4;
}

.npc-tick-help__label {
  margin: 0.55rem 0 0.2rem !important;
  color: rgba(170, 195, 225, 0.8) !important;
  font-weight: 600;
}

.npc-tick-help__dl {
  display: grid;
  gap: 0.25rem 0.5rem;
  margin: 0;
}

.npc-tick-help__dl > div {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 0.25rem 0.45rem;
  align-items: start;
}

.npc-tick-help__dl dt {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.18rem;
  margin: 0;
  color: rgba(190, 210, 240, 0.9);
  font-size: 0.7rem;
  font-weight: 600;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
}

.npc-tick-help__dl dd {
  margin: 0;
  color: rgba(175, 195, 225, 0.72);
  font-size: 0.7rem;
  line-height: 1.35;
}

.npc-tick-help__dl code {
  font-size: 0.92em;
  color: rgba(200, 220, 245, 0.88);
}

.ap-flight-log__select input[type="number"] {
  width: 5.5rem;
  margin-left: 0.5rem;
  padding: 0.25rem 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.35);
  color: inherit;
  font: inherit;
}

.ap-flight-log__select--pair {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 0.35rem;
}

.ap-flight-log__select--pair > span:first-child {
  min-width: 9.25rem;
}

.ap-flight-log__time-pair {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 0.3rem;
  margin-left: 0.35rem;
}

.ap-flight-log__time-pair input[type="number"] {
  width: 4.75rem;
  margin-left: 0;
}

.ap-flight-log__unit {
  color: rgba(180, 200, 230, 0.7);
  font-size: 0.78rem;
  min-width: 1.15rem;
}

.ap-flight-log__actions--tight {
  margin-top: 0.35rem;
}

.ap-flight-log__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.ap-flight-log__actions .btn {
  padding: 0.28rem 0.55rem;
  font-size: 0.78rem;
}

.ap-flight-log__hint {
  margin: 0.5rem 0 0;
  color: rgba(180, 200, 230, 0.62);
  font-size: 0.72rem;
  line-height: 1.35;
}

.ap-flight-log__hint--tight {
  margin: 0.15rem 0 0;
}

.look-focus-banner,
.npc-spectate-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  /* Fill the already-centered #flight-toast-stack. A wider explicit width
     (e.g. 92vw inside an 88vw stack) overflowed right and looked left-shifted. */
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin: 0 0 0.35rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid rgba(220, 180, 70, 0.55);
  background: rgba(18, 16, 8, 0.82);
  color: #f3e2a6;
  font: 500 12px/1.35 ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
  pointer-events: auto;
}

.npc-spectate-banner {
  flex-direction: column;
  align-items: stretch;
  gap: 0.4rem;
}

.npc-spectate-banner__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
}

.npc-spectate-banner__toggle {
  appearance: none;
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.65rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: default;
}

.npc-spectate-banner__chev {
  display: none;
  flex: 0 0 auto;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid #c9a84a;
  border-bottom: 2px solid #c9a84a;
  transform: rotate(45deg);
  margin: 0 0.15rem 0.1rem 0;
  transition: transform 0.15s ease;
}

.npc-spectate-banner.is-collapsed .npc-spectate-banner__chev {
  transform: rotate(-45deg);
  margin-bottom: 0;
}

.npc-spectate-banner__detail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 0.65rem;
  min-width: 0;
}

.look-focus-banner {
  border-color: rgba(120, 180, 220, 0.55);
  background: rgba(10, 16, 22, 0.84);
  color: #d8e8f4;
}

.npc-spectate-options {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  margin: 0.35rem 0 0.45rem;
  padding: 0;
}

.npc-spectate-options__label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #9bb08a;
}

.npc-spectate-options__select {
  width: 100%;
  min-height: 2.35rem;
  margin: 0;
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(120, 150, 100, 0.4);
  border-radius: 6px;
  background: rgba(8, 16, 12, 0.85);
  color: #d8e8d4;
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.npc-spectate-options__select:focus-visible {
  outline: none;
  border-color: rgba(200, 180, 80, 0.75);
  box-shadow: 0 0 0 1px rgba(200, 180, 80, 0.35);
}

.npc-spectate-options__select option {
  min-width: 0;
  line-height: 1.25;
}

.npc-lease-select option.is-leased {
  font-weight: 700;
  color: #e8d48a;
  background: rgba(90, 70, 20, 0.55);
}

.npc-lease-table-wrap {
  margin: 0.15rem 0 0.45rem;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(200, 180, 80, 0.35);
  border-radius: 6px;
  background: rgba(40, 32, 12, 0.45);
}

.npc-lease-table-wrap[hidden] {
  display: none !important;
}

.npc-lease-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  color: #e8d48a;
}

.npc-lease-table th,
.npc-lease-table td {
  padding: 0.28rem 0.4rem;
  border-bottom: 1px solid rgba(200, 180, 80, 0.18);
  text-align: left;
  white-space: nowrap;
  vertical-align: middle;
}

.npc-lease-table th {
  font-weight: 600;
  color: #f0dca0;
  background: rgba(0, 0, 0, 0.2);
}

.npc-lease-table tbody tr:last-child td {
  border-bottom: none;
}

.npc-lease-table tbody tr.is-spectating {
  background: rgba(70, 120, 90, 0.22);
}

.npc-lease-table__note {
  max-width: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  color: #d8c090;
}

.npc-lease-table__act {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.npc-lease-table__btn {
  padding: 0.12rem 0.4rem !important;
  font-size: 0.72rem !important;
  line-height: 1.2 !important;
}

.npc-lease-table__btn.is-active {
  border-color: rgba(120, 200, 150, 0.55);
  color: #b8f0c8;
}

.look-focus-banner[hidden],
.npc-spectate-banner[hidden] {
  display: none !important;
}

.look-focus-banner__main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.65rem;
  min-width: 0;
}

.look-focus-banner__label,
.npc-spectate-banner__label {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #c9a84a;
  font-size: 10px;
}

.look-focus-banner__label {
  color: #7eb4e0;
}

.look-focus-banner__name,
.npc-spectate-banner__name {
  color: #ffe9a8;
  font-weight: 700;
}

.look-focus-banner__name {
  color: #cfe8ff;
}

.look-focus-banner__meta,
.npc-spectate-banner__meta {
  color: rgba(230, 210, 160, 0.85);
  font-size: 11px;
  min-width: 0;
  flex: 1 1 8rem;
}

.npc-spectate-banner__trail {
  list-style: none;
  margin: 0.2rem 0 0;
  padding: 0.25rem 0.4rem;
  flex: 1 1 100%;
  width: 100%;
  max-height: 7.2rem;
  overflow: auto;
  border: 1px solid rgba(120, 140, 90, 0.35);
  border-radius: 6px;
  background: rgba(8, 14, 10, 0.55);
  font: 500 0.68rem/1.35 ui-monospace, "Cascadia Code", "Segoe UI Mono", Menlo, Consolas, monospace;
  color: #c8d6b0;
}

.npc-spectate-banner__trail[hidden] {
  display: none !important;
}

.npc-spectate-banner__trail li {
  margin: 0;
  padding: 0.05rem 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.npc-spectate-banner__trail li.is-alert {
  color: #ffd0a0;
}

.look-focus-banner__meta {
  color: rgba(180, 210, 230, 0.85);
}

.look-focus-banner__actions,
.npc-spectate-banner__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.35rem;
}

.look-focus-banner__exit,
.look-focus-banner__spectate,
.npc-spectate-banner__exit,
.npc-spectate-banner__ship,
.npc-spectate-banner__next {
  flex: 0 0 auto;
  padding: 0.2rem 0.55rem;
  font-size: 11px;
}

.look-focus-banner__spectate {
  border-color: rgba(220, 180, 70, 0.55);
  color: #ffe9a8;
}

.look-focus-banner__spectate[hidden] {
  display: none !important;
}

.npc-spectate-banner__ship,
.npc-spectate-banner__next {
  border-color: rgba(220, 180, 70, 0.55);
  color: #ffe9a8;
}

body.is-look-focusing .look-focus-banner,
body.is-npc-spectating .npc-spectate-banner {
  box-shadow: 0 0 0 1px rgba(255, 210, 90, 0.12);
}

body.is-look-focusing .look-focus-banner {
  box-shadow: 0 0 0 1px rgba(126, 180, 224, 0.18);
}

/* Nav (destinations / flight mode) — same footprint as Ship / Admin. */
.ship-console__panel.autopilot-panel {
  position: relative;
  max-height: var(--ship-console-max-height);
}

.ship-console__panel.autopilot-panel .ship-console__panel-body {
  overflow: hidden;
}

.panel-resize-handle {
  /* In flex flow under the scroll body so the scrollbar ↓ sits above the grip. */
  position: relative;
  flex: 0 0 auto;
  align-self: flex-end;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0.1rem 0.2rem 0.15rem auto;
  border-radius: 0 0 10px 0;
  cursor: nwse-resize;
  touch-action: none;
  z-index: 2;
  background:
    linear-gradient(
      135deg,
      transparent 46%,
      rgba(150, 180, 220, 0.35) 46%,
      rgba(150, 180, 220, 0.35) 54%,
      transparent 54%
    ),
    linear-gradient(
      135deg,
      transparent 62%,
      rgba(150, 180, 220, 0.55) 62%,
      rgba(150, 180, 220, 0.55) 70%,
      transparent 70%
    );
}

.panel-resize-handle:hover,
.panel-resize-handle:focus-visible {
  background:
    linear-gradient(
      135deg,
      transparent 46%,
      rgba(180, 210, 255, 0.55) 46%,
      rgba(180, 210, 255, 0.55) 54%,
      transparent 54%
    ),
    linear-gradient(
      135deg,
      transparent 62%,
      rgba(180, 210, 255, 0.8) 62%,
      rgba(180, 210, 255, 0.8) 70%,
      transparent 70%
    );
}

.ship-console__panel.autopilot-panel.is-resizing,
.ship-console__panel.hold-panel.is-resizing,
.ship-console__panel.admin-panel.is-resizing,
.ship-console__panel.market-panel.is-resizing {
  user-select: none;
}

.ship-console__panel.market-panel {
  width: min(72vw, 880px);
  max-height: var(--ship-console-max-height);
  position: relative;
}

.ship-console__panel.market-panel .market-panel__body {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.ship-console__panel.market-panel .market-panel__body > .dock-hint,
.ship-console__panel.market-panel .market-panel__body > .hold-panel__status,
.ship-console__panel.market-panel .market-panel__body > .dock-inline {
  flex: 0 0 auto;
}

.ship-console__panel.market-panel #market-panel-list.dock-market-list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
}

.ship-console__panel.market-panel #market-panel-list .dock-market-table-wrap {
  overflow: auto;
}

.ship-console__panel.hold-panel {
  position: relative;
}

.ship-console__panel.hold-panel .hold-panel__body {
  flex: 1 1 auto;
  min-height: 0;
}

.ship-console__panel.hud {
  position: static;
  left: auto;
  right: auto;
  bottom: auto;
  max-height: var(--ship-console-max-height);
  overflow: hidden;
}

.hud {
  /* flight help lives in ship-console; keep class hooks for mobile */
}

.hold-panel__body {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  overflow: auto;
}

.hold-panel__status {
  margin: 0;
  font-size: 0.78rem;
  color: #a8bddc;
}

.hold-card {
  margin: 0;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(90, 130, 190, 0.35);
  border-radius: 0.45rem;
  background: rgba(8, 16, 30, 0.55);
}

.hold-card h4 {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: #dce8ff;
}

.hold-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0 0 0.4rem;
}

.hold-card__head h4 {
  margin: 0;
}

.hold-inspect-exit {
  flex: 0 0 auto;
  padding: 0.15rem 0.5rem;
  font-size: 0.7rem;
}

.hold-panel.is-inspecting .hold-card--ship {
  border-color: rgba(220, 180, 70, 0.55);
}

.hold-card--ship .hold-ship-layout {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.hold-preview-stage {
  position: relative;
  border-radius: 0.35rem;
  border: 1px solid rgba(90, 130, 190, 0.4);
  background:
    radial-gradient(ellipse at 40% 30%, rgba(60, 100, 150, 0.35), transparent 55%),
    rgba(4, 10, 20, 0.9);
  aspect-ratio: 16 / 10;
  max-height: min(28vh, 240px);
  width: 100%;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
  user-select: none;
}

.hold-preview-stage.is-dragging {
  cursor: grabbing;
}

.hold-preview-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.hold-preview-stage .dock-preview__hint {
  color: #9eb4d0;
  background: rgba(6, 12, 22, 0.65);
}

.hold-ship-specs.dock-ship-specs {
  min-width: 0;
  flex: 0 0 auto;
}

.hold-ship-specs .dock-ship-specs__chips {
  max-height: none;
}

.hold-card--loadout .hold-slot-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12.75rem, 1fr));
  gap: 0.5rem 0.65rem;
  align-content: start;
  max-height: min(34vh, 280px);
  overflow: auto;
  padding: 0.4rem 0.45rem;
  border-radius: 7px;
  border: 1px solid rgba(90, 130, 190, 0.4);
  background:
    linear-gradient(180deg, rgba(8, 16, 30, 0.92), rgba(4, 10, 20, 0.96));
  scrollbar-gutter: stable;
}

.hold-card--loadout .hold-slot-board .dock-slot-bank {
  min-width: 0;
}

.hold-card--loadout .hold-slot-board .dock-slot-bank__slots {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.3rem;
}

.hold-card--loadout .hold-slot-board .dock-slot {
  width: 100%;
  max-width: none;
}

.hold-card--loadout .dock-hint {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
}

.hold-card--container {
  border-color: rgba(120, 180, 220, 0.55);
  background: rgba(10, 28, 44, 0.65);
}

.hold-card--container h4 {
  color: #c8e8ff;
}

.hold-list__row--cargo:has(.hold-transfer-btn) {
  grid-template-columns: auto 1fr auto auto auto;
}

.hold-list__row--cargo:has(.hold-select) .hold-list__meta,
.hold-list__row--container:has(.hold-select) .hold-list__meta {
  display: inline-flex;
  gap: 0.28rem;
  align-items: center;
}

.hold-list__row--container {
  grid-template-columns: 1fr auto auto;
}

.hold-list__row--container:has(.hold-select) {
  grid-template-columns: auto 1fr auto auto;
  cursor: pointer;
}

.hold-list__row--container.is-selected {
  background: rgba(60, 110, 160, 0.22);
  border-radius: 3px;
}

.hold-transfer-btn {
  margin: 0;
  padding: 0.12rem 0.4rem;
  border: 1px solid rgba(140, 200, 150, 0.5);
  border-radius: 3px;
  background: rgba(24, 48, 32, 0.9);
  color: #d8f0c8;
  font: inherit;
  font-size: 0.62rem;
  cursor: pointer;
}

.hold-transfer-btn:hover,
.hold-transfer-btn:focus-visible {
  border-color: rgba(180, 230, 160, 0.85);
  outline: none;
}

.hold-meter {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem;
  align-items: center;
  margin-bottom: 0.45rem;
}

.hold-meter__track {
  height: 0.45rem;
  border-radius: 999px;
  background: rgba(20, 36, 64, 0.9);
  overflow: hidden;
}

.hold-meter__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #4f8fd6, #7eb6ff);
}

.hold-meter__fill.is-full {
  background: linear-gradient(90deg, #c46a3a, #e8a060);
}

.hold-meter__text {
  font-size: 0.72rem;
  font-weight: 650;
  color: #d5e4ff;
  white-space: nowrap;
}

.hold-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.hold-list__row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.4rem;
  align-items: baseline;
  font-size: 0.74rem;
  color: #d4e2f7;
}

.hold-cargo-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.4rem;
}

.hold-group-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.18rem 0.5rem;
  border: 1px solid rgba(90, 140, 190, 0.35);
  border-radius: 6px;
  background: rgba(8, 18, 32, 0.45);
  color: #b8cce0;
  font-size: 0.72rem;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.hold-group-toggle[hidden] {
  display: none !important;
}

.hold-group-toggle input {
  margin: 0;
  accent-color: #6aa8d8;
}

.hold-list__group {
  list-style: none;
  margin: 0.35rem 0 0.15rem;
  padding: 0.2rem 0.15rem 0.15rem;
  border-bottom: 1px solid rgba(90, 140, 190, 0.28);
  color: #8eb0d0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  pointer-events: none;
}

.hold-list__group:first-child {
  margin-top: 0;
}

.hold-list__group__label {
  display: block;
}

.dock-pane__head-main {
  min-width: 0;
}

.dock-pane__head-main h4 {
  margin: 0;
}

.dock-pane__head-main .dock-hint {
  margin: 0.15rem 0 0;
}

.hold-toolbar-btn {
  margin: 0;
  padding: 0.18rem 0.55rem;
  border: 1px solid rgba(120, 170, 210, 0.4);
  border-radius: 3px;
  background: rgba(16, 32, 52, 0.9);
  color: #c8e4f8;
  font: inherit;
  font-size: 0.66rem;
  cursor: pointer;
}

.hold-toolbar-btn:hover:not(:disabled),
.hold-toolbar-btn:focus-visible:not(:disabled) {
  border-color: rgba(160, 210, 240, 0.8);
  outline: none;
}

.hold-toolbar-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.hold-toolbar-btn--primary {
  border-color: rgba(140, 190, 120, 0.55);
  color: #d8f0c8;
}

.hold-list__row--cargo {
  grid-template-columns: 1fr auto;
  cursor: default;
}

.hold-list__row--cargo:has(.hold-select) {
  grid-template-columns: auto 1fr auto auto;
  cursor: pointer;
}

.hold-list__row--cargo.is-selected {
  background: rgba(60, 110, 160, 0.22);
  border-radius: 3px;
}

.hold-select {
  display: inline-flex;
  align-items: center;
  margin: 0;
  cursor: pointer;
}

.hold-select__input {
  width: 0.85rem;
  height: 0.85rem;
  margin: 0;
  accent-color: #7eb6ff;
  cursor: pointer;
}

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

.hold-eject-btn {
  margin: 0;
  padding: 0.12rem 0.45rem;
  border: 1px solid rgba(120, 170, 210, 0.45);
  border-radius: 3px;
  background: rgba(20, 40, 60, 0.85);
  color: #c8e4f8;
  font: inherit;
  font-size: 0.62rem;
  cursor: pointer;
}

.hold-eject-btn:hover,
.hold-eject-btn:focus-visible {
  border-color: rgba(160, 210, 240, 0.8);
  outline: none;
}

.container-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(4, 10, 18, 0.62);
}

.container-overlay.is-open,
.container-overlay:not([hidden]) {
  display: flex;
}

.container-overlay[hidden] {
  display: none !important;
}

.container-overlay__card {
  position: relative;
  width: min(720px, 100%);
  max-height: min(86vh, 640px);
  overflow: auto;
  padding: 1rem 1.1rem 1.15rem;
  border: 1px solid rgba(110, 160, 200, 0.35);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(14, 24, 36, 0.97), rgba(8, 14, 22, 0.98));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  color: #d8e6f8;
}

.container-overlay__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.container-overlay__header h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
}

.container-overlay__close {
  margin: 0;
  padding: 0.25rem 0.65rem;
  border: 1px solid rgba(140, 170, 200, 0.35);
  border-radius: 3px;
  background: rgba(20, 32, 48, 0.9);
  color: #d4e2f7;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}

.container-overlay__status {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  color: #9eb4d4;
}

.container-overlay__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.container-overlay__pane h4 {
  margin: 0 0 0.4rem;
  font-size: 0.82rem;
  font-weight: 650;
}

.container-overlay__pane .hold-list {
  min-height: 10rem;
  max-height: 18rem;
  overflow: auto;
  border: 1px solid rgba(90, 130, 170, 0.28);
  border-radius: 4px;
  padding: 0.35rem;
  background: rgba(6, 12, 20, 0.55);
}

.container-overlay__pane .hold-list.is-drop-target {
  border-color: rgba(140, 200, 240, 0.7);
  background: rgba(20, 40, 60, 0.55);
}

@media (max-width: 640px) {
  .container-overlay__cols {
    grid-template-columns: 1fr;
  }
}

.hold-list__tag {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  opacity: 0.75;
}

.hold-list__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hold-list__meta,
.hold-list__qty {
  color: #9eb4d4;
  font-size: 0.68rem;
  white-space: nowrap;
}

.hold-list__empty {
  margin: 0;
  font-size: 0.74rem;
  color: #8fa6c8;
}

.vitals-hud {
  position: fixed;
  right: 0.7rem;
  left: auto;
  bottom: 0.85rem;
  z-index: 6;
  width: min(16rem, 46vw);
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(90, 130, 190, 0.4);
  border-radius: 10px;
  background: rgba(6, 14, 28, 0.78);
  backdrop-filter: blur(4px);
  pointer-events: none;
}

.vitals-hud.is-spectating {
  border-color: rgba(220, 180, 70, 0.55);
  background: rgba(18, 16, 8, 0.82);
  box-shadow: 0 0 0 1px rgba(255, 210, 90, 0.1);
}

.vitals-hud.is-spectating .vitals-hud__ship {
  color: #ffe9a8;
}

.vitals-hud__title-stack {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  margin: 0 0 0.28rem;
}

.vitals-hud__credits {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: #c8f0d4;
  font-variant-numeric: tabular-nums;
}

.vitals-hud.is-spectating .vitals-hud__credits {
  color: #e8f6c8;
}

.vitals-hud__ship {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #e8f4ff;
}

.vitals-hud__row {
  display: grid;
  grid-template-columns: 3.4rem 1fr 3.4rem;
  gap: 0.35rem;
  align-items: center;
  margin: 0.18rem 0;
}

.vitals-hud__row--offline {
  opacity: 0.45;
}

.vitals-hud__label {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #b7cceb;
}

.vitals-hud__track {
  height: 0.42rem;
  border-radius: 999px;
  background: rgba(20, 36, 64, 0.95);
  overflow: hidden;
  border: 1px solid rgba(70, 100, 150, 0.35);
}

.vitals-hud__fill {
  height: 100%;
  width: 100%;
  border-radius: inherit;
  transition: width 180ms ease-out;
}

.vitals-hud__row--speed {
  grid-template-columns: 3.4rem 1fr minmax(5.6rem, max-content);
}

.vitals-hud__row--speed .vitals-hud__value,
.vitals-hud__row--accel .vitals-hud__value {
  white-space: nowrap;
  font-size: 0.68rem;
}

.vitals-hud__row--accel {
  grid-template-columns: 3.4rem 1fr 3.4rem;
}

.vitals-hud__fill--hull {
  background: linear-gradient(90deg, #c94a3a, #e8a35a);
}

.vitals-hud__fill--speed {
  background: linear-gradient(90deg, #2a8f7a, #7dffc8);
}

.vitals-hud__fill--accel {
  width: 0%;
  background: linear-gradient(90deg, #3d6ea8, #8ec5ff);
}

.vitals-hud__fill--accel.is-low {
  background: linear-gradient(90deg, #8a5a2a, #e0a45a);
}

.vitals-hud__fill--accel.is-boost {
  background: linear-gradient(90deg, #2a7a6a, #6dffc4);
}

.vitals-hud__fill--shield {
  background: linear-gradient(90deg, #2f6fd4, #6ec8ff);
}

.vitals-hud__fill--armor {
  background: linear-gradient(90deg, #6d6a62, #b7b1a4);
}

.vitals-hud__value {
  font-size: 0.72rem;
  text-align: right;
  color: #e8f0ff;
  font-variant-numeric: tabular-nums;
}

.combat-feedback {
  position: static;
  left: auto;
  top: auto;
  z-index: auto;
  transform: none;
  width: 100%;
  pointer-events: none;
  text-align: center;
  font-family: "Sora", "Segoe UI", sans-serif;
}

.combat-feedback__banner,
.combat-feedback__lock {
  margin: 0.2rem 0 0;
  padding: 0.35rem 0.5rem 0.35rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(210, 120, 70, 0.45);
  background: linear-gradient(180deg, rgba(36, 18, 12, 0.92), rgba(18, 10, 8, 0.94));
  color: #ffd0b8;
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

/* Dismissible toast row: text + × (stack is pointer-events:none). */
.flight-toast {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  pointer-events: auto;
  text-align: left;
}

.flight-toast[hidden] {
  display: none !important;
}

.flight-toast__text {
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
}

.flight-toast__close {
  flex: 0 0 auto;
  appearance: none;
  margin: 0;
  padding: 0;
  width: 1.35rem;
  height: 1.35rem;
  border: 1px solid rgba(255, 220, 190, 0.28);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.28);
  color: inherit;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  opacity: 0.85;
}

.flight-toast__close:hover,
.flight-toast__close:focus-visible {
  opacity: 1;
  background: rgba(0, 0, 0, 0.45);
  outline: none;
}

/* Dedicated mining row — does not share #combat-banner. */
.flight-toast-stack__mine {
  margin: 0;
  width: 100%;
  padding: 0.35rem 0.5rem 0.35rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(170, 150, 55, 0.5);
  background: linear-gradient(180deg, rgba(28, 26, 12, 0.92), rgba(14, 13, 8, 0.94));
  color: #e6d48a;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: "Sora", "Segoe UI", sans-serif;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

.flight-toast-stack__mine[hidden] {
  display: none !important;
}

/* Headed-lease / admin debug — unexpected brain events. */
.flight-toast-stack__lease {
  margin: 0;
  width: 100%;
  padding: 0.35rem 0.5rem 0.35rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(200, 140, 70, 0.55);
  background: linear-gradient(180deg, rgba(32, 22, 10, 0.94), rgba(16, 12, 8, 0.95));
  color: #f0c090;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: "Sora", "Segoe UI", sans-serif;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

.flight-toast-stack__lease[hidden] {
  display: none !important;
}

.combat-feedback__lock {
  border-color: rgba(210, 130, 70, 0.4);
  color: #ffb087;
  font-weight: 500;
}

.combat-feedback__lock.is-in-range {
  border-color: rgba(90, 210, 140, 0.45);
  color: #9dffc2;
}

.combat-feedback__lock.is-blocked {
  border-color: rgba(230, 160, 70, 0.45);
  color: #ffc27a;
}

body.is-docked .combat-feedback {
  display: none;
}

.vitals-hud__banner {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: #ffd0b8;
}
.vitals-hud__lock {
  margin: 0.3rem 0 0;
  font-size: 0.76rem;
  color: #ffb087;
  pointer-events: none;
}

.vitals-hud__lock.is-in-range {
  color: #9dffc2;
}

.vitals-hud__lock.is-blocked {
  color: #ffc27a;
}

.flight-toast-stack__autopilot,
.combat-feedback__autopilot {
  margin: 0;
  width: 100%;
  text-align: center;
  font-size: 0.76rem;
  color: #9ec8ff;
  pointer-events: none;
}

.flight-toast-stack__autopilot.is-active,
.combat-feedback__autopilot.is-active {
  color: #7dffb0;
}

.autopilot-panel__body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 0;
  flex: 1 1 auto;
}

.autopilot-panel__hint {
  margin: 0;
  flex: 0 0 auto;
  font-size: 0.78rem;
  color: rgba(200, 220, 240, 0.78);
  line-height: 1.35;
}

/* When Nav is short, drop the long blurb so destinations stay usable. */
.ship-console__panel.autopilot-panel.is-compact .autopilot-panel__hint {
  display: none;
}

.autopilot-settings {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

/* Override global `label { flex-direction: column }` so label + select share one row. */
.autopilot-setting {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(210, 224, 245, 0.85);
}

.autopilot-setting__label {
  flex: 0 0 auto;
  text-align: left;
}

.autopilot-setting__select {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 12rem;
  width: auto;
  margin: 0 0 0 auto;
  padding: 0.28rem 0.45rem;
  border-radius: 6px;
  border: 1px solid rgba(140, 170, 210, 0.35);
  background: rgba(8, 16, 28, 0.85);
  color: #e8f0ff;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
}

.autopilot-sort {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.autopilot-sort__btn {
  margin: 0;
  padding: 0.28rem 0.55rem;
  border-radius: 0.35rem;
  border: 1px solid rgba(110, 150, 210, 0.4);
  background: rgba(10, 22, 42, 0.75);
  color: #c8daf0;
  font: inherit;
  font-size: 0.72rem;
  cursor: pointer;
}

.autopilot-sort__btn.is-active {
  border-color: rgba(120, 190, 255, 0.75);
  background: rgba(28, 56, 96, 0.9);
  color: #e8f4ff;
}

.autopilot-list {
  display: grid;
  gap: 0.18rem;
  flex: 1 1 auto;
  min-height: 3.25rem;
  max-height: none;
  overflow: auto;
}

.autopilot-empty {
  margin: 0;
  font-size: 0.78rem;
  color: rgba(180, 200, 220, 0.7);
}

.autopilot-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.28rem;
  width: 100%;
  margin: 0;
  padding: 0.28rem 0.45rem;
  border: 1px solid rgba(70, 110, 160, 0.4);
  border-radius: 6px;
  background: rgba(8, 18, 34, 0.72);
  color: inherit;
  cursor: pointer;
  box-sizing: border-box;
  min-height: 1.85rem;
}

.autopilot-row__head {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  width: 100%;
}

.autopilot-row--child {
  margin-left: 0.85rem;
  width: calc(100% - 0.85rem);
  border-color: rgba(70, 110, 160, 0.28);
  background: rgba(6, 14, 28, 0.62);
}

.autopilot-row__expand {
  flex: 0 0 1rem;
  margin: 0;
  padding: 0;
  color: #c8e0ff;
  font-size: 0.72rem;
  line-height: 1;
  text-align: center;
  user-select: none;
}

.autopilot-row__expand:hover,
.autopilot-row__expand:focus-visible {
  color: #e8f4ff;
  outline: none;
}

.autopilot-row:hover,
.autopilot-row:focus-visible {
  border-color: rgba(130, 180, 240, 0.75);
  background: rgba(16, 36, 64, 0.88);
  outline: none;
}

/* Nav destination (fly-to) — green */
.autopilot-row.is-selected {
  border-color: rgba(120, 210, 170, 0.85);
  box-shadow: inset 0 0 0 1px rgba(120, 210, 170, 0.35);
  background: rgba(14, 40, 36, 0.82);
}

/* Camera look-at — blue (can stack with is-selected when both) */
.autopilot-row.is-looking {
  border-color: rgba(126, 180, 224, 0.9);
  box-shadow: inset 3px 0 0 #7eb4e0, inset 0 0 0 1px rgba(126, 180, 224, 0.28);
  background: rgba(12, 28, 48, 0.88);
}

.autopilot-row.is-selected.is-looking {
  border-color: rgba(120, 210, 170, 0.9);
  box-shadow: inset 3px 0 0 #7eb4e0, inset 0 0 0 1px rgba(120, 210, 170, 0.4);
  background: linear-gradient(
    90deg,
    rgba(12, 32, 52, 0.92) 0%,
    rgba(14, 40, 36, 0.88) 55%
  );
}

.autopilot-row__tags {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.25rem;
  margin-left: 0.15rem;
}

.autopilot-row__tag {
  display: inline-block;
  padding: 0.05rem 0.28rem;
  border-radius: 3px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
}

.autopilot-row__tag--nav {
  color: #b6f0d4;
  background: rgba(40, 110, 80, 0.55);
  border: 1px solid rgba(120, 210, 170, 0.55);
}

.autopilot-row__tag--look {
  color: #cfe8ff;
  background: rgba(40, 80, 120, 0.55);
  border: 1px solid rgba(126, 180, 224, 0.55);
}

.autopilot-row__tag--spec {
  color: #ffe9b0;
  background: rgba(90, 70, 20, 0.6);
  border: 1px solid rgba(230, 190, 90, 0.55);
}

.autopilot-row.is-spectating {
  border-color: rgba(230, 190, 90, 0.75);
  box-shadow: inset 3px 0 0 #e6be5a, inset 0 0 0 1px rgba(230, 190, 90, 0.28);
}

.autopilot-row__main {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 0.35rem;
  flex: 1 1 auto;
  min-width: 0;
}

.autopilot-row__name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.78rem;
  font-weight: 650;
  color: #eef5ff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.autopilot-row__type {
  flex: 0 1 auto;
  min-width: 2.1rem;
  font-size: 0.68rem;
  color: rgba(160, 190, 220, 0.72);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.autopilot-row__dist {
  flex: 0 0 auto;
  margin-left: auto;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  color: #b8d8ff;
  white-space: nowrap;
  text-align: right;
}

.autopilot-row__action {
  flex: 0 0 auto;
  margin: 0;
  padding: 0.12rem 0.4rem;
  border: 1px solid rgba(120, 190, 160, 0.55);
  border-radius: 4px;
  background: rgba(18, 48, 40, 0.85);
  color: #d8f5e8;
  font-size: 0.65rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-transform: uppercase;
  user-select: none;
  white-space: nowrap;
}

.autopilot-row__action:hover,
.autopilot-row__action:focus-visible {
  border-color: rgba(160, 230, 190, 0.9);
  background: rgba(28, 70, 56, 0.95);
  color: #f0fff6;
  outline: none;
}

.autopilot-row__action.is-pending {
  border-color: rgba(230, 200, 110, 0.85);
  background: rgba(56, 46, 18, 0.92);
  color: #ffe9b0;
}

.autopilot-row__action--spectate {
  border-color: rgba(210, 170, 80, 0.65);
  background: rgba(48, 38, 14, 0.9);
  color: #ffe9b0;
}

.autopilot-row__action--spectate:hover,
.autopilot-row__action--spectate:focus-visible {
  border-color: rgba(240, 200, 110, 0.95);
  background: rgba(70, 54, 18, 0.95);
  color: #fff6d4;
}

.autopilot-mode {
  display: flex;
  gap: 0.35rem;
}

.autopilot-mode__btn {
  flex: 1 1 0;
  border: 1px solid rgba(140, 170, 210, 0.35);
  border-radius: 6px;
  padding: 0.38rem 0.5rem;
  background: rgba(8, 16, 28, 0.85);
  color: rgba(210, 224, 245, 0.9);
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}

.autopilot-mode__btn.is-active {
  border-color: rgba(110, 220, 160, 0.75);
  background: rgba(20, 64, 42, 0.9);
  color: #d8ffe8;
}

.autopilot-mode__btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.autopilot-mode__btn:disabled.is-active {
  opacity: 0.4;
}

.autopilot-warp {
  display: grid;
  gap: 0.35rem;
  padding: 0.45rem 0.5rem;
  border: 1px solid rgba(100, 170, 220, 0.28);
  background: rgba(8, 22, 38, 0.55);
}

.autopilot-warp__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
}

.autopilot-warp__label {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9ec8e8;
}

.autopilot-warp__meta {
  font-size: 0.75rem;
  color: #c5e4ff;
  text-align: right;
  line-height: 1.25;
  max-width: 100%;
}

.autopilot-warp__etas {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.2rem 0.45rem;
  margin: 0;
}

.autopilot-warp__eta {
  display: grid;
  gap: 0.05rem;
  min-width: 0;
}

.autopilot-warp__eta dt {
  margin: 0;
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #7aa3c4;
}

.autopilot-warp__eta dd {
  margin: 0;
  font-size: 0.78rem;
  color: #c5e4ff;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.autopilot-warp__eta.is-current dt {
  color: #d7f0ff;
}

.autopilot-warp__eta.is-current dd {
  color: #fff;
}

.autopilot-warp__track {
  height: 0.45rem;
  background: rgba(20, 40, 60, 0.9);
  border: 1px solid rgba(120, 180, 230, 0.2);
  overflow: hidden;
}

.autopilot-warp__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #3a8fd4, #8fd7ff);
  transition: width 0.12s linear;
}

.autopilot-warp.is-aligning .autopilot-warp__fill {
  background: linear-gradient(90deg, #4a7fa8, #8eb8d8);
}

.autopilot-warp.is-aligning .autopilot-warp__meta {
  color: #c5e0f5;
}

.autopilot-warp.is-spooling .autopilot-warp__fill {
  background: linear-gradient(90deg, #5eb0ff, #e8f6ff);
  box-shadow: 0 0 10px rgba(140, 210, 255, 0.45);
}

.autopilot-warp.is-cruising .autopilot-warp__fill {
  background: linear-gradient(90deg, #7ec8ff, #d7f0ff);
}

.autopilot-warp.is-cruising .autopilot-warp__meta {
  color: #dff4ff;
}

.autopilot-warp.is-cooling .autopilot-warp__fill {
  background: linear-gradient(90deg, #3d6a88, #6aa0c0);
}

.autopilot-warp.is-ready .autopilot-warp__meta {
  color: #b8f0d0;
}

.autopilot-warp__cancel {
  font-size: 0.78rem;
  padding: 0.3rem 0.5rem;
}

.warp-prep-veil {
  position: fixed;
  left: 0;
  right: 0;
  top: 3.5rem;
  height: calc(100vh - 3.5rem);
  pointer-events: none;
  opacity: 0;
  z-index: 3;
  background:
    radial-gradient(ellipse at center, transparent 32%, rgba(40, 110, 170, 0.28) 100%),
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 3px,
      rgba(160, 220, 255, 0.04) 3px,
      rgba(160, 220, 255, 0.04) 4px
    );
  transition: opacity 0.08s linear;
}

.warp-prep-veil.is-active {
  opacity: var(--warp-prep, 0);
}

body.is-docked .warp-prep-veil {
  display: none !important;
}

.autopilot-panel__actions {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.autopilot-reset-cam {
  flex: 1 1 auto;
  font-size: 0.78rem;
  padding: 0.35rem 0.5rem;
}

.autopilot-stop {
  flex: 1 1 auto;
}

.autopilot-stop:disabled,
.autopilot-reset-cam:disabled {
  opacity: 0.45;
  cursor: default;
}

.touch-controls.is-visible .touch-btn--autopilot.is-active {
  background: rgba(20, 72, 48, 0.92);
  border-color: #6ed7a0;
  color: #d8ffe8;
}

.touch-controls.is-visible .touch-btn--target {
  background: rgba(28, 52, 88, 0.88);
  border-color: #7aa4e0;
}

.touch-controls.is-visible .touch-btn--target.is-locked {
  background: rgba(120, 58, 28, 0.9);
  border-color: #ff9a5c;
  color: #ffe0c8;
}


.vitals-hud__equip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-top: 0.4rem;
  pointer-events: auto;
}

.vitals-hud__equip-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #9eb6d8;
}

.vitals-hud__hold-btn {
  margin: 0;
  padding: 0.18rem 0.4rem;
  border-radius: 0.3rem;
  border: 1px solid rgba(130, 170, 220, 0.45);
  background: rgba(12, 28, 52, 0.9);
  color: #d7e7ff;
  font: inherit;
  font-size: 0.64rem;
  font-weight: 650;
  cursor: pointer;
  touch-action: manipulation;
  pointer-events: auto;
}

.vitals-hud__hold-btn:hover {
  border-color: rgba(160, 200, 255, 0.7);
  color: #fff;
}

.vitals-hud__hold-btn.is-full {
  border-color: rgba(230, 140, 80, 0.75);
  color: #ffe0c0;
}

.vitals-hud__equip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.25rem;
  margin-top: 0.28rem;
  max-height: 5.2rem;
  overflow-y: auto;
  pointer-events: auto;
}

.vitals-hud__equip-slot {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
  padding: 0.26rem 0.35rem;
  border-radius: 0.35rem;
  border: 1px solid rgba(120, 150, 190, 0.35);
  background: rgba(8, 18, 34, 0.72);
  color: #c5d4ea;
}

.vitals-hud__equip-slot.is-ready {
  border-color: rgba(200, 160, 90, 0.7);
  background: rgba(48, 32, 12, 0.82);
  color: #ffe2b8;
}

.vitals-hud__equip-slot.is-active {
  border-color: rgba(255, 180, 100, 0.9);
  background: rgba(72, 40, 12, 0.92);
  color: #fff0d0;
  box-shadow: 0 0 0 1px rgba(255, 170, 80, 0.25);
}

.vitals-hud__equip-slot[data-equip="battle-laser"].is-ready,
.vitals-hud__equip-slot[data-equip^="weapon-"].is-ready {
  border-color: rgba(110, 180, 255, 0.65);
  background: rgba(16, 40, 72, 0.88);
  color: #d8ecff;
}

.vitals-hud__equip-slot[data-equip="battle-laser"].is-active,
.vitals-hud__equip-slot[data-equip^="weapon-"].is-active {
  border-color: rgba(255, 120, 90, 0.85);
  background: rgba(88, 28, 22, 0.92);
  color: #ffd8ce;
  box-shadow: 0 0 0 1px rgba(255, 110, 80, 0.3);
}

.vitals-hud__equip-slot[data-equip^="cyber-"] {
  border-color: rgba(140, 120, 200, 0.4);
  color: #ddd0ff;
}

.vitals-hud__equip-tag {
  flex: 0 0 auto;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  opacity: 0.75;
}

.vitals-hud__equip-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.68rem;
  font-weight: 650;
}

.vitals-hud__modes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.25rem;
  margin-top: 0.4rem;
  pointer-events: auto;
}

.vitals-hud__mode {
  margin: 0;
  padding: 0.28rem 0.2rem;
  border-radius: 0.35rem;
  border: 1px solid rgba(110, 150, 210, 0.4);
  background: rgba(10, 22, 42, 0.75);
  color: #c7d8f5;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  cursor: pointer;
  touch-action: manipulation;
  pointer-events: auto;
}

.vitals-hud__mode.is-active {
  border-color: #f0a35a;
  background: rgba(90, 42, 18, 0.88);
  color: #ffe1c2;
}

.vitals-hud__mode[data-combat-mode="defense"].is-active {
  border-color: #6ec8ff;
  background: rgba(22, 52, 88, 0.9);
  color: #d7ecff;
}

.vitals-hud__mode[data-combat-mode="offense"].is-active {
  border-color: #ff6a5c;
  background: rgba(96, 24, 24, 0.92);
  color: #ffd4ce;
}

.combat-feedback__lock {
  flex-wrap: wrap;
}

.combat-feedback__stance {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.2rem;
  flex: 1 1 11rem;
  pointer-events: auto;
}

.combat-feedback__stance[hidden] {
  display: none !important;
}

.vitals-hud__mode[data-ship-stance="friendly"].is-active {
  border-color: #4aa3ff;
  background: rgba(18, 52, 96, 0.92);
  color: #d7ecff;
}

.vitals-hud__mode[data-ship-stance="neutral"].is-active {
  border-color: #9aa8b8;
  background: rgba(42, 48, 58, 0.92);
  color: #e8edf4;
}

.vitals-hud__mode[data-ship-stance="hostile"].is-active {
  border-color: #ff5a4a;
  background: rgba(96, 24, 24, 0.92);
  color: #ffd4ce;
}

.autopilot-row__stance {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  width: auto;
  gap: 0.22rem;
  margin: 0;
  pointer-events: auto;
}

.autopilot-row__stance-btn {
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 0.82rem;
  height: 0.82rem;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  border: 1px solid transparent;
  font-size: 0;
  line-height: 0;
  color: transparent;
  overflow: hidden;
  cursor: pointer;
  touch-action: manipulation;
}

.autopilot-row__stance-btn[data-ship-stance="friendly"] {
  background: rgba(74, 163, 255, 0.35);
  border-color: rgba(74, 163, 255, 0.55);
}

.autopilot-row__stance-btn[data-ship-stance="neutral"] {
  background: rgba(154, 168, 184, 0.38);
  border-color: rgba(154, 168, 184, 0.55);
}

.autopilot-row__stance-btn[data-ship-stance="hostile"] {
  background: rgba(255, 90, 74, 0.38);
  border-color: rgba(255, 90, 74, 0.55);
}

.autopilot-row__stance-btn.is-active[data-ship-stance="friendly"] {
  background: #4aa3ff;
  border-color: #d7ecff;
  box-shadow: 0 0 0 1px #4aa3ff;
}

.autopilot-row__stance-btn.is-active[data-ship-stance="neutral"] {
  background: #9aa8b8;
  border-color: #e8edf4;
  box-shadow: 0 0 0 1px #9aa8b8;
}

.autopilot-row__stance-btn.is-active[data-ship-stance="hostile"] {
  background: #ff5a4a;
  border-color: #ffd4ce;
  box-shadow: 0 0 0 1px #ff5a4a;
}


.hit-flash {
  position: fixed;
  inset: 56px 0 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at center, rgba(255, 60, 40, 0.08), rgba(180, 20, 10, 0.42));
  transition: opacity 120ms ease-out;
}

.hit-flash.is-on {
  opacity: 1;
}

body.has-onscreen-controls .vitals-hud {
  bottom: 11.2rem;
}

.nav-maps {
  /* Fades chrome only. No teal/green wash — rgba(40,80,60) blended to ~#223d38
     and was showing up as the Locale “solid green” surface. */
  --nav-maps-opacity: 0.85;
  position: fixed;
  right: 0.7rem;
  left: auto;
  top: 4.1rem;
  transform: none;
  z-index: 12;
  width: min(640px, 54vw);
  max-height: calc(100vh - 5.2rem);
  display: none;
  flex-direction: column;
  border: 1px solid rgba(90, 120, 160, calc(0.4 * var(--nav-maps-opacity)));
  border-radius: 12px;
  background:
    radial-gradient(
      ellipse at 20% 0%,
      rgba(30, 48, 72, calc(0.35 * var(--nav-maps-opacity))),
      transparent 55%
    ),
    rgba(4, 8, 16, calc(0.88 * var(--nav-maps-opacity)));
  box-shadow: 0 18px 48px rgba(0, 0, 0, calc(0.35 * var(--nav-maps-opacity)));
  overflow: hidden;
  backdrop-filter: blur(calc(2px * var(--nav-maps-opacity)));
}

.nav-maps.is-open,
.nav-maps:not([hidden]) {
  display: flex;
}

.nav-maps[hidden] {
  display: none !important;
}

.nav-maps.nav-maps--hosted {
  position: relative;
  inset: auto;
  top: auto;
  right: auto;
  left: auto;
  width: 100%;
  max-height: none;
  height: 100%;
  min-height: 22rem;
  z-index: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.nav-maps.nav-maps--hosted #nav-maps-close {
  display: none;
}

.nav-maps.nav-maps--hosted .nav-maps__stage {
  min-height: 18rem;
  height: auto;
}

.nav-maps__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid rgba(80, 120, 100, calc(0.35 * var(--nav-maps-opacity)));
  background: rgba(6, 14, 12, calc(0.45 * var(--nav-maps-opacity)));
  flex-wrap: wrap;
}

.nav-maps__opacity {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: #a8c4b4;
  letter-spacing: 0.02em;
}

.nav-maps__opacity input[type="range"] {
  width: 7rem;
  margin: 0;
  accent-color: #6fb892;
}

.nav-maps__header h2 {
  margin: 0;
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: 1.05rem;
  color: #e8fff2;
}

.nav-maps__subtitle {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  color: #8fbba0;
}

.nav-maps__tabs {
  display: inline-flex;
  gap: 0.3rem;
  padding: 0.18rem;
  border-radius: 999px;
  background: rgba(10, 22, 18, 0.8);
  border: 1px solid rgba(70, 110, 90, 0.45);
}

.nav-maps__tab {
  border: 0;
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  background: transparent;
  color: #a8c4b4;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.nav-maps__tab.is-active {
  background: rgba(70, 140, 110, 0.35);
  color: #e8fff2;
}

.nav-maps__tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.4rem 0.7rem;
  border-bottom: 1px solid rgba(80, 120, 100, calc(0.28 * var(--nav-maps-opacity)));
  background: rgba(6, 14, 12, calc(0.35 * var(--nav-maps-opacity)));
}

.nav-maps__tools[hidden] {
  display: none !important;
}

.nav-maps__tool {
  border: 1px solid rgba(70, 110, 90, 0.5);
  border-radius: 999px;
  padding: 0.28rem 0.75rem;
  background: rgba(10, 22, 18, 0.75);
  color: #a8c4b4;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
}

.nav-maps__tool.is-active {
  background: rgba(70, 140, 110, 0.4);
  border-color: rgba(120, 180, 150, 0.55);
  color: #e8fff2;
}

.nav-maps__legend {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 600;
  color: #7f9f8e;
  letter-spacing: 0.02em;
}

.nav-maps__swatch {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  margin-left: 0.2rem;
}

.nav-maps__swatch--planet {
  background: #5ec4c0;
}

.nav-maps__swatch--station {
  background: #e8f1f6;
}

.nav-maps__swatch--belt {
  background: #c48a4a;
}

.nav-maps__swatch--gate {
  background: #8a949e;
}

.nav-maps__stage {
  flex: 1 1 auto;
  min-height: min(62vh, 620px);
  height: min(62vh, 620px);
  /* Solid space — isolates the map from the flight scene behind the panel. */
  background: #030712;
  isolation: isolate;
}

#nav-maps-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
  /* Fully opaque — panel opacity slider must not reveal Lumen through the map. */
  opacity: 1;
  background: #030712;
}

#nav-maps-canvas:active {
  cursor: grabbing;
}

.nav-maps__hint {
  margin: 0;
  padding: 0.45rem 0.85rem 0.65rem;
  font-size: 0.74rem;
  color: #8aa898;
  border-top: 1px solid rgba(80, 120, 100, calc(0.25 * var(--nav-maps-opacity)));
  background: rgba(6, 14, 12, calc(0.45 * var(--nav-maps-opacity)));
}

.nav-maps__hint kbd {
  display: inline-block;
  padding: 0.05rem 0.35rem;
  border: 1px solid rgba(120, 170, 140, 0.45);
  border-radius: 4px;
  background: rgba(20, 36, 28, 0.9);
  font-size: 0.72rem;
}


.touch-controls {
  display: none;
}

.touch-controls.is-visible {
  position: fixed;
  inset: auto 0.5rem 0.55rem 0.5rem;
  z-index: 5;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.8rem;
  pointer-events: none;
}

.touch-controls.is-visible .touch-controls__left,
.touch-controls.is-visible .touch-controls__right {
  pointer-events: auto;
}

.touch-controls.is-visible .touch-controls__label {
  margin: 0 0 0.28rem;
  font-size: 0.78rem;
  color: #d4e3ff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.touch-controls.is-visible .touch-pad {
  width: 134px;
  height: 134px;
  border-radius: 50%;
  border: 1px solid #3b567f;
  background: rgba(6, 14, 30, 0.62);
  backdrop-filter: blur(3px);
  position: relative;
  touch-action: none;
  user-select: none;
}

.touch-controls.is-visible .touch-pad__thumb {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid #7fa1d3;
  background: rgba(125, 168, 234, 0.34);
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  transition: transform 90ms linear;
  will-change: transform;
}

.touch-controls.is-visible .touch-controls__right {
  display: grid;
  gap: 0.35rem;
}

.touch-controls.is-visible .touch-controls__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
}

.touch-controls.is-visible .touch-btn {
  border: 1px solid #35588a;
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  min-width: 88px;
  font-size: 0.79rem;
  color: #e7f0ff;
  background: rgba(13, 30, 56, 0.78);
  touch-action: manipulation;
  user-select: none;
  cursor: pointer;
}

.touch-controls.is-visible .touch-btn.active,
.touch-controls.is-visible .touch-btn:active {
  background: rgba(72, 126, 221, 0.9);
  border-color: #77a7f2;
}

.touch-controls.is-visible .touch-btn--fire {
  grid-column: 1 / -1;
  background: rgba(120, 36, 28, 0.88);
  border-color: #d4784a;
}

/* Desktop control tip — last in #flight-toast-stack (below green AP status). */
.flight-toast-stack .canvas-hint,
.canvas-hint {
  position: static;
  left: auto;
  bottom: auto;
  transform: none;
  z-index: auto;
  margin: 0;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(90, 130, 190, 0.45);
  background: rgba(6, 14, 28, 0.72);
  color: #d7e6ff;
  font-size: 0.72rem;
  line-height: 1.25;
  text-align: center;
  pointer-events: none;
  opacity: 0.92;
  align-self: center;
  width: max-content;
  max-width: min(42rem, 94vw);
  box-sizing: border-box;
}

.canvas-hint.is-hidden {
  display: none;
}

/*
 * Collapse the action row before it wraps (1366 laptops, mid windows).
 * Touch / ≤900px still get the rest of the mobile chrome below.
 */
@media (pointer: coarse), (max-width: 1400px) {
  .top-nav__brand {
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
  }

  .top-nav__menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    margin-left: auto;
    min-height: 2.35rem;
    min-width: 2.35rem;
    width: 2.35rem;
    padding: 0.4rem;
  }

  /*
   * Must beat `.top-nav .group { display: flex }` (actions also have .group).
   * Collapsed: hamburger only — no Maps/Assets/Settings/Log Out in the bar.
   */
  .top-nav .group.top-nav__actions {
    display: none;
  }

  .top-nav.is-menu-open .group.top-nav__actions {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 0.4rem;
    padding: 0.55rem 0.65rem calc(0.55rem + env(safe-area-inset-bottom, 0px));
    background: rgba(5, 11, 22, 0.96);
    border-bottom: 1px solid #203656;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
    z-index: 41;
  }

  .top-nav.is-menu-open .top-nav__actions .btn,
  .top-nav.is-menu-open .top-nav__actions button.btn,
  .top-nav.is-menu-open .top-nav__actions a.btn {
    width: 100%;
    justify-content: center;
    min-height: 2.6rem;
    padding: 0.5rem 0.8rem;
    font-size: 0.9rem;
  }
}

@media (pointer: coarse), (max-width: 900px) {
  :root {
    --mobile-tray-h: 3.35rem;
    --mobile-look-h: 9.25rem;
    /*
     * One-row top-nav (brand + status + Menu). Actions open as a dropdown.
     * safe + pad + row + pad + border
     */
    --mobile-nav-h: calc(
      env(safe-area-inset-top, 0px) + 0.4rem + 2.4rem + 0.4rem + 1px
    );
    --mobile-sheet-top: calc(var(--mobile-nav-h) + 0.45rem);
    --mobile-sheet-max-h: min(52vh, 24rem);
    --mobile-look-bottom: calc(var(--mobile-tray-h) + env(safe-area-inset-bottom, 0px));
    --mobile-chrome-stack: calc(
      var(--mobile-look-h) + var(--mobile-tray-h) + env(safe-area-inset-bottom, 0px) + 0.55rem
    );
  }

  .top-nav .group a.btn[href="/"] {
    display: none;
  }

  .top-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: calc(0.4rem + env(safe-area-inset-top, 0px)) 0.65rem 0.4rem;
    gap: 0.4rem;
  }

  .top-nav__brand {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    gap: 0.35rem;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
  }

  .top-nav strong {
    flex: 0 1 auto;
    min-width: 0;
    font-size: 0.9rem;
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .top-nav__build {
    display: inline;
    flex: 0 0 auto;
    font-size: 0.68rem;
    line-height: 1.15;
    color: #9eb6d8;
  }

  .top-nav .pbi-env-badge {
    padding: 0.04rem 0.22rem;
    font-size: 0.5rem;
    letter-spacing: 0.04em;
    border-radius: 2px;
    line-height: 1;
  }

  #whoami {
    display: none;
  }

  .top-nav .status-pill {
    flex: 0 0 auto;
    margin-left: 0.15rem;
    font-size: 0.68rem;
    padding: 0.18rem 0.42rem;
  }

  .top-nav .btn,
  .top-nav button.btn {
    min-height: 2.25rem;
    padding: 0.35rem 0.7rem;
    font-size: 0.84rem;
  }

  /* Prefer Status-panel Log Out on phones; keep header button as backup. */
  .top-nav #logout-btn {
    min-width: 0;
  }

  .dock-overlay,
  .industrial-overlay {
    top: var(--mobile-nav-h);
  }

  /*
   * Mobile chrome: Look dock always at bottom; one exclusive detail sheet up top.
   * House the sheet (tap active tray tab / Close) to see ship + space.
   */
  body.mobile-look-dock .ship-console {
    left: 0.45rem;
    right: 0.45rem;
    top: var(--mobile-sheet-top);
    max-height: var(--mobile-sheet-max-h);
    z-index: 13;
  }

  body.mobile-look-dock .ship-console__rail {
    display: none;
  }

  body.mobile-look-dock .ship-console__stage {
    width: 100%;
  }

  body.mobile-look-dock .ship-console .flight-dialog.ship-console__panel {
    display: none;
    width: 100%;
    max-width: none;
    /* Explicit height so flex children (Nav list) can scroll inside the sheet. */
    height: var(--mobile-sheet-max-h);
    max-height: var(--mobile-sheet-max-h);
    z-index: 13;
  }

  body.mobile-look-dock .panel-resize-handle {
    display: none;
  }

  body.mobile-look-dock.panel-hold-open #console-panel-hold,
  body.mobile-look-dock.panel-nav-open #console-panel-nav,
  body.mobile-look-dock.panel-status-open #console-panel-status,
  body.mobile-look-dock.panel-admin-open #console-panel-admin,
  body.mobile-look-dock.panel-market-open #console-panel-market {
    display: flex !important;
  }

  body.mobile-look-dock .ship-console .flight-dialog__body {
    -webkit-overflow-scrolling: touch;
  }

  /* Nav: keep chrome fixed; destinations list is the scroll region. */
  body.mobile-look-dock .ship-console__panel.autopilot-panel .flight-dialog__body,
  body.mobile-look-dock .ship-console__panel.autopilot-panel .autopilot-panel__body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    flex: 1 1 auto;
  }

  body.mobile-look-dock .autopilot-panel__hint {
    display: none;
  }

  body.mobile-look-dock.autopilot-only .autopilot-mode {
    display: none;
  }

  body.mobile-look-dock .autopilot-list {
    flex: 1 1 auto;
    min-height: 5.5rem;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
  }

  body.mobile-look-dock .autopilot-panel__actions {
    flex: 0 0 auto;
  }

  body.mobile-look-dock .autopilot-settings,
  body.mobile-look-dock .autopilot-warp,
  body.mobile-look-dock .autopilot-sort {
    flex: 0 0 auto;
  }

  body.mobile-look-dock .ship-console__panel.market-panel .market-panel__body {
    flex: 1 1 auto;
  }

  body.mobile-look-dock .ship-console__panel.market-panel #market-panel-list.dock-market-list {
    -webkit-overflow-scrolling: touch;
  }

  /* Chat + Hull use the same upper sheet geometry as console flight-dialogs. */
  body.mobile-look-dock .chat-panel.is-open,
  body.mobile-look-dock.panel-hull-open .vitals-hud {
    top: var(--mobile-sheet-top);
    right: 0.45rem;
    left: 0.45rem;
    bottom: auto;
    width: auto;
    max-width: none;
    height: var(--mobile-sheet-max-h);
    max-height: var(--mobile-sheet-max-h);
    z-index: 14;
    border-radius: 12px;
    border: 1px solid #2e4569;
    background: rgba(8, 16, 31, 0.92);
    backdrop-filter: blur(5px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  }

  body.mobile-look-dock .chat-panel.is-open {
    display: flex;
  }

  body.mobile-look-dock .vitals-hud {
    display: none;
    position: fixed;
    padding: 0;
    overflow: hidden;
    pointer-events: auto;
  }

  body.mobile-look-dock.panel-hull-open .vitals-hud {
    display: flex;
  }

  body.mobile-look-dock .flight-dialog--vitals .flight-dialog__header {
    padding: 0.55rem 0.7rem;
    border-bottom: 1px solid rgba(72, 107, 156, 0.45);
    pointer-events: auto;
  }

  body.mobile-look-dock .flight-dialog--vitals .flight-dialog__title.vitals-hud__ship {
    margin: 0;
  }

  body.mobile-look-dock .flight-dialog--vitals .flight-dialog__close {
    display: inline-block;
  }

  body.mobile-look-dock .flight-dialog--vitals .flight-dialog__body {
    padding: 0.55rem 0.7rem;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.mobile-look-dock .flight-dialog--chat .flight-dialog__header {
    border-bottom-color: rgba(72, 107, 156, 0.45);
  }

  body.mobile-look-dock .flight-dialog--chat .flight-dialog__title {
    color: #e7f0ff;
    font-size: 0.92rem;
    letter-spacing: normal;
  }

  body.mobile-look-dock .flight-dialog--chat .flight-dialog__close {
    border-color: #3a5988;
    background: rgba(20, 37, 66, 0.85);
    color: #dce8ff;
  }

  .nav-maps {
    top: var(--mobile-sheet-top);
    right: 0.3rem;
    left: auto;
    width: min(100vw - 0.6rem, 420px);
    max-height: calc(100vh - var(--mobile-sheet-top) - var(--mobile-chrome-stack));
  }

  .flight-assets {
    top: var(--mobile-sheet-top);
    right: 0.3rem;
    left: auto;
    width: min(100vw - 0.6rem, 420px);
    max-height: calc(100vh - var(--mobile-sheet-top) - var(--mobile-chrome-stack));
  }

  .account-settings {
    top: var(--mobile-sheet-top);
    right: 0.3rem;
    left: auto;
    width: min(100vw - 0.6rem, 420px);
    max-height: calc(100vh - var(--mobile-sheet-top) - var(--mobile-chrome-stack));
  }

  .nav-maps__stage {
    min-height: min(44vh, 360px);
    height: min(44vh, 360px);
  }

  .nav-maps__legend {
    display: none;
  }

  .nav-maps__opacity input[type="range"] {
    width: 5.5rem;
  }

  body.mobile-look-dock .touch-controls {
    position: fixed;
    left: 0.5rem;
    right: 0.5rem;
    bottom: var(--mobile-look-bottom);
    z-index: 12;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.65rem;
    pointer-events: none;
  }

  body.mobile-look-dock.panel-chat-open .touch-controls,
  body.mobile-look-dock.mobile-sheet-open .touch-controls {
    display: flex;
  }

  body.mobile-look-dock .touch-controls__left,
  body.mobile-look-dock .touch-controls__right {
    pointer-events: auto;
  }

  body.mobile-look-dock .touch-controls__label {
    margin: 0 0 0.22rem;
    font-size: 0.72rem;
    color: #d4e3ff;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  body.mobile-look-dock .touch-pad {
    width: 104px;
    height: 104px;
    border-radius: 50%;
    border: 1px solid #3b567f;
    background: rgba(6, 14, 30, 0.72);
    backdrop-filter: blur(3px);
    position: relative;
    touch-action: none;
    user-select: none;
  }

  body.mobile-look-dock .touch-pad__thumb {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid #7fa1d3;
    background: rgba(125, 168, 234, 0.34);
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    transition: transform 90ms linear;
    will-change: transform;
  }

  body.mobile-look-dock .touch-controls__right {
    display: grid;
    gap: 0.28rem;
    min-width: 7.5rem;
  }

  body.mobile-look-dock .touch-controls__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.28rem;
  }

  body.mobile-look-dock .touch-btn {
    border: 1px solid #35588a;
    border-radius: 10px;
    padding: 0.42rem 0.5rem;
    min-width: 0;
    font-size: 0.72rem;
    color: #e7f0ff;
    background: rgba(13, 30, 56, 0.82);
    touch-action: manipulation;
    user-select: none;
  }

  body.mobile-look-dock .touch-btn.active,
  body.mobile-look-dock .touch-btn:active {
    background: rgba(72, 126, 221, 0.9);
    border-color: #77a7f2;
  }

  body.mobile-look-dock .touch-btn--target {
    background: rgba(28, 52, 88, 0.88);
    border-color: #7aa4e0;
  }

  body.mobile-look-dock .touch-btn--target.is-locked {
    background: rgba(120, 58, 28, 0.9);
    border-color: #ff9a5c;
    color: #ffe0c8;
  }

  body.mobile-look-dock .touch-btn--fire {
    grid-column: 1 / -1;
    background: rgba(120, 36, 28, 0.88);
    border-color: #d4784a;
  }

  body.mobile-look-dock .flight-toast-stack {
    bottom: calc(var(--mobile-chrome-stack) + 0.25rem);
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(92vw, 22rem);
    margin-left: 0;
    margin-right: 0;
  }

  /* Spectate banner: one compact bar by default so the ship stays visible. */
  .npc-spectate-banner {
    align-self: stretch;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .npc-spectate-banner__toggle {
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    min-height: 2rem;
    padding: 0.1rem 0;
  }

  .npc-spectate-banner__chev {
    display: inline-block;
  }

  .npc-spectate-banner.is-collapsed {
    gap: 0;
    padding: 0.35rem 0.55rem;
  }

  .npc-spectate-banner.is-collapsed .npc-spectate-banner__detail {
    display: none;
  }

  .npc-spectate-banner.is-collapsed .npc-spectate-banner__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: min(42vw, 11rem);
  }

  .npc-spectate-banner:not(.is-collapsed) .npc-spectate-banner__detail {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
    padding-top: 0.15rem;
    border-top: 1px solid rgba(220, 180, 70, 0.22);
  }

  .npc-spectate-banner:not(.is-collapsed) .npc-spectate-banner__actions {
    width: 100%;
    justify-content: stretch;
  }

  .npc-spectate-banner:not(.is-collapsed) .npc-spectate-banner__actions .btn {
    flex: 1 1 0;
  }

  .canvas-hint {
    display: none;
  }

  .vitals-hud__row--offline {
    display: none;
  }

  /* Fallback when mobile-look-dock class not yet applied (pre-init). */
  body:not(.mobile-look-dock) .ship-console {
    left: 0.45rem;
    right: 0.45rem;
    top: var(--mobile-sheet-top);
    max-height: min(58vh, 24rem);
  }

  body:not(.mobile-look-dock) .ship-console__rail {
    display: none;
  }

  body:not(.mobile-look-dock) .touch-controls {
    position: fixed;
    inset: auto 0.5rem calc(3.55rem + env(safe-area-inset-bottom, 0px)) 0.5rem;
    z-index: 5;
    display: none;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.8rem;
    pointer-events: none;
  }

  body:not(.mobile-look-dock).panel-fly-open .touch-controls {
    display: flex;
  }
}
