/* =========================================================
   TOKENS — día
   ========================================================= */
:root {
  --bg: #e9edf1;
  --bg-2: #dfe5ec;
  --surface: #f7f8fa;
  --card: #fff;
  --text: #000;
  --text-soft: #3a3f4a;
  --text-mute: #6b7280;
  --line: #000;            /* contorno de cómic */
  --grid: #d5d9e0;
  --track: #e9edf1;
  --dash: #c3c8d2;

  --red: #e8352b;
  --sun: #f5b225;
  --orange: #f07a2a;
  --teal: #3fb8a6;
  --moon: #4a5a8c;
  --moon-light: #a9b3d6;
  --c-sol: #e8352b;        /* series de gráficos (validadas) */
  --c-luna: #3a4a8c;
  --name-sol: #e8352b;
  --name-luna: #4a5a8c;

  --grad-sol: linear-gradient(140deg, var(--red) 0%, var(--orange) 50%, var(--sun) 100%);
  --grad-luna: linear-gradient(140deg, #26305a 0%, var(--moon) 45%, var(--teal) 100%);

  --sea-1: #8fd3e8; --sea-2: #5fb4d6; --wave: rgba(255,255,255,.55);
  --land-1: #9ed36a; --land-2: #6dbb4f; --sand: #f3dfa2;

  --stroke: 3px solid var(--line);
  --pop: 6px 6px 0 var(--line);
  --r-panel: 34px;
  --r-card: 18px;
  --bounce: cubic-bezier(.2, 1.6, .4, 1);
  --grain-op: .16;

  --f-display: "Bagel Fat One", system-ui, sans-serif;
  --f-body: "Bricolage Grotesque", system-ui, sans-serif;
  color-scheme: light;
}

/* =========================================================
   TOKENS — noche
   ========================================================= */
:root[data-theme="dark"] {
  --bg: #0f1226;
  --bg-2: #161a36;
  --surface: #1a1e3a;
  --card: #232850;
  --text: #f3f4fa;
  --text-soft: #b8bdd6;
  --text-mute: #8a90b0;
  --line: #000;
  --grid: #363c68;
  --track: #12152c;
  --dash: #444a78;
  --c-sol: #f24a3f;
  --c-luna: #7287e8;
  --name-sol: #ff6a52;
  --name-luna: #8fa2f5;
  --moon-light: #5d6aa8;
  --sea-1: #173a63; --sea-2: #0e2647; --wave: rgba(160,200,255,.28);
  --land-1: #3f7a4a; --land-2: #2d5c3a; --sand: #8a7a52;
  --pop: 6px 6px 0 #000;
  --grain-op: .1;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; overflow-x: clip; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--f-body); font-size: 17px; line-height: 1.5; font-variant-numeric: tabular-nums;
  transition: background-color .4s, color .4s;
}
:root[data-theme="dark"] body { background: radial-gradient(1200px 700px at 50% -10%, #23295a, transparent 70%), var(--bg); background-attachment: fixed; }
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100;
  filter: url(#grain); opacity: var(--grain-op); background: #fff; mix-blend-mode: multiply;
}
:root[data-theme="dark"] body::before { mix-blend-mode: soft-light; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 8px; }
[hidden] { display: none !important; }

/* Estrellas de fondo (solo de noche) */
.stars { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .6s; }
:root[data-theme="dark"] .stars { opacity: 1; }
.stars::before, .stars::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff, transparent), radial-gradient(1px 1px at 28% 62%, #fff, transparent),
    radial-gradient(2px 2px at 44% 12%, #fff, transparent), radial-gradient(1px 1px at 63% 40%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 78% 22%, #fff, transparent), radial-gradient(1px 1px at 88% 70%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 8% 84%, #fff, transparent), radial-gradient(1px 1px at 52% 88%, #fff, transparent),
    radial-gradient(2px 2px at 94% 46%, #fff, transparent), radial-gradient(1px 1px at 36% 34%, #fff, transparent);
  animation: twinkle-bg 4s ease-in-out infinite alternate;
}
.stars::after { translate: 7% 11%; animation-delay: -2s; opacity: .7; }
@keyframes twinkle-bg { to { opacity: .25; } }

/* =========================================================
   TOPBAR
   ========================================================= */
.topbar {
  position: sticky; top: 12px; z-index: 60;
  margin: 12px auto 0; width: min(1180px, calc(100% - 32px));
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 7px 8px 7px 22px;
  background: var(--surface); border: var(--stroke); border-radius: 999px; box-shadow: 4px 4px 0 var(--line);
}
.topbar__brand { font-family: var(--f-display); font-size: 22px; text-decoration: none; color: var(--red); -webkit-text-stroke: 1px var(--line); }
.viewswitch { display: flex; padding: 4px; gap: 4px; border: 2.5px solid var(--line); border-radius: 999px; background: var(--track); }
.viewswitch a { text-decoration: none; font-weight: 800; font-size: 15px; padding: 6px 16px; border-radius: 999px; white-space: nowrap; transition: background .2s, color .2s; }
.viewswitch a[aria-current="page"] { background: var(--grad-sol); color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.5); box-shadow: 2px 2px 0 var(--line); }
.viewswitch a:not([aria-current="page"]):hover { background: var(--card); }

.themebtn {
  position: relative; width: 66px; height: 36px; flex: none; cursor: pointer; padding: 0;
  border: 2.5px solid var(--line); border-radius: 999px; background: linear-gradient(90deg, #8fd3e8, #f5d77a);
  transition: background .4s;
}
:root[data-theme="dark"] .themebtn { background: linear-gradient(90deg, #0e1530, #2b3470); }
.themebtn__knob {
  position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; border: 2px solid var(--line);
  background: var(--sun); display: grid; place-items: center; transition: translate .45s var(--bounce), background .4s, rotate .45s;
}
.themebtn__knob svg { width: 17px; height: 17px; grid-area: 1 / 1; transition: opacity .3s, scale .3s; }
.i-sun { fill: #fff; color: #fff; }
.i-moon { fill: #fff; opacity: 0; scale: .4; }
:root[data-theme="dark"] .themebtn__knob { translate: 30px 0; background: #7287e8; rotate: 360deg; }
:root[data-theme="dark"] .i-sun { opacity: 0; scale: .4; }
:root[data-theme="dark"] .i-moon { opacity: 1; scale: 1; }

/* Transición de tema (View Transitions) */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* Cambio de vista */
.view { animation: view-in .5s cubic-bezier(.2,.9,.3,1) both; overflow-x: clip; }
@keyframes view-in { from { opacity: 0; translate: 0 18px; } }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative; isolation: isolate;
  width: min(1240px, calc(100% - 32px)); margin: 18px auto 0;
  display: grid; grid-template-columns: 1fr minmax(320px, 1.1fr) 1fr; align-items: end;
  min-height: 660px;
}
.hero__aurora { position: absolute; inset: -60px -10vw 0; z-index: -2; pointer-events: none; overflow: hidden; }
.aur { position: absolute; width: 60%; aspect-ratio: 1; border-radius: 50%; filter: blur(70px); opacity: .55; animation: fade-in 1.2s ease both, drift 18s ease-in-out infinite alternate; }
.aur--sol { left: -8%; top: 4%; background: radial-gradient(circle, var(--sun), var(--orange) 40%, transparent 70%); }
.aur--luna { right: -8%; top: 0; background: radial-gradient(circle, var(--teal), var(--moon) 45%, transparent 70%); animation-delay: 0s, -9s; }
:root[data-theme="dark"] .aur { opacity: .35; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes drift { to { translate: 6% 8%; scale: 1.15; } }

.hero__center { position: relative; align-self: center; text-align: center; padding: 0 8px 60px; display: flex; flex-direction: column; align-items: center; gap: 16px; z-index: 2; }
.hero__burst {
  position: absolute; z-index: -1; left: 50%; top: 34%; width: 760px; aspect-ratio: 1; translate: -50% -50%;
  background: repeating-conic-gradient(from 0deg, rgba(255,255,255,.75) 0 6deg, transparent 6deg 18deg);
  -webkit-mask-image: radial-gradient(circle, #000 18%, transparent 62%); mask-image: radial-gradient(circle, #000 18%, transparent 62%);
  animation: fade-in 1s .2s ease both, spin 70s linear infinite;
}
:root[data-theme="dark"] .hero__burst { background: repeating-conic-gradient(from 0deg, rgba(140,160,255,.22) 0 6deg, transparent 6deg 18deg); }
@keyframes spin { to { rotate: 360deg; } }
.spark { position: absolute; width: 26px; height: 26px; fill: var(--text); animation: twinkle 2.4s ease-in-out infinite; }
:root[data-theme="dark"] .spark { fill: #fff6c2; filter: drop-shadow(0 0 6px #ffe680); }
.spark--1 { left: 6%; top: 8%; }
.spark--2 { right: 4%; top: 2%; width: 34px; height: 34px; animation-delay: -.8s; }
.spark--3 { right: 10%; top: 42%; width: 18px; height: 18px; animation-delay: -1.5s; }
.spark--4 { left: 2%; top: 38%; width: 16px; height: 16px; animation-delay: -.4s; }
@keyframes twinkle { 0%, 100% { scale: 1; rotate: 0deg; opacity: 1; } 50% { scale: .45; rotate: 45deg; opacity: .5; } }

.hero__logo { width: min(100%, 440px); filter: drop-shadow(5px 6px 0 rgba(0,0,0,.85)); animation: pop-in .8s .15s var(--bounce) both, bob 5s 1s ease-in-out infinite; }
@keyframes pop-in { from { scale: .5; rotate: -8deg; opacity: 0; } }
@keyframes bob { 50% { translate: 0 -8px; rotate: -1deg; } }
.hero__logo-fallback { font-family: var(--f-display); font-weight: 400; font-size: clamp(64px, 10vw, 120px); margin: 0; line-height: .9; color: #fff; -webkit-text-stroke: 3px var(--line); paint-order: stroke fill; text-shadow: 5px 6px 0 var(--line); }

.hero__score { display: flex; align-items: center; gap: 14px; }
.hero__score-num {
  font-family: var(--f-display); font-size: 60px; line-height: 1; width: 90px; height: 90px; display: grid; place-items: center;
  color: #fff; border: var(--stroke); border-radius: 26px; box-shadow: 4px 4px 0 var(--line); -webkit-text-stroke: 2px var(--line); paint-order: stroke fill;
  animation: flip-in .7s var(--bounce) both;
}
.hero__score-num--sol { background: var(--grad-sol); rotate: -3deg; animation-delay: .7s; }
.hero__score-num--luna { background: var(--grad-luna); rotate: 3deg; animation-delay: .8s; }
@keyframes flip-in { from { scale: 0; } }
.hero__score-vs { font-family: var(--f-display); font-size: 26px; animation: fade-in .4s .9s both; }
/* Final del locke: cartel en el centro y etiqueta bajo cada nombre */
.hero__final {
  position: relative; background: var(--surface); border: var(--stroke); border-radius: 18px; box-shadow: 4px 4px 0 var(--line);
  padding: 8px 16px 10px; rotate: -1.5deg; animation: flip-in .6s .6s var(--bounce) both;
}
.hero__final-title { margin: 0 0 4px; font-family: var(--f-display); font-size: 22px; line-height: 1.1; }
.hero__final ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: 15px; font-weight: 700; }
.hero__final-item--sol b { color: var(--name-sol); }
.hero__final-item--luna b { color: var(--name-luna); }
.hero__result {
  font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; border: 2px solid var(--line);
  border-radius: 999px; padding: 1px 10px; line-height: 1.5;
}
.hero__result--campeon { background: var(--sun); color: #000; }
.hero__result--eliminado { background: #3a3f4a; color: #fff; }
.hero__meta { margin: 0; color: var(--text-soft); font-size: 15px; max-width: 34ch; animation: fade-in .5s 1s both; }

.bigbtn {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none; cursor: pointer;
  font-family: var(--f-display); font-size: 20px; padding: 11px 24px; color: #000;
  border: var(--stroke); border-radius: 999px; background: var(--sun); box-shadow: 4px 4px 0 var(--line);
  transition: translate .15s, box-shadow .15s; animation: fade-in .5s 1.1s both;
}
.bigbtn::after { content: ""; width: 10px; height: 10px; border-top: 3px solid currentColor; border-right: 3px solid currentColor; rotate: 45deg; margin-left: 2px; }
.bigbtn:hover { translate: -1px -1px; box-shadow: 5px 5px 0 var(--line); }
.bigbtn:active { translate: 3px 3px; box-shadow: 1px 1px 0 var(--line); }

/* Laterales */
.hero__side { position: relative; height: 100%; min-height: 620px; display: flex; flex-direction: column; justify-content: flex-end; z-index: 1; }
.hero__side:hover, .hero__side:focus-within, .hero__side.is-open { z-index: 3; }
.stage { position: relative; flex: 1; display: flex; align-items: flex-end; cursor: pointer; border-radius: 40px; }
.stage:focus-visible { outline-offset: -6px; }
.hero__blob {
  position: absolute; left: 6%; right: 6%; bottom: 20px; top: 30%;
  border: var(--stroke); box-shadow: var(--pop);
  animation: blob-in .8s var(--bounce) both, morph 9s ease-in-out infinite;
  transition: scale .4s var(--bounce);
}
.hero__side--sol .hero__blob { background: var(--grad-sol); rotate: -4deg; animation-delay: .1s, 0s; }
.hero__side--luna .hero__blob { background: var(--grad-luna); rotate: 5deg; animation-delay: .2s, -4s; }
.hero__blob::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; opacity: .25;
  background-image: radial-gradient(#000 1.2px, transparent 1.6px); background-size: 12px 12px;
  -webkit-mask-image: linear-gradient(to top, #000, transparent 70%); mask-image: linear-gradient(to top, #000, transparent 70%);
}
@keyframes blob-in { from { scale: 0; } }
@keyframes morph {
  0%, 100% { border-radius: 46% 54% 40% 60% / 55% 45% 55% 45%; }
  33% { border-radius: 58% 42% 55% 45% / 45% 58% 42% 55%; }
  66% { border-radius: 40% 60% 48% 52% / 60% 40% 60% 40%; }
}
.hero__cutout {
  position: relative; z-index: 2; width: 100%; max-width: 380px; margin: 0 auto; aspect-ratio: 1; object-fit: contain; object-position: bottom;
  filter: drop-shadow(3px 0 0 #000) drop-shadow(-3px 0 0 #000) drop-shadow(0 -3px 0 #000);
  transform-origin: 50% 100%; animation: rise .8s var(--bounce) both;
  transition: scale .35s var(--bounce), rotate .35s var(--bounce);
}
.hero__side--sol .hero__cutout { animation-delay: .35s; }
.hero__side--luna .hero__cutout { animation-delay: .5s; }
@keyframes rise { from { translate: 0 60px; opacity: 0; } }
.stage:hover .hero__cutout, .hero__side.is-open .hero__cutout, .stage:focus-visible .hero__cutout { scale: 1.08; rotate: -2deg; }
.hero__side--luna .stage:hover .hero__cutout, .hero__side--luna.is-open .hero__cutout, .hero__side--luna .stage:focus-visible .hero__cutout { rotate: 2deg; }
.stage:hover .hero__blob, .hero__side.is-open .hero__blob { scale: 1.04; }

.fan { --r: clamp(96px, 15vw, 185px); --s: clamp(48px, 5.4vw, 74px); position: absolute; left: 50%; top: 52%; margin: 0; padding: 0; list-style: none; z-index: 4; pointer-events: none; }
.fan li {
  position: absolute; left: 0; top: 0; width: var(--s); height: var(--s); margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);
  border-radius: 50%; border: 3px solid #000; box-shadow: 3px 3px 0 #000;
  background: linear-gradient(160deg, var(--t1), var(--t2, var(--t1)));
  transform: rotate(var(--a)) translateY(0) rotate(calc(var(--a) * -1)) scale(0);
  transition: transform .45s var(--bounce);
}
.fan img { width: 118%; max-width: none; margin: -12% 0 0 -9%; filter: drop-shadow(2px 2px 0 rgba(0,0,0,.6)); }
.fan__lvl { position: absolute; bottom: -8px; left: 50%; translate: -50% 0; font-size: 11px; font-weight: 800; background: #fff; color: #000; border: 2px solid #000; border-radius: 999px; padding: 0 6px; white-space: nowrap; }
.stage:hover .fan li, .hero__side.is-open .fan li, .stage:focus-visible .fan li {
  transform: rotate(var(--a)) translateY(calc(var(--r) * -1)) rotate(calc(var(--a) * -1)) scale(1);
  transition-delay: calc(var(--i) * 45ms);
}

.hero__tag {
  position: relative; z-index: 5; margin: -34px auto 0; display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: var(--surface); border: var(--stroke); border-radius: 22px; box-shadow: 4px 4px 0 var(--line); padding: 10px 16px 12px;
  animation: rise .6s .9s var(--bounce) both;
}
.hero__name { font-family: var(--f-display); font-size: 28px; line-height: 1; }
.hero__side--sol .hero__name { color: var(--name-sol); }
.hero__side--luna .hero__name { color: var(--name-luna); }
/* Vidas: tarjeta de corazones junto a cada jugador */
.lifebar {
  --heart-size: 17px;
  --heart-gap: 3px;
  position: relative; z-index: 6; flex: none; display: flex; flex-direction: column; align-items: center;
  margin: clamp(8px, calc((100vw - 900px) * .18), 96px) clamp(8px, calc((100vw - 900px) * .12), 60px) 10px;
  padding: 8px 10px; border: var(--stroke); border-radius: 16px;
  background: var(--surface); box-shadow: 4px 4px 0 var(--line);
  animation: fade-in .45s .85s backwards;
}
.lifebar--sol { --life-color: var(--orange); align-self: flex-start; }
.lifebar--luna { --life-color: var(--name-luna); align-self: flex-end; }
.lifebar__hearts {
  display: grid; grid-template-columns: repeat(5, var(--heart-size)); gap: var(--heart-gap);
  margin-top: 5px; padding-top: 5px; border-top: 2px solid var(--grid);
}
.lh {
  --heart-delay: calc(1s + min(var(--i), 25) * 22ms);
  width: var(--heart-size); height: calc(var(--heart-size) * 11 / 12);
  fill: var(--life-color); stroke: var(--line); stroke-width: 2.2px; overflow: visible;
  animation: heart-in .35s var(--heart-delay) var(--bounce) both;
}
.lh--lost { fill: var(--card); stroke-width: 1.8px; opacity: .6; }
.lh--last { animation: heart-in .35s var(--heart-delay) var(--bounce) both, beat 1.4s 2s ease-in-out infinite; }
.lifebar--strip .lifebar__hearts {
  inline-size: calc(5 * var(--heart-size) + 4 * var(--heart-gap));
  grid-template-columns: none; grid-template-rows: repeat(4, 5px); grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr); gap: 2px 0;
}
.lifebar--strip .lh {
  --segment-live: var(--life-color);
  --segment-fill: var(--segment-live);
  width: 100%; height: 100%; background: var(--segment-fill);
  box-shadow: inset -1px 0 var(--surface);
}
.lifebar--strip .lh--lost { --segment-fill: var(--text-mute); }
.lifebar--strip .lh use { display: none; }
@keyframes heart-in { from { scale: 0; rotate: -25deg; } }
@keyframes beat { 0%, 40%, 100% { scale: 1; } 15% { scale: 1.22; } 28% { scale: .96; } }
.lifebar__n { font-family: var(--f-display); line-height: 1; white-space: nowrap; }
.lifebar__n b { font-weight: 400; font-size: 30px; color: var(--life-color); -webkit-text-stroke: 1.25px var(--line); paint-order: stroke fill; }
.lifebar__n span { font-size: 17px; color: var(--text-soft); }
.lifebar__l { font-size: 12px; font-weight: 800; line-height: 1.15; color: var(--text-soft); }
.lifebar--crit {
  box-shadow: 4px 4px 0 var(--line), 0 0 0 3px var(--red);
  animation: fade-in .45s .85s backwards, crit 1.4s 2s ease-in-out infinite;
}
@keyframes crit { 50% { box-shadow: 4px 4px 0 var(--line), 0 0 0 6px rgba(232,53,43,.35), 0 0 24px rgba(232,53,43,.6); } }

.hearts { display: flex; align-items: center; gap: 3px; }
.hearts svg { width: 20px; height: 18px; fill: var(--red); stroke: #000; stroke-width: 2.2px; }
.hearts svg.lost { fill: var(--card); opacity: .5; }
.hearts__n { font-weight: 800; font-size: 13px; margin-left: 6px; }

.balls { display: flex; gap: 6px; margin-top: 2px; }
.ball {
  position: relative; width: 28px; height: 28px; padding: 0; border-radius: 50%; border: 2.5px solid #000; cursor: pointer;
  background: linear-gradient(#fff 0 46%, #000 46% 54%, #fff 54%);
}
.ball::before {
  content: ""; position: absolute; inset: -2.5px -2.5px 50% -2.5px; border: 2.5px solid #000; border-bottom-width: 3px;
  border-radius: 999px 999px 0 0; background: var(--red); transform-origin: 0 100%; transition: rotate .3s var(--bounce);
}
.ball::after { content: ""; position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; translate: -50% -50%; border-radius: 50%; background: #fff; border: 2.5px solid #000; }
.ball:hover, .ball:focus-visible, .ball[aria-expanded="true"] { animation: wobble .5s ease; }
.ball:hover::before, .ball:focus-visible::before, .ball[aria-expanded="true"]::before { rotate: -35deg; }
@keyframes wobble { 25% { rotate: -14deg; } 50% { rotate: 10deg; } 75% { rotate: -5deg; } }

.ballpop {
  position: absolute; bottom: calc(100% + 12px); left: 50%; width: 230px; translate: -50% 10px; opacity: 0; pointer-events: none;
  background: var(--card); border: var(--stroke); border-radius: 20px; box-shadow: 4px 4px 0 var(--line); padding: 10px 12px 12px; text-align: left;
  transition: opacity .2s, translate .3s var(--bounce);
}
.ballpop.is-on { opacity: 1; translate: -50% 0; }
.ballpop::after { content: ""; position: absolute; top: 100%; left: 50%; width: 16px; height: 16px; translate: -50% -9px; rotate: 45deg; background: var(--card); border-right: var(--stroke); border-bottom: var(--stroke); }
.ballpop__art { height: 96px; display: grid; place-items: center; border-radius: 12px; border: 2px solid #000; margin-bottom: 8px; background: linear-gradient(160deg, var(--t1), var(--t2, var(--t1))); }
.ballpop__art img { max-height: 80px; width: auto; image-rendering: pixelated; filter: drop-shadow(2px 2px 0 rgba(0,0,0,.5)); }
.ballpop__top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ballpop__mote { font-family: var(--f-display); font-size: 20px; line-height: 1.1; }
.ballpop__lvl { font-weight: 800; font-size: 13px; }
.ballpop__name { font-size: 13px; color: var(--text-soft); margin-bottom: 6px; }

/* Ticker */
.ticker { position: relative; border-block: 3px solid #000; background: #000; color: #fff; overflow: hidden; rotate: -1.2deg; width: 104%; margin: 6px 0 0 -2%; }
.ticker__track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__item { display: inline-flex; align-items: center; gap: 10px; padding: 10px 26px; white-space: nowrap; font-weight: 700; }
.ticker__item svg { width: 14px; height: 14px; fill: var(--sun); }
.ticker__dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; }
.ticker__dot--sol { background: var(--grad-sol); }
.ticker__dot--luna { background: var(--grad-luna); }
@keyframes marquee { to { translate: -50% 0; } }

/* =========================================================
   PANELES
   ========================================================= */
.panel {
  position: relative; isolation: isolate;
  width: min(1180px, calc(100% - 32px)); margin: 48px auto 0; padding: clamp(22px, 4vw, 44px);
  background:
    radial-gradient(90% 70% at 0% 0%, color-mix(in srgb, var(--sun) 11%, transparent), transparent 60%),
    radial-gradient(80% 70% at 100% 100%, color-mix(in srgb, var(--moon-light, var(--moon)) 12%, transparent), transparent 60%),
    var(--surface);
  border: var(--stroke); border-radius: var(--r-panel); box-shadow: var(--pop);
  transition: background-color .4s;
}
/* Brillo que cruza el panel al entrar */
.panel::after, .cta::after {
  content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.5) 48%, rgba(255,255,255,.12) 52%, transparent 62%) no-repeat;
  background-size: 260% 100%; background-position: 160% 0; mix-blend-mode: soft-light;
}
.panel.is-in::after, .cta.is-in::after { animation: sheen 1.5s .35s ease-out; }
@keyframes sheen { from { background-position: 160% 0; } to { background-position: -60% 0; } }
.cta { position: relative; }

/* Entrada de secciones (solo con JS y sin movimiento reducido) */
@media (prefers-reduced-motion: no-preference) {
  .js .panel, .js .cta { transition: opacity .6s ease-out, translate .7s var(--bounce), scale .7s var(--bounce), background-color .4s; }
  .js .panel:not(.is-in), .js .cta:not(.is-in) { opacity: 0; translate: 0 46px; scale: .96; }
  .js .panel:not(.is-in) .panel__title { rotate: -4deg; scale: .7; }
  .js .panel__title { transition: rotate .6s .15s var(--bounce), scale .6s .15s var(--bounce); transform-origin: left center; display: inline-block; }
  .js .panel__row .panel__title { display: block; }
  .js .panel:not(.is-in) .team__grid .mon, .js .panel:not(.is-in) .wico, .js .panel:not(.is-in) .wcard { opacity: 0; }
  .js .panel.is-in .team__grid .mon { animation: mon-in .6s var(--bounce) backwards; animation-delay: calc(.25s + var(--i) * 70ms); }
  .js .panel.is-in .wcard { animation: mon-in .6s .2s var(--bounce) backwards; }
  .js .panel.is-in .wcard--luna { animation-delay: .32s; }
  .js .panel.is-in .wico { animation: wico-in .5s var(--bounce) backwards; animation-delay: calc(.55s + var(--i) * 80ms); }
  @keyframes mon-in { from { opacity: 0; translate: 0 30px; rotate: -3deg; } }
  @keyframes wico-in { from { opacity: 0; scale: .3; } }
}
.panel__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 10px; }
.panel__row .panel__title { margin: 0; }
.panel__title {
  font-family: var(--f-display); font-weight: 400; font-size: clamp(34px, 5vw, 52px); line-height: 1; margin: 0 0 14px;
  color: #fff; -webkit-text-stroke: 2.5px #000; paint-order: stroke fill; text-shadow: 3px 4px 0 #000;
}
.panel__title--s { font-size: clamp(28px, 3.6vw, 38px); }
.panel__lede { margin: 0 0 22px; color: var(--text-soft); max-width: 62ch; }
.panel__sub { font-family: var(--f-display); font-weight: 400; font-size: 24px; margin: 0 0 14px; }

.duo { width: min(1180px, calc(100% - 32px)); margin: 48px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.duo .panel { width: auto; margin: 0; min-width: 0; }

/* Segmentados */
.seg { display: inline-flex; border: 2.5px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; background: var(--track); }
.seg button { border: 0; background: none; padding: 5px 14px; border-radius: 999px; font-weight: 800; font-size: 14px; cursor: pointer; transition: background .2s, color .2s; white-space: nowrap; }
.seg button[aria-selected="true"], .seg button[aria-checked="true"] { background: var(--text); color: var(--bg); }
.seg--big button { font-size: 15px; padding: 7px 16px; display: inline-flex; align-items: center; gap: 7px; }
.seg--big button .sd { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #000; }
.seg--big button[data-f="sol"][aria-checked="true"] { background: var(--grad-sol); color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.5); }
.seg--big button[data-f="luna"][aria-checked="true"] { background: var(--grad-luna); color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.5); }
.seg--big button[data-f="ambos"][aria-checked="true"] { background: linear-gradient(90deg, var(--red), var(--sun) 48%, var(--moon) 52%, var(--teal)); color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,.7); }

/* CTA final de la vista general */
.cta {
  width: min(1180px, calc(100% - 32px)); margin: 48px auto 0; padding: 34px clamp(22px, 4vw, 44px);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
  border: var(--stroke); border-radius: var(--r-panel); box-shadow: var(--pop);
  background: linear-gradient(120deg, var(--red), var(--orange) 30%, var(--moon) 70%, var(--teal));
}
.cta__text { margin: 0; color: #fff; font-weight: 700; font-size: 18px; max-width: 46ch; text-shadow: 0 1px 0 rgba(0,0,0,.5); }
.cta .bigbtn { animation: none; }

/* Cabecera de la comparativa */
.comphead { position: sticky; top: 82px; z-index: 50; width: min(1180px, calc(100% - 32px)); margin: 22px auto 0; }
.comphead__inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px 12px 24px; border: var(--stroke); border-radius: 26px; box-shadow: 4px 4px 0 var(--line);
  background: var(--surface);
}
.comphead__title { margin: 0; font-family: var(--f-display); font-weight: 400; font-size: 30px; line-height: 1; }

/* =========================================================
   VERSUS / TILES
   ========================================================= */
.versus { display: grid; gap: 14px; }
.vrow { display: grid; grid-template-columns: 56px 1fr 150px 1fr 56px; align-items: center; gap: 12px; }
.vrow__val { font-family: var(--f-display); font-size: 28px; line-height: 1; }
.vrow__val--sol { text-align: right; color: var(--name-sol); }
.vrow__val--luna { color: var(--name-luna); }
.vrow__label { text-align: center; font-weight: 700; font-size: 15px; line-height: 1.2; }
.vrow__track { height: 26px; border: var(--stroke); border-radius: 999px; background: var(--track); overflow: hidden; display: flex; }
.vrow__track--sol { justify-content: flex-end; }
.vrow__bar { height: 100%; width: 0; transition: width .9s cubic-bezier(.2,.9,.3,1); }
.vrow__track--sol .vrow__bar { background: var(--grad-sol); border-left: var(--stroke); }
.vrow__track--luna .vrow__bar { background: var(--grad-luna); border-right: var(--stroke); }
.vrow--lead-sol .vrow__val--sol::after, .vrow--lead-luna .vrow__val--luna::after { content: "★"; font-size: 16px; vertical-align: super; margin-inline: 3px; color: var(--sun); -webkit-text-stroke: 1px #000; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.tile { position: relative; border: var(--stroke); border-radius: 20px; padding: 14px 16px; background: var(--card); overflow: hidden; animation: pop-tile .45s var(--bounce) both; animation-delay: calc(var(--i) * 40ms); }
@keyframes pop-tile { from { scale: .85; opacity: 0; } }
.tile::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 8px; background: var(--g); border-right: 2px solid #000; }
.tile--sol { --g: var(--grad-sol); }
.tile--luna { --g: var(--grad-luna); }
.tile__n { font-family: var(--f-display); font-size: 40px; line-height: 1; }
.tile__l { font-weight: 700; font-size: 14px; margin-top: 4px; }
.tile__vs { font-size: 13px; color: var(--text-mute); margin-top: 2px; }
.tile__vs b { color: var(--text-soft); }
.tile__badge { position: absolute; top: 10px; right: 12px; font-size: 12px; font-weight: 800; padding: 1px 8px; border-radius: 999px; border: 2px solid #000; background: var(--sun); color: #000; }

/* =========================================================
   TIPOS
   ========================================================= */
.ticon { width: 16px; height: 16px; border-radius: 4px; flex: none; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 800; padding: 1px 8px 1px 2px; border-radius: 999px; border: 2px solid #000; background: var(--c); color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.6); }
.chip .ticon { width: 14px; height: 14px; border-radius: 50%; }
.tbadge { width: var(--z, 40px); height: var(--z, 40px); border-radius: 10px; border: 2.5px solid #000; background: var(--c); display: grid; place-items: center; overflow: hidden; flex: none; }
.tbadge img { width: 100%; height: 100%; }
.tbadge span { color: #fff; font-weight: 800; font-size: 12px; }

/* =========================================================
   EQUIPOS
   ========================================================= */
.teams, .bags { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.bags--one, .teams--one { grid-template-columns: 1fr; }
.team__owner { font-family: var(--f-display); font-weight: 400; font-size: 26px; margin: 0 0 14px; display: inline-block; padding: 4px 16px; border: var(--stroke); border-radius: 999px; color: #fff; -webkit-text-stroke: 1.5px #000; paint-order: stroke fill; }
.team--sol .team__owner, .bag--sol .team__owner { background: var(--grad-sol); }
.team--luna .team__owner, .bag--luna .team__owner { background: var(--grad-luna); }
.team__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.mon {
  position: relative; cursor: pointer; perspective: 1100px; border-radius: var(--r-card);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: translate .25s var(--bounce), transform .2s ease-out;
}
.mon:hover { translate: 0 -5px; }
.mon::after {
  content: ""; position: absolute; inset: 0; z-index: 3; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .25s;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 30%), rgba(255,255,255,.55), rgba(255,255,255,0) 55%); mix-blend-mode: soft-light;
}
.mon:hover::after { opacity: 1; }
.mon__flip { display: grid; height: 100%; transform-style: preserve-3d; transition: rotate .7s var(--bounce); }
.mon.is-flipped .mon__flip { rotate: y 180deg; }
.mon__face {
  grid-area: 1 / 1; position: relative; min-width: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border: var(--stroke); border-radius: var(--r-card); background: var(--card); padding: 10px 10px 12px; overflow: hidden;
  transition: box-shadow .25s;
}
.mon:hover .mon__face { box-shadow: 5px 7px 0 var(--line); }
.mon__back { rotate: y 180deg; display: flex; flex-direction: column; gap: 10px; padding: 12px; background: linear-gradient(160deg, var(--t1) 0%, var(--t2, var(--t1)) 100%); }
.mon__back::before { content: ""; position: absolute; inset: 0; background: var(--card); opacity: .82; z-index: -1; }
.mon__back { isolation: isolate; }
.mon__bh { display: flex; align-items: center; gap: 8px; }
.mon__bh img { width: 54px; height: 54px; flex: none; object-fit: contain; border: 2.5px solid #000; border-radius: 14px; background: linear-gradient(160deg, var(--t1), var(--t2, var(--t1))); filter: drop-shadow(2px 2px 0 rgba(0,0,0,.25)); }
.mon__bh .mon__mote { text-align: left; }
.mon__bh > div { min-width: 0; }
.mon__bsub { display: block; font-size: 10.5px; font-weight: 800; color: var(--text-soft); text-transform: uppercase; letter-spacing: .02em; }
.bstats { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bstats li { display: grid; grid-template-columns: 30px 1fr 30px; align-items: center; gap: 6px; font-size: 12px; }
.bstats__l { font-weight: 800; color: var(--text-soft); }
.bstats li b { text-align: right; font-weight: 800; font-size: 13px; }
.bstats__bar { height: 11px; border: 2px solid #000; border-radius: 999px; background: var(--track); overflow: hidden; }
.bstats__bar i { display: block; height: 100%; width: 0; background: var(--c); border-right: 2px solid #000; transition: width .8s cubic-bezier(.2,.9,.3,1) var(--d); }
.mon.is-flipped.has-stats .bstats__bar i { width: var(--w); }
.bstats__total { border-top: 2px dashed var(--dash); padding-top: 6px; grid-template-columns: 1fr auto !important; }
.bstats__total b { font-family: var(--f-display); font-weight: 400; font-size: 20px !important; }
.bstats__wait { display: block !important; color: var(--text-mute); font-size: 13px !important; text-align: center; padding: 20px 0; }
.mon__turn {
  position: absolute; z-index: 2; top: 8px; right: 8px; width: 30px; height: 30px; display: grid; place-items: center; cursor: pointer;
  border: 2px solid #000; border-radius: 50%; background: #fff; color: #000; padding: 0;
  transition: rotate .4s var(--bounce), scale .2s var(--bounce);
}
.mon__turn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.mon:hover .mon__front .mon__turn { rotate: 180deg; scale: 1.1; }
.mon__turn--back { position: static; margin-top: auto; width: auto; height: auto; border-radius: 999px; padding: 5px 14px; font: 800 13px var(--f-body); background: var(--text); color: var(--bg); border-color: var(--line); align-self: center; }
.mon__turn:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.mon__lvl { position: absolute; z-index: 1; top: 8px; left: 8px; font-weight: 800; font-size: 12px; background: #fff; color: #000; border: 2px solid #000; border-radius: 999px; padding: 0 7px; }
.mon__art { margin: -10px -10px 8px; padding: 22px 18px 4px; border-bottom: var(--stroke); background: linear-gradient(160deg, var(--t1) 0%, var(--t2, var(--t1)) 100%); overflow: hidden; }
.mon__img { width: 100%; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(2px 2px 0 #000); transition: scale .35s var(--bounce), rotate .35s var(--bounce); }
.mon:hover .mon__img { scale: 1.14; rotate: -4deg; }
.mon__mote { font-family: var(--f-display); font-size: 19px; line-height: 1.1; display: block; text-align: center; }
.mon__name { font-size: 13px; color: var(--text-soft); display: block; margin-bottom: 6px; text-align: center; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.mon__ab { margin: 8px 0 6px; font-size: 13px; text-align: center; }
.mon__ab b { font-weight: 800; }
.moves { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.move { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; line-height: 1.2; padding: 3px 8px 3px 3px; border-radius: 8px; border: 2px solid #000; background: color-mix(in srgb, var(--c) 22%, var(--card)); }
.move .ticon { width: 18px; height: 18px; border-radius: 5px; }
.move--estado { background: var(--card); border-style: dashed; font-weight: 600; }
.move__fb { width: 18px; height: 18px; border-radius: 5px; background: var(--c); flex: none; }

/* =========================================================
   DEBILIDADES
   ========================================================= */
.wsum { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.wcard {
  border: var(--stroke); border-radius: 24px; padding: 18px 20px 20px; background: var(--card); position: relative; overflow: hidden;
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .2s ease-out, box-shadow .25s;
}
.wcard:hover { box-shadow: 6px 7px 0 var(--line); }
.wcard::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .25s;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 30%), rgba(255,255,255,.5), rgba(255,255,255,0) 50%); mix-blend-mode: soft-light;
}
.wcard:hover::after { opacity: 1; }
.wcard::before { content: ""; position: absolute; inset: 0 0 auto; height: 8px; background: var(--g); border-bottom: var(--stroke); }
.wcard--sol { --g: var(--grad-sol); }
.wcard--luna { --g: var(--grad-luna); }
.wcard__name { font-family: var(--f-display); font-weight: 400; font-size: 24px; margin: 6px 0 4px; }
.wcard__verdict { margin: 0 0 14px; font-size: 15px; color: var(--text-soft); }
.wcard__verdict b { color: var(--text); }
.wrow { display: grid; grid-template-columns: 76px 1fr; align-items: center; gap: 10px; margin-top: 10px; }
.wrow__label { font-weight: 800; font-size: 14px; }
.wrow__icons { display: flex; flex-wrap: wrap; gap: 10px; }
.wico { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; transition: translate .2s var(--bounce); }
.wico:hover { translate: 0 -3px; }
.wico .tbadge { --z: 42px; }
.wico__n { position: absolute; right: -8px; top: -8px; min-width: 22px; height: 22px; padding: 0 4px; border-radius: 999px; border: 2px solid #000; font-size: 12px; font-weight: 800; display: grid; place-items: center; color: #fff; }
.wico__t { font-size: 11px; font-weight: 700; color: var(--text-soft); line-height: 1; }
.wico--weak .wico__n { background: var(--red); }
.wico--res .wico__n { background: var(--teal); }
.wrow__none { font-size: 14px; color: var(--text-mute); }

/* =========================================================
   MAPA
   ========================================================= */
.mapprog { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.mapprog__p { border: 2.5px solid var(--line); border-radius: 16px; padding: 8px 14px; background: var(--card); transition: opacity .3s; }
.mapprog__p.is-dim { opacity: .35; }
.mapprog__top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-weight: 800; }
.mapprog__n { font-family: var(--f-display); font-weight: 400; font-size: 22px; }
.mapprog__bar { height: 12px; margin-top: 6px; border: 2px solid #000; border-radius: 999px; background: var(--track); overflow: hidden; }
.mapprog__bar i { display: block; height: 100%; width: 0; transition: width 1s cubic-bezier(.2,.9,.3,1); }
.mapprog__p--sol .mapprog__bar i { background: var(--grad-sol); }
.mapprog__p--luna .mapprog__bar i { background: var(--grad-luna); }
.mapprog__sub { font-size: 13px; color: var(--text-soft); margin-top: 4px; }

.map { position: relative; border: var(--stroke); border-radius: 26px; overflow: hidden; background: var(--sea-2); }
.map svg { display: block; width: 100%; height: auto; }
.map .waves { animation: waves 7s linear infinite; }
@keyframes waves { to { translate: -80px 0; } }
.map .route-line { fill: none; stroke: #000; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.map .route-fill { fill: none; stroke: #fff6d8; stroke-width: 3.5; stroke-dasharray: 10 9; stroke-linecap: round; opacity: 0; transition: opacity .5s 1.6s; animation: march 1.2s linear infinite; }
.map.is-in .route-fill { opacity: 1; }
:root[data-theme="dark"] .map .route-fill { stroke: #ffe58a; }
@keyframes march { to { stroke-dashoffset: -19; } }
.map .route-draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); }
.map.is-in .route-draw { animation: draw 1.6s .2s cubic-bezier(.4,0,.2,1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.zone { cursor: pointer; outline: none; }
.zone__in { transform-box: fill-box; transform-origin: center; scale: 0; }
.map.is-in .zone__in { animation: zone-pop .5s var(--bounce) forwards; animation-delay: calc(.6s + var(--i) * 70ms); }
@keyframes zone-pop { to { scale: 1; } }
.zone__hit { fill: transparent; }
.zone__ring { fill: none; stroke: #fff; stroke-width: 3; opacity: 0; }
.zone:hover .zone__ring, .zone:focus-visible .zone__ring, .zone.is-active .zone__ring { opacity: 1; }
.zone__pulse { fill: none; stroke: var(--sun); stroke-width: 3; transform-box: fill-box; transform-origin: center; animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { from { scale: .8; opacity: .9; } to { scale: 1.9; opacity: 0; } }
.zone__label { font: 800 13px var(--f-body); fill: #fff; paint-order: stroke; stroke: #000; stroke-width: 4px; stroke-linejoin: round; pointer-events: none; }
.zone__sprite { transform-box: fill-box; transform-origin: 50% 100%; }
.zone:hover .zone__sprite, .zone:focus-visible .zone__sprite { animation: hop 1.3s ease-in-out infinite; }
@keyframes hop { 0%, 70%, 100% { translate: 0 0; } 80% { translate: 0 -7px; } 90% { translate: 0 0; } }
.zone:hover .zone__sprite { scale: 1.25; }



.map .deco-tree { fill: #3b8f3f; stroke: #000; stroke-width: 2; }
:root[data-theme="dark"] .map .deco-tree { fill: #24603a; }
.map .deco-mount { fill: #b9a68a; stroke: #000; stroke-width: 2.5; stroke-linejoin: round; }
.map .deco-snow { fill: #fff; }
.map .deco-grass { fill: none; stroke: #2f7d2f; stroke-width: 2.5; stroke-linecap: round; }
.map .deco-lake { fill: var(--sea-1); stroke: #000; stroke-width: 2.5; }
.map .deco-tower { fill: #8e86b8; stroke: #000; stroke-width: 2.5; stroke-linejoin: round; }

/* Puentes */
.bridge path { fill: none; stroke-linecap: round; }
.bridge__edge { stroke: #000; stroke-width: 24; }
.bridge__deck { stroke: #c48a4a; stroke-width: 17; }
.bridge__planks { stroke: #6b4423; stroke-width: 17; stroke-dasharray: 3 8; stroke-linecap: butt !important; }
:root[data-theme="dark"] .bridge__deck { stroke: #8f6233; }

/* Ciudades */
.city { pointer-events: none; }
.city__in { transform-box: fill-box; transform-origin: center; scale: 0; }
.map.is-in .city__in { animation: zone-pop .5s var(--bounce) forwards; animation-delay: calc(1.3s + var(--i) * 110ms); }
.city__base { fill: #fff; stroke: #000; stroke-width: 3; }
.city__houses { fill: #f5b225; stroke: #000; stroke-width: 2; stroke-linejoin: round; }
.city__roof { fill: none; stroke: var(--red); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.city__label { font: italic 800 11px var(--f-body); fill: #fff6d8; paint-order: stroke; stroke: #000; stroke-width: 3.5px; stroke-linejoin: round; opacity: 0; transition: opacity .4s 1.8s; }
.map.is-in .city__label { opacity: 1; }
:root[data-theme="dark"] .city__base { fill: #2a2f45; }

/* Nubes que pasan */
.cloud { pointer-events: none; animation: cloud-move var(--d) linear infinite; animation-delay: var(--dl); }
@keyframes cloud-move { from { translate: -360px 0; } to { translate: 1300px 0; } }
.cloud__body { fill: #fff; opacity: .88; }
.cloud__body ellipse, .cloud__body rect { stroke: none; }
.cloud__shadow { fill: #000; opacity: .12; }
:root[data-theme="dark"] .cloud__body { fill: #b9c2e6; opacity: .45; }
:root[data-theme="dark"] .cloud__shadow { opacity: .2; }
.map.is-zoomed .clouds { opacity: .35; transition: opacity .4s; }

/* Zoom */
.zone__in { transition: transform .25s var(--bounce); }
.zone:hover .zone__in, .zone.is-active .zone__in { transform: scale(1.18); }
.map__reset {
  position: absolute; z-index: 6; top: 12px; right: 12px; font: 800 14px var(--f-body); cursor: pointer;
  padding: 7px 14px 7px 12px; border: var(--stroke); border-radius: 999px; background: var(--sun); color: #000;
  box-shadow: 3px 3px 0 #000; opacity: 0; translate: 0 -12px; pointer-events: none;
  transition: opacity .2s, translate .3s var(--bounce);
}
.map__reset::before { content: "⤢ "; }
.map.is-zoomed .map__reset { opacity: 1; translate: 0 0; pointer-events: auto; }
.map__reset:hover { translate: 0 -2px; box-shadow: 3px 5px 0 #000; }

.maptip {
  position: absolute; z-index: 5; width: 250px; pointer-events: none; translate: -50% calc(-100% - 22px); opacity: 0; scale: .9;
  background: var(--card); border: var(--stroke); border-radius: 18px; box-shadow: 4px 4px 0 var(--line); padding: 10px 12px;
  transition: opacity .15s, scale .25s var(--bounce);
}
.maptip.is-on { opacity: 1; scale: 1; }
.maptip.is-below { translate: -50% 26px; }
.maptip__h { font-family: var(--f-display); font-size: 19px; line-height: 1.1; }
.maptip__t { font-size: 12px; color: var(--text-mute); margin-bottom: 6px; }
.maptip__r { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-top: 2px dashed var(--dash); }
.maptip__r img { width: 40px; height: 40px; border-radius: 10px; border: 2px solid #000; background: var(--st); object-fit: contain; flex: none; }
.maptip__r .ph { width: 40px; height: 40px; border-radius: 10px; border: 2px dashed var(--dash); flex: none; }
.maptip__who { font-size: 12px; font-weight: 800; }
.maptip__who--sol { color: var(--name-sol); }
.maptip__who--luna { color: var(--name-luna); }
.maptip__what { font-size: 14px; font-weight: 700; line-height: 1.15; }
.maptip__st { font-size: 12px; color: var(--text-soft); }

/* =========================================================
   ANÁLISIS / GRÁFICOS
   ========================================================= */
.chart { position: relative; margin-top: 6px; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .axis-t { font-size: 12px; fill: var(--text-mute); font-family: var(--f-body); }
.chart .lbl { font-size: 13px; font-weight: 800; fill: var(--text); font-family: var(--f-body); }
.chart .series { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .series-draw { stroke-dasharray: 2000; stroke-dashoffset: 2000; animation: draw 1.2s cubic-bezier(.4,0,.2,1) forwards; }
.chart .cross { stroke: var(--text); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart .radar-poly { transform-box: fill-box; transform-origin: center; animation: radar-in .7s var(--bounce) both; }
@keyframes radar-in { from { scale: 0; opacity: 0; } }
.legend-row { display: flex; gap: 16px; font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.legend-row span { display: inline-flex; align-items: center; gap: 6px; }
.legend-row i { width: 14px; height: 4px; border-radius: 2px; background: var(--c); }
.tip {
  position: absolute; pointer-events: none; z-index: 5; background: var(--card); border: 2.5px solid var(--line); border-radius: 12px; box-shadow: 3px 3px 0 var(--line);
  padding: 6px 10px; font-size: 13px; min-width: 130px; translate: -50% calc(-100% - 14px); opacity: 0; transition: opacity .12s;
}
.tip.is-on { opacity: 1; }
.tip__h { font-weight: 800; margin-bottom: 2px; }
.tip__r { display: flex; align-items: center; gap: 6px; justify-content: space-between; }
.tip__r i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); display: inline-block; margin-right: 4px; }
.stat-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 10px; }
.stat-table th, .stat-table td { padding: 3px 6px; text-align: right; border-bottom: 1px solid var(--grid); }
.stat-table th:first-child, .stat-table td:first-child { text-align: left; }

.cov { display: grid; gap: 16px; }
.cov__head { display: flex; justify-content: space-between; align-items: baseline; font-weight: 800; font-size: 15px; margin-bottom: 6px; }
.cov__n { font-family: var(--f-display); font-weight: 400; font-size: 20px; }
.cov__icons { display: grid; grid-template-columns: repeat(9, 1fr); gap: 5px; }
.cov__icons .tbadge { --z: 100%; aspect-ratio: 1; height: auto; border-width: 2px; border-radius: 7px; animation: pop-tile .4s var(--bounce) both; animation-delay: calc(var(--i) * 25ms); }
.cov__icons .off { filter: grayscale(1); opacity: .25; border-style: dashed; }

.typegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 10px; }
.tcell { border: var(--stroke); border-radius: 14px; overflow: hidden; background: var(--card); }
.tcell__head { display: flex; align-items: center; gap: 6px; background: var(--c); color: #fff; font-weight: 800; padding: 3px 8px; font-size: 14px; border-bottom: var(--stroke); text-shadow: 0 1px 0 rgba(0,0,0,.6); }
.tcell__head .ticon { width: 18px; height: 18px; border: 1.5px solid #000; }
.tcell__body { display: grid; grid-template-columns: repeat(var(--cols, 2), 1fr); }
.tcell__side { padding: 6px 8px; display: flex; flex-direction: column; gap: 3px; }
.tcell__side + .tcell__side { border-left: 2px dashed var(--dash); }
.tcell__who { font-size: 11px; font-weight: 700; color: var(--text-soft); }
.pips { display: flex; gap: 3px; min-height: 12px; flex-wrap: wrap; }
.pip { width: 12px; height: 12px; border-radius: 4px; border: 2px solid #000; }
.pip--weak { background: var(--red); }
.pip--res { background: var(--teal); }
.tcell--danger { box-shadow: 0 0 0 3px var(--red); }

/* =========================================================
   REGISTRO DE CAPTURAS
   ========================================================= */
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 14px 0 0; font-size: 14px; font-weight: 600; }
.routes + .legend, [data-legend] { margin: 0 0 18px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #000; display: inline-block; background: var(--st); }
.dot--pend { background: transparent; border-style: dashed; border-color: var(--text); }
.st-equipo { --st: var(--sun); }
.st-caja { --st: var(--moon-light); }
.st-muerto { --st: #2a2a2a; }
.st-fallo { --st: #fff; }
.routes { list-style: none; margin: 0; padding: 0; position: relative; counter-reset: r; }
.routes::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 4px; margin-left: -2px; background: repeating-linear-gradient(var(--text) 0 10px, transparent 10px 18px); }
.routes--one::before { display: none; }
.route { display: grid; grid-template-columns: 1fr 130px 1fr; align-items: center; gap: 14px; padding: 6px 0; counter-increment: r; }
.routes--one .route { grid-template-columns: 130px 1fr; }
.route__name { position: relative; z-index: 1; text-align: center; font-weight: 800; font-size: 14px; line-height: 1.15; background: var(--surface); border: var(--stroke); border-radius: 12px; padding: 6px 8px; }
.route__name::before { content: counter(r); display: block; font-family: var(--f-display); font-weight: 400; font-size: 20px; color: var(--orange); -webkit-text-stroke: 1px #000; }
.catch { display: flex; align-items: center; gap: 10px; border: var(--stroke); border-radius: 16px; padding: 4px 12px 4px 4px; background: var(--card); transition: translate .2s var(--bounce); }
.catch:hover { translate: 0 -2px; }
.catch--sol { flex-direction: row-reverse; text-align: right; padding: 4px 4px 4px 12px; }
.routes--one .catch--sol { flex-direction: row; text-align: left; padding: 4px 12px 4px 4px; }
.catch__img { width: 56px; height: 56px; border-radius: 12px; background: var(--st); border: 2px solid #000; object-fit: contain; flex: none; transition: scale .25s var(--bounce); }
.catch:hover .catch__img { scale: 1.1; }
.catch__name { font-weight: 800; line-height: 1.1; }
.catch__state { font-size: 13px; color: var(--text-soft); }
.catch.st-muerto { background: color-mix(in srgb, var(--card) 70%, #888); }
.catch.st-muerto .catch__img { filter: grayscale(1) contrast(.8); background: #9aa0aa; }
.catch.st-muerto .catch__name { text-decoration: line-through; text-decoration-thickness: 2px; }
.catch.st-fallo .catch__img { opacity: .35; }
.catch--empty { justify-content: center; color: var(--text-soft); border-style: dashed; min-height: 68px; background: transparent; font-size: 14px; }
.catch__egg { width: 28px; height: 28px; image-rendering: pixelated; opacity: .6; margin-right: 6px; }

/* =========================================================
   COMBATES
   ========================================================= */
.battles { display: grid; grid-template-columns: 1.6fr 1fr; gap: 32px; }
.battles > div { min-width: 0; overflow-x: auto; }
.btable { width: 100%; border-collapse: separate; border-spacing: 0 8px; font-size: 15px; }
.btable th { text-align: left; font-size: 13px; color: var(--text-soft); font-weight: 700; padding: 0 10px; }
.btable td { background: var(--card); border-top: var(--stroke); border-bottom: var(--stroke); padding: 10px; }
.btable td:first-child { border-left: var(--stroke); border-radius: 14px 0 0 14px; font-weight: 700; }
.btable td:last-child { border-right: var(--stroke); border-radius: 0 14px 14px 0; }
.res { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.res__tries { font-family: var(--f-display); font-size: 20px; line-height: 1; }
.res__sub { font-size: 12px; color: var(--text-soft); }
.res--clean .res__tries { color: var(--teal); -webkit-text-stroke: 1px #000; }
.res--hard .res__tries { color: var(--red); -webkit-text-stroke: 1px #000; }
.pvp { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pvp li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 8px 14px 8px 8px; border: var(--stroke); border-radius: 16px; color: #fff; font-weight: 700; transition: opacity .3s; }
.pvp li.w-sol { background: var(--grad-sol); }
.pvp li.w-luna { background: var(--grad-luna); }
.pvp li.is-dim { opacity: .35; }
.pvp__ep { background: #fff; color: #000; border: 2px solid #000; border-radius: 10px; padding: 2px 8px; font-size: 13px; }
.pvp__score { font-family: var(--f-display); font-weight: 400; font-size: 24px; -webkit-text-stroke: 1.5px #000; paint-order: stroke fill; }
.pvp__who { text-shadow: 0 1px 0 rgba(0,0,0,.5); }

/* =========================================================
   BOLSA
   ========================================================= */
.item { display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 2.5px solid #000; border-radius: 12px; padding: 7px 10px; background: var(--card); font-size: 14px; font-weight: 600; border-left: 10px solid var(--k, #000); }
.item__name { display: inline-flex; align-items: center; gap: 6px; }
.item__img { width: 30px; height: 30px; image-rendering: pixelated; flex: none; margin: -4px 0; transition: scale .2s var(--bounce); }
.item:hover .item__img { scale: 1.35; }
.item__n { font-family: var(--f-display); font-weight: 400; font-size: 18px; }
.k-curacion { --k: #e86a9a; }
.k-ball { --k: var(--red); }
.k-equipable { --k: var(--sun); }
.k-mt { --k: var(--teal); }
.k-evolutivo { --k: var(--moon); }

.foot { width: min(1180px, calc(100% - 32px)); margin: 48px auto 40px; font-size: 13px; color: var(--text-soft); text-align: center; }

/* =========================================================
   MOVIMIENTO REDUCIDO
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  html { scroll-behavior: auto; }
  .ticker__track { flex-wrap: wrap; width: auto; }
  .map .route-draw { stroke-dashoffset: 0; }
  .zone__in, .city__in { scale: 1; }
  .chart .series-draw { stroke-dashoffset: 0; }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1000px) {
  .duo { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr 1fr; min-height: 0; }
  .hero__center { grid-column: 1 / -1; order: -1; padding: 8px 0 0; }
  .hero__burst { width: 520px; }
  .hero__side { min-height: 440px; }
  .battles, .wsum { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .topbar { padding-left: 14px; gap: 8px; }
  .topbar__brand { display: none; }
  .viewswitch a { padding: 6px 12px; font-size: 14px; }
  .comphead { top: 70px; }
  .comphead__inner { padding: 10px; }
  .comphead__title { font-size: 22px; }
  .seg--big button { padding: 6px 10px; font-size: 13px; }
  .teams, .bags, .mapprog { grid-template-columns: 1fr; }
  .team__grid { grid-template-columns: repeat(2, 1fr); }
  .vrow { row-gap: 4px; grid-template-areas: "lab lab lab" "v1 t1 t1" "v2 t2 t2"; grid-template-columns: 44px 1fr 1fr; }
  .vrow__label { grid-area: lab; text-align: left; }
  .vrow__val--sol { grid-area: v1; text-align: left; }
  .vrow__track--sol { grid-area: t1; justify-content: flex-start; }
  .vrow__track--sol .vrow__bar { border-left: 0; border-right: var(--stroke); }
  .vrow__val--luna { grid-area: v2; }
  .vrow__track--luna { grid-area: t2; }
  .routes::before { display: none; }
  .route, .routes--one .route { grid-template-columns: 1fr; gap: 6px; padding: 10px 0; }
  .route__name { order: -1; display: flex; align-items: center; gap: 8px; text-align: left; justify-self: start; padding: 4px 12px; }
  .route__name::before { font-size: 18px; }
  .catch--sol { flex-direction: row; text-align: left; padding: 4px 12px 4px 4px; }
  .hero__score-num { width: 72px; height: 72px; font-size: 46px; }
  .hero__side { min-height: 330px; }
  .hero__tag { padding: 8px 8px 10px; margin-top: -24px; }
  .hero__name { font-size: 20px; }
  .hearts svg { width: 14px; height: 13px; }
  .balls { gap: 3px; }
  .ball { width: 20px; height: 20px; border-width: 2px; }
  .ball::before { inset: -2px -2px 50% -2px; border-width: 2px; }
  .ball::after { width: 7px; height: 7px; border-width: 2px; }
  .ballpop { width: 190px; }
  .hero__side--sol .ballpop { left: 0; translate: 0 10px; }
  .hero__side--sol .ballpop.is-on { translate: 0 0; }
  .hero__side--sol .ballpop::after { left: 30%; }
  .hero__side--luna .ballpop { left: auto; right: 0; translate: 0 10px; }
  .hero__side--luna .ballpop.is-on { translate: 0 0; }
  .hero__side--luna .ballpop::after { left: 70%; }
  .fan { top: 46%; }
  .lifebar { --heart-size: clamp(10px, 3.2vw, 14px); --heart-gap: 2px; margin: 4px 5px 10px; padding: 6px 5px; }
  .lifebar--sol { align-self: flex-end; }
  .lifebar--luna { align-self: flex-start; }
  .lifebar:has(+ .medal[hidden]) { align-self: center; }
  .lifebar__n b { font-size: 23px; }
  .lifebar__n span { font-size: 13px; }
  .btable { font-size: 13px; }
  .btable td { padding: 8px 6px; }
  .res { white-space: normal; }
  .wrow { grid-template-columns: 1fr; gap: 6px; }
  .cov__icons { grid-template-columns: repeat(6, 1fr); }
  .zone__label { font-size: 22px; stroke-width: 6px; }
  .maptip { width: 210px; }
  .cta { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 350px) {
  .lifebar:has(+ .medal:not([hidden])) { align-self: center; margin-top: 132px; }
}

/* Chapitas de captura en el mapa */
.pin__bg { fill: #fff; stroke: #000; stroke-width: 3; }
.pin--sol .pin__bg { fill: #ffe7c2; stroke: #e8352b; stroke-width: 4; }
.pin--luna .pin__bg { fill: #d9e2ff; stroke: #3a4a8c; stroke-width: 4; }
.pin image { filter: drop-shadow(1px 1px 0 rgba(0,0,0,.35)); }

/* =========================================================
   NOTA DEL EQUIPO
   ========================================================= */
.score__cards { display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: stretch; margin-bottom: 8px; }
.score__cards--one { grid-template-columns: minmax(0, 560px); justify-content: center; }
.scard {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 16px 16px;
  border: var(--stroke); border-radius: 28px; background: var(--card); box-shadow: 5px 5px 0 var(--line); min-width: 0;
}
.scard::before { content: ""; position: absolute; inset: 0 0 auto; height: 10px; border-bottom: var(--stroke); border-radius: 25px 25px 0 0; }
.scard--sol::before { background: var(--grad-sol); }
.scard--luna::before { background: var(--grad-luna); }
.scard.is-win { box-shadow: 0 0 0 4px var(--sun), 7px 8px 0 var(--line); }
.scard__crown {
  position: absolute; top: -16px; left: 50%; translate: -50% 0; white-space: nowrap; z-index: 2;
  font: 800 13px var(--f-body); padding: 4px 14px 4px 34px; border: 2.5px solid #000; border-radius: 999px; background: var(--sun); color: #000;
}
.scard__crown::before { content: "♛"; position: absolute; left: 12px; top: 50%; translate: 0 -54%; font-size: 17px; }
.is-in .scard__crown { animation: crown-in .6s 1.3s var(--bounce) backwards; }
@keyframes crown-in { from { scale: 0; rotate: -12deg; } }
.scard__gauge { position: relative; width: 170px; aspect-ratio: 1; }
.scard__gauge svg { width: 100%; height: 100%; rotate: -90deg; overflow: visible; }
.scard__track { fill: none; stroke: var(--track); stroke-width: 14; }
.scard__arc { fill: none; stroke-width: 14; stroke-linecap: round; stroke-dasharray: var(--c); stroke-dashoffset: var(--c); transition: stroke-dashoffset 1.3s cubic-bezier(.2,.9,.3,1); filter: drop-shadow(0 0 0 #000); }
.is-in .scard__arc { stroke-dashoffset: var(--v); }
.scard__num { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1; }
.scard__num b { font-family: var(--f-display); font-weight: 400; font-size: 52px; -webkit-text-stroke: 1.5px #000; paint-order: stroke fill; }
.scard--sol .scard__num b { color: var(--name-sol); }
.scard--luna .scard__num b { color: var(--name-luna); }
.scard__num span { font-size: 13px; font-weight: 800; color: var(--text-mute); margin-top: 4px; }
.scard__rank {
  position: absolute; right: -4px; bottom: 6px; width: 46px; height: 46px; display: grid; place-items: center;
  font-family: var(--f-display); font-size: 28px; color: #fff; -webkit-text-stroke: 1.5px #000; paint-order: stroke fill;
  border: 3px solid #000; border-radius: 14px; rotate: 8deg; box-shadow: 3px 3px 0 #000; background: #8a8aa8;
}
.is-in .scard__rank { animation: rank-in .55s 1.2s var(--bounce) backwards; }
@keyframes rank-in { from { scale: 0; rotate: -40deg; } }
.scard__rank--S { background: linear-gradient(135deg, #f5b225, #e8352b 50%, #a040a0); }
.scard__rank--A { background: linear-gradient(135deg, #6cc04a, #3fb8a6); }
.scard__rank--B { background: linear-gradient(135deg, #5a8cf0, #3a4a8c); }
.scard__rank--C { background: linear-gradient(135deg, #f5b225, #ee7f30); }
.scard__rank--D, .scard__rank--E { background: linear-gradient(135deg, #9a9a7c, #5a4a40); }
.scard__who { font-family: var(--f-display); font-weight: 400; font-size: 28px; margin: 2px 0 0; }
.scard__vs { margin: 0; font-size: 14px; color: var(--text-soft); }
.scard__mons { list-style: none; margin: 8px 0 0; padding: 0; width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.scard__mons li {
  position: relative; display: grid; grid-template-columns: 38px 1fr; grid-template-rows: auto auto auto; column-gap: 6px; align-items: center;
  padding: 5px 8px 5px 4px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); min-width: 0;
}
.is-in .scard__mons li { animation: mon-in .5s var(--bounce) backwards; animation-delay: calc(.5s + var(--i) * 60ms); }
.scard__mons li:first-child { background: color-mix(in srgb, var(--sun) 28%, var(--surface)); }
.scard__mons img { grid-row: 1 / 4; width: 38px; height: 38px; object-fit: contain; filter: drop-shadow(1px 1px 0 rgba(0,0,0,.3)); }
.scard__mons b { font-family: var(--f-display); font-weight: 400; font-size: 18px; line-height: 1; }
.scard__mons span { font-size: 12px; font-weight: 700; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scard__mons i { font-style: normal; font-size: 10.5px; color: var(--text-mute); line-height: 1.1; }
.scard__mvp { position: absolute; top: -9px; right: -6px; font: 800 10px var(--f-body); padding: 1px 6px; border-radius: 999px; border: 2px solid #000; background: var(--red); color: #fff; rotate: 6deg; }

.score__mid { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; max-width: 190px; text-align: center; }
.score__vs { font-family: var(--f-display); font-size: 40px; line-height: 1; color: #fff; -webkit-text-stroke: 2px #000; paint-order: stroke fill; text-shadow: 3px 3px 0 #000; rotate: -6deg; }
.score__verdict { margin: 0; font-size: 15px; color: var(--text-soft); line-height: 1.35; }
.score__verdict b { color: var(--text); }
.score__verdict--one { text-align: center; margin: 14px 0 0; }
.score .panel__sub { margin-top: 30px; display: flex; align-items: baseline; gap: 10px; }
.score__hint { font-family: var(--f-body); font-size: 13px; font-weight: 700; color: var(--text-mute); }
.versus--score .vrow__label small { display: block; font-size: 11px; font-weight: 700; color: var(--text-mute); }

.sbars { display: grid; gap: 12px; }
.sbar { display: grid; grid-template-columns: minmax(0, 260px) 1fr 44px; gap: 14px; align-items: center; }
.sbar__l b { display: block; font-size: 15px; }
.sbar__l span { font-size: 12.5px; color: var(--text-soft); line-height: 1.25; }
.sbar__track { height: 24px; border: var(--stroke); border-radius: 999px; background: var(--track); overflow: hidden; }
.sbars--sol .vrow__bar { background: var(--grad-sol); border-right: var(--stroke); }
.sbars--luna .vrow__bar { background: var(--grad-luna); border-right: var(--stroke); }
.sbar__v { font-family: var(--f-display); font-size: 24px; text-align: right; }

.swhys { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.swhys--one { grid-template-columns: 1fr; }
.swhy { border: var(--stroke); border-radius: 22px; padding: 16px 18px; background: var(--card); min-width: 0; }
.swhy__who { margin: 0 0 8px; font-family: var(--f-display); font-weight: 400; font-size: 22px; }
.swhy--sol .swhy__who { color: var(--name-sol); }
.swhy--luna .swhy__who { color: var(--name-luna); }
.swhy__list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 7px; }
.swhy__list li { position: relative; padding-left: 30px; font-size: 14.5px; line-height: 1.35; }
.swhy__list li::before { position: absolute; left: 0; top: -1px; width: 21px; height: 21px; display: grid; place-items: center; border: 2px solid #000; border-radius: 7px; font-size: 13px; font-weight: 800; color: #fff; }
.swhy__pro::before { content: "+"; background: #2fbf71; }
.swhy__con::before { content: "−"; background: var(--red); }
.spiezas { display: flex; flex-wrap: wrap; gap: 6px; }
.spieza { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; padding: 2px 9px 2px 2px; border: 2px solid #000; border-radius: 999px; background: color-mix(in srgb, var(--c) 18%, var(--surface)); }
.spieza i { font-style: normal; font-size: 10.5px; padding: 1px 7px; border-radius: 999px; background: var(--c); color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.55); }
.spieza small { font-size: 11px; font-weight: 700; color: var(--text-soft); }
.swhy__syn { margin: 12px 0 0; font-size: 13.5px; color: var(--text-soft); }
.swhy__syn b { color: var(--text); }
.score__how { margin-top: 22px; border: 2.5px dashed var(--dash); border-radius: 18px; padding: 12px 18px; font-size: 14px; color: var(--text-soft); }
.score__how summary { cursor: pointer; font-weight: 800; color: var(--text); }
.score__how ul { padding-left: 18px; }
.score__how b { color: var(--text); }
.score__how code { font-size: 13px; background: var(--track); padding: 1px 6px; border-radius: 6px; }

@media (max-width: 900px) {
  .score__cards { grid-template-columns: 1fr; }
  .score__mid { max-width: none; flex-direction: row; justify-content: center; order: -1; }
  .score__cards .scard--sol { order: 0; }
  .swhys { grid-template-columns: 1fr; }
  .sbar { grid-template-columns: 1fr 40px; }
  .sbar__l { grid-column: 1 / -1; }
}
@media (max-width: 420px) {
  .scard__mons { grid-template-columns: repeat(2, 1fr); }
}

/* Medalla con la nota del equipo en la cabecera */
.medal {
  position: absolute; z-index: 7; top: 7%; width: 92px; height: 92px; display: block; text-decoration: none; color: var(--text);
  animation: medal-in .7s 1.4s var(--bounce) backwards; transition: scale .25s var(--bounce);
}
.medal[hidden] { display: none; }
.medal--sol { right: 4%; rotate: 6deg; }
.medal--luna { left: 4%; rotate: -6deg; }
.medal:hover, .medal:focus-visible { scale: 1.1; }
.medal:focus-visible { outline: 3px solid var(--sun); outline-offset: 4px; border-radius: 50%; }
@keyframes medal-in { from { scale: 0; rotate: 40deg; opacity: 0; } }
.medal__ring {
  position: absolute; inset: 0; border-radius: 50%; border: 3px solid #000; padding: 8px; box-shadow: 4px 4px 0 var(--line);
  background: conic-gradient(var(--g1) 0, var(--g2) calc(var(--p) * 1%), var(--track) 0);
}
.medal--sol { --g1: #e8352b; --g2: #f5b225; }
.medal--luna { --g1: #3a4a8c; --g2: #3fb8a6; }
.medal__in {
  width: 100%; height: 100%; border-radius: 50%; border: 2.5px solid #000; background: var(--surface);
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
}
.medal__in small { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--text-soft); }
.medal__in b { font-family: var(--f-display); font-weight: 400; font-size: 30px; -webkit-text-stroke: 1.2px #000; paint-order: stroke fill; margin-top: 1px; }
.medal--sol .medal__in b { color: var(--name-sol); }
.medal--luna .medal__in b { color: var(--name-luna); }
.medal__rank {
  position: absolute; right: -8px; bottom: -4px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px;
  border: 2.5px solid #000; box-shadow: 2px 2px 0 #000; rotate: 10deg; font-family: var(--f-display); font-size: 20px; color: #fff;
  -webkit-text-stroke: 1.2px #000; paint-order: stroke fill; background: #8a8aa8;
}
.medal__crown {
  position: absolute; z-index: 1; top: -22px; left: 50%; translate: -50% 0; font-size: 30px; line-height: 1; color: var(--sun);
  -webkit-text-stroke: 1.5px #000; paint-order: stroke fill; filter: drop-shadow(2px 2px 0 #000); animation: crown-bob 2.4s 2.2s ease-in-out infinite;
}
@keyframes crown-bob { 50% { translate: -50% -4px; rotate: 6deg; } }
.medal--win .medal__ring { box-shadow: 4px 4px 0 var(--line), 0 0 0 4px var(--sun); }
@media (max-width: 720px) {
  .medal { width: 62px; height: 62px; top: 52px; }
  .medal--sol { right: auto; left: 4px; }
  .medal--luna { left: auto; right: 4px; }
  .medal__ring { padding: 5px; border-width: 2.5px; }
  .medal__in small { font-size: 8px; }
  .medal__in b { font-size: 20px; }
  .medal__rank { width: 24px; height: 24px; font-size: 14px; border-radius: 8px; right: -6px; }
  .medal__crown { font-size: 22px; top: -16px; }
}

/* =========================================================
   BOLSA: mochila con bolsillos
   ========================================================= */
.bag { --pk: #f5b225; min-width: 0; }
.bag--sol { --bag1: #e8352b; --bag2: #ff8a3d; }
.bag--luna { --bag1: #3a4a8c; --bag2: #3fb8a6; }
.bag__wrap { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 18px; align-items: start; }
.bag__pack { position: relative; padding-top: 18px; }
.bag__art { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; animation: bag-idle 3.2s ease-in-out infinite; }
.bag--luna .bag__art { animation-delay: -1.6s; }
.bag__art:focus-visible { outline: 3px solid var(--sun); outline-offset: 4px; border-radius: 30px; }
.bag__svg { display: block; width: 100%; height: auto; overflow: visible; transform-origin: 50% 100%; filter: drop-shadow(4px 5px 0 var(--line)); }
.bag__art:hover .bag__svg { rotate: -3deg; transition: rotate .3s var(--bounce); }
@keyframes bag-idle { 50% { translate: 0 -5px; } }
.bag__shadow { display: block; width: 70%; height: 12px; margin: 6px auto 0; border-radius: 50%; background: rgba(0,0,0,.18); animation: shadow-idle 3.2s ease-in-out infinite; }
.bag--luna .bag__shadow { animation-delay: -1.6s; }
@keyframes shadow-idle { 50% { scale: .85; opacity: .7; } }
.bag__flap { transform-box: fill-box; transform-origin: 50% 0; }
.bag__front rect:first-child { transition: fill .35s; }

/* Cambio de bolsillo: salto, solapa que se abre y objeto que sale volando */
.bag.is-switch .bag__svg { animation: bag-hop .7s cubic-bezier(.3,1.4,.5,1); }
@keyframes bag-hop {
  0% { scale: 1 1; translate: 0 0; rotate: 0deg; }
  18% { scale: 1.12 .84; translate: 0 6px; }
  45% { scale: .9 1.12; translate: 0 -22px; rotate: -7deg; }
  70% { scale: 1.06 .94; translate: 0 0; rotate: 4deg; }
  85% { scale: .98 1.02; rotate: -1deg; }
  100% { scale: 1 1; translate: 0 0; rotate: 0deg; }
}
.bag.is-switch .bag__flap { animation: flap-open .75s ease-in-out; }
@keyframes flap-open { 0%, 100% { scale: 1 1; } 30%, 55% { scale: 1 -.55; } 75% { scale: 1 1.08; } }
.bag.is-switch .bag__front { animation: front-wiggle .6s .15s ease-in-out; transform-box: fill-box; transform-origin: 50% 50%; }
@keyframes front-wiggle { 30% { rotate: -5deg; scale: 1.06; } 60% { rotate: 4deg; } }
.bag__pop { position: absolute; z-index: 2; left: 50%; top: 34%; width: 46px; height: 46px; object-fit: contain; image-rendering: pixelated; opacity: 0; pointer-events: none; filter: drop-shadow(2px 2px 0 rgba(0,0,0,.4)); }
.bag__pop[hidden] { display: none; }
.bag.is-switch .bag__pop { animation: pop-out 1s .18s cubic-bezier(.3,.7,.4,1); }
@keyframes pop-out {
  0% { opacity: 0; translate: -50% 10px; scale: .3; rotate: 0deg; }
  12% { opacity: 1; }
  45% { translate: -40% -100px; scale: 1.25; rotate: -25deg; }
  100% { opacity: 0; translate: 150% 10px; scale: .5; rotate: 260deg; }
}

.bag__panel {
  border: var(--stroke); border-radius: 22px; padding: 10px 12px 12px; min-width: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--pk) 26%, var(--card)) 0, var(--card) 120px);
  box-shadow: 4px 4px 0 var(--line);
}
.bag__head { display: grid; grid-template-columns: 34px 1fr 34px; align-items: center; gap: 8px; }
.bag__arrow { width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 2.5px solid #000; border-radius: 50%; background: var(--surface); cursor: pointer; transition: scale .2s var(--bounce), background .2s; }
.bag__arrow svg { width: 18px; height: 18px; fill: none; stroke: var(--text); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.bag__arrow:hover { scale: 1.12; background: var(--pk); }
.bag__arrow:active { scale: .9; }
.bag__title { text-align: center; line-height: 1.05; min-width: 0; }
.bag.is-switch .bag__title { animation: title-in .45s var(--bounce); }
@keyframes title-in { from { opacity: 0; scale: .6; rotate: -5deg; } }
.bag__pname { display: block; font-family: var(--f-display); font-size: 24px; color: #fff; -webkit-text-stroke: 1.5px #000; paint-order: stroke fill; text-shadow: 2px 2px 0 #000; }
.bag__count { display: block; font-size: 12px; font-weight: 800; color: var(--text-soft); margin-top: 3px; }
.bag__tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: 5px; margin: 10px 0 10px; }
.bag__tab {
  position: relative; width: 38px; height: 38px; display: grid; place-items: center; padding: 0; cursor: pointer;
  border: 2.5px solid #000; border-radius: 12px; background: var(--surface); color: var(--text-mute);
  transition: translate .3s var(--bounce), background .2s, color .2s, scale .2s var(--bounce);
}
.bag__tab svg { width: 22px; height: 22px; fill: currentColor; }
.bag__tab:hover { scale: 1.1; color: var(--text); }
.bag__tab[aria-selected="true"] { background: var(--pk); color: #fff; translate: 0 -5px; box-shadow: 0 5px 0 #000; }
.bag__tab[aria-selected="true"] svg { stroke: #000; stroke-width: 1.2; }
.bag__tab:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.bag__badge { position: absolute; top: -7px; right: -7px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; border: 2px solid #000; background: #fff; color: #000; font-size: 10.5px; font-weight: 800; display: grid; place-items: center; }

.bag__list { list-style: none; margin: 0; padding: 0 4px 0 0; display: grid; gap: 6px; min-height: 150px; max-height: 440px; overflow-y: auto; overscroll-behavior: contain; align-content: start; }
.bag__item {
  position: relative; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 8px; padding: 5px 12px 5px 6px;
  border: 2.5px solid #000; border-radius: 12px; background: var(--surface); font-weight: 700; font-size: 14px;
  animation: item-in .45s var(--bounce) backwards; animation-delay: calc(.15s + var(--i) * 55ms); transition: translate .2s var(--bounce), background .2s;
}
.bag__list[data-dir="l"] .bag__item { --from: -46px; }
@keyframes item-in { from { opacity: 0; translate: var(--from, 46px) 0; rotate: 3deg; } }
.bag__item::before { content: ""; position: absolute; left: -14px; top: 50%; translate: 0 -50%; border: 7px solid transparent; border-left: 9px solid var(--text); opacity: 0; transition: opacity .15s, left .2s var(--bounce); }
.bag__item:hover { translate: 6px 0; background: color-mix(in srgb, var(--pk) 18%, var(--surface)); }
.bag__item:hover::before { opacity: 1; left: -16px; }
.bag__ico { width: 34px; height: 34px; display: grid; place-items: center; }
.bag__ico img { width: 34px; height: 34px; object-fit: contain; image-rendering: pixelated; transition: scale .2s var(--bounce); }
.bag__item:hover .bag__ico img { scale: 1.3; rotate: -8deg; }
.bag__iname { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; }
.bag__mtt { font-size: 10.5px; font-weight: 800; padding: 0 7px; border-radius: 999px; border: 2px solid #000; background: var(--c); color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.6); }
.bag__qty { font-family: var(--f-display); font-weight: 400; font-size: 19px; }
.bag__empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 30px 10px; text-align: center; color: var(--text-mute); font-weight: 700; border: 2.5px dashed var(--dash); border-radius: 14px; animation: item-in .45s .1s var(--bounce) backwards; }
.bag__empty span { font-size: 26px; animation: leaf 2.4s ease-in-out infinite; }
@keyframes leaf { 50% { translate: 12px 4px; rotate: 30deg; } }

@media (max-width: 560px) {
  .bag__wrap { grid-template-columns: 1fr; }
  .bag__pack { width: 130px; margin: 0 auto; }
}

/* =========================================================
   REVISIÓN DE DISEÑO (contraste, teclado, móvil, rendimiento)
   ========================================================= */
/* Texto negro o blanco según el color del tipo */
.chip, .tbadge span, .tcell__head, .bag__mtt, .spieza i { color: var(--ink, #fff); text-shadow: var(--ts, 0 1px 0 rgba(0,0,0,.6)); }
.seg--big button[aria-checked="true"] { -webkit-text-stroke: 3px #000; paint-order: stroke fill; text-shadow: none !important; }
.seg button:focus-visible, .bag__tab:focus-visible, .compnav button:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }

/* El botón de volver del mapa no se puede tabular mientras está oculto */
.map__reset { visibility: hidden; transition: opacity .2s, translate .3s var(--bounce), visibility 0s .3s; }
.map.is-zoomed .map__reset { visibility: visible; transition: opacity .2s, translate .3s var(--bounce), visibility 0s; }

/* Pausa de la cinta */
.ticker__pause {
  position: absolute; right: 2.5%; top: 50%; translate: 0 -50%; z-index: 2; width: 30px; height: 30px; display: grid; place-items: center; padding: 0;
  border: 2px solid #fff; border-radius: 50%; background: #000; cursor: pointer;
}
.ticker__pause svg { width: 14px; height: 14px; fill: #fff; }
.ticker__pause .i-play, .ticker__pause[aria-pressed="true"] .i-pause { display: none; }
.ticker__pause[aria-pressed="true"] .i-play { display: inline; }
.ticker__pause:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.ticker.is-paused .ticker__track { animation-play-state: paused; }

/* Animaciones en bucle pausadas fuera de pantalla */
.is-off, .is-off *, .is-off *::before, .is-off *::after { animation-play-state: paused !important; }

/* Debilidades: quién es débil o resiste */
.wico { cursor: help; outline: none; }
.wico:focus-visible .tbadge { outline: 3px solid var(--sun); outline-offset: 2px; }
.wico__pop {
  position: absolute; z-index: 20; bottom: calc(100% + 10px); left: 50%; translate: -50% 6px; min-width: 170px;
  display: grid; gap: 4px; padding: 8px 10px; text-align: left; white-space: nowrap;
  background: var(--card); border: var(--stroke); border-radius: 14px; box-shadow: 3px 3px 0 var(--line);
  opacity: 0; pointer-events: none; transition: opacity .15s, translate .25s var(--bounce);
}
.wico__pop b { font-size: 12px; color: var(--text-soft); }
.wico__pop span { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; }
.wico__pop img { width: 26px; height: 26px; object-fit: contain; }
.wico__pop i { margin-left: auto; font-style: normal; font-size: 12px; padding: 0 6px; border-radius: 999px; border: 2px solid #000; background: var(--red); color: #fff; }
.wico--res .wico__pop i { background: var(--teal); }
.wico:hover .wico__pop, .wico:focus-visible .wico__pop { opacity: 1; translate: -50% 0; }
.wico--weak:hover .tbadge, .wico--weak:focus-visible .tbadge { animation: shake .4s ease; }
@keyframes shake { 25% { rotate: -9deg; } 50% { rotate: 7deg; } 75% { rotate: -4deg; } }

/* Tabla defensiva con números */
.tcell__n { font-size: 11.5px; font-weight: 800; line-height: 1.1; }
.tcell__n--weak { color: var(--red); }
.tcell__n--res { color: var(--teal); }
:root[data-theme="dark"] .tcell__n--res { color: #5fd6c4; }
.tcell__n.is-zero { color: var(--text-mute); font-weight: 600; }
.pips { min-height: 0; margin-bottom: 2px; }

/* Nota: descripción de cada apartado */
.vrow__desc { display: block; max-height: 0; overflow: hidden; opacity: 0; font-weight: 600; transition: max-height .3s, opacity .2s; }
.vrow:hover .vrow__desc, .vrow__label:focus-visible .vrow__desc { max-height: 60px; opacity: 1; }
.vrow__label:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 8px; }

/* Evolución: marcadores, tabla y diferencia */
.chart .marks > * { transform-box: fill-box; transform-origin: center; animation: zone-pop .35s var(--bounce) backwards; animation-delay: calc(.9s + var(--i) * 45ms); }
.chart svg:focus-visible { outline: 3px solid var(--sun); outline-offset: 6px; border-radius: 10px; }
.tip__d { margin-top: 4px; padding-top: 4px; border-top: 2px dashed var(--dash); font-size: 12px; color: var(--text-soft); }
.chart__table { margin-top: 10px; font-size: 14px; }
.chart__table summary { cursor: pointer; font-weight: 800; color: var(--text-soft); }
.chart__scroll { overflow-x: auto; margin-top: 8px; }
.chart__table table { border-collapse: collapse; min-width: 100%; }
.chart__table th, .chart__table td { padding: 4px 10px; border-bottom: 1px solid var(--grid); text-align: center; }

/* Índice fijo de la comparativa */
.compnav {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-top: 8px; padding: 6px;
  border: var(--stroke); border-radius: 999px; background: var(--surface); box-shadow: 4px 4px 0 var(--line);
}
.compnav::-webkit-scrollbar { display: none; }
.compnav button {
  flex: none; padding: 5px 12px; border: 2px solid transparent; border-radius: 999px; background: none; cursor: pointer;
  font: 800 13px var(--f-body); color: var(--text-soft); transition: background .2s, color .2s, scale .2s var(--bounce);
}
.compnav button:hover { color: var(--text); scale: 1.05; }
.compnav button[aria-current="true"] { background: var(--text); color: var(--bg); border-color: #000; }
#vista-comparativa [data-sec] { scroll-margin-top: 210px; }

/* Esqueletos de carga */
.skel { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.skel > span { display: block; border-radius: 22px; background: linear-gradient(100deg, var(--track) 30%, color-mix(in srgb, var(--track) 40%, var(--card)) 50%, var(--track) 70%) 0 0 / 300% 100%; animation: skel 1.4s linear infinite; }
.skel__ring { height: 230px; }
.skel__bar { grid-column: 1 / -1; height: 26px; }
.skel--radar { grid-template-columns: 1fr; }
.skel--radar .skel__ring { width: min(100%, 280px); aspect-ratio: 1; height: auto; margin: 10px auto; border-radius: 50%; }
@keyframes skel { from { background-position: 100% 0; } to { background-position: -50% 0; } }

/* Contenedores que se adaptan a su propio ancho */
.bag { container-type: inline-size; }
@container (max-width: 470px) {
  .bag__wrap { grid-template-columns: 1fr; }
  .bag__pack { width: 130px; margin: 0 auto; }
}
.scard__mons { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }
.team__grid { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); }

@media (max-width: 720px) {
  /* Cabecera: logo más pequeño para que los jugadores entren en la primera pantalla */
  .hero__logo { width: min(62vw, 250px); }
  .hero__center { gap: 10px; padding-bottom: 14px; }
  .hero__burst { width: 380px; }
  .hero__score-num { width: 58px; height: 58px; font-size: 36px; }
  .hero__meta { font-size: 13px; margin: 0; }
  .hero__center .bigbtn { font-size: 15px; padding: 9px 16px; }
  .team__grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .mon__img { max-height: 170px; }
  .compnav { border-radius: 18px; }
  #vista-comparativa [data-sec] { scroll-margin-top: 200px; }
  /* El detalle del mapa va como ficha abajo, sin cortarse */
  .maptip { left: 8px !important; right: 8px; top: auto !important; bottom: 8px; width: auto; translate: 0 12px; }
  .maptip.is-on, .maptip.is-below { translate: 0 0; }
  .wico__pop { min-width: 150px; }
  .ticker__pause { width: 26px; height: 26px; }
}
/* Las fichas de debilidades dejan salir el globo de detalle */
.wcard { overflow: visible; }
.wcard::before { border-radius: 21px 21px 0 0; }
.wcard::after { border-radius: inherit; }
.wcard:has(.wico:hover, .wico:focus-visible) { z-index: 5; }
.wico:hover, .wico:focus-visible { z-index: 10; }
@media (max-width: 720px) {
  .comphead__title { display: none; }
  .comphead__inner { justify-content: center; padding: 6px; }
  .compnav { margin-top: 6px; padding: 4px; }
  .compnav button { padding: 4px 10px; font-size: 12.5px; }
}

/* =========================================================
   FILTRO SIN REPETIR ENTRADAS · MAPA ↔ REGISTRO · NOVEDADES
   ========================================================= */
#vista-comparativa.is-warm :is(.tile, .chart .marks > *, .chart .radar-poly, .cov__icons .tbadge, .scard__mons li, .scard__rank, .scard__crown, .bag__item, .bag__empty) { animation: none !important; }
#vista-comparativa.is-warm .chart .series-draw { animation: none; stroke-dasharray: none; stroke-dashoffset: 0; }
#vista-comparativa.is-warm :is(.scard__arc, .vrow__bar) { transition: none !important; }

/* Del mapa al registro */
.map.is-zoomed .maptip.is-on { pointer-events: auto; }
.maptip__go {
  display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; margin-top: 8px; padding: 6px 10px; cursor: pointer;
  font: 800 13px var(--f-body); border: 2.5px solid #000; border-radius: 999px; background: var(--sun); color: #000; box-shadow: 2px 2px 0 #000;
  transition: translate .2s var(--bounce);
}
.maptip__go:hover { translate: 0 -2px; }
.maptip__go:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }

/* Del registro al mapa */
button.route__name { font: inherit; font-weight: 800; font-size: 14px; color: var(--text); cursor: pointer; transition: translate .2s var(--bounce), box-shadow .2s, background .2s; }
button.route__name:hover { translate: 0 -2px; box-shadow: 3px 3px 0 var(--line); background: color-mix(in srgb, var(--sun) 25%, var(--surface)); }
button.route__name:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.route__pin { display: block; width: 12px; height: 15px; margin: 3px auto 0; background: var(--red); border: 2px solid #000; border-radius: 50% 50% 50% 0; rotate: -45deg; scale: .9; transition: translate .25s var(--bounce); }
button.route__name:hover .route__pin { translate: 0 -3px; }
@media (max-width: 720px) { .route__pin { display: inline-block; margin: 0 0 0 4px; vertical-align: middle; } }

/* Fila resaltada al llegar desde el mapa */
.route.is-flash .catch, .route.is-flash .route__name { animation: flash-row 1.8s ease-out; }
@keyframes flash-row { 0%, 30% { box-shadow: 0 0 0 5px var(--sun), 4px 4px 0 var(--line); scale: 1.03; } 100% { box-shadow: 0 0 0 0 transparent; scale: 1; } }

/* Cifras que cambiaron desde la última visita */
.delta {
  display: inline-block; font: 800 12px var(--f-body); line-height: 1; padding: 3px 7px; margin: 0 6px; border: 2px solid #000; border-radius: 999px;
  vertical-align: middle; -webkit-text-stroke: 0; color: #fff; animation: delta-in .6s 1.6s var(--bounce) backwards;
}
.delta--good { background: #2fbf71; }
.delta--bad { background: var(--red); }
@keyframes delta-in { from { scale: 0; rotate: -20deg; } }
.vrow.has-delta .vrow__val { animation: delta-flash 1.4s 1.6s ease-out; }
@keyframes delta-flash { 30% { scale: 1.25; } }
.lifebar .delta { margin: 5px 0 0; padding: 2px 5px; font-size: 11px; white-space: nowrap; }
.medal__delta { position: absolute; z-index: 2; left: 50%; bottom: -14px; translate: -50% 0; margin: 0; white-space: nowrap; }

/* Corazón recién perdido: late, se agrieta y se apaga */
.lh--lost.lh--fresh { animation: heart-in .35s var(--heart-delay) var(--bounce) both, heart-break 1.1s 1.9s ease-in both; }
@keyframes heart-break {
  0% { fill: var(--life-color); background-color: var(--segment-live, transparent); opacity: 1; scale: 1; rotate: 0deg; }
  20% { scale: 1.3; }
  35% { rotate: -14deg; }
  50% { rotate: 12deg; scale: 1.1; fill: var(--life-color); background-color: var(--segment-live, transparent); }
  70% { rotate: -6deg; scale: .9; opacity: .8; }
  100% { fill: var(--card); background-color: var(--segment-fill, transparent); opacity: .6; scale: 1; rotate: 0deg; }
}

/* ===== Aviso de datos ===== */
.disclaimer { display: inline-flex; align-items: center; gap: 8px; margin: 2px 0 0; max-width: 40ch; font-size: 13px; line-height: 1.35; color: var(--text-soft); animation: fade-in .5s 1.1s both; }
.disclaimer span { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); background: var(--sun); color: #000; font: 800 12px/1 var(--f-body); font-style: italic; }
.foot__warn { max-width: 70ch; margin: 0 auto 10px; padding: 10px 16px; border: 2px dashed var(--dash, var(--line)); border-radius: 14px; color: var(--text); background: var(--surface); }
.foot__warn b { color: var(--red); }

/* ===== Abanico: vidas y nota se apartan para no taparlo ===== */
.medal { transition: opacity .25s ease, translate .35s var(--bounce); }
.hero__side:has(.stage:is(:hover, :focus-visible)) .lifebar, .hero__side.is-open .lifebar { visibility: hidden; }
.hero__side:has(.stage:hover) .medal, .hero__side.is-open .medal, .hero__side:has(.stage:focus-visible) .medal { opacity: 0; pointer-events: none; }
.hero__side:has(.stage:hover) .medal, .hero__side.is-open .medal, .hero__side:has(.stage:focus-visible) .medal { translate: 0 -18px; }

/* ===== Cementerio ===== */
.grave { --night1: #1d2347; --night2: #3a2d5c; --stone: #b9bfcc; --stone2: #8d94a6; --grass: #2f4a3a; }
html[data-theme="dark"] .grave { --night1: #0c0f22; --night2: #241a3d; --stone: #9aa1b2; --stone2: #6d7386; --grass: #1d3328; }
.grave__scene {
  position: relative; overflow: hidden; min-height: 380px; border: var(--stroke); border-radius: 22px; box-shadow: 5px 5px 0 var(--line);
  background: radial-gradient(120% 80% at 80% 0%, var(--night2), var(--night1) 70%);
  padding: 120px 18px 0; isolation: isolate;
}
.grave__scene::before { /* estrellas */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .8;
  background-image: radial-gradient(1.5px 1.5px at 12% 18%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 28% 8%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 44% 26%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 60% 12%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 70% 34%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 92% 22%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 40%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 36% 42%, #fff 50%, transparent 51%);
  animation: twinkle 3.5s ease-in-out infinite alternate;
}
@keyframes twinkle { to { opacity: .35; } }
.grave__moon { position: absolute; top: 22px; right: 7%; width: 78px; height: 78px; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle at 35% 35%, #fffbe6, #f3e3a6 60%, #d9c27a); box-shadow: 0 0 40px 10px rgba(255,240,180,.35), 0 0 120px 30px rgba(255,240,180,.15); }
.grave__moon::after { content: ""; position: absolute; width: 16px; height: 16px; top: 40%; left: 22%; border-radius: 50%; background: rgba(170,150,90,.35); box-shadow: 26px 14px 0 -4px rgba(170,150,90,.3), 18px -16px 0 -6px rgba(170,150,90,.3); }
.grave__hills { position: absolute; left: -5%; right: -5%; bottom: 70px; height: 120px; z-index: -1; border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  background: color-mix(in srgb, var(--night1) 70%, #000); box-shadow: 40vw 20px 0 -10px color-mix(in srgb, var(--night1) 80%, #000); }
.grave__fence { position: absolute; left: 0; right: 0; bottom: 78px; height: 46px; z-index: -1; opacity: .55;
  background: repeating-linear-gradient(90deg, transparent 0 18px, #0a0c18 18px 24px), linear-gradient(transparent 10px, #0a0c18 10px 15px, transparent 15px 32px, #0a0c18 32px 37px, transparent 37px);
  -webkit-mask: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); mask: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); }
.grave__ground { position: absolute; left: 0; right: 0; bottom: 0; height: 84px; z-index: 0;
  background: linear-gradient(var(--grass), color-mix(in srgb, var(--grass) 60%, #000)); border-top: 3px solid #000; }
.grave__ground::before { content: ""; position: absolute; left: 0; right: 0; top: -9px; height: 9px;
  background: repeating-linear-gradient(90deg, transparent 0 4px, var(--grass) 4px 7px); -webkit-mask: linear-gradient(transparent, #000); mask: linear-gradient(transparent, #000); }

/* fuegos fatuos */
.grave__wisps { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.wisp { position: absolute; left: var(--x); bottom: 70px; width: 10px; height: 10px; border-radius: 50%; background: #9fe7ff; box-shadow: 0 0 10px 4px rgba(120,210,255,.7), 0 0 26px 10px rgba(120,210,255,.25); opacity: 0;
  animation: wisp var(--d) var(--dl) ease-in-out infinite; }
@keyframes wisp { 0% { translate: 0 0; opacity: 0; scale: .6; } 20% { opacity: .9; } 50% { translate: 18px -110px; scale: 1; } 80% { opacity: .6; } 100% { translate: -10px -220px; opacity: 0; scale: .4; } }

/* Gastly */
.grave__ghost { position: absolute; top: 28px; left: 8%; z-index: 3; width: 120px; pointer-events: none;
  animation: ghost-drift 16s ease-in-out infinite; }
.grave__ghost img { width: 100%; image-rendering: pixelated; filter: drop-shadow(0 0 14px rgba(190,120,255,.85)); opacity: .92; animation: ghost-bob 2.6s ease-in-out infinite; }
@keyframes ghost-drift { 0%, 100% { translate: 0 0; } 25% { translate: 22vw 30px; } 50% { translate: 48vw -6px; scale: -1 1; } 75% { translate: 20vw 40px; scale: -1 1; } }
@keyframes ghost-bob { 50% { translate: 0 -12px; opacity: .7; } }

/* fila de tumbas */
.grave__row { position: relative; z-index: 2; display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: 22px 34px; padding-bottom: 46px; }
.tomb { position: relative; width: 150px; outline: none; cursor: pointer; translate: 0 0; }
.js .grave:not(.is-in) .tomb { translate: 0 120%; opacity: 0; }
.grave.is-in .tomb { animation: tomb-up .8s calc(.15s + var(--i) * .16s) var(--bounce) both; }
@keyframes tomb-up { from { translate: 0 110%; opacity: 0; rotate: -4deg; } 70% { opacity: 1; } }
.tomb__stone {
  position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 10px 14px;
  background: linear-gradient(160deg, var(--stone), var(--stone2)); border: var(--stroke); border-radius: 70px 70px 10px 10px; box-shadow: 5px 5px 0 #000;
  color: #1a1d28; text-align: center; transition: rotate .4s var(--bounce), translate .4s var(--bounce);
}
.tomb__stone::before { /* grieta */ content: ""; position: absolute; top: 12px; right: 22px; width: 14px; height: 26px; border-left: 2px solid rgba(0,0,0,.35); border-bottom: 2px solid rgba(0,0,0,.25); rotate: 18deg; }
.tomb:nth-child(odd) .tomb__stone { rotate: -2.5deg; }
.tomb:nth-child(even) .tomb__stone { rotate: 2deg; }
.tomb__rip { font: 400 18px/1 var(--f-display); letter-spacing: .06em; color: #2b2f3d; text-shadow: 0 1px 0 rgba(255,255,255,.5); }
.tomb__img { width: 76px; height: 76px; object-fit: contain; filter: grayscale(1) contrast(1.05) brightness(.95) drop-shadow(2px 2px 0 rgba(0,0,0,.35)); opacity: .85; transition: filter .4s; }
.tomb__name { font: 400 20px/1.05 var(--f-display); }
.tomb__where { font-size: 12px; font-weight: 700; color: #3a3f50; }
.tomb__ep { margin-top: 4px; font-size: 12px; font-weight: 800; padding: 1px 9px; border-radius: 999px; border: 2px solid #000; background: #fff; }
.tomb--sol .tomb__ep { background: var(--grad-sol); color: #fff; text-shadow: 0 1px 0 #000; }
.tomb--luna .tomb__ep { background: var(--grad-luna); color: #fff; text-shadow: 0 1px 0 #000; }
.tomb__mound { position: absolute; z-index: 1; left: -12px; right: -12px; bottom: -14px; height: 30px; border-radius: 50%; background: color-mix(in srgb, var(--grass) 75%, #3a2a1a); border: 3px solid #000; }
.tomb__flowers { position: absolute; z-index: 3; bottom: -8px; left: 8px; display: flex; gap: 3px; }
.tomb__flowers i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #000; background: var(--c-sol); animation: sway 3s ease-in-out infinite; transform-origin: 50% 160%; }
.tomb--luna .tomb__flowers i { background: var(--c-luna); }
.tomb__flowers i:nth-child(2) { translate: 0 -6px; animation-delay: -.8s; background: #fff; }
.tomb__flowers i:nth-child(3) { animation-delay: -1.6s; }
@keyframes sway { 50% { rotate: 14deg; } }
.tomb__candle { position: absolute; z-index: 3; bottom: -6px; right: 10px; width: 12px; height: 22px; border: 2px solid #000; border-radius: 3px; background: #fdf4d8; }
.tomb__candle i { position: absolute; left: 50%; bottom: 100%; width: 9px; height: 14px; margin-left: -4.5px; border-radius: 50% 50% 50% 50% / 65% 65% 35% 35%;
  background: radial-gradient(circle at 50% 70%, #fff6b0, #ffb12e 55%, #ff6a1a); box-shadow: 0 0 12px 4px rgba(255,180,60,.6); transform-origin: 50% 100%; animation: flicker 1.1s ease-in-out infinite alternate; }
.tomb:nth-child(2n) .tomb__candle i { animation-duration: .8s; }
@keyframes flicker { 0% { scale: 1 1; rotate: -3deg; } 40% { scale: .9 1.12; rotate: 3deg; } 100% { scale: 1.05 .92; rotate: -1deg; opacity: .85; } }

/* espíritu que sube */
.tomb__spirit { position: absolute; z-index: 4; left: 50%; top: 10px; width: 90px; margin-left: -45px; pointer-events: none; opacity: 0;
  filter: grayscale(1) brightness(1.8) drop-shadow(0 0 10px rgba(180,220,255,.9)); transition: opacity .4s, translate .9s cubic-bezier(.2,.8,.3,1); }
.tomb:hover .tomb__spirit, .tomb:focus-visible .tomb__spirit, .tomb.is-open .tomb__spirit { opacity: .55; translate: 0 -84px; animation: spirit 2.4s .9s ease-in-out infinite; }
@keyframes spirit { 50% { translate: 6px -96px; opacity: .35; } }
.tomb:hover .tomb__stone, .tomb:focus-visible .tomb__stone, .tomb.is-open .tomb__stone { rotate: 0deg; translate: 0 -4px; }
.tomb:hover .tomb__img, .tomb:focus-visible .tomb__img, .tomb.is-open .tomb__img { filter: grayscale(.2) drop-shadow(0 0 8px rgba(255,255,255,.7)); opacity: 1; }
.tomb:focus-visible .tomb__stone { outline: 3px solid var(--sun); outline-offset: 4px; }

/* ficha */
.tomb__card { position: absolute; z-index: 6; left: 50%; bottom: calc(100% + 10px); width: 210px; translate: -50% 10px; opacity: 0; pointer-events: none;
  display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; font-size: 13px; line-height: 1.3;
  background: var(--surface); color: var(--text); border: var(--stroke); border-radius: 14px; box-shadow: 4px 4px 0 #000; transition: opacity .25s, translate .3s var(--bounce); }
.tomb__card > b { font: 400 20px/1 var(--f-display); }
.tomb__who { font-weight: 800; }
.tomb__who--sol { color: var(--name-sol); }
.tomb__who--luna { color: var(--name-luna); }
.tomb:hover .tomb__card, .tomb:focus-visible .tomb__card, .tomb.is-open .tomb__card { opacity: 1; translate: -50% 0; }
.tomb:hover, .tomb:focus-visible, .tomb.is-open { z-index: 5; }

/* niebla */
.grave__fog { position: absolute; left: 0; right: 0; bottom: 0; height: 120px; z-index: 4; pointer-events: none; overflow: hidden; }
.grave__fog span { position: absolute; bottom: -30px; left: -50%; width: 200%; height: 110px; opacity: .45;
  background: radial-gradient(40% 60% at 20% 60%, rgba(220,225,255,.55), transparent 70%), radial-gradient(35% 55% at 60% 70%, rgba(220,225,255,.45), transparent 70%), radial-gradient(30% 50% at 90% 60%, rgba(220,225,255,.5), transparent 70%);
  animation: fog 26s linear infinite; }
.grave__fog span + span { bottom: -50px; opacity: .3; animation-duration: 38s; animation-direction: reverse; }
@keyframes fog { to { translate: 50% 0; } }
.grave__empty { color: #dfe3ff; font: 400 24px/1.2 var(--f-display); text-align: center; padding: 40px 0 60px; }

.grave__sum { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 14px; font-size: 14px; }
.grave__total { font: 400 22px/1 var(--f-display); }
.grave__total b { font-weight: 400; font-size: 32px; color: var(--red); -webkit-text-stroke: 1.5px #000; paint-order: stroke fill; }
.grave__by { padding: 3px 12px; border: 2px solid var(--line); border-radius: 999px; font-weight: 700; }
.grave__by--sol { box-shadow: inset 4px 0 0 var(--c-sol); }
.grave__by--luna { box-shadow: inset 4px 0 0 var(--c-luna); }
.grave__by.is-dim { opacity: .45; }
.grave__last { color: var(--text-soft); }

.grave:not(.is-in) .grave__ghost, .is-off .grave__ghost, .is-off .wisp, .is-off .grave__fog span, .is-off .tomb__candle i, .is-off .tomb__flowers i, .is-off .grave__scene::before { animation-play-state: paused; }

@media (max-width: 720px) {
  .grave__scene { padding: 110px 10px 0; min-height: 340px; }
  .grave__row { gap: 26px 18px; }
  .tomb { width: 132px; }
  .tomb__img { width: 62px; height: 62px; }
  .grave__ghost { width: 84px; }
  .grave__moon { width: 56px; height: 56px; }
  @keyframes ghost-drift { 0%, 100% { translate: 0 0; } 50% { translate: 50vw 10px; scale: -1 1; } }
}
@media (prefers-reduced-motion: reduce) {
  .grave .tomb, .grave.is-in .tomb { animation: none; translate: 0 0; opacity: 1; }
  .grave__ghost, .grave__ghost img, .wisp, .grave__fog span, .tomb__candle i, .tomb__flowers i, .grave__scene::before, .tomb__spirit { animation: none !important; }
  .wisp { opacity: .5; }
}
.grave__scene { padding-top: 165px; }
@media (max-width: 720px) { .grave__scene { padding-top: 150px; } }
.grave__ghost { z-index: 1; }
@media (max-width: 720px) {
  .grave__row { gap: 30px 12px; }
  .tomb { width: min(124px, 42vw); }
  .tomb__stone { padding: 14px 6px 12px; }
  .tomb__name { font-size: 17px; }
  .tomb__card { width: 180px; }
  .tomb:nth-child(odd) .tomb__card { left: 0; translate: 0 10px; }
  .tomb:nth-child(even) .tomb__card { left: auto; right: 0; translate: 0 10px; }
  .tomb:nth-child(n):hover .tomb__card, .tomb:nth-child(n).is-open .tomb__card, .tomb:nth-child(n):focus-visible .tomb__card { translate: 0 0; }
}

/* Botón «Mostrar más» de las listas largas */
.morebtn {
  display: block; margin: 14px auto 0; cursor: pointer; border: var(--stroke); border-radius: 999px; padding: 8px 18px;
  background: var(--surface); color: inherit; font: inherit; font-weight: 800; font-size: 14px; box-shadow: 3px 3px 0 var(--line);
}
.morebtn:hover { translate: -1px -1px; box-shadow: 4px 4px 0 var(--line); }
.morebtn:active { translate: 2px 2px; box-shadow: 1px 1px 0 var(--line); }
.morebtn[aria-expanded="true"] { background: var(--bg-2); }

/* ── Rendimiento: efectos que repintaban la pantalla entera en cada cuadro ── */
body::before { display: none; }                       /* grano SVG a pantalla completa con mezcla */
:root[data-theme="dark"] body { background-attachment: scroll; }
.aur { animation: fade-in 1.2s ease both; filter: blur(50px); }  /* sin deriva infinita del desenfoque */
.map .route-fill { animation: none; }
.map.is-in .zone__in { animation-delay: min(.9s, calc(.3s + var(--i) * 12ms)); }
