html,
body {
  touch-action: none;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

body.play-mobile *,
body.play-mobile *::before,
body.play-mobile *::after {
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

body.play-mobile {
  cursor: default;
  background: #000;
  min-width: var(--mobile-vw, 100vw);
  min-height: var(--mobile-vh, 100vh);
  --mobile-gold: #f8d878;
  --mobile-cyan: #5ed7ff;
  --mobile-panel: rgba(5, 8, 18, 0.72);
  --mobile-panel-strong: rgba(6, 10, 22, 0.9);
  --mobile-safe-left: max(14px, env(safe-area-inset-left));
  --mobile-safe-right: max(14px, env(safe-area-inset-right));
  --mobile-safe-top: max(8px, env(safe-area-inset-top));
  --mobile-safe-bottom: max(14px, env(safe-area-inset-bottom));
  -webkit-touch-callout: none;
}

body.play-mobile #auth-btn,
body.play-mobile #auth-menu,
body.play-mobile #minimap,
body.play-mobile #controls-hint,
body.play-mobile #new-game-btn,
body.play-mobile #mute-btn,
body.play-mobile #dlc-btn,
body.play-mobile #kofi-btn,
body.play-mobile #system-banner,
body.play-mobile #tutorial-hint,
body.play-mobile #target-info,
body.play-mobile #scanner-overlay,
body.play-mobile #reward-feed,
body.play-mobile #reward-feed-root,
body.play-mobile #timeline-hud,
body.play-mobile .timeline-hud,
body.play-mobile #story-pacing-card,
body.play-mobile .story-pacing-card,
body.play-mobile #dock-hint,
body.play-mobile #dock-label,
body.play-mobile .directive-banner,
body.play-mobile .tutorial-hint,
body.play-mobile .tutorial-center,
body.play-mobile .tutorial-top,
body.play-mobile #onboarding-checklist,
body.play-mobile #mission-hud,
body.play-mobile #primary-objective,
body.play-mobile #pointer-hint,
body.play-mobile #reward-feed,
body.play-mobile .deadzone-ring {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

body.play-mobile::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 80%, rgba(94, 215, 255, 0.12), transparent 28%),
    radial-gradient(circle at 78% 15%, rgba(248, 216, 120, 0.08), transparent 24%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.36), transparent 22%, transparent 78%, rgba(0, 0, 0, 0.36));
}

body.play-mobile #canvas {
  touch-action: none;
  width: var(--mobile-vw, 100vw) !important;
  height: var(--mobile-vh, 100vh) !important;
}

#mobile-orientation-lock {
  display: none;
}

@media (orientation: portrait) {
  body.play-mobile #mobile-orientation-lock {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: grid;
    place-items: center;
    background:
      radial-gradient(circle at 50% 22%, rgba(94, 215, 255, 0.18), transparent 32%),
      linear-gradient(180deg, #07030f, #000);
    color: #f8d878;
    font-family: system-ui, sans-serif;
  }

  .mol-card {
    width: min(320px, calc(100vw - 48px));
    padding: 28px 24px;
    border: 1px solid rgba(248, 216, 120, 0.4);
    border-radius: 18px;
    background: rgba(8, 4, 18, 0.88);
    text-align: center;
    box-shadow: 0 0 70px rgba(248, 216, 120, 0.15);
  }

  .mol-icon {
    margin: 0 auto 18px;
    font-size: 13px;
    letter-spacing: 0.3em;
    color: #5ed7ff;
  }

  .mol-title {
    font-size: 24px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .mol-copy {
    margin-top: 12px;
    color: rgba(230, 225, 210, 0.72);
    font-size: 14px;
  }
}

body.play-mobile #hud {
  top: max(8px, env(safe-area-inset-top));
  left: var(--mobile-safe-left);
  right: var(--mobile-safe-right);
  padding: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  z-index: 80;
}

body.play-mobile #hud > .hud-panel:last-child {
  margin-right: 0;
}

body.play-mobile .hud-panel {
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(12, 14, 28, 0.9), rgba(4, 5, 12, 0.74)),
    radial-gradient(circle at 50% 0%, rgba(248, 216, 120, 0.12), transparent 70%);
  border-color: rgba(248, 216, 120, 0.46);
  box-shadow: 0 0 18px rgba(248, 216, 120, 0.1), inset 0 0 24px rgba(94, 215, 255, 0.04);
  display: grid;
  align-content: center;
}

body.play-mobile .mobile-kaela-top {
  grid-template-columns: 28px auto;
  align-items: center;
  gap: 8px;
  color: #f8d878;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.mobile-kaela-face {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #001018;
  background: linear-gradient(180deg, #8ff2ff, #3aa4ff);
  font-size: 9px;
  box-shadow: 0 0 16px rgba(94, 215, 255, 0.45);
}

body.play-mobile .mobile-system-panel {
  width: clamp(150px, 28vw, 260px);
}

body.play-mobile .mobile-system-panel .hud-value,
body.play-mobile .mobile-xp-panel .hud-xp-fraction {
  font-size: 16px;
  color: #f8d878;
}

body.play-mobile .mobile-xp-panel {
  width: min(200px, 42vw);
  max-width: 240px;
}

body.play-mobile .mobile-hidden-speed {
  position: fixed;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

body.play-mobile #weapon-status {
  width: 0;
  height: 0;
  top: calc(50% + 48px);
  transform: translateX(-50%);
  opacity: 0.75;
}

body.play-mobile #hud-br-dock {
  display: block !important;
  top: max(58px, env(safe-area-inset-top));
  right: var(--mobile-safe-right);
  bottom: auto;
  width: min(180px, 24vw);
  z-index: 82;
  transform: none;
}

body.play-mobile #combat-hud {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  width: 100%;
}

body.play-mobile .combat-bar-wrap,
body.play-mobile .combat-credits {
  width: auto;
  max-width: none;
  min-height: 32px;
  padding: 7px 8px;
  border-radius: 10px;
  background: var(--mobile-panel);
  border-color: rgba(94, 215, 255, 0.22);
}

body.play-mobile .combat-credits {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

body.play-mobile .combat-bar-label,
body.play-mobile .credits-label {
  font-size: 9px;
  color: #f8d878;
}

body.play-mobile .combat-bar {
  height: 6px;
}

body.play-mobile .combat-bar-value {
  font-size: 8px;
}

body.play-mobile .credits-value {
  font-size: 13px;
}

body.play-mobile #hud-rep,
body.play-mobile #combat-status {
  display: none !important;
}

#mobile-flight-ui {
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
  font-family: system-ui, sans-serif;
  color: #f8d878;
}

.mobile-throttle-zone {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(34vw, 360px);
  height: min(58vh, 290px);
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(94, 215, 255, 0.04), rgba(248, 216, 120, 0.03)),
    rgba(3, 6, 14, 0.08);
  box-shadow: inset 0 0 0 1px rgba(94, 215, 255, 0.08);
  pointer-events: auto;
  touch-action: none;
}

.mobile-throttle-title,
.mobile-throttle-arrow,
.mobile-throttle-help {
  display: block !important;
}

.mobile-throttle-title {
  position: absolute;
  top: 18px;
  left: 62px;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(248, 216, 120, 0.72);
}

.mobile-throttle-arrow {
  position: absolute;
  left: 50%;
  top: 36%;
  transform: translate(-50%, -50%);
  color: #ffc85f;
  font-size: 58px;
  line-height: 1;
  text-shadow: 0 0 18px rgba(248, 216, 120, 0.8);
  opacity: 0.36;
}

.mobile-throttle-readout {
  position: absolute;
  top: 32%;
  right: 44px;
  display: grid;
  gap: 2px;
  color: #5ed7ff;
  font-size: 11px;
  opacity: 0.88;
  transition: opacity 0.15s ease;
}

.mobile-throttle-readout strong {
  font-size: 13px;
}

.mobile-throttle-bar {
  position: absolute;
  right: 58px;
  top: 31%;
  width: 11px;
  height: 52%;
  border: 1px solid rgba(94, 215, 255, 0.38);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.18);
  opacity: 0.82;
  transition: opacity 0.15s ease;
}

.mobile-throttle-bar i {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0%;
  background: linear-gradient(180deg, #9ff6ff, #12b9ff);
  box-shadow: 0 0 14px rgba(94, 215, 255, 0.85);
}

.mobile-throttle-zone.active .mobile-throttle-bar,
.mobile-throttle-zone.active .mobile-throttle-readout {
  opacity: 1;
}

.mobile-throttle-help {
  position: absolute;
  left: 28px;
  font-size: 10px;
  color: rgba(160, 245, 255, 0.9);
}

.mobile-throttle-help.top {
  bottom: 42px;
}

.mobile-throttle-help.bottom {
  bottom: 18px;
}

.mobile-left-controls {
  position: absolute;
  left: var(--mobile-safe-left);
  bottom: var(--mobile-safe-bottom);
  display: flex;
  align-items: flex-end;
  gap: 8px;
  pointer-events: auto;
}

.mobile-stick {
  position: relative;
  width: clamp(96px, 14vw, 126px);
  height: clamp(96px, 14vw, 126px);
  border-radius: 28px;
  border: 1px solid rgba(94, 215, 255, 0.32);
  background:
    radial-gradient(circle, rgba(94, 215, 255, 0.12), transparent 58%),
    rgba(4, 9, 18, 0.42);
  box-shadow: 0 0 28px rgba(94, 215, 255, 0.12), inset 0 0 24px rgba(94, 215, 255, 0.08);
  touch-action: none;
  opacity: 0.9;
}

.stick-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 62px;
  height: 42px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 999px;
  border: 1px solid rgba(94, 215, 255, 0.35);
  background: rgba(5, 12, 20, 0.55);
  color: #f8d878;
  font-size: 8px;
  font-weight: 700;
}

.stick-arrow {
  position: absolute;
  color: #f8d878;
  font-size: 16px;
  opacity: 0.62;
}

.stick-arrow.up { top: 5px; left: 50%; transform: translateX(-50%); }
.stick-arrow.down { bottom: 5px; left: 50%; transform: translateX(-50%); }
.stick-arrow.left { left: 3px; top: 50%; transform: translateY(-50%); }
.stick-arrow.right { right: 3px; top: 50%; transform: translateY(-50%); }

#mobile-stick-knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  margin: 0;
  border-radius: 50%;
  background: rgba(94, 215, 255, 0.45);
  box-shadow: 0 0 10px rgba(94, 215, 255, 0.38);
  transform: translate(-50%, -50%);
}

.mobile-boost {
  width: clamp(62px, 9vw, 78px);
  height: clamp(62px, 9vw, 78px);
  border-radius: 50%;
  border: 1px solid rgba(94, 215, 255, 0.7);
  background: rgba(5, 12, 20, 0.8);
  color: #f8d878;
  display: grid;
  place-items: center;
  font-size: 8px;
  font-weight: 700;
  box-shadow: 0 0 22px rgba(94, 215, 255, 0.22);
  opacity: 0.86;
}

.mobile-boost strong {
  font-size: 12px;
  color: #f8d878;
}

.mobile-boost em {
  font-style: normal;
  color: #5ed7ff;
  font-size: 8px;
}

.mobile-boost.cooling {
  opacity: 0.55;
}

.mobile-bottom-nav {
  position: absolute;
  left: 50%;
  bottom: var(--mobile-safe-bottom);
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  pointer-events: auto;
}

.mobile-bottom-nav button {
  width: clamp(72px, 11vw, 102px);
  height: 46px;
  border: 1px solid rgba(248, 216, 120, 0.35);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(9, 18, 28, 0.88), rgba(4, 4, 12, 0.82));
  color: #5ed7ff;
  font-weight: 700;
  letter-spacing: 0.08em;
  display: grid;
  place-items: center;
  box-shadow: 0 0 18px rgba(248, 216, 120, 0.08);
}

.mobile-bottom-nav span {
  display: block;
  color: #f8d878;
  font-size: 9px;
}

.mobile-right-controls {
  position: absolute;
  right: var(--mobile-safe-right);
  bottom: var(--mobile-safe-bottom);
  width: clamp(176px, 25vw, 228px);
  height: clamp(150px, 23vh, 184px);
  pointer-events: auto;
}

.mobile-action {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(248, 216, 120, 0.48);
  background:
    radial-gradient(circle at 42% 34%, rgba(248, 216, 120, 0.18), transparent 44%),
    rgba(6, 8, 18, 0.84);
  color: #f8d878;
  box-shadow: 0 0 24px rgba(248, 216, 120, 0.12), inset 0 0 18px rgba(94, 215, 255, 0.05);
  font-weight: 800;
}

.mobile-action.fire {
  right: 0;
  bottom: 34px;
  width: clamp(86px, 13vw, 112px);
  height: clamp(86px, 13vw, 112px);
  font-size: 17px;
}

.mobile-action.fire span,
.mobile-action.pause span {
  display: block;
  margin-top: 4px;
  font-size: 8px;
  color: rgba(248, 216, 120, 0.75);
}

.mobile-action.missile {
  right: clamp(98px, 14vw, 126px);
  bottom: clamp(86px, 13vh, 106px);
  width: 62px;
  height: 62px;
  color: #f8d878;
  font-size: 10px;
}

.mobile-action.scan {
  right: clamp(104px, 15vw, 132px);
  bottom: 0;
  width: 58px;
  height: 58px;
  font-size: 10px;
}

.mobile-action.pause {
  right: clamp(56px, 8vw, 72px);
  bottom: 0;
  width: 58px;
  height: 58px;
  font-size: 14px;
}

.mobile-missile-menu {
  position: absolute;
  right: clamp(132px, 16vw, 170px);
  bottom: clamp(78px, 18vh, 112px);
  display: grid;
  gap: 7px;
  opacity: 0;
  transform: translateX(10px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.12s, transform 0.12s;
}

.mobile-missile-menu.visible {
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: auto;
}

.mobile-missile-menu button {
  width: 92px;
  height: 42px;
  border: 1px solid rgba(248, 216, 120, 0.32);
  border-radius: 11px;
  background: rgba(4, 8, 18, 0.62);
  color: #f8d878;
  display: grid;
  place-items: center;
  gap: 1px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.mobile-missile-menu button strong {
  font-size: 10px;
  letter-spacing: 0.16em;
}

.mobile-missile-menu button span {
  font-size: 7px;
  letter-spacing: 0.12em;
  color: rgba(94, 215, 255, 0.72);
}

.mobile-missile-menu button.active,
.mobile-missile-menu button.hover {
  color: #061018;
  background: #f8d878;
}

.mobile-missile-menu button.active span,
.mobile-missile-menu button.hover span {
  color: rgba(6, 16, 24, 0.72);
}

body.play-mobile #mobile-command-menu {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: none;
  font-family: system-ui, sans-serif;
  color: #f8d878;
}

body.play-mobile #mobile-command-menu.visible {
  display: block;
}

.mcm-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(94, 215, 255, 0.16), transparent 42%),
    rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
}

.mcm-shell {
  position: absolute;
  inset: max(18px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(76px, env(safe-area-inset-left));
  display: grid;
  grid-template-rows: 70px 1fr 48px;
  gap: 12px;
}

.mcm-header,
.mcm-footer {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mcm-header button,
.mcm-footer > div,
.mcm-grid button {
  border: 1px solid rgba(248, 216, 120, 0.4);
  background: linear-gradient(180deg, rgba(10, 12, 22, 0.9), rgba(4, 5, 12, 0.8));
  color: #f8d878;
  border-radius: 10px;
  box-shadow: inset 0 0 24px rgba(94, 215, 255, 0.04), 0 0 16px rgba(248, 216, 120, 0.08);
}

.mcm-continue {
  width: 210px;
  height: 58px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.mcm-title {
  flex: 1;
  text-align: center;
  display: grid;
  align-content: center;
  height: 66px;
  border: 1px solid rgba(248, 216, 120, 0.28);
  background: rgba(4, 8, 16, 0.78);
  border-radius: 12px;
}

.mcm-title strong {
  font-size: clamp(23px, 3vw, 34px);
  letter-spacing: 0.08em;
}

.mcm-title span {
  color: #5ed7ff;
  font-size: 14px;
  letter-spacing: 0.08em;
}

.mcm-kaela {
  width: 144px;
  height: 58px;
  font-size: 16px;
  font-weight: 800;
}

.mcm-settings {
  width: 58px;
  height: 58px;
  font-size: 24px;
}

.mcm-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-height: 0;
}

.mcm-grid button {
  display: grid;
  grid-template-rows: 1fr auto auto;
  place-items: center;
  min-width: 0;
  padding: 12px;
}

.mcm-grid button.selected {
  border-color: #5ed7ff;
  box-shadow: 0 0 26px rgba(94, 215, 255, 0.52), inset 0 0 32px rgba(94, 215, 255, 0.09);
}

.mcm-grid i {
  font-style: normal;
  font-size: clamp(30px, 4vw, 54px);
  color: #5ed7ff;
}

.mcm-grid strong {
  font-size: clamp(13px, 1.8vw, 18px);
  letter-spacing: 0.08em;
}

.mcm-grid span {
  color: #5ed7ff;
  font-size: clamp(9px, 1vw, 12px);
}

.mcm-status {
  flex: 1;
  display: flex;
  gap: 8px;
  padding: 8px 10px;
}

.mcm-status span {
  padding: 6px 9px;
  border-radius: 8px;
  color: #dff9ff;
  background: rgba(94, 215, 255, 0.08);
  white-space: nowrap;
}

.mcm-hint {
  width: 310px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #f8d878;
}

.mcm-saved {
  width: 150px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #7bff9a !important;
  border-color: rgba(123, 255, 154, 0.42) !important;
}

body.play-mobile:has(#mobile-command-menu.visible) #mobile-flight-ui,
body.play-mobile:has(#pilot-hub.visible) #mobile-flight-ui,
body.play-mobile:has(#story-panel.visible) #mobile-flight-ui,
body.play-mobile:has(#market-panel.visible) #mobile-flight-ui,
body.play-mobile:has(#shipyard-panel.visible) #mobile-flight-ui,
body.play-mobile:has(#crew-panel.visible) #mobile-flight-ui,
body.play-mobile:has(#entitlements-panel.visible) #mobile-flight-ui {
  opacity: 0;
  pointer-events: none;
}

body.play-mobile #pilot-hub.visible {
  z-index: 11900;
}

body.play-mobile #pilot-hub.visible .ph-top {
  padding-left: max(76px, env(safe-area-inset-left));
}

/* Mobile modal/panel pass: gameplay chrome should not compete with story
   or Pilot Command panels on a 430px-tall landscape viewport. */
body.play-mobile:has(#story-panel.visible) #hud,
body.play-mobile:has(#story-panel.visible) #hud-br-dock,
body.play-mobile:has(#story-panel.visible) #mission-hud,
body.play-mobile:has(#story-panel.visible) #primary-objective,
body.play-mobile:has(#story-panel.visible) #mobile-flight-ui,
body.play-mobile:has(#story-panel.visible) #mobile-install-btn {
  opacity: 0 !important;
  pointer-events: none !important;
}

body.play-mobile #story-panel {
  left: 50% !important;
  right: auto !important;
  top: 50% !important;
  bottom: auto !important;
  width: min(820px, calc(100vw - max(112px, env(safe-area-inset-left)) - 24px)) !important;
  height: min(352px, calc(100vh - 78px)) !important;
  max-width: none !important;
  max-height: none !important;
  transform: translate(-50%, -50%) !important;
  display: grid !important;
  grid-template-columns: minmax(150px, 27%) minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) auto !important;
  gap: 10px 16px !important;
  padding: 14px 16px !important;
  overflow: hidden !important;
  border-radius: 18px !important;
}

body.play-mobile #story-panel.visible,
body.play-mobile #story-panel.visible[data-sequence] {
  transform: translate(-50%, -50%) !important;
}

body.play-mobile #story-panel .story-speaker-header {
  grid-row: 1 / 3 !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  align-content: start !important;
  gap: 10px !important;
  min-width: 0 !important;
}

body.play-mobile #story-panel .story-avatar {
  width: 100% !important;
  height: min(55vh, 226px) !important;
  max-width: 230px !important;
  border-radius: 14px !important;
  overflow: hidden !important;
}

body.play-mobile #story-panel .story-avatar img,
body.play-mobile #story-panel .story-avatar svg {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

body.play-mobile #story-panel .story-speaker-meta {
  min-width: 0 !important;
}

body.play-mobile #story-panel .story-dialogue {
  grid-column: 2 !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: hidden !important;
  font-size: clamp(13px, 1.72vw, 17px) !important;
  line-height: 1.35 !important;
  padding-right: 4px !important;
}

body.play-mobile #story-panel .story-skip-hint,
body.play-mobile #story-panel .story-directive {
  display: none !important;
}

body.play-mobile #story-panel .story-choices {
  grid-column: 2 !important;
  align-self: end !important;
  display: grid !important;
  gap: 8px !important;
  max-height: 43vh !important;
  overflow: hidden !important;
}

body.play-mobile #story-panel .story-choice {
  min-height: 48px !important;
  padding: 9px 12px !important;
  font-size: 13px !important;
}

body.play-mobile #story-panel .story-choice-flavor {
  font-size: 12px !important;
  line-height: 1.25 !important;
}

body.play-mobile #pilot-hub.visible {
  background: rgba(3, 4, 10, 0.98) !important;
}

body.play-mobile #pilot-hub.visible .ph-top {
  height: 72px !important;
  min-height: 72px !important;
  grid-template-columns: minmax(150px, 24%) minmax(0, 1fr) 48px !important;
  gap: 12px !important;
  padding: max(10px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 10px max(72px, env(safe-area-inset-left)) !important;
  overflow: hidden !important;
}

body.play-mobile #pilot-hub .ph-location {
  font-size: clamp(16px, 2.1vw, 24px) !important;
  letter-spacing: 0.18em !important;
  white-space: nowrap !important;
}

body.play-mobile #pilot-hub .ph-location-sub {
  font-size: 9px !important;
}

body.play-mobile #pilot-hub .ph-tabs {
  justify-self: stretch !important;
  justify-content: flex-start !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  flex-wrap: nowrap !important;
  gap: 7px !important;
  padding: 2px 4px !important;
  scrollbar-width: none !important;
}

body.play-mobile #pilot-hub .ph-tabs::-webkit-scrollbar {
  display: none !important;
}

body.play-mobile #pilot-hub .ph-tab {
  flex: 0 0 auto !important;
  min-width: 92px !important;
  min-height: 44px !important;
  padding: 10px 14px !important;
  font-size: 11px !important;
  letter-spacing: 0.18em !important;
}

body.play-mobile #pilot-hub .ph-ad-hint {
  display: none !important;
}

body.play-mobile #pilot-hub .ph-esc {
  width: 44px !important;
  height: 44px !important;
  padding: 0 !important;
  border-radius: 50% !important;
}

body.play-mobile #pilot-hub .ph-body {
  width: 100vw !important;
  border-radius: 0 !important;
  border-left: 0 !important;
  border-right: 0 !important;
}

body.play-mobile #pilot-hub .ph-panel {
  overflow: hidden !important;
}

body.play-mobile #pilot-hub .ph-kaela-main,
body.play-mobile #pilot-hub .ph-kaela-shell {
  height: 100% !important;
  min-height: 0 !important;
}

body.play-mobile #pilot-hub .ph-kaela-shell {
  padding: 18px 22px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) auto !important;
  gap: 12px !important;
}

body.play-mobile #pilot-hub .ph-kaela-hero {
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.5fr) !important;
  gap: 18px !important;
  padding: 18px !important;
}

body.play-mobile #pilot-hub .ph-kaela-portrait-wrap {
  display: none !important;
}

body.play-mobile #pilot-hub .ph-kaela-copy {
  grid-column: 1 / -1 !important;
  align-self: center !important;
}

body.play-mobile #pilot-hub .ph-kaela-copy h2 {
  font-size: clamp(22px, 3vw, 34px) !important;
}

body.play-mobile #pilot-hub .ph-kaela-copy p {
  font-size: clamp(13px, 1.6vw, 16px) !important;
  line-height: 1.5 !important;
  max-width: 760px !important;
}

body.play-mobile #pilot-hub .ph-kaela-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
}

body.play-mobile #pilot-hub .ph-kaela-grid {
  display: none !important;
}

body.play-mobile #pilot-hub .ph-split-mis {
  display: grid !important;
  grid-template-columns: minmax(250px, 38%) minmax(0, 1fr) !important;
  gap: 0 !important;
  height: 100% !important;
  min-height: 0 !important;
}

body.play-mobile #pilot-hub .ph-mis-list,
body.play-mobile #pilot-hub .ph-mis-detail {
  height: 100% !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

body.play-mobile #pilot-hub .ph-mis-list {
  padding: 12px !important;
}

body.play-mobile #pilot-hub .ph-mis-row {
  min-height: 54px !important;
  padding: 10px 12px !important;
}

body.play-mobile #pilot-hub .ph-mis-detail {
  padding: 16px 18px !important;
}

body.play-mobile #pilot-hub .ph-mis-detail-title {
  font-size: clamp(20px, 2.6vw, 28px) !important;
  margin-bottom: 8px !important;
}

body.play-mobile #pilot-hub .ph-mis-detail-body,
body.play-mobile #pilot-hub .ph-mis-whereami {
  font-size: 13px !important;
  line-height: 1.45 !important;
}

body.play-mobile #pilot-hub .ph-timeline-host {
  padding: 0 !important;
}

body.play-mobile #pilot-hub #timeline-panel.ph-timeline-embedded {
  inset: 10px 14px 12px !important;
  min-height: 0 !important;
}

body.play-mobile #pilot-hub #timeline-panel .tl-header {
  grid-template-columns: minmax(0, 1fr) auto !important;
  padding: 12px 16px 8px !important;
}

body.play-mobile #pilot-hub #timeline-panel .tl-header-title {
  font-size: clamp(18px, 2.8vw, 28px) !important;
}

body.play-mobile #pilot-hub #timeline-panel .tl-header-subtitle {
  font-size: 10px !important;
}

body.play-mobile #pilot-hub #timeline-panel .tl-header-center,
body.play-mobile #pilot-hub #timeline-panel .tl-phase-strip {
  display: none !important;
}

body.play-mobile #pilot-hub #timeline-panel .tl-header-endings-label {
  font-size: 8px !important;
}

body.play-mobile #pilot-hub #timeline-panel .tl-header-endings-value {
  font-size: clamp(22px, 3.4vw, 34px) !important;
}

body.play-mobile #pilot-hub #timeline-panel .tl-signal-row {
  padding: 6px 16px !important;
}

body.play-mobile #pilot-hub #timeline-panel .tl-ledger,
body.play-mobile #pilot-hub #timeline-panel .tl-endings-bar {
  display: none !important;
}

body.play-mobile #pilot-hub #timeline-panel #tl-svg,
body.play-mobile #pilot-hub #timeline-panel svg {
  width: 100% !important;
  height: 100% !important;
}

body.play-mobile #pilot-hub #galaxy-map {
  padding: 12px 14px !important;
  height: 100% !important;
}

body.play-mobile #pilot-hub #galaxy-map .gmap-header {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 0 0 8px !important;
  text-align: left !important;
}

body.play-mobile #pilot-hub #galaxy-map .gmap-header::after,
body.play-mobile #pilot-hub #galaxy-map .gmap-sub,
body.play-mobile #pilot-hub #galaxy-map .gmap-scan-hint {
  display: none !important;
}

body.play-mobile #pilot-hub #galaxy-map .gmap-title {
  font-size: clamp(19px, 2.7vw, 30px) !important;
  letter-spacing: 0.28em !important;
  margin: 0 !important;
}

body.play-mobile #pilot-hub #galaxy-map .gmap-objectives {
  grid-column: 1 / -1 !important;
  margin: 6px 0 0 !important;
  max-width: none !important;
  padding: 8px 12px !important;
}

body.play-mobile #pilot-hub #galaxy-map .gmap-canvas-wrap {
  min-height: 0 !important;
  flex: 1 1 auto !important;
}

body.play-mobile #pilot-hub #galaxy-map .gmap-footer {
  min-height: 44px !important;
  padding-top: 8px !important;
}

body.play-mobile #pilot-hub #galaxy-map .gmap-close,
body.play-mobile #pilot-hub #galaxy-map .gmap-zoom-btn {
  min-width: 44px !important;
  min-height: 44px !important;
}

#mobile-install-btn {
  position: fixed;
  left: max(76px, env(safe-area-inset-left));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 13000;
  border: 1px solid rgba(94, 215, 255, 0.42);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(8, 12, 22, 0.96), rgba(4, 5, 12, 0.94));
  color: #5ed7ff;
  padding: 10px 14px;
  font-size: 10px;
  letter-spacing: 0.16em;
  font-family: system-ui, sans-serif;
  font-weight: 800;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.42), 0 0 24px rgba(94, 215, 255, 0.16);
  pointer-events: auto;
  display: none;
}

#mobile-install-btn.visible {
  display: block;
}

body.play-mobile #mobile-flight-ui:has(.mobile-missile-menu.visible) .mobile-throttle-readout,
body.play-mobile #mobile-flight-ui:has(.mobile-missile-menu.visible) .mobile-throttle-bar {
  opacity: 0 !important;
}

body.play-mobile #mobile-flight-ui #mobile-install-btn,
body.play-mobile #mobile-install-btn {
  left: max(76px, env(safe-area-inset-left));
  top: max(58px, env(safe-area-inset-top));
  bottom: auto;
  padding: 7px 11px;
  font-size: 9px;
  opacity: 0.58;
}

@media (max-height: 460px) {
  body.play-mobile #mobile-install-btn {
    top: max(50px, env(safe-area-inset-top));
  }

  body.play-mobile .mobile-right-controls {
    right: max(20px, env(safe-area-inset-right));
    transform: scale(0.84);
    transform-origin: bottom right;
  }

  body.play-mobile .mobile-left-controls {
    transform: scale(0.82);
    transform-origin: bottom left;
  }

  body.play-mobile .mobile-bottom-nav {
    transform: translateX(-50%) scale(0.88);
    transform-origin: bottom center;
  }
}

/* Clean cockpit pass: keep the game visible and make controls secondary. */
body.play-mobile::before {
  opacity: 0.45;
}

body.play-mobile #hud {
  left: max(12px, env(safe-area-inset-left));
  right: max(12px, env(safe-area-inset-right));
}

body.play-mobile .hud-panel {
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(4, 8, 18, 0.58);
  border-color: rgba(248, 216, 120, 0.28);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.2);
}

body.play-mobile .mobile-kaela-top {
  grid-template-columns: 24px auto;
  font-size: 10px;
}

body.play-mobile .mobile-kaela-face {
  width: 24px;
  height: 24px;
}

body.play-mobile .mobile-system-panel {
  width: clamp(170px, 26vw, 250px);
}

body.play-mobile .mobile-system-panel .hud-label {
  display: none;
}

body.play-mobile .mobile-system-panel .hud-value {
  font-size: clamp(14px, 2vw, 20px);
  letter-spacing: 0.26em;
}

body.play-mobile .mobile-xp-panel {
  width: min(190px, 36vw);
}

body.play-mobile #mobile-install-btn {
  top: max(50px, env(safe-area-inset-top));
  left: max(94px, env(safe-area-inset-left));
  padding: 5px 9px;
  opacity: 0.32;
}

body.play-mobile #hud-br-dock {
  top: max(86px, env(safe-area-inset-top));
  width: 156px;
  opacity: 0.82;
}

body.play-mobile #combat-hud {
  gap: 5px;
}

body.play-mobile .combat-bar-wrap,
body.play-mobile .combat-credits {
  min-height: 26px;
  padding: 5px 7px;
  background: rgba(4, 8, 18, 0.5);
  border-color: rgba(94, 215, 255, 0.18);
}

body.play-mobile .combat-bar-label,
body.play-mobile .credits-label {
  font-size: 8px;
  letter-spacing: 0.2em;
}

body.play-mobile .combat-bar {
  height: 5px;
}

body.play-mobile #weapon-status {
  width: 0;
  height: 0;
  top: calc(50% + 32px);
  transform: translateX(-50%);
  opacity: 0.42;
}

body.play-mobile #weapon-missile-hud {
  display: none !important;
}

body.play-mobile .mobile-throttle-zone {
  top: 53%;
  width: min(30vw, 320px);
  height: min(42vh, 210px);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(5, 9, 18, 0.44), rgba(5, 9, 18, 0.2));
  box-shadow:
    inset 0 0 0 1px rgba(248, 216, 120, 0.18),
    inset 0 0 42px rgba(94, 215, 255, 0.06);
  backdrop-filter: blur(2px);
}

body.play-mobile .mobile-throttle-arrow {
  display: none !important;
}

body.play-mobile .mobile-throttle-title,
body.play-mobile .mobile-throttle-help {
  display: block !important;
}

body.play-mobile .mobile-throttle-title {
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(248, 216, 120, 0.88);
  font-size: 10px;
  letter-spacing: 0.24em;
}

body.play-mobile .mobile-throttle-readout,
body.play-mobile .mobile-throttle-bar {
  opacity: 1;
}

body.play-mobile .mobile-throttle-zone.active .mobile-throttle-readout,
body.play-mobile .mobile-throttle-zone.active .mobile-throttle-bar {
  opacity: 1;
}

body.play-mobile .mobile-throttle-readout {
  top: 46%;
  right: auto;
  left: 50%;
  bottom: auto;
  transform: translate(-50%, -50%);
  place-items: center;
  padding: 7px 11px;
  border-radius: 14px;
  background: rgba(3, 6, 14, 0.7);
  border: 1px solid rgba(94, 215, 255, 0.22);
  text-align: center;
}

body.play-mobile .mobile-throttle-readout span {
  font-size: 9px;
  letter-spacing: 0.18em;
}

body.play-mobile .mobile-throttle-readout strong {
  color: #f8d878;
  font-size: 22px;
}

body.play-mobile .mobile-throttle-bar {
  left: 50%;
  right: auto;
  top: auto;
  bottom: 18px;
  width: calc(100% - 42px);
  height: 10px;
  transform: translateX(-50%);
  border-color: rgba(94, 215, 255, 0.28);
  background: rgba(0, 0, 0, 0.34);
}

body.play-mobile .mobile-throttle-bar i {
  top: 0;
  bottom: auto;
  width: 0%;
  height: 100% !important;
  background: linear-gradient(90deg, #5ed7ff, #f8d878);
}

body.play-mobile .mobile-throttle-zone::before {
  content: '0';
  position: absolute;
  left: 20px;
  bottom: 34px;
  color: rgba(232, 228, 220, 0.54);
  font-size: 9px;
  letter-spacing: 0.08em;
}

body.play-mobile .mobile-throttle-zone::after {
  content: '100';
  position: absolute;
  right: 18px;
  bottom: 34px;
  color: rgba(232, 228, 220, 0.54);
  font-size: 9px;
  letter-spacing: 0.08em;
}

body.play-mobile .mobile-throttle-help {
  left: 50%;
  transform: translateX(-50%);
  color: rgba(160, 245, 255, 0.68);
  font-size: 9px;
  white-space: nowrap;
}

body.play-mobile .mobile-throttle-help.top {
  bottom: 42px;
}

body.play-mobile .mobile-throttle-help.bottom {
  display: none !important;
}

body.play-mobile .mobile-left-controls {
  gap: 6px;
}

body.play-mobile .mobile-stick {
  width: 102px;
  height: 102px;
  border-radius: 50%;
  opacity: 0.52;
  background: rgba(4, 8, 18, 0.26);
  box-shadow: inset 0 0 0 1px rgba(94, 215, 255, 0.12);
}

body.play-mobile .stick-core {
  width: 42px;
  height: 30px;
  font-size: 7px;
  background: rgba(4, 8, 18, 0.42);
}

body.play-mobile .mobile-boost {
  width: 54px;
  height: 54px;
  opacity: 0.58;
  background: rgba(4, 8, 18, 0.46);
}

body.play-mobile .mobile-bottom-nav {
  gap: 8px;
}

body.play-mobile .mobile-bottom-nav button {
  width: 82px;
  height: 40px;
  border-radius: 12px;
  background: rgba(4, 8, 18, 0.5);
  border-color: rgba(248, 216, 120, 0.22);
  opacity: 0.78;
}

body.play-mobile .mobile-right-controls {
  width: 170px;
  height: 136px;
}

body.play-mobile .mobile-action {
  background: rgba(4, 8, 18, 0.54);
  border-color: rgba(248, 216, 120, 0.28);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
  opacity: 0.78;
}

body.play-mobile .mobile-action.fire {
  width: 78px;
  height: 78px;
  bottom: 28px;
}

body.play-mobile .mobile-action.missile {
  right: 86px;
  bottom: 82px;
  width: 48px;
  height: 48px;
  font-size: 8px;
}

body.play-mobile .mobile-action.missile span {
  display: none;
}

body.play-mobile .mobile-action.scan,
body.play-mobile .mobile-action.pause {
  width: 48px;
  height: 48px;
}

body.play-mobile .mobile-action.scan {
  right: 92px;
}

body.play-mobile .mobile-action.pause {
  right: 44px;
}

@media (max-height: 460px) {
  body.play-mobile #hud-br-dock,
  body.play-mobile .mobile-left-controls,
  body.play-mobile .mobile-right-controls,
  body.play-mobile .mobile-bottom-nav {
    transform: none;
  }
}

body.play-mobile.mobile-standalone #mobile-install-btn {
  display: none;
}

body.play-mobile.mobile-install-available #mobile-install-btn {
  display: block;
}

#mobile-install-sheet {
  position: fixed;
  inset: 0;
  z-index: 13010;
  display: none;
  align-items: center;
  justify-content: center;
  padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(76px, env(safe-area-inset-left));
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(10px);
  pointer-events: auto;
  font-family: system-ui, sans-serif;
}

#mobile-install-sheet.visible {
  display: flex;
}

.mis-card {
  position: relative;
  width: min(560px, calc(100vw - 120px));
  padding: 22px 24px 20px;
  border: 1px solid rgba(248, 216, 120, 0.42);
  border-radius: 18px;
  background:
    radial-gradient(circle at 12% 0%, rgba(94, 215, 255, 0.14), transparent 45%),
    linear-gradient(180deg, rgba(10, 12, 24, 0.97), rgba(4, 5, 12, 0.96));
  color: #e8e4dc;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.62), 0 0 32px rgba(248, 216, 120, 0.12);
}

.mis-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(248, 216, 120, 0.35);
  background: rgba(0, 0, 0, 0.32);
  color: #f8d878;
  font-size: 22px;
}

.mis-kicker {
  color: #5ed7ff;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 800;
}

.mis-title {
  margin-top: 6px;
  color: #f8d878;
  font-size: 26px;
  letter-spacing: 0.08em;
  font-weight: 800;
}

.mis-card ol {
  margin: 16px 0 12px 22px;
  padding: 0;
  color: rgba(232, 228, 220, 0.88);
  line-height: 1.7;
  font-size: 14px;
}

.mis-card p {
  margin: 0;
  color: rgba(190, 210, 220, 0.78);
  font-size: 12px;
  line-height: 1.5;
}

/* Mobile hangar: the shared runtime injects this screen with inline styles.
   On iPhone it is too tall, so the mobile entry compresses it hard instead
   of adding scroll. */
body.play-mobile #hangar-screen {
  justify-content: center !important;
  overflow: hidden !important;
  padding: max(8px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(84px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)) !important;
  box-sizing: border-box !important;
}

/* Mobile hangar: class hooks (structure shared with desktop boot hangar). */
body.play-mobile #hangar-screen .hangar-kicker,
body.play-mobile #hangar-screen .hangar-brand-title,
body.play-mobile #hangar-screen .hangar-brand-sub,
body.play-mobile #hangar-screen .hangar-welcome-ghost,
body.play-mobile #hangar-screen .hangar-new-pitch,
body.play-mobile #hangar-screen .hangar-ship,
body.play-mobile #hangar-screen .hangar-resume-line,
body.play-mobile #hangar-screen .hangar-returning-hint,
body.play-mobile #hangar-screen .hangar-xp,
body.play-mobile #hangar-screen .hangar-enter-hint,
body.play-mobile #hangar-screen .hangar-foot-note,
body.play-mobile #hangar-screen .hangar-version-foot {
  display: none !important;
}

body.play-mobile #hangar-screen .hangar-quick-stats {
  gap: 26px !important;
  margin: 0 0 18px !important;
  flex-wrap: nowrap !important;
  transform: scale(0.92) !important;
  transform-origin: center top !important;
}

body.play-mobile #hangar-screen .hangar-quick-stats > div:nth-child(3),
body.play-mobile #hangar-screen .hangar-quick-stats > div:nth-child(4) {
  display: none !important;
}

body.play-mobile #hangar-screen .hangar-panels {
  width: min(520px, calc(100vw - 32px)) !important;
  grid-template-columns: 1fr !important;
  margin: 0 0 16px !important;
  transform: none !important;
  transform-origin: center top !important;
}

body.play-mobile #hangar-screen .hangar-panels > div:first-child {
  padding: 14px 16px !important;
}

body.play-mobile #hangar-screen .hangar-legacy-grid {
  display: none !important;
}

body.play-mobile #hangar-screen .hangar-panels > div:nth-child(2) {
  display: none !important;
}

body.play-mobile #hangar-launch {
  position: fixed !important;
  left: 50% !important;
  bottom: max(14px, env(safe-area-inset-bottom)) !important;
  transform: translateX(-50%) !important;
  z-index: 10502 !important;
  padding: 14px 44px !important;
  min-width: min(320px, calc(100vw - 44px)) !important;
  min-height: 52px !important;
}

body.play-mobile #hangar-screen .hangar-actions {
  margin-bottom: max(64px, env(safe-area-inset-bottom)) !important;
}

@media (max-height: 460px) {
  body.play-mobile #hud {
    top: 8px;
  }

  body.play-mobile #hud-br-dock {
    top: 78px;
    transform: scale(0.92);
    transform-origin: top right;
  }

  .mobile-throttle-zone {
    height: 66vh;
  }

  .mobile-left-controls {
    transform: scale(0.9);
    transform-origin: bottom left;
  }

  .mobile-right-controls {
    transform: scale(0.9);
    transform-origin: bottom right;
  }

  body.play-mobile #hangar-screen .hangar-quick-stats,
  body.play-mobile #hangar-screen .hangar-panels {
    transform: scale(0.86) !important;
    margin-bottom: 6px !important;
  }
}

/* Modern phone cockpit pass: use visualViewport variables from
   mobile-controls.js so iPhone browser chrome and notches do not steal taps. */
body.play-mobile.mobile-runtime #mobile-flight-ui {
  width: var(--mobile-vw, 100vw);
  height: var(--mobile-vh, 100vh);
  inset: 0 auto auto 0;
}

body.play-mobile.mobile-runtime button,
body.play-mobile.mobile-runtime [role="button"],
body.play-mobile.mobile-runtime .mobile-stick,
body.play-mobile.mobile-runtime .mobile-throttle-zone {
  -webkit-user-select: none;
  user-select: none;
}

body.play-mobile.mobile-runtime .mobile-left-controls {
  left: max(18px, env(safe-area-inset-left));
  bottom: max(16px, env(safe-area-inset-bottom));
  gap: 10px;
}

body.play-mobile.mobile-runtime .mobile-stick {
  width: clamp(112px, 12.5vw, 138px);
  height: clamp(112px, 12.5vw, 138px);
  opacity: 0.72;
  background: rgba(4, 8, 18, 0.42);
  border-color: rgba(94, 215, 255, 0.34);
}

body.play-mobile.mobile-runtime .mobile-boost {
  width: clamp(62px, 7.5vw, 76px);
  height: clamp(62px, 7.5vw, 76px);
  opacity: 0.76;
}

body.play-mobile.mobile-runtime .mobile-right-controls {
  right: max(18px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  width: clamp(188px, 22vw, 224px);
  height: clamp(148px, 34vh, 176px);
}

body.play-mobile.mobile-runtime .mobile-action {
  opacity: 0.88;
  border-color: rgba(248, 216, 120, 0.42);
  background: rgba(4, 8, 18, 0.68);
}

body.play-mobile.mobile-runtime .mobile-action.fire {
  width: clamp(88px, 10.5vw, 112px);
  height: clamp(88px, 10.5vw, 112px);
  bottom: 30px;
}

body.play-mobile.mobile-runtime .mobile-action.missile {
  right: clamp(100px, 12vw, 132px);
  bottom: clamp(86px, 20vh, 108px);
  width: clamp(54px, 6.3vw, 66px);
  height: clamp(54px, 6.3vw, 66px);
}

body.play-mobile.mobile-runtime .mobile-action.scan,
body.play-mobile.mobile-runtime .mobile-action.pause {
  width: clamp(54px, 6.3vw, 64px);
  height: clamp(54px, 6.3vw, 64px);
}

body.play-mobile.mobile-runtime .mobile-action.scan {
  right: clamp(102px, 12vw, 132px);
}

body.play-mobile.mobile-runtime .mobile-action.pause {
  right: clamp(48px, 6vw, 68px);
}

body.play-mobile.mobile-runtime .mobile-bottom-nav {
  bottom: max(16px, env(safe-area-inset-bottom));
  gap: 10px;
}

body.play-mobile.mobile-runtime .mobile-bottom-nav button {
  width: clamp(86px, 10vw, 112px);
  height: 46px;
  opacity: 0.88;
  background: rgba(4, 8, 18, 0.72);
}

body.play-mobile.mobile-runtime .mobile-throttle-zone {
  top: 54%;
  width: clamp(220px, 29vw, 340px);
  height: clamp(168px, 43vh, 230px);
  opacity: 0.88;
}

body.play-mobile.mobile-compact-height .mobile-throttle-zone {
  top: 52%;
  height: clamp(150px, 39vh, 190px);
}

body.play-mobile.mobile-compact-height .mobile-left-controls {
  transform: scale(0.92);
  transform-origin: bottom left;
}

body.play-mobile.mobile-compact-height .mobile-right-controls {
  transform: scale(0.92);
  transform-origin: bottom right;
}

body.play-mobile.mobile-compact-height .mobile-bottom-nav {
  transform: translateX(-50%) scale(0.94);
  transform-origin: bottom center;
}

body.play-mobile.mobile-wide-ratio .mobile-throttle-zone {
  width: clamp(210px, 24vw, 300px);
}

/* Cockpit v5: keep throttle touchable but remove the big visual box. */
body.play-mobile.mobile-runtime .mobile-throttle-zone {
  top: 51%;
  width: min(24vw, 260px);
  height: min(36vh, 176px);
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  opacity: 1;
}

body.play-mobile.mobile-runtime .mobile-throttle-zone::before,
body.play-mobile.mobile-runtime .mobile-throttle-zone::after,
body.play-mobile.mobile-runtime .mobile-throttle-title,
body.play-mobile.mobile-runtime .mobile-throttle-help {
  display: none !important;
}

body.play-mobile.mobile-runtime .mobile-throttle-readout {
  top: 50%;
  padding: 0;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  opacity: 0.42;
  text-shadow: 0 0 14px rgba(248, 216, 120, 0.45);
}

body.play-mobile.mobile-runtime .mobile-throttle-readout span {
  font-size: 8px;
  color: rgba(94, 215, 255, 0.55);
}

body.play-mobile.mobile-runtime .mobile-throttle-readout strong {
  font-size: clamp(18px, 3vw, 26px);
  color: rgba(248, 216, 120, 0.72);
}

body.play-mobile.mobile-runtime .mobile-throttle-bar {
  bottom: 32px;
  width: min(170px, 18vw);
  height: 4px;
  border: 0;
  background: rgba(255, 255, 255, 0.1);
  opacity: 0.28;
}

body.play-mobile.mobile-runtime .mobile-throttle-bar i {
  background: linear-gradient(90deg, rgba(94, 215, 255, 0.75), rgba(248, 216, 120, 0.75));
  box-shadow: 0 0 10px rgba(248, 216, 120, 0.28);
}

body.play-mobile.mobile-runtime .mobile-throttle-zone.active .mobile-throttle-readout,
body.play-mobile.mobile-runtime .mobile-throttle-zone.active .mobile-throttle-bar {
  opacity: 0.72;
}

body.play-mobile.mobile-runtime .mobile-left-controls {
  left: max(30px, env(safe-area-inset-left));
  bottom: max(20px, env(safe-area-inset-bottom));
}

body.play-mobile.mobile-runtime .mobile-right-controls {
  right: max(30px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
}

body.play-mobile.mobile-runtime .mobile-bottom-nav {
  bottom: max(18px, env(safe-area-inset-bottom));
}

body.play-mobile.mobile-runtime .mobile-stick,
body.play-mobile.mobile-runtime .mobile-boost,
body.play-mobile.mobile-runtime .mobile-action,
body.play-mobile.mobile-runtime .mobile-bottom-nav button {
  background: rgba(4, 8, 18, 0.38);
}

body.play-mobile.mobile-compact-height .mobile-throttle-zone {
  top: 50%;
  height: min(32vh, 140px);
}

body.play-mobile #pilot-hub .ph-mis-list,
body.play-mobile #pilot-hub .ph-mis-detail,
body.play-mobile #pilot-hub .ph-tabs,
body.play-mobile #story-panel .story-dialogue,
body.play-mobile #story-panel .story-choices,
body.play-mobile #market-panel,
body.play-mobile #shipyard-panel,
body.play-mobile #crew-panel,
body.play-mobile #entitlements-panel,
body.play-mobile #achievements-panel,
body.play-mobile #base-panel,
body.play-mobile #mission-journal,
body.play-mobile .station-services-card {
  touch-action: pan-y !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* Mobile Pilot Hub compression: iPhone landscape needs utility density,
   not desktop-theater scale. */
body.play-mobile #pilot-hub.visible {
  --hub-pad: 10px;
  --hub-gap: 8px;
  --hub-tab-h: 40px;
  --hub-font: 12px;
  background: rgba(2, 3, 9, 0.96) !important;
}

body.play-mobile #pilot-hub.visible .ph-top {
  height: 54px !important;
  min-height: 54px !important;
  grid-template-columns: minmax(138px, 20%) minmax(0, 1fr) 40px !important;
  gap: 8px !important;
  padding: max(6px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 6px max(64px, env(safe-area-inset-left)) !important;
}

body.play-mobile #pilot-hub .ph-location {
  font-size: clamp(14px, 1.8vw, 18px) !important;
  letter-spacing: 0.22em !important;
}

body.play-mobile #pilot-hub .ph-location-sub {
  font-size: 8px !important;
  letter-spacing: 0.18em !important;
}

body.play-mobile #pilot-hub .ph-tabs {
  gap: 6px !important;
  padding: 0 2px !important;
  align-items: center !important;
}

body.play-mobile #pilot-hub .ph-tab {
  min-width: 86px !important;
  min-height: var(--hub-tab-h) !important;
  height: var(--hub-tab-h) !important;
  padding: 7px 12px !important;
  border-radius: 12px !important;
  font-size: 10px !important;
  letter-spacing: 0.16em !important;
}

body.play-mobile #pilot-hub .ph-esc {
  width: 40px !important;
  height: 40px !important;
}

body.play-mobile #pilot-hub .ph-body {
  height: calc(var(--mobile-vh, 100vh) - 58px) !important;
  min-height: 0 !important;
}

body.play-mobile #pilot-hub .ph-panel {
  padding: 8px 12px 10px !important;
  min-height: 0 !important;
}

body.play-mobile #pilot-hub .ph-panel > * {
  font-size: var(--hub-font) !important;
}

body.play-mobile #pilot-hub .ph-split,
body.play-mobile #pilot-hub .ph-split-inv,
body.play-mobile #pilot-hub .ph-split-mis {
  gap: 8px !important;
  height: 100% !important;
  min-height: 0 !important;
}

body.play-mobile #pilot-hub .ph-split-mis {
  grid-template-columns: minmax(210px, 36%) minmax(0, 1fr) !important;
}

body.play-mobile #pilot-hub .ph-mis-list {
  padding: 8px !important;
}

body.play-mobile #pilot-hub .ph-mis-row {
  min-height: 46px !important;
  padding: 8px 10px !important;
  border-radius: 12px !important;
  font-size: 11px !important;
}

body.play-mobile #pilot-hub .ph-mis-row [class*="tag"],
body.play-mobile #pilot-hub .ph-mis-row [class*="badge"] {
  font-size: 8px !important;
  padding: 4px 8px !important;
}

body.play-mobile #pilot-hub .ph-mis-detail {
  padding: 12px 14px !important;
}

body.play-mobile #pilot-hub .ph-mis-detail-title {
  font-size: clamp(18px, 2.25vw, 24px) !important;
  margin-bottom: 6px !important;
}

body.play-mobile #pilot-hub .ph-mis-detail-body,
body.play-mobile #pilot-hub .ph-mis-whereami {
  font-size: 12px !important;
  line-height: 1.34 !important;
}

body.play-mobile #pilot-hub .ph-inv-main,
body.play-mobile #pilot-hub .ph-inv-detail,
body.play-mobile #pilot-hub .ph-stats-main,
body.play-mobile #pilot-hub .ph-settings-main,
body.play-mobile #pilot-hub .ph-store-main {
  height: 100% !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

body.play-mobile #pilot-hub .ph-inv-main h1,
body.play-mobile #pilot-hub .ph-inv-main h2,
body.play-mobile #pilot-hub .ph-panel h1,
body.play-mobile #pilot-hub .ph-panel h2 {
  font-size: clamp(20px, 2.5vw, 28px) !important;
  line-height: 1.05 !important;
  margin: 4px 0 8px !important;
}

body.play-mobile #pilot-hub .ph-inv-main input,
body.play-mobile #pilot-hub .ph-panel input {
  min-height: 38px !important;
  padding: 8px 12px !important;
  font-size: 12px !important;
}

body.play-mobile #pilot-hub .ph-inv-main [style*="padding"],
body.play-mobile #pilot-hub .ph-inv-detail [style*="padding"] {
  padding: 10px 12px !important;
}

body.play-mobile #pilot-hub .ph-inv-main [style*="font-size: 26px"],
body.play-mobile #pilot-hub .ph-inv-main [style*="font-size:26px"],
body.play-mobile #pilot-hub .ph-inv-main [style*="font-size: 28px"],
body.play-mobile #pilot-hub .ph-inv-main [style*="font-size:28px"] {
  font-size: 22px !important;
}

body.play-mobile #pilot-hub #timeline-panel.ph-timeline-embedded {
  inset: 6px 8px 8px !important;
  border-radius: 14px !important;
}

body.play-mobile #pilot-hub #timeline-panel .tl-header {
  min-height: 54px !important;
  padding: 8px 12px 6px !important;
}

body.play-mobile #pilot-hub #timeline-panel .tl-header-title {
  font-size: clamp(18px, 2.35vw, 24px) !important;
  letter-spacing: 0.22em !important;
}

body.play-mobile #pilot-hub #timeline-panel .tl-header-subtitle,
body.play-mobile #pilot-hub #timeline-panel .tl-signal-row {
  font-size: 9px !important;
}

body.play-mobile #pilot-hub #timeline-panel .tl-header-endings-label {
  font-size: 7px !important;
}

body.play-mobile #pilot-hub #timeline-panel .tl-header-endings-value {
  font-size: clamp(18px, 2.7vw, 26px) !important;
}

body.play-mobile #pilot-hub #timeline-panel .tl-signal-row {
  padding: 4px 12px !important;
}

body.play-mobile #pilot-hub #timeline-panel .tl-map-wrap,
body.play-mobile #pilot-hub #timeline-panel .tl-map,
body.play-mobile #pilot-hub #timeline-panel .tl-body {
  min-height: 0 !important;
}

body.play-mobile.mobile-compact-height #pilot-hub.visible .ph-top {
  height: 48px !important;
  min-height: 48px !important;
  padding-top: 4px !important;
  padding-bottom: 4px !important;
}

body.play-mobile.mobile-compact-height #pilot-hub .ph-tab {
  min-width: 78px !important;
  height: 36px !important;
  min-height: 36px !important;
  font-size: 9px !important;
  padding: 6px 9px !important;
}

body.play-mobile.mobile-compact-height #pilot-hub .ph-body {
  height: calc(var(--mobile-vh, 100vh) - 50px) !important;
}

/* Story panel compression for phone landscape. */
body.play-mobile #story-panel {
  width: min(680px, calc(var(--mobile-vw, 100vw) - max(190px, env(safe-area-inset-left)) - max(32px, env(safe-area-inset-right)))) !important;
  height: min(300px, calc(var(--mobile-vh, 100vh) - max(96px, env(safe-area-inset-top)) - max(20px, env(safe-area-inset-bottom)))) !important;
  grid-template-columns: minmax(112px, 23%) minmax(0, 1fr) !important;
  gap: 8px 12px !important;
  padding: 10px 12px !important;
  border-radius: 14px !important;
}

body.play-mobile #story-panel .story-speaker-header {
  gap: 6px !important;
}

body.play-mobile #story-panel .story-avatar {
  height: min(42vh, 150px) !important;
  max-width: 160px !important;
  border-radius: 10px !important;
}

body.play-mobile #story-panel .story-speaker-meta,
body.play-mobile #story-panel .story-speaker-name {
  font-size: clamp(16px, 2.1vw, 22px) !important;
  line-height: 1 !important;
}

body.play-mobile #story-panel .story-speaker-role,
body.play-mobile #story-panel .story-speaker-status {
  font-size: 8px !important;
  letter-spacing: 0.14em !important;
}

body.play-mobile #story-panel .story-dialogue {
  font-size: clamp(12px, 1.55vw, 15px) !important;
  line-height: 1.28 !important;
  overflow-y: auto !important;
  padding-right: 6px !important;
}

body.play-mobile #story-panel .story-choices {
  gap: 6px !important;
  max-height: 38vh !important;
  overflow-y: auto !important;
}

body.play-mobile #story-panel .story-choice {
  min-height: 42px !important;
  padding: 7px 10px !important;
  border-radius: 9px !important;
  font-size: 12px !important;
}

body.play-mobile #story-panel .story-choice-title {
  font-size: 12px !important;
  letter-spacing: 0.12em !important;
}

body.play-mobile #story-panel .story-choice-flavor {
  font-size: 10px !important;
  line-height: 1.18 !important;
}

body.play-mobile.mobile-compact-height #story-panel {
  width: min(640px, calc(var(--mobile-vw, 100vw) - max(190px, env(safe-area-inset-left)) - 28px)) !important;
  height: min(260px, calc(var(--mobile-vh, 100vh) - 92px)) !important;
  grid-template-columns: 104px minmax(0, 1fr) !important;
  padding: 8px 10px !important;
}

body.play-mobile.mobile-compact-height #story-panel .story-avatar {
  height: 126px !important;
}

body.play-mobile.mobile-compact-height #story-panel .story-dialogue {
  font-size: 12px !important;
  line-height: 1.22 !important;
}

body.play-mobile.mobile-compact-height #story-panel .story-choice {
  min-height: 38px !important;
  padding: 6px 9px !important;
}

/* Mobile galaxy map focus mode: only the map and one close control. */
body.play-mobile #pilot-hub.visible:has(.ph-panel-map-wrap:not(.hidden)) {
  background: #02040a !important;
}

body.play-mobile #pilot-hub.visible:has(.ph-panel-map-wrap:not(.hidden)) .ph-top,
body.play-mobile:has(#pilot-hub.visible .ph-panel-map-wrap:not(.hidden)) #mobile-install-btn {
  display: none !important;
}

body.play-mobile #pilot-hub.visible:has(.ph-panel-map-wrap:not(.hidden)) .ph-body {
  height: var(--mobile-vh, 100vh) !important;
  width: var(--mobile-vw, 100vw) !important;
  border: 0 !important;
}

body.play-mobile #pilot-hub.visible:has(.ph-panel-map-wrap:not(.hidden)) .ph-panel-map-wrap {
  position: fixed !important;
  inset: 0 !important;
  display: block !important;
  padding: 0 !important;
  background: #02040a !important;
  z-index: 1 !important;
}

body.play-mobile #pilot-hub.visible:has(.ph-panel-map-wrap:not(.hidden)) #galaxy-map {
  position: fixed !important;
  inset: 0 !important;
  width: var(--mobile-vw, 100vw) !important;
  height: var(--mobile-vh, 100vh) !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #02040a !important;
}

body.play-mobile #pilot-hub.visible:has(.ph-panel-map-wrap:not(.hidden)) #galaxy-map .gmap-header,
body.play-mobile #pilot-hub.visible:has(.ph-panel-map-wrap:not(.hidden)) #galaxy-map .gmap-info,
body.play-mobile #pilot-hub.visible:has(.ph-panel-map-wrap:not(.hidden)) #galaxy-map .gmap-zoom-controls {
  display: none !important;
}

body.play-mobile #pilot-hub.visible:has(.ph-panel-map-wrap:not(.hidden)) #galaxy-map .gmap-canvas-wrap {
  position: fixed !important;
  inset: 0 !important;
  width: var(--mobile-vw, 100vw) !important;
  height: var(--mobile-vh, 100vh) !important;
  min-height: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #02040a !important;
}

body.play-mobile #pilot-hub.visible:has(.ph-panel-map-wrap:not(.hidden)) #galaxy-map .gmap-svg {
  width: 100% !important;
  height: 100% !important;
}

body.play-mobile #pilot-hub.visible:has(.ph-panel-map-wrap:not(.hidden)) #galaxy-map .gmap-footer {
  position: fixed !important;
  top: max(10px, env(safe-area-inset-top)) !important;
  right: max(12px, env(safe-area-inset-right)) !important;
  bottom: auto !important;
  left: auto !important;
  width: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  z-index: 4 !important;
}

body.play-mobile #pilot-hub.visible:has(.ph-panel-map-wrap:not(.hidden)) #galaxy-map .gmap-close {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  font-size: 0 !important;
  letter-spacing: 0 !important;
}

body.play-mobile #pilot-hub.visible:has(.ph-panel-map-wrap:not(.hidden)) #galaxy-map .gmap-close::before {
  content: '×';
  font-size: 22px;
  line-height: 1;
}

/* Mobile stats focus: dense cards that fit iPhone landscape. */
body.play-mobile #pilot-hub .ph-stats-main {
  padding: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

body.play-mobile #pilot-hub .ph-stats-shell {
  height: auto !important;
  min-height: 100% !important;
  display: grid !important;
  gap: 8px !important;
  padding: 0 !important;
}

body.play-mobile #pilot-hub .ph-ship-card {
  min-height: 52px !important;
  padding: 8px 10px !important;
  border-radius: 12px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 8px !important;
}

body.play-mobile #pilot-hub .ph-ship-card .ph-kicker {
  font-size: 8px !important;
  letter-spacing: 0.2em !important;
  margin-bottom: 2px !important;
}

body.play-mobile #pilot-hub .ph-ship-card h2 {
  font-size: clamp(16px, 2vw, 22px) !important;
  line-height: 1 !important;
  margin: 0 !important;
}

body.play-mobile #pilot-hub .ph-ship-card p {
  display: none !important;
}

body.play-mobile #pilot-hub .ph-ship-readout {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

body.play-mobile #pilot-hub .ph-ship-readout span {
  min-width: auto !important;
  padding: 4px 7px !important;
  border-radius: 8px !important;
  font-size: 9px !important;
  white-space: nowrap !important;
}

body.play-mobile #pilot-hub .ph-stats-grid {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 7px !important;
  min-width: 0 !important;
}

body.play-mobile #pilot-hub .ph-stat-card {
  min-width: 0 !important;
  min-height: 78px !important;
  padding: 8px 9px !important;
  border-radius: 11px !important;
  overflow: hidden !important;
}

body.play-mobile #pilot-hub .ph-stat-value {
  font-size: clamp(17px, 2.3vw, 24px) !important;
  line-height: 1 !important;
  margin: 0 0 4px !important;
}

body.play-mobile #pilot-hub .ph-stat-label {
  font-size: 11px !important;
  line-height: 1 !important;
  margin: 0 0 4px !important;
}

body.play-mobile #pilot-hub .ph-stat-help {
  font-size: 8px !important;
  line-height: 1.18 !important;
  opacity: 0.68 !important;
}

body.play-mobile #pilot-hub .ph-stat-delta,
body.play-mobile #pilot-hub .ph-stat-card [class*="delta"] {
  font-size: 8px !important;
  line-height: 1 !important;
}

body.play-mobile #pilot-hub .ph-loadout-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

body.play-mobile #pilot-hub .ph-benefit-panel {
  min-height: 74px !important;
  padding: 9px 10px !important;
  border-radius: 11px !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

body.play-mobile #pilot-hub .ph-benefit-panel .ph-kicker {
  font-size: 8px !important;
  letter-spacing: 0.2em !important;
  margin-bottom: 6px !important;
}

body.play-mobile #pilot-hub .ph-benefit-row {
  padding: 5px 0 !important;
  gap: 6px !important;
}

body.play-mobile #pilot-hub .ph-benefit-row b,
body.play-mobile #pilot-hub .ph-benefit-row span,
body.play-mobile #pilot-hub .ph-benefit-row em {
  font-size: 9px !important;
  line-height: 1.15 !important;
}

body.play-mobile.mobile-compact-height #pilot-hub .ph-stats-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 6px !important;
}

body.play-mobile.mobile-compact-height #pilot-hub .ph-stat-card {
  min-height: 66px !important;
  padding: 6px 7px !important;
}

body.play-mobile.mobile-compact-height #pilot-hub .ph-stat-help {
  display: none !important;
}

body.play-mobile.mobile-compact-height #pilot-hub .ph-loadout-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

/* Pilot Command menu compression. */
body.play-mobile #mobile-command-menu.visible .mcm-shell {
  inset: max(8px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(84px, env(safe-area-inset-left)) !important;
  grid-template-rows: 46px minmax(0, 1fr) 34px !important;
  gap: 7px !important;
}

body.play-mobile #mobile-command-menu.visible .mcm-header,
body.play-mobile #mobile-command-menu.visible .mcm-footer {
  gap: 8px !important;
}

body.play-mobile #mobile-command-menu.visible .mcm-header button,
body.play-mobile #mobile-command-menu.visible .mcm-footer > div,
body.play-mobile #mobile-command-menu.visible .mcm-grid button {
  border-radius: 8px !important;
  box-shadow: inset 0 0 14px rgba(94, 215, 255, 0.03), 0 0 10px rgba(248, 216, 120, 0.05) !important;
}

body.play-mobile #mobile-command-menu.visible .mcm-continue {
  width: 132px !important;
  height: 42px !important;
  font-size: 12px !important;
  letter-spacing: 0.08em !important;
}

body.play-mobile #mobile-command-menu.visible .mcm-title {
  height: 44px !important;
  border-radius: 9px !important;
}

body.play-mobile #mobile-command-menu.visible .mcm-title strong {
  font-size: clamp(18px, 2.2vw, 24px) !important;
  letter-spacing: 0.08em !important;
}

body.play-mobile #mobile-command-menu.visible .mcm-title span {
  font-size: 10px !important;
}

body.play-mobile #mobile-command-menu.visible .mcm-kaela {
  width: 92px !important;
  height: 42px !important;
  font-size: 12px !important;
}

body.play-mobile #mobile-command-menu.visible .mcm-settings {
  width: 42px !important;
  height: 42px !important;
  font-size: 18px !important;
}

body.play-mobile #mobile-command-menu.visible .mcm-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  grid-template-rows: repeat(2, minmax(58px, 1fr)) !important;
  gap: 7px !important;
}

body.play-mobile #mobile-command-menu.visible .mcm-grid button {
  grid-template-rows: 18px auto auto !important;
  padding: 7px 8px !important;
  min-height: 58px !important;
}

body.play-mobile #mobile-command-menu.visible .mcm-grid i {
  font-size: clamp(18px, 2.5vw, 26px) !important;
}

body.play-mobile #mobile-command-menu.visible .mcm-grid strong {
  font-size: clamp(10px, 1.35vw, 13px) !important;
  letter-spacing: 0.1em !important;
}

body.play-mobile #mobile-command-menu.visible .mcm-grid span {
  font-size: 8px !important;
  line-height: 1.15 !important;
}

body.play-mobile #mobile-command-menu.visible .mcm-status {
  gap: 5px !important;
  padding: 5px 7px !important;
}

body.play-mobile #mobile-command-menu.visible .mcm-status span {
  padding: 4px 7px !important;
  font-size: 10px !important;
}

body.play-mobile #mobile-command-menu.visible .mcm-hint {
  width: 210px !important;
  height: 32px !important;
  font-size: 11px !important;
}

body.play-mobile #mobile-command-menu.visible .mcm-saved {
  width: 100px !important;
  height: 32px !important;
  font-size: 10px !important;
}

body.play-mobile.mobile-compact-height #mobile-command-menu.visible .mcm-shell {
  grid-template-rows: 40px minmax(0, 1fr) 30px !important;
  gap: 6px !important;
}

body.play-mobile.mobile-compact-height #mobile-command-menu.visible .mcm-grid {
  grid-template-rows: repeat(2, minmax(52px, 1fr)) !important;
  gap: 6px !important;
}

body.play-mobile.mobile-compact-height #mobile-command-menu.visible .mcm-grid button {
  min-height: 52px !important;
  padding: 6px !important;
}

/* MOBILE RESET V2
   Final mobile state layer. Keep older rules in place, but make screen ownership explicit. */
body.play-mobile {
  width: var(--mobile-vw, 100vw) !important;
  height: var(--mobile-vh, 100vh) !important;
  min-width: var(--mobile-vw, 100vw) !important;
  min-height: var(--mobile-vh, 100vh) !important;
  max-width: var(--mobile-vw, 100vw) !important;
  max-height: var(--mobile-vh, 100vh) !important;
  overflow: hidden !important;
  --mobile-v2-safe-left: max(10px, env(safe-area-inset-left));
  --mobile-v2-safe-right: max(10px, env(safe-area-inset-right));
  --mobile-v2-safe-top: max(7px, env(safe-area-inset-top));
  --mobile-v2-safe-bottom: max(8px, env(safe-area-inset-bottom));
  --mobile-v2-left-rail: clamp(92px, 13vw, 132px);
  --mobile-v2-touch: 40px;
  --mobile-v2-z-cockpit: 90;
  --mobile-v2-z-story: 9000;
  --mobile-v2-z-hub: 10000;
  --mobile-v2-z-command: 12000;
}

body.play-mobile *,
body.play-mobile *::before,
body.play-mobile *::after {
  box-sizing: border-box;
}

body.play-mobile #canvas {
  position: fixed !important;
  inset: 0 !important;
  width: var(--mobile-vw, 100vw) !important;
  height: var(--mobile-vh, 100vh) !important;
}

body.play-mobile #mobile-flight-ui,
body.play-mobile #hud,
body.play-mobile #hud-br-dock,
body.play-mobile #weapon-status,
body.play-mobile #mobile-install-btn {
  transition: opacity 120ms ease;
}

body.play-mobile:not(.mobile-screen-cockpit) #mobile-flight-ui,
body.play-mobile:not(.mobile-screen-cockpit) #hud,
body.play-mobile:not(.mobile-screen-cockpit) #hud-br-dock,
body.play-mobile:not(.mobile-screen-cockpit) #weapon-status {
  opacity: 0 !important;
  pointer-events: none !important;
}

body.play-mobile.mobile-screen-cockpit #mobile-flight-ui {
  z-index: var(--mobile-v2-z-cockpit) !important;
  opacity: 1 !important;
  pointer-events: none !important;
}

body.play-mobile.mobile-screen-cockpit #mobile-flight-ui button,
body.play-mobile.mobile-screen-cockpit #mobile-stick,
body.play-mobile.mobile-screen-cockpit #mobile-throttle-zone,
body.play-mobile.mobile-screen-cockpit #mobile-bottom-nav {
  pointer-events: auto !important;
}

body.play-mobile #mobile-throttle-zone {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

body.play-mobile #mobile-throttle-zone::before,
body.play-mobile #mobile-throttle-zone::after {
  display: none !important;
}

body.play-mobile #mobile-throttle-value,
body.play-mobile #mobile-throttle-label,
body.play-mobile #mobile-throttle-fill {
  opacity: 0.35 !important;
}

body.play-mobile #mobile-throttle-zone.active #mobile-throttle-value,
body.play-mobile #mobile-throttle-zone.active #mobile-throttle-label,
body.play-mobile #mobile-throttle-zone.active #mobile-throttle-fill {
  opacity: 0.78 !important;
}

body.play-mobile .mobile-left-controls {
  left: calc(var(--mobile-v2-safe-left) + 10px) !important;
  bottom: calc(var(--mobile-v2-safe-bottom) + 8px) !important;
}

body.play-mobile .mobile-right-controls {
  right: calc(var(--mobile-v2-safe-right) + 10px) !important;
  bottom: calc(var(--mobile-v2-safe-bottom) + 8px) !important;
}

body.play-mobile .mobile-bottom-nav {
  left: 50% !important;
  bottom: calc(var(--mobile-v2-safe-bottom) + 7px) !important;
  transform: translateX(-50%) !important;
  max-width: min(430px, calc(var(--mobile-vw, 100vw) - 260px)) !important;
}

body.play-mobile.mobile-screen-command #mobile-command-menu.visible {
  position: fixed !important;
  inset: 0 !important;
  z-index: var(--mobile-v2-z-command) !important;
  display: block !important;
  width: var(--mobile-vw, 100vw) !important;
  height: var(--mobile-vh, 100vh) !important;
  max-width: var(--mobile-vw, 100vw) !important;
  max-height: var(--mobile-vh, 100vh) !important;
  overflow: hidden !important;
  pointer-events: auto !important;
}

body.play-mobile.mobile-screen-command #mobile-command-menu .mcm-bg {
  position: fixed !important;
  inset: 0 !important;
  background:
    radial-gradient(circle at 52% 0%, rgba(94, 215, 255, 0.13), transparent 40%),
    rgba(0, 0, 0, 0.78) !important;
}

body.play-mobile.mobile-screen-command #mobile-command-menu.visible .mcm-shell {
  position: fixed !important;
  inset: var(--mobile-v2-safe-top) var(--mobile-v2-safe-right) var(--mobile-v2-safe-bottom) var(--mobile-v2-safe-left) !important;
  width: auto !important;
  height: auto !important;
  max-width: none !important;
  max-height: none !important;
  display: grid !important;
  grid-template-rows: 38px minmax(0, 1fr) 26px !important;
  gap: 6px !important;
  overflow: hidden !important;
}

body.play-mobile.mobile-screen-command #mobile-command-menu .mcm-header,
body.play-mobile.mobile-screen-command #mobile-command-menu .mcm-footer {
  min-height: 0 !important;
  gap: 6px !important;
}

body.play-mobile.mobile-screen-command #mobile-command-menu .mcm-header {
  display: grid !important;
  grid-template-columns: 96px minmax(0, 1fr) 72px 34px !important;
  align-items: stretch !important;
}

body.play-mobile.mobile-screen-command #mobile-command-menu .mcm-footer {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 24vw) 74px !important;
  align-items: stretch !important;
}

body.play-mobile.mobile-screen-command #mobile-command-menu .mcm-continue,
body.play-mobile.mobile-screen-command #mobile-command-menu .mcm-kaela,
body.play-mobile.mobile-screen-command #mobile-command-menu .mcm-settings {
  width: auto !important;
  height: 38px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 8px !important;
  border-radius: 8px !important;
  font-size: 11px !important;
  letter-spacing: 0.08em !important;
}

body.play-mobile.mobile-screen-command #mobile-command-menu .mcm-settings {
  padding: 0 !important;
  font-size: 15px !important;
}

body.play-mobile.mobile-screen-command #mobile-command-menu .mcm-title {
  height: 38px !important;
  min-height: 0 !important;
  padding: 3px 8px !important;
  border-radius: 8px !important;
  overflow: hidden !important;
}

body.play-mobile.mobile-screen-command #mobile-command-menu .mcm-title strong {
  font-size: clamp(14px, 2vw, 19px) !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body.play-mobile.mobile-screen-command #mobile-command-menu .mcm-title span {
  font-size: 8px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body.play-mobile.mobile-screen-command #mobile-command-menu .mcm-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  grid-template-rows: repeat(2, minmax(0, 1fr)) !important;
  gap: 6px !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

body.play-mobile.mobile-screen-command #mobile-command-menu .mcm-grid button {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  padding: 5px 6px !important;
  border-radius: 8px !important;
  display: grid !important;
  grid-template-rows: 18px 15px minmax(0, 1fr) !important;
  place-items: center !important;
  overflow: hidden !important;
}

body.play-mobile.mobile-screen-command #mobile-command-menu .mcm-grid i {
  font-size: clamp(16px, 2.4vw, 23px) !important;
  line-height: 1 !important;
}

body.play-mobile.mobile-screen-command #mobile-command-menu .mcm-grid strong {
  max-width: 100% !important;
  font-size: clamp(9px, 1.25vw, 12px) !important;
  line-height: 1 !important;
  letter-spacing: 0.08em !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.play-mobile.mobile-screen-command #mobile-command-menu .mcm-grid span {
  max-width: 100% !important;
  font-size: 7px !important;
  line-height: 1.05 !important;
  opacity: 0.78 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.play-mobile.mobile-screen-command #mobile-command-menu .mcm-status {
  display: flex !important;
  min-width: 0 !important;
  height: 26px !important;
  min-height: 0 !important;
  gap: 4px !important;
  padding: 3px 5px !important;
  overflow: hidden !important;
}

body.play-mobile.mobile-screen-command #mobile-command-menu .mcm-status span {
  min-width: 0 !important;
  padding: 3px 5px !important;
  font-size: 8px !important;
  line-height: 1 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body.play-mobile.mobile-screen-command #mobile-command-menu .mcm-hint,
body.play-mobile.mobile-screen-command #mobile-command-menu .mcm-saved {
  width: auto !important;
  height: 26px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 6px !important;
  border-radius: 7px !important;
  font-size: 8px !important;
  line-height: 1 !important;
  overflow: hidden !important;
  white-space: nowrap !important;
}

body.play-mobile.mobile-screen-command.mobile-compact-height #mobile-command-menu.visible .mcm-shell {
  grid-template-rows: 34px minmax(0, 1fr) 24px !important;
  gap: 5px !important;
}

body.play-mobile.mobile-screen-command.mobile-compact-height #mobile-command-menu .mcm-header {
  grid-template-columns: 88px minmax(0, 1fr) 66px 32px !important;
}

body.play-mobile.mobile-screen-command.mobile-compact-height #mobile-command-menu .mcm-continue,
body.play-mobile.mobile-screen-command.mobile-compact-height #mobile-command-menu .mcm-kaela,
body.play-mobile.mobile-screen-command.mobile-compact-height #mobile-command-menu .mcm-settings,
body.play-mobile.mobile-screen-command.mobile-compact-height #mobile-command-menu .mcm-title {
  height: 34px !important;
}

body.play-mobile.mobile-screen-hub #pilot-hub.visible,
body.play-mobile.mobile-screen-map #pilot-hub.visible {
  position: fixed !important;
  inset: 0 !important;
  z-index: var(--mobile-v2-z-hub) !important;
  width: var(--mobile-vw, 100vw) !important;
  height: var(--mobile-vh, 100vh) !important;
  max-width: var(--mobile-vw, 100vw) !important;
  max-height: var(--mobile-vh, 100vh) !important;
  overflow: hidden !important;
  pointer-events: auto !important;
}

body.play-mobile.mobile-screen-hub #pilot-hub.visible {
  display: grid !important;
  grid-template-rows: 44px minmax(0, 1fr) !important;
  padding: 0 !important;
  background:
    radial-gradient(circle at 20% 0%, rgba(94, 215, 255, 0.13), transparent 38%),
    rgba(1, 3, 9, 0.94) !important;
}

body.play-mobile.mobile-screen-hub #pilot-hub.visible .ph-top {
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  display: grid !important;
  grid-template-columns: minmax(94px, 16vw) minmax(0, 1fr) 34px !important;
  gap: 6px !important;
  align-items: stretch !important;
  padding: var(--mobile-v2-safe-top) var(--mobile-v2-safe-right) 4px var(--mobile-v2-safe-left) !important;
  overflow: hidden !important;
}

body.play-mobile.mobile-screen-hub #pilot-hub .ph-location {
  min-width: 0 !important;
  height: 32px !important;
  padding: 4px 7px !important;
  border-radius: 8px !important;
  overflow: hidden !important;
}

body.play-mobile.mobile-screen-hub #pilot-hub .ph-location-name,
body.play-mobile.mobile-screen-hub #pilot-hub #ph-location {
  display: block !important;
  max-width: 100% !important;
  font-size: 10px !important;
  line-height: 1 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.play-mobile.mobile-screen-hub #pilot-hub .ph-location-sub {
  display: none !important;
}

body.play-mobile.mobile-screen-hub #pilot-hub .ph-tabs {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  min-width: 0 !important;
  height: 34px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  padding: 0 2px 2px !important;
  scrollbar-width: none !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-x !important;
}

body.play-mobile.mobile-screen-hub #pilot-hub .ph-tabs::-webkit-scrollbar {
  display: none !important;
}

body.play-mobile.mobile-screen-hub #pilot-hub .ph-tab {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 64px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 8px !important;
  border-radius: 8px !important;
  font-size: 8px !important;
  letter-spacing: 0.08em !important;
  white-space: nowrap !important;
}

body.play-mobile.mobile-screen-hub #pilot-hub .ph-esc {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  padding: 0 !important;
  border-radius: 9px !important;
  font-size: 14px !important;
}

body.play-mobile.mobile-screen-hub #pilot-hub .ph-body {
  width: 100% !important;
  height: calc(var(--mobile-vh, 100vh) - 44px) !important;
  min-height: 0 !important;
  max-height: calc(var(--mobile-vh, 100vh) - 44px) !important;
  padding: 6px var(--mobile-v2-safe-right) var(--mobile-v2-safe-bottom) var(--mobile-v2-safe-left) !important;
  border: 0 !important;
  overflow: hidden !important;
}

body.play-mobile.mobile-screen-hub #pilot-hub .ph-panel:not(.hidden) {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 0 !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-y !important;
}

body.play-mobile.mobile-screen-hub #pilot-hub .ph-card,
body.play-mobile.mobile-screen-hub #pilot-hub .ph-panel,
body.play-mobile.mobile-screen-hub #pilot-hub .ph-page-shell,
body.play-mobile.mobile-screen-hub #pilot-hub .ph-list-panel {
  max-width: 100% !important;
}

body.play-mobile.mobile-screen-hub #pilot-hub .ph-page-shell,
body.play-mobile.mobile-screen-hub #pilot-hub .ph-settings-shell,
body.play-mobile.mobile-screen-hub #pilot-hub .ph-store-shell {
  gap: 7px !important;
  padding: 0 !important;
}

body.play-mobile.mobile-screen-hub #pilot-hub .ph-page-hero {
  min-height: 42px !important;
  padding: 7px 9px !important;
  border-radius: 10px !important;
}

body.play-mobile.mobile-screen-hub #pilot-hub .ph-page-hero h2,
body.play-mobile.mobile-screen-hub #pilot-hub .ph-card h3 {
  font-size: clamp(14px, 1.9vw, 20px) !important;
  line-height: 1 !important;
  margin: 0 !important;
}

body.play-mobile.mobile-screen-hub #pilot-hub .ph-page-hero p,
body.play-mobile.mobile-screen-hub #pilot-hub .ph-card p {
  font-size: 10px !important;
  line-height: 1.18 !important;
  margin: 2px 0 0 !important;
}

body.play-mobile.mobile-screen-hub #pilot-hub .ph-split-mis,
body.play-mobile.mobile-screen-hub #pilot-hub .ph-inv-main,
body.play-mobile.mobile-screen-hub #pilot-hub .ph-settings-grid,
body.play-mobile.mobile-screen-hub #pilot-hub .ph-store-main,
body.play-mobile.mobile-screen-hub #pilot-hub .ph-stats-shell {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

body.play-mobile.mobile-screen-story #story-panel.visible {
  position: fixed !important;
  z-index: var(--mobile-v2-z-story) !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: min(590px, calc(var(--mobile-vw, 100vw) - 36px)) !important;
  height: min(250px, calc(var(--mobile-vh, 100vh) - 22px)) !important;
  max-width: calc(var(--mobile-vw, 100vw) - 36px) !important;
  max-height: calc(var(--mobile-vh, 100vh) - 22px) !important;
  display: grid !important;
  grid-template-columns: 94px minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) auto !important;
  gap: 7px 9px !important;
  padding: 8px 10px !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  pointer-events: auto !important;
}

body.play-mobile.mobile-screen-story #story-panel .story-avatar {
  width: 94px !important;
  height: 116px !important;
  max-width: 94px !important;
  max-height: 116px !important;
  border-radius: 9px !important;
}

body.play-mobile.mobile-screen-story #story-panel .story-speaker-header {
  gap: 5px !important;
  min-width: 0 !important;
}

body.play-mobile.mobile-screen-story #story-panel .story-speaker-name {
  font-size: 15px !important;
  line-height: 1 !important;
}

body.play-mobile.mobile-screen-story #story-panel .story-speaker-role,
body.play-mobile.mobile-screen-story #story-panel .story-speaker-status {
  font-size: 7px !important;
  line-height: 1 !important;
}

body.play-mobile.mobile-screen-story #story-panel .story-dialogue {
  min-height: 0 !important;
  max-height: 124px !important;
  overflow-y: auto !important;
  padding-right: 4px !important;
  font-size: 12px !important;
  line-height: 1.22 !important;
  touch-action: pan-y !important;
  -webkit-overflow-scrolling: touch !important;
}

body.play-mobile.mobile-screen-story #story-panel .story-choices {
  grid-column: 1 / -1 !important;
  max-height: 80px !important;
  min-height: 0 !important;
  display: grid !important;
  gap: 5px !important;
  overflow-y: auto !important;
  touch-action: pan-y !important;
  -webkit-overflow-scrolling: touch !important;
}

body.play-mobile.mobile-screen-story #story-panel .story-choice {
  min-height: 34px !important;
  padding: 6px 8px !important;
  border-radius: 8px !important;
  font-size: 10px !important;
  line-height: 1.1 !important;
}

body.play-mobile.mobile-screen-story #story-panel .story-choice-title {
  font-size: 10px !important;
  line-height: 1 !important;
}

body.play-mobile.mobile-screen-story #story-panel .story-choice-flavor {
  font-size: 8px !important;
  line-height: 1.08 !important;
}

body.play-mobile.mobile-screen-story.mobile-compact-height #story-panel.visible {
  width: min(540px, calc(var(--mobile-vw, 100vw) - 28px)) !important;
  height: min(218px, calc(var(--mobile-vh, 100vh) - 18px)) !important;
  grid-template-columns: 78px minmax(0, 1fr) !important;
}

body.play-mobile.mobile-screen-story.mobile-compact-height #story-panel .story-avatar {
  width: 78px !important;
  height: 96px !important;
}

body.play-mobile.mobile-screen-story.mobile-compact-height #story-panel .story-dialogue {
  max-height: 104px !important;
}

body.play-mobile.mobile-screen-map #pilot-hub.visible {
  display: block !important;
  padding: 0 !important;
  background: #02040a !important;
}

body.play-mobile.mobile-screen-map #pilot-hub .ph-top {
  display: none !important;
}

body.play-mobile.mobile-screen-map #pilot-hub .ph-body,
body.play-mobile.mobile-screen-map #pilot-hub .ph-panel-map-wrap {
  position: fixed !important;
  inset: 0 !important;
  width: var(--mobile-vw, 100vw) !important;
  height: var(--mobile-vh, 100vh) !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  background: #02040a !important;
}

body.play-mobile.mobile-screen-map #pilot-hub .ph-panel:not([data-ph-panel="map"]) {
  display: none !important;
}

body.play-mobile.mobile-screen-map #galaxy-map,
body.play-mobile.mobile-screen-map #galaxy-map .gmap-canvas-wrap {
  position: fixed !important;
  inset: 0 !important;
  width: var(--mobile-vw, 100vw) !important;
  height: var(--mobile-vh, 100vh) !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #02040a !important;
  overflow: hidden !important;
}

body.play-mobile.mobile-screen-map #galaxy-map .gmap-header,
body.play-mobile.mobile-screen-map #galaxy-map .gmap-info,
body.play-mobile.mobile-screen-map #galaxy-map .gmap-zoom-controls,
body.play-mobile.mobile-screen-map #galaxy-map .gmap-legend,
body.play-mobile.mobile-screen-map #galaxy-map .gmap-route-panel {
  display: none !important;
}

body.play-mobile.mobile-screen-map #galaxy-map .gmap-svg {
  width: 100% !important;
  height: 100% !important;
}

body.play-mobile.mobile-screen-map #galaxy-map .gmap-footer {
  position: fixed !important;
  top: var(--mobile-v2-safe-top) !important;
  right: var(--mobile-v2-safe-right) !important;
  bottom: auto !important;
  left: auto !important;
  z-index: 4 !important;
  width: 42px !important;
  height: 42px !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  pointer-events: auto !important;
}

body.play-mobile.mobile-screen-map #galaxy-map .gmap-close {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  font-size: 0 !important;
  letter-spacing: 0 !important;
}

body.play-mobile.mobile-screen-map #galaxy-map .gmap-close::before {
  content: '×';
  font-size: 22px;
  line-height: 1;
}
