:root {
  --safe-top: max(
    calc(max(env(safe-area-inset-top, 0px), var(--tg-safe-area-inset-top, 0px)) + var(--tg-content-safe-area-inset-top, 0px) + 8px),
    var(--tg-js-safe-top, 8px)
  );
  --safe-bottom: max(
    calc(max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px)) + var(--tg-content-safe-area-inset-bottom, 0px) + 8px),
    var(--tg-js-safe-bottom, 8px)
  );
  --safe-left: max(
    calc(max(env(safe-area-inset-left, 0px), var(--tg-safe-area-inset-left, 0px)) + var(--tg-content-safe-area-inset-left, 0px) + 8px),
    var(--tg-js-safe-left, 8px)
  );
  --safe-right: max(
    calc(max(env(safe-area-inset-right, 0px), var(--tg-safe-area-inset-right, 0px)) + var(--tg-content-safe-area-inset-right, 0px) + 8px),
    var(--tg-js-safe-right, 8px)
  );
}

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

html,
body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background: #07131c;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #f6f1e7;
  touch-action: none;
}

#ocean-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: block;
  z-index: 1;
}

/* Верхняя панель режимов и пресетов */
.top-hud {
  position: fixed;
  top: var(--safe-top);
  left: var(--safe-left);
  right: var(--safe-right);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.pill-group {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(8, 20, 30, 0.68);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 208, 130, 0.22);
  border-radius: 999px;
  padding: 4px;
  pointer-events: auto;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
  min-width: 0;
}

.pill-group::-webkit-scrollbar {
  display: none;
}

.pill-btn {
  border: none;
  background: transparent;
  color: rgba(246, 241, 231, 0.85);
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.pill-btn.active {
  background: linear-gradient(135deg, #e59b38, #c26418);
  color: #fff;
  box-shadow: 0 2px 10px rgba(229, 155, 56, 0.4);
}

.stats-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(8, 20, 30, 0.68);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 208, 130, 0.2);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  pointer-events: auto;
  flex-shrink: 0;
  white-space: nowrap;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-sep {
  opacity: 0.3;
}

.hud-right-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  pointer-events: auto;
}

.presets-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.hud-nav-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  width: 100%;
  pointer-events: auto;
}

.hud-nav-bar .preset-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  padding: 5px 4px;
  border-radius: 12px;
  min-height: 36px;
  position: relative;
}

.nav-main {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.nav-sub {
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.1;
  opacity: 0.88;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

@media (min-width: 681px) {
  .hud-nav-bar .preset-chip {
    flex-direction: row;
    gap: 6px;
    padding: 6px 10px;
    min-height: 31px;
    border-radius: 999px;
  }
  .nav-main {
    font-size: 12px;
  }
  .nav-sub {
    font-size: 10.5px;
  }
}

.hud-objective-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  flex: 1 1 auto;
  min-width: 0;
  pointer-events: none;
}

.hud-goal-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  pointer-events: auto;
}

.hud-goal-row .preset-chip {
  padding: 4px 9px;
  font-size: 11px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preset-chip {
  border: 1px solid rgba(255, 210, 140, 0.22);
  background: rgba(9, 22, 33, 0.58);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #f3ead8;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
}

.preset-chip.active {
  border-color: #f7b955;
  background: rgba(229, 155, 56, 0.28);
  color: #ffd88a;
}

.action-icons {
  display: flex;
  flex-shrink: 0;
  gap: 4px;
  pointer-events: auto;
}

.icon-btn {
  width: 31px;
  height: 31px;
  border-radius: 50%;
  border: 1px solid rgba(255, 210, 140, 0.25);
  background: rgba(8, 20, 30, 0.68);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #f6f1e7;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.icon-btn.active {
  border-color: #fde047;
  background: rgba(245, 158, 11, 0.35);
}

.preset-chip.contract-pill {
  border-color: rgba(251, 191, 36, 0.55);
  background: rgba(56, 30, 6, 0.72);
  color: #fde68a;
}

.preset-chip.online-pill {
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(8, 42, 54, 0.72);
  color: #a5f3fc;
}

/* Подстрока верхнего HUD: радар слева + боевой тост справа без наложений */
.hud-sub-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  pointer-events: none;
}

/* Всплывающее боевое уведомление */
.combat-toast {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  transform: translateY(-6px);
  align-self: flex-start;
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(360px, 100%);
  background: rgba(12, 26, 38, 0.88);
  border: 1px solid rgba(247, 185, 85, 0.55);
  color: #ffd984;
  padding: 6px 11px;
  border-radius: 13px;
  font-size: 11.5px;
  font-weight: 700;
  z-index: 15;
  opacity: 0;
  pointer-events: none;
  transition: all 0.22s ease;
  white-space: normal;
  text-align: left;
  line-height: 1.28;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.combat-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Нижняя панель управления кораблем */
.bottom-hud {
  position: fixed;
  bottom: var(--safe-bottom);
  left: var(--safe-left);
  right: var(--safe-right);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.ship-deck-panel {
  max-width: 500px;
  width: 100%;
  margin: 0 auto;
  background: rgba(8, 19, 28, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 206, 126, 0.24);
  border-radius: 20px;
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  pointer-events: auto;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.fire-row {
  display: grid;
  grid-template-columns: 1fr 1.14fr 1fr 0.9fr;
  gap: 6px;
}

.fire-btn {
  min-height: 46px;
  border: 1px solid rgba(255, 165, 82, 0.42);
  background: rgba(180, 62, 22, 0.76);
  color: #fff3e2;
  font-size: 12px;
  font-weight: 700;
  padding: 9px 6px;
  border-radius: 13px;
  cursor: pointer;
  touch-action: manipulation;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: transform 0.1s ease, background 0.15s ease;
}

.fire-btn:active {
  transform: scale(0.95);
}

.fire-btn.main-salvo {
  background: linear-gradient(135deg, #e04f1a, #a82010);
  border-color: #ffbe6b;
  box-shadow: 0 3px 14px rgba(224, 79, 26, 0.45);
  font-size: 13px;
  font-weight: 800;
}

.helm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

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

.sails-auto-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 7px;
}

.helm-box {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.helm-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: rgba(246, 241, 231, 0.85);
}

.rudder-reset-btn {
  border: 1px solid rgba(255, 206, 122, 0.3);
  background: rgba(255, 255, 255, 0.08);
  color: #ffd98e;
  font-size: 10.5px;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 999px;
  cursor: pointer;
}

#rudder-slider {
  width: 100%;
  accent-color: #f0a43c;
  height: 24px;
  cursor: pointer;
}

#rudder-slider::-webkit-slider-thumb {
  width: 22px;
  height: 22px;
  cursor: pointer;
}

.sails-box {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  background: rgba(0, 0, 0, 0.32);
  padding: 3px;
  border-radius: 11px;
}

.sail-btn {
  border: 1px solid transparent;
  background: transparent;
  color: rgba(246, 241, 231, 0.78);
  font-size: 11.5px;
  font-weight: 700;
  min-height: 32px;
  padding: 6px 6px;
  border-radius: 8px;
  cursor: pointer;
  touch-action: manipulation;
}

.sail-btn.active {
  background: rgba(240, 164, 60, 0.28);
  color: #ffd584;
  border: 1px solid rgba(240, 164, 60, 0.5);
}

/* Выдвижная панель настроек шейдеров Noniv/web-ocean */
.settings-drawer {
  position: fixed;
  top: calc(var(--safe-top) + 4px);
  right: var(--safe-right);
  width: min(320px, calc(100vw - var(--safe-left) - var(--safe-right)));
  max-height: calc(100dvh - var(--safe-top) - var(--safe-bottom) - 16px);
  background: rgba(7, 17, 26, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 208, 130, 0.28);
  border-radius: 18px;
  padding: 12px 14px;
  z-index: 25;
  overflow-y: auto;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.drawer-header h3 {
  font-size: 13.5px;
  color: #ffd27d;
}

.close-btn {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  touch-action: manipulation;
}

.sliders-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.slider-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.slider-head {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: rgba(246, 241, 231, 0.88);
}

.slider-head strong {
  color: #ffca6b;
  font-variant-numeric: tabular-nums;
}

.slider-row input[type="range"] {
  width: 100%;
  accent-color: #e59b38;
  height: 18px;
}

.hidden {
  display: none !important;
}

/* Режим чистого экрана (только кнопка глаза остается видимой) */
body.clean-view .top-row,
body.clean-view .presets-row,
body.clean-view .hud-sub-row,
body.clean-view .bottom-hud,
body.clean-view .settings-drawer,
body.clean-view .radar-wrap,
body.clean-view .world-markers {
  opacity: 0;
  pointer-events: none;
}

.restore-ui-fab {
  position: fixed;
  top: var(--safe-top);
  right: var(--safe-right);
  z-index: 30;
  border: 1px solid rgba(255, 210, 140, 0.45);
  background: rgba(8, 20, 30, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff3d6;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

body.clean-view .restore-ui-fab {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* ==== ИГРОВОЙ RPG HUD, РАДАР, МАРКЕРЫ И ВЕРФЬ ==== */
.hud-combat-group {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  flex: 1 1 auto;
}

.ship-chip {
  white-space: nowrap;
  max-width: 118px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wave-pill {
  background: rgba(8, 19, 31, 0.72);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(110, 210, 255, 0.28);
  color: #bde7ff;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.hp-pill {
  position: relative;
  height: 26px;
  min-width: 92px;
  max-width: 122px;
  flex: 1;
  border-radius: 999px;
  background: rgba(15, 22, 31, 0.8);
  border: 1px solid rgba(255, 110, 96, 0.35);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hp-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg, #b91c1c, #ef4444);
  transition: width 0.22s ease, background 0.3s ease;
}

.hp-pill.harbor .hp-fill {
  background: linear-gradient(90deg, #059669, #34d399);
}

.hp-text {
  position: relative;
  z-index: 1;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
  font-variant-numeric: tabular-nums;
}

.preset-chip.shipyard-cta {
  background: linear-gradient(135deg, rgba(229, 152, 52, 0.9), rgba(176, 98, 22, 0.9));
  border-color: rgba(255, 215, 130, 0.55);
  color: #fff8eb;
  font-weight: 700;
}

.preset-chip.harbor-cta {
  background: rgba(16, 122, 92, 0.78);
  border-color: rgba(84, 240, 180, 0.42);
  color: #dcfff0;
  font-weight: 600;
}

/* Тактический радар (в общем flex-потоке под presets-row) */
.radar-wrap {
  position: relative;
  top: auto;
  left: auto;
  z-index: 12;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  flex-shrink: 0;
  pointer-events: auto;
  transition: opacity 0.25s ease;
}

#radar-canvas {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(10, 28, 42, 0.78) 0%, rgba(5, 14, 22, 0.88) 100%);
  border: 1.5px solid rgba(255, 208, 120, 0.36);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.52);
}

.harbor-badge {
  background: rgba(16, 145, 98, 0.86);
  border: 1px solid rgba(110, 255, 195, 0.5);
  color: #e6fff4;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* 2D проекции целей поверх 3D сцены */
.world-markers {
  position: fixed;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  overflow: hidden;
  transition: opacity 0.25s ease;
}

.world-tag {
  position: absolute;
  transform: translate(-50%, -100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
  pointer-events: auto;
  cursor: pointer;
  touch-action: manipulation;
}

.world-tag:active {
  transform: translate(-50%, -100%) scale(0.95);
}

.world-tag.target-locked .world-tag-title {
  border-color: #34d399;
  background: rgba(6, 78, 59, 0.9);
  color: #ecfdf5;
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.6);
}

.world-tag-title {
  background: rgba(7, 16, 26, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  color: #f8f1e5;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
}

.world-tag.boss .world-tag-title {
  border-color: rgba(255, 84, 72, 0.75);
  color: #ffd0ca;
}

.world-tag.harbor .world-tag-title {
  border-color: rgba(74, 232, 168, 0.65);
  color: #aefbe0;
}

.world-tag.fort .world-tag-title {
  border-color: rgba(255, 166, 72, 0.7);
  color: #ffe0b0;
}

.world-tag.online .world-tag-title {
  border-color: rgba(34, 211, 238, 0.7);
  color: #a5f3fc;
}

.world-tag.pvp-hostile .world-tag-title {
  border-color: rgba(248, 113, 113, 0.85);
  color: #fecaca;
}

.world-tag.pvp-hostile .world-hp-fill {
  background: linear-gradient(90deg, #b91c1c, #f43f5e);
}

.world-tag.waypoint .world-tag-title {
  border-color: rgba(56, 189, 248, 0.85);
  background: rgba(7, 26, 44, 0.84);
  color: #bae6fd;
}

.map-live-feed {
  margin: 0 12px 6px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(56, 189, 248, 0.28);
  font-size: 11px;
  color: #bae6fd;
  text-align: center;
  line-height: 1.3;
}

.world-tag.contract .world-tag-title {
  border-color: rgba(250, 204, 21, 0.85);
  color: #fef08a;
}

.world-hp-bar {
  width: 54px;
  height: 4px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.world-hp-fill {
  height: 100%;
  background: linear-gradient(90deg, #dc2626, #f87171);
}

.world-tag.fort .world-hp-fill {
  background: linear-gradient(90deg, #d97706, #fbbf24);
}

/* Прогресс перезарядки на кнопках залпа */
.fire-btn {
  position: relative;
  overflow: hidden;
}

.fire-progress {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  background: rgba(255, 196, 86, 0.22);
  transform-origin: left center;
  pointer-events: none;
  transition: transform 0.08s linear;
}

.fire-btn.reloading {
  opacity: 0.62;
  filter: grayscale(0.3);
}

.fire-label {
  position: relative;
  z-index: 1;
}

/* Модальные окна Верфи и Поражения */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(4, 10, 17, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);
}

.shipyard-card {
  width: min(440px, 100%);
  max-height: calc(100dvh - var(--safe-top) - var(--safe-bottom) - 12px);
  background: rgba(9, 20, 32, 0.94);
  border: 1px solid rgba(255, 206, 122, 0.34);
  border-radius: 20px;
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.78);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.defeat-card {
  padding: 20px 18px;
  text-align: center;
  gap: 12px;
}

.defeat-card h3 {
  font-size: 18px;
  color: #fca5a5;
}

.defeat-card p {
  font-size: 13px;
  line-height: 1.45;
  color: rgba(246, 241, 231, 0.85);
}

.shipyard-head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.shipyard-head h3 {
  font-size: 15px;
  color: #ffd584;
}

.shipyard-sub {
  font-size: 11px;
  color: rgba(246, 241, 231, 0.65);
}

.shipyard-head-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shipyard-wallet {
  background: rgba(255, 198, 86, 0.16);
  border: 1px solid rgba(255, 198, 86, 0.38);
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12.5px;
  color: #ffe39e;
}

.modal-tabs {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  gap: 4px;
  padding: 7px 8px;
  min-height: 44px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.modal-tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  flex: 1 0 auto;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(246, 241, 231, 0.78);
  border-radius: 9px;
  padding: 6px 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.tab-btn.active {
  background: rgba(240, 164, 60, 0.24);
  border-color: rgba(255, 206, 122, 0.58);
  color: #ffd98e;
}

.shipyard-body {
  padding: 10px 12px 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.upgrade-row,
.fleet-card,
.leader-row {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 13px;
  padding: 10px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.fleet-card.active {
  border-color: rgba(255, 204, 108, 0.65);
  background: rgba(240, 164, 60, 0.12);
}

.card-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.card-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff6e6;
}

.card-desc {
  font-size: 11px;
  color: rgba(246, 241, 231, 0.7);
  line-height: 1.3;
}

.card-stat-line {
  font-size: 11px;
  color: #9ddcff;
  font-weight: 600;
}

.action-cta {
  border: none;
  border-radius: 10px;
  padding: 8px 11px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  background: linear-gradient(135deg, #e5962e, #b86214);
  color: #fff9ee;
}

.action-cta.secondary {
  background: rgba(45, 164, 118, 0.85);
}

.action-cta.equipped {
  background: rgba(255, 255, 255, 0.14);
  color: #ffd584;
}

.action-cta:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.primary-cta {
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13.5px;
  font-weight: 800;
  background: linear-gradient(135deg, #10b981, #047857);
  color: #fff;
  cursor: pointer;
}

/* ==== v8: КВЕСТЫ, КОМБО, АВТОКУРС, КАРТА И МАГАЗИН STARS ==== */
body.clean-view .floating-damage {
  opacity: 0;
  pointer-events: none;
}

.ruby-stat strong {
  color: #f472b6;
}

.gold-stat strong {
  color: #fde047;
}

.combo-pill {
  background: linear-gradient(135deg, #dc2626, #ea580c);
  border: 1px solid rgba(255, 224, 130, 0.72);
  color: #fffbeb;
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 10.5px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(234, 88, 12, 0.55);
}

.preset-chip.quest-pill {
  border-color: rgba(110, 210, 255, 0.45);
  background: rgba(12, 36, 56, 0.78);
  color: #e0f2fe;
}

.preset-chip.quest-pill.ready {
  border-color: #34d399;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.9), rgba(5, 150, 105, 0.92));
  color: #ffffff;
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.45);
  animation: questPulse 1.6s ease-in-out infinite;
}

/* Только GPU-composited transform (без анимации box-shadow, которая грела CPU/GPU на 60 FPS!) */
@keyframes questPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.032);
  }
}

.preset-chip.shipyard-cta {
  position: relative;
}

.preset-chip.shipyard-cta.ready {
  border-color: #fde047;
  animation: questPulse 1.4s ease-in-out infinite;
}

.preset-chip.map-cta {
  border-color: rgba(165, 180, 252, 0.4);
  background: rgba(30, 41, 68, 0.72);
  color: #e0e7ff;
}

.notif-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  border: 1.5px solid #07131c;
  box-shadow: 0 0 8px #22c55e;
}

.radar-wrap {
  cursor: pointer;
}

.zone-badge {
  background: rgba(180, 83, 9, 0.88);
  border: 1px solid rgba(251, 191, 36, 0.65);
  color: #fef3c7;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.gfx-quality-box {
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 208, 130, 0.16);
}

.gfx-quality-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: rgba(246, 241, 231, 0.9);
  margin-bottom: 6px;
}

.gfx-quality-head strong {
  color: #fde047;
  font-size: 11px;
  font-weight: 700;
}

.gfx-quality-pills {
  display: grid;
  grid-template-columns: 0.86fr 0.76fr 1.28fr 1.1fr;
  gap: 4px;
}

.gfx-pill {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(15, 23, 42, 0.72);
  color: rgba(241, 245, 249, 0.88);
  border-radius: 9px;
  padding: 6px 3px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  touch-action: manipulation;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

@media (max-width: 350px) {
  .gfx-quality-pills {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.gfx-pill:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(255, 208, 130, 0.35);
}

.gfx-pill.active {
  background: linear-gradient(135deg, rgba(229, 155, 56, 0.32), rgba(245, 158, 11, 0.22));
  border-color: rgba(253, 224, 71, 0.75);
  color: #fef08a;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.24);
}

.drawer-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.drawer-fps {
  font-size: 11px;
  font-weight: 600;
  color: rgba(246, 241, 231, 0.78);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 3px 8px;
  font-variant-numeric: tabular-nums;
}

.drawer-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.drawer-tools-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.drawer-tools-grid .preset-chip {
  text-align: center;
  padding: 7px 6px;
  font-size: 11px;
  border-radius: 10px;
}

.drawer-tools-grid .share-tool-btn {
  grid-column: 1 / -1;
  border-color: rgba(52, 211, 153, 0.45);
  background: rgba(16, 185, 129, 0.14);
  color: #a7f3d0;
}

/* Всплывающие цифры урона / тарана / сундуков */
.floating-damage {
  position: fixed;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  overflow: hidden;
  transition: opacity 0.2s ease;
}

.dmg-pop {
  position: absolute;
  transform: translate(-50%, -50%);
  font-weight: 800;
  font-size: 13px;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.92);
  white-space: nowrap;
  animation: dmgFloat 1.05s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.dmg-pop.hit {
  color: #fde047;
}

.dmg-pop.ram {
  color: #fb923c;
  font-size: 14.5px;
}

.dmg-pop.sink,
.dmg-pop.gold {
  color: #4ade80;
  font-size: 14px;
}

.dmg-pop.hurt {
  color: #f87171;
}

@keyframes dmgFloat {
  0% {
    opacity: 0;
    transform: translate(-50%, -10%) scale(0.8);
  }
  18% {
    opacity: 1;
    transform: translate(-50%, -55%) scale(1.08);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -165%) scale(0.95);
  }
}

/* Подсветка борта при захвате врага и кнопки форсажа / автопилота */
.fire-btn.locked {
  border-color: #34d399;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.88), rgba(4, 120, 87, 0.92));
  box-shadow: 0 0 14px rgba(52, 211, 153, 0.52);
  color: #ffffff;
}

.fire-btn.boost-btn {
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(14, 74, 118, 0.78);
  color: #e0f2fe;
}

.fire-btn.boost-btn.active {
  border-color: #fde047;
  background: linear-gradient(135deg, #0ea5e9, #f59e0b);
  box-shadow: 0 0 14px rgba(250, 204, 21, 0.55);
  color: #fff;
}

.auto-btn {
  min-height: 38px;
  border: 1px solid rgba(148, 163, 184, 0.38);
  background: rgba(15, 23, 42, 0.72);
  color: #cbd5e1;
  border-radius: 11px;
  padding: 7px 11px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  touch-action: manipulation;
  transition: all 0.16s ease;
}

.auto-btn.active {
  border-color: #34d399;
  background: rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.35);
}

.helm-steer-btn {
  min-width: 68px;
  height: 38px;
  padding: 0 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 206, 122, 0.36);
  background: rgba(255, 255, 255, 0.1);
  color: #ffe3a3;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  touch-action: manipulation;
}

.helm-steer-btn:active {
  background: rgba(240, 164, 60, 0.45);
  transform: scale(0.96);
}

/* Интерактивная Морская карта */
.map-card,
.prologue-card,
.defeat-card {
  overflow-y: auto;
  padding-bottom: calc(12px + var(--safe-bottom));
}

.map-canvas-wrap {
  padding: 10px 12px 6px;
  display: flex;
  justify-content: center;
}

#map-canvas {
  width: min(340px, calc(100vw - 48px), 44dvh);
  height: min(340px, calc(100vw - 48px), 44dvh);
  border-radius: 16px;
  border: 1.5px solid rgba(255, 206, 122, 0.42);
  background: radial-gradient(circle at center, #0e2d42 0%, #061523 100%);
  cursor: crosshair;
  box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.55);
}

.map-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 12px 4px;
  justify-content: center;
}

.map-actions .action-cta {
  padding: 6px 9px;
  font-size: 11px;
}

/* Карточки Магазина, Ежедневки, Экспедиции и Рефералов */
.ruby-wallet {
  border-color: rgba(244, 114, 182, 0.45);
  background: rgba(219, 39, 119, 0.16);
  color: #fbcfe8;
}

.daily-card,
.expedition-card,
.shop-card,
.referral-banner {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 13px;
  padding: 10px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.daily-card {
  border-color: rgba(52, 211, 153, 0.48);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(6, 78, 59, 0.22));
}

.expedition-card {
  border-color: rgba(250, 204, 21, 0.48);
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.16), rgba(120, 53, 15, 0.22));
}

.shop-card {
  border-color: rgba(167, 139, 250, 0.42);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.14), rgba(15, 23, 42, 0.35));
}

.referral-banner {
  border-color: rgba(56, 189, 248, 0.45);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.16), rgba(7, 30, 50, 0.35));
}

.action-cta.stars-btn {
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  color: #fff;
}

@media (max-width: 520px) {
  .top-hud {
    gap: 5px;
  }
  .ship-chip {
    max-width: 108px;
    padding: 5px 8px;
    font-size: 11px;
  }
  .wave-pill {
    padding: 4px 7px;
    font-size: 11px;
  }
  .hp-pill {
    min-width: 78px;
    max-width: 112px;
    height: 24px;
  }
  .hp-text {
    font-size: 10.5px;
  }
  .stats-bar {
    gap: 5px;
    padding: 4px 8px;
    font-size: 11px;
  }
  .stat-knots,
  .stat-knots-sep,
  #hud-fps,
  .stat-fps-sep {
    display: none;
  }
  .action-icons {
    gap: 3px;
  }
  .icon-btn {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }
  #radar-canvas {
    width: 72px;
    height: 72px;
  }
  .combat-toast {
    flex: 1;
    max-width: none;
    font-size: 11.5px;
    padding: 6px 10px;
  }
  .ship-deck-panel {
    padding: 8px 9px;
    gap: 6px;
    border-radius: 18px;
  }
  .fire-btn {
    min-height: 46px;
    padding: 8px 4px;
    font-size: 11.5px;
  }
  .helm-steer-btn {
    min-width: 62px;
    height: 38px;
    font-size: 10.5px;
  }
  .modal-backdrop {
    align-items: flex-end;
    padding: var(--safe-top) 0 0;
  }
  .shipyard-card {
    width: 100%;
    max-width: 100%;
    max-height: min(88dvh, calc(100dvh - var(--safe-top) - 4px));
    border-radius: 20px 20px 0 0;
    border-bottom: none;
  }
  .shipyard-head {
    padding: 12px 12px 10px;
    gap: 8px;
  }
  .shipyard-head h3 {
    font-size: 14.5px;
  }
  .shipyard-head-right {
    gap: 5px;
  }
  .shipyard-wallet {
    padding: 3px 7px;
    font-size: 11.5px;
  }
  .modal-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    overflow-x: visible;
    gap: 4px;
    padding: 7px 8px;
  }
  .tab-btn {
    font-size: 10px;
    padding: 8px 2px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .shipyard-body {
    padding: 10px 10px calc(14px + var(--safe-bottom));
  }
  .fleet-card,
  .upgrade-row,
  .shop-card,
  .wheel-card,
  .piggy-bank-card,
  .daily-card,
  .expedition-card,
  .referral-banner {
    padding: 10px;
    gap: 8px;
  }
  .action-cta {
    min-height: 38px;
    padding: 8px 10px;
    font-size: 11.5px;
  }
}

@media (max-height: 720px) and (max-width: 520px) {
  .top-hud {
    gap: 4px;
  }
  .hud-sub-row {
    gap: 6px;
  }
  #radar-canvas {
    width: 62px;
    height: 62px;
  }
  .combat-toast {
    font-size: 11px;
    padding: 5px 9px;
  }
  .bottom-hud {
    gap: 5px;
  }
  .ship-deck-panel {
    padding: 7px 8px;
    gap: 5px;
  }
  .fire-btn {
    min-height: 40px;
    padding: 6px 4px;
  }
  .helm-steer-btn {
    height: 34px;
  }
  .auto-btn {
    min-height: 34px;
    padding: 5px 9px;
  }
  .sail-btn {
    min-height: 28px;
    padding: 4px;
  }
  .prologue-banner {
    padding: 6px 8px;
  }
}

@media (max-width: 390px) {
  .wave-label {
    display: none;
  }
  .hud-nav-bar {
    gap: 4px;
  }
  .nav-main {
    font-size: 10px;
  }
  .nav-sub {
    font-size: 8.5px;
  }
}

@media (max-width: 385px) {
  .hud-combat-group {
    gap: 4px;
    overflow: hidden;
  }
  .ship-chip {
    max-width: 72px;
    padding: 4px 6px;
    font-size: 10px;
  }
  .wave-pill {
    padding: 4px 6px;
    font-size: 10px;
  }
  .hp-pill {
    min-width: 58px;
    max-width: 82px;
    height: 22px;
  }
  .hp-text {
    font-size: 9.5px;
  }
  .stats-bar {
    gap: 4px;
    padding: 4px 7px;
    font-size: 10.5px;
  }
  .helm-steer-btn {
    min-width: 54px;
    font-size: 10px;
    padding: 0 5px;
  }
  .tab-btn {
    font-size: 9.5px;
    padding: 7px 1px;
  }
}

/* ==== v9: ПРОЛОГ «ЛЁСДЕН», БОЕВОЙ СУНДУК, ГЛАВЫ, ТЕСТ-ДРАЙВ 45С ==== */
body.clean-view .prologue-banner {
  opacity: 0;
  pointer-events: none;
}

.preset-chip.chest-pill {
  border-color: rgba(250, 204, 21, 0.45);
  background: rgba(66, 32, 6, 0.72);
  color: #fef08a;
}

.preset-chip.chest-pill.ready {
  border-color: #fde047;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  animation: questPulse 1.3s ease-in-out infinite;
}

.prologue-banner {
  position: relative;
  bottom: auto;
  left: auto;
  right: auto;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  z-index: 13;
  pointer-events: auto;
  background: rgba(15, 23, 42, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(251, 191, 36, 0.6);
  border-radius: 14px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.52);
  transition: opacity 0.22s ease;
}

.prologue-banner-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.prologue-banner-info strong {
  font-size: 11.5px;
  color: #fde047;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prologue-banner-info span {
  font-size: 10.5px;
  color: #e2e8f0;
  line-height: 1.25;
}

.prologue-card {
  padding: 18px 16px;
  text-align: center;
  gap: 12px;
  border-color: rgba(251, 191, 36, 0.55);
}

.prologue-card h3 {
  font-size: 17px;
  color: #fde047;
}

.prologue-card p {
  font-size: 12.5px;
  line-height: 1.45;
  color: rgba(248, 250, 252, 0.88);
}

.prologue-reward-box {
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(52, 211, 153, 0.48);
  border-radius: 12px;
  padding: 9px 10px;
  font-size: 12.5px;
  color: #a7f3d0;
}

.prologue-cta-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.prologue-stars-cta {
  padding: 11px 12px;
  font-size: 12.5px;
  white-space: normal;
}

.chapter-card {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.28), rgba(15, 23, 42, 0.55));
  border: 1px solid rgba(96, 165, 250, 0.45);
  border-radius: 14px;
  padding: 11px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chapter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.chapter-progress-bar {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.chapter-progress-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #34d399);
  transition: width 0.25s ease;
}

.fleet-actions {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: flex-end;
  flex-shrink: 0;
}

.fire-buff-active .main-salvo {
  box-shadow: 0 0 18px rgba(251, 146, 60, 0.82);
  border-color: #fde047;
}

.boot-loader {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 35%, rgba(14, 36, 54, 0.92), rgba(7, 19, 28, 0.97));
  transition: opacity 0.38s ease, visibility 0.38s ease;
}

.boot-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.boot-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 26px;
  border-radius: 18px;
  background: rgba(11, 27, 40, 0.82);
  border: 1px solid rgba(251, 191, 36, 0.32);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  text-align: center;
}

.boot-spinner {
  font-size: 32px;
  animation: bootRock 1.3s ease-in-out infinite alternate;
}

@keyframes bootRock {
  from { transform: rotate(-12deg) translateY(0); }
  to { transform: rotate(12deg) translateY(-3px); }
}

.boot-title {
  font-size: 16px;
  font-weight: 800;
  color: #fde68a;
  letter-spacing: 0.4px;
}

.boot-sub {
  font-size: 12px;
  color: rgba(246, 241, 231, 0.78);
}

/* ==== v21: СКИНЫ КОРАБЛЕЙ, КОПИЛКА КАПИТАНА, РУБИНОВЫЕ КНОПКИ И СКИДКИ ==== */
.action-cta.ruby-btn {
  background: linear-gradient(135deg, #db2777, #9333ea);
  color: #fff;
  box-shadow: 0 2px 10px rgba(219, 39, 119, 0.35);
}

.piggy-bank-card {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(180, 83, 9, 0.24));
  border: 1px solid rgba(251, 191, 36, 0.56);
  border-radius: 13px;
  padding: 10px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.piggy-progress-bar {
  margin-top: 4px;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.piggy-progress-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #fde047);
  transition: width 0.25s ease;
}

.skin-panel {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.78), rgba(15, 23, 42, 0.85));
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 14px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.skin-selector-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.skin-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 7px 9px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: #f8fafc;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.skin-chip strong {
  font-size: 11.5px;
  color: #fef3c7;
}

.skin-chip span {
  font-size: 10px;
  color: #cbd5e1;
}

.skin-chip.active {
  border-color: #34d399;
  background: rgba(16, 185, 129, 0.22);
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.28);
}

.skin-chip.locked {
  border-color: rgba(244, 114, 182, 0.4);
  background: rgba(131, 24, 67, 0.18);
}

.discount-badge {
  display: inline-block;
  align-self: flex-start;
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #fff;
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  margin-bottom: 2px;
}

/* ==== v22: БЫСТРЫЙ ДОСТУП В МАГАЗИН И КОЛЕСО ФОРТУНЫ ==== */
.clickable-stat {
  cursor: pointer;
  padding: 1px 4px;
  border-radius: 999px;
  transition: background 0.16s ease, transform 0.12s ease;
}

.clickable-stat:hover {
  background: rgba(255, 255, 255, 0.12);
}

.clickable-stat:active {
  transform: scale(0.95);
}

.stat-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ec4899, #9333ea);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  margin-left: 1px;
}

.preset-chip.shop-hud-cta {
  border-color: rgba(244, 114, 182, 0.58);
  background: linear-gradient(135deg, rgba(131, 24, 67, 0.65), rgba(88, 28, 135, 0.72));
  color: #fce7f3;
}

.preset-chip.shop-hud-cta.ready {
  border-color: #fbbf24;
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.9), rgba(147, 51, 234, 0.88));
  color: #fff;
  animation: questPulse 1.4s ease-in-out infinite;
}

.wheel-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(88, 28, 135, 0.25));
  border: 1px solid rgba(52, 211, 153, 0.56);
  border-radius: 13px;
  padding: 10px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* ==== v29: ИНДИВИДУАЛЬНАЯ ОСНАСТКА КОРАБЛЕЙ В ВЕРФИ ==== */
.ship-tuning-card {
  background: linear-gradient(135deg, rgba(14, 34, 52, 0.85), rgba(8, 20, 34, 0.9));
  border: 1px solid rgba(110, 210, 255, 0.34);
  border-radius: 14px;
  padding: 10px 11px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ship-tuning-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tuning-active-badge {
  flex-shrink: 0;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.22);
  border: 1px solid rgba(52, 211, 153, 0.5);
  color: #a7f3d0;
  white-space: nowrap;
}

.ship-selector-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ship-switch-pill {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.ship-switch-pill.active {
  background: linear-gradient(135deg, rgba(229, 155, 56, 0.36), rgba(217, 119, 6, 0.26));
  border-color: #fbbf24;
  color: #fef3c7;
}

/* ==== v36-v42: 1-TAP ВХОД В 3-МИНУТНЫЕ РЕЖИМЫ И ЖИВОЙ ПОДБОР ЛОББИ ==== */
.arena-split-pill {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  border-radius: 999px;
  border: 1px solid rgba(251, 146, 60, 0.78);
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.92), rgba(190, 24, 93, 0.90));
  box-shadow: 0 2px 12px rgba(234, 88, 12, 0.42);
  overflow: hidden;
  pointer-events: auto;
}

.arena-split-pill .preset-chip.arena-cta {
  border: none;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  color: #fff;
  font-weight: 700;
  padding: 4px 8px 4px 10px;
}

.arena-split-pill .preset-chip.arena-mode-pick-btn {
  border: none;
  border-left: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.16);
  border-radius: 0;
  color: #fde68a;
  font-size: 11px;
  padding: 4px 7px;
  line-height: 1.1;
}

.arena-inline-queue {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(174px + env(safe-area-inset-bottom, 0px));
  z-index: 25;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: min(336px, calc(100vw - 24px));
  box-sizing: border-box;
  padding: 9px 12px;
  border-radius: 15px;
  background: rgba(8, 22, 34, 0.92);
  border: 1px solid rgba(56, 189, 248, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
}

@media (max-height: 720px) and (max-width: 520px) {
  .arena-inline-queue {
    bottom: calc(146px + env(safe-area-inset-bottom, 0px));
  }
}

.arena-inline-queue.ready {
  border-color: rgba(74, 222, 128, 0.85);
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.35);
}

.arena-q-top {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
}

.arena-q-mode {
  color: #fde68a;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.arena-q-count {
  color: #38bdf8;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.arena-inline-queue.ready .arena-q-count {
  color: #4ade80;
}

.arena-q-elapsed {
  color: rgba(226, 232, 240, 0.78);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.arena-q-cancel {
  border: 1px solid rgba(248, 113, 113, 0.45);
  background: rgba(239, 68, 68, 0.16);
  color: #fecaca;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
}

.arena-q-pips {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 3px;
}

.arena-q-pip {
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.24);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.arena-q-pip.filled {
  background: #38bdf8;
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.75);
  transform: scaleY(1.15);
}

.arena-inline-queue.ready .arena-q-pip.filled {
  background: #4ade80;
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.85);
}

.arena-q-status {
  font-size: 10.5px;
  color: #bae6fd;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preset-chip.arena-cta {
  border-color: rgba(249, 115, 22, 0.72);
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.88), rgba(190, 24, 93, 0.86));
  color: #fff;
  box-shadow: 0 2px 10px rgba(234, 88, 12, 0.35);
}

.arena-hud-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(8, 22, 34, 0.84);
  border: 1px solid rgba(56, 189, 248, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 11.5px;
  font-weight: 700;
  pointer-events: auto;
}

.arena-hud-timer {
  color: #fde68a;
}

.arena-hud-alive {
  color: #e0f2fe;
}

.arena-hud-buff {
  color: #fdba74;
}

.arena-leave-btn {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 11px;
  cursor: pointer;
}

.storm-vignette {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  box-shadow: inset 0 0 65px 18px rgba(239, 68, 68, 0.65);
  animation: stormPulse 1.1s ease-in-out infinite;
}

@keyframes stormPulse {
  0%, 100% { opacity: 0.72; }
  50% { opacity: 1.0; }
}

.arena-modal-card,
.arena-result-card {
  max-width: 440px;
}

.arena-stats-strip {
  display: flex;
  justify-content: space-around;
  padding: 7px 10px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 208, 130, 0.2);
  font-size: 12px;
}

.arena-mode-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 62vh;
  overflow-y: auto;
}

.arena-mode-card {
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(10, 26, 40, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.26);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.arena-mode-card.br-card {
  border-color: rgba(249, 115, 22, 0.55);
  background: linear-gradient(135deg, rgba(124, 45, 18, 0.35), rgba(15, 23, 42, 0.88));
}

.arena-mode-card.crown-card {
  border-color: rgba(250, 204, 21, 0.5);
  background: linear-gradient(135deg, rgba(113, 63, 18, 0.32), rgba(15, 23, 42, 0.88));
}

.arena-mode-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.arena-tag {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.16);
  color: #fde68a;
  white-space: nowrap;
}

.arena-mode-card p {
  font-size: 11.5px;
  line-height: 1.35;
  opacity: 0.88;
}

.arena-queue-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 16px 10px;
}

.arena-queue-sub {
  font-size: 13px;
  font-weight: 600;
  color: #bae6fd;
}

.arena-result-badge {
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.85);
  color: #e2e8f0;
}

.arena-result-badge.win {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.9), rgba(234, 88, 12, 0.9));
  color: #fff;
}

.arena-result-badge.top3 {
  background: rgba(14, 116, 144, 0.72);
  color: #cffafe;
}

.arena-result-title {
  text-align: center;
  font-size: 13px;
  opacity: 0.9;
}

.arena-result-rewards {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.arena-rw-pill {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.16);
  border: 1px solid rgba(251, 191, 36, 0.45);
  font-size: 12.5px;
  font-weight: 700;
  color: #fef3c7;
}

.arena-result-board {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 36vh;
  overflow-y: auto;
}

.arena-rank-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 9px;
  border-radius: 9px;
  background: rgba(15, 23, 42, 0.6);
  font-size: 12px;
}

.arena-rank-row.me {
  background: rgba(217, 119, 6, 0.28);
  border: 1px solid rgba(251, 191, 36, 0.65);
}

.arena-result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* ==== v49-v50: Кнопка "В БОЙ" над "🔥 ЗАЛП" (снаружи рамки панели, равна по размеру, переключатель по ▾) ==== */
.battle-cta-row {
  max-width: 500px;
  width: 100%;
  margin: 0 auto;
  padding: 0 12px;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 1fr 1.14fr 1fr 0.9fr;
  gap: 6px;
  background: none;
  border: none;
  pointer-events: none;
}

.battle-cta-cell {
  grid-column: 2;
  position: relative;
  min-width: 0;
  pointer-events: auto;
}

.battle-cta-cell .arena-split-pill {
  display: flex;
  width: 100%;
  min-height: 46px;
  border-radius: 13px;
  border: 1px solid #ffbe6b;
  background: linear-gradient(135deg, #ea580c, #be123c);
  box-shadow: 0 3px 14px rgba(234, 88, 12, 0.48);
  overflow: hidden;
  pointer-events: auto;
}

.battle-cta-cell .arena-cta {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px 3px 4px 6px;
  line-height: 1.08;
  gap: 1px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.1s ease, background 0.15s ease;
}

.battle-cta-cell .arena-cta:active {
  transform: scale(0.96);
}

.arena-quick-sub {
  font-size: 9px;
  font-weight: 700;
  color: #fde68a;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.battle-cta-cell .arena-mode-pick-btn {
  flex: 0 0 24px;
  width: 24px;
  align-self: stretch;
  border: none;
  border-left: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.22);
  border-radius: 0;
  color: #fde68a;
  font-size: 12px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.15s ease;
}

.battle-cta-cell .arena-mode-pick-btn:hover,
.battle-cta-cell .arena-mode-pick-btn[aria-expanded="true"] {
  background: rgba(0, 0, 0, 0.42);
}

.arena-mode-popover {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 218px;
  padding: 6px;
  border-radius: 14px;
  background: rgba(8, 19, 30, 0.96);
  border: 1px solid rgba(255, 190, 107, 0.48);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 38;
}

.arena-mode-opt {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}

.arena-mode-opt .mode-check {
  opacity: 0;
  color: #4ade80;
  font-weight: 900;
  width: 12px;
  text-align: center;
}

.arena-mode-opt.active {
  background: rgba(234, 88, 12, 0.28);
  border-color: rgba(251, 146, 60, 0.72);
  color: #fff;
}

.arena-mode-opt.active .mode-check {
  opacity: 1;
}

.arena-mode-details-btn {
  margin-top: 2px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: rgba(14, 116, 144, 0.25);
  color: #bae6fd;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

@media (max-width: 520px) {
  .battle-cta-row {
    padding: 0 10px;
  }
}

@media (max-height: 720px) and (max-width: 520px) {
  .battle-cta-row {
    padding: 0 9px;
  }
  .battle-cta-cell .arena-split-pill {
    min-height: 40px;
  }
  .battle-cta-cell .arena-cta {
    font-size: 11px;
    padding: 3px 2px 3px 5px;
  }
}

/* ==== v51: Предстартовый кинематографичный отсчёт (3 -> 2 -> 1 -> В БОЙ!) ==== */
.arena-launch-overlay {
  position: fixed;
  top: calc(108px + var(--safe-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 32;
  min-width: 240px;
  max-width: min(360px, calc(100vw - 24px));
  padding: 12px 22px 14px;
  border-radius: 18px;
  background: radial-gradient(circle at 50% 25%, rgba(15, 36, 54, 0.92), rgba(7, 17, 27, 0.90));
  border: 1px solid rgba(251, 191, 36, 0.58);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.62), 0 0 24px rgba(234, 88, 12, 0.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 3px;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.arena-launch-mode {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.9px;
  color: #7dd3fc;
  text-transform: uppercase;
}

.arena-launch-count {
  font-size: 42px;
  font-weight: 900;
  line-height: 1.05;
  color: #fde68a;
  text-shadow: 0 3px 16px rgba(249, 115, 22, 0.72);
  transition: transform 0.14s ease, color 0.14s ease;
}

.arena-launch-overlay.go .arena-launch-count {
  font-size: 32px;
  color: #86efac;
  text-shadow: 0 4px 20px rgba(74, 222, 128, 0.85);
  transform: scale(1.1);
}

.arena-launch-sub {
  font-size: 11.5px;
  font-weight: 600;
  color: #e2e8f0;
  opacity: 0.94;
}

/* Мобильное охлаждение композитора: отключаем 14 живых backdrop-filter blur поверх 60fps WebGL canvas */
@media (pointer: coarse), (max-width: 900px) {
  .pill-group,
  .stats-bar,
  .preset-chip,
  .icon-btn,
  .ship-deck-panel,
  .settings-drawer,
  .restore-ui-fab,
  .wave-pill,
  .modal-backdrop,
  .prologue-banner,
  .arena-inline-queue,
  .arena-hud-bar,
  .arena-mode-popover,
  .arena-launch-overlay {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .pill-group,
  .stats-bar,
  .icon-btn,
  .wave-pill {
    background: rgba(8, 20, 30, 0.84);
  }

  .preset-chip {
    background: rgba(9, 22, 33, 0.82);
  }

  .ship-deck-panel {
    background: rgba(8, 19, 28, 0.86);
  }

  .modal-backdrop {
    background: rgba(4, 10, 17, 0.82);
  }
}

/* ==== v65: ВЫБОР СТАРТОВОГО КОРАБЛЯ, ПУТЬ КОРСАРА, ЛИГИ И КОЛЛЕКЦИЯ ==== */
.starter-choice-grid {
  display: flex;
  flex-direction: column;
  gap: 7px;
  text-align: left;
}

.starter-choice-card {
  appearance: none;
  width: 100%;
  text-align: left;
  background: rgba(15, 28, 44, 0.88);
  border: 1.5px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  padding: 9px 11px;
  color: #f8fafc;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: border-color 0.14s ease, background 0.14s ease, transform 0.12s ease;
}

.starter-choice-card.active {
  border-color: #facc15;
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.2), rgba(217, 119, 6, 0.14));
  box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.35), 0 4px 16px rgba(234, 179, 8, 0.22);
}

.starter-choice-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}

.starter-choice-role {
  font-size: 11px;
  color: rgba(226, 232, 240, 0.8);
}

.starter-choice-stats {
  font-size: 11px;
  font-weight: 600;
  color: #9ddcff;
}

.starter-tag {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.22);
  color: #fde047;
  border: 1px solid rgba(250, 204, 21, 0.45);
  white-space: nowrap;
}

.starter-tag.speed {
  background: rgba(56, 189, 248, 0.2);
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, 0.45);
}

.starter-tag.tank {
  background: rgba(52, 211, 153, 0.18);
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.45);
}

.league-banner-card {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.32), rgba(15, 23, 42, 0.85));
  border: 1px solid rgba(96, 165, 250, 0.42);
  border-radius: 14px;
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.league-banner-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.league-title {
  font-size: 14px;
  font-weight: 800;
  color: #fef08a;
}

.league-trophies-pill {
  font-size: 12px;
  font-weight: 800;
  color: #fde047;
  background: rgba(250, 204, 21, 0.14);
  border: 1px solid rgba(250, 204, 21, 0.35);
  padding: 3px 9px;
  border-radius: 999px;
}

.daily-contracts-card {
  background: rgba(15, 36, 54, 0.78);
  border: 1px solid rgba(56, 189, 248, 0.32);
  border-radius: 13px;
  padding: 10px 11px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.daily-task-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.pass-header-banner {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.28), rgba(147, 51, 234, 0.24));
  border: 1px solid rgba(250, 204, 21, 0.5);
  border-radius: 13px;
  padding: 10px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pass-row {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pass-row.reached {
  border-color: rgba(250, 204, 21, 0.42);
  background: rgba(250, 204, 21, 0.06);
}

.pass-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 800;
  color: #fde68a;
}

.pass-tracks-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.pass-track-cell {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  padding: 7px 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  justify-content: space-between;
}

.pass-track-cell.prem {
  border-color: rgba(250, 204, 21, 0.36);
  background: rgba(120, 53, 15, 0.24);
}

.pass-track-tag {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #94a3b8;
}

.pass-track-cell.prem .pass-track-tag {
  color: #fde047;
}

.pass-track-label {
  font-size: 11.5px;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.25;
}

.fleet-section-header {
  font-size: 11.5px;
  font-weight: 800;
  color: #fde68a;
  letter-spacing: 0.3px;
  padding: 6px 4px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.fleet-role-line {
  font-size: 10.5px;
  color: rgba(226, 232, 240, 0.76);
}

.trophy-lock-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 999px;
  padding: 1px 7px;
  margin-top: 2px;
}

.master-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  color: #fef08a;
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.35), rgba(249, 115, 22, 0.35));
  border: 1px solid rgba(250, 204, 21, 0.65);
  border-radius: 999px;
  padding: 1px 7px;
  margin-left: 4px;
}

.arena-bonus-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(16, 185, 129, 0.22);
  border: 1px solid rgba(52, 211, 153, 0.5);
  color: #6ee7b7;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
}
