:root {
  --text: #2a2740;
  --muted: #6e6b85;
  --accent: #ff2e93;
  --live: #e0003c;
  --gold: #ffc61a;
  --display: 'Bowlby One', 'Arial Black', sans-serif;
  --body: 'Inter', system-ui, 'Segoe UI', sans-serif;
  --pricedown: 'Pricedown', var(--display);
}

/* shortcut: fuente Pricedown con licencia solo de escritorio (no de web); si el proyecto deja de ser un fan-site sin ánimo de lucro, comprar la licencia webfont a Typodermic */
@font-face {
  font-family: 'Pricedown';
  src: url('../fonts/pricedown.otf') format('opentype');
  font-display: swap;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  min-height: 100svh;
  background: #f1eef8;
  color: var(--text);
  font-family: var(--body);
  overflow-x: hidden;
  --c: var(--accent); --mx: 0; --my: 0;
}
a { color: inherit; text-decoration: none; }

#liquid { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

.btn {
  display: inline-block; padding: 12px 26px; border-radius: 999px;
  background: #9146ff; color: #fff; font-weight: 800;
  box-shadow: 0 6px 20px rgba(145, 70, 255, .35);
  transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(145, 70, 255, .5); }

/* ---------- Piezas comunes ---------- */
.emblem { position: relative; }
.emblem > * { position: absolute; inset: 0; }
.emblem img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 8px 14px rgba(40, 30, 80, .28)); }
.fallback {
  width: 100%; height: 100%; display: grid; place-content: center; text-align: center; gap: .3em;
  filter: drop-shadow(0 8px 14px rgba(40, 30, 80, .28));
}
.fallback b {
  font: 400 3em/1 var(--display); color: #1b1b24;
  -webkit-text-stroke: .14em #fff; paint-order: stroke fill;
}
.fallback small {
  font: 800 .62em/1.2 var(--body); letter-spacing: .12em; text-transform: uppercase; color: #1b1b24;
  -webkit-text-stroke: .35em #fff; paint-order: stroke fill;
}

.sbar {
  position: relative; display: flex; align-items: center; height: 28px; padding: 0 12px; overflow: hidden;
  background: rgba(42, 39, 64, .07);
  font: 800 .62rem/1 var(--body); letter-spacing: .12em; text-transform: uppercase;
}
.sbar i { position: absolute; inset: 0 auto 0 0; background: var(--c); opacity: .35; }
.sbar span { position: relative; display: inline-flex; align-items: center; gap: 7px; }
.sbar em, .live em { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: blink 1.1s infinite; }
.sbar.directo { background: var(--live); color: #fff; }
.sbar.completado { background: var(--gold); color: #3d2d00; }
@keyframes blink { 50% { opacity: .25; } }

/* ================= HOME ================= */
.home { height: 100svh; overflow: hidden; }

/* Cuenta atrás antes del inicio del subathon */
.countdown {
  position: fixed; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 22px; padding: 24px; text-align: center;
}
.cd-sub { font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-size: clamp(.8rem, 1.6vw, 1rem); }
.cd-time { display: flex; gap: clamp(10px, 3vw, 28px); }
.cd-u { display: grid; gap: 2px; }
.cd-u b {
  display: block; min-width: 1.2em; text-align: center;
  font: 400 clamp(2.4rem, 7.5vw, 4.6rem)/1 var(--pricedown);
  color: #fff; -webkit-text-stroke: .075em #000; paint-order: stroke fill;
}
.cd-u small { font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-size: .72rem; }
.cd-toggle {
  position: fixed; left: 50%; bottom: 8px; translate: -50% 0; z-index: 6;
  padding: 4px; border: 0; background: none; font: 600 .62rem/1.2 var(--body); letter-spacing: .04em;
  color: var(--muted); opacity: .75; cursor: pointer;
}
.cd-toggle:hover { opacity: 1; text-decoration: underline; }

.cd-modal {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: rgba(42, 39, 64, .6); backdrop-filter: blur(3px);
}
.cd-modal[hidden] { display: none; }
.cd-card {
  display: grid; gap: 14px; width: min(100%, 340px); padding: 24px; background: #fff; border-radius: 20px;
  box-shadow: 0 16px 40px rgba(40, 30, 80, .3); animation: pop .3s cubic-bezier(.2, 1.4, .4, 1) backwards;
}
.cd-card-title { font: 800 1.1rem var(--body); letter-spacing: -.02em; text-align: center; }
.cd-form { display: flex; gap: 10px; min-width: 0; }
.cd-form input {
  flex: 1 1 auto; min-width: 0; padding: 12px 16px; border: 1.5px solid rgba(40, 30, 80, .18); border-radius: 999px;
  font: 500 .95rem var(--body); background: #fff; color: var(--text);
}
.cd-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.cd-form button { flex: none; }
.cd-msg { min-height: 1.2em; color: var(--live); font-size: .85rem; font-weight: 700; }

/* Halo de color detrás de la cara */
.halo { position: fixed; left: 50%; bottom: -8vh; translate: -50% 0; z-index: 0; width: min(78vh, 62vw); aspect-ratio: 1; pointer-events: none; }
.halo::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 46, 147, .55), rgba(255, 159, 28, .28) 55%, transparent 72%);
  filter: blur(10px);
}
.halo i { position: absolute; inset: 6%; border-radius: 50%; border: 2px dashed rgba(255, 46, 147, .5); animation: spin 50s linear infinite; }
@keyframes spin { to { rotate: 360deg; } }

.wordmark {
  position: fixed; left: clamp(18px, 3.5vw, 44px); top: clamp(12px, 3vh, 32px); z-index: 0;
  font: 800 clamp(1.8rem, 4.6vw, 3.8rem)/1 var(--body); letter-spacing: -.04em; font-style: italic;
}
.wordmark span { color: inherit; font-size: 1.35em; line-height: 0; }
.wordmark a { display: inline-block; transition: transform .2s; }
.wordmark a:hover { transform: rotate(-2deg) scale(1.05); }

.season { position: fixed; left: clamp(18px, 3.5vw, 44px); bottom: clamp(8px, 2vh, 22px); z-index: 0; }
.season strong {
  display: block; font: 400 clamp(1.3rem, 2.8vw, 2.6rem)/.92 var(--display);
  color: transparent; -webkit-text-stroke: 2px var(--text);
}
.season p { margin-top: 10px; font-size: clamp(.7rem, 1.1vw, .9rem); font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

.topright { position: fixed; top: clamp(14px, 3vh, 30px); right: clamp(16px, 3vw, 40px); z-index: 6; display: flex; align-items: center; gap: 12px; }
.twitch {
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 20px 10px 14px; border-radius: 999px;
  background: #9146ff; color: #fff; font: 800 .8rem/1 var(--body); letter-spacing: .08em; text-transform: uppercase;
  box-shadow: 0 8px 22px rgba(145, 70, 255, .4); transition: transform .2s;
}
.twitch:hover { transform: translateY(-2px) rotate(-2deg); }
.twitch svg { width: 22px; fill: #fff; }
/* Botón del subathon: aparte de los demás, arriba en el centro y con su propia identidad
   (logo + brillo) para que destaque como la acción principal de la portada. Fondo blanco, no
   rosa, porque el logo del Gangathon II ya es rosa y se perdería sobre un botón del mismo color. */
.subathon-cta {
  position: fixed; top: clamp(14px, 3vh, 30px); left: 50%; translate: -50% 0; z-index: 6;
  display: inline-flex; align-items: center; padding: 8px 20px; border-radius: 999px;
  background: #fff;
  box-shadow: 0 10px 28px color-mix(in srgb, var(--accent) 55%, transparent), 0 0 0 3px var(--accent);
  animation: pop .7s cubic-bezier(.2, 1.4, .4, 1) backwards, subathon-glow 2.6s ease-in-out .7s infinite;
  transition: scale .2s;
}
.subathon-cta img { display: block; height: clamp(50px, 7.5vh, 76px); width: auto; }
.subathon-cta:hover { scale: 1.08; }
@keyframes subathon-glow { 50% { box-shadow: 0 14px 34px color-mix(in srgb, var(--accent) 75%, transparent), 0 0 0 3px var(--accent); } }
.live {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px;
  background: var(--live); color: #fff; font: 800 .72rem/1 var(--body); letter-spacing: .12em;
  box-shadow: 0 6px 20px rgba(224, 0, 60, .35);
}
.live[hidden] { display: none; }

.face-wrap { position: fixed; inset: 0; z-index: 2; pointer-events: none; display: flex; justify-content: center; align-items: flex-end; overflow: hidden; }
.face {
  height: 98svh; max-width: 92vw; object-fit: contain; object-position: bottom;
  filter: drop-shadow(0 24px 40px rgba(40, 30, 80, .22));
  transform: perspective(900px) translate(calc(var(--mx) * 10px), calc(var(--my) * 5px)) rotateY(calc(var(--mx) * 6deg)) rotateX(calc(var(--my) * -3deg));
  animation: rise 1s cubic-bezier(.2, .8, .2, 1) backwards;
}
@keyframes rise { from { opacity: 0; translate: 0 40px; } }

/* Zona clicable sobre la cara, estrecha para no tapar las tarjetas */
.face-link { position: absolute; left: 50%; bottom: 0; translate: -50% 0; z-index: 1; width: min(30svh, 38%); height: 88%; pointer-events: auto; cursor: pointer; }
.face-link span {
  position: absolute; left: 50%; bottom: 12%; translate: -50% 10px; opacity: 0; pointer-events: none;
  padding: 9px 18px; border-radius: 999px; background: #fff; box-shadow: 0 10px 26px rgba(40, 30, 80, .22);
  font: 800 .72rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap;
  transition: opacity .2s, translate .2s;
}
.face-link:hover span, .face-link:focus-visible span { opacity: 1; translate: -50% 0; }
.face-link:focus-visible { outline: none; }

/* Tarjetas de juego */
.cards { position: fixed; inset: 0; z-index: 1; pointer-events: none; }

/* GTA VI: crece con --p (0 al empezar la cuenta atrás, 1 el día del estreno) */
.gta6 {
  --min: min(18vw, 26vh); --max: min(60vw, 80vh);
  position: fixed; left: 50%; top: 64%; z-index: 1;
  width: calc(var(--min) + (var(--max) - var(--min)) * var(--p, 0));
  padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transform: translate(-50%, -50%) translate(calc(var(--mx) * -12px), calc(var(--my) * -8px));
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .18));
  animation: rise 1s cubic-bezier(.2, .8, .2, 1) backwards;
}
.gta6 img { display: block; width: 100%; height: auto; user-select: none; -webkit-user-drag: none; }
.g6-base { filter: brightness(0); }

/* Ola de color: un anillo con los colores originales se expande desde el punto del clic (--cx, --cy, --r, --t los pone home.js) */
.g6-color {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  --m: radial-gradient(circle at var(--cx, 50%) var(--cy, 50%), transparent calc(var(--r, 0px) - var(--t, 120px)), #000 calc(var(--r, 0px) - var(--t, 120px) * .6), #000 calc(var(--r, 0px) - var(--t, 120px) * .2), transparent var(--r, 0px));
  -webkit-mask-image: var(--m); mask-image: var(--m);
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}
.gta6.wave .g6-color { opacity: 1; }
.gcard {
  position: absolute; left: var(--x); top: var(--y); translate: -50% -50%; rotate: var(--r);
  --u: min(1.4vw, 1.9vh); --scale: 1; width: calc(var(--u) * var(--scale) * 20);
  pointer-events: auto; -webkit-tap-highlight-color: transparent;
  animation: pop .7s cubic-bezier(.2, 1.4, .4, 1) backwards; animation-delay: calc(var(--i) * 70ms + 250ms);
}
@keyframes pop { from { opacity: 0; scale: .3; } }
.gcard-in {
  animation: drift 6s ease-in-out infinite; animation-delay: calc(var(--i) * -.8s);
  transition: scale .25s cubic-bezier(.2, 1.4, .4, 1);
}
@keyframes drift { 50% { translate: 0 -7px; } }
.gcard:hover { z-index: 5; }
.gcard:hover .gcard-in, .gcard:focus-visible .gcard-in { scale: 1.12; }
.gcard:focus-visible { outline: none; }
.gcard .emblem { width: 100%; height: calc(var(--u) * var(--scale) * 10); font-size: calc(var(--u) * var(--scale)); }
.gcard .sbar {
  width: max-content; max-width: 100%; margin: -6px auto 0; height: 30px; padding: 0 18px; border-radius: 999px;
  background: rgba(30, 26, 52, .75); color: #fff; font-size: .72rem; backdrop-filter: blur(6px);
}
.gcard .sbar.completado { background: #19b36a; color: #fff; }

/* Juego en directo: bloque rojo, minizoom y brillo */
.gcard.is-live { z-index: 4; }
.gcard.is-live .gcard-in { position: relative; }
.gcard.is-live .gcard-in::before {
  content: ""; position: absolute; inset: -14% -10% 6%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 40, 60, .55), rgba(255, 40, 60, 0));
  animation: livehalo 1.6s ease-in-out infinite;
}
.gcard.is-live .emblem { animation: livezoom 1.6s ease-in-out infinite; }
.gcard .sbar.directo {
  background: var(--live); height: 36px; font-size: .82rem; padding: 0 22px;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .85), 0 0 18px 4px rgba(255, 40, 60, .7);
  animation: livebadge 1.6s ease-in-out infinite;
}
@keyframes livezoom { 50% { scale: 1.08; filter: drop-shadow(0 0 14px rgba(255, 40, 60, .85)); } }
@keyframes livehalo { 50% { opacity: .45; scale: 1.12; } }
@keyframes livebadge { 50% { box-shadow: 0 0 0 3px rgba(255, 255, 255, .85), 0 0 28px 8px rgba(255, 40, 60, .9); } }

/* ================= PÁGINA DE JUEGO ================= */
.round-back {
  position: fixed; top: 18px; left: 18px; z-index: 10;
  width: 44px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  background: rgba(42, 39, 64, .6); backdrop-filter: blur(8px);
  transition: transform .2s, background .2s;
}
.round-back:hover { transform: scale(1.1); background: rgba(42, 39, 64, .85); }
.round-back svg { width: 22px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.game-page { max-width: 1080px; margin: 0 auto; padding: 70px 16px 70px; }

/* La tarjeta del stream se sale del ancho del resto para aprovechar pantallas anchas (1920×1080...) */
.card-wide { width: 100vw; max-width: 1600px; margin-left: 50%; translate: -50% 0; }
@media (max-width: 900px) { .card-wide { width: auto; max-width: none; margin-left: 0; translate: none; } }

.g-head { display: flex; flex-direction: column; align-items: center; text-align: center; animation: rise .8s ease backwards; }
.g-emblem { width: min(100%, 420px); font-size: 16px; }
.g-emblem .emblem { height: 200px; }
.g-year { margin-top: 22px; color: var(--muted); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: .8rem; }
.g-pct { display: flex; align-items: flex-start; margin: 4px 0 6px; font: 800 clamp(4rem, 13vw, 8rem)/.9 var(--body); letter-spacing: -.06em; color: color-mix(in srgb, var(--c) 78%, #000); }
.g-pct small { font-size: .32em; margin-top: .35em; letter-spacing: 0; }
.bar { position: relative; width: min(100%, 600px); height: 18px; margin-bottom: 18px; border-radius: 999px; background: rgba(255, 255, 255, .6); overflow: hidden; box-shadow: inset 0 1px 3px rgba(0, 0, 0, .12); }
.bar > i {
  display: block; height: 100%; width: 0; border-radius: 999px;
  background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .3) 0 8px, transparent 8px 16px), var(--c);
  transition: width 1.2s cubic-bezier(.2, .8, .2, 1);
}
.bar > b { position: absolute; top: 0; bottom: 0; width: 2px; background: rgba(255, 255, 255, .85); }
.g-head .sbar { width: min(100%, 260px); border-radius: 999px; justify-content: center; }

.card {
  margin-top: 24px; padding: clamp(16px, 3vw, 26px);
  background: rgba(255, 255, 255, .6); backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .85); border-radius: 22px;
  box-shadow: 0 12px 34px rgba(40, 30, 80, .1);
  animation: rise .7s ease backwards; animation-delay: .15s;
}
.card h2 { font: 800 .85rem/1 var(--body); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.card > summary {
  cursor: pointer; font: 800 .85rem/1 var(--body); letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted); list-style: none; margin-bottom: 16px;
}
.card > summary::-webkit-details-marker { display: none; }
.card > summary::before { content: "\25B8"; margin-right: 8px; display: inline-block; transition: transform .2s; }
.card[open] > summary::before { transform: rotate(90deg); }
.note { font-size: 1.05rem; line-height: 1.5; }
.updated { margin-top: 6px; color: var(--muted); font-size: .8rem; }
.chapters { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; margin-top: 16px; }
.chapters li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: rgba(255, 255, 255, .6); color: var(--muted); font-size: .85rem; }
.chapters li::before { content: ""; width: 14px; height: 14px; border-radius: 4px; border: 2px solid var(--muted); flex: none; }
.chapters li.ok { color: var(--text); }
.chapters li.ok::before { background: var(--c); border-color: var(--c); }

.missions { display: grid; gap: 10px; }
.m-count { font-size: 1rem; color: var(--muted); }
.m-count b { color: var(--text); font-size: 1.4rem; font-weight: 800; }
.m-next { display: grid; gap: 2px; padding: 12px 16px; border-radius: 14px; background: #fff; border-left: 5px solid var(--c); }
.m-next small { font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-size: .68rem; }
.m-next span { font-weight: 800; font-size: 1.05rem; }
.m-group-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; align-items: start; margin-top: 8px; }
.m-group { border-radius: 14px; background: rgba(255, 255, 255, .55); }
.m-group summary { display: flex; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer; font-weight: 700; font-size: .9rem; list-style: none; }
.m-group summary::-webkit-details-marker { display: none; }
.m-group summary::before { content: "\25B8"; color: var(--muted); transition: transform .2s; }
.m-group[open] summary::before { transform: rotate(90deg); }
.m-group summary span { flex: 1; }
.m-group summary em { font-style: normal; font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.m-group summary b { color: var(--muted); font-size: .8rem; }
.m-group.full summary b { color: var(--c); }
.m-group .chapters { margin: 0; padding: 0 12px 12px; }

.player { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.stream-grid { display: grid; grid-template-columns: 1fr 340px; gap: 14px; }
.chat { width: 100%; height: 100%; min-height: 420px; border: 0; border-radius: 14px; background: #fff; }
.offline { text-align: center; padding: 16px; }
.offline p { color: var(--muted); margin-bottom: 18px; }
.vod-tabs { display: flex; gap: 8px; justify-content: center; margin-bottom: 14px; }
.vod-tab {
  padding: 8px 20px; border-radius: 999px; font: 800 .8rem/1 var(--body);
  background: color-mix(in srgb, var(--c) 12%, transparent); color: var(--muted);
  transition: transform .15s, background .15s, color .15s;
}
.vod-tab:hover { transform: translateY(-2px); }
.vod-tab.on { background: var(--c); color: #fff; }
.vod-parts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 14px; }
.vod-part { padding: 6px 16px; border-radius: 999px; font: 700 .75rem/1 var(--body); background: #fff; color: var(--muted); box-shadow: 0 4px 12px rgba(40, 30, 80, .12); }
.vod-part.on { background: var(--c); color: #fff; }
.clips { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.clips-more { display: block; margin: 18px auto 0; }
.clips-more[hidden] { display: none; }
.muted { color: var(--muted); }

.strip { display: flex; justify-content: center; gap: 8px; margin-top: 34px; overflow-x: auto; padding: 6px 2px 12px; }
.gpill {
  position: relative; flex: none; min-width: 60px; padding: 10px 14px 16px; text-align: center; overflow: hidden;
  border-radius: 12px; background: rgba(255, 255, 255, .65); border: 1px solid rgba(255, 255, 255, .9);
  transition: transform .2s, box-shadow .2s;
}
.gpill:hover { transform: translateY(-3px); }
.gpill.on { box-shadow: 0 0 0 2px var(--c); }
.gpill b { font: 400 1rem/1 var(--display); }
.gpill i { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--c); }
.gpill.live::after { content: ""; position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--live); animation: blink 1.1s infinite; }

.empty { text-align: center; padding: 20vh 16px; }
.empty h1 { font: 400 2.4rem var(--display); }
.empty.locked { padding-top: 8vh; }
.empty.locked .g-emblem { width: min(100%, 320px); height: 140px; margin: 0 auto 18px; font-size: 16px; }
.empty.locked .g-emblem .emblem { height: 140px; }
.empty.locked svg { width: 48px; height: 48px; margin: 18px auto 10px; display: block; fill: var(--muted); }
.empty.locked p { color: var(--muted); font-weight: 600; }

/* GTA VI: fondo ambientado con el arte oficial (atardecer y palmeras), bloqueado o no.
   !important porque game.js pone un fondo en línea según el color del juego (--c). */
.gta6-theme {
  background: #2b1322 url('../img/games/gta-6/sunset.jpg') center 32% / cover no-repeat fixed !important;
}
.gta6-theme #liquid { display: none; }
/* El fondo es una ilustración con mucho detalle: el texto va sobre un panel de cristal,
   igual que las .card de siempre, para que se lea bien caiga donde caiga el recorte. */
.gta6-theme .empty.locked {
  background: rgba(20, 8, 18, .55); backdrop-filter: blur(10px);
  border-radius: 28px; max-width: 420px; margin: 8vh auto 0; padding: 36px 20px 44px;
}
.gta6-theme .empty.locked h1 { color: #fff; }
.gta6-theme .empty.locked svg { fill: #e7c7da; }
.gta6-theme .empty.locked p { color: #e3d2db; }
.gta6-theme .g-year { color: #fff; text-shadow: 0 2px 10px rgba(0, 0, 0, .45); }

/* ================= PÁGINA DE REDES ================= */
.socialpage .halo { bottom: auto; top: -14vh; }
.social-page { position: relative; max-width: 760px; margin: 0 auto; padding: 56px 16px 70px; }
.s-head { display: flex; flex-direction: column; align-items: center; text-align: center; animation: rise .8s ease backwards; }
.avatar {
  width: clamp(120px, 28vw, 180px); aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  background: linear-gradient(135deg, #ffd0e8, #e8dcff); display: grid; place-items: center;
  box-shadow: 0 16px 40px rgba(40, 30, 80, .22), 0 0 0 5px #fff, 0 0 0 9px var(--accent);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; object-position: top; transform: translateY(22%) scale(2.6); transform-origin: 52% 28%; }
.avatar span { font: 400 3rem var(--display); color: var(--accent); }
.wordmark-inline { margin-top: 26px; font: 800 clamp(2rem, 7vw, 3.2rem)/1 var(--body); letter-spacing: -.04em; font-style: italic; }
.wordmark-inline span { color: inherit; font-size: 1.35em; line-height: 0; }
.s-head p { margin-top: 8px; color: var(--muted); font-weight: 600; }

.socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-top: 34px; }
.social {
  position: relative; flex: 0 0 calc((100% - 32px) / 3); aspect-ratio: 1.12;
  display: flex; flex-direction: column; justify-content: space-between; padding: 18px; overflow: hidden;
  background: linear-gradient(145deg, var(--c), color-mix(in srgb, var(--c) 70%, #000));
  color: #fff; border-radius: 24px;
  box-shadow: 0 14px 30px color-mix(in srgb, var(--c) 38%, transparent);
  animation: pop .6s cubic-bezier(.2, 1.4, .4, 1) backwards; animation-delay: calc(var(--i) * 80ms + 200ms);
  transition: transform .2s, box-shadow .2s;
}
.s-logo { width: clamp(38px, 6vw, 54px); height: clamp(38px, 6vw, 54px); object-fit: contain; filter: brightness(0) invert(1); transition: transform .25s; }
.s-text b { display: block; font-size: 1.15rem; line-height: 1.2; }
.s-text small { display: block; margin-top: 2px; opacity: .8; font-weight: 600; font-size: .8rem; }
.social .arrow { position: absolute; top: 14px; right: 16px; font-size: 1.3rem; font-weight: 800; opacity: .85; transition: transform .2s; }
.social:hover { transform: translateY(-5px) rotate(-1deg); box-shadow: 0 22px 40px color-mix(in srgb, var(--c) 50%, transparent); }
.social:hover .s-logo { transform: scale(1.12) rotate(-6deg); }
.social:hover .arrow { transform: translate(3px, -3px); }
@media (max-width: 600px) { .social { flex-basis: calc((100% - 16px) / 2); } }

/* Eventos especiales (Lume...): icono flotante abajo a la derecha */
.event-badges { position: fixed; right: 18px; bottom: 18px; z-index: 20; display: flex; flex-direction: column-reverse; gap: 12px; }
.event-badge {
  width: 64px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  background: rgba(20, 10, 30, .3); backdrop-filter: blur(6px); box-shadow: 0 10px 26px rgba(0, 0, 0, .3);
  transition: transform .2s;
}
.event-badge:hover { transform: scale(1.08); }
.event-badge img { width: 72%; height: 72%; object-fit: contain; animation: event-flicker 2.4s ease-in-out infinite; transform-origin: 50% 85%; }
@keyframes event-flicker {
  0%, 100% { transform: scale(1) rotate(0deg); filter: brightness(1) drop-shadow(0 0 6px rgba(168, 85, 247, .55)); }
  25% { transform: scale(1.06, 0.95) rotate(-3deg); filter: brightness(1.1) drop-shadow(0 0 11px rgba(168, 85, 247, .75)); }
  50% { transform: scale(0.96, 1.05) rotate(2deg); filter: brightness(0.95) drop-shadow(0 0 5px rgba(168, 85, 247, .4)); }
  75% { transform: scale(1.03, 0.97) rotate(-2deg); filter: brightness(1.06) drop-shadow(0 0 9px rgba(168, 85, 247, .65)); }
}
@media (prefers-reduced-motion: reduce) { .event-badge img { animation: none; } }

/* ================= PÁGINA DEL SUBATHON (esquema distinto: ruleta a la izquierda, subs+hitos a la derecha, directo debajo a toda anchura) ================= */
.subathonpage { background: #f1eef8; }
.subathonpage .halo { bottom: auto; top: -14vh; }
.subathon-page { position: relative; padding-top: 80px; }
.subathon-page > .wordmark-inline { margin: 0 auto 30px; text-align: center; }

/* Dónde suscribirse: reutiliza las tarjetas .social de /redes (logo invertido a blanco + brillo
   del color de la plataforma), solo que aquí son 2 en vez de 3 y lo que cuenta es el tiempo que suma. */
.sub-platforms-section { max-width: 1100px; margin: 0 auto; padding: 0 16px 36px; text-align: center; }
.sub-platforms-section h2 {
  font: 800 .85rem/1 var(--body); letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 18px;
}
.sub-platforms { max-width: 560px; margin: 0 auto; }
.sub-platforms .social {
  flex: 0 0 calc((100% - 16px) / 2); aspect-ratio: auto; gap: 14px;
  align-items: center; justify-content: center; text-align: center;
}
.sub-platforms .s-logo { width: clamp(56px, 10vw, 84px); height: clamp(56px, 10vw, 84px); }

.sub-top { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; max-width: 1100px; margin: 0 auto; padding: 0 16px 40px; align-items: stretch; }
.sub-right { display: grid; gap: 28px; align-content: start; }
.sub-wheel, .sub-count, .sub-milestones-section {
  padding: 24px; background: rgba(255, 255, 255, .6); backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .85); border-radius: 22px; box-shadow: 0 12px 34px rgba(40, 30, 80, .1);
}
.sub-top h2 {
  font: 800 .85rem/1 var(--body); letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 18px;
}
@media (max-width: 800px) { .sub-top { grid-template-columns: 1fr; } }

/* Ruleta: sin h2 (se quitó para dejarle más sitio al disco). display:flex + justify-content:center
   para que, al estirarse a la misma altura que la columna de la derecha (subs + hitos), el
   contenido quede centrado en vez de pegado arriba. */
.sub-wheel { display: flex; flex-direction: column; justify-content: center; text-align: center; }
.sub-wheel-shape {
  width: min(100%, 340px); aspect-ratio: 300 / 330; margin: 0 auto 22px; cursor: pointer;
  filter: drop-shadow(0 14px 30px color-mix(in srgb, var(--accent) 45%, transparent));
  animation: pop .6s cubic-bezier(.2, 1.4, .4, 1) backwards;
}
.sub-wheel-shape:focus-visible { outline: 3px solid var(--accent); outline-offset: 6px; border-radius: 50%; }
.sub-wheel-shape svg { display: block; width: 100%; height: 100%; }
.wheel-label { font: 800 9px/1 var(--body); letter-spacing: .01em; text-transform: uppercase; paint-order: stroke; stroke: rgba(0, 0, 0, .25); stroke-width: 2px; }
.wheel-label-big { font: 400 42px/1 var(--display); }
.sub-wheel p.hint { color: var(--muted); font-size: .85rem; margin-bottom: 18px; }
.sub-wheel .bar { margin: 0 auto; }
.sub-wheel .bar-label { margin-top: 10px; color: var(--muted); font-size: .8rem; font-weight: 700; }
.tut-link { display: inline-block; margin-top: 16px; font-size: .8rem; font-weight: 700; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.tut-link:hover { color: var(--text); }

/* container-type para que el número se dimensione según el ancho de SU tarjeta, no el de la ventana:
   en el layout a dos columnas la tarjeta mide la mitad que antes y clamp()+vw salía chica */
.sub-count { container-type: inline-size; display: flex; flex-direction: column; justify-content: center; padding-block: 40px; text-align: center; }
.subs-count { display: grid; gap: 4px; justify-items: center; animation: pop .5s cubic-bezier(.2, 1.4, .4, 1) backwards; }
.subs-count b { font: 400 clamp(2.8rem, 9vw, 4.6rem)/1 var(--pricedown); color: #fff; -webkit-text-stroke: .075em #000; paint-order: stroke fill; }
@supports (container-type: inline-size) { .subs-count b { font-size: clamp(2.8rem, 22cqi, 6rem); } }
.subs-count small { font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-size: .85rem; }

/* Ventana con scroll de hitos: el actual queda centrado, arriba los tachados, abajo los borrosos
   (y su título/descripción ni siquiera llegan del servidor hasta desbloquearse, ver api/subs.js) */
.subs-milestones-scroll {
  max-height: 204px; overflow-y: auto; scroll-behavior: smooth;
  padding: 10px 6px; margin: 16px -6px 0; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 10px, #000 calc(100% - 10px), transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 10px, #000 calc(100% - 10px), transparent);
}
.subs-milestones-scroll::-webkit-scrollbar { display: none; }
.subs-milestones { grid-template-columns: 1fr; margin-top: 0; }
.subs-milestones li.ok { text-decoration: line-through; color: var(--muted); }
.subs-milestones li.current {
  background: #fff; color: var(--text); font-weight: 800;
  box-shadow: 0 0 0 2px var(--c), 0 6px 14px color-mix(in srgb, var(--c) 30%, transparent);
}
.subs-milestones li.current::before { border-color: var(--c); }
/* Reached: ya se llegó a la cifra, solo falta que el admin lo marque cumplido -> caja rellena
   (como si estuviera hecho) + brillo pulsante para distinguirlo del "current" normal. */
.subs-milestones li.current.reached::before { background: var(--c); }
.subs-milestones li.current.reached { animation: milestone-glow 1.6s ease-in-out infinite; }
@keyframes milestone-glow {
  50% { box-shadow: 0 0 0 2px var(--c), 0 8px 18px color-mix(in srgb, var(--c) 60%, transparent); }
}
.subs-milestones li.locked {
  filter: blur(5px); opacity: .55; user-select: none; pointer-events: none;
}

.sub-stream { padding: 0 16px 46px; text-align: center; }
.sub-stream h2 {
  font: 800 .85rem/1 var(--body); letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 18px;
}
.sub-stream > .card { text-align: left; margin: 0 auto; max-width: 1100px; }

.sub-clips { padding: 0 16px 46px; text-align: center; }
.sub-clips h2 {
  font: 800 .85rem/1 var(--body); letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 18px;
}
.sub-clips .clips, .sub-clips > .muted { text-align: left; margin: 0 auto; max-width: 1100px; }

/* ================= Overlays para OBS (fondo transparente, sin "halo" ni liquid de fondo) ================= */
.overlaypage { background: transparent; }
.ov-wrap { padding: 18px; width: fit-content; }
.ov-wheel { text-align: center; }
.ov-wheel .sub-wheel-shape { width: min(90vw, 360px); margin: 0 auto 16px; }
.ov-wheel .bar { margin: 0 auto 18px; }
.ov-wheel .hint { font-size: .85rem; margin-bottom: 18px; }
.ov-wheel .hint, .ov-wheel .bar-label { color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .55); }
.ov-wheel .bar-label { margin-top: 10px; font-size: .8rem; font-weight: 700; }
.ov-hitos { max-width: 360px; }
.ov-hitos .subs-count small { color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .55); }
.ov-progress { margin: 14px 0 18px; }
.ov-progress .bar-label { color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .55); text-align: center; margin-top: 8px; }
.ov-game { text-align: center; }
.ov-game .g-emblem { width: min(90vw, 260px); font-size: 16px; margin: 0 auto; }
.ov-game .g-emblem .emblem { height: 130px; }
.ov-game .g-pct {
  justify-content: center; align-items: baseline; font-size: clamp(3.4rem, 12vw, 5.2rem); margin: 2px 0 10px;
  color: #fff; -webkit-text-stroke: 2.5px var(--c, #2a2740); paint-order: stroke fill;
  text-shadow: 0 6px 18px rgba(0, 0, 0, .4);
}
.ov-game .g-pct small { font-size: 1em; margin-top: 0; }
.ov-game .bar { width: min(90vw, 280px); margin: 0 auto; }
.ov-game .bar > i { animation: ov-bar-stripes .9s linear infinite; }
@keyframes ov-bar-stripes { to { background-position: 17.66px 0; } }
@media (prefers-reduced-motion: reduce) { .ov-game .bar > i { animation: none; } }
.ov-game-mission {
  margin-top: 10px; max-width: 280px; color: #fff; font-weight: 800; font-size: .95rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .55);
}

/* ================= Aviso legal ================= */
.legal-link {
  position: fixed; right: clamp(12px, 2vw, 24px); bottom: 8px; z-index: 6;
  font: 600 .62rem/1.2 var(--body); letter-spacing: .04em; color: var(--muted); opacity: .75;
}
.legal-link a:hover { text-decoration: underline; }
.legalpage { background: #f1eef8; }
.legal-page { max-width: 640px; margin: 0 auto; padding: 90px 20px 70px; }
.legal-page h1 { font: 800 clamp(1.8rem, 6vw, 2.6rem)/1.1 var(--body); letter-spacing: -.03em; }
.legal-page p { margin-top: 18px; line-height: 1.65; color: var(--text); }
.legal-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.legal-page .nonprofit { display: inline-block; margin-top: 0; padding: 6px 16px; border-radius: 999px; background: var(--accent); color: #fff; font: 800 clamp(1.2rem, 4.5vw, 1.7rem)/1.2 var(--body); letter-spacing: -.01em; }
.legal-page .small { font-size: .85rem; color: var(--muted); }

/* ---- Tutoriales ---- */
.tut-nav { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.tut-nav a { padding: 8px 18px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--text); font-weight: 800; font-size: .85rem; }
.tut-nav a:hover { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.tut-section { margin-top: 46px; padding-top: 10px; border-top: 1px solid rgba(0, 0, 0, .08); display: flow-root; }
.legal-page h2 { font: 800 1.3rem/1.2 var(--body); letter-spacing: -.01em; margin-top: 0; }
.legal-page ul, .legal-page ol { margin-top: 16px; padding-left: 22px; line-height: 1.65; color: var(--text); }
.legal-page li { margin-top: 10px; }
.legal-page li ul { margin-top: 8px; }
.tut-subnote { color: var(--muted); font-size: .85rem; }
.tut-highlight { background: color-mix(in srgb, var(--accent) 16%, transparent); padding: 2px 6px; border-radius: 6px; font-weight: 700; }
.tut-note { background: color-mix(in srgb, var(--accent) 8%, #fff); border-radius: 14px; padding: 14px 18px; font-size: .9rem; }
.tut-img { float: right; width: 40%; max-width: 220px; margin: 4px 0 14px 20px; border-radius: 14px; }
@media (max-width: 520px) { .tut-img { float: none; width: 100%; max-width: 320px; margin: 16px auto 0; } }

/* ================= Página 404 ================= */
.notfound { text-align: center; padding-top: 12vh; }
.notfound .nf-code {
  font: 400 clamp(5rem, 22vw, 9rem)/1 var(--pricedown);
  color: #fff; -webkit-text-stroke: .05em #000; paint-order: stroke fill;
}
.notfound h1 { margin-top: 6px; }
.notfound p { max-width: 420px; margin-left: auto; margin-right: auto; }
.notfound .btn { margin-top: 28px; }

/* ================= Música de fondo ================= */
.music {
  position: fixed; right: 18px; bottom: 18px; z-index: 20; display: flex; align-items: center;
  border-radius: 999px; background: var(--c, #2a2740);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--c, #2a2740) 40%, transparent);
}
.music[hidden] { display: none; }
.music-btn { width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; background: none; cursor: pointer; display: grid; place-items: center; transition: transform .2s; }
.music-btn:hover { transform: scale(1.1); }
.music-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.music-btn svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.music-btn svg .cross { display: none; }
.music.off .music-btn svg .waves { display: none; }
.music.off .music-btn svg .cross { display: inline; }

/* Barra de volumen: aparece al pasar el rat\u00f3n y usa el color del juego */
.music-vol {
  -webkit-appearance: none; appearance: none; background: transparent;
  width: 0; height: 18px; opacity: 0; margin: 0; cursor: pointer;
  transition: width .25s, opacity .2s, margin .25s;
}
.music:hover .music-vol, .music:focus-within .music-vol { width: 100px; opacity: 1; margin: 0 0 0 18px; }
@media (hover: none) { .music-vol { width: 100px; opacity: 1; margin: 0 0 0 18px; } }
.music-vol:focus { outline: none; }
.music-vol::-webkit-slider-runnable-track {
  height: 6px; border-radius: 99px;
  background: linear-gradient(to right, #fff var(--v, 35%), rgba(255, 255, 255, .35) var(--v, 35%));
}
.music-vol::-moz-range-track {
  height: 6px; border-radius: 99px;
  background: linear-gradient(to right, #fff var(--v, 35%), rgba(255, 255, 255, .35) var(--v, 35%));
}
.music-vol::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; margin-top: -5px; border-radius: 50%;
  background: #fff; border: 0; box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
  transition: transform .15s;
}
.music-vol::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
}
.music-vol:hover::-webkit-slider-thumb, .music-vol:active::-webkit-slider-thumb { transform: scale(1.2); }
.music-vol:focus-visible::-webkit-slider-thumb { outline: 2px solid #fff; outline-offset: 2px; }

/* ================= GTA VI secreto ================= */
.gcard.secret { position: fixed; z-index: 3; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: not-allowed; }
.secret-emblem img { filter: brightness(0); opacity: .3; }
.secret-emblem svg { inset: 50% auto auto 50%; width: 40%; height: auto; aspect-ratio: 1; transform: translate(-50%, -50%); fill: #1b1b24; filter: drop-shadow(0 3px 8px rgba(255, 255, 255, .8)); }
.gcard.secret .sbar { background: rgba(30, 26, 52, .85); }
.gcard.secret.gone { opacity: 0; transition: opacity .5s; pointer-events: none; }
.gcard.secret.shake .emblem { animation: shake .5s; }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }

/* ================= Responsive ================= */
@media (max-width: 800px) {
  .stream-grid { grid-template-columns: 1fr; }
  .chat { min-height: 380px; }
}

/* Móvil / vertical: cara arriba y juegos en rejilla debajo */
@media (max-width: 900px), (max-aspect-ratio: 1/1) {
  .home { height: auto; min-height: 100svh; overflow-x: hidden; overflow-y: auto; display: flex; flex-direction: column; }
  .halo { bottom: auto; top: 10svh; width: 90vw; }
  .gta6 { position: absolute; top: 35svh; --min: min(40vw, 22svh); --max: min(76vw, 44svh); }
  .face-wrap { position: relative; inset: auto; height: 54svh; order: 1; }
  .face { height: 54svh; }
  /* En móvil no cabe fija arriba sin tapar la cara: se mueve al flujo normal, debajo de la imagen */
  .wordmark { position: static; align-self: center; order: 2; margin: 14px 0 0; font-size: 1.6rem; z-index: 1; }
  .twitch span { display: none; }
  .twitch { padding: 10px; }
  .subathon-cta { position: static; align-self: center; order: 3; margin: 14px 0 0; padding: 6px 16px; }
  .subathon-cta img { height: clamp(36px, 6.4svh, 54px); }
  .season { position: relative; left: auto; bottom: auto; padding: 14px 20px 0; order: 4; z-index: 1; }
  .season strong { font-size: clamp(2.2rem, 11vw, 4rem); }
  .cards { position: relative; inset: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 20px 14px; padding: 24px 14px 50px; pointer-events: auto; order: 5; z-index: 1; }
  .gcard { position: static; translate: none; rotate: none; width: auto; --u: clamp(9px, 2.8vw, 15px); }
  .legal-link { position: static; order: 6; padding: 0 14px 22px; text-align: center; }
  .gcard.secret { position: static; order: 0; margin: 56px auto 0; width: min(46%, 220px); }
}

/* ================= Clips de Twitch ================= */
.clip {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: 14px; overflow: hidden;
  background: linear-gradient(135deg, rgba(40, 30, 80, .18), rgba(40, 30, 80, .06)); cursor: pointer; text-align: left;
  transition: transform .2s, box-shadow .2s;
}
.clip:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(40, 30, 80, .2); }
.clip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.clip-play {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center; padding-left: 3px; background: rgba(255, 255, 255, .92); color: var(--text); font-size: 1.1rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .25);
}
.clip-title {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 12px 10px; color: #fff; font: 700 .8rem/1.25 var(--body);
  background: linear-gradient(transparent, rgba(0, 0, 0, .7)); overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}

/* Las im\u00e1genes no se pueden arrastrar ni seleccionar (disuasorio; la protecci\u00f3n real est\u00e1 en vercel.json) */
img { -webkit-user-drag: none; user-select: none; pointer-events: none; }

/* ================= Admin ================= */
.adminpage { background: #f1eef8; }
.adm { max-width: 760px; margin: 0 auto; padding: 28px 16px 80px; }
.adm-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 18px; }
.adm-top h1 { flex: 1; font: 800 1.8rem var(--body); letter-spacing: -.03em; }
.adm-link { color: var(--muted); font-weight: 700; }
.adm-card { display: grid; gap: 14px; margin-top: 16px; padding: 20px; background: #fff; border-radius: 20px; box-shadow: 0 10px 28px rgba(40, 30, 80, .1); }
.adm-login { max-width: 380px; margin: 18vh auto 0; }
.adm-login h1 { font: 800 1.6rem var(--body); }
.adm-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.adm-head h2 { font: 800 1.1rem var(--body); }
.adm-head small { color: var(--muted); }
.adm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.adm-field { display: grid; gap: 6px; font-weight: 700; font-size: .85rem; }
.adm-field small { color: var(--muted); font-weight: 500; }
.adm input[type=text], .adm input[type=password], .adm input[type=number], .adm select, .adm textarea {
  width: 100%; padding: 10px 12px; border: 1.5px solid rgba(40, 30, 80, .18); border-radius: 12px;
  font: 500 .95rem var(--body); background: #fff; color: var(--text);
}
.adm input:focus, .adm select:focus, .adm textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.adm-range { display: flex; gap: 10px; align-items: center; }
.adm-range input[type=range] { flex: 1; }
.adm-range input[type=number] { width: 84px; }
.adm-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.adm-btn { padding: 10px 20px; border: 0; border-radius: 999px; background: var(--accent); color: #fff; font: 800 .85rem var(--body); cursor: pointer; }
.adm-btn.ghost { background: rgba(40, 30, 80, .08); color: var(--text); }
.adm-btn:disabled { opacity: .5; cursor: wait; }
.adm-msg { min-height: 1.2em; color: var(--muted); font-size: .85rem; }
.adm-flash { margin-top: 8px; padding: 10px 14px; border-radius: 12px; background: #d9f7e7; color: #0b5a33; font-weight: 700; }

/* Admin: tarjetas plegables, estado, misiones */
.adm-game { gap: 0; padding: 0; overflow: hidden; }
.adm-gh { display: flex; align-items: center; gap: 12px; width: 100%; padding: 16px 20px; border: 0; background: none; cursor: pointer; text-align: left; font: inherit; color: var(--text); }
.adm-gt { flex: 1; font-weight: 800; font-size: 1.05rem; }
.adm-gh b { font-weight: 800; }
.adm-mini { width: 70px; height: 7px; border-radius: 99px; background: rgba(40, 30, 80, .1); overflow: hidden; }
.adm-mini i { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.adm-chip { padding: 4px 10px; border-radius: 99px; font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; background: rgba(40, 30, 80, .08); color: var(--muted); }
.adm-chip.s-directo { background: #ffe0e0; color: #c4161c; }
.adm-chip.s-completado { background: #d9f7e7; color: #0b5a33; }
.adm-body { display: grid; gap: 14px; padding: 4px 20px 20px; }
.adm-body[hidden] { display: none; }
.adm-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 4px; border-radius: 14px; background: rgba(40, 30, 80, .07); }
.adm-seg button { padding: 10px 6px; border: 0; border-radius: 10px; background: none; font: 800 .82rem var(--body); color: var(--muted); cursor: pointer; }
.adm-seg button[aria-pressed=true] { background: #fff; color: var(--text); box-shadow: 0 2px 8px rgba(40, 30, 80, .15); }
.adm-seg button.s-directo[aria-pressed=true] { background: #ff3b3b; color: #fff; }
.adm-seg button.s-completado[aria-pressed=true] { background: #19b36a; color: #fff; }
.adm-read { font-size: .95rem; color: var(--muted); }
.adm-read b { color: var(--text); font-size: 1.15rem; }
.adm-bigbar { height: 12px; border-radius: 99px; background: rgba(40, 30, 80, .1); overflow: hidden; }
.adm-bigbar i { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.adm-next { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-radius: 16px; background: #f6f2ff; border: 1.5px solid rgba(40, 30, 80, .1); }
.adm-next > div:first-child { display: grid; gap: 2px; }
.adm-next small { color: var(--muted); font-weight: 700; font-size: .72rem; }
.adm-next strong { font-size: 1.1rem; }
.adm-btn:disabled:not([disabled=wait]) { cursor: not-allowed; }
.adm-more { border-radius: 14px; border: 1.5px solid rgba(40, 30, 80, .12); }
.adm-more > summary { padding: 12px 14px; cursor: pointer; font-weight: 800; font-size: .88rem; }
.adm-more[open] { padding-bottom: 14px; }
.adm-more > :not(summary) { margin: 0 14px; }
.adm-more > :not(summary) + :not(summary) { margin-top: 12px; }
.adm-groups { display: grid; gap: 8px; max-height: 70vh; overflow: auto; padding-right: 4px; }
.adm-mgroup { border-radius: 12px; background: #f6f2ff; }
.adm-mgroup > summary { display: flex; align-items: center; gap: 8px; padding: 10px 12px; cursor: pointer; font-weight: 700; font-size: .85rem; list-style: none; }
.adm-mgroup > summary::-webkit-details-marker { display: none; }
.adm-gname { flex: 1; }
.adm-mgroup summary em { font-style: normal; font-size: .65rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.adm-mgroup summary b { color: var(--muted); font-size: .78rem; }
.adm-mgroup.full summary b { color: #19b36a; }
.adm-mgroup ul { list-style: none; display: grid; padding: 0 12px 10px; }
.adm-mgroup li { display: flex; align-items: center; gap: 8px; padding: 2px 0; }
.adm-mgroup li label { flex: 1; display: flex; align-items: center; gap: 10px; padding: 6px 0; cursor: pointer; font-size: .9rem; }
.adm-mgroup input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.adm-wheelstep { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .9rem; font-weight: 700; }
.adm-wheelstep input { width: 100px; }
.adm-milestones { list-style: none; display: grid; gap: 2px; }
.adm-milestones li { display: flex; align-items: center; gap: 8px; padding: 2px 0; }
.adm-milestones li label { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: .9rem; }
.adm-milestones select { width: auto; flex: none; padding: 6px 10px; font-size: .8rem; }
.adm-tiny { padding: 4px 9px; border: 0; border-radius: 99px; background: rgba(40, 30, 80, .08); color: var(--muted); font: 700 .7rem var(--body); cursor: pointer; }
.adm-tiny:hover { background: rgba(40, 30, 80, .16); color: var(--text); }
.adm-tiny.big { padding: 9px 16px; font-size: .85rem; }
.adm-steps { display: flex; gap: 8px; flex-wrap: wrap; }
.adm-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
@media (max-width: 600px) { .adm-grid { grid-template-columns: 1fr; } }

/* Navegadores antiguos sin translate/rotate/scale sueltos: se usa transform para colocar los elementos */
@supports not (translate: 0) {
  .gcard { transform: translate(-50%, -50%) rotate(var(--r)); }
  .face-link, .face-link span, .halo { transform: translateX(-50%); }
  .clip-play { transform: translate(-50%, -50%); }
  @media (max-width: 900px), (max-aspect-ratio: 1/1) { .gcard { transform: none; } }
}

/* Navegadores sin unidades svh: se usa vh */
@supports not (height: 1svh) {
  body { min-height: 100vh; }
  .home { height: 100vh; }
  .face { height: 98vh; }
  .face-link { width: min(30vh, 38%); }
  @media (max-width: 900px), (max-aspect-ratio: 1/1) {
    .home { height: auto; min-height: 100vh; }
    .halo { top: 10vh; }
    .gta6 { top: 35vh; --min: min(40vw, 22vh); --max: min(76vw, 44vh); }
    .face-wrap { height: 54vh; }
    .face { height: 54vh; }
  }
}
