:root {
  --bg-deep: #050811;
  --bg-panel: rgba(10, 16, 34, 0.86);
  --bg-panel-solid: #0b1224;
  --border-subtle: rgba(148, 163, 184, 0.18);
  --border-cyan: rgba(0, 229, 255, 0.45);
  --cyan: #00e5ff;
  --green: #00ff87;
  --gold: #ffd166;
  --amber: #ff9f1c;
  --pink: #ff2a6d;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

html, body {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--bg-deep);
  color: var(--text-main);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

#battleCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  width: 100dvw;
  height: 100dvh;
  display: block;
  touch-action: none;
  z-index: 1;
  cursor: crosshair;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   0. Portrait Blocker — Landscape-Only Enforcement
   ========================================================================== */

.rotate-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  padding: max(1.25rem, env(safe-area-inset-top))
           max(1.25rem, env(safe-area-inset-right))
           max(1.25rem, env(safe-area-inset-bottom))
           max(1.25rem, env(safe-area-inset-left));
  background: radial-gradient(circle at 50% 35%, #0c1836 0%, #040710 100%);
  align-items: center;
  justify-content: center;
  text-align: center;
}

@media (orientation: portrait) {
  .rotate-overlay {
    display: flex;
  }
}

.rotate-card {
  max-width: 340px;
  width: 100%;
  background: rgba(11, 18, 38, 0.94);
  border: 1px solid var(--border-cyan);
  border-radius: 20px;
  padding: 1.6rem 1.35rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 32px rgba(0, 229, 255, 0.16);
}

.rotate-svg-wrap {
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: center;
}

.rotate-phone-anim {
  transform-origin: 48px 52px;
  animation: tiltToLandscape 2.4s ease-in-out infinite;
}

@keyframes tiltToLandscape {
  0%, 15% { transform: rotate(-90deg); }
  55%, 85% { transform: rotate(0deg); }
  100% { transform: rotate(-90deg); }
}

.rotate-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: var(--cyan);
  margin-bottom: 0.45rem;
}

.rotate-desc {
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.rotate-open-app-btn {
  margin-top: 0.9rem;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.48rem;
  text-decoration: none;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  border: 1px solid rgba(52, 211, 153, 0.85);
  box-shadow: 0 10px 26px rgba(16, 185, 129, 0.38);
}

.rotate-open-app-btn.hidden {
  display: none !important;
}

/* ==========================================================================
   Full-Screen Landscape Menus & Windows (Title, Campaign, Skirmish, Modals)
   ========================================================================== */

.screen-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  justify-content: center;
  padding: max(0.55rem, env(safe-area-inset-top))
           max(0.85rem, env(safe-area-inset-right))
           max(0.55rem, env(safe-area-inset-bottom))
           max(0.85rem, env(safe-area-inset-left));
  background: radial-gradient(circle at 50% 20%, rgba(10, 20, 44, 0.58) 0%, rgba(4, 7, 16, 0.88) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow-y: auto;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.menu-card {
  width: 100%;
  max-width: 680px;
  margin: auto;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(56, 189, 248, 0.09) 0%, rgba(0, 0, 0, 0) 58%),
    linear-gradient(168deg, rgba(16, 26, 52, 0.96) 0%, rgba(9, 15, 31, 0.98) 56%, rgba(5, 9, 20, 0.99) 100%);
  border: 1px solid rgba(56, 189, 248, 0.42);
  border-radius: 18px;
  padding: 1.25rem 1.5rem;
  box-shadow:
    0 28px 72px rgba(0, 0, 0, 0.84),
    0 0 38px rgba(0, 229, 255, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(0, 229, 255, 0.12);
  text-align: center;
  position: relative;
}

.menu-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 18%;
  right: 18%;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(0, 229, 255, 0.72), rgba(255, 209, 102, 0.65), rgba(0, 229, 255, 0.72), transparent);
  pointer-events: none;
}

.menu-card.landscape-card {
  max-width: 900px;
}

.menu-card.title-command-card {
  max-width: 940px;
  padding: 1.05rem 1.35rem 0.95rem;
}

.menu-card.compact-modal {
  max-width: 650px;
}

.menu-card.wide {
  max-width: 980px;
  text-align: left;
  max-height: calc(100vh - 16px);
  max-height: calc(100dvh - 16px);
  display: flex;
  flex-direction: column;
}

.top-utility-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.72rem;
  padding-bottom: 0.52rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  gap: 0.5rem;
  flex-wrap: wrap;
}

.utility-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.72), rgba(15, 23, 42, 0.88));
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  padding: 0.34rem 0.74rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.16s ease;
}

.pill-btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(0, 229, 255, 0.14);
}

/* Commercial 2-Column Command Lobby Grid (2x2 aligned so top buttons match Active War Machine window!) */
.title-command-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.15fr);
  column-gap: 1.05rem;
  row-gap: 0.56rem;
  align-items: stretch;
  text-align: left;
}

.title-modes-stack {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.44rem;
  min-width: 0;
  height: 100%;
}

.brand-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin-bottom: 0.55rem;
}

.brand-header.title-brand-left {
  justify-content: flex-start;
  align-self: center;
  margin-bottom: 0;
}

.brand-titles {
  text-align: left;
  min-width: 0;
}

.title-edition-kicker {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #94a3b8;
  text-transform: uppercase;
  margin-bottom: 0.12rem;
}

.emblem-wrap {
  width: 62px;
  height: 62px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  background: radial-gradient(circle at 35% 30%, rgba(56, 189, 248, 0.24), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(255, 209, 102, 0.44);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.55),
    0 0 20px rgba(0, 229, 255, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.game-title {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(1.62rem, 3.8vw, 2.35rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 44%, #7dd3fc 84%, #00e5ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 14px rgba(0, 229, 255, 0.22));
  line-height: 1.05;
}

.modal-heading {
  font-size: clamp(1.35rem, 3.4vw, 1.85rem);
  margin-bottom: 0.35rem;
}

.modal-sub {
  margin-bottom: 0.95rem !important;
}

.game-subtitle {
  display: inline-block;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  color: var(--gold);
  text-transform: uppercase;
  margin-top: 0.12rem;
}

/* Live Equipped War Machine Showcase Card on Title Screen */
.title-showcase-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.36rem;
  padding: 0.52rem 0.65rem 0.55rem;
  border-radius: 14px;
  background:
    radial-gradient(90% 80% at 50% 25%, rgba(56, 189, 248, 0.12), rgba(5, 10, 22, 0.94));
  border: 1px solid rgba(56, 189, 248, 0.38);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  cursor: pointer;
  text-align: left;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.title-showcase-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  box-shadow:
    0 16px 32px rgba(0, 0, 0, 0.62),
    0 0 22px rgba(255, 183, 3, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.showcase-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.showcase-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #cbd5e1;
  white-space: nowrap;
}

.showcase-kicker .chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #00ff87;
  box-shadow: 0 0 8px #00ff87;
}

.showcase-fleet-pill {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--gold);
  padding: 0.12rem 0.46rem;
  border-radius: 999px;
  background: rgba(255, 183, 3, 0.14);
  border: 1px solid rgba(255, 209, 102, 0.42);
  white-space: nowrap;
}

.title-preview-wrap {
  width: 100%;
  height: 102px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: #050a16;
}

#titlePreviewCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.showcase-card-bottom {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.showcase-card-bottom strong {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.84rem;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.showcase-card-bottom span {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.title-coins-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 183, 3, 0.2), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(255, 209, 102, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  color: #ffd166;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.16s ease;
}

.title-coins-chip:hover {
  border-color: #ffd166;
  background: rgba(255, 183, 3, 0.28);
  transform: translateY(-1px);
  box-shadow: 0 0 14px rgba(255, 183, 3, 0.3);
}

.hangar-notify-dot,
.hangar-btn-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #00ff87;
  box-shadow: 0 0 9px #00ff87;
  flex-shrink: 0;
}

.hangar-notify-dot.hidden,
.hangar-btn-dot.hidden {
  display: none;
}

.game-lead {
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.46;
  margin: 0 auto 0.9rem;
  max-width: 620px;
}

.game-lead.title-lead {
  margin: 0;
  max-width: none;
  font-size: 0.81rem;
  line-height: 1.42;
  color: #cbd5e1;
  align-self: center;
}

.title-primary-modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.58rem;
  flex: 1.32 1 0;
}

.btn-cta.mode-card-btn {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  height: 100%;
  min-height: 76px;
  gap: 0.28rem;
  padding: 0.82rem 0.98rem;
  border-radius: 13px;
  text-align: left;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -3px 0 rgba(0, 0, 0, 0.28);
}

.mode-card-head {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.mode-sub-tag {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  opacity: 0.88;
}

.title-secondary-modes {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 0.96fr);
  gap: 0.48rem;
  width: 100%;
  flex: 1 1 0;
}

.title-secondary-modes .btn-cta {
  position: relative;
  min-width: 0;
  width: 100%;
  height: 100%;
  min-height: 58px;
  padding: 0.85rem 0.56rem;
  gap: 0.36rem;
  font-size: clamp(0.66rem, 1.12vw, 0.8rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  border-radius: 12px;
  white-space: nowrap;
}

.title-secondary-modes .btn-cta svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.title-secondary-modes .hangar-btn-dot {
  position: absolute;
  top: 5px;
  right: 5px;
}

@media (max-width: 720px) {
  .title-command-grid {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }
  .title-secondary-modes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .title-secondary-modes .hangar-btn {
    grid-column: 1 / -1;
  }
}

.menu-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.menu-actions.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

.menu-actions.three-col {
  display: grid;
  grid-template-columns: 1.15fr 1.15fr 0.92fr;
  gap: 0.65rem;
}

.menu-actions.four-col {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.menu-actions.five-col {
  display: grid;
  grid-template-columns: 1.08fr 0.95fr 1.05fr 1.08fr 0.98fr;
  gap: 0.5rem;
}

.menu-actions.four-col .btn-cta,
.menu-actions.five-col .btn-cta {
  padding: 0.7rem 0.52rem;
  font-size: 0.72rem;
  white-space: nowrap;
}

@media (max-width: 780px) {
  .menu-actions.four-col {
    grid-template-columns: 1fr 1fr;
  }
  .menu-actions.five-col {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.btn-cta.hangar-btn {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.28), rgba(30, 41, 59, 0.92));
  color: #ffd166;
  border: 1px solid rgba(255, 209, 102, 0.62);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.btn-cta.hangar-btn:hover:not(:disabled) {
  border-color: #ffd166;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.42), rgba(30, 58, 95, 0.92));
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(255, 159, 28, 0.32);
}

.pill-btn.apk-pill {
  background: rgba(0, 255, 135, 0.14);
  border-color: rgba(0, 255, 135, 0.48);
  color: #00ff87;
  text-decoration: none;
}

.pill-btn.apk-pill:hover {
  background: rgba(0, 255, 135, 0.24);
  border-color: #00ff87;
}

.btn-cta.lan-btn {
  background: linear-gradient(135deg, #10b981 0%, #00ff87 48%, #00b4d8 100%);
  color: #021318;
  box-shadow:
    0 8px 22px rgba(0, 255, 135, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -3px 0 rgba(0, 0, 0, 0.24);
}

.btn-cta.lan-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 255, 135, 0.42);
}

.btn-cta:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none !important;
}

.menu-actions.row-wrap {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.menu-actions.row-wrap .btn-cta {
  flex: 1 1 148px;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.46rem;
  padding: 0.76rem 1.08rem;
  border-radius: 12px;
  border: none;
  font-family: 'Orbitron', sans-serif;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.2s ease, border-color 0.16s ease;
}

.btn-cta.primary {
  background: linear-gradient(135deg, #38bdf8 0%, #00e5ff 48%, #0284c7 100%);
  color: #020816;
  box-shadow:
    0 8px 24px rgba(0, 229, 255, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.44),
    inset 0 -3px 0 rgba(0, 0, 0, 0.26);
}

.btn-cta.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 229, 255, 0.48);
}

.btn-cta.secondary {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.78), rgba(15, 23, 42, 0.92));
  color: var(--text-main);
  border: 1px solid rgba(148, 163, 184, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.btn-cta.secondary:hover {
  border-color: var(--cyan);
  background: rgba(0, 229, 255, 0.14);
  transform: translateY(-1px);
}

.btn-cta.guide-btn {
  background: linear-gradient(180deg, rgba(255, 183, 3, 0.14), rgba(15, 23, 42, 0.9));
  color: #ffd166;
  border: 1px solid rgba(255, 209, 102, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.btn-cta.guide-btn:hover {
  border-color: #ffd166;
  background: rgba(255, 183, 3, 0.22);
  transform: translateY(-1px);
}

.controls-cheatsheet {
  margin-top: 0.72rem;
  padding-top: 0.56rem;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem 1.05rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.controls-cheatsheet strong {
  color: #e2e8f0;
}

/* ==========================================================================
   Local Network (Wi-Fi / LAN) Create & Join Server Screen
   ========================================================================== */

.lan-modal {
  display: flex;
  flex-direction: column;
}

.lan-panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: left;
}

.lan-panel.hidden {
  display: none !important;
}

.lan-commander-bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.48rem;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid var(--border-subtle);
  border-radius: 11px;
  padding: 0.36rem 0.62rem;
  margin-bottom: 0.48rem;
}

.lan-cmd-item {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  min-width: 0;
}

.lan-cmd-item.callsign-item {
  flex: 0 1 175px;
}

#lanCallsignInput {
  width: 100%;
  min-width: 82px;
  max-width: 132px;
  padding: 0.34rem 0.5rem;
  font-size: 0.74rem;
}

.lan-cmd-item.grow {
  flex: 1 1 140px;
  min-width: 110px;
}

.lan-cmd-item.grow .skirmish-select {
  width: 100%;
  min-width: 0;
  text-overflow: ellipsis;
}

.lan-cmd-item label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.skirmish-select.compact-select {
  padding: 0.34rem 0.55rem;
  font-size: 0.72rem;
}

/* ==========================================================================
   Armored War Hangar — Live Animated Showcase & 5-Machine Roster
   ========================================================================== */

.hangar-modal {
  max-width: 970px;
}

.hangar-layout {
  display: grid;
  grid-template-columns: 1.06fr 1fr;
  gap: 0.85rem;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.15rem;
}

.hangar-showcase {
  display: flex;
  flex-direction: column;
  gap: 0.58rem;
  background:
    radial-gradient(100% 70% at 50% 0%, rgba(56, 189, 248, 0.08), rgba(0, 0, 0, 0)),
    linear-gradient(175deg, rgba(14, 23, 46, 0.88), rgba(7, 12, 26, 0.94));
  border: 1px solid rgba(56, 189, 248, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  padding: 0.72rem;
}

.hangar-canvas-wrap {
  position: relative;
  width: 100%;
  height: 188px;
  border-radius: 11px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.32);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.65);
  background: #050a16;
  cursor: pointer;
}

#hangarPreviewCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.hangar-testfire-btn {
  position: absolute;
  top: 8px;
  left: 9px;
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.2rem 0.54rem;
  border-radius: 999px;
  background: rgba(8, 14, 28, 0.88);
  border: 1px solid rgba(255, 183, 3, 0.55);
  color: #ffd166;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.14s ease;
}

.hangar-testfire-btn:hover {
  background: rgba(255, 183, 3, 0.22);
  border-color: #ffd166;
  transform: scale(1.03);
}

.hangar-preview-badge {
  position: absolute;
  top: 8px;
  right: 9px;
  padding: 0.2rem 0.58rem;
  border-radius: 999px;
  background: rgba(5, 10, 24, 0.88);
  border: 1px solid rgba(0, 229, 255, 0.55);
  color: var(--cyan);
  font-family: 'Orbitron', sans-serif;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  pointer-events: none;
}

.hangar-spec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.hangar-spec-head h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #ffffff;
}

.hangar-machine-role {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.67rem;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 0.08rem;
}

.hangar-equip-btn {
  padding: 0.54rem 0.98rem;
  font-size: 0.73rem;
  white-space: nowrap;
}

.hangar-equip-btn.is-equipped {
  background: rgba(0, 255, 135, 0.16);
  border: 1px solid rgba(0, 255, 135, 0.62);
  color: #00ff87;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.hangar-equip-btn.can-buy {
  background: linear-gradient(135deg, #ffd166 0%, #ffb703 45%, #00ff87 100%);
  border: 1px solid #fef08a;
  color: #040914;
  box-shadow:
    0 6px 20px rgba(255, 183, 3, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.hangar-equip-btn.can-buy:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 255, 135, 0.45);
}

.hangar-equip-btn.locked-need {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 183, 3, 0.44);
  color: #ffd166;
  box-shadow: none;
}

.hangar-header-right,
.campaign-header-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.wallet-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  padding: 0.25rem 0.66rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 183, 3, 0.18), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(255, 209, 102, 0.54);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  color: #ffd166;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.wallet-pill.clickable {
  cursor: pointer;
  transition: all 0.15s ease;
}

.wallet-pill.clickable:hover {
  background: rgba(255, 183, 3, 0.28);
  border-color: #ffd166;
  transform: translateY(-1px);
}

.daily-supply-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.26rem 0.64rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(0, 255, 135, 0.22), rgba(255, 183, 3, 0.22));
  border: 1px solid rgba(0, 255, 135, 0.68);
  color: #00ff87;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 0 12px rgba(0, 255, 135, 0.22);
  transition: all 0.15s ease;
}

.daily-supply-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(0, 255, 135, 0.36);
}

.daily-supply-btn.claimed {
  background: rgba(15, 23, 42, 0.68);
  border-color: rgba(148, 163, 184, 0.28);
  color: var(--text-muted);
  box-shadow: none;
  cursor: default;
}

.hangar-earn-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.34rem;
  padding: 0.36rem 0.62rem;
  border-radius: 9px;
  background: linear-gradient(90deg, rgba(255, 183, 3, 0.11), rgba(15, 23, 42, 0.72));
  border: 1px solid rgba(255, 209, 102, 0.28);
  font-size: 0.64rem;
  color: #e2e8f0;
}

.hangar-earn-strip .earn-tag {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.58rem;
  font-weight: 800;
  color: #ffd166;
  letter-spacing: 0.05em;
}

.hangar-perk-box {
  background: linear-gradient(180deg, rgba(8, 14, 30, 0.86), rgba(4, 8, 18, 0.92));
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-left: 3px solid var(--cyan);
  border-radius: 10px;
  padding: 0.54rem 0.72rem;
  display: flex;
  flex-direction: column;
  gap: 0.16rem;
}

.hangar-perk-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  color: var(--cyan);
}

.hangar-perk-box strong {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.78rem;
  color: #ffd166;
}

.hangar-perk-box p {
  font-size: 0.73rem;
  line-height: 1.36;
  color: #cbd5e1;
}

.hangar-roster-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.48rem;
  min-width: 0;
}

.hangar-roster-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.2rem;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #94a3b8;
  flex-shrink: 0;
}

.hangar-fleet-count {
  color: var(--cyan);
  font-size: 0.58rem;
  padding: 0.1rem 0.46rem;
  border-radius: 999px;
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.32);
}

.hangar-roster-list {
  display: flex;
  flex-direction: column;
  gap: 0.36rem;
  flex: 1 1 auto;
  min-height: 82px;
  max-height: 176px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}

.hangar-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  background: linear-gradient(180deg, rgba(18, 28, 52, 0.84), rgba(10, 17, 34, 0.92));
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  border-radius: 11px;
  padding: 0.45rem 0.68rem;
  cursor: pointer;
  text-align: left;
  color: var(--text-main);
  transition: all 0.15s ease;
}

.hangar-card:hover {
  border-color: rgba(56, 189, 248, 0.55);
  background: linear-gradient(180deg, rgba(22, 36, 66, 0.94), rgba(12, 22, 44, 0.96));
  transform: translateX(2px);
}

.hangar-card.selected {
  border-color: var(--cyan);
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.18), rgba(15, 25, 48, 0.96));
  box-shadow:
    0 4px 18px rgba(0, 229, 255, 0.18),
    inset 3px 0 0 var(--cyan);
}

.hangar-card-left {
  display: flex;
  align-items: center;
  gap: 0.62rem;
  min-width: 0;
}

.hangar-card-icon {
  width: 48px;
  height: 30px;
  border-radius: 8px;
  background: radial-gradient(circle at 50% 40%, rgba(30, 41, 59, 0.9), rgba(4, 8, 18, 0.96));
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hangar-card-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.hangar-card-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.77rem;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hangar-card-sub {
  font-size: 0.66rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hangar-card-tag {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.56rem;
  font-weight: 800;
  padding: 0.16rem 0.48rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #cbd5e1;
  white-space: nowrap;
  flex-shrink: 0;
}

.hangar-card-tag.equipped {
  background: rgba(0, 255, 135, 0.16);
  border-color: rgba(0, 255, 135, 0.58);
  color: #00ff87;
}

.hangar-card-tag.owned {
  background: rgba(0, 229, 255, 0.12);
  border-color: rgba(0, 229, 255, 0.48);
  color: var(--cyan);
}

.hangar-card-tag.price {
  display: inline-flex;
  align-items: center;
  gap: 0.24rem;
  background: rgba(255, 183, 3, 0.12);
  border-color: rgba(255, 209, 102, 0.48);
  color: #ffd166;
}

.hangar-card-tag.price.affordable {
  background: rgba(0, 255, 135, 0.15);
  border-color: rgba(0, 255, 135, 0.64);
  color: #00ff87;
  box-shadow: 0 0 10px rgba(0, 255, 135, 0.2);
}

.hangar-card.locked .hangar-card-icon {
  opacity: 0.88;
}

.result-coin-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  margin: 0.25rem auto 0.55rem;
  padding: 0.45rem 0.85rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 183, 3, 0.15), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(255, 209, 102, 0.48);
  max-width: 480px;
}

.result-coin-main {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.48rem;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.84rem;
  color: #ffd166;
}

.result-coin-wallet {
  font-size: 0.66rem;
  font-weight: 700;
  padding: 0.12rem 0.48rem;
  border-radius: 999px;
  background: rgba(5, 9, 20, 0.78);
  border: 1px solid rgba(255, 209, 102, 0.35);
  color: #f8fafc;
}

.result-coin-breakdown {
  font-size: 0.7rem;
  color: #cbd5e1;
}

.hangar-stats-panel {
  background: linear-gradient(180deg, rgba(12, 20, 42, 0.88), rgba(6, 11, 24, 0.94));
  border: 1px solid rgba(148, 163, 184, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 0.38rem 0.58rem;
  display: grid;
  grid-template-columns: minmax(0, max-content) minmax(44px, 1fr) minmax(0, max-content) minmax(66px, max-content);
  align-items: center;
  column-gap: 0.44rem;
  row-gap: 0.22rem;
}

.hangar-stat-row {
  display: contents;
}

.h-stat-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.54rem;
  font-weight: 800;
  color: #cbd5e1;
  letter-spacing: 0.035em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.26rem;
  min-width: 0;
  white-space: nowrap;
}

.h-stat-name > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.h-stat-lvl {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.48rem;
  font-weight: 800;
  padding: 0.04rem 0.26rem;
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.14);
  color: #94a3b8;
  flex-shrink: 0;
}

.h-stat-lvl.upgraded {
  background: rgba(0, 255, 135, 0.16);
  border: 1px solid rgba(0, 255, 135, 0.42);
  color: var(--green);
}

.h-stat-track {
  position: relative;
  height: 7px;
  border-radius: 4px;
  background: rgba(3, 7, 16, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.26);
  overflow: hidden;
}

.h-stat-track::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent 0 calc(20% - 1.5px),
    rgba(3, 7, 16, 0.62) calc(20% - 1.5px) 20%
  );
  pointer-events: none;
}

.h-stat-fill {
  height: 100%;
  width: 75%;
  border-radius: 3px;
  background: linear-gradient(90deg, #0284c7, #00e5ff);
  transition: width 0.22s ease;
}

.h-stat-fill.fire {
  background: linear-gradient(90deg, #ea580c, #ffb703);
}

.h-stat-fill.mob {
  background: linear-gradient(90deg, #0d9488, #00ff87);
}

.h-stat-fill.ammo {
  background: linear-gradient(90deg, #d97706, #ffd166);
}

.h-stat-fill.kit {
  background: linear-gradient(90deg, #6366f1, #38bdf8);
}

.h-stat-fill.optics {
  background: linear-gradient(90deg, #a855f7, #f0abfc);
}

.h-stat-val {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.55rem;
  font-weight: 800;
  color: #f1f5f9;
  text-align: right;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.h-stat-upg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.18rem;
  height: 21px;
  width: 100%;
  padding: 0 0.36rem;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.88);
  color: #94a3b8;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.52rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.14s ease;
}

.h-stat-upg-btn svg {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
}

.h-stat-upg-btn.can-afford {
  border-color: rgba(255, 209, 102, 0.58);
  background: linear-gradient(135deg, rgba(255, 183, 3, 0.22), rgba(245, 158, 11, 0.12));
  color: #ffd166;
}

.h-stat-upg-btn.optics-btn.can-afford {
  border-color: rgba(240, 171, 252, 0.65);
  background: linear-gradient(135deg, rgba(192, 132, 252, 0.24), rgba(240, 171, 252, 0.14));
  color: #f0abfc;
}

.h-stat-upg-btn.can-afford:hover {
  filter: brightness(1.12);
}

.h-stat-upg-btn.is-max {
  border-color: rgba(0, 255, 135, 0.45);
  background: rgba(0, 255, 135, 0.14);
  color: var(--green);
  cursor: default;
}

.h-stat-upg-btn:disabled:not(.is-max) {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 780px) {
  .hangar-layout {
    grid-template-columns: 1fr;
  }
}

.lan-input {
  background: rgba(5, 8, 17, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 9px;
  padding: 0.48rem 0.75rem;
  color: #ffffff;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  outline: none;
  min-width: 190px;
}

.lan-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.2);
}

.lan-role-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.lan-role-card {
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.lan-role-card.host {
  border-color: rgba(0, 255, 135, 0.35);
}

.lan-role-card.join {
  border-color: rgba(0, 229, 255, 0.35);
}

.lan-role-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lan-role-head h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.92rem;
  font-weight: 800;
  color: #ffffff;
}

.lan-role-card p {
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--text-muted);
  flex: 1;
}

.lan-status-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(0, 255, 135, 0.38);
  border-radius: 12px;
  padding: 0.65rem 0.9rem;
}

.lan-status-banner.lan-setup-banner {
  border-color: rgba(56, 189, 248, 0.45);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(12, 74, 110, 0.36));
}

.lan-setup-copy {
  display: flex;
  flex-direction: column;
  gap: 0.16rem;
}

.lan-setup-copy strong {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: #38bdf8;
}

.lan-setup-copy span {
  font-size: 0.76rem;
  color: #cbd5e1;
}

.lan-setup-copy span b {
  color: #00ff87;
}

.lan-codes {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.55rem;
}

.lan-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  background: rgba(5, 8, 17, 0.85);
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: 9px;
  padding: 0.3rem 0.72rem;
  text-align: left;
}

.lan-chip.clickable {
  cursor: pointer;
  transition: border-color 0.16s ease, transform 0.12s ease, box-shadow 0.16s ease;
}

.lan-chip.clickable:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.25);
  transform: translateY(-1px);
}

.lan-share-trigger,
.lan-copy-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  border-radius: 9px;
  padding: 0.42rem 0.85rem;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.lan-share-trigger {
  background: linear-gradient(135deg, rgba(0, 255, 135, 0.22), rgba(0, 229, 255, 0.18));
  border: 1px solid rgba(0, 255, 135, 0.65);
  color: #00ff87;
  box-shadow: 0 0 14px rgba(0, 255, 135, 0.16);
}

.lan-share-trigger:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(0, 255, 135, 0.34), rgba(0, 229, 255, 0.26));
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(0, 255, 135, 0.3);
}

.lan-copy-trigger {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(0, 229, 255, 0.4);
  color: var(--cyan);
}

.lan-copy-trigger:hover:not(:disabled) {
  border-color: var(--cyan);
  background: rgba(0, 229, 255, 0.14);
}

.lan-share-trigger:disabled,
.lan-copy-trigger:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.lan-chip.hidden {
  display: none !important;
}

.lan-chip .chip-label {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  color: var(--text-muted);
}

.lan-chip strong {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.98rem;
  color: var(--cyan);
  letter-spacing: 0.08em;
}

.lan-peer-pill {
  padding: 0.38rem 0.8rem;
  border-radius: 999px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
}

.lan-peer-pill.waiting {
  background: rgba(255, 183, 3, 0.14);
  border: 1px solid rgba(255, 183, 3, 0.45);
  color: #ffd166;
}

.lan-peer-pill.ready {
  background: rgba(0, 255, 135, 0.16);
  border: 1px solid rgba(0, 255, 135, 0.55);
  color: #00ff87;
}

.lan-peer-pill.setup {
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.48);
  color: #38bdf8;
}

.lan-join-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 0.8rem;
}

.lan-browser-box,
.lan-manual-box {
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid var(--border-subtle);
  border-radius: 13px;
  padding: 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 195px;
}

.lan-box-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--cyan);
}

.lan-scan-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
  flex-shrink: 0;
}

.lan-auto-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #00ff87;
  padding: 0.14rem 0.42rem;
  border-radius: 999px;
  background: rgba(0, 255, 135, 0.1);
  border: 1px solid rgba(0, 255, 135, 0.28);
}

.lan-refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.24rem;
  padding: 0.16rem 0.46rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 229, 255, 0.36);
  background: rgba(15, 23, 42, 0.9);
  color: #e2e8f0;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.lan-refresh-btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(0, 229, 255, 0.14);
}

.lan-refresh-btn.spinning svg {
  animation: lanSpinOnce 0.52s ease;
}

@keyframes lanSpinOnce {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.lan-app-handoff {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.42rem 0.62rem;
  border-radius: 9px;
  background: linear-gradient(90deg, rgba(0, 229, 255, 0.12), rgba(0, 255, 135, 0.1));
  border: 1px solid rgba(0, 229, 255, 0.35);
}

.lan-app-handoff.hidden {
  display: none !important;
}

.lan-app-handoff-copy {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  min-width: 0;
  color: #e2e8f0;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.25;
}

.lan-app-handoff-copy svg {
  flex-shrink: 0;
  color: var(--cyan);
}

.lan-app-handoff-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.64rem;
  border-radius: 7px;
  background: linear-gradient(135deg, #00e5ff, #00ff87);
  color: #041322;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-decoration: none;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.25);
  transition: transform 0.14s ease, filter 0.14s ease;
}

.lan-app-handoff-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.lan-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00ff87;
  box-shadow: 0 0 8px #00ff87;
  animation: lanPulse 1.4s infinite ease-in-out;
}

@keyframes lanPulse {
  0%, 100% { opacity: 0.35; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.2); }
}

.lan-server-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: 165px;
  overflow-y: auto;
  flex: 1;
}

.lan-server-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  background: rgba(5, 8, 17, 0.82);
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 10px;
  padding: 0.48rem 0.65rem;
}

.lan-server-row.is-connected-room {
  background: linear-gradient(90deg, rgba(0, 255, 135, 0.14), rgba(0, 229, 255, 0.08));
  border-color: rgba(0, 255, 135, 0.62);
  box-shadow: 0 0 16px rgba(0, 255, 135, 0.14);
}

.lan-connected-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.34rem 0.68rem;
  border-radius: 999px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #00ff87;
  background: rgba(0, 255, 135, 0.16);
  border: 1px solid rgba(0, 255, 135, 0.52);
}

.lan-browser-box.in-connected-room .lan-server-list {
  flex: 0 0 auto;
  max-height: none;
}

.lan-room-wait-banner {
  display: flex;
  flex-direction: column;
  gap: 0.44rem;
  padding: 0.62rem 0.72rem;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(255, 183, 3, 0.12) 0%, rgba(15, 23, 42, 0.92) 65%);
  border: 1px solid rgba(255, 209, 102, 0.46);
  box-shadow: 0 0 18px rgba(255, 183, 3, 0.1);
  text-align: left;
  margin-top: 0.1rem;
}

.lan-room-wait-banner.hidden {
  display: none !important;
}

.lan-wait-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #ffd166;
}

.lan-wait-pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #ffd166;
  box-shadow: 0 0 9px #ffd166;
  animation: lanPulse 1.25s infinite ease-in-out;
}

.lan-wait-desc {
  margin: 0;
  font-size: 0.74rem;
  line-height: 1.4;
  color: #e2e8f0;
}

.lan-wait-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 0.1rem;
}

.lan-inline-cfg-btn.leave-danger {
  border-color: rgba(255, 42, 109, 0.58) !important;
  background: rgba(255, 42, 109, 0.14) !important;
  color: #fda4af !important;
}

.lan-inline-cfg-btn.leave-danger:hover {
  border-color: #ff2a6d !important;
  background: rgba(255, 42, 109, 0.26) !important;
  color: #ffffff !important;
}

.lan-srv-meta {
  display: flex;
  flex-direction: column;
  gap: 0.14rem;
}

.lan-srv-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: #ffffff;
}

.lan-srv-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.lan-srv-badge {
  display: inline-block;
  font-size: 0.58rem;
  font-weight: 800;
  padding: 0.08rem 0.38rem;
  border-radius: 4px;
  background: rgba(0, 255, 135, 0.18);
  color: #00ff87;
  margin-right: 0.35rem;
}

.lan-empty {
  font-size: 0.76rem;
  color: var(--text-muted);
  padding: 1.1rem 0.4rem;
  text-align: center;
}

.lan-hint {
  font-size: 0.73rem;
  line-height: 1.35;
  color: var(--text-muted);
}

.lan-join-input-row {
  display: flex;
  gap: 0.45rem;
}

.lan-join-input-row .lan-input {
  flex: 1;
  min-width: 0;
}

.lan-join-status {
  font-size: 0.74rem;
  font-weight: 600;
  color: #ffd166;
  background: rgba(5, 8, 17, 0.65);
  border-radius: 8px;
  padding: 0.42rem 0.6rem;
}

/* Share Invitation Modal (Must stack ABOVE #lanScreen z-index: 30!) */
.share-overlay {
  z-index: 85 !important;
  background: rgba(3, 6, 14, 0.84);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.share-modal-card {
  max-width: 860px;
  overflow-y: auto;
}

.share-top-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.78rem;
}

.share-cover-thumb {
  width: 78px;
  height: 41px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(0, 229, 255, 0.48);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.55);
  flex-shrink: 0;
}

.share-url-input {
  flex: 1 1 250px;
  min-width: 0;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(5, 8, 17, 0.92);
  border-color: rgba(0, 229, 255, 0.35);
}

.share-top-btn {
  padding: 0.52rem 0.85rem;
  font-size: 0.7rem;
  flex: 0 0 auto;
  white-space: nowrap;
}

.share-social-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.72rem;
}

.share-net-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.46rem;
  padding: 0.62rem 0.55rem;
  border-radius: 11px;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid var(--border-subtle);
  color: #f8fafc;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.share-net-btn:hover {
  transform: translateY(-2px);
}

.share-net-btn.whatsapp { border-color: rgba(37, 211, 102, 0.45); color: #4ade80; }
.share-net-btn.whatsapp:hover { background: rgba(37, 211, 102, 0.16); border-color: #25d366; }

.share-net-btn.telegram { border-color: rgba(56, 189, 248, 0.45); color: #38bdf8; }
.share-net-btn.telegram:hover { background: rgba(56, 189, 248, 0.16); border-color: #38bdf8; }

.share-net-btn.messenger { border-color: rgba(96, 165, 250, 0.45); color: #60a5fa; }
.share-net-btn.messenger:hover { background: rgba(96, 165, 250, 0.16); border-color: #60a5fa; }

.share-net-btn.facebook { border-color: rgba(59, 130, 246, 0.45); color: #93c5fd; }
.share-net-btn.facebook:hover { background: rgba(59, 130, 246, 0.16); border-color: #3b82f6; }

.share-net-btn.discord { border-color: rgba(129, 140, 248, 0.45); color: #a5b4fc; }
.share-net-btn.discord:hover { background: rgba(129, 140, 248, 0.16); border-color: #818cf8; }

.share-net-btn.xtwitter { border-color: rgba(226, 232, 240, 0.38); color: #f1f5f9; }
.share-net-btn.xtwitter:hover { background: rgba(226, 232, 240, 0.14); border-color: #ffffff; }

.share-net-btn.viber { border-color: rgba(192, 132, 252, 0.45); color: #d8b4fe; }
.share-net-btn.viber:hover { background: rgba(192, 132, 252, 0.16); border-color: #c084fc; }

.share-net-btn.reddit { border-color: rgba(251, 146, 60, 0.45); color: #fdba74; }
.share-net-btn.reddit:hover { background: rgba(251, 146, 60, 0.16); border-color: #fb923c; }

.share-net-btn.sms { border-color: rgba(251, 191, 36, 0.45); color: #fde047; }
.share-net-btn.sms:hover { background: rgba(251, 191, 36, 0.16); border-color: #fbbf24; }

.share-net-btn.email { border-color: rgba(0, 229, 255, 0.45); color: var(--cyan); }
.share-net-btn.email:hover { background: rgba(0, 229, 255, 0.16); border-color: var(--cyan); }

.share-footer-note {
  font-size: 0.74rem;
  color: var(--text-muted);
  text-align: center;
  margin: 0;
}

.share-footer-note strong {
  color: var(--cyan);
}

/* Fullscreen PWA Home Screen Modal (Stacks above menus z-index: 30 AND rotate blocker z-index: 9999) */
.pwa-overlay {
  z-index: 10050 !important;
  background: rgba(3, 6, 15, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  align-items: center;
}

.pwa-modal-card {
  max-width: 860px;
  max-height: calc(100dvh - 20px);
  overflow-y: auto;
}

.pwa-hero-bar {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  padding: 0.72rem 0.85rem;
  margin-bottom: 0.75rem;
  border-radius: 13px;
  background: rgba(8, 15, 34, 0.88);
  border: 1px solid rgba(0, 229, 255, 0.34);
}

.pwa-app-icon-thumb {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  border: 1px solid rgba(0, 229, 255, 0.55);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6), 0 0 14px rgba(0, 229, 255, 0.24);
  flex-shrink: 0;
}

.pwa-hero-copy {
  flex: 1 1 250px;
  min-width: 0;
}

.pwa-hero-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.86rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.22rem;
}

.pwa-hero-sub {
  font-size: 0.76rem;
  line-height: 1.38;
  color: var(--text-muted);
}

.pwa-hero-sub strong {
  color: var(--cyan);
}

.pwa-hero-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.pwa-action-btn {
  padding: 0.5rem 0.82rem;
  font-size: 0.68rem;
  white-space: nowrap;
}

.pwa-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.62rem;
  margin-bottom: 0.75rem;
}

.pwa-step-card {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.72rem 0.78rem;
  border-radius: 13px;
  background: rgba(15, 23, 42, 0.84);
  border: 1px solid var(--border-subtle);
}

.pwa-step-card.highlight {
  border-color: rgba(0, 229, 255, 0.38);
  background: linear-gradient(160deg, rgba(12, 24, 48, 0.92), rgba(8, 15, 32, 0.92));
}

.pwa-step-card.active-browser-step {
  border-color: var(--gold);
  box-shadow: 0 0 18px rgba(255, 209, 102, 0.2);
}

.pwa-step-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: rgba(0, 229, 255, 0.14);
  border: 1px solid rgba(0, 229, 255, 0.4);
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pwa-step-icon.emerald {
  background: rgba(0, 255, 135, 0.14);
  border-color: rgba(0, 255, 135, 0.45);
  color: var(--green);
}

.pwa-step-body {
  min-width: 0;
}

.pwa-step-head {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  color: #f8fafc;
  margin-bottom: 0.24rem;
}

.pwa-step-body p {
  font-size: 0.74rem;
  line-height: 1.38;
  color: var(--text-muted);
}

.pwa-step-body p strong {
  color: #f1f5f9;
}

.pwa-footer-row {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 720px), (orientation: portrait) {
  .pwa-steps-grid {
    grid-template-columns: 1fr;
  }
  .pwa-footer-row .btn-cta {
    width: 100%;
  }
}

@media (max-height: 480px) {
  .pwa-hero-bar {
    padding: 0.48rem 0.65rem;
    margin-bottom: 0.48rem;
    gap: 0.55rem;
  }
  .pwa-app-icon-thumb {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }
  .pwa-hero-title {
    font-size: 0.76rem;
    margin-bottom: 0.12rem;
  }
  .pwa-hero-sub {
    font-size: 0.67rem;
    line-height: 1.28;
  }
  .pwa-action-btn {
    padding: 0.38rem 0.64rem;
    font-size: 0.62rem;
  }
  .pwa-steps-grid {
    gap: 0.45rem;
    margin-bottom: 0.48rem;
  }
  .pwa-step-card {
    padding: 0.5rem 0.6rem;
    gap: 0.5rem;
    border-radius: 10px;
  }
  .pwa-step-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }
  .pwa-step-icon svg {
    width: 17px;
    height: 17px;
  }
  .pwa-step-head {
    font-size: 0.65rem;
    margin-bottom: 0.14rem;
  }
  .pwa-step-body p {
    font-size: 0.66rem;
    line-height: 1.28;
  }
  .pwa-footer-row .btn-cta {
    padding: 0.44rem 0.9rem;
    font-size: 0.68rem;
  }
  .menu-actions.four-col .btn-cta {
    padding: 0.54rem 0.5rem;
    font-size: 0.68rem;
  }
  .lan-panel {
    gap: 0.45rem;
  }
  .lan-share-trigger,
  .lan-copy-trigger {
    padding: 0.34rem 0.62rem;
    font-size: 0.64rem;
  }
  .share-top-bar {
    margin-bottom: 0.48rem;
    gap: 0.38rem;
  }
  .share-cover-thumb {
    width: 62px;
    height: 33px;
  }
  .share-top-btn {
    padding: 0.4rem 0.62rem;
    font-size: 0.62rem;
  }
  .share-social-grid {
    gap: 0.38rem;
    margin-bottom: 0.45rem;
  }
  .share-net-btn {
    padding: 0.44rem 0.38rem;
    font-size: 0.6rem;
    gap: 0.32rem;
  }
  .share-net-btn svg {
    width: 16px;
    height: 16px;
  }
  .share-footer-note {
    font-size: 0.66rem;
  }
  .lan-role-card {
    padding: 0.58rem 0.72rem;
    gap: 0.36rem;
  }
  .lan-role-card p {
    font-size: 0.68rem;
  }
  .lan-browser-box,
  .lan-manual-box {
    padding: 0.5rem 0.65rem;
    min-height: 138px;
  }
  .lan-server-list {
    max-height: 112px;
  }
}

/* ==========================================================================
   Campaign Operations Grid (3-Column Widescreen Landscape)
   ========================================================================== */

.screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.8rem;
  flex-shrink: 0;
}

.screen-header h2 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
}

.star-summary {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.32rem 0.78rem;
  border-radius: 999px;
  background: rgba(255, 209, 102, 0.14);
  border: 1px solid rgba(255, 209, 102, 0.4);
  color: var(--gold);
  font-family: 'Orbitron', sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
}

.campaign-modal {
  height: min(620px, calc(100vh - 20px));
  height: min(620px, calc(100dvh - 20px));
  overflow: hidden;
}

.campaign-sector-tabs {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 0.42rem;
  margin-bottom: 0.6rem;
  flex-shrink: 0;
}

.campaign-sector-tabs::-webkit-scrollbar {
  display: none;
}

.sector-tab-btn {
  display: flex;
  flex: 0 0 auto;
  min-width: 96px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  padding: 0.36rem 0.3rem;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.82);
  color: var(--text-muted);
  font-family: 'Orbitron', sans-serif;
  cursor: pointer;
  transition: all 0.15s ease;
  min-width: 0;
}

.sector-tab-btn strong {
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.sector-tab-btn span {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  font-size: 0.56rem;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
  max-width: 100%;
}

.sector-tab-btn:hover {
  border-color: rgba(0, 229, 255, 0.48);
  background: rgba(15, 23, 42, 0.96);
}

.sector-tab-btn.active {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.22), rgba(2, 132, 199, 0.16));
  border-color: var(--cyan);
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.18);
}

.sector-tab-btn.active strong {
  color: #ffffff;
}

.sector-tab-btn.active span {
  color: var(--gold);
}

/* True 2-Row × 3-Column (2x3) Visible Stage Grid + Smooth Vertical Scroll */
.campaign-grid {
  --camp-gap: 0.72rem;
  --op-row-min: 170px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: minmax(var(--op-row-min), calc((100% - var(--camp-gap)) / 2));
  align-content: start;
  gap: var(--camp-gap);
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 229, 255, 0.48) rgba(15, 23, 42, 0.65);
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 2px 0.35rem 4px 2px;
}

.campaign-grid::-webkit-scrollbar {
  width: 6px;
}

.campaign-grid::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.65);
  border-radius: 999px;
}

.campaign-grid::-webkit-scrollbar-thumb {
  background: rgba(0, 229, 255, 0.48);
  border-radius: 999px;
}

.campaign-grid::-webkit-scrollbar-thumb:hover {
  background: var(--cyan);
}

.op-card {
  background: linear-gradient(170deg, rgba(16, 26, 50, 0.9), rgba(9, 15, 31, 0.94));
  border: 1px solid var(--border-subtle);
  border-radius: 13px;
  display: flex;
  flex-direction: column;
  height: 100%;
  scroll-snap-align: start;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.op-card.current-op {
  border-color: rgba(0, 255, 135, 0.78);
  box-shadow:
    0 0 18px rgba(0, 255, 135, 0.2),
    inset 0 0 16px rgba(0, 255, 135, 0.06);
}

.op-card.boss-op {
  border-color: rgba(255, 42, 109, 0.52);
}

.op-card.unlocked {
  cursor: pointer;
}

.op-card.unlocked:hover {
  transform: translateY(-2px);
  border-color: var(--cyan);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.52);
}

.op-card.locked {
  opacity: 0.58;
}

.op-banner {
  padding: 0.42rem 0.68rem;
  border-radius: 12px 12px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.op-banner-left {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  min-width: 0;
}

.op-code {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.14rem 0.44rem;
  border-radius: 6px;
  background: rgba(5, 8, 17, 0.8);
  color: var(--cyan);
  white-space: nowrap;
}

.op-pill {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 0.12rem 0.38rem;
  border-radius: 999px;
  white-space: nowrap;
}

.op-pill.current {
  background: rgba(0, 255, 135, 0.2);
  border: 1px solid rgba(0, 255, 135, 0.65);
  color: #00ff87;
}

.op-pill.boss {
  background: rgba(255, 42, 109, 0.24);
  border: 1px solid rgba(255, 42, 109, 0.68);
  color: #ff6b9d;
}

.op-pill.unlock {
  background: rgba(255, 209, 102, 0.2);
  border: 1px solid rgba(255, 209, 102, 0.62);
  color: #ffd166;
}

.op-stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.op-body {
  padding: 0.56rem 0.72rem 0.6rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
}

.op-head-group {
  display: flex;
  flex-direction: column;
  gap: 0.14rem;
  min-width: 0;
}

.op-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.op-sub {
  font-size: 0.69rem;
  font-weight: 600;
  color: var(--amber);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.op-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.34;
  margin-top: 0.16rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.op-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  padding-top: 0.32rem;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  margin-top: auto;
}

.op-intel {
  font-size: 0.66rem;
  font-weight: 600;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.btn-deploy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.26rem;
  padding: 0.34rem 0.68rem;
  border-radius: 8px;
  border: none;
  font-family: 'Orbitron', sans-serif;
  font-weight: 800;
  font-size: 0.64rem;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, var(--cyan), #0096c7);
  color: #020813;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-deploy.replay {
  background: rgba(0, 229, 255, 0.14);
  border: 1px solid rgba(0, 229, 255, 0.48);
  color: var(--cyan);
}

.btn-deploy:disabled {
  background: rgba(148, 163, 184, 0.14);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: var(--text-muted);
  cursor: not-allowed;
}

/* Skirmish Form */
.skirmish-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0.5rem 0 0.88rem;
}

.skirmish-grid.skirmish-five {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.skirmish-field.span-2 {
  grid-column: span 2;
}

.skirmish-field.span-3 {
  grid-column: span 3;
}

@media (max-width: 720px) {
  .skirmish-grid.skirmish-five {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .skirmish-field.span-2,
  .skirmish-field.span-3 {
    grid-column: span 1;
  }
  .skirmish-field.span-3:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .campaign-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.skirmish-field {
  margin: 0;
  text-align: left;
  min-width: 0;
}

.skirmish-field label {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.32rem;
}

.skirmish-select {
  width: 100%;
  padding: 0.58rem 0.75rem;
  border-radius: 10px;
  background: #0c1428;
  border: 1px solid var(--border-cyan);
  color: #fff;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.76rem;
  outline: none;
  text-overflow: ellipsis;
}

/* ==========================================================================
   How to Play — Tactical Field Manual Modal & Tabs
   ========================================================================== */

.guide-modal {
  max-width: 940px;
  overflow: hidden;
}

.guide-kicker {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--gold);
  background: rgba(255, 209, 102, 0.1);
  border: 1px solid rgba(255, 209, 102, 0.32);
  padding: 0.26rem 0.68rem;
  border-radius: 999px;
  white-space: nowrap;
}

.guide-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  flex-shrink: 0;
}

.guide-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  padding: 0.56rem 0.65rem;
  border-radius: 11px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-family: 'Orbitron', sans-serif;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.guide-tab:hover {
  border-color: rgba(0, 229, 255, 0.45);
  color: var(--text-main);
}

.guide-tab.active {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.2), rgba(0, 150, 199, 0.14));
  border-color: var(--cyan);
  color: #ffffff;
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.18);
}

.guide-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  padding-right: 0.2rem;
}

.guide-panel {
  display: none;
}

.guide-panel.active {
  display: block;
}

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

.guide-card {
  display: flex;
  align-items: flex-start;
  gap: 0.78rem;
  padding: 0.82rem 0.92rem;
  border-radius: 14px;
  background: rgba(15, 23, 45, 0.78);
  border: 1px solid var(--border-subtle);
  transition: border-color 0.16s ease;
}

.guide-card:hover {
  border-color: rgba(0, 229, 255, 0.35);
}

.guide-card.span-two {
  grid-column: 1 / -1;
}

.guide-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
}

.guide-icon.cyan {
  color: var(--cyan);
  background: rgba(0, 229, 255, 0.12);
  border-color: rgba(0, 229, 255, 0.32);
}

.guide-icon.gold {
  color: #ffb703;
  background: rgba(255, 183, 3, 0.12);
  border-color: rgba(255, 183, 3, 0.34);
}

.guide-icon.orange {
  color: #ff5d2a;
  background: rgba(255, 93, 42, 0.12);
  border-color: rgba(255, 93, 42, 0.34);
}

.guide-icon.green {
  color: var(--green);
  background: rgba(0, 255, 135, 0.11);
  border-color: rgba(0, 255, 135, 0.32);
}

.guide-icon.pink {
  color: #ff2a85;
  background: rgba(255, 42, 133, 0.12);
  border-color: rgba(255, 42, 133, 0.34);
}

.guide-text {
  flex: 1;
  min-width: 0;
}

.guide-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  margin-bottom: 0.3rem;
}

.guide-card-head h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.84rem;
  font-weight: 800;
  color: #f8fafc;
}

.guide-badge {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 0.14rem 0.48rem;
  border-radius: 999px;
  white-space: nowrap;
}

.guide-badge.cyan {
  color: var(--cyan);
  background: rgba(0, 229, 255, 0.14);
}

.guide-badge.gold {
  color: #ffd166;
  background: rgba(255, 183, 3, 0.16);
}

.guide-badge.orange {
  color: #ff8c61;
  background: rgba(255, 93, 42, 0.18);
}

.guide-badge.green {
  color: var(--green);
  background: rgba(0, 255, 135, 0.14);
}

.guide-badge.pink {
  color: #ff70a6;
  background: rgba(255, 42, 133, 0.18);
}

.guide-text p {
  font-size: 0.79rem;
  line-height: 1.44;
  color: var(--text-muted);
}

.guide-text p strong {
  color: #e2e8f0;
}

/* ==========================================================================
   In-Game Tactical HUD
   ========================================================================== */

#hudLayer {
  position: fixed;
  inset: 0;
  z-index: 15;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hud-top-stack {
  display: flex;
  flex-direction: column;
  width: 100%;
  pointer-events: none;
}

.hud-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: max(0.55rem, env(safe-area-inset-top))
           max(0.95rem, env(safe-area-inset-right))
           0.22rem
           max(0.95rem, env(safe-area-inset-left));
  pointer-events: none;
  flex-wrap: nowrap;
}

.hud-top > * {
  pointer-events: auto;
}

.hud-wind-under {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.08rem 0.95rem 0;
  pointer-events: none;
}

.hud-wind-under .wind-chip {
  pointer-events: auto;
  padding: 0.26rem 0.72rem;
  gap: 0.42rem;
  font-size: 0.75rem;
}

.strike-target-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.22rem 0.95rem 0;
  pointer-events: none;
  z-index: 16;
}

.strike-target-banner.hidden {
  display: none !important;
}

.strike-target-pill {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.28rem 0.42rem 0.28rem 0.72rem;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(42, 8, 18, 0.95) 0%, rgba(18, 6, 14, 0.95) 100%);
  border: 1.5px solid #ff2a55;
  box-shadow: 0 0 18px rgba(255, 42, 85, 0.48), 0 4px 14px rgba(0, 0, 0, 0.65);
  color: #fff1f2;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  animation: strikeBannerPulse 1.15s ease-in-out infinite alternate;
}

.strike-target-banner.nuke-mode .strike-target-pill {
  background: linear-gradient(180deg, rgba(52, 24, 6, 0.96) 0%, rgba(24, 10, 6, 0.96) 100%);
  border-color: #facc15;
  box-shadow: 0 0 20px rgba(250, 204, 21, 0.5), 0 4px 14px rgba(0, 0, 0, 0.68);
  color: #fef9c3;
}

.strike-banner-reticle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ff2a55;
  filter: drop-shadow(0 0 6px rgba(255, 42, 85, 0.85));
  animation: strikeReticleSpinPulse 1.4s ease-in-out infinite;
}

.strike-target-banner.nuke-mode .strike-banner-reticle {
  color: #facc15;
  filter: drop-shadow(0 0 6px rgba(250, 204, 21, 0.85));
}

.strike-banner-text {
  white-space: nowrap;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

.strike-banner-cancel-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
  color: #fecdd3;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0.18rem 0.52rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.strike-banner-cancel-btn:hover,
.strike-banner-cancel-btn:active {
  background: rgba(255, 42, 85, 0.32);
  border-color: #ff2a55;
  color: #ffffff;
}

@keyframes strikeBannerPulse {
  0% {
    transform: scale(0.99);
    box-shadow: 0 0 12px rgba(255, 42, 85, 0.35), 0 4px 12px rgba(0, 0, 0, 0.6);
  }
  100% {
    transform: scale(1.015);
    box-shadow: 0 0 24px rgba(255, 42, 85, 0.72), 0 4px 16px rgba(0, 0, 0, 0.7);
  }
}

@keyframes strikeReticleSpinPulse {
  0%, 100% { transform: scale(0.92); }
  50% { transform: scale(1.18); }
}

@media (max-height: 500px) {
  .strike-target-banner {
    padding-top: 0.14rem;
  }
  .strike-target-pill {
    padding: 0.2rem 0.36rem 0.2rem 0.58rem;
    font-size: 0.64rem;
    gap: 0.38rem;
  }
  .strike-banner-cancel-btn {
    font-size: 0.56rem;
    padding: 0.14rem 0.42rem;
  }
}

.hud-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #081022;
  border: 1px solid rgba(148, 163, 184, 0.34);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.46);
  color: #f8fafc;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.hud-top > .hud-chip:first-child {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
}

.hud-top > .dock-group {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.42rem;
  flex-shrink: 1;
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
}

.op-label {
  font-family: 'Orbitron', sans-serif;
  color: #f8fafc;
  font-size: 0.78rem;
  min-width: 0;
  max-width: clamp(120px, 28vw, 320px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.turn-badge {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 0.35rem 0.76rem;
  border-radius: 999px;
  letter-spacing: 0.05em;
  flex-shrink: 0;
  white-space: nowrap;
}

.turn-badge.player {
  background: #072638;
  border: 1px solid var(--cyan);
  color: #ecfeff;
}

.turn-badge.enemy {
  background: #2e0c1c;
  border: 1px solid var(--pink);
  color: #ffe4e6;
}

.turn-badge.flight {
  background: #2d1b06;
  border: 1px solid var(--gold);
  color: #fef3c7;
}

.turn-badge.aider {
  background: #052e22;
  border: 1px solid var(--green);
  color: #ecfdf5;
}

.ai-aider-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  height: 36px;
  padding: 0 0.76rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  background: #081022;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.46);
  color: #f8fafc;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.16s ease;
}

.ai-aider-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.ai-aider-btn:hover:not(:disabled) {
  border-color: var(--green);
  color: #ecfdf5;
}

.ai-aider-btn:disabled {
  opacity: 1;
  background: #070d1c;
  border-color: rgba(148, 163, 184, 0.22);
  color: #94a3b8;
  cursor: not-allowed;
}

.ai-aider-btn.active {
  background: linear-gradient(135deg, #052e22 0%, #081b2c 100%);
  border-color: #00ff87;
  color: #ecfdf5;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), 0 0 14px rgba(0, 255, 135, 0.32);
}

.ai-aider-btn.active .ai-aider-icon-wrap {
  color: #00ff87;
}

.ai-aider-btn.video-topup {
  background: linear-gradient(135deg, #2f1d06 0%, #0c1428 100%);
  border-color: #fbbf24;
  color: #fef08a;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), 0 0 14px rgba(245, 158, 11, 0.26);
}

.ai-aider-btn.video-topup:hover:not(:disabled) {
  border-color: #fef08a;
  color: #fffbeb;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.55), 0 0 18px rgba(251, 191, 36, 0.42);
}

@keyframes aiDangerFlash {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.045);
  }
}

@keyframes aiDangerRing {
  0% {
    opacity: 0.85;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.22, 1.46);
  }
}

.ai-aider-btn.danger-alert {
  border-color: #ff2a6d;
  background: linear-gradient(135deg, #4c1026 0%, #361e07 100%);
  color: #fef08a;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), 0 0 18px rgba(255, 42, 109, 0.45);
  will-change: transform;
  animation: aiDangerFlash 0.88s ease-in-out infinite;
}

.ai-aider-btn.danger-alert::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 11px;
  border: 1.5px solid #ffd166;
  pointer-events: none;
  animation: aiDangerRing 1.25s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

.wind-chip {
  background: #081022;
  border-color: rgba(0, 229, 255, 0.46);
  color: #f8fafc;
  flex-shrink: 0;
}

#hudWindArrow {
  display: inline-flex;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  color: var(--cyan);
}

.hud-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  background: #081022;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.46);
  color: #f8fafc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.hud-icon-btn:hover {
  border-color: var(--cyan);
  color: #ecfeff;
}

.hud-icon-btn.muted {
  background: linear-gradient(135deg, #2e0c1c 0%, #0b1224 100%);
  color: #fda4af;
  border-color: rgba(255, 42, 109, 0.72);
}

.hud-zoom-btn {
  height: 36px;
  padding: 0 0.62rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  background: #081022;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.46);
  color: #f8fafc;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.hud-zoom-btn:hover {
  border-color: var(--cyan);
  color: #ecfeff;
}

.hud-zoom-btn.zoomed {
  border-color: #00e5ff;
  background: linear-gradient(135deg, #062a3d 0%, #09182e 100%);
  color: #ecfeff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), 0 0 12px rgba(0, 229, 255, 0.28);
}

.hud-zoom-btn.zoomed svg {
  color: #00e5ff;
}

/* Toast Banner (Global across Menu, LAN Share, PWA Guide & In-Game HUD — stacks above all modals) */
.hud-toast {
  position: fixed;
  top: max(12px, calc(env(safe-area-inset-top) + 46px));
  left: 50%;
  z-index: 10100;
  background: #081022;
  border: 1px solid var(--border-cyan);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.62);
  color: var(--gold);
  font-family: 'Orbitron', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.45rem 1.15rem;
  border-radius: 999px;
  opacity: 0;
  transform: translate(-50%, -10px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
  text-align: center;
  max-width: 92vw;
}

.hud-toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Bottom Tactical Dock (Single-Row Arsenal + Support + Fire) */
.hud-bottom {
  pointer-events: auto;
  background: linear-gradient(180deg, rgba(11, 18, 38, 0.96), rgba(5, 8, 18, 0.99));
  border-top: 1px solid rgba(56, 189, 248, 0.28);
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding: 0.42rem
           max(0.85rem, env(safe-area-inset-right))
           max(0.42rem, env(safe-area-inset-bottom))
           max(0.85rem, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: nowrap;
}

.dock-telemetry-right {
  flex-shrink: 0;
}

.dock-group {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.fuel-track {
  height: 6px;
  width: 54px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  overflow: hidden;
}

#fuelFill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--amber), var(--gold));
  transition: width 0.1s linear;
}

/* Weapon Bar */
.weapon-bar {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  overflow-x: auto;
}

.weapon-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
  padding: 0.36rem 0.6rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.62), rgba(10, 16, 32, 0.88));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.14s ease;
}

.weapon-btn.active {
  background: linear-gradient(180deg, rgba(0, 229, 255, 0.22), rgba(12, 24, 48, 0.92));
  border-color: var(--cyan);
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

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

.w-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
}

.w-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.66rem;
  font-weight: 800;
}

.w-ammo {
  font-size: 0.62rem;
  color: var(--text-muted);
}

/* Tactical Support Kits */
.support-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.68), rgba(10, 16, 32, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.support-btn:hover:not(:disabled) {
  border-color: var(--green);
  color: var(--green);
}

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

.support-btn-repair:not(:disabled) {
  border-color: rgba(251, 113, 133, 0.45);
}

.support-btn-repair:hover:not(:disabled) {
  border-color: #fb7185;
  box-shadow: 0 0 10px rgba(255, 42, 85, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.support-btn-repair:disabled {
  opacity: 0.55;
}

.support-cnt {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  border-radius: 999px;
  background: #0f172a;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font-size: 0.62rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Fire Button */
.fire-btn {
  padding: 0.65rem 1.38rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 183, 3, 0.45);
  background: linear-gradient(180deg, #ff7b29 0%, #ff3b30 52%, #e11d48 100%);
  color: #fff;
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 0.92rem;
  letter-spacing: 0.07em;
  box-shadow:
    0 6px 22px rgba(255, 42, 109, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -3px 0 rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: transform 0.1s ease, filter 0.15s ease;
}

.fire-btn:hover:not(:disabled) {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.fire-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

.result-stars {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 0.85rem 0 1.2rem;
}

/* ==========================================================================
   Twin-Stick Side Joysticks (Ground-Level • Left = Aim/Power • Right = Drive)
   ========================================================================== */

.aim-joystick-zone,
.move-joystick-zone {
  position: fixed;
  top: auto;
  bottom: calc(58px + env(safe-area-inset-bottom));
  height: clamp(180px, 44dvh, 240px);
  width: clamp(164px, 22vw, 256px);
  z-index: 16;
  pointer-events: none;
  touch-action: none;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 6px;
}

.aim-joystick-zone {
  left: 0;
  padding-left: max(12px, env(safe-area-inset-left));
}

.move-joystick-zone {
  right: 0;
  padding-right: max(12px, env(safe-area-inset-right));
}

.aim-joystick-zone.disabled,
.move-joystick-zone.disabled {
  opacity: 0.32;
  pointer-events: none;
}

.aim-joystick-zone.disabled .aim-joystick-pad,
.move-joystick-zone.disabled .move-joystick-pad {
  pointer-events: none;
}

/* On PC (Mouse + Keyboard), hide mobile thumbsticks so 100% of screen tracks cursor & click-fires */
body.pc-mode .aim-joystick-zone,
body.pc-mode .move-joystick-zone {
  pointer-events: none !important;
  align-items: flex-end;
  height: auto;
  bottom: calc(62px + env(safe-area-inset-bottom));
  width: auto;
  padding: 0 1rem;
}

body.pc-mode .aim-joystick-pad,
body.pc-mode .move-joystick-pad {
  display: none;
}

body.pc-mode .aim-joystick-zone.disabled,
body.pc-mode .move-joystick-zone.disabled {
  opacity: 0.55;
}

.joystick-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  pointer-events: none;
  will-change: transform;
}

.aim-joystick-pad,
.move-joystick-pad {
  position: relative;
  width: 136px;
  height: 136px;
  border-radius: 50%;
  pointer-events: auto;
  touch-action: none;
  background: radial-gradient(circle, rgba(10, 20, 42, 0.86) 0%, rgba(5, 10, 24, 0.95) 100%);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.aim-joystick-pad {
  border: 1.5px solid rgba(0, 229, 255, 0.38);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55), inset 0 0 18px rgba(0, 229, 255, 0.12);
}

.move-joystick-pad {
  border: 1.5px solid rgba(255, 183, 3, 0.42);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55), inset 0 0 18px rgba(255, 183, 3, 0.12);
}

.aim-joystick-pad.active {
  border-color: var(--cyan);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.65), 0 0 22px rgba(0, 229, 255, 0.35), inset 0 0 22px rgba(0, 229, 255, 0.22);
}

.move-joystick-pad.active {
  border-color: var(--gold);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.65), 0 0 22px rgba(255, 183, 3, 0.38), inset 0 0 22px rgba(255, 183, 3, 0.22);
}

.aim-joystick-ring-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.aim-joystick-knob,
.move-joystick-knob {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  will-change: transform;
  transition: transform 0.14s cubic-bezier(0.22, 1, 0.36, 1);
}

.aim-joystick-pad.active .aim-joystick-knob,
.move-joystick-pad.active .move-joystick-knob {
  transition: none;
}

.joystick-telemetry {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(8, 14, 30, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.25);
  font-family: 'Orbitron', sans-serif;
  font-size: 0.66rem;
  font-weight: 700;
  white-space: nowrap;
}

.fuel-mini-label {
  font-size: 0.56rem;
  color: var(--gold);
  letter-spacing: 0.05em;
}

@media (max-width: 860px) {
  .hud-bottom {
    justify-content: center;
    padding: 0.34rem
             max(0.5rem, env(safe-area-inset-right))
             max(0.34rem, env(safe-area-inset-bottom))
             max(0.5rem, env(safe-area-inset-left));
    gap: 0.42rem;
  }
  .joystick-telemetry {
    padding: 4px 8px;
    font-size: 0.6rem;
    gap: 4px;
  }
  .fuel-track {
    width: 40px;
  }
  .op-label {
    display: none;
  }
  .menu-actions.three-col {
    grid-template-columns: 1fr 1fr;
  }
  .menu-actions.three-col .guide-btn {
    grid-column: 1 / -1;
  }
  .guide-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Compact Fullscreen Mobile Landscape Tuning (All Menus & Modals Fit 100%) */
@media (max-height: 520px) {
  .screen-overlay {
    padding: max(0.35rem, env(safe-area-inset-top))
             max(0.75rem, env(safe-area-inset-right))
             max(0.35rem, env(safe-area-inset-bottom))
             max(0.75rem, env(safe-area-inset-left));
  }

  .menu-card {
    padding: 0.72rem 1.05rem;
    border-radius: 15px;
  }

  .menu-card.title-command-card {
    padding: 0.62rem 0.95rem 0.56rem;
  }

  .menu-card.wide {
    padding: 0.62rem 0.92rem;
    max-height: calc(100dvh - 12px);
  }

  .top-utility-row {
    margin-bottom: 0.38rem;
    padding-bottom: 0.34rem;
  }

  .pill-btn,
  .title-coins-chip {
    padding: 0.22rem 0.56rem;
    font-size: 0.66rem;
  }

  .title-command-grid {
    grid-template-columns: minmax(0, 0.91fr) minmax(0, 1.15fr);
    column-gap: 0.68rem;
    row-gap: 0.38rem;
  }

  .title-modes-stack {
    gap: 0.36rem;
  }

  .brand-header {
    gap: 0.62rem;
    margin-bottom: 0.32rem;
  }

  .brand-header.title-brand-left {
    margin-bottom: 0;
  }

  .title-edition-kicker {
    font-size: 0.48rem;
    margin-bottom: 0.04rem;
  }

  .emblem-wrap {
    width: 44px;
    height: 44px;
    border-radius: 11px;
  }

  .emblem-wrap svg {
    width: 34px;
    height: 34px;
  }

  .game-title {
    font-size: clamp(1.32rem, 3.3vw, 1.72rem);
  }

  .modal-heading {
    font-size: clamp(1.2rem, 3.2vw, 1.55rem);
    margin-bottom: 0.2rem;
  }

  .modal-sub {
    margin-bottom: 0.55rem !important;
  }

  .game-subtitle {
    font-size: 0.58rem;
    margin-top: 0.04rem;
  }

  .title-showcase-card {
    padding: 0.38rem 0.52rem;
    gap: 0.24rem;
    border-radius: 11px;
  }

  .showcase-kicker {
    font-size: 0.52rem;
    letter-spacing: 0.05em;
  }

  .showcase-fleet-pill {
    font-size: 0.52rem;
    padding: 0.1rem 0.4rem;
  }

  .title-preview-wrap {
    height: 74px;
  }

  .showcase-card-bottom strong {
    font-size: 0.72rem;
  }

  .showcase-card-bottom span {
    font-size: 0.54rem;
  }

  .game-lead {
    font-size: 0.75rem;
    line-height: 1.34;
    margin-bottom: 0.52rem;
  }

  .game-lead.title-lead {
    font-size: 0.7rem;
    line-height: 1.3;
    margin-bottom: 0;
  }

  .btn-cta {
    padding: 0.52rem 0.68rem;
    font-size: 0.7rem;
    border-radius: 10px;
  }

  .btn-cta.mode-card-btn {
    height: 100%;
    min-height: 58px;
    padding: 0.56rem 0.74rem;
    gap: 0.18rem;
    border-radius: 11px;
  }

  .mode-card-head {
    font-size: 0.8rem;
  }

  .mode-sub-tag {
    font-size: 0.54rem;
  }

  .title-secondary-modes {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 0.96fr);
    gap: 0.42rem;
  }

  .title-secondary-modes .btn-cta {
    height: 100%;
    min-height: 46px;
    padding: 0.68rem 0.44rem;
    gap: 0.3rem;
    font-size: clamp(0.62rem, 1.08vw, 0.74rem);
    font-weight: 800;
    letter-spacing: 0.025em;
    border-radius: 11px;
    grid-column: auto;
  }

  .title-secondary-modes .btn-cta svg {
    width: 16px;
    height: 16px;
  }

  .menu-actions.three-col {
    grid-template-columns: 1.15fr 1.15fr 0.92fr;
    gap: 0.5rem;
  }

  .menu-actions.three-col .guide-btn {
    grid-column: auto;
  }

  .guide-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.38rem;
    margin-bottom: 0.5rem;
  }

  .guide-tab {
    padding: 0.36rem 0.45rem;
    font-size: 0.64rem;
    border-radius: 9px;
  }

  .guide-grid {
    gap: 0.48rem;
  }

  .guide-card {
    padding: 0.52rem 0.68rem;
    gap: 0.58rem;
    border-radius: 11px;
  }

  .guide-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
  }

  .guide-icon svg {
    width: 18px;
    height: 18px;
  }

  .guide-card-head {
    margin-bottom: 0.16rem;
  }

  .guide-card-head h3 {
    font-size: 0.73rem;
  }

  .guide-badge {
    font-size: 0.54rem;
    padding: 0.1rem 0.38rem;
  }

  .guide-text p {
    font-size: 0.69rem;
    line-height: 1.32;
  }

  .guide-kicker {
    font-size: 0.6rem;
    padding: 0.18rem 0.5rem;
  }

  .controls-cheatsheet {
    margin-top: 0.55rem;
    padding-top: 0.45rem;
    font-size: 0.67rem;
    gap: 0.35rem 0.8rem;
  }

  .screen-header {
    margin-bottom: 0.48rem;
  }

  .screen-header h2 {
    font-size: 1rem;
  }

  .star-summary {
    padding: 0.22rem 0.62rem;
    font-size: 0.7rem;
  }

  .campaign-modal {
    height: calc(100vh - 12px);
    height: calc(100dvh - 12px);
  }

  .campaign-sector-tabs {
    gap: 0.32rem;
    margin-bottom: 0.38rem;
  }

  .sector-tab-btn {
    padding: 0.22rem 0.2rem;
    border-radius: 8px;
    gap: 0.04rem;
  }

  .sector-tab-btn strong {
    font-size: 0.55rem;
  }

  .sector-tab-btn span {
    font-size: 0.48rem;
  }

  .campaign-grid {
    --camp-gap: 0.48rem;
    --op-row-min: 106px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: minmax(var(--op-row-min), calc((100% - var(--camp-gap)) / 2));
  }

  .op-banner {
    padding: 0.28rem 0.52rem;
  }

  .op-code {
    font-size: 0.6rem;
    padding: 0.1rem 0.36rem;
  }

  .op-pill {
    font-size: 0.48rem;
    padding: 0.08rem 0.3rem;
  }

  .op-stars svg {
    width: 13px;
    height: 13px;
  }

  .op-body {
    padding: 0.38rem 0.55rem 0.42rem;
    gap: 0.22rem;
  }

  .op-title {
    font-size: 0.78rem;
  }

  .op-sub {
    font-size: 0.62rem;
  }

  .op-desc {
    display: none;
  }

  .op-footer {
    padding-top: 0.24rem;
    gap: 0.35rem;
  }

  .op-intel {
    font-size: 0.59rem;
  }

  .btn-deploy {
    padding: 0.26rem 0.54rem;
    font-size: 0.58rem;
    border-radius: 7px;
  }

  .skirmish-grid {
    gap: 0.45rem;
    margin: 0.32rem 0 0.52rem;
  }

  .skirmish-field {
    margin: 0;
  }

  .skirmish-field label {
    font-size: 0.66rem;
    margin-bottom: 0.16rem;
  }

  .skirmish-select {
    padding: 0.38rem 0.62rem;
    font-size: 0.72rem;
  }

  .lan-commander-bar {
    padding: 0.34rem 0.58rem;
    margin-bottom: 0.44rem;
    gap: 0.48rem;
  }

  .hangar-layout {
    grid-template-columns: 1.02fr 1fr;
    gap: 0.55rem;
  }

  .hangar-showcase {
    padding: 0.48rem 0.58rem;
    gap: 0.4rem;
  }

  .hangar-canvas-wrap {
    height: 122px;
  }

  .hangar-testfire-btn {
    padding: 0.14rem 0.42rem;
    font-size: 0.5rem;
  }

  .hangar-spec-head h3 {
    font-size: 0.86rem;
  }

  .hangar-perk-box {
    padding: 0.36rem 0.5rem;
  }

  .hangar-perk-box strong {
    font-size: 0.7rem;
  }

  .hangar-perk-box p {
    font-size: 0.65rem;
    line-height: 1.26;
  }

  .hangar-roster-col {
    gap: 0.32rem;
  }

  .hangar-roster-head {
    font-size: 0.52rem;
  }

  .hangar-fleet-count {
    font-size: 0.5rem;
    padding: 0.06rem 0.36rem;
  }

  .hangar-roster-list {
    gap: 0.25rem;
  }

  .hangar-card {
    padding: 0.3rem 0.5rem;
  }

  .hangar-card-icon {
    width: 38px;
    height: 23px;
  }

  .hangar-card-name {
    font-size: 0.69rem;
  }

  .hangar-card-sub {
    font-size: 0.6rem;
  }

  .hangar-stats-panel {
    padding: 0.3rem 0.46rem;
    grid-template-columns: minmax(0, max-content) minmax(36px, 1fr) minmax(0, max-content) minmax(60px, max-content);
    column-gap: 0.32rem;
    row-gap: 0.18rem;
  }

  .h-stat-name {
    font-size: 0.5rem;
    gap: 0.22rem;
  }

  .h-stat-val {
    font-size: 0.51rem;
  }

  .h-stat-upg-btn {
    height: 19px;
    font-size: 0.49rem;
    padding: 0 0.28rem;
  }

  .hangar-earn-strip {
    padding: 0.24rem 0.45rem;
    font-size: 0.56rem;
    gap: 0.24rem;
  }

  .hangar-header-right #hangarEquippedPill {
    display: none;
  }

  .result-coin-banner {
    margin: 0.15rem auto 0.38rem;
    padding: 0.32rem 0.65rem;
  }

  .result-coin-main {
    font-size: 0.74rem;
  }

  .result-coin-breakdown {
    font-size: 0.62rem;
  }

  .result-stars {
    margin: 0.4rem 0 0.55rem;
  }

  .result-stars svg {
    width: 26px;
    height: 26px;
  }

  .hud-top {
    gap: 0.42rem;
    padding: max(0.32rem, env(safe-area-inset-top))
             max(0.72rem, env(safe-area-inset-right))
             0.14rem
             max(0.72rem, env(safe-area-inset-left));
  }

  .hud-wind-under {
    padding: 0.04rem 0.72rem 0;
  }

  .hud-wind-under .wind-chip {
    padding: 0.2rem 0.58rem;
    gap: 0.34rem;
    font-size: 0.68rem;
  }

  .hud-chip {
    padding: 0.3rem 0.64rem;
    gap: 0.4rem;
    font-size: 0.74rem;
  }

  .op-label {
    font-size: 0.71rem;
    max-width: clamp(110px, 26vw, 260px);
  }

  .turn-badge {
    font-size: 0.68rem;
    padding: 0.25rem 0.62rem;
  }

  .ai-aider-btn {
    height: 34px;
    padding: 0 0.6rem;
    font-size: 0.65rem;
    gap: 0.32rem;
  }

  .hud-zoom-btn {
    height: 34px;
    padding: 0 0.5rem;
    font-size: 0.64rem;
    gap: 0.24rem;
  }

  .hud-icon-btn {
    width: 34px;
    height: 34px;
  }

  .hud-bottom {
    padding: 0.28rem
             max(0.55rem, env(safe-area-inset-right))
             max(0.28rem, env(safe-area-inset-bottom))
             max(0.55rem, env(safe-area-inset-left));
    gap: 0.5rem;
  }

  .aim-joystick-zone,
  .move-joystick-zone {
    top: auto;
    bottom: calc(50px + env(safe-area-inset-bottom));
    height: clamp(152px, 45dvh, 195px);
    width: clamp(148px, 21vw, 218px);
    padding-bottom: 4px;
  }

  .aim-joystick-pad,
  .move-joystick-pad {
    width: 124px;
    height: 124px;
  }

  .aim-joystick-knob,
  .move-joystick-knob {
    width: 48px;
    height: 48px;
  }
}

@media (max-height: 370px) {
  .aim-joystick-pad,
  .move-joystick-pad {
    width: 112px;
    height: 112px;
  }

  .aim-joystick-knob,
  .move-joystick-knob {
    width: 44px;
    height: 44px;
  }
}

/* ==========================================================================
   v3.8.4 Commercial Command Store, Armory Depot, Trial UX & Test Modals
   ========================================================================== */

.title-showcase-card.trial-armed {
  border-color: rgba(255, 209, 102, 0.78);
  background: radial-gradient(95% 85% at 50% 22%, rgba(255, 183, 3, 0.18), rgba(8, 12, 24, 0.95));
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.55),
    0 0 22px rgba(245, 158, 11, 0.24),
    inset 0 1px 0 rgba(255, 240, 180, 0.18);
}

.title-showcase-card.trial-armed .showcase-kicker {
  color: #ffd166;
}

.title-showcase-card.trial-armed .showcase-kicker .chip-dot {
  background: #ffd166;
  box-shadow: 0 0 9px #ffb703;
}

.title-showcase-card.trial-armed .showcase-card-bottom span {
  color: #ffd166;
}

.hangar-alt-unlock-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.34rem;
  flex-wrap: wrap;
}

.hangar-cash-btn {
  padding: 0.34rem 0.68rem;
  font-size: 0.64rem;
  min-height: 28px;
  white-space: nowrap;
}

.campaign-trial-banner {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.38rem 0.72rem;
  margin-bottom: 0.45rem;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(15, 23, 42, 0.92));
  border: 1px solid rgba(255, 209, 102, 0.62);
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.14);
}

.campaign-trial-banner.paused {
  background: rgba(15, 23, 42, 0.86);
  border-color: rgba(148, 163, 184, 0.35);
  box-shadow: none;
}

.campaign-trial-left {
  display: flex;
  align-items: center;
  gap: 0.58rem;
  min-width: 0;
  flex: 1;
}

.campaign-trial-icon {
  width: 44px;
  height: 28px;
  border-radius: 7px;
  background: rgba(5, 10, 22, 0.84);
  border: 1px solid rgba(255, 209, 102, 0.42);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.campaign-trial-copy {
  min-width: 0;
  text-align: left;
}

.campaign-trial-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  color: #ffd166;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.campaign-trial-banner.paused .campaign-trial-title {
  color: #cbd5e1;
}

.campaign-trial-sub {
  font-size: 0.66rem;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trial-toggle-btn {
  flex-shrink: 0;
  white-space: nowrap;
  border-color: rgba(255, 209, 102, 0.55);
  color: #ffd166;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.6rem;
  font-weight: 800;
}

.op-pill.trial {
  background: rgba(245, 158, 11, 0.26);
  border: 1px solid rgba(255, 209, 102, 0.78);
  color: #ffd166;
}

.op-card.trial-op.unlocked {
  border-color: rgba(255, 209, 102, 0.52);
}

.btn-deploy.trial-deploy {
  background: linear-gradient(135deg, #ffd166, #f59e0b);
  color: #090d16;
  border: none;
  box-shadow: 0 3px 12px rgba(245, 158, 11, 0.28);
}

.result-stars {
  flex-wrap: wrap;
  align-items: center;
}

#resultTitle {
  background: none;
  -webkit-text-fill-color: currentColor;
}

#resultModal .menu-card {
  max-height: calc(100vh - 16px);
  max-height: calc(100dvh - 16px);
  overflow-y: auto;
}

.trial-stars-caption {
  flex-basis: 100%;
  width: 100%;
  text-align: center;
  margin-top: 0.2rem;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #ffd166;
}

.result-trial-unlock-row .btn-cta {
  padding: 0.52rem 0.88rem;
  font-size: 0.7rem;
}

.store-pill-btn {
  border-color: rgba(0, 229, 255, 0.45);
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.14), rgba(16, 185, 129, 0.14));
  color: #7dd3fc;
  font-weight: 700;
}

.store-pill-btn.ad-free {
  border-color: rgba(0, 255, 135, 0.55);
  background: rgba(0, 255, 135, 0.13);
  color: var(--green);
}

.store-wallet-btn {
  gap: 0.35rem;
}

.wallet-plus-tag {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.58rem;
  font-weight: 800;
  padding: 0.12rem 0.36rem;
  border-radius: 999px;
  background: rgba(0, 229, 255, 0.18);
  border: 1px solid rgba(0, 229, 255, 0.45);
  color: var(--cyan);
}

.hangar-cta-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.32rem;
}

.btn-cta.rewarded-btn {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #090d16;
  border: 1px solid rgba(254, 240, 138, 0.72);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.32);
}

.btn-cta.rewarded-btn:hover:not(:disabled) {
  filter: brightness(1.07);
  transform: translateY(-1px);
}

.hangar-rent-btn {
  padding: 0.34rem 0.68rem;
  font-size: 0.64rem;
  min-height: 28px;
}

.hangar-subtabs-head {
  align-items: center;
  gap: 0.45rem;
}

.hangar-subtabs {
  display: inline-flex;
  background: rgba(6, 11, 24, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  padding: 2px;
  gap: 3px;
}

.hangar-subtab {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.28rem 0.62rem;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: 'Orbitron', sans-serif;
  font-size: 0.63rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.16s ease;
}

.hangar-subtab.active {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.22), rgba(56, 189, 248, 0.12));
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(0, 229, 255, 0.48);
}

.armory-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 16px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--amber);
  color: #090d16;
  font-size: 0.58rem;
  font-weight: 900;
  white-space: nowrap;
}

.hangar-pane-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
  flex: 1;
  min-height: 0;
}

.armory-note-banner {
  padding: 0.28rem 0.55rem;
  border-radius: 7px;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.24);
  font-size: 0.64rem;
  color: #cbd5e1;
  line-height: 1.24;
}

.armory-supply-list {
  display: flex;
  flex-direction: column;
  gap: 0.34rem;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  max-height: 292px;
  padding-right: 2px;
}

.armory-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.38rem 0.56rem;
  border-radius: 9px;
  background: rgba(9, 15, 31, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.armory-item-row.stocked {
  border-color: rgba(0, 255, 135, 0.38);
}

.armory-item-left {
  display: flex;
  align-items: center;
  gap: 0.48rem;
  min-width: 0;
  flex: 1;
}

.armory-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.24);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.armory-item-meta {
  min-width: 0;
  flex: 1;
}

.armory-item-top {
  display: flex;
  align-items: center;
  gap: 0.32rem;
  flex-wrap: wrap;
}

.armory-item-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  color: #f8fafc;
}

.armory-stock-pill {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.55rem;
  font-weight: 800;
  padding: 0.08rem 0.36rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  color: #cbd5e1;
  white-space: nowrap;
}

.armory-stock-pill.owned {
  background: rgba(0, 255, 135, 0.16);
  border: 1px solid rgba(0, 255, 135, 0.42);
  color: var(--green);
}

.armory-usage-pill {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #94a3b8;
}

.armory-item-desc {
  font-size: 0.62rem;
  color: var(--text-muted);
  line-height: 1.22;
  margin-top: 1px;
}

.armory-item-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
}

.armory-buy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.26rem;
  padding: 0.32rem 0.58rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 209, 102, 0.52);
  background: linear-gradient(135deg, rgba(255, 183, 3, 0.22), rgba(245, 158, 11, 0.12));
  color: #ffd166;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.62rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.armory-buy-btn:hover:not(:disabled) {
  background: rgba(255, 183, 3, 0.32);
}

.armory-buy-btn:disabled {
  border-color: rgba(0, 255, 135, 0.55);
  background: rgba(0, 255, 135, 0.14);
  color: var(--green);
  cursor: default;
}

.armory-arm-toggle {
  padding: 0.14rem 0.42rem;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.8);
  color: #94a3b8;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.54rem;
  font-weight: 700;
  cursor: pointer;
}

.armory-arm-toggle.armed {
  border-color: rgba(0, 229, 255, 0.5);
  color: var(--cyan);
  background: rgba(0, 229, 255, 0.12);
}

/* Command Store Screen */
.store-modal {
  display: flex;
  flex-direction: column;
  max-height: min(92dvh, 660px);
}

.store-sandbox-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding: 0.42rem 0.72rem;
  margin-bottom: 0.55rem;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.11);
  border: 1px solid rgba(251, 191, 36, 0.38);
}

.sandbox-bar-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.7rem;
  color: #fde68a;
}

.sandbox-pill {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.58rem;
  font-weight: 800;
  padding: 0.16rem 0.46rem;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.22);
  border: 1px solid rgba(251, 191, 36, 0.55);
  color: #fef08a;
}

.sandbox-bar-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.sandbox-action-btn {
  font-size: 0.64rem;
  padding: 0.24rem 0.55rem;
}

.sandbox-action-btn.warn {
  border-color: rgba(251, 113, 133, 0.45);
  color: #fda4af;
}

.store-scroll-body {
  overflow-y: auto;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.store-section-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  color: #94a3b8;
  margin-top: 0.15rem;
}

.store-bundles-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.58rem;
}

.store-coins-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.58rem;
}

.store-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.68rem 0.72rem;
  border-radius: 12px;
  background: linear-gradient(165deg, rgba(13, 22, 44, 0.94), rgba(7, 12, 26, 0.94));
  border: 1px solid rgba(148, 163, 184, 0.22);
  gap: 0.42rem;
}

.store-card.accent-amber {
  border-color: rgba(251, 191, 36, 0.48);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.12);
}

.store-card.accent-emerald {
  border-color: rgba(0, 255, 135, 0.45);
  box-shadow: 0 0 20px rgba(0, 255, 135, 0.12);
}

.store-card.accent-cyan {
  border-color: rgba(0, 229, 255, 0.4);
}

.store-card.owned {
  border-color: rgba(0, 255, 135, 0.52);
  background: linear-gradient(165deg, rgba(6, 36, 32, 0.78), rgba(7, 15, 28, 0.92));
}

.store-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.store-badge {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.56rem;
  font-weight: 800;
  padding: 0.14rem 0.44rem;
  border-radius: 999px;
  background: rgba(0, 229, 255, 0.15);
  color: var(--cyan);
}

.store-card.accent-amber .store-badge,
.store-card.accent-gold .store-badge {
  background: rgba(255, 183, 3, 0.18);
  color: #ffd166;
}

.store-card.accent-emerald .store-badge,
.store-card.owned .store-badge {
  background: rgba(0, 255, 135, 0.18);
  color: var(--green);
}

.store-card-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  color: #ffffff;
}

.store-card-sub {
  font-size: 0.69rem;
  font-weight: 700;
  color: #ffd166;
}

.store-card-desc {
  font-size: 0.67rem;
  color: var(--text-muted);
  line-height: 1.32;
  flex: 1;
}

.store-price-btn {
  width: 100%;
  padding: 0.44rem 0.55rem;
  border-radius: 8px;
  border: none;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--cyan), #0284c7);
  color: #030917;
  cursor: pointer;
}

.store-card.accent-amber .store-price-btn,
.store-card.accent-gold .store-price-btn {
  background: linear-gradient(135deg, #ffd166, #f59e0b);
}

.store-card.accent-emerald .store-price-btn {
  background: linear-gradient(135deg, #00ff87, #10b981);
}

.store-price-btn:disabled {
  background: rgba(0, 255, 135, 0.18);
  border: 1px solid rgba(0, 255, 135, 0.42);
  color: var(--green);
  cursor: default;
}

/* Result Modal Rewarded Video Row */
.result-rewarded-row {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

/* Sandbox Checkout & AdMob Test Video Modals */
.sandbox-checkout-card,
.test-ad-card {
  max-width: 470px;
  text-align: left;
}

.sandbox-sheet-top,
.test-ad-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.sandbox-sku-code {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.58rem;
  color: #94a3b8;
}

.sandbox-item-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.25rem;
}

.sandbox-item-desc {
  font-size: 0.76rem;
  color: #cbd5e1;
  line-height: 1.38;
  margin-bottom: 0.65rem;
}

.sandbox-payment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.58rem 0.75rem;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(0, 255, 135, 0.35);
  margin-bottom: 0.75rem;
}

.sandbox-card-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--green);
}

.sandbox-card-note {
  font-size: 0.66rem;
  color: #94a3b8;
}

.sandbox-price-val {
  font-family: 'Orbitron', sans-serif;
  font-size: 1rem;
  color: #ffd166;
}

.test-ad-badge {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 0.16rem 0.48rem;
  border-radius: 999px;
  background: rgba(0, 229, 255, 0.18);
  border: 1px solid rgba(0, 229, 255, 0.5);
  color: var(--cyan);
}

.test-ad-stage {
  text-align: center;
  padding: 0.55rem 0.4rem 0.65rem;
  border-radius: 10px;
  background: rgba(6, 11, 24, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.2);
  margin-bottom: 0.7rem;
}

.test-ad-graphic {
  display: flex;
  justify-content: center;
  margin-bottom: 0.35rem;
}

.test-ad-progress-track {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  overflow: hidden;
  margin: 0.45rem 0 0.3rem;
}

.test-ad-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  transition: width 0.2s linear;
}

.test-ad-timer {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.68rem;
  color: #ffd166;
}

@media (max-width: 820px) {
  .store-bundles-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .store-coins-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-height: 520px) {
  .store-card {
    padding: 0.48rem 0.58rem;
    gap: 0.28rem;
  }
  .store-card-title {
    font-size: 0.72rem;
  }
  .store-card-desc {
    font-size: 0.62rem;
  }
  .armory-supply-list {
    max-height: 152px;
    gap: 0.26rem;
  }
  .armory-item-row {
    padding: 0.3rem 0.48rem;
  }
  .armory-note-banner {
    padding: 0.22rem 0.48rem;
    font-size: 0.6rem;
  }
  .result-rewarded-row .btn-cta {
    padding: 0.36rem 0.72rem;
    font-size: 0.66rem;
  }
  .campaign-trial-banner {
    padding: 0.26rem 0.56rem;
    margin-bottom: 0.3rem;
  }
  .campaign-trial-title {
    font-size: 0.62rem;
  }
  .campaign-trial-sub {
    font-size: 0.58rem;
  }
  .hangar-cash-btn,
  .hangar-rent-btn {
    padding: 0.26rem 0.52rem;
    font-size: 0.58rem;
    min-height: 24px;
  }
}

@media (max-width: 720px) {
  .title-secondary-modes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .title-secondary-modes .hangar-btn {
    grid-column: 1 / -1;
  }
}

/* ==========================================================================
   Pre-Mission Armory Loadout, Deploy Banner & In-Battle "+N" Boost Badges
   ========================================================================== */

.loadout-card {
  max-width: 630px;
  width: min(630px, 95vw);
  text-align: left;
  max-height: min(94dvh, 640px);
  display: flex;
  flex-direction: column;
}

.loadout-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}

.loadout-title {
  margin-bottom: 0.05rem;
  letter-spacing: 0.06em;
}

.loadout-sub {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.64rem;
  font-weight: 700;
  color: var(--cyan);
}

.loadout-wallet {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 209, 102, 0.45);
  background: rgba(255, 183, 3, 0.1);
  color: #ffd166;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  flex-shrink: 0;
}

.loadout-lead {
  font-size: 0.72rem;
  color: #cbd5e1;
  line-height: 1.35;
  margin: 0.45rem 0 0.5rem;
}

.loadout-lead strong {
  color: #f8fafc;
}

.loadout-list {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
  overflow-y: auto;
  min-height: 0;
  margin-bottom: 0.6rem;
  padding-right: 2px;
}

.lo-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.6rem;
  border-radius: 10px;
  background: rgba(9, 15, 31, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.2);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.lo-row.on {
  border-color: rgba(0, 255, 135, 0.55);
  background: linear-gradient(135deg, rgba(0, 255, 135, 0.1), rgba(9, 15, 31, 0.9));
}

.lo-meta {
  flex: 1;
  min-width: 0;
}

.lo-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  color: #f8fafc;
  margin-bottom: 0.18rem;
}

.lo-gains {
  display: flex;
  flex-wrap: wrap;
  gap: 0.22rem 0.32rem;
}

.lo-gain {
  font-size: 0.62rem;
  color: #cbd5e1;
  padding: 0.06rem 0.34rem;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.1);
  white-space: nowrap;
}

.lo-gain em {
  font-style: normal;
  color: #94a3b8;
}

.lo-gain b {
  color: var(--green);
  font-weight: 800;
}

.lo-action {
  flex-shrink: 0;
}

.lo-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  min-width: 92px;
  padding: 0.34rem 0.55rem;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.85);
  color: #cbd5e1;
  cursor: pointer;
  font-family: 'Orbitron', sans-serif;
}

.lo-toggle.on {
  border-color: var(--green);
  background: rgba(0, 255, 135, 0.14);
  color: var(--green);
  box-shadow: 0 0 12px rgba(0, 255, 135, 0.18);
}

.lo-toggle:disabled {
  cursor: default;
}

.lo-check {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid currentColor;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lo-toggle-txt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
}

.lo-toggle-txt strong {
  font-size: 0.66rem;
  font-weight: 800;
}

.lo-toggle-txt small {
  font-size: 0.55rem;
  color: #94a3b8;
  font-weight: 700;
}

.lo-buy.cant-afford {
  opacity: 0.5;
}

/* Mission-start banner listing exactly what the packs added */
.armory-deploy-banner {
  position: fixed;
  left: 50%;
  top: max(92px, calc(env(safe-area-inset-top) + 92px));
  transform: translate(-50%, -8px);
  z-index: 60;
  max-width: min(640px, 92vw);
  padding: 0.48rem 0.8rem 0.55rem;
  border-radius: 12px;
  background: rgba(6, 14, 26, 0.94);
  border: 1px solid rgba(0, 255, 135, 0.55);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55), 0 0 18px rgba(0, 255, 135, 0.15);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.armory-deploy-banner.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.adb-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: var(--green);
  font-family: 'Orbitron', sans-serif;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
  text-align: center;
}

.adb-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.3rem;
}

.adb-chip {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  border: 1px solid;
  white-space: nowrap;
}

.adb-chip.amber { color: #ffd166; border-color: rgba(255, 209, 102, 0.55); background: rgba(255, 183, 3, 0.12); }
.adb-chip.cyan { color: var(--cyan); border-color: rgba(0, 229, 255, 0.55); background: rgba(0, 229, 255, 0.1); }
.adb-chip.green { color: var(--green); border-color: rgba(0, 255, 135, 0.55); background: rgba(0, 255, 135, 0.1); }

/* In-battle "+N" badges marking counters boosted by Armory packs */
.w-boost {
  margin-left: 0.22rem;
  padding: 0 0.22rem;
  border-radius: 4px;
  background: rgba(0, 255, 135, 0.18);
  color: var(--green);
  font-weight: 800;
  font-size: 0.56rem;
}

.weapon-btn.boosted {
  border-color: rgba(0, 255, 135, 0.5);
}

.support-boost {
  position: absolute;
  bottom: -6px;
  left: -6px;
  min-width: 16px;
  height: 14px;
  padding: 0 3px;
  border-radius: 999px;
  background: #052e1a;
  border: 1px solid var(--green);
  color: var(--green);
  font-size: 0.54rem;
  font-weight: 800;
  line-height: 12px;
  text-align: center;
  pointer-events: none;
}

@media (max-height: 520px) {
  .loadout-card {
    padding: 0.6rem 0.75rem;
  }
  .loadout-lead {
    font-size: 0.64rem;
    margin: 0.28rem 0 0.35rem;
  }
  .lo-row {
    padding: 0.34rem 0.5rem;
  }
  .lo-row .armory-icon-box {
    width: 30px;
    height: 30px;
  }
  .lo-gain {
    font-size: 0.56rem;
  }
  .armory-deploy-banner {
    top: max(60px, calc(env(safe-area-inset-top) + 60px));
    padding: 0.32rem 0.6rem 0.4rem;
  }
  .adb-chip {
    font-size: 0.54rem;
  }
  .hangar-roster-list {
    max-height: 150px;
  }
}

/* ==========================================================================
   MIM-104 Patriot SAM Battery Card & HUD Controls
   ========================================================================== */

.patriot-system-card {
  flex-shrink: 0;
  padding: 0.42rem 0.56rem;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.12), rgba(9, 15, 31, 0.92));
  border: 1px solid rgba(0, 229, 255, 0.42);
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.12);
}

.patriot-system-card.unlocked {
  border-color: rgba(0, 255, 135, 0.52);
  background: linear-gradient(135deg, rgba(0, 255, 135, 0.11), rgba(9, 15, 31, 0.92));
}

.patriot-system-card.unlocked ~ .armory-supply-list {
  max-height: 268px;
}

.patriot-card-top {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.36rem;
}

.patriot-card-left {
  display: flex;
  align-items: flex-start;
  gap: 0.48rem;
  width: 100%;
  min-width: 0;
}

.patriot-icon-box {
  width: 34px;
  height: 34px;
  margin-top: 1px;
  border-color: rgba(0, 229, 255, 0.48);
  background: rgba(6, 18, 36, 0.94);
}

.patriot-card-meta {
  min-width: 0;
  flex: 1 1 0%;
}

.patriot-card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.34rem;
  flex-wrap: wrap;
}

.patriot-system-card .armory-item-desc {
  font-size: 0.6rem;
  line-height: 1.24;
  margin-top: 2px;
}

.patriot-card-actions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
  width: 100%;
  padding-top: 0.28rem;
  border-top: 1px solid rgba(0, 229, 255, 0.16);
}

.patriot-card-actions > button {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0.24rem 0.44rem;
  font-size: 0.58rem;
  border-radius: 7px;
  white-space: nowrap;
}

.patriot-hud-btn {
  background: #081022;
  border-color: rgba(56, 189, 248, 0.62);
  color: #e0f2fe;
}

.patriot-hud-btn.active {
  border-color: #00ff87;
  background: linear-gradient(135deg, #052e24 0%, #081b2c 100%);
  color: #ecfdf5;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), 0 0 12px rgba(0, 255, 135, 0.26);
}

.patriot-hud-btn.active .ai-aider-icon-wrap {
  color: #00ff87;
}

.patriot-hud-btn.standby {
  border-color: #fbbf24;
  background: linear-gradient(135deg, #2d1b06 0%, #0c1326 100%);
  color: #fef3c7;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.patriot-hud-btn.standby .ai-aider-icon-wrap {
  color: #fbbf24;
}

.patriot-hud-btn.video-offer {
  border-color: #fbbf24;
  background: linear-gradient(135deg, #2f1d06 0%, #0c1428 100%);
  color: #fef08a;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), 0 0 14px rgba(245, 158, 11, 0.26);
}

@media (max-height: 520px) {
  .patriot-system-card {
    padding: 0.32rem 0.48rem;
  }
  .patriot-system-card.unlocked ~ .armory-supply-list {
    max-height: 184px;
  }
  .patriot-card-top {
    gap: 0.26rem;
  }
  .patriot-icon-box {
    width: 28px;
    height: 28px;
  }
  .patriot-system-card .armory-item-name {
    font-size: 0.64rem;
  }
  .patriot-system-card .armory-item-desc {
    font-size: 0.56rem;
    line-height: 1.18;
  }
  .patriot-card-actions {
    padding-top: 0.22rem;
    gap: 0.24rem;
  }
  .patriot-card-actions > button {
    min-height: 23px;
    padding: 0.18rem 0.36rem;
    font-size: 0.54rem;
  }
}

/* ==========================================================================
   v3.8.4 Hangar SUPPORT (6) Tab, Air Wing HUD Strike & Loadout Selector
   ========================================================================== */

.support-tab-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #00ff87;
  box-shadow: 0 0 8px #00ff87;
  flex-shrink: 0;
}

.support-roster-list {
  max-height: 214px;
}

.support-stats-panel {
  row-gap: 0.28rem;
}

.hangar-card-tag.passive-on {
  background: rgba(0, 255, 135, 0.14);
  border-color: rgba(0, 255, 135, 0.54);
  color: #00ff87;
}

.hangar-card-tag.trial-tag {
  background: rgba(245, 158, 11, 0.22);
  border-color: rgba(255, 209, 102, 0.68);
  color: #ffd166;
}

.hangar-rent-coins-btn {
  min-height: 28px;
  padding: 0.3rem 0.56rem;
  font-size: 0.6rem;
}

.strike-wing-dock {
  position: fixed;
  left: 50%;
  bottom: calc(58px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 17;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.36rem;
  max-width: calc(100vw - 2 * clamp(164px, 22vw, 256px) - 8px);
  pointer-events: none;
}

.strike-wing-dock.hidden {
  display: none !important;
}

.strike-wing-pill {
  --sw-accent: #fb923c;
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  height: 32px;
  padding: 0 0.52rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--sw-accent) 62%, rgba(148, 163, 184, 0.35));
  background: linear-gradient(180deg, #0f172a 0%, #060a16 100%);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.strike-wing-pill:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: var(--sw-accent);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.58), 0 0 12px color-mix(in srgb, var(--sw-accent) 42%, transparent);
}

.strike-wing-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--sw-accent);
  line-height: 0;
}

.strike-wing-ico svg {
  width: 20px;
  height: 12px;
  display: block;
}

.strike-wing-call {
  color: #f8fafc;
}

.strike-wing-cnt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: #020617;
  border: 1px solid color-mix(in srgb, var(--sw-accent) 70%, rgba(148, 163, 184, 0.4));
  color: var(--sw-accent);
  font-size: 0.56rem;
  font-weight: 800;
}

.strike-wing-pill.targeting {
  border-color: #00ff87;
  background: linear-gradient(135deg, #053024 0%, #072436 100%);
  color: #ffffff;
  box-shadow: 0 0 16px rgba(0, 255, 135, 0.44);
  animation: pulseGlowStrike 1.05s ease-in-out infinite alternate;
}

.strike-wing-pill.targeting .strike-wing-cnt {
  border-color: #00ff87;
  background: #04221a;
  color: #ecfdf5;
}

.strike-wing-pill.cooldown,
.strike-wing-pill.turn-wait {
  border-color: rgba(148, 163, 184, 0.34);
  background: #090f1f;
  color: #cbd5e1;
  opacity: 1;
}

.strike-wing-pill.cooldown .strike-wing-call,
.strike-wing-pill.turn-wait .strike-wing-call {
  color: #cbd5e1;
}

.strike-wing-pill.cooldown .strike-wing-cnt,
.strike-wing-pill.turn-wait .strike-wing-cnt {
  border-color: rgba(148, 163, 184, 0.42);
  background: #050811;
  color: #cbd5e1;
}

.strike-wing-pill.empty {
  border-color: rgba(100, 116, 139, 0.28);
  background: #070b16;
  color: #64748b;
  opacity: 1;
  cursor: not-allowed;
}

.strike-wing-pill.empty .strike-wing-call {
  color: #64748b;
}

.strike-wing-pill.empty .strike-wing-cnt {
  border-color: rgba(100, 116, 139, 0.3);
  background: #04070f;
  color: #64748b;
}

body.pc-mode .strike-wing-dock {
  max-width: 92vw;
}

/* Top-Bar Air Support Indicators & Video Resupply Pills (Next to Patriot) */
.strike-topbar-dock {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.32rem;
  flex-shrink: 1;
  min-width: 0;
  pointer-events: auto;
}

.strike-topbar-dock.hidden {
  display: none !important;
}

.strike-top-btn {
  --sw-accent: #fb923c;
  padding: 0.32rem 0.58rem;
  font-size: 0.66rem;
  gap: 0.3rem;
}

.strike-top-btn.active:not(.video-topup):not(.danger-alert) {
  border-color: color-mix(in srgb, var(--sw-accent) 78%, #00ff87);
  background: linear-gradient(135deg, color-mix(in srgb, var(--sw-accent) 20%, #052e24) 0%, #081b2c 100%);
  color: #f8fafc;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.48), 0 0 10px color-mix(in srgb, var(--sw-accent) 24%, transparent);
}

.strike-top-btn:hover:not(:disabled) {
  border-color: var(--sw-accent);
}

.strike-top-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--sw-accent);
  line-height: 0;
}

.strike-top-ico svg {
  width: 17px;
  height: 12px;
  display: block;
}

.strike-top-btn.video-topup .strike-top-ico,
.strike-top-btn.danger-alert .strike-top-ico {
  color: currentColor;
}

.strike-top-btn.empty {
  border-color: rgba(100, 116, 139, 0.28);
  background: #070b16;
  color: #64748b;
  opacity: 0.85;
  cursor: not-allowed;
}

@media (max-width: 820px) {
  .hud-top > .dock-group {
    gap: 0.28rem;
  }
  .strike-topbar-dock {
    gap: 0.24rem;
  }
  .hud-top-dock .ai-aider-btn {
    padding: 0.26rem 0.46rem;
    font-size: 0.58rem;
    gap: 0.24rem;
  }
  .strike-top-ico svg {
    width: 14px;
    height: 10px;
  }
}

@keyframes pulseGlowStrike {
  from { box-shadow: 0 0 10px rgba(0, 255, 135, 0.28); }
  to { box-shadow: 0 0 20px rgba(0, 229, 255, 0.56); }
}

.loadout-support-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  padding: 0.36rem 0.58rem;
  margin-bottom: 0.42rem;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.1), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(56, 189, 248, 0.36);
}

.lo-support-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #94a3b8;
  white-space: nowrap;
}

.lo-wing-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.28rem;
}

.lo-wing-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.26rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: rgba(9, 15, 31, 0.88);
  color: #cbd5e1;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.56rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.lo-wing-pill.active {
  border-color: var(--green);
  background: rgba(0, 255, 135, 0.16);
  color: var(--green);
  box-shadow: 0 0 10px rgba(0, 255, 135, 0.18);
}

.lo-wing-pill.passive {
  cursor: default;
  border-color: rgba(0, 229, 255, 0.36);
  background: rgba(0, 229, 255, 0.1);
  color: #7dd3fc;
}

@media (max-height: 520px) {
  .hangar-subtab {
    padding: 0.22rem 0.48rem;
    font-size: 0.56rem;
  }
  .support-roster-list {
    max-height: 168px;
  }
  .support-stats-panel {
    row-gap: 0.22rem;
  }
  .armory-supply-list {
    max-height: 205px;
  }
  .loadout-support-bar {
    padding: 0.26rem 0.46rem;
    margin-bottom: 0.3rem;
  }
  .lo-wing-pill {
    padding: 0.16rem 0.4rem;
    font-size: 0.52rem;
  }
  .strike-wing-dock {
    bottom: calc(50px + env(safe-area-inset-bottom));
    gap: 0.26rem;
    max-width: calc(100vw - 2 * clamp(148px, 21vw, 218px) - 6px);
  }
  .strike-wing-pill {
    height: 27px;
    padding: 0 0.38rem;
    gap: 0.22rem;
    font-size: 0.54rem;
  }
  .strike-wing-ico svg {
    width: 16px;
    height: 10px;
  }
  .strike-wing-cnt {
    min-width: 14px;
    height: 14px;
    padding: 0 3px;
    font-size: 0.5rem;
  }
}

/* ==========================================================================
   Armory Pack Potency Upgrades (LV.0-LV.5 Segmented Progress Bars)
   ========================================================================== */

.armory-supply-list {
  max-height: 332px;
}

.armory-item-row,
.lo-row {
  flex-direction: column;
  align-items: stretch;
  gap: 0.3rem;
}

.armory-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
}

.lo-row-top {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
}

.armory-item-actions {
  gap: 0.34rem;
  flex-wrap: wrap;
}

.lo-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.34rem;
}

.lo-action {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.34rem;
  flex-wrap: wrap;
}

.armory-lvl-pill {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.54rem;
  font-weight: 800;
  padding: 0.08rem 0.36rem;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #7dd3fc;
  white-space: nowrap;
}

.armory-lvl-pill.upgraded {
  background: rgba(0, 229, 255, 0.2);
  border-color: rgba(0, 229, 255, 0.62);
  color: var(--cyan);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.18);
}

.armory-upg-bar-row {
  display: grid;
  grid-template-columns: 98px minmax(68px, 1fr) auto auto;
  align-items: center;
  gap: 0.38rem;
  padding-top: 0.26rem;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.h-stat-name.armory-bar-name {
  font-size: 0.51rem;
  gap: 0.22rem;
}

.h-stat-track.armory-stat-track {
  height: 8px;
  border-radius: 4px;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0 calc(20% - 1.5px),
      rgba(148, 163, 184, 0.28) calc(20% - 1.5px) 20%
    ),
    rgba(10, 16, 32, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.36);
}

.h-stat-val.armory-bar-val {
  font-size: 0.52rem;
  color: #e2e8f0;
}

.h-stat-upg-btn.armory-bar-btn {
  width: auto;
  height: 22px;
  gap: 0.2rem;
  padding: 0 0.44rem;
  border-radius: 6px;
  font-size: 0.53rem;
  font-weight: 800;
  flex-shrink: 0;
}

.h-stat-upg-btn.armory-bar-btn svg {
  width: 11px;
  height: 11px;
}

.h-stat-upg-btn.armory-bar-btn.can-afford {
  border-color: rgba(0, 229, 255, 0.58);
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.22), rgba(14, 116, 144, 0.18));
  color: var(--cyan);
}

.h-stat-upg-btn.armory-bar-btn.can-afford:hover {
  background: rgba(0, 229, 255, 0.32);
  filter: brightness(1.08);
}

.h-stat-upg-btn.armory-bar-btn.cant-afford {
  opacity: 0.52;
  border-color: rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.86);
  color: #94a3b8;
}

@media (max-height: 520px) {
  .armory-supply-list {
    max-height: 218px;
  }
  .armory-item-row,
  .lo-row {
    gap: 0.22rem;
  }
  .armory-upg-bar-row {
    grid-template-columns: 88px minmax(52px, 1fr) auto auto;
    gap: 0.28rem;
    padding-top: 0.2rem;
  }
  .h-stat-name.armory-bar-name {
    font-size: 0.47rem;
  }
  .h-stat-track.armory-stat-track {
    height: 7px;
  }
  .h-stat-val.armory-bar-val {
    font-size: 0.48rem;
  }
  .h-stat-upg-btn.armory-bar-btn {
    height: 20px;
    padding: 0 0.34rem;
    font-size: 0.48rem;
  }
  .armory-lvl-pill {
    font-size: 0.5rem;
    padding: 0.05rem 0.3rem;
  }
}

@media (max-width: 540px) {
  .armory-upg-bar-row {
    grid-template-columns: 86px 1fr auto;
  }
  .armory-upg-bar-row .armory-bar-btn {
    grid-column: 1 / -1;
    justify-self: end;
  }
}

/* ==========================================================================
   v3.8.4 Premium Edge-to-Edge Full-Screen Command Deck & Tactical HUD Lobby
   ========================================================================== */

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

.screen-overlay.fs-screen {
  padding: 0;
  overflow: hidden;
  background-color: #050a16;
  background-image:
    radial-gradient(95% 58% at 50% 0%, rgba(11, 27, 56, 0.91) 0%, rgba(5, 10, 22, 0.96) 56%, rgba(3, 6, 14, 0.985) 100%),
    url("../backgrounds/title-hero.jpg?v=3.8.4");
  background-size: 100% 100%, cover;
  background-position: center center, center 26%;
  background-repeat: no-repeat;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.screen-overlay.fs-screen > .menu-card {
  width: 100%;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-align: left;
}

.screen-overlay.fs-screen > .menu-card::before {
  display: none;
}

/* 1. Title Lobby — Unblurred Panoramic Cinematic HIMARS & Patriot Battlefield Hero View */
.screen-overlay.fs-screen.fs-hero-screen {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background-color: #060c18;
  background-image:
    radial-gradient(62% 38% at 50% 20%, rgba(7, 13, 24, 0.34) 0%, rgba(7, 13, 24, 0) 100%),
    linear-gradient(
      180deg,
      rgba(4, 9, 18, 0.56) 0%,
      rgba(4, 9, 18, 0.08) 16%,
      rgba(4, 9, 18, 0) 32%,
      rgba(4, 9, 18, 0.06) 66%,
      rgba(5, 10, 18, 0.72) 86%,
      rgba(4, 8, 15, 0.94) 100%
    ),
    url("../backgrounds/title-hero.jpg?v=3.8.4");
  background-size: 100% 100%, 100% 100%, cover;
  background-position: center center, center center, center 24%;
  background-repeat: no-repeat;
}

.fs-hero-screen > .title-command-card {
  position: relative;
  justify-content: space-between;
}

/* Subtle Side Rangefinder Telemetry Scales & Floating Battlefield Embers */
.title-hud-frame-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.hud-edge-scale {
  position: absolute;
  top: 17%;
  bottom: 22%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0.46;
}

.hud-edge-left {
  left: max(0.55rem, env(safe-area-inset-left), env(safe-area-inset-right));
  border-left: 1px solid rgba(148, 197, 224, 0.28);
  padding-left: 3px;
}

.hud-edge-right {
  right: max(0.55rem, env(safe-area-inset-left), env(safe-area-inset-right));
  border-right: 1px solid rgba(148, 197, 224, 0.28);
  padding-right: 3px;
  align-items: flex-end;
}

.edge-tick {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.edge-tick i {
  display: block;
  width: 6px;
  height: 1px;
  background: rgba(148, 197, 224, 0.45);
}

.edge-tick.major i {
  width: 11px;
  height: 1.5px;
  background: rgba(186, 230, 253, 0.72);
}

.edge-tick b {
  font-family: 'Rajdhani', 'Orbitron', sans-serif;
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgba(186, 230, 253, 0.72);
}

.hud-embers-layer .ember {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, #fff7ed 0%, #fb923c 48%, rgba(234, 88, 12, 0) 100%);
  box-shadow: 0 0 8px rgba(251, 146, 60, 0.85);
  opacity: 0.75;
  animation: emberFloat 5.5s ease-in-out infinite;
}

.hud-embers-layer .e1 { width: 5px; height: 5px; left: 11%; bottom: 16%; animation-delay: 0s; }
.hud-embers-layer .e2 { width: 4px; height: 4px; left: 26%; bottom: 8%; animation-delay: -1.4s; }
.hud-embers-layer .e3 { width: 6px; height: 6px; left: 37%; bottom: 19%; animation-delay: -2.7s; }
.hud-embers-layer .e4 { width: 4px; height: 4px; left: 48%; bottom: 6%; animation-delay: -0.8s; }
.hud-embers-layer .e5 { width: 5px; height: 5px; left: 61%; bottom: 11%; animation-delay: -3.2s; }
.hud-embers-layer .e6 { width: 6px; height: 6px; left: 73%; bottom: 24%; animation-delay: -1.9s; }
.hud-embers-layer .e7 { width: 4px; height: 4px; left: 86%; bottom: 9%; animation-delay: -4.1s; }
.hud-embers-layer .e8 { width: 5px; height: 5px; left: 91%; bottom: 21%; animation-delay: -2.2s; }

@keyframes emberFloat {
  0%, 100% { transform: translate(0, 0) scale(0.9); opacity: 0.45; }
  50% { transform: translate(6px, -14px) scale(1.2); opacity: 0.92; }
}

/* Frameless Top-Left & Top-Right Military HUD Plaques */
.fs-hero-screen .top-utility-row {
  position: relative;
  z-index: 3;
  width: 100%;
  margin: 0;
  padding: max(0.72rem, env(safe-area-inset-top))
           max(1.2rem, env(safe-area-inset-left), env(safe-area-inset-right))
           0.2rem
           max(1.2rem, env(safe-area-inset-left), env(safe-area-inset-right));
  background: transparent;
  border-bottom: none;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-shrink: 0;
}

.title-topbar-left {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  min-width: 0;
}

/* Top-Left Commander Profile HUD Plaque */
.title-commander-hud {
  --cmd-cut: 9px;
  --cmd-rim: rgba(125, 211, 252, 0.55);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.58rem;
  padding: 6px 11px 6px 7px;
  background: transparent;
  border: none;
  color: #f8fafc;
  cursor: pointer;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.78));
  transition: transform 0.14s ease, filter 0.16s ease;
}

.title-commander-hud::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--cmd-rim);
  clip-path: polygon(
    0 0,
    calc(100% - var(--cmd-cut)) 0,
    100% var(--cmd-cut),
    100% calc(100% - var(--cmd-cut)),
    calc(100% - var(--cmd-cut)) 100%,
    var(--cmd-cut) 100%,
    0 calc(100% - var(--cmd-cut))
  );
  z-index: 0;
}

.title-commander-hud::after {
  content: "";
  position: absolute;
  inset: 1.5px;
  background: linear-gradient(180deg, rgba(20, 34, 48, 0.95) 0%, rgba(9, 17, 26, 0.97) 100%);
  clip-path: polygon(
    0 0,
    calc(100% - var(--cmd-cut) + 1px) 0,
    100% calc(var(--cmd-cut) - 1px),
    100% calc(100% - var(--cmd-cut) + 1px),
    calc(100% - var(--cmd-cut) + 1px) 100%,
    calc(var(--cmd-cut) - 1px) 100%,
    0 calc(100% - var(--cmd-cut) + 1px)
  );
  z-index: 1;
}

.title-commander-hud > * {
  position: relative;
  z-index: 2;
}

.title-commander-hud:hover {
  --cmd-rim: rgba(125, 211, 252, 0.92);
  transform: translateY(-1px);
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 10px rgba(56, 189, 248, 0.35));
}

.cmd-avatar-box {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(148, 197, 224, 0.48);
  background: #0b1622;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.cmd-avatar-box svg {
  width: 100%;
  height: 100%;
  display: block;
}

.cmd-hud-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 5px;
  min-width: 102px;
}

.cmd-hud-name {
  font-family: 'Rajdhani', 'Orbitron', sans-serif;
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  line-height: 1;
  color: #f1f5f9;
  text-transform: uppercase;
  white-space: nowrap;
}

.cmd-hud-xp-track {
  width: 100%;
  height: 5px;
  background: rgba(30, 41, 59, 0.95);
  border: 1px solid rgba(100, 116, 139, 0.45);
  overflow: hidden;
}

.cmd-hud-xp-fill {
  display: block;
  height: 100%;
  width: 36%;
  background: linear-gradient(90deg, #38bdf8 0%, #67e8f9 100%);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.7);
  transition: width 0.25s ease;
}

.cmd-hud-crest {
  position: relative;
  width: 34px;
  height: 39px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cmd-crest-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.cmd-crest-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  margin-top: -1px;
}

.cmd-crest-copy small {
  font-family: 'Rajdhani', 'Orbitron', sans-serif;
  font-size: 0.48rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fde68a;
}

.cmd-crest-copy strong {
  font-family: 'Teko', 'Rajdhani', 'Orbitron', sans-serif;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 0.92;
  color: #ffffff;
}

/* Top-Right Chamfered Resource & Utility HUD Plaques */
.fs-hero-screen .utility-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.44rem;
}

.hud-tac-box {
  --box-cut: 6px;
  --box-rim: rgba(125, 211, 252, 0.48);
  position: relative;
  height: 38px;
  padding: 0 0.68rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  background: transparent;
  border: none;
  border-radius: 0;
  color: #f1f5f9;
  font-family: 'Rajdhani', 'Orbitron', sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  cursor: pointer;
  filter: drop-shadow(0 5px 14px rgba(0, 0, 0, 0.75));
  transition: transform 0.14s ease, color 0.15s ease;
}

.hud-tac-box::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--box-rim);
  clip-path: polygon(
    var(--box-cut) 0,
    calc(100% - var(--box-cut)) 0,
    100% var(--box-cut),
    100% calc(100% - var(--box-cut)),
    calc(100% - var(--box-cut)) 100%,
    var(--box-cut) 100%,
    0 calc(100% - var(--box-cut)),
    0 var(--box-cut)
  );
  z-index: 0;
}

.hud-tac-box::after {
  content: "";
  position: absolute;
  inset: 1.4px;
  background: linear-gradient(180deg, rgba(20, 33, 47, 0.95) 0%, rgba(9, 16, 25, 0.97) 100%);
  clip-path: polygon(
    calc(var(--box-cut) - 1px) 0,
    calc(100% - var(--box-cut) + 1px) 0,
    100% calc(var(--box-cut) - 1px),
    100% calc(100% - var(--box-cut) + 1px),
    calc(100% - var(--box-cut) + 1px) 100%,
    calc(var(--box-cut) - 1px) 100%,
    0 calc(100% - var(--box-cut) + 1px),
    0 calc(var(--box-cut) - 1px)
  );
  z-index: 1;
}

.hud-tac-box > * {
  position: relative;
  z-index: 2;
}

.hud-tac-box:hover {
  --box-rim: rgba(125, 211, 252, 0.9);
  transform: translateY(-1px);
}

.hud-res-box {
  min-width: 106px;
  justify-content: space-between;
  padding: 0 0.68rem 0 0.5rem;
}

.fs-hero-screen .title-coins-chip.hud-res-box {
  --box-rim: rgba(251, 191, 36, 0.62);
  background: transparent;
  box-shadow: none;
}

.fs-hero-screen .title-coins-chip.hud-res-box:hover {
  --box-rim: rgba(253, 224, 71, 0.95);
}

.hud-res-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hud-res-val {
  font-family: 'Rajdhani', 'Orbitron', sans-serif;
  font-size: 1.04rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  color: #f8fafc;
}

.fs-hero-screen .title-coins-chip .hud-res-val {
  color: #fef08a;
}

.hud-portal-btn {
  padding: 0 0.62rem;
  font-size: 0.74rem;
  color: #cbd5e1;
}

.hud-moregames-btn {
  --box-rim: rgba(56, 189, 248, 0.56);
  padding: 0 0.68rem;
  gap: 0.36rem;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: #e0f2fe;
}

.hud-moregames-btn svg {
  color: #38bdf8;
  flex-shrink: 0;
}

.more-games-card {
  width: min(920px, 95vw);
  max-height: 92vh;
  overflow-y: auto;
  padding: 1.05rem 1.25rem;
  text-align: left;
}

.more-games-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.85rem;
}

.more-games-kicker {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #38bdf8;
  text-transform: uppercase;
}

.more-games-title {
  margin: 0.12rem 0 0;
  font-size: clamp(1.1rem, 2.5vw, 1.45rem);
}

.more-games-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.mg-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.82rem;
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.94), rgba(6, 11, 24, 0.96));
  border: 1px solid rgba(148, 163, 184, 0.24);
}

.mg-card.mg-theme-cyan { border-color: rgba(0, 229, 255, 0.42); }
.mg-card.mg-theme-emerald { border-color: rgba(16, 185, 129, 0.44); }
.mg-card.mg-theme-amber { border-color: rgba(217, 164, 65, 0.44); }

.mg-card-top {
  display: flex;
  align-items: center;
  gap: 0.62rem;
}

.mg-icon-badge {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mg-meta {
  min-width: 0;
}

.mg-genre {
  display: block;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

.mg-meta h4 {
  margin: 0.1rem 0 0;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.88rem;
  color: #f8fafc;
}

.mg-desc {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.42;
  color: #cbd5e1;
  flex: 1;
}

.mg-install-btn {
  width: 100%;
  padding: 0.52rem 0.65rem !important;
  font-size: 0.72rem !important;
  justify-content: center;
}

.more-games-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
}

.more-games-footer .btn-cta {
  padding: 0.55rem 0.95rem;
  font-size: 0.76rem;
}

@media (max-width: 700px) {
  .more-games-grid {
    grid-template-columns: 1fr;
  }
}

.hud-apk-box {
  --box-rim: rgba(52, 211, 153, 0.58);
  padding: 0 0.58rem;
  color: #6ee7b7;
  font-size: 0.76rem;
}

.hud-icon-box {
  width: 38px;
  padding: 0;
  position: relative;
}

.hud-settings-btn {
  --box-rim: rgba(125, 211, 252, 0.58);
  padding: 0 0.78rem;
  gap: 0.38rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: #f1f5f9;
}

.hud-settings-btn .hud-gear-svg {
  width: 15px;
  height: 15px;
  color: #7dd3fc;
  flex-shrink: 0;
}

/* Upper-Center 3D Brushed-Gunmetal & Molten-Gold HIMARS Hero Crest */
.title-top-brand {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 0.05rem 1rem 0;
  pointer-events: none;
  flex-shrink: 0;
}

.fs-hero-screen .brand-header.title-brand-center {
  width: fit-content;
  max-width: calc(100vw - 2rem);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.fs-hero-screen .brand-header.title-brand-center .brand-titles {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.himars-hero-logo-svg {
  width: clamp(320px, 45vw, 576px);
  height: auto;
  display: block;
  filter:
    drop-shadow(0 10px 22px rgba(0, 0, 0, 0.92))
    drop-shadow(0 0 24px rgba(249, 115, 22, 0.42));
}

.fs-hero-screen .brand-header.title-brand-center .game-subtitle {
  display: block;
  margin-top: -0.18rem;
  padding-left: 0.46em;
  font-family: 'Rajdhani', 'Orbitron', sans-serif;
  font-size: clamp(0.76rem, 1.35vw, 1.08rem);
  font-weight: 700;
  letter-spacing: 0.46em;
  color: #e2e8f0;
  text-transform: uppercase;
  text-shadow:
    0 2px 8px rgba(0, 0, 0, 0.98),
    0 0 14px rgba(251, 191, 36, 0.35);
}

.fs-hero-screen .title-showcase-card,
.fs-hero-screen .controls-cheatsheet {
  display: none !important;
}

/* Symmetrical 3-Column Chamfered Double-Rim Tactical Button Cluster */
.title-bottom-dock {
  position: relative;
  z-index: 3;
  width: 100%;
  margin-top: auto;
  padding: 0.35rem
           max(1.4rem, env(safe-area-inset-left), env(safe-area-inset-right))
           max(1.05rem, env(safe-area-inset-bottom))
           max(1.4rem, env(safe-area-inset-left), env(safe-area-inset-right));
  background: linear-gradient(180deg, rgba(3, 7, 15, 0) 0%, rgba(4, 9, 18, 0.55) 38%, rgba(3, 7, 15, 0.9) 100%);
  flex-shrink: 0;
}

.title-tac-cluster {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.24fr) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: end;
}

.tac-col {
  display: flex;
  flex-direction: column;
  gap: 0.72rem;
  min-width: 0;
}

.tac-col-center {
  gap: 0.72rem;
  align-items: center;
}

/* Base Double-Walled Chamfered Military Tactical Button */
.tac-hud-btn {
  --cut: 12px;
  --cut-in: 10px;
  --tac-rim: linear-gradient(180deg, #fde68a 0%, #f59e0b 50%, #d97706 100%);
  --tac-inner-rim: linear-gradient(180deg, rgba(253, 224, 71, 0.78) 0%, rgba(217, 119, 6, 0.58) 100%);
  --tac-glow: rgba(245, 158, 11, 0.38);
  --tac-led: #fbbf24;
  position: relative;
  width: 100%;
  min-height: 58px;
  padding: 0 1.25rem;
  border: none;
  background: transparent;
  color: #f8fafc;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  filter:
    drop-shadow(0 9px 18px rgba(0, 0, 0, 0.85))
    drop-shadow(0 0 12px var(--tac-glow));
  transition: transform 0.14s cubic-bezier(0.22, 1, 0.36, 1), filter 0.16s ease;
}

.tac-hud-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--tac-rim);
  clip-path: polygon(
    var(--cut) 0,
    calc(100% - var(--cut)) 0,
    100% var(--cut),
    100% calc(100% - var(--cut)),
    calc(100% - var(--cut)) 100%,
    var(--cut) 100%,
    0 calc(100% - var(--cut)),
    0 var(--cut)
  );
  z-index: 0;
}

.tac-hud-btn::after {
  content: "";
  position: absolute;
  inset: 2px;
  background: linear-gradient(180deg, #1b2634 0%, #0d141d 55%, #131d29 100%);
  clip-path: polygon(
    calc(var(--cut) - 1px) 0,
    calc(100% - var(--cut) + 1px) 0,
    100% calc(var(--cut) - 1px),
    100% calc(100% - var(--cut) + 1px),
    calc(100% - var(--cut) + 1px) 100%,
    calc(var(--cut) - 1px) 100%,
    0 calc(100% - var(--cut) + 1px),
    0 calc(var(--cut) - 1px)
  );
  z-index: 1;
}

/* Second Inner Chamfered Armor Bevel Ring + Brushed Metal Fill */
.tac-inner-frame {
  position: absolute;
  inset: 5px;
  z-index: 2;
  pointer-events: none;
}

.tac-inner-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--tac-inner-rim);
  clip-path: polygon(
    var(--cut-in) 0,
    calc(100% - var(--cut-in)) 0,
    100% var(--cut-in),
    100% calc(100% - var(--cut-in)),
    calc(100% - var(--cut-in)) 100%,
    var(--cut-in) 100%,
    0 calc(100% - var(--cut-in)),
    0 var(--cut-in)
  );
}

.tac-inner-frame::after {
  content: "";
  position: absolute;
  inset: 1.5px;
  background:
    radial-gradient(80% 90% at 50% 0%, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, #223041 0%, #111923 52%, #182330 100%);
  clip-path: polygon(
    calc(var(--cut-in) - 1px) 0,
    calc(100% - var(--cut-in) + 1px) 0,
    100% calc(var(--cut-in) - 1px),
    100% calc(100% - var(--cut) + 3px),
    calc(100% - var(--cut-in) + 1px) 100%,
    calc(var(--cut-in) - 1px) 100%,
    0 calc(100% - var(--cut-in) + 1px),
    0 calc(var(--cut-in) - 1px)
  );
}

/* Slanted Telemetry LED Ticks Along Upper-Right Shoulder */
.tac-led-bars {
  position: absolute;
  top: -6px;
  right: 18px;
  display: inline-flex;
  gap: 3px;
  z-index: 4;
  pointer-events: none;
}

.tac-led-bars i {
  display: block;
  width: 4px;
  height: 4px;
  background: var(--tac-led);
  box-shadow: 0 0 6px var(--tac-led);
  transform: skewX(-24deg);
}

.tac-led-bars.tac-led-inner {
  top: 10px;
  right: 22px;
}

/* Color Themes Matching Reference Artwork */
.tac-theme-gold {
  --tac-rim: linear-gradient(180deg, #fef08a 0%, #fbbf24 45%, #ea580c 100%);
  --tac-inner-rim: linear-gradient(180deg, rgba(254, 240, 138, 0.8) 0%, rgba(234, 88, 12, 0.62) 100%);
  --tac-glow: rgba(245, 158, 11, 0.42);
  --tac-led: #67e8f9;
}

.tac-theme-cyan {
  --tac-rim: linear-gradient(180deg, #e0f2fe 0%, #38bdf8 48%, #0891b2 100%);
  --tac-inner-rim: linear-gradient(180deg, rgba(186, 230, 253, 0.82) 0%, rgba(14, 165, 233, 0.58) 100%);
  --tac-glow: rgba(56, 189, 248, 0.42);
  --tac-led: #67e8f9;
}

.tac-theme-dual {
  --cut: 15px;
  --cut-in: 12px;
  --tac-rim: linear-gradient(90deg, #fbbf24 0%, #f59e0b 32%, #38bdf8 68%, #67e8f9 100%);
  --tac-inner-rim: linear-gradient(90deg, rgba(253, 224, 71, 0.85) 0%, rgba(245, 158, 11, 0.7) 35%, rgba(56, 189, 248, 0.75) 68%, rgba(165, 243, 252, 0.9) 100%);
  --tac-glow: rgba(56, 189, 248, 0.46);
  --tac-led: #67e8f9;
}

.tac-theme-sub {
  --tac-rim: linear-gradient(90deg, #fbbf24 0%, #38bdf8 100%);
  --tac-inner-rim: linear-gradient(90deg, rgba(251, 191, 36, 0.72) 0%, rgba(56, 189, 248, 0.75) 100%);
  --tac-glow: rgba(56, 189, 248, 0.36);
  --tac-led: #67e8f9;
}

.tac-hero-multi {
  min-height: 76px;
  padding: 0 1.5rem;
  filter:
    drop-shadow(0 12px 24px rgba(0, 0, 0, 0.9))
    drop-shadow(-6px 0 16px rgba(245, 158, 11, 0.36))
    drop-shadow(6px 0 18px rgba(56, 189, 248, 0.44));
}

.tac-skirmish-pill {
  width: calc(100% / 1.24);
  min-height: 58px;
  padding: 0 1.25rem;
}

.tac-hud-btn:hover {
  transform: translateY(-2px) scale(1.012);
  filter:
    drop-shadow(0 12px 22px rgba(0, 0, 0, 0.9))
    drop-shadow(0 0 18px var(--tac-glow));
}

.tac-hero-multi:hover {
  filter:
    drop-shadow(0 14px 26px rgba(0, 0, 0, 0.92))
    drop-shadow(-8px 0 20px rgba(245, 158, 11, 0.5))
    drop-shadow(8px 0 22px rgba(56, 189, 248, 0.58));
}

.tac-hud-btn:active {
  transform: translateY(0) scale(0.99);
}

/* Button Foreground Icon + Condensed Military Label */
.tac-btn-content {
  position: relative;
  z-index: 3;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.72rem;
}

.tac-col-left .tac-btn-content,
.tac-col-right .tac-btn-content,
.tac-skirmish-pill .tac-btn-content {
  justify-content: flex-start;
  padding: 0 0.45rem;
}

.tac-col-left .tac-btn-label,
.tac-col-right .tac-btn-label,
.tac-skirmish-pill .tac-btn-label {
  flex: 1;
  text-align: center;
  padding-right: 0.45rem;
}

.tac-btn-icon {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  color: #f8fafc;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.8));
}

.tac-rifles-icon {
  width: 38px;
  height: 34px;
  color: #fef3c7;
}

.tac-btn-label {
  font-family: 'Teko', 'Rajdhani', 'Orbitron', sans-serif;
  font-size: clamp(1.38rem, 2.05vw, 1.76rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
  padding-top: 2px;
  color: #ffffff;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.92);
}

.tac-skirmish-pill .tac-btn-label {
  font-size: clamp(1.14rem, 1.72vw, 1.44rem);
  letter-spacing: 0.04em;
}

.tac-hero-multi .tac-btn-label {
  font-size: clamp(1.68rem, 2.55vw, 2.24rem);
  letter-spacing: 0.06em;
  color: #ffffff;
  text-shadow:
    0 2px 10px rgba(0, 0, 0, 0.96),
    0 0 18px rgba(103, 232, 249, 0.38);
}

.tac-btn-icon-sm {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: #bae6fd;
}

.tac-btn-label-sm {
  font-family: 'Rajdhani', 'Orbitron', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #e2e8f0;
  text-transform: uppercase;
  white-space: nowrap;
}

.tac-hud-btn .hangar-btn-dot {
  position: absolute;
  top: 9px;
  right: 12px;
  z-index: 4;
}

/* 2. Shared Pinned Edge-to-Edge Header Bar for All 6 Inner Full-Screen Decks */
.fs-screen .screen-header {
  width: 100%;
  margin: 0;
  padding: max(0.58rem, env(safe-area-inset-top))
           max(1.2rem, env(safe-area-inset-right))
           0.56rem
           max(1.2rem, env(safe-area-inset-left));
  background: linear-gradient(180deg, #081124 0%, #060c1b 100%);
  border-bottom: 1px solid rgba(56, 189, 248, 0.24);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  flex-shrink: 0;
}

/* 3. Hangar Full-Screen Bay */
#hangarScreen.fs-screen .hangar-layout {
  flex: 1 1 0%;
  min-height: 0;
  width: 100%;
  max-width: 1720px;
  margin: 0 auto;
  padding: 0.78rem
           max(1.2rem, env(safe-area-inset-right))
           max(0.78rem, env(safe-area-inset-bottom))
           max(1.2rem, env(safe-area-inset-left));
  grid-template-columns: minmax(300px, 0.98fr) minmax(340px, 1.12fr);
  gap: 0.95rem;
  overflow: hidden;
}

#hangarScreen.fs-screen .hangar-showcase {
  height: 100%;
  min-height: 0;
  justify-content: space-between;
  overflow-y: auto;
}

#hangarScreen.fs-screen .hangar-canvas-wrap {
  flex: 1 1 160px;
  min-height: 136px;
  height: auto;
}

#hangarScreen.fs-screen .hangar-roster-col {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

#hangarScreen.fs-screen .hangar-pane-wrap {
  flex: 1 1 0%;
  min-height: 0;
  overflow: hidden;
}

#hangarScreen.fs-screen .hangar-roster-list,
#hangarScreen.fs-screen .support-roster-list,
#hangarScreen.fs-screen .armory-supply-list,
#hangarScreen.fs-screen .patriot-system-card.unlocked ~ .armory-supply-list {
  flex: 1 1 0%;
  min-height: 0;
  max-height: none;
}

#hangarScreen.fs-screen .hangar-stats-panel {
  flex-shrink: 0;
}

/* 4. Command Store Full-Screen Deck */
#storeScreen.fs-screen .store-sandbox-bar {
  width: calc(100% - max(1.2rem, env(safe-area-inset-left)) - max(1.2rem, env(safe-area-inset-right)));
  max-width: calc(1720px - 2.4rem);
  margin: 0.62rem auto 0;
  flex-shrink: 0;
}

#storeScreen.fs-screen .store-scroll-body {
  flex: 1 1 0%;
  min-height: 0;
  width: 100%;
  max-width: 1720px;
  margin: 0 auto;
  padding: 0.68rem
           max(1.2rem, env(safe-area-inset-right))
           max(0.9rem, env(safe-area-inset-bottom))
           max(1.2rem, env(safe-area-inset-left));
  overflow-y: auto;
}

/* 5. Tactical Campaign Full-Screen Map */
#campaignScreen.fs-screen .campaign-trial-banner {
  width: calc(100% - max(1.2rem, env(safe-area-inset-left)) - max(1.2rem, env(safe-area-inset-right)));
  max-width: calc(1720px - 2.4rem);
  margin: 0.55rem auto 0;
}

#campaignScreen.fs-screen .campaign-sector-tabs {
  width: 100%;
  max-width: 1720px;
  margin: 0.62rem auto 0.55rem;
  padding: 0
           max(1.2rem, env(safe-area-inset-right))
           0
           max(1.2rem, env(safe-area-inset-left));
}

#campaignScreen.fs-screen .campaign-grid {
  width: 100%;
  max-width: 1720px;
  margin: 0 auto;
  padding: 2px
           max(1.2rem, env(safe-area-inset-right))
           max(0.78rem, env(safe-area-inset-bottom))
           max(1.2rem, env(safe-area-inset-left));
  flex: 1 1 0%;
  min-height: 0;
}

/* 6. Custom Skirmish Full-Screen Mission Configurator */
#skirmishScreen.fs-screen .game-lead {
  width: 100%;
  max-width: 1520px;
  margin: 0.72rem auto 0 !important;
  padding: 0
           max(1.2rem, env(safe-area-inset-right))
           0
           max(1.2rem, env(safe-area-inset-left));
  text-align: left;
  flex-shrink: 0;
}

#skirmishScreen.fs-screen .skirmish-grid {
  width: 100%;
  max-width: 1520px;
  margin: auto;
  padding: 0.65rem
           max(1.2rem, env(safe-area-inset-right))
           0.65rem
           max(1.2rem, env(safe-area-inset-left));
  align-content: center;
  gap: 0.85rem;
}

#skirmishScreen.fs-screen .skirmish-field {
  background: linear-gradient(170deg, rgba(14, 24, 48, 0.9), rgba(8, 14, 28, 0.94));
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 13px;
  padding: 0.72rem 0.88rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

#skirmishScreen.fs-screen .menu-actions {
  width: 100%;
  max-width: 1520px;
  margin: 0 auto;
  padding: 0.55rem
           max(1.2rem, env(safe-area-inset-right))
           max(0.85rem, env(safe-area-inset-bottom))
           max(1.2rem, env(safe-area-inset-left));
  flex-shrink: 0;
}

/* 7. Play Online / Wi-Fi Multiplayer Full-Screen Command Center */
#lanScreen.fs-screen .lan-commander-bar {
  width: calc(100% - max(1.2rem, env(safe-area-inset-left)) - max(1.2rem, env(safe-area-inset-right)));
  max-width: calc(1600px - 2.4rem);
  margin: 0.45rem auto 0;
  flex-shrink: 0;
}

#lanScreen.fs-screen .lan-panel {
  flex: 1 1 0%;
  min-height: 0;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0.48rem
           max(1.2rem, env(safe-area-inset-right))
           max(0.65rem, env(safe-area-inset-bottom))
           max(1.2rem, env(safe-area-inset-left));
  overflow-y: auto;
}

#lanScreen.fs-screen #lanRolePanel .lan-role-grid {
  flex: 1 1 auto;
  align-items: stretch;
}

#lanScreen.fs-screen #lanHostPanel .menu-actions {
  margin-top: auto;
}

#lanScreen.fs-screen #lanJoinPanel .lan-join-grid {
  flex: 1 0 auto;
  align-items: stretch;
}

#lanScreen.fs-screen #lanJoinPanel .lan-browser-box,
#lanScreen.fs-screen #lanJoinPanel .lan-manual-box {
  height: auto;
  min-height: 0;
}

#lanScreen.fs-screen #lanJoinPanel .lan-server-list {
  max-height: none;
  min-height: 90px;
}

/* 8. How to Play — Tactical Field Manual Full-Screen Deck */
#guideScreen.fs-screen .guide-tabs {
  width: 100%;
  max-width: 1660px;
  margin: 0.68rem auto 0.58rem;
  padding: 0
           max(1.2rem, env(safe-area-inset-right))
           0
           max(1.2rem, env(safe-area-inset-left));
}

#guideScreen.fs-screen .guide-body {
  flex: 1 1 0%;
  min-height: 0;
  width: 100%;
  max-width: 1660px;
  margin: 0 auto;
  padding: 0
           max(1.2rem, env(safe-area-inset-right))
           max(0.85rem, env(safe-area-inset-bottom))
           max(1.2rem, env(safe-area-inset-left));
}

/* Responsive Full-Screen Tuning */
@media (max-width: 860px) {
  .title-theater-badge {
    display: none;
  }
}

@media (max-width: 780px) {
  #hangarScreen.fs-screen .hangar-layout {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
  #hangarScreen.fs-screen .hangar-showcase,
  #hangarScreen.fs-screen .hangar-roster-col,
  #hangarScreen.fs-screen .hangar-pane-wrap {
    height: auto;
    overflow: visible;
  }
  #hangarScreen.fs-screen .hangar-roster-list,
  #hangarScreen.fs-screen .support-roster-list,
  #hangarScreen.fs-screen .armory-supply-list {
    max-height: 260px;
  }
}

@media (max-width: 720px) {
  .title-tac-cluster {
    gap: 0.52rem;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr) minmax(0, 1fr);
  }
  .tac-skirmish-pill {
    width: calc(100% / 1.18);
  }
  .hud-portal-btn span {
    display: none;
  }
  .hud-portal-btn {
    width: 30px;
    padding: 0;
  }
}

@media (max-height: 520px) {
  .screen-overlay.fs-screen {
    padding: 0;
  }

  .screen-overlay.fs-screen > .menu-card {
    padding: 0;
    border-radius: 0;
    max-height: none;
    height: 100vh;
    height: 100dvh;
  }

  .fs-hero-screen .top-utility-row {
    padding: max(0.36rem, env(safe-area-inset-top))
             max(0.92rem, env(safe-area-inset-left), env(safe-area-inset-right))
             0.1rem
             max(0.92rem, env(safe-area-inset-left), env(safe-area-inset-right));
  }

  .title-commander-hud {
    --cmd-cut: 7px;
    gap: 0.42rem;
    padding: 3px 7px 3px 4px;
  }

  .cmd-avatar-box {
    width: 30px;
    height: 30px;
  }

  .cmd-hud-info {
    min-width: 78px;
    gap: 3px;
  }

  .cmd-hud-name {
    font-size: 0.76rem;
    letter-spacing: 0.06em;
  }

  .cmd-hud-xp-track {
    height: 4px;
  }

  .cmd-hud-crest {
    width: 27px;
    height: 31px;
  }

  .cmd-crest-copy small {
    font-size: 0.4rem;
  }

  .cmd-crest-copy strong {
    font-size: 0.84rem;
  }

  .fs-hero-screen .utility-actions {
    gap: 0.32rem;
  }

  .fs-hero-screen .hud-tac-box {
    --box-cut: 5px;
    height: 30px;
    padding: 0 0.5rem;
    font-size: 0.72rem;
    gap: 0.34rem;
  }

  .fs-hero-screen .hud-res-box {
    min-width: 82px;
    padding: 0 0.5rem 0 0.36rem;
  }

  .fs-hero-screen .hud-res-icon svg {
    width: 16px;
    height: 16px;
  }

  .fs-hero-screen .hud-res-val {
    font-size: 0.86rem;
  }

  .fs-hero-screen .hud-icon-box {
    width: 30px;
    padding: 0;
  }

  .fs-hero-screen .hud-icon-box svg {
    width: 14px;
    height: 14px;
  }

  .fs-hero-screen .hud-settings-btn {
    padding: 0 0.64rem;
    gap: 0.32rem;
    font-size: 0.74rem;
    letter-spacing: 0.07em;
  }

  .fs-hero-screen .hud-settings-btn .hud-gear-svg {
    width: 14px;
    height: 14px;
  }

  .title-top-brand {
    margin-top: -0.52rem;
    padding: 0 0.75rem;
  }

  .himars-hero-logo-svg {
    width: clamp(224px, 33vw, 310px);
  }

  .fs-hero-screen .brand-header.title-brand-center .game-subtitle {
    font-size: 0.56rem;
    margin-top: -0.14rem;
    letter-spacing: 0.38em;
    padding-left: 0.38em;
  }

  .title-bottom-dock {
    padding: 0.16rem
             max(0.95rem, env(safe-area-inset-left), env(safe-area-inset-right))
             max(0.42rem, env(safe-area-inset-bottom))
             max(0.95rem, env(safe-area-inset-left), env(safe-area-inset-right));
  }

  .title-tac-cluster {
    max-width: 760px;
    gap: 0.74rem;
  }

  .tac-col {
    gap: 0.44rem;
  }

  .tac-col-center {
    gap: 0.44rem;
  }

  .tac-hud-btn {
    --cut: 8px;
    --cut-in: 6.5px;
    min-height: 38px;
    padding: 0 0.72rem;
  }

  .tac-inner-frame {
    inset: 3.5px;
  }

  .tac-theme-dual {
    --cut: 10px;
    --cut-in: 8px;
  }

  .tac-hero-multi {
    min-height: 52px;
    padding: 0 0.9rem;
  }

  .tac-skirmish-pill {
    width: calc(100% / 1.24);
    min-height: 38px;
    padding: 0 0.72rem;
  }

  .tac-led-bars {
    top: -4px;
    right: 12px;
    gap: 2px;
  }

  .tac-led-bars i {
    width: 3px;
    height: 3px;
  }

  .tac-led-bars.tac-led-inner {
    top: 7px;
    right: 15px;
  }

  .tac-btn-content {
    gap: 0.48rem;
  }

  .tac-btn-icon {
    width: 20px;
    height: 20px;
  }

  .tac-rifles-icon {
    width: 26px;
    height: 23px;
  }

  .tac-btn-label {
    font-size: clamp(1rem, 1.9vw, 1.24rem);
    letter-spacing: 0.05em;
  }

  .tac-skirmish-pill .tac-btn-label {
    font-size: clamp(0.84rem, 1.6vw, 1.04rem);
    letter-spacing: 0.03em;
  }

  .tac-hero-multi .tac-btn-label {
    font-size: clamp(1.22rem, 2.3vw, 1.52rem);
  }

  .tac-btn-icon-sm {
    width: 12px;
    height: 12px;
  }

  .tac-btn-label-sm {
    font-size: 0.62rem;
    letter-spacing: 0.08em;
  }

  .tac-hud-btn .hangar-btn-dot {
    top: 6px;
    right: 8px;
  }

  .fs-screen .screen-header {
    padding: max(0.36rem, env(safe-area-inset-top))
             max(0.92rem, env(safe-area-inset-right))
             0.34rem
             max(0.92rem, env(safe-area-inset-left));
  }

  #hangarScreen.fs-screen .hangar-layout {
    padding: 0.44rem
             max(0.92rem, env(safe-area-inset-right))
             max(0.44rem, env(safe-area-inset-bottom))
             max(0.92rem, env(safe-area-inset-left));
    grid-template-columns: minmax(260px, 1fr) minmax(290px, 1.08fr);
    gap: 0.58rem;
  }

  #hangarScreen.fs-screen .hangar-canvas-wrap {
    flex: 1 1 92px;
    min-height: 86px;
  }

  #storeScreen.fs-screen .store-sandbox-bar {
    width: calc(100% - max(0.92rem, env(safe-area-inset-left)) - max(0.92rem, env(safe-area-inset-right)));
    margin-top: 0.38rem;
    padding: 0.28rem 0.56rem;
  }

  #storeScreen.fs-screen .store-scroll-body {
    padding: 0.42rem
             max(0.92rem, env(safe-area-inset-right))
             max(0.48rem, env(safe-area-inset-bottom))
             max(0.92rem, env(safe-area-inset-left));
  }

  #campaignScreen.fs-screen .campaign-trial-banner {
    width: calc(100% - max(0.92rem, env(safe-area-inset-left)) - max(0.92rem, env(safe-area-inset-right)));
    margin-top: 0.34rem;
  }

  #campaignScreen.fs-screen .campaign-sector-tabs {
    margin: 0.38rem auto 0.34rem;
    padding: 0
             max(0.92rem, env(safe-area-inset-right))
             0
             max(0.92rem, env(safe-area-inset-left));
  }

  #campaignScreen.fs-screen .campaign-grid {
    padding: 2px
             max(0.92rem, env(safe-area-inset-right))
             max(0.42rem, env(safe-area-inset-bottom))
             max(0.92rem, env(safe-area-inset-left));
  }

  #skirmishScreen.fs-screen .game-lead {
    margin-top: 0.36rem !important;
    padding: 0
             max(0.92rem, env(safe-area-inset-right))
             0
             max(0.92rem, env(safe-area-inset-left));
  }

  #skirmishScreen.fs-screen .skirmish-grid {
    padding: 0.32rem
             max(0.92rem, env(safe-area-inset-right))
             0.36rem
             max(0.92rem, env(safe-area-inset-left));
    gap: 0.42rem;
  }

  #skirmishScreen.fs-screen .skirmish-field {
    padding: 0.42rem 0.62rem;
    border-radius: 10px;
  }

  #skirmishScreen.fs-screen .menu-actions {
    padding: 0.28rem
             max(0.92rem, env(safe-area-inset-right))
             max(0.42rem, env(safe-area-inset-bottom))
             max(0.92rem, env(safe-area-inset-left));
  }

  #lanScreen.fs-screen .lan-commander-bar {
    width: calc(100% - max(0.92rem, env(safe-area-inset-left)) - max(0.92rem, env(safe-area-inset-right)));
    margin-top: 0.25rem;
    padding: 0.28rem 0.52rem;
    gap: 0.36rem;
  }

  #lanScreen.fs-screen .lan-commander-bar .lan-cmd-item label {
    display: none;
  }

  #lanScreen.fs-screen .lan-commander-bar .lan-cmd-item.callsign-item {
    flex: 0 1 115px;
  }

  #lanScreen.fs-screen .lan-panel {
    padding: 0.32rem
             max(0.92rem, env(safe-area-inset-right))
             max(0.38rem, env(safe-area-inset-bottom))
             max(0.92rem, env(safe-area-inset-left));
    gap: 0.42rem;
  }

  #lanScreen.fs-screen #lanJoinPanel .lan-browser-box,
  #lanScreen.fs-screen #lanJoinPanel .lan-manual-box {
    padding: 0.5rem 0.68rem;
    gap: 0.36rem;
  }

  #lanScreen.fs-screen #lanJoinPanel .lan-hint {
    font-size: 0.66rem;
    line-height: 1.2;
  }

  #lanScreen.fs-screen #lanJoinPanel .lan-join-status {
    padding: 0.28rem 0.48rem;
    font-size: 0.68rem;
  }

  #lanScreen.fs-screen #lanJoinPanel #btnLanCancelJoin {
    padding: 0.42rem 0.65rem;
    font-size: 0.68rem;
  }

  #guideScreen.fs-screen .guide-tabs {
    margin: 0.4rem auto 0.38rem;
    padding: 0
             max(0.92rem, env(safe-area-inset-right))
             0
             max(0.92rem, env(safe-area-inset-left));
  }

  #guideScreen.fs-screen .guide-body {
    padding: 0
             max(0.92rem, env(safe-area-inset-right))
             max(0.45rem, env(safe-area-inset-bottom))
             max(0.92rem, env(safe-area-inset-left));
  }
}

/* Mobile Web / PWA Status-Bar & Gesture-Bar Clearance (prevents OS clock/battery overlap) */
@media (max-height: 520px) and (pointer: coarse) {
  html:not(.native-android) .fs-hero-screen .top-utility-row,
  html:not(.native-android) .fs-screen .screen-header {
    padding-top: max(1.36rem, env(safe-area-inset-top));
    padding-left: max(1.25rem, env(safe-area-inset-left), env(safe-area-inset-right));
    padding-right: max(1.25rem, env(safe-area-inset-left), env(safe-area-inset-right));
  }

  html:not(.native-android) .title-bottom-dock {
    padding-bottom: max(0.72rem, env(safe-area-inset-bottom));
  }
}

/* ============================================================================
   v3.8.4 — 3-PHASE OMEGA BOSS HUD, SUPREME FINALE, ELITE CAMPAIGN & SURVIVAL
   ============================================================================ */

.cmd-hud-name-row {
  display: flex;
  align-items: center;
  gap: 0.34rem;
}

.cmd-prestige-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  border-radius: 4px;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #090d16;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.48rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.25;
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.45);
}

.title-commander-hud.prestige-general {
  border-color: rgba(251, 191, 36, 0.85);
  box-shadow:
    inset 0 0 0 1px rgba(251, 191, 36, 0.36),
    0 6px 20px rgba(0, 0, 0, 0.65),
    0 0 14px rgba(245, 158, 11, 0.28);
}

/* Campaign Endgame Bar (Difficulty Switch + Star Mastery Chests + War Record / Survival) */
.campaign-endgame-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: nowrap;
  width: 100%;
  max-width: 1680px;
  margin: 0.38rem auto 0;
  padding: 0 max(1.2rem, env(safe-area-inset-right)) 0 max(1.2rem, env(safe-area-inset-left));
  flex-shrink: 0;
}

.campaign-mode-switch {
  display: inline-flex;
  align-items: center;
  background: #07101f;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
  flex-shrink: 0;
}

.camp-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.28rem 0.62rem;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: #94a3b8;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}

.camp-mode-btn.active {
  background: #0f2440;
  border-color: rgba(0, 229, 255, 0.62);
  color: #f8fafc;
}

.camp-mode-btn.elite.active {
  background: #2b1606;
  border-color: rgba(251, 191, 36, 0.85);
  color: #fde047;
}

.camp-mode-btn.locked {
  opacity: 0.68;
}

.campaign-mastery-row {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  overflow-x: auto;
  scrollbar-width: none;
  min-width: 0;
}

.campaign-mastery-row::-webkit-scrollbar {
  display: none;
}

.mastery-chest-btn,
.mastery-tier-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.56rem;
  border-radius: 7px;
  background: #091324;
  border: 1px solid rgba(148, 163, 184, 0.32);
  color: #cbd5e1;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.58rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}

.mastery-chest-btn:hover,
.mastery-tier-btn:hover {
  border-color: rgba(251, 191, 36, 0.65);
  color: #f8fafc;
}

.mastery-chest-btn.claimable,
.mastery-tier-btn.claimable {
  background: #291a05;
  border-color: #fbbf24;
  color: #fde047;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.32);
}

.mastery-chest-btn.claimed,
.mastery-tier-btn.claimed {
  background: #072119;
  border-color: rgba(0, 255, 135, 0.5);
  color: #00ff87;
  cursor: default;
}

.campaign-endgame-actions {
  display: flex;
  align-items: center;
  gap: 0.36rem;
  flex-shrink: 0;
}

.endgame-pill {
  padding: 0.26rem 0.6rem;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.6rem;
  font-weight: 800;
  white-space: nowrap;
}

.endgame-pill.gold {
  background: #271906;
  border-color: rgba(251, 191, 36, 0.72);
  color: #fde047;
}

.endgame-pill.cyan {
  background: #082032;
  border-color: rgba(0, 229, 255, 0.62);
  color: #7dd3fc;
}

/* Skirmish & Survival 3-Column CTA Row */
.menu-actions.three-col {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.survival-record-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.24rem 0.64rem;
  border-radius: 999px;
  background: #261705;
  border: 1px solid rgba(251, 191, 36, 0.65);
  color: #fde047;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.64rem;
  font-weight: 800;
  white-space: nowrap;
}

.btn-cta.survival-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #090d16;
  border: 1px solid #fde047;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.34);
  padding: 0.45rem 0.75rem;
  line-height: 1.1;
}

.btn-cta.survival-cta small {
  font-size: 0.54rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #1e1306;
}

/* 3-Phase Supreme Boss Top-Center Health Bar */
.boss-hud-bar {
  align-self: center;
  width: min(460px, 78vw);
  background: #081120;
  border: 1.5px solid #fbbf24;
  border-radius: 9px;
  padding: 0.3rem 0.62rem 0.36rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.78);
  pointer-events: none;
  margin-top: 2px;
}

.boss-hud-bar.phase-2 {
  border-color: #ff9f1c;
}

.boss-hud-bar.phase-3 {
  border-color: #ff1e56;
  box-shadow: 0 0 18px rgba(255, 30, 86, 0.48), 0 6px 20px rgba(0, 0, 0, 0.82);
}

.boss-hud-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  margin-bottom: 4px;
}

.boss-hud-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.66rem;
  font-weight: 900;
  color: #f8fafc;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.boss-phase-badge {
  padding: 1px 6px;
  border-radius: 4px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.54rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  background: #0c233b;
  border: 1px solid #38bdf8;
  color: #7dd3fc;
  white-space: nowrap;
}

.boss-phase-badge.phase-2 {
  background: #2b1805;
  border-color: #fbbf24;
  color: #fde047;
}

.boss-phase-badge.phase-3 {
  background: #330915;
  border-color: #ff1e56;
  color: #fda4af;
}

.boss-hud-hp-num {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.62rem;
  font-weight: 800;
  color: #fde047;
  white-space: nowrap;
}

.boss-hud-track {
  position: relative;
  width: 100%;
  height: 9px;
  border-radius: 5px;
  background: #040811;
  border: 1px solid rgba(148, 163, 184, 0.38);
  overflow: hidden;
}

.boss-hud-fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #ff1e56 0%, #f59e0b 55%, #fbbf24 100%);
  transition: width 0.18s ease-out;
}

.boss-phase-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #ffffff;
  opacity: 0.85;
}

.boss-phase-tick.tick-25 {
  left: 25%;
}

.boss-phase-tick.tick-60 {
  left: 60%;
}

/* Supreme Finale & War Record Modal — Fullscreen Celebration Video + Frosted Glass Windows */
#finaleModal.finale-celebration-overlay {
  background: #030711;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overflow: hidden;
  align-items: center;
}

.finale-celebration-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
  background: #030711;
}

.finale-video-vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    75% 70% at 50% 50%,
    rgba(4, 9, 20, 0.16) 0%,
    rgba(3, 7, 16, 0.42) 100%
  );
  opacity: 0;
  transition: opacity 0.45s ease;
}

#finaleModal.finale-card-visible .finale-video-vignette {
  opacity: 1;
}

.finale-skip-video-btn {
  position: fixed;
  top: max(0.68rem, env(safe-area-inset-top));
  right: max(1rem, env(safe-area-inset-left), env(safe-area-inset-right));
  z-index: 4;
  --box-rim: rgba(251, 191, 36, 0.65);
  padding: 0 0.78rem;
  gap: 0.36rem;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  color: #fef08a;
}

.finale-card {
  position: relative;
  z-index: 2;
  width: min(650px, 94vw);
  max-height: calc(100dvh - 18px);
  overflow-y: auto;
  background: linear-gradient(
    162deg,
    rgba(10, 20, 38, 0.46) 0%,
    rgba(6, 13, 26, 0.56) 100%
  );
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  border: 1.5px solid rgba(251, 191, 36, 0.78);
  box-shadow:
    0 22px 56px rgba(0, 0, 0, 0.68),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  padding: 0.95rem 1.15rem;
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity 0.48s cubic-bezier(0.22, 1, 0.36, 1), transform 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}

.finale-card.finale-card-hidden {
  opacity: 0;
  transform: translateY(16px) scale(0.96);
  pointer-events: none;
}

.finale-crest-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.6rem;
}

.finale-crest-badge {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 82px;
  height: 58px;
  border-radius: 12px;
  background: rgba(20, 13, 4, 0.44);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid rgba(251, 191, 36, 0.72);
}

.finale-title-block {
  text-align: left;
  min-width: 0;
  flex: 1 1 auto;
}

.finale-replay-btn {
  flex-shrink: 0;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.3rem 0.56rem;
  border-radius: 8px;
  background: rgba(15, 27, 48, 0.46);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(251, 191, 36, 0.55);
  color: #fde047;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.finale-replay-btn:hover {
  transform: translateY(-1px);
  background: rgba(28, 45, 76, 0.62);
  border-color: #fde047;
}

.finale-title {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
  font-weight: 900;
  color: #fde047;
  margin: 0.18rem 0 0.12rem;
  letter-spacing: 0.05em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.finale-sub {
  font-size: 0.74rem;
  color: #f1f5f9;
  margin: 0;
  line-height: 1.3;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.75);
}

.finale-jackpot-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.44rem 0.72rem;
  border-radius: 9px;
  background: rgba(35, 22, 5, 0.46);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid rgba(251, 191, 36, 0.78);
  color: #fef08a;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  margin-bottom: 0.62rem;
  text-align: center;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.75);
}

.finale-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.48rem;
  margin-bottom: 0.7rem;
}

.finale-stat-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.46rem 0.4rem;
  border-radius: 9px;
  background: rgba(11, 24, 44, 0.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(125, 211, 252, 0.4);
  text-align: center;
}

.finale-stat-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.52rem;
  font-weight: 800;
  color: #cbd5e1;
  letter-spacing: 0.05em;
  margin-bottom: 3px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

.finale-stat-val {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.82rem;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.75);
}

#finaleModal .btn-cta.secondary {
  background: rgba(15, 26, 46, 0.48);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(148, 163, 184, 0.42);
}

/* Frontier Survival Between-Wave Perk Selection Modal */
.survival-perk-card {
  width: min(680px, 95vw);
  max-height: calc(100dvh - 18px);
  overflow-y: auto;
  background: #081222;
  border: 1.5px solid #00e5ff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.88);
}

.survival-perk-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.56rem;
  margin-top: 0.45rem;
}

.survival-perk-option {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  text-align: left;
  padding: 0.64rem 0.68rem;
  border-radius: 10px;
  background: #0c1a2e;
  border: 1.5px solid rgba(56, 189, 248, 0.42);
  color: #f8fafc;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.survival-perk-option:hover {
  transform: translateY(-2px);
  background: #112440;
  border-color: #fbbf24;
}

.survival-perk-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 0.36rem;
}

.survival-perk-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: #07101e;
  border: 1px solid rgba(251, 191, 36, 0.55);
  color: #fbbf24;
}

.survival-perk-badge {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.52rem;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 999px;
  background: #1f1405;
  border: 1px solid rgba(251, 191, 36, 0.65);
  color: #fde047;
}

.survival-perk-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.24rem;
}

.survival-perk-desc {
  font-size: 0.64rem;
  color: #cbd5e1;
  line-height: 1.28;
  margin-bottom: 0.5rem;
}

.survival-perk-cta {
  width: 100%;
  text-align: center;
  padding: 0.3rem 0.45rem;
  border-radius: 6px;
  background: linear-gradient(135deg, #00e5ff, #38bdf8);
  color: #06101e;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

@media (max-width: 680px) {
  .finale-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .survival-perk-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-height: 520px) {
  .campaign-endgame-bar {
    margin: 0.22rem auto 0;
    padding: 0 max(0.92rem, env(safe-area-inset-right)) 0 max(0.92rem, env(safe-area-inset-left));
    gap: 0.35rem;
  }

  .camp-mode-btn {
    padding: 0.18rem 0.48rem;
    font-size: 0.55rem;
  }

  .mastery-chest-btn,
  .mastery-tier-btn {
    padding: 0.18rem 0.44rem;
    font-size: 0.52rem;
  }

  .endgame-pill {
    padding: 0.18rem 0.48rem;
    font-size: 0.54rem;
  }

  #campaignScreen.fs-screen .campaign-sector-tabs {
    margin: 0.24rem auto 0.24rem;
  }

  .boss-hud-bar {
    width: min(390px, 72vw);
    padding: 0.2rem 0.5rem 0.26rem;
  }

  .boss-hud-title-wrap {
    font-size: 0.58rem;
  }

  .boss-hud-track {
    height: 7px;
  }

  .finale-card {
    padding: 0.65rem 0.85rem;
  }

  .finale-crest-row {
    margin-bottom: 0.38rem;
  }

  .finale-jackpot-banner {
    padding: 0.3rem 0.55rem;
    margin-bottom: 0.42rem;
    font-size: 0.6rem;
  }

  .finale-stats-grid {
    margin-bottom: 0.45rem;
    gap: 0.36rem;
  }

  .finale-stat-box {
    padding: 0.32rem 0.3rem;
  }
}

/* ==========================================================================
   v3.8.4 - COMMAND SETTINGS & ACCESSIBILITY MODAL (#settingsModal)
   ========================================================================== */
.menu-card.settings-card {
  width: min(780px, 95vw);
  max-width: min(780px, 95vw);
  max-height: calc(100dvh - 16px);
  overflow-y: auto;
  padding: 0.78rem 1rem;
  background: #081222;
  border: 1.5px solid rgba(56, 189, 248, 0.65);
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.92);
}

.settings-head {
  margin-bottom: 0.52rem;
  padding-bottom: 0.44rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.settings-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.62rem;
}

.settings-head-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: #0d1c33;
  border: 1px solid rgba(0, 229, 255, 0.48);
  flex-shrink: 0;
}

.settings-top-close {
  padding: 0.32rem 0.72rem;
  font-size: 0.68rem;
  min-height: 30px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.46rem;
  margin-bottom: 0.56rem;
}

.settings-row {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.34rem;
  padding: 0.48rem 0.6rem;
  border-radius: 9px;
  background: #0c1a2e;
  border: 1px solid rgba(71, 85, 105, 0.48);
  text-align: left;
}

.settings-row-wide {
  grid-column: 1 / -1;
}

.settings-label-col {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.settings-row-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.64rem;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: 0.04em;
}

.settings-row-sub {
  font-size: 0.6rem;
  color: #94a3b8;
  line-height: 1.2;
}

.settings-ctrl-col {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.28rem;
}

.settings-input-wrap {
  flex-wrap: nowrap;
  width: 100%;
}

.settings-callsign-input {
  flex: 1;
  min-width: 0;
  height: 28px;
  padding: 0 0.52rem;
  font-size: 0.7rem;
  font-weight: 700;
  background: #060e1a;
  border: 1px solid rgba(56, 189, 248, 0.48);
  color: #ffffff;
  border-radius: 6px;
}

.settings-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.26rem;
}

.settings-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  padding: 0.26rem 0.52rem;
  min-height: 26px;
  border-radius: 6px;
  background: #07101e;
  border: 1.2px solid rgba(100, 116, 139, 0.52);
  color: #cbd5e1;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.settings-pill:hover {
  border-color: #38bdf8;
  color: #ffffff;
}

.settings-pill.active {
  background: linear-gradient(135deg, #0284c7, #00e5ff);
  border-color: #7dd3fc;
  color: #04101e;
  font-weight: 900;
}

.settings-pill.active[data-val="mute"],
.settings-pill.active[data-val="off"] {
  background: linear-gradient(135deg, #be123c, #fb7185);
  border-color: #fda4af;
  color: #ffffff;
}

.color-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid #020617;
  flex-shrink: 0;
}

.settings-color-col {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 0.48rem;
  width: 100%;
}

.settings-aim-preview-canvas {
  width: 210px;
  height: 36px;
  border-radius: 7px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: linear-gradient(90deg, #dbeafe 0%, #f8fafc 48%, #0f172a 52%, #020617 100%);
  flex-shrink: 0;
}

.settings-dual-groups {
  justify-content: space-between;
  width: 100%;
  gap: 0.36rem;
}

.settings-footer-actions {
  margin-top: 0.25rem;
}

@media (max-width: 680px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .settings-color-col {
    flex-direction: column;
    align-items: stretch;
  }
  .settings-aim-preview-canvas {
    width: 100%;
  }
}

@media (max-height: 520px) {
  .menu-card.settings-card {
    padding: 0.42rem 0.72rem;
  }
  .settings-head {
    margin-bottom: 0.26rem;
    padding-bottom: 0.22rem;
  }
  .settings-grid {
    gap: 0.26rem;
    margin-bottom: 0.28rem;
  }
  .settings-row {
    padding: 0.28rem 0.44rem;
    gap: 0.16rem;
  }
  .settings-row-sub {
    display: none;
  }
  .settings-pill {
    padding: 0.16rem 0.38rem;
    min-height: 21px;
    font-size: 0.5rem;
  }
  .settings-callsign-input {
    height: 23px;
    font-size: 0.64rem;
  }
  .settings-aim-preview-canvas {
    width: 184px;
    height: 28px;
  }
  .settings-footer-actions .btn-cta {
    min-height: 30px;
    padding: 0.28rem 0.7rem;
    font-size: 0.68rem;
  }
}

/* ============================================================================
   MULTIPLAYER SERVER CONFIG & PLAYER LOADOUT MODALS (v3.7.7)
   ============================================================================ */
.lan-cmd-actions {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  flex-shrink: 0;
}

.lan-top-cfg-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
  padding: 0.28rem 0.54rem;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
  text-align: left;
  color: #f8fafc;
}

.lan-top-cfg-btn.loadout-btn {
  background: linear-gradient(180deg, rgba(14, 116, 144, 0.42), rgba(8, 47, 73, 0.78));
  border: 1px solid rgba(56, 189, 248, 0.58);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(186, 230, 253, 0.25);
}

.lan-top-cfg-btn.server-btn {
  background: linear-gradient(180deg, rgba(180, 83, 9, 0.42), rgba(69, 26, 3, 0.78));
  border: 1px solid rgba(251, 191, 36, 0.62);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(254, 240, 138, 0.25);
}

.lan-top-cfg-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.lan-cfg-btn-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  max-width: 175px;
  min-width: 0;
}

.lan-cfg-btn-copy strong {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lan-cfg-btn-copy small {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #bae6fd;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lan-top-cfg-btn.server-btn .lan-cfg-btn-copy small {
  color: #fde68a;
}

.lan-rules-strip,
.lan-client-loadout-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  padding: 0.36rem 0.65rem;
  margin: 0.18rem 0;
  border-radius: 9px;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(8, 47, 73, 0.42));
  border: 1px solid rgba(56, 189, 248, 0.34);
}

.lan-client-loadout-box {
  flex-direction: column;
  align-items: stretch;
  gap: 0.3rem;
  padding: 0.36rem 0.56rem;
  margin: 0.12rem 0;
}

.lan-rules-copy,
.lan-client-loadout-copy {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.lan-rules-kicker {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  color: #38bdf8;
  text-transform: uppercase;
}

.lan-rules-text {
  font-size: 0.66rem;
  font-weight: 600;
  color: #e2e8f0;
  line-height: 1.25;
}

.lan-rules-btns,
.lan-client-loadout-btns {
  display: flex;
  align-items: center;
  gap: 0.36rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.lan-inline-cfg-btn {
  padding: 0.24rem 0.52rem !important;
  font-size: 0.58rem !important;
}

.lan-inline-cfg-btn.gold {
  border-color: rgba(251, 191, 36, 0.65);
  background: rgba(180, 83, 9, 0.32);
  color: #fef08a;
}

.lan-inline-cfg-btn.cyan {
  border-color: rgba(56, 189, 248, 0.65);
  background: rgba(14, 116, 144, 0.32);
  color: #e0f2fe;
}

.menu-card.lan-cfg-modal-card {
  width: min(96vw, 960px);
  max-height: min(92vh, 760px);
  display: flex;
  flex-direction: column;
  padding: 0.85rem 1.1rem;
  gap: 0.55rem;
  overflow: hidden;
}

.lan-cfg-preset-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  padding: 0.38rem 0.65rem;
  border-radius: 9px;
  background: rgba(8, 15, 30, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.24);
  flex-shrink: 0;
}

.lan-cfg-preset-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #94a3b8;
  margin-right: auto;
}

.lan-cfg-scroll-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding-right: 0.25rem;
}

.lan-cfg-section {
  background: rgba(10, 18, 34, 0.84);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 11px;
  padding: 0.62rem 0.78rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.lan-cfg-sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.lan-cfg-sec-head h3 {
  margin: 0;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fbbf24;
}

.lan-cfg-sec-head p {
  margin: 0.1rem 0 0;
  font-size: 0.68rem;
  color: #94a3b8;
}

.lan-cfg-upg-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.lan-cfg-upg-card {
  background: rgba(4, 9, 20, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 9px;
  padding: 0.48rem 0.58rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.38rem;
}

.lan-cfg-upg-top {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.lan-cfg-upg-top strong {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.62rem;
  color: #f8fafc;
}

.lan-cfg-upg-top span {
  font-size: 0.6rem;
  color: #94a3b8;
  line-height: 1.25;
}

.lan-cfg-toggle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.42rem;
}

.lan-cfg-toggle-grid.support-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.lan-cfg-chip {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  gap: 0.34rem;
  padding: 0.54rem 0.68rem;
  border-radius: 9px;
  background: rgba(15, 23, 42, 0.84);
  border: 1.5px solid rgba(148, 163, 184, 0.3);
  color: #cbd5e1;
  cursor: pointer;
  text-align: left;
  transition: all 0.14s ease;
  min-width: 0;
  overflow: hidden;
}

.lan-cfg-chip.active {
  background: linear-gradient(135deg, rgba(14, 116, 144, 0.44), rgba(15, 23, 42, 0.94));
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.24);
}

.lan-cfg-chip.selected-loadout {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.42), rgba(15, 23, 42, 0.92));
  border-color: #fbbf24;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.28);
}

.lan-cfg-chip.off,
.lan-cfg-chip.locked-by-srv,
.lan-cfg-chip:disabled {
  opacity: 0.52;
}

.lan-cfg-chip.locked-by-srv {
  cursor: not-allowed;
}

.lan-cfg-chip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  width: 100%;
  min-width: 0;
}

.lan-cfg-chip-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lan-cfg-chip-sub {
  font-size: 0.6rem;
  font-weight: 600;
  color: #94a3b8;
  line-height: 1.3;
  width: 100%;
}

.lan-cfg-chip.active .lan-cfg-chip-sub {
  color: #bae6fd;
}

.lan-cfg-chip-badge {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.5rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.38);
  color: #94a3b8;
  flex-shrink: 0;
  white-space: nowrap;
}

.lan-cfg-chip.active .lan-cfg-chip-badge,
.lan-cfg-chip-badge.on {
  background: rgba(56, 189, 248, 0.24);
  border-color: #38bdf8;
  color: #7dd3fc;
}

.lan-cfg-chip.selected-loadout .lan-cfg-chip-badge {
  background: rgba(251, 191, 36, 0.24);
  border-color: #fbbf24;
  color: #fde68a;
}

.lan-cfg-sortie-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  width: 100%;
  margin-top: 0.22rem;
  padding-top: 0.38rem;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.lan-cfg-sortie-lbl {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.52rem;
  font-weight: 800;
  color: #cbd5e1;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.lan-cfg-support-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
}

#lanLoadoutPatriotRow.lan-cfg-support-controls {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#lanServerConfigModal .lan-cfg-stepper-card {
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  gap: 0.42rem;
}

#lanServerConfigModal .lan-cfg-stepper-card .lan-cfg-step-ctrl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 7px;
  padding: 0.2rem 0.28rem;
}

#lanServerConfigModal .lan-cfg-stepper-card #btnSrvTogglePatriot {
  width: 100%;
}

.lan-cfg-stepper-card {
  background: rgba(6, 13, 26, 0.88);
  border: 1.5px solid rgba(148, 163, 184, 0.28);
  border-radius: 9px;
  padding: 0.5rem 0.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
}

.lan-cfg-step-info {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
  flex: 1 1 auto;
}

.lan-cfg-step-info strong {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.6rem;
  font-weight: 800;
  color: #f8fafc;
}

.lan-cfg-step-info span {
  font-size: 0.56rem;
  color: #94a3b8;
  line-height: 1.2;
}

.lan-cfg-step-ctrl {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  flex-shrink: 0;
}

.lan-step-btn {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1.5px solid #38bdf8;
  background: linear-gradient(180deg, rgba(14, 116, 144, 0.65), rgba(8, 47, 73, 0.92));
  color: #ffffff;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.96rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  user-select: none;
  transition: transform 0.1s ease, background 0.12s ease, border-color 0.12s ease;
}

.lan-step-btn:hover:not(:disabled) {
  background: linear-gradient(180deg, #0284c7, #0369a1);
  border-color: #7dd3fc;
}

.lan-step-btn:active:not(:disabled) {
  transform: scale(0.94);
}

.lan-step-btn:disabled {
  opacity: 0.35;
  border-color: rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.6);
  cursor: not-allowed;
  box-shadow: none;
}

.lan-step-val {
  min-width: 28px;
  text-align: center;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.72rem;
  font-weight: 900;
  color: #38bdf8;
  white-space: nowrap;
}

.lan-cfg-ammo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
}

.lan-cfg-ammo-item {
  background: rgba(6, 13, 26, 0.88);
  border: 1.5px solid rgba(56, 189, 248, 0.28);
  border-radius: 9px;
  padding: 0.5rem 0.65rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.42rem;
  min-width: 0;
}

.lan-cfg-ammo-label {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.lan-cfg-ammo-label strong {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.62rem;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lan-cfg-ammo-label span {
  font-size: 0.55rem;
  color: #94a3b8;
  line-height: 1.2;
}

.lan-cfg-ammo-item .lan-cfg-step-ctrl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 7px;
  padding: 0.2rem 0.28rem;
}

.lan-cfg-footer {
  margin-top: 0.15rem;
  flex-shrink: 0;
}

@media (max-width: 820px) {
  .lan-cfg-upg-grid,
  .lan-cfg-toggle-grid,
  .lan-cfg-toggle-grid.support-grid,
  .lan-cfg-support-controls,
  .lan-cfg-ammo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .lan-commander-bar .lan-cmd-item label {
    display: none;
  }
  .lan-cfg-btn-copy {
    max-width: 145px;
  }
}

@media (max-width: 560px) {
  .lan-commander-bar {
    flex-wrap: wrap;
  }
  .lan-cmd-actions {
    width: 100%;
    justify-content: stretch;
  }
  .lan-top-cfg-btn {
    flex: 1;
    justify-content: center;
  }
}

@media (max-height: 520px) {
  .menu-card.lan-cfg-modal-card {
    max-height: 96dvh;
    padding: 0.45rem 0.75rem;
    gap: 0.32rem;
  }
  .lan-cfg-section {
    padding: 0.42rem 0.56rem;
    gap: 0.34rem;
  }
  .lan-cfg-sec-head p {
    display: none;
  }
  .lan-cfg-footer .btn-cta {
    min-height: 32px;
    padding: 0.28rem 0.7rem;
    font-size: 0.68rem;
  }
}

html.native-android #btnFullscreenTitle,
html.native-android #btnDownloadApkTitle,
html.native-android #btnPortalHome,
html.native-android #btnFullscreenHud,
html.native-android #btnRotateFullscreen {
  display: none !important;
}

/* Online Multiplayer Rematch Invitation Modal (Accept / Refuse) */
.rematch-overlay {
  z-index: 82 !important;
  background: rgba(3, 8, 18, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.rematch-modal-card {
  max-width: 460px;
  border-color: rgba(0, 255, 135, 0.55);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.88),
    0 0 34px rgba(0, 255, 135, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.rematch-kicker-badge {
  display: inline-block;
  padding: 0.22rem 0.68rem;
  border-radius: 999px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #00ff87;
  background: rgba(0, 255, 135, 0.12);
  border: 1px solid rgba(0, 255, 135, 0.38);
  margin-bottom: 0.45rem;
}

.rematch-heading {
  font-size: 1.18rem;
  color: #f8fafc;
  margin-bottom: 0.38rem;
}

.rematch-desc {
  font-size: 0.88rem;
  line-height: 1.45;
  color: #cbd5e1;
  margin-bottom: 0.95rem;
}

.rematch-actions {
  margin-top: 0.25rem;
}

.rematch-refuse-btn {
  border-color: rgba(255, 42, 109, 0.52) !important;
  color: #fda4af !important;
}

.rematch-refuse-btn:hover {
  border-color: #ff2a6d !important;
  background: rgba(255, 42, 109, 0.16) !important;
  color: #ffffff !important;
}


