/* ═══════════════════════════════════════════════════════════════════
   La Herrería Hosting — tema base
   Atmósfera: ceniza, brasa, hierro forjado, madera de roble quemada
═══════════════════════════════════════════════════════════════════ */


:root {
  /* Forge palette — default "ámbar" */
  --ash-900: #0b0908;
  --ash-850: #110e0c;
  --ash-800: #181513;
  --ash-750: #1f1b18;
  --ash-700: #26211d;
  --ash-600: #312a25;
  --ash-500: #3d342e;
  --ash-400: #4a3f37;
  --stone-300: #6b5d52;
  --stone-200: #8a7a6b;
  --bone-100: #c9b9a4;
  --bone-50:  #e7d9c2;
  --parchment: #f3e7cf;

  /* Fire / forge */
  --ember-deep: #6b1f08;
  --ember:       #b04b16;
  --forge:       #d8761f;
  --amber:       #f0a23a;
  --spark:       #ffd58a;

  /* Race accent — overridden by [data-race] */
  --race-accent: var(--forge);
  --race-accent-soft: rgba(216, 118, 31, 0.18);
  --race-glow: rgba(240, 162, 58, 0.55);
  --race-deep: var(--ember-deep);

  /* Type stacks */
  --font-display: 'Cinzel', serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-rune: 'MedievalSharp', cursive;
  --font-blackletter: 'UnifrakturCook', serif;

  --title-font: var(--font-display);
}

/* Race themes ─────────────────────────────────────────────── */
[data-race="warrior"] {
  --race-accent: #d94a1f;
  --race-accent-soft: rgba(217, 74, 31, 0.20);
  --race-glow: rgba(255, 110, 60, 0.55);
  --race-deep: #5a1408;
}
[data-race="ninja"] {
  --race-accent: #5b8a3a;
  --race-accent-soft: rgba(91, 138, 58, 0.20);
  --race-glow: rgba(140, 200, 100, 0.45);
  --race-deep: #1f2e15;
}
[data-race="sura"] {
  --race-accent: #8e5cb8;
  --race-accent-soft: rgba(142, 92, 184, 0.20);
  --race-glow: rgba(180, 130, 220, 0.50);
  --race-deep: #2d1640;
}
[data-race="shaman"] {
  --race-accent: #e0b048;
  --race-accent-soft: rgba(224, 176, 72, 0.22);
  --race-glow: rgba(255, 220, 130, 0.55);
  --race-deep: #4a3408;
}
[data-race="all"] {
  --race-accent: #e08a2a;
  --race-accent-soft: rgba(224, 138, 42, 0.20);
  --race-glow: rgba(255, 180, 90, 0.55);
  --race-deep: #5a2808;
}

/* Forge palette tweak ─────────────────────────────────────── */
[data-palette="copper"] {
  --forge: #c46a2a;
  --amber: #e8924a;
  --ember: #8a3a14;
}
[data-palette="amber"] {
  --forge: #d8761f;
  --amber: #f0a23a;
  --ember: #b04b16;
}
[data-palette="rust"] {
  --forge: #a64a1c;
  --amber: #c8682a;
  --ember: #6b1f08;
}

/* Reset / base ───────────────────────────────────────────── */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--bone-50);
  background: var(--ash-900);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Static village background ─────────────────────────────── */
.village-bg {
  position: fixed; inset: 0; z-index: 0;
  background: url('/webdemo/assets/bg-village.svg') center / cover no-repeat;
  filter: saturate(0.7) brightness(0.5) contrast(1.05);
}
.village-bg::after {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 0%, rgba(var(--bg-rgb),0.30) 60%, rgba(var(--bg-rgb),0.60) 100%),
    linear-gradient(180deg, rgba(var(--bg-rgb),0.30) 0%, rgba(var(--bg-rgb),0.55) 100%);
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; }
a { color: inherit; text-decoration: none; }

/* ═══════════════════════════════════════════════════════════
   TEXTURES — pure CSS, no images
═══════════════════════════════════════════════════════════ */

/* Stone wall — antracita with subtle grain */
.tex-stone {
  background-color: var(--ash-850);
  background-image:
    radial-gradient(ellipse 1200px 600px at 20% -10%, rgba(var(--forge-rgb), 0.10), transparent 60%),
    radial-gradient(ellipse 900px 500px at 90% 110%, rgba(var(--forge-rgb), 0.08), transparent 60%),
    radial-gradient(circle at 15% 30%, rgba(var(--hl-rgb),0.015) 0px, transparent 2px),
    radial-gradient(circle at 70% 60%, rgba(var(--hl-rgb),0.02) 0px, transparent 1.5px),
    radial-gradient(circle at 40% 80%, rgba(var(--shade-rgb),0.3) 0px, transparent 3px),
    radial-gradient(circle at 85% 20%, rgba(var(--shade-rgb),0.25) 0px, transparent 2.5px),
    repeating-linear-gradient(
      27deg,
      transparent 0px,
      transparent 80px,
      rgba(var(--shade-rgb),0.10) 80px,
      rgba(var(--shade-rgb),0.10) 81px,
      transparent 81px,
      transparent 160px
    ),
    linear-gradient(160deg, var(--ash-850) 0%, var(--ash-900) 100%);
  background-size:
    auto, auto,
    140px 140px, 90px 90px, 200px 200px, 170px 170px,
    auto, auto;
}

/* Wood — vetas marcadas, oscuro y cálido */
.tex-wood {
  background-color: #1a1310;
  background-image:
    repeating-linear-gradient(
      92deg,
      rgba(var(--shade-rgb),0.0) 0px,
      rgba(var(--shade-rgb),0.35) 1px,
      transparent 2px,
      transparent 8px,
      rgba(60,30,15,0.15) 9px,
      transparent 14px
    ),
    repeating-linear-gradient(
      90deg,
      transparent 0px,
      transparent 60px,
      rgba(var(--shade-rgb),0.25) 60px,
      rgba(var(--shade-rgb),0.25) 62px
    ),
    radial-gradient(ellipse 60px 20px at 25% 40%, rgba(var(--shade-rgb),0.45), transparent 70%),
    radial-gradient(ellipse 40px 14px at 75% 70%, rgba(var(--shade-rgb),0.4), transparent 70%),
    linear-gradient(180deg, #2a1a12 0%, #1a100a 100%);
}

/* Forged iron — frame for cards */
.frame-iron {
  position: relative;
  background:
    linear-gradient(180deg, rgba(var(--hl-rgb),0.025), transparent 30%),
    linear-gradient(180deg, var(--ash-750) 0%, var(--ash-850) 100%);
  border: 1px solid var(--line);
  border-top-color: var(--line-2);
  border-bottom-color: #100c0a;
  box-shadow:
    inset 0 1px 0 rgba(var(--warm-rgb), 0.04),
    inset 0 -20px 40px rgba(var(--shade-rgb),0.5),
    0 2px 0 #060403,
    0 8px 24px rgba(var(--shade-rgb),0.6);
}
.frame-iron::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    radial-gradient(circle at 0% 0%, rgba(var(--warm-rgb),0.06), transparent 40%),
    radial-gradient(circle at 100% 100%, rgba(var(--shade-rgb),0.4), transparent 50%);
}

/* Heat-up hover — metal calentándose */
.heat {
  position: relative;
  transition: box-shadow .35s ease, border-color .35s ease, transform .15s ease, color .25s ease;
}
.heat::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 1px transparent,
    0 0 0 0 var(--race-glow);
  transition: box-shadow .4s ease;
}
.heat:hover {
  border-color: var(--race-accent);
  box-shadow:
    inset 0 1px 0 rgba(var(--warm-rgb), 0.06),
    inset 0 -20px 40px rgba(var(--shade-rgb),0.5),
    0 2px 0 #060403,
    0 0 0 1px var(--race-accent-soft),
    0 0 24px var(--race-glow),
    0 0 60px var(--race-accent-soft);
}
.heat:hover::after {
  box-shadow:
    inset 0 0 12px var(--race-accent-soft),
    0 0 0 1px var(--race-accent);
}

/* Rivets — for iron-frame ornaments */
.rivet {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #6b5a4a, var(--ash-850) 70%);
  box-shadow: inset 0 -1px 0 rgba(var(--shade-rgb),0.6), 0 1px 0 rgba(var(--hl-rgb),0.05);
}

/* Rune chevrons */
.rune-edge {
  background-image:
    linear-gradient(135deg, transparent 50%, var(--race-accent-soft) 50%),
    linear-gradient(-135deg, transparent 50%, var(--race-accent-soft) 50%);
  background-position: 0 0, 0 100%;
  background-size: 8px 8px;
  background-repeat: repeat-x;
}

/* Ember pulse */
@keyframes emberPulse {
  0%, 100% {
    box-shadow:
      inset 0 1px 0 rgba(var(--warm-rgb), 0.3),
      inset 0 -8px 20px rgba(var(--shade-rgb),0.4),
      0 0 0 1px var(--race-accent),
      0 0 24px var(--race-glow),
      0 0 60px var(--race-accent-soft),
      0 6px 0 var(--race-deep);
  }
  50% {
    box-shadow:
      inset 0 1px 0 rgba(var(--warm-rgb), 0.5),
      inset 0 -8px 20px rgba(var(--shade-rgb),0.4),
      0 0 0 1px var(--amber),
      0 0 48px var(--race-glow),
      0 0 100px var(--race-accent-soft),
      0 6px 0 var(--race-deep);
  }
}

@keyframes flicker {
  0%, 100% { opacity: 0.85; }
  43% { opacity: 1; }
  47% { opacity: 0.78; }
  62% { opacity: 0.95; }
}

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

@keyframes sparkRise {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  10%  { opacity: 1; }
  100% { transform: translateY(-180px) translateX(var(--drift, 20px)); opacity: 0; }
}

/* Title fonts ─────────────────────────────────────────────── */
.font-display { font-family: var(--font-display); letter-spacing: 0.02em; }
.font-mono { font-family: var(--font-mono); }
.font-rune { font-family: var(--font-rune); }

[data-titlefont="rune"]      .h-title { font-family: var(--font-rune); letter-spacing: 0.04em; }
[data-titlefont="serif"]     .h-title { font-family: var(--font-display); }
[data-titlefont="black"]     .h-title { font-family: var(--font-blackletter); letter-spacing: 0; }

/* Modal backdrop */
.modal-backdrop {
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(20, 12, 8, 0.35) 0%, rgba(var(--shade-rgb),0.85) 70%);
  backdrop-filter: blur(2px);
  z-index: 100;
  animation: fadeIn .4s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* Selection */
::selection {
  background: var(--race-accent);
  color: var(--ash-900);
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--ash-850); }
::-webkit-scrollbar-thumb { background: var(--ash-500); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--race-accent); }

/* Embers floating in background */
.embers {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.embers span {
  position: absolute;
  bottom: 0;
  width: 3px; height: 3px;
  background: var(--amber);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--amber);
  animation: sparkRise linear infinite;
  opacity: 0;
}

/* Underline fancy */
.fancy-underline {
  position: relative;
  display: inline-block;
}
.fancy-underline::after {
  content: '';
  position: absolute;
  left: 50%; bottom: -6px;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--race-accent), transparent);
}

/* News card hover stripe */
.news-card {
  position: relative;
  overflow: hidden;
}
.news-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--race-accent), transparent);
  opacity: 0;
  transition: opacity .35s ease;
}
.news-card:hover::before { opacity: 1; }

/* Iron divider */
.iron-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-2) 20%, var(--line-2) 80%, transparent);
  margin: 8px 0;
}

/* Race glyph circle */
.race-disc {
  position: relative;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 25%, rgba(255,200,140,0.12), transparent 50%),
    radial-gradient(circle at 50% 50%, var(--ash-750), var(--ash-900));
  border: 1px solid var(--line);
  box-shadow: inset 0 -8px 18px rgba(var(--shade-rgb),0.6), inset 0 2px 0 rgba(var(--warm-rgb),0.08);
  overflow: hidden;
}

/* Big download button */
.btn-download {
  position: relative;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background:
    linear-gradient(180deg, rgba(var(--warm-rgb),0.12), transparent 40%),
    linear-gradient(180deg, var(--race-accent), var(--race-deep));
  color: var(--parchment);
  text-shadow: 0 1px 0 rgba(var(--shade-rgb),0.5), 0 0 18px var(--race-glow);
  border: 1px solid var(--ash-850);
  border-top-color: rgba(var(--warm-rgb),0.35);
  animation: emberPulse 2.6s ease-in-out infinite;
  transition: transform .15s ease;
  cursor: pointer;
}
.btn-download:hover { transform: translateY(-1px) scale(1.01); }
.btn-download:active { transform: translateY(2px) scale(0.99); }

/* Locked ("coming soon") state for any clickable element — grayed out,
   no hover/active feedback, not actually clickable. */
.is-locked {
  filter: grayscale(1);
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.btn-download.is-locked { animation: none; }

/* Forge mark — small ornamental SVG container */
.forge-mark { color: var(--race-accent); filter: drop-shadow(0 0 10px var(--race-glow)); }

/* Hero title */
.hero-title {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 0.92;
  color: var(--parchment);
  filter: drop-shadow(0 4px 0 rgba(var(--shade-rgb),0.6)) drop-shadow(0 0 30px var(--race-glow));
}

[data-titlefont="black"] .hero-title { letter-spacing: 0; }

.hero-sub-hl {
  white-space: nowrap;
  color: #ff8a1e;
  text-shadow: 0 0 14px rgba(255, 138, 30, 0.75), 0 0 2px rgba(255, 170, 60, 0.9);
}

/* Live dot */
.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok), 0 0 0 2px rgba(var(--ok-rgb),0.2);
  animation: flicker 2s infinite;
}

/* Hammered metal label */
.metal-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--stone-200);
}

/* Parchment textarea-like */
.parchment {
  background:
    radial-gradient(ellipse at center, #3a2f24 0%, #1f1812 100%);
  color: var(--bone-100);
  border: 1px solid var(--line);
}

/* Top-5 row */
.rank-row {
  display: grid;
  grid-template-columns: 28px 22px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(var(--line2-rgb),0.5);
  transition: background .25s ease;
}
.rank-row:hover {
  background: linear-gradient(90deg, var(--race-accent-soft), transparent);
}
.rank-row:last-child { border-bottom: none; }

/* ═══════════════════════════════════════════════════════════
   MARKDOWN renderer styles (news + guide detail body)
   ═══════════════════════════════════════════════════════════ */
.md { font-family: var(--font-body); color: var(--bone-100); line-height: 1.7; font-size: 15px; }
.md .md-h2 { font-family: var(--font-display); font-weight: 800; letter-spacing: 0.02em;
  font-size: 24px; color: var(--bone-50); margin: 28px 0 12px;
  padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.md .md-h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.02em;
  font-size: 18px; color: var(--race-accent); margin: 22px 0 10px;
}
.md .md-h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.04em;
  font-size: 14px; text-transform: uppercase; color: var(--bone-50); margin: 18px 0 8px;
}
.md .md-p { margin: 0 0 16px; text-wrap: pretty; }
.md .md-list { margin: 0 0 16px; padding-left: 22px; }
.md .md-list li { margin-bottom: 6px; }
.md .md-list li::marker { color: var(--race-accent); }
.md .md-quote {
  margin: 16px 0; padding: 14px 18px;
  background: rgba(var(--bg-rgb),0.5); border-left: 1px solid var(--race-accent);
  border-radius: 0 3px 3px 0;
  font-style: italic; color: var(--bone-100);
}
.md .md-pre {
  margin: 16px 0; padding: 16px 18px;
  background: var(--ash-900); border: 1px solid var(--line); border-radius: 3px;
  overflow-x: auto;
  font-family: var(--font-mono); font-size: 12px; color: var(--bone-50);
}
.md .md-pre code { background: none; padding: 0; }
.md .md-code {
  padding: 2px 6px; border-radius: 2px;
  background: rgba(var(--forge-rgb),0.12); color: var(--race-accent);
  font-family: var(--font-mono); font-size: 0.88em;
}
.md .md-link { color: var(--race-accent); border-bottom: 1px dotted var(--race-accent); }
.md .md-link:hover { color: var(--amber); border-bottom-color: var(--amber); }
.md .md-img {
  display: block; max-width: 100%; height: auto;
  margin: 20px 0; border-radius: 3px;
  border: 1px solid var(--line);
}
.md strong { color: var(--bone-50); }
.md em { color: var(--bone-100); }

/* ─── Skeleton loaders ─── */
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Tab focus visible */
button:focus-visible, input:focus-visible, a:focus-visible {
  outline: 2px solid var(--race-accent);
  outline-offset: 2px;
}

/* Mobile tweaks for new pages */
@media (max-width: 760px) {
  .account-grid { grid-template-columns: 1fr !important; }
  .search-bar { grid-template-columns: 1fr !important; gap: 8px !important; }
  .cookie-banner { left: 12px !important; right: 12px !important; bottom: 12px !important; max-width: none !important; }
  .orders-head, .orders-row {
    grid-template-columns: 1fr auto !important;
    gap: 4px !important;
  }
  .orders-head > *:nth-child(n+3),
  .orders-row > *:nth-child(n+3) { display: none; }
}

/* Botón ☰ del header: solo en pantallas angostas (ver media ≤BURGER) */
.header-burger {
  display: none;
  flex-direction: column; justify-content: center; gap: 4px;
  width: 38px; height: 34px; padding: 0 10px;
  border-radius: 4px; cursor: pointer;
}
.header-burger span {
  display: block; height: 2px; border-radius: 1px;
  background: var(--bone-50);
  transition: transform .2s ease, opacity .2s ease;
}
.header-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.header-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.header-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — móvil & tablet
   ═══════════════════════════════════════════════════════════ */

/* Tablet & small desktop ── ≤ 1100px */
@media (max-width: 1100px) {
  .columns-layout {
    grid-template-columns: 1fr !important;
  }
  .columns-layout > aside,
  .columns-layout .rank-stack {
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
  }
  .columns-layout .rank-stack {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }

  .vote-rewards-grid {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
    text-align: center;
  }

  .vote-rewards-sites {
    justify-content: center !important;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 28px !important;
  }
  .footer-grid > div:first-child {
    grid-column: 1 / -1;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

/* ── Header en pantallas medianas ──────────────────────────────
   El nav completo + reloj + Discord + idioma (+ cuenta) mide ~1300-1360 px.
   ≤1600 (antes 1440; con "Pase" en el nav no entraba logueado): se oculta el
   reloj, Discord queda solo con ícono y el nav se aprieta.
   ≤1180: menú ☰ (mismo que en celular). */
@media (max-width: 1600px) {
  .site-header > div { gap: 16px !important; padding: 12px 20px !important; }
  .site-header .server-clock { display: none !important; }
  .site-header .header-discord-text { display: none; }
  .site-header .header-nav a { padding: 10px 11px !important; letter-spacing: 0.14em !important; }
}

@media (max-width: 1180px) {
  /* Header: logo + (Discord, idioma, ☰); el nav se despliega como lista */
  .site-header > div {
    grid-template-columns: 1fr auto !important;
    gap: 0 10px !important;
    padding: 10px 16px !important;
    grid-template-areas: "logo right" "nav nav" !important;
  }
  .site-header .header-logo  { grid-area: logo; min-width: 0; }
  .site-header .header-right { grid-area: right; justify-content: flex-end; gap: 8px !important; }
  .site-header .header-burger { display: flex; }
  .site-header .header-nav { display: none !important; }
  .site-header .header-nav.is-open {
    grid-area: nav;
    display: flex !important;
    flex-direction: column;
    gap: 0 !important;
    margin-top: 10px;
    border-top: 1px solid var(--line);
  }
  .site-header .header-nav a {
    padding: 14px 6px !important;
    font-size: 13px !important;
    border-bottom: 1px solid var(--line) !important;
    border-left: 2px solid transparent;
  }
  .site-header .header-nav a:last-child { border-bottom: none !important; }
  .site-header .header-nav a[data-active="true"] {
    color: var(--race-accent) !important;
    border-left-color: var(--race-accent);
    padding-left: 12px !important;
  }
  .site-header .server-clock { display: none !important; }
  .site-header .header-discord-text { display: none; }
}

/* Mobile portrait ── ≤ 760px */
@media (max-width: 760px) {
  /* Hero */
  .hero-title { letter-spacing: 0.03em !important; }
  .hero-sub-cta {
    white-space: normal !important;
    font-size: clamp(12px, 3.6vw, 16px) !important;
  }
  .hero-counters {
    min-width: 0 !important;
    width: 100%;
    grid-template-columns: 1fr 1px 1fr !important;
  }
  .hero-counters > div {
    padding: 10px 8px !important;
    gap: 6px !important;
  }
  .hero-counters span[data-counter] {
    font-size: 20px !important;
  }
  .hero-counters .metal-label {
    font-size: 8px !important;
  }
  .hero-meta-row {
    flex-direction: column !important;
    gap: 4px !important;
  }
  .hero-meta-row .meta-sep { display: none; }

  /* Download button (any variant) */
  .btn-download {
    padding: 16px 24px !important;
    font-size: 14px !important;
    min-width: 0 !important;
    width: 100%;
    letter-spacing: 0.08em !important;
  }

  /* Banner */
  .banner-wrap > div {
    aspect-ratio: auto !important;
    min-height: 320px;
  }
  .banner-grid {
    grid-template-columns: 1fr !important;
    padding: 16px !important;
    gap: 14px !important;
    text-align: center;
  }
  .banner-grid > div:first-child > * {
    align-self: center !important;
  }
  .banner-grid .banner-phone {
    max-width: 180px !important;
    margin: 0 auto;
  }

  /* Columns layout */
  .columns-layout {
    padding: 20px 16px !important;
    gap: 16px !important;
  }
  .columns-layout .rank-stack {
    grid-template-columns: 1fr !important;
  }

  /* Page shell */
  .page-shell {
    padding: 20px 16px 40px !important;
  }
  .page-shell h1 {
    font-size: clamp(28px, 8vw, 40px) !important;
  }

  /* Forms */
  .reg-form-row {
    grid-template-columns: 1fr !important;
  }

  /* Shop */
  .shop-grid {
    grid-template-columns: 1fr 1fr !important;
  }
  .shop-cart-summary {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    text-align: center;
  }
  .shop-cart-summary > button {
    width: 100%;
  }
  .payment-grid {
    grid-template-columns: 1fr !important;
  }

  /* Ranking */
  .rank-col-md-hide { display: none !important; }

  /* Mobile cross-play page */
  .mobile-top-grid {
    grid-template-columns: 1fr !important;
  }
  .mobile-top-grid > * { min-width: 0; }
  .mobile-qr-grid { grid-template-columns: 1fr !important; }
  .mobile-qr { display: none !important; }
  .mobile-steps-grid {
    grid-template-columns: 1fr 1fr !important;
  }
  .download-grid {
    grid-template-columns: 1fr !important;
  }

  /* Vote rewards */
  .vote-rewards-grid { padding: 14px !important; }

  /* News cards */
  .news-card {
    grid-template-columns: 56px 1fr !important;
  }
  .news-card span[data-arrow] { display: none; }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr !important;
    text-align: center;
  }
  .footer-grid > div:first-child {
    grid-column: auto;
  }
  .footer-grid > div:first-child > div:first-child {
    justify-content: center;
  }
  .footer-grid > div:first-child > div:last-child {
    justify-content: center;
  }

  /* Modal */
  .race-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
  }
  .race-modal-title {
    font-size: clamp(28px, 8vw, 44px) !important;
  }

  /* Tweaks panel scroll on tiny screens */
  .twk-panel { max-width: 90vw !important; }
}

/* Mobile small ── ≤ 480px */
@media (max-width: 480px) {
  .shop-grid {
    grid-template-columns: 1fr !important;
  }
  .mobile-steps-grid {
    grid-template-columns: 1fr !important;
  }
  .rank-col-sm-hide { display: none !important; }
  .rank-table .rank-header-row,
  .rank-table .rank-data-row {
    padding: 10px 12px !important;
    gap: 6px !important;
  }
}

/* ─── Wiki (/wiki, wiki.jsx) ─────────────────────────────────────────
   Tres columnas en escritorio (navegación · listado · ficha); en celular
   una columna por vez según data-pane. Colores de rango y de probabilidad
   según la especificación de la wiki del cliente. */
.wiki-toolbar { display: flex; gap: 12px; align-items: stretch; max-width: 760px; margin: 0 auto 22px; }
.wiki-global { position: relative; flex: 1; min-width: 0; }
.wiki-level {
  display: flex; align-items: center; gap: 8px; padding: 0 12px;
  background: rgba(var(--shade-rgb),0.45); border: 1px solid var(--line-2); border-radius: 3px;
  font-family: var(--font-display); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--bone-100);
}
.wiki-level input {
  width: 52px; background: transparent; border: 0; border-bottom: 1px solid var(--stone-300);
  color: var(--amber); font-family: var(--font-mono); font-size: 15px; text-align: center; outline: none; padding: 4px 0;
}
.wiki-level input:focus { border-bottom-color: var(--amber); }
.wiki-global input, .wiki-search {
  width: 100%; box-sizing: border-box;
  background: rgba(var(--shade-rgb),0.45); color: var(--bone-50);
  border: 1px solid var(--line-2); border-radius: 3px;
  font-family: var(--font-body); font-size: 14px;
  padding: 11px 14px; outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.wiki-global input:focus, .wiki-search:focus {
  border-color: var(--race-accent); box-shadow: 0 0 0 2px var(--race-accent-soft);
}
.wiki-global input::placeholder, .wiki-search::placeholder { color: var(--stone-300); }
.wiki-global-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20;
  max-height: 420px; overflow-y: auto; border-radius: 4px; padding: 4px;
}
.wiki-grid {
  display: grid; grid-template-columns: 220px minmax(0, 340px) minmax(0, 1fr);
  gap: 14px; height: min(72vh, 720px); min-height: 460px;
}
.wiki-pane { border-radius: 4px; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.wiki-nav { overflow-y: auto; padding: 8px 0; }
.wiki-section {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  background: none; border: 0; cursor: pointer; text-align: left;
  padding: 10px 14px; color: var(--wiki-head, #F2E2B8);
  font-family: var(--font-display); font-size: 12px; font-weight: 700; letter-spacing: 0.14em;
  border-bottom: 1px solid transparent;
}
.wiki-section:hover { color: var(--amber); }
.wiki-section.is-open { color: var(--amber); border-bottom-color: rgba(var(--amber-rgb),0.4); }
.wiki-section-sign { font-family: var(--font-mono); font-size: 14px; }
.wiki-cats { padding: 4px 0 8px; }
.wiki-cat {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 6px 14px 6px 24px; font-size: 13px; color: var(--bone-100);
  text-decoration: none; border-left: 2px solid transparent;
}
.wiki-cat small { color: var(--stone-300); font-family: var(--font-mono); font-size: 11px; }
.wiki-cat:hover { color: var(--bone-50); background: rgba(102,84,36,0.25); }
.wiki-cat.is-active { color: var(--amber); border-left-color: var(--amber); background: rgba(102,84,36,0.3); }
.wiki-list { padding: 12px; gap: 10px; }
.wiki-list-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-bottom: 6px; border-bottom: 1px solid rgba(var(--amber-rgb),0.4);
  font-family: var(--font-display); font-weight: 700; font-size: 14px; color: var(--amber); letter-spacing: 0.06em;
}
.wiki-list-head small { font-family: var(--font-mono); font-size: 11px; color: var(--stone-200); font-weight: 400; }
.wiki-list-body { overflow-y: auto; flex: 1; margin: 0 -4px; }
.wiki-item {
  display: flex; align-items: center; gap: 10px; min-height: 40px;
  padding: 4px 6px; border-radius: 3px; text-decoration: none;
}
.wiki-item:hover, .wiki-row-link:hover { background: rgba(102,84,36,0.55); }
.wiki-item.is-active { background: rgba(102,84,36,0.4); box-shadow: inset 2px 0 0 var(--amber); }
.wiki-item-main { display: flex; flex-direction: column; min-width: 0; flex: 1; font-size: 13.5px; }
.wiki-item-main > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wiki-item-main small { color: var(--wiki-lo, #9A9A9A); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wiki-right { color: var(--wiki-lo, #9A9A9A); font-family: var(--font-mono); font-size: 11px; white-space: nowrap; flex-shrink: 0; }
.wiki-slot {
  width: 32px; height: 32px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 40%, var(--line), #0d0a08);
  border: 1px solid #4a3f37; box-shadow: inset 0 0 6px rgba(var(--shade-rgb),0.8);
  border-radius: 2px; overflow: hidden;
}
.wiki-slot img { max-width: 32px; max-height: 32px; object-fit: contain; image-rendering: auto; }
.wiki-slot-empty { width: 14px; height: 14px; border: 1px dashed #4a3f37; border-radius: 2px; }
.wiki-detail-head .wiki-slot { width: 40px; height: 40px; }
.wiki-detail-head .wiki-slot img { max-height: 38px; }
.wiki-detail { padding: 16px 18px; overflow-y: auto; }
.wiki-detail-head {
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 10px; margin-bottom: 8px; border-bottom: 1px solid rgba(var(--amber-rgb),0.4);
}
.wiki-detail-head h2 {
  margin: 0; font-family: var(--font-display); font-size: 20px; font-weight: 700; letter-spacing: 0.03em; line-height: 1.25;
}
.wiki-back {
  background: rgba(var(--shade-rgb),0.35); border: 1px solid var(--line-2); color: var(--bone-100);
  font-size: 12px; padding: 5px 10px; border-radius: 3px; cursor: pointer; flex-shrink: 0;
}
.wiki-back:hover { color: var(--amber); border-color: var(--amber); }
.wiki-rows { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; }
.wiki-h {
  margin: 14px 0 2px; padding-bottom: 4px; border-bottom: 1px solid rgba(var(--amber-rgb),0.3);
  font-family: var(--font-display); font-weight: 700; font-size: 13px; letter-spacing: 0.08em; color: var(--amber);
}
.wiki-kv { display: flex; justify-content: space-between; gap: 12px; padding: 4px 2px; border-bottom: 1px dashed rgba(var(--hl-rgb),0.04); }
.wiki-kv > span:first-child { color: var(--wiki-lo, #9A9A9A); }
.wiki-kv > span:last-child { color: var(--wiki-hi, #E2E2E2); text-align: right; font-variant-numeric: tabular-nums; }
.wiki-txt { color: #C9BBA8; padding: 3px 2px; margin: 0; line-height: 1.6; white-space: pre-line; }
.wiki-txt.is-list { padding: 1px 2px 1px 12px; }
.wiki-sep { height: 6px; }
.wiki-row-main { display: flex; align-items: center; gap: 8px; min-width: 0; }
.wiki-row-main > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wiki-tooltip {
  position: fixed; z-index: 60; width: 270px; pointer-events: none;
  background: rgba(12,10,9,0.97); border: 1px solid #4a3f37; border-radius: 4px;
  box-shadow: 0 10px 30px rgba(var(--shade-rgb),0.7); padding: 10px 12px; font-size: 12.5px;
}
.wiki-tooltip-name { font-family: var(--font-display); font-weight: 700; color: var(--amber); font-size: 14px; margin-bottom: 4px; }
.wiki-tooltip-sub { color: var(--wiki-lo, #9A9A9A); margin-bottom: 4px; }
.wiki-tooltip-bono { color: #8FB8E0; }
.wiki-tooltip-desc { color: #C9BBA8; margin-top: 6px; line-height: 1.45; white-space: pre-line; }
.wiki-row-link {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 4px 6px; border-radius: 3px; text-decoration: none; min-height: 36px;
}
.wiki-empty { color: var(--stone-200); text-align: center; font-size: 13px; padding: 18px 8px; }
.wiki-mobile-back { display: none; }

@media (max-width: 1020px) {
  .wiki-grid { grid-template-columns: 190px minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .wiki-toolbar { gap: 8px; }
  .wiki-grid { display: block; height: auto; min-height: 0; }
  .wiki-pane { display: none; }
  .wiki-grid[data-pane="nav"] .wiki-nav,
  .wiki-grid[data-pane="list"] .wiki-list,
  .wiki-grid[data-pane="detail"] .wiki-detail { display: flex; }
  .wiki-list { height: 70vh; }
  .wiki-detail { min-height: 50vh; }
  .wiki-mobile-back {
    display: inline-flex; align-self: flex-start; margin-bottom: 8px;
    background: none; border: 0; color: var(--amber); cursor: pointer;
    font-family: var(--font-display); font-size: 12px; letter-spacing: 0.1em; padding: 4px 0;
  }
}

/* ─── Ranking de actividad (home) ─── */
.act-wrap { padding: 8px 24px 40px; }
.act-box { max-width: 900px; margin: 0 auto; padding: 24px 20px 18px; border: 1px solid #3d2b1d; border-radius: 10px;
  background: linear-gradient(180deg, rgba(20,14,10,0.92), rgba(var(--bg-rgb),0.92)); box-shadow: 0 10px 40px rgba(var(--shade-rgb),0.5); }
.act-title { text-align: center; font-family: var(--font-display); font-weight: 800; letter-spacing: 0.18em; font-size: 20px;
  color: #d9a35a; text-shadow: 0 0 12px rgba(253,187,48,0.25); margin-bottom: 16px; }
.act-flourish { color: #8a6236; font-size: 18px; margin: 0 8px; }
.act-flip { display: inline-block; transform: scaleX(-1); }
.act-nav { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 22px; }
.act-pill { min-width: 240px; text-align: center; padding: 8px 20px; border: 1px solid #6b4e33; border-radius: 20px; background: rgba(var(--shade-rgb),0.45);
  font-family: var(--font-display); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; font-size: 13px; color: #f0d9b0; }
.act-gem { color: #fdbb30; margin-right: 8px; }
.act-arrow { width: 32px; height: 32px; border-radius: 50%; border: 1px solid #6b4e33; background: #120d0a; color: #d9a35a;
  font-size: 20px; line-height: 1; cursor: pointer; }
.act-arrow:hover { border-color: #b87a3d; color: #fdbb30; }
.act-podium { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 14px; align-items: end; }
.act-card { position: relative; text-align: center; padding: 30px 10px 16px; border: 1px solid #3d2b1d; border-radius: 10px; background: rgba(var(--shade-rgb),0.35); min-width: 0; }
.act-card.is-first { padding: 38px 12px 22px; border: 2px solid #b87a3d; background: rgba(40,26,14,0.6); box-shadow: 0 0 22px rgba(184,122,61,0.35); }
.act-badge { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 14px; color: var(--ash-850); }
.act-badge-1 { width: 36px; height: 36px; top: -18px; background: radial-gradient(circle, #e0a060, #9c5e2a); font-size: 18px; }
.act-badge-2 { background: radial-gradient(circle, #e2e2e2, #8d8d8d); }
.act-badge-3 { background: radial-gradient(circle, #d08a52, #7a4a22); }
.act-avatar { width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 50%; border: 3px solid #8a6236; overflow: hidden; background: var(--ash-850); }
.is-first .act-avatar { width: 80px; height: 80px; border-color: #b87a3d; }
.act-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.act-name { font-family: var(--font-display); font-weight: 700; color: #f6e7c8; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.is-first .act-name { font-size: 16px; }
.act-meta { font-family: var(--font-mono); font-size: 11px; color: var(--stone-300); margin-top: 4px; }
.act-score { font-family: var(--font-display); font-weight: 800; color: #fdbb30; font-size: 20px; margin-top: 8px; }
.is-first .act-score { font-size: 26px; text-shadow: 0 0 10px rgba(253,187,48,0.4); }
.act-dots { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.act-dot { width: 9px; height: 9px; padding: 0; border-radius: 50%; border: 0; background: #3a2e25; cursor: pointer; }
.act-dot.is-on { background: #f7a440; box-shadow: 0 0 6px #f7a440; }
@media (max-width: 600px) {
  .act-podium { grid-template-columns: 1fr; gap: 22px; }
  .act-card.is-first { order: -1; }
  .act-pill { min-width: 0; flex: 1; font-size: 11px; padding: 8px 10px; }
  .act-title { font-size: 15px; letter-spacing: 0.1em; }
}

/* ─── Promo de cartas para top donadores (pages.jsx: TopDonorOffer) ─── */
.tdo-overlay {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center;
  padding: 16px; overflow-y: auto;
  background: rgba(var(--bg-rgb), 0.82); backdrop-filter: blur(6px);
  animation: tdo-fade 0.3s ease-out;
}
@keyframes tdo-fade { from { opacity: 0; } to { opacity: 1; } }
.tdo-panel {
  position: relative; width: 100%; max-width: 760px; margin: auto;
  padding: 36px 28px 24px; border-radius: 6px; text-align: center;
  box-shadow: 0 0 60px rgba(var(--gold-rgb), 0.25);
}
.tdo-close {
  position: absolute; top: 10px; right: 12px; width: 32px; height: 32px;
  background: transparent; border: 1px solid var(--line-2); border-radius: 50%;
  color: var(--stone-200); cursor: pointer; font-size: 13px;
}
.tdo-close:hover { color: var(--bone-50); border-color: var(--stone-200); }
.tdo-title {
  margin: 0 auto 26px; max-width: 600px;
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(17px, 3.4vw, 28px); letter-spacing: 0.06em; line-height: 1.25;
  color: var(--gold-soft);
  text-shadow: 0 2px 0 rgba(var(--shade-rgb), 0.7), 0 0 22px rgba(var(--gold-rgb), 0.55);
}
.tdo-cards {
  display: grid; grid-template-columns: repeat(3, minmax(0, 200px));
  justify-content: center; gap: clamp(8px, 2.4vw, 22px);
}
.tdo-card {
  perspective: 1000px; aspect-ratio: 2 / 3; cursor: pointer; outline: none;
}
.tdo-card.is-flipped { cursor: default; }
.tdo-inner {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.tdo-card:not(.is-flipped):hover .tdo-inner,
.tdo-card:not(.is-flipped):focus-visible .tdo-inner { transform: translateY(-6px) rotateY(8deg); }
.tdo-card.is-flipped .tdo-inner { transform: rotateY(180deg); }
.tdo-face {
  position: absolute; inset: 0; border-radius: 10px;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: clamp(8px, 2vw, 16px); gap: clamp(6px, 1.6vw, 12px);
}
.tdo-face-down {
  border: 2px solid #8a6a2a;
  background:
    repeating-linear-gradient(45deg, rgba(var(--gold-rgb), 0.07) 0 6px, transparent 6px 12px),
    radial-gradient(circle at 50% 45%, #3a2a14, var(--ash-850) 75%);
  box-shadow: inset 0 0 0 6px var(--ash-850), inset 0 0 0 7px rgba(var(--gold-rgb), 0.45), 0 10px 26px rgba(var(--shade-rgb), 0.6);
}
.tdo-card:focus-visible .tdo-face-down { border-color: var(--gold-soft); }
.tdo-sigil {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(38px, 9vw, 72px); line-height: 1; color: var(--gold);
  text-shadow: 0 0 18px rgba(var(--gold-rgb), 0.7);
}
.tdo-brand {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(8px, 1.8vw, 11px); letter-spacing: 0.3em; color: #b8914a;
}
.tdo-face-up {
  transform: rotateY(180deg);
  border: 2px solid var(--gold);
  background: radial-gradient(circle at 50% 30%, #4a3516, #1a130b 80%);
  box-shadow: 0 0 28px rgba(var(--gold-rgb), 0.45), 0 10px 26px rgba(var(--shade-rgb), 0.6);
}
.tdo-name {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(10px, 2.3vw, 16px); line-height: 1.25; letter-spacing: 0.03em;
  color: var(--parchment); text-transform: uppercase;
}
.tdo-price { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.tdo-price span {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(15px, 3.6vw, 26px); color: var(--gold-soft);
  text-shadow: 0 0 12px rgba(var(--gold-rgb), 0.6);
}
.tdo-price s { font-family: var(--font-mono); font-size: 11px; color: var(--stone-200); }
.tdo-pick {
  padding: clamp(6px, 1.4vw, 10px) clamp(10px, 2.6vw, 22px);
  border: 1px solid var(--gold-soft); border-radius: 3px; cursor: pointer;
  background: linear-gradient(180deg, var(--gold), #8a6a2a); color: var(--ash-850);
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(10px, 2vw, 13px); letter-spacing: 0.14em;
}
.tdo-pick:hover { filter: brightness(1.12); }
.tdo-soon { font-family: var(--font-mono); font-size: 10px; color: var(--stone-200); text-transform: uppercase; }
.tdo-note {
  margin: 22px 0 10px; font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.08em; color: var(--bone-100);
}
.tdo-timer { display: flex; align-items: center; gap: 12px; max-width: 360px; margin: 0 auto; }
.tdo-timer-bar { flex: 1; height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.tdo-timer-bar div {
  height: 100%; background: linear-gradient(90deg, #8a6a2a, var(--gold));
  transition: width 0.25s linear;
}
.tdo-timer-num {
  font-family: var(--font-mono); font-weight: 700; font-size: 16px; color: var(--gold-soft);
  font-variant-numeric: tabular-nums; min-width: 44px; text-align: right;
}
.tdo-cart-line {
  margin-top: 24px; padding: 12px 16px; border-radius: 4px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  border: 1px solid var(--gold); background: linear-gradient(90deg, rgba(var(--gold-rgb), 0.16), transparent);
  box-shadow: 0 0 16px rgba(var(--gold-rgb), 0.2);
}
.tdo-cart-tag {
  font-family: var(--font-display); font-weight: 800; font-size: 11px;
  letter-spacing: 0.16em; color: var(--gold-soft);
}
.tdo-cart-name { flex: 1; min-width: 160px; font-family: var(--font-display); font-weight: 700; color: var(--parchment); }
.tdo-cart-price { font-family: var(--font-display); font-weight: 800; color: var(--bone-50); }
@media (max-width: 520px) {
  .tdo-panel { padding: 40px 12px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .tdo-inner, .tdo-timer-bar div { transition: none; }
  .tdo-overlay { animation: none; }
}
.tdo-options { display: flex; gap: 8px; justify-content: center; }
.tdo-options .tdo-pick { min-width: 44px; }
.tdo-excl {
  font-family: var(--font-display); font-weight: 900; font-size: clamp(8px, 1.6vw, 10px);
  letter-spacing: 0.2em; padding: 3px 8px; border-radius: 99px;
  color: var(--ash-850); background: linear-gradient(180deg, var(--gold-soft), #b8914a);
}
.tdo-stock {
  font-family: var(--font-mono); font-size: clamp(9px, 1.7vw, 11px);
  color: var(--gold-soft); letter-spacing: 0.04em;
}
.tdo-soldout { color: var(--err-text); }
/* Con destacados la carta necesita más alto (aplica a las 3 para que queden parejas). */
.tdo-cards.has-perks .tdo-card { aspect-ratio: auto; height: 430px; }
@media (max-width: 480px) {
  .tdo-cards.has-perks .tdo-card { height: 420px; }
  .tdo-cards.has-perks .tdo-face { gap: 5px; padding: 6px; }
}
.tdo-perks {
  list-style: none; margin: 0; padding: 0; width: 100%; text-align: center;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(8px, 1.7vw, 12px); line-height: 1.3; letter-spacing: 0.02em;
  color: var(--gold-soft); text-shadow: 0 0 8px rgba(var(--gold-rgb), 0.55);
}
.tdo-pick:disabled { opacity: 0.35; cursor: not-allowed; filter: grayscale(1); }
.tdo-3d {
  background: transparent; border: 1px solid rgba(var(--gold-rgb), 0.55); border-radius: 3px;
  color: var(--gold-soft); cursor: pointer; padding: 4px 10px;
  font-family: var(--font-mono); font-size: clamp(9px, 1.6vw, 11px); letter-spacing: 0.1em;
}
.tdo-3d:hover { border-color: var(--gold-soft); background: rgba(var(--gold-rgb), 0.1); }
.tdo-excl-note {
  margin: 20px auto 0; max-width: 520px;
  font-family: var(--font-display); font-weight: 700; font-size: 13px;
  letter-spacing: 0.04em; line-height: 1.4; color: var(--gold-soft);
}
.tdo-excl-note + .tdo-note { margin-top: 8px; }
.tdo-viewer { display: flex; flex-direction: column; gap: 10px; }
.tdo-viewer-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; }
.tdo-back {
  background: transparent; border: 1px solid var(--line-2); border-radius: 3px; cursor: pointer;
  color: var(--bone-100); padding: 6px 12px; font-family: var(--font-mono); font-size: 12px;
}
.tdo-back:hover { color: var(--bone-50); border-color: var(--stone-200); }
.tdo-viewer-title { font-family: var(--font-display); font-weight: 800; color: var(--parchment); letter-spacing: 0.04em; }
.tdo-chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.tdo-chip {
  padding: 6px 14px; border-radius: 99px; cursor: pointer;
  border: 1px solid var(--line-2); background: rgba(var(--bg-rgb), 0.6); color: var(--bone-100);
  font-family: var(--font-display); font-weight: 700; font-size: 12px; letter-spacing: 0.08em;
}
.tdo-chip.is-on { border-color: var(--gold); color: var(--ash-850); background: linear-gradient(180deg, var(--gold-soft), #b8914a); }
.tdo-chips-sm .tdo-chip { padding: 4px 10px; font-size: 11px; }
.tdo-stage {
  position: relative; height: clamp(300px, 52vh, 440px); border-radius: 6px; overflow: hidden;
  border: 1px solid rgba(var(--gold-rgb), 0.35);
  background: radial-gradient(circle at 50% 40%, #3a2a14, #110c08 75%);
}
.tdo-stage-msg {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 12px; color: var(--stone-200);
}
.tdo-viewer-hint { margin: 0; font-family: var(--font-mono); font-size: 11px; color: var(--stone-300); }
.bonus3d-btn {
  display: block; margin-top: 6px; cursor: pointer; padding: 5px 10px; border-radius: 3px;
  border: 1px solid var(--gold); background: rgba(var(--gold-rgb), 0.12); color: var(--gold-soft);
  font-family: var(--font-display); font-weight: 700; font-size: 10px; letter-spacing: 0.1em;
}
.bonus3d-btn:hover { background: rgba(var(--gold-rgb), 0.25); }
.bonus3d-overlay {
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(var(--bg-rgb), 0.82);
}
.bonus3d-box { width: min(560px, 100%); padding: 16px; border-radius: 6px; box-sizing: border-box; }
@media (max-width: 520px) {
  .tdo-card { aspect-ratio: 1 / 2; }
}

/* Promo pase de batalla: botón OBTENER grande y brillante */
.pase-btn {
  position: relative; overflow: hidden; cursor: pointer;
  width: min(100%, 360px); padding: 22px 28px;
  border: 2px solid var(--gold-soft); border-radius: 4px;
  background: linear-gradient(180deg, #f0c25a, #b07a1c);
  color: var(--ash-850); font-family: var(--font-display); font-weight: 900;
  font-size: clamp(22px, 5vw, 32px); letter-spacing: 0.22em;
  box-shadow: 0 0 22px rgba(var(--gold-rgb),0.65), 0 0 60px rgba(var(--gold-rgb),0.3), inset 0 1px 0 rgba(var(--hl-rgb),0.5);
  animation: paseGlow 1.8s ease-in-out infinite;
}
.pase-btn::after {
  content: ''; position: absolute; top: 0; left: -80%; width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(var(--hl-rgb),0.65), transparent);
  transform: skewX(-20deg); animation: paseShine 2.6s ease-in-out infinite;
}
.pase-btn:hover:not(:disabled) { filter: brightness(1.12); transform: scale(1.03); }
.pase-btn:disabled { opacity: 0.6; cursor: wait; animation: none; }
@keyframes paseGlow { 50% { box-shadow: 0 0 34px rgba(255,214,110,0.95), 0 0 90px rgba(var(--gold-rgb),0.5), inset 0 1px 0 rgba(var(--hl-rgb),0.5); } }
@keyframes paseShine { 0% { left: -80%; } 60%, 100% { left: 140%; } }
@media (prefers-reduced-motion: reduce) { .pase-btn, .pase-btn::after { animation: none; } }

/* ── Binance Pay: instrucciones de pago (pages-extra.jsx → BinancePending) ── */
.bn-box { position: relative; border-radius: 4px; padding: 32px 28px; max-width: 560px; margin: 0 auto; }
.bn-head { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 18px; text-align: center; }
.bn-steps { color: var(--stone-200); font-size: 14px; line-height: 1.6; margin: 14px 0 8px; padding-left: 22px; }
.bn-row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid #f0b90b55; background: rgba(240,185,11,0.07); border-radius: 4px; }
.bn-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--stone-300); }
.bn-value { font-family: var(--font-mono); font-size: 18px; color: var(--bone-50); word-break: break-all; }
.bn-big { font-size: 26px; font-weight: 800; color: #f0b90b; }
.bn-copy { background: #f0b90b; color: #1a1408; border: 0; border-radius: 3px; padding: 8px 12px; font-weight: 800; font-size: 12px; cursor: pointer; white-space: nowrap; }
.bn-alias { margin: 8px 2px 4px; font-size: 12px; color: var(--stone-300); }
.bn-alias b { color: var(--bone-50); }
.bn-note { margin-top: 10px; font-size: 12px; color: var(--stone-300); line-height: 1.5; }
.bn-wait { margin-top: 20px; padding: 12px 14px; border-radius: 4px; background: rgba(var(--bg-rgb),0.5); border: 1px solid var(--line); color: var(--bone-100); font-size: 13px; display: flex; gap: 10px; align-items: center; }
.bn-spinner { flex: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid #f0b90b44; border-top-color: #f0b90b; animation: bn-spin 0.9s linear infinite; }
@keyframes bn-spin { to { transform: rotate(360deg); } }
.bn-foot { margin-top: 16px; font-family: var(--font-mono); font-size: 11px; color: var(--stone-300); text-align: center; }
.bn-foot span { color: var(--race-accent); }
@media (max-width: 480px) {
  .bn-box { padding: 24px 16px; }
  .bn-row { grid-template-columns: 1fr auto; }
  .bn-label { grid-column: 1 / -1; }
  .bn-big { font-size: 22px; }
}

/* ─── Pase de batalla (/pase-de-batalla, battle-pass.jsx) ─────────── */
.bp-top { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 24px; align-items: stretch; }
.bp-text { font-size: 14px; line-height: 1.65; color: var(--stone-100, var(--bone-100)); margin: 12px 0 0; }
.bp-text b, .bp-ways b { color: var(--race-accent); }
.bp-slot {
  position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none;
  background: radial-gradient(circle at 50% 40%, rgba(var(--hl-rgb),0.06), rgba(var(--shade-rgb),0.5));
  border: 1px solid var(--line-2); border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(var(--shade-rgb),0.6);
}
.bp-slot img { max-width: 100%; max-height: 100%; object-fit: contain; }
.bp-qty {
  position: absolute; right: 2px; bottom: 0; font-size: 11px; font-weight: 700; color: #fff;
  text-shadow: 0 0 2px #000, 0 0 2px #000, 0 0 3px #000;
}
.bp-ticket-body { display: flex; gap: 18px; align-items: center; margin-top: 16px; }
.bp-ticket-icon {
  flex: none; width: 112px; height: 112px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--race-accent); border-radius: 4px;
  background: radial-gradient(circle, rgba(255,200,120,0.18), rgba(var(--shade-rgb),0.55) 70%);
  box-shadow: 0 0 24px -6px var(--race-accent);
}
.bp-ticket-icon img { width: 96px; height: 96px; image-rendering: pixelated; }
.bp-ticket-name { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bone-50); font-size: 15px; }
.bp-ticket-body .bp-text { margin-top: 6px; }
.bp-monthly { display: flex; flex-wrap: wrap; gap: 8px; }
.bp-ways { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; counter-reset: bpw; }
.bp-ways li { display: flex; flex-direction: column; gap: 4px; font-size: 14px; line-height: 1.55; color: var(--stone-100, var(--bone-100)); padding-left: 34px; position: relative; }
.bp-ways li::before {
  counter-increment: bpw; content: counter(bpw); position: absolute; left: 0; top: 0;
  width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--race-accent);
  color: var(--race-accent); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.bp-ways strong { color: var(--bone-50); }
.bp-link { color: var(--race-accent); text-decoration: underline; font-size: 13px; margin-top: 2px; align-self: flex-start; }
.bp-value { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.bp-bar { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 10px; font-size: 13px; color: var(--stone-200); }
.bp-bar i { display: block; height: 12px; border-radius: 2px; background: #4a3d32; }
.bp-bar b { color: var(--bone-50); font-size: 14px; white-space: nowrap; }
.bp-bar.is-gain i { background: linear-gradient(90deg, var(--race-accent), #ffd98a); box-shadow: 0 0 12px -2px var(--race-accent); }
.bp-bar.is-gain b { color: var(--race-accent); font-size: 16px; }
.bp-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 16px; }
.bp-steps > div { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.6; color: var(--stone-100, var(--bone-100)); }
.bp-steps b {
  flex: none; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--race-accent); color: var(--ash-850); font-weight: 800; font-size: 15px;
}
.bp-steps strong { color: var(--bone-50); }
.bp-h2 { text-align: center; font-size: clamp(24px, 3vw, 32px); margin: 44px 0 18px; }
.bp-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 20px; }
.bp-tab {
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px; min-width: 120px;
  padding: 10px 16px; background: rgba(var(--bg-rgb),0.6); border: 1px solid var(--line-2); border-radius: 3px;
  color: var(--stone-200); font-family: var(--font-display); font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; font-size: 13px; cursor: pointer;
}
.bp-tab small { font-family: inherit; font-size: 10px; letter-spacing: 0.12em; color: var(--stone-300); font-weight: 600; }
.bp-tab:hover { border-color: var(--race-accent); color: var(--bone-50); }
.bp-tab.is-on { border-color: var(--race-accent); color: var(--bone-50); background: rgba(40,30,22,0.9); box-shadow: inset 0 -2px 0 var(--race-accent); }
.bp-tab.is-on small { color: var(--race-accent); }
.bp-month { display: grid; grid-template-columns: minmax(280px, 1fr) 2fr; gap: 24px; align-items: start; }
.bp-item { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bp-item-text { display: flex; flex-direction: column; min-width: 0; }
.bp-item-name { font-size: 13px; color: var(--bone-50); line-height: 1.3; }
.bp-item-fx { font-size: 11px; color: var(--stone-300); line-height: 1.35; }
.bp-final-head { display: flex; flex-direction: column; gap: 12px; margin: 16px 0 14px; }
.bp-final-head .bp-item-name { font-size: 15px; font-weight: 700; color: var(--race-accent); }
.bp-pieces { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.bp-missions { list-style: none; margin: 8px 0 0; padding: 0; }
.bp-missions li {
  display: grid; grid-template-columns: 28px 1fr minmax(180px, 38%); gap: 14px; align-items: center;
  padding: 12px 4px; border-top: 1px solid var(--line);
}
.bp-missions li:first-child { border-top: none; }
.bp-num { color: var(--race-accent); font-weight: 800; font-size: 15px; text-align: center; }
.bp-goal { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--stone-200); line-height: 1.45; }
.bp-goal strong { color: var(--bone-50); font-size: 14px; }
.bp-rew { display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 1180px) {
  .bp-top { grid-template-columns: 1fr 1fr; }
  .bp-ticket { grid-column: 1 / -1; }
  .bp-month { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .bp-top, .bp-steps { grid-template-columns: 1fr; }
  .bp-ticket-icon { width: 88px; height: 88px; }
  .bp-ticket-icon img { width: 72px; height: 72px; }
  .bp-tab { min-width: 0; flex: 1 1 30%; padding: 8px 6px; font-size: 12px; }
  .bp-missions li { grid-template-columns: 22px 1fr; gap: 6px 10px; }
  .bp-rew { grid-column: 2; }
  .bp-pieces { grid-template-columns: 1fr; }
}
/* Llamador a /pase-de-batalla en la tarjeta del paquete del pase (SpecialCard) */
.shop-bp-link {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 10px 12px; border-radius: 3px; text-decoration: none;
  border: 1px dashed var(--race-accent); background: rgba(var(--forge-rgb),0.08);
  color: var(--race-accent); font-family: var(--font-display); font-weight: 700;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; text-align: center;
  transition: background .15s, color .15s;
}
.shop-bp-link img { flex: none; }
.shop-bp-link:hover { background: var(--race-accent); color: var(--ash-900); border-style: solid; }
/* Renders del pase: ítems clickeables, vitrina del set y visor */
button.bp-item { background: none; border: none; padding: 0; margin: 0; font: inherit; text-align: left; cursor: zoom-in; color: inherit; }
button.bp-item .bp-slot { transition: border-color .15s, box-shadow .15s; }
button.bp-item:hover .bp-slot, button.bp-item:focus-visible .bp-slot { border-color: var(--race-accent); box-shadow: 0 0 10px -2px var(--race-accent); }
button.bp-item:hover .bp-item-name { color: var(--race-accent); }
.bp-zoom {
  position: absolute; top: -6px; right: -6px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--race-accent); color: var(--ash-850); font-style: normal; font-size: 10px; font-weight: 900;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--ash-850);
}
.bp-showcase { padding: 22px 26px 16px; border-radius: 4px; position: relative; margin-bottom: 24px; overflow: hidden; }
.bp-gender { display: inline-flex; border: 1px solid var(--line-2); border-radius: 99px; overflow: hidden; }
.bp-gender button, .bp-viewer-classes button {
  background: transparent; border: none; color: var(--stone-200); cursor: pointer;
  font-family: var(--font-display); font-weight: 700; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 6px 14px;
}
.bp-gender button.is-on, .bp-viewer-classes button.is-on { background: var(--race-accent); color: var(--ash-850); }
.bp-showcase-img {
  margin-top: 14px; display: flex; justify-content: center; align-items: flex-end;
  background: radial-gradient(ellipse at 50% 85%, rgba(var(--forge-rgb),0.16), transparent 65%);
}
.bp-showcase-img img { width: 100%; max-width: 1180px; height: auto; display: block; }
.bp-showcase-tip { text-align: center; font-size: 12px; color: var(--stone-300); margin: 6px 0 0; }
.bp-showcase-tip b { color: var(--race-accent); }
.bp-viewer {
  position: fixed; inset: 0; z-index: 200; background: rgba(var(--bg-rgb),0.86); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 16px; animation: bpFade .2s ease;
}
@keyframes bpFade { from { opacity: 0; } to { opacity: 1; } }
.bp-viewer-box {
  position: relative; width: min(920px, 100%); max-height: calc(100vh - 32px); overflow: auto;
  padding: 22px 22px 20px; border-radius: 4px; display: flex; flex-direction: column; align-items: center; gap: 12px;
  animation: slideUp .2s ease;
}
.bp-viewer-close {
  position: absolute; top: 10px; right: 10px; z-index: 1; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(var(--bg-rgb),0.8); border: 1px solid var(--race-accent); color: var(--race-accent); font-size: 14px; cursor: pointer;
}
.bp-viewer-close:hover { background: var(--race-accent); color: var(--ash-850); }
.bp-viewer-img {
  width: 100%; display: flex; justify-content: center; align-items: center; min-height: 200px;
  background: radial-gradient(ellipse at 50% 60%, rgba(var(--forge-rgb),0.18), transparent 70%);
}
.bp-viewer-img img { max-width: 100%; max-height: min(62vh, 640px); width: auto; height: auto; display: block; }
.bp-viewer-classes { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.bp-viewer-classes button { border: 1px solid var(--line-2); border-radius: 99px; }
.bp-viewer-classes button.is-on { border-color: var(--race-accent); }
.bp-viewer-name { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bone-50); font-size: 17px; text-align: center; }
.bp-viewer-fx { font-size: 13px; color: var(--race-accent); text-align: center; }
@media (max-width: 760px) {
  .bp-showcase { padding: 18px 12px 12px; }
  .bp-showcase-head .bp-gender button { padding: 6px 10px; }
  .bp-viewer-classes button { padding: 6px 10px; font-size: 10px; }
}


/* Ruleta: animaciones de la pantalla de donación ──────────── */
@keyframes rlPop { 0% { opacity: 0; transform: translateY(26px) scale(.92); } 60% { opacity: 1; transform: translateY(-4px) scale(1.015); } 100% { opacity: 1; transform: none; } }
@keyframes rlTitle { 0% { opacity: 0; letter-spacing: .5em; filter: blur(6px); } 100% { opacity: 1; letter-spacing: normal; filter: none; } }
@keyframes rlHc { 0%, 100% { text-shadow: 0 0 18px var(--race-glow); transform: scale(1); } 50% { text-shadow: 0 0 38px var(--race-glow), 0 0 70px rgba(var(--amber-rgb),.45); transform: scale(1.05); } }
@keyframes rlRays { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes rlOpen { 0%, 100% { box-shadow: 0 0 22px var(--race-glow), 0 0 0 0 rgba(var(--amber-rgb),.6); } 50% { box-shadow: 0 0 40px var(--race-glow), 0 0 0 14px rgba(var(--amber-rgb),0); } }
@keyframes rlWheelIn { 0% { opacity: 0; transform: scale(.5) rotate(-90deg); } 100% { opacity: 1; transform: none; } }
@keyframes rlPrize { 0% { opacity: 0; transform: scale(.7); } 60% { transform: scale(1.06); } 100% { opacity: 1; transform: none; } }
.rl-pop { animation: rlPop .7s cubic-bezier(.2,.9,.3,1.2) both; }
.rl-title { animation: rlTitle .9s ease-out .15s both; }
.rl-hc { animation: rlHc 1.8s ease-in-out infinite; }
.rl-open { animation: rlOpen 1.6s ease-in-out infinite; }
.rl-wheel-in { animation: rlWheelIn .8s cubic-bezier(.2,.8,.3,1) both; }
.rl-prize { animation: rlPrize .6s ease-out both; }
.rl-rays {
  position: absolute; left: 50%; top: 30%; width: 560px; height: 560px; max-width: 150%;
  transform: translate(-50%, -50%); pointer-events: none; opacity: .22;
  background: repeating-conic-gradient(from 0deg, rgba(var(--amber-rgb),.9) 0 8deg, transparent 8deg 24deg);
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 68%);
  mask-image: radial-gradient(circle, #000 0%, transparent 68%);
  animation: rlRays 40s linear infinite;
}

/* Ruleta: bisel, puntero y remate ─────────────────────────── */
@keyframes rlBulb { 0%, 100% { fill: #4a2d12; } 50% { fill: #ffe29a; } }
@keyframes rlBulbFast { 0%, 100% { fill: #4a2d12; } 50% { fill: #fff3c8; } }
@keyframes rlTick { from { transform: translateX(-50%) rotate(-9deg); } to { transform: translateX(-50%) rotate(7deg); } }
@keyframes rlGlow { 0%, 100% { filter: drop-shadow(0 0 10px rgba(var(--forge-rgb),.45)); } 50% { filter: drop-shadow(0 0 26px rgba(var(--amber-rgb),.85)); } }
@keyframes rlGlowSpin { 0%, 100% { filter: drop-shadow(0 0 20px rgba(var(--amber-rgb),.7)); } 50% { filter: drop-shadow(0 0 42px rgba(255,214,110,1)); } }
@keyframes rlBounce { 0% { transform: scale(1); } 30% { transform: scale(1.07); } 60% { transform: scale(.985); } 100% { transform: scale(1); } }
@keyframes rlShock { 0% { transform: scale(.55); opacity: .9; } 100% { transform: scale(1.55); opacity: 0; } }
@keyframes rlWin { 0%, 100% { opacity: 0; } 50% { opacity: .55; } }
@keyframes rlHub { to { transform: rotate(360deg); } }
@keyframes rlCore { 0%, 100% { opacity: .75; } 50% { opacity: 1; } }
@keyframes rlRow { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: none; } }
@keyframes rlRowWin { 0%, 100% { box-shadow: inset 0 0 0 rgba(var(--amber-rgb),0); } 50% { box-shadow: inset 0 0 22px rgba(var(--amber-rgb),.45); } }
.rl-bulb { fill: #4a2d12; animation: rlBulb 1.4s ease-in-out infinite; }
.rl-svg-spin .rl-bulb { animation: rlBulbFast .35s linear infinite; }
.rl-svg { animation: rlGlow 2.4s ease-in-out infinite; }
.rl-svg-spin { animation: rlGlowSpin .7s ease-in-out infinite; }
.rl-svg-done { animation: rlGlowSpin 1.1s ease-in-out infinite; }
.rl-pointer {
  position: absolute; left: 50%; top: -6px; width: 30px; height: 40px; z-index: 3;
  transform: translateX(-50%); transform-origin: 50% 8px;
  background: linear-gradient(180deg, #fff3c8, #f0a23a 55%, #8a4a12);
  clip-path: polygon(0 0, 100% 0, 100% 35%, 50% 100%, 0 35%);
  filter: drop-shadow(0 2px 4px rgba(var(--shade-rgb),.7));
}
.rl-pointer-tick { animation: rlTick .11s ease-in-out infinite alternate; }
.rl-bounce { animation: rlBounce .8s ease-out; }
.rl-shock {
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none; z-index: 1;
  border: 3px solid var(--spark); box-shadow: 0 0 40px var(--amber), inset 0 0 30px var(--amber);
  animation: rlShock 1.3s ease-out both;
}
.rl-win { animation: rlWin 1s ease-in-out infinite; }
.rl-hub { animation: rlHub 6s linear infinite; }
.rl-core { animation: rlCore 1.4s ease-in-out infinite; }
.rl-row { animation: rlRow .5s ease-out both; }
.rl-row-win { animation: rlRowWin 1.2s ease-in-out infinite; }
.rl-prize { position: relative; overflow: hidden; }
.rl-prize::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255,230,160,.35), transparent);
  animation: paseShine 2.2s ease-in-out infinite;
}


/* Tienda: sticker de evento de MD, MD tachadas y cuenta regresiva */
.hw-sticker {
  position: absolute; top: -14px; left: -12px; z-index: 3;
  display: flex; align-items: center; gap: 5px;
  padding: 4px 10px 4px 7px; border-radius: 99px;
  background: linear-gradient(180deg, #e8352b, #a81218);
  border: 1px solid #ffb4a0; color: #fff1d6;
  font-family: var(--font-display); font-size: 9.5px; font-weight: 700; letter-spacing: 0.08em;
  box-shadow: 0 0 14px rgba(255,60,40,0.55), 0 4px 10px rgba(var(--shade-rgb),0.6);
  transform: rotate(-7deg); animation: hwSticker 3.4s ease-in-out infinite;
  pointer-events: none; white-space: nowrap;
}
.hw-sticker svg { width: 12px; height: 16px; flex: none; }
.hw-sticker b { color: #ffe27a; font-size: 12px; }
@keyframes hwSticker { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(-3deg) scale(1.05); } }
.hw-hc-old { font-family: var(--font-display); font-size: 14px; color: var(--stone-300);
  text-decoration: line-through; text-decoration-color: #ff5a22; text-decoration-thickness: 2px; line-height: 1.1; }
.hw-hc-old-inline { font-size: 11px; color: var(--stone-300); text-decoration: line-through; text-decoration-color: #ff5a22; text-decoration-thickness: 2px; }
.hw-hc-new { font-family: var(--font-display); font-weight: 800; font-size: 26px; line-height: 1; letter-spacing: 0.02em;
  color: #ff4a3d; text-shadow: 0 0 10px rgba(255,60,40,0.6); }
.hw-countdown {
  padding: 8px 10px; border-radius: 3px; text-align: center;
  background: linear-gradient(180deg, rgba(120,20,10,0.55), rgba(40,8,30,0.6));
  border: 1px solid #c2361a; animation: hwCountPulse 2.2s ease-in-out infinite;
}
.hw-countdown-text { font-family: var(--font-display); font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; color: #ffd9c2; line-height: 1.35; }
.hw-countdown-text b { color: #ff7a3a; }
.hw-countdown-clock { margin-top: 4px; font-family: var(--font-mono); font-size: 18px; font-weight: 700; color: #ff5a22;
  text-shadow: 0 0 10px rgba(255,90,34,0.6); letter-spacing: 0.08em; }
@keyframes hwCountPulse { 0%, 100% { box-shadow: 0 0 0 rgba(255,60,20,0); } 50% { box-shadow: 0 0 18px rgba(255,60,20,0.45); } }
@media (prefers-reduced-motion: reduce) { .hw-sticker, .hw-countdown { animation: none; } }
@media (max-width: 760px) { .hw-sticker { left: -4px; } }

/* Aviso "hay una versión nueva" (update-notice.jsx) */
.update-notice {
  position: fixed; left: 50%; top: 84px; transform: translateX(-50%); z-index: 900;
  display: flex; align-items: center; gap: 12px; width: max-content; max-width: calc(100vw - 32px); box-sizing: border-box;
  padding: 10px 10px 10px 16px; border-radius: 4px;
  background: linear-gradient(180deg, var(--ash-750), var(--ash-850));
  border: 1px solid var(--race-accent, #d8761f); color: var(--bone-50);
  box-shadow: 0 10px 30px rgba(var(--shade-rgb),0.7), 0 0 18px rgba(var(--amber-rgb),0.25);
  font-family: var(--font-body); font-size: 13px; animation: slideUp .25s ease;
}
.update-notice-btn {
  padding: 8px 14px; border-radius: 3px; white-space: nowrap;
  background: linear-gradient(180deg, var(--forge), var(--ember)); color: var(--parchment);
  font-family: var(--font-display); font-weight: 700; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
}
.update-notice-x { padding: 6px 8px; color: var(--stone-200); font-size: 12px; }
.update-notice > span { flex: 1; min-width: 0; }
@media (max-width: 760px) { .update-notice { top: 76px; width: calc(100vw - 32px); } }

/* Nombre personalizado de las cartas exclusivas */
.tdo-rename-hint { font-size: 11px; line-height: 1.3; color: var(--gold-soft); text-align: center; }
.tdo-rename { flex-basis: 100%; padding-top: 10px; border-top: 1px solid rgba(var(--gold-rgb), 0.3); display: grid; gap: 8px; }
.tdo-rename-check { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; cursor: pointer; color: var(--parchment); font-size: 13px; }
.tdo-rename-check input { width: 16px; height: 16px; accent-color: var(--gold); }
.tdo-rename-check b { color: var(--gold-soft); font-family: var(--font-display); }
.tdo-rename-input {
  width: 100%; max-width: 340px; box-sizing: border-box; padding: 10px 12px; border-radius: 3px; font-size: 15px;
  background: rgba(var(--bg-rgb), 0.7); border: 1px solid var(--gold); color: var(--bone-50);
}
.tdo-rename-err { color: var(--err-text); font-size: 12px; }
.tdo-rename-note { margin: 0; font-size: 12px; line-height: 1.5; color: var(--stone-200); max-width: 640px; }
.order-rename {
  margin-bottom: 20px; padding: 14px 16px; border-radius: 4px; text-align: left;
  border: 1px solid var(--gold); background: rgba(var(--bg-rgb), 0.55); color: var(--bone-100); font-size: 13px; line-height: 1.5;
}
.order-rename p { margin: 0 0 8px; }
.order-rename p:last-child { margin-bottom: 0; }
.order-rename-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.order-rename-form .tdo-rename-input { flex: 1; min-width: 180px; }
@media (max-width: 360px) {
  .tdo-cards.has-perks .tdo-card { height: 455px; }
}

/* Tienda de únicos */
.donor-rank-btn { white-space: nowrap; flex: 0 0 auto; }
.uq-intro { margin: 0; color: var(--parchment); font-size: clamp(14px, 2vw, 17px); line-height: 1.6; max-width: 760px; margin-inline: auto; }
.uq-intro b { color: var(--gold-soft); }
.uq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.uq-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px 16px; border-radius: 6px; text-align: center; }
.uq-card.is-on { outline: 2px solid var(--gold); }
.uq-pay { position: relative; margin-top: 24px; padding: 20px; border-radius: 4px; text-align: center; }
.uq-pay-title { color: var(--parchment); font-family: var(--font-display); font-size: 15px; margin-bottom: 14px; }
.uq-pay-title b { color: var(--gold-soft); }
.uq-gws { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.uq-gw {
  display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px; border-radius: 3px; cursor: pointer;
  background: rgba(var(--bg-rgb), 0.7); border: 1px solid #5a4630; color: var(--bone-50); font-family: var(--font-display); font-weight: 700; font-size: 13px;
}
.uq-gw:hover:not(:disabled) { border-color: var(--gold); }
.uq-gw:disabled { opacity: 0.5; cursor: wait; }
.uq-pay-note { margin: 12px 0 0; font-size: 12px; color: var(--stone-200); }
.uq-err { margin-top: 12px; padding: 8px 10px; border: 1px solid var(--hot); background: rgba(var(--hot-rgb), 0.12); color: var(--err-text); font-size: 12px; border-radius: 3px; }
.uq-rename { text-align: left; margin-bottom: 14px; padding: 0 0 14px; border-top: 0; border-bottom: 1px solid rgba(var(--gold-rgb), 0.3); }
.uq-render { width: 100%; height: 260px; padding: 6px; border: 0; border-radius: 4px; cursor: zoom-in; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 40%, rgba(var(--gold-rgb), 0.14), transparent 70%); }
.uq-render img { max-width: 100%; max-height: 100%; width: auto; height: auto; display: block; }
.uq-title { display: flex; align-items: center; justify-content: center; gap: 10px; }
.uq-icon { width: auto; height: 40px; image-rendering: pixelated; flex: 0 0 auto; padding: 3px; border-radius: 3px; background: rgba(243, 213, 138, 0.22); border: 1px solid #5a4630; box-sizing: content-box; }
.uq-title .tdo-name { text-align: left; }

/* Evento "primer mes online": globos de fondo y cartel de la tienda */
.fm-sky { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.fm-sky-b { position: absolute; bottom: -180px; height: auto; opacity: 0.9;
  filter: drop-shadow(0 6px 10px rgba(var(--shade-rgb),0.45)); animation: fmRise linear infinite; will-change: transform; }
@keyframes fmRise {
  0%   { transform: translate3d(0, 0, 0) rotate(-4deg); }
  25%  { transform: translate3d(16px, -32vh, 0) rotate(4deg); }
  50%  { transform: translate3d(-12px, -64vh, 0) rotate(-3deg); }
  75%  { transform: translate3d(14px, -96vh, 0) rotate(4deg); }
  100% { transform: translate3d(0, calc(-100vh - 240px), 0) rotate(-4deg); }
}
.fm-banner {
  position: relative; overflow: hidden; margin: 0 auto 24px; max-width: 1120px;
  padding: 40px 150px 22px; border-radius: 4px; text-align: center;
  border: 2px solid #e8352b;
  background: radial-gradient(ellipse at 50% 40%, rgba(150,20,20,0.5), rgba(14,8,6,0.94) 75%);
  box-shadow: 0 0 28px rgba(232,53,43,0.45);
}
.fm-bunting { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: center; gap: 4px; height: 18px; overflow: hidden; }
.fm-bunting span { flex: 0 0 24px; height: 18px; clip-path: polygon(0 0, 100% 0, 50% 100%); }
.fm-kicker { font-family: var(--font-display); font-weight: 800; font-size: clamp(13px, 2vw, 18px); letter-spacing: 0.14em; color: var(--gold-soft); }
.fm-title { margin: 10px 0 8px; font-family: var(--font-display); font-weight: 900; line-height: 1.12; letter-spacing: 0.02em;
  color: #ff3b30; font-size: clamp(22px, 2.5vw, 36px); text-shadow: 0 2px 0 #4a0806, 0 0 18px rgba(255,50,40,0.75);
  animation: fmPulse 1.8s ease-in-out infinite; }
.fm-title span { display: block; }
.fm-title-2 { margin-top: 4px; }
@keyframes fmPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.025); text-shadow: 0 2px 0 #4a0806, 0 0 30px rgba(255,50,40,1); } }
.fm-note { font-size: 12.5px; color: var(--stone-100, #e6dcc8); line-height: 1.45; }
.fm-cluster { position: absolute; top: 26px; width: 128px; height: 130px; pointer-events: none; }
.fm-cluster svg { position: absolute; width: 50px; height: auto; animation: fmBob 3.6s ease-in-out infinite; }
.fm-cluster svg:nth-child(1) { left: 0; top: 14px; }
.fm-cluster svg:nth-child(2) { left: 38px; top: 0; animation-delay: -1.2s; }
.fm-cluster svg:nth-child(3) { left: 76px; top: 18px; animation-delay: -2.4s; }
.fm-cluster-l { left: 10px; }
.fm-cluster-r { right: 10px; }
@keyframes fmBob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-8px) rotate(3deg); } }
.tdo-double { margin: 2px 0 6px; font-family: var(--font-display); font-weight: 800; font-size: 12px; letter-spacing: 0.04em; line-height: 1.25; color: #ff4a3d; }
@media (max-width: 860px) {
  .fm-banner { padding: 34px 14px 18px; }
  .fm-title { font-size: clamp(22px, 6.2vw, 34px); }
  .fm-cluster { display: none; }
  .fm-sky-b:nth-child(n+9) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .fm-sky-b { animation: none; bottom: 12vh; }
  .fm-title, .fm-cluster svg { animation: none; }
}

/* Ranking de actividad: histórico de ganadores */
.act-hist-open { display: flex; justify-content: center; margin-top: 14px; }
.act-hist-btn { cursor: pointer; font-size: 12px; letter-spacing: 0.14em; color: var(--gold); }
.act-hist-btn:hover { color: var(--gold-soft); border-color: var(--gold); }
.act-hist { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(var(--bg-rgb),0.86); backdrop-filter: blur(4px); }
.act-hist-box { position: relative; width: 100%; max-width: 680px; max-height: calc(100vh - 32px); overflow-y: auto; padding: 26px 24px 20px;
  border: 1px solid #6a4a2a; border-radius: 8px; background: #17100a; color: var(--parchment); }
.act-hist-close { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  border: 1px solid #6a4a2a; background: transparent; color: var(--stone-200); }
.act-hist-title { margin: 0 36px 4px; text-align: center; font-family: var(--font-display); font-weight: 800; letter-spacing: 0.12em; font-size: 20px; color: var(--gold); }
.act-hist-sub { margin: 0 0 16px; text-align: center; font-size: 13px; color: var(--stone-200); }
.act-hist-empty { margin: 18px 0 8px; padding: 18px; text-align: center; font-size: 14px; line-height: 1.5; color: var(--stone-100, #e6dcc8); border: 1px dashed #4a3420; border-radius: 4px; }
.act-hist-week { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 14px; font-size: 13px; color: var(--stone-200); }
.act-hist-week select { padding: 8px 10px; border-radius: 4px; border: 1px solid #6a4a2a; background: #0e0906; color: var(--parchment); font-size: 14px; }
.act-hist-head, .act-hist-row summary, .act-hist-rest li { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 76px 72px; gap: 10px; align-items: center; }
.act-hist-head { padding: 0 6px 6px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--stone-300); border-bottom: 1px solid #4a3420; }
.act-hist-head span:nth-child(n+3) { text-align: right; }
.act-hist-row { border-bottom: 1px solid #33241a; }
.act-hist-row summary { padding: 11px 6px; cursor: pointer; list-style: none; }
.act-hist-row summary::-webkit-details-marker { display: none; }
.act-hist-row summary:hover { background: rgba(var(--gold-rgb),0.07); }
.act-hist-cat { font-size: 13px; color: var(--stone-100, #e6dcc8); }
.act-hist-cat .act-gem { margin-right: 7px; }
.act-hist-winner { font-family: var(--font-display); font-weight: 700; font-size: 14px; color: var(--gold-soft); overflow-wrap: anywhere; }
.act-hist-value { font-family: var(--font-mono); font-weight: 700; font-size: 14px; color: var(--parchment); text-align: right; }
.act-hist-hc { font-family: var(--font-mono); font-weight: 700; font-size: 13px; color: var(--gold-soft); text-align: right; white-space: nowrap; }
.act-hist-rest { margin: 0 0 10px; padding: 0; list-style: none; font-size: 13px; color: var(--stone-200); }
.act-hist-rest li { padding: 3px 6px; }
.act-hist-rest span { grid-column: 2; overflow-wrap: anywhere; }
.act-hist-rest b { grid-column: 3; font-family: var(--font-mono); font-weight: 600; text-align: right; }
.act-hist-rest em { grid-column: 4; font-family: var(--font-mono); font-style: normal; text-align: right; white-space: nowrap; }
.act-hist-foot { margin: 14px 0 0; font-size: 12px; line-height: 1.5; color: var(--stone-300); text-align: center; }
@media (max-width: 560px) {
  .act-hist-box { padding: 24px 14px 16px; }
  .act-hist-head { display: none; }
  .act-hist-row summary, .act-hist-rest li { grid-template-columns: minmax(0, 1fr) auto 66px; gap: 8px; }
  .act-hist-cat { grid-column: 1 / -1; }
  .act-hist-rest span { grid-column: 1; }
  .act-hist-rest b { grid-column: 2; }
  .act-hist-rest em { grid-column: 3; }
}

/* Oferta privada (PersonalOfferModal) */
.po-box { position: relative; width: min(520px, 100%); padding: 30px 26px 22px; border-radius: 6px; box-sizing: border-box; text-align: center; }
.po-close { position: absolute; top: 8px; right: 10px; background: none; border: 0; color: var(--stone-200); font-size: 18px; cursor: pointer; padding: 6px; }
.po-close:hover { color: var(--bone-50); }
.po-kicker { font-family: var(--font-display); font-weight: 700; font-size: 12px; letter-spacing: 0.18em; color: var(--gold); }
.po-name { margin: 10px 0 6px; font-family: var(--font-display); font-weight: 900; font-size: clamp(30px, 8vw, 44px); letter-spacing: 0.06em; color: var(--bone-50); text-shadow: 0 0 18px rgba(var(--hot-rgb), 0.55); }
.po-price { margin-bottom: 20px; font-family: var(--font-display); font-weight: 900; font-size: 24px; color: var(--gold-soft); }

/* Regalo con la próxima compra (PurchaseGiftModal) */
.pg-gift { margin: 14px 0 4px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pg-icon { width: 72px; height: 72px; padding: 6px; box-sizing: border-box; background: var(--ash-900); border: 1px solid var(--line); border-radius: 4px; }
.pg-icon img { width: 100%; height: 100%; object-fit: contain; display: block; image-rendering: pixelated; }
.po-name.pg-name { margin: 6px 0 0; font-size: clamp(24px, 7vw, 36px); overflow-wrap: anywhere; }
.po-price.pg-abs { margin: 0 0 6px; font-size: 18px; }
.pg-text { margin: 14px 0 18px; color: var(--stone-200); font-size: 14px; line-height: 1.5; }
.pg-text b { color: var(--gold-soft); }
.pg-render { display: block; width: min(340px, 100%); height: auto; aspect-ratio: 1 / 1; border-radius: 4px; border: 1px solid var(--line); box-shadow: 0 0 28px rgba(var(--hot-rgb), 0.25); }
