/* Deep-Sea Reef Co. — 16-Bit Ocean Salvage Tycoon Theme */
:root {
  --bg: #040b17;
  --panel: #0a1628;
  --panel-hi: #10233d;
  --border: rgba(56, 189, 248, 0.22);
  --border-hi: rgba(34, 211, 238, 0.55);
  --text: #e2f1ff;
  --muted: #8ab4d6;
  --gold: #fbbf24;
  --cyan: #22d3ee;
  --teal: #2dd4bf;
  --violet: #c084fc;
  --coral: #fb7185;
  --green: #34d399;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100%;
  background: radial-gradient(circle at 50% 0%, #0b2442 0%, #040b17 72%);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

.hidden {
  display: none !important;
}

.shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 100vh;
}

/* HUD Header */
.hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: linear-gradient(180deg, rgba(16, 35, 61, 0.92), rgba(8, 20, 38, 0.95));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.42);
}

.hud-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.stat .lbl {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.stat .val {
  font-size: 17px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.val.gold { color: var(--gold); text-shadow: 0 0 10px rgba(251, 191, 36, 0.35); }
.val.cyan { color: var(--cyan); }
.val.depth { color: var(--teal); }
.val.violet { color: var(--violet); }

.brand {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 0.08em;
  color: #e0f7ff;
  text-shadow: 0 0 14px rgba(34, 211, 238, 0.45);
  white-space: nowrap;
}

.hud-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(251, 191, 36, 0.55);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(14, 116, 144, 0.35));
  color: #fef08a;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.pill-btn:hover {
  transform: translateY(-1px);
  border-color: var(--gold);
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.3);
}

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(15, 31, 54, 0.9);
  color: var(--text);
  font-size: 15px;
  cursor: pointer;
  transition: border-color 0.12s ease, transform 0.12s ease, background 0.12s ease;
}

.icon-btn:hover {
  border-color: var(--cyan);
  background: rgba(20, 46, 78, 0.95);
  transform: translateY(-1px);
}

.mini-badge {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--gold);
}

.notif-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fb7185;
  border: 2px solid #081426;
  box-shadow: 0 0 8px #fb7185;
  animation: pulseDot 1.4s infinite;
}

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

/* Main 2-Column Workspace */
.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(300px, 1fr);
  gap: 12px;
  align-items: start;
  flex: 1;
}

.stage-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

/* Depth Zone Bar */
.zone-bar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.zone-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 4px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(10, 22, 40, 0.88);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.14s ease;
  text-align: center;
  min-width: 0;
}

.zone-pill .zp-depth {
  font-size: 11px;
  font-weight: 900;
  color: var(--text);
}

.zone-pill .zp-name {
  font-size: 9.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.zone-pill.active {
  border-color: var(--cyan);
  background: linear-gradient(180deg, rgba(14, 116, 144, 0.45), rgba(8, 30, 56, 0.95));
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.25);
  color: #fff;
}

.zone-pill.locked {
  opacity: 0.48;
  cursor: not-allowed;
  border-style: dashed;
}

/* Ocean Canvas Stage */
.stage-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 660 / 500;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid rgba(56, 189, 248, 0.34);
  background: #031020;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
  user-select: none;
  touch-action: manipulation;
}

#gameCanvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  cursor: crosshair;
}

.challenge-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 6;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--gold);
  color: #fef08a;
  font-size: 11.5px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.frenzy-banner {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 7;
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.92), rgba(234, 179, 8, 0.92));
  color: #1e1202;
  font-size: 12px;
  font-weight: 900;
  padding: 5px 14px;
  border-radius: 999px;
  border: 2px solid #fef08a;
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.65);
  white-space: nowrap;
}

/* Daily 90s Sprint HUD */
.daily-hud-bar {
  position: absolute;
  top: 8px;
  left: 10px;
  right: 10px;
  z-index: 8;
  background: rgba(6, 18, 36, 0.92);
  border: 1.5px solid rgba(251, 191, 36, 0.65);
  border-radius: 10px;
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

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

.daily-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.daily-timer {
  font-size: 13px;
  font-weight: 900;
  color: #fde047;
  font-variant-numeric: tabular-nums;
}

.daily-mod-badge {
  font-size: 10.5px;
  font-weight: 800;
  color: #67e8f9;
  background: rgba(14, 116, 144, 0.35);
  border: 1px solid rgba(34, 211, 238, 0.4);
  padding: 2px 7px;
  border-radius: 999px;
}

.daily-exit-btn {
  background: rgba(244, 63, 94, 0.2);
  border: 1px solid rgba(251, 113, 133, 0.55);
  color: #fecdd3;
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 7px;
  cursor: pointer;
}

.daily-progress-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
}

.daily-score-lbl { color: var(--gold); white-space: nowrap; }
.daily-target-lbl { color: var(--muted); white-space: nowrap; }

.daily-track {
  flex: 1;
  height: 7px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.9);
  overflow: hidden;
}

.daily-fill {
  height: 100%;
  background: linear-gradient(90deg, #22d3ee, #fbbf24);
  transition: width 0.15s linear;
}

/* Leviathan Combat HUD */
.boss-fight-hud {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 8;
  background: rgba(15, 7, 26, 0.9);
  border: 1.5px solid rgba(251, 113, 133, 0.72);
  border-radius: 10px;
  padding: 7px 11px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  box-shadow: 0 0 22px rgba(244, 63, 94, 0.35);
}

.bf-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bf-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bf-tag {
  font-size: 9.5px;
  font-weight: 900;
  background: rgba(244, 63, 94, 0.28);
  color: #fda4af;
  padding: 2px 6px;
  border-radius: 5px;
}

#bf-name {
  font-size: 13.5px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.04em;
}

.bf-timer {
  font-size: 13px;
  font-weight: 900;
  color: #fde047;
  font-variant-numeric: tabular-nums;
}

.bf-hp-track {
  position: relative;
  height: 15px;
  border-radius: 8px;
  background: rgba(30, 14, 42, 0.95);
  border: 1px solid rgba(251, 113, 133, 0.45);
  overflow: hidden;
}

.bf-hp-fill {
  height: 100%;
  background: linear-gradient(90deg, #e11d48, #fb7185, #fb923c);
  transition: width 0.08s linear;
}

.bf-hp-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.bf-hint {
  font-size: 10px;
  font-weight: 800;
  color: #67e8f9;
  text-align: center;
  letter-spacing: 0.04em;
}

/* Bottom-of-Canvas Boss Sonar Charge HUD */
.boss-hud {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 5px;
  pointer-events: none;
}

.boss-charge-wrap {
  background: rgba(4, 12, 26, 0.84);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 9px;
  padding: 5px 10px;
}

.boss-charge-meta {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  font-weight: 800;
  color: #bae6fd;
  margin-bottom: 3px;
}

.boss-charge-track {
  height: 7px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.95);
  overflow: hidden;
}

.boss-charge-fill {
  height: 100%;
  background: linear-gradient(90deg, #06b6d4, #c084fc);
  transition: width 0.16s ease;
}

.boss-btn {
  pointer-events: auto;
  width: 100%;
  padding: 9px 14px;
  border-radius: 10px;
  border: 2px solid #fda4af;
  background: linear-gradient(135deg, #be123c, #7e22ce);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.05em;
  cursor: pointer;
  box-shadow: 0 0 22px rgba(225, 29, 72, 0.55);
  animation: pulseBoss 1.6s infinite;
}

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

.boss-lock-pill, .boss-cleared-pill {
  background: rgba(6, 18, 36, 0.88);
  border: 1px solid rgba(251, 191, 36, 0.45);
  color: #fde68a;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  padding: 6px 10px;
  border-radius: 9px;
}

.boss-cleared-pill {
  border-color: rgba(52, 211, 153, 0.55);
  color: #6ee7b7;
}

/* Victory Share Banner */
.victory-banner {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 9;
  width: 240px;
  background: rgba(8, 22, 42, 0.95);
  border: 1.5px solid var(--gold);
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.vb-title {
  font-size: 12px;
  font-weight: 900;
  color: var(--gold);
}

.vb-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
}

.vb-sub {
  font-size: 11px;
  color: var(--text);
  line-height: 1.3;
}

.vb-share-btn {
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid var(--cyan);
  background: linear-gradient(135deg, #0284c7, #0e7490);
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
}

/* Toasts */
.share-toast {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 12;
  max-width: 290px;
  background: rgba(6, 18, 34, 0.96);
  border: 1.5px solid var(--green);
  border-radius: 10px;
  padding: 9px 11px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6);
}

.share-toast-head {
  font-size: 11px;
  font-weight: 900;
  color: var(--green);
  margin-bottom: 4px;
}

.share-toast-body {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  line-height: 1.35;
  color: #dbeafe;
  white-space: pre-wrap;
  word-break: break-word;
}

.relic-toast {
  position: absolute;
  bottom: 58px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 11;
  background: linear-gradient(135deg, rgba(126, 34, 206, 0.95), rgba(14, 116, 144, 0.95));
  border: 1.5px solid #e9d5ff;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 7px 14px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
}

.stage-hint {
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
  padding: 2px 4px;
}

.stage-hint strong {
  color: var(--cyan);
}

/* Command Deck (Right Panel) */
.deck-panel {
  background: linear-gradient(180deg, rgba(10, 22, 40, 0.95), rgba(6, 14, 28, 0.98));
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.42);
  max-height: 585px;
}

.deck-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--border);
  background: rgba(6, 15, 30, 0.95);
}

.deck-tab {
  padding: 10px 6px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  transition: color 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.deck-tab.active {
  color: #fff;
  border-bottom-color: var(--cyan);
  background: rgba(14, 116, 144, 0.22);
}

.cliffhanger-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: rgba(14, 116, 144, 0.16);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
}

.cliff-lbl {
  font-weight: 900;
  color: var(--gold);
  white-space: nowrap;
}

.cliff-text {
  color: #dbeafe;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deck-body {
  padding: 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.upg-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 11px;
  border-radius: 11px;
  border: 1px solid rgba(56, 189, 248, 0.2);
  background: rgba(15, 31, 56, 0.72);
  transition: border-color 0.12s ease, transform 0.12s ease, background 0.12s ease;
}

.upg-card.can-buy {
  border-color: rgba(34, 211, 238, 0.55);
  background: rgba(17, 42, 72, 0.88);
}

.upg-card.locked {
  opacity: 0.52;
}

.upg-info {
  min-width: 0;
  flex: 1;
}

.upg-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.upg-name {
  font-size: 13px;
  font-weight: 800;
  color: #f0f9ff;
}

.upg-lv {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.14);
  padding: 1px 6px;
  border-radius: 999px;
}

.upg-desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.3;
}

.upg-sps {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--teal);
  margin-top: 2px;
}

.buy-btn {
  min-width: 86px;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.85);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  cursor: not-allowed;
  text-align: center;
  flex-shrink: 0;
  transition: all 0.12s ease;
}

.buy-btn.ready {
  border-color: var(--gold);
  background: linear-gradient(135deg, #d97706, #eab308);
  color: #1c1002;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(251, 191, 36, 0.28);
}

.buy-btn.ready:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

/* Prestige Panel inside Deck */
.prestige-box {
  background: linear-gradient(160deg, rgba(88, 28, 135, 0.34), rgba(14, 30, 56, 0.9));
  border: 1px solid rgba(192, 132, 252, 0.45);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.prestige-box h3 {
  font-size: 14px;
  color: #f3e8ff;
}

.prestige-box p {
  font-size: 11.5px;
  color: #d8b4fe;
  line-height: 1.4;
}

.prestige-meter {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 800;
  background: rgba(15, 10, 30, 0.72);
  padding: 8px 10px;
  border-radius: 9px;
}

/* Footer Dock */
.studio-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 12px;
  background: rgba(8, 18, 34, 0.88);
  border: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--muted);
}

/* Fixed Modals */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(2, 8, 18, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.card {
  width: 100%;
  max-width: 440px;
  max-height: min(88dvh, 720px);
  overflow-y: auto;
  background: linear-gradient(180deg, #0d1f38, #071224);
  border: 1.5px solid rgba(56, 189, 248, 0.42);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.72);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card.modal-lg {
  max-width: 580px;
}

.start-card {
  text-align: center;
  align-items: center;
}

.start-badge, .modal-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.09em;
  color: var(--cyan);
  background: rgba(14, 116, 144, 0.28);
  border: 1px solid rgba(34, 211, 238, 0.42);
  padding: 4px 10px;
  border-radius: 999px;
}

.start-card h1 {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #f0f9ff;
  text-shadow: 0 0 20px rgba(34, 211, 238, 0.5);
}

.start-card p {
  font-size: 13.5px;
  color: #cbd5e1;
  line-height: 1.5;
}

.challenge-box {
  width: 100%;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid var(--gold);
  color: #fef08a;
  font-size: 12.5px;
  font-weight: 700;
  padding: 9px 12px;
  border-radius: 10px;
}

.primary-btn {
  width: 100%;
  padding: 12px 18px;
  border-radius: 11px;
  border: 1.5px solid #67e8f9;
  background: linear-gradient(135deg, #0284c7, #06b6d4);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.05em;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(6, 182, 212, 0.35);
  transition: transform 0.12s ease, filter 0.12s ease;
}

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

.primary-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.secondary-btn {
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid rgba(192, 132, 252, 0.55);
  background: rgba(88, 28, 135, 0.45);
  color: #f3e8ff;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
}

.secondary-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

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

.modal-head h2 {
  font-size: 17px;
  font-weight: 900;
  color: #f0f9ff;
}

.close-x {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: rgba(15, 31, 56, 0.9);
  color: var(--text);
  font-size: 15px;
  cursor: pointer;
}

.muted {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}

.offline-box {
  background: rgba(4, 14, 28, 0.85);
  border: 1px solid rgba(251, 191, 36, 0.42);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
}

.offline-val {
  font-size: 24px;
  font-weight: 900;
  color: var(--gold);
}

.offline-meta {
  font-size: 11.5px;
  color: var(--cyan);
  margin-top: 3px;
}

/* Relics Grid */
.relics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.relic-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(12, 26, 48, 0.85);
}

.relic-item.locked {
  opacity: 0.46;
  filter: grayscale(0.8);
}

.relic-item.found {
  border-color: rgba(251, 191, 36, 0.55);
  background: rgba(30, 44, 72, 0.92);
}

.relic-ico {
  font-size: 22px;
  flex-shrink: 0;
}

.relic-meta {
  min-width: 0;
}

.relic-name {
  font-size: 12px;
  font-weight: 800;
  color: #f8fafc;
}

.relic-bonus {
  font-size: 10.5px;
  color: var(--teal);
  font-weight: 700;
}

.relic-src {
  font-size: 10px;
  color: var(--muted);
}

/* Research Tree */
.research-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 11px;
  background: rgba(59, 7, 100, 0.32);
  border: 1px solid rgba(192, 132, 252, 0.4);
}

.rb-lbl {
  font-size: 10px;
  font-weight: 800;
  color: #d8b4fe;
}

.rb-val {
  font-size: 18px;
  font-weight: 900;
  color: #f3e8ff;
}

.rb-val.cyan { color: var(--cyan); }

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

/* Daily & Leaderboard */
.crate-streak-row, .daily-stats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.daily-mod-title {
  font-size: 18px;
  color: var(--gold);
}

.dstat {
  flex: 1;
  background: rgba(8, 20, 38, 0.9);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dstat span {
  font-size: 9.5px;
  font-weight: 800;
  color: var(--muted);
}

.dstat strong {
  font-size: 14px;
  color: #fff;
}

.modal-actions-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lb-submit-row {
  display: flex;
  gap: 8px;
}

#callsign-input {
  flex: 1;
  min-width: 0;
  padding: 9px 11px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: rgba(4, 12, 24, 0.95);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.lb-status {
  font-size: 11.5px;
  color: var(--teal);
  min-height: 16px;
}

.lb-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 11px;
  border-radius: 9px;
  background: rgba(12, 26, 48, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.16);
  font-size: 12.5px;
}

.lb-rank { font-weight: 900; color: var(--gold); width: 28px; }
.lb-name { flex: 1; font-weight: 700; color: #f8fafc; }
.lb-depth { font-size: 11px; color: var(--cyan); margin-right: 10px; }
.lb-score { font-weight: 900; color: var(--gold); }

/* Mobile Responsive (390x844, 0px horizontal overflow) */
@media (max-width: 860px) {
  .shell {
    padding: 8px 8px 14px;
    gap: 8px;
  }

  .hud {
    padding: 8px 10px;
    flex-wrap: wrap;
    gap: 6px;
  }

  .brand {
    display: none;
  }

  .hud-left {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .stat .val {
    font-size: 15px;
  }

  .hud-right {
    width: 100%;
    justify-content: space-between;
    gap: 4px;
  }

  .pill-btn {
    font-size: 11px;
    padding: 5px 9px;
  }

  .icon-btn {
    min-width: 32px;
    height: 32px;
    padding: 0 6px;
    font-size: 14px;
  }

  .main-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .zone-pill .zp-name {
    display: none;
  }

  .deck-panel {
    max-height: none;
    overflow: visible;
  }

  .deck-body {
    max-height: 340px;
    padding-bottom: 16px;
  }

  .relics-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .studio-footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  .victory-banner {
    width: calc(100% - 20px);
    left: 10px;
    right: 10px;
  }
}
