/* =====================================================================
   XDABRACHU HUB — álbum de stickers + póster callejero.
   Marco negro con salas redondeadas, color en paneles completos,
   letras condensadas gigantes y juguetes con contorno.
   ===================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --ink: #000000;
  --paper: #ffffff;
  --ice: #dceeff;
  --orange: #fb4903;
  --yellow: #ffd731;
  --blue: #4da2ff;
  --purple: #5c4ade;
  --mint: #55db9c;
  --lilac: #e9ccff;

  --font-display: "Anton", "Lateral", Impact, "Arial Narrow", sans-serif;
  --font-sans: "DM Sans", "Aeonik Pro", Arial, sans-serif;
  --font-code: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --seam: 8px;
  --r-room: 28px;
  --r-tile: 24px;
  --r-stage: 20px;
  --room-x: 20px;
  --room-y: 64px;

  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --fill-ease: cubic-bezier(0.216, 0.62, 0.356, 1);
}

@media (min-width: 700px) {
  :root {
    --seam: 12px;
    --r-room: 40px;
    --r-tile: 30px;
    --room-x: 40px;
    --room-y: 96px;
  }
}

@media (min-width: 1100px) {
  :root {
    --room-x: 48px;
    --room-y: 140px;
  }
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
  background: var(--ink);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ink);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

::selection {
  background: var(--yellow);
  color: var(--ink);
}

button {
  font-family: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  cursor: pointer;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  text-align: inherit;
}

button:disabled {
  cursor: default;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p {
  margin: 0;
}

:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--ink);
}

.min-w-0 {
  min-width: 0;
}

/* ==================== MARCO Y SALAS ==================== */
.frame {
  display: flex;
  flex-direction: column;
  gap: var(--seam);
  min-height: 100vh;
  padding: var(--seam);
}

.main-shell,
.view,
.room-stack {
  display: flex;
  flex-direction: column;
  gap: var(--seam);
}

.main-shell {
  flex: 1;
}

.room {
  position: relative;
  overflow: clip;
  padding: var(--room-y) var(--room-x);
  border-radius: var(--r-room);
  background: var(--paper);
  color: var(--ink);
}

.room-white { background: var(--paper); }
.room-ice { background: var(--ice); }
.room-mint { background: var(--mint); }
.room-yellow { background: var(--yellow); }
.room-lilac { background: var(--lilac); }
.room-orange { background: var(--orange); }
.room-blue { background: var(--blue); }

/* La primera sala de cada vista deja sitio a la cabecera flotante */
.view > .room:first-child {
  padding-top: calc(var(--room-y) + 64px);
}

.content {
  width: 100%;
  max-width: 1264px;
  margin-left: auto;
  margin-right: auto;
}

.content.narrow {
  max-width: 940px;
}

.center {
  text-align: center;
}

/* ==================== TIPOGRAFÍA ==================== */
.poster-xl,
.poster-heading,
.poster-card,
.closing-prompt {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0;
  text-wrap: balance;
}

.poster-xl {
  font-size: clamp(64px, 15vw, 200px);
  line-height: 0.82;
}

.poster-heading {
  font-size: clamp(52px, 10.5vw, 150px);
  line-height: 0.84;
}

.poster-card {
  display: block;
  font-size: clamp(54px, 15vw, 96px);
  line-height: 0.84;
}

.closing-prompt {
  font-size: clamp(46px, 6vw, 72px);
  line-height: 0.86;
}

.section-line {
  font-size: clamp(30px, 4.6vw, 64px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.body-lead {
  font-size: clamp(20px, 2.1vw, 30px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.015em;
}

.body {
  font-size: clamp(17px, 1.6vw, 22px);
  line-height: 1.28;
  letter-spacing: -0.01em;
}

/* Frase inclinada dentro de un póster */
.lean {
  display: inline;
}

.lean .w {
  transform: skewX(-12deg);
}

/* Palabras animadas (se crean desde app.js) */
.split .w {
  display: inline-block;
}

.split .wi {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.45em) rotate(5deg);
  transform-origin: 0 100%;
  transition: opacity 420ms ease, transform 820ms var(--spring);
  transition-delay: calc(var(--wi, 0) * 65ms);
}

.split.is-in .wi {
  opacity: 1;
  transform: none;
}

/* ==================== PIEZAS: CÁPSULAS, DISCOS, ETIQUETAS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 45px;
  padding: 0 26px;
  border-radius: 9999px;
  border: 2px solid var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color 200ms var(--fill-ease), color 200ms var(--fill-ease), transform 260ms var(--spring);
}

.btn:active {
  transform: scale(0.955);
}

.btn-solid {
  background: var(--ink);
  color: var(--paper);
}

.btn-solid:hover {
  background: var(--purple);
}

.btn-outline {
  background: var(--paper);
  color: var(--ink);
}

.btn-outline:hover {
  background: var(--yellow);
}

.btn-launch {
  height: 67px;
  padding: 0 32px;
  gap: 12px;
  letter-spacing: 0.032em;
}

.btn-tall {
  height: 50px;
}

.btn-sm {
  height: 40px;
  padding: 0 20px;
  font-size: 13px;
}

.btn-arrow {
  flex-shrink: 0;
  transition: transform 300ms var(--spring);
}

.btn:hover .btn-arrow,
.tile:hover .btn-arrow {
  transform: translate(2px, -2px);
}

.yt-red {
  color: #ff0033;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.disc {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  transition: background-color 200ms var(--fill-ease), color 200ms var(--fill-ease), transform 300ms var(--spring);
}

.disc:hover {
  background: var(--yellow);
}

.disc:active {
  transform: scale(0.955);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 14px;
  border: 2px solid var(--ink);
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tag-white {
  background: var(--paper);
}

.tag-mint {
  background: var(--mint);
}

.tag-yellow {
  background: var(--yellow);
}

/* ==================== FRANJA DE AVISOS ==================== */
.announce {
  display: flex;
  align-items: center;
  width: 100%;
  height: 34px;
  overflow: hidden;
  border-radius: 9999px;
  background: var(--lilac);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.announce-track,
.ribbon-track {
  display: flex;
  width: max-content;
  animation: marquee 48s linear infinite;
}

.announce:hover .announce-track,
.ribbon:hover .ribbon-track {
  animation-play-state: paused;
}

.marquee-group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.announce .marquee-group {
  gap: 22px;
  padding-right: 22px;
}

.announce-item {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  white-space: nowrap;
}

.announce-item::after {
  content: "✦";
  font-size: 13px;
}

/* ==================== CABECERA FLOTANTE ==================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 0;
}

.header-inner {
  position: relative;
  top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 12px;
}

.header-left,
.header-right,
.header-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-nav {
  display: none;
  transition: opacity 300ms ease, transform 400ms var(--ease);
}

.brand-badge {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  transition: transform 500ms var(--spring);
}

.brand-badge:hover {
  transform: rotate(-14deg) scale(1.06);
}

.brand-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.back-btn {
  padding: 0 20px;
}

.nav-cap.is-active[data-fill="mint"] { background: var(--mint); }
.nav-cap.is-active[data-fill="lilac"] { background: var(--lilac); }
.nav-cap.is-active[data-fill="yellow"] { background: var(--yellow); }

.header-yt {
  padding: 0 22px;
}

.header-yt .yt-mark {
  color: #ff0033;
}

@media (max-width: 520px) {
  .header-yt {
    width: 50px;
    padding: 0;
  }

  .header-yt-text,
  .header-yt .btn-arrow {
    display: none;
  }
}

@media (min-width: 900px) {
  .header-inner {
    top: 16px;
    padding: 0 18px;
  }

  .header-nav {
    display: flex;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }

  /* Al bajar, los destinos se retiran y quedan el sello y el canal */
  .is-scrolled .header-nav {
    opacity: 0;
    transform: translate(-50%, -14px);
    pointer-events: none;
  }
}

/* ==================== PORTADA: ESCULTURA DE LETRAS ==================== */
.hero {
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: min(calc(100svh - 60px), 1000px);
  padding-top: 132px !important;
  padding-bottom: 72px;
}

.hero-loop {
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 46%;
  width: max(150%, 1200px);
  height: auto;
  transform: translate(-50%, -50%);
  pointer-events: none;
  /* Se mueve el SVG entero (capa compuesta) para no recalcular la textura en cada fotograma */
  will-change: transform;
  animation: drift 16s ease-in-out infinite alternate;
}

.loop-path {
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw-loop 2.4s var(--ease) 150ms forwards;
}

.loop-dark {
  stroke: #2b7be6;
  stroke-width: 170;
}

.loop-bright {
  stroke: var(--blue);
  stroke-width: 132;
}

.loop-shine {
  stroke: #ffffff;
  stroke-width: 34;
  opacity: 0.5;
}

.hero-inner {
  width: 100%;
  max-width: 1000px;
  text-align: center;
}

.sculpture {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: fit-content;
  margin: 0 auto;
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 0.8;
  letter-spacing: 0;
}

.sculpt-name {
  display: flex;
  font-size: clamp(64px, 19.5vw, 176px);
}

.sculpt-hub {
  display: flex;
  margin-top: 0.06em;
  padding: 0.08em 0.2em 0.02em;
  border: 4px solid var(--ink);
  border-radius: 0.14em;
  background: var(--orange);
  font-size: clamp(104px, 34vw, 300px);
  line-height: 0.84;
  box-shadow: 0.035em 0.035em 0 var(--ink);
  rotate: -4deg;
  animation: hub-in 900ms var(--spring) 700ms backwards;
}

.sculpt-hub .ch {
  transform: skewX(-12deg);
}

.ch {
  display: inline-block;
  animation: letter-drop 900ms var(--spring) backwards;
  animation-delay: calc(var(--i, 0) * 55ms + 250ms);
  transition: transform 350ms var(--spring);
}

.sculpt-name .ch:hover {
  transform: translateY(-0.08em) rotate(-5deg);
}

.sculpt-hub .ch:hover {
  transform: skewX(-12deg) translateY(-0.06em);
}

.toy {
  position: absolute;
  width: clamp(62px, 15vw, 150px);
  height: auto;
  overflow: visible;
  pointer-events: none;
  animation: toy-pop 800ms var(--spring) backwards, bob 5s ease-in-out infinite;
}

.toy-gamepad {
  top: -26%;
  left: -9%;
  rotate: -14deg;
  animation-delay: 1000ms, 0s;
}

.toy-bolt {
  top: -30%;
  right: -7%;
  rotate: 12deg;
  animation-delay: 1150ms, -1.5s;
}

.toy-play {
  right: -12%;
  bottom: 6%;
  rotate: 10deg;
  animation-delay: 1300ms, -2.5s;
}

.toy-download {
  left: -12%;
  bottom: -4%;
  rotate: -8deg;
  animation-delay: 1450ms, -3.5s;
}

.hero-promise {
  max-width: 872px;
  margin: clamp(30px, 4vw, 48px) auto 0;
  animation: fade-up 900ms var(--ease) 900ms backwards;
}

/* Palabra que va cambiando dentro de la promesa */
.rotator {
  display: inline-grid;
  vertical-align: baseline;
  overflow: hidden;
  margin: 0 0.04em;
  padding: 0 0.28em 0.04em;
  border: 2px solid var(--ink);
  border-radius: 9999px;
  background: var(--yellow);
  line-height: 1.02;
}

.rotator-word {
  grid-area: 1 / 1;
  text-align: center;
  transition: transform 600ms var(--spring), opacity 300ms ease;
}

.rotator.is-live .rotator-word {
  opacity: 0;
  transform: translateY(100%);
}

.rotator.is-live .rotator-word.is-on {
  opacity: 1;
  transform: none;
}

.rotator.is-live .rotator-word.is-off {
  opacity: 0;
  transform: translateY(-100%);
}

.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 600px;
  margin: 28px auto 0;
  animation: fade-up 900ms var(--ease) 1050ms backwards;
}

.search-icon {
  position: absolute;
  left: 22px;
  pointer-events: none;
}

#search-input {
  width: 100%;
  height: 60px;
  padding: 0 58px;
  border: 2px solid var(--ink);
  border-radius: 9999px;
  background: var(--paper);
  color: var(--ink);
  font-family: inherit;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  outline: none;
  transition: box-shadow 200ms ease;
}

#search-input::placeholder {
  color: #5a5a5a;
}

#search-input:focus {
  box-shadow: 0 0 0 4px var(--yellow);
}

#search-input::-webkit-search-decoration,
#search-input::-webkit-search-cancel-button,
#search-input::-webkit-search-results-button,
#search-input::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.clear-search-btn {
  position: absolute;
  right: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: 22px;
  line-height: 1;
  transition: background-color 200ms ease;
}

.clear-search-btn:hover {
  background: var(--purple);
}

.launch-pair {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
  animation: fade-up 900ms var(--ease) 1180ms backwards;
}

@media (min-width: 900px) {
  .hero {
    padding-top: 170px !important;
    padding-bottom: 110px;
  }

  .launch-pair {
    margin-top: 40px;
  }
}

/* ==================== RESULTADOS DE BÚSQUEDA ==================== */
.search-room {
  padding-top: clamp(40px, 6vw, 72px);
  padding-bottom: clamp(40px, 6vw, 72px);
}

.search-room > * {
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.search-summary {
  margin-bottom: 24px;
}

/* ==================== ESCENARIO CON PATRÓN ==================== */
.stage-wrap {
  position: relative;
}

.stage {
  position: relative;
  isolation: isolate;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: var(--r-stage);
}

.stage::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -40%;
  top: 34%;
  width: 180%;
  height: 90%;
  border: 3.2em solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  transform: rotate(-18deg);
  font-size: clamp(16px, 3vw, 26px);
}

.stage::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(circle at 104% -4%, rgba(255, 255, 255, 0.45) 0 21%, transparent 21.3%),
    radial-gradient(circle at -6% 108%, rgba(255, 255, 255, 0.45) 0 17%, transparent 17.3%);
}

.stage-yellow { background: var(--yellow); }
.stage-mint { background: var(--mint); }
.stage-blue { background: var(--blue); }
.stage-lilac { background: var(--lilac); }

/* Ventana de interfaz recortada por abajo a propósito */
.stage-device {
  position: absolute;
  left: 9%;
  right: 9%;
  top: 17%;
  bottom: -8%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: var(--r-stage);
  background: var(--ink);
  rotate: -3deg;
  transition: rotate 600ms var(--spring), scale 600ms var(--spring);
}

.stage-device-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  height: 34px;
  padding: 0 14px;
  border-bottom: 2px solid var(--ink);
  background: var(--paper);
}

.stage-device-bar i {
  width: 10px;
  height: 10px;
  border: 2px solid var(--ink);
  border-radius: 50%;
}

.stage-device-bar i:nth-child(1) { background: var(--orange); }
.stage-device-bar i:nth-child(2) { background: var(--yellow); }
.stage-device-bar i:nth-child(3) { background: var(--mint); }

.stage-device img {
  flex: 1;
  width: 100%;
  min-height: 0;
  object-fit: cover;
}

.stage-code {
  flex: 1;
  display: grid;
  place-items: center;
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 30cqw;
}

.stage-toy {
  position: absolute;
  z-index: 2;
  width: clamp(84px, 24%, 150px);
  height: auto;
  overflow: visible;
  pointer-events: none;
  animation: bob 5s ease-in-out infinite;
}

.stage-toy-tr {
  top: -6%;
  right: -5%;
  rotate: 12deg;
}

.stage-toy-bl {
  left: -5%;
  bottom: -5%;
  rotate: -10deg;
}

button.stage-wrap:hover .stage-device,
.game-cover-btn:hover .stage-device {
  rotate: 0deg;
  scale: 1.03;
}

/* ==================== PAR VISUAL + TEXTO ==================== */
.feature-pair {
  display: grid;
  gap: 36px;
  align-items: center;
}

.pair-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
}

.pair-text .body {
  max-width: 36ch;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

@media (min-width: 980px) {
  .feature-pair {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    grid-template-columns: minmax(0, 540px) minmax(0, 1fr);
    gap: clamp(56px, 7vw, 120px);
  }

  .pair-text {
    gap: 28px;
  }
}

.featured-title {
  max-width: 24ch;
}

/* ==================== TEMAS (TARJETAS DE COLOR) ==================== */
.explore {
  margin-top: clamp(96px, 12vw, 180px);
}

.explore .section-line {
  max-width: 872px;
  margin: 0 auto;
}

.tile-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(84%, 360px);
  gap: 12px;
  margin: 40px calc(var(--room-x) * -1) 0;
  padding: 4px var(--room-x) 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--room-x);
  scrollbar-width: none;
}

.tile-rail::-webkit-scrollbar {
  display: none;
}

.tile {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 440px;
  padding: 28px;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: var(--r-tile);
  color: var(--ink);
  text-align: left;
  scroll-snap-align: start;
  transition: transform 500ms var(--spring);
}

.tile:hover {
  transform: translateY(-6px) rotate(-1deg);
}

.tile:active {
  transform: scale(0.98);
}

.tile-mint { background: var(--mint); }
.tile-yellow { background: var(--yellow); }
.tile-blue { background: var(--blue); }
.tile-lilac { background: var(--lilac); }
.tile-orange { background: var(--orange); }
.tile-gray { background: #d4d4d4; color: #4a4a4a; }

.tile-gray:disabled,
.tile-gray:hover {
  transform: none;
  cursor: default;
}

.tile-gray .tile-emblem {
  filter: grayscale(1);
  opacity: 0.55;
}

.tile-gray:hover .tile-emblem {
  rotate: 8deg;
  scale: 1;
}

.tile .poster-card {
  margin-top: auto;
}

.tile-desc {
  max-width: 26ch;
  font-size: 17px;
  line-height: 1.25;
}

.tile-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tile-emblem {
  position: absolute;
  z-index: -1;
  top: 18px;
  right: 14px;
  width: 44%;
  max-width: 180px;
  height: auto;
  overflow: visible;
  rotate: 8deg;
  transition: rotate 600ms var(--spring), scale 600ms var(--spring);
}

.tile:hover .tile-emblem {
  rotate: -6deg;
  scale: 1.08;
}

@media (min-width: 980px) {
  .tile-rail {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin: 72px 0 0;
    padding: 0;
    overflow: visible;
  }

  .tile {
    min-height: 0;
    aspect-ratio: 1;
    padding: 30px;
  }

  .tile .poster-card {
    font-size: clamp(60px, 6.2vw, 96px);
  }

  .tile-emblem {
    width: 36%;
  }
}

/* ==================== FILAS ==================== */
.row-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.head-split {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(32px, 4vw, 56px);
}

.row-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 14px 14px 14px 14px;
  border: 2px solid var(--ink);
  border-radius: var(--r-tile);
  background: var(--paper);
  text-align: left;
  transition: background-color 220ms var(--fill-ease), transform 420ms var(--spring);
}

.row-link:not(:disabled):hover {
  background: var(--yellow);
  transform: translateX(6px);
}

.row-link:not(:disabled):hover .disc {
  background: var(--ink);
  color: var(--paper);
}

.row-link:not(:disabled):active {
  transform: scale(0.985);
}

.row-link:disabled {
  opacity: 0.5;
}

.row-index {
  min-width: 1.5em;
  font-family: var(--font-display);
  font-size: clamp(34px, 4vw, 52px);
  line-height: 0.85;
  text-align: center;
}

.row-thumb {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 18px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 26px;
}

.row-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.row-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

.row-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.row-title {
  font-size: clamp(19px, 2.1vw, 28px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.row-title.is-poster {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: 0;
  text-transform: uppercase;
}

.row-sub {
  font-size: 16px;
  line-height: 1.3;
}

.row-side {
  display: flex;
  align-items: center;
  gap: 12px;
}

.row-meta {
  display: none;
}

.row-meta-inline {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

@media (min-width: 720px) {
  .row-link {
    gap: 24px;
    padding: 18px 20px 18px 18px;
  }

  .row-meta {
    display: inline-flex;
  }

  .row-meta-inline {
    display: none;
  }
}

/* ==================== DATO ANIMADO (DIAL) ==================== */
.dial-stage {
  container-type: inline-size;
}

.dial-wrap {
  position: absolute;
  left: 7%;
  right: 7%;
  top: 19%;
  aspect-ratio: 1;
}

.dial {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.dial-face {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 6;
}

#dial-ticks line {
  stroke: var(--ink);
  stroke-width: 4;
  stroke-linecap: round;
}

.dial-number {
  position: absolute;
  left: 0;
  right: 0;
  top: 15%;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(80px, 24vw, 200px);
  font-size: 30cqw;
  line-height: 0.8;
  font-variant-numeric: tabular-nums;
}

.dial-hand {
  transform-origin: 300px 300px;
  transform: rotate(-100deg);
  transition: transform 1900ms cubic-bezier(0.3, 1.4, 0.4, 1);
}

.dial-live .dial-hand {
  transform: rotate(var(--hand, 52deg));
}

/* ==================== CABECERAS DE PÁGINA ==================== */
.page-head {
  isolation: isolate;
}

.page-head .content {
  position: relative;
  z-index: 1;
}

.page-support {
  max-width: 30ch;
  margin: 28px auto 0;
}

.page-head .tag {
  margin-bottom: 22px;
}

.head-toy {
  z-index: 0;
  width: clamp(64px, 11vw, 168px);
  animation: toy-pop 800ms var(--spring) 300ms backwards, bob 5s ease-in-out infinite;
}

.head-toy-a {
  left: 4%;
  top: 58%;
  rotate: -12deg;
}

.head-toy-b {
  right: 4%;
  top: 22%;
  rotate: 10deg;
  animation-delay: 450ms, -2s;
}

@media (max-width: 699px) {
  .head-toy-a {
    left: -14px;
    top: auto;
    bottom: 14px;
  }

  .head-toy-b {
    right: -12px;
    top: 84px;
  }
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 26px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.crumbs.center {
  justify-content: center;
}

.crumbs button {
  text-transform: inherit;
  border-bottom: 2px solid transparent;
  transition: border-color 200ms ease;
}

.crumbs button:hover {
  border-color: var(--ink);
}

/* ==================== MENÚ DEL JUEGO ==================== */
.game-cover-btn {
  display: block;
  width: 100%;
  cursor: default;
}

/* En teléfono la portada es más baja para que se vean antes las categorías */
@media (max-width: 979px) {
  .game-cover-btn .stage {
    aspect-ratio: 16 / 10;
  }
}

.cats-upcoming {
  margin: 18px 0 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  opacity: 0.6;
}

.spec-rail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  width: 100%;
}

.spec {
  padding: 12px 16px 14px;
  border: 2px solid var(--ink);
  border-radius: 20px;
  background: var(--paper);
}

.spec-key {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.spec-key:empty {
  display: none;
}

.spec-key:empty + .spec-val {
  margin-top: 0;
}

.spec-val {
  display: block;
  margin-top: 4px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.howto-head {
  text-align: center;
  margin-bottom: clamp(36px, 5vw, 72px);
}

.howto-steps {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.howto-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 6px 16px;
  padding: 22px;
  border: 2px solid var(--ink);
  border-radius: var(--r-tile);
  background: var(--paper);
}

.howto-num {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 1;
}

.howto-step:nth-child(2) .howto-num { background: var(--mint); }
.howto-step:nth-child(3) .howto-num { background: var(--blue); }

.howto-step strong {
  font-size: clamp(21px, 2vw, 26px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.howto-step span:last-child {
  font-size: 17px;
  line-height: 1.3;
}

@media (min-width: 820px) {
  .howto-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }

  .howto-step {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 32px;
  }
}

.cats-head {
  max-width: 872px;
  margin: 0 auto clamp(32px, 4vw, 56px);
  text-align: center;
}

/* ==================== PESTAÑAS ==================== */
.tabs-wrap {
  display: flex;
  margin: 0 calc(var(--room-x) * -1) 28px;
  padding: 4px var(--room-x);
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs-wrap::-webkit-scrollbar {
  display: none;
}

.tabs {
  display: inline-flex;
  flex-shrink: 0;
  gap: 4px;
  margin: 0 auto;
  padding: 4px;
  border: 2px solid var(--ink);
  border-radius: 9999px;
  background: var(--paper);
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 20px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color 200ms var(--fill-ease), color 200ms var(--fill-ease), transform 260ms var(--spring);
}

.tab:not(:disabled):not(.active):hover {
  background: var(--ice);
}

.tab:not(:disabled):active {
  transform: scale(0.955);
}

.tab.active {
  background: var(--ink);
  color: var(--paper);
}

.tab:disabled {
  opacity: 0.35;
}

.tab-count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 9999px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 12px;
}

.list-hint {
  display: block;
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
}

/* ==================== TARJETAS DESPLEGABLES ==================== */
.acc-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.acc {
  border: 2px solid var(--ink);
  border-radius: var(--r-tile);
  background: var(--paper);
  transition: background-color 350ms var(--fill-ease), transform 420ms var(--spring);
}

.acc:not(.is-open):hover {
  transform: translateY(-3px);
}

.acc.is-open {
  background: var(--ice);
}

.acc-flash {
  animation: flash 1300ms ease 2;
}

.acc-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  padding: 22px;
  border-radius: var(--r-tile);
}

.acc-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.acc-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.acc-title {
  font-size: clamp(21px, 2.3vw, 30px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.acc-toggle {
  position: relative;
}

.acc-toggle::before,
.acc-toggle::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 2.5px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 450ms var(--spring);
}

.acc-toggle::after {
  transform: rotate(90deg);
}

.acc.is-open .acc-toggle {
  background: var(--ink);
  color: var(--paper);
}

.acc.is-open .acc-toggle::before,
.acc.is-open .acc-toggle::after {
  transform: rotate(180deg);
}

.acc-note {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 16px;
  line-height: 1.3;
}

/* El panel anima su altura real con grid 0fr → 1fr */
.acc-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 560ms var(--ease);
}

.acc.is-open .acc-panel {
  grid-template-rows: 1fr;
}

.acc-panel-inner {
  min-height: 0;
  overflow: hidden;
}

.acc-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 0 22px 24px;
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 280ms ease, transform 560ms var(--spring);
}

.acc.is-open .acc-body {
  opacity: 1;
  transform: none;
  transition-delay: 120ms, 60ms;
}

.acc-text {
  max-width: 62ch;
  font-size: 17px;
  line-height: 1.38;
}

.acc-seals {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.acc-seal {
  min-height: 26px;
  padding: 3px 12px;
}

.acc-trust {
  max-width: 62ch;
  margin: 0;
  padding-left: 14px;
  border-left: 4px solid var(--mint);
  font-size: 16px;
  line-height: 1.35;
}

.acc-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border: 2px solid var(--ink);
  border-radius: 18px;
  background: var(--yellow);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}

.acc-alert::before {
  content: "!";
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--yellow);
  font-size: 13px;
}

.acc-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  margin: 0;
}

.acc-meta div {
  padding: 10px 14px 12px;
  border: 2px solid var(--ink);
  border-radius: 18px;
  background: var(--paper);
}

.acc-meta dt {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.acc-meta dd {
  margin: 4px 0 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.015em;
  word-break: break-word;
}

.acc-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.acc-source {
  align-self: flex-start;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 2px solid var(--ink);
  transition: color 200ms ease, border-color 200ms ease;
}

.acc-source:hover {
  color: var(--purple);
  border-color: var(--purple);
}

@media (min-width: 820px) {
  .acc-head {
    padding: 26px 30px;
  }

  .acc-body {
    padding: 0 30px 30px;
  }
}

/* Consejo desplegable y notas */
.tip {
  margin-top: 24px;
  padding: 18px 22px;
  border: 2px solid var(--ink);
  border-radius: var(--r-tile);
  background: var(--lilac);
  font-size: 17px;
}

.tip summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
}

.tip summary::-webkit-details-marker {
  display: none;
}

.tip summary::after {
  content: "+";
  font-size: 26px;
  line-height: 1;
  transition: transform 400ms var(--spring);
}

.tip[open] summary::after {
  transform: rotate(45deg);
}

.tip p {
  max-width: 62ch;
  margin-top: 10px;
  line-height: 1.38;
  animation: fade-up 400ms var(--ease) both;
}

.note-box {
  margin-top: 24px;
  padding: 20px 22px;
  border: 2px solid var(--ink);
  border-radius: var(--r-tile);
  background: var(--yellow);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.32;
}

.empty {
  padding: 48px 24px;
  border: 2px dashed var(--ink);
  border-radius: var(--r-tile);
  font-size: 18px;
  text-align: center;
}

.error-banner {
  padding: 24px var(--room-x);
  font-size: 17px;
  font-weight: 700;
}

/* ==================== GALERÍA DE JUEGOS ==================== */
.tile-grid {
  display: grid;
  gap: 12px;
}

@media (min-width: 760px) {
  .tile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}

@media (min-width: 1200px) {
  .tile-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.game-tile {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  padding: 16px;
  border: 2px solid var(--ink);
  border-radius: var(--r-tile);
  text-align: left;
  transition: transform 500ms var(--spring);
}

.game-tile:hover {
  transform: translateY(-6px) rotate(-0.6deg);
}

.game-tile:active {
  transform: scale(0.98);
}

.game-tile-media {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: var(--r-stage);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 80px;
}

.game-tile-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1200ms var(--ease);
}

.game-tile:hover .game-tile-media img {
  transform: scale(1.06);
}

.game-tile-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px 14px;
  padding: 0 6px 6px;
}

.game-tile-body .tag {
  grid-column: 1 / -1;
  justify-self: start;
  background: var(--paper);
}

.game-tile-title {
  font-family: var(--font-display);
  font-size: clamp(34px, 4vw, 50px);
  line-height: 0.9;
  text-transform: uppercase;
}

.game-tile-caption {
  grid-column: 1 / -1;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.game-tile:hover .disc {
  background: var(--ink);
  color: var(--paper);
}

/* ==================== CIERRE ==================== */
.closing {
  display: flex;
  flex-direction: column;
  gap: var(--seam);
}

.closing-grid {
  display: grid;
  gap: var(--seam);
}

.service {
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  padding: clamp(56px, 7vw, 90px) clamp(24px, 3vw, 44px);
}

.service::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 20%;
  top: 42%;
  width: 140%;
  height: 120%;
  border: 70px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  transform: rotate(-14deg);
}

.service .body {
  max-width: 30ch;
}

.service-toy {
  position: absolute;
  z-index: -1;
  right: -14px;
  bottom: -18px;
  width: clamp(110px, 14vw, 190px);
  height: auto;
  overflow: visible;
  rotate: -10deg;
  animation: bob 6s ease-in-out infinite;
}

@media (min-width: 900px) {
  .closing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service {
    min-height: 560px;
  }
}

/* Cinta gigante */
.ribbon {
  overflow: hidden;
  padding: 2px 0;
}

.ribbon .marquee-group {
  gap: var(--seam);
  padding-right: var(--seam);
}

.ribbon-track {
  animation-duration: 42s;
}

.lozenge {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  height: clamp(92px, 18vw, 256px);
  padding: 0 0.12em;
  border: 4px solid var(--ink);
  border-radius: var(--r-tile);
  font-family: var(--font-display);
  font-size: clamp(98px, 19.8vw, 281px);
  line-height: 0.8;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
  transition: background-color 200ms var(--fill-ease), transform 300ms var(--spring);
}

.lozenge:hover {
  background-color: var(--paper) !important;
}

.lozenge:active {
  transform: scale(0.97);
}

.lozenge span {
  display: block;
  transform: translateY(0.035em);
}

.lz-blue { background: var(--blue); }
.lz-orange { background: var(--orange); }
.lz-yellow { background: var(--yellow); }
.lz-mint { background: var(--mint); }
.lz-lilac { background: var(--lilac); }
.lz-white { background: var(--paper); }

.ribbon-orb {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: clamp(92px, 18vw, 256px);
  aspect-ratio: 1;
  border: 4px solid var(--ink);
  border-radius: 50%;
  background: var(--purple);
}

.ribbon-orb svg {
  width: 56%;
  height: 56%;
  overflow: visible;
  animation: spin 9s linear infinite;
}

/* Sociales + losa de navegación */
.closing-bottom {
  display: grid;
  gap: var(--seam);
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--seam);
}

.social-tile {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  padding: 26%;
  border-radius: var(--r-room);
  background: var(--paper);
  transition: transform 350ms var(--spring), background-color 200ms var(--fill-ease);
}

.social-tile:hover {
  transform: scale(0.92);
  background: var(--yellow);
}

.social-tile svg {
  width: 100%;
  height: 100%;
}

.slab {
  display: grid;
  grid-template-areas:
    "prompt"
    "links"
    "note"
    "copy";
  gap: 36px;
  padding: clamp(28px, 4vw, 40px);
}

.closing-prompt {
  grid-area: prompt;
  max-width: 9.5em;
}

.slab-links {
  grid-area: links;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.slab-links a,
.slab-links button {
  font-size: clamp(20px, 2vw, 24px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  transition: transform 300ms var(--spring);
}

.slab-links a:hover,
.slab-links button:hover {
  transform: translateX(6px) skewX(-10deg);
}

.slab-copy {
  grid-area: copy;
  align-self: end;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.slab-note {
  grid-area: note;
  align-self: end;
  max-width: 46ch;
  font-size: 14px;
  line-height: 1.35;
}

@media (min-width: 700px) {
  .slab {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "prompt links"
      "copy note";
    gap: 48px;
  }

  .slab-links {
    align-items: flex-end;
    text-align: right;
  }

  .slab-note {
    justify-self: end;
    text-align: right;
  }
}

@media (min-width: 1000px) {
  .closing-bottom {
    grid-template-columns: 218px minmax(0, 1fr);
  }

  .social-grid {
    grid-template-columns: 1fr;
    align-content: start;
  }

  .social-tile {
    padding: 56px;
  }
}

/* Cierre compacto: fuera del inicio solo queda la losa con enlaces */
body:not(.is-home) .closing-grid,
body:not(.is-home) .ribbon,
body:not(.is-home) .social-grid,
body:not(.is-home) .closing-prompt {
  display: none;
}

body:not(.is-home) .slab {
  grid-template-areas:
    "links"
    "note"
    "copy";
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  padding: 24px;
}

body:not(.is-home) .slab-links {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  text-align: left;
}

body:not(.is-home) .slab-links a,
body:not(.is-home) .slab-links button {
  font-size: 17px;
}

body:not(.is-home) .slab-note {
  justify-self: start;
  text-align: left;
}

body:not(.is-home) .closing-bottom {
  grid-template-columns: minmax(0, 1fr);
}

/* ==================== MODAL ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  animation: fade-in 250ms ease both;
}

.modal-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-bottom: 0;
  border-radius: var(--r-room) var(--r-room) 0 0;
  background: var(--paper);
  animation: sheet-up 560ms var(--ease) both;
}

@media (min-width: 640px) {
  .modal-backdrop {
    align-items: center;
    padding: 24px;
  }

  .modal-card {
    border-bottom: 2px solid var(--ink);
    border-radius: var(--r-room);
    animation-name: pop-in;
  }
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 24px 18px;
}

.modal-header h2 {
  margin-top: 12px;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 24px 16px;
}

.guide-pre {
  margin: 0;
  padding: 18px;
  border: 2px solid var(--ink);
  border-radius: var(--r-stage);
  background: var(--ice);
  font-family: var(--font-code);
  font-size: 12.5px;
  line-height: 1.55;
  letter-spacing: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.modal-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 24px 24px;
}

/* ==================== TOAST ==================== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 80;
  max-width: calc(100vw - 32px);
  padding: 14px 24px;
  overflow: hidden;
  border: 2px solid var(--paper);
  border-radius: 9999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
  transform: translateX(-50%);
  animation: toast-in 500ms var(--spring) both;
}

/* Aviso fijo cuando se abre la web en vista previa desde el panel (?preview=1) */
.preview-bar {
  position: fixed;
  left: 50%;
  bottom: 12px;
  z-index: 90;
  max-width: calc(100vw - 24px);
  padding: 13px 20px;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 9999px;
  background: var(--yellow);
  box-shadow: 0 0 0 3px var(--paper);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  transform: translateX(-50%);
}

/* ==================== ANIMACIONES ==================== */
.view-enter {
  animation: view-in 620ms var(--ease) both;
}

.reveal {
  opacity: 0;
  transform: translateY(34px) scale(0.985);
  transition: opacity 700ms var(--ease), transform 900ms var(--spring);
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes draw-loop {
  to { stroke-dashoffset: 0; }
}

@keyframes drift {
  from { transform: translate(-50%, -50%) rotate(-3deg) translate(-20px, 10px); }
  to { transform: translate(-50%, -50%) rotate(3deg) translate(24px, -14px); }
}

@keyframes letter-drop {
  from {
    opacity: 0;
    transform: translateY(-0.6em) rotate(-12deg);
  }
}

@keyframes hub-in {
  from {
    opacity: 0;
    transform: scale(0.4) rotate(14deg);
  }
}

@keyframes toy-pop {
  from {
    opacity: 0;
    scale: 0.2;
  }
}

@keyframes bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -10px; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

@keyframes fade-in {
  from { opacity: 0; }
}

@keyframes sheet-up {
  from { transform: translateY(100%); }
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 20px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes flash {
  0%, 100% { background-color: var(--paper); }
  50% { background-color: var(--yellow); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    transition-delay: 0ms !important;
  }

  .announce-track,
  .ribbon-track {
    animation: none !important;
  }

  .ribbon {
    overflow-x: auto;
  }

  .loop-path {
    stroke-dashoffset: 0;
  }

  .reveal,
  .split .wi {
    opacity: 1;
    transform: none;
  }
}
