/* ============================================================
   LA FANESCA — design-system.css
   El lenguaje visual del juego, en dos capas:

   1. TOKENS      — la única fuente de verdad: color, elevación,
                    radios, espaciado, tipografía, movimiento, capas.
   2. COMPONENTES — piezas reusables construidas SOLO con tokens.

   LA COCINA DE NOCHE. La referencia es un juego de consola de
   bolsillo, no una página: fondo hondo y cálido —la cocina a la
   hora en que la fanesca hierve—, cobre de olla y oro de caldo
   como único acento, papel crema para lo que la abuela escribe,
   cristal oscuro para lo que flota sobre el mesón. Pocos colores,
   mucho aire, y todo lo que se toca responde con un resorte.
   ============================================================ */

:root {
  /* ==========================================================
     1. TOKENS
     ========================================================== */

  /* --- La noche: los fondos --- */
  --noche-950: #0f0a08;
  --noche-900: #171009;
  --noche-800: #22160f;
  --noche-700: #302016;
  --noche-600: #43301f;

  /* --- El cobre y el oro: el acento --- */
  --cobre-600: #9a4f1e;
  --cobre-500: #c8702f;
  --cobre-400: #e08a45;
  --cobre-300: #f0a866;
  --oro-600: #b8781c;
  --oro-500: #e0a12c;
  --oro-400: #f4b942;
  --oro-300: #ffd36a;
  --oro-200: #ffe7a8;

  /* --- El papel: lo que escribe la abuela --- */
  --crema-50:  #fffaf0;
  --crema-100: #fbf1dc;
  --crema-200: #f1e3c6;
  --crema-300: #dfcaa4;
  --crema-400: #c4aa7e;

  /* --- La tinta --- */
  --tinta-900: #2a1a12;
  --tinta-700: #4a3428;
  --tinta-600: #6f5545;
  --tinta-400: #a08674;
  --tinta-invert: #fff6e8;

  /* --- Semánticos de juego --- */
  --hoja-600: #3f8b3a;    /* lo que salió bien */
  --hoja-500: #5db55a;
  --hoja-400: #7ccb6f;
  --hoja-300: #a5e08f;
  --brasa-600: #a8321f;   /* lo que arruina la olla */
  --brasa-500: #e5533d;
  --brasa-400: #ff7a5c;
  --fiesta-500: #e8508a;  /* el confeti y la nota de versión */
  --cielo-400: #5fa8d3;

  /* --- Roles (lo que usan los componentes) --- */
  --fondo:          var(--noche-900);
  --fondo-alto:     var(--noche-800);
  --surface:        var(--crema-100);
  --surface-raised: var(--crema-50);
  --surface-sunken: var(--crema-200);
  --text:           var(--tinta-900);
  --text-muted:     var(--tinta-600);
  --text-invert:    var(--tinta-invert);
  --accent:         var(--oro-400);
  --accent-ink:     var(--cobre-600);
  --hairline:        rgba(42, 26, 18, .14);
  --hairline-strong: rgba(42, 26, 18, .28);

  /* --- El cristal: lo que flota sobre la cocina --- */
  --vidrio:        rgba(255, 244, 226, .08);
  --vidrio-borde:  rgba(255, 244, 226, .16);
  --vidrio-oscuro: rgba(20, 12, 8, .66);
  --vidrio-blur:   18px;

  /* --- Alias del sistema anterior: la escena, el editor y los
         iconos los nombran; aquí apuntan a la paleta nueva --- */
  --maiz-300: var(--oro-300); --maiz-400: var(--oro-400); --maiz-500: var(--oro-500);
  --maiz-600: var(--oro-600); --maiz-800: #5a3806;
  --nopal-300: var(--hoja-300); --nopal-400: var(--hoja-400); --nopal-500: var(--hoja-500); --nopal-600: var(--hoja-600);
  --chile-400: var(--brasa-400); --chile-500: var(--brasa-500); --chile-600: var(--brasa-600);
  --madera-200: var(--cobre-300); --madera-300: var(--cobre-400); --madera-400: var(--cobre-500);
  --madera-500: var(--cobre-600); --madera-600: #6b3512; --madera-700: #47220b;
  --peltre-100: var(--crema-50); --peltre-200: var(--crema-100); --peltre-300: var(--crema-200); --peltre-400: var(--crema-300);
  --pizarra-500: var(--noche-700); --pizarra-700: var(--noche-900);
  --rosa-400: #f06a9c; --rosa-500: var(--fiesta-500); --rosa-600: #b5306a; --rosa-700: #7d1e49;
  /* el azulejo del escenario 3D se lee por estos nombres: se quedan
     con sus valores de siempre para que la cocina no cambie de color */
  --talavera-200: #a9c9ec; --talavera-300: #5f97d8; --talavera-500: #1b5faa; --talavera-700: #123f74;
  --jade-400: #2aa89a; --metal-400: #9aa3ae; --metal-600: #6c7683;

  /* --- Espaciado (escala 4pt) --- */
  --sp-1: .25rem;  --sp-2: .5rem;   --sp-3: .75rem;  --sp-4: 1rem;
  --sp-5: 1.25rem; --sp-6: 1.5rem;  --sp-8: 2rem;    --sp-10: 2.5rem;

  /* --- Radios: generosos, de consola --- */
  --r-sm: 12px; --r-md: 18px; --r-lg: 24px; --r-xl: 30px; --r-pill: 999px;

  /* --- Elevación: sombras en dos capas, la corta y la larga --- */
  --e-1: 0 1px 2px rgba(0,0,0,.18), 0 4px 12px -4px rgba(0,0,0,.28);
  --e-2: 0 2px 4px rgba(0,0,0,.2), 0 12px 28px -12px rgba(0,0,0,.5);
  --e-3: 0 4px 10px rgba(0,0,0,.22), 0 26px 50px -18px rgba(0,0,0,.6);
  --e-4: 0 10px 20px rgba(0,0,0,.28), 0 40px 90px -24px rgba(0,0,0,.75);
  --gloss: inset 0 1px 0 rgba(255,255,255,.28);
  --inset: inset 0 2px 8px rgba(0,0,0,.22);
  --ring: 2px solid rgba(255, 246, 232, .9);
  --glow-oro: 0 0 0 1px rgba(255, 211, 106, .35), 0 0 28px rgba(255, 190, 80, .35);
  --glow-hoja: 0 0 0 1px rgba(125, 203, 111, .4), 0 0 24px rgba(93, 181, 90, .4);

  /* --- Tipografía --- */
  --font-display: 'Baloo 2', 'Nunito', system-ui, sans-serif;
  --font-text:    'Nunito', 'Segoe UI', system-ui, sans-serif;
  --font-hand:    'Caveat', 'Segoe Script', cursive;
  /* la letra más chica tiene piso: 11 px se leen mal en un teléfono
     de mano (las guías piden 12 como mínimo) */
  --t-2xs: max(.66rem, 12px); --t-xs: .74rem; --t-sm: .86rem; --t-md: .98rem;
  --t-lg: 1.12rem; --t-xl: 1.4rem; --t-2xl: 1.85rem; --t-3xl: 2.5rem; --t-4xl: 3.3rem;
  --lead-tight: 1.1; --lead: 1.5;
  --track-caps: .16em;

  /* --- Movimiento: todo lo que se toca responde con resorte --- */
  --dur-fast: .14s; --dur: .26s; --dur-slow: .5s;
  --ease-out:    cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease-pop:    var(--ease-spring);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);

  /* --- Capas --- */
  --z-scene: 1; --z-hud: 50; --z-nav: 55; --z-banner: 80; --z-cortina: 85; --z-modal: 90; --z-toast: 95;

  /* --- Medidas del marco --- */
  --frame: 480px;
  --hud-h: calc(78px + env(safe-area-inset-top));
  --nav-h: 0px;
}

/* SIN ZOOM POR DOBLE TOQUE. Tocar rápido el mismo botón acercaba la
   pantalla y no había cómo volver: el user-scalable=no del viewport
   no basta, iOS lo ignora. `manipulation` quita sólo el doble toque;
   el pellizco sigue (accesibilidad). Con :where(*) la regla no pesa
   nada, así que el lienzo 3D, el carrusel y el mesón, que piden
   touch-action:none, y los scrolls con pan-y se quedan con lo suyo. */
:where(*) { touch-action: manipulation; }

/* ============================================================
   2. COMPONENTES
   ============================================================ */

/* ---------- Botón ----------
   Píldora con cara de gradiente y canto corto. La "cara" y el
   "canto" se pasan por custom props: cambiar de variante es
   cambiar tres tokens. Al tocar se hunde con resorte, no con
   un borde que cambia de grosor. */
.btn {
  --btn-face: var(--cobre-500);
  --btn-face-hi: var(--cobre-400);
  --btn-edge: var(--cobre-600);
  --btn-ink: #fff;

  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: 48px;
  padding: .7rem 1.5rem;
  font-family: var(--font-display); font-size: var(--t-lg); font-weight: 700; line-height: 1;
  letter-spacing: .01em;
  color: var(--btn-ink);
  background: linear-gradient(180deg, var(--btn-face-hi), var(--btn-face));
  border: 0;
  border-radius: var(--r-pill);
  box-shadow: var(--gloss), inset 0 -3px 0 rgba(0,0,0,.18), 0 0 0 1px var(--btn-edge), var(--e-2);
  text-shadow: 0 1px 0 rgba(0,0,0,.18);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), filter var(--dur-fast) var(--ease-out);
  will-change: transform;
}
.btn:active { transform: scale(.965) translateY(1px); box-shadow: var(--inset), 0 0 0 1px var(--btn-edge), var(--e-1); }
.btn:disabled { filter: grayscale(.7) brightness(.9); cursor: default; }
.btn:disabled:active { transform: none; }
.btn:focus-visible { outline: 3px solid var(--oro-300); outline-offset: 3px; }

.btn--maiz   { --btn-face: var(--oro-500);  --btn-face-hi: var(--oro-300);  --btn-edge: var(--oro-600);  --btn-ink: var(--maiz-800); text-shadow: 0 1px 0 rgba(255,255,255,.35); }
/* el verde del botón es un pelo más hondo que la hoja: el blanco sobre
   hoja-500 daba 2.55:1 («Siguiente nivel», medido), y un botón grande
   pide 3:1. Con esta cara da 3.2–3.5:1 sin dejar de ser el mismo verde */
.btn--nopal  { --btn-face: #4a9a45; --btn-face-hi: #52a34d; --btn-edge: #336f30; }
.btn--chile  { --btn-face: var(--brasa-500); --btn-face-hi: var(--brasa-400); --btn-edge: var(--brasa-600); }
.btn--madera { --btn-face: var(--cobre-500); --btn-face-hi: var(--cobre-400); --btn-edge: var(--cobre-600); }
.btn--rosa   { --btn-face: var(--fiesta-500); --btn-face-hi: var(--rosa-400); --btn-edge: var(--rosa-600); }
/* peltre: el botón secundario, de cristal claro sobre papel o sobre noche */
.btn--peltre {
  --btn-ink: var(--text);
  background: rgba(42, 26, 18, .06);
  box-shadow: inset 0 0 0 1.5px var(--hairline-strong);
  text-shadow: none;
}
.btn--peltre:active { box-shadow: inset 0 0 0 1.5px var(--hairline-strong), var(--inset); }
/* fantasma: solo texto, para lo que no debe competir con el principal */
.btn--fantasma {
  --btn-ink: var(--text-muted);
  background: none; box-shadow: none; text-shadow: none;
  min-height: 44px;
}
.btn--fantasma:active { box-shadow: none; transform: scale(.97); }

.btn--sm    { min-height: 40px; padding: .45rem 1rem; font-size: var(--t-sm); }
.btn--lg    { min-height: 56px; padding: .9rem 1.8rem; font-size: var(--t-xl); }
.btn--block { display: flex; width: 100%; }

/* ---------- Botón redondo de icono: cristal sobre lo que sea ---------- */
.icono-boton {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px;
  font-size: 1.2rem; line-height: 1;
  color: var(--text-invert);
  background: var(--vidrio-oscuro);
  border: 1.5px solid var(--vidrio-borde);
  border-radius: 50%;
  box-shadow: var(--e-2);
  -webkit-backdrop-filter: blur(var(--vidrio-blur)); backdrop-filter: blur(var(--vidrio-blur));
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.icono-boton:active { transform: scale(.9); background: rgba(255,244,226,.18); }

/* ---------- Panel de papel ---------- */
.panel {
  --panel-face: var(--surface-raised);
  --panel-face-2: var(--surface);
  position: relative;
  background: linear-gradient(180deg, var(--panel-face), var(--panel-face-2));
  border-radius: var(--r-lg);
  box-shadow: var(--e-2);
  padding: var(--sp-4);
  color: var(--text);
}
.panel--sunken {
  background: rgba(42, 26, 18, .06);
  border: 1.5px dashed var(--hairline-strong);
  box-shadow: none;
}
.panel--flat { box-shadow: var(--e-1); }

/* ---------- Panel de cristal: lo que flota sobre la noche ---------- */
.cristal {
  background: var(--vidrio);
  border: 1.5px solid var(--vidrio-borde);
  border-radius: var(--r-lg);
  box-shadow: var(--e-2);
  -webkit-backdrop-filter: blur(var(--vidrio-blur)); backdrop-filter: blur(var(--vidrio-blur));
  color: var(--text-invert);
}

/* ---------- Rótulo de cabecera: el título de cada pantalla ---------- */
.sign { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.sign-title {
  font-family: var(--font-display); font-size: var(--t-2xl); font-weight: 800; line-height: 1;
  color: var(--text-invert);
  letter-spacing: -.01em;
}
.sign-sub {
  font-family: var(--font-text); font-size: var(--t-sm); font-weight: 700;
  color: var(--oro-300);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- Rótulo pequeño de sección ---------- */
.label {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-family: var(--font-display); font-size: var(--t-xs); font-weight: 700;
  letter-spacing: var(--track-caps); text-transform: uppercase;
  color: var(--accent-ink);
}

/* ---------- Plato: el marco de todo icono ---------- */
.plate {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 1;
  background: radial-gradient(circle at 50% 38%, #fff 0%, #fffaf0 52%, var(--crema-200) 90%);
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(42,26,18,.05), inset 0 -4px 10px rgba(42,26,18,.1), var(--e-2);
}
/* el margen del plato se da con el ancho del icono, no con padding
   en %: un padding porcentual se mide contra el padre y puede comerse
   el plato entero. height:auto + aspect-ratio evita el 0px. */
.plate > svg { width: 70%; height: auto; aspect-ratio: 1; filter: drop-shadow(0 2px 2px rgba(42,26,18,.25)); }

/* ---------- Badge ---------- */
.badge {
  --badge-face: var(--brasa-500);
  --badge-edge: var(--brasa-600);
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.35rem; height: 1.35rem; padding: 0 .3rem;
  font-family: var(--font-display); font-size: var(--t-2xs); font-weight: 800; line-height: 1;
  color: #fff;
  background: linear-gradient(180deg, var(--badge-face), var(--badge-edge));
  border: 2px solid var(--crema-50);
  border-radius: var(--r-pill);
  box-shadow: var(--e-1);
}
.badge--maiz  { --badge-face: var(--oro-300); --badge-edge: var(--oro-600); color: var(--maiz-800); }
.badge--nopal { --badge-face: var(--hoja-500); --badge-edge: var(--hoja-600); }

/* ---------- Pill ---------- */
.pill {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .2rem .75rem;
  font-family: var(--font-display); font-size: var(--t-sm); font-weight: 700; line-height: 1.3;
  color: var(--text);
  background: var(--crema-50);
  border: 1.5px solid var(--hairline);
  border-radius: var(--r-pill);
  box-shadow: var(--e-1);
  white-space: nowrap;
}
.pill--dark { color: var(--text-invert); background: var(--vidrio-oscuro); border-color: var(--vidrio-borde); }
.pill--maiz { color: var(--maiz-800); background: linear-gradient(180deg, var(--oro-300), var(--oro-400)); border-color: var(--oro-600); }

/* ---------- Meter ---------- */
.meter {
  flex: 1; height: 10px; border-radius: var(--r-pill); overflow: hidden;
  background: rgba(42, 26, 18, .12);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.18);
}
.meter-fill {
  display: block; height: 100%; border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--oro-400), var(--oro-300));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45);
  transition: width var(--dur-slow) var(--ease-out);
}

/* ---------- Anillo de progreso ----------
   Un cono de oro sobre cristal. `--p` es el porcentaje (0-100). */
.anillo {
  --p: 0;
  --anillo-grosor: 4px;
  --anillo-pista: rgba(255, 244, 226, .14);
  --anillo-color: var(--oro-400);
  position: relative;
  display: inline-grid; place-items: center;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: conic-gradient(var(--anillo-color) calc(var(--p) * 1%), var(--anillo-pista) 0);
  transition: --p var(--dur-slow) var(--ease-out);
}
.anillo::before {
  content: ''; position: absolute; inset: var(--anillo-grosor);
  border-radius: 50%;
  background: var(--anillo-fondo, var(--noche-800));
}
.anillo > * { position: relative; }
.anillo b {
  font-family: var(--font-display); font-size: var(--t-sm); font-weight: 800; line-height: 1;
  color: var(--text-invert);
  font-variant-numeric: tabular-nums;
}

/* ---------- Ficha de estadística: cifra grande, nombre chico ---------- */
.stats { display: flex; gap: var(--sp-2); width: 100%; }
.stat {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: .1rem;
  padding: .6rem .5rem;
  background: rgba(42, 26, 18, .05);
  border: 1.5px solid var(--hairline);
  border-radius: var(--r-md);
}
.stat-n {
  font-family: var(--font-display); font-size: var(--t-xl); font-weight: 800; line-height: 1;
  color: var(--text); font-variant-numeric: tabular-nums;
}
.stat-l {
  font-family: var(--font-text); font-size: var(--t-2xs); font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted);
}

/* ---------- Scroll interno ---------- */
.scroll {
  flex: 1; min-height: 0;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-inline: var(--sp-4);
  padding-bottom: var(--sp-6);
  mask-image: linear-gradient(180deg, transparent 0, #000 16px);
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 16px);
}
.scroll::-webkit-scrollbar { width: 0; }

/* ---------- Hoja: estructura común de toda pantalla ---------- */
.hoja {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  height: 100vh; height: 100dvh;
  padding-top: calc(env(safe-area-inset-top) + var(--sp-3));
  padding-bottom: env(safe-area-inset-bottom);
}
.hoja-head {
  flex-shrink: 0;
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-4) var(--sp-3);
}

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%) translateY(14px) scale(.96);
  bottom: calc(env(safe-area-inset-bottom) + 92px); z-index: var(--z-toast);
  max-width: min(360px, 86vw);
  font-family: var(--font-display); font-size: var(--t-md); font-weight: 700; text-align: center;
  color: var(--text-invert);
  background: rgba(24, 14, 9, .94);
  border: 1.5px solid var(--vidrio-borde);
  border-radius: var(--r-md); padding: .6rem 1.15rem;
  box-shadow: var(--e-3);
  -webkit-backdrop-filter: blur(var(--vidrio-blur)); backdrop-filter: blur(var(--vidrio-blur));
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-spring);
}
.toast.visible { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }

/* ---------- Modal: hoja que sube desde abajo ----------
   Como en cualquier juego de bolsillo: el fondo se oscurece y
   desenfoca, la hoja sube con resorte y trae un asa arriba. En
   pantallas anchas se centra. */
.modal {
  position: fixed; inset: 0; z-index: var(--z-modal);
  display: none; align-items: flex-end; justify-content: center;
  padding: 0;
  background: rgba(10, 6, 4, .62);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.modal.open { display: flex; animation: modal-in var(--dur) var(--ease-out) both; }
@keyframes modal-in { from { opacity: 0; } }

.sheet {
  position: relative;
  width: 100%; max-width: var(--frame);
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-2);
  color: var(--text);
  background: linear-gradient(180deg, var(--crema-50), var(--crema-100));
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  box-shadow: var(--e-4);
  padding: var(--sp-6) var(--sp-5) calc(env(safe-area-inset-bottom) + var(--sp-5));
  animation: sheet-in var(--dur-slow) var(--ease-spring) both;
  max-height: calc(100dvh - env(safe-area-inset-top) - 24px);
  overflow-y: auto; overscroll-behavior: contain;
}
.sheet::-webkit-scrollbar { width: 0; }
/* el asa */
.sheet::before {
  content: ''; position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 40px; height: 5px; border-radius: 3px;
  background: rgba(42, 26, 18, .18);
}
@keyframes sheet-in { from { opacity: 0; transform: translateY(48px) scale(.97); } }
.sheet-title { font-family: var(--font-display); font-size: var(--t-2xl); font-weight: 800; color: var(--text); line-height: var(--lead-tight); letter-spacing: -.01em; }
.sheet-eyebrow { font-family: var(--font-display); font-size: var(--t-xs); font-weight: 700; letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--accent-ink); }
.sheet-body { font-size: var(--t-md); line-height: var(--lead); color: var(--text-muted); max-width: 34ch; }
.sheet .btn + .btn { margin-top: -.15rem; }
.sheet .btn--block { max-width: 360px; }

/* en pantalla ancha la hoja se centra como una tarjeta */
@media (min-width: 640px) and (min-height: 720px) {
  .modal { align-items: center; padding: var(--sp-6); }
  .sheet { max-width: 380px; border-radius: var(--r-xl); padding-bottom: var(--sp-5); }
  .sheet::before { display: none; }
}

/* ---------- Utilidades mínimas ---------- */
.hidden { display: none !important; }
.stack  { display: flex; flex-direction: column; gap: var(--sp-3); }
.row    { display: flex; align-items: center; gap: var(--sp-2); }
.center { text-align: center; }
.muted  { color: var(--text-muted); }

/* ---------- Página: la superficie de papel del recetario ---------- */
.pagina {
  background: linear-gradient(180deg, var(--crema-50), var(--crema-100));
  border-radius: var(--r-lg);
  box-shadow: var(--e-2);
  padding: var(--sp-4);
  color: var(--text);
}

/* ---------- Ciclo de versión (actualizador.js) ---------- */

/* el botón que aparece cuando hay versión nueva descargada */
.aviso-actualizar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(env(safe-area-inset-bottom) + 92px);
  z-index: var(--z-toast);
  animation: aviso-sube var(--dur-slow) var(--ease-spring) both;
}
.aviso-actualizar b { font-weight: 800; }
@keyframes aviso-sube { from { opacity: 0; transform: translateX(-50%) translateY(20px); } }

/* ---------- la nota de versiones ----------
   UNA HOJA CON LISTA LARGA. La hoja normal crece con su contenido y
   se desplaza entera; aquí eso mandaba el botón de cerrar fuera de
   la pantalla (827 px de alto en un teléfono de 844, peor en uno de
   667) y dejaba al jugador encerrado detrás de la nota: veía el
   recetario por el fondo translúcido, tocaba, y no pasaba nada. Lo
   que se desplaza es LA LISTA; el botón y la X no se mueven. */
.nota-version .sheet {
  max-height: calc(100dvh - env(safe-area-inset-top) - 24px);
  overflow: hidden;
}
.nota-version .nota-version-lista {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
}
.nota-version .btn { flex: 0 0 auto; }
.nota-version-x {
  position: absolute; top: 8px; right: 10px; z-index: 2;
  width: 38px; height: 38px;
  font-size: var(--t-lg); line-height: 1;
  color: var(--text-muted); background: rgba(42,26,18,.06); border: none;
}
.nota-version-ic { font-size: var(--t-3xl); line-height: 1; }
.nota-version-lista {
  width: 100%; text-align: left; align-self: stretch;
  display: flex; flex-direction: column; gap: var(--sp-2);
  margin: var(--sp-1) 0 var(--sp-2);
  padding: var(--sp-3) var(--sp-3) var(--sp-3) var(--sp-6);
  font-size: var(--t-sm); line-height: var(--lead); color: var(--text);
  background: rgba(42, 26, 18, .05);
  border: 1.5px dashed var(--hairline-strong);
  border-radius: var(--r-md);
}
.nota-version-lista li::marker { color: var(--accent-ink); }

/* la etiqueta discreta de versión en la portada */
.version-tag {
  font-family: var(--font-display); font-size: var(--t-2xs); font-weight: 700;
  letter-spacing: .12em; color: var(--text-muted); opacity: .75;
}
