:root {
  --bg: #0c0905;
  --bg-2: #14100a;
  --card: #1a140b;
  --card-2: #261d0f;
  --line: #4f3d1b;
  --text: #f7edd3;
  --muted: #b9a577;
  --gold: #e9bd4f;
  --gold-hi: #fff0b8;
  --gold-lo: #a8741a;
  --accent: #e9bd4f;
  --accent-ink: #2a1c03;
  --gold-grad: linear-gradient(135deg, #fff0b8 0%, #e9bd4f 45%, #b9801f 100%);
  --pitch-1: #1d5a38;
  --pitch-2: #184f31;
  --pitch-line: rgba(246, 217, 140, .5);
  --danger: #ff7a62;
  --ok: #8fe08a;
  --radius: 16px;
  --display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --myth: "Cinzel", Georgia, "Times New Roman", serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(900px 480px at 50% -160px, rgba(233,189,79,.20) 0%, rgba(233,189,79,0) 70%),
    radial-gradient(700px 400px at 100% 100%, rgba(168,116,26,.12) 0%, rgba(168,116,26,0) 70%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--body);
  line-height: 1.45;
  min-height: 100vh;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- Cabecera ---------- */
.topbar {
  max-width: 1360px; margin: 0 auto; padding: 14px 16px 6px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 12px; cursor: pointer; border-radius: 12px; transition: filter .15s; }
.brand:hover { filter: brightness(1.12); }
.brand:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.brand-crest { display: grid; filter: drop-shadow(0 0 10px rgba(233,189,79,.45)); }
.brand-crest img { display: block; width: 92px; height: auto; }
.brand h1 {
  margin: 0; font-family: var(--myth); font-weight: 800; font-size: 30px; line-height: 1; letter-spacing: 1.5px; text-transform: uppercase;
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.top-right { display: flex; align-items: center; gap: 10px; }
.record { font-size: 12px; color: var(--gold); background: rgba(233,189,79,.08); border: 1px solid rgba(233,189,79,.3); padding: 6px 10px; border-radius: 999px; white-space: nowrap; }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--card); }
.lang-btn { font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .5px; color: var(--muted); background: transparent; border: 0; padding: 7px 12px; cursor: pointer; }
.lang-btn[aria-pressed="true"] { background: var(--gold-grad); color: var(--accent-ink); }

/* ---------- Publicidad ---------- */
.ad-slot {
  margin: 10px auto; max-width: 1360px; min-height: 60px;
  display: flex; align-items: center; justify-content: center; text-align: center;
  color: var(--muted); font-size: 12px; letter-spacing: .3px;
  border: 1px dashed var(--line); border-radius: 12px; background: rgba(255,255,255,.02);
}
.ad-top, .ad-bottom { width: calc(100% - 32px); min-height: 90px; }
.ad-side { min-height: 250px; width: 100%; margin: 14px 0 0; }
/* Espacio sin bloque de anuncio todavía: no se muestra el recuadro vacío */
.ad-slot:not(:has(.adsbygoogle)) { display: none; }

/* ---------- Estructura ---------- */
.app { max-width: 1360px; margin: 0 auto; padding: 8px 16px 24px; }
.screen { display: none; }
.screen.active { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.draft-layout, .cup-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: 18px; align-items: start; }

/* ---------- Cancha ---------- */
.pitch-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; box-shadow: 0 0 0 1px rgba(233,189,79,.06), 0 14px 40px rgba(0,0,0,.4); }
.pitch-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.chip { font-family: var(--display); font-size: 20px; font-weight: 700; letter-spacing: .5px; background: var(--gold-grad); color: var(--accent-ink); padding: 2px 14px; border-radius: 999px; }
.chip-dark { background: var(--card-2); color: var(--text); border: 1px solid var(--line); }

/* ===== Cancha 3D ===== */
/* .pitch = escena con perspectiva · .plane = el césped inclinado · .slot = camisetas "paradas" sobre el césped */
.pitch {
  --tilt: 43deg;
  position: relative; width: 100%; aspect-ratio: 1 / 1.05;
  perspective: 1000px; perspective-origin: 50% 26%;
  border-radius: 12px;
  background:
    radial-gradient(ellipse 70% 45% at 50% 38%, rgba(233,189,79,.14), rgba(233,189,79,0) 70%),
    linear-gradient(180deg, #14100a 0%, #0c0905 100%);
  border: 1px solid rgba(233,189,79,.18);
}
.plane {
  --u: 6px;                                   /* 1 metro de cancha (lo ajusta game.js según el ancho) */
  position: absolute; left: 8%; width: 84%; bottom: 6%;
  aspect-ratio: 68 / 105;                     /* cancha reglamentaria 105 × 68 m */
  transform-origin: 50% 100%; transform: rotateX(var(--tilt));
  transform-style: preserve-3d;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.035) 0 9.09%, rgba(0,0,0,0) 9.09% 18.18%),
    repeating-linear-gradient(0deg, var(--pitch-1) 0 9.09%, var(--pitch-2) 9.09% 18.18%);
  border: 2px solid var(--pitch-line);
  box-shadow: inset 0 0 70px rgba(0,0,0,.35);
}
/* luz suave sobre el césped (da volumen) */
.plane::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 80% 60% at 50% 55%, rgba(255,240,184,.10), rgba(0,0,0,0) 70%);
}
/* canto de tierra del bloque de césped */
.plane::after {
  content: ""; position: absolute; left: -2px; right: -2px; top: 100%; height: 5.2%;
  margin-top: 2px; background: linear-gradient(180deg, #6b4a24 0%, #4a3217 55%, #2b1c0c 100%);
  border-bottom: 2px solid #1a1007; border-radius: 0 0 6px 6px;
  transform-origin: 50% 0; transform: rotateX(-90deg);
  box-shadow: inset 0 3px 0 rgba(95,150,70,.55);
}
/* sombra del bloque en el piso */
.pitch-shadow { position: absolute; left: 6%; right: 6%; bottom: 1.2%; height: 5%; border-radius: 50%; background: radial-gradient(ellipse, rgba(0,0,0,.55), rgba(0,0,0,0) 70%); pointer-events: none; }

.pitch-lines { position: absolute; inset: 0; pointer-events: none; }
.pitch-lines > * { position: absolute; border: 2px solid var(--pitch-line); pointer-events: none; }
/* medidas reglamentarias: área 40,3 × 16,5 m · área chica 18,3 × 5,5 m · punto penal a 11 m · círculos de 9,15 m */
.box { left: 20.35%; width: 59.3%; height: 15.7%; }
.box-top { top: -2px; border-top: 0; }
.box-bottom { bottom: -2px; border-bottom: 0; }
.six { left: 36.55%; width: 26.9%; height: 5.2%; }
.six-top { top: -2px; border-top: 0; }
.six-bottom { bottom: -2px; border-bottom: 0; }
.halfway { left: 0; right: 0; top: 50%; border-width: 2px 0 0; }
.circle { left: 50%; top: 50%; width: 26.9%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; }
.arc { left: 36.55%; width: 26.9%; aspect-ratio: 1; border-radius: 50%; }
.arc-top { top: calc(1.76% - 1px); clip-path: inset(80% 0 0 0); }
.arc-bottom { bottom: calc(1.76% - 1px); clip-path: inset(0 0 80% 0); }
.pitch-lines > .spot { width: 1.3%; aspect-ratio: 1; border-radius: 50%; border: 0; background: var(--pitch-line); transform: translate(-50%, -50%); left: 50%; }
.spot-top { top: 10.5%; } .spot-bottom { top: 89.5%; } .spot-mid { top: 50%; }
.corner { width: 3.2%; aspect-ratio: 1; }
.c-tl { left: 0; top: 0; border-width: 0 2px 2px 0; border-radius: 0 0 100% 0; }
.c-tr { right: 0; top: 0; border-width: 0 0 2px 2px; border-radius: 0 0 0 100%; }
.c-bl { left: 0; bottom: 0; border-width: 2px 2px 0 0; border-radius: 0 100% 0 0; }
.c-br { right: 0; bottom: 0; border-width: 2px 0 0 2px; border-radius: 100% 0 0 0; }

/* Arcos en 3D (proporción reglamentaria 7,32 × 2,44 m, agrandados ×2 para que se vean) con red: armados con medidas en metros (--u × 2) */
.goalwrap { --g: calc(var(--u) * 2); position: absolute; left: 50%; width: calc(var(--g) * 7.32); height: 0; margin-left: calc(var(--g) * -3.66); transform-style: preserve-3d; pointer-events: none; }
.goalwrap-top { top: 0; }
.goalwrap-bottom { top: 100%; transform-origin: 50% 0; transform: rotate(180deg); }
.goal3d { position: absolute; left: 0; top: calc(var(--g) * -2.44); width: 100%; height: calc(var(--g) * 2.44); transform-origin: 50% 100%; transform: rotateX(-90deg); transform-style: preserve-3d; }
.goal3d i, .g-shadow { position: absolute; display: block; }
.g-shadow { left: -4%; width: 108%; top: calc(var(--g) * -2.2); height: calc(var(--g) * 2.2); background: radial-gradient(ellipse at 50% 55%, rgba(0,0,0,.5), rgba(0,0,0,0) 72%); filter: blur(2px); }
.g-front { inset: 0; border: max(2.5px, calc(var(--g) * .36)) solid #fbf6e6; border-bottom: 0; border-radius: 2px 2px 0 0; box-shadow: 0 0 8px rgba(255,255,255,.35); }
.g-back, .g-left, .g-right, .g-roof {
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.62) 0 1px, rgba(255,255,255,0) 1px calc(var(--g) * .34)),
    repeating-linear-gradient(90deg, rgba(255,255,255,.62) 0 1px, rgba(255,255,255,0) 1px calc(var(--g) * .34)),
    rgba(255,255,255,.07);
}
.g-back { inset: 0; transform: translateZ(calc(var(--g) * -2)); border: 1px solid rgba(255,255,255,.55); border-bottom: 0; }
.g-left { left: 0; top: 0; width: calc(var(--g) * 2); height: 100%; transform-origin: 0 50%; transform: rotateY(90deg); }
.g-right { right: 0; top: 0; width: calc(var(--g) * 2); height: 100%; transform-origin: 100% 50%; transform: rotateY(-90deg); }
.g-roof { left: 0; top: 0; width: 100%; height: calc(var(--g) * 2); transform-origin: 50% 0; transform: rotateX(-90deg); }

.slot {
  position: absolute; transform-origin: 50% 100%;
  transform: translate(-50%, -100%);              /* la posición y la escala las calcula game.js (layoutSlots) */
  width: 18%; min-width: 62px; max-width: 104px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: 0; padding: 0; cursor: pointer; color: inherit; font: inherit;
}
.slot-dot {
  width: clamp(44px, 9vw, 64px); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 800; font-size: clamp(15px, 2.6vw, 20px); letter-spacing: .5px;
  background: rgba(12, 9, 5, .72); border: 2px dashed rgba(246,217,140,.8); color: var(--gold-hi);
  transition: transform .15s, box-shadow .15s, background .15s;
}
.slot:hover .slot-dot { transform: scale(1.08); }
.slot.selected .slot-dot { border-style: solid; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(233,189,79,.35); background: rgba(233,189,79,.2); }
.slot.filled { cursor: default; }
.slot-ground {
  position: absolute; left: 50%; bottom: 0; width: 78%; aspect-ratio: 2.4; pointer-events: none; z-index: -1;
  transform: translate(-50%, 50%);
  background: radial-gradient(ellipse, rgba(0,0,0,.5) 0%, rgba(0,0,0,0) 70%);
}
.slot-name:empty { visibility: hidden; }         /* lugar vacío: sin cajita oscura debajo del círculo */
.slot-shirt { width: clamp(46px, 9.6vw, 72px); line-height: 0; }
.slot-shirt svg, .team-shirt svg { width: 100%; height: auto; display: block; }
.slot-name {
  font-size: clamp(11px, 2vw, 13px); font-weight: 700; text-align: center; line-height: 1.15;
  background: rgba(12,9,5,.82); padding: 2px 7px; border-radius: 6px; width: max-content; max-width: 124px;
  white-space: nowrap; min-height: 1em; color: #fff3c9; text-shadow: 0 1px 1px rgba(0,0,0,.9);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
.slot-ovr { position: absolute; top: -7px; right: -8px; font-size: 14px; line-height: 1.25; font-weight: 800; background: var(--gold-grad); color: var(--accent-ink); border-radius: 999px; padding: 0 7px; box-shadow: 0 2px 5px rgba(0,0,0,.5); }
.slot.pop .slot-shirt { animation: pop .45s ease; }
@keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }

/* Destello leve al acertar */
.slot.flash::before {
  content: ""; position: absolute; left: 50%; top: 38%; width: 150%; aspect-ratio: 1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255,240,184,.95) 0%, rgba(233,189,79,.55) 30%, rgba(233,189,79,0) 68%);
  transform: translate(-50%, -50%) scale(.2); opacity: 0; animation: flash .95s ease-out forwards;
}
.slot.flash::after {
  content: "✦"; position: absolute; left: 62%; top: -6px; font-size: 16px; color: var(--gold-hi); pointer-events: none;
  text-shadow: 0 0 8px #fff0b8, 0 0 14px #e9bd4f; opacity: 0; animation: twinkle .95s ease-out forwards;
}
@keyframes flash { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.2); } 25% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.1); } }
@keyframes twinkle { 0% { opacity: 0; transform: scale(.3) rotate(0); } 35% { opacity: 1; transform: scale(1.2) rotate(35deg); } 100% { opacity: 0; transform: scale(.6) rotate(90deg); } }

.shake { animation: shake .35s; }
@keyframes shake { 0%,100% { transform: none; } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* ===== Elegir dificultad ===== */
.mode-card { max-width: 720px; margin: 24px auto; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 30px 22px 26px; box-shadow: 0 0 60px rgba(233,189,79,.1); }
.mode-card h2 { font-family: var(--myth); font-size: 32px; margin: 0 0 6px; text-transform: uppercase; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mode-card > p { color: var(--muted); margin: 0 0 22px; }
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mode-opt {
  font: inherit; color: var(--text); cursor: pointer; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 16px 20px;
  background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1.5px solid var(--line); border-radius: 16px;
  transition: transform .12s, border-color .15s, box-shadow .15s;
}
.mode-opt strong { font-family: var(--display); font-size: 34px; letter-spacing: .5px; color: var(--gold-hi); line-height: 1.1; }
.mode-opt .mode-desc { color: var(--muted); font-size: 13px; line-height: 1.45; }
.mode-opt .mode-tag { font-size: 12px; font-weight: 700; letter-spacing: .4px; color: var(--accent-ink); background: var(--gold-grad); padding: 3px 12px; border-radius: 999px; }
.mode-opt.mode-hard .mode-tag { background: linear-gradient(135deg, #ffb4a3, #ff7a62 55%, #c8442c); color: #2a0d06; }
.mode-opt:hover, .mode-opt:focus-visible { transform: translateY(-3px); border-color: var(--gold); box-shadow: 0 0 0 1px rgba(233,189,79,.25), 0 0 28px rgba(233,189,79,.28), 0 14px 30px rgba(0,0,0,.45); outline: none; }
.mode-opt.mode-hard:hover, .mode-opt.mode-hard:focus-visible { border-color: var(--danger); box-shadow: 0 0 0 1px rgba(255,122,98,.25), 0 0 28px rgba(255,122,98,.25), 0 14px 30px rgba(0,0,0,.45); }
.chip-mode { font-size: 15px; background: rgba(233,189,79,.1); color: var(--gold); border: 1px solid rgba(233,189,79,.4); }
.chip-mode.hard { background: rgba(255,122,98,.1); color: var(--danger); border-color: rgba(255,122,98,.45); }
#skip-btn[hidden] { display: none; }
#skip-btn:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 560px) { .mode-grid { grid-template-columns: 1fr; } .mode-card h2 { font-size: 26px; } }

/* ===== Elegir posición (jugador polivalente) ===== */
.slot.pick .slot-dot {
  border-style: solid; border-color: var(--gold-hi); color: #fff; background: rgba(233,189,79,.3);
  box-shadow: 0 0 0 4px rgba(233,189,79,.5), 0 0 22px 7px rgba(233,189,79,.7); position: relative;
}
.slot.pick .slot-dot::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 3px solid rgba(255,240,184,.9); animation: pickRing 1.1s ease-out infinite; }
@keyframes pickRing { from { transform: scale(.9); opacity: .95; } to { transform: scale(1.4); opacity: 0; } }
.slot.pick .slot-ground, .slot.selected .slot-ground { display: none; }      /* el aro dorado ya brilla solo: nada de brillo extra debajo */
.slot.dim { opacity: .35; filter: grayscale(.45); cursor: not-allowed; transition: opacity .2s; }
.slot.dim:hover .slot-dot { transform: none; }
@keyframes pickPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 4px rgba(233,189,79,.5), 0 0 22px 6px rgba(233,189,79,.65); }
  50% { transform: scale(1.14); box-shadow: 0 0 0 7px rgba(233,189,79,.3), 0 0 34px 12px rgba(255,240,184,.85); }
}
.pos-chooser {
  margin: 10px 0 14px; padding: 14px; border-radius: 14px;
  background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1.5px solid var(--gold);
  box-shadow: 0 0 0 1px rgba(233,189,79,.15), 0 0 26px rgba(233,189,79,.25), 0 14px 30px rgba(0,0,0,.45);
}
.pos-chooser.show { animation: fade .25s ease; }
.pos-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pos-head strong {
  font-family: var(--display); font-size: 21px; letter-spacing: .5px;
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.pos-cancel {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: transparent;
  color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; padding: 0;
}
.pos-cancel:hover { border-color: var(--gold); color: var(--gold-hi); }
.pos-sub { margin: 6px 0 12px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.pos-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.pos-opt {
  font: inherit; cursor: pointer; text-align: center; padding: 10px 8px; border-radius: 12px;
  background: var(--card); border: 1.5px solid var(--line); color: var(--text);
  display: flex; flex-direction: column; gap: 2px; transition: transform .1s, border-color .15s, background .15s;
}
.pos-opt b { font-family: var(--display); font-size: 24px; letter-spacing: .5px; color: var(--gold-hi); }
.pos-opt span { font-size: 11px; color: var(--muted); }
.pos-opt:hover, .pos-opt:focus-visible { border-color: var(--gold); background: rgba(233,189,79,.14); transform: translateY(-1px); outline: none; }
@media (prefers-reduced-motion: reduce) { .slot.pick .slot-dot::after { animation: none; } .pos-chooser.show { animation: none; } }

.pitch-mini { aspect-ratio: 1 / 1.05; }
.pitch-mini .slot { cursor: default; width: 20%; }
.pitch-mini .slot-shirt { width: clamp(24px, 4.6vw, 34px); }
.pitch-mini .slot-ground { display: none; }
.pitch-mini .slot-name { font-size: 8.5px; padding: 1px 4px; }
.pitch-mini .slot-ovr { display: none; }

/* ---------- Panel ---------- */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: 0 14px 40px rgba(0,0,0,.4); }
.team-card { display: flex; align-items: center; gap: 14px; padding: 12px; background: var(--card-2); border: 1px solid var(--line); border-radius: 14px; }
.team-shirt {
  width: 82px; height: 82px; flex: none; line-height: 0; display: grid; place-items: center; box-sizing: border-box; padding: 11px; border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #fffdf2 0%, #f3e8c4 62%, #dcc88a 100%);
  border: 2px solid var(--gold); box-shadow: 0 0 0 2px rgba(0,0,0,.45), 0 0 18px rgba(233,189,79,.35), 0 6px 14px rgba(0,0,0,.5);
}
.team-shirt img.team-crest { width: 100%; height: 100%; object-fit: contain; display: block; filter: drop-shadow(0 2px 2px rgba(0,0,0,.25)); }
.team-shirt.no-crest { width: 78px; height: auto; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; filter: drop-shadow(0 4px 6px rgba(0,0,0,.55)); }
.team-info { display: flex; flex-direction: column; min-width: 0; }
.team-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.team-info strong { font-family: var(--myth); font-size: 24px; line-height: 1.1; color: var(--gold-hi); }
.team-league { font-size: 13px; color: var(--gold); }
.team-card.swap { animation: fade .35s ease; }

.hint { color: var(--muted); font-size: 13px; margin: 12px 2px; }

.input-row { display: flex; gap: 8px; }
input[type="text"] {
  flex: 1; min-width: 0; font: inherit; font-size: 16px; color: var(--text);
  background: #100c06; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; outline: none;
}
input[type="text"]:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(233,189,79,.2); }
.suggestions { list-style: none; margin: 6px 0 0; padding: 4px; background: #100c06; border: 1px solid var(--line); border-radius: 12px; }
.suggestions li { padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: 15px; }
.suggestions li:hover, .suggestions li.active { background: var(--card-2); }

.btn { font: inherit; font-weight: 700; border: 0; border-radius: 12px; padding: 12px 18px; cursor: pointer; transition: transform .1s, filter .15s; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--gold-grad); color: var(--accent-ink); box-shadow: 0 4px 16px rgba(233,189,79,.25); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.07); }
.btn-ghost { background: transparent; color: var(--text); border: 1.5px solid var(--line); }
.btn-ghost:hover:not(:disabled) { border-color: var(--gold); color: var(--gold-hi); }

.message { min-height: 44px; margin: 12px 2px 4px; font-size: 14px; font-weight: 500; }
.message.ok { color: var(--ok); }
.message.err { color: var(--danger); }
.panel-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Mundial ---------- */
.stages { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 14px; overflow-x: auto; }
.stages li {
  flex: 1; min-width: 62px; text-align: center; padding: 8px 4px; border-radius: 10px; font-size: 12px; font-weight: 600;
  background: var(--card); border: 1px solid var(--line); color: var(--muted); white-space: nowrap;
}
.stages li.current { background: var(--gold-grad); color: var(--accent-ink); border-color: var(--gold); }
.stages li.won { background: rgba(143,224,138,.12); color: var(--ok); border-color: rgba(143,224,138,.4); }
.stages li.draw { background: rgba(233,189,79,.12); color: var(--gold); border-color: rgba(233,189,79,.4); }
.stages li.lost { background: rgba(255,122,98,.12); color: var(--danger); border-color: rgba(255,122,98,.4); }

.match-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: 0 14px 40px rgba(0,0,0,.4); }
.match-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.stage-name { font-family: var(--myth); font-size: 22px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--gold-hi); }
.difficulty { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); }
.difficulty.easy { color: var(--ok); } .difficulty.even { color: var(--gold); } .difficulty.hard { color: var(--danger); }

.versus { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; text-align: center; }
.side { display: flex; flex-direction: column; gap: 2px; align-items: center; }
.side strong { font-family: var(--display); font-size: 28px; line-height: 1.05; overflow-wrap: anywhere; }
.side-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.ovr { display: inline-block; margin-top: 4px; font-weight: 700; font-size: 13px; background: var(--card-2); border: 1px solid var(--line); padding: 3px 10px; border-radius: 999px; }
.scoreboard { background: #090703; border: 1px solid var(--line); border-radius: 14px; padding: 8px 18px 6px; font-family: var(--display); font-size: 52px; font-weight: 800; line-height: 1; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 6px; min-width: 130px; color: var(--gold-hi); }
.scoreboard .dash { color: var(--muted); }
.scoreboard small { width: 100%; text-align: center; font-family: var(--body); font-size: 12px; font-weight: 600; color: var(--gold); letter-spacing: .5px; }

.opp-lineup { margin: 16px 0 6px; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.opp-lineup span { font-size: 12px; background: var(--card-2); border: 1px solid var(--line); padding: 3px 8px; border-radius: 8px; color: var(--muted); }

.events { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 4px; min-height: 8px; }
.events li { font-size: 14px; padding: 6px 10px; border-radius: 8px; background: rgba(255,255,255,.04); animation: fade .25s ease; }
.events li.mine { border-left: 3px solid var(--gold); }
.events li.theirs { border-left: 3px solid var(--danger); }
.match-result { font-weight: 700; margin: 14px 0 0; min-height: 22px; font-size: 17px; }
.match-result.win { color: var(--ok); } .match-result.lose { color: var(--danger); } .match-result.draw { color: var(--gold); }
.match-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }

.group-box { margin-top: 14px; padding: 12px; background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; }
.group-box h3 { margin: 0 0 8px; font-family: var(--myth); font-size: 15px; letter-spacing: 1px; text-transform: uppercase; color: var(--gold); }
.group-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.group-table th { text-align: center; color: var(--muted); font-weight: 600; padding: 4px 6px; border-bottom: 1px solid var(--line); }
.group-table th:nth-child(2), .group-table td:nth-child(2) { text-align: left; }
.group-table td { text-align: center; padding: 6px; border-bottom: 1px solid rgba(79,61,27,.5); }
.group-table tr.me td { color: var(--gold-hi); font-weight: 700; background: rgba(233,189,79,.1); }
.group-table tr.qual td:first-child { box-shadow: inset 3px 0 0 var(--ok); }
.group-note { margin: 8px 0 0; font-size: 13px; font-weight: 600; min-height: 18px; }
.group-note.win { color: var(--ok); } .group-note.lose { color: var(--danger); }

.mini-pitch-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.mini-pitch-wrap h2 { margin: 0 0 10px; font-family: var(--myth); font-size: 16px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--gold); }

/* ---------- Final ---------- */
.end-card { max-width: 560px; margin: 24px auto; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 28px 22px; box-shadow: 0 0 60px rgba(233,189,79,.1); }
.end-card h2 { font-family: var(--myth); font-size: 32px; margin: 6px 0; text-transform: uppercase; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.end-card p { color: var(--muted); margin: 0 0 14px; }
.history { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.history li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--card-2); font-size: 14px; }
.history li.w b { color: var(--ok); } .history li.l b { color: var(--danger); } .history li.d b { color: var(--gold); }

/* ---------- Nombre del equipo ---------- */
.name-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 18px; box-shadow: 0 14px 40px rgba(0,0,0,.4); }
.name-box h2 { margin: 0 0 6px; font-family: var(--myth); font-size: 24px; letter-spacing: 1px; text-transform: uppercase; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.name-box p { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.name-box .message { min-height: 22px; margin-top: 10px; }

/* ---------- Marcas de gol (sin emojis) ---------- */
.events li { display: flex; align-items: center; gap: 8px; }
.events .min { font-family: var(--display); font-weight: 700; font-size: 15px; color: var(--gold); min-width: 34px; }
.goal-dot { width: 17px; height: 17px; border-radius: 50%; background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%22-50 -50 100 100%22%3E%3Cdefs%3E%3CradialGradient id=%22b%22 cx=%22.36%22 cy=%22.32%22 r=%22.75%22%3E%3Cstop offset=%220%22 stop-color=%22%23fff%22/%3E%3Cstop offset=%22.7%22 stop-color=%22%23eceff3%22/%3E%3Cstop offset=%221%22 stop-color=%22%23bfc5ce%22/%3E%3C/radialGradient%3E%3CradialGradient id=%22s%22 cx=%22.5%22 cy=%22.5%22 r=%22.5%22%3E%3Cstop offset=%22.55%22 stop-color=%22%230a0e18%22 stop-opacity=%220%22/%3E%3Cstop offset=%221%22 stop-color=%22%230a0e18%22 stop-opacity=%22.5%22/%3E%3C/radialGradient%3E%3CradialGradient id=%22h%22 cx=%22.3%22 cy=%22.25%22 r=%22.4%22%3E%3Cstop offset=%220%22 stop-color=%22%23fff%22 stop-opacity=%22.8%22/%3E%3Cstop offset=%221%22 stop-color=%22%23fff%22 stop-opacity=%220%22/%3E%3C/radialGradient%3E%3CclipPath id=%22c%22%3E%3Ccircle r=%2247%22/%3E%3C/clipPath%3E%3C/defs%3E%3Ccircle r=%2247%22 fill=%22url%28%23b%29%22/%3E%3Cg clip-path=%22url%28%23c%29%22 stroke=%22%23283040%22 stroke-width=%222.6%22 stroke-linecap=%22round%22%3E%3Cpath d=%22M0.0 -16.0 L0.0 -30.0%22/%3E%3Cpath d=%22M0.0 -30.0 L22.9 -31.6 L28.5 -9.3%22 fill=%22none%22/%3E%3Cpath d=%22M15.2 -4.9 L28.5 -9.3%22/%3E%3Cpath d=%22M28.5 -9.3 L37.1 12.1 L17.6 24.3%22 fill=%22none%22/%3E%3Cpath d=%22M9.4 12.9 L17.6 24.3%22/%3E%3Cpath d=%22M17.6 24.3 L0.0 39.0 L-17.6 24.3%22 fill=%22none%22/%3E%3Cpath d=%22M-9.4 12.9 L-17.6 24.3%22/%3E%3Cpath d=%22M-17.6 24.3 L-37.1 12.1 L-28.5 -9.3%22 fill=%22none%22/%3E%3Cpath d=%22M-15.2 -4.9 L-28.5 -9.3%22/%3E%3Cpath d=%22M-28.5 -9.3 L-22.9 -31.6 L-0.0 -30.0%22 fill=%22none%22/%3E%3C/g%3E%3Cg clip-path=%22url%28%23c%29%22 fill=%22%231a1e27%22 stroke=%22%230b0d12%22 stroke-width=%221.5%22 stroke-linejoin=%22round%22%3E%3Cpolygon points=%220.00%2C-16.00 15.22%2C-4.94 9.40%2C12.94 -9.40%2C12.94 -15.22%2C-4.94%22/%3E%3Cpolygon points=%2217.63%2C-24.27 11.46%2C-43.28 27.63%2C-55.02 43.79%2C-43.28 37.62%2C-24.27%22/%3E%3Cpolygon points=%2228.53%2C9.27 44.70%2C-2.48 60.87%2C9.27 54.69%2C28.28 34.71%2C28.28%22/%3E%3Cpolygon points=%22-0.00%2C30.00 16.17%2C41.75 9.99%2C60.75 -9.99%2C60.75 -16.17%2C41.75%22/%3E%3Cpolygon points=%22-28.53%2C9.27 -34.71%2C28.28 -54.69%2C28.28 -60.87%2C9.27 -44.70%2C-2.48%22/%3E%3Cpolygon points=%22-17.63%2C-24.27 -37.62%2C-24.27 -43.79%2C-43.28 -27.63%2C-55.02 -11.46%2C-43.28%22/%3E%3C/g%3E%3Ccircle r=%2247%22 fill=%22url%28%23s%29%22/%3E%3Ccircle r=%2247%22 fill=%22url%28%23h%29%22/%3E%3Ccircle r=%2246%22 fill=%22none%22 stroke=%22%231c202a%22 stroke-width=%223.5%22/%3E%3C/svg%3E") center / contain no-repeat; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); flex: none; }
.events li.theirs .goal-dot { background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%22-50 -50 100 100%22%3E%3Cdefs%3E%3CradialGradient id=%22b%22 cx=%22.36%22 cy=%22.32%22 r=%22.75%22%3E%3Cstop offset=%220%22 stop-color=%22%23fff%22/%3E%3Cstop offset=%22.7%22 stop-color=%22%23eceff3%22/%3E%3Cstop offset=%221%22 stop-color=%22%23bfc5ce%22/%3E%3C/radialGradient%3E%3CradialGradient id=%22s%22 cx=%22.5%22 cy=%22.5%22 r=%22.5%22%3E%3Cstop offset=%22.55%22 stop-color=%22%230a0e18%22 stop-opacity=%220%22/%3E%3Cstop offset=%221%22 stop-color=%22%230a0e18%22 stop-opacity=%22.5%22/%3E%3C/radialGradient%3E%3CradialGradient id=%22h%22 cx=%22.3%22 cy=%22.25%22 r=%22.4%22%3E%3Cstop offset=%220%22 stop-color=%22%23fff%22 stop-opacity=%22.8%22/%3E%3Cstop offset=%221%22 stop-color=%22%23fff%22 stop-opacity=%220%22/%3E%3C/radialGradient%3E%3CclipPath id=%22c%22%3E%3Ccircle r=%2247%22/%3E%3C/clipPath%3E%3C/defs%3E%3Ccircle r=%2247%22 fill=%22url%28%23b%29%22/%3E%3Cg clip-path=%22url%28%23c%29%22 stroke=%22%23283040%22 stroke-width=%222.6%22 stroke-linecap=%22round%22%3E%3Cpath d=%22M0.0 -16.0 L0.0 -30.0%22/%3E%3Cpath d=%22M0.0 -30.0 L22.9 -31.6 L28.5 -9.3%22 fill=%22none%22/%3E%3Cpath d=%22M15.2 -4.9 L28.5 -9.3%22/%3E%3Cpath d=%22M28.5 -9.3 L37.1 12.1 L17.6 24.3%22 fill=%22none%22/%3E%3Cpath d=%22M9.4 12.9 L17.6 24.3%22/%3E%3Cpath d=%22M17.6 24.3 L0.0 39.0 L-17.6 24.3%22 fill=%22none%22/%3E%3Cpath d=%22M-9.4 12.9 L-17.6 24.3%22/%3E%3Cpath d=%22M-17.6 24.3 L-37.1 12.1 L-28.5 -9.3%22 fill=%22none%22/%3E%3Cpath d=%22M-15.2 -4.9 L-28.5 -9.3%22/%3E%3Cpath d=%22M-28.5 -9.3 L-22.9 -31.6 L-0.0 -30.0%22 fill=%22none%22/%3E%3C/g%3E%3Cg clip-path=%22url%28%23c%29%22 fill=%22%231a1e27%22 stroke=%22%230b0d12%22 stroke-width=%221.5%22 stroke-linejoin=%22round%22%3E%3Cpolygon points=%220.00%2C-16.00 15.22%2C-4.94 9.40%2C12.94 -9.40%2C12.94 -15.22%2C-4.94%22/%3E%3Cpolygon points=%2217.63%2C-24.27 11.46%2C-43.28 27.63%2C-55.02 43.79%2C-43.28 37.62%2C-24.27%22/%3E%3Cpolygon points=%2228.53%2C9.27 44.70%2C-2.48 60.87%2C9.27 54.69%2C28.28 34.71%2C28.28%22/%3E%3Cpolygon points=%22-0.00%2C30.00 16.17%2C41.75 9.99%2C60.75 -9.99%2C60.75 -16.17%2C41.75%22/%3E%3Cpolygon points=%22-28.53%2C9.27 -34.71%2C28.28 -54.69%2C28.28 -60.87%2C9.27 -44.70%2C-2.48%22/%3E%3Cpolygon points=%22-17.63%2C-24.27 -37.62%2C-24.27 -43.79%2C-43.28 -27.63%2C-55.02 -11.46%2C-43.28%22/%3E%3C/g%3E%3Ccircle r=%2247%22 fill=%22url%28%23s%29%22/%3E%3Ccircle r=%2247%22 fill=%22url%28%23h%29%22/%3E%3Ccircle r=%2246%22 fill=%22none%22 stroke=%22%231c202a%22 stroke-width=%223.5%22/%3E%3C/svg%3E") center / contain no-repeat; }

/* ---------- Final: copa giratoria, ícono de derrota y confeti ---------- */
.end-icon { display: grid; place-items: center; min-height: 120px; margin-bottom: 4px; }
.end-icon svg.lost-icon { width: 96px; height: 96px; filter: drop-shadow(0 4px 10px rgba(0,0,0,.5)); }
.trophy-stage { width: 170px; height: 232px; position: relative; display: grid; place-items: center; }
.trophy-stage::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 250px; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(233,189,79,.38) 0%, rgba(233,189,79,0) 68%); animation: glow 3s ease-in-out infinite;
}
.trophy-stage::after {
  content: ""; position: absolute; left: 50%; bottom: 4px; width: 120px; height: 16px; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0,0,0,.6) 0%, rgba(0,0,0,0) 70%);
}
.trophy-3d { position: relative; z-index: 1; width: 100%; height: 100%; display: block; filter: drop-shadow(0 8px 10px rgba(0,0,0,.45)); }
@keyframes glow { 0%, 100% { opacity: .6; } 50% { opacity: 1; } }

.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 60; }
.confetti i {
  position: absolute; top: -24px; display: block; opacity: 0; border-radius: 2px;
  animation: confetti-fall linear forwards;
}
@keyframes confetti-fall {
  0% { opacity: 1; transform: translate3d(0, -24px, 0) rotate(0deg); }
  100% { opacity: 1; transform: translate3d(var(--sway), 108vh, 0) rotate(var(--rot)); }
}

/* ---------- Pie ---------- */
.footer { max-width: 1360px; margin: 10px auto 30px; padding: 0 16px; text-align: center; color: var(--muted); font-size: 12px; }
.footer a { color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .draft-layout, .cup-layout { grid-template-columns: 1fr; }
  .pitch { max-width: 520px; margin: 0 auto; }
  .slot { min-width: 68px; }
  .slot-ovr { font-size: 12px; padding: 0 6px; }
  .slot-name { font-size: 10.5px; padding: 2px 5px; max-width: 96px; }
  .brand h1 { font-size: 20px; letter-spacing: 1px; }
  .brand-crest img { width: 70px; }
  .scoreboard { font-size: 40px; min-width: 100px; padding: 6px 12px 4px; }
  .side strong { font-size: 22px; }
  .record { display: none; }
  .stage-name { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .slot.flash::before, .slot.flash::after, .slot.pop .slot-shirt { animation-duration: .01s; }
}

#skip-match-btn[hidden] { display: none; }
#skip-match-btn:disabled { opacity: .45; cursor: not-allowed; }

/* ===== Vista del partido (cancha 3D mientras se simula) ===== */
.match-view { margin: 14px 0 4px; border-radius: 14px; overflow: hidden; border: 1px solid rgba(233,189,79,.35); background: #0a0a0a; box-shadow: 0 0 30px rgba(233,189,79,.12), 0 10px 26px rgba(0,0,0,.5); }
.match-view[hidden] { display: none; }
.match-view canvas { display: block; width: 100%; height: auto; }

/* ===== Color del equipo ===== */
.color-pick { margin-top: 14px; }
.color-label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.color-swatches { display: flex; flex-wrap: wrap; gap: 9px; }
.swatch {
  position: relative; width: 34px; height: 34px; padding: 0; border-radius: 50%; cursor: pointer;
  background: var(--c, #888); border: 2px solid rgba(255,255,255,.25);
  box-shadow: inset 0 -5px 8px rgba(0,0,0,.25), 0 2px 5px rgba(0,0,0,.45); transition: transform .12s, border-color .15s, box-shadow .15s;
}
.swatch:hover { transform: translateY(-2px) scale(1.06); border-color: rgba(255,255,255,.7); }
.swatch:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
.swatch.on { border-color: var(--gold-hi); box-shadow: 0 0 0 3px rgba(233,189,79,.45), 0 0 16px rgba(233,189,79,.55), inset 0 -5px 8px rgba(0,0,0,.2); transform: scale(1.1); }
.swatch.on::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 17px; font-weight: 800; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.9); }
.swatch-custom { display: grid; place-items: center; background: conic-gradient(#ff4d4d, #ffd24d, #4dff88, #4dd2ff, #8d4dff, #ff4de1, #ff4d4d); overflow: hidden; }
.swatch-custom.on { background: var(--c); }
.swatch-custom input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; padding: 0; border: 0; }
.swatch-custom > span { font-size: 20px; font-weight: 800; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.8); pointer-events: none; }
.swatch-custom.on > span { display: none; }
.swatch-custom.on::after { content: "✓"; }
.color-hint { margin: 8px 0 0 !important; font-size: 12px !important; }
.my-color { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,.6); margin-top: 2px; box-shadow: 0 1px 4px rgba(0,0,0,.5); }

/* ===== Tanda de penales ===== */
.pen-view { margin: 14px 0 4px; border-radius: 14px; overflow: hidden; border: 1px solid rgba(233,189,79,.35); background: #0a0a0a; box-shadow: 0 0 30px rgba(233,189,79,.12), 0 10px 26px rgba(0,0,0,.5); }
.pen-view[hidden] { display: none; }
.pen-stage { position: relative; }
.pen-stage canvas { display: block; width: 100%; height: auto; }
.pen-caption {
  position: absolute; top: 10px; left: 10px; max-width: calc(100% - 20px); padding: 3px 14px; border-radius: 999px;
  font-family: var(--display); font-size: 18px; font-weight: 700; letter-spacing: .5px; color: var(--accent-ink);
  background: var(--gold-grad); box-shadow: 0 2px 8px rgba(0,0,0,.45); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pen-caption.sudden { background: linear-gradient(135deg, #ffb4a3, #ff7a62 55%, #c8442c); color: #2a0d06; }
.pen-flash {
  position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%) scale(.6); pointer-events: none; opacity: 0;
  font-family: var(--myth); font-weight: 800; font-size: clamp(28px, 7.5vw, 54px); letter-spacing: 2px; text-transform: uppercase; white-space: nowrap;
  text-shadow: 0 3px 0 rgba(0,0,0,.55), 0 0 26px rgba(0,0,0,.6);
}
.pen-flash.is-goal { color: var(--gold-hi); text-shadow: 0 3px 0 rgba(90,60,8,.9), 0 0 30px rgba(233,189,79,.8); }
.pen-flash.is-miss { color: #ff9a86; text-shadow: 0 3px 0 rgba(80,20,10,.9), 0 0 26px rgba(255,122,98,.55); }
.pen-flash.show { animation: penPop 1.15s ease-out forwards; }
@keyframes penPop { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.5); } 18% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); } 32% { transform: translate(-50%, -50%) scale(1); } 78% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -62%) scale(1.02); } }
.pen-board { padding: 10px 14px 12px; display: grid; gap: 6px; background: linear-gradient(180deg, #13100a, #0b0905); }
.pen-row { display: grid; grid-template-columns: minmax(104px, 38%) 1fr auto; align-items: center; gap: 10px; padding: 5px 10px; border-radius: 10px; border: 1px solid transparent; transition: background .2s, border-color .2s; }
.pen-row.active { background: rgba(233,189,79,.1); border-color: rgba(233,189,79,.45); box-shadow: 0 0 16px rgba(233,189,79,.18); }
.pen-name { font-family: var(--display); font-size: 20px; font-weight: 700; letter-spacing: .4px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pen-dots { display: flex; flex-wrap: wrap; gap: 7px; }
.pen-dot { position: relative; width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(233,189,79,.35); background: rgba(255,255,255,.04); box-sizing: border-box; }
.pen-dot.pd-ok { background: var(--gold-grad); border-color: var(--gold-hi); box-shadow: 0 0 10px rgba(233,189,79,.6); animation: dotIn .35s ease-out; }
.pen-dot.pd-no { background: rgba(255,122,98,.18); border-color: var(--danger); animation: dotIn .35s ease-out; }
.pen-dot.pd-ok::after, .pen-dot.pd-no::after { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; font-weight: 800; line-height: 1; }
.pen-dot.pd-ok::after { content: ""; inset: 1px; background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%22-50 -50 100 100%22%3E%3Cdefs%3E%3CradialGradient id=%22b%22 cx=%22.36%22 cy=%22.32%22 r=%22.75%22%3E%3Cstop offset=%220%22 stop-color=%22%23fff%22/%3E%3Cstop offset=%22.7%22 stop-color=%22%23eceff3%22/%3E%3Cstop offset=%221%22 stop-color=%22%23bfc5ce%22/%3E%3C/radialGradient%3E%3CradialGradient id=%22s%22 cx=%22.5%22 cy=%22.5%22 r=%22.5%22%3E%3Cstop offset=%22.55%22 stop-color=%22%230a0e18%22 stop-opacity=%220%22/%3E%3Cstop offset=%221%22 stop-color=%22%230a0e18%22 stop-opacity=%22.5%22/%3E%3C/radialGradient%3E%3CradialGradient id=%22h%22 cx=%22.3%22 cy=%22.25%22 r=%22.4%22%3E%3Cstop offset=%220%22 stop-color=%22%23fff%22 stop-opacity=%22.8%22/%3E%3Cstop offset=%221%22 stop-color=%22%23fff%22 stop-opacity=%220%22/%3E%3C/radialGradient%3E%3CclipPath id=%22c%22%3E%3Ccircle r=%2247%22/%3E%3C/clipPath%3E%3C/defs%3E%3Ccircle r=%2247%22 fill=%22url%28%23b%29%22/%3E%3Cg clip-path=%22url%28%23c%29%22 stroke=%22%23283040%22 stroke-width=%222.6%22 stroke-linecap=%22round%22%3E%3Cpath d=%22M0.0 -16.0 L0.0 -30.0%22/%3E%3Cpath d=%22M0.0 -30.0 L22.9 -31.6 L28.5 -9.3%22 fill=%22none%22/%3E%3Cpath d=%22M15.2 -4.9 L28.5 -9.3%22/%3E%3Cpath d=%22M28.5 -9.3 L37.1 12.1 L17.6 24.3%22 fill=%22none%22/%3E%3Cpath d=%22M9.4 12.9 L17.6 24.3%22/%3E%3Cpath d=%22M17.6 24.3 L0.0 39.0 L-17.6 24.3%22 fill=%22none%22/%3E%3Cpath d=%22M-9.4 12.9 L-17.6 24.3%22/%3E%3Cpath d=%22M-17.6 24.3 L-37.1 12.1 L-28.5 -9.3%22 fill=%22none%22/%3E%3Cpath d=%22M-15.2 -4.9 L-28.5 -9.3%22/%3E%3Cpath d=%22M-28.5 -9.3 L-22.9 -31.6 L-0.0 -30.0%22 fill=%22none%22/%3E%3C/g%3E%3Cg clip-path=%22url%28%23c%29%22 fill=%22%231a1e27%22 stroke=%22%230b0d12%22 stroke-width=%221.5%22 stroke-linejoin=%22round%22%3E%3Cpolygon points=%220.00%2C-16.00 15.22%2C-4.94 9.40%2C12.94 -9.40%2C12.94 -15.22%2C-4.94%22/%3E%3Cpolygon points=%2217.63%2C-24.27 11.46%2C-43.28 27.63%2C-55.02 43.79%2C-43.28 37.62%2C-24.27%22/%3E%3Cpolygon points=%2228.53%2C9.27 44.70%2C-2.48 60.87%2C9.27 54.69%2C28.28 34.71%2C28.28%22/%3E%3Cpolygon points=%22-0.00%2C30.00 16.17%2C41.75 9.99%2C60.75 -9.99%2C60.75 -16.17%2C41.75%22/%3E%3Cpolygon points=%22-28.53%2C9.27 -34.71%2C28.28 -54.69%2C28.28 -60.87%2C9.27 -44.70%2C-2.48%22/%3E%3Cpolygon points=%22-17.63%2C-24.27 -37.62%2C-24.27 -43.79%2C-43.28 -27.63%2C-55.02 -11.46%2C-43.28%22/%3E%3C/g%3E%3Ccircle r=%2247%22 fill=%22url%28%23s%29%22/%3E%3Ccircle r=%2247%22 fill=%22url%28%23h%29%22/%3E%3Ccircle r=%2246%22 fill=%22none%22 stroke=%22%231c202a%22 stroke-width=%223.5%22/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
.pen-dot.pd-no::after { content: "✕"; color: var(--danger); }
@keyframes dotIn { from { transform: scale(.3); } 60% { transform: scale(1.25); } to { transform: scale(1); } }
.pen-score { font-family: var(--display); font-size: 30px; font-weight: 800; color: var(--gold-hi); min-width: 26px; text-align: right; }
@media (max-width: 560px) { .pen-name { font-size: 16px; } .pen-dot { width: 18px; height: 18px; } .pen-caption { font-size: 15px; } }
@media (prefers-reduced-motion: reduce) { .pen-flash.show, .pen-dot.pd-ok, .pen-dot.pd-no { animation: none; } .pen-flash.show { opacity: 1; } }

/* ===== Foto al perder ===== */
.end-icon.has-photo { display: block; min-height: 0; margin: 0 0 16px; }
.end-icon img.lose-photo {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px;
  border: 1px solid rgba(233,189,79,.4); box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 0 30px rgba(233,189,79,.14), 0 12px 28px rgba(0,0,0,.55);
  background: #0a0a0a; animation: fade .5s ease;
}
@media (prefers-reduced-motion: reduce) { .end-icon img.lose-photo { animation: none; } }

/* ===== Penales interactivos: círculos dorados para elegir a dónde patear / tirarse ===== */
.pen-zones { position: absolute; inset: 0; pointer-events: none; }
.pen-zones[hidden] { display: none; }
.pen-zone {
  position: absolute; width: clamp(38px, 7.6%, 48px); aspect-ratio: 1; transform: translate(-50%, -50%); padding: 0; cursor: pointer; pointer-events: auto;
  border-radius: 50%; border: 1.5px solid rgba(255,243,196,.55);
  background: radial-gradient(circle at 50% 50%, rgba(255,240,184,.42) 0%, rgba(245,210,107,.26) 48%, rgba(233,189,79,.06) 100%);
  box-shadow: 0 0 14px 4px rgba(233,189,79,.32);
  transition: transform .15s, background .15s;
}
.pen-zones[data-mode="dive"] .pen-zone { border-color: rgba(217,243,255,.6); }
.pen-zone:hover, .pen-zone:focus-visible { transform: translate(-50%, -50%) scale(1.14); outline: none; border-color: rgba(255,248,214,.85); background: radial-gradient(circle at 50% 50%, rgba(255,244,200,.6) 0%, rgba(245,210,107,.38) 55%, rgba(233,189,79,.1) 100%); box-shadow: 0 0 22px 8px rgba(255,240,184,.55); }
.pen-zone:disabled { cursor: default; animation: none; opacity: .0; }
.pen-zone.chosen { opacity: 1; animation: zoneChosen .38s ease-out forwards; }
@keyframes zonePulse {
  0%, 100% { box-shadow: 0 0 12px 3px rgba(233,189,79,.26); }
  50% { box-shadow: 0 0 20px 7px rgba(255,240,184,.42); }
}
@keyframes zoneChosen { 0% { transform: translate(-50%, -50%) scale(1); } 40% { transform: translate(-50%, -50%) scale(1.5); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(2.2); opacity: 0; } }
.pen-prompt {
  position: absolute; left: 50%; top: 53%; transform: translateX(-50%); pointer-events: none; opacity: 0; max-width: calc(100% - 16px); text-align: center;
  padding: 5px 18px; border-radius: 999px; font-family: var(--display); font-size: 21px; font-weight: 700; letter-spacing: .6px; color: var(--accent-ink);
  background: var(--gold-grad); box-shadow: 0 3px 12px rgba(0,0,0,.55), 0 0 18px rgba(233,189,79,.45); transition: opacity .2s; white-space: nowrap;
}
.pen-prompt.show { opacity: 1; animation: promptBob 1.2s ease-in-out infinite; }
@keyframes promptBob { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-3px); } }
@media (max-width: 560px) { .pen-prompt { font-size: 16px; padding: 4px 12px; } }
@media (prefers-reduced-motion: reduce) { .pen-zone, .pen-prompt.show { animation: none; } }

/* Pista (modo normal) y reloj (modo difícil) */
.hint-box.show { animation: fade .25s ease; }
.hint-opt b { font-size: 18px; line-height: 1.15; }
.hint-opt span { font-size: 12px; }
.pos-options.hint-grid, #hint-options { grid-template-columns: 1fr; }
.turn-timer { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.turn-timer[hidden] { display: none; }
.turn-timer-n { font-family: var(--display); font-size: 24px; min-width: 54px; letter-spacing: .5px; color: var(--gold-hi); font-variant-numeric: tabular-nums; }
.turn-timer-track { flex: 1; height: 8px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid var(--line); overflow: hidden; }
.turn-timer-track b { display: block; height: 100%; width: 100%; background: var(--gold-grad); border-radius: inherit; transition: width .2s linear; }
.turn-timer.low .turn-timer-n { color: var(--danger); animation: timerPulse .7s ease-in-out infinite; }
.turn-timer.low .turn-timer-track b { background: var(--danger); }
@keyframes timerPulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .turn-timer.low .turn-timer-n { animation: none; } }

/* Once del rival a la derecha + barra de acciones siempre a mano */
.opp-pitch-wrap { margin-bottom: 14px; }
.opp-pitch-wrap[hidden] { display: none; }
.opp-pitch-wrap h2 { color: var(--text); }
.match-actions:has(#next-btn:not([hidden])) {          /* con "Siguiente fase" visible, la barra se pega al borde inferior de la pantalla */
  position: sticky; bottom: 12px; z-index: 30; padding: 10px; border-radius: 14px;
  background: rgba(16,12,7,.92); border: 1px solid rgba(233,189,79,.28);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 -6px 24px rgba(0,0,0,.45), 0 8px 24px rgba(0,0,0,.4);
}
.match-actions:not(:has(.btn:not([hidden]))) { display: none; }
.match-actions .btn { flex: 1 1 160px; }

/* Banco de suplentes */
.bench { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.bench-title { display: block; font-family: var(--display); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.bench-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.bench-slot { min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 10px; border: 1px dashed rgba(255,255,255,.22); min-height: 52px; }
.bench-slot .bench-cat { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; opacity: .65; }
.bench-slot strong { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .6; }
.bench-slot.filled { border-style: solid; border-color: rgba(233,189,79,.55); background: rgba(233,189,79,.08); }
.bench-slot.filled strong { opacity: 1; }
.bench-slot.current { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(233,189,79,.25); }

/* Incidentes del partido: tarjeta roja / lesión */
.red-dot { width: 9px; height: 13px; border-radius: 2px; background: #e0262b; box-shadow: 0 0 6px rgba(224,38,43,.8); flex: none; }
.med-dot { width: 12px; height: 12px; flex: none; border-radius: 3px; background: #fff; position: relative; box-shadow: 0 0 6px rgba(255,255,255,.4); }
.med-dot::before, .med-dot::after { content: ''; position: absolute; background: #e0262b; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.sub-dot { width: 22px; height: 17px; flex: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 16'%3E%3Cpath d='M2 4H12.5' stroke='%2333d17a' stroke-width='2.6' stroke-linecap='round'/%3E%3Cpath d='M12 .6L18.4 4L12 7.4Z' fill='%2333d17a'/%3E%3Cpath d='M18 12H7.5' stroke='%23e0262b' stroke-width='2.6' stroke-linecap='round'/%3E%3Cpath d='M8 8.6L1.6 12L8 15.4Z' fill='%23e0262b'/%3E%3C/svg%3E") center / contain no-repeat; }
.med-dot::before { width: 8px; height: 2.6px; } .med-dot::after { width: 2.6px; height: 8px; }
.events li.incident { background: rgba(224,38,43,.1); }
#match-view { position: relative; }
.inc-banner { position: absolute; left: 50%; top: 9%; transform: translateX(-50%); padding: 8px 18px; border-radius: 999px; font-family: var(--display); font-weight: 800; letter-spacing: .06em; font-size: clamp(13px, 2.4vw, 20px); color: #fff; background: rgba(20,20,24,.82); border: 2px solid #e0262b; box-shadow: 0 6px 24px rgba(0,0,0,.5); pointer-events: none; white-space: nowrap; animation: incPop .28s ease; z-index: 3; }
.inc-banner.injury { border-color: #fff; }
.inc-banner.yellow { border-color: #f6c90e; }
.yellow-dot { width: 9px; height: 13px; border-radius: 2px; background: #f6c90e; box-shadow: 0 0 6px rgba(246,201,14,.8); flex: none; }
@keyframes incPop { from { transform: translateX(-50%) scale(.7); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }

/* ---- estadísticas del partido ---- */
.match-stats { margin: 14px 0 0; padding: 14px 16px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }
.match-stats.go { animation: stIn .45s ease both; }
@keyframes stIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.match-stats h4 { margin: 0 0 10px; font-family: var(--display); letter-spacing: .06em; text-transform: uppercase; font-size: 14px; color: var(--gold); }
.st-head { display: flex; justify-content: space-between; font-weight: 700; font-size: 13px; margin-bottom: 6px; gap: 10px; }
.st-head .a { color: var(--gold); } .st-head .b { color: #ff9f8f; text-align: right; }
.st-row { margin: 8px 0; }
.st-nums { display: grid; grid-template-columns: 56px 1fr 56px; align-items: center; font-size: 13px; text-align: center; }
.st-nums b { font-family: var(--display); font-size: 17px; text-align: left; } .st-nums b:last-child { text-align: right; }
.st-nums span { color: var(--muted, #aab); }
.st-bar { display: flex; gap: 3px; height: 7px; margin-top: 3px; }
.st-bar i { display: block; height: 100%; border-radius: 4px; transition: width 1.1s cubic-bezier(.2,.8,.2,1); }
.st-bar i.a { background: var(--gold); } .st-bar i.b { background: #ff7a62; margin-left: auto; }
.st-sc { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; font-size: 13px; }
.st-sc small { display: block; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; opacity: .6; margin-bottom: 2px; }
.st-sc div:last-child { text-align: right; }
.st-mvp { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 10px 12px; border-radius: 12px; background: linear-gradient(90deg, rgba(240,200,80,.18), rgba(240,200,80,.04)); border: 1px solid rgba(240,200,80,.4); opacity: 0; transform: scale(.9); transition: opacity .4s, transform .5s cubic-bezier(.2,1.6,.4,1); }
.st-mvp.show { opacity: 1; transform: none; }
.st-mvp .st-star { font-size: 30px; color: var(--gold-hi, #ffd75e); text-shadow: 0 0 14px rgba(255,210,90,.8); }
.st-mvp.show .st-star { animation: starSpin 1s ease .1s both; }
@keyframes starSpin { from { transform: rotate(-200deg) scale(.2); } to { transform: none; } }
.st-mvp small { display: block; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; opacity: .65; }
.st-mvp strong { display: block; font-size: 17px; } .st-mvp em { font-style: normal; font-size: 12px; opacity: .7; }

.match-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.env-chip { font-size: 12.5px; padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); white-space: nowrap; }
.env-chip.w-rain { background: rgba(110,150,200,.18); border-color: rgba(140,180,230,.4); }
.env-chip.w-heavy { background: rgba(80,100,140,.28); border-color: rgba(140,170,230,.55); }
.sound-wrap { position: fixed; right: 14px; bottom: 14px; z-index: 70; width: 44px; height: 44px; }
.sound-btn { position: absolute; inset: 0; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); background: rgba(14,16,22,.94); color: #fff; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.45); transition: border-color .15s, color .15s; }
.sound-btn svg { display: block; width: 22px; height: 22px; }
.sound-wrap:hover .sound-btn, .sound-wrap:focus-within .sound-btn, .sound-wrap.open .sound-btn { border-color: var(--gold); color: var(--gold-hi, #f6d98c); }
/* barra de volumen vertical: sale del círculo al pasar el cursor (0-100) */
.sound-pop { position: absolute; left: 50%; bottom: 100%; width: 44px; padding: 10px 0 14px; margin-bottom: -2px; transform: translate(-50%, 8px); opacity: 0; pointer-events: none; transition: opacity .16s, transform .16s; display: flex; flex-direction: column; align-items: center; gap: 8px; background: rgba(14,16,22,.96); border: 1px solid var(--gold); border-bottom: 0; border-radius: 22px 22px 0 0; box-shadow: 0 -6px 18px rgba(0,0,0,.4); }
.sound-wrap:hover .sound-pop, .sound-wrap:focus-within .sound-pop, .sound-wrap.open .sound-pop { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.sv-num { font: 700 12px/1 var(--display, inherit); color: #fff3c9; min-width: 3ch; text-align: center; font-variant-numeric: tabular-nums; }
.sv-track { position: relative; width: 8px; height: 112px; border-radius: 6px; background: rgba(255,255,255,.18); cursor: pointer; touch-action: none; outline: none; }
.sv-track::before { content: ""; position: absolute; left: -14px; right: -14px; top: -6px; bottom: -6px; }       /* zona de toque más ancha */
.sv-fill { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 6px; background: var(--gold-grad, #e9bd4f); }
.sv-knob { position: absolute; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #fff3c9; border: 2px solid var(--gold, #e9bd4f); box-shadow: 0 1px 4px rgba(0,0,0,.6); }
.sv-track:focus-visible .sv-knob { box-shadow: 0 0 0 4px rgba(233,189,79,.45); }
@media (prefers-reduced-motion: reduce) { .sound-pop { transition: none; } }

.pen-view.single .pen-board { display: none; }
.inc-banner.pen { border-color: var(--gold); } .inc-banner.ht { border-color: #6ec1ff; }
.events li.ht { justify-content: center; font-weight: 700; opacity: .8; border-left: 0; }

/* ---- capas de la cancha: camisetas planas (nítidas) y vista del partido en capas ---- */
.slots { position: absolute; left: 8%; width: 84%; bottom: 6%; aspect-ratio: 68 / 105; pointer-events: none; z-index: 3; }
.slots .slot { pointer-events: auto; }
.pen-zone::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; pointer-events: none; box-shadow: 0 0 20px 7px rgba(255,240,184,.42); animation: zoneGlow 1.4s ease-in-out infinite; }
.pen-zone:disabled::after { display: none; }
@keyframes zoneGlow { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pen-zone::after { animation: none; } }
.match-view .mv-bg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; transform-origin: 0 0; will-change: transform; }
.match-view .mv-fg { position: relative; z-index: 1; }
.mv-tint { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.pen-stage .pen-bg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.pen-stage canvas#pen-canvas { position: relative; }

/* ---- banco de suplentes: columna al costado de la cancha ---- */
.pitch-row { display: flex; align-items: flex-start; gap: 10px; }
.pitch-row .pitch { flex: 1 1 auto; min-width: 0; width: auto; }
.pitch-row .bench { flex: 0 0 112px; margin-top: 0; padding: 8px; align-self: flex-start; display: flex; flex-direction: column; }
.pitch-row .bench-title { font-size: 11px; text-align: center; margin-bottom: 8px; }
.pitch-row .bench-slots { display: flex; flex-direction: column; gap: 8px; flex: 1; justify-content: flex-start; }
.bench-slot { position: relative; width: 100%; text-align: center; align-items: center; font: inherit; color: inherit; background: none; }
button.bench-slot { cursor: pointer; }
.bench-slot .bench-shirt { display: block; width: 42px; line-height: 0; opacity: 1; }
.bench-slot .bench-shirt:empty { height: 0; }
.bench-slot .bench-shirt svg { width: 100%; height: auto; display: block; }
.bench-slot .bench-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; max-width: 100%; }
.bench-slot .bench-txt strong { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.15; word-break: break-word; }
.bench-slot .bench-ovr { position: absolute; top: 4px; right: 6px; font-size: 11px; font-weight: 800; background: var(--gold-grad); color: var(--accent-ink); border-radius: 999px; padding: 0 6px; }
.bench-slot.free:hover { border-color: var(--gold); background: rgba(233,189,79,.07); }
.bench-slot.selected { border-style: solid; border-color: var(--gold); background: rgba(233,189,79,.14); box-shadow: 0 0 0 2px rgba(233,189,79,.3); }
.bench-slot.pick { border-style: solid; border-color: var(--gold-hi); background: rgba(233,189,79,.2); box-shadow: 0 0 0 3px rgba(233,189,79,.45); animation: benchGlow 1.1s ease-in-out infinite; cursor: pointer; }
@keyframes benchGlow { 0%, 100% { box-shadow: 0 0 0 3px rgba(233,189,79,.45), 0 0 8px rgba(233,189,79,.35); } 50% { box-shadow: 0 0 0 4px rgba(255,240,184,.85), 0 0 22px rgba(255,214,102,.8); } }
@media (prefers-reduced-motion: reduce) { .bench-slot.pick { animation: none; } }
.bench-slot.dim { opacity: .35; cursor: not-allowed; }
@media (max-width: 1100px) {
  .pitch-row { flex-direction: column; align-items: stretch; }
  .pitch-row .bench { max-width: 520px; margin: 0 auto; }
  .pitch-row .pitch { flex: none; width: 100%; }
  .pitch-row .bench { flex: none; width: 100%; }
  .pitch-row .bench-slots { flex-direction: row; }
  .pitch-row .bench-slots .bench-slot { flex: 1 1 0; min-width: 0; }
}

/* ---- cancha del once más grande + camisetas y nombres que escalan con el ancho de la cancha ---- */
.draft-layout { grid-template-columns: minmax(0, 1.7fr) minmax(300px, .62fr); }
.pitch-row { justify-content: center; }
.pitch-row .pitch { max-width: 780px; }
.pitch:not(.pitch-mini) { container-type: inline-size; }
.pitch:not(.pitch-mini) .slot { min-width: 0; }
.pitch:not(.pitch-mini) .slot-shirt { width: calc(clamp(30px, 9.4cqw, 76px) * var(--ss, 1)); }
.pitch:not(.pitch-mini) .slot-name { font-size: calc(clamp(9px, 2.5cqw, 15px) * var(--ss, 1)); max-width: 19cqw; white-space: normal; padding: 1px 5px; text-wrap: balance; overflow-wrap: anywhere; }
.pitch:not(.pitch-mini) .slot-ovr { font-size: calc(clamp(9px, 2.5cqw, 15px) * var(--ss, 1)); padding: 0 clamp(3px, 1cqw, 7px); top: -5px; right: clamp(-9px, -1.6cqw, -5px); }
.pitch:not(.pitch-mini) .slot-dot { width: calc(clamp(34px, 9.4cqw, 70px) * var(--ss, 1)); height: calc(clamp(34px, 9.4cqw, 70px) * var(--ss, 1)); }
.pitch-row .bench-slot { padding: 6px 6px; }
.pitch-row .bench-slot .bench-shirt { width: 36px; }
.pitch-row .bench-slot .bench-txt strong { font-size: 12px; }
.pitch:not(.pitch-mini) .slot-dot { font-size: clamp(11px, 3cqw, 20px); }

.mv-tint { overflow: hidden; }
.mv-rain { position: absolute; left: 0; right: 0; top: calc(var(--rs, 256px) * -1); bottom: 0; will-change: transform; animation: rainFall .55s linear infinite; }
@keyframes rainFall { from { transform: translateY(0); } to { transform: translateY(var(--rs, 256px)); } }
@media (prefers-reduced-motion: reduce) { .mv-rain { animation: none; } }

/* Perspectiva: se escala la camiseta, no el nombre (texto nítido) */
.slots .slot-shirt { position: relative; }            /* todas las camisetas del mismo tamaño (sin escala por perspectiva) y el número pegado a la camiseta */
/* Canchas chicas de la previa (tu once y el rival): camisetas y nombres más grandes y legibles */
.pitch-mini { container-type: inline-size; aspect-ratio: 1 / 1.15; }
.pitch-mini .slot { width: 22%; }
.pitch-mini .slot-shirt { width: clamp(30px, 10cqw, 52px); }
.pitch-mini .slot-name { font-size: clamp(10px, 2.7cqw, 13px); max-width: 21cqw; padding: 1px 5px; white-space: normal; text-wrap: balance; line-height: 1.15; background: rgba(8,12,20,.82); }

/* ================= Modo Duelo 1vs1 ================= */
.mode-grid .mode-duel { grid-column: 1 / -1; border-color: rgba(106,170,255,.55); }
.mode-grid .mode-duel .mode-tag { background: linear-gradient(135deg, #bcd7ff, #6aa8ff 55%, #2a6fdb); color: #06162e; }
.mode-grid .mode-duel:hover, .mode-grid .mode-duel:focus-visible { border-color: #6aa8ff; box-shadow: 0 0 0 1px rgba(106,168,255,.25), 0 0 28px rgba(106,168,255,.28), 0 14px 30px rgba(0,0,0,.45); }
.duel-setup .duel-sub { font-family: var(--display); font-size: 22px; margin: 22px 0 10px; color: var(--gold-hi); letter-spacing: .5px; }
.duel-names { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 4px; }
.duel-names label { display: flex; align-items: center; gap: 8px; }
.duel-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px rgba(255,255,255,.35); }
.duel-modes .duel-cm.on { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(233,189,79,.4), 0 0 24px rgba(233,189,79,.2); background: rgba(233,189,79,.08); }
.duel-setup-actions { display: flex; gap: 10px; justify-content: center; margin-top: 24px; }
.duel-setup-actions .btn { min-width: 150px; }

.duel-bar { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 6px 0 12px; }
.duel-split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.duel-side { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; box-shadow: 0 14px 40px rgba(0,0,0,.4); transition: border-color .2s, box-shadow .2s, opacity .2s; min-width: 0; }
.duel-side[data-i="0"] { --pc: #2a6fdb; } .duel-side[data-i="1"] { --pc: #d62828; }
.duel-side.active { border-color: var(--pc); box-shadow: 0 0 0 2px var(--pc), 0 0 34px color-mix(in srgb, var(--pc) 45%, transparent), 0 14px 40px rgba(0,0,0,.4); }
.duel-side:not(.active) .duel-pitch { opacity: .82; }
.duel-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; min-width: 0; }
.duel-name { font-family: var(--display); font-size: 26px; line-height: 1.1; letter-spacing: .5px; overflow-wrap: anywhere; flex: 1; min-width: 0; }
.duel-wins { color: var(--gold); letter-spacing: 2px; font-size: 18px; white-space: nowrap; }
.duel-pitch { max-width: 760px; margin: 0 auto; }
.duel-ctl { margin-top: 10px; }
.duel-wait { text-align: center; color: var(--muted); font-weight: 600; padding: 22px 8px; margin: 0; border: 1.5px dashed var(--line); border-radius: 12px; }
.duel-club.empty .team-shirt { opacity: .35; }
.duel-clubs { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; margin: 10px 0 2px; padding: 3px; }
.duel-clubbtn { background: radial-gradient(circle at 35% 28%, #fffdf2 0%, #f3e8c4 70%, #dcc88a 100%); border: 2px solid transparent; border-radius: 50%; aspect-ratio: 1; padding: 5px; cursor: pointer; display: grid; place-items: center; transition: border-color .12s, box-shadow .12s; min-width: 0; }
.duel-clubbtn img { width: 100%; height: 100%; object-fit: contain; display: block; }
.duel-clubbtn:hover:not(:disabled) { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(233,189,79,.45); }
.duel-clubbtn.sel { border-color: var(--pc, var(--gold)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pc, #e9bd4f) 55%, transparent); }
.duel-clubbtn:disabled { opacity: .22; cursor: not-allowed; filter: grayscale(1); }
.duel-form { margin-top: 10px; }
.duel-ctl .message { min-height: 22px; margin: 8px 2px 4px; }
.duel-split.done .duel-ctl { display: none; }
.duel-match { margin-bottom: 14px; }
.duel-match .match-actions { justify-content: center; }
.duel-end { max-width: 640px; margin: 30px auto; }
.duel-end-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
@media (max-width: 900px) {
  .duel-split { grid-template-columns: 1fr; }
  .duel-side.active { order: -1; }
  .duel-names { grid-template-columns: 1fr; }
  .duel-name { font-size: 22px; }
}
.duel-side { display: flex; flex-direction: column; }
.duel-side .duel-ctl { order: 1; margin: 0 0 10px; }
.duel-side .duel-pitch { order: 2; width: 100%; }
.duel-split.done .duel-side .duel-ctl { display: none; }
.duel-side .duel-ctl { display: flex; flex-direction: column; min-height: 262px; }
.duel.choose .duel-side .duel-ctl { min-height: 432px; }
.duel-ctl .duel-turn { display: flex; flex-direction: column; flex: 1; }
.duel-ctl .duel-wait { flex: 1; display: grid; place-items: center; }
.duel-ctl .duel-wait[hidden], .duel-ctl .duel-turn[hidden] { display: none; }
.duel-split.done .duel-side .duel-ctl { display: none; }
@media (max-width: 900px) { .duel-side .duel-ctl, .duel.choose .duel-side .duel-ctl { min-height: 0; } }
.duel.choose .duel-side .duel-ctl { min-height: 342px; }
.duel-match .env-chip:empty { display: none; }

/* ---- HOME (elegir modo) ---- */
.home-card { max-width: 860px; }
.home-grid { grid-template-columns: 1fr 1fr; }
.home-opt { padding: 28px 18px 24px; gap: 10px; }
.home-opt .home-ico { display: flex; align-items: center; justify-content: center; height: 112px; line-height: 0; filter: drop-shadow(0 4px 8px rgba(0,0,0,.5)); }
.home-opt .home-art { height: 112px; width: auto; display: block; margin: 0 auto; overflow: visible; }
.home-opt .home-art-vs { height: 92px; margin: 0; }
.home-opt .home-ico { height: 150px; }
.home-opt .home-art-img { height: 150px; width: auto; object-fit: contain; border-radius: 18px; -webkit-mask-image: radial-gradient(closest-side, #000 82%, transparent 100%); mask-image: radial-gradient(closest-side, #000 82%, transparent 100%); }
.home-opt strong { font-size: 40px; }
.home-grid .mode-duel { grid-column: auto; }
.back-link { background: none; border: 0; color: var(--muted); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; padding: 4px 8px; margin: -10px 0 8px -8px; display: block; text-align: left; border-radius: 8px; }
.back-link:hover, .back-link:focus-visible { color: var(--gold-hi); outline: none; background: rgba(233,189,79,.08); }
@media (max-width: 640px) { .home-grid { grid-template-columns: 1fr; } .home-opt strong { font-size: 32px; } .duel-clubs { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* ---- Duelo: elegir formación ---- */
.duel-formpick { display: flex; flex-direction: column; gap: 10px; padding: 12px; background: var(--card-2); border: 1px solid var(--line); border-radius: 14px; flex: 1; }
.duel-fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; }
.duel-fbtn { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: .5px; color: var(--gold-hi); background: rgba(12,9,5,.7); border: 1.5px solid var(--line); border-radius: 10px; padding: 6px 4px; cursor: pointer; transition: border-color .12s, background .12s; }
.duel-fbtn:hover:not(:disabled) { border-color: var(--gold); background: rgba(233,189,79,.12); }
.duel-fbtn.sel { border-color: var(--pc, var(--gold)); background: color-mix(in srgb, var(--pc, #e9bd4f) 28%, transparent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--pc, #e9bd4f) 50%, transparent); }
.duel-fbtn:disabled { cursor: default; opacity: .45; } .duel-fbtn.sel:disabled { opacity: 1; }
.duel-fwait { text-align: center; color: var(--muted); font-weight: 600; margin: 0; }
.duel-formpick[hidden] { display: none; }
#dm-pen-slot .pen-view { margin-top: 12px; }
.duel-fgrid { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
.duel-fbtn { white-space: nowrap; font-size: 19px; }

.mv-raincv { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; }

.duel-clubbtn svg { width: 100%; height: auto; display: block; }

/* ===== Logros ===== */
.ach-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 40px; padding: 0; cursor: pointer; border-radius: 12px; border: 1px solid rgba(233,189,79,.4); background: rgba(233,189,79,.1); color: var(--gold); font: inherit; }
.ach-btn:hover { background: rgba(233,189,79,.22); box-shadow: 0 0 0 3px rgba(233,189,79,.18); }
.ach-btn svg { width: 30px; height: 30px; }
.ach-badge { position: absolute; right: -6px; bottom: -7px; min-width: 24px; padding: 1px 5px; border-radius: 999px; background: #1b1409; border: 1px solid rgba(233,189,79,.55); color: var(--gold); font-size: 9.5px; font-weight: 800; line-height: 14px; text-align: center; }
.ach-ic { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 56px; height: 56px; border-radius: 50%; color: var(--gold); background: radial-gradient(circle at 35% 30%, #3a2c10, #17110a); border: 1.5px solid rgba(233,189,79,.5); }
.ach-ic svg { width: 42px; height: 42px; filter: drop-shadow(0 1px 1.500px rgba(0,0,0,.5)); }
.ach-ic.big { width: 58px; height: 58px; }
.ach-ic.big svg { width: 44px; height: 44px; }
.ach-toasts { position: fixed; top: 12px; right: 12px; z-index: 1400; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.ach-toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; max-width: min(340px, calc(100vw - 24px)); padding: 10px 16px 10px 10px; cursor: pointer; border-radius: 16px; color: #f4ead2; background: linear-gradient(135deg, #2a1f0c, #14100a); border: 1px solid rgba(233,189,79,.65); box-shadow: 0 10px 34px rgba(0,0,0,.6), 0 0 22px rgba(233,189,79,.25); animation: achIn .45s cubic-bezier(.2,.9,.3,1.2); transition: opacity .45s, transform .45s; }
.ach-toast.out { opacity: 0; transform: translateX(30px); }
.ach-tx { display: flex; flex-direction: column; min-width: 0; }
.ach-tx small { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); opacity: .9; }
.ach-tx b { font-size: 15px; }
@keyframes achIn { from { opacity: 0; transform: translateX(60px) scale(.92); } to { opacity: 1; transform: none; } }
.ach-modal { position: fixed; inset: 0; z-index: 1300; display: flex; align-items: center; justify-content: center; padding: 14px; background: rgba(0,0,0,.7); backdrop-filter: blur(2px); }
.ach-card { width: min(720px, 100%); max-height: min(88vh, 860px); overflow: auto; padding: 20px 20px 24px; border-radius: 20px; color: #f4ead2; background: #17110a; border: 1px solid rgba(233,189,79,.5); box-shadow: 0 24px 70px rgba(0,0,0,.65); }
.ach-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ach-head h2 { margin: 0; font-size: 22px; color: var(--gold); letter-spacing: .02em; }
.ach-head small { opacity: .7; font-size: 12.5px; }
.ach-x { width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 14px; color: var(--gold); background: transparent; border: 1px solid rgba(233,189,79,.4); }
.ach-x:hover { background: rgba(233,189,79,.18); }
.ach-bar { height: 6px; margin: 12px 0 4px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.ach-bar i { display: block; height: 100%; background: linear-gradient(90deg, #b8861f, #f0c94f); border-radius: inherit; transition: width .5s; }
.ach-sec { display: flex; align-items: center; justify-content: space-between; margin: 20px 0 8px; padding-bottom: 6px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; border-bottom: 1px solid rgba(233,189,79,.25); }
.ach-sec em { font-style: normal; opacity: .75; font-size: 12px; letter-spacing: 0; }
.ach-sec.easy { color: #7fd48a; } .ach-sec.mid { color: #e9bd4f; } .ach-sec.hard { color: #f07a6a; }
.ach-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ach-item { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08); }
.ach-item.on { background: rgba(233,189,79,.09); border-color: rgba(233,189,79,.5); }
.ach-item.off .ach-ic { color: #7b7466; border-color: rgba(255,255,255,.14); background: #120e08; filter: grayscale(1); opacity: .75; }
.ach-item.off b { color: #cfc6b2; }
.ach-it { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ach-it b { font-size: 14px; }
.ach-it span { font-size: 12px; opacity: .72; line-height: 1.3; }
.ach-it small { margin-top: 2px; font-size: 11px; color: var(--gold); }
.ach-ck { position: absolute; top: 6px; right: 9px; color: #7fd48a; font-weight: 800; font-size: 13px; }
@media (max-width: 640px) { .ach-grid { grid-template-columns: 1fr; } .ach-card { padding: 16px 14px 20px; } }

.retry-btn { display: block; width: 100%; margin: 4px 0 8px; }
.retry-btn[hidden] { display: none; }

/* celular/tablet angosta: una sola columna (la regla de la cancha grande pisaba la de 860px y dejaba la cancha de 14px) */
@media (max-width: 860px) {
  .draft-layout { grid-template-columns: minmax(0, 1fr); }
  .pitch:not(.pitch-mini) .slot { min-width: 0; }
  .pitch:not(.pitch-mini) .slot-name { max-width: 19cqw; font-size: calc(clamp(9px, 2.5cqw, 15px) * var(--ss, 1)); padding: 1px 4px; }
}

/* ---- Cambios en el entretiempo ---- */
.sub-panel { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: rgba(6,8,12,.78); backdrop-filter: blur(3px); overflow-y: auto; }
.sub-panel[hidden] { display: none; }
.sub-box { width: min(760px, 100%); max-height: 100%; overflow-y: auto; border-radius: 18px; padding: 18px 18px 16px; background: linear-gradient(180deg, #1b1a14, #12110d); border: 1px solid rgba(233,189,79,.5); box-shadow: 0 20px 60px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.04) inset; }
.sub-box h3 { margin: 0; font-family: var(--font-display, inherit); font-size: 24px; letter-spacing: .5px; text-align: center; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sub-score { text-align: center; font-weight: 800; margin: 4px 0 2px; color: var(--text); }
.sub-hint { margin: 4px 0 12px; text-align: center; font-size: 13px; color: var(--muted, #bfae86); }
.sub-cols { display: grid; grid-template-columns: 1.35fr 1fr; gap: 14px; }
.sub-col h4 { margin: 0 0 6px; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold-hi, #e9bd4f); }
.sub-list { display: grid; gap: 5px; align-content: start; }
.sub-row, .sub-card-b { display: grid; align-items: center; gap: 9px; width: 100%; text-align: left; padding: 6px 10px; border-radius: 11px; border: 1.5px solid rgba(255,255,255,.1); background: rgba(255,255,255,.04); color: var(--text); font: inherit; cursor: pointer; transition: border-color .15s, background .15s, transform .12s; }
.sub-row { grid-template-columns: 26px 38px 1fr auto; }
.sub-card-b { grid-template-columns: 30px 1fr auto; padding: 10px; }
.sub-row:hover, .sub-card-b:hover:not(:disabled) { border-color: rgba(233,189,79,.6); background: rgba(233,189,79,.08); }
.sub-row.sel, .sub-card-b.sel { border-color: var(--gold-hi, #e9bd4f); background: rgba(233,189,79,.16); box-shadow: 0 0 14px rgba(233,189,79,.25); }
.sub-row.can, .sub-card-b.can { border-color: #6fd08a; background: rgba(111,208,138,.12); animation: subPulse 1.1s ease-in-out infinite; }
.sub-row.swapped, .sub-card-b.used { border-color: #6fd08a; background: rgba(111,208,138,.16); }
.sub-card-b.off { opacity: .45; cursor: not-allowed; }
.sub-shirt svg { width: 26px; height: 26px; display: block; }
.sub-card-b .sub-shirt svg { width: 30px; height: 30px; }
.sub-pos { font-size: 11px; font-weight: 800; color: var(--muted, #bfae86); letter-spacing: .5px; }
.sub-name { font-weight: 700; font-size: 14px; line-height: 1.15; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sub-name small, .sub-bt small { display: block; font-weight: 500; font-size: 11px; color: var(--muted, #bfae86); }
.sub-bt em { display: block; font-style: normal; font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--gold-hi, #e9bd4f); }
.sub-bt strong { display: block; font-size: 14px; line-height: 1.15; }
.sub-ovr { font-weight: 900; font-size: 15px; min-width: 26px; text-align: center; padding: 2px 6px; border-radius: 8px; background: var(--gold-grad); color: var(--accent-ink, #1a1204); }
.sub-lvl { text-align: center; margin-top: 12px; font-weight: 700; font-size: 14px; color: var(--gold-hi, #e9bd4f); }
.sub-msg { min-height: 20px; text-align: center; margin-top: 4px; font-size: 13px; color: var(--text); }
.sub-msg.err { color: var(--danger, #ff7a62); }
.sub-foot { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
@keyframes subPulse { 50% { box-shadow: 0 0 12px rgba(111,208,138,.45); } }
@media (max-width: 560px) { .sub-cols { grid-template-columns: 1fr; } .sub-box { padding: 14px 12px; } .sub-box h3 { font-size: 20px; } }
@media (prefers-reduced-motion: reduce) { .sub-row.can, .sub-card-b.can { animation: none; } }

/* ---------- Álbum de jugadores ---------- */
.alb-card { width: min(700px, 100%); background: linear-gradient(180deg, #1d160b, #130e07); }
.alb-hint { margin: 6px 0 0; font-size: 12.5px; opacity: .65; }
.alb-tabs { display: flex; gap: 6px; margin: 12px 0 10px; padding-bottom: 4px; overflow-x: auto; scrollbar-width: thin; }
.alb-tab { flex: none; padding: 5px 12px; border-radius: 999px; cursor: pointer; font: inherit; font-size: 12px; color: #d9cda8; background: rgba(255,255,255,.04); border: 1px solid rgba(233,189,79,.25); white-space: nowrap; }
.alb-tab:hover { background: rgba(233,189,79,.15); }
.alb-tab.on { color: #1b1409; background: var(--gold); border-color: var(--gold); font-weight: 700; }
.alb-page { padding: 12px; border-radius: 14px; background: #f3e9cf; color: #2a2010; box-shadow: inset 0 0 0 2px rgba(120,84,20,.35), inset 0 0 40px rgba(120,84,20,.18); transform-origin: left center; backface-visibility: hidden; }
.alb-page.flip-next { animation: albNext .45s ease-out; }
.alb-page.flip-prev { animation: albPrev .45s ease-out; transform-origin: right center; }
@keyframes albNext { from { opacity: .2; transform: perspective(1200px) rotateY(-70deg); } to { opacity: 1; transform: none; } }
@keyframes albPrev { from { opacity: .2; transform: perspective(1200px) rotateY(70deg); } to { opacity: 1; transform: none; } }
.alb-phead { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; padding: 8px 12px; border-radius: 10px; color: #fff; background: linear-gradient(100deg, var(--c1), var(--c2)); text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.alb-crest { width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.alb-pname { display: flex; flex-direction: column; min-width: 0; }
.alb-pname b { font-size: 17px; line-height: 1.15; }
.alb-pname small { font-size: 11.5px; opacity: .9; }
.alb-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.alb-st { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 1px; aspect-ratio: 1 / 1; padding: 16px 4px 6px; border-radius: 8px; text-align: center; overflow: hidden; }
.alb-st.miss { color: rgba(60,45,15,.45); background: rgba(90,65,20,.08); border: 2px dashed rgba(90,65,20,.3); justify-content: center; }
.alb-st.have { color: #fff; border: 2px solid #fff; box-shadow: 0 3px 8px rgba(40,25,0,.4); background: linear-gradient(160deg, #3a4a63, #151d2b); }
.alb-st.have.bronze { background: linear-gradient(160deg, #a8693a, #4a2810); }
.alb-st.have.silver { background: linear-gradient(160deg, #8c99ab, #2f3846); }
.alb-st.have.gold { background: linear-gradient(160deg, #f2c94c, #8a5a08); box-shadow: 0 3px 10px rgba(40,25,0,.45), 0 0 0 1px #fff3b8; }
.alb-st.have::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.28) 48%, transparent 60%); pointer-events: none; }
.alb-num { position: absolute; top: 3px; left: 5px; font-size: 9.5px; font-weight: 700; opacity: .75; }
.alb-q { font-size: 30px; font-weight: 800; line-height: 1; }
.alb-shirt { display: block; width: 52%; max-width: 62px; margin-bottom: 2px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.45)); }
.alb-shirt svg { display: block; width: 100%; height: auto; }
.alb-ovr { position: absolute; top: 2px; right: 5px; font-size: 17px; font-weight: 900; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.alb-pos { font-size: 9.5px; letter-spacing: .06em; opacity: .85; }
.alb-nm { display: block; max-width: 100%; font-size: 11px; line-height: 1.15; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.alb-st.miss .alb-nm { font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.alb-nat { font-size: 9px; opacity: .75; letter-spacing: .08em; }
.alb-newtag { position: absolute; bottom: 14px; left: -24px; z-index: 2; width: 80px; text-align: center; padding: 1px 0; font-size: 8.5px; font-weight: 800; letter-spacing: .08em; color: #fff; background: #d8322b; transform: rotate(-40deg); }
.alb-nav { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 14px; }
.alb-arrow { width: 44px; height: 38px; border-radius: 12px; cursor: pointer; font-size: 24px; line-height: 1; color: var(--gold); background: rgba(233,189,79,.1); border: 1px solid rgba(233,189,79,.4); }
.alb-arrow:hover:not(:disabled) { background: rgba(233,189,79,.25); }
.alb-arrow:disabled { opacity: .3; cursor: default; }
.alb-pi { min-width: 130px; text-align: center; font-size: 13px; opacity: .85; }
.alb-toasts { position: fixed; left: 12px; bottom: 12px; z-index: 1400; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.alb-toast { display: flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; border-radius: 12px; font-size: 13.5px; color: #f4ead2; background: #1b1409; border: 1px solid rgba(233,189,79,.6); box-shadow: 0 6px 22px rgba(0,0,0,.55); animation: achIn .4s cubic-bezier(.2,.9,.3,1.2); transition: opacity .45s, transform .45s; }
.alb-toast.out { opacity: 0; transform: translateY(10px); }
.alb-toast-ic { color: var(--gold); display: inline-flex; }
@media (max-width: 560px) { .alb-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; } .alb-card { padding: 16px 12px 18px; } .alb-pname b { font-size: 15px; } }
@media (prefers-reduced-motion: reduce) { .alb-page.flip-next, .alb-page.flip-prev, .alb-toast { animation: none; } }

.miss-dot { width: 15px; height: 15px; flex: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 3L13 13M13 3L3 13' stroke='%23e0262b' stroke-width='3.4' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; filter: drop-shadow(0 0 3px rgba(224,38,43,.55)); }

/* ===== Cuenta (login + sincronización) ===== */
.acc-btn.on { background: rgba(233,189,79,.2); border-color: rgba(233,189,79,.8); }
.acc-dot { position: absolute; right: -3px; top: -3px; width: 11px; height: 11px; border-radius: 50%; background: #5fd47a; border: 2px solid #17110a; display: none; }
.acc-btn.on .acc-dot { display: block; }
.acc-card { width: min(440px, 100%); }
.acc-intro { margin: 12px 0 16px; font-size: 14px; line-height: 1.45; opacity: .85; }
.acc-google { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,.25); background: #fff; color: #222; font: inherit; font-weight: 600; font-size: 14.5px; cursor: pointer; }
.acc-google:hover { background: #f1f1f1; }
.acc-or { display: flex; align-items: center; gap: 10px; margin: 14px 0; font-size: 12px; opacity: .6; text-transform: uppercase; letter-spacing: .08em; }
.acc-or::before, .acc-or::after { content: ''; flex: 1; height: 1px; background: rgba(233,189,79,.3); }
.acc-form { display: flex; flex-direction: column; gap: 10px; }
.acc-form input { width: 100%; padding: 11px 13px; border-radius: 12px; border: 1px solid rgba(233,189,79,.35); background: #0f0b06; color: #f4ead2; font: inherit; font-size: 15px; }
.acc-form input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.acc-primary { width: 100%; padding: 11px 14px; border-radius: 12px; border: 0; cursor: pointer; font: inherit; font-weight: 800; font-size: 15px; color: var(--accent-ink); background: var(--gold-grad); }
.acc-primary:hover { filter: brightness(1.08); }
.acc-secondary { width: 100%; margin-top: 8px; padding: 10px 14px; border-radius: 12px; cursor: pointer; font: inherit; font-weight: 700; font-size: 14px; color: var(--gold); background: transparent; border: 1px solid rgba(233,189,79,.45); }
.acc-secondary:hover { background: rgba(233,189,79,.14); }
.acc-links { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.acc-link { padding: 4px 0; border: 0; background: none; color: var(--gold); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.acc-link.danger { margin-top: 14px; color: #f07a6a; }
.acc-note { margin: 14px 0 0; font-size: 12px; line-height: 1.45; opacity: .65; }
.acc-note a { color: var(--gold); }
.acc-msg { min-height: 18px; margin: 12px 0 0; font-size: 13px; line-height: 1.4; }
.acc-msg.err { color: #f07a6a; } .acc-msg.ok { color: #7fd48a; } .acc-msg.info { opacity: .8; }
.acc-who { display: flex; align-items: center; gap: 12px; margin: 16px 0 6px; }
.acc-who small { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; opacity: .65; }
.acc-who b { font-size: 14px; word-break: break-all; }
.acc-av { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 20px; color: var(--accent-ink); background: var(--gold-grad); }
.acc-sync { margin: 4px 0 14px; font-size: 13px; color: #7fd48a; }
.acc-sync.syncing { color: var(--gold); } .acc-sync.err { color: #f07a6a; }
.acc-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.acc-stats div { padding: 10px 12px; border-radius: 12px; background: rgba(233,189,79,.08); border: 1px solid rgba(233,189,79,.3); text-align: center; }
.acc-stats b { display: block; font-size: 18px; color: var(--gold); }
.acc-stats span { font-size: 12px; opacity: .75; }
.acc-danger { margin-top: 14px; padding: 12px; border-radius: 12px; border: 1px solid rgba(240,122,106,.5); background: rgba(240,122,106,.08); }
.acc-danger p { margin: 0 0 10px; font-size: 13px; line-height: 1.45; }
.acc-del { width: 100%; padding: 10px 14px; border-radius: 12px; border: 0; cursor: pointer; font: inherit; font-weight: 800; font-size: 14px; color: #fff; background: #c0392b; }
.acc-modal button:disabled, .acc-modal input:disabled { opacity: .55; cursor: wait; }

/* textos explicativos eliminados */
.hint:empty { display: none; }
#duel-pickchip { display: none !important; }
