/* ==========================================================================
   Nuestra próxima aventura -- estética mapa/pergamino, mobile-first.
   Paleta: pergamino, sepia, negro, marrón oscuro, verde esmeralda, dorado.
   ========================================================================== */

:root {
  --parchment: #e9d9b6;
  --parchment-dark: #c9b183;
  --sepia: #5c4326;
  --ink: #241a10;
  --brown-deep: #1b1410;
  --emerald: #0d3d2e;
  --emerald-bright: #1f8a5f;
  --gold: #c9a24b;
  --gold-bright: #e6c877;
  --cream-text: #f3e9d2;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --vh: 100dvh;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
  background: var(--brown-deep);
  color: var(--cream-text);
  font-family: 'Georgia', 'Iowan Old Style', serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100vh;
  min-height: var(--vh);
}

.app {
  position: relative;
  min-height: 100vh;
  min-height: var(--vh);
  width: 100%;
  overflow-x: hidden;
  /* Antes: overflow:hidden recortaba el flyer + texto de revelación en
     viewports bajos (360x800) cuando el contenido supera 100vh. El ancho
     ya está fijado por html,body{overflow-x:hidden}; el alto debe poder
     fluir/scrollear para que el flyer nunca quede cortado. */
}

.map-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: url('/assets/map-bg.png');
  background-size: cover;
  background-position: center;
  transition: filter 1.2s ease, background-color 1.2s ease;
}
/* Placeholder de mapa/pergamino via CSS si map-bg.png no existe todavia --
   textura simple de pergamino con vetas, se reemplaza sola al colocar el
   archivo real (misma ruta, sin cambiar el CSS). */
.map-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 15%, rgba(0,0,0,0.25), transparent 55%),
    radial-gradient(ellipse at 80% 85%, rgba(0,0,0,0.3), transparent 55%),
    repeating-linear-gradient(115deg, rgba(92,67,38,0.08) 0px, rgba(92,67,38,0.08) 2px, transparent 2px, transparent 14px),
    linear-gradient(160deg, #d8c396 0%, #c9ae76 35%, #b89860 65%, #a3824e 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
}
/* Solo se muestra si map-bg.png no cargó -- ver JS (probeImage) que agrega
   .broken a .map-bg. Sin esto, el placeholder opaco taparía la imagen real. */
.map-bg.broken::before { opacity: 1; }
.map-bg.dimmed { filter: brightness(0.35) saturate(0.6); }
.map-bg.vivid { filter: none; background-color: #120a06; }
/* Minijuego de huellas (pantalla 4): baja el mapa (huellas decorativas
   impresas incluidas) para que las 3 huellas-objetivo interactivas
   destaquen sin competir visualmente. */
.map-bg.trail-dimmed { filter: brightness(0.5) saturate(0.7); }

/* Viñeta permanente y discreta -- da contraste consistente al texto sobre
   map-bg.png (real: mapa ilustrado detallado) sin taparlo ni cambiar su
   estética. No confundir con .map-bg::before, que es solo el placeholder
   de fallback. */
.map-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(8,5,3,0.1) 0%, rgba(8,5,3,0.5) 100%);
  pointer-events: none;
}

.particles-layer {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  width: 100%;
  height: 100%;
}

/* ---------- Pantallas ---------- */
.screen {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: var(--vh);
  width: 100%;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(1.5rem + var(--safe-top)) 1.25rem calc(1.5rem + var(--safe-bottom));
  text-align: center;
}
.screen.active { display: flex; }

.screen-wide { justify-content: flex-end; }
.screen-reveal { justify-content: flex-start; padding-top: calc(2rem + var(--safe-top)); }
.screen-closing { justify-content: center; }

/* ---------- Tarjeta de pergamino ---------- */
.parchment-card {
  background: rgba(22, 16, 10, 0.82);
  border: 1px solid rgba(201, 162, 75, 0.35);
  border-radius: 18px;
  padding: 2rem 1.5rem;
  max-width: 30rem;
  width: 100%;
  box-shadow: 0 20px 60px -20px rgba(0,0,0,0.7), inset 0 0 40px rgba(0,0,0,0.3);
  backdrop-filter: blur(3px);
}
.dark-card { background: rgba(10, 8, 6, 0.88); }

.parchment-card p, .closing-stack p {
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0.9rem 0;
  color: var(--cream-text);
  opacity: 0.95;
}

.title-glow {
  font-family: 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
  font-size: 1.6rem;
  letter-spacing: 0.08em;
  color: var(--gold-bright);
  text-shadow: 0 0 18px rgba(230, 200, 119, 0.45), 0 2px 4px rgba(0,0,0,0.6);
  margin: 0 0 0.5rem;
}

.hint {
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--gold);
  opacity: 0.85;
  margin-top: 0.75rem;
}

/* ---------- Aparición progresiva de líneas ---------- */
[data-line] {
  opacity: 0;
  transform: translateY(10px);
  animation: line-in 0.8s ease forwards;
}
.reveal-stagger [data-line]:nth-of-type(1) { animation-delay: 0.1s; }
.reveal-stagger [data-line]:nth-of-type(2) { animation-delay: 0.9s; }
.reveal-stagger [data-line]:nth-of-type(3) { animation-delay: 1.7s; }
.reveal-stagger [data-line]:nth-of-type(4) { animation-delay: 2.5s; }
.reveal-stagger [data-line]:nth-of-type(5) { animation-delay: 3.3s; }
.reveal-stagger [data-line]:nth-of-type(6) { animation-delay: 4.0s; }
.reveal-stagger [data-line]:nth-of-type(7) { animation-delay: 4.6s; }
.reveal-stagger .btn-primary,
.reveal-stagger .closing-actions {
  opacity: 0;
  animation: line-in 0.8s ease forwards;
  animation-delay: 5.2s;
}

@keyframes line-in {
  to { opacity: 1; transform: translateY(0); }
}

.hidden { display: none !important; }

/* ---------- Botones ---------- */
.btn-primary, .btn-tertiary {
  display: inline-block;
  min-height: 48px;
  padding: 0.85rem 1.75rem;
  margin-top: 1.5rem;
  border-radius: 999px;
  border: 1px solid var(--gold);
  background: linear-gradient(160deg, #2a4d3a, #123023);
  color: var(--gold-bright);
  font-family: inherit;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  box-shadow: 0 10px 25px -10px rgba(0,0,0,0.6);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none;
}
.btn-primary:active { transform: scale(0.97); }
.btn-tertiary {
  background: transparent;
  border-color: rgba(201, 162, 75, 0.5);
  color: var(--cream-text);
  font-size: 0.85rem;
}

.sound-toggle {
  position: fixed;
  top: calc(0.75rem + var(--safe-top));
  right: 0.75rem;
  z-index: 50;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(201,162,75,0.4);
  background: rgba(20,15,10,0.55);
  color: var(--gold-bright);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ---------- Sello: press and hold ---------- */
.seal-wrap {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 1.5rem auto 0.5rem;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.seal-wrap-small { width: 90px; height: 90px; }

.seal-progress {
  position: absolute;
  inset: 0;
  transform: rotate(-90deg);
}
.seal-progress-track, .seal-progress-bar {
  fill: none;
  stroke-width: 4;
}
/* r=55 (antes 62): medido sobre snake-seal.png real -- el borde ondulado
   de cera (sin contar las gotas sueltas) cae en torno al 80% del radio
   del lienzo; con inset:8px del botón esto deja el anillo abrazando el
   borde de cera en vez de flotar fuera de la imagen. Ver CIRC en app.js. */
.seal-progress-track { stroke: rgba(201,162,75,0.2); }
.seal-progress-bar {
  stroke: var(--gold-bright);
  stroke-linecap: round;
  stroke-dasharray: 345.6;
  stroke-dashoffset: 345.6;
  filter: drop-shadow(0 0 6px rgba(31, 138, 95, 0.8));
  transition: stroke-dashoffset 0.05s linear;
}

.seal-button {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  transition: transform 0.15s ease, filter 0.3s ease;
}
/* Scale muy leve hacia abajo (efecto "presionado"); el brillo verde
   gradual se aplica inline por JS segun el progreso (ver tick() en
   app.js), ya que depende del avance continuo del hold. */
.seal-button.holding { transform: scale(0.97); }
.seal-button.confirmed {
  filter: drop-shadow(0 0 22px rgba(31, 138, 95, 0.9)) brightness(1.15);
}

.seal-img, .seal-img-static {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,0.5));
}
/* Placeholder de sello via CSS/SVG si snake-seal.png aun no existe --
   circulo tipo cera con simbolo simple, se reemplaza solo al colocar
   el archivo real en la misma ruta. */
.seal-img[src$="snake-seal.png"] { background: transparent; }
.seal-fallback {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #1c5c42, var(--emerald) 60%, #06140f 100%);
  box-shadow: inset 0 0 20px rgba(0,0,0,0.6), 0 8px 18px rgba(0,0,0,0.5);
  display: none;
}
.seal-fallback::after {
  content: '§';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--gold-bright);
  font-family: 'Palatino Linotype', serif;
}
.seal-img.broken + .seal-fallback,
.seal-img-static.broken + .seal-fallback { display: block; }

/* ---------- Huellas / recorrido ---------- */
.trail-stage {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}
/* footprints.png real es un sprite sheet de 1536x1024 con varios grupos de
   huellas, no un simple sprite de 2 cuadros. Se recorta UN icono limpio
   y aislado (fila superior, 2do grupo) via background-size/position en
   px absolutos; la variante "left" solo espeja con transform, sin
   necesitar un segundo recorte. */
.footprint {
  position: absolute;
  width: 42px;
  height: 52px;
  background-image: url('/assets/footprints.png');
  background-size: 314px 209px;
  background-position: -73px -2px;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(0.6);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.footprint.left { transform: scale(0.6) scaleX(-1); }
.footprint.visible { opacity: 0.9; transform: scale(1); }
.footprint.visible.left { transform: scale(1) scaleX(-1); }
.footprint.glow {
  opacity: 1;
  filter: drop-shadow(0 0 10px rgba(31,138,95,0.9)) drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}
.footprint.tappable { cursor: pointer; }
.footprint.tapped { opacity: 0.35; filter: none; }

/* ---------- Huellas-objetivo del minijuego (pantalla 4) ----------
   SVG propio, no footprints.png -- el sprite real tiene demasiadas
   huellas juntas y a tamaño pequeño no era evidente cuál tocar en
   celular. Un solo path por huella, hit-area 64x64 (accesible),
   aparecen de a una. */
.footprint-target {
  position: absolute;
  width: 64px;
  height: 64px;
  border: none;
  background: transparent;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  touch-action: manipulation;
  transform: translate(-50%, -50%) scale(0.92);
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.footprint-target.visible { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.footprint-target .footprint-svg {
  width: 32px;
  height: auto;
  overflow: visible;
}
.footprint-target .footprint-svg path {
  fill: var(--ink);
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.55));
}
.footprint-target.appearing .footprint-svg path {
  animation: footprint-pulse 1.7s ease-in-out infinite;
}
@keyframes footprint-pulse {
  0%, 100% {
    filter: drop-shadow(0 0 3px rgba(230,200,119,0.35)) drop-shadow(0 2px 3px rgba(0,0,0,0.55));
  }
  50% {
    filter: drop-shadow(0 0 12px rgba(31,138,95,0.85)) drop-shadow(0 2px 3px rgba(0,0,0,0.55));
  }
}
.footprint-target.tapped {
  cursor: default;
  transform: translate(-50%, -50%) scale(1.05);
}
.footprint-target.tapped .footprint-svg path {
  animation: none;
  fill: var(--sepia);
  filter: drop-shadow(0 0 9px rgba(31,138,95,0.6));
}
/* Al completarse las 3 huellas, se atenuan para no competir con el texto
   "Camino encontrado." del overlay que aparece justo encima. */
.trail-stage.fading .footprint-target {
  opacity: 0.3;
  transition: opacity 0.6s ease;
}

/* Placeholder de huella via CSS si footprints.png no existe -- ovalo
   simple oscuro, misma clase/ruta, se reemplaza solo. */
.footprint::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 60% 60% 55% 55%;
  background: radial-gradient(ellipse at center, rgba(30,20,12,0.85), rgba(30,20,12,0.5) 70%, transparent 100%);
  opacity: var(--fallback-opacity, 0);
}
.footprint.use-fallback::after { opacity: 1; }

.narrative-overlay {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 28rem;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(10,7,4,0.94), rgba(10,7,4,0.6) 55%, transparent 100%);
  border-radius: 18px 18px 0 0;
}
.narrative-line {
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0.6rem 0;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.narrative-line.visible { opacity: 1; transform: translateY(0); }

/* ---------- Transición de revelación ---------- */
.screen-transition {
  background: #000;
  justify-content: center;
}
.ink-burst {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 55%, rgba(31,138,95,0.25), transparent 40%);
  opacity: 0;
}
.ink-burst.expanding {
  /* Acortado (antes 1.4s) -- la secuencia completa debe sentirse rapida
     (~3-4s hasta el flyer), no un fundido lento. */
  animation: ink-expand 0.9s ease forwards;
}
@keyframes ink-expand {
  0% { opacity: 0; transform: scale(0.2); }
  40% { opacity: 1; }
  100% { opacity: 1; transform: scale(3.2); background: radial-gradient(circle at 50% 55%, rgba(0,0,0,0.95), #000 70%); }
}
.crack-light {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(230,200,119,0.9), transparent 2%);
  opacity: 0;
}
.crack-light.flash { animation: flash-out 0.5s ease forwards; }
@keyframes flash-out {
  0% { opacity: 0; }
  30% { opacity: 1; }
  100% { opacity: 0; }
}

/* Remolino verde/dorado -- recorte de /assets/generated/swirl-spiral.png
   (derivado de reveal-vfx.png, nunca se muestra el sprite completo). */
.vfx-swirl {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 68vw;
  max-width: 300px;
  aspect-ratio: 258 / 234;
  background-image: url('/assets/generated/swirl-spiral.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0;
  transition: opacity 0.6s ease;
  animation: swirl-spin 5s linear infinite;
  pointer-events: none;
}
.vfx-swirl.active { opacity: 0.6; }
/* Progresion de intensidad pedida: anticipacion (.active) -> leve build
   (.intense, 1.4s) -> pico en el "1" (.peak, 4.7s) -> casi nada en la
   pausa de suspenso (.suspense, 5.8-6.2s) justo antes del golpe. */
.vfx-swirl.intense { opacity: 0.85; }
.vfx-swirl.peak { opacity: 1; filter: brightness(1.35) saturate(1.2); }
.vfx-swirl.suspense { opacity: 0.15; transition: opacity 0.4s ease; }
@keyframes swirl-spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Destello final -- recorte de /assets/generated/starburst.png. */
.vfx-starburst {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58vw;
  max-width: 280px;
  aspect-ratio: 258 / 261;
  background-image: url('/assets/generated/starburst.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.6);
  pointer-events: none;
}
.vfx-starburst.flash { animation: starburst-flash 0.6s ease forwards; }
@keyframes starburst-flash {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.6); }
  45% { opacity: 1; transform: translate(-50%, -50%) scale(1.25); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.7); }
}

/* Cuenta regresiva -- imagenes de /assets/generated/countdown-{3,2,1}.png
   en vez de texto plano; misma animacion count-pulse de antes. */
.countdown {
  position: relative;
  z-index: 3;
  width: 34vw;
  max-width: 132px;
  height: auto;
  opacity: 0;
  filter: drop-shadow(0 0 22px rgba(230,200,119,0.55));
}
.countdown.show {
  /* Pop-in + HOLD + fade -- "3 debe sentirse importante", no un parpadeo. */
  animation: count-pulse 0.95s ease;
}
.countdown.show.final {
  /* El "1" se sostiene un poco mas (pedido: 1.0-1.1s) y con mas peso. */
  animation-duration: 1.05s;
  filter: drop-shadow(0 0 30px rgba(230,200,119,0.75));
}
@keyframes count-pulse {
  0% { opacity: 0; transform: scale(0.6); }
  20% { opacity: 1; transform: scale(1.08); }
  28% { transform: scale(1); }
  78% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.96); }
}
/* ---------- Pantalla de revelación (flyer) ---------- */
.screen-reveal {
  background: linear-gradient(180deg, #1a0f08, #000);
  padding-top: calc(1.5rem + var(--safe-top));
}
/* "VIDA..." / "NOS VAMOS." aparecen ANTES que el flyer -- ver app.js
   startGiftReveal(). Tipografia igual a reveal-line-xl. */
.reveal-intro-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  min-height: 1px;
}
.flyer-wrap {
  width: 100%;
  max-width: 21rem;
  margin-top: 0.5rem;
  /* Relacion real de flyer.png (1024x1536 = 2:3). object-fit:contain en
     .flyer-img garantiza cero recorte/deformacion. */
  aspect-ratio: 1024 / 1536;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 25px 70px -15px rgba(0,0,0,0.8);
  position: relative;
  background: #0c0805;
  /* Entrada elegante: fade + scale suave, sin rebote (ease-out simple). */
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.flyer-wrap.visible {
  opacity: 1;
  transform: scale(1);
}
.flyer-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  background: #0c0805;
}
.flyer-fallback {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 20%, #3a1f0a, #150a05 70%);
  color: #ffb64d;
  font-size: 1.4rem;
  font-weight: bold;
  text-align: center;
  padding: 1rem;
  letter-spacing: 0.05em;
}
.flyer-img.broken { display: none; }
.flyer-img.broken + .flyer-fallback { display: flex; }

.reveal-text-stack {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding-bottom: 1rem;
}
.reveal-line {
  opacity: 0;
  transform: translateY(10px);
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: var(--cream-text);
}
.reveal-line.visible { animation: line-in 0.7s ease forwards; }
.reveal-line-xl { font-size: 1.9rem; font-weight: bold; color: #ffb64d; margin-top: 0.5rem; }
.reveal-intro-stack .reveal-line-xl:first-child { margin-top: 0; }
.reveal-line-lg { font-size: 1.3rem; font-weight: bold; color: var(--gold-bright); }
.reveal-line-seats { font-size: 0.95rem; opacity: 0.85; }

/* ---------- Cierre emocional ---------- */
.screen-closing {
  background: radial-gradient(ellipse at center, #17100b, #080503 80%);
}
.closing-stack { max-width: 24rem; }
.closing-stack p {
  font-size: 1.15rem;
}
.closing-gap { margin-top: 1.8rem; }
.closing-signature {
  margin-top: 2rem;
  font-style: italic;
  color: var(--gold);
  opacity: 0.9;
}
.closing-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* ---------- Dev tools ---------- */
.dev-tools {
  position: fixed;
  bottom: calc(0.5rem + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  display: flex;
  gap: 0.3rem;
  background: rgba(0,0,0,0.75);
  padding: 0.4rem 0.5rem;
  border-radius: 10px;
  align-items: center;
}
.dev-tools span { color: #999; font-size: 0.7rem; margin-right: 0.3rem; }
.dev-tools button {
  min-width: 30px;
  min-height: 30px;
  border-radius: 6px;
  border: 1px solid #555;
  background: #222;
  color: #fff;
  font-size: 0.75rem;
  cursor: pointer;
}
#dev-reset { background: #5a1a1a; }

.rotate-hint {
  position: fixed;
  bottom: calc(1rem + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  background: rgba(0,0,0,0.7);
  color: var(--gold-bright);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.8rem;
}

/* ---------- Accesibilidad ---------- */
@media (prefers-reduced-motion: reduce) {
  [data-line], .reveal-stagger .btn-primary, .reveal-stagger .closing-actions,
  .narrative-line, .reveal-line, .footprint, .seal-progress-bar,
  .ink-burst, .crack-light {
    animation: none !important;
    transition: opacity 0.3s ease !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .footprint-target.appearing .footprint-svg path,
  .footprint-target.tapped .footprint-svg path {
    animation: none !important;
  }
  .footprint-target { transition: opacity 0.3s ease !important; }
  .footprint-target.visible { transform: translate(-50%, -50%) scale(1) !important; }
  /* La cuenta regresiva y el remolino mantienen su timing (JS sigue
     corriendo el mismo ritmo con audio) -- solo se quita el giro/escalado,
     no el suspenso ("no quitar completamente el suspenso"). */
  .vfx-swirl { animation: none !important; transform: translate(-50%, -50%) !important; }
  .vfx-starburst { animation: none !important; transition: opacity 0.3s ease !important; }
  .vfx-starburst.flash { opacity: 0.85 !important; }
  .countdown {
    transition: opacity 0.3s ease !important;
    transform: none !important;
  }
  .countdown.show {
    animation: none !important;
    opacity: 1 !important;
  }
  .flyer-wrap {
    transition: opacity 0.3s ease !important;
    transform: none !important;
  }
}

/* ---------- Viewports objetivo ---------- */
@media (max-width: 400px) {
  .title-glow { font-size: 1.35rem; }
  .parchment-card { padding: 1.5rem 1.1rem; }
}

@media (orientation: landscape) and (max-height: 500px) {
  .rotate-hint.show { display: block; }
}
