﻿:root {
  --bg: #070f1c;
  --panel: rgba(10, 20, 41, 0.86);
  --panel-border: rgba(140, 203, 255, 0.28);
  --accent: #ffc774;
  --accent-2: #52dfff;
  --good: #68f4b1;
  --warn: #ffd166;
  --bad: #ff6e75;
  --text: #f7fbff;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  background:
    radial-gradient(1300px 850px at 12% -12%, rgba(255, 188, 86, 0.2), transparent 62%),
    radial-gradient(1050px 760px at 88% -10%, rgba(82, 223, 255, 0.16), transparent 63%),
    linear-gradient(180deg, #0a1427, #060d1b 56%, #040914 100%);
  font-family: "Rajdhani", "Segoe UI", "Trebuchet MS", system-ui, -apple-system, sans-serif;
  color: var(--text);
}

body {
  display: block;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: hidden;
}

body.infoDoc {
  overflow-y: auto;
}

body.infoDoc .layout.infoPage {
  height: auto;
  min-height: 100vh;
  min-height: 100dvh;
}

.layout {
  display: grid;
  gap: 0;
  place-items: stretch;
  padding: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
}

.adSlot {
  width: min(960px, 94vw);
  min-height: 60px;
  border-radius: 14px;
  border: 1px dashed rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.18);
  display: block;
  color: rgba(255,255,255,0.65);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.adSlot .adsbygoogle {
  display: block !important;
  width: 100% !important;
  min-height: 90px;
}

canvas#game {
  width: 100%;
  height: 100%;
  border-radius: 0;
  border: 0;
  box-shadow: none;
  background: linear-gradient(180deg, #0b0f1f, #101a36 50%, #0c1026 100%);
}

.ui {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.topLeft {
  position: absolute;
  top: 10px;
  left: 10px;
  pointer-events: auto;
  z-index: 5;
}

.topCenterBrand {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  pointer-events: none;
}

.brandImg {
  width: 300px;
  height: auto;
  display: block;
  filter: drop-shadow(0 10px 22px rgba(0,0,0,0.55));
}

.topRight {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  z-index: 5;
}

.balances {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 14px;
  background: rgba(9, 20, 42, 0.78);
  border: 1px solid rgba(145, 204, 255, 0.26);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.25);
}

.bal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 900;
  letter-spacing: 0.02em;
  font-size: 13px;
  font-family: "Orbitron", "Rajdhani", sans-serif;
}

.bal__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

.bal__shape {
  width: 12px;
  height: 12px;
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.10), 0 8px 18px rgba(0,0,0,0.35);
}

.bal__shape--coin {
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #fff2b3 0%, #ffd166 45%, #ff8c42 100%);
}

.bal__shape--crystal {
  background: linear-gradient(135deg, #40f3ff, #ff7ad9);
  clip-path: polygon(50% 0%, 90% 50%, 50% 100%, 10% 50%);
}

.touchControls {
  position: absolute;
  inset: 0;
  display: none;
  pointer-events: none;
  z-index: 6;
}

.touchControls.touchControls--active {
  display: block;
}

@media (pointer: fine) {
  .touchControls {
    display: none !important;
  }
}

.touchControls__actions {
  position: absolute;
  bottom: 20px;
  right: 20px;
  display: grid;
  gap: 10px;
  justify-items: end;
}

.touchBtn--shoot {
  width: 68px;
  height: 68px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.08em;
  background: radial-gradient(circle at 30% 30%, #ff7a7a, #ff3b3b 55%, #b31212 100%);
  color: #fff;
  border: 2px solid rgba(255,255,255,0.25);
  text-transform: uppercase;
}

.touchBtn--assist {
  width: 82px;
  height: 82px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0.04em;
  text-align: center;
  white-space: pre-line;
  color: #eaf6ff;
  border: 2px solid rgba(64, 243, 255, 0.4);
  background:
    radial-gradient(circle at center, rgba(10, 15, 35, 0.94) 56%, rgba(10, 15, 35, 0.7) 58%, transparent 61%),
    conic-gradient(
      rgba(64, 243, 255, 0.95) calc(var(--assist-progress, 0) * 1%),
      rgba(255, 255, 255, 0.18) 0
    );
}

.touchBtn--assist.is-ready {
  border-color: rgba(68, 255, 215, 0.62);
  color: #d7fff7;
}

.touchBtn--assist.is-active {
  border-color: rgba(255, 209, 102, 0.7);
  color: #fff5c6;
}

.touchBtn--assist:disabled {
  opacity: 0.82;
}

.touchBtn {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(10, 15, 35, 0.85);
  color: #f5f7ff;
  font-weight: 900;
  font-size: 18px;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
}

.touchBtn.touchBtn--assist {
  width: 82px;
  height: 82px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.05;
  letter-spacing: 0.04em;
  text-align: center;
  white-space: pre-line;
  color: #eaf6ff;
  border: 2px solid rgba(64, 243, 255, 0.4);
  background:
    radial-gradient(circle at center, rgba(10, 15, 35, 0.94) 56%, rgba(10, 15, 35, 0.7) 58%, transparent 61%),
    conic-gradient(
      rgba(64, 243, 255, 0.95) calc(var(--assist-progress, 0) * 1%),
      rgba(255, 255, 255, 0.18) 0
    );
}

.touchBtn--ability {
  min-width: 92px;
  height: 52px;
  border-radius: 16px;
  border: 1px solid rgba(255, 209, 102, 0.7);
  background: linear-gradient(135deg, rgba(255, 209, 102, 0.4), rgba(255, 138, 61, 0.24));
  color: #fff7d1;
  font-size: 11px;
  letter-spacing: 0.05em;
}

.touchBtn--pause {
  min-width: 76px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(170, 192, 255, 0.55);
  background: rgba(9, 20, 44, 0.86);
  color: #dbe8ff;
  font-size: 11px;
  letter-spacing: 0.05em;
}

.joystick {
  position: absolute;
  bottom: 16px;
  left: 16px;
  width: 140px;
  height: 140px;
  pointer-events: auto;
  touch-action: none;
}

.joystick__base {
  width: 140px;
  height: 140px;
  border-radius: 999px;
  background: rgba(10, 15, 35, 0.65);
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: inset 0 0 0 8px rgba(64,243,255,0.08), 0 20px 40px rgba(0,0,0,0.35);
  display: grid;
  place-items: center;
}

.joystick__stick {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 10px 22px rgba(0,0,0,0.35), inset 0 0 0 3px rgba(64,243,255,0.2);
  transform: translate(0, 0);
  transition: transform 0.06s linear;
}

.menuBtn {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(13, 18, 36, 0.78);
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  backdrop-filter: blur(8px);
}

.menuBtn:hover {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.22);
  box-shadow: 0 10px 20px rgba(0,0,0,0.25);
}

.btnAuth, .btnAuthGhost {
  border: 0;
  padding: 10px 14px;
  font-size: 14px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  pointer-events: auto;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.btnAuth {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b0f1f;
}

.btnAuthGhost {
  background: rgba(10, 15, 35, 0.9);
  border: 1px solid rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.88);
}

.avatarBtn {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(10, 15, 35, 0.9);
  cursor: pointer;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 0;
}

.avatarImg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatarFallback {
  font-weight: 900;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.92);
  background: radial-gradient(circle at 30% 20%, rgba(64,243,255,0.35), rgba(255,122,217,0.14) 60%, rgba(0,0,0,0) 100%);
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.accountBox {
  display: grid;
  gap: 10px;
}

.accountGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.accountItem {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(13, 18, 36, 0.72);
  border: 1px solid rgba(255,255,255,0.08);
}

.accountLabel {
  opacity: 0.72;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 800;
}

.accountValue {
  margin-top: 6px;
  font-size: 16px;
  font-weight: 800;
  color: rgba(255,255,255,0.95);
  word-break: break-word;
}

.accountValue small {
  opacity: 0.75;
  font-weight: 700;
}

.sideMenu {
  margin-top: 8px;
  width: min(280px, 80vw);
  padding: 12px;
  border-radius: 18px;
  max-height: 72vh;
  overflow-y: auto;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(10, 15, 35, 0.96);
  box-shadow: 0 25px 60px rgba(0,0,0,0.45);
  display: grid;
  gap: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(64,243,255,0.4) rgba(0,0,0,0.2);
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior: contain;
}

.sideMenu button {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
}

.sideMenu button:hover {
  border-color: rgba(64,243,255,0.4);
  background: rgba(64,243,255,0.12);
}

.sideSection {
  margin-top: 4px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
  display: grid;
  gap: 8px;
}

.sideSection__title {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  opacity: 0.78;
  text-transform: uppercase;
}

.sideToggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}

.sideToggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #40f3ff;
}

.sideRange {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
}

.sideRange__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.sideRange input[type="range"] {
  width: 100%;
}

.sideRange strong {
  min-width: 38px;
  text-align: right;
  font-size: 12px;
  color: rgba(64,243,255,0.95);
}

@media (pointer: fine) {
  #menuFullscreenBtn,
  #sideFullscreenBtn {
    display: none;
  }
}

.hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 12px 14px;
}

.hud__row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.hud__item {
  background: var(--panel);
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(8px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

#credits {
  color: #ffd166;
}

#crystals {
  color: #40f3ff;
}

#topCredits {
  color: #ffd166;
}

#topCrystals {
  color: #40f3ff;
}

.hud__item--wide {
  flex: 1 1 100%;
  order: 10;
}

.hud__item--credits,
.hud__item--crystals {
  padding: 6px 10px;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.hud__item--ability {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hud__item--ability strong {
  color: #ffd88a;
  font-size: 12px;
  letter-spacing: 0.05em;
}

@media (max-width: 720px) {
  .hud__row {
    gap: 6px;
  }

  .hud__item {
    padding: 6px 8px;
    font-size: 11px;
  }

  .hud__item--wide {
    font-size: 11px;
  }
}

.bars {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  width: min(420px, 90%);
}

.bar {
  display: grid;
  grid-template-columns: 64px 1fr;
  align-items: center;
  gap: 10px;
}

.bar__label {
  font-size: 12px;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.bar__track {
  height: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.bar__fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--good), var(--accent));
}

.bar__fill--hull {
  background: linear-gradient(90deg, var(--warn), var(--bad));
}

.rotateIcon {
  width: 120px;
  height: 120px;
  margin: 0 auto 12px;
  border-radius: 26px;
  border: 2px solid rgba(255,255,255,0.25);
  position: relative;
  background: rgba(10, 15, 35, 0.4);
  box-shadow: inset 0 0 0 6px rgba(64,243,255,0.08);
}

.rotateIcon::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 64px;
  height: 100px;
  border-radius: 16px;
  border: 2px solid rgba(255,255,255,0.6);
  transform: translate(-50%, -50%) rotate(0deg);
  animation: rotatePhone 1.8s ease-in-out infinite;
  box-shadow: 0 10px 24px rgba(64,243,255,0.2);
}

.rotateIcon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.55);
  border-left-color: transparent;
  border-bottom-color: transparent;
  transform: translate(-50%, -50%) rotate(45deg);
  animation: rotateArrow 1.8s ease-in-out infinite;
}

@keyframes rotatePhone {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  50% { transform: translate(-50%, -50%) rotate(90deg); }
  100% { transform: translate(-50%, -50%) rotate(0deg); }
}

@keyframes rotateArrow {
  0% { opacity: 0.2; transform: translate(-50%, -50%) rotate(45deg); }
  50% { opacity: 1; transform: translate(-50%, -50%) rotate(135deg); }
  100% { opacity: 0.2; transform: translate(-50%, -50%) rotate(45deg); }
}

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(6, 12, 26, 0.8);
  backdrop-filter: blur(10px);
  pointer-events: auto;
  z-index: 20;
}

.panel {
  width: min(960px, 92vw);
  max-height: 90vh;
  text-align: center;
  padding: 24px 28px;
  background: rgba(9, 20, 41, 0.94);
  border-radius: 24px;
  border: 1px solid rgba(139, 198, 255, 0.26);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.48);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior: contain;
}

.panel--wide {
  width: min(1100px, 96vw);
  max-height: 90vh;
  text-align: left;
}

.titleRow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.panel h1 {
  margin: 0;
  font-size: 56px;
  color: var(--accent);
  text-shadow: 0 12px 28px rgba(255, 199, 116, 0.32);
  font-family: "Orbitron", "Rajdhani", sans-serif;
  letter-spacing: 0.02em;
}

.panel h2 {
  margin: 0;
  font-size: 34px;
  color: var(--accent);
  font-family: "Orbitron", "Rajdhani", sans-serif;
  letter-spacing: 0.02em;
}

.panel h3 {
  margin: 0 0 10px;
  font-size: 18px;
  font-family: "Orbitron", "Rajdhani", sans-serif;
  letter-spacing: 0.01em;
}

.sub {
  margin: 10px 0 18px;
  opacity: 0.85;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 198, 116, 0.16);
  border: 1px solid rgba(255, 198, 116, 0.33);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 12px;
  font-family: "Orbitron", "Rajdhani", sans-serif;
}

.fine {
  margin-top: 14px;
  opacity: 0.75;
  font-size: 13px;
}

.menuBrand {
  display: none;
  width: min(80vw, 360px);
  margin: 8px auto 10px;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,0.55));
}

.menuGrid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.menuGrid .menuPrimary {
  background: linear-gradient(135deg, #ffd166, #ff9f43);
  color: #271703;
  box-shadow: 0 14px 26px rgba(255, 159, 67, 0.28);
}

.btn, .btnGhost, .menuGrid button, .panel button {
  border: 0;
  padding: 12px 16px;
  font-size: 15px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease, border-color 0.15s ease;
  font-family: "Orbitron", "Rajdhani", sans-serif;
  letter-spacing: 0.02em;
}

.btn, .menuGrid button, .panel button {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b0f1f;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28);
}

.btnGhost {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(136, 199, 255, 0.34);
  color: var(--text);
}

.btn:hover, .btnAuth:hover, .menuGrid button:hover, .panel button:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.35);
}

.btnGhost:hover, .btnAuthGhost:hover {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.22);
  box-shadow: 0 12px 22px rgba(0,0,0,0.25);
}

.btn:active, .btnGhost:active, .btnAuth:active, .btnAuthGhost:active, button:active {
  transform: translateY(0);
}

.btn:focus-visible, .btnGhost:focus-visible, .btnAuth:focus-visible, .btnAuthGhost:focus-visible, button:focus-visible, .input:focus-visible {
  outline: 2px solid rgba(64,243,255,0.65);
  outline-offset: 2px;
}

.btn:disabled, .btnGhost:disabled, button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.hidden {
  display: none;
}

body.portal-mode .portal-hide {
  display: none !important;
}

.landscapeHint {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 12;
  pointer-events: none;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: rgba(255,255,255,0.95);
  background: rgba(10, 15, 35, 0.88);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 10px 20px rgba(0,0,0,0.35);
}

.toast {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 20;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  background: rgba(11, 16, 34, 0.94);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 16px 30px rgba(0,0,0,0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.toast.toast--show {
  opacity: 1;
}

.consentBanner {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: min(920px, calc(100vw - 20px));
  z-index: 24;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(10, 15, 35, 0.96);
  box-shadow: 0 16px 34px rgba(0,0,0,0.38);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  pointer-events: auto;
}

.consentBanner span {
  font-size: 12px;
  opacity: 0.9;
}

.consentBanner__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.newRecordBadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.2);
  background: linear-gradient(135deg, rgba(255, 209, 102, 0.22), rgba(255, 122, 217, 0.2));
  color: #ffe8a8;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: newRecordPulse 0.8s ease-out 1;
}

@keyframes newRecordPulse {
  0% { transform: scale(0.8); opacity: 0; }
  45% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

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

.tierPicker button.tierPicker__active {
  border-color: rgba(64,243,255,0.45);
  background: rgba(64,243,255,0.16);
}

.unlockFx {
  margin: 0 0 10px;
  padding: 8px 10px;
  text-align: center;
  border-radius: 12px;
  color: #fff8cf;
  font-weight: 900;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, rgba(68,255,215,0.24), rgba(255,209,102,0.24));
  border: 1px solid rgba(255,255,255,0.2);
  animation: unlockGlow 0.8s ease-out 1;
}

@keyframes unlockGlow {
  0% { opacity: 0; transform: translateY(8px); }
  50% { opacity: 1; transform: translateY(0); }
  100% { opacity: 1; transform: translateY(0); }
}

.missionBoard {
  margin: 12px 0 8px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.2);
  display: grid;
  gap: 8px;
}

.missionBoardActions {
  margin-bottom: 8px;
  display: flex;
  justify-content: flex-end;
}

.guestSyncBanner {
  margin: 12px 0 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  pointer-events: auto;
}

.guestSyncBanner__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.missionBoard__title {
  font-size: 12px;
  letter-spacing: 0.08em;
  opacity: 0.75;
  text-transform: uppercase;
  font-weight: 900;
}

.missionBoard__row {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.missionBoard__row strong {
  font-size: 13px;
}

.missionBoard__row span {
  opacity: 0.8;
  font-size: 12px;
}

.dailyLadder {
  margin: 12px 0 14px;
  display: grid;
  gap: 8px;
}

.dailyLadder__item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.dailyLadder__item.is-current {
  border-color: rgba(64,243,255,0.45);
  background: rgba(64,243,255,0.12);
}

.dailyLadder__item.is-claimed {
  opacity: 0.65;
}

.adReward {
  margin: 14px auto 6px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.08);
}

.adReward__title {
  font-weight: 800;
  margin-bottom: 6px;
}

.adReward__text {
  opacity: 0.8;
  font-size: 13px;
  margin-bottom: 10px;
}

.infoPage {
  padding: 16px;
}

.infoPanel {
  width: min(1100px, 96vw);
  margin: 0 auto;
  padding: 20px;
  border-radius: 18px;
  background: rgba(10, 15, 35, 0.92);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 25px 60px rgba(0,0,0,0.45);
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.infoHeader {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: 10px;
}

.infoBrand {
  width: 200px;
  max-width: 60vw;
}

.infoTitle h1 {
  margin: 0;
  font-size: 36px;
}

.infoBack {
  text-decoration: none;
}

.infoSection {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.infoSection h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.infoSection h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.infoSection ul {
  margin: 6px 0 0 18px;
}

.infoShips {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.shipCard {
  padding: 12px;
  border-radius: 14px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.08);
}

.shipCard__art svg {
  width: 100%;
  height: 180px;
}

.shipCard__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.fsHint {
  position: absolute;
  left: 50%;
  top: 12px;
  transform: translateX(-50%);
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(10, 15, 35, 0.9);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.95);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.02em;
  z-index: 8;
  pointer-events: none;
  box-shadow: 0 12px 28px rgba(0,0,0,0.35);
}

@media (max-width: 720px) {
  .fsHint {
    top: 8px;
    font-size: 11px;
    padding: 6px 10px;
  }

  .consentBanner {
    bottom: 10px;
    flex-direction: column;
    align-items: stretch;
  }

  .consentBanner__actions {
    justify-content: stretch;
  }

  .consentBanner__actions .btn,
  .consentBanner__actions .btnGhost {
    width: 100%;
  }
}

.panelTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panelTop__right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hangarGrid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}

.hangarActions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
}

#hangarHomeBtn {
  min-width: 150px;
}

#hangar .hangarActions,
#hangar .hangarActions * {
  pointer-events: auto;
}

.card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.stats {
  display: grid;
  gap: 6px;
}

.shipPicker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 10px 0 12px;
}

.shipModel {
  width: 100%;
  height: 220px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.2);
  display: grid;
  place-items: center;
  margin: 8px 0 12px;
  overflow: hidden;
  position: relative;
}

.shipModel svg {
  width: 100%;
  height: 100%;
}

@media (max-width: 720px) {
  .shipModel {
    height: 180px;
  }
}

.shipBtn {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  cursor: pointer;
  font-weight: 900;
}

.shipBtn--active {
  background: rgba(64, 243, 255, 0.18);
  border-color: rgba(64, 243, 255, 0.3);
}

.shipBtn--locked {
  opacity: 0.6;
}

.stats .statRow {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-weight: 700;
}

.statBars {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.statBarRow {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  opacity: 0.95;
}

.statBar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  overflow: hidden;
}

.statBar__fill {
  height: 100%;
  background: linear-gradient(90deg, #40f3ff, #ff7ad9);
}

.list {
  display: grid;
  gap: 10px;
  max-height: 56vh;
  overflow: auto;
  padding-right: 6px;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior: contain;
}

.upgRow {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.06);
}

.upgName {
  font-weight: 800;
}

.upgDesc {
  opacity: 0.75;
  font-size: 12px;
  margin-top: 4px;
}

.treeGrid {
  display: grid;
  gap: 10px;
  max-height: 34vh;
  overflow: auto;
  padding-right: 4px;
}

.treeNode {
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(8, 16, 35, 0.6);
  display: grid;
  gap: 6px;
}

.treeNode strong {
  font-size: 13px;
  letter-spacing: 0.04em;
}

.treeNode__meta {
  font-size: 12px;
  opacity: 0.78;
}

.treeNode__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.achievementPanel {
  display: grid;
  gap: 8px;
  max-height: 24vh;
  overflow: auto;
  padding-right: 4px;
}

.achievementRow {
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.16);
  font-size: 12px;
}

.achievementRow.is-unlocked {
  border-color: rgba(104, 244, 177, 0.45);
  background: rgba(59, 142, 108, 0.22);
}

.tutorialPanel {
  max-width: 560px;
  text-align: left;
}

.diagnostics {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 40;
  pointer-events: none;
  background: rgba(5, 10, 24, 0.86);
  border: 1px solid rgba(64, 243, 255, 0.28);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 11px;
  line-height: 1.4;
  color: #d6f2ff;
  min-width: 130px;
}

.store {
  display: grid;
  gap: 10px;
}

.storeRow {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.06);
}

.storeName {
  font-weight: 800;
}

.storeDesc {
  opacity: 0.75;
  font-size: 12px;
  margin-top: 4px;
}

.row {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
}

.tabs {
  display: flex;
  gap: 10px;
  margin: 10px 0 14px;
}

.tab {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
}

.tab--active {
  background: rgba(64, 243, 255, 0.18);
  border-color: rgba(64, 243, 255, 0.3);
}

.leaderboard {
  display: grid;
  gap: 6px;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior: contain;
}

.lbRow {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.06);
}

.lbRank {
  font-weight: 900;
  color: rgba(255,255,255,0.75);
}

.lbName {
  font-weight: 900;
}

.lbScore {
  font-weight: 900;
}

.onlineGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.settingsGrid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 14px;
}

.settingRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.16);
  font-weight: 700;
}

.settingRow input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #40f3ff;
}

.settingBlock {
  margin-top: 10px;
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}

.settingBlock input[type="range"] {
  width: 100%;
}

.settingsPanel .input {
  width: 100%;
  max-width: 100%;
}

.input {
  width: 260px;
  max-width: 42vw;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.2);
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input:focus {
  border-color: rgba(64,243,255,0.6);
  box-shadow: 0 0 0 3px rgba(64,243,255,0.12);
}

.pickGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.pickCard {
  padding: 14px;
  border-radius: 16px;
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.08);
}

.pickCard h3 {
  margin: 0 0 6px;
}

.pickCard p {
  margin: 0 0 10px;
  opacity: 0.8;
  font-size: 13px;
}

.missionList {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  max-height: 60vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior: contain;
}

.missionRow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.06);
}

.missionTitle {
  font-weight: 900;
}

.missionDesc {
  opacity: 0.75;
  font-size: 12px;
  margin-top: 4px;
}

.missionBadge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  opacity: 0.85;
  font-size: 12px;
}

.missionLock {
  opacity: 0.7;
  font-weight: 800;
}

@media (max-width: 980px) {
  .brandImg {
    width: min(56vw, 280px);
  }

  .balances {
    padding: 6px 9px;
    gap: 7px;
  }

  .hangarGrid {
    grid-template-columns: 1fr;
  }

  .pickGrid {
    grid-template-columns: 1fr;
  }

  .menuGrid {
    grid-template-columns: 1fr;
  }

  .onlineGrid {
    grid-template-columns: 1fr;
  }

  .settingsGrid {
    grid-template-columns: 1fr;
  }

  .guestSyncBanner {
    flex-direction: column;
    align-items: stretch;
  }

  .guestSyncBanner__actions {
    justify-content: flex-end;
  }
}

@media (max-width: 720px) {
  .panel,
  .panel--wide {
    max-height: 86vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .pickGrid {
    max-height: 52vh;
    overflow-y: auto;
  }

  .topRight {
    gap: 6px;
  }

  .balances {
    padding: 6px 8px;
  }

  .bal__label {
    display: none;
  }

  .brandImg {
    width: min(60vw, 240px);
  }
}

.touchControls.hidden {
  display: none;
}

@media (max-width: 720px) {
  .panel,
  .panel--wide {
    max-height: 86vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .pickGrid {
    max-height: 52vh;
    overflow-y: auto;
  }

  body[data-state="menu"] .topLeft,
  body[data-state="menu"] .topRight,
  body[data-state="menu"] .topCenterBrand {
    display: none;
  }

  .menuBrand {
    display: block;
  }

  .panel--wide {
    max-height: 86vh;
    overflow: auto;
  }

  .panel h1 {
    font-size: 40px;
  }

  .pill {
    font-size: 10px;
  }

  .joystick {
    width: 120px;
    height: 120px;
    left: 12px;
    bottom: 12px;
  }

  .joystick__base {
    width: 120px;
    height: 120px;
  }

  .joystick__stick {
    width: 48px;
    height: 48px;
  }

  .touchBtn--shoot {
    width: 60px;
    height: 60px;
  }

  .touchBtn--ability {
    min-width: 82px;
    height: 46px;
    font-size: 10px;
  }

  .touchBtn--pause {
    min-width: 66px;
    height: 40px;
    font-size: 10px;
  }
}

@media (max-height: 700px) {
  .panel {
    padding: 16px 18px;
  }

  .panel h1 {
    font-size: 34px;
  }

  .panel h2 {
    font-size: 26px;
  }

  .menuGrid button,
  .panel button {
    padding: 10px 12px;
  }
}

@media (pointer: coarse) {
  body {
    overflow: hidden;
    touch-action: manipulation;
  }
}

.gameRoot {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  border-radius: 0;
  box-shadow: none;
}

.ship3d-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.ship3d-layer canvas {
  width: 100%;
  height: 100%;
  display: block;
}

@media (pointer: coarse) {
  .panel,
  .panel--wide {
    max-height: 86vh;
    overflow-y: auto;
  }
}

.gameRoot:fullscreen {
  width: 100vw;
  height: 100vh;
}

.gameRoot:fullscreen canvas#game,
.gameRoot:fullscreen .ui {
  width: 100vw;
  height: 100vh;
  aspect-ratio: auto;
}

.gameRoot:fullscreen canvas#game {
  border-radius: 0;
}

body.fullscreen-mode {
  overflow: hidden;
  touch-action: manipulation;
}
body[data-state="run"] .hud__item--credits,
body[data-state="run"] .hud__item--crystals {
  display: none;
}

body[data-state="run"] .topCenterBrand {
  display: none;
}

body[data-state="run"] .topRight {
  display: none;
}

body[data-state="menu"] .topLeft,
body[data-state="hangar"] .topLeft,
body[data-state="leaderboard"] .topLeft,
body[data-state="campaign"] .topLeft,
body[data-state="online"] .topLeft,
body[data-state="account"] .topLeft,
body[data-state="settings"] .topLeft,
body[data-state="pick"] .topLeft,
body[data-state="over"] .topLeft {
  display: none;
}

body[data-state="menu"] .topCenterBrand,
body[data-state="hangar"] .topCenterBrand,
body[data-state="leaderboard"] .topCenterBrand,
body[data-state="campaign"] .topCenterBrand,
body[data-state="online"] .topCenterBrand,
body[data-state="account"] .topCenterBrand,
body[data-state="settings"] .topCenterBrand,
body[data-state="pick"] .topCenterBrand,
body[data-state="over"] .topCenterBrand {
  display: none;
}

body[data-state="menu"] .topRight,
body[data-state="hangar"] .topRight,
body[data-state="leaderboard"] .topRight,
body[data-state="campaign"] .topRight,
body[data-state="online"] .topRight,
body[data-state="account"] .topRight,
body[data-state="settings"] .topRight,
body[data-state="pick"] .topRight,
body[data-state="over"] .topRight {
  display: none;
}

body.hangar-open .topLeft,
body.hangar-open .topCenterBrand,
body.hangar-open .topRight {
  display: none !important;
}

@media (pointer: coarse) {
  body[data-state="hangar"] {
    touch-action: pan-y;
  }

  #hangar.overlay:not(.hidden) {
    z-index: 25;
    display: grid;
    align-items: stretch;
    justify-items: stretch;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }

  #hangar .panel.panel--wide {
    width: 100vw;
    max-width: 100vw;
    min-height: 100vh;
    min-height: 100dvh;
    max-height: none;
    border-radius: 0;
    margin: 0;
    padding: calc(10px + env(safe-area-inset-top)) 10px calc(28px + env(safe-area-inset-bottom));
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
  }

  #hangar .panelTop {
    position: static;
    z-index: 3;
    background: rgba(10, 15, 35, 0.98);
    padding: 8px 2px 10px;
    margin: 0 0 10px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  #hangar .panelTop h2 {
    font-size: clamp(22px, 7vw, 28px);
  }

  #hangar .panelTop__right {
    gap: 6px;
    flex-wrap: wrap;
    justify-content: space-between;
    width: 100%;
  }

  #hangar .hangarGrid {
    grid-template-columns: 1fr;
    gap: 12px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
  }

  #hangar .card {
    padding: 10px;
    border-radius: 12px;
    overflow: visible;
  }

  #hangar .card h3 {
    margin-bottom: 8px;
    font-size: 22px;
  }

  #hangar .shipModel {
    height: clamp(150px, 34vh, 220px);
    margin: 8px 0;
  }

  #hangar .tierPicker {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  #hangar .shipPicker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 8px 0 10px;
    max-height: none;
    overflow: visible;
  }

  #hangar .shipBtn {
    min-height: 46px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.2;
    padding: 10px 8px;
    white-space: normal;
    word-break: break-word;
  }

  #hangar .stats {
    gap: 4px;
  }

  #hangar .stats .statRow {
    font-size: 13px;
    gap: 8px;
    align-items: flex-start;
  }

  #hangar .stats .statRow span:last-child {
    text-align: right;
    max-width: 58%;
  }

  #hangar .statBarRow {
    grid-template-columns: 62px 1fr;
    gap: 8px;
    font-size: 11px;
  }

  #hangar .list {
    max-height: none;
    overflow: auto;
    padding-right: 0;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }

  #hangar .upgRow {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
  }

  #hangar .upgRow .btn {
    width: 100%;
  }

  #hangar .adReward .row {
    flex-direction: column;
    align-items: stretch;
  }

  #hangar .adReward .row .btn,
  #hangar .adReward .row .btnGhost {
    width: 100%;
  }

  #hangar .storeRow {
    flex-direction: column;
    align-items: stretch;
  }

  #hangar .storeRow .btn {
    width: 100%;
  }

  #hangar #pilotPill {
    font-size: 10px;
    padding: 5px 8px;
  }

  #hangar #backFromHangarBtn {
    min-width: 120px;
    position: relative;
    z-index: 4;
    pointer-events: auto;
    touch-action: manipulation;
  }

  #hangar .hangarActions {
    position: static;
    z-index: 3;
    margin-top: 12px;
    padding-top: 0;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
    justify-content: center;
    background: transparent;
  }

  #hangar #hangarHomeBtn {
    width: min(420px, 92vw);
    min-height: 48px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 800;
  }
}

@media (max-width: 420px) and (pointer: coarse) {
  #hangar .panel.panel--wide {
    padding-left: 8px;
    padding-right: 8px;
  }

  #hangar .panelTop {
    position: static;
    padding-top: 4px;
  }

  #hangar .panelTop h2 {
    font-size: 24px;
  }

  #hangar .panelTop__right {
    width: 100%;
    justify-content: space-between;
  }

  #hangar #pilotPill {
    display: none;
  }

  #hangar .shipPicker {
    grid-template-columns: 1fr;
  }

  #hangar .statBarRow {
    grid-template-columns: 56px 1fr;
  }
}

@media (orientation: portrait) and (pointer: coarse) {
  .topLeft {
    top: 8px;
    left: 8px;
  }

  .hud {
    padding: 8px;
  }

  .hud__item {
    font-size: 10px;
    padding: 5px 7px;
  }

  .bars {
    width: min(96vw, 420px);
  }

  .joystick {
    left: 8px;
    bottom: 10px;
    width: 112px;
    height: 112px;
  }

  .joystick__base {
    width: 112px;
    height: 112px;
  }

  .touchControls__actions {
    right: 10px;
    bottom: 12px;
  }

  .touchBtn--shoot {
    width: 58px;
    height: 58px;
  }

  .touchBtn--ability {
    min-width: 78px;
    height: 44px;
  }

  .touchBtn--pause {
    min-width: 62px;
    height: 38px;
  }

  .landscapeHint {
    bottom: 86px;
    font-size: 11px;
    padding: 7px 10px;
  }
}

/* Mobile Hangar parity pass: keep desktop structure, stack sections, preserve touchability. */
@media (pointer: coarse) {
  #hangar.overlay.hidden {
    display: none !important;
  }

  #hangar.overlay:not(.hidden) {
    display: block;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  #hangar .panel.panel--wide {
    width: min(980px, 100vw);
    max-width: 100vw;
    min-height: 100dvh;
    max-height: none;
    margin: 0 auto;
    border-radius: 0;
    padding: calc(10px + env(safe-area-inset-top)) 12px calc(16px + env(safe-area-inset-bottom));
    overflow: visible;
  }

  #hangar .panelTop {
    position: sticky;
    top: 0;
    z-index: 8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 12px;
    padding: 8px 2px 10px;
    background: linear-gradient(180deg, rgba(10, 15, 35, 0.96), rgba(10, 15, 35, 0.88));
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
  }

  #hangar .panelTop__right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    width: auto;
  }

  #hangar .hangarGrid {
    grid-template-columns: 1fr;
    gap: 12px;
    padding-bottom: 0;
  }

  #hangar .card {
    padding: 12px;
    border-radius: 14px;
    overflow: visible;
  }

  #hangar .shipModel {
    height: clamp(180px, 32vh, 240px);
    margin: 8px 0 10px;
  }

  #hangar .shipPicker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 8px 0 10px;
    max-height: none;
    overflow: visible;
  }

  #hangar .shipBtn,
  #hangar #backFromHangarBtn,
  #hangar #hangarHomeBtn,
  #hangar .upgRow .btn,
  #hangar .storeRow .btn,
  #hangar .adReward .row .btn,
  #hangar .adReward .row .btnGhost {
    min-height: 48px;
  }

  #hangar .list {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  #hangar .upgRow {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
  }

  #hangar .adReward .row,
  #hangar .storeRow {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  #hangar .hangarActions {
    margin-top: 12px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
    justify-content: stretch;
  }

  #hangar #hangarHomeBtn {
    width: 100%;
  }
}

@media (max-width: 460px) and (pointer: coarse) {
  #hangar .panel.panel--wide {
    padding-left: 8px;
    padding-right: 8px;
  }

  #hangar .panelTop h2 {
    font-size: 24px;
  }

  #hangar #pilotPill {
    display: none;
  }

  #hangar .shipPicker {
    grid-template-columns: 1fr;
  }
}

