/* pandamimi · invitación web
   Un solo look claro por tema (como una tarjeta impresa). El tema se elige en datos.json → "tema". */
:root {
  --cuadro-a: #e2effb; --cuadro-b: #cfe2f6;
  --papel: #ffffff; --tinta: #3a3550; --suave: #6f6a86;
  --acento: #d9668f; --acento-tinta: #ffffff; --acento-suave: #fbe3ec;
  --segundo: #4a86c5; --segundo-suave: #e2effb;
  --linea: #e6e0ef;
  --display: "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
  --cuerpo: "Nunito", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
[data-tema="rosado"] { --cuadro-a: #fde8f0; --cuadro-b: #f9d3e2; --acento: #d34f86; --segundo: #a45bb5; --segundo-suave: #f3e6f8; }
[data-tema="menta"]  { --cuadro-a: #e3f6ee; --cuadro-b: #ccecdf; --acento: #e0768a; --segundo: #2f8f6a; --segundo-suave: #e3f6ee; }
[data-tema="lila"]   { --cuadro-a: #efe8fb; --cuadro-b: #e0d4f6; --acento: #c45c9a; --segundo: #6f55c2; --segundo-suave: #efe8fb; }

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--cuerpo); color: var(--tinta); font-size: 17px; line-height: 1.5;
  background: var(--cuadro-a);
  padding: env(safe-area-inset-top, 0px) 16px env(safe-area-inset-bottom, 0px);
}
.fondo {
  position: fixed; inset: 0; z-index: -1;
  background:
    repeating-linear-gradient(90deg, var(--cuadro-b) 0 28px, transparent 28px 56px),
    repeating-linear-gradient(0deg, var(--cuadro-b) 0 28px, transparent 28px 56px),
    var(--cuadro-a);
  opacity: .55;
}
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0; text-wrap: balance; }
p { margin: 0; }
[hidden] { display: none !important; }
.oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Sobre ---------- */
.sobre { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding-block: 24px; }
.sobre-carta {
  width: min(100%, 380px); background: var(--papel); border-radius: 22px;
  padding: 40px 24px 32px; text-align: center; display: grid; gap: 10px; justify-items: center;
  box-shadow: 0 18px 40px -18px rgba(58, 53, 80, .35);
  border: 3px dashed var(--cuadro-b);
}
.sobre-pre { color: var(--suave); font-weight: 700; }
.sobre-nombre { font-size: clamp(2.6rem, 12vw, 3.4rem); color: var(--acento); }
.sello {
  margin-top: 10px; width: 112px; height: 112px; border-radius: 50%; border: 0; cursor: pointer;
  background: radial-gradient(circle at 35% 30%, #ffffff55, transparent 45%), var(--acento);
  box-shadow: 0 0 0 8px var(--acento-suave), 0 10px 20px -6px rgba(0,0,0,.25);
  display: grid; place-items: center; font-size: 52px;
}
.sello:focus-visible { outline: 4px solid var(--segundo); outline-offset: 6px; }
.sobre-pista { font-family: var(--display); font-weight: 700; color: var(--segundo); font-size: 1.15rem; }
@media (prefers-reduced-motion: no-preference) {
  .sello { animation: latido 1.6s ease-in-out infinite; }
  @keyframes latido { 0%,100% { transform: scale(1); } 50% { transform: scale(1.07); } }
  .invitacion { animation: entra .5s ease-out; }
  @keyframes entra { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
}

/* ---------- Invitación ---------- */
.invitacion { max-width: 440px; margin: 0 auto; padding-block: 20px 32px; display: grid; gap: 16px; }
.video-marco { position: relative; border-radius: 22px; overflow: hidden; background: var(--papel);
  box-shadow: 0 18px 40px -20px rgba(58, 53, 80, .45); aspect-ratio: 9 / 16; max-width: 100%; }
.video-marco video { width: 100%; height: 100%; display: block; object-fit: cover; }
.sonido, .repetir {
  position: absolute; border: 0; cursor: pointer; font: inherit; font-weight: 800;
  background: rgba(255,255,255,.9); color: var(--tinta); border-radius: 999px;
  box-shadow: 0 4px 12px -4px rgba(0,0,0,.3);
}
.sonido { right: 12px; bottom: 12px; width: 44px; height: 44px; font-size: 20px; }
.repetir { left: 50%; bottom: 16px; transform: translateX(-50%); padding: 10px 18px; }

#antes { display: grid; gap: 16px; }
.cabecera { text-align: center; display: grid; gap: 4px; padding-inline: 8px; }
.cabecera h2 { font-size: clamp(1.9rem, 8vw, 2.3rem); color: var(--acento); }
.cabecera p { color: var(--suave); font-weight: 700; }

.tarjeta { background: var(--papel); border-radius: 20px; padding: 18px; display: grid; gap: 12px;
  box-shadow: 0 10px 28px -20px rgba(58, 53, 80, .5); }
.tarjeta h3 { font-size: 1.35rem; color: var(--segundo); text-align: center; }

.reloj { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.reloj div { background: var(--segundo-suave); border-radius: 14px; padding: 10px 4px; text-align: center; display: grid; }
.reloj b { font-family: var(--display); font-size: 1.9rem; line-height: 1; color: var(--tinta); font-variant-numeric: tabular-nums; }
.reloj span { font-size: .8rem; font-weight: 700; color: var(--suave); }
.es-hoy { text-align: center; font-family: var(--display); font-size: 1.3rem; font-weight: 800; color: var(--acento); }

.lista-datos { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lista-datos li { display: grid; grid-template-columns: 34px 1fr; align-items: start; gap: 8px; }
.lista-datos .ico { font-size: 22px; line-height: 1.3; }
.lista-datos b { display: block; font-weight: 800; }
.lista-datos div { min-width: 0; }
.lista-datos span:not(.ico) { color: var(--suave); font-size: .95rem; }
.detalle { text-align: center; color: var(--suave); font-weight: 700; padding: 10px; background: var(--acento-suave); border-radius: 12px; }

.botones { display: grid; gap: 8px; }
.btn {
  display: block; text-align: center; text-decoration: none; font-weight: 800; font-family: var(--cuerpo);
  padding: 13px 16px; border-radius: 999px; border: 2px solid var(--segundo); color: var(--segundo);
  background: var(--papel); cursor: pointer; font-size: 1rem;
}
.btn.suave { border-color: var(--linea); color: var(--suave); }
.btn.principal { background: var(--acento); border-color: var(--acento); color: var(--acento-tinta); width: 100%; }
.btn:focus-visible, input:focus-visible, .stepper button:focus-visible, .sonido:focus-visible, .repetir:focus-visible { outline: 3px solid var(--segundo); outline-offset: 2px; }

form { display: grid; gap: 10px; }
form > label { font-weight: 800; }
input[type="text"], input:not([type]) {
  font: inherit; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--linea); background: #fff; color: var(--tinta); width: 100%;
}
.error { color: #b3264f; font-weight: 700; font-size: .9rem; }
.vas { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.vas legend { font-weight: 800; margin-bottom: 4px; }
.vas label { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 2px solid var(--linea); border-radius: 12px; cursor: pointer; font-weight: 700; }
.vas label:has(input:checked) { border-color: var(--acento); background: var(--acento-suave); }
.vas input { accent-color: var(--acento); width: 18px; height: 18px; }
.cuantos { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-weight: 800; }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper button { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--segundo); background: #fff; color: var(--segundo); font-size: 1.3rem; font-weight: 800; cursor: pointer; }
.stepper output { min-width: 2ch; text-align: center; font-family: var(--display); font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.nota { text-align: center; color: var(--suave); font-size: .85rem; }

.gracias { text-align: center; justify-items: center; padding-block: 26px; }
.gracias img { width: 200px; height: 200px; border-radius: 50%; object-fit: cover; border: 6px solid var(--acento-suave); max-width: 100%; }
.gracias h3 { color: var(--acento); font-size: 1.6rem; }
.gracias p { color: var(--suave); font-weight: 700; }

.pie { text-align: center; padding-top: 6px; }
.pie a { color: var(--suave); font-size: .9rem; text-decoration: none; font-weight: 700; }
.pie b { color: var(--acento); }
