: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;
  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);
}

/* ==========================================================================
   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 */
.title-command-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.15fr);
  gap: 1.05rem;
  align-items: stretch;
  text-align: left;
}

.title-hero-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.62rem;
  min-width: 0;
}

.title-modes-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.62rem;
  min-width: 0;
}

.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;
  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;
}

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

.btn-cta.mode-card-btn {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.24rem;
  padding: 0.78rem 0.95rem;
  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.88rem;
  font-weight: 900;
  letter-spacing: 0.05em;
}

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

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

.title-secondary-modes .btn-cta {
  position: relative;
  min-width: 0;
  width: 100%;
  padding: 0.62rem 0.36rem;
  gap: 0.28rem;
  font-size: clamp(0.54rem, 0.95vw, 0.68rem);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.title-secondary-modes .btn-cta svg {
  width: 14px;
  height: 14px;
  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: wrap;
  align-items: center;
  gap: 0.65rem;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 0.48rem 0.75rem;
  margin-bottom: 0.68rem;
}

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

.lan-cmd-item.grow {
  flex: 1 1 250px;
}

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

.skirmish-select.compact-select {
  padding: 0.44rem 0.65rem;
  font-size: 0.73rem;
}

/* ==========================================================================
   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;
}

.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.38rem;
}

.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.54rem 0.74rem;
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
}

.hangar-stat-row {
  display: grid;
  grid-template-columns: 78px 1fr 74px;
  align-items: center;
  gap: 0.55rem;
}

.h-stat-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.58rem;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 0.06em;
}

.h-stat-track {
  position: relative;
  height: 8px;
  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.kit {
  background: linear-gradient(90deg, #6366f1, #38bdf8);
}

.h-stat-val {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.62rem;
  font-weight: 800;
  color: #f1f5f9;
  text-align: right;
  white-space: nowrap;
}

@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-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-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;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--cyan);
}

.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-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: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.42rem;
  margin-bottom: 0.6rem;
  flex-shrink: 0;
}

.sector-tab-btn {
  display: flex;
  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-sector-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .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 {
  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.45rem
           max(0.95rem, env(safe-area-inset-left));
  pointer-events: auto;
  flex-wrap: nowrap;
}

.hud-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
  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 {
  flex-shrink: 0;
  white-space: nowrap;
}

.op-label {
  font-family: 'Orbitron', sans-serif;
  color: #e2e8f0;
  font-size: 0.78rem;
  min-width: 0;
  max-width: clamp(92px, 23vw, 290px);
  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: rgba(0, 229, 255, 0.18);
  border: 1px solid var(--cyan);
  color: var(--cyan);
}

.turn-badge.enemy {
  background: rgba(255, 42, 109, 0.2);
  border: 1px solid var(--pink);
  color: var(--pink);
}

.turn-badge.flight {
  background: rgba(255, 183, 3, 0.2);
  border: 1px solid var(--gold);
  color: var(--gold);
}

.turn-badge.aider {
  background: rgba(0, 255, 135, 0.2);
  border: 1px solid var(--green);
  color: var(--green);
}

.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 var(--border-subtle);
  background: var(--bg-panel);
  color: #cbd5e1;
  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: var(--green);
}

.ai-aider-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ai-aider-btn.active {
  background: rgba(0, 255, 135, 0.2);
  border-color: var(--green);
  color: var(--green);
  box-shadow: 0 0 16px rgba(0, 255, 135, 0.32);
}

.ai-aider-btn.video-topup {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(15, 23, 42, 0.92));
  border-color: rgba(255, 209, 102, 0.72);
  color: #ffd166;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.25);
}

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

@keyframes aiDangerFlash {
  0%, 100% {
    border-color: rgba(255, 159, 28, 0.95);
    background: linear-gradient(135deg, rgba(255, 42, 109, 0.34), rgba(245, 158, 11, 0.24));
    color: #fffbeb;
    box-shadow: 0 0 10px rgba(255, 159, 28, 0.42), 0 0 22px rgba(255, 42, 109, 0.32);
    transform: scale(1);
  }
  50% {
    border-color: #ff2a6d;
    background: linear-gradient(135deg, rgba(255, 183, 3, 0.46), rgba(225, 29, 72, 0.46));
    color: #ffd166;
    box-shadow: 0 0 18px rgba(255, 209, 102, 0.8), 0 0 30px rgba(255, 42, 109, 0.64);
    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 {
  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 {
  border-color: rgba(0, 229, 255, 0.32);
  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 var(--border-subtle);
  background: var(--bg-panel);
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

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

.hud-icon-btn.muted {
  color: var(--pink);
  border-color: rgba(255, 42, 109, 0.45);
}

/* 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: rgba(9, 15, 32, 0.94);
  border: 1px solid var(--border-cyan);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.55);
  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.92), rgba(5, 8, 18, 0.98));
  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);
  backdrop-filter: blur(14px);
  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.95rem;
  flex-wrap: wrap;
}

.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-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: auto;
  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;
}

/* 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%;
  background: radial-gradient(circle, rgba(10, 20, 42, 0.76) 0%, rgba(5, 10, 24, 0.9) 100%);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  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: 3px 9px;
  border-radius: 999px;
  background: rgba(8, 14, 30, 0.84);
  border: 1px solid rgba(148, 163, 184, 0.22);
  font-family: 'Orbitron', sans-serif;
  font-size: 0.64rem;
  font-weight: 700;
  white-space: nowrap;
}

.aim-telemetry #angleVal {
  color: var(--cyan);
}

.aim-telemetry #powerVal {
  color: var(--amber);
}

.telemetry-dot {
  color: rgba(148, 163, 184, 0.55);
}

.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.55rem, env(safe-area-inset-right))
             max(0.34rem, env(safe-area-inset-bottom))
             max(0.55rem, env(safe-area-inset-left));
    gap: 0.55rem;
  }
  .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);
    gap: 0.68rem;
  }

  .title-hero-col,
  .title-modes-col {
    gap: 0.42rem;
  }

  .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 {
    padding: 0.5rem 0.68rem;
    gap: 0.14rem;
    border-radius: 10px;
  }

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

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

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

  .title-secondary-modes .btn-cta {
    padding: 0.48rem 0.28rem;
    gap: 0.24rem;
    font-size: clamp(0.52rem, 0.94vw, 0.62rem);
    letter-spacing: 0.015em;
    grid-column: auto;
  }

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

  .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.38rem 0.55rem;
    gap: 0.24rem;
  }

  .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.28rem
             max(0.72rem, env(safe-area-inset-left));
  }

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

  .op-label {
    font-size: 0.71rem;
    max-width: clamp(86px, 21vw, 240px);
  }

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

  .ai-aider-btn {
    height: 34px;
    padding: 0 0.66rem;
    font-size: 0.67rem;
    gap: 0.34rem;
  }

  .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;
  }
}

/* ==========================================================================
   v2.9.7 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;
  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: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--amber);
  color: #090d16;
  font-size: 0.58rem;
  font-weight: 900;
}

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

.armory-note-banner {
  padding: 0.38rem 0.6rem;
  border-radius: 8px;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.24);
  font-size: 0.68rem;
  color: #cbd5e1;
  line-height: 1.32;
}

.armory-supply-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  overflow-y: auto;
  max-height: 310px;
  padding-right: 2px;
}

.armory-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.52rem 0.65rem;
  border-radius: 10px;
  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.55rem;
  min-width: 0;
  flex: 1;
}

.armory-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  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.4rem;
  flex-wrap: wrap;
}

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

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

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

.armory-item-desc {
  font-size: 0.66rem;
  color: var(--text-muted);
  line-height: 1.28;
  margin-top: 2px;
}

.armory-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.28rem;
  flex-shrink: 0;
}

.armory-buy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.34rem 0.62rem;
  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.64rem;
  font-weight: 800;
  cursor: pointer;
}

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

.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: 205px;
  }
  .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;
  }
}
