:root {
  --bg-deep: #07060d;
  --bg-surface: #110f1c;
  --bg-card: #151224;
  --bg-elevated: #1c1830;
  --border-subtle: rgba(244, 217, 138, 0.16);
  --border-gold: rgba(244, 217, 138, 0.55);

  --gold: #f4d98a;
  --gold-bright: #ffe699;
  --gold-deep: #b88b32;

  --stat-pwr: #ff6a6a;
  --stat-hp: #5ce69b;
  --stat-spd: #5ec8ff;
  --stat-rng: #f4d98a;
  --stat-fcs: #c084fc;

  --text-main: #f5f2eb;
  --text-muted: #a39cb8;
  --text-dim: #6e6785;

  --font-display: 'Cinzel', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --bar-h: 38px;
}

/* ==========================================================================
   AEVENDORN 2.0 - UNIFIED SVG VECTOR ICON SYSTEM (REPLACING ALL EMOJIS)
   ========================================================================== */
.aev-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  fill: currentColor;
  stroke-width: 0;
  flex-shrink: 0;
  pointer-events: none;
}

.aev-icon-lg {
  font-size: 1.25em;
}

.aev-icon-xl {
  font-size: 1.6em;
}

.aev-icon-gold {
  color: var(--gold);
}

.aev-icon-red {
  color: #ef4444;
}

.aev-icon-cyan {
  color: #38bdf8;
}

.aev-icon-purple {
  color: #c084fc;
}

.aev-icon-green {
  color: #34d399;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  scrollbar-width: thin;
  scrollbar-color: rgba(244, 217, 138, 0.3) rgba(14, 11, 24, 0.6);
}

/* Global Custom Dark-Fantasy Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(14, 11, 24, 0.65);
  border-radius: 8px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(244, 217, 138, 0.35) 0%, rgba(184, 139, 50, 0.45) 100%);
  border-radius: 8px;
  border: 1px solid rgba(244, 217, 138, 0.18);
  box-shadow: inset 0 0 4px rgba(244, 217, 138, 0.15);
  transition: all 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ffe699 0%, #d4af37 100%);
  border-color: rgba(255, 230, 153, 0.5);
  box-shadow: 0 0 10px rgba(244, 217, 138, 0.55);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

html, body {
  background: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 18% 12%, rgba(192, 132, 252, 0.11), transparent 42%),
    radial-gradient(circle at 82% 18%, rgba(244, 217, 138, 0.09), transparent 45%),
    radial-gradient(circle at 50% 85%, rgba(34, 211, 238, 0.08), transparent 50%),
    linear-gradient(180deg, #07060d 0%, #0d0b18 50%, #07060d 100%);
}

/* ==========================================================================
   FLUID, MULTI-BREAKPOINT TOP NAVIGATION BAR (Scales cleanly 320px → 4K)
   ========================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: clamp(50px, 6vw, 60px);
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) minmax(0, auto);
  align-items: center;
  gap: clamp(6px, 1.2vw, 16px);
  padding: 0 clamp(8px, 2vw, 22px);
  background: rgba(10, 8, 18, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-subtle);
}

.brand-btn {
  height: var(--bar-h);
  display: inline-flex;
  align-items: center;
  gap: clamp(6px, 0.8vw, 9px);
  padding: 0 clamp(9px, 1.1vw, 13px);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(244, 217, 138, 0.28);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.16s ease;
  flex-shrink: 0;
}

.brand-btn:hover {
  border-color: var(--gold);
  background: rgba(244, 217, 138, 0.08);
}

.brand-crest {
  color: var(--gold);
  font-size: 15px;
  line-height: 1;
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.11em;
  font-size: clamp(12px, 1.1vw, 14px);
}

.v2-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: #09070f;
  font-weight: 800;
}

.desktop-nav {
  justify-self: center;
  max-width: 100%;
  height: var(--bar-h);
  display: inline-flex;
  align-items: center;
  gap: clamp(2px, 0.4vw, 5px);
  background: rgba(255, 255, 255, 0.035);
  padding: 3px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: auto;
  scrollbar-width: none;
}

.desktop-nav::-webkit-scrollbar {
  display: none;
}

.nav-pill {
  height: calc(var(--bar-h) - 8px);
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 0 clamp(8px, 1vw, 13px);
  border-radius: 7px;
  font-family: var(--font-sans);
  font-size: clamp(11.5px, 0.95vw, 12.5px);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.16s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.nav-lbl-short {
  display: none;
}

.nav-pill:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.nav-pill.active {
  background: linear-gradient(135deg, rgba(244, 217, 138, 0.22), rgba(184, 139, 50, 0.12));
  color: var(--gold-bright);
  box-shadow: inset 0 0 0 1px rgba(244, 217, 138, 0.45);
}

.hud-resources {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: clamp(5px, 0.7vw, 8px);
  flex-shrink: 0;
}

.res-chip {
  height: var(--bar-h);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  padding: 0 clamp(8px, 0.9vw, 12px);
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  white-space: nowrap;
}

.res-label {
  color: var(--text-dim);
  font-weight: 700;
  font-size: 9.5px;
  letter-spacing: 0.08em;
}

.res-val {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(11.5px, 1vw, 13px);
}

.res-val.gold { color: var(--gold); }
.res-val.cyan { color: var(--stat-spd); }

.pack-cta-btn {
  height: var(--bar-h);
  background: linear-gradient(135deg, #f4d98a 0%, #c8963e 100%);
  color: #0b0814;
  border: none;
  padding: 0 clamp(9px, 1.1vw, 14px);
  border-radius: 10px;
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: clamp(11.5px, 0.95vw, 12.5px);
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 4px 14px rgba(244, 217, 138, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pack-count-pill {
  background: rgba(9, 7, 15, 0.22);
  padding: 1px 6px;
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
}

.pack-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(244, 217, 138, 0.45);
}

.icon-bar-btn {
  width: var(--bar-h);
  height: var(--bar-h);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  display: grid;
  place-items: center;
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
}

/* MAIN LAYOUT */
.app-main {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 20px 104px;
}

@media (min-width: 900px) {
  .app-main:has(#view-battle.active),
  body[data-active-tab="battle"] .app-main,
  body.in-battle-match .app-main,
  .app-main:has(#view-fusion.active),
  body[data-active-tab="fusion"] .app-main {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    height: calc(100vh - 56px) !important;
    overflow: hidden !important;
  }
}

.view-section {
  display: none;
  animation: fadeIn 0.2s ease;
}

.view-section.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.eyebrow {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
}

/* ==========================================================================
   CRYSTAL-CLEAR 3-SLOT SQUAD DOCK & INTERACTIVE SLOT TARGETING
   ========================================================================== */
.squad-dock {
  background: linear-gradient(180deg, rgba(28, 24, 48, 0.9), rgba(16, 14, 28, 0.95));
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 18px 20px;
  margin-bottom: 20px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}

.squad-dock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 14px;
}

.resonance-meter-box {
  min-width: 260px;
  background: rgba(8, 7, 15, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 9px 14px;
  border-radius: 12px;
}

.res-meter-top {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 5px;
}

.res-meter-label { color: var(--text-muted); letter-spacing: 0.08em; }
.res-meter-Value { font-family: var(--font-mono); color: var(--gold-bright); }

.res-bar-track {
  height: 7px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 5px;
}

.res-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #34d399, #f4d98a);
  border-radius: 99px;
  transition: width 0.25s ease;
}

.res-meter-sub {
  font-size: 11px;
  color: var(--stat-hp);
  font-weight: 600;
}

.squad-slots-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.squad-slot-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(244, 217, 138, 0.28);
  border-radius: 13px;
  padding: 11px 13px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.squad-slot-card:hover {
  background: rgba(244, 217, 138, 0.08);
  border-color: var(--gold);
}

.squad-slot-card.targeting {
  background: rgba(244, 217, 138, 0.15);
  border-color: var(--gold-bright);
  box-shadow: 0 0 0 2px rgba(244, 217, 138, 0.35), 0 0 22px rgba(244, 217, 138, 0.25);
}

.slot-number-badge {
  position: absolute;
  top: -8px;
  left: 12px;
  background: #1b1730;
  border: 1px solid var(--gold);
  color: var(--gold-bright);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 1px 7px;
  border-radius: 99px;
}

.squad-mini-thumb {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--gold);
  flex-shrink: 0;
}

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

.squad-mini-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.squad-mini-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.squad-slot-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.slot-btn-swap {
  background: rgba(244, 217, 138, 0.16);
  border: 1px solid rgba(244, 217, 138, 0.45);
  color: var(--gold-bright);
  padding: 5px 9px;
  border-radius: 7px;
  font-size: 10.5px;
  font-weight: 800;
  cursor: pointer;
}

.slot-btn-swap.active {
  background: var(--gold);
  color: #09070f;
}

/* FILTER BAR */
.collection-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-btn {
  height: 34px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  padding: 0 13px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}

.filter-btn.active,
.filter-btn:hover {
  background: rgba(244, 217, 138, 0.16);
  border-color: var(--gold);
  color: var(--gold-bright);
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.select-pill,
.search-input,
.select-full,
.text-input {
  background: rgba(15, 13, 26, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-main);
  padding: 8px 13px;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 13px;
}

.search-input {
  min-width: 220px;
}

/* ==========================================================================
   AUTHENTIC PHYSICAL COLLECTOR TCG CARDS (FRONT + 180° FLIPPABLE BACK)
   ========================================================================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(276px, 1fr));
  gap: 20px;
}

.card-grid.compact-grid {
  grid-template-columns: repeat(auto-fill, minmax(252px, 1fr));
}

.tcg-card-scene {
  perspective: 1200px;
  position: relative;
  height: 556px;
  min-height: 556px;
  width: 100%;
  max-width: 326px;
  margin-left: auto;
  margin-right: auto;
  touch-action: pan-y;
}

.tcg-card-scene.no-actions-scene {
  height: 504px;
  min-height: 504px;
}

.tcg-card-flipper {
  position: relative;
  width: 100%;
  height: 100%;
  --rx: 0deg;
  --ry: 0deg;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  transform: rotateY(var(--spin-y, 0deg)) rotateX(var(--rx)) rotateY(var(--ry));
}

.tcg-card-flipper.is-spinning-drag {
  transition: none;
}

.tcg-card-scene.is-flipped-back .tcg-card-flipper {
  --spin-y: 180deg;
}

/* PHYSICAL DIE-CUT OUTER COLLECTOR BORDER (63x88mm Poker Card Feel — 100% UNIFORM HEIGHT) */
.relic-card,
.relic-card *,
.tcg-card-flipper,
.tcg-card-flipper * {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
.relic-card::-webkit-scrollbar,
.relic-card *::-webkit-scrollbar,
.tcg-card-flipper::-webkit-scrollbar,
.tcg-card-flipper *::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.relic-card {
  --glare-x: 50%;
  --glare-y: 30%;
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 15px;
  /* Die-cut collector black outer border like MTG / Flesh & Blood */
  padding: 8px 8px 6px 8px;
  background: #07060b;
  border: 1.5px solid #2b253a;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.18) inset,
    0 -2px 0 rgba(0, 0, 0, 0.9) inset,
    0 4px 0 #040307,
    0 18px 38px rgba(0, 0, 0, 0.78);
  transform: translateZ(1px);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
  cursor: grab;
  overflow: hidden;
  user-select: none;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.relic-card:active {
  cursor: grabbing;
}

.relic-card:hover {
  border-color: rgba(244, 217, 138, 0.65);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 4px 0 #040307,
    0 24px 48px rgba(0, 0, 0, 0.88),
    0 0 26px rgba(244, 217, 138, 0.22);
}

/* INNER EMBOSSED REALM FRAME */
.tcg-inner-frame {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  border-radius: 9px 9px 7px 7px;
  padding: 8px;
  border: 1.5px solid rgba(214, 178, 94, 0.55);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.75),
    inset 0 0 18px rgba(0, 0, 0, 0.65);
  background: linear-gradient(165deg, #241d38 0%, #131020 55%, #1c162e 100%);
}

.relic-card[data-realm="fantasy"] .tcg-inner-frame {
  border-color: #c89d54;
  background:
    radial-gradient(circle at 50% 0%, rgba(180, 118, 42, 0.28), transparent 60%),
    linear-gradient(168deg, #2c2016 0%, #17110c 55%, #241911 100%);
}
.relic-card[data-realm="biomech"] .tcg-inner-frame {
  border-color: #46b5d1;
  background:
    radial-gradient(circle at 50% 0%, rgba(34, 211, 238, 0.22), transparent 60%),
    linear-gradient(168deg, #132530 0%, #0b141c 55%, #12212b 100%);
}
.relic-card[data-realm="cryptid"] .tcg-inner-frame {
  border-color: #7ca952;
  background:
    radial-gradient(circle at 50% 0%, rgba(132, 204, 22, 0.2), transparent 60%),
    linear-gradient(168deg, #1a241b 0%, #0d130e 55%, #162018 100%);
}
.relic-card[data-realm="cosmic"] .tcg-inner-frame {
  border-color: #b57cff;
  background:
    radial-gradient(circle at 50% 0%, rgba(192, 132, 252, 0.26), transparent 60%),
    linear-gradient(168deg, #24153b 0%, #100a1d 55%, #1d1130 100%);
}

/* CORNER FILIGREE RIVETS */
.tcg-inner-frame::before {
  content: '';
  position: absolute;
  inset: 2px;
  border: 1px solid rgba(244, 217, 138, 0.16);
  border-radius: 7px;
  pointer-events: none;
}

.relic-card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    circle at var(--glare-x) var(--glare-y),
    rgba(255, 255, 255, 0.2),
    transparent 52%
  );
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 5;
}

.relic-card:hover::after {
  opacity: 1;
}

.relic-card[data-treatment="holo"]::before,
.relic-card[data-treatment="awakened_first_edition"]::before,
.relic-card[data-treatment="chimera_1of1"]::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 15px;
  background: linear-gradient(
    125deg,
    transparent 15%,
    rgba(244, 217, 138, 0.22) 34%,
    rgba(34, 211, 238, 0.24) 48%,
    rgba(236, 72, 153, 0.24) 62%,
    transparent 82%
  );
  mix-blend-mode: screen;
  z-index: 4;
}

/* ==========================================================================
   EXCLUSIVE ALTERNATE ART LIVING FOIL SHADERS
   ========================================================================== */

/* 1. VOID-INKED (Dark Abyssal Sumi-e & Crimson Runes) */
.relic-card[data-treatment="void_inked"] {
  border-color: #ef4444 !important;
  background: radial-gradient(circle at 50% 20%, #1e1124 0%, #0d0711 70%, #050207 100%) !important;
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.9),
    0 0 20px rgba(239, 68, 68, 0.4),
    inset 0 0 16px rgba(168, 85, 247, 0.25) !important;
}
.relic-card[data-treatment="void_inked"] .tcg-inner-frame {
  border-color: rgba(239, 68, 68, 0.5) !important;
  background: rgba(13, 7, 17, 0.85) !important;
}
.relic-card[data-treatment="void_inked"] .rc-header {
  border-color: #ef4444 !important;
  background: linear-gradient(180deg, #27101e 0%, #0d050c 100%) !important;
}
.relic-card[data-treatment="void_inked"]::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 15px;
  background: linear-gradient(
    130deg,
    transparent 15%,
    rgba(239, 68, 68, 0.28) 40%,
    rgba(147, 51, 234, 0.32) 55%,
    rgba(0, 0, 0, 0.6) 70%,
    transparent 85%
  );
  mix-blend-mode: screen;
  z-index: 4;
}
.relic-card[data-treatment="void_inked"]::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 15px;
  background: radial-gradient(
    circle at var(--glare-x, 50%) var(--glare-y, 30%),
    rgba(239, 68, 68, 0.45) 0%,
    rgba(168, 85, 247, 0.3) 30%,
    rgba(0, 0, 0, 0.8) 65%,
    transparent 85%
  );
  mix-blend-mode: color-dodge;
  opacity: 0.9;
  z-index: 5;
  transition: opacity 0.2s ease;
}

/* 2. CELESTIAL GILDED (Radiant Solar Gold Filigree & Prismatic Starlight) */
.relic-card[data-treatment="celestial_gilded"] {
  border-color: #fbbf24 !important;
  background: radial-gradient(circle at 50% 15%, #2a2010 0%, #151108 70%, #0a0804 100%) !important;
  box-shadow:
    0 12px 35px rgba(0, 0, 0, 0.9),
    0 0 25px rgba(251, 191, 36, 0.45),
    inset 0 0 20px rgba(253, 224, 71, 0.3) !important;
}
.relic-card[data-treatment="celestial_gilded"] .tcg-inner-frame {
  border-color: rgba(251, 191, 36, 0.65) !important;
  background: rgba(21, 17, 8, 0.85) !important;
}
.relic-card[data-treatment="celestial_gilded"] .rc-header {
  border-color: #fde047 !important;
  background: linear-gradient(180deg, #3d2f12 0%, #1a1407 100%) !important;
}
.relic-card[data-treatment="celestial_gilded"]::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 15px;
  background: linear-gradient(
    120deg,
    transparent 10%,
    rgba(254, 240, 138, 0.45) 35%,
    rgba(251, 191, 36, 0.5) 50%,
    rgba(217, 119, 6, 0.35) 65%,
    transparent 85%
  );
  mix-blend-mode: screen;
  z-index: 4;
}
.relic-card[data-treatment="celestial_gilded"]::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 15px;
  background: radial-gradient(
    circle at var(--glare-x, 50%) var(--glare-y, 30%),
    rgba(255, 255, 255, 0.75) 0%,
    rgba(253, 224, 71, 0.55) 20%,
    rgba(251, 146, 60, 0.35) 45%,
    transparent 75%
  );
  mix-blend-mode: overlay;
  opacity: 0.95;
  z-index: 5;
  transition: opacity 0.2s ease;
}

/* 3. STAINED GLASS (Cathedral Prismatic Leadline & Multifaceted Refraction) */
.relic-card[data-treatment="stained_glass"] {
  border-color: #38bdf8 !important;
  background: radial-gradient(circle at 50% 25%, #141f2e 0%, #09101a 70%, #03070d 100%) !important;
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.9),
    0 0 24px rgba(56, 189, 248, 0.4),
    inset 0 0 18px rgba(168, 85, 247, 0.3) !important;
}
.relic-card[data-treatment="stained_glass"] .tcg-inner-frame {
  border-color: rgba(56, 189, 248, 0.55) !important;
  background: rgba(9, 16, 26, 0.85) !important;
}
.relic-card[data-treatment="stained_glass"] .rc-header {
  border-color: #38bdf8 !important;
  background: linear-gradient(180deg, #182d44 0%, #0a131e 100%) !important;
}
.relic-card[data-treatment="stained_glass"]::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 15px;
  background: linear-gradient(
    135deg,
    transparent 5%,
    rgba(239, 68, 68, 0.28) 20%,
    rgba(245, 158, 11, 0.28) 35%,
    rgba(16, 185, 129, 0.28) 50%,
    rgba(56, 189, 248, 0.32) 65%,
    rgba(168, 85, 247, 0.32) 80%,
    transparent 95%
  );
  mix-blend-mode: screen;
  z-index: 4;
}
.relic-card[data-treatment="stained_glass"]::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 15px;
  background: radial-gradient(
    circle at var(--glare-x, 50%) var(--glare-y, 30%),
    rgba(255, 255, 255, 0.6) 0%,
    rgba(56, 189, 248, 0.45) 25%,
    rgba(244, 114, 182, 0.35) 50%,
    transparent 80%
  );
  mix-blend-mode: hard-light;
  opacity: 0.9;
  z-index: 5;
  transition: opacity 0.2s ease;
}

.rc-pill-badge.void-inked {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.3), rgba(147, 51, 234, 0.3)) !important;
  border: 1px solid #ef4444 !important;
  color: #fca5a5 !important;
}
.rc-pill-badge.celestial-gilded {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.35), rgba(217, 119, 6, 0.35)) !important;
  border: 1px solid #fde047 !important;
  color: #fef08a !important;
}
.rc-pill-badge.stained-glass {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.3), rgba(168, 85, 247, 0.3)) !important;
  border: 1px solid #38bdf8 !important;
  color: #bae6fd !important;
}

.relic-card.in-squad {
  border-color: var(--gold-bright);
  box-shadow:
    0 0 0 2px var(--gold-bright),
    0 18px 40px rgba(244, 217, 138, 0.3);
}

.rc-equipped-ribbon {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 4;
  background: linear-gradient(90deg, rgba(244, 217, 138, 0.95), rgba(200, 145, 40, 0.95));
  color: #09070f;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-align: center;
  padding: 3px 8px;
  text-transform: uppercase;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.65);
}

/* EMBOSSED CURVED CROWN TITLE BAR (LIKE MTG / FAB) */
.rc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  margin-bottom: 6px;
  padding: 4px 6px 4px 8px;
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(42, 35, 62, 0.95) 0%, rgba(18, 15, 29, 0.98) 100%);
  border: 1.5px solid rgba(244, 217, 138, 0.5);
  box-shadow:
    0 2px 5px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  z-index: 3;
}

.tcg-realm-crest {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(9, 7, 15, 0.85);
  border: 1px solid rgba(244, 217, 138, 0.55);
  display: grid;
  place-items: center;
  font-size: 11px;
  flex-shrink: 0;
}

.rc-title-wrap {
  min-width: 0;
  flex: 1;
}

.rc-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13.5px;
  letter-spacing: 0.03em;
  color: #fff6df;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rc-fav-btn {
  position: relative;
  z-index: 6;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(244, 217, 138, 0.45);
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  touch-action: manipulation;
  transition: all 0.16s ease;
}

.rc-fav-btn:hover,
.rc-fav-btn.active {
  background: rgba(244, 217, 138, 0.28);
  border-color: var(--gold-bright);
  color: var(--gold-bright);
  box-shadow: 0 0 12px rgba(244, 217, 138, 0.6);
  transform: scale(1.06);
}

.rc-resonance-orb {
  min-width: 34px;
  height: 28px;
  padding: 0 5px;
  border-radius: 8px;
  background: radial-gradient(circle at 32% 28%, #93c5fd 0%, #2563eb 55%, #1e1b4b 100%);
  border: 1.5px solid #f4d98a;
  color: #fff;
  font-family: var(--font-mono);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow:
    0 0 10px rgba(59, 130, 246, 0.55),
    inset 0 1px 2px rgba(255, 255, 255, 0.5);
}

.rc-orb-num {
  font-weight: 900;
  font-size: 11.5px;
  line-height: 1;
}

.rc-orb-lbl {
  font-size: 6.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fde68a;
  line-height: 1;
  margin-top: 1px;
}

.rc-rights-tag {
  font-size: 8.5px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.03em;
}

.rc-rights-tag.unclaimed {
  background: rgba(52, 211, 153, 0.16);
  border: 1px solid rgba(52, 211, 153, 0.45);
  color: #6ee7b7;
}

.rc-rights-tag.claimed {
  background: rgba(244, 217, 138, 0.14);
  border: 1px solid rgba(244, 217, 138, 0.4);
  color: var(--gold-bright);
}

/* BEVELED INNER ARTWORK FRAME (UNIFORM HEIGHT SO STATS NEVER CLIP ON MOBILE!) */
.rc-art-frame {
  position: relative;
  width: 100%;
  height: 148px;
  min-height: 148px;
  max-height: 148px;
  flex: 0 0 148px;
  border-radius: 5px 5px 0 0;
  overflow: hidden;
  background: #06050a;
  border: 1.5px solid rgba(244, 217, 138, 0.48);
  border-bottom: none;
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.85);
}

.rc-art-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  transform: scale(1.03);
  transition: transform 0.35s ease;
}

.relic-card:hover .rc-art-img {
  transform: scale(1.08);
}

/* MID-CARD TYPE & EDITION PLATE (CLASSIC PHYSICAL TCG TYPE LINE + FLIP BUTTON) */
.tcg-type-plate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 4px 8px;
  margin-bottom: 7px;
  border-radius: 5px;
  background: linear-gradient(180deg, #2d2542 0%, #171324 100%);
  border: 1.5px solid rgba(244, 217, 138, 0.52);
  box-shadow:
    0 2px 5px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  z-index: 3;
}

.tcg-type-text {
  font-family: var(--font-display);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #f3e8c8;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tcg-type-right {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.tcg-rarity-gem {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 900;
  border: 1px solid rgba(255, 255, 255, 0.4);
}
.tcg-rarity-gem.common { background: #374151; color: #e5e7eb; }
.tcg-rarity-gem.rare { background: linear-gradient(135deg, #f59e0b, #b45309); color: #fff; }
.tcg-rarity-gem.mythic,
.tcg-rarity-gem.unique { background: linear-gradient(135deg, #ec4899, #8b5cf6, #f4d98a); color: #fff; }

.tcg-flip-btn {
  background: rgba(244, 217, 138, 0.16);
  border: 1px solid rgba(244, 217, 138, 0.55);
  color: var(--gold-bright);
  border-radius: 4px;
  padding: 1px 6px;
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tcg-flip-btn:hover {
  background: var(--gold);
  color: #09070f;
}

.rc-blend-pip {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.8);
}

.rc-blend-pip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rc-badges-overlay {
  position: absolute;
  top: 6px;
  left: 6px;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.rc-pill-badge {
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(8, 7, 15, 0.86);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(244, 217, 138, 0.35);
  color: var(--text-main);
}

.rc-pill-badge.awakened {
  background: linear-gradient(135deg, rgba(244, 217, 138, 0.95), rgba(192, 132, 252, 0.95));
  color: #09070f;
  border-color: #fff;
}

.rc-pill-badge.chimera {
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  color: #fff;
}

/* ENGRAVED PARCHMENT / DARK VELLUM RULES TEXT BOX (FIXED HEIGHT SO ALL CARDS MATCH 100%) */
.rc-genes-list {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  gap: 3px;
  height: 140px;
  min-height: 140px;
  max-height: 140px;
  flex: 0 0 140px;
  overflow: hidden !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  padding: 5px 8px;
  margin-bottom: 6px;
  border-radius: 5px;
  background:
    radial-gradient(circle at 50% 50%, rgba(38, 31, 56, 0.55), rgba(12, 10, 20, 0.92));
  border: 1px solid rgba(244, 217, 138, 0.28);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.75);
}

.rc-genes-list::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.rc-genes-list.dense-genes {
  gap: 2px;
  padding: 4px 6px;
}
.rc-genes-list.dense-genes .rc-gene-box {
  padding-bottom: 2px;
}
.rc-genes-list.dense-genes .rc-gene-name {
  font-size: 10px;
}
.rc-genes-list.dense-genes .rc-gene-type {
  font-size: 8px;
}
.rc-genes-list.dense-genes .rc-gene-desc {
  font-size: 9.5px;
  line-height: 1.18;
}

.rc-gene-box {
  padding-bottom: 4px;
  border-bottom: 1px dashed rgba(244, 217, 138, 0.16);
}
.rc-gene-box:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

/* SCULPTED STAT MEDALLION SOCKETS */
.rc-stats-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  margin-bottom: 5px;
  text-align: center;
  flex-shrink: 0;
}

.rc-stat-cell {
  background: linear-gradient(180deg, #211c34 0%, #0e0b18 100%);
  border: 1px solid rgba(244, 217, 138, 0.38);
  border-radius: 6px;
  padding: 4px 2px;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.rc-stat-val {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 13px;
  line-height: 1.05;
}

.rc-stat-lbl {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #cbbba0;
  margin-top: 1px;
}

/* PRINTED COLLECTOR MICRO-FOOTER IN OUTER BLACK BORDER */
.tcg-collector-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 4px 1px 4px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.52);
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

/* ORNATE PHYSICAL CARD BACK (VISIBLE ON ANY CARD WHEN FLIPPED 180°) */
.tcg-card-back-face {
  position: absolute;
  inset: 0;
  border-radius: 15px;
  padding: 8px;
  background: #07060b;
  border: 1.5px solid rgba(244, 217, 138, 0.65);
  box-shadow:
    0 4px 0 #040307,
    0 18px 38px rgba(0, 0, 0, 0.85);
  transform: rotateY(180deg) translateZ(1px);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  cursor: pointer;
  pointer-events: none;
}

.tcg-card-scene.is-flipped-back .tcg-card-back-face {
  pointer-events: auto;
}

.tcg-card-scene.is-flipped-back .relic-card {
  pointer-events: none;
}

.tcg-card-back-art {
  position: relative;
  flex: 1;
  border-radius: 9px;
  border: 1.5px solid rgba(244, 217, 138, 0.72);
  background:
    url('/img/card_back_ornate.png') center / cover no-repeat,
    radial-gradient(circle at 50% 50%, #2a1d4e 0%, #0b0816 80%);
  box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 16px 14px;
}

.tcg-back-banner-top {
  background: rgba(8, 6, 15, 0.82);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(244, 217, 138, 0.6);
  padding: 4px 12px;
  border-radius: 99px;
  font-family: var(--font-display);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--gold-bright);
}

.tcg-back-banner-bottom {
  width: 100%;
  background: rgba(8, 6, 15, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(244, 217, 138, 0.55);
  border-radius: 10px;
  padding: 8px 10px;
  text-align: center;
}

.rc-gene-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 2px;
}

.rc-gene-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  color: var(--gold-bright);
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  white-space: nowrap;
  overflow: hidden;
  min-width: 0;
}

.gene-tag {
  font-family: var(--font-sans);
  font-size: 8px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 4px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.gene-tag.sig { background: rgba(244, 217, 138, 0.25); color: var(--gold-bright); }
.gene-tag.mutant { background: rgba(236, 72, 153, 0.3); color: #f472b6; }
.gene-tag.tier-rare { background: rgba(192, 132, 252, 0.25); color: #d8b4fe; }
.gene-tag.tier-strong { background: rgba(56, 189, 248, 0.22); color: #7dd3fc; }
.gene-tag.tier-normal { background: rgba(255, 255, 255, 0.1); color: var(--text-muted); }

.rc-gene-type {
  font-size: 8.5px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.rc-gene-desc {
  font-size: 10.5px;
  color: var(--text-muted);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* CARD ACTION BAR */
.rc-action-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 4;
  flex-shrink: 0;
  margin-top: auto;
}

/* ==========================================================================
   3V3 TCG CARD CLASH ARENA (DESKTOP & IPHONE RESPONSIVE CARD DUEL)
   ========================================================================== */
.tcg-arena-shell {
  max-width: 1120px;
  margin: 0 auto;
}

.tcg-arena-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(18, 15, 32, 0.9);
  border: 1px solid var(--border-subtle);
}

.tcg-arena-top-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.tcg-realm-wheel-pill {
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(244, 217, 138, 0.1);
  border: 1px solid rgba(244, 217, 138, 0.35);
  color: var(--text-main);
}

.tcg-arena-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.tcg-playmat {
  position: relative;
  border-radius: 20px;
  padding: 14px;
  background:
    radial-gradient(circle at 50% 48%, rgba(124, 58, 237, 0.16) 0%, transparent 62%),
    linear-gradient(180deg, rgba(22, 16, 38, 0.96) 0%, rgba(10, 8, 20, 0.98) 50%, rgba(18, 22, 38, 0.96) 100%);
  border: 1.5px solid rgba(244, 217, 138, 0.42);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.8),
    inset 0 0 40px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

.tcg-side-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.tcg-side-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.tcg-alive-counter {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  color: #fca5a5;
}

.tcg-battle-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

/* TACTILE BATTLE CARD ON THE ARENA PLAYMAT */
.tcg-duel-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  padding: 8px;
  background: linear-gradient(165deg, #221b36 0%, #100d1c 100%);
  border: 2px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.68);
  cursor: pointer;
  user-select: none;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s ease, box-shadow 0.2s ease;
}

.tcg-duel-card:hover {
  transform: translateY(-3px);
}

.tcg-duel-card.player-card.active-commander {
  border-color: var(--gold-bright);
  box-shadow:
    0 0 0 2px rgba(244, 217, 138, 0.45),
    0 14px 32px rgba(244, 217, 138, 0.28);
  transform: translateY(-5px);
}

.tcg-duel-card.enemy-card.targeted-enemy {
  border-color: #ff6a6a;
  box-shadow:
    0 0 0 2px rgba(255, 106, 106, 0.5),
    0 12px 30px rgba(255, 106, 106, 0.28);
}

.tcg-duel-card.ko-card {
  opacity: 0.36;
  filter: grayscale(0.9);
  pointer-events: none;
}

.tcg-duel-card.acted-card:not(.active-commander) {
  opacity: 0.78;
}

/* Lunge & Hit Animations */
.tcg-duel-card.anim-lunge-up {
  animation: duelLungeUp 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}
.tcg-duel-card.anim-lunge-down {
  animation: duelLungeDown 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}
.tcg-duel-card.anim-hit-shake {
  animation: duelHitShake 0.42s ease;
}

@keyframes duelLungeUp {
  0% { transform: translateY(0) scale(1); }
  45% { transform: translateY(-22px) scale(1.06); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes duelLungeDown {
  0% { transform: translateY(0) scale(1); }
  45% { transform: translateY(22px) scale(1.06); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes duelHitShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px) rotate(-2deg); filter: brightness(1.8) saturate(1.6); }
  45% { transform: translateX(8px) rotate(2deg); }
  70% { transform: translateX(-5px); }
}

/* Enemy Telegraphed Intent Pill */
.duel-intent-pill {
  font-size: 10px;
  font-weight: 800;
  padding: 4px 7px;
  border-radius: 7px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fecaca;
}

.duel-intent-pill.stunned {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #bae6fd;
}

.duel-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
}

.duel-card-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  color: #fff6df;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.duel-realm-tag {
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(244, 217, 138, 0.4);
  flex-shrink: 0;
}

.duel-art-box {
  position: relative;
  height: 112px;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid rgba(244, 217, 138, 0.42);
  background: #07060d;
  margin-bottom: 7px;
}

.duel-art-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.duel-target-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(220, 38, 38, 0.92);
  border: 1px solid #fecaca;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 5px;
  letter-spacing: 0.05em;
}

.duel-eff-badge {
  position: absolute;
  bottom: 5px;
  left: 5px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.duel-status-row {
  position: absolute;
  top: 5px;
  left: 5px;
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
}

.duel-status-chip {
  font-size: 8.5px;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(8, 7, 15, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* HP & Focus Bars on Duel Card */
.duel-hp-wrap {
  margin-bottom: 5px;
}

.duel-hp-top {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 3px;
}

.duel-hp-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  overflow: hidden;
}

.duel-hp-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.3s ease;
}
.duel-hp-fill.player { background: linear-gradient(90deg, #10b981, #5ce69b); }
.duel-hp-fill.enemy { background: linear-gradient(90deg, #ef4444, #fca5a5); }

.duel-meta-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Floating Popup Damage Text */
.duel-floating-pop {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 15;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.95);
  animation: floatPopUp 0.95s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes floatPopUp {
  0% { opacity: 0; transform: translateY(12px) scale(0.7); }
  25% { opacity: 1; transform: translateY(-4px) scale(1.12); }
  80% { opacity: 1; transform: translateY(-18px) scale(1); }
  100% { opacity: 0; transform: translateY(-28px) scale(0.95); }
}

/* CENTER CLASH & LIVE ADVANTAGE TICKER BAR */
.tcg-clash-ticker-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 0;
  padding: 8px 14px;
  border-radius: 12px;
  background: rgba(14, 11, 26, 0.94);
  border: 1px solid rgba(244, 217, 138, 0.35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
}

.tcg-clash-live-hint {
  flex: 1;
  font-size: 12px;
  font-weight: 700;
  color: #fff6df;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tcg-arena-match-status {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
}

.tcg-overdrive-inline {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.tcg-overdrive-inline .od-lbl {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  color: #fbbf24;
}

.tcg-overdrive-track {
  width: 90px;
  height: 8px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px;
  overflow: hidden;
}

.tcg-overdrive-fill {
  height: 100%;
  background: linear-gradient(90deg, #ec4899, #f59e0b, #fbbf24);
  border-radius: 99px;
  transition: width 0.3s ease;
}

/* TACTICAL COMMAND DOCK (THUMB ZONE ACTION DECK) */
.tcg-command-dock {
  margin-top: 10px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(8, 7, 15, 0.94);
  border: 1.5px solid rgba(244, 217, 138, 0.38);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65);
}

.tcg-command-header {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--gold-bright);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.tcg-action-cards-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.tcg-command-footer-row {
  margin-top: 8px;
}

.thumb-end-turn-btn {
  width: 100%;
  height: 44px;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(244, 217, 138, 0.16);
  border: 1.5px solid rgba(244, 217, 138, 0.5);
  color: var(--gold-bright);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.thumb-end-turn-btn:hover:not(:disabled) {
  background: rgba(244, 217, 138, 0.28);
  border-color: var(--gold-bright);
  transform: translateY(-1px);
}

.thumb-end-turn-btn.ready-to-end {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  border-color: #34d399;
  color: #fff;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
  animation: pulseGreenGlow 1.4s infinite alternate;
}

@keyframes pulseGreenGlow {
  0% { box-shadow: 0 0 10px rgba(16, 185, 129, 0.35); }
  100% { box-shadow: 0 0 24px rgba(52, 211, 153, 0.7); }
}

.move-overdrive.full-col-btn {
  grid-column: 1 / -1;
}

.duel-commander-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: #059669;
  border: 1px solid #6ee7b7;
  color: #fff;
  font-size: 8.5px;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.85);
}

.duel-bottom-plate {
  margin-top: 4px;
  min-height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.duel-status-pill {
  width: 100%;
  font-size: 9.5px;
  font-weight: 800;
  padding: 3px 5px;
  border-radius: 5px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.duel-status-pill.ready {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(52, 211, 153, 0.55);
  color: #6ee7b7;
}
.duel-status-pill.done {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #9ca3af;
}
.duel-status-pill.ko {
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.tcg-move-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 11px;
  background: linear-gradient(165deg, rgba(38, 31, 62, 0.95), rgba(18, 15, 32, 0.98));
  border: 1.5px solid rgba(244, 217, 138, 0.45);
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tcg-move-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: var(--gold-bright);
  background: linear-gradient(165deg, rgba(56, 45, 92, 0.95), rgba(26, 21, 46, 0.98));
  box-shadow: 0 8px 20px rgba(244, 217, 138, 0.2);
}

.tcg-move-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.tcg-move-btn.move-strike {
  border-color: rgba(255, 106, 106, 0.6);
}
.tcg-move-btn.move-ability {
  border-color: rgba(192, 132, 252, 0.65);
}
.tcg-move-btn.move-guard {
  border-color: rgba(94, 200, 255, 0.55);
}
.tcg-move-btn.move-overdrive {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.35), rgba(236, 72, 153, 0.35));
  border-color: #f4d98a;
  box-shadow: 0 0 18px rgba(236, 72, 153, 0.4);
}

.tcg-move-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 12.5px;
  color: var(--gold-bright);
}

.tcg-move-cost {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.55);
  color: #e9d5ff;
}

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

.tcg-move-impact {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
  color: #5ce69b;
}


.rc-action-btn {
  flex: 1;
  height: 34px;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  border: 1px solid rgba(244, 217, 138, 0.45);
  background: rgba(244, 217, 138, 0.14);
  color: var(--gold-bright);
  transition: all 0.15s ease;
}

.rc-action-btn:hover {
  background: rgba(244, 217, 138, 0.28);
}

.rc-action-btn.equipped {
  background: rgba(92, 230, 155, 0.18);
  border-color: rgba(92, 230, 155, 0.55);
  color: var(--stat-hp);
}

.rc-action-btn.overcap {
  background: rgba(255, 106, 106, 0.12);
  border-color: rgba(255, 106, 106, 0.4);
  color: #fca5a5;
}

.rc-slot-Quick-pills {
  display: flex;
  gap: 4px;
  width: 100%;
}

.rc-slot-pill {
  flex: 1;
  height: 32px;
  border-radius: 7px;
  font-size: 10.5px;
  font-weight: 800;
  background: rgba(244, 217, 138, 0.18);
  border: 1px solid var(--gold);
  color: var(--gold-bright);
  cursor: pointer;
}

.rc-slot-pill:hover {
  background: var(--gold);
  color: #09070f;
}

/* ==========================================================================
   2.5D TACTICAL DIORAMA BATTLE ARENA
   ========================================================================== */
.battle-layout {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 20px;
  align-items: start;
}

.battle-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel-card {
  background: linear-gradient(180deg, rgba(25, 21, 44, 0.9), rgba(14, 12, 26, 0.95));
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 18px;
}

.panel-heading {
  font-family: var(--font-display);
  font-size: 17px;
  margin-bottom: 6px;
}

.panel-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 12px;
}

.field-label {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 10px 0 5px;
}

.select-full,
.text-input {
  width: 100%;
}

.primary-gold-btn {
  background: linear-gradient(135deg, #f4d98a 0%, #c69235 100%);
  color: #0b0814;
  border: none;
  padding: 10px 16px;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.16s ease;
  box-shadow: 0 6px 20px rgba(244, 217, 138, 0.25);
}

.primary-gold-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text-main);
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 12.5px;
  cursor: pointer;
}

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

.full-width {
  width: 100%;
  margin-top: 12px;
}

.battle-stage-card {
  background: linear-gradient(180deg, rgba(20, 17, 36, 0.94), rgba(10, 8, 19, 0.98));
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.65);
}

.battle-hud-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.battle-side-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 7px 13px;
  border-radius: 12px;
}

.side-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.side-dot.green { background: var(--stat-hp); box-shadow: 0 0 10px var(--stat-hp); }
.side-dot.red { background: var(--stat-pwr); box-shadow: 0 0 10px var(--stat-pwr); }

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

.side-vp {
  font-size: 12.5px;
  color: var(--gold-bright);
}

.battle-turn-banner {
  text-align: center;
  flex: 1;
}

.turn-badge {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  color: var(--gold-bright);
  letter-spacing: 0.08em;
}

.turn-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.canvas-stage-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at 50% 45%, #191530 0%, #07060e 100%);
  border: 1px solid rgba(244, 217, 138, 0.22);
  border-radius: 14px;
  padding: 6px;
  overflow: hidden;
}

#tacticalBoardCanvas {
  max-width: 100%;
  height: auto;
  cursor: pointer;
  touch-action: manipulation;
}

.battle-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ability-buttons-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.ability-cast-btn {
  background: rgba(192, 132, 252, 0.14);
  border: 1.5px solid rgba(192, 132, 252, 0.5);
  color: #e9d5ff;
  padding: 8px 13px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ability-cast-btn.active {
  background: rgba(192, 132, 252, 0.42);
  border-color: #f0abfc;
  box-shadow: 0 0 16px rgba(192, 132, 252, 0.45);
}

.ability-cancel-btn {
  background: rgba(255, 106, 106, 0.18);
  border: 1px solid rgba(255, 106, 106, 0.55);
  color: #fecaca;
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.turn-controls-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.unit-roster-pills {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
  width: 100%;
}

.unit-switch-pill {
  min-width: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  font-size: 10.5px;
}

.unit-switch-pill.selected {
  border-color: var(--gold);
  background: rgba(244, 217, 138, 0.12);
}

.combat-log-list {
  max-height: 200px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11.5px;
}

.log-item {
  padding: 6px 8px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid var(--gold);
  line-height: 1.35;
}
.log-item.player { border-left-color: var(--stat-hp); }
.log-item.enemy { border-left-color: var(--stat-pwr); }
.log-item.confluence { border-left-color: var(--gold-bright); background: rgba(244, 217, 138, 0.08); }

/* ==========================================================================
   VISCERAL FOIL-RIP PACK OPENING CEREMONY & ORNATE PHYSICAL CARD BACKS
   ========================================================================== */
.pack-ceremony-dialog {
  background:
    radial-gradient(circle at 50% 35%, rgba(68, 38, 118, 0.55) 0%, rgba(10, 8, 20, 0.98) 72%);
  border: 2px solid var(--gold);
  min-height: 590px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.sealed-pack-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  text-align: center;
}

.pack-god-rays {
  position: absolute;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(244, 217, 138, 0.16) 15deg,
    transparent 30deg,
    rgba(192, 132, 252, 0.16) 55deg,
    transparent 75deg,
    rgba(244, 217, 138, 0.18) 105deg,
    transparent 130deg,
    rgba(34, 211, 238, 0.14) 165deg,
    transparent 195deg,
    rgba(244, 217, 138, 0.18) 230deg,
    transparent 260deg,
    rgba(236, 72, 153, 0.16) 300deg,
    transparent 335deg
  );
  filter: blur(8px);
  animation: spinRays 16s linear infinite;
  pointer-events: none;
  z-index: 0;
}

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

.sealed-pack-3d {
  position: relative;
  z-index: 2;
  width: 264px;
  height: 396px;
  border-radius: 14px;
  cursor: pointer;
  animation: floatPack 2.8s ease-in-out infinite;
  transition: transform 0.2s ease, filter 0.2s ease;
  user-select: none;
  overflow: visible;
}

.sealed-pack-3d:hover {
  transform: scale(1.04) translateY(-6px);
  filter: drop-shadow(0 0 28px rgba(244, 217, 138, 0.55));
}

/* TWO-PIECE GENUINE SPLIT FOIL WRAPPER (CLIPPED FROM THE EXACT SAME FOIL PACK ARTWORK!) */
.pack-foil-top-piece,
.pack-foil-bottom-piece {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background:
    url('/img/booster_pack_foil.png') center / cover no-repeat,
    linear-gradient(155deg, #2d1f4e 0%, #110c21 50%, #3a2718 100%);
  border: 2px solid rgba(244, 217, 138, 0.88);
  box-shadow:
    0 24px 58px rgba(0, 0, 0, 0.9),
    inset 0 0 18px rgba(244, 217, 138, 0.35);
}

/* Top 21% of the foil wrapper with a jagged physical tear seam along the bottom edge */
.pack-foil-top-piece {
  z-index: 4;
  clip-path: polygon(
    0% 0%,
    100% 0%,
    100% 21%,
    92% 18.5%,
    84% 22%,
    75% 18%,
    66% 21.5%,
    57% 18%,
    48% 22%,
    39% 18.5%,
    30% 21.5%,
    21% 18%,
    11% 22%,
    0% 19%
  );
  transform-origin: 95% 20%;
}

/* Complementary bottom 79% of the foil wrapper matching the exact jagged tear seam */
.pack-foil-bottom-piece {
  z-index: 3;
  clip-path: polygon(
    0% 19%,
    11% 22%,
    21% 18%,
    30% 21.5%,
    39% 18.5%,
    48% 22%,
    57% 18%,
    66% 21.5%,
    75% 18%,
    84% 22%,
    92% 18.5%,
    100% 21%,
    100% 100%,
    0% 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* Embossed foil crimp ridges along the very top edge */
.pack-serrated-edge {
  width: 100%;
  height: 14px;
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.28) 0px,
    rgba(255, 255, 255, 0.28) 3px,
    rgba(0, 0, 0, 0.45) 3px,
    rgba(0, 0, 0, 0.45) 6px
  );
  border-bottom: 1px solid rgba(244, 217, 138, 0.55);
}

.pack-tear-line-hint {
  margin: 18px auto 0;
  width: max-content;
  background: rgba(8, 6, 16, 0.86);
  border: 1px solid rgba(244, 217, 138, 0.85);
  color: #fff6df;
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.12em;
  padding: 4px 11px;
  border-radius: 99px;
  box-shadow: 0 0 14px rgba(244, 217, 138, 0.55);
}

.pack-bottom-meta-bar {
  padding: 12px;
  width: 100%;
  background: linear-gradient(0deg, rgba(6, 5, 12, 0.94) 20%, transparent);
  text-align: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: var(--gold-bright);
}

/* Inner golden light that bursts out of the torn seam when ripped */
.pack-inner-core-glow {
  position: absolute;
  top: 14%;
  left: 8%;
  right: 8%;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0%, #f4d98a 38%, #ec4899 70%, transparent 100%);
  filter: blur(12px);
  opacity: 0;
  z-index: 2;
  pointer-events: none;
}

.pack-slash-beam {
  position: absolute;
  top: 76px;
  left: -30%;
  width: 160%;
  height: 7px;
  background: linear-gradient(90deg, transparent, #fff, #f4d98a, #ec4899, #fff, transparent);
  box-shadow: 0 0 28px #fff, 0 0 48px #f4d98a;
  transform: scaleX(0) rotate(-2deg);
  opacity: 0;
  pointer-events: none;
  z-index: 10;
}

.sealed-pack-3d.cracking {
  animation: none;
}

.sealed-pack-3d.cracking .pack-slash-beam {
  animation: slashAcross 0.36s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.sealed-pack-3d.cracking .pack-inner-core-glow {
  animation: coreBurst 0.78s 0.1s ease-out forwards;
}

.sealed-pack-3d.cracking .pack-foil-top-piece {
  animation: tearTopFoilPieceOff 0.74s 0.12s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.sealed-pack-3d.cracking .pack-foil-bottom-piece {
  animation: slideBottomFoilDown 0.76s 0.18s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes slashAcross {
  0% { transform: scaleX(0) rotate(-2deg); opacity: 1; }
  65% { transform: scaleX(1.08) rotate(-2deg); opacity: 1; }
  100% { transform: scaleX(1.2) rotate(-2deg); opacity: 0; }
}

@keyframes coreBurst {
  0% { opacity: 0; transform: scale(0.5); }
  45% { opacity: 1; transform: scale(1.65); }
  100% { opacity: 0; transform: scale(2.4); }
}

@keyframes tearTopFoilPieceOff {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  35% { transform: translate(26px, -22px) rotate(14deg); opacity: 1; }
  100% { transform: translate(155px, -110px) rotate(42deg); opacity: 0; }
}

@keyframes slideBottomFoilDown {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  50% { transform: translateY(24px) scale(0.98); opacity: 0.92; }
  100% { transform: translateY(95px) scale(0.92); opacity: 0; }
}

@keyframes floatPack {
  0%, 100% { transform: translateY(0px) rotate(-1deg); }
  50% { transform: translateY(-8px) rotate(1deg); }
}

/* PLAYER MARKETPLACE STYLES */
.market-listing-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(15, 12, 26, 0.88);
  border: 1px solid rgba(244, 217, 138, 0.32);
}

.market-seller-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  padding: 2px 4px;
}

.market-rights-pill {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  padding: 5px 10px;
  border-radius: 8px;
  text-align: center;
}

.market-rights-pill.unclaimed {
  background: rgba(52, 211, 153, 0.16);
  border: 1px solid rgba(52, 211, 153, 0.5);
  color: #6ee7b7;
}

.market-rights-pill.claimed {
  background: rgba(244, 217, 138, 0.14);
  border: 1px solid rgba(244, 217, 138, 0.45);
  color: var(--gold-bright);
}

.market-buy-actions {
  display: flex;
  gap: 8px;
  margin-top: 2px;
}

/* 3D FLIP REVEAL CARDS USING REAL ORNATE CARD BACK ART */
.pack-cards-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 14px 0;
}

.flip-card-slot {
  perspective: 1200px;
  min-height: 465px;
  animation: dealCardIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
.flip-card-slot:nth-child(1) { animation-delay: 0.05s; }
.flip-card-slot:nth-child(2) { animation-delay: 0.16s; }
.flip-card-slot:nth-child(3) { animation-delay: 0.28s; }

@keyframes dealCardIn {
  from { opacity: 0; transform: translateY(45px) scale(0.86); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 465px;
  transform-style: preserve-3d;
  transition: transform 0.72s cubic-bezier(0.22, 1, 0.36, 1);
}

.flip-card-inner.is-flipped {
  transform: rotateY(180deg);
}

.flip-face-back,
.flip-face-front {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 15px;
}

.flip-face-back {
  background:
    url('/img/card_back_ornate.png') center / cover no-repeat,
    radial-gradient(circle at 50% 40%, #271d47 0%, #0b0917 85%);
  border: 2.5px solid var(--gold);
  box-shadow:
    0 20px 44px rgba(0, 0, 0, 0.85),
    inset 0 0 24px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 20px 14px;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.flip-face-back:hover {
  transform: translateY(-8px) scale(1.03);
}

.flip-face-back[data-rarity="mythic"],
.flip-face-back[data-rarity="unique"] {
  border-color: #f0abfc;
  box-shadow:
    0 0 44px rgba(236, 72, 153, 0.75),
    0 0 22px rgba(244, 217, 138, 0.8),
    0 20px 44px rgba(0, 0, 0, 0.9);
  animation: mythicPulse 1.6s ease-in-out infinite;
}

.flip-face-back[data-rarity="rare"] {
  border-color: #38bdf8;
  box-shadow:
    0 0 34px rgba(56, 189, 248, 0.65),
    0 20px 44px rgba(0, 0, 0, 0.88);
}

@keyframes mythicPulse {
  0%, 100% { box-shadow: 0 0 36px rgba(236, 72, 153, 0.7), 0 0 18px rgba(244, 217, 138, 0.7); }
  50% { box-shadow: 0 0 58px rgba(236, 72, 153, 1), 0 0 32px rgba(244, 217, 138, 1); }
}

.flip-face-front {
  transform: rotateY(180deg);
  position: relative;
}

/* FUSION, PHYGITAL, KICKSTARTER */
.section-hero {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 24px;
}

.hero-heading {
  font-family: var(--font-display);
  font-size: 28px;
  margin: 6px 0 8px;
}

.hero-sub {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.55;
}

.section-hero.compact-hero {
  margin-bottom: 14px;
}

.section-hero.compact-hero .hero-heading {
  font-size: 22px;
  margin: 4px 0 6px;
}

.fusion-workbench {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 14px;
  align-items: stretch;
  margin-bottom: 20px;
}

.fusion-parents-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.fusion-slot-card,
.fusion-center-core {
  background: linear-gradient(180deg, rgba(25, 21, 44, 0.9), rgba(13, 11, 24, 0.95));
  border: 1.5px dashed rgba(244, 217, 138, 0.35);
  border-radius: 16px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}

.fusion-center-core {
  border-style: solid;
  border-color: rgba(192, 132, 252, 0.45);
  cursor: default;
}

.slot-label {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--gold);
  text-align: center;
  margin-bottom: 8px;
}

.slot-empty {
  flex: 1;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--text-dim);
  font-size: 12px;
  min-height: 92px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
}

.fusion-parent-mini {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 6px;
  border-radius: 11px;
  background: rgba(244, 217, 138, 0.08);
  border: 1px solid rgba(244, 217, 138, 0.45);
}

.fusion-parent-mini img {
  width: 68px;
  height: 68px;
  border-radius: 10px;
  object-fit: cover;
  border: 1.5px solid var(--gold);
}

.odds-gene-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
  margin-bottom: 5px;
  font-size: 12px;
}

.subsection-heading {
  font-family: var(--font-display);
  font-size: 18px;
  margin-bottom: 14px;
}

.phygital-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.step-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(94, 200, 255, 0.16);
  color: var(--stat-spd);
  border: 1px solid rgba(94, 200, 255, 0.4);
  margin-bottom: 10px;
}

.step-badge.gold {
  background: rgba(244, 217, 138, 0.18);
  color: var(--gold-bright);
  border-color: rgba(244, 217, 138, 0.5);
}

.input-action-row {
  display: flex;
  gap: 10px;
}

.mono-input {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.divider-line {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 16px 0;
}

.mint-test-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: rgba(244, 217, 138, 0.06);
  border: 1px solid rgba(244, 217, 138, 0.25);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.mint-title {
  font-weight: 700;
  font-size: 13.5px;
  margin-bottom: 3px;
}

.serial-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
}

.serial-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9px;
  cursor: pointer;
  font-size: 12px;
}

.serial-item:hover {
  border-color: var(--gold);
  background: rgba(244, 217, 138, 0.08);
}

.challenge-callout {
  background: rgba(192, 132, 252, 0.1);
  border: 1px solid rgba(192, 132, 252, 0.4);
  border-radius: 10px;
  padding: 10px 14px;
  margin: 12px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.challenge-label {
  font-size: 10px;
  font-weight: 800;
  color: #d8b4fe;
  letter-spacing: 0.06em;
}

.challenge-code {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 16px;
  color: var(--gold-bright);
}

.form-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.verification-report {
  margin-top: 12px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 5px;
}
.check-row.pass { color: var(--stat-hp); }
.check-row.fail { color: var(--stat-pwr); }

.ks-tiers-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
  margin-bottom: 24px;
}

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

@media (max-width: 640px) {
  .ks-tiers-grid {
    grid-template-columns: 1fr;
  }
}

.ks-tier-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: linear-gradient(180deg, rgba(26, 22, 46, 0.92), rgba(14, 12, 26, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 24px 18px 18px;
}

.ks-tier-card.featured {
  border-color: var(--gold);
  box-shadow: 0 0 28px rgba(244, 217, 138, 0.18);
}

.ks-tier-card.mythic-tier {
  border-color: var(--stat-fcs);
  box-shadow: 0 0 28px rgba(192, 132, 252, 0.22);
}

.ks-ribbon {
  position: absolute;
  top: -10px;
  right: 14px;
  background: var(--gold);
  color: #09070f;
  font-size: 9px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 99px;
  letter-spacing: 0.08em;
}

.ks-price {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 800;
  color: var(--gold-bright);
  height: 32px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.ks-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  min-height: 40px;
  display: flex;
  align-items: center;
  margin: 6px 0 12px;
}

.ks-perks {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.ks-perks li::before {
  content: '• ';
  color: var(--gold);
}

.ks-card-actions {
  margin-top: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.ks-card-actions button {
  height: 40px;
  margin: 0 !important;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.print-studio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
}

.print-proof-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 28px;
  padding: 20px;
  background: rgba(6, 5, 12, 0.65);
  border-radius: 14px;
  border: 1px dashed rgba(244, 217, 138, 0.3);
}

/* MODALS */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(4, 3, 9, 0.86);
  backdrop-filter: blur(12px);
  display: none;
  place-items: center;
  padding: 16px;
}

.modal-backdrop.open {
  display: grid;
}

.modal-dialog {
  background: linear-gradient(180deg, #1b1730, #0f0d1c);
  border: 1px solid var(--border-gold);
  border-radius: 20px;
  padding: 22px;
  max-width: 720px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.85);
}

.modal-dialog.wide-dialog {
  max-width: 960px;
}

/* TOAST */
.toast-container {
  position: fixed;
  bottom: 82px;
  right: 18px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast-msg {
  background: rgba(20, 17, 36, 0.96);
  border: 1px solid var(--gold);
  color: var(--text-main);
  padding: 11px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.65);
  animation: fadeIn 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast-msg svg.aev-icon {
  font-size: 1.25em;
  flex-shrink: 0;
  color: var(--gold-bright);
}

/* MOBILE BOTTOM NAV (Native iOS / Android Feel) */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background: rgba(10, 8, 19, 0.96);
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--border-subtle);
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  justify-content: space-around;
}

.mob-tab {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 6px 4px;
  border-radius: 10px;
  cursor: pointer;
}

.mob-tab.active {
  color: var(--gold-bright);
  background: rgba(244, 217, 138, 0.1);
}

.mob-icon {
  font-size: 16px;
  line-height: 1;
}

/* MOBILE SECTION HEADER & PROGRESSIVE DISCLOSURE PILLS */
.mobile-section-header {
  display: none;
}

/* SHARED MARKET LISTING CARD (TCG Visual Tile) */
.market-listing-card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(165deg, rgba(28, 22, 48, 0.94), rgba(14, 11, 24, 0.98));
  border: 1.5px solid rgba(244, 217, 138, 0.35);
  border-radius: 12px;
  padding: 8px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.12s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.market-listing-card:hover {
  border-color: var(--gold-bright);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}
.market-listing-card:active {
  transform: scale(0.97);
}
.mlc-seller-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.mlc-price-tag {
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--gold-bright);
  font-size: 11px;
}
.mlc-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #000;
}
.mlc-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.mlc-rarity-badge {
  position: absolute;
  bottom: 4px;
  left: 4px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.mlc-body {
  padding: 6px 2px 2px 2px;
}
.mlc-card-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 12px;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mlc-rights-tag {
  font-size: 8.5px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  margin-top: 3px;
  display: inline-block;
}
.mlc-rights-tag.unclaimed {
  background: rgba(52, 211, 153, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.4);
  color: #a7f3d0;
}
.mlc-rights-tag.claimed {
  background: rgba(148, 163, 184, 0.15);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #cbd5e1;
}

.mlc-gene-tag {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  color: #e2e8f0;
  margin-top: 3px;
  background: rgba(0, 0, 0, 0.4);
  padding: 1.5px 5px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mlc-gt-type {
  font-size: 6.5px;
  font-weight: 900;
  padding: 0.5px 3px;
  border-radius: 2px;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.mlc-gt-type.active {
  background: rgba(244, 114, 182, 0.25);
  color: #f472b6;
  border: 1px solid rgba(244, 114, 182, 0.5);
}

.mlc-gt-type.passive {
  background: rgba(94, 200, 255, 0.25);
  color: #7dd3fc;
  border: 1px solid rgba(94, 200, 255, 0.5);
}

.mlc-gt-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mlc-stats-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 9px;
  margin-top: 4px;
  background: rgba(0, 0, 0, 0.55);
  padding: 2.5px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  gap: 2px;
}

.mlc-stat {
  display: inline-flex;
  align-items: center;
  gap: 1.5px;
  font-weight: 800;
}

.mlc-stat.pwr { color: var(--stat-pwr); }
.mlc-stat.hp { color: var(--stat-hp); }
.mlc-stat.spd { color: var(--stat-spd); }
.mlc-stat.rng { color: var(--stat-rng); }
.mlc-stat.fcs { color: var(--stat-fcs); }

.mlc-stat svg {
  width: 9px;
  height: 9px;
}

.mlc-sub-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}

.mlc-cost-pill {
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 800;
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 1px 5px;
  border-radius: 4px;
}

.mlc-usd-tag {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #a7f3d0;
}
.mlc-tap-action {
  margin-top: 6px;
  padding: 6px 8px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  text-align: center;
}
.mlc-tap-action.buy-btn {
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: #0b0914;
}
.mlc-tap-action.cancel-btn {
  background: rgba(248, 113, 113, 0.15);
  border: 1px solid rgba(248, 113, 113, 0.4);
  color: #fca5a5;
}

/* ==========================================================================
   MARKETPLACE FULL PROPER SPINNABLE TCG CARD WRAPPERS
   ========================================================================== */
.market-card-wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 326px;
  margin: 0 auto;
  gap: 8px;
  position: relative;
}

.market-card-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(28, 22, 48, 0.95), rgba(14, 11, 24, 0.98));
  border: 1px solid rgba(244, 217, 138, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  gap: 8px;
}

.mct-seller {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mct-seller strong {
  color: var(--gold-bright);
}

.mct-avatar {
  display: inline-flex;
  color: var(--gold);
  font-size: 13px;
}

.mct-prices {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.mct-shards {
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--gold-bright);
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.mct-usd {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #34d399;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.35);
  padding: 2px 7px;
  border-radius: 6px;
}

.mct-inspect-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(244, 217, 138, 0.3);
  color: var(--gold);
  border-radius: 6px;
  padding: 4px 7px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.mct-inspect-btn:hover {
  background: rgba(244, 217, 138, 0.2);
  border-color: var(--gold-bright);
  color: #fff;
  transform: scale(1.05);
}

.market-card-bottombar {
  display: flex;
  gap: 8px;
  width: 100%;
}

.market-card-bottombar .primary-gold-btn,
.market-card-bottombar .secondary-btn {
  flex: 1;
  padding: 10px 8px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 10px;
  text-align: center;
  white-space: nowrap;
}

/* CAMERA VIEWFINDER & RETICLE FRAME */
.camera-viewfinder-frame {
  position: relative;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(244, 217, 138, 0.4);
}
.viewfinder-reticle {
  position: absolute;
  width: 120px;
  height: 120px;
  border: 1px dashed rgba(244, 217, 138, 0.5);
  border-radius: 10px;
}
.reticle-corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: var(--gold-bright);
  border-style: solid;
}
.reticle-corner.tl { top: -2px; left: -2px; border-width: 3px 0 0 3px; }
.reticle-corner.tr { top: -2px; right: -2px; border-width: 3px 3px 0 0; }
.reticle-corner.bl { bottom: -2px; left: -2px; border-width: 0 0 3px 3px; }
.reticle-corner.br { bottom: -2px; right: -2px; border-width: 0 3px 3px 0; }
.reticle-laser {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ef4444, #fbbf24, #ef4444, transparent);
  box-shadow: 0 0 8px #ef4444;
  animation: laserSweep 2s ease-in-out infinite alternate;
}
@keyframes laserSweep {
  0% { top: 4px; opacity: 0.3; }
  50% { opacity: 1; }
  100% { top: 114px; opacity: 0.3; }
}
.viewfinder-status {
  position: absolute;
  bottom: 8px;
  left: 10px;
  right: 10px;
  text-align: center;
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 3px #000;
}

/* 3D WEB-KIT PERSPECTIVE & TOUCH PRESERVATION */
.tcg-card-scene {
  -webkit-perspective: 1200px;
  perspective: 1200px;
}
.tcg-card-flipper {
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
}

/* ==========================================================================
   FLUID MULTI-STAGE RESPONSIVE BREAKPOINTS (320px → 4K)
   ========================================================================== */

/* Stage 1: Compact Desktop / Laptop (Switch to concise tab labels & hide 2.0 badge) */
@media (max-width: 1380px) {
  .nav-lbl-full {
    display: none;
  }
  .nav-lbl-short {
    display: inline;
  }
  .v2-badge {
    display: none;
  }
}

/* Stage 2: Tablet & Split-Screen Window (Keep top nav visible, hide Shards chip) */
@media (max-width: 1020px) {
  .res-shards {
    display: none;
  }
  .battle-layout,
  .fusion-workbench,
  .phygital-grid {
    grid-template-columns: 1fr;
  }
  .squad-slots-row {
    grid-template-columns: 1fr;
  }
  .pack-cards-row {
    grid-template-columns: 1fr;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ==========================================================================
   ZERO-SCROLL COMPACT BATTLE HUD, TICKER, DRAWER & FUSION PICKER
   ========================================================================== */
.battle-single-screen-wrap {
  max-width: 980px;
  margin: 0 auto;
}

.tcg-hud-compact-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  margin-bottom: 8px;
  border-radius: 11px;
  background: rgba(8, 7, 16, 0.9);
  border: 1px solid rgba(244, 217, 138, 0.3);
  flex-wrap: wrap;
}

.tcg-overdrive-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
  color: #f0abfc;
  flex: 1;
  max-width: 240px;
  min-width: 120px;
}

.tcg-overdrive-inline .tcg-overdrive-track {
  flex: 1;
  height: 7px;
}

.tcg-hud-right-btns {
  display: flex;
  align-items: center;
  gap: 6px;
}

.compact-hud-btn {
  padding: 5px 10px !important;
  font-size: 11px !important;
  border-radius: 8px !important;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tcg-clash-ticker-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 6px 0;
  padding: 5px 10px;
  border-radius: 9px;
  background: rgba(8, 7, 16, 0.86);
  border: 1px solid rgba(244, 217, 138, 0.26);
  font-size: 11.5px;
}

.tcg-mini-wheel {
  font-size: 10px;
  font-weight: 800;
  color: var(--gold-bright);
  white-space: nowrap;
}

.battle-extra-drawer {
  margin-top: 10px;
  background: rgba(14, 12, 26, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 8px 12px;
}

.battle-extra-drawer summary {
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--gold-bright);
  letter-spacing: 0.04em;
  user-select: none;
}

.battle-drawer-body {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* FUSION PICKER COMPACT GRID (FAST 2D CARDS FOR INSTANT MOBILE RENDERING) */
.fusion-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.fusion-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
  gap: 10px;
}

.fusion-picker-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 12px;
  background: linear-gradient(165deg, rgba(28, 24, 48, 0.95), rgba(14, 12, 25, 0.98));
  border: 1.5px solid rgba(244, 217, 138, 0.32);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}

.fusion-picker-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold-bright);
}

.fusion-picker-card.selected-parent {
  border-color: #5ce69b;
  background: linear-gradient(165deg, rgba(16, 62, 48, 0.88), rgba(12, 26, 24, 0.96));
  box-shadow: 0 0 18px rgba(92, 230, 155, 0.32);
}

.fusion-picker-card.exhausted {
  opacity: 0.48;
}

.fp-thumb {
  width: 54px;
  height: 54px;
  border-radius: 9px;
  object-fit: cover;
  border: 1.5px solid var(--gold);
  flex-shrink: 0;
}

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

.fp-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.fp-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 12.5px;
  color: #fff6df;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fp-meta {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 2px;
}

.fp-stats {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
  color: var(--gold-bright);
  margin-top: 3px;
}

/* MODAL SWIPE-DOWN GRABBER HANDLE */
.modal-swipe-grabber {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 4px 0 10px;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.grabber-pill {
  width: 44px;
  height: 5px;
  border-radius: 99px;
  background: rgba(244, 217, 138, 0.45);
}

/* Hide tacky instruction text everywhere */
.grabber-hint {
  display: none !important;
}

/* Completely remove the swipe grabber on desktop screens */
@media (min-width: 769px) {
  .modal-swipe-grabber {
    display: none !important;
  }
}

/* Eliminate all "X" close buttons in modal top-right corners across desktop & mobile */
.icon-close-btn {
  display: none !important;
}

/* ==========================================================================
   MOBILE-FIRST SEGMENTED CONTROLS & SUBPANELS
   ========================================================================== */
.mobile-segment-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(18, 15, 32, 0.92);
  border: 1px solid rgba(244, 217, 138, 0.28);
  border-radius: 13px;
  padding: 4px;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.segment-btn {
  flex: 1;
  padding: 9px 12px;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
  text-align: center;
}

.segment-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.segment-btn.active {
  background: linear-gradient(135deg, #f4d98a 0%, #c69235 100%);
  color: #0b0814;
  box-shadow: 0 3px 12px rgba(244, 217, 138, 0.35);
}

.marketplace-subpanel,
.shop-subpanel,
.phygital-subpanel {
  display: none;
}

.marketplace-subpanel.active,
.shop-subpanel.active,
.phygital-subpanel.active {
  display: block;
  animation: fadeIn 0.2s ease-out;
}

/* ==========================================================================
   MOBILE-FIRST FUSION ALTAR
   ========================================================================== */
.fusion-altar-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

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

.fusion-pedestal {
  flex: 1;
  min-height: 125px;
  border-radius: 16px;
  background: linear-gradient(165deg, rgba(28, 22, 50, 0.95), rgba(13, 10, 24, 0.98));
  border: 1.5px dashed rgba(244, 217, 138, 0.4);
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

.fusion-pedestal:hover {
  border-color: var(--gold-bright);
  background: linear-gradient(165deg, rgba(42, 33, 76, 0.95), rgba(18, 14, 34, 0.98));
}

.pedestal-tag {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 6px;
  text-align: center;
}

.pedestal-body {
  width: 100%;
}

.pedestal-empty {
  font-size: 11.5px;
  color: var(--text-dim);
  text-align: center;
  padding: 12px 6px;
}

.fusion-altar-orb {
  flex-shrink: 0;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(192, 132, 252, 0.35) 0%, rgba(15, 12, 28, 0.98) 75%);
  border: 2px solid #c084fc;
  box-shadow: 0 0 22px rgba(192, 132, 252, 0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
}

.spark-core {
  font-size: 18px;
  line-height: 1;
}

.spark-cost {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 800;
  color: var(--gold-bright);
}

.fusion-offspring-preview {
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(20, 16, 36, 0.94), rgba(10, 8, 20, 0.98));
  border: 1px solid rgba(192, 132, 252, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.mobile-fuse-btn {
  height: 48px;
  font-size: 14px;
  letter-spacing: 0.04em;
  border-radius: 12px;
}

/* ==========================================================================
   MOBILE-FIRST BATTLE ARENA & CONFRONTATION STAGE
   ========================================================================== */
.tcg-confrontation-stage {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 6px 0;
  padding: 8px 10px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(16, 13, 29, 0.92), rgba(9, 7, 18, 0.96));
  border: 1px solid rgba(244, 217, 138, 0.28);
}

.confront-fighter {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.confront-fighter.enemy-side {
  justify-content: flex-end;
}

.confront-thumb {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(244, 217, 138, 0.4);
}

.confront-fighter.enemy-side .confront-thumb {
  border-color: #ef4444;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.45);
}

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

.confront-role {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--gold);
  text-transform: uppercase;
}

.confront-fighter.enemy-side .confront-role {
  color: #fca5a5;
}

.confront-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 12px;
  color: #fff6df;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.confront-vs-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-shrink: 0;
  padding: 0 6px;
}

.confront-vs-pill {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(244, 217, 138, 0.16);
  border: 1px solid rgba(244, 217, 138, 0.5);
  color: var(--gold-bright);
}

.confront-desc {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 3px;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Stage 3: Mobile & iPhone App Shell (Dock nav to bottom bar, clean 2-col status header, safe-area top) */
@media (max-width: 780px) {
  :root {
    --bar-h: 35px;
  }
  html, body {
    height: 100dvh;
    overflow: hidden;
    position: fixed;
    width: 100%;
  }
  .topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    grid-template-columns: minmax(0, auto) minmax(0, auto);
    justify-content: space-between;
    height: calc(52px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 12px 0 12px;
  }
  .desktop-nav {
    display: none;
  }
  .mobile-bottom-nav {
    display: flex;
  }
  .app-main {
    height: calc(100dvh - 52px - env(safe-area-inset-top) - 58px - env(safe-area-inset-bottom));
    margin-top: calc(52px + env(safe-area-inset-top));
    padding: 6px 8px 8px;
    overflow: hidden;
    position: relative;
    max-width: 100%;
  }
  .modal-dialog {
    padding: 12px 10px;
    border-radius: 16px;
  }
  .form-two-col {
    grid-template-columns: 1fr;
  }

  /* CONTAINED SCROLLABLE VIEWS (ZERO BODY SCROLL, NATIVE INERTIA) */
  #view-collection.active,
  #view-marketplace.active {
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    padding-bottom: 24px;
  }

  #view-battle.active,
  #view-fusion.active,
  #view-phygital.active,
  #view-battlepass.active,
  #view-kickstarter.active {
    height: 100%;
    overflow: hidden;
    position: relative;
    max-width: 100vw !important;
    box-sizing: border-box !important;
  }

  /* MOBILE SECTION HEADERS & PROGRESSIVE DISCLOSURE PILLS */
  .mobile-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 8px;
    background: rgba(22, 16, 38, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 9px;
    margin-bottom: 6px;
    flex-shrink: 0;
  }
  .m-sec-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 12.5px;
    color: var(--gold-bright);
    letter-spacing: 0.04em;
  }
  .m-sec-meta {
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .m-sec-pill {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #7dd3fc;
  }
  .info-circle-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-main);
    border-radius: 99px;
    padding: 2px 7px;
    font-size: 10.5px;
    font-weight: 700;
    cursor: pointer;
  }
  #view-fusion .section-hero,
  #view-phygital .section-hero,
  #view-battlepass .section-hero,
  #view-marketplace .section-hero,
  #view-kickstarter .section-hero {
    display: none;
  }

  /* MOBILE-FIRST PORTRAIT BATTLE ARENA (ZERO-SCROLL POKÉMON POCKET / MARVEL SNAP FEEL) */
  #view-battle.active {
    height: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .tcg-arena-shell {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .tcg-playmat {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 6px 7px;
    border-radius: 12px;
    overflow: hidden;
  }
  .tcg-hud-compact-bar {
    padding: 3px 6px;
    margin-bottom: 3px;
    gap: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .tcg-turn-pill {
    font-size: 9.5px;
    padding: 2px 6px;
  }
  .tcg-arena-match-status {
    font-size: 9.5px;
  }
  .compact-hud-btn {
    padding: 4px 8px;
    font-size: 10.5px;
  }

  .tcg-battle-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }
  .tcg-duel-card {
    padding: 5px;
    border-radius: 9px;
    background: linear-gradient(165deg, rgba(26, 21, 46, 0.96), rgba(12, 10, 22, 0.98));
    border: 1.5px solid rgba(244, 217, 138, 0.28);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 114px;
    position: relative;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  }
  .tcg-duel-card.active-commander {
    border-color: #34d399;
    background: linear-gradient(165deg, rgba(16, 55, 42, 0.96), rgba(10, 24, 20, 0.98));
    box-shadow: 0 0 16px rgba(52, 211, 153, 0.45);
    transform: translateY(-2px);
  }
  .tcg-duel-card.targeted-enemy {
    border-color: #ef4444;
    background: linear-gradient(165deg, rgba(55, 18, 26, 0.96), rgba(24, 10, 14, 0.98));
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.45);
    transform: translateY(-2px);
  }
  .tcg-duel-card.acted-card {
    opacity: 0.55;
    filter: grayscale(35%);
  }
  .tcg-duel-card.ko-card {
    opacity: 0.32;
    filter: grayscale(90%);
    pointer-events: none;
  }

  .duel-art-box {
    height: 50px;
    margin-bottom: 2px;
    border-radius: 6px;
    border: 1.5px solid rgba(244, 217, 138, 0.35);
    position: relative;
    overflow: hidden;
  }
  .duel-art-box.realm-fantasy { border-color: #34d399; }
  .duel-art-box.realm-biomech { border-color: #38bdf8; }
  .duel-art-box.realm-cryptid { border-color: #c084fc; }
  .duel-art-box.realm-cosmic { border-color: #f472b6; }

  .duel-card-top {
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3px;
  }
  .duel-card-name {
    font-size: 10px;
    font-weight: 800;
    color: #fff6df;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .duel-realm-tag {
    font-size: 7.5px;
    font-weight: 800;
    padding: 1px 3px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(244, 217, 138, 0.35);
    flex-shrink: 0;
  }

  .duel-target-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #dc2626;
    color: #fff;
    font-size: 7.5px;
    font-weight: 900;
    padding: 1px 4px;
    border-radius: 3px;
    box-shadow: 0 0 8px rgba(220, 38, 38, 0.85);
  }
  .duel-commander-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #059669;
    color: #fff;
    font-size: 7.5px;
    font-weight: 900;
    padding: 1px 4px;
    border-radius: 3px;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.85);
  }
  .duel-eff-badge {
    position: absolute;
    bottom: 2px;
    left: 2px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff;
    font-size: 7px;
    font-weight: 900;
    padding: 1px 3px;
    border-radius: 3px;
  }

  .duel-hp-wrap {
    margin-bottom: 2px;
  }
  .duel-hp-top {
    font-size: 9px;
    margin-bottom: 1px;
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-weight: 800;
  }
  .duel-hp-val.player { color: #4ade80; }
  .duel-hp-val.enemy { color: #f87171; }
  .duel-pwr-val { color: var(--gold-bright); }
  .duel-hp-track {
    height: 5px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 99px;
    overflow: hidden;
  }

  .duel-bottom-plate {
    margin-top: 2px;
    min-height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .duel-intent-pill {
    width: 100%;
    font-size: 8px;
    font-weight: 800;
    padding: 2px 3px;
    border-radius: 4px;
    text-align: center;
    background: rgba(220, 38, 38, 0.85);
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .duel-status-pill {
    width: 100%;
    font-size: 8px;
    font-weight: 800;
    padding: 2px 3px;
    border-radius: 4px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* ARENA CLASH TICKER IN CENTER */
  .tcg-clash-ticker-bar {
    padding: 3px 6px;
    margin: 3px 0;
    border-radius: 7px;
    gap: 4px;
  }
  .tcg-clash-live-hint {
    font-size: 10px;
    font-weight: 700;
  }
  .tcg-overdrive-track {
    width: 55px;
    height: 6px;
  }

  /* THUMB-OPTIMIZED MOBILE COMMAND DOCK */
  .tcg-command-dock {
    margin-top: 3px;
    padding: 5px 6px;
    border-radius: 10px;
  }
  .tcg-command-header {
    font-size: 9px;
    margin-bottom: 3px;
  }
  .tcg-action-cards-strip {
    grid-template-columns: repeat(auto-fit, minmax(68px, 1fr));
    gap: 4px;
  }
  .tcg-move-btn {
    min-height: 42px;
    padding: 4px 4px;
    gap: 2px;
    border-radius: 8px;
  }
  .tcg-move-top {
    font-size: 9.5px;
    font-weight: 800;
  }
  .tcg-move-cost {
    font-size: 7.5px;
    padding: 1px 3px;
  }
  .tcg-move-desc {
    display: none;
  }
  .tcg-move-impact {
    font-size: 8.5px;
    font-weight: 700;
  }
  .thumb-end-turn-btn {
    height: 38px;
    font-size: 12px;
    margin-top: 4px;
    border-radius: 8px;
  }

  /* MOBILE-FIRST FUSION CHAMBER (SINGLE-SCREEN ALTAR + SCROLLABLE TRAY) */
  #view-fusion.active {
    height: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  #view-fusion .fusion-altar-wrap {
    flex-shrink: 0;
    padding: 6px 8px;
    margin-bottom: 4px;
  }
  #view-fusion .fusion-pedestals-row {
    gap: 6px;
  }
  #view-fusion .fusion-pedestal {
    min-height: 64px;
    padding: 5px;
  }
  #view-fusion .pedestal-tag {
    font-size: 8px;
  }
  #view-fusion .pedestal-empty {
    font-size: 9.5px;
    padding: 3px;
  }
  #view-fusion .fusion-altar-orb {
    width: 38px;
    height: 38px;
  }
  #view-fusion .spark-core {
    font-size: 15px;
  }
  #view-fusion .spark-cost {
    font-size: 8px;
    padding: 1px 3px;
  }
  #view-fusion .fusion-offspring-preview {
    margin-top: 4px;
    padding: 5px 8px;
    font-size: 10px;
    border-radius: 8px;
  }
  #view-fusion .mobile-fuse-btn {
    margin-top: 5px;
    height: 34px;
    font-size: 11.5px;
  }
  #view-fusion .collection-toolbar {
    margin: 2px 0 4px !important;
    flex-shrink: 0;
  }
  #fusionRealmFilterGroup {
    overflow-x: auto;
    white-space: nowrap;
    display: flex;
    gap: 4px;
    scrollbar-width: none;
  }
  #fusionRealmFilterGroup::-webkit-scrollbar {
    display: none;
  }
  #fusionRealmFilterGroup .filter-btn {
    padding: 3px 7px;
    font-size: 10.5px;
    flex-shrink: 0;
  }
  #view-fusion .fusion-picker-grid {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    padding: 2px 2px 14px 2px;
  }
  .fusion-picker-card {
    padding: 4px 3px;
    border-radius: 8px;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2px;
  }
  .fusion-picker-card .fp-thumb {
    width: 36px;
    height: 36px;
    border-radius: 6px;
  }
  .fusion-picker-card .fp-info {
    width: 100%;
  }
  .fusion-picker-card .fp-name {
    font-size: 9.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .fusion-picker-card .fp-meta {
    display: none;
  }
  .fusion-picker-card .fp-stats {
    font-size: 8px;
    margin-top: 1px;
  }
  .fusion-picker-card .gene-tag {
    font-size: 7px;
    padding: 1px 3px;
  }

  /* MOBILE-FIRST SHOP (HORIZONTAL SWIPE PACK CAROUSEL) */
  #shopPanelPacks > .panel-card {
    display: none;
  }
  #shopPanelPacks .ks-tiers-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px;
    padding: 6px 4px 16px 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  #shopPanelPacks .ks-tiers-grid::-webkit-scrollbar {
    display: none;
  }
  #shopPanelPacks .ks-tier-card {
    flex: 0 0 250px;
    scroll-snap-align: center;
    padding: 14px 12px;
    border-radius: 14px;
  }

  /* MOBILE-FIRST MARKETPLACE & CARD COLLECTION (FULL PROPER TCG CARDS) */
  #marketListingsGrid,
  .card-grid {
    grid-template-columns: 1fr;
    max-width: 336px;
    margin: 0 auto;
    gap: 22px;
    padding: 4px 2px 24px 2px;
  }
}

/* NATIVE TOUCH INTERACTION: REMOVE HOVER DELAYS & SCALE ON PRESS */
@media (hover: none) and (pointer: coarse) {
  button:hover, .relic-card:hover, .tcg-duel-card:hover, .market-listing-card:hover {
    transform: none !important;
    box-shadow: inherit !important;
  }
  button:active, .primary-gold-btn:active, .secondary-btn:active, .market-listing-card:active {
    transform: scale(0.96) !important;
    opacity: 0.88;
    transition: transform 0.08s ease, opacity 0.08s ease;
  }
}

/* Stage 4: Compact iPhones (320px – 440px: Ultra-clean icon + count pills, zero overflow) */
@media (max-width: 440px) {
  :root {
    --bar-h: 32px;
  }
  .brand-title {
    font-size: 11.5px;
    letter-spacing: 0.08em;
  }
  .res-label,
  .pack-lbl-text {
    display: none;
  }
  .search-input {
    width: 100%;
    min-width: 0;
  }
  .mob-tab {
    font-size: 9.5px;
    padding: 5px 2px;
  }
  .tcg-realm-wheel-pill {
    font-size: 10px;
    padding: 3px 8px;
  }
}

/* ==========================================================================
   MOBILE NATIVE 2.0 OVERHAUL: BATTLE, FUSION, SHOP & REDEEM
   Exact Visual Replication of Approved Concept Mockups
   ========================================================================== */

/* PREVENT ANY HORIZONTAL OVERFLOW ACROSS ALL SCREENS */
html, body, .app-shell, .view-section, main {
  max-width: 100vw !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}

/* --------------------------------------------------------------------------
   1. BATTLE SCREEN: FULLY SEPARATED MOBILE & DESKTOP ARCHITECTURES
   - Mobile: 390x844 Zero-Scroll Portrait HUD & Docked Command Deck
   - Desktop: 16:9 Widescreen 3-Column Tactical Tabletop Arena
   -------------------------------------------------------------------------- */
.battle-mobile-view {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #08060f;
  position: relative;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.battle-mobile-view,
.battle-desktop-view,
#battleMobileArena,
#battleDesktopArena {
  display: none;
}

body:not(.in-battle-match) .battle-mobile-view,
body:not(.in-battle-match) .battle-desktop-view,
body:not(.in-battle-match) #battleMobileArena,
body:not(.in-battle-match) #battleDesktopArena {
  display: none !important;
}

#battleModeLobby {
  display: flex;
}

body.in-battle-match #battleModeLobby {
  display: none !important;
}

@media (max-width: 899px) {
  body.in-battle-match .battle-mobile-view {
    display: flex !important;
  }
  body.in-battle-match .battle-desktop-view {
    display: none !important;
  }
}

#view-battle.active {
  height: 100% !important;
  width: 100% !important;
  max-width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

@media (min-width: 900px) {
  body.in-battle-match .battle-mobile-view {
    display: none !important;
  }
  body.in-battle-match .battle-desktop-view {
    display: grid !important;
    grid-template-columns: clamp(195px, 16vw, 340px) minmax(0, 1fr) clamp(215px, 18.5vw, 380px);
    height: 100% !important;
    flex: 1 1 auto;
    width: 100%;
    max-width: 100% !important;
    margin: 0 !important;
    overflow: hidden;
    gap: clamp(8px, 1.2vw, 20px);
    padding: clamp(6px, 1vh, 12px) clamp(10px, 1.4vw, 24px);
    box-sizing: border-box;
    background: radial-gradient(ellipse at 50% 35%, #18122c 0%, #08060f 100%);
  }
}

.battle-screen-shell {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #08060f;
  position: relative;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* TOP HUD BAR (REMOVED ON MOBILE PER REQUEST) */
.battle-top-hud {
  display: none !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}

.b-hud-hero-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.b-hud-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background-size: cover;
  background-position: center;
  background-color: #1a142e;
  box-shadow: 0 0 8px rgba(244, 217, 138, 0.35);
}

.b-hud-hero-text {
  display: flex;
  flex-direction: column;
}

.b-hud-name {
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 800;
  color: #fff6df;
}

.b-hud-role {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--gold);
  text-transform: uppercase;
}

.b-hud-turn-center {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.b-hud-turn-title {
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 800;
  color: #fef08a;
  letter-spacing: 0.05em;
}

.b-hud-mana-gems {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 1px;
}

.b-mana-gem {
  font-size: 11px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.b-mana-gem.filled {
  color: #38bdf8;
  filter: drop-shadow(0 0 4px #38bdf8);
}

.b-mana-gem.empty {
  color: rgba(255, 255, 255, 0.2);
}

.b-mana-gem svg {
  width: 1em;
  height: 1em;
}

.b-hud-mana-text {
  font-family: var(--font-mono);
  font-size: 7.5px;
  color: #7dd3fc;
  font-weight: 700;
}

.b-hud-hp-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.b-hud-hp-val {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  color: #fca5a5;
  white-space: nowrap;
}

.b-hud-quick-btns {
  display: flex;
  gap: 5px;
  align-items: center;
}

.b-hud-icon-btn {
  width: 36px;
  height: 38px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.1s ease, background 0.15s ease, border-color 0.15s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.b-hud-icon-btn:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.2);
}

.b-hud-icon-btn.gold {
  border-color: var(--gold);
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.25) 0%, rgba(180, 83, 9, 0.35) 100%);
  color: var(--gold-bright);
}

.b-hud-icon-btn .bhib-icon {
  font-size: 13px;
  line-height: 1;
}

.b-hud-icon-btn .bhib-lbl {
  font-family: var(--font-mono);
  font-size: 6.5px;
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1;
  color: #cbd5e1;
}

.b-hud-icon-btn.gold .bhib-lbl {
  color: var(--gold-bright);
}

/* 3D PERSPECTIVE BATTLEFIELD ARENA */
.battle-perspective-arena {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  padding: 10px 8px 8px;
  position: relative;
  background:
    radial-gradient(ellipse at 50% 35%, rgba(220, 80, 20, 0.24) 0%, transparent 65%),
    radial-gradient(circle at 50% 50%, #1e162f 0%, #08060f 100%);
  overflow: hidden;
}

.arena-formation {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: center;
  z-index: 2;
}

.formation-slot {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 0;
}

/* ENEMY AND PLAYER CARD STYLING ON ARENA PLAYMAT (STRICT 2.5:3.5 TCG CARD RATIO) */
.arena-fighter-card {
  width: clamp(84px, calc((100vw - 36px) / 3), 114px);
  aspect-ratio: 2.5 / 3.5 !important;
  height: auto !important;
  max-height: none !important;
  border-radius: 9px;
  padding: 4px;
  background: linear-gradient(165deg, rgba(32, 22, 52, 0.98) 0%, rgba(12, 9, 22, 100%));
  border: 1.5px solid rgba(244, 217, 138, 0.35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1px;
  position: relative;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
  flex-shrink: 0;
  overflow: hidden;
}

.arena-fighter-card.target-enemy {
  border-color: #ef4444 !important;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.75), 0 4px 14px rgba(0, 0, 0, 0.8) !important;
  transform: translateY(-2px);
}

.arena-fighter-card.active-commander {
  border-color: #34d399 !important;
  box-shadow: 0 0 16px rgba(52, 211, 153, 0.75), 0 4px 14px rgba(0, 0, 0, 0.8) !important;
  transform: translateY(-2px);
}

.arena-fighter-card.ko-card {
  opacity: 0.45;
  filter: grayscale(0.7);
}

.af-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
  height: 14px;
}

.af-gem-icon {
  font-size: 8px;
  line-height: 1;
}

.af-name {
  font-family: var(--font-display);
  font-size: 8px;
  font-weight: 800;
  color: #fff6df;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  text-align: center;
}

.af-lvl-crown {
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 900;
  color: var(--gold-bright);
}

.af-art-window {
  height: 68px;
  border-radius: 5px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.6);
  flex-shrink: 0;
}

.af-art-window img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pedestal-golden-ring {
  position: absolute;
  bottom: 1px;
  left: 50%;
  transform: translateX(-50%);
  width: 82%;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fbbf24;
  box-shadow: 0 0 10px #fbbf24, inset 0 0 6px #f59e0b;
  pointer-events: none;
  animation: ringPulse 2s infinite ease-in-out;
}

@keyframes ringPulse {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.8; }
  50% { transform: translateX(-50%) scale(1.1); opacity: 1; }
}

.arena-target-reticle {
  position: absolute;
  top: 2px;
  right: 2px;
  font-size: 13px;
  filter: drop-shadow(0 0 4px #ef4444);
  animation: targetPulse 1.2s infinite ease-in-out;
}

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

.af-intent-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 3px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
}

.af-intent-badge.strike { background: rgba(239, 68, 68, 0.85); color: #fff; }
.af-intent-badge.shield { background: rgba(56, 189, 248, 0.85); color: #fff; }
.af-intent-badge.ready { background: rgba(52, 211, 153, 0.85); color: #042f2e; }
.af-intent-badge.done { background: rgba(30, 41, 59, 0.85); color: #94a3b8; }
.af-intent-badge.stun { background: rgba(6, 182, 212, 0.85); color: #fff; }
.af-intent-badge.ko { background: rgba(239, 68, 68, 0.85); color: #fff; }

.af-type-ribbon {
  font-family: var(--font-mono);
  font-size: 6.5px;
  font-weight: 800;
  text-align: center;
  color: #cbd5e1;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 3px;
  padding: 1px 2px;
  margin: 1px 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.af-hp-bar-trough {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.6);
  overflow: hidden;
  margin: 1px 0;
}

.af-hp-bar-progress {
  height: 100%;
  transition: width 0.3s ease;
}

.af-hp-bar-progress.enemy {
  background: linear-gradient(90deg, #ef4444, #f87171);
}

.af-hp-bar-progress.player {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.af-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2px;
  margin-top: auto;
}

.af-corner-shield {
  display: flex;
  align-items: center;
  gap: 1px;
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 800;
  padding: 1px 3px;
  border-radius: 3px;
}

.af-corner-shield.atk {
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.af-corner-shield.focus {
  background: rgba(245, 158, 11, 0.25);
  color: #fde047;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.af-corner-shield.role {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  font-size: 6.5px;
}

.af-corner-shield.hp {
  background: rgba(52, 211, 153, 0.25);
  color: #a7f3d0;
  border: 1px solid rgba(52, 211, 153, 0.4);
}

/* ARENA FLOOR CLASH TICKER (REMOVED ON MOBILE PER REQUEST) */
.arena-floor-clash,
#arenaFloorClash {
  display: none !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}

.arena-clash-ticker {
  font-size: 9px;
  color: #fff6df;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 auto;
}

.arena-overdrive-meter {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.od-text {
  font-family: var(--font-mono);
  font-size: 8.5px;
  color: #fbbf24;
}

.od-bar-track {
  width: 50px;
  height: 6px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.od-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

/* ORNATE TACTICAL COMMAND DECK (BOTTOM HALF) */
.tactical-command-deck {
  flex-shrink: 0;
  background: linear-gradient(180deg, #1b152c 0%, #0d0a18 100%);
  border-top: 2px solid #d4af37;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.7);
  padding: 8px 8px 10px;
  z-index: 10;
}

.deck-main-row {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
  align-items: stretch;
  justify-content: center;
}

/* LEFT: ACTIVE HERO COMMANDER CARD (EXACT 2.5:3.5 CARD RATIO) */
.deck-hero-card {
  width: clamp(74px, 21.5vw, 102px);
  aspect-ratio: 2.5 / 3.5;
  height: calc(clamp(74px, 21.5vw, 102px) * 1.4);
  max-height: clamp(104px, 14.5vh, 145px);
  border-radius: 9px;
  border: 1.5px solid var(--gold);
  background: linear-gradient(165deg, #241b38 0%, #0f0b1a 100%);
  padding: 4px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.65),
    0 0 10px rgba(244, 217, 138, 0.25);
  flex-shrink: 0;
  box-sizing: border-box;
}

.dh-level-badge {
  position: absolute;
  top: -5px;
  left: -5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gold);
  color: #0b0814;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #fff;
  z-index: 2;
}

.dh-res-badge {
  position: absolute;
  bottom: -5px;
  right: -5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #10b981;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #fff;
  z-index: 2;
}

.dh-portrait-frame {
  height: 52px;
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid rgba(244, 217, 138, 0.4);
  flex: 1 1 auto;
}

.dh-portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dh-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.dh-name {
  font-family: var(--font-display);
  font-size: 8px;
  font-weight: 800;
  color: #fff6df;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dh-sub {
  font-size: 6.5px;
  color: var(--text-muted);
}

.dh-bar-row {
  margin-top: 1px;
}

.dh-bar {
  font-family: var(--font-mono);
  font-size: 6.5px;
  font-weight: 800;
  padding: 1px 3px;
  border-radius: 3px;
  text-align: center;
}

.dh-bar.hp {
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.dh-bar.mana {
  background: rgba(56, 189, 248, 0.25);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

/* RIGHT: 3 VERTICAL TACTICAL ACTION CARDS (EXACT 2.5:3.5 CARD RATIO) */
.deck-action-cards {
  display: flex;
  gap: 6px;
  flex: 1 1 auto;
  justify-content: space-between;
}

.tcg-tactical-action-card {
  width: clamp(70px, 20vw, 96px);
  aspect-ratio: 2.5 / 3.5;
  height: calc(clamp(70px, 20vw, 96px) * 1.4);
  max-height: clamp(98px, 14vh, 137px);
  border-radius: 9px;
  background: linear-gradient(165deg, #221b38 0%, #100c1e 100%);
  border: 1.5px solid rgba(244, 217, 138, 0.35);
  padding: 4px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: transform 0.1s ease, border-color 0.15s ease;
  user-select: none;
  box-sizing: border-box;
  flex-shrink: 0;
  overflow: hidden;
}

.tcg-tactical-action-card:active {
  transform: scale(0.95);
}

.tcg-tactical-action-card.strike {
  border-color: rgba(245, 158, 11, 0.5);
}

.tcg-tactical-action-card.ability {
  border-color: rgba(192, 132, 252, 0.6);
  box-shadow: 0 0 10px rgba(192, 132, 252, 0.25);
}

.tcg-tactical-action-card.guard {
  border-color: rgba(56, 189, 248, 0.5);
}

.tcg-tactical-action-card.disabled {
  opacity: 0.45;
  filter: grayscale(0.6);
  pointer-events: none;
}

.tac-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.tac-cost-orb {
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 900;
  background: #0284c7;
  color: #fff;
  padding: 1px 3px;
  border-radius: 3px;
}

.tac-action-title {
  font-family: var(--font-display);
  font-size: 8px;
  font-weight: 800;
  color: #fff6df;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  text-align: center;
}

.tac-spell-art {
  height: 48px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, rgba(0, 0, 0, 0.4) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin: 1px 0;
}

.tac-emblem-glow {
  font-size: 20px;
  filter: drop-shadow(0 0 6px rgba(244, 217, 138, 0.4));
}

.tac-impact-ribbon {
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 900;
  width: 100%;
  text-align: center;
  border-radius: 3px;
  padding: 1px 0;
}

.tac-impact-ribbon.strike { background: rgba(239, 68, 68, 0.25); color: #fca5a5; }
.tac-impact-ribbon.ability { background: rgba(168, 85, 247, 0.25); color: #d8b4fe; }
.tac-impact-ribbon.guard { background: rgba(56, 189, 248, 0.25); color: #7dd3fc; }

.tac-rule-text {
  font-family: var(--font-mono);
  font-size: 6.5px;
  color: #cbd5e1;
  text-align: center;
}

.tac-cost-pill {
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.4);
  color: var(--gold);
  border: 1px solid rgba(244, 217, 138, 0.25);
}

/* DECK BOTTOM STRIP */
.deck-bottom-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
}

.deck-squad-hand {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}

.deck-squad-hand::-webkit-scrollbar {
  display: none;
}

.hand-mini-card {
  width: 44px;
  height: 58px;
  border-radius: 6px;
  border: 1px solid rgba(244, 217, 138, 0.35);
  background-size: cover;
  background-position: center;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}

.hand-mini-card.active {
  border-color: #34d399;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.6);
}

.hand-mini-cost {
  position: absolute;
  top: 1px;
  left: 1px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* CIRCULAR GOLDEN END TURN MEDALLION */
.golden-end-turn-medallion {
  width: 58px;
  height: 58px;
  min-width: 58px;
  border-radius: 50%;
  background: radial-gradient(circle, #f59e0b 0%, #b45309 70%, #78350f 100%);
  border: 2.5px solid #fef3c7;
  box-shadow:
    0 0 16px rgba(245, 158, 11, 0.65),
    inset 0 0 8px rgba(255, 255, 255, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 9px;
  line-height: 1.1;
  text-align: center;
  flex-shrink: 0;
  transition: transform 0.1s ease, box-shadow 0.2s ease;
  animation: amberPulseGlow 1.8s infinite ease-out;
}

.golden-end-turn-medallion:active {
  transform: scale(0.92);
}

.golden-end-turn-medallion:disabled {
  opacity: 0.55;
  animation: none;
  cursor: default;
  filter: grayscale(0.5);
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
}

.golden-end-turn-medallion .et-crest {
  font-size: 13px;
  line-height: 1;
  margin-bottom: 1px;
}

/* --------------------------------------------------------------------------
   DESKTOP BATTLE VIEW STYLING (16:9 Widescreen 3-Column Arena)
   -------------------------------------------------------------------------- */
.desk-battle-col {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.desk-intel-col {
  gap: clamp(6px, 1vh, 10px);
  width: 100%;
  flex-shrink: 0;
}

.desk-playmat-col {
  justify-content: space-between;
  align-items: center;
  flex: 1 1 auto;
  gap: clamp(4px, 0.8vh, 8px);
  position: relative;
  min-width: 0;
  width: 100%;
}

.desk-inspector-col {
  gap: clamp(6px, 1vh, 10px);
  width: 100%;
  flex-shrink: 0;
}

.desk-panel-card {
  background: linear-gradient(165deg, rgba(22, 17, 36, 0.95) 0%, rgba(11, 8, 20, 0.98) 100%);
  border: 1.5px solid rgba(244, 217, 138, 0.25);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.desk-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dph-icon {
  font-size: 13px;
  margin-right: 6px;
}

.dph-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  color: #fff6df;
  letter-spacing: 0.06em;
  flex: 1;
}

.dph-badge,
.dph-count {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.15);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.dph-badge.enemy {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.4);
}

.dph-badge.ally {
  background: rgba(52, 211, 153, 0.2);
  color: #a7f3d0;
  border-color: rgba(52, 211, 153, 0.4);
}

/* 1. LEFT COLUMN: AFFINITY & COMBAT LOG */
.desk-affinity-panel {
  flex-shrink: 0;
}

.desk-affinity-body {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.desk-affinity-wheel-wrap {
  width: 100%;
  height: 125px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.affinity-wheel-svg {
  width: 130px;
  height: 125px;
  overflow: visible;
}

.wheel-path {
  stroke: rgba(255, 255, 255, 0.15);
  stroke-width: 1.5;
  stroke-dasharray: 3, 3;
  fill: none;
  transition: all 0.3s ease;
}

.wheel-path.active-super {
  stroke: #fbbf24;
  stroke-width: 2.5;
  stroke-dasharray: none;
  filter: drop-shadow(0 0 6px #f59e0b);
}

.wheel-node {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.wheel-node:hover {
  transform: scale(1.15);
}

.wheel-node.wheel-attacker circle {
  stroke: #fbbf24 !important;
  stroke-width: 2.5 !important;
  filter: drop-shadow(0 0 8px #f59e0b);
}

.wheel-node.wheel-defender circle {
  stroke: #ef4444 !important;
  stroke-width: 2.5 !important;
  filter: drop-shadow(0 0 8px #ef4444);
}

.desk-affinity-legend {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 3px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 6px;
}

.aff-row {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.aff-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
}

.aff-dot.fire { background: #ef4444; }
.aff-dot.earth { background: #10b981; }
.aff-dot.water { background: #06b6d4; }
.aff-dot.shadow { background: #a855f7; }
.aff-dot.air { background: #f59e0b; }

.aff-val {
  color: #34d399;
  font-weight: 800;
}

.desk-combat-log-panel {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.desk-combat-log-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(244, 217, 138, 0.3) transparent;
}

.desk-log-item {
  font-size: 10px;
  line-height: 1.4;
  padding: 6px 9px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
}

.desk-log-item.player {
  border-left-color: #34d399;
  background: rgba(52, 211, 153, 0.08);
  color: #e2e8f0;
}

.desk-log-item.enemy {
  border-left-color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
  color: #fca5a5;
}

.desk-log-item.confluence {
  border-left-color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  color: #bae6fd;
  font-weight: 700;
}

.desk-log-turn {
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 800;
  color: var(--gold);
  margin-right: 5px;
}

.desk-tactical-options {
  display: flex;
  gap: clamp(4px, 0.6vw, 8px);
  width: 100%;
  flex-shrink: 0;
}

.desk-tactical-btn {
  flex: 1 1 0;
  min-width: 0;
  padding: clamp(6px, 0.8vh, 8px) clamp(4px, 0.5vw, 10px);
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: clamp(9px, 0.8vw, 11px);
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(3px, 0.4vw, 6px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: transform 0.1s ease, filter 0.15s ease;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.desk-tactical-btn:active {
  transform: scale(0.96);
}

.desk-tactical-btn.gold {
  background: linear-gradient(135deg, #f59e0b, #b45309);
  color: #fff;
  border: 1.5px solid #fde68a;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* 2. CENTER COLUMN: OPPONENT BAR & PLAYMAT & ACTION FAN */
.desk-opponent-header {
  background: linear-gradient(180deg, rgba(22, 16, 36, 0.95) 0%, rgba(12, 9, 20, 0.92) 100%);
  border: 1.5px solid rgba(244, 217, 138, 0.28);
  border-radius: 12px;
  padding: clamp(4px, 0.7vh, 8px) clamp(8px, 1.2vw, 14px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(8px, 1vw, 14px);
  flex-shrink: 0;
  width: 100%;
  max-width: 1480px;
  box-sizing: border-box;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}

.doh-profile {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1vw, 12px);
  min-width: 0;
  flex: 1 1 auto;
}

.doh-avatar-ring {
  position: relative;
  width: clamp(32px, 3.5vw, 40px);
  height: clamp(32px, 3.5vw, 40px);
  border-radius: 50%;
  border: 2px solid #ef4444;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
  flex-shrink: 0;
}

.doh-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
}

.doh-boss-tag {
  position: absolute;
  bottom: -3px;
  left: 50%;
  transform: translateX(-50%);
  background: #ef4444;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 900;
  padding: 0 4px;
  border-radius: 3px;
  letter-spacing: 0.05em;
}

.doh-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

.doh-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.doh-name {
  font-family: var(--font-display);
  font-size: clamp(11px, 1vw, 13px);
  font-weight: 800;
  color: #fff6df;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doh-level-pill {
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
  white-space: nowrap;
  flex-shrink: 0;
}

.doh-hp-bar-track {
  width: 100%;
  max-width: 240px;
  min-width: 60px;
  height: 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.doh-hp-fill {
  height: 100%;
  background: linear-gradient(90deg, #dc2626, #f87171);
  transition: width 0.3s ease;
}

.doh-stats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 700;
  color: #fca5a5;
  max-width: 240px;
}

.doh-focus-gems {
  display: flex;
  gap: 3px;
  font-size: 10px;
}

.doh-facedown-hand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.facedown-card {
  width: clamp(34px, 3.5vw, 48px);
  aspect-ratio: 2.5 / 3.5;
  height: auto;
  border-radius: 6px;
  border: 1.5px solid rgba(244, 217, 138, 0.45);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7);
  margin-left: clamp(-14px, -1.2vw, -8px);
  overflow: hidden;
  transition: transform 0.2s ease;
  flex-shrink: 0;
  box-sizing: border-box;
}

.facedown-card:first-child {
  margin-left: 0;
}

.facedown-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* TABLETOP STONE BOARD */
.desk-tabletop-board {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  width: 100%;
  max-width: 1480px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: radial-gradient(circle at 50% 50%, rgba(35, 25, 55, 0.65) 0%, rgba(10, 8, 18, 0.95) 100%), linear-gradient(180deg, #140d24 0%, #080610 100%);
  border: 2px solid rgba(160, 120, 60, 0.35);
  border-radius: 14px;
  padding: clamp(6px, 1vh, 10px) clamp(8px, 1.2vw, 16px);
  margin: 2px 0;
  position: relative;
  box-shadow: inset 0 0 32px rgba(0, 0, 0, 0.85);
  box-sizing: border-box;
  overflow: hidden;
}

.desk-tabletop-board::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(ellipse at 16.6% 50%, rgba(244, 217, 138, 0.03) 0%, transparent 65%),
    radial-gradient(ellipse at 50% 50%, rgba(244, 217, 138, 0.05) 0%, transparent 65%),
    radial-gradient(ellipse at 83.3% 50%, rgba(244, 217, 138, 0.03) 0%, transparent 65%);
  pointer-events: none;
  border-radius: 12px;
}

.desk-lanes-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(6px, 1vw, 16px);
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

.desk-lane-slot {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 0;
  min-width: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  position: relative;
  border-radius: clamp(10px, 1vw, 16px);
  background: radial-gradient(ellipse at 50% 50%, rgba(244, 217, 138, 0.035) 0%, rgba(10, 7, 18, 0.35) 100%);
  border: 1px dashed rgba(244, 217, 138, 0.16);
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.45);
  padding: clamp(3px, 0.5vh, 6px);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.desk-lane-slot.enemy {
  border-color: rgba(239, 68, 68, 0.18);
  background: radial-gradient(ellipse at 50% 50%, rgba(239, 68, 68, 0.035) 0%, rgba(10, 7, 18, 0.35) 100%);
}

.desk-lane-slot.player {
  border-color: rgba(52, 211, 153, 0.18);
  background: radial-gradient(ellipse at 50% 50%, rgba(52, 211, 153, 0.035) 0%, rgba(10, 7, 18, 0.35) 100%);
}

.desk-lane-slot.commander-slot {
  border-color: rgba(244, 217, 138, 0.3);
  box-shadow: inset 0 0 20px rgba(244, 217, 138, 0.08), 0 0 12px rgba(244, 217, 138, 0.1);
}

.desk-lane-slot.boss-slot {
  border-color: rgba(239, 68, 68, 0.35);
  box-shadow: inset 0 0 20px rgba(239, 68, 68, 0.1), 0 0 12px rgba(239, 68, 68, 0.15);
}

/* DESKTOP CREATURE CARD (AUTHENTIC 2.5:3.5 TCG CARD RATIO & ANATOMY) */
.desk-creature-card {
  width: min(calc(clamp(150px, 29.5vh, 345px) * (2.5 / 3.5)), 94%);
  aspect-ratio: 2.5 / 3.5;
  height: auto;
  max-height: 100%;
  border-radius: clamp(9px, 1vw, 14px);
  padding: clamp(4px, 0.6vh, 7px);
  cursor: pointer;
  background: linear-gradient(165deg, rgba(28, 20, 44, 0.98) 0%, rgba(12, 9, 22, 0.98) 100%);
  border: 2px solid rgba(244, 217, 138, 0.35);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.75);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  box-sizing: border-box;
  flex-shrink: 0;
  overflow: hidden;
}

.desk-creature-card:hover {
  transform: translateY(-5px);
  border-color: rgba(244, 217, 138, 0.65);
  box-shadow: 0 14px 32px rgba(244, 217, 138, 0.28), 0 8px 24px rgba(0, 0, 0, 0.85);
}

.desk-creature-card.targeted {
  border-color: #ef4444 !important;
  box-shadow: 0 0 24px rgba(239, 68, 68, 0.85), 0 8px 24px rgba(0, 0, 0, 0.8) !important;
  transform: translateY(-5px);
}

.desk-creature-card.commander {
  border-color: #34d399 !important;
  box-shadow: 0 0 24px rgba(52, 211, 153, 0.85), 0 8px 24px rgba(0, 0, 0, 0.8) !important;
  transform: translateY(-5px);
}

.desk-creature-card.inspected {
  outline: 2px dashed rgba(244, 217, 138, 0.7);
  outline-offset: 3px;
}

.desk-creature-card.ko {
  opacity: 0.45;
  filter: grayscale(0.7);
}

/* TOP HEADER PLAQUE */
.dac-top-plaque {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  height: 20px;
}

.dac-realm-orb {
  font-size: 11px;
  line-height: 1;
}

.dac-card-name {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  color: #fff6df;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  text-align: center;
}

.dac-tier-stars {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 800;
  color: var(--gold-bright);
}

/* RECESSED PORTRAIT ART WINDOW */
.dac-art-window {
  flex: 1 1 0;
  min-height: 44px;
  max-height: clamp(65px, 12vh, 136px);
  border-radius: clamp(6px, 0.7vw, 9px);
  overflow: hidden;
  position: relative;
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.7);
  flex-shrink: 0;
}

.dac-art-window img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dac-commander-ring {
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 85%;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #34d399;
  box-shadow: 0 0 12px #34d399, inset 0 0 8px #10b981;
  pointer-events: none;
  animation: ringPulse 2s infinite ease-in-out;
}

.dac-target-reticle {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 16px;
  filter: drop-shadow(0 0 6px #ef4444);
  animation: targetPulse 1.2s infinite ease-in-out;
}

.dac-intent-overlay {
  position: absolute;
  top: 4px;
  right: 4px;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
}

.dac-intent-overlay.strike { background: rgba(239, 68, 68, 0.85); color: #fff; }
.dac-intent-overlay.shield { background: rgba(56, 189, 248, 0.85); color: #fff; }
.dac-intent-overlay.ready { background: rgba(52, 211, 153, 0.85); color: #042f2e; }
.dac-intent-overlay.done { background: rgba(30, 41, 59, 0.85); color: #94a3b8; }
.dac-intent-overlay.stun { background: rgba(6, 182, 212, 0.85); color: #fff; }
.dac-intent-overlay.ko { background: rgba(239, 68, 68, 0.85); color: #fff; }

/* METALLIC TYPE RIBBON */
.dac-type-ribbon {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 800;
  text-align: center;
  color: #fef08a;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.3) 0%, rgba(244, 217, 138, 0.18) 50%, rgba(0, 0, 0, 0.3) 100%);
  border-radius: 4px;
  padding: 2.5px 0;
  margin: 2px 0;
  border: 1px solid rgba(244, 217, 138, 0.2);
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* COMBAT TEXT & HP INSET */
.dac-combat-textbox {
  background: rgba(0, 0, 0, 0.35);
  border-radius: 5px;
  padding: 3px 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 3px;
}

.dac-hp-track {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  height: 14px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.6);
  overflow: hidden;
  padding: 0 5px;
  margin-bottom: 2px;
}

.dac-hp-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  transition: width 0.3s ease;
  z-index: 1;
  opacity: 0.75;
}

.dac-hp-fill.enemy {
  background: linear-gradient(90deg, #ef4444, #f87171);
}

.dac-hp-fill.player {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.dac-hp-digits {
  position: relative;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.dac-status-rule {
  font-size: 7.5px;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

/* AUTHENTIC CORNER STAT MEDALLIONS */
.dac-corner-medallions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.tcg-corner-badge {
  display: flex;
  align-items: center;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 900;
  padding: 2.5px 6px;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.tcg-corner-badge.atk {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.35), rgba(185, 28, 28, 0.55));
  border: 1px solid #ef4444;
  color: #fef2f2;
}

.tcg-corner-badge.focus {
  background: rgba(245, 158, 11, 0.25);
  border: 1px solid #fbbf24;
  color: #fef08a;
  font-size: 9px;
}

.tcg-corner-badge.role {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #cbd5e1;
  font-size: 8px;
}

.tcg-corner-badge.def {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.35), rgba(2, 132, 199, 0.55));
  border: 1px solid #38bdf8;
  color: #f0f9ff;
}

/* CLASH RIVER & OVERDRIVE CENTERPIECE */
.desk-clash-trench {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 3px clamp(6px, 1vw, 12px);
  margin: 1px 0;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
}

.desk-clash-adv-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(6px, 1vw, 12px);
  width: 100%;
  text-align: center;
}

.desk-lane-adv {
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
}

.desk-lane-adv.super {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.desk-overdrive-centerpiece {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
}

.doc-label-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.doc-title {
  font-family: var(--font-display);
  font-size: 8px;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: 0.05em;
}

.doc-pct {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 800;
  color: #fbbf24;
}

.doc-bar-track {
  width: 200px;
  height: 5px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.doc-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  box-shadow: 0 0 6px #f59e0b;
  transition: width 0.3s ease;
}

.doc-instruction {
  font-size: 8.5px;
  color: #fff6df;
  font-weight: 700;
}

/* BOTTOM ACTION HAND FAN (AUTHENTIC 2.5:3.5 TCG CARD RATIO) */
.desk-action-hand-zone {
  height: clamp(105px, 16vh, 185px);
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding-bottom: 4px;
  flex-shrink: 0;
  width: 100%;
  max-width: 1480px;
  box-sizing: border-box;
}

.desk-hand-fan-tray {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 0;
  max-width: 100%;
}

.desk-action-card {
  width: min(calc(clamp(115px, 17vh, 210px) * (2.5 / 3.5)), clamp(75px, 10vw, 155px));
  aspect-ratio: 2.5 / 3.5;
  height: auto;
  border-radius: clamp(8px, 1vw, 12px);
  padding: clamp(4px, 0.6vw, 7px);
  background: linear-gradient(165deg, #221a36 0%, #100b1d 100%);
  border: 2px solid rgba(244, 217, 138, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.75);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  margin-left: clamp(-16px, -1.8vw, -8px);
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, border-color 0.2s ease;
  user-select: none;
  box-sizing: border-box;
  flex-shrink: 0;
  overflow: hidden;
}

.desk-action-card:first-child {
  margin-left: 0;
  transform: rotate(-5deg) translateY(6px);
}

.desk-action-card:nth-child(2) {
  transform: rotate(-1.8deg) translateY(1px);
}

.desk-action-card:nth-child(3) {
  transform: rotate(1.8deg) translateY(1px);
}

.desk-action-card:nth-child(4) {
  transform: rotate(5deg) translateY(6px);
}

.desk-action-card:hover {
  transform: translateY(-28px) scale(1.1) rotate(0deg) !important;
  box-shadow: 0 20px 42px rgba(245, 158, 11, 0.45), 0 0 22px rgba(245, 158, 11, 0.55) !important;
  border-color: #fbbf24 !important;
  z-index: 30;
}

.desk-action-card.disabled {
  opacity: 0.45;
  filter: grayscale(0.6);
  pointer-events: none;
}

.da-spell-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  height: 18px;
}

.da-cost-jewel {
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 900;
  background: #0284c7;
  color: #fff;
  padding: 1.5px 5px;
  border-radius: 4px;
  border: 1px solid #fff;
  line-height: 1;
}

.da-cost-jewel.od {
  background: #d97706;
}

.da-spell-title {
  font-family: var(--font-display);
  font-size: 9.5px;
  font-weight: 800;
  color: #fff6df;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  text-align: center;
}

.da-spell-art {
  flex: 1 1 0;
  min-height: 24px;
  max-height: clamp(34px, 5.5vh, 64px);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, rgba(0, 0, 0, 0.45) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  margin: 2px 0;
}

.da-emblem-halo {
  font-size: clamp(16px, 2.2vh, 26px);
  filter: drop-shadow(0 0 8px rgba(244, 217, 138, 0.5));
}

.da-impact-banner {
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 900;
  text-align: center;
  border-radius: 4px;
  padding: 2px 0;
  margin-bottom: 3px;
}

.da-impact-banner.strike { background: rgba(239, 68, 68, 0.25); color: #fca5a5; }
.da-impact-banner.ability { background: rgba(168, 85, 247, 0.25); color: #d8b4fe; }
.da-impact-banner.guard { background: rgba(56, 189, 248, 0.25); color: #7dd3fc; }
.da-impact-banner.overdrive { background: rgba(244, 114, 182, 0.25); color: #f472b6; }

.da-rule-box {
  background: rgba(0, 0, 0, 0.35);
  border-radius: 5px;
  padding: 4px 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.da-rule-desc {
  font-size: 7.5px;
  color: #cbd5e1;
  line-height: 1.3;
  margin: 0;
}

.da-cost-note {
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 800;
  color: var(--gold-bright);
  text-align: right;
  margin-top: 2px;
}

.da-cost-note.ready {
  color: #86efac;
}

.da-bottom-foil {
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 800;
  color: #94a3b8;
  text-align: center;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

/* DESKTOP VICTORY SPOILS BANNER (NO DUPLICATE BUTTONS) */
.desk-victory-summary-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(15, 11, 26, 0.95) 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.5);
  border-radius: 12px;
  padding: 12px 24px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(245, 158, 11, 0.15);
  animation: fadeIn 0.3s ease;
}

.desk-victory-summary-card .dvsc-icon {
  font-size: 32px;
  color: var(--gold-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.6));
}

.desk-victory-summary-card .dvsc-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.desk-victory-summary-card .dvsc-headline {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  color: #fff6df;
  letter-spacing: 0.06em;
}

.desk-victory-summary-card .dvsc-details {
  font-size: 12.5px;
  color: #cbd5e1;
  font-weight: 500;
}

.desk-victory-summary-card .dvsc-details strong {
  color: var(--gold-bright);
}

/* 3. RIGHT COLUMN: CARD INSPECTOR & GRAVEYARD & GOLD MEDALLION */
.desk-inspector-panel {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.desk-inspector-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  scrollbar-width: thin;
}

/* FULL MASTER TCG SHOWCASE CARD (EXACT 2.5:3.5 VERTICAL CARD RATIO) */
.dic-master-tcg-card {
  width: min(calc(clamp(160px, 25vh, 320px) * (2.5 / 3.5)), 88%);
  aspect-ratio: 2.5 / 3.5;
  height: auto;
  border-radius: 12px;
  padding: clamp(4px, 0.6vw, 7px);
  box-sizing: border-box;
  flex-shrink: 0;
  margin: 0 auto 6px;
  border: 2px solid var(--gold);
  background: linear-gradient(165deg, #241b3a 0%, #0d0a18 100%);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.8), 0 0 16px rgba(244, 217, 138, 0.25);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.dic-master-tcg-card.enemy {
  border-color: #ef4444;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.8), 0 0 16px rgba(239, 68, 68, 0.25);
}

.dmtc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 18px;
}

.dmtc-realm-gem {
  font-size: 11px;
  line-height: 1;
}

.dmtc-name {
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 800;
  color: #fff6df;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  text-align: center;
}

.dmtc-lvl {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 900;
  color: var(--gold-bright);
}

.dmtc-art-frame {
  flex: 1 1 0;
  min-height: 36px;
  max-height: clamp(50px, 11vh, 124px);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.7);
  flex-shrink: 0;
}

.dmtc-art-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dmtc-rarity-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 900;
  padding: 1.5px 5px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid var(--gold);
  color: var(--gold-bright);
}

.dmtc-type-line {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 800;
  text-align: center;
  color: #fef08a;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 3px;
  padding: 2px 0;
  margin: 1px 0;
  border: 1px solid rgba(244, 217, 138, 0.2);
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dmtc-rule-box {
  background: rgba(0, 0, 0, 0.35);
  border-radius: 4px;
  padding: clamp(2px, 0.4vh, 4px) 5px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: clamp(7px, 0.7vw, 8px);
  color: #cbd5e1;
  line-height: 1.2;
  min-height: 0;
}

.dmtc-stats-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.dmtc-stat {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 3px;
}

.dmtc-stat.atk {
  background: rgba(239, 68, 68, 0.3);
  border: 1px solid #ef4444;
  color: #fca5a5;
}

.dmtc-stat.focus {
  background: rgba(245, 158, 11, 0.25);
  border: 1px solid #fbbf24;
  color: #fde047;
  font-size: 7.5px;
}

.dmtc-stat.hp {
  background: rgba(52, 211, 153, 0.25);
  border: 1px solid #34d399;
  color: #a7f3d0;
}

.dic-radar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 8px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.dic-radar-svg {
  width: 130px;
  height: 95px;
}

.radar-web {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 1;
}

.radar-axis {
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 1;
}

.radar-polygon.player {
  fill: rgba(52, 211, 153, 0.28);
  stroke: #34d399;
  stroke-width: 1.5;
  filter: drop-shadow(0 0 4px #34d399);
}

.radar-polygon.enemy {
  fill: rgba(239, 68, 68, 0.28);
  stroke: #ef4444;
  stroke-width: 1.5;
  filter: drop-shadow(0 0 4px #ef4444);
}

.radar-lbl {
  font-family: var(--font-mono);
  font-size: 6.5px;
  fill: #94a3b8;
  font-weight: 700;
}

.dic-stats-chips {
  display: flex;
  justify-content: space-around;
  width: 100%;
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 800;
  color: #7dd3fc;
}

.dic-trait-card {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  padding: 5px 7px;
  border-left: 2.5px solid var(--gold);
}

.dic-trait-card.ability {
  border-left-color: #a855f7;
}

.dtc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 2px;
}

.dtc-icon {
  font-size: 9px;
}

.dtc-title {
  font-family: var(--font-display);
  font-size: 8.5px;
  font-weight: 800;
  color: #fff6df;
  flex: 1;
}

.dtc-cost {
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 800;
  color: #d8b4fe;
}

.dtc-desc {
  font-size: 7.5px;
  color: #94a3b8;
  line-height: 1.3;
}

/* FALLEN RELICS / GRAVEYARD PANEL */
.desk-graveyard-panel {
  height: 85px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.desk-graveyard-body {
  flex: 1;
  overflow-y: auto;
  padding: 5px 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: flex-start;
}

.desk-graveyard-empty {
  font-size: 8px;
  color: var(--text-muted);
  font-style: italic;
}

.desk-fallen-chip {
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  display: flex;
  align-items: center;
  gap: 3px;
}

.desk-fallen-chip.player {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fde047;
}

/* DESKTOP GOLD END TURN MEDALLION */
.desk-end-turn-zone {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4px 0 2px;
  flex-shrink: 0;
}

.desk-gold-end-turn-medallion {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fef08a 0%, #f59e0b 45%, #b45309 80%, #78350f 100%);
  border: 3.5px solid #fffbeb;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.7), inset 0 0 10px rgba(255, 255, 255, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #451a03;
  font-family: var(--font-display);
  text-align: center;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.desk-gold-end-turn-medallion:hover {
  transform: scale(1.05);
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.9), inset 0 0 14px rgba(255, 255, 255, 0.8);
}

.desk-gold-end-turn-medallion:active {
  transform: scale(0.95);
}

.desk-gold-end-turn-medallion.ready-to-end {
  animation: deskGoldPulse 1.6s infinite ease-in-out;
}

.desk-gold-end-turn-medallion:disabled {
  opacity: 0.55;
  filter: grayscale(0.5);
  cursor: default;
  animation: none;
}

.dgm-crest {
  font-size: 16px;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.dgm-turn {
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: #78350f;
}

.dgm-text {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  margin-top: 1px;
  color: #451a03;
}

@keyframes deskGoldPulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.7), inset 0 0 10px rgba(255, 255, 255, 0.6);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 34px rgba(245, 158, 11, 1), inset 0 0 16px rgba(255, 255, 255, 0.9);
    transform: scale(1.04);
  }
}

/* ==========================================================================
   BATTLE MODE SELECTOR & MATCHMAKING LOBBY (DUAL DESKTOP & MOBILE VIEWS)
   ========================================================================== */
.battle-mode-lobby {
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
  background: radial-gradient(ellipse at 50% 20%, #20173d 0%, #080610 100%);
  position: relative;
}

.bml-desktop-view,
.bml-mobile-view {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   DESKTOP BATTLE MODE LOBBY (>= 900px)
   -------------------------------------------------------------------------- */
@media (min-width: 900px) {
  .battle-mode-lobby {
    padding: 0 !important;
    overflow: hidden !important;
  }
  .bml-desktop-view {
    display: flex !important;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: clamp(12px, 1.8vh, 22px) clamp(16px, 2vw, 36px);
    box-sizing: border-box;
    overflow: hidden;
  }
  .bml-mobile-view {
    display: none !important;
  }
}

/* --------------------------------------------------------------------------
   MOBILE BATTLE MODE LOBBY (< 900px)
   -------------------------------------------------------------------------- */
@media (max-width: 899px) {
  .battle-mode-lobby {
    padding: 0 !important;
    overflow: hidden !important;
  }
  .bml-desktop-view {
    display: none !important;
  }
  .bml-mobile-view {
    display: flex !important;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    width: 100%;
    padding: 8px 12px 10px;
    box-sizing: border-box;
    overflow: hidden;
  }
}

/* DESKTOP HEADER */
.bml-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.bml-eyebrow {
  font-family: var(--font-mono);
  font-size: clamp(8.5px, 1.1vw, 11px);
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 0.15em;
  display: block;
  margin-bottom: 3px;
}

.bml-headline {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.4vw, 28px);
  font-weight: 900;
  color: #fff6df;
  margin: 0 0 4px 0;
  letter-spacing: 0.04em;
  text-shadow: 0 0 20px rgba(244, 217, 138, 0.35);
}

.bml-sub {
  font-size: clamp(9.5px, 1.1vw, 13px);
  color: #94a3b8;
  margin: 0;
  max-width: 600px;
}

.bml-player-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(244, 217, 138, 0.28);
  border-radius: 14px;
  padding: 8px 14px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}

.bml-squad-avatar {
  width: clamp(34px, 4vw, 44px);
  height: clamp(34px, 4vw, 44px);
  border-radius: 50%;
  border: 2px solid var(--gold);
  background-size: cover;
  background-position: center;
  background-color: #1e1635;
  box-shadow: 0 0 10px rgba(244, 217, 138, 0.4);
}

.bml-player-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bml-player-name {
  font-family: var(--font-display);
  font-size: clamp(10px, 1.2vw, 13px);
  font-weight: 800;
  color: #fff;
}

.bml-elo-badge {
  font-family: var(--font-mono);
  font-size: clamp(8px, 1vw, 10px);
  font-weight: 800;
  color: #fbbf24;
}

.bml-squad-shortcut-btn {
  background: rgba(244, 217, 138, 0.15);
  border: 1px solid rgba(244, 217, 138, 0.4);
  border-radius: 8px;
  color: var(--gold-bright);
  padding: 6px 12px;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.bml-squad-shortcut-btn:hover {
  background: rgba(244, 217, 138, 0.3);
  transform: translateX(2px);
}

/* DESKTOP 4-MODE HERO GRID (PROPORTIONED, NO HOLLOW DEAD SPACE) */
.bml-desk-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(14px, 1.6vw, 26px);
  width: 100%;
  max-width: 1380px;
  margin: auto 0;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.bml-desk-card {
  background: linear-gradient(165deg, rgba(28, 22, 46, 0.96) 0%, rgba(14, 11, 24, 0.98) 100%);
  border: 2px solid rgba(244, 217, 138, 0.22);
  border-radius: 18px;
  padding: 0;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  user-select: none;
  box-sizing: border-box;
  height: clamp(430px, 58vh, 520px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.7);
}

.bml-desk-card:hover {
  transform: translateY(-8px);
  border-color: rgba(244, 217, 138, 0.7);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.75), 0 0 22px rgba(244, 217, 138, 0.25);
}

.bml-desk-card.active {
  border-color: #fbbf24 !important;
  box-shadow: 0 16px 42px rgba(245, 158, 11, 0.4), 0 0 24px rgba(245, 158, 11, 0.25), inset 0 0 16px rgba(245, 158, 11, 0.12) !important;
  transform: translateY(-6px);
}

.bmc-hero-art {
  height: clamp(185px, 27vh, 240px);
  margin: 0;
  border-radius: 16px 16px 0 0;
  position: relative;
  overflow: hidden;
  border-bottom: 1.5px solid rgba(244, 217, 138, 0.25);
  flex-shrink: 0;
  background: #120c22;
}

.bmc-hero-art::after {
  content: ;
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, transparent 40%, rgba(14, 11, 24, 0.95) 100%);
  pointer-events: none;
}

.bmc-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  transition: transform 0.35s ease;
}

.bml-desk-card:hover .bmc-hero-img {
  transform: scale(1.08);
}

.bmc-banner {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.bmc-tag {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 900;
  padding: 2.5px 8px;
  border-radius: 4px;
  letter-spacing: 0.06em;
  backdrop-filter: blur(8px);
}

.bmc-banner.ranked .bmc-tag {
  background: rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  border: 1px solid #f59e0b;
}

.bmc-banner.skirmish .bmc-tag {
  background: rgba(56, 189, 248, 0.35);
  color: #7dd3fc;
  border: 1px solid #38bdf8;
}

.bmc-banner.boss .bmc-tag {
  background: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  border: 1px solid #ef4444;
}

.bmc-banner.chaos .bmc-tag {
  background: rgba(168, 85, 247, 0.35);
  color: #d8b4fe;
  border: 1px solid #a855f7;
}

.bmc-queue-live {
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 800;
  color: #86efac;
  background: rgba(0, 0, 0, 0.6);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

.bmc-hero-badge {
  position: absolute;
  bottom: 8px;
  right: 10px;
  z-index: 3;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(12, 9, 22, 0.9);
  border: 1.5px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--gold-bright);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.bmc-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(12px, 1.4vh, 16px) clamp(12px, 1.2vw, 18px);
  min-height: 0;
  box-sizing: border-box;
}

.bmc-title {
  font-family: var(--font-display);
  font-size: clamp(15px, 1.3vw, 19px);
  font-weight: 800;
  color: #fff6df;
  margin: 0 0 4px 0;
  letter-spacing: 0.03em;
}

.bmc-desc {
  font-size: clamp(10px, 0.9vw, 11.5px);
  color: #cbd5e1;
  line-height: 1.45;
  margin: 0 0 10px 0;
  flex: 1;
}

.bmc-perks {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 12px;
}

.bmc-perk-pill {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 800;
  padding: 2.5px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
}

.bmc-perk-pill.gold {
  color: #fef08a;
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.15);
}

.bmc-perk-pill.red {
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.15);
}

.bmc-perk-pill.purple {
  color: #d8b4fe;
  border-color: rgba(168, 85, 247, 0.4);
  background: rgba(168, 85, 247, 0.15);
}

.bmc-select-indicator {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 900;
  text-align: center;
  padding: 8px 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  letter-spacing: 0.1em;
  transition: all 0.2s ease;
}

.bml-desk-card.active .bmc-select-indicator {
  background: linear-gradient(90deg, #f59e0b, #d97706);
  color: #fff;
  border-color: #fde68a;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.45);
}

/* DESKTOP BOTTOM LAUNCH DOCK */
.bml-launch-dock {
  margin-top: clamp(8px, 1.4vh, 18px);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(12, 9, 22, 0.94);
  border: 2px solid rgba(244, 217, 138, 0.35);
  border-radius: 16px;
  padding: clamp(8px, 1.2vh, 14px) clamp(14px, 2vw, 24px);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.75);
}

.bml-selected-summary {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bml-mode-icon {
  font-size: 26px;
  color: var(--gold-bright);
  filter: drop-shadow(0 0 8px rgba(244, 217, 138, 0.6));
}

.bml-mode-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 900;
  color: #fff6df;
  letter-spacing: 0.04em;
}

.bml-mode-meta {
  font-family: var(--font-mono);
  font-size: 9px;
  color: #86efac;
  margin-top: 1px;
}

/* SQUAD PREVIEW DOCK IN BATTLE LOBBY */
.bml-squad-dock {
  flex: 1 1 auto;
  max-width: 580px;
  margin: 0 14px;
}

.bml-squad-dock-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(244, 217, 138, 0.22);
  border-radius: 10px;
  padding: 4px 10px;
}

.bml-squad-meta-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  padding-right: 8px;
  flex-shrink: 0;
}

.bml-sq-lbl {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 3px;
}

.bml-sq-res {
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 800;
}

.bml-sq-res.legal { color: #4ade80; }
.bml-sq-res.over { color: #f87171; }

.bml-squad-mini-cards {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
}

.bml-squad-mini-card {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 3px 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1 1 0;
  min-width: 0;
}

.bml-squad-mini-card:hover {
  background: rgba(244, 217, 138, 0.12);
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.bml-smc-thumb {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.bml-smc-info {
  min-width: 0;
  flex: 1 1 auto;
}

.bml-smc-name-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 3px;
}

.bml-smc-name {
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bml-smc-cost {
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 800;
  color: #7dd3fc;
}

.bml-smc-stats {
  display: flex;
  gap: 3px;
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 800;
  margin-top: 1px;
}

.bml-smc-stats .pwr { color: var(--stat-pwr); }
.bml-smc-stats .hp { color: var(--stat-hp); }
.bml-smc-stats .spd { color: var(--stat-spd); }
.bml-smc-stats .rng { color: var(--stat-rng); }
.bml-smc-stats .fcs { color: var(--stat-fcs); }

.bml-play-button {
  background: linear-gradient(135deg, #f59e0b 0%, #b45309 50%, #78350f 100%);
  border: 2.5px solid #fffbeb;
  border-radius: 12px;
  padding: clamp(8px, 1.3vh, 12px) clamp(20px, 2.5vw, 36px);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.6), 0 6px 18px rgba(0, 0, 0, 0.5);
  transition: transform 0.1s ease, filter 0.15s ease;
  animation: playBtnPulse 2.2s infinite ease-in-out;
}

@keyframes playBtnPulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.5), 0 4px 14px rgba(0, 0, 0, 0.5);
  }
  50% {
    box-shadow: 0 0 32px rgba(245, 158, 11, 0.85), 0 6px 20px rgba(0, 0, 0, 0.7);
  }
}

.bml-play-button:hover {
  filter: brightness(1.1);
  transform: scale(1.03);
}

.bml-play-button:active {
  transform: scale(0.96);
}

.bpb-crest {
  font-size: 24px;
}

.bpb-text-stack {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.bpb-primary {
  font-family: var(--font-display);
  font-size: clamp(13px, 1.5vw, 17px);
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
  line-height: 1.1;
}

.bpb-sub {
  font-family: var(--font-mono);
  font-size: clamp(7.5px, 0.9vw, 9.5px);
  font-weight: 800;
  color: #fef08a;
  letter-spacing: 0.05em;
}

/* ==========================================================================
   MOBILE BATTLE MODE LOBBY STYLES (< 900px)
   ========================================================================== */
.bml-mob-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 2px 6px;
  flex-shrink: 0;
}

.bml-mob-eyebrow {
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 0.12em;
  display: block;
}

.bml-mob-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 900;
  color: #fff6df;
  margin: 0;
  letter-spacing: 0.04em;
}

.bml-mob-squad-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(244, 217, 138, 0.25);
  border-radius: 20px;
  padding: 3px 8px 3px 4px;
  cursor: pointer;
}

.bml-mob-squad-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background-size: cover;
  background-position: center;
}

.bml-mob-player-name {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  display: block;
  line-height: 1.1;
}

.bml-mob-elo-tag {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 800;
  color: #fbbf24;
  display: block;
  line-height: 1;
}

.bml-mob-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  justify-content: center;
  min-height: 0;
}

.bml-mob-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  min-height: 84px;
  border-radius: 14px;
  background: linear-gradient(165deg, rgba(24, 18, 40, 0.95) 0%, rgba(12, 9, 20, 0.98) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
  box-sizing: border-box;
}

.bml-mob-card:active {
  transform: scale(0.98);
}

.bml-mob-card.active {
  border-color: #fbbf24 !important;
  background: linear-gradient(165deg, rgba(38, 28, 62, 0.98) 0%, rgba(18, 13, 30, 0.98) 100%) !important;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.35), inset 0 0 12px rgba(245, 158, 11, 0.15) !important;
}

.bmm-art-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  border: 1.5px solid rgba(244, 217, 138, 0.3);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.6);
  flex-shrink: 0;
  background: #120c22;
}

.bmm-art-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
}

.bmm-icon-chip {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(12, 9, 22, 0.9);
  border: 1px solid var(--gold);
  color: var(--gold-bright);
  font-size: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bmm-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bmm-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bmm-title {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 800;
  color: #fff6df;
}

.bmm-category {
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 800;
  padding: 1.5px 5px;
  border-radius: 3px;
  letter-spacing: 0.04em;
}

.bmm-category.pvp { background: rgba(245, 158, 11, 0.25); color: #fbbf24; border: 1px solid #f59e0b; }
.bmm-category.casual { background: rgba(56, 189, 248, 0.25); color: #7dd3fc; border: 1px solid #38bdf8; }
.bmm-category.boss { background: rgba(239, 68, 68, 0.25); color: #fca5a5; border: 1px solid #ef4444; }
.bmm-category.story { background: rgba(168, 85, 247, 0.25); color: #d8b4fe; border: 1px solid #a855f7; }

/* FIX MOBILE DESCRIPTION CUTOFF: WRAPS TO 2 LINES WITH PROPER LINE CLAMP */
.bmm-desc {
  font-size: 10.5px;
  color: #cbd5e1;
  line-height: 1.35;
  margin: 2px 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal !important;
}

.bmm-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 1px;
}

.bmm-status-pill {
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 800;
  color: #86efac;
}

.bmm-status-pill.red { color: #fca5a5; }
.bmm-status-pill.purple { color: #d8b4fe; }

.bmm-reward-pill {
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 800;
  color: #fef08a;
}

.bmm-check-orb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: transparent;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.bml-mob-card.active .bmm-check-orb {
  border-color: var(--gold);
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.bml-mob-launch-dock {
  margin-top: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(12, 9, 22, 0.95);
  border: 1.5px solid rgba(244, 217, 138, 0.35);
  border-radius: 14px;
  padding: 8px 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
}

.bml-mob-dock-summary {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.bml-mob-dock-title {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  color: #fff6df;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bml-mob-dock-meta {
  font-family: var(--font-mono);
  font-size: 8px;
  color: #86efac;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bml-mob-play-btn {
  background: linear-gradient(135deg, #f59e0b, #b45309);
  border: 1.5px solid #fffbeb;
  border-radius: 10px;
  padding: 8px 16px;
  color: #fff;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.5);
  white-space: nowrap;
}
/* MATCHMAKING RADAR OVERLAY */
.battle-matchmaking-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(6, 4, 12, 0.92);
  backdrop-filter: blur(16px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.bmo-card {
  background: linear-gradient(165deg, rgba(28, 20, 46, 0.98) 0%, rgba(12, 9, 22, 0.98) 100%);
  border: 2px solid var(--gold);
  border-radius: 20px;
  padding: 32px 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8), 0 0 32px rgba(244, 217, 138, 0.3);
}

.bmo-radar-halo {
  position: relative;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 2px solid rgba(244, 217, 138, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.25);
}

.bmo-radar-sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, transparent 270deg, rgba(245, 158, 11, 0.5) 360deg);
  animation: radarSweep 1.8s linear infinite;
}

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

.bmo-radar-ping {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 1px dashed rgba(244, 217, 138, 0.5);
  animation: radarPing 1.8s infinite ease-out;
}

@keyframes radarPing {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.3); opacity: 0; }
}

.bmo-center-icon {
  position: relative;
  z-index: 2;
  font-size: 28px;
  filter: drop-shadow(0 0 10px var(--gold));
}

.bmo-status-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 900;
  color: #fff6df;
  letter-spacing: 0.06em;
}

.bmo-mode-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.bmo-timer {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.1em;
}

.bmo-server-info {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.4;
}

.bmo-cancel-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #cbd5e1;
  padding: 8px 24px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-top: 6px;
}

.bmo-cancel-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #fca5a5;
}

/* ==========================================================================
   CONFLUENCE FUSION SYSTEM: DEDICATED DESKTOP VS. MOBILE ARCHITECTURE
   ========================================================================== */
#view-fusion.active {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  background: radial-gradient(circle at 50% 25%, #18122c 0%, #080611 70%, #030206 100%) !important;
}

@media (max-width: 899px) {
  .fuse-desktop-view {
    display: none !important;
  }
  .fuse-mobile-view {
    display: flex !important;
  }
}

@media (min-width: 900px) {
  .fuse-mobile-view {
    display: none !important;
  }
  .fuse-desktop-view {
    display: grid !important;
  }
}

/* --------------------------------------------------------------------------
   A. DESKTOP FUSION VIEW (Widescreen 16:9 Alchemical Splicing Laboratory)
   -------------------------------------------------------------------------- */
.fuse-desktop-view {
  grid-template-columns: minmax(340px, 1.35fr) minmax(520px, 2.05fr) minmax(280px, 1.1fr);
  height: 100%;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
  padding: clamp(10px, 1.2vh, 18px) clamp(12px, 1.5vw, 24px);
  gap: clamp(10px, 1.2vw, 20px);
  background:
    radial-gradient(ellipse at 50% 10%, rgba(99, 102, 241, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 20% 80%, rgba(56, 189, 248, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(192, 132, 252, 0.08) 0%, transparent 50%),
    #07050d;
}

/* Zone 1: Left Vault Column */
.df-vault-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: rgba(14, 11, 24, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
}

.df-vault-header {
  padding: 14px 16px 12px;
  background: rgba(18, 14, 30, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

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

.df-vh-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.df-view-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(244, 217, 138, 0.08);
  border: 1px solid rgba(244, 217, 138, 0.25);
  border-radius: 6px;
  padding: 2.5px 8px;
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.df-view-toggle-btn:hover {
  background: rgba(244, 217, 138, 0.18);
  border-color: var(--gold);
  color: #fff;
}

.df-vh-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--gold-bright);
  white-space: nowrap;
}

.df-vh-count {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-muted);
  white-space: nowrap;
}

.df-search-row {
  width: 100%;
}

.df-search-input {
  width: 100%;
  padding: 7px 12px;
  border-radius: 8px;
  background: rgba(7, 5, 13, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 12px;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s;
}

.df-search-input:focus {
  border-color: var(--gold);
}

.df-filter-bar {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.df-filter-bar::-webkit-scrollbar {
  display: none;
}

.df-filter-btn {
  padding: 2.5px 6.5px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  flex-shrink: 0;
}

.df-filter-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.df-filter-btn.active {
  background: rgba(244, 217, 138, 0.18);
  border-color: var(--gold);
  color: var(--gold-bright);
}

.df-vault-grid {
  flex: 1 1 0;
  overflow-y: auto;
  padding: clamp(10px, 1.2vw, 16px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: max-content;
  gap: clamp(12px, 1.2vw, 16px);
  align-content: start;
  scrollbar-width: thin;
  scrollbar-color: rgba(244, 217, 138, 0.4) rgba(10, 8, 18, 0.7);
}

.df-vault-grid.compact-view {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
}

.df-vault-grid .fuse-portrait-card {
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
  border-width: 1.5px;
  border-color: rgba(255, 255, 255, 0.18);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}

.df-vault-grid .fuse-portrait-card:hover {
  transform: translateY(-5px) scale(1.025);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.9), 0 0 16px rgba(244, 217, 138, 0.35);
  border-color: var(--gold);
  z-index: 5;
}

.df-vault-grid .fpc-header {
  padding: 8px 10px;
}

.df-vault-grid .fpc-header-left,
.df-vault-grid .fpc-header-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.df-vault-grid .fpc-realm-tag {
  font-size: 10px;
  gap: 4px;
}

.df-vault-grid .fpc-cost-badge {
  font-size: 8.5px;
  padding: 1.5px 5px;
}

.df-vault-grid .fpc-inspect-btn {
  width: 20px;
  height: 20px;
}

.df-vault-grid .fpc-lvl-star {
  font-size: 11px;
}

.df-vault-grid .fpc-footer {
  padding: 8px 10px 10px;
  gap: 4px;
  background: linear-gradient(180deg, transparent 0%, rgba(12, 9, 22, 0.94) 25%, #0c0916 100%);
}

.df-vault-grid .fpc-name {
  font-size: clamp(11.5px, 0.95vw, 13px);
  letter-spacing: 0.04em;
  font-weight: 800;
  color: #fff9ed;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95);
}

.df-vault-grid .fpc-role-line {
  font-size: 8.5px;
}

.df-vault-grid .fpc-gene-preview {
  font-size: 9px;
  padding: 2px 6px;
}

.df-vault-grid .fpc-gt-badge {
  font-size: 7px;
  padding: 0.5px 4px;
}

.df-vault-grid .fpc-stats-row {
  font-size: 9.5px;
  gap: 5px;
  padding: 3px 6px;
}

.df-vault-grid .fpc-stat svg {
  width: 9.5px;
  height: 9.5px;
}

.df-vault-grid .fpc-splice-pill {
  font-size: 8.5px;
  padding: 2.5px 8px;
  border-radius: 5px;
}

.df-vault-grid.compact-view .fuse-portrait-card {
  border-radius: 8px;
}
.df-vault-grid.compact-view .fpc-header {
  padding: 4px 6px;
}
.df-vault-grid.compact-view .fpc-cost-badge,
.df-vault-grid.compact-view .fpc-gene-preview,
.df-vault-grid.compact-view .fpc-role-line {
  display: none;
}
.df-vault-grid.compact-view .fpc-footer {
  padding: 4px 6px 6px;
  gap: 2px;
}
.df-vault-grid.compact-view .fpc-name {
  font-size: 10px;
}
.df-vault-grid.compact-view .fpc-stats-row {
  font-size: 7.5px;
  padding: 1.5px 3px;
  gap: 1.5px;
}
.df-vault-grid.compact-view .fpc-stat svg {
  width: 7.5px;
  height: 7.5px;
}
.df-vault-grid.compact-view .fpc-splice-pill {
  font-size: 7.5px;
  padding: 1px 5px;
}

.df-vault-grid::-webkit-scrollbar {
  width: 5px;
}

.df-vault-grid::-webkit-scrollbar-track {
  background: rgba(10, 8, 18, 0.7);
  border-radius: 6px;
  margin: 4px 0;
}

.df-vault-grid::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(244, 217, 138, 0.45) 0%, rgba(184, 139, 50, 0.55) 100%);
  border-radius: 6px;
  border: 1px solid rgba(244, 217, 138, 0.25);
}

.df-vault-grid::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ffe699 0%, #d4af37 100%);
  box-shadow: 0 0 10px rgba(244, 217, 138, 0.6);
}

/* Zone 2: Center Altar Column */
.df-altar-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: rgba(14, 11, 24, 0.65);
  border: 1px solid rgba(244, 217, 138, 0.2);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.7), inset 0 0 60px rgba(99, 102, 241, 0.05);
  position: relative;
}

.df-altar-header {
  height: clamp(62px, 7.8vh, 72px);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(12px, 1.4vw, 20px);
  gap: clamp(8px, 1.2vw, 16px);
  background: rgba(20, 16, 34, 0.95);
  border-bottom: 1px solid rgba(244, 217, 138, 0.18);
  box-sizing: border-box;
}

.df-rules-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 4px clamp(6px, 0.7vw, 10px);
  color: var(--text-muted);
  font-size: clamp(9.5px, 0.75vw, 11px);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  white-space: nowrap;
}

.df-rules-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.df-header-center {
  min-width: 0;
  flex: 1 1 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  line-height: 1.2;
}

.df-chamber-title {
  font-family: var(--font-display);
  font-size: clamp(10.5px, 0.82vw, 13px);
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fff6df;
  text-shadow: 0 0 12px rgba(244, 217, 138, 0.45);
  display: block;
  white-space: nowrap;
  line-height: 1.2;
}

.df-chamber-sub {
  font-size: clamp(8px, 0.65vw, 10px);
  color: var(--gold);
  letter-spacing: 0.04em;
  white-space: nowrap;
  opacity: 0.95;
  line-height: 1.2;
}

.df-energy-meter {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: clamp(9px, 0.72vw, 10.5px);
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 3px clamp(6px, 0.7vw, 10px);
  border-radius: 20px;
  flex-shrink: 0;
  white-space: nowrap;
}

/* Crucible Stage */
.df-crucible-stage {
  flex: 1 1 0;
  min-height: 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(8px, 1.5vh, 20px) clamp(8px, 1.5vw, 24px);
  gap: clamp(8px, 1.8vw, 28px);
  position: relative;
  background: radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.12) 0%, transparent 65%);
  overflow: hidden;
  box-sizing: border-box;
}

/* Plasma Conduits linking Pedestals to Center Crucible */
.df-plasma-conduit {
  position: absolute;
  top: 50%;
  height: 2px;
  pointer-events: none;
  z-index: 1;
  opacity: 0.2;
  transition: all 0.4s ease;
}

.df-plasma-conduit.left {
  left: 22%;
  right: calc(50% + clamp(24px, 2.5vw, 42px));
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.7) 0%, rgba(129, 140, 248, 0.4) 100%);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.3);
}

.df-plasma-conduit.right {
  left: calc(50% + clamp(24px, 2.5vw, 42px));
  right: 22%;
  background: linear-gradient(90deg, rgba(129, 140, 248, 0.4) 0%, rgba(192, 132, 252, 0.7) 100%);
  box-shadow: 0 0 8px rgba(192, 132, 252, 0.3);
}

.df-crucible-stage.has-parent-a .df-plasma-conduit.left {
  opacity: 0.85;
  height: 3.5px;
  box-shadow: 0 0 14px #38bdf8, 0 0 28px rgba(56, 189, 248, 0.5);
  animation: plasmaPulseA 2s infinite ease-in-out;
}

.df-crucible-stage.has-parent-b .df-plasma-conduit.right {
  opacity: 0.85;
  height: 3.5px;
  box-shadow: 0 0 14px #c084fc, 0 0 28px rgba(192, 132, 252, 0.5);
  animation: plasmaPulseB 2s infinite ease-in-out;
}

.df-crucible-stage.active .df-crucible-orb {
  animation: orbResonance 1.8s infinite alternate ease-in-out;
  box-shadow: 0 0 35px rgba(244, 217, 138, 0.7), 0 0 60px rgba(168, 85, 247, 0.6), inset 0 0 15px #fff;
}

@keyframes plasmaPulseA {
  0%, 100% { opacity: 0.7; filter: brightness(1); }
  50% { opacity: 1; filter: brightness(1.4); }
}

@keyframes plasmaPulseB {
  0%, 100% { opacity: 0.7; filter: brightness(1); }
  50% { opacity: 1; filter: brightness(1.4); }
}

@keyframes orbResonance {
  0% { transform: scale(1); filter: drop-shadow(0 0 15px rgba(244, 217, 138, 0.5)); }
  100% { transform: scale(1.08); filter: drop-shadow(0 0 25px rgba(244, 114, 182, 0.8)); }
}

.df-pedestal-card-col {
  flex: 0 1 clamp(120px, 16vw, 280px);
  width: 100%;
  max-width: clamp(120px, 16vw, 280px);
  min-width: 105px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.25s ease;
}

.df-pedestal-card-col:hover {
  transform: translateY(-4px);
}

.df-pedestal-plinth-top {
  width: 100%;
  padding: clamp(3px, 0.5vh, 6px) clamp(4px, 0.6vw, 10px);
  border-radius: 8px 8px 0 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: clamp(8px, 0.75vw, 10px);
  font-weight: 800;
  letter-spacing: clamp(0.04em, 0.08vw, 0.1em);
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.df-pedestal-plinth-top.cyan {
  background: rgba(56, 189, 248, 0.18);
  border: 1.5px solid rgba(56, 189, 248, 0.4);
  border-bottom: none;
  color: #38bdf8;
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
}

.df-pedestal-plinth-top.purple {
  background: rgba(192, 132, 252, 0.18);
  border: 1.5px solid rgba(192, 132, 252, 0.4);
  border-bottom: none;
  color: #c084fc;
  text-shadow: 0 0 8px rgba(192, 132, 252, 0.5);
}

.df-card-stage-mount {
  width: 100%;
  aspect-ratio: 2.5 / 3.5;
  height: auto;
  max-height: clamp(170px, 44vh, 390px);
  border-radius: clamp(6px, 0.8vw, 10px);
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.8);
}

.df-pedestal-base {
  width: calc(100% + clamp(6px, 1.2vw, 16px));
  max-width: calc(100% + 16px);
  height: clamp(22px, 3.2vh, 34px);
  border-radius: 0 0 10px 10px;
  background: linear-gradient(180deg, #2b253b 0%, #130f1e 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-top: none;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
  box-sizing: border-box;
}

.df-pedestal-base.cyan {
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.25);
}

.df-pedestal-base.purple {
  border-color: rgba(192, 132, 252, 0.35);
  box-shadow: 0 0 20px rgba(192, 132, 252, 0.25);
}

.df-rune-stream {
  font-size: clamp(7.5px, 0.7vw, 11px);
  letter-spacing: clamp(0.08em, 0.15vw, 0.25em);
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
}
  color: var(--text-muted);
}

.df-pedestal-base.cyan .df-rune-stream { color: #38bdf8; text-shadow: 0 0 8px #38bdf8; }
.df-pedestal-base.purple .df-rune-stream { color: #c084fc; text-shadow: 0 0 8px #c084fc; }

/* Crucible Center */
.df-crucible-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 1.2vh, 12px);
  max-width: clamp(90px, 10vw, 150px);
  flex-shrink: 0;
  min-width: 0;
}

.df-helix-reactor {
  width: clamp(52px, 5.2vw, 84px);
  height: clamp(52px, 5.2vw, 84px);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.df-energy-rings {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
}

.df-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px dashed rgba(244, 217, 138, 0.4);
}

.df-ring.ring-1 {
  top: 4px; left: 4px; right: 4px; bottom: 4px;
  animation: spinSlow 12s linear infinite;
  border-color: rgba(56, 189, 248, 0.5);
}

.df-ring.ring-2 {
  top: 14px; left: 14px; right: 14px; bottom: 14px;
  animation: spinSlowReverse 8s linear infinite;
  border-color: rgba(192, 132, 252, 0.5);
}

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

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

.df-crucible-orb {
  width: clamp(36px, 3.8vw, 54px);
  height: clamp(36px, 3.8vw, 54px);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #818cf8 0%, #312e81 60%, #0f172a 100%);
  box-shadow: 0 0 24px rgba(129, 140, 248, 0.6), inset 0 0 14px rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: clamp(14px, 1.4vw, 22px);
}

.df-catalyst-cost-plaque {
  font-family: var(--font-mono);
  font-size: clamp(8.5px, 0.75vw, 11.5px);
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px clamp(6px, 0.8vw, 10px);
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--gold);
  color: var(--gold-bright);
  white-space: nowrap;
}

.df-synthesis-status {
  font-size: clamp(8px, 0.7vw, 10px);
  color: var(--text-muted);
  text-align: center;
  line-height: 1.35;
  max-width: 130px;
}

/* Bottom CTA Zone */
.df-cta-zone {
  padding: clamp(10px, 1.4vh, 16px) clamp(12px, 1.6vw, 24px);
  background: rgba(18, 14, 30, 0.95);
  border-top: 1px solid rgba(244, 217, 138, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(4px, 0.8vh, 8px);
  flex-shrink: 0;
}

.df-execute-btn {
  width: 100%;
  max-width: 520px;
  height: clamp(38px, 4.6vh, 48px);
  border-radius: 12px;
  background: linear-gradient(180deg, #d4af37 0%, #996515 100%);
  border: 1.5px solid #ffe599;
  color: #120c02;
  font-family: var(--font-display);
  font-size: clamp(10.5px, 0.9vw, 13px);
  font-weight: 900;
  letter-spacing: 0.06em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 1vw, 12px);
  transition: all 0.2s;
  white-space: nowrap;
}

.df-execute-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(212, 175, 55, 0.55), inset 0 1px 0 #fff;
  filter: brightness(1.08);
}

.df-execute-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(0.5);
  box-shadow: none;
}

.df-guarantee-note {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #a7f3d0;
}

/* Zone 3: Right Dossier Column */
.df-dossier-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: rgba(14, 11, 24, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
}

.df-dossier-header {
  padding: 14px 16px;
  background: rgba(18, 14, 30, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.df-dh-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #f472b6;
}

.df-dh-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(244, 114, 182, 0.15);
  border: 1px solid rgba(244, 114, 182, 0.35);
  color: #f472b6;
}

.df-dossier-body {
  flex: 1 1 0;
  overflow-y: auto;
  padding: clamp(8px, 1.2vw, 16px);
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.2vh, 16px);
  align-items: center;
  scrollbar-width: thin;
  scrollbar-color: rgba(244, 114, 182, 0.4) rgba(10, 8, 18, 0.7);
}

.df-dossier-body::-webkit-scrollbar {
  width: 5px;
}

.df-dossier-body::-webkit-scrollbar-track {
  background: rgba(10, 8, 18, 0.7);
  border-radius: 6px;
  margin: 4px 0;
}

.df-dossier-body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(244, 114, 182, 0.45) 0%, rgba(192, 132, 252, 0.55) 100%);
  border-radius: 6px;
  border: 1px solid rgba(244, 114, 182, 0.25);
}

.df-dossier-body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #f472b6 0%, #c084fc 100%);
  box-shadow: 0 0 10px rgba(244, 114, 182, 0.6);
}

/* Master Chimera Showcase Card */
.df-master-chimera-card {
  width: 100%;
  max-width: clamp(175px, 16vw, 240px);
  aspect-ratio: 2.5 / 3.5;
  height: auto;
  max-height: clamp(230px, 39vh, 335px);
  border-radius: 12px;
  background: linear-gradient(165deg, #24143d 0%, #0d081a 100%);
  border: 1.5px solid rgba(244, 114, 182, 0.6);
  box-shadow: 0 0 28px rgba(244, 114, 182, 0.4), 0 12px 32px rgba(0, 0, 0, 0.8), inset 0 0 16px rgba(244, 217, 138, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(7px, 1vh, 10px);
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.df-master-chimera-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 36px rgba(244, 114, 182, 0.6), 0 16px 40px rgba(0, 0, 0, 0.9);
}

.dmc-shimmer {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(125deg, transparent 25%, rgba(244, 114, 182, 0.15) 50%, transparent 75%);
  animation: holoSheenRotate 4s infinite linear;
  pointer-events: none;
}

.dmc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 2;
}

.dmc-hybrid-pill {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 800;
  color: #f472b6;
  display: flex;
  align-items: center;
  gap: 3px;
}

.dmc-name {
  font-family: var(--font-display);
  font-size: 9.5px;
  font-weight: 800;
  color: #fff6df;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}

.dmc-gen-pill {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 800;
  color: var(--gold-bright);
}

.dmc-art-frame {
  height: clamp(88px, 15vh, 132px);
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(244, 114, 182, 0.45);
}

.dmc-holo-vortex {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 50% 50%, rgba(244, 114, 182, 0.2) 0%, transparent 70%);
}

.dmc-blend-badge {
  position: absolute;
  bottom: 4px;
  left: 6px;
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.75);
  color: #f472b6;
  border: 1px solid rgba(244, 114, 182, 0.4);
}

.dmc-type-line {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
  padding: 2px 0;
}

.dmc-genes-preview {
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px 6px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.dmc-gene-item {
  font-size: 8px;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dmc-stats-bar {
  display: flex;
  justify-content: space-around;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 9px;
  padding: 4px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 5px;
  gap: 2px;
}

.dmc-stat {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-weight: 800;
}

.dmc-stat.pwr { color: var(--stat-pwr); }
.dmc-stat.hp { color: var(--stat-hp); }
.dmc-stat.spd { color: var(--stat-spd); }
.dmc-stat.rng { color: var(--stat-rng); }
.dmc-stat.fcs { color: var(--stat-fcs); }
.dmc-stat svg {
  width: 9.5px;
  height: 9.5px;
}

.mfc-stat.rng { color: var(--stat-rng); }
.mfc-stat.fcs { color: var(--stat-fcs); }

.df-chimera-placeholder-card {
  width: 100%;
  max-width: clamp(175px, 16vw, 240px);
  aspect-ratio: 2.5 / 3.5;
  height: auto;
  max-height: clamp(230px, 39vh, 335px);
  border-radius: 12px;
  background: radial-gradient(circle at 50% 40%, rgba(36, 20, 61, 0.9) 0%, rgba(14, 11, 24, 0.95) 100%);
  border: 1.5px dashed rgba(244, 114, 182, 0.45);
  box-shadow: inset 0 0 30px rgba(244, 114, 182, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 1vh, 12px);
  padding: clamp(10px, 1.4vh, 20px);
  text-align: center;
  box-sizing: border-box;
  flex-shrink: 0;
}

.dpc-icon {
  font-size: clamp(20px, 2.2vw, 28px);
  color: #f472b6;
  filter: drop-shadow(0 0 12px rgba(244, 114, 182, 0.6));
}

.dpc-title {
  font-family: var(--font-display);
  font-size: clamp(10px, 0.9vw, 12px);
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fff6df;
}

.dpc-desc {
  font-size: clamp(8.5px, 0.72vw, 10px);
  color: var(--text-muted);
  line-height: 1.35;
  margin: 0;
}

.dpc-pill {
  font-family: var(--font-mono);
  font-size: clamp(7.5px, 0.7vw, 9px);
  font-weight: 800;
  padding: 2px clamp(6px, 0.8vw, 8px);
  border-radius: 12px;
  background: rgba(244, 114, 182, 0.12);
  border: 1px solid rgba(244, 114, 182, 0.3);
  color: #f472b6;
  white-space: nowrap;
}

/* Intel Box & Stat Comparison */
.df-intel-box {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-sizing: border-box;
}

.df-intel-title {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  color: var(--gold-bright);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 2px;
}

.df-intel-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: var(--text-muted);
}

.df-stat-compare-box {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
}

.df-scb-title {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  color: #f472b6;
  margin-bottom: 2px;
}

.df-compare-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dfc-lbl {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  color: var(--text-muted);
  width: 26px;
}

.dfc-track {
  flex: 1 1 0;
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.dfc-bar {
  height: 100%;
  position: absolute;
  top: 0; left: 0;
  border-radius: 4px;
}

.dfc-bar.a { background: #0284c7; opacity: 0.6; }
.dfc-bar.b { background: #7e22ce; opacity: 0.6; }
.dfc-bar.chimera { background: linear-gradient(90deg, #f472b6 0%, #fbbf24 100%); }

.dfc-val {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 800;
  color: var(--gold-bright);
  width: 22px;
  text-align: right;
}

/* --------------------------------------------------------------------------
   B. MOBILE FUSION VIEW (390x844 Zero-Scroll Ergonomic Altar & Vault Drawer)
   -------------------------------------------------------------------------- */
.fuse-mobile-view {
  flex-direction: column;
  height: 100%;
  width: 100%;
  overflow: hidden;
  box-sizing: border-box;
  background: #07050d;
}

.mf-top-bar {
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 12px;
  background: rgba(12, 9, 22, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mf-gear-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
}

.mf-title-group {
  text-align: center;
}

.mf-brand {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 800;
  color: #fff6df;
  letter-spacing: 0.1em;
}

.mf-plaque {
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.06em;
}

.mf-energy-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  color: #7dd3fc;
}

/* Stage Wrap */
.mf-stage-wrap {
  padding: 8px 10px;
  background: radial-gradient(circle at 50% 30%, rgba(99, 102, 241, 0.16) 0%, transparent 70%), #0c0818;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mf-pedestals-duo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 360px;
  gap: 8px;
}

.mf-pedestal-slot {
  flex: 0 0 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.mf-pedestal-stand {
  width: 110px;
  height: 154px;
  aspect-ratio: 2.5 / 3.5;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
}

.mf-pillar-plinth {
  width: 110px;
  height: 24px;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(180deg, #2b253b 0%, #151122 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  box-sizing: border-box;
  margin-top: -2px;
}

.mf-pillar-plinth.cyan {
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-top: none;
}

.mf-pillar-plinth.purple {
  border: 1px solid rgba(192, 132, 252, 0.35);
  border-top: none;
}

.mf-plinth-runes {
  font-size: 8px;
  letter-spacing: 0.1em;
}

.mf-pillar-plinth.cyan .mf-plinth-runes { color: #38bdf8; text-shadow: 0 0 6px #38bdf8; }
.mf-pillar-plinth.purple .mf-plinth-runes { color: #c084fc; text-shadow: 0 0 6px #c084fc; }

.mf-plinth-lbl {
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 800;
  color: var(--text-muted);
}

.mf-crucible-core {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.mf-helix-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle, #818cf8 0%, #312e81 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 0 12px rgba(129, 140, 248, 0.6);
}

.mf-helix-pulse {
  animation: dnaTwist 3s infinite linear;
}

.mf-shard-cost-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--gold);
  color: var(--gold-bright);
  white-space: nowrap;
}

/* Forecast Strip */
.mf-forecast-strip {
  width: 100%;
  max-width: 360px;
}

.mf-forecast-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(244, 114, 182, 0.08);
  border: 1px solid rgba(244, 114, 182, 0.3);
  font-size: 11px;
}

.mf-forecast-card.empty {
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
  text-align: center;
  padding: 8px;
  font-size: 10px;
}

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

.mfc-name-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.mfc-name {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  color: #fff6df;
}

.mfc-gen {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 800;
  color: var(--gold-bright);
}

.mfc-blend {
  font-family: var(--font-mono);
  font-size: 8px;
  color: #f472b6;
}

.mfc-stats-pills {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 8.5px;
}

.mfc-stat.pwr { color: #f87171; }
.mfc-stat.def { color: #38bdf8; }
.mfc-stat.hp { color: #4ade80; }
.mfc-stat.mut { color: #f472b6; }

.mf-execute-btn {
  width: 100%;
  max-width: 360px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(180deg, #d4af37 0%, #996515 100%);
  border: 1.5px solid #ffe599;
  color: #120c02;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
  box-shadow: 0 3px 12px rgba(212, 175, 55, 0.3);
}

.mf-execute-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(0.5);
  box-shadow: none;
}

/* Vault Drawer */
.mf-vault-drawer {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #080610;
}

.mf-drawer-bar {
  padding: 8px 12px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  gap: 8px;
}

.mf-drawer-title {
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 800;
  color: var(--gold-bright);
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.mf-search-wrap {
  flex: 1 1 auto;
}

.mf-search-input {
  width: 100%;
  padding: 5px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 11px;
  box-sizing: border-box;
}

.mf-filter-pills {
  display: flex;
  gap: 6px;
  padding: 0 12px 6px;
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}

.mf-filter-pills::-webkit-scrollbar {
  display: none;
}

.mf-pill {
  padding: 3px 9px;
  border-radius: 14px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
}

.mf-pill.active {
  background: rgba(244, 217, 138, 0.15);
  border-color: var(--gold);
  color: var(--gold-bright);
}

.mf-cards-grid {
  flex: 1 1 0;
  overflow-y: auto;
  padding: 8px 12px 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 160px;
  gap: 8px;
  align-content: start;
}

/* --------------------------------------------------------------------------
   C. UNIFIED 2.5 : 3.5 VERTICAL PORTRAIT CARDS & PEDESTAL CARDS
   -------------------------------------------------------------------------- */
.fuse-portrait-card {
  aspect-ratio: 2.5 / 3.5;
  width: 100%;
  border-radius: 9px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  background-size: cover;
  background-position: center;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  user-select: none;
}

.fuse-portrait-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
}

.fuse-portrait-card.selected-a {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.6) !important;
}

.fuse-portrait-card.selected-b {
  border-color: #c084fc !important;
  box-shadow: 0 0 16px rgba(192, 132, 252, 0.6) !important;
}

.fuse-portrait-card.exhausted {
  opacity: 0.45;
  filter: grayscale(0.6);
}

.fpc-gradient-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(12, 9, 22, 0.6) 0%, rgba(0,0,0,0.05) 30%, rgba(0,0,0,0.2) 60%, rgba(12, 9, 22, 0.9) 100%);
  pointer-events: none;
}

.fpc-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 7px;
}

.fpc-header-left,
.fpc-header-right {
  display: flex;
  align-items: center;
  gap: 3.5px;
}

.fpc-realm-tag {
  display: flex;
  align-items: center;
  gap: 3px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 800;
  color: var(--gold-bright);
}

.fpc-cost-badge {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 800;
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.45);
  padding: 1px 4px;
  border-radius: 4px;
  line-height: 1;
}

.fpc-inspect-btn {
  width: 17px;
  height: 17px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(244, 217, 138, 0.35);
  border-radius: 4px;
  color: var(--gold);
  cursor: pointer;
  transition: all 0.15s ease;
}

.fpc-inspect-btn:hover {
  background: var(--gold);
  color: #0c0916;
  border-color: #fff;
  transform: scale(1.1);
}

.fpc-inspect-btn svg {
  width: 10px;
  height: 10px;
}

.fpc-lvl-star {
  font-size: 9px;
  color: var(--gold);
}

.fpc-footer {
  position: relative;
  z-index: 2;
  padding: 4px 7px 6px;
  display: flex;
  flex-direction: column;
  gap: 2.5px;
}

.fpc-name {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  color: #fff6df;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fpc-role-line {
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.05em;
  margin-top: -1px;
}

.fpc-gene-preview {
  display: flex;
  align-items: center;
  gap: 3px;
  font-family: var(--font-mono);
  font-size: 8px;
  color: #f1f5f9;
  background: rgba(0, 0, 0, 0.45);
  padding: 1.5px 4px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.fpc-gt-badge {
  font-size: 6.5px;
  font-weight: 900;
  padding: 0.5px 3px;
  border-radius: 2px;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.fpc-gt-badge.active {
  background: rgba(244, 114, 182, 0.25);
  color: #f472b6;
  border: 1px solid rgba(244, 114, 182, 0.5);
}

.fpc-gt-badge.passive {
  background: rgba(94, 200, 255, 0.25);
  color: #7dd3fc;
  border: 1px solid rgba(94, 200, 255, 0.5);
}

.fpc-gt-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fpc-stats-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 8px;
  background: rgba(0, 0, 0, 0.7);
  padding: 2px 4px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  gap: 2px;
}

.fpc-stat {
  display: inline-flex;
  align-items: center;
  gap: 1.5px;
  font-weight: 800;
}

.fpc-stat.pwr { color: var(--stat-pwr); }
.fpc-stat.hp { color: var(--stat-hp); }
.fpc-stat.spd { color: var(--stat-spd); }
.fpc-stat.rng { color: var(--stat-rng); }
.fpc-stat.fcs { color: var(--stat-fcs); }

.fpc-stat svg {
  width: 8px;
  height: 8px;
}

.fpc-splice-pill {
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #a7f3d0;
  display: flex;
  align-items: center;
  gap: 3px;
}

.fpc-splice-pill.empty {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.3);
}

.fpc-slot-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 5;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 4px;
}

.fpc-slot-badge.a {
  background: #0284c7;
  color: #fff;
  box-shadow: 0 0 8px #38bdf8;
}

.fpc-slot-badge.b {
  background: #7e22ce;
  color: #fff;
  box-shadow: 0 0 8px #c084fc;
}

/* Pedestal Full Master Card */
.pedestal-master-card {
  width: 100%;
  height: 100%;
  aspect-ratio: 2.5 / 3.5;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  box-sizing: border-box;
  padding: 10px;
  overflow: hidden;
  user-select: none;
}

.pmc-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(14, 11, 24, 0.8) 0%, rgba(0,0,0,0.1) 35%, rgba(0,0,0,0.3) 60%, rgba(14, 11, 24, 0.95) 100%);
  pointer-events: none;
}

.pmc-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pmc-realm-gem {
  font-size: 12px;
  color: var(--gold-bright);
}

.pmc-name {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  color: #fff6df;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.pmc-header-pills {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pmc-cost-badge {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 800;
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.2);
  border: 1px solid rgba(56, 189, 248, 0.45);
  padding: 1px 4px;
  border-radius: 4px;
  line-height: 1;
}

.pmc-inspect-btn {
  width: 19px;
  height: 19px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(244, 217, 138, 0.35);
  border-radius: 4px;
  color: var(--gold);
  cursor: pointer;
  transition: all 0.15s ease;
}

.pmc-inspect-btn:hover {
  background: var(--gold);
  color: #0c0916;
  border-color: #fff;
  transform: scale(1.1);
}

.pmc-inspect-btn svg {
  width: 11px;
  height: 11px;
}

.pmc-star {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  color: var(--gold);
}

.pmc-type-ribbon {
  position: relative;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 800;
  color: var(--gold-bright);
  text-align: center;
  background: rgba(0, 0, 0, 0.6);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  align-self: center;
}

.pmc-gene-box {
  position: relative;
  z-index: 2;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  padding: 4px 6px;
  margin: 0 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pmc-gene-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 8.5px;
  font-family: var(--font-mono);
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pmc-gene-badge {
  font-size: 6.5px;
  font-weight: 900;
  padding: 0.5px 3px;
  border-radius: 2px;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.pmc-gene-badge.active {
  background: rgba(244, 114, 182, 0.25);
  color: #f472b6;
  border: 1px solid rgba(244, 114, 182, 0.5);
}

.pmc-gene-badge.passive {
  background: rgba(94, 200, 255, 0.25);
  color: #7dd3fc;
  border: 1px solid rgba(94, 200, 255, 0.5);
}

.pmc-gene-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pmc-footer {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pmc-stats-row {
  display: flex;
  justify-content: space-around;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 9px;
  background: rgba(0, 0, 0, 0.75);
  padding: 3px 4px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  gap: 2px;
}

.pmc-stat {
  display: inline-flex;
  align-items: center;
  gap: 1.5px;
  font-weight: 800;
}

.pmc-stat.pwr { color: var(--stat-pwr); }
.pmc-stat.hp { color: var(--stat-hp); }
.pmc-stat.spd { color: var(--stat-spd); }
.pmc-stat.rng { color: var(--stat-rng); }
.pmc-stat.fcs { color: var(--stat-fcs); }

.pmc-stat svg {
  width: 9px;
  height: 9px;
}

.pmc-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pmc-splices {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 800;
  color: #a7f3d0;
  background: rgba(0, 0, 0, 0.7);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.pmc-splices.empty {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.3);
}

.pmc-clear-btn {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.pmc-clear-btn:hover {
  background: rgba(239, 68, 68, 0.4);
  color: #fff;
}

/* Mobile specific pedestal master card adjustments */
.mf-pedestal-slot .pedestal-master-card {
  padding: 6px;
}
.mf-pedestal-slot .pmc-header {
  gap: 2px;
}
.mf-pedestal-slot .pmc-name {
  font-size: 9px;
  max-width: 66px;
}
.mf-pedestal-slot .pmc-realm-gem svg {
  width: 11px;
  height: 11px;
}
.mf-pedestal-slot .pmc-star {
  font-size: 8.5px;
}
.mf-pedestal-slot .pmc-type-ribbon {
  font-size: 7px;
  padding: 1px 4px;
}
.mf-pedestal-slot .pmc-stats-row {
  font-size: 8px;
  padding: 2px 4px;
}
.mf-pedestal-slot .pmc-stats-row svg {
  width: 9px;
  height: 9px;
}
.mf-pedestal-slot .pmc-splices {
  font-size: 7px;
  padding: 1px 4px;
}
.mf-pedestal-slot .pmc-clear-btn {
  width: 18px;
  height: 18px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mf-pedestal-slot .pmc-clear-btn svg {
  width: 10px;
  height: 10px;
}

.pedestal-master-card.empty-placeholder {
  background: radial-gradient(circle at 50% 40%, rgba(30, 20, 50, 0.9) 0%, rgba(12, 9, 20, 0.95) 100%);
  border: 1.5px dashed rgba(255, 255, 255, 0.25);
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  transition: all 0.3s ease;
}

.pedestal-master-card.empty-placeholder.cyan {
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: inset 0 0 25px rgba(56, 189, 248, 0.08);
}

.pedestal-master-card.empty-placeholder.purple {
  border-color: rgba(192, 132, 252, 0.5);
  box-shadow: inset 0 0 25px rgba(192, 132, 252, 0.08);
}

.pme-icon {
  font-size: clamp(22px, 2.4vw, 32px);
  transition: transform 0.3s ease;
}

.pedestal-master-card.empty-placeholder:hover .pme-icon {
  transform: scale(1.15);
}

.pedestal-master-card.empty-placeholder.cyan .pme-icon { color: #38bdf8; filter: drop-shadow(0 0 10px #38bdf8); }
.pedestal-master-card.empty-placeholder.purple .pme-icon { color: #c084fc; filter: drop-shadow(0 0 10px #c084fc); }

.pme-title {
  font-family: var(--font-display);
  font-size: clamp(8px, 0.75vw, 12px);
  font-weight: 800;
  letter-spacing: clamp(0.02em, 0.05vw, 0.08em);
  color: #fff6df;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 95%;
}

.pme-sub {
  font-size: clamp(8px, 0.75vw, 10px);
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   3. SHOP SCREEN: LUXURY DARK GAME STORE & 3D PACK CAROUSEL
   (Mobile-First Phone Layout & Full Widescreen Desktop Layout Separation)
   -------------------------------------------------------------------------- */
.shop-unified-container {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
  background: #080511;
  padding: 12px 14px 95px;
  gap: 16px;
  width: 100%;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

@media (min-width: 900px) {
  .shop-unified-container {
    max-width: 1300px !important;
    margin: 0 auto;
    padding: 24px 36px 80px;
    gap: 24px;
  }
}

.shop-hero-topbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 900px) {
  .shop-hero-topbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    gap: 20px;
  }
}

.shop-category-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.shop-cat-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.shop-cat-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.shop-cat-btn.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(217, 119, 6, 0.35) 100%);
  border-color: var(--gold);
  color: var(--gold-bright);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.35);
}

/* ==========================================================================
   CONFLUENCE BATTLE PASS STYLES
   ========================================================================== */
.bp-hero-card {
  position: relative;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(30, 20, 50, 0.8) 0%, rgba(15, 10, 25, 0.95) 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.65), 0 0 20px rgba(245, 158, 11, 0.15);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bp-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.bp-season-badge {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: var(--gold-bright);
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 4px 10px;
  border-radius: 20px;
}

.bp-timer-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 4px 10px;
  border-radius: 20px;
}

.bp-hero-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  margin: 0;
  background: linear-gradient(135deg, #fff 0%, #fef08a 60%, #eab308 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.bp-hero-desc {
  font-size: 13px;
  line-height: 1.5;
  color: #d1d5db;
  margin: 0;
  max-width: 800px;
}

.bp-hero-desc strong {
  color: #fef08a;
}

.bp-status-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 6px;
}

@media (min-width: 768px) {
  .bp-status-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.bp-level-box {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1 1 auto;
}

.bp-level-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #2a1b40 0%, #11091e 100%);
  border: 2px solid var(--gold);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.4), inset 0 0 10px rgba(245, 158, 11, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bpl-label {
  font-family: var(--font-display);
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--gold-bright);
}

.bpl-num {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}

.bp-xp-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 auto;
}

.bp-xp-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #e2e8f0;
}

.bp-xp-val {
  color: #38bdf8;
}

.bp-xp-bar-track {
  width: 100%;
  height: 10px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.bp-xp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #0284c7 0%, #38bdf8 60%, #f59e0b 100%);
  border-radius: 6px;
  transition: width 0.4s ease;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
}

.bp-xp-earning-guide {
  font-size: 10px;
  color: var(--text-muted);
}

.bp-cta-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .bp-cta-box {
    align-items: flex-end;
  }
}

.bp-prem-active-pill {
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 800;
  color: #fef08a;
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.25) 0%, rgba(161, 98, 7, 0.35) 100%);
  border: 1.5px solid #fbbf24;
  box-shadow: 0 0 15px rgba(234, 179, 8, 0.3);
  padding: 6px 14px;
  border-radius: 20px;
}

.bp-unlock-hero-btn {
  font-size: 12px;
  font-weight: 800;
  padding: 9px 20px;
}

.bp-unlock-sub {
  font-size: 9.5px;
  color: var(--gold-bright);
}

.bp-claim-all-btn {
  font-size: 11px;
  padding: 6px 14px;
}

/* QUESTS */
.bp-section-heading {
  margin: 16px 0 10px;
}

.bps-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}

.bps-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.bp-quests-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 768px) {
  .bp-quests-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.bp-quest-card {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s ease;
}

.bp-quest-card.completed {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.06);
}

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

.bpq-title {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  color: #f1f5f9;
}

.bpq-xp {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  padding: 2px 7px;
  border-radius: 10px;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.bpq-desc {
  font-size: 11px;
  color: var(--text-muted);
}

.bpq-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 4px;
  overflow: hidden;
}

.bpq-progress-fill {
  height: 100%;
  background: #38bdf8;
  border-radius: 4px;
}

.bp-quest-card.completed .bpq-progress-fill {
  background: #10b981;
}

.bpq-status {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--text-muted);
}

.bp-quest-card.completed .bpq-status {
  color: #34d399;
  font-weight: 700;
}

/* 25-TIER SCROLL RIBBON */
.bp-tiers-scroll-ribbon {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 10px 4px 16px;
  -webkit-overflow-scrolling: touch;
}

.bp-tier-node {
  min-width: 160px;
  max-width: 160px;
  border-radius: 12px;
  background: rgba(20, 15, 32, 0.95);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.bp-tier-node.unlocked {
  border-color: rgba(56, 189, 248, 0.4);
}

.bp-tier-node.capstone {
  border-color: #fbbf24;
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.35);
  background: linear-gradient(180deg, rgba(45, 30, 60, 0.95) 0%, rgba(20, 12, 28, 0.98) 100%);
}

.bpt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bpt-num {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 900;
  color: #f1f5f9;
}

.bpt-capstone-tag {
  font-family: var(--font-display);
  font-size: 8px;
  font-weight: 900;
  color: #fef08a;
  background: rgba(245, 158, 11, 0.25);
  border: 1px solid #fbbf24;
  padding: 1px 6px;
  border-radius: 8px;
}

.bpt-reward-box {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bpt-reward-box.premium {
  background: rgba(245, 158, 11, 0.05);
  border-color: rgba(245, 158, 11, 0.25);
}

.bpt-reward-box.capstone-box {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.45);
}

.bpt-track-label {
  font-family: var(--font-display);
  font-size: 8px;
  font-weight: 800;
  color: var(--text-muted);
}

.bpt-track-label.gold {
  color: var(--gold-bright);
}

.bpt-reward-label {
  font-size: 10.5px;
  font-weight: 600;
  color: #e2e8f0;
  line-height: 1.3;
  min-height: 28px;
}

.bpt-reward-label.gold {
  color: #fef08a;
  font-weight: 700;
}

.bpt-reward-action {
  margin-top: 4px;
}

.bp-claim-node-btn {
  width: 100%;
  padding: 5px 8px;
  border-radius: 6px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  border: 1px solid #38bdf8;
  cursor: pointer;
}

.bp-claim-node-btn.gold {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  border-color: #fbbf24;
  color: #fff;
}

.bp-claim-node-btn.unlock {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-muted);
}

.bp-preview-btn {
  width: 100%;
  padding: 4px 6px;
  border-radius: 6px;
  background: rgba(147, 51, 234, 0.2);
  border: 1px solid #c084fc;
  color: #e9d5ff;
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 3px;
}

.bp-status-claimed {
  font-size: 9.5px;
  color: #34d399;
  font-weight: 700;
}

.bp-status-locked {
  font-size: 9.5px;
  color: var(--text-muted);
}

.bp-no-reward {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.2);
}

.bpt-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   VAULTED EXCLUSIVES ROTATING SHOP STYLES
   ========================================================================== */
.vaulted-hero-banner {
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(40, 15, 30, 0.9) 0%, rgba(20, 10, 20, 0.95) 100%);
  border: 1.5px solid #ef4444;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7), 0 0 25px rgba(239, 68, 68, 0.25);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vhb-tag {
  font-family: var(--font-display);
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #fca5a5;
}

.vhb-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  margin: 0;
  background: linear-gradient(135deg, #fff 0%, #fca5a5 60%, #ef4444 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.vhb-desc {
  font-size: 13px;
  line-height: 1.5;
  color: #e2e8f0;
  margin: 0;
}

.vhb-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.vhb-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  padding: 4px 10px;
  border-radius: 20px;
}

.vaulted-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 16px;
}

@media (min-width: 900px) {
  .vaulted-cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.vaulted-card-card {
  border-radius: 16px;
  background: rgba(18, 12, 28, 0.95);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.vaulted-card-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.5);
}

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

.vcc-tag {
  font-family: var(--font-display);
  font-size: 8.5px;
  font-weight: 800;
  color: var(--gold-bright);
}

.vcc-countdown {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: #ef4444;
}

.vcc-preview-stage {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px 0;
}

.vcc-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vcc-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}

.vcc-lore {
  font-size: 11.5px;
  line-height: 1.4;
  color: #cbd5e1;
}

.vcc-fairplay-note {
  font-size: 10px;
  color: #38bdf8;
  font-family: var(--font-mono);
}

.vcc-action-row {
  margin-top: 4px;
}

/* WEB BONUS BANNER */
.shop-web-bonus-banner {
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.2) 0%, rgba(2, 132, 199, 0.2) 100%);
  border: 1px solid rgba(147, 51, 234, 0.4);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.swbb-tag {
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 800;
  color: #c084fc;
}

.swbb-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 900;
  color: #fff;
}

.swbb-desc {
  font-size: 12px;
  line-height: 1.4;
  color: #cbd5e1;
  margin: 0;
}

/* MARKETPLACE CROSSLINK */
.shop-marketplace-crosslink {
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(30, 25, 45, 0.9) 0%, rgba(15, 12, 25, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 10px;
}

.shop-marketplace-crosslink:hover {
  border-color: var(--gold);
  background: rgba(35, 28, 55, 0.95);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.smc-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.smc-icon {
  font-size: 24px;
  color: var(--gold-bright);
}

.smc-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  color: #fff;
}

.smc-sub {
  font-size: 11px;
  color: var(--text-muted);
}

/* TOP CLEAN PROMINENT DAILY REWARD BANNER (MOBILE) */
.mob-shop-daily-card {
  position: relative;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(20, 16, 32, 0.95) 60%);
  border: 1.5px solid var(--gold);
  box-shadow: 0 4px 18px rgba(244, 217, 138, 0.2);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.msdc-badge {
  font-family: var(--font-display);
  font-size: 8.5px;
  font-weight: 800;
  color: var(--gold-bright);
  letter-spacing: 0.1em;
}

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

.msdc-icon {
  font-size: 26px;
  filter: drop-shadow(0 0 10px rgba(244, 217, 138, 0.6));
}

.msdc-details {
  flex: 1 1 auto;
}

.msdc-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  color: #fff6df;
}

.msdc-amount {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #38bdf8;
}

.msdc-claim-btn {
  padding: 6px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  border: 1px solid #6ee7b7;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.45);
}

.msdc-claim-btn:disabled {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: none;
}

/* RESOURCE BALANCES BAR */
.shop-resource-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  flex-shrink: 0;
}

.srb-box {
  border-radius: 12px;
  background: linear-gradient(165deg, #1d1733 0%, #0d0a18 100%);
  border: 1.5px solid rgba(244, 217, 138, 0.35);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.srb-icon {
  font-size: 20px;
}

.srb-val {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 900;
  color: #fff6df;
}

.srb-lbl {
  font-size: 9px;
  color: var(--text-muted);
}

/* CATEGORY JUMP TABS (MOBILE) */
.shop-category-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 4px;
  scrollbar-width: none;
  flex-shrink: 0;
}

.shop-category-nav::-webkit-scrollbar {
  display: none;
}

.shop-cat-btn {
  padding: 6px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff6df;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.shop-cat-btn:active,
.shop-cat-btn:hover {
  background: rgba(244, 217, 138, 0.15);
  border-color: var(--gold);
  color: var(--gold-bright);
}

/* DESKTOP CATEGORY JUMP BAR */
.desk-category-bar {
  display: flex;
  gap: 12px;
  padding: 4px 0 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.desk-cat-pill {
  padding: 8px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  color: #fff6df;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.desk-cat-pill:hover {
  background: rgba(244, 217, 138, 0.15);
  border-color: var(--gold);
  color: var(--gold-bright);
  transform: translateY(-2px);
}

/* SECTION HEADERS */
.shop-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  flex-shrink: 0;
}

.ssh-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  color: #fff6df;
}

.ssh-badge {
  font-size: 9.5px;
  font-family: var(--font-mono);
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #7dd3fc;
}

.ssh-badge.green {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.4);
  color: #a7f3d0;
}

.ssh-badge.cyan {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.5);
  color: #38bdf8;
}

/* DIGITAL PRODUCTS LIST (GROUNDED MOBILE CARDS MATCHING STORE FLOW) */
.digital-products-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

.digital-product-card {
  position: relative;
  border-radius: 12px;
  background: linear-gradient(165deg, #181329 0%, #0c0916 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.digital-product-card.featured {
  border-color: rgba(244, 217, 138, 0.45);
  background: linear-gradient(165deg, #241b3a 0%, #0f0b1c 100%);
  box-shadow: 0 4px 16px rgba(244, 217, 138, 0.15);
  padding-top: 16px;
}

.dpc-mob-ribbon {
  position: absolute;
  top: -8px;
  left: 12px;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 8px;
  background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
  color: #120e22;
  border: 1px solid #fef08a;
  letter-spacing: 0.05em;
}

.dpc-mob-art-wrap {
  width: 65px;
  height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.dpc-mob-img {
  max-width: 58px;
  max-height: 68px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.8));
}

.dpc-mob-tag {
  position: absolute;
  bottom: 0;
  font-size: 7.5px;
  font-family: var(--font-mono);
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.2);
  border: 1px solid rgba(56, 189, 248, 0.5);
  color: #7dd3fc;
  white-space: nowrap;
}

.dpc-mob-tag.gold {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.6);
  color: #fef08a;
}

.dpc-mob-tag.purple {
  background: rgba(168, 85, 247, 0.2);
  border-color: rgba(168, 85, 247, 0.6);
  color: #e9d5ff;
}

.dpc-mob-details {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.dpc-mob-title {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  color: #fff6df;
}

.dpc-mob-title.gold {
  color: #fde68a;
}

.dpc-mob-desc {
  font-size: 9px;
  color: var(--text-muted);
  line-height: 1.3;
}

.dpc-mob-perks {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 8px;
  color: #7dd3fc;
  margin: 1px 0 3px;
}

.dpc-mob-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.dpc-mob-actions .shop-pill-btn {
  padding: 4px 10px;
  font-size: 10px;
  flex: 1;
}

.dpc-mob-bundle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 8.5px;
  color: #fde68a;
}

.dpc-bundle-label {
  font-family: var(--font-mono);
}

.shop-pill-btn {
  padding: 6px 14px;
  border-radius: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.1s ease;
}

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

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

.shop-pill-btn.blue {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #fff;
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.35);
}

.shop-pill-btn.gold {
  background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
  color: #120e22;
  border-color: #fef08a;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.shop-pill-btn.purple {
  background: linear-gradient(135deg, #9333ea 0%, #7e22ce 100%);
  color: #fff;
  border-color: #c084fc;
}

.shop-pill-btn.ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border-color: rgba(255, 255, 255, 0.15);
}

.shop-pill-btn.small {
  padding: 4px 10px;
  font-size: 10px;
}

/* PHYSICAL PRODUCTS LIST (MOBILE) */
.physical-products-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

.physical-product-card {
  border-radius: 12px;
  background: linear-gradient(165deg, #181329 0%, #0c0916 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.physical-product-card.featured {
  border-color: rgba(244, 217, 138, 0.45);
  background: linear-gradient(165deg, #231b38 0%, #0f0b1c 100%);
  box-shadow: 0 4px 14px rgba(244, 217, 138, 0.15);
}

.ppc-image-wrap {
  width: 65px;
  height: 75px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.ppc-img {
  max-width: 55px;
  max-height: 60px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.7));
}

.ppc-box-icon {
  font-size: 32px;
  filter: drop-shadow(0 0 10px rgba(244, 217, 138, 0.5));
}

.ppc-tag {
  position: absolute;
  bottom: 0;
  font-size: 7.5px;
  font-family: var(--font-mono);
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #a7f3d0;
  white-space: nowrap;
}

.ppc-tag.gold {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.6);
  color: #fef08a;
}

.ppc-details {
  flex: 1 1 auto;
  min-width: 0;
}

.ppc-title {
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 800;
  color: #fff6df;
  margin-bottom: 2px;
}

.ppc-desc {
  font-size: 9px;
  color: var(--text-muted);
  line-height: 1.3;
  margin-bottom: 4px;
}

.ppc-perks {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 8px;
  color: #7dd3fc;
}

.ppc-action {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.ppc-price {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 900;
  color: #fff;
}

/* CURRENCY SHARDS GRID (MOBILE) */
.currency-shards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  flex-shrink: 0;
}

.shard-bundle-card {
  position: relative;
  border-radius: 12px;
  background: linear-gradient(165deg, #181329 0%, #0d0a17 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
}

.shard-bundle-card.popular {
  border-color: rgba(168, 85, 247, 0.5);
  background: linear-gradient(165deg, #211638 0%, #0d0a17 100%);
}

.shard-bundle-card.best-value {
  border-color: rgba(244, 217, 138, 0.5);
  background: linear-gradient(165deg, #29201a 0%, #0d0a17 100%);
  box-shadow: 0 4px 14px rgba(244, 217, 138, 0.15);
}

.sbc-ribbon {
  position: absolute;
  top: -8px;
  font-size: 8px;
  font-family: var(--font-mono);
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 8px;
  background: #9333ea;
  color: #fff;
  border: 1px solid #c084fc;
}

.sbc-ribbon.gold {
  background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
  color: #120e22;
  border-color: #fef08a;
}

.sbc-icon {
  font-size: 24px;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.5));
}

.sbc-name {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  color: #fff6df;
}

.sbc-amount {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 900;
  color: #38bdf8;
}

.sbc-amount span {
  font-size: 9px;
  color: var(--text-muted);
}

.sbc-desc {
  font-size: 8.5px;
  color: var(--text-muted);
}

.sbc-bonus {
  font-size: 8.5px;
  color: #34d399;
  font-weight: 700;
}

.sbc-price-row {
  margin-top: 6px;
  width: 100%;
}

.sbc-price-row .shop-pill-btn {
  width: 100%;
  padding: 5px 8px;
  font-size: 10.5px;
}

/* ==========================================================================
   DESKTOP SHOP STYLES (.shop-desktop-view, Screen Width >= 900px)
   ========================================================================== */
.desk-shop-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 24px 28px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(29, 22, 51, 0.9) 0%, rgba(13, 10, 24, 0.95) 100%);
  border: 1.5px solid rgba(244, 217, 138, 0.35);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  flex-shrink: 0;
}

.dsh-brand-col {
  flex: 1 1 auto;
  max-width: 650px;
}

.dsh-eyebrow {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  color: var(--gold-bright);
  letter-spacing: 0.15em;
  margin-bottom: 6px;
}

.dsh-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
  color: #fff6df;
  margin: 0 0 8px;
  line-height: 1.25;
}

.dsh-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.dsh-actions-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
  flex-shrink: 0;
}

.desk-daily-reward-box {
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(16, 12, 26, 0.95) 100%);
  border: 1.5px solid var(--gold);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(244, 217, 138, 0.2);
  min-width: 240px;
}

.ddr-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ddr-gift-icon {
  font-size: 28px;
  filter: drop-shadow(0 0 10px rgba(244, 217, 138, 0.6));
}

.ddr-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  color: #fff6df;
}

.ddr-shards {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 800;
  color: #38bdf8;
}

.desk-claim-btn {
  width: 100%;
  padding: 8px 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 800;
  border: 1px solid #6ee7b7;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.desk-claim-btn:disabled {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: none;
}

.desk-balance-row {
  display: flex;
  gap: 12px;
}

.dbr-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 6px 14px;
}

.dbr-icon {
  font-size: 18px;
}

.dbr-val {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 900;
  color: #fff;
}

.dbr-lbl {
  font-size: 9px;
  color: var(--text-muted);
}

/* DESKTOP SHELVES */
.desk-shelf-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
  flex-shrink: 0;
}

.desk-shelf-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: #fff6df;
  margin: 0 0 4px;
}

.desk-shelf-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.desk-shelf-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 12px;
}

.desk-shelf-pill.green {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #a7f3d0;
}

/* DESKTOP DIGITAL PACKS GRID */
.desk-packs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 14px;
  flex-shrink: 0;
}

.desk-pack-card {
  position: relative;
  border-radius: 16px;
  background: linear-gradient(165deg, #181329 0%, #0d0a17 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.desk-pack-card:hover {
  transform: translateY(-4px);
  border-color: rgba(244, 217, 138, 0.5);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7);
}

.desk-pack-card.featured {
  border-color: var(--gold);
  background: linear-gradient(165deg, #241b38 0%, #0e0a1b 100%);
  box-shadow: 0 8px 28px rgba(244, 217, 138, 0.2);
}

.dpc-ribbon {
  position: absolute;
  top: -10px;
  background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
  color: #120e22;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 900;
  padding: 3px 12px;
  border-radius: 10px;
  border: 1px solid #fef08a;
  letter-spacing: 0.05em;
}

.dpc-pack-render {
  position: relative;
  width: 140px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.dpc-pack-img {
  max-width: 135px;
  max-height: 175px;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.8));
  transition: transform 0.2s ease;
}

.desk-pack-card:hover .dpc-pack-img {
  transform: scale(1.05);
}

.dpc-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.dpc-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  color: #fff6df;
  margin-bottom: 4px;
}

.dpc-title.gold {
  color: #fde68a;
}

.dpc-badge {
  font-family: var(--font-mono);
  font-size: 9.5px;
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  margin-bottom: 8px;
}

.dpc-badge.gold {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fef08a;
}

.dpc-badge.purple {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #d8b4fe;
}

.dpc-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0 0 14px;
  min-height: 32px;
}

.dpc-price-box {
  display: flex;
  gap: 10px;
  width: 100%;
  justify-content: center;
}

.dpc-bundle-deal {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: #fde68a;
}

/* DESKTOP PHYSICAL GRID */
.desk-physical-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 14px;
  flex-shrink: 0;
}

.desk-phys-card {
  position: relative;
  border-radius: 16px;
  background: linear-gradient(165deg, #181329 0%, #0d0a17 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.desk-phys-card:hover {
  transform: translateY(-4px);
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7);
}

.desk-phys-card.featured {
  border-color: var(--gold);
  background: linear-gradient(165deg, #241b38 0%, #0d0a17 100%);
  box-shadow: 0 8px 28px rgba(244, 217, 138, 0.2);
}

.dphys-thumb {
  width: 100%;
  height: 130px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dphys-img {
  max-height: 110px;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,0.8));
}

.dphys-box-art {
  font-size: 54px;
  filter: drop-shadow(0 0 14px rgba(244, 217, 138, 0.5));
}

.dphys-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.dphys-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  color: #fff6df;
  margin-bottom: 2px;
}

.dphys-title.gold {
  color: #fde68a;
}

.dphys-tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: #a7f3d0;
  margin-bottom: 8px;
}

.dphys-tag.gold {
  color: #fef08a;
}

.dphys-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0 0 10px;
}

.dphys-checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dphys-checklist li {
  font-size: 11px;
  color: #7dd3fc;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dphys-checklist li::before {
  content: '• ';
  color: #34d399;
  font-weight: 900;
}

.dphys-buy-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.dphys-price {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 900;
  color: #fff;
}

.dphys-price span {
  font-size: 11px;
  color: var(--text-muted);
}

/* DESKTOP SHARDS GRID */
.desk-shards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 14px;
  flex-shrink: 0;
}

.desk-shard-card {
  position: relative;
  border-radius: 14px;
  background: linear-gradient(165deg, #181329 0%, #0d0a17 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  transition: transform 0.2s ease;
}

.desk-shard-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.5);
}

.desk-shard-card.popular {
  border-color: rgba(168, 85, 247, 0.5);
  background: linear-gradient(165deg, #22153b 0%, #0d0a17 100%);
}

.desk-shard-card.best-value {
  border-color: var(--gold);
  background: linear-gradient(165deg, #281d1a 0%, #0d0a17 100%);
  box-shadow: 0 8px 24px rgba(244, 217, 138, 0.18);
}

.dsc-ribbon {
  position: absolute;
  top: -9px;
  background: #9333ea;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 8px;
  border: 1px solid #c084fc;
}

.dsc-ribbon.gold {
  background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
  color: #120e22;
  border-color: #fef08a;
}

.dsc-icon {
  font-size: 32px;
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.5));
}

.dsc-name {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  color: #fff6df;
}

.dsc-amount {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 900;
  color: #38bdf8;
}

.dsc-amount span {
  font-size: 11px;
  color: var(--text-muted);
}

.dsc-desc {
  font-size: 10.5px;
  color: var(--text-muted);
  min-height: 28px;
}

.dsc-price-wrap {
  width: 100%;
  margin-top: 8px;
}

.full-width {
  width: 100% !important;
}

/* --------------------------------------------------------------------------
   4. REDEEM SCREEN: VIEWFINDER, CARD CODE & 3D HOLOGRAM UPGRADE
   (Matching mockup_mobile_redeem_png_1793540771021.jpg)
   -------------------------------------------------------------------------- */
.redeem-screen-shell {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
  background: #090614;
  padding: 8px 12px 90px;
  gap: 8px;
  width: 100%;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* TOP STATUS PILL */
.redeem-status-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 16px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #a7f3d0;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
  flex-shrink: 0;
}

/* CAMERA VIEWFINDER FRAME */
.redeem-viewfinder-card {
  border-radius: 12px;
  background: #0d0a1a;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  padding: 10px;
  flex-shrink: 0;
}

.vf-frame-inner {
  height: 140px;
  border-radius: 8px;
  background: #000;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vf-demo-backdrop {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
}

.vf-scanned-card-img {
  width: 110px;
  height: 120px;
  object-fit: cover;
  border-radius: 6px;
}

.vf-reticle-corner {
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: #22c55e;
  border-style: solid;
  z-index: 3;
}

.vf-reticle-corner.tl { top: 10px; left: 10px; border-width: 3px 0 0 3px; }
.vf-reticle-corner.tr { top: 10px; right: 10px; border-width: 3px 3px 0 0; }
.vf-reticle-corner.bl { bottom: 10px; left: 10px; border-width: 0 0 3px 3px; }
.vf-reticle-corner.br { bottom: 10px; right: 10px; border-width: 0 3px 3px 0; }

.vf-target-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid #22c55e;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 3;
}

.vf-qr-matrix-sim {
  width: 32px;
  height: 32px;
  background: repeating-linear-gradient(45deg, #22c55e, #22c55e 3px, transparent 3px, transparent 6px);
}

.vf-laser-sweep {
  position: absolute;
  left: 5%;
  right: 5%;
  height: 2.5px;
  background: linear-gradient(90deg, transparent, #38bdf8 50%, transparent);
  box-shadow: 0 0 10px #38bdf8;
  animation: laserSweep 2s infinite ease-in-out;
  z-index: 4;
}

@keyframes laserSweep {
  0% { top: 15%; opacity: 0.3; }
  50% { top: 85%; opacity: 1; }
  100% { top: 15%; opacity: 0.3; }
}

.vf-controls-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.vf-btn {
  flex: 1;
  height: 36px;
  font-size: 11px;
  font-weight: 800;
  border-radius: 8px;
}

/* REDEEM GOLD FILIGREE BOXES (ZERO OVERFLOW) */
.redeem-gold-box {
  border-radius: 12px;
  background: linear-gradient(165deg, #1b152d 0%, #0d0a18 100%);
  border: 1.5px solid var(--gold);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  box-sizing: border-box;
  width: 100%;
}

.rgb-title {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 800;
  color: #fff6df;
  text-align: center;
}

/* 4-SEGMENT FORMATTED INPUT (COMPACT) */
.serial-4seg-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
}

.seg-input {
  width: 54px;
  height: 38px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(244, 217, 138, 0.35);
  color: #fef08a;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.seg-input:focus {
  outline: none;
  border-color: var(--gold-bright);
  background: rgba(244, 217, 138, 0.12);
  box-shadow: 0 0 8px rgba(244, 217, 138, 0.5);
}

.seg-divider {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
  color: var(--gold);
}

.beveled-gold-btn {
  height: 40px;
  border-radius: 8px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border: 1.5px solid #fef3c7;
  color: #120e22;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 12px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* CARD AWAKENING & HOLOGRAM UPGRADE STAGE */
.awakening-transform-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 4px 0 8px;
}

.transform-card {
  width: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.tc-card-frame {
  width: 84px;
  height: 115px;
  border-radius: 8px;
  border: 1.5px solid var(--gold);
  background: #110d22;
  overflow: hidden;
  position: relative;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.7);
}

.tc-card-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tc-card-frame.holo-sheen {
  border-color: #fbcfe8;
  box-shadow: 0 0 16px rgba(244, 114, 182, 0.5);
}

.holo-sheen-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 0, 128, 0.25) 0%,
    rgba(255, 215, 0, 0.3) 25%,
    rgba(0, 255, 128, 0.25) 50%,
    rgba(0, 192, 255, 0.3) 75%,
    rgba(192, 0, 255, 0.25) 100%
  );
  background-size: 200% 200%;
  animation: rainbowHoloSheen 4s ease infinite;
  mix-blend-mode: color-dodge;
  pointer-events: none;
}

@keyframes rainbowHoloSheen {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.tc-card-badge {
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 4px;
  text-align: center;
}

.tc-card-badge.unlocked {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.tc-card-badge.holo-burst {
  background: rgba(244, 114, 182, 0.2);
  color: #fbcfe8;
  border: 1px solid rgba(244, 114, 182, 0.4);
}

.transform-arrow {
  font-size: 18px;
  color: var(--gold-bright);
}

.awakening-buttons-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.awakening-buttons-row .awaken-btn {
  height: 38px;
  font-size: 11.5px;
}

.awakening-buttons-row .share-pull-btn {
  height: 34px;
  font-size: 11px;
}

.demo-packs-collapsible {
  margin-top: 6px;
}

/* ==========================================================================
   CUSTOM 3D CARD SLEEVES (ORNATE CARD BACK DESIGNS)
   ========================================================================== */
.tcg-card-back-art[data-sleeve="void_abyss"],
.relic-card[data-treatment="void_inked"] .tcg-card-back-art {
  border-color: #ef4444 !important;
  background:
    url('/assets/optimized/scenes/map_voidrift.webp') center / cover no-repeat,
    radial-gradient(circle at 50% 50%, #2b0817 0%, #11040a 65%, #050104 100%) !important;
  background-blend-mode: overlay;
  box-shadow: inset 0 0 35px rgba(239, 68, 68, 0.7), 0 0 20px rgba(239, 68, 68, 0.35) !important;
}

.tcg-card-back-art[data-sleeve="celestial_suncrest"],
.relic-card[data-treatment="celestial_gilded"] .tcg-card-back-art {
  border-color: #fbbf24 !important;
  background:
    url('/assets/optimized/scenes/map_starfallplateau.webp') center / cover no-repeat,
    radial-gradient(circle at 50% 50%, #3e2f0e 0%, #1a1306 65%, #090602 100%) !important;
  background-blend-mode: overlay;
  box-shadow: inset 0 0 35px rgba(251, 191, 36, 0.75), 0 0 22px rgba(251, 191, 36, 0.4) !important;
}

.tcg-card-back-art[data-sleeve="stained_cathedral"],
.relic-card[data-treatment="stained_glass"] .tcg-card-back-art {
  border-color: #38bdf8 !important;
  background:
    url('/assets/optimized/scenes/shatter_burst.webp') center / cover no-repeat,
    radial-gradient(circle at 50% 50%, #072d46 0%, #17163c 55%, #030612 100%) !important;
  background-blend-mode: color-dodge;
  box-shadow: inset 0 0 35px rgba(56, 189, 248, 0.7), 0 0 20px rgba(244, 114, 182, 0.4) !important;
}

/* ==========================================================================
   CONFLUENCE BATTLE PASS TIER BOOSTS & LEVEL JUMP CONTROLS
   ========================================================================== */
.bp-boost-cluster {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 10px;
}

.bp-boost-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(244, 217, 138, 0.35);
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 6px 13px;
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.bp-boost-btn:hover {
  background: rgba(244, 217, 138, 0.15);
  border-color: var(--gold);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(244, 217, 138, 0.25);
}

.bp-boost-btn.bundle {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(234, 179, 8, 0.25));
  border-color: rgba(192, 132, 252, 0.5);
  color: #fff;
}

.bp-boost-btn.bundle:hover {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.4), rgba(234, 179, 8, 0.4));
  border-color: #c084fc;
  box-shadow: 0 4px 18px rgba(192, 132, 252, 0.35);
}

/* ==========================================================================
   GRAND REWARD CELEBRATION MODAL (FULLSCREEN AAA FANFARE)
   ========================================================================== */
.celebration-modal-backdrop {
  z-index: 10000 !important;
  background: rgba(4, 2, 8, 0.92) !important;
  backdrop-filter: blur(14px) !important;
  display: none !important;
  place-items: center;
  overflow: hidden !important;
}

.celebration-modal-backdrop.open {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.celebration-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.celebration-modal-dialog {
  position: relative;
  z-index: 2;
  width: 90%;
  max-width: 520px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: celebrationPopIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes celebrationPopIn {
  0% {
    opacity: 0;
    transform: scale(0.65) translateY(40px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.celebration-god-rays {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 650px;
  height: 650px;
  margin-top: -325px;
  margin-left: -325px;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(251, 191, 36, 0.12) 0deg 15deg,
    transparent 15deg 30deg,
    rgba(192, 132, 252, 0.1) 30deg 45deg,
    transparent 45deg 60deg
  );
  border-radius: 50%;
  pointer-events: none;
  animation: celebrationRaySpin 24s linear infinite;
  z-index: -1;
  filter: blur(2px);
}

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

.celebration-card-pedestal {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.85));
}

.celebration-shard-chest {
  width: 140px;
  height: 140px;
  border-radius: 24px;
  background: radial-gradient(circle at 50% 30%, rgba(251, 191, 36, 0.3) 0%, rgba(13, 8, 24, 0.95) 75%);
  border: 2px solid var(--gold);
  box-shadow: 0 0 35px rgba(251, 191, 36, 0.5), inset 0 0 25px rgba(251, 191, 36, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: shardFloat 3s ease-in-out infinite alternate;
}

@keyframes shardFloat {
  0% { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}

.celebration-eyebrow {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: var(--gold-bright);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.celebration-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.04em;
  text-shadow: 0 0 25px rgba(251, 191, 36, 0.6);
  margin-bottom: 8px;
}

.celebration-desc {
  font-size: 13.5px;
  color: var(--text-bright);
  line-height: 1.5;
  margin-bottom: 20px;
  max-width: 440px;
}

.celebration-cta-btn {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.1em;
  padding: 12px 36px;
  background: linear-gradient(135deg, #fde047 0%, #f59e0b 60%, #d97706 100%);
  color: #0c0817;
  border: none;
  border-radius: 99px;
  box-shadow: 0 8px 30px rgba(245, 158, 11, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.celebration-cta-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 12px 40px rgba(245, 158, 11, 0.7);
}

/* ==========================================================================
   POST-MATCH BATTLE PASS XP PROGRESSION HUD BANNER
   ========================================================================== */
.battle-bp-toast-bar {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(13, 8, 24, 0.85);
  border: 1.5px solid rgba(251, 191, 36, 0.4);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.battle-bp-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.battle-bp-lvl-badge {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 900;
  color: #0c0817;
  background: linear-gradient(135deg, #fde047, #f59e0b);
  padding: 3px 8px;
  border-radius: 6px;
}

.battle-bp-meter-wrap {
  flex: 1;
}

.battle-bp-meter-head {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--gold-bright);
  margin-bottom: 3px;
}

.battle-bp-meter-bar {
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.battle-bp-meter-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #38bdf8, #c084fc, #fbbf24);
  transition: width 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ==========================================================================
   SPECIES STACKING, SPECIMEN CAROUSEL & VAULT BINDER STYLES
   ========================================================================== */
.rc-action-row.dual-action {
  display: flex;
  gap: 6px;
  align-items: center;
}
.rc-action-btn.view-btn {
  flex: 1.1;
  background: rgba(244, 217, 138, 0.12);
  border: 1px solid var(--gold);
  color: var(--gold-bright);
  font-size: 11px;
}
.rc-action-btn.view-btn:hover {
  background: var(--gold);
  color: #09070f;
}
.rc-action-btn.swap-btn {
  flex: 0.9;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  font-size: 11px;
}
.rc-action-btn.swap-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* ==========================================================================
   TRUE 3D ROTARY SPECIMEN CAROUSEL INSPECTOR (FIXED-SIZE, NON-JUMPING)
   ========================================================================== */
.carousel-inspector-dialog {
  max-width: 960px !important;
  width: 95vw !important;
  height: 90vh !important;
  max-height: 840px !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 16px 20px !important;
  background: radial-gradient(circle at 50% 20%, #1c1834 0%, #0d0a1a 80%) !important;
  border: 1px solid rgba(244, 217, 138, 0.35) !important;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.92), 0 0 40px rgba(244, 217, 138, 0.08) !important;
  border-radius: 20px !important;
  overflow: hidden !important;
  position: relative !important;
  user-select: none !important;
}

.carousel-modal-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.cmt-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cmt-species-name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  color: var(--gold-bright);
  letter-spacing: 0.04em;
}

.cmt-realm-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-bright);
  text-transform: uppercase;
}

.cmt-counter {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.45);
  padding: 4px 14px;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.carousel-nav-btn {
  background: transparent;
  border: none;
  color: var(--gold);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  transition: transform 0.15s ease, color 0.15s ease;
}
.carousel-nav-btn:hover {
  color: #fff;
  transform: scale(1.3);
}

.cmt-counter-text {
  font-size: 12px;
  color: var(--text-main);
  white-space: nowrap;
}

.carousel-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.carousel-close-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #fff;
}

#cardInspectorContent {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
}

/* 3D CAROUSEL STAGE */
.carousel-stage-container {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
  perspective-origin: 50% 50%;
  overflow: visible; /* Cards are never clipped */
  margin: 6px 0;
  min-height: 0;
  cursor: grab;
  touch-action: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  -webkit-touch-callout: none !important;
}
.carousel-stage-container *,
.carousel-3d-track,
.carousel-card-slot,
.carousel-card-slot * {
  touch-action: none !important;
  -webkit-touch-callout: none !important;
}
.carousel-stage-container.is-dragging {
  cursor: grabbing;
}

.carousel-stage-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(14, 12, 24, 0.85);
  border: 1.5px solid var(--gold);
  color: var(--gold-bright);
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.75);
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.carousel-stage-nav-arrow:hover {
  background: var(--gold);
  color: #09070f;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 0 20px rgba(244, 217, 138, 0.6);
}
.carousel-stage-nav-arrow.prev { left: 12px; }
.carousel-stage-nav-arrow.next { right: 12px; }

.carousel-3d-track {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
}

.carousel-pedestal-glow {
  position: absolute;
  bottom: 14px;
  width: 240px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(244, 217, 138, 0.35) 0%, rgba(244, 217, 138, 0) 75%);
  filter: blur(5px);
  pointer-events: none;
  z-index: 5;
}

.carousel-card-slot {
  position: absolute;
  width: 290px;
  transform-style: preserve-3d;
  will-change: transform, opacity;
  user-select: none;
  -webkit-user-select: none;
  contain: layout style;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.carousel-card-slot.with-transition {
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.24s ease !important;
}

.carousel-card-slot.is-active {
  z-index: 10;
  opacity: 1;
  cursor: default;
}

.carousel-card-slot.is-left,
.carousel-card-slot.is-right {
  z-index: 8;
  opacity: 0.65;
  cursor: pointer;
}
.carousel-card-slot.is-left:hover,
.carousel-card-slot.is-right:hover {
  opacity: 0.9;
}

.carousel-card-slot.is-far-left,
.carousel-card-slot.is-far-right {
  z-index: 6;
  opacity: 0.35;
  cursor: pointer;
}

.carousel-card-slot.is-hidden {
  display: none !important;
}

.carousel-flip-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(244, 217, 138, 0.35);
  color: var(--gold-bright);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
  margin-right: 8px;
}
.carousel-flip-btn:hover {
  background: var(--gold);
  color: #09070f;
  border-color: #fff;
}

/* FIXED-HEIGHT DETAIL DOCK */
.carousel-detail-dock {
  height: 148px;
  flex-shrink: 0;
  background: rgba(14, 12, 24, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 10px 16px;
  display: grid;
  grid-template-columns: 1.25fr 1.6fr 1.15fr;
  gap: 16px;
  align-items: center;
  overflow: hidden;
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.5);
}

.cid-stat-pip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 0, 0, 0.45);
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.cid-stat-pip .lbl {
  font-size: 9.5px;
  color: var(--text-muted);
  font-weight: 700;
}
.cid-stat-pip .val {
  font-size: 12px;
  font-weight: 800;
}
.cid-stat-pip .val.pwr { color: var(--stat-pwr); }
.cid-stat-pip .val.hp { color: var(--stat-hp); }
.cid-stat-pip .val.spd { color: var(--stat-spd); }
.cid-stat-pip .val.rng { color: var(--stat-rng); }
.cid-stat-pip .val.fcs { color: var(--stat-fcs); }

.cid-stats-strip {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.cid-gene-chip {
  font-size: 10.5px;
  padding: 2px 8px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  display: inline-block;
  margin-right: 4px;
  margin-top: 3px;
}
.cid-gene-chip.active {
  border-color: rgba(56, 189, 248, 0.5);
  color: #bae6fd;
}

.cid-action-status {
  padding: 8px 12px;
  border-radius: 8px;
  text-align: center;
  font-size: 11.5px;
  font-weight: 800;
}
.cid-action-status.in-squad {
  background: rgba(244, 217, 138, 0.15);
  border: 1px solid var(--gold);
  color: var(--gold-bright);
}

@media (max-width: 768px) {
  .carousel-inspector-dialog {
    width: 100vw !important;
    height: 94vh !important;
    max-height: none !important;
    border-radius: 20px 20px 0 0 !important;
    padding: 10px 8px !important;
  }
  .carousel-detail-dock {
    height: auto;
    grid-template-columns: 1fr;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    padding: 8px 10px;
  }
  .carousel-card-slot {
    width: 280px;
  }
  .carousel-stage-nav-arrow {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }
}
.rc-inspect-overlay-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 5;
  background: rgba(8, 7, 15, 0.86);
  border: 1px solid rgba(244, 217, 138, 0.45);
  color: var(--gold-bright);
  font-size: 9px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: all 0.15s ease;
}
.rc-inspect-overlay-btn:hover {
  background: var(--gold);
  color: #09070f;
  border-color: #fff;
  transform: scale(1.05);
}

.rc-pill-badge.species-count {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.28), rgba(168, 85, 247, 0.28));
  border-color: rgba(56, 189, 248, 0.55);
  color: #bae6fd;
}
.rc-pill-badge.archived-badge {
  background: rgba(168, 85, 247, 0.28);
  border-color: rgba(168, 85, 247, 0.6);
  color: #e9d5ff;
}

.filter-btn.binder-btn {
  border-color: rgba(168, 85, 247, 0.45);
  color: #d8b4fe;
}
.filter-btn.binder-btn:hover {
  border-color: #c084fc;
  color: #fff;
}
.filter-btn.binder-btn.active {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.35), rgba(192, 132, 252, 0.2));
  border-color: #c084fc;
  color: #fff;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
}

.specimen-carousel-section {
  margin-top: 16px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
}
.specimen-carousel-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 8px 2px 4px;
  scrollbar-width: thin;
}
.specimen-card-chip {
  flex: 0 0 160px;
  background: rgba(14, 12, 24, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
  transition: all 0.16s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}
.specimen-card-chip:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}
.specimen-card-chip.active {
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(244, 217, 138, 0.35);
  background: rgba(244, 217, 138, 0.08);
}
.specimen-chip-thumb {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 6px;
}
.specimen-chip-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-bright);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.specimen-chip-meta {
  font-size: 9.5px;
  color: var(--text-muted);
  margin: 2px 0 6px;
}
.specimen-chip-stats {
  display: flex;
  justify-content: space-around;
  font-size: 10px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.45);
  padding: 3px 4px;
  border-radius: 5px;
  margin-bottom: 8px;
}
.specimen-chip-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: auto;
}
.specimen-chip-btn {
  font-size: 9.5px;
  font-weight: 700;
  padding: 4px 6px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  cursor: pointer;
  text-align: center;
  transition: all 0.14s ease;
}
.specimen-chip-btn:hover {
  background: var(--gold);
  color: #09070f;
  border-color: var(--gold);
}
.specimen-chip-btn.archive-btn {
  border-color: rgba(168, 85, 247, 0.4);
  color: #c084fc;
}
.specimen-chip-btn.archive-btn:hover {
  background: #a855f7;
  color: #fff;
}
.specimen-chip-btn.equipped {
  background: rgba(244, 217, 138, 0.15);
  border-color: var(--gold);
  color: var(--gold-bright);
  cursor: default;
}



/* ACCOUNT PANEL (recovery code) */
.account-btn { position: relative; }
.account-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 6px rgba(244, 217, 138, 0.8);
}
.account-dot[hidden] { display: none; }
.account-body { padding: 18px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; line-height: 1.5; color: var(--text-main); }
.account-title { font-size: 16px; font-weight: 800; margin: 0; color: var(--gold); text-align: center; }
#accountPanel { display: flex; flex-direction: column; gap: 10px; }
.account-name { margin: 0; text-align: center; font-family: var(--font-mono); color: var(--text-muted); }
.account-status { margin: 0; padding: 10px 12px; border-radius: 10px; font-weight: 700; }
.account-status.ok { background: rgba(52, 211, 153, 0.1); border: 1px solid rgba(52, 211, 153, 0.35); color: #a7f3d0; }
.account-status.warn { background: rgba(250, 178, 25, 0.1); border: 1px solid rgba(250, 178, 25, 0.4); color: #fcd581; }
.account-note { margin: 0; color: var(--text-muted); font-size: 12.5px; }
.account-code {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: center;
  padding: 14px 8px;
  border-radius: 10px;
  border: 1px dashed var(--border-gold);
  background: var(--bg-elevated);
  color: var(--gold-bright);
  user-select: all;
  overflow-wrap: anywhere;
}
.account-actions { display: flex; gap: 8px; }
.account-actions > button { flex: 1; }
.account-section { border-top: 1px solid var(--border-subtle); padding-top: 10px; }
.account-section summary { cursor: pointer; color: var(--gold); font-weight: 700; font-size: 12.5px; }
.account-section .account-note { margin-top: 8px; }
.account-form { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.account-form > button { margin-top: 6px; }
.account-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.account-hint { font-size: 11px; color: var(--text-dim); }
.account-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  font-size: 16px;
}
.account-input[name='recoveryCode'] { font-family: var(--font-mono); text-transform: uppercase; }
.account-error { margin: 6px 0 0; color: #ff8a8a; font-size: 12.5px; }
.account-error:empty { display: none; }
.account-body { max-height: 85vh; overflow-y: auto; }
