/* =========================================================
   Zona7Radio — sistema visual
   Estética: synthwave urbano, joven, vibrante.
   Accesibilidad: WCAG AA+ (contraste, foco, motion, lectores).
   ========================================================= */

@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600&display=swap");

:root {
  /* tema oscuro (default) */
  --bg-0: #07040f;
  --bg-1: #0d0820;
  --bg-2: #160c2e;
  --surface: rgba(28, 17, 56, 0.62);
  --surface-strong: rgba(38, 22, 76, 0.86);
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.18);

  --text: #f5f2ff;
  --text-muted: #b8afd9;
  --text-dim: #8a82ad;

  --neon-magenta: #ff2e93;
  --neon-cyan: #00e5ff;
  --neon-violet: #a855f7;
  --neon-coral: #ff6b6b;

  --grad-primary: linear-gradient(135deg, var(--neon-magenta) 0%, var(--neon-violet) 50%, var(--neon-cyan) 100%);
  --grad-soft: linear-gradient(135deg, rgba(255, 46, 147, 0.18), rgba(0, 229, 255, 0.18));
  --grad-text: linear-gradient(120deg, #ffffff 0%, #ffd1ec 35%, #b9e9ff 70%, #ffffff 100%);

  --shadow-card: 0 24px 60px -20px rgba(168, 85, 247, 0.45), 0 8px 24px -8px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 0 1px rgba(255, 46, 147, 0.3), 0 0 32px rgba(255, 46, 147, 0.35), 0 0 64px rgba(0, 229, 255, 0.18);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --ring: 0 0 0 3px rgba(0, 229, 255, 0.55), 0 0 0 5px rgba(255, 46, 147, 0.35);

  --t-fast: 140ms;
  --t-med: 260ms;
  --t-slow: 480ms;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  /* zoom global (1 = 100%). Se sobreescribe vía JS. */
  --zoom: 1;
}

/* =========================================================
   TEMA CLARO — paleta legible que conserva los acentos neón.
   Se aplica si el usuario eligió "Claro" explícitamente o si
   está en "Sistema" y el SO está en modo claro.
   ========================================================= */
:root[data-theme="light"],
:root[data-theme="system"].is-light-system {
  --bg-0: #fef9ff;
  --bg-1: #f7eaff;
  --bg-2: #ffe6f5;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --border: rgba(20, 0, 50, 0.10);
  --border-strong: rgba(20, 0, 50, 0.20);

  --text: #1a0e2e;
  --text-muted: #4a3960;
  --text-dim: #8d7fac;

  --grad-text: linear-gradient(120deg, #1a0e2e 0%, #5a1d6e 35%, #00425b 70%, #1a0e2e 100%);

  --shadow-card: 0 24px 60px -20px rgba(168, 85, 247, 0.30), 0 8px 24px -8px rgba(20, 0, 50, 0.18);
  --shadow-glow: 0 0 0 1px rgba(255, 46, 147, 0.35), 0 0 28px rgba(255, 46, 147, 0.25), 0 0 56px rgba(0, 229, 255, 0.15);

  --ring: 0 0 0 3px rgba(168, 85, 247, 0.55), 0 0 0 5px rgba(255, 46, 147, 0.30);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* zoom escalable: cualquier rem se reescala con --zoom */
  font-size: calc(16px * var(--zoom, 1));
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 88% -10%, rgba(255, 46, 147, 0.18), transparent 60%),
    radial-gradient(900px 700px at -10% 110%, rgba(0, 229, 255, 0.14), transparent 60%),
    radial-gradient(700px 500px at 50% 50%, rgba(168, 85, 247, 0.10), transparent 70%),
    linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 50%, var(--bg-2) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--neon-magenta); color: #fff; }

a { color: var(--neon-cyan); text-decoration: none; transition: color var(--t-fast) var(--ease); }
a:hover { color: var(--neon-magenta); }

/* ---------- Foco accesible (alto contraste, visible) ---------- */
:where(a, button, [role="button"], input, select, summary, [tabindex]):focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: 12px;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  background: var(--neon-magenta);
  color: #fff;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transform: translateY(-200%);
  transition: transform var(--t-med) var(--ease);
  z-index: 1000;
}
.skip-link:focus { transform: translateY(0); color: #fff; }

/* ---------- Layout ---------- */
.shell {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: clamp(20px, 4vw, 40px) clamp(16px, 4vw, 28px) 80px;
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3vw, 32px);
}

.brand-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 6px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--grad-primary);
  display: grid;
  place-items: center;
  color: #fff;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 18px;
  box-shadow: 0 8px 24px -6px rgba(255, 46, 147, 0.6);
}

.brand-name {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 1.15rem;
}

.brand-name b { color: var(--neon-magenta); }

/* =========================================================
   REPRODUCTOR
   ========================================================= */

.player {
  position: relative;
  border-radius: var(--radius-lg);
  padding: clamp(18px, 3vw, 26px);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  overflow: hidden;
  isolation: isolate;
}

/* Borde gradiente animado */
.player::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: var(--grad-primary);
  background-size: 220% 220%;
  -webkit-mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0.55;
  pointer-events: none;
  animation: borderShift 8s linear infinite;
  z-index: 0;
}

.player::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(400px 220px at 0% 0%, rgba(255, 46, 147, 0.18), transparent 60%),
    radial-gradient(400px 220px at 100% 100%, rgba(0, 229, 255, 0.18), transparent 60%);
  pointer-events: none;
  opacity: 0.7;
  z-index: 0;
}

.player[data-state="playing"] {
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.player > * { position: relative; z-index: 1; }

@keyframes borderShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.player__top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: clamp(14px, 2.5vw, 22px);
  align-items: center;
}

/* ---------- Botón play ---------- */
.player__play {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  background: var(--grad-primary);
  background-size: 220% 220%;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow:
    0 14px 32px -10px rgba(255, 46, 147, 0.7),
    0 0 0 4px rgba(255, 255, 255, 0.06) inset;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-med) var(--ease);
  animation: shineRotate 6s linear infinite;
  flex-shrink: 0;
}

.player__play:hover { transform: scale(1.06); }
.player__play:active { transform: scale(0.97); }

.player__play svg { width: 30px; height: 30px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35)); }
.player__play .icon-pause { display: none; }
.player__play .icon-loading { display: none; }

.player[data-state="playing"] .player__play .icon-play { display: none; }
.player[data-state="playing"] .player__play .icon-pause { display: block; }
.player[data-state="loading"] .player__play .icon-play { display: none; }
.player[data-state="loading"] .player__play .icon-loading { display: block; animation: spin 1.1s linear infinite; }

@keyframes shineRotate {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Pulso alrededor del botón cuando suena */
.player__play::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid rgba(255, 46, 147, 0.55);
  opacity: 0;
  pointer-events: none;
}
.player[data-state="playing"] .player__play::before {
  animation: pulseRing 1.8s var(--ease) infinite;
}
@keyframes pulseRing {
  0%   { transform: scale(0.85); opacity: 0.7; }
  80%  { transform: scale(1.45); opacity: 0; }
  100% { transform: scale(1.45); opacity: 0; }
}

/* ---------- Centro: nombre + ahora suena + ecualizador ---------- */
.player__info {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.player__live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  width: fit-content;
}

.player__live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-dim);
  box-shadow: 0 0 0 0 rgba(255, 46, 147, 0);
  transition: background var(--t-med) var(--ease);
}

.player[data-state="playing"] .player__live { color: var(--neon-magenta); }
.player[data-state="playing"] .player__live-dot {
  background: var(--neon-magenta);
  animation: livePulse 1.4s var(--ease) infinite;
}
@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 46, 147, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(255, 46, 147, 0); }
}

.player__title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(1.25rem, 2.6vw, 1.7rem);
  line-height: 1.1;
  margin: 0;
  background: var(--grad-text);
  background-size: 200% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  animation: shimmer 9s linear infinite;
}

@keyframes shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.player__now {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 22px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.player__now-label {
  flex-shrink: 0;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--neon-cyan);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.25);
}

.player__now-track {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 500;
  color: var(--text);
  flex: 1;
  min-width: 0;
}

/* ---------- Ecualizador animado ---------- */
.player__eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 18px;
  margin-top: 4px;
  opacity: 0.4;
  transition: opacity var(--t-med) var(--ease);
}

.player[data-state="playing"] .player__eq { opacity: 1; }

.player__eq span {
  display: block;
  width: 4px;
  background: var(--grad-primary);
  border-radius: 2px;
  height: 30%;
}

.player[data-state="playing"] .player__eq span {
  animation: eqBounce 1s var(--ease) infinite;
}
.player[data-state="playing"] .player__eq span:nth-child(1) { animation-delay: 0.0s; animation-duration: 0.9s; }
.player[data-state="playing"] .player__eq span:nth-child(2) { animation-delay: 0.15s; animation-duration: 1.1s; }
.player[data-state="playing"] .player__eq span:nth-child(3) { animation-delay: 0.30s; animation-duration: 0.8s; }
.player[data-state="playing"] .player__eq span:nth-child(4) { animation-delay: 0.10s; animation-duration: 1.2s; }
.player[data-state="playing"] .player__eq span:nth-child(5) { animation-delay: 0.40s; animation-duration: 0.95s; }

@keyframes eqBounce {
  0%, 100% { height: 25%; }
  50% { height: 100%; }
}

/* ---------- Volumen ---------- */
.player__volume {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.player__mute {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.player__mute:hover { background: rgba(255, 46, 147, 0.18); border-color: var(--neon-magenta); }
.player__mute svg { width: 20px; height: 20px; }
.player__mute .icon-volume-off { display: none; }
.player[data-muted="true"] .player__mute .icon-volume-on { display: none; }
.player[data-muted="true"] .player__mute .icon-volume-off { display: block; color: var(--neon-magenta); }

.player__slider {
  -webkit-appearance: none;
  appearance: none;
  width: 110px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: linear-gradient(
    to right,
    var(--neon-magenta) 0%,
    var(--neon-violet) var(--vol, 80%),
    rgba(255, 255, 255, 0.10) var(--vol, 80%),
    rgba(255, 255, 255, 0.10) 100%
  );
  cursor: pointer;
  outline: none;
}
.player__slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 46, 147, 0.5), 0 4px 10px rgba(0, 0, 0, 0.4);
  cursor: grab;
  border: 0;
}
.player__slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 46, 147, 0.5), 0 4px 10px rgba(0, 0, 0, 0.4);
  cursor: grab;
  border: 0;
}

/* ---------- Estado / mensajería ---------- */
.player__status {
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.player__status-msg { min-height: 18px; }
.player__listeners {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
}
.player__listeners[hidden] { display: none; }

/* ---------- Solicitar canción ---------- */
.player__extras {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Pill peticiones: borde degradado lento (como .player) + destello interior — distinto del anillo rotatorio de redes */
.player__songreq {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 4px 18px rgba(0, 0, 0, 0.22);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-med) var(--ease);
}

.player__songreq::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  box-sizing: border-box;
  background: var(--grad-primary);
  background-size: 220% 220%;
  -webkit-mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
          mask-composite: exclude;
  opacity: 0.58;
  z-index: -2;
  animation: borderShift 14s linear infinite;
}

.player__songreq::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: inherit;
  z-index: -1;
  overflow: hidden;
  background:
    linear-gradient(
      115deg,
      transparent 0%,
      transparent 40%,
      rgba(255, 255, 255, 0.22) 50%,
      transparent 60%,
      transparent 100%
    ),
    linear-gradient(135deg, rgba(255, 46, 147, 0.14), rgba(168, 85, 247, 0.08), rgba(0, 229, 255, 0.12)),
    var(--surface-strong);
  background-size: 280% 100%, auto, auto;
  background-position: 0% 0, 0 0, 0 0;
  animation: songreqInnerSheen 8s ease-in-out infinite;
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  border: 1px solid var(--border-strong);
  box-shadow:
    0 0 28px -6px rgba(255, 46, 147, 0.3) inset,
    0 0 20px -8px rgba(0, 229, 255, 0.1) inset;
}

.player[data-state="playing"] .player__songreq::before {
  opacity: 0.72;
  animation-duration: 10s;
}

.player[data-state="playing"] .player__songreq::after {
  animation-duration: 5.5s;
}

.player__songreq:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12) inset,
    0 10px 32px rgba(255, 46, 147, 0.22),
    0 0 36px rgba(0, 229, 255, 0.12);
}

.player__songreq:active {
  transform: scale(0.98);
}

.player__songreq:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.player__songreq-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  position: relative;
  z-index: 1;
  color: var(--neon-magenta);
  animation: songreqIconLull 6.5s ease-in-out infinite;
}

.player__songreq-text {
  position: relative;
  z-index: 1;
  background: var(--grad-text);
  background-size: 240% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  animation: shimmer 12s linear infinite;
}

/* Anillo social: rotación; peticiones: sin esta keyframe */
@keyframes z7SocialRingRotate {
  to { transform: rotate(360deg); }
}

@keyframes songreqInnerSheen {
  0%, 35% {
    background-position: 160% 0, 0 0, 0 0;
  }

  65%, 100% {
    background-position: -80% 0, 0 0, 0 0;
  }
}

@keyframes songreqIconLull {
  0%, 100% {
    color: var(--neon-magenta);
    filter: drop-shadow(0 0 5px rgba(255, 46, 147, 0.42));
  }

  50% {
    color: var(--neon-cyan);
    filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.38));
  }
}

/* ---------- Modal peticiones — misma línea visual que body + player ---------- */
.songreq {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 28px);
  box-sizing: border-box;
}

.songreq[hidden] {
  display: none !important;
}

.songreq__backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 900px 520px at 88% -8%, rgba(255, 46, 147, 0.16), transparent 55%),
    radial-gradient(ellipse 780px 480px at 0% 102%, rgba(0, 229, 255, 0.12), transparent 55%),
    rgba(7, 4, 15, 0.78);
  backdrop-filter: blur(10px) saturate(135%);
}

.songreq__panel {
  position: relative;
  width: min(680px, 100%);
  max-height: min(92vh, 900px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(18px, 4vw, 26px);
  border-radius: var(--radius-lg);
  isolation: isolate;
  background: var(--surface-strong);
  border: 1px solid var(--border-strong);
  box-shadow:
    var(--shadow-card),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  color: var(--text);
  backdrop-filter: blur(14px) saturate(145%);
  -webkit-backdrop-filter: blur(14px) saturate(145%);
  overflow: hidden;
}

.songreq__panel::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: var(--grad-primary);
  background-size: 220% 220%;
  -webkit-mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0.52;
  pointer-events: none;
  animation: borderShift 11s linear infinite;
  z-index: 0;
}

.songreq__panel > * {
  position: relative;
  z-index: 1;
}

.songreq__title {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(1.15rem, 2.8vw, 1.35rem);
  line-height: 1.22;
  letter-spacing: -0.02em;
  background: var(--grad-text);
  background-size: 200% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  animation: shimmer 10s linear infinite;
}

.songreq__intro {
  margin: 0;
  margin-top: 10px;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.songreq__intro p {
  margin: 0;
}

.songreq__intro p + p {
  margin-top: 0.62em;
}

.songreq__embed-wrap {
  flex: 1 1 auto;
  min-height: min(62vh, 520px);
  max-height: min(70vh, 640px);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
}

.songreq__iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: min(62vh, 520px);
  border: 0;
  background: var(--bg-1);
}

.songreq__footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

.songreq__back {
  position: relative;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: linear-gradient(
    165deg,
    rgba(255, 46, 147, 0.12),
    rgba(0, 229, 255, 0.06)
  );
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease),
    box-shadow var(--t-med) var(--ease);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.songreq__back:hover {
  border-color: var(--neon-cyan);
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 6px 20px rgba(0, 229, 255, 0.12);
}

.songreq__back:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

:root[data-theme="light"] .songreq__backdrop {
  background:
    radial-gradient(ellipse 900px 520px at 82% -6%, rgba(255, 46, 147, 0.12), transparent 55%),
    radial-gradient(ellipse 740px 420px at 0% 100%, rgba(0, 229, 255, 0.08), transparent 55%),
    rgba(254, 249, 255, 0.86);
}

@media (prefers-reduced-motion: reduce) {
  .player__songreq,
  .player__songreq::before,
  .player__songreq::after {
    animation: none !important;
  }
  .player__songreq::before {
    transform: none;
  }
  .player__songreq {
    transition: none;
    filter: none;
  }
  .player__songreq-text {
    animation: none !important;
    background: none !important;
    -webkit-background-clip: unset !important;
            background-clip: unset !important;
    -webkit-text-fill-color: var(--text) !important;
    color: var(--text) !important;
  }
  .player__songreq-icon {
    animation: none !important;
    color: var(--neon-magenta);
    filter: none;
  }
  .songreq__panel::before {
    animation: none !important;
  }
  .songreq__title {
    animation: none !important;
    background: none !important;
    -webkit-background-clip: unset !important;
            background-clip: unset !important;
    -webkit-text-fill-color: unset !important;
    color: var(--text);
  }
  .songreq__back:hover {
    transform: none;
  }

  .z7-social-capsule {
    animation: none !important;
    transform: translate3d(max(16px, env(safe-area-inset-left, 0px)), 0, 0) !important;
    margin-bottom: 0 !important;
  }

  .z7-social-capsule::before {
    animation: none !important;
    transform: none !important;
  }

  .z7-social-capsule__label {
    animation: none !important;
    background: none !important;
    -webkit-background-clip: unset !important;
            background-clip: unset !important;
    -webkit-text-fill-color: unset !important;
    color: var(--text-muted);
  }
}

/* ---------- Nuestras redes — cápsula que recorre el ancho visible ---------- */

.z7-social-rail {
  position: fixed;
  left: 0;
  bottom: clamp(14px, 5vmin, max(38px, env(safe-area-inset-bottom, 14px)));
  width: auto;
  max-width: calc(100vw - 10px);
  z-index: 58;
  pointer-events: none;
  transition:
    opacity 320ms var(--ease),
    filter 320ms var(--ease);
}

.z7-social-rail--muted {
  opacity: 0.22;
  filter: saturate(0.72) brightness(0.94);
  pointer-events: none;
}

.z7-social-rail--muted .z7-social-capsule,
.z7-social-rail--muted .z7-social-link {
  pointer-events: none;
}

.z7-social-capsule {
  pointer-events: auto;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: clamp(8px, 2.2vw, 12px);
  padding: 8px clamp(12px, 3.5vw, 17px);
  border-radius: var(--radius-pill);
  isolation: isolate;
  background: transparent;
  box-shadow:
    0 10px 32px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  animation:
    z7SocialCruise 28s cubic-bezier(0.45, 0.03, 0.55, 0.97) infinite alternate,
    z7SocialLevitate 5.6s ease-in-out infinite alternate;
}

.z7-social-capsule:hover,
.z7-social-capsule:focus-within {
  animation-play-state: paused;
}

/* Borde neón exactamente al contorno de la cápsula (sin sobresalir al girar) */
.z7-social-capsule::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  box-sizing: border-box;
  background: conic-gradient(
    from 218deg,
    var(--neon-cyan),
    var(--neon-magenta),
    var(--neon-violet),
    var(--neon-cyan)
  );
  -webkit-mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
          mask-composite: exclude;
  z-index: -2;
  transform-origin: center;
  animation: z7SocialRingRotate 7.2s linear infinite;
}

.z7-social-capsule::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: inherit;
  background:
    linear-gradient(138deg, rgba(255, 46, 147, 0.15), rgba(168, 85, 247, 0.1), rgba(0, 229, 255, 0.14)),
    var(--surface-strong);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  border: 1px solid var(--border-strong);
  z-index: -1;
}

.z7-social-capsule__label {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
  background: var(--grad-text);
  background-size: 220% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  animation: shimmer 14s linear infinite;
}

.z7-social-capsule__divider {
  flex-shrink: 0;
  width: 1px;
  height: 19px;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(255, 255, 255, 0.42),
    transparent
  );
}

.z7-social-link {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  color: rgba(248, 244, 255, 0.96);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition:
    transform var(--t-fast) var(--ease),
    background var(--t-med) var(--ease),
    border-color var(--t-med) var(--ease),
    color var(--t-med) var(--ease),
    box-shadow var(--t-med) var(--ease);
  box-shadow: 0 0 20px transparent;
}

.z7-social-link:hover {
  transform: translateY(-1px) scale(1.05);
}

.z7-social-link:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.z7-social-link--fb:hover {
  color: #fff;
  background: rgba(8, 102, 255, 0.36);
  border-color: rgba(66, 135, 255, 0.65);
  box-shadow: 0 0 26px rgba(8, 102, 255, 0.48);
}

.z7-social-link--ig:hover {
  color: #fff;
  border-color: rgba(255, 46, 147, 0.55);
  background: radial-gradient(
      circle at 30% 100%,
      rgba(253, 199, 0, 0.38),
      rgba(245, 0, 90, 0.28) 42%,
      rgba(146, 0, 206, 0.28) 68%,
      rgba(72, 0, 174, 0.32)
    ),
    rgba(255, 255, 255, 0.04);
  box-shadow: 0 0 28px rgba(255, 46, 147, 0.36);
}

@media (max-width: 420px) {
  .z7-social-capsule__label,
  .z7-social-capsule__divider {
    display: none;
  }

  .z7-social-capsule {
    gap: 7px;
    padding-inline: 10px;
  }
}

:root[data-theme="light"] .z7-social-link {
  background: rgba(255, 255, 255, 0.5);
}

:root[data-theme="light"] .z7-social-link--fb:hover {
  background: rgba(8, 102, 255, 0.4);
}

@keyframes z7SocialCruise {
  0% {
    transform: translate3d(14px, 0, 0);
  }

  100% {
    transform: translate3d(calc(100vw - 100% - 14px), 0, 0);
  }
}

@keyframes z7SocialLevitate {
  from {
    margin-bottom: 0;
  }

  to {
    margin-bottom: 9px;
  }
}

/* Responsive del reproductor */
@media (max-width: 640px) {
  .player__top { grid-template-columns: auto 1fr; grid-template-rows: auto auto; }
  .player__volume { grid-column: 1 / -1; justify-content: flex-end; }
  .player__extras { justify-content: center; }
  .player__slider { width: 140px; }
  .player__play { width: 64px; height: 64px; }
  .player__play svg { width: 26px; height: 26px; }
}

/* =========================================================
   MENÚ DE NAVEGACIÓN — flotante (sticky), glassmorphism premium.
   ========================================================= */

.nav {
  position: sticky;
  top: clamp(8px, 1.4vw, 16px);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px 10px 12px;
  margin: 0 0 6px;
  border-radius: var(--radius-pill);
  background:
    linear-gradient(135deg, rgba(28, 17, 56, 0.72), rgba(38, 22, 76, 0.62)),
    var(--surface-strong);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow:
    0 14px 36px -18px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition:
    box-shadow var(--t-med) var(--ease),
    transform var(--t-med) var(--ease),
    border-color var(--t-med) var(--ease),
    background var(--t-med) var(--ease),
    padding var(--t-med) var(--ease);
}

:root[data-theme="light"] .nav,
:root[data-theme="system"].is-light-system .nav {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(255, 234, 248, 0.74)),
    var(--surface-strong);
  box-shadow:
    0 14px 36px -18px rgba(20, 0, 50, 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.nav.is-scrolled {
  border-color: rgba(255, 46, 147, 0.40);
  box-shadow:
    0 22px 48px -18px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(255, 46, 147, 0.18),
    0 0 36px -8px rgba(168, 85, 247, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
:root[data-theme="light"] .nav.is-scrolled,
:root[data-theme="system"].is-light-system .nav.is-scrolled {
  box-shadow:
    0 22px 48px -18px rgba(20, 0, 50, 0.40),
    0 0 0 1px rgba(255, 46, 147, 0.30),
    0 0 36px -8px rgba(168, 85, 247, 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

/* ---- Brand integrada ---- */
.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 4px 10px 4px 4px;
  border-radius: var(--radius-pill);
  color: inherit;
  flex-shrink: 0;
  transition: transform var(--t-fast) var(--ease);
}
.nav__brand:hover { transform: translateY(-1px); }

.nav__brand-mark {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--grad-primary);
  background-size: 220% 220%;
  animation: shimmer 9s linear infinite;
  box-shadow: 0 6px 20px -6px rgba(255, 46, 147, 0.55);
  flex-shrink: 0;
}
.nav__brand-mark-inner {
  position: relative;
  z-index: 2;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.nav__brand-mark-pulse {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--grad-primary);
  filter: blur(8px);
  opacity: 0.55;
  z-index: 1;
  animation: brandPulse 3.4s var(--ease) infinite;
}
@keyframes brandPulse {
  0%, 100% { opacity: 0.45; transform: scale(0.96); }
  50%      { opacity: 0.85; transform: scale(1.06); }
}

.nav__brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  min-width: 0;
}
.nav__brand-name {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
  color: var(--text);
}
.nav__brand-name b {
  font-weight: 800;
  background: var(--grad-primary);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}
.nav__brand-tag {
  font-family: "Inter", sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 2px;
}

.nav__brand.is-active .nav__brand-name { color: var(--text); }

/* ---- Lista horizontal de items ---- */
.nav__menu {
  list-style: none;
  margin: 0;
  padding: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1 1 auto;
  justify-content: flex-end;
  flex-wrap: nowrap;
  overflow: hidden;
}
.nav__item { display: contents; }

.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  transition:
    color var(--t-fast) var(--ease),
    background var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease);
}
.nav__link::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 46, 147, 0.18), rgba(0, 229, 255, 0.14));
  opacity: 0;
  transition: opacity var(--t-fast) var(--ease);
  z-index: 0;
}
.nav__link-text { position: relative; z-index: 1; }

.nav__link:hover,
.nav__link:focus-visible {
  color: var(--text);
  transform: translateY(-1px);
}
.nav__link:hover::before,
.nav__link:focus-visible::before { opacity: 1; }

.nav__link.is-active {
  color: #ffffff;
  background: var(--grad-primary);
  background-size: 220% 220%;
  animation: shimmer 9s linear infinite;
  box-shadow:
    0 8px 22px -10px rgba(255, 46, 147, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.nav__link.is-active::before { opacity: 0; }

/* ---- Botón hamburguesa (móvil) ---- */
.nav__toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin-left: auto;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
:root[data-theme="light"] .nav__toggle,
:root[data-theme="system"].is-light-system .nav__toggle {
  background: rgba(20, 0, 50, 0.04);
}
.nav__toggle:hover {
  background: rgba(255, 46, 147, 0.12);
  border-color: var(--neon-magenta);
  transform: translateY(-1px);
}
.nav__toggle-bars {
  display: inline-grid;
  grid-template-rows: repeat(3, 2px);
  gap: 4px;
  width: 18px;
}
.nav__toggle-bars span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--t-med) var(--ease), opacity var(--t-med) var(--ease), background var(--t-med) var(--ease);
}
.nav__toggle[aria-expanded="true"] .nav__toggle-bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); background: var(--neon-magenta); }
.nav__toggle[aria-expanded="true"] .nav__toggle-bars span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] .nav__toggle-bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); background: var(--neon-magenta); }

/* ---- Tablet/móvil: lista colapsa en panel desplegable ---- */
@media (max-width: 1080px) {
  .nav { padding: 8px 8px 8px 10px; gap: 8px; }
  .nav__brand-tag { display: none; }
  .nav__brand-name { font-size: 0.95rem; }
  .nav__toggle { display: inline-flex; }
  .nav__menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px;
    background: var(--surface-strong);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    transform-origin: top center;
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
    pointer-events: none;
    transition: opacity var(--t-med) var(--ease), transform var(--t-med) var(--ease);
    overflow: visible;
  }
  .nav__menu[data-open="true"] {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }
  .nav__item { display: list-item; list-style: none; }
  .nav__link {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.98rem;
  }
}

@media (max-width: 420px) {
  .nav__brand-text { display: none; }
}

/* Respeto a `prefers-reduced-motion`. */
@media (prefers-reduced-motion: reduce) {
  .nav, .nav__link, .nav__brand, .nav__toggle, .nav__brand-mark-pulse {
    transition: none;
    animation: none;
  }
}

/* =========================================================
   CONTENIDO DE PÁGINA
   ========================================================= */

.page {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 5vw, 56px);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  text-align: center;
}

.page__welcome {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  line-height: 1.05;
  margin: 0 0 8px;
  background: var(--grad-text);
  background-size: 200% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  animation: shimmer 11s linear infinite;
}

.page__welcome em {
  font-style: normal;
  background: var(--grad-primary);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}

.page__divider {
  width: 110px;
  height: 4px;
  margin: 18px auto 28px;
  border-radius: var(--radius-pill);
  background: var(--grad-primary);
  background-size: 200% 100%;
  animation: shimmer 5s linear infinite;
}

.page__lead {
  margin: 0 auto 20px;
  max-width: 60ch;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.75;
  color: var(--text-muted);
  text-align: left;
}

.page__lead strong { color: var(--text); font-weight: 600; }
.page__lead .accent { color: var(--neon-magenta); font-weight: 600; }

.page__signoff {
  margin: 28px auto 0;
  max-width: 50ch;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  letter-spacing: 0.01em;
  color: var(--text);
}
.page__signoff em {
  font-style: normal;
  background: var(--grad-primary);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}

.page__title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  margin: 0 0 6px;
  color: var(--text);
}
.page__subtitle {
  margin: 0 auto 22px;
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 55ch;
}

.page__section {
  margin: clamp(32px, 5vw, 56px) auto 0;
  max-width: 70ch;
  text-align: left;
}
.page__section + .page__section { margin-top: clamp(36px, 6vw, 64px); }
.page__section-title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0 0 6px;
  background: var(--grad-primary);
  background-size: 200% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  animation: shimmer 9s linear infinite;
}
.page__section-rule {
  width: 72px;
  height: 3px;
  margin: 0 0 22px;
  border-radius: var(--radius-pill);
  background: var(--grad-primary);
  background-size: 200% 100%;
  animation: shimmer 5s linear infinite;
  border: 0;
}
.page__lead em {
  font-style: normal;
  background: var(--grad-primary);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  font-weight: 600;
}

.page__list {
  margin: 6px 0 22px 1.6em;
  padding: 0;
  max-width: 60ch;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.75;
  color: var(--text-muted);
}
.page__list li {
  margin: 6px 0;
  padding-left: 6px;
}
.page__list li::marker {
  color: var(--neon-magenta);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
}
.page__list strong {
  color: var(--text);
  font-weight: 600;
}

.page__placeholder {
  margin: 30px auto 0;
  max-width: 56ch;
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-strong);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  text-align: left;
  font-size: 0.95rem;
}

/* =========================================================
   Colabora — reglamento + formulario
   ========================================================= */
.page--colab {
  text-align: left;
  max-width: min(900px, 100%);
  margin-left: auto;
  margin-right: auto;
}
.page--colab .page__welcome,
.page--colab .page__divider {
  text-align: center;
}
.page__lead--center {
  text-align: center !important;
  max-width: 58ch;
  margin-left: auto;
  margin-right: auto;
}

.logo--compact {
  margin-top: 8px;
  margin-bottom: 4px;
  max-width: min(320px, 88vw);
}

.colab-hero {
  text-align: center;
  margin-bottom: clamp(28px, 4vw, 48px);
}
.colab-kicker {
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--text-dim);
  margin: 0 0 10px;
}
.colab-kicker .neon {
  color: var(--neon-cyan);
  font-weight: 800;
}

.colab-welcome-text {
  margin: 0 auto;
  max-width: 62ch;
  text-align: left;
}
.colab-welcome-text p {
  margin: 0 0 14px;
  font-size: clamp(1rem, 1.55vw, 1.12rem);
  line-height: 1.75;
  color: var(--text-muted);
}
.colab-welcome-text strong { color: var(--text); font-weight: 600; }

.colab-alert {
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin: 20px 0 24px;
  font-size: 0.96rem;
  line-height: 1.55;
  outline: none;
}
.colab-alert--warn {
  border: 1px solid rgba(250, 204, 21, 0.45);
  background: rgba(250, 204, 21, 0.08);
  color: #fde68a;
}
.colab-alert--danger {
  border: 1px solid rgba(248, 113, 113, 0.5);
  background: rgba(248, 113, 113, 0.1);
  color: #fecaca;
}

.colab-card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: clamp(22px, 3.5vw, 40px);
  background:
    linear-gradient(145deg, rgba(26, 14, 54, 0.95), rgba(10, 8, 28, 0.98));
  border: 1px solid rgba(168, 85, 247, 0.35);
  box-shadow:
    0 28px 70px -34px rgba(0, 229, 255, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.colab-card-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  margin: 0 0 4px;
  background: var(--grad-primary);
  background-size: 200% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  text-align: center;
}
.elab-sub {
  text-align: center;
  margin: 0 0 28px;
  font-size: 1.05rem;
  color: var(--neon-magenta);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.colab-reg-seccion {
  margin-bottom: clamp(22px, 3vw, 32px);
}
.colab-reg-seccion:last-of-type { margin-bottom: 8px; }

.colab-reg-h {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.08rem, 2vw, 1.25rem);
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.colab-reg-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 800;
  background: linear-gradient(135deg, rgba(255, 46, 147, 0.35), rgba(0, 229, 255, 0.25));
  border: 1px solid rgba(255, 46, 147, 0.4);
  color: #fff;
}

.elab-p {
  margin: 0 0 12px;
  font-size: clamp(0.96rem, 1.5vw, 1.05rem);
  line-height: 1.78;
  color: var(--text-muted);
}
.elab-nota {
  margin: 14px 0 0;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--neon-cyan);
  background: rgba(0, 229, 255, 0.06);
  font-size: 0.96rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.elab-romano,
.elab-abc {
  margin: 8px 0 0 0;
  padding-left: 1.75em;
  color: var(--text-muted);
  line-height: 1.75;
  font-size: clamp(0.95rem, 1.45vw, 1.04rem);
}
.elab-romano li,
.elab-abc li { margin: 8px 0; }
.elab-romano li::marker { color: var(--neon-magenta); font-weight: 700; }
.elab-abc li::marker { color: var(--neon-cyan); font-weight: 700; }

.colab-decision {
  margin: clamp(32px, 5vw, 48px) auto 0;
  max-width: 52ch;
}
.colab-decision-inner {
  padding: clamp(22px, 3vw, 32px);
  border-radius: var(--radius-lg);
  text-align: center;
  background:
    radial-gradient(800px 220px at 50% -40%, rgba(255, 46, 147, 0.2), transparent),
    linear-gradient(180deg, rgba(22, 10, 48, 0.9), rgba(10, 8, 26, 0.95));
  border: 1px solid rgba(0, 229, 255, 0.28);
  box-shadow: 0 20px 56px -28px rgba(168, 85, 247, 0.55);
}
.colab-decision-heading {
  margin: 0 0 12px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
  font-weight: 800;
  color: var(--text);
}
.colab-decision-lead {
  margin: 0 0 22px;
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 1rem;
}

.colab-choice-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

.elab-btn {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
  padding: 14px 26px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.elab-btn--accept {
  color: #fff;
  background: linear-gradient(120deg, #ff2e93, #a855f7);
  box-shadow: 0 12px 36px -14px rgba(255, 46, 147, 0.85);
}
.elab-btn--accept:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 42px -14px rgba(0, 229, 255, 0.55);
}
.elab-btn--accept:focus-visible {
  outline: 2px solid var(--neon-cyan);
  outline-offset: 3px;
}

.elab-btn--reject {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}
.elab-btn--reject:hover {
  color: var(--text);
  border-color: rgba(255, 46, 147, 0.4);
  transform: translateY(-1px);
}

.elab-form-shell {
  margin-top: clamp(40px, 6vw, 64px);
}
.colab-anchor {
  display: block;
  position: relative;
  top: clamp(-80px, -10vh, -48px);
  height: 0;
  overflow: hidden;
}

.elab-form-intro {
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.elab-form-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  font-weight: 800;
  margin: 0 0 16px;
  color: var(--text);
}
.elab-required-note {
  margin: 14px 0 0;
  font-size: 0.86rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}

.elab-form {
  padding: clamp(20px, 3vw, 32px);
  border-radius: var(--radius-lg);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(168, 85, 247, 0.28);
}
.elab-fieldset:disabled {
  opacity: 0.55;
  pointer-events: none;
}

.elab-field-group {
  margin-bottom: clamp(26px, 4vw, 36px);
  border: none;
  padding: 0;
}
.elab-radio-group label.elab-choice { cursor: pointer; }

.elab-group-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 14px;
  color: var(--text);
}
.elab-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  margin-right: 8px;
  border-radius: 8px;
  font-size: 0.82rem;
  background: rgba(0, 229, 255, 0.15);
  color: var(--neon-cyan);
  font-weight: 800;
  vertical-align: middle;
}

.elab-hint {
  margin: -4px 0 12px;
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.5;
}
.elab-hint--spaced {
  margin-top: 22px;
}

.elab-row { margin-bottom: 16px; }
.elab-row--half {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 620px) {
  .elab-row--half {
    grid-template-columns: 1fr;
  }
}

.elab-label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.elab-input,
.elab-textarea {
  width: 100%;
  box-sizing: border-box;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 6, 24, 0.85);
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  padding: 12px 14px;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.elab-textarea {
  min-height: 88px;
  resize: vertical;
  line-height: 1.55;
}
.elab-input:focus-visible,
.elab-textarea:focus-visible {
  outline: none;
  border-color: rgba(0, 229, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.15);
}

.elab-choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 10px 0;
  font-size: 0.97rem;
  color: var(--text-muted);
  line-height: 1.45;
}
.elab-choice input {
  margin-top: 5px;
  accent-color: var(--neon-magenta);
}

.elab-expand[hidden] { display: none; }

.elab-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px 12px;
  margin-bottom: 14px;
}
.elab-check {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.elab-check:hover {
  border-color: rgba(255, 46, 147, 0.35);
}
.elab-check input { accent-color: var(--neon-cyan); margin-top: 3px; }
.elab-check--block {
  align-items: flex-start;
  max-width: 100%;
}

.elab-check-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 12px;
}
.elab-check-inline .elab-check {
  margin: 0;
}

.elab-declare {
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 46, 147, 0.25);
  background: rgba(255, 46, 147, 0.05);
}

.elab-submit-wrap {
  margin-top: 28px;
  text-align: center;
  padding-top: 8px;
}
.elab-btn--submit {
  min-width: 220px;
  color: #fff;
  background: linear-gradient(120deg, #00e5ff, #a855f7, #ff2e93);
  background-size: 200% 100%;
  padding: 16px 36px;
  font-size: 1rem;
  animation: shimmer 8s linear infinite;
}
.elab-btn--submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 18px 48px -16px rgba(168, 85, 247, 0.75);
}
.elab-btn--submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.4);
}
.elab-submit-note {
  margin: 16px auto 0;
  max-width: 52ch;
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.55;
}

.page--colab-success {
  text-align: center;
}
.colab-success-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 2.2rem;
  color: #0a1020;
  font-weight: 800;
  background: linear-gradient(135deg, #00e5ff, #a8ff78);
  box-shadow: 0 16px 40px -12px rgba(0, 229, 255, 0.55);
}
.colab-back-link {
  color: var(--neon-cyan);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 229, 255, 0.35);
}
.colab-back-link:hover {
  color: var(--neon-magenta);
  border-bottom-color: rgba(255, 46, 147, 0.5);
}

@media (forced-colors: active) {
  .elab-btn--accept,
  .elab-btn--submit {
    border: 2px solid CanvasText;
  }
}

/* ---------- Logo ---------- */
.logo {
  margin: 0 auto;
  width: min(420px, 100%);
  border-radius: var(--radius-md);
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  position: relative;
}
.logo::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  background: var(--grad-primary);
  background-size: 220% 220%;
  -webkit-mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
          mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0.55;
  animation: borderShift 10s linear infinite;
  pointer-events: none;
}
.logo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.6);
}

/* ---------- Footer ---------- */
.foot {
  margin-top: 8px;
  padding: 22px 4px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 0.85rem;
  color: var(--text-dim);
  flex-wrap: wrap;
}
.foot a { color: var(--text-muted); }
.foot a:hover { color: var(--neon-magenta); }

/* =========================================================
   BARRA DE ACCESIBILIDAD (tema + zoom)
   ========================================================= */

.a11y-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
}

.a11y-bar__group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

:root[data-theme="light"] .a11y-bar__group,
:root[data-theme="system"].is-light-system .a11y-bar__group {
  background: rgba(20, 0, 50, 0.03);
}

.a11y-bar__icon {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  color: var(--neon-cyan);
  flex-shrink: 0;
}
.a11y-bar__icon svg { width: 18px; height: 18px; }

.a11y-bar__label {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

.a11y-bar__select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border: 1px solid var(--border-strong);
  background: var(--surface-strong);
  color: var(--text);
  padding: 8px 32px 8px 12px;
  border-radius: var(--radius-pill);
  font-family: "Inter", sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path d='M2 4l4 4 4-4' fill='none' stroke='%23ff2e93' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
  transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.a11y-bar__select:hover { border-color: var(--neon-magenta); }
.a11y-bar__select option { background: var(--bg-1); color: var(--text); }

.a11y-bar__zoom {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.a11y-bar__btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--surface-strong);
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  transition: background var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease);
}
.a11y-bar__btn:hover {
  border-color: var(--neon-magenta);
  background: linear-gradient(135deg, rgba(255, 46, 147, 0.18), rgba(0, 229, 255, 0.10));
  transform: translateY(-1px);
}
.a11y-bar__btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}
.a11y-bar__btn--reset {
  width: auto;
  min-width: 64px;
  border-radius: var(--radius-pill);
  padding: 0 14px;
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 520px) {
  .a11y-bar { border-radius: var(--radius-md); padding: 12px; }
  .a11y-bar__group { flex: 1; justify-content: center; }
  .a11y-bar__label { font-size: 0.7rem; letter-spacing: 0.06em; }
}

/* =========================================================
   Solo lectores de pantalla
   ========================================================= */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =========================================================
   Reduced motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .player[data-state="playing"] .player__eq span { height: 60% !important; }
}

/* =========================================================
   ZONA RETRO — juego de audio inmersivo (synthwave / arcade)
   ========================================================= */

.retro-mount {
  margin-top: clamp(20px, 3vw, 28px);
  display: block;
}

.retro {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2.4vw, 24px);
  padding: clamp(16px, 3vw, 28px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 46, 147, 0.35);
  background:
    radial-gradient(900px 280px at 50% -40%, rgba(255, 46, 147, 0.25), transparent 60%),
    radial-gradient(700px 240px at 50% 140%, rgba(0, 229, 255, 0.20), transparent 60%),
    linear-gradient(180deg, #0a0420, #110828 60%, #1a0a36);
  box-shadow:
    0 30px 80px -28px rgba(168, 85, 247, 0.55),
    0 0 0 1px rgba(255, 46, 147, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

/* "Scanlines" CRT muy sutiles, deshabilitadas en reduced-motion. */
.retro::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.025) 0 1px,
      transparent 1px 3px
    );
  mix-blend-mode: overlay;
  opacity: 0.7;
}

/* ---- Pantallas tipo CRT (menú, briefing, fin) ---- */
.retro__crt {
  text-align: center;
  padding: clamp(20px, 4vw, 36px) clamp(16px, 3vw, 28px);
}

.retro__title {
  font-family: "Space Grotesk", "Press Start 2P", sans-serif;
  font-weight: 800;
  font-size: clamp(2.2rem, 6.4vw, 4.4rem);
  letter-spacing: 0.04em;
  line-height: 1;
  margin: 0 0 8px;
  background: linear-gradient(120deg, #ff2e93 0%, #a855f7 45%, #00e5ff 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  animation: shimmer 6s linear infinite;
  text-shadow:
    0 0 18px rgba(255, 46, 147, 0.35),
    0 0 38px rgba(0, 229, 255, 0.18);
}
.retro__title--win {
  background: linear-gradient(120deg, #00e5ff, #80ffea, #00e5ff);
  background-size: 220% 100%;
  -webkit-background-clip: text;
          background-clip: text;
}
.retro__title--lose {
  background: linear-gradient(120deg, #ff6b6b, #ff2e93);
  -webkit-background-clip: text;
          background-clip: text;
}

.retro__sub {
  margin: 8px auto;
  max-width: 56ch;
  color: var(--text-muted);
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
}
.retro__hint {
  margin-top: 14px;
  color: var(--text-dim);
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.retro__keys {
  list-style: none;
  margin: 18px auto 18px;
  padding: 0;
  display: grid;
  gap: 8px;
  max-width: 460px;
  text-align: left;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.retro__keys li {
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}
.retro__keys kbd {
  display: inline-block;
  min-width: 26px;
  padding: 2px 8px;
  margin-right: 6px;
  border-radius: 6px;
  background: linear-gradient(180deg, #2a1454, #1a0a36);
  color: #fff;
  font-family: "Space Grotesk", monospace;
  font-weight: 700;
  font-size: 0.82rem;
  border: 1px solid rgba(255, 46, 147, 0.35);
  box-shadow:
    0 2px 0 rgba(255, 46, 147, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

/* ---- CTA arcade ---- */
.retro__cta {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 14px 28px;
  margin-top: 14px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background:
    linear-gradient(#160a30, #160a30) padding-box,
    var(--grad-primary) border-box;
  background-size: 100%, 220% 220%;
  color: #fff;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  text-transform: uppercase;
  box-shadow:
    0 14px 40px -14px rgba(255, 46, 147, 0.65),
    0 0 0 1px rgba(255, 46, 147, 0.25);
  animation: shimmer 9s linear infinite;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.retro__cta:hover { transform: translateY(-2px); box-shadow: 0 20px 50px -16px rgba(255, 46, 147, 0.75); }
.retro__cta:active { transform: translateY(0); }
.retro__cta-label { font-size: 1.05rem; }
.retro__cta-sub {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.6);
}

/* ---- HUD arcade ---- */
.retro__hud {
  display: flex;
  justify-content: center;
}
.retro__hud-row {
  display: inline-flex;
  gap: 0;
  padding: 8px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 229, 255, 0.30);
  box-shadow: inset 0 0 12px rgba(0, 229, 255, 0.20);
  font-family: "Space Grotesk", monospace;
}
.retro__hud-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}
.retro__hud-cell:last-child { border-right: 0; }
.retro__hud-label {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  color: var(--text-dim);
  text-transform: uppercase;
}
.retro__hud-val {
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #00e5ff;
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.6);
  font-variant-numeric: tabular-nums;
}
.retro__hud-hearts { color: #ff2e93; text-shadow: 0 0 10px rgba(255, 46, 147, 0.6); letter-spacing: 0.06em; }

/* ---- HUD nivel: barra + contador voluminoso ---- */
.retro__hud-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: min(920px, 100%);
}
.retro__progress {
  position: relative;
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(0, 229, 255, 0.28);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.55), 0 0 24px rgba(255, 46, 147, 0.12);
  overflow: hidden;
}
.retro__progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #00e5ff 0%, #a855f7 52%, #ff2e93 100%);
  background-size: 200% 100%;
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.65);
  transition: width 0.35s var(--ease);
}
.retro__progress-fill.is-bar-flash {
  animation: retroBarPulse 0.85s ease-out;
}
@keyframes retroBarPulse {
  0%, 100% { filter: brightness(1); box-shadow: 0 0 16px rgba(0,229,255,0.65); }
  40% { filter: brightness(1.35); box-shadow: 0 0 28px rgba(255,46,147,0.85); }
}
.retro__hud-row--dense {
  flex-wrap: wrap;
  justify-content: center;
}
.retro__hud-cell--xlarge {
  flex: 1 1 200px;
  justify-content: center;
}
.retro__cookie-counter {
  font-size: clamp(1.55rem, 4.2vw, 2rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.06em;
  text-shadow:
    0 0 22px rgba(0,229,255,0.85),
    0 2px 0 rgba(168,85,247,0.55);
}
.retro__cookie-max {
  font-size: 0.55em;
  font-weight: 700;
  color: rgba(255,255,255,0.75);
}
.retro__cookie-counter.is-pulse-num {
  animation: retroPulseNum 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes retroPulseNum {
  0% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.16); filter: brightness(1.35); color: #ccffff; }
  100% { transform: scale(1); filter: brightness(1); }
}
.retro__hud-total {
  font-size: clamp(1.05rem, 2.4vw, 1.2rem);
  color: #ffe08a !important;
  text-shadow: 0 0 12px rgba(255,224,138,0.55) !important;
}

.retro__sparks {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.retro__sparks[data-on="true"] {
  opacity: 1;
  animation: sparksPop 0.58s ease-out forwards;
}
.retro__sparks::before,
.retro__sparks::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 45%, rgba(255,224,138,0.95) 0 2px, transparent 40px),
    radial-gradient(circle at 78% 38%, rgba(255,46,147,0.75) 0 2px, transparent 42px),
    radial-gradient(circle at 54% 68%, rgba(0,229,255,0.85) 0 2px, transparent 46px),
    radial-gradient(circle at 40% 30%, rgba(168,85,247,0.65) 0 1px, transparent 55px);
  mix-blend-mode: screen;
  animation: sparksShift 0.55s linear infinite alternate;
}
.retro__sparks::after {
  transform: rotate(12deg) scale(1.12);
  opacity: 0.75;
}
@keyframes sparksPop {
  from { opacity: 0; transform: scale(0.94); filter: blur(2px); }
  35% { opacity: 1; filter: blur(0); transform: scale(1); }
  to { opacity: 0; transform: scale(1.06); filter: blur(1px); }
}
@keyframes sparksShift {
  from { transform: translate(-1%, -1%); }
  to { transform: translate(1%, 1%); }
}

.retro__celebrate {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  pointer-events: none;
  animation: celebFadeIn 0.35s ease forwards;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(255,46,147,0.35), transparent 55%),
    radial-gradient(circle at 50% 100%, rgba(168,85,247,0.28), transparent 45%);
}
.retro__celebrate-inner {
  text-align: center;
  padding: 20px 28px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(11, 4, 32, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow:
    0 0 50px rgba(0,229,255,0.35),
    0 22px 50px rgba(255,46,147,0.25);
  animation: celebBump 2.6s ease-in-out infinite;
}
.retro__celebrate-title {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: clamp(1.4rem, 4vw, 2rem);
  color: #ffe08a;
  text-shadow:
    0 0 20px rgba(255,224,138,0.9),
    0 3px 0 rgba(168,85,247,0.45);
}
.retro__celebrate-sub {
  display: block;
  margin-top: 8px;
  font-size: 0.9rem;
  color: #00e5ff;
  text-shadow: 0 0 12px rgba(0,229,255,0.75);
}
@keyframes celebFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes celebBump {
  0%, 100% { transform: scale(1); }
  50% {
    transform: scale(1.03);
    box-shadow:
      0 0 60px rgba(255,46,147,0.45),
      0 26px 60px rgba(0,229,255,0.38);
  }
}

.retro__basket-wrap.is-basket-bump {
  animation: basketBumpRetro 0.52s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.retro__basket-wrap.is-basket-glow {
  animation: basketGlowSweepRetro 1.8s ease-out forwards;
}

@keyframes basketBumpRetro {
  0%, 100% { transform: translateY(0) rotate(0); }
  25% { transform: translateY(4px) rotate(-8deg); }
  55% { transform: translateY(-14px) rotate(10deg); }
  85% { transform: translateY(2px) rotate(-4deg); }
}
@keyframes basketGlowSweepRetro {
  0% {
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 0 rgba(255,224,138,0));
  }
  40% {
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.48))
      drop-shadow(0 -4px 24px rgba(255,224,138,1))
      drop-shadow(0 0 42px rgba(0,229,255,0.92));
  }
  100% {
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.6))
      drop-shadow(0 0 10px rgba(255,224,138,0.28));
  }
}

.retro__char--cookie.is-cookie-to-basket {
  animation: cookieFlyToBasket 0.52s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}
@keyframes cookieFlyToBasket {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
    filter: brightness(1);
  }
  72% {
    opacity: 1;
    filter: brightness(1.35);
    transform: translate(clamp(-120px, -38vw, -48px), clamp(72px, 24vh, 120px)) scale(0.5);
  }
  100% {
    opacity: 0;
    transform: translate(clamp(-130px, -42vw, -52px), clamp(82px, 28vh, 130px)) scale(0.38);
    filter: brightness(1.06);
  }
}

.retro__char--cat.is-cat-snagged {
  animation: catSnagged 0.34s cubic-bezier(0.4, 0, 1, 1) forwards;
}
@keyframes catSnagged {
  0% {
    opacity: 1;
    filter: saturate(1) drop-shadow(0 4px 8px rgba(0,229,255,0.55));
  }
  100% {
    opacity: 0;
    transform: translateY(120%) rotate(180deg) scale(0.2);
    filter: saturate(1.85) hue-rotate(40deg);
  }
}

/* ---- Escena (visual decorativa, el juego es audio-first) ---- */
.retro__stage {
  position: relative;
  height: clamp(180px, 30vw, 260px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  background:
    linear-gradient(to top, rgba(255, 46, 147, 0.10), transparent 35%),
    linear-gradient(to bottom, rgba(0, 229, 255, 0.10), transparent 30%),
    #0c0420;
}
.retro__scene {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      to right,
      rgba(255, 46, 147, 0.08) 0 1px,
      transparent 1px 60px
    );
  background-position: 0 100%;
  background-size: 100% 80px;
  background-repeat: repeat-x;
}
/* Variantes de "horizonte" según el ambiente */
.retro__scene--park   { background-color: #102b1a; }
.retro__scene--city   { background-color: #1a1530; }
.retro__scene--forest { background-color: #0c2018; }
.retro__scene--alley  { background-color: #1a0a26; }
.retro__scene--beach  { background-color: #1a2a40; }
.retro__scene--subway { background-color: #0a0a18; }
.retro__scene--rooftop{ background-color: #1f0a30; }
.retro__scene--factory{ background-color: #221a0a; }
.retro__scene--lab    { background-color: #082030; }
.retro__scene--cosmic { background-color: #0c0030; }

.retro__char {
  position: absolute;
  bottom: 18%;
  display: inline-block;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.6));
  transition: transform var(--t-med) var(--ease);
}
.retro__char--dog { left: 38%; width: clamp(64px, 12vw, 96px); transform-origin: 50% 100%; }
.retro__char--basket { left: 12%; width: clamp(56px, 10vw, 80px); }
.retro__char--cookie {
  right: 14%; width: clamp(28px, 5vw, 38px); bottom: 60%;
  opacity: 0; transform: translateY(-8px) scale(0.7);
  transition: opacity 200ms var(--ease), transform 240ms var(--ease);
}
.retro__char--cookie[data-on="true"] {
  opacity: 1; transform: translateY(0) scale(1);
  animation: cookieBob 1.1s ease-in-out infinite alternate;
}
.retro__char--cat {
  width: clamp(56px, 10vw, 80px);
  bottom: 22%;
  opacity: 0;
}
.retro__char--cat[data-on="true"] {
  opacity: 1;
  animation: catApproach 1.7s var(--ease) forwards;
}
.retro__char--cat[data-dir="left"][data-on="true"]  { left: -10%;  animation-name: catFromLeft; }
.retro__char--cat[data-dir="right"][data-on="true"] { right: -10%; animation-name: catFromRight; }
.retro__char--cat[data-dir="front"][data-on="true"] { left: 50%; transform: translateX(-50%); animation-name: catFromFront; }
.retro__char--cat[data-dir="back"][data-on="true"]  { left: 50%; transform: translateX(-50%) scale(0.5); animation-name: catFromBack; }

@keyframes cookieBob {
  from { transform: translateY(0) scale(1); }
  to   { transform: translateY(-8px) scale(1.04); }
}
@keyframes catFromLeft  { 0% { left: -12%; opacity: 0;} 25% {opacity: 1;} 100% { left: 30%; opacity: 1; } }
@keyframes catFromRight { 0% { right: -12%; opacity: 0;} 25% {opacity: 1;} 100% { right: 30%; opacity: 1; } }
@keyframes catFromFront { 0% { transform: translateX(-50%) scale(1.5); opacity: 0; } 25% {opacity: 1;} 100% { transform: translateX(-50%) scale(1.6); opacity: 1; } }
@keyframes catFromBack  { 0% { transform: translateX(-50%) scale(0.4); opacity: 0; } 25% {opacity: 1;} 100% { transform: translateX(-50%) scale(0.45); opacity: 1; } }

/* Salto del perro — cuatro direcciones */
.retro__char--dog.is-jump-left  { animation: dogJumpLeft 600ms var(--ease); }
.retro__char--dog.is-jump-right { animation: dogJumpRight 600ms var(--ease); }
.retro__char--dog.is-jump-front { animation: dogJumpFront 600ms var(--ease); }
.retro__char--dog.is-jump-back  { animation: dogJumpBack 600ms var(--ease); }
@keyframes dogJumpLeft   { 0%, 100% { transform: translate(0,0); } 50% { transform: translate(-32px, -40px) rotate(-10deg); } }
@keyframes dogJumpRight  { 0%, 100% { transform: translate(0,0); } 50% { transform: translate( 32px, -40px) rotate( 10deg); } }
@keyframes dogJumpFront  { 0%, 100% { transform: translate(0,0) scale(1); } 50% { transform: translate(0, -56px) scale(1.05); } }
@keyframes dogJumpBack   { 0%, 100% { transform: translate(0,0) scale(1); } 50% { transform: translate(0, -16px) scale(0.85); } }

.retro__cue {
  text-align: center;
  font-family: "Space Grotesk", monospace;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  margin: 0;
  min-height: 1.6em;
  color: #00e5ff;
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
}

/* ---- Briefing ---- */
.retro__brief {
  text-align: center;
  padding: 12px clamp(8px, 2vw, 18px);
}
.retro__brief-title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: 0.02em;
  margin: 0 0 8px;
  background: var(--grad-primary);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}
.retro__brief-goal {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  color: var(--text);
  margin: 0 0 10px;
}
.retro__brief-desc {
  max-width: 60ch;
  margin: 0 auto;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ---- Pausa overlay ---- */
.retro__overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 5;
}
.retro__overlay-inner {
  background: var(--surface-strong);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  text-align: center;
  max-width: 420px;
}
.retro__overlay h2 {
  margin: 0 0 8px;
  font-family: "Space Grotesk", sans-serif;
  background: var(--grad-primary);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}
.retro__overlay kbd {
  display: inline-block;
  padding: 2px 8px;
  margin: 0 2px;
  border-radius: 6px;
  background: rgba(255, 46, 147, 0.18);
  color: #fff;
  font-weight: 700;
}

.retro__live {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

/* Tema claro: oscuras del CRT siguen siendo oscuras (gameplay), pero atenuamos sombras. */
:root[data-theme="light"] .retro,
:root[data-theme="system"].is-light-system .retro {
  box-shadow:
    0 30px 80px -28px rgba(168, 85, 247, 0.30),
    0 0 0 1px rgba(255, 46, 147, 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .retro::before { display: none; }
  .retro__title, .retro__cta, .retro__char--cookie, .retro__char--cat,
  .retro__char--dog { animation: none !important; }
  .retro__sparks, .retro__sparks::before, .retro__sparks::after,
  .retro__celebrate-inner,
  .retro__char--cookie.is-cookie-to-basket,
  .retro__basket-wrap.is-basket-bump,
  .retro__basket-wrap.is-basket-glow,
  .retro__progress-fill.is-bar-flash,
  .retro__cookie-counter.is-pulse-num,
  .retro__char--cat.is-cat-snagged { animation: none !important; }
  .retro__sparks[data-on="true"] { opacity: 0; transition: none; }
}

/* =========================================================
   Alto contraste / forced colors (Windows High Contrast)
   ========================================================= */
@media (forced-colors: active) {
  .player, .nav__menu, .page, .nav__toggle, .logo, .retro {
    border: 1px solid CanvasText;
    background: Canvas;
  }
  .player__play { background: ButtonFace; color: ButtonText; }
  .player__title, .page__welcome, .page__signoff em, .page__welcome em,
  .retro__title, .retro__brief-title {
    color: CanvasText;
    -webkit-text-fill-color: CanvasText;
    background: none;
  }
}
