/* =====================================================================
   Nuestro adviento · estilos
   ===================================================================== */

:root {
  --burdeos: #6e1f2c;
  --burdeos-2: #571824;
  --burdeos-osc: #3a0f17;
  --vino: #0a1530;
  --verde: #1e3a2d;
  --verde-2: #284a39;
  --azul: #1f3f78;
  --azul-2: #2b5596;
  --azul-noche: #1a3263;
  --azul-hielo: #dfe8f4;
  --azul-claro: #9fc2ec;
  --crema: #f5ecdb;
  --papel: #fbf5ea;
  --papel-2: #f1e6d0;
  --dorado: #c8a35a;
  --dorado-claro: #e6cf98;
  --dorado-osc: #9c7a38;
  --tinta: #2c1a16;
  --tinta-suave: #6b564c;

  --serif: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --sans: 'Mulish', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --script: 'Pinyon Script', 'Cormorant Garamond', cursive;

  --gap: 8px;
  --lado: 16px;
  --ancho: min(100vw, 560px);
  --celda: calc((var(--ancho) - 2 * var(--lado) - 3 * var(--gap)) / 4);
  --radio: 12px;

  --ruido: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .35  0 0 0 0 .25  0 0 0 0 .15  0 0 0 .5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");

  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--sans);
  color: var(--crema);
  background-color: var(--vino);
  background-image:
    var(--ruido),
    radial-gradient(120% 60% at 50% -10%, #2b5596 0%, transparent 60%),
    radial-gradient(90% 50% at 100% 100%, rgba(31, 63, 120, .7) 0%, transparent 70%),
    radial-gradient(80% 50% at 0% 70%, rgba(110, 31, 44, .28) 0%, transparent 70%),
    linear-gradient(180deg, #132a55, var(--vino));
  background-attachment: fixed;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
  overflow-x: clip;
}

button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

#nieve {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ---------- Estructura ---------- */
.pagina {
  position: relative;
  z-index: 1;
  width: var(--ancho);
  margin: 0 auto;
  padding:
    calc(env(safe-area-inset-top) + 28px)
    calc(var(--lado) + env(safe-area-inset-right))
    calc(env(safe-area-inset-bottom) + 32px)
    calc(var(--lado) + env(safe-area-inset-left));
}

/* ---------- Cabecera ---------- */
.cabecera { text-align: center; margin-bottom: 26px; }
.cabecera__pre {
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--dorado-claro);
  opacity: .85;
}
.cabecera__titulo {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-style: italic;
  font-size: clamp(38px, 11.5vw, 58px);
  line-height: .98;
  letter-spacing: -.01em;
  color: var(--papel);
}
.cabecera__para {
  margin: 4px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--dorado-claro);
}
.cabecera__nombre {
  font-family: var(--script);
  font-style: normal;
  font-size: 44px;
  line-height: 1;
  color: var(--dorado);
  margin-left: 4px;
  vertical-align: -6px;
  text-shadow: 0 1px 0 rgba(0,0,0,.25);
}
.adorno { color: var(--dorado); width: 120px; margin: 12px auto 10px; opacity: .8; }

/* Guirnalda de bombillas (guiño a la iluminación) */
.guirnalda {
  display: block;
  width: calc(100% + 2 * var(--lado));
  max-width: 640px;
  margin: -14px calc(-1 * var(--lado)) 6px;
  overflow: visible;
}
.guirnalda__cable { fill: none; stroke: rgba(230, 207, 152, .4); stroke-width: 1.2; }
.bombilla { transform-box: fill-box; transform-origin: 50% 0; }
.bombilla__casquillo { fill: #3b4660; }
.bombilla__luz {
  fill: var(--c);
  filter: drop-shadow(0 0 5px var(--c)) drop-shadow(0 0 12px var(--c));
  animation: parpadeo var(--t, 3s) ease-in-out var(--d, 0s) infinite;
}
@keyframes parpadeo {
  0%, 100% { opacity: 1; }
  45% { opacity: .95; }
  50% { opacity: .35; filter: none; }
  58% { opacity: 1; }
}
@media (min-width: 1000px) { .guirnalda { width: 100%; margin: 0 0 18px; } }
.adorno svg { display: block; width: 100%; }
.cabecera__estado {
  margin: 0;
  min-height: 1.4em;
  font-size: 13.5px;
  color: var(--crema);
  opacity: .9;
}
.cabecera__estado strong {
  font-variant-numeric: tabular-nums;
  color: var(--dorado-claro);
  font-weight: 700;
}

/* ---------- Rejilla irregular ---------- */
.rejilla {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: var(--celda);
  gap: var(--gap);
}

.casilla {
  --fondo: var(--burdeos);
  --texto: var(--papel);
  --filo: rgba(230, 207, 152, .55);
  position: relative;
  display: block;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: var(--radio);
  background-color: var(--fondo);
  background-image: var(--ruido), linear-gradient(155deg, rgba(255,255,255,.08), rgba(0,0,0,.12));
  color: var(--texto);
  cursor: pointer;
  overflow: hidden;
  text-align: left;
  box-shadow:
    0 1px 0 rgba(255,255,255,.08) inset,
    0 10px 22px -12px rgba(0,0,0,.65),
    0 2px 4px rgba(0,0,0,.25);
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s, filter .25s;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  animation: entrada .6s cubic-bezier(.2,.8,.2,1) both;
  animation-delay: calc(var(--i, 0) * 28ms);
}
@keyframes entrada {
  from { opacity: 0; transform: translateY(10px) scale(.97); }
  to   { opacity: 1; transform: none; }
}
/* filo dorado interior */
.casilla::before {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1px solid var(--filo);
  border-radius: calc(var(--radio) - 5px);
  pointer-events: none;
}
.casilla:active { transform: scale(.97); }
@media (hover: hover) {
  .casilla:hover { transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 16px 28px -14px rgba(0,0,0,.7), 0 2px 4px rgba(0,0,0,.25); }
}
.casilla:focus-visible { outline: 2px solid var(--dorado-claro); outline-offset: 3px; }

/* variantes de color */
.casilla--burdeos { --fondo: var(--burdeos); }
.casilla--verde   { --fondo: var(--verde-2); }
.casilla--crema   { --fondo: var(--papel-2); --texto: var(--azul); --filo: rgba(156, 122, 56, .5); }
.casilla--vino    { --fondo: #4c1420; }
.casilla--azul    { --fondo: var(--azul-2); }
.casilla--noche   { --fondo: var(--azul-noche); }
.casilla--hielo   { --fondo: var(--azul-hielo); --texto: var(--azul); --filo: rgba(31, 63, 120, .35); }
.casilla--oro     { --fondo: #b8924c; --texto: var(--vino); --filo: rgba(58, 15, 23, .35);
                    background-image: var(--ruido), linear-gradient(150deg, #e2c487 0%, #b8924c 55%, #9c7a38 100%); }
.casilla--rayas   { --fondo: var(--papel-2); --texto: var(--azul); --filo: rgba(31, 63, 120, .35);
                    background-image: var(--ruido), repeating-linear-gradient(135deg, transparent 0 14px, rgba(31, 63, 120, .1) 14px 18px); }

.casilla__num {
  position: absolute;
  left: 13px; top: 9px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: calc(var(--celda) * .42);
  line-height: 1;
  font-variant-numeric: lining-nums;
}
.casilla--g .casilla__num { font-size: calc(var(--celda) * .9); left: 16px; top: 10px; font-style: italic; }
.casilla--a .casilla__num { font-size: calc(var(--celda) * .56); }
.casilla--h .casilla__num { font-size: calc(var(--celda) * .5); }

.casilla__deco {
  position: absolute;
  right: 10px; bottom: 9px;
  width: 30%;
  max-width: 64px;
  opacity: .75;
  color: currentColor;
  pointer-events: none;
}
.casilla--g .casilla__deco { width: 34%; max-width: 92px; right: 14px; bottom: 14px; }
.casilla__deco svg { display: block; width: 100%; height: auto; }

.casilla__estado {
  position: absolute;
  right: 9px; top: 9px;
  display: grid; place-items: center;
  width: 20px; height: 20px;
  opacity: .8;
}
.casilla__estado svg { width: 13px; height: 13px; }

.casilla__cuenta {
  position: absolute;
  left: 13px; bottom: 9px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
  opacity: .9;
}

.casilla__icono {
  position: absolute;
  right: 10px; bottom: 6px;
  font-size: calc(var(--celda) * .32);
  line-height: 1;
}
.casilla--g .casilla__icono { font-size: calc(var(--celda) * .55); right: 16px; bottom: 12px; }

/* estados */
.casilla.is-bloqueada .casilla__deco { opacity: .45; }
.casilla.is-hoy .casilla__deco { bottom: auto; top: 12px; right: 12px; width: 22%; }
.casilla.is-bloqueada { filter: saturate(.85); }

.casilla.is-hoy {
  box-shadow:
    0 0 0 2px var(--dorado),
    0 0 26px 2px rgba(230, 207, 152, .35),
    0 10px 22px -12px rgba(0,0,0,.65);
  animation: entrada .6s cubic-bezier(.2,.8,.2,1) both, latido 2.4s ease-in-out 1s infinite;
}
@keyframes latido {
  0%, 100% { box-shadow: 0 0 0 2px var(--dorado), 0 0 18px 0 rgba(230,207,152,.25), 0 10px 22px -12px rgba(0,0,0,.65); }
  50%      { box-shadow: 0 0 0 2px var(--dorado-claro), 0 0 34px 6px rgba(230,207,152,.45), 0 10px 22px -12px rgba(0,0,0,.65); }
}
.casilla__etiqueta {
  position: absolute;
  left: 50%; bottom: 8px;
  transform: translateX(-50%);
  padding: 3px 9px 4px;
  border-radius: 999px;
  background: var(--dorado);
  color: var(--vino);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.casilla--oro .casilla__etiqueta { background: var(--vino); color: var(--dorado-claro); }

.casilla.is-pendiente .casilla__punto {
  position: absolute; right: 11px; top: 11px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--dorado-claro);
  box-shadow: 0 0 0 3px rgba(230,207,152,.25);
}

/* abierta: la "tapa" se ve entreabierta */
.casilla.is-abierta::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(0,0,0,.0) 60%, rgba(0,0,0,.18) 61%, rgba(0,0,0,0) 75%);
  pointer-events: none;
}
.casilla.is-abierta .casilla__num { opacity: .9; }

.casilla.tiembla { animation: tiembla .45s ease; }
@keyframes tiembla {
  0%,100% { transform: none; }
  20% { transform: translateX(-4px) rotate(-1deg); }
  40% { transform: translateX(4px) rotate(1deg); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}

/* tras la entrada inicial, sin repetir la animación al cambiar de estado */
.casilla.lista { animation: none; }
.casilla.lista.is-hoy { animation: latido 2.4s ease-in-out infinite; }
.casilla.lista.tiembla { animation: tiembla .45s ease; }

/* ---------- Pie ---------- */
.pie {
  margin-top: 30px;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  color: var(--dorado-claro);
  opacity: .9;
}
.pie p { margin: 0 0 14px; }
.pie__instalar {
  padding: 10px 18px;
  border: 1px solid rgba(230,207,152,.5);
  border-radius: 999px;
  background: rgba(0,0,0,.15);
  font-family: var(--sans);
  font-style: normal;
  font-size: 13px;
  color: var(--crema);
  cursor: pointer;
}

/* ---------- Aviso flotante ---------- */
.aviso {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 22px);
  z-index: 60;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--papel);
  color: var(--tinta);
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
  box-shadow: 0 14px 34px -10px rgba(0,0,0,.6);
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s cubic-bezier(.2,.8,.2,1);
}
.aviso.visible { opacity: 1; transform: translate(-50%, 0); }
.aviso strong { color: var(--azul); font-variant-numeric: tabular-nums; }

.banda-preview {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom) + 8px);
  left: 8px;
  opacity: .85;
  pointer-events: none;
  z-index: 70;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f0d36b;
  color: #2a1a00;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  box-shadow: 0 4px 12px rgba(0,0,0,.35);
}

/* =====================================================================
   Animación de apertura
   ===================================================================== */
.apertura {
  position: fixed; inset: 0;
  z-index: 40;
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 55%, rgba(31,63,120,.5), rgba(5,10,25,.92));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fundido .35s ease both;
}
.apertura.saliendo { animation: fundidoFuera .45s ease both; }
@keyframes fundido { from { opacity: 0; } to { opacity: 1; } }
@keyframes fundidoFuera { from { opacity: 1; } to { opacity: 0; } }

.apertura__caja {
  position: relative;
  width: min(62vw, 240px);
  aspect-ratio: 1;
  perspective: 900px;
  animation: caer .55s cubic-bezier(.2,1.3,.4,1) both;
}
@keyframes caer { from { transform: translateY(-30px) scale(.8); opacity: 0; } to { transform: none; opacity: 1; } }

.apertura__interior {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  border-radius: 16px;
  background: radial-gradient(circle, #fff6dc 0%, #e6cf98 45%, #9c7a38 100%);
  box-shadow: inset 0 0 40px rgba(90,50,10,.45);
  font-size: 64px;
}
.apertura__interior span { transform: scale(.2); opacity: 0; }
.apertura.abriendo .apertura__interior span { animation: brota .7s .95s cubic-bezier(.2,1.5,.4,1) both; }
@keyframes brota { to { transform: scale(1); opacity: 1; } }

.apertura__puerta {
  position: absolute; top: 0; bottom: 0; width: 50%;
  background-color: var(--azul);
  background-image: var(--ruido), linear-gradient(160deg, rgba(255,255,255,.1), rgba(0,0,0,.2));
  box-shadow: inset 0 0 0 1px rgba(230,207,152,.4);
  backface-visibility: hidden;
  transition: transform .85s cubic-bezier(.6,.05,.25,1);
}
.apertura__puerta--izq { left: 0; border-radius: 16px 0 0 16px; transform-origin: left center; }
.apertura__puerta--der { right: 0; border-radius: 0 16px 16px 0; transform-origin: right center; }
.apertura.abriendo .apertura__puerta { transition-delay: .55s; }
.apertura.abriendo .apertura__puerta--izq { transform: rotateY(-112deg); }
.apertura.abriendo .apertura__puerta--der { transform: rotateY(112deg); }

.apertura__lazo { position: absolute; background: linear-gradient(90deg, var(--dorado-osc), var(--dorado-claro), var(--dorado-osc)); transition: opacity .35s .3s, transform .5s .15s; }
.apertura__lazo--v { left: calc(50% - 9px); width: 18px; top: 0; bottom: 0; }
.apertura__lazo--h { top: calc(50% - 9px); height: 18px; left: 0; right: 0; background: linear-gradient(180deg, var(--dorado-osc), var(--dorado-claro), var(--dorado-osc)); }
.apertura__nudo {
  position: absolute; left: 50%; top: 50%;
  width: 44px; height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--dorado-claro), var(--dorado-osc));
  box-shadow: 0 3px 10px rgba(0,0,0,.35);
  transition: transform .45s .1s cubic-bezier(.5,-0.4,.5,1), opacity .3s .3s;
}
.apertura.abriendo .apertura__lazo--v { transform: scaleY(0); opacity: 0; }
.apertura.abriendo .apertura__lazo--h { transform: scaleX(0); opacity: 0; }
.apertura.abriendo .apertura__nudo { transform: scale(1.4) rotate(90deg); opacity: 0; }

.apertura__num {
  position: absolute; left: 0; right: 0; bottom: -62px;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 34px;
  color: var(--dorado-claro);
}

.chispa {
  position: fixed;
  z-index: 45;
  width: 8px; height: 8px;
  pointer-events: none;
  border-radius: 50%;
  background: var(--dorado-claro);
  box-shadow: 0 0 8px 2px rgba(230,207,152,.7);
  animation: chispa 1s cubic-bezier(.1,.7,.3,1) forwards;
}
.chispa--estrella { border-radius: 0; clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); width: 14px; height: 14px; }
@keyframes chispa {
  from { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  to   { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(.2) rotate(180deg); opacity: 0; }
}

/* =====================================================================
   Hoja (contenido del día)
   ===================================================================== */
.modal {
  position: fixed; inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.modal[hidden] { display: none; }
.modal__fondo {
  position: absolute; inset: 0;
  background: rgba(5, 10, 25, .62);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: fundido .3s ease both;
}
.modal.cerrando .modal__fondo { animation: fundidoFuera .28s ease both; }

.hoja {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 600px;
  height: calc(100dvh - env(safe-area-inset-top) - 18px);
  max-height: calc(100vh - 18px);
  border-radius: 22px 22px 0 0;
  background-color: var(--papel);
  background-image: var(--ruido), linear-gradient(180deg, #fffaf0, var(--papel) 30%);
  color: var(--tinta);
  box-shadow: 0 -20px 50px -20px rgba(0,0,0,.6);
  outline: none;
  animation: sube .5s cubic-bezier(.2,.9,.25,1) both;
}
.modal.cerrando .hoja { animation: baja .3s ease-in both; }
@keyframes sube { from { transform: translateY(100%); } to { transform: none; } }
@keyframes baja { to { transform: translateY(100%); } }
.modal.rapido .hoja { animation-duration: .38s; }

.hoja__asa {
  width: 40px; height: 4px;
  margin: 9px auto 0;
  border-radius: 4px;
  background: rgba(44, 26, 22, .18);
  flex: none;
}
.hoja__cerrar {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 2;
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(31, 63, 120, .08);
  color: var(--azul);
  cursor: pointer;
}
.hoja__cerrar svg { width: 20px; height: 20px; }

.hoja__scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 18px 22px 30px;
}
.hoja__cabecera { text-align: center; padding: 10px 26px 4px; }
.hoja__fecha {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--dorado-osc);
}
.hoja__titulo {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-weight: 600;
  font-style: italic;
  font-size: clamp(30px, 8.5vw, 40px);
  line-height: 1.05;
  color: var(--azul);
}
.hoja__subtitulo {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-size: 18px;
  color: var(--tinta-suave);
}
.hoja__subtitulo:empty { display: none; }

.hoja__cuerpo { margin-top: 22px; }
.hoja__cuerpo > * + * { margin-top: 22px; }

.hoja__nav {
  flex: none;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px calc(env(safe-area-inset-bottom) + 10px);
  border-top: 1px solid rgba(156, 122, 56, .22);
}
.hoja__nav[hidden] { display: block; height: env(safe-area-inset-bottom); padding: 0; border: 0; }
.hoja__nav[hidden] button { display: none; }
.hoja__nav button {
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--azul);
  font-family: var(--serif);
  font-size: 18px;
  font-style: italic;
  cursor: pointer;
}
.hoja__nav button:disabled { visibility: hidden; }

/* ---------- Bloques de contenido ---------- */
.b-texto p, .b-carta p { margin: 0 0 1em; }
.b-texto p:last-child, .b-carta p:last-child { margin-bottom: 0; }
.b-texto {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.5;
}

.b-carta {
  position: relative;
  padding: 26px 22px 24px;
  border-radius: 6px;
  background-color: #fffdf6;
  background-image:
    var(--ruido),
    repeating-linear-gradient(180deg, transparent 0 31px, rgba(31, 63, 120, .08) 31px 32px);
  box-shadow: 0 1px 2px rgba(44,26,22,.08), 0 12px 26px -16px rgba(44,26,22,.4);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.6;
  transform: rotate(-.4deg);
}
.b-carta::before {
  content: '';
  position: absolute;
  top: -9px; left: 50%;
  width: 84px; height: 20px;
  margin-left: -42px;
  background: rgba(200, 163, 90, .4);
  transform: rotate(-2deg);
}
.b-carta__saludo {
  margin: 0 0 .6em !important;
  font-family: var(--script);
  font-size: 34px;
  line-height: 1.1;
  color: var(--azul);
}
.b-carta__firma {
  margin: 1em 0 0 !important;
  text-align: right;
  font-family: var(--script);
  font-size: 32px;
  line-height: 1.1;
  color: var(--azul);
}
.b-texto em, .b-carta em { color: var(--azul); }

.b-foto { margin: 0; }
.b-foto img, .marco {
  display: block;
  width: 100%;
  border-radius: 4px;
  background: #fff;
  padding: 8px 8px 8px;
  box-shadow: 0 2px 3px rgba(44,26,22,.1), 0 16px 30px -18px rgba(44,26,22,.55);
}
.b-foto figcaption, .b-galeria figcaption {
  margin-top: 10px;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  color: var(--tinta-suave);
}
.marco {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  background:
    linear-gradient(#fff, #fff) padding-box;
  color: var(--dorado-osc);
  text-align: center;
}
.marco__dentro {
  display: grid; place-items: center; gap: 8px;
  width: 100%; height: 100%;
  border: 1px dashed rgba(156,122,56,.45);
  background: repeating-linear-gradient(135deg, var(--papel) 0 10px, #f6ecd8 10px 20px);
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
}
.marco svg { width: 34px; height: 34px; }

.b-galeria {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  margin-left: -22px; margin-right: -22px;
  padding: 4px 22px 10px;
  scrollbar-width: none;
}
.b-galeria::-webkit-scrollbar { display: none; }
.b-galeria figure {
  flex: 0 0 82%;
  margin: 0;
  scroll-snap-align: center;
}
.b-galeria figure:nth-child(odd) { transform: rotate(-.8deg); }
.b-galeria figure:nth-child(even) { transform: rotate(.8deg); }
.b-galeria img {
  display: block; width: 100%;
  aspect-ratio: 4/5; object-fit: cover;
  padding: 8px; background: #fff; border-radius: 4px;
  box-shadow: 0 14px 26px -16px rgba(44,26,22,.55);
}
.b-galeria__pista { margin-top: -10px !important; text-align: center; font-size: 12px; color: var(--tinta-suave); letter-spacing: .08em; }

.b-audio, .b-enlace, .b-contador, .b-revelar, .b-vale, .b-cancion, .b-video {
  border-radius: 14px;
}
.b-audio {
  padding: 16px;
  background: rgba(31, 63, 120, .06);
  border: 1px solid rgba(31, 63, 120, .14);
}
.b-audio__titulo { margin: 0 0 10px; font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--azul); }
.b-audio audio, .b-video video { display: block; width: 100%; }
.b-video video { border-radius: 10px; background: #000; }
.b-cancion iframe { display: block; width: 100%; border: 0; border-radius: 12px; }

.b-enlace {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px;
  padding: 14px 20px;
  background: var(--azul);
  color: var(--papel);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: .02em;
  box-shadow: 0 10px 20px -12px rgba(110,31,44,.8);
}

.b-contador {
  padding: 20px 14px;
  background: var(--azul-noche);
  background-image: var(--ruido), radial-gradient(circle at 50% 0%, rgba(230,207,152,.18), transparent 70%);
  color: var(--crema);
  text-align: center;
}
.b-contador__titulo { margin: 0 0 14px; font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--dorado-claro); }
.b-contador__cifras { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.b-contador__cifra strong {
  display: block;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(28px, 9vw, 38px);
  line-height: 1;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--papel);
}
.b-contador__cifra span { display: block; margin-top: 6px; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; opacity: .75; }
.b-contador__pie { margin: 14px 0 0; font-size: 13px; opacity: .8; }

.b-vale {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  padding: 20px 22px;
  background: linear-gradient(135deg, #f3dca5, #d9b56d);
  color: var(--vino);
  border: 0;
  overflow: hidden;
  box-shadow: 0 14px 26px -16px rgba(90,60,10,.7);
}
.b-vale::before, .b-vale::after {
  content: '';
  position: absolute; top: 50%;
  width: 22px; height: 22px;
  margin-top: -11px;
  border-radius: 50%;
  background: var(--papel);
}
.b-vale::before { left: -11px; }
.b-vale::after { right: -11px; }
.b-vale__marco { position: absolute; inset: 7px; border: 1.5px dashed rgba(10,21,48,.35); border-radius: 9px; pointer-events: none; }
.b-vale__pre { margin: 0; font-size: 10.5px; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; opacity: .7; }
.b-vale__titulo { margin: 6px 0 0; font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 26px; line-height: 1.1; }
.b-vale__texto { margin: 8px 0 0; font-size: 14.5px; line-height: 1.45; }
.b-vale__btn {
  justify-self: start;
  margin-top: 14px;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--vino);
  color: var(--dorado-claro);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .06em;
  cursor: pointer;
}
.b-vale.canjeado .b-vale__btn { background: transparent; color: var(--vino); border: 1.5px solid rgba(10,21,48,.4); cursor: default; }
.b-vale__sello {
  position: absolute; right: 18px; top: 18px;
  padding: 4px 10px;
  border: 2px solid var(--azul);
  border-radius: 6px;
  color: var(--azul);
  font-weight: 800; font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  transform: rotate(8deg);
  opacity: 0;
}
.b-vale.canjeado .b-vale__sello { opacity: .85; animation: sello .4s cubic-bezier(.2,1.6,.4,1); }
@keyframes sello { from { transform: rotate(8deg) scale(2); opacity: 0; } to { transform: rotate(8deg) scale(1); opacity: .85; } }

.b-revelar {
  padding: 18px;
  background: rgba(30, 58, 45, .07);
  border: 1px solid rgba(30, 58, 45, .15);
  text-align: center;
}
.b-revelar__pregunta { margin: 0 0 12px; font-family: var(--serif); font-size: 21px; line-height: 1.3; color: var(--azul); }
.b-revelar__respuesta {
  position: relative;
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 14px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  color: var(--tinta);
  font-family: var(--serif);
  font-size: 20px;
  cursor: pointer;
}
.b-revelar__respuesta span { filter: blur(9px); transition: filter .6s; }
.b-revelar__respuesta::after {
  content: 'Toca para descubrirlo';
  position: absolute; inset: 0;
  display: grid; place-items: center;
  border-radius: 10px;
  background: repeating-linear-gradient(135deg, #e6cf98 0 8px, #d8bb7a 8px 16px);
  color: var(--vino);
  font-family: var(--sans);
  font-size: 13px; font-weight: 700; letter-spacing: .06em;
  transition: opacity .5s;
}
.b-revelar__respuesta.visto span { filter: none; }
.b-revelar__respuesta.visto::after { opacity: 0; pointer-events: none; }

.b-cita {
  margin: 0;
  padding: 6px 10px;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 23px;
  line-height: 1.35;
  color: var(--azul);
}
.b-cita::before { content: '“'; display: block; font-size: 60px; line-height: .6; color: var(--dorado); }
.b-cita footer { margin-top: 10px; font-family: var(--sans); font-style: normal; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--tinta-suave); }

.b-separador { width: 110px; margin-left: auto; margin-right: auto; color: var(--dorado); opacity: .8; }
.b-separador svg { display: block; width: 100%; }

/* Día sin contenido todavía */
.envolviendo { padding: 10px 4px 20px; text-align: center; }
.envolviendo svg { width: 150px; height: auto; margin: 6px auto 16px; display: block; }
.envolviendo h3 { margin: 0; font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 26px; color: var(--azul); }
.envolviendo p { margin: 10px auto 0; max-width: 30ch; font-family: var(--serif); font-size: 19px; line-height: 1.45; color: var(--tinta-suave); }
.envolviendo .lazo-gira { transform-origin: 75px 38px; animation: lazo 3s ease-in-out infinite; }
@keyframes lazo { 0%,100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }

/* =====================================================================
   Escritorio
   ===================================================================== */
@media (min-width: 640px) {
  :root { --ancho: 600px; --gap: 12px; --lado: 24px; --radio: 14px; }
  .modal { align-items: center; }
  .hoja {
    height: auto;
    max-height: min(88vh, 900px);
    border-radius: 20px;
    animation-name: aparece;
  }
  .modal.cerrando .hoja { animation-name: desaparece; }
  .hoja__asa { visibility: hidden; }
  @keyframes aparece { from { transform: translateY(24px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
  @keyframes desaparece { to { transform: translateY(16px) scale(.98); opacity: 0; } }
}

@media (min-width: 1000px) {
  :root { --ancho: 620px; --celda: calc((620px - 3 * var(--gap)) / 4); }
  .pagina {
    width: min(100vw, 1120px);
    display: grid;
    grid-template-columns: 1fr 620px;
    grid-template-rows: auto 1fr;
    column-gap: 56px;
    align-items: start;
  }
  .cabecera { position: sticky; top: 60px; grid-row: 1 / span 2; text-align: left; margin-top: 40px; }
  .adorno { margin-left: 0; }
  .rejilla { grid-column: 2; }
  .pie { grid-column: 2; }
  .cabecera__titulo { font-size: 76px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* =====================================================================
   Foco de escenario en la apertura (guiño a la iluminación)
   ===================================================================== */
.apertura__foco {
  position: absolute;
  left: 50%; top: 0;
  width: min(150vw, 900px);
  height: 78%;
  transform: translateX(-50%);
  clip-path: polygon(46% 0, 54% 0, 82% 100%, 18% 100%);
  background: linear-gradient(180deg, rgba(255, 248, 225, .55), rgba(200, 222, 255, .16) 70%, transparent);
  filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  animation: foco 1s ease-out .05s forwards;
}
.apertura__foco::after {
  content: '';
  position: absolute; left: 50%; top: -18px;
  width: 64px; height: 36px; margin-left: -32px;
  border-radius: 50%;
  background: radial-gradient(ellipse, #fff, rgba(255,248,225,0) 70%);
}
@keyframes foco {
  0% { opacity: 0; } 18% { opacity: .9; } 26% { opacity: .2; } 36% { opacity: 1; } 100% { opacity: 1; }
}
.apertura__caja { z-index: 1; }
.casilla--a .casilla__deco { max-width: 50px; }
/* sin barra de navegación: margen para la barra de inicio del iPhone */
.hoja:has(.hoja__nav[hidden]) .hoja__scroll { padding-bottom: calc(30px + env(safe-area-inset-bottom)); }

/* ---------- Contador destacado ---------- */
.b-contador {
  position: relative;
  padding: 26px 16px 22px;
  border: 1px solid rgba(230, 207, 152, .45);
  background-image:
    var(--ruido),
    radial-gradient(circle at 50% 30%, rgba(143, 195, 255, .28), transparent 60%),
    radial-gradient(circle at 50% 0%, rgba(230, 207, 152, .22), transparent 70%);
  box-shadow: 0 18px 36px -18px rgba(10, 21, 48, .8), inset 0 0 0 5px var(--azul-noche), inset 0 0 0 6px rgba(230, 207, 152, .3);
}
.b-contador__titulo {
  margin-bottom: 6px;
  font-size: 13px;
  font-family: var(--sans);
  font-style: normal;
  font-weight: 700;
  letter-spacing: .3em;
  text-transform: uppercase;
}
.b-contador__cifras { grid-template-columns: repeat(3, 1fr); row-gap: 14px; }
.b-contador__cifra--dias { grid-column: 1 / -1; }
.b-contador__cifra--dias strong {
  font-size: clamp(76px, 26vw, 112px);
  font-style: italic;
  line-height: .95;
  color: #fff8ea;
  text-shadow: 0 0 22px rgba(143, 195, 255, .55), 0 0 2px rgba(255, 255, 255, .6);
}
.b-contador__cifra--dias span { margin-top: 2px; font-size: 13px; letter-spacing: .4em; color: var(--dorado-claro); opacity: 1; }
.b-contador__cifra:not(.b-contador__cifra--dias) {
  padding: 10px 0 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .06);
}
.b-contador__cifra:not(.b-contador__cifra--dias) strong { font-size: clamp(30px, 9vw, 40px); }
.b-contador__pie { margin-top: 16px; font-family: var(--serif); font-style: italic; font-size: 16px; color: var(--dorado-claro); opacity: .95; }
/* la X siempre visible aunque pase contenido oscuro por debajo */
.hoja__cerrar { background: var(--papel); box-shadow: 0 2px 10px rgba(10, 21, 48, .18); }

/* Emojis estilo iPhone */
img.emoji {
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  margin: 0 .05em;
  vertical-align: -0.2em;
  padding: 0 !important;
  background: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}
.apertura__interior img.emoji { width: 1.1em; height: 1.1em; }

/* ---------- Contador: Torre Eiffel, banderas y primer viaje ---------- */
.b-contador { overflow: hidden; isolation: isolate; }
.b-contador > *:not(.torre) { position: relative; z-index: 1; }
.torre {
  position: absolute;
  right: 4%;
  top: 34px;
  z-index: 0;
  height: 190px;
  width: auto;
  color: var(--dorado);
  opacity: .42;
  filter: drop-shadow(0 0 6px rgba(230, 207, 152, .35));
}
.b-contador--torre .b-contador__cifra--dias strong { padding-right: 8%; }
.torre__brillos circle { opacity: 0; animation: destello 2.8s ease-in-out infinite; }
.torre__brillos circle:nth-child(2n) { animation-delay: .7s; }
.torre__brillos circle:nth-child(3n) { animation-delay: 1.4s; }
.torre__brillos circle:nth-child(5n) { animation-delay: 2.1s; }
@keyframes destello { 0%, 100% { opacity: 0; transform: scale(.4); } 10% { opacity: 1; transform: scale(1.4); } 22% { opacity: 0; } }
.torre__brillos circle { transform-box: fill-box; transform-origin: center; }

.b-contador__banderas {
  margin: 2px 0 0;
  font-size: 22px;
  letter-spacing: .12em;
}
.b-contador__banderas img.emoji:nth-child(2) { animation: latir 1.6s ease-in-out infinite; }
@keyframes latir { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.22); } 30% { transform: scale(1); } 45% { transform: scale(1.14); } }

.b-contador__lugar {
  margin: 4px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: #fff8ea;
}

.viaje {
  margin: 18px 4px 2px;
  padding: 14px 14px 12px;
  border-radius: 12px;
  background: var(--papel);
  background-image: var(--ruido);
  color: var(--azul);
  box-shadow: 0 8px 18px -10px rgba(0,0,0,.6);
}
.viaje__titulo { margin: 0; font-size: 11.5px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--dorado-osc); }
.viaje__ruta { display: flex; align-items: flex-end; gap: 8px; margin-top: 10px; }
.viaje__parada {
  flex: none;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  line-height: 1.1;
}
.viaje__parada img.emoji { width: 30px; height: 30px; margin: 0; }
.viaje__carretera {
  position: relative;
  flex: 1;
  height: 44px;
  border-bottom: 2px dashed rgba(31, 63, 120, .35);
  margin-bottom: 8px;
}
.viaje__coche {
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 74px;
  animation: conducir 7s cubic-bezier(.45,.05,.4,1) infinite;
}
.viaje__coche svg { display: block; width: 100%; height: auto; filter: drop-shadow(0 3px 2px rgba(10,21,48,.3)); }
@keyframes conducir {
  0% { left: 0; opacity: 0; }
  6% { opacity: 1; }
  80% { left: calc(100% - 74px); opacity: 1; }
  92%, 100% { left: calc(100% - 74px); opacity: 0; }
}
.rueda { animation: girar .5s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
.viaje__pie { margin: 8px 0 0; font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--azul); }
.viaje__extras { margin: 6px 0 0; font-size: 18px; letter-spacing: .2em; }

/* ---------- Cuenta atrás grande de la cabecera ---------- */
.cabecera__estado { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 14px; }
.estado__texto { display: block; }
.estado__texto--sub { margin-top: 4px; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--dorado-claro); opacity: .9; }
.reloj {
  display: inline-flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 8px;
}
.reloj__caja {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 70px;
  padding: 10px 8px 8px;
  border: 1px solid rgba(230, 207, 152, .45);
  border-radius: 14px;
  background: rgba(10, 21, 48, .45);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 10px 22px -14px rgba(0,0,0,.7);
}
.reloj__caja strong {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(38px, 12vw, 52px);
  line-height: 1;
  font-variant-numeric: tabular-nums lining-nums;
  color: #fff8ea;
  text-shadow: 0 0 18px rgba(143, 195, 255, .5);
}
.reloj__caja small {
  margin-top: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--dorado-claro);
}
.reloj__sep {
  align-self: center;
  margin-top: -14px;
  font-family: var(--serif);
  font-size: 34px;
  color: var(--dorado);
  animation: parpadeoSep 1s steps(1) infinite;
}
@keyframes parpadeoSep { 50% { opacity: .25; } }
@media (max-width: 360px) { .reloj { gap: 3px; } .reloj__caja { min-width: 58px; padding: 8px 5px 6px; } }
@media (min-width: 1000px) { .cabecera__estado { align-items: flex-start; } }

/* ---------- Foto para rascar ---------- */
.b-rascar { margin: 0; }
.rascar__zona {
  position: relative;
  padding: 8px;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 2px 3px rgba(44,26,22,.1), 0 16px 30px -18px rgba(44,26,22,.55);
}
.rascar__zona > img { display: block; width: 100%; border-radius: 2px; }
.rascar__capa {
  position: absolute;
  inset: 8px;
  width: calc(100% - 16px);
  height: calc(100% - 16px);
  border-radius: 2px;
  touch-action: none;
  cursor: grab;
  transition: opacity .6s ease;
  background: linear-gradient(135deg, #f3dfa8, #c8a35a 45%, #e6cf98 70%, #9c7a38);
}
.rascar__capa.pintada { background: none; }
.rascar__capa.fuera { opacity: 0; pointer-events: none; }
.b-rascar figcaption {
  margin-top: 10px;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  color: var(--tinta-suave);
  opacity: 0;
  transition: opacity .8s ease .2s;
}
.b-rascar figcaption.visible { opacity: 1; }

/* ---------- Chat estilo WhatsApp ---------- */
.b-chat {
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 14px 30px -18px rgba(10, 21, 48, .6);
  font-family: var(--sans);
}
.chat__barra {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: var(--azul-noche);
  color: #fff;
}
.chat__avatar {
  display: grid; place-items: center;
  width: 36px; height: 36px; flex: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--dorado-claro), var(--dorado-osc));
  color: var(--vino);
  font-family: var(--serif); font-weight: 700; font-size: 19px;
}
.chat__quien { display: flex; flex-direction: column; line-height: 1.2; }
.chat__quien strong { font-size: 15px; }
.chat__quien small { font-size: 11.5px; opacity: .75; }
.chat__fondo {
  position: relative;
  display: flex; flex-direction: column;
  min-height: 160px;
  padding: 12px 10px 14px;
  background-color: #ece5dd;
  background-image: var(--ruido), radial-gradient(rgba(31,63,120,.08) 1px, transparent 1.4px);
  background-size: auto, 14px 14px;
}
.chat__fecha {
  align-self: center;
  margin: 0 0 10px;
  padding: 4px 10px;
  border-radius: 8px;
  background: #fff8e6;
  color: #6b5a3c;
  font-size: 11.5px;
  box-shadow: 0 1px 1px rgba(0,0,0,.08);
}
.chat__mensajes { display: flex; flex-direction: column; gap: 5px; }
.chat__msg {
  position: relative;
  max-width: 82%;
  padding: 6px 9px 5px;
  border-radius: 10px;
  font-size: 15px;
  line-height: 1.35;
  color: #111b21;
  box-shadow: 0 1px 1px rgba(0,0,0,.12);
  word-wrap: break-word;
}
.chat__msg span { white-space: pre-wrap; }
.chat__msg time {
  float: right;
  margin: 6px 0 -2px 10px;
  font-size: 10.5px;
  color: #667781;
}
.chat__check { font-style: normal; color: #53bdeb; letter-spacing: -2px; }
.chat__msg--ella { align-self: flex-start; background: #fff; border-top-left-radius: 2px; }
.chat__msg--el { align-self: flex-end; background: #d9fdd3; border-top-right-radius: 2px; }
.chat__msg.entra { animation: burbuja .35s cubic-bezier(.2,1.3,.4,1) both; }
@keyframes burbuja { from { opacity: 0; transform: translateY(8px) scale(.92); } to { opacity: 1; transform: none; } }
.chat__escribiendo span { display: inline-flex; gap: 4px; padding: 4px 2px; }
.chat__escribiendo i {
  width: 7px; height: 7px; border-radius: 50%;
  background: #8696a0;
  animation: puntos 1s ease-in-out infinite;
}
.chat__escribiendo i:nth-child(2) { animation-delay: .15s; }
.chat__escribiendo i:nth-child(3) { animation-delay: .3s; }
@keyframes puntos { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
.chat__ver {
  align-self: center;
  margin-top: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--azul);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .02em;
  cursor: pointer;
  box-shadow: 0 8px 18px -10px rgba(31,63,120,.8);
}
.chat__captura { background: var(--papel); padding: 10px 14px 12px; }
.chat__captura summary { cursor: pointer; font-size: 13.5px; font-weight: 700; color: var(--azul); }
.chat__captura > img { display: block; width: 100%; margin-top: 10px; border-radius: 10px; box-shadow: 0 6px 16px -10px rgba(0,0,0,.5); }

/* Chat: avatar con foto, nota de sistema, citas y reacciones */
.chat__avatar { overflow: hidden; }
.chat__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chat__sistema { align-self: center; margin: 2px 0 6px; font-size: 12px; color: #667781; text-align: center; }
.chat__cita {
  display: block;
  margin: 0 0 4px;
  padding: 4px 8px;
  border-left: 3px solid rgba(255,255,255,.6);
  border-radius: 6px;
  background: rgba(0,0,0,.12);
  font-size: 12.5px;
  opacity: .9;
}
.chat__msg.con-reaccion { margin-bottom: 14px; }
.chat__reaccion {
  position: absolute;
  left: 8px; bottom: -15px;
  padding: 1px 5px;
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  font-weight: 400;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.chat__msg--el .chat__reaccion { left: auto; right: 8px; }

/* Variante Instagram */
.b-chat--ig .chat__barra { background: #fff; color: #000; border-bottom: 1px solid #efefef; }
.b-chat--ig .chat__avatar { width: 38px; height: 38px; background: linear-gradient(45deg, #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5); padding: 2px; }
.b-chat--ig .chat__avatar img { border-radius: 50%; border: 2px solid #fff; }
.b-chat--ig .chat__quien small { color: #737373; opacity: 1; }
.chat__iconos { margin-left: auto; display: flex; gap: 14px; }
.chat__iconos svg { width: 22px; height: 22px; }
.b-chat--ig .chat__fondo { background: #fff; background-image: none; padding: 14px 12px 16px; }
.b-chat--ig .chat__sistema { color: #737373; }
.b-chat--ig .chat__mensajes { gap: 3px; }
.b-chat--ig .chat__msg { padding: 8px 13px; border-radius: 20px; font-size: 15px; box-shadow: none; }
.b-chat--ig .chat__msg--ella { background: #efefef; color: #000; }
.b-chat--ig .chat__msg--el {
  color: #fff;
  background: linear-gradient(135deg, #a033ff 0%, #6a4df5 55%, #3d7cf8 100%);
}
.b-chat--ig .chat__msg--el .chat__cita { color: #fff; }
.b-chat--ig .chat__msg--ella .chat__cita { border-left-color: rgba(0,0,0,.25); background: rgba(0,0,0,.06); }
.b-chat--ig .chat__escribiendo { background: #efefef !important; }
.b-chat--ig .chat__ver { background: linear-gradient(135deg, #a033ff, #3d7cf8); }

/* Canción con título y nota */
.b-cancion__titulo {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--dorado-osc);
}
.b-cancion__nota {
  margin-top: 10px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  line-height: 1.5;
  color: var(--tinta);
}
.b-cancion__nota p { margin: 0 0 .6em; }
.b-cancion__nota p:last-child { margin-bottom: 0; }

/* ---------- Mapa de nuestros sitios ---------- */
.b-mapa { display: flex; flex-direction: column; gap: 12px; }
.mapa__lienzo {
  position: relative;
  height: 340px;
  border-radius: 16px;
  overflow: hidden;
  background: #e8eef6;
  box-shadow: 0 0 0 1px rgba(31,63,120,.15), 0 14px 30px -18px rgba(10,21,48,.6);
  z-index: 0;
}
.mapa__cargando { margin: 0; position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; text-align: center; font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--tinta-suave); }
.mapa__lienzo .leaflet-control-attribution { font-size: 9px; }
.mapa__todo {
  position: absolute; right: 10px; top: 10px; z-index: 500;
  padding: 7px 12px; border: 0; border-radius: 999px;
  background: #fff; color: var(--azul);
  font-size: 12px; font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  cursor: pointer;
}
.mapa__pin span {
  position: absolute; left: 50%; top: 50%;
  width: 26px; height: 26px; margin: -15px 0 0 -13px;
  background: linear-gradient(135deg, #e6cf98, #c8a35a 55%, #9c7a38);
  transform: rotate(-45deg);
  border-radius: 50% 50% 50% 0;
  box-shadow: 0 3px 8px rgba(10,21,48,.45), inset 0 0 0 2px #fff;
}
.mapa__pin span::after {
  content: '❤'; position: absolute; inset: 0; display: grid; place-items: center;
  transform: rotate(45deg); color: #fff; font-size: 12px; line-height: 1;
}
.mapa__pin.activo span { background: linear-gradient(135deg, #8fc3ff, #2b5596); transform: rotate(-45deg) scale(1.25); }
.mapa__lista { display: flex; flex-wrap: wrap; gap: 8px; }
.mapa__chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 38px; padding: 0 12px;
  border: 1px solid rgba(31,63,120,.25); border-radius: 999px;
  background: #fff; color: var(--azul);
  font-size: 13.5px; font-weight: 700;
  cursor: pointer;
}
.mapa__chip.activo { background: var(--azul); color: #fff; border-color: var(--azul); }
.mapa__nota {
  padding: 16px 18px;
  border-radius: 14px;
  background: #fffdf6;
  background-image: var(--ruido);
  box-shadow: 0 1px 2px rgba(44,26,22,.08), 0 12px 26px -16px rgba(44,26,22,.4);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.5;
  animation: fundido .35s ease both;
}
.mapa__nota p { margin: 0 0 .6em; }
.mapa__nota-titulo { font-style: italic; font-weight: 600; font-size: 22px; color: var(--azul); }
.mapa__nota-fecha { font-family: var(--sans); font-size: 11px !important; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--dorado-osc); }
.mapa__foto { display: block; width: 100%; margin-top: 8px; border-radius: 6px; }
.mapa__lienzo .leaflet-tile-pane { filter: saturate(.55) sepia(.12) brightness(1.04) contrast(.95); }

/* Mapa: grupos, favoritos y rutas */
.mapa__lista { display: block; }
.mapa__grupo { margin: 10px 0 6px; font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--dorado-osc); }
.mapa__chips { display: flex; flex-wrap: wrap; gap: 7px; }
.mapa__chip--fav { border-color: var(--dorado); background: #fff8e6; }
.mapa__chip--ruta { border-style: dashed; }
.mapa__pin--fav span { width: 32px; height: 32px; margin: -19px 0 0 -16px; background: linear-gradient(135deg, #8fc3ff, #2b5596); }
.mapa__pin--fav span::after { content: '★'; font-size: 14px; }

/* Cifras */
.b-cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(68px, 1fr)); gap: 8px; }
.b-cifras__item {
  display: flex; flex-direction: column; align-items: center;
  padding: 12px 6px 10px;
  border-radius: 14px;
  background: var(--azul-noche);
  background-image: var(--ruido);
  color: var(--crema);
  text-align: center;
}
.b-cifras__item strong { font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 32px; line-height: 1; color: #fff8ea; }
.b-cifras__item span { margin-top: 5px; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--dorado-claro); }
