/* ---------- Tokens ---------- */
:root {
  --bg: #f7f3ee;
  --surface: #fffdf9;
  --fill: #efe9e1;
  --ink: #2b2622;
  --ink-2: #6f665e;
  --ink-3: #a1978c;
  --line: rgba(70, 50, 30, 0.07);
  --accent: #d9774b;
  --good: #3a9e68;
  --bad: #d9534a;
  --tint-strong: 22%;
  --tint-soft: 7%;
  --mosaic-opacity: 0.6;
  --mosaic-blur: 3px;

  --shadow-sm: 0 1px 2px rgba(80, 55, 30, 0.06), 0 2px 8px rgba(80, 55, 30, 0.06);
  --shadow: 0 1px 2px rgba(80, 55, 30, 0.05), 0 10px 30px rgba(80, 55, 30, 0.09);
  --shadow-lg: 0 2px 4px rgba(80, 55, 30, 0.05), 0 18px 44px rgba(80, 55, 30, 0.13);

  --r-xl: 30px;
  --r-lg: 22px;
  --r-md: 16px;
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1816;
    --surface: #25221f;
    --fill: #312d29;
    --ink: #f4eee7;
    --ink-2: #b8afa5;
    --ink-3: #7f766d;
    --line: rgba(255, 235, 210, 0.07);
    --accent: #ec916a;
    --good: #55bf86;
    --bad: #f0675e;
    --tint-strong: 24%;
    --tint-soft: 9%;
    --mosaic-opacity: 0.45;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.3), 0 18px 44px rgba(0, 0, 0, 0.4);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-playing {
  overflow: hidden;
  overscroll-behavior: none;
}

button {
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
}

.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* ---------- Inicio ---------- */
.screen-start {
  align-items: center;
  justify-content: center;
  padding: 36px 16px 20px;
}

.start-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  text-align: center;
  animation: rise 0.6s var(--ease) both;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Bloque de título: game.js ajusta cada línea para que las tres midan lo mismo
   (HIGHER y LOWER por tamaño de fuente; OR entre dos líneas finas que ocupan el resto).
   Estos tamaños son el respaldo. */
.logo {
  --logo-width: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: 0;
}

.logo-line {
  display: block;
  font-size: 68px;
  white-space: nowrap;
}

.logo-or {
  display: flex;
  align-items: center;
  gap: 0.35em;
  width: 300px;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}

.logo-or::before,
.logo-or::after {
  content: "";
  flex: 1;
  height: 0.09em;
  border-radius: 1em;
  background: currentColor;
  opacity: 0.55;
}

.logo-or::after {
  margin-left: -0.08em; /* compensa el tracking tras la R */
}

.tagline {
  max-width: 28ch;
  margin: 18px auto 32px;
  font-size: 17px;
  line-height: 1.45;
  color: var(--ink-2);
}

.modes {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.mode-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 84px;
  padding: 18px 20px;
  border: 0;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow), inset 0 0 0 1px var(--line);
  text-align: left;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.mode-btn:active {
  transform: scale(0.98);
}

@media (hover: hover) {
  .mode-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--line);
  }
}

.mode-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}

.mode-text {
  flex: 1;
  min-width: 0;
}

.mode-title {
  display: block;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.mode-desc {
  display: block;
  margin-top: 3px;
  font-size: 14px;
  line-height: 1.35;
  color: var(--ink-2);
}

.mode-best {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex: none;
  line-height: 1.15;
}

.mode-best-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.mode-best-value {
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.mode-btn-daily {
  box-shadow: var(--shadow), inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 35%, transparent);
}

.mode-btn-daily .mode-icon {
  background: var(--accent);
  color: #fff;
}

.mode-best-value.is-small {
  font-size: 16px;
  line-height: 1.5;
}

/* Mosaico de portadas de fondo (solo en la pantalla de inicio) */
.mosaic {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.mosaic.is-ready {
  opacity: 1;
}

.mosaic-track {
  position: absolute;
  inset: -40px -20px; /* margen para que el blur no deje bordes claros */
  display: flex;
  gap: 12px;
  opacity: var(--mosaic-opacity);
  filter: blur(var(--mosaic-blur)); /* un único blur para todo el mosaico */
}

.mosaic-col {
  flex: 1;
  min-width: 0;
}

.mosaic-strip {
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: mosaic-scroll var(--duration, 140s) linear infinite;
  will-change: transform;
}

.mosaic-col:nth-child(even) .mosaic-strip {
  animation-direction: reverse;
}

.mosaic-tile {
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  overflow: hidden;
  background: var(--tile, var(--fill));
}

.mosaic-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Degradado del color de fondo por encima: el contenido central siempre se lee bien */
.mosaic::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 75% 60% at 50% 50%, color-mix(in srgb, var(--bg) 82%, transparent) 0%, color-mix(in srgb, var(--bg) 40%, transparent) 100%),
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 20%, transparent) 0%, color-mix(in srgb, var(--bg) 55%, transparent) 50%, color-mix(in srgb, var(--bg) 85%, transparent) 100%);
}

.status {
  margin: 20px 0 0;
  font-size: 14px;
  color: var(--ink-2);
}

.status:empty {
  display: none;
}

/* ---------- Partida ---------- */
.screen-game {
  padding: 0 16px;
  overflow: hidden;
}

.hud {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
  width: 100%;
  max-width: 1040px;
  height: 60px;
  margin: 0 auto;
}

.icon-btn {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--ink-2);
  cursor: pointer;
  transition: transform 0.2s var(--ease);
}

.icon-btn:active {
  transform: scale(0.92);
}

.hud-mode {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hud-stats {
  display: flex;
  gap: 18px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.1;
}

.stat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.stat-value {
  font-size: 21px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.stat-value.is-pop {
  animation: pop 0.45s var(--ease);
}

/* Escenario: las tarjetas se colocan en "huecos" y se deslizan entre ellos */
.stage {
  --gap: 12px;
  position: relative;
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 1040px;
  margin: 0 auto 4px;
}

.card {
  --tint: #c9b8a3;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  height: calc(50% - var(--gap) / 2);
  padding: 16px;
  border-radius: var(--r-xl);
  background: var(--surface);
  background: linear-gradient(
    160deg,
    color-mix(in oklab, var(--tint) var(--tint-strong), var(--surface)) 0%,
    color-mix(in oklab, var(--tint) var(--tint-soft), var(--surface)) 100%
  );
  box-shadow: var(--shadow), inset 0 0 0 1px var(--line);
  overflow: hidden;
  transition: transform 0.6s var(--ease), opacity 0.45s ease;
}

.card.slot-0 {
  transform: none;
}

.card.slot-1 {
  transform: translateY(calc(100% + var(--gap)));
}

.card.slot-2 {
  opacity: 0;
  transform: translateY(calc(100% + var(--gap) + 40px)) scale(0.96);
}

.card.slot-out {
  z-index: 0;
  opacity: 0;
  transform: scale(0.94);
}

.poster {
  position: relative;
  flex: none;
  width: clamp(96px, 38%, 180px);
  max-height: 100%;
  aspect-ratio: 2 / 3;
  border-radius: var(--r-md);
  overflow: hidden;
  background: color-mix(in oklab, var(--tint) 35%, var(--surface));
  box-shadow: 0 8px 22px color-mix(in srgb, var(--tint) 30%, rgba(0, 0, 0, 0.12));
}

.poster img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.poster img.is-loaded {
  opacity: 1;
}

.card.no-image .poster img {
  display: none;
}

.info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  min-width: 0;
}

.title {
  display: -webkit-box;
  margin: 0;
  font-size: clamp(17px, 4.8vw, 24px);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.year {
  margin: 4px 0 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
}

/* Valor y botones comparten la misma celda para que nada salte al revelar */
.slot {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin-top: 14px;
}

.slot > * {
  grid-area: 1 / 1;
  align-self: center;
}

.value-block {
  transition: opacity 0.3s ease;
}

.value {
  margin: 0;
  font-size: clamp(30px, 8.6vw, 46px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  transition: color 0.4s ease;
}

.unit {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--ink-2);
}

.card.is-hidden .value-block {
  visibility: hidden;
  opacity: 0;
}

.choice {
  transition: opacity 0.25s ease, visibility 0.25s;
}

.card:not(.is-hidden) .choice {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.card.is-correct .value {
  color: var(--good);
}

.card.is-wrong .value {
  color: var(--bad);
}

.buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.choice-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-sm), inset 0 0 0 1px color-mix(in srgb, var(--tint) 30%, transparent);
  font-size: 17px;
  font-weight: 650;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background-color 0.2s ease, color 0.2s ease;
}

.choice-btn svg {
  color: var(--accent);
  transition: color 0.2s ease;
}

.choice-btn:active {
  transform: scale(0.96);
}

@media (hover: hover) {
  .choice-btn:hover {
    background: color-mix(in oklab, var(--tint) 10%, var(--surface));
  }
}

.choice-btn.is-picked {
  background: var(--ink);
  color: var(--bg);
}

.choice-btn.is-picked svg {
  color: inherit;
}

.caption {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.caption strong {
  font-weight: 600;
  color: var(--ink);
}

/* Insignia VS */
.vs {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin: -25px 0 0 -25px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow), inset 0 0 0 1px var(--line);
  color: var(--ink-3);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.4s var(--ease);
}

.vs > * {
  grid-area: 1 / 1;
}

.vs-icon {
  display: none;
}

.vs.is-correct,
.vs.is-wrong {
  color: #fff;
  transform: scale(1.12);
}

.vs.is-correct {
  background: var(--good);
}

.vs.is-wrong {
  background: var(--bad);
}

.vs.is-correct .vs-text,
.vs.is-wrong .vs-text {
  display: none;
}

.vs.is-correct .vs-icon-correct,
.vs.is-wrong .vs-icon-wrong {
  display: block;
  animation: pop 0.4s var(--ease);
}

/* ---------- Fin de partida ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: end center;
  background: rgba(35, 25, 15, 0.28);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: fade 0.3s ease both;
}

.sheet {
  width: 100%;
  max-width: 440px;
  padding: 32px 24px calc(20px + env(safe-area-inset-bottom));
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  text-align: center;
  animation: sheet-in 0.5s var(--ease) both;
}

.go-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-2);
}

.go-score {
  margin: 10px 0 0;
  font-size: 84px;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.go-label {
  margin: 4px 0 0;
  font-size: 15px;
  color: var(--ink-2);
}

.go-emoji {
  margin: 14px 0 0;
  font-size: 18px;
  line-height: 1.4;
  letter-spacing: 2px;
  white-space: pre-line;
}

.go-best {
  display: inline-block;
  margin: 18px 0 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--fill);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
}

.go-best.is-record {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
}

.go-detail {
  margin: 16px auto 0;
  max-width: 32ch;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-3);
}

.go-detail:empty {
  display: none;
}

.go-actions {
  display: grid;
  gap: 10px;
  margin-top: 26px;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 54px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 650;
  cursor: pointer;
  transition: transform 0.18s var(--ease), opacity 0.2s ease;
}

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

.btn-primary {
  background: var(--ink);
  color: var(--bg);
}

.btn-secondary {
  background: var(--fill);
  color: var(--ink);
}

.btn-text {
  height: 44px;
  background: transparent;
  color: var(--ink-2);
  font-weight: 600;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(28px + env(safe-area-inset-bottom));
  z-index: 60;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 15px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 0.3s ease, transform 0.3s var(--ease);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Pie ---------- */
.footer {
  position: relative;
  z-index: 1;
  flex: none;
  padding: 6px 16px calc(10px + env(safe-area-inset-bottom));
  font-size: 12px;
  text-align: center;
  color: var(--ink-3);
}

.footer a {
  color: inherit;
  text-underline-offset: 2px;
}

.footer span {
  margin: 0 4px;
}

/* ---------- Página de privacidad ---------- */
.page {
  flex: 1;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 16px 40px;
}

.page-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 28px;
  padding: 8px 14px 8px 10px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.page h1 {
  margin: 0 0 6px;
  font-size: clamp(32px, 9vw, 44px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.page-updated {
  margin: 0 0 28px;
  font-size: 14px;
  color: var(--ink-3);
}

.page-card {
  margin: 0 0 14px;
  padding: 22px 22px 6px;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow), inset 0 0 0 1px var(--line);
}

.page h2 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.page p,
.page li {
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-2);
}

.page p {
  margin: 0 0 16px;
}

.page ul {
  margin: 0 0 16px;
  padding-left: 20px;
}

.page li + li {
  margin-top: 6px;
}

.page strong {
  color: var(--ink);
  font-weight: 600;
}

.page a {
  color: var(--accent);
  text-underline-offset: 2px;
}

/* ---------- Animaciones ---------- */
@keyframes pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

@keyframes mosaic-scroll {
  /* El contenido está duplicado: desplazar una copia exacta (mitad + medio hueco) hace el bucle continuo */
  to { transform: translateY(calc(-50% - 6px)); }
}

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

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
}

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

/* ---------- Pantallas bajas (móviles pequeños) ---------- */
@media (max-height: 720px) {
  .screen-start { padding: 16px 16px 12px; }
  .eyebrow { margin-bottom: 8px; font-size: 12px; }
  .logo { --logo-width: 220; }
  .tagline { margin: 12px auto 18px; font-size: 15px; }
  .modes { gap: 10px; }
  .mode-btn { min-height: 0; gap: 14px; padding: 12px 16px; }
  .mode-icon { width: 40px; height: 40px; border-radius: 13px; }
  .mode-title { font-size: 17px; }
  .mode-desc { font-size: 13px; line-height: 1.3; }
  .hud { height: 54px; }
  .card { padding: 14px; gap: 14px; }
  .title { -webkit-line-clamp: 2; }
  .slot { margin-top: 10px; }
  .buttons { flex-direction: row; }
  .choice-btn { flex: 1; height: 46px; padding: 0 10px; font-size: 16px; gap: 4px; }
  .caption { margin-top: 8px; }
}

/* ---------- Escritorio / horizontal: tarjetas lado a lado ---------- */
@media (min-width: 760px) and (orientation: landscape) {
  .stage {
    --gap: 20px;
    margin-bottom: 8px;
  }

  .card {
    flex-direction: column;
    justify-content: center;
    gap: 22px;
    width: calc(50% - var(--gap) / 2);
    height: 100%;
    padding: 28px;
    text-align: center;
  }

  .card.slot-1 {
    transform: translateX(calc(100% + var(--gap)));
  }

  .card.slot-2 {
    transform: translateX(calc(100% + var(--gap) + 48px)) scale(0.96);
  }

  .poster {
    width: auto;
    height: min(48%, 380px);
  }

  .info {
    flex: none;
    align-items: center;
    width: 100%;
  }

  .title {
    font-size: clamp(20px, 2.2vw, 28px);
    -webkit-line-clamp: 2;
  }

  .slot {
    width: 100%;
    margin-top: 18px;
  }

  .value {
    font-size: clamp(36px, 4.4vw, 56px);
  }

  .buttons {
    flex-direction: row;
    justify-content: center;
  }

  .choice-btn {
    flex: none;
    min-width: 150px;
    height: 52px;
  }

  .caption {
    max-width: 100%;
  }

  .overlay {
    place-items: center;
  }

  .sheet {
    margin: 16px;
    padding-bottom: 24px;
    border-radius: var(--r-xl);
  }
}

/* Pantallas muy bajas: descripciones de los modos en una sola línea */
@media (max-height: 600px) {
  .logo { --logo-width: 190; }
  .tagline { margin: 8px auto 14px; }
  .mode-desc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

@media (min-width: 760px) and (orientation: landscape) and (max-height: 560px) {
  .card { gap: 12px; padding: 18px; }
  .poster { height: 40%; }
  .title { -webkit-line-clamp: 1; }
  .slot { margin-top: 10px; }
  .choice-btn { height: 44px; min-width: 120px; }
  .caption { display: none; }
}

@media (min-width: 560px) {
  .overlay {
    place-items: center;
  }

  .sheet {
    margin: 16px;
    padding-bottom: 24px;
    border-radius: var(--r-xl);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.12s !important;
  }

  .mosaic-strip {
    animation: none !important;
  }
}
