:root {
  /* Tokens "de tarjeta": texto oscuro sobre vidrio claro (sin cambios) */
  --lilac: #c9b8e8;
  --lilac-deep: #9b7ec8;
  --rose: #f3c6d4;
  --cream: #faf6ff;
  --ink: #3d2f4f;
  --ink-soft: #6b5a7e;
  --white: #ffffff;
  --glow: rgba(155, 126, 200, 0.35);
  --radius: 1.25rem;

  /* Tokens "de fondo": texto claro directo sobre el lienzo oscuro */
  --void: #0a0714;
  --void-2: #150f26;
  --void-3: #1e1533;
  --text-hi: #f6f1fc;
  --text-lo: #b7a6d6;
  --accent-glow: #d9baff;
  --accent-glow-soft: rgba(217, 186, 255, 0.35);

  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-door: cubic-bezier(0.77, 0, 0.175, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

/* El atributo hidden pierde contra cualquier display: en una clase de autor
   (aqui .btn-primary, .carousel, etc) por reglas de cascada, no de
   especificidad. Sin esto, botones "hidden" quedan visibles desde el inicio. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-body);
  /* Por defecto oscuro: la mayoria del contenido vive dentro de tarjetas de
     vidrio claro. Los elementos que van directo sobre el fondo (h1, .lead,
     .eyebrow...) fuerzan su propio color claro mas abajo. */
  color: var(--ink);
  background: var(--void);
}

body { position: relative; overflow-x: hidden; }

.bg-void {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(ellipse 70% 55% at 18% 12%, rgba(155, 126, 200, 0.22), transparent 55%),
    radial-gradient(ellipse 60% 50% at 85% 8%, rgba(243, 198, 212, 0.14), transparent 55%),
    radial-gradient(ellipse 90% 70% at 50% 100%, rgba(90, 60, 130, 0.28), transparent 60%),
    linear-gradient(180deg, var(--void) 0%, var(--void-2) 55%, var(--void-3) 100%);
}

.bg-glow {
  position: fixed;
  z-index: -2;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  pointer-events: none;
  animation: glowDrift 22s ease-in-out infinite alternate;
}
.bg-glow-1 {
  width: 46vw;
  height: 46vw;
  left: -12vw;
  top: -10vw;
  background: radial-gradient(circle, rgba(155, 126, 200, 0.55), transparent 70%);
}
.bg-glow-2 {
  width: 38vw;
  height: 38vw;
  right: -10vw;
  bottom: 5vh;
  background: radial-gradient(circle, rgba(243, 198, 212, 0.35), transparent 70%);
  animation-duration: 26s;
  animation-direction: alternate-reverse;
}

.stars {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 20% 30%, rgba(217,186,255,.85), transparent),
    radial-gradient(1.5px 1.5px at 70% 20%, rgba(255,255,255,.7), transparent),
    radial-gradient(1px 1px at 40% 70%, rgba(217,186,255,.6), transparent),
    radial-gradient(1px 1px at 85% 65%, rgba(255,255,255,.85), transparent),
    radial-gradient(1px 1px at 15% 85%, rgba(255,255,255,.5), transparent),
    radial-gradient(1.5px 1.5px at 92% 40%, rgba(217,186,255,.7), transparent);
  animation: twinkle 6s ease-in-out infinite alternate;
}

@keyframes glowDrift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(3vw, 2vw) scale(1.12); }
}

@keyframes twinkle {
  from { opacity: 0.5; }
  to { opacity: 1; }
}

/* Cursor personalizado: un destello que deja una estela de polvo de
   estrellas (solo escritorio con puntero fino; ver cursor.js) */
.cursor-dot {
  position: fixed;
  top: 0; left: 0;
  z-index: 9999;
  pointer-events: none;
  width: 15px;
  height: 15px;
  transform: translate(-50%, -50%) rotate(0deg);
  opacity: 0;
  background: radial-gradient(circle at center, #fff 0%, var(--accent-glow) 55%, transparent 78%);
  clip-path: polygon(50% 0%, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0% 50%, 38% 38%);
  filter: drop-shadow(0 0 7px var(--accent-glow));
  transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  z-index: 9998;
  pointer-events: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(217, 186, 255, 0.5);
  transform: translate(-50%, -50%) scale(0.6);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1), border-color 0.3s ease;
}
body.has-cursor .cursor-dot { opacity: 1; }
body.has-cursor .cursor-ring.cursor-hover { opacity: 1; transform: translate(-50%, -50%) scale(1); }
body.has-cursor { cursor: none; }
body.has-cursor a,
body.has-cursor button,
body.has-cursor input,
body.has-cursor textarea,
body.has-cursor select { cursor: none; }
.cursor-dot.cursor-hover {
  transform: translate(-50%, -50%) scale(1.7) rotate(45deg);
  filter: drop-shadow(0 0 12px var(--accent-glow));
}

/* Polvo de estrellas que deja el cursor al moverse */
.cursor-spark {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9997;
  pointer-events: none;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: cursorSparkFade 0.75s ease-out forwards;
}
@keyframes cursorSparkFade {
  0% { opacity: 0.9; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.2) translateY(14px); }
}

.page { min-height: 100vh; padding: 1.5rem 1.25rem 7rem; }

/* Utilidad de scroll-reveal compartida (ver aventura.js) */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.in-view { opacity: 1; transform: none; }

.eyebrow {
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--accent-glow);
  font-weight: 700;
  margin: 0 0 0.4rem;
}
/* Dentro de una tarjeta de vidrio claro, el eyebrow vuelve a tono oscuro */
.reward-box .eyebrow,
.carta .eyebrow,
.login-card .eyebrow { color: var(--lilac-deep); }

.brand, h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  margin: 0 0 0.5rem;
  color: var(--text-hi);
  line-height: 1.1;
}

.lead { color: var(--text-lo); max-width: 32rem; margin: 0 0 1.5rem; }

.btn-primary, .btn-gift {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  background: linear-gradient(135deg, var(--lilac-deep), #b07eb8);
  color: #fff;
  font-weight: 700;
  font-family: inherit;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  box-shadow: 0 10px 30px var(--glow);
  transition: transform .2s ease, box-shadow .2s ease;
}

.btn-primary:hover, .btn-gift:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px var(--glow);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--lilac);
  color: var(--lilac-deep);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-family: inherit;
  cursor: pointer;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.field input {
  border: 1.5px solid rgba(155, 126, 200, 0.35);
  background: rgba(255,255,255,0.85);
  border-radius: 0.9rem;
  padding: 0.8rem 1rem;
  font: inherit;
  color: var(--ink);
}

.field input:focus {
  outline: none;
  border-color: var(--lilac-deep);
  box-shadow: 0 0 0 4px rgba(201,184,232,0.35);
}

/* Login */
.login-stage {
  max-width: 420px;
  margin: 0 auto;
  padding-top: 8vh;
  animation: fadeUp .8s ease both;
}

.login-hero { text-align: center; margin-bottom: 1.5rem; }
.login-card {
  position: relative;
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: calc(var(--radius) + 0.4rem);
  padding: 1.6rem 1.4rem 1.5rem;
  box-shadow: 0 20px 50px rgba(125, 95, 170, 0.12);
}

.login-card h2 {
  font-family: var(--font-display);
  margin: 0.4rem 0 0.3rem;
  font-size: 1.8rem;
}

.hint-line { color: var(--ink-soft); font-size: 0.92rem; margin: 0 0 1.2rem; }

.link-hint {
  background: none;
  border: 0;
  color: var(--lilac-deep);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
  margin: 0 0 1rem;
  padding: 0;
}

.pista-float {
  position: absolute;
  right: 1rem;
  top: -0.5rem;
  width: min(230px, 70vw);
  background: #fff;
  border-radius: 1rem;
  padding: 0.9rem 1rem 1rem;
  box-shadow: 0 16px 40px rgba(125, 95, 170, 0.2);
  border: 1px solid var(--lilac);
  animation: pop .35s ease;
  z-index: 5;
}

.pista-float strong { display: block; color: var(--lilac-deep); margin-bottom: 0.25rem; }
.pista-float p { margin: 0 0 0.4rem; font-size: 0.9rem; }
.pista-date {
  display: inline-block;
  background: linear-gradient(135deg, var(--rose), var(--lilac));
  color: var(--ink);
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.85rem;
}
.pista-close {
  position: absolute;
  right: 0.4rem;
  top: 0.2rem;
  border: 0;
  background: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--ink-soft);
}

.form-error { color: #b14b6a; font-size: 0.9rem; margin: 0 0 0.8rem; }

.veil[hidden] {
  display: none !important;
}
.veil {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, rgba(250,246,255,0.95), rgba(201,184,232,0.95));
  display: grid;
  place-items: center;
  z-index: 50;
  animation: fadeIn .5s ease;
  cursor: pointer;
}
.veil-inner { text-align: center; pointer-events: none; }
.typewriter {
  font-family: var(--font-display);
  font-size: 1.6rem;
  margin-top: 1rem;
}
.veil-hint {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
  font-weight: 600;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop {
  from { opacity: 0; transform: scale(0.9) translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ===== Nav persistente (Home / Mapa / Recuerdos / Carta) ===== */
.page.has-app-nav { padding-bottom: calc(6.5rem + env(safe-area-inset-bottom, 0px)); }

.app-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  /* Siempre por encima de cualquier modal/backdrop: si algo se traba,
     esta barra sigue siendo una salida garantizada. */
  z-index: 95;
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(201, 184, 232, 0.4);
  box-shadow: 0 -8px 30px rgba(125, 95, 170, 0.12);
  padding: 0.45rem max(0.4rem, env(safe-area-inset-left)) calc(0.45rem + env(safe-area-inset-bottom, 0px)) max(0.4rem, env(safe-area-inset-right));
}

.app-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  gap: 0.15rem;
  padding: 0.45rem 0.15rem;
  text-decoration: none;
  color: var(--ink-soft);
  border-radius: 1rem;
  transition: color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.app-nav-ico { font-size: 1.15rem; line-height: 1; }
.app-nav-label { font-size: 0.65rem; font-weight: 800; letter-spacing: 0.01em; }

@media (max-width: 360px) {
  .app-nav-label { font-size: 0.58rem; }
  .app-nav-ico { font-size: 1.05rem; }
}
.app-nav-item.active { color: var(--lilac-deep); background: rgba(201, 184, 232, 0.2); }
.app-nav-item.active .app-nav-ico { transform: translateY(-1px) scale(1.08); }
.app-nav-item.locked { opacity: 0.55; }
.app-nav-item:not(.locked):active { transform: scale(0.94); }

@media (min-width: 720px) {
  .app-nav {
    left: 50%;
    right: auto;
    bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    width: max-content;
    gap: 0.35rem;
    border-radius: 999px;
    border: 1px solid rgba(201, 184, 232, 0.4);
    padding: 0.5rem;
  }
  .app-nav-item { flex-direction: row; padding: 0.55rem 1.1rem; gap: 0.5rem; }
  .app-nav-label { font-size: 0.82rem; }
  .page.has-app-nav { padding-bottom: calc(6rem + env(safe-area-inset-bottom, 0px)); }
}

/* Cow Ani */
.cow-face {
  position: relative;
  width: 64px;
  height: 56px;
  margin: 0 auto;
  background: #fff;
  border-radius: 50% 50% 45% 45%;
  border: 2px solid #e8dff5;
  box-shadow: 0 0 0 6px rgba(217, 186, 255, 0.12), 0 8px 26px rgba(155,126,200,0.45), 0 0 30px rgba(217, 186, 255, 0.25);
}
.cow-face.big { width: 96px; height: 84px; }
.cow-face .ear {
  position: absolute;
  top: -8px;
  width: 18px;
  height: 22px;
  background: #f3c6d4;
  border-radius: 50%;
}
.cow-face .ear.left { left: 4px; transform: rotate(-20deg); }
.cow-face .ear.right { right: 4px; transform: rotate(20deg); }
.cow-face.is-twitching .ear.left { animation: earTwitchLeft 0.5s ease; }
.cow-face.is-twitching .ear.right { animation: earTwitchRight 0.5s ease; }
.cow-face .eye {
  position: absolute;
  top: 22px;
  width: 7px;
  height: 9px;
  background: #fff;
  border-radius: 50%;
  overflow: hidden;
}
.cow-face .eye.left { left: 18px; }
.cow-face .eye.right { right: 18px; }
.cow-face.big .eye { top: 32px; width: 9px; height: 11px; }
.cow-face.big .eye.left { left: 26px; }
.cow-face.big .eye.right { right: 26px; }
.cow-face .pupil {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 80%;
  height: 80%;
  background: #3d2f4f;
  border-radius: 50%;
  transform: translate(var(--px, 0), var(--py, 0));
  transition: transform 0.3s var(--ease-out-expo, ease);
}
.cow-face.is-blinking .eye { animation: blink 0.24s ease; }
.cow-face .snout {
  position: absolute;
  left: 50%;
  bottom: 10px;
  width: 28px;
  height: 18px;
  transform: translateX(-50%);
  background: #f7d9e3;
  border-radius: 40%;
}
.cow-face.big .snout { width: 40px; height: 24px; bottom: 14px; }
.cow-face .spot {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 12px;
  height: 10px;
  background: #3d2f4f;
  border-radius: 40%;
  opacity: 0.85;
}
@keyframes blink {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.08); }
}
@keyframes earTwitchLeft {
  0%, 100% { transform: rotate(-20deg); }
  50% { transform: rotate(-32deg); }
}
@keyframes earTwitchRight {
  0%, 100% { transform: rotate(20deg); }
  50% { transform: rotate(32deg); }
}
.ani-avatar.is-talking .cow-face { animation: aniBounce 0.5s var(--ease-out-expo, ease); }
@keyframes aniBounce {
  0%, 100% { transform: translateY(0); }
  30% { transform: translateY(-5px); }
  55% { transform: translateY(0); }
  75% { transform: translateY(-2px); }
}

/* Ani: compañera contextual, no barra fija — vive junto al contenido y
   se queda pegada arriba al hacer scroll (sticky), no tapando nada. */
.ani-helper {
  position: sticky;
  top: 0.65rem;
  z-index: 25;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin: 0 auto 1.1rem;
  max-width: 36rem;
  justify-content: center;
}
.ani-avatar {
  text-align: center;
  flex-shrink: 0;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.ani-name {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent-glow);
  margin-top: 0.15rem;
}
.ani-bubble {
  background: rgba(255,255,255,0.94);
  border: 1px solid rgba(201,184,232,0.7);
  border-radius: 1.1rem 1.1rem 1.1rem 0.35rem;
  padding: 0.8rem 1rem;
  box-shadow: 0 12px 30px rgba(125,95,170,0.15);
  max-width: 30rem;
  flex: 1;
  transition: opacity 0.2s ease, transform 0.2s ease, max-height 0.2s ease;
  transform-origin: left top;
}
.ani-text { margin: 0; font-size: 0.94rem; line-height: 1.5; min-height: 1.4em; }
.ani-actions { margin-top: 0.5rem; }
.ani-actions:empty { display: none; }

.ani-helper.collapsed .ani-bubble {
  opacity: 0;
  transform: scale(0.9);
  pointer-events: none;
  position: absolute;
}
.ani-helper .cow-face { transition: transform 0.2s ease; }
.ani-helper.collapsed .cow-face { transform: scale(0.85); }

/* Mapa */
.mapa-wrap, .cap-wrap { max-width: 720px; margin: 0 auto; }
.cap-header { text-align: center; }
.cap-header .eyebrow { justify-content: center; }
.cap-header .lead { margin-left: auto; margin-right: auto; }
.back-link { display: inline-block; margin-bottom: 0.75rem; }
.progress-bar {
  height: 10px;
  background: rgba(201,184,232,0.35);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.4rem;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--rose), var(--lilac-deep));
  border-radius: inherit;
  transition: width .6s ease;
}
.progress-label { font-size: 0.85rem; color: var(--text-lo); margin: 0 0 1.5rem; }

.constelacion {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}
.star-btn, .locked-btn {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.9rem;
  align-items: center;
  padding: 1rem 1.1rem;
  border-radius: 1.2rem;
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(201,184,232,0.55);
  text-decoration: none;
  color: inherit;
  transition: transform .2s ease, box-shadow .2s ease;
}
.star-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(155,126,200,0.18);
}
.star-num {
  grid-row: span 2;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  background: var(--lilac);
  color: var(--ink);
}
.star-node.done .star-num {
  background: linear-gradient(135deg, var(--rose), var(--lilac-deep));
  color: #fff;
}
.star-node.locked .locked-btn { opacity: 0.45; filter: grayscale(0.3); }
.star-title { font-weight: 700; }
.star-sub { grid-column: 2; font-size: 0.85rem; color: var(--ink-soft); }
.logout-row { margin-top: 2rem; text-align: center; }
.logout-row a { color: var(--text-lo); }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--accent-glow);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: gap 0.2s ease;
}
.back-link:hover { gap: 0.55rem; }

/* Cap interactions */
.hearts-row {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  margin: 2rem 0;
}
.heart-btn {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0.4rem;
}
.heart-svg {
  width: 64px;
  height: 64px;
  fill: #f3c6d4;
  filter: drop-shadow(0 8px 16px rgba(243,198,212,0.6));
  transition: transform .2s ease, fill .2s ease;
}
.heart-btn:nth-child(2) .heart-svg {
  animation: heartbeat 1.2s ease-in-out infinite;
  fill: #c97ba8;
}
.heart-btn:hover .heart-svg { transform: scale(1.08); }
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  40% { transform: scale(1.12); }
  60% { transform: scale(1.05); }
}

.reward-box, .carta {
  background: rgba(255,255,255,0.85);
  border-radius: 1.35rem;
  padding: 1.35rem 1.35rem 1.5rem;
  border: 1px solid rgba(201,184,232,0.5);
  animation: fadeUp .5s ease;
  max-width: min(640px, 94vw);
  margin-left: auto;
  margin-right: auto;
}
.reward-img {
  width: 100%;
  max-height: min(62vh, 520px);
  height: auto;
  object-fit: contain;
  object-position: center;
  border-radius: 1.1rem;
  margin: 0.85rem 0 1rem;
  display: block;
  background: transparent;
}

.hotspot-map {
  position: relative;
  border-radius: 1.2rem;
  overflow: hidden;
  border: 1px solid rgba(217, 186, 255, 0.2);
  background: linear-gradient(160deg, #1c1430, #0c0818 75%);
  aspect-ratio: 4/3;
  max-width: min(820px, 96vw);
  margin: 0 auto;
}
.hotspot-map.is-demo {
  background:
    radial-gradient(ellipse 70% 50% at 30% 40%, rgba(217, 186, 255, 0.18), transparent 55%),
    radial-gradient(ellipse 50% 40% at 75% 65%, rgba(243, 198, 212, 0.12), transparent 50%),
    linear-gradient(160deg, #1a1228, #0a0714 80%);
}
.hotspot-demo-bg {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  pointer-events: none;
  z-index: 0;
}
.hotspot-demo-label {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: rgba(255, 255, 255, 0.35);
}
.hotspot-demo-hint {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.28);
}
.hotspot-howto {
  text-align: center;
  margin-bottom: 0.75rem;
}
.hotspot-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hotspot-dot {
  position: absolute;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  background: rgba(217, 186, 255, 0.35);
  backdrop-filter: blur(2px);
  box-shadow: 0 0 0 0 rgba(217, 186, 255, 0.55);
  cursor: pointer;
  animation: pulse 1.8s infinite;
  z-index: 2;
}
.hotspot-dot::after {
  content: '✦';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 0.95em;
  color: #fff;
  text-shadow: 0 0 8px var(--accent-glow);
}
.hotspot-dot.seen {
  background: rgba(217, 186, 255, 0.9);
  border-color: var(--accent-glow);
  animation: none;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(217, 186, 255, 0.55); transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.08); }
  70% { box-shadow: 0 0 0 18px rgba(217, 186, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(217, 186, 255, 0); transform: translate(-50%, -50%) scale(1); }
}

.hot-modal {
  border: 0;
  border-radius: 1.2rem;
  padding: 1.3rem;
  max-width: 22rem;
  background: rgba(20, 14, 32, 0.85);
  backdrop-filter: blur(24px) saturate(140%);
  color: #fff;
  border: 1px solid rgba(217, 186, 255, 0.25);
  box-shadow: 0 30px 70px rgba(0,0,0,0.5);
}
.hot-modal h3 { color: #fff; }
.hot-modal p { color: rgba(255,255,255,0.75); }
.hot-modal::backdrop { background: rgba(5, 3, 10, 0.65); backdrop-filter: blur(4px); }

.options { display: grid; gap: 0.7rem; margin: 1.5rem 0; }
.option-btn {
  text-align: left;
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  border: 1.5px solid rgba(201,184,232,0.55);
  background: rgba(255,255,255,0.8);
  font: inherit;
  cursor: pointer;
}
.option-btn:hover { border-color: var(--lilac-deep); }

.sort-list { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: 0.55rem; }
.sort-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  background: rgba(255,255,255,0.85);
  border-radius: 0.9rem;
  border: 1px solid rgba(201,184,232,0.5);
  cursor: grab;
}
.sort-controls { margin-left: auto; display: flex; gap: 0.25rem; }
.sort-controls button {
  border: 0;
  background: var(--lilac);
  border-radius: 0.4rem;
  cursor: pointer;
  width: 1.8rem;
  height: 1.8rem;
}

#constCanvas {
  display: block;
  margin: 1rem auto;
  background: rgba(255,255,255,0.5);
  border-radius: 1rem;
  max-width: 100%;
  touch-action: none;
}

.btn-gift {
  font-size: 1.15rem;
  padding: 1.1rem 1.8rem;
  margin: 2rem auto;
  display: flex;
}
.carta h2 { font-family: var(--font-display); font-size: 2rem; }
.carta-body { white-space: pre-wrap; line-height: 1.7; color: var(--ink-soft); }

/* Cap. fecha: candado de fecha */
.date-lock {
  max-width: 26rem;
  margin: 1.5rem auto;
  padding: 2rem 1.6rem;
  text-align: center;
  background: linear-gradient(155deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid rgba(217, 186, 255, 0.2);
  border-radius: 1.5rem;
}
.date-lock-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217,186,255,0.35), transparent 70%);
  color: var(--accent-glow);
  font-size: 1.4rem;
  text-shadow: 0 0 12px var(--accent-glow);
}
.date-lock-form { display: flex; flex-direction: column; gap: 1.1rem; align-items: center; }
.date-lock-label { display: flex; flex-direction: column; gap: 0.5rem; width: 100%; }
.date-lock-label span {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--text-lo);
}
.date-lock-label input {
  text-align: center;
  font-size: 1.3rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  border: 1.5px solid rgba(217, 186, 255, 0.3);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-hi);
  font-family: inherit;
}
.date-lock-label input::placeholder { color: rgba(255,255,255,0.3); }
.date-lock-label input:focus {
  outline: none;
  border-color: var(--accent-glow);
  box-shadow: 0 0 0 4px var(--accent-glow-soft);
}

/* Carrusel horizontal con snap */
.carousel { margin: 1.25rem 0 0.5rem; }
.carousel-track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.15rem 0.2rem 0.85rem;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.carousel-slide {
  flex: 0 0 min(94%, 34rem);
  scroll-snap-align: center;
  margin: 0;
  background: linear-gradient(155deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid rgba(217, 186, 255, 0.18);
  border-radius: 1.35rem;
  overflow: hidden;
}
.carousel-slide img {
  width: 100%;
  aspect-ratio: 3 / 4;
  height: auto;
  max-height: min(72vh, 620px);
  object-fit: cover;
  object-position: center;
  display: block;
  background: linear-gradient(145deg, #2a1f3a, #1a1228);
}
.carousel-slide figcaption,
.carousel-caption {
  padding: 1rem 1.15rem 1.15rem;
  display: grid;
  gap: 0.35rem;
  background: linear-gradient(180deg, rgba(12, 8, 24, 0.15), rgba(12, 8, 24, 0.55));
}
.carousel-caption-num {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(217, 186, 255, 0.75);
}
.carousel-caption-text {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.8vw, 1.35rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.35;
  color: var(--text-hi, #fff);
}
@media (min-width: 720px) {
  .carousel-slide {
    flex-basis: min(78%, 38rem);
  }
  .carousel-slide img {
    aspect-ratio: 3 / 4;
    max-height: min(70vh, 640px);
  }
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}
.gallery-grid figure {
  margin: 0;
  background: rgba(255,255,255,0.8);
  border-radius: 1.15rem;
  overflow: hidden;
}
.gallery-grid img {
  width: 100%;
  aspect-ratio: 4 / 5;
  height: auto;
  max-height: 420px;
  object-fit: cover;
  object-position: center;
  display: block;
}
.gallery-grid figcaption {
  padding: 0.7rem 0.9rem;
  font-size: 0.88rem;
}

.toast {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  font-size: 0.9rem;
}
.toast-error { color: #b14b6a; }
.toast-ok { color: #4d7a5a; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (min-width: 720px) {
  .page:not(.has-app-nav) { padding-bottom: 2.5rem; }
}

/* Teléfonos pequeños (SE, mini) */
@media (max-width: 380px) {
  .page { padding: 1.1rem 0.85rem calc(7rem + env(safe-area-inset-bottom, 0px)); }
  .brand, h1 { font-size: clamp(1.7rem, 8vw, 2.2rem); }
  .login-card { padding: 1.3rem 1.1rem 1.2rem; }
  .cow-face { width: 54px; height: 48px; }
  .ani-bubble { padding: 0.7rem 0.85rem; }
  .ani-text { font-size: 0.88rem; }
  .btn-primary, .btn-gift { padding: 0.75rem 1.15rem; font-size: 0.92rem; }
}

@media (max-width: 640px) {
  .login-stage {
    gap: 1.25rem;
    padding-top: max(4vh, env(safe-area-inset-top, 0px));
  }
  .login-hero .brand { font-size: clamp(2rem, 10vw, 2.6rem); }
  .login-hero .lead { font-size: 0.95rem; }
  .hotspot-map { min-height: 280px; }
  .carousel-track {
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .carousel-slide {
    flex: 0 0 min(88vw, 320px);
  }
  .carousel-slide img {
    max-height: min(48vh, 340px);
  }
}

/* Safe-area para notch/gestos (iPhone) */
.page {
  padding-left: max(1.25rem, env(safe-area-inset-left, 0px));
  padding-right: max(1.25rem, env(safe-area-inset-right, 0px));
}

/* Pantallas bajas (celular en horizontal) */
@media (max-height: 480px) {
  .login-stage { padding-top: 2vh; }
}
