/* ─────────────────────────────────────────────────────────────
   Estilos · Paleta A "Albero y vino"
   Los colores y tamaños están arriba, en :root, para cambiarlos en un solo sitio.
   ───────────────────────────────────────────────────────────── */

@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-garamond.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-garamond-italic.woff2") format("woff2");
  font-weight: 400 600;
  font-style: italic;
  font-display: swap;
}

:root {
  --fondo: #FAF6EF;        /* crema */
  --fondo-alt: #F2EADC;    /* albero suave, secciones alternas */
  --tarjeta: #FFFDF9;
  --texto: #2E2A26;        /* marrón casi negro */
  --texto-suave: #5C534B;
  --acento: #7A2E3A;       /* burdeos jerez: títulos y botones */
  --acento-oscuro: #5E222C;
  --olivo: #6B7A4B;        /* solo decoración, nunca texto pequeño */
  --linea: #E3D7C3;
  --pendiente: #FFF1A8;

  --titulos: "Cormorant Garamond", "AppleMyungjo", "Nanum Myeongjo", "Noto Serif KR", Georgia, serif;
  --cuerpo: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
            "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;

  --ancho: 44rem;
  --alto-barra: 3.75rem;
  --sombra: 0 1px 2px rgb(60 40 30 / .05), 0 8px 24px -12px rgb(60 40 30 / .18);
  --curva: cubic-bezier(.2, .7, .2, 1);   /* frenado suave, estilo Apple */
}

*, *::before, *::after { box-sizing: border-box; }

/* --alto-barra-real: alto de la barra de arriba (con el aviso del coreano si se ve); lo mide js/efectos.js */
html { --alto-barra-real: var(--alto-barra); -webkit-text-size-adjust: 100%; scroll-padding-top: var(--alto-barra-real); }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--fondo);
  color: var(--texto);
  font-family: var(--cuerpo);
  font-size: 1.1875rem;     /* 19 px: letra grande para leer cómodo en el móvil */
  line-height: 1.6;
  font-variant-numeric: lining-nums;   /* cifras alineadas (Cormorant las trae "antiguas") */
  -webkit-font-smoothing: antialiased;
}
body.menu-abierto { overflow: hidden; }

/* Coreano: letra del sistema y sin cortar palabras a mitad */
:lang(ko) { word-break: keep-all; }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--acento); }

:focus-visible { outline: 3px solid var(--acento); outline-offset: 3px; }

[hidden] { display: none !important; }

.saltar-contenido {
  position: absolute; left: .5rem; top: -4rem; z-index: 60;
  background: var(--acento); color: #fff; padding: .5rem 1rem; border-radius: .5rem;
}
.saltar-contenido:focus { top: .5rem; }

/* Marcador de dato pendiente */
.es-pendiente {
  background: var(--pendiente);
  color: #3A2E00;
  padding: .05em .35em;
  border-radius: .25em;
  font-family: var(--cuerpo);
  font-style: normal;
}

/* ───────── Barra superior ───────── */
.barra {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top);
  transition: background-color .35s, box-shadow .35s, backdrop-filter .35s;
}
.barra.con-fondo,
html.sin-secciones .barra,    /* páginas secundarias: siempre con fondo (el texto pasa por debajo) */
body.menu-abierto .barra {
  background: rgb(250 246 239 / .82);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: 0 1px 0 var(--linea);
}
.barra-fila {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--alto-barra);
  padding: 0 max(1rem, env(safe-area-inset-right)) 0 max(1rem, env(safe-area-inset-left));
}
.monograma {
  font-family: var(--titulos);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--acento);
  text-decoration: none;
  line-height: 1;
  padding: .4rem .25rem;
  border-radius: .5rem;
  background: rgb(250 246 239 / .7);
  transition: background-color .35s;
}
.barra.con-fondo .monograma, html.sin-secciones .monograma { background: transparent; }
.monograma .amp { font-size: .8em; margin: 0 .05em; }
.barra-acciones { display: flex; align-items: center; gap: .5rem; }

.idioma {
  display: flex;
  background: var(--tarjeta);
  border: 1px solid var(--linea);
  border-radius: 999px;
  padding: 3px;
}
.idioma button {
  font: inherit;
  font-size: .95rem;
  min-width: 2.9rem;
  min-height: 2.5rem;
  padding: 0 .75rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--texto);
  cursor: pointer;
}
.idioma button[aria-pressed="true"] { background: var(--acento); color: #fff; }

.boton-menu {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 2.9rem;
  padding: 0 1rem;
  border: 1px solid var(--linea);
  border-radius: 999px;
  background: var(--tarjeta);
  color: var(--texto);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
/* Icono de hamburguesa que se convierte en X */
.hamburguesa { position: relative; width: 18px; height: 12px; }
.hamburguesa::before, .hamburguesa::after, .hamburguesa span {
  content: ""; position: absolute; left: 0; width: 100%; height: 2px;
  background: currentColor; border-radius: 2px;
  transition: transform .3s var(--curva), opacity .2s;
}
.hamburguesa::before { top: 0; }
.hamburguesa span { top: 5px; }
.hamburguesa::after { top: 10px; }
.boton-menu[aria-expanded="true"] .hamburguesa::before { transform: translateY(5px) rotate(45deg); }
.boton-menu[aria-expanded="true"] .hamburguesa span { opacity: 0; }
.boton-menu[aria-expanded="true"] .hamburguesa::after { transform: translateY(-5px) rotate(-45deg); }

.aviso-traduccion {
  margin: 0;
  padding: .2rem 1rem;
  background: var(--fondo-alt);
  color: var(--texto-suave);
  font-size: .78rem;
  line-height: 1.35;
  text-align: center;
}

.progreso { height: 2px; }
.progreso span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--olivo), var(--acento));
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* ───────── Menú a pantalla completa ───────── */
.menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--alto-barra) + 1.5rem) 1.5rem 2rem;
  background: rgb(250 246 239 / .97);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  overflow-y: auto;
  opacity: 0;
  transition: opacity .3s;
}
.menu.abierto { opacity: 1; }
.menu nav { max-width: 32rem; width: 100%; margin: 0 auto; }
.menu-lista { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.menu-lista a {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: .55rem 0;
  border-bottom: 1px solid var(--linea);
  font-family: var(--titulos);
  font-size: clamp(1.7rem, 7vw, 2.4rem);
  font-weight: 500;
  line-height: 1.2;
  color: var(--texto);
  text-decoration: none;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .45s var(--curva), transform .45s var(--curva), color .2s;
}
.menu.abierto .menu-lista a { opacity: 1; transform: none; }
.menu.abierto li:nth-child(2) a { transition-delay: 40ms; }
.menu.abierto li:nth-child(3) a { transition-delay: 80ms; }
.menu.abierto li:nth-child(4) a { transition-delay: 120ms; }
.menu.abierto li:nth-child(5) a { transition-delay: 160ms; }
.menu.abierto li:nth-child(6) a { transition-delay: 200ms; }
.menu.abierto li:nth-child(7) a { transition-delay: 240ms; }
.menu.abierto li:nth-child(8) a { transition-delay: 280ms; }
.menu.abierto li:nth-child(9) a { transition-delay: 320ms; }
.menu.abierto li:nth-child(10) a { transition-delay: 360ms; }
.menu-lista a:hover, .menu-lista a[aria-current="true"], .menu-lista a[aria-current="page"] { color: var(--acento); }
/* "Confirma tu asistencia": lo más importante, en un recuadro de color */
.menu-lista a.menu-destacado {
  margin: .4rem 0;
  padding: .55rem .9rem;
  border-bottom: 0;
  border-radius: .9rem;
  background: var(--acento);
  color: #fff;
}
.menu-lista a.menu-destacado:hover { background: var(--acento-oscuro); color: #fff; }
.menu-destacado .menu-num { color: rgb(255 255 255 / .75); }
.menu-num {
  font-family: var(--cuerpo);
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--olivo);
  min-width: 1.75rem;
}
.menu-pie {
  margin: 2rem auto 0;
  max-width: 32rem;
  width: 100%;
  color: var(--texto-suave);
  font-size: .95rem;
  letter-spacing: .06em;
}

/* ───────── Portada ───────── */
.portada { --p: 0; text-align: center; position: relative; }

.portada-marco {
  position: relative;
  height: min(100vw, 78vh);
  height: min(100vw, 78svh);
  overflow: hidden;
}
.portada-foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 48% 62%;
  /* Al bajar: la foto se mueve más despacio que la página y se acerca un poco */
  transform: translateY(calc(var(--p) * 22%)) scale(calc(1.02 + var(--p) * .08));
  will-change: transform;
}
/* Fundido de la foto hacia el color de fondo */
.portada-marco::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgb(250 246 239 / .35) 0%, rgb(250 246 239 / 0) 18%),
    linear-gradient(to bottom, rgb(250 246 239 / 0) 45%, rgb(250 246 239 / .75) 75%, var(--fondo) 97%);
  pointer-events: none;
}
/* Pantallas apaisadas (ordenador, tablet o móvil girado): foto más alta y encuadre más bajo,
   para que los nombres no tapen a las personas */
@media (min-aspect-ratio: 1/1) {
  .portada-marco { height: 90vh; height: 90svh; }
  .portada-foto img { object-position: 50% 78%; }
}

.portada-texto {
  position: relative;
  z-index: 1;
  margin: -4.25rem auto 0;
  padding: 0 1.25rem 3rem;
  max-width: var(--ancho);
}
@media (min-aspect-ratio: 1/1) {
  .portada-texto { margin-top: -5.5rem; }
}

.antetitulo {
  margin: 0;
  font-size: 1rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--olivo);
  font-weight: 600;
}
:lang(ko) .antetitulo { letter-spacing: .05em; }

.nombres {
  margin: .25rem 0 0;
  font-family: var(--titulos);
  font-weight: 500;
  font-size: clamp(3.2rem, 15vw, 6.5rem);
  line-height: 1;
  letter-spacing: -.01em;
  color: var(--acento);
}
.amp { font-style: italic; font-weight: 400; color: var(--olivo); }

.nombres-ko { margin: .5rem 0 0; font-size: 1.3rem; color: var(--texto-suave); }

.portada-fecha {
  margin: 1.25rem 0 0;
  font-family: var(--titulos);
  font-size: 1.8rem;
  font-weight: 500;
}
.portada-lugar { margin: 0; color: var(--texto-suave); font-size: 1.1rem; letter-spacing: .04em; }

/* Entrada de la portada al cargar la página */
@media (prefers-reduced-motion: no-preference) {
  .portada-texto > * { animation: entrar 1s var(--curva) both; }
  .portada-texto > :nth-child(2) { animation-delay: .12s; }
  .portada-texto > :nth-child(3) { animation-delay: .2s; }
  .portada-texto > :nth-child(4) { animation-delay: .28s; }
  .portada-texto > :nth-child(5) { animation-delay: .34s; }
  .portada-texto > :nth-child(6) { animation-delay: .44s; }
  .portada-texto > :nth-child(n+7) { animation-delay: .54s; }
  .portada-foto img { animation: foto-entrar 1.6s var(--curva) both; }
}
@keyframes entrar { from { opacity: 0; transform: translateY(22px); } }
@keyframes foto-entrar { from { opacity: 0; } }

/* Flecha "bajar" */
.bajar {
  display: block;
  width: 2.75rem;
  height: 2.75rem;
  margin: 2.25rem auto 0;
  border-radius: 50%;
  border: 1px solid var(--linea);
  position: relative;
}
.bajar span {
  position: absolute; left: 50%; top: 42%;
  width: .7rem; height: .7rem;
  border-right: 2px solid var(--acento); border-bottom: 2px solid var(--acento);
  transform: translate(-50%, -50%) rotate(45deg);
}
@media (prefers-reduced-motion: no-preference) {
  .bajar span { animation: rebotar 2.2s ease-in-out infinite; }
}
@keyframes rebotar {
  0%, 100% { transform: translate(-50%, -50%) rotate(45deg); }
  50% { transform: translate(-50%, -20%) rotate(45deg); }
}

/* Cuenta atrás */
.cuenta { margin: 2.25rem 0 2rem; }
.cuenta-titulo { margin: 0 0 .6rem; color: var(--texto-suave); font-size: .95rem; letter-spacing: .14em; text-transform: uppercase; }
:lang(ko) .cuenta-titulo { letter-spacing: .04em; }
.cuenta-cajas {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .5rem;
  max-width: 26rem;
  margin: 0 auto;
}
.cuenta-cajas div {
  background: var(--tarjeta);
  border: 1px solid var(--linea);
  border-radius: .9rem;
  padding: .7rem .25rem .55rem;
  box-shadow: var(--sombra);
}
.cuenta .num {
  display: block;
  font-family: var(--titulos);
  font-variant-numeric: lining-nums tabular-nums;
  font-size: 2.2rem;
  font-weight: 600;
  line-height: 1.05;
  color: var(--acento);
}
.cuenta .lbl { display: block; font-size: .85rem; color: var(--texto-suave); }
.cuenta-fin {
  font-family: var(--titulos);
  font-size: 2rem;
  color: var(--acento);
  margin: 0;
}

/* ───────── Botones ───────── */
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 3.25rem;
  padding: .7rem 1.6rem;
  border: 0;
  border-radius: 999px;
  background: var(--acento);
  color: #fff;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 6px 16px -8px rgb(122 46 58 / .6);
}
.boton:hover { background: var(--acento-oscuro); }
@media (prefers-reduced-motion: no-preference) {
  .boton { transition: background-color .2s, transform .2s var(--curva), box-shadow .2s; }
  .boton:hover { transform: translateY(-1px); box-shadow: 0 10px 20px -8px rgb(122 46 58 / .6); }
  .boton:active { transform: translateY(1px); }
}

/* ───────── Aparición al hacer scroll ───────── */
@media (prefers-reduced-motion: no-preference) {
  .js .revelar {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .9s var(--curva), transform .9s var(--curva);
  }
  .js .revelar.visible { opacity: 1; transform: none; }
}

/* ───────── Secciones ───────── */
.seccion {
  padding: 5rem 1.25rem;
  max-width: calc(var(--ancho) + 2.5rem);
  margin: 0 auto;
}
.seccion-alt {
  max-width: none;
  background: var(--fondo-alt);
}
.seccion-alt > * { max-width: var(--ancho); margin-left: auto; margin-right: auto; }

.kicker {
  margin: 0 auto .25rem;
  text-align: center;
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .3em;
  color: var(--olivo);
}

h2, .titulo-pagina {
  margin: 0 0 1.75rem;
  font-family: var(--titulos);
  font-weight: 500;
  font-size: clamp(2.5rem, 10vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -.01em;
  color: var(--acento);
  text-align: center;
}
/* Adorno bajo cada título */
h2::after, .titulo-pagina::after {
  content: "";
  display: block;
  width: 3rem;
  height: 2px;
  margin: 1rem auto 0;
  background: var(--olivo);
  border-radius: 2px;
}

h3 {
  margin: 0 0 .5rem;
  font-family: var(--titulos);
  font-weight: 600;
  font-size: 1.8rem;
  line-height: 1.15;
  color: var(--acento);
}

.destacado { text-align: center; font-family: var(--titulos); font-size: 1.7rem; font-weight: 500; margin: 0 0 2rem; }

.proximamente {
  text-align: center;
  font-style: italic;
  color: var(--texto-suave);
  padding: 1.5rem 1.25rem;
  border: 1px dashed #CBBBA3;
  border-radius: 1rem;
  background: rgb(255 253 249 / .5);
}

.nota { color: var(--texto-suave); font-size: 1.05rem; }

/* Cuándo y dónde: itinerario con línea, hora a la izquierda y tarjeta de cada lugar */
.itinerario {
  position: relative;
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 34rem;
}
.itinerario::before {
  content: "";
  position: absolute;
  left: 4.6rem;
  top: 1.2rem;
  bottom: 2rem;
  width: 2px;
  background: var(--linea);
}
.itinerario li {
  position: relative;
  display: grid;
  grid-template-columns: 3.9rem 1fr;
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 1.25rem;
}
/* punto sobre la línea */
.itinerario li::before {
  content: "";
  position: absolute;
  left: calc(4.6rem - 5px);
  top: 1rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--acento);
  box-shadow: 0 0 0 4px var(--fondo);
}
.itinerario-hora {
  margin: .35rem 0 0;
  text-align: right;
  font-family: var(--titulos);
  font-variant-numeric: lining-nums;
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--acento);
}
.itinerario-hora.hora-texto { font-size: 1.2rem; font-style: italic; font-weight: 500; padding-top: .3rem; }
:lang(ko) .itinerario-hora.hora-texto { font-style: normal; font-family: var(--cuerpo); font-size: 1rem; }

.tarjeta {
  background: var(--tarjeta);
  border: 1px solid var(--linea);
  border-radius: 1.25rem;
  padding: 1.25rem 1.25rem 1.35rem;
  box-shadow: var(--sombra);
}
.tarjeta p { margin: 0 0 .5rem; }
.tarjeta-tipo {
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--olivo);
}
:lang(ko) .tarjeta-tipo { letter-spacing: .04em; }
.tarjeta h3 { margin-bottom: .35rem; }
.tarjeta .direccion { color: var(--texto-suave); font-size: 1.02rem; margin-bottom: 1rem; }
.tarjeta-acciones { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.tarjeta { position: relative; }
.tarjeta-acciones .enlace-suave {
  position: absolute;
  top: .55rem;
  right: .8rem;
  min-height: 2.5rem;
  font-size: .95rem;
}
.enlace-suave {
  display: inline-flex; align-items: center; gap: .35rem;
  min-height: 2.75rem;
  color: var(--acento); font-weight: 600; text-decoration: none;
  border-bottom: 1px solid transparent;
}
.enlace-suave:hover { border-bottom-color: currentColor; }
@media (max-width: 26rem) {
  .itinerario::before { left: 3.9rem; }
  .itinerario li { grid-template-columns: 3.2rem 1fr; gap: 1.4rem; }
  .itinerario li::before { left: calc(3.9rem - 5px); }
  .itinerario-hora { font-size: 1.45rem; }
  .itinerario-hora.hora-texto { font-size: 1.05rem; }
}

/* Regalos */
.texto-regalos {
  max-width: 34rem;
  margin: 0 auto 2rem !important;
  text-align: center;
  font-family: var(--titulos);
  font-size: 1.45rem;
  line-height: 1.45;
  color: var(--texto);
}
:lang(ko) .texto-regalos { font-family: var(--cuerpo); font-size: 1.15rem; line-height: 1.7; }
.cuenta-banco {
  container-type: inline-size;   /* el IBAN mide su letra según el ancho de la tarjeta */
  background: var(--tarjeta);
  border: 1px solid var(--linea);
  border-radius: 1.25rem;
  padding: 1.75rem 1.5rem;
  text-align: center;
  box-shadow: var(--sombra);
}
.cuenta-banco p { margin: 0 0 1rem; }
.etiqueta { font-size: .9rem; letter-spacing: .08em; text-transform: uppercase; color: var(--texto-suave); margin-bottom: .35rem !important; }
.titular { font-family: var(--titulos); font-size: 1.5rem; font-weight: 600; }
/* IBAN siempre en una línea: la letra se ajusta al ancho de la tarjeta (29 caracteres + botón) */
.iban {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: min(1.2rem, 3.6vw);
  font-size: min(1.2rem, calc((100cqi - 3.2rem) / 18.5));
  letter-spacing: .02em;
  white-space: nowrap;
  user-select: all;
}
.iban-fila { display: flex; align-items: center; justify-content: center; gap: .35rem; flex-wrap: nowrap; }
.iban-fila .iban { min-width: 0; }
.bic-fila { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 0 .6rem; }
.bic-fila .etiqueta { margin: 0 !important; }
.bic { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: min(1.2rem, 3.6vw); font-size: min(1.2rem, calc((100cqi - 3.2rem) / 18.5)); letter-spacing: .02em; }
.copiar-icono {
  position: relative;
  flex: 0 0 auto;
  width: 2.75rem;
  height: 2.75rem;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: .7rem;
  background: transparent;
  color: var(--acento);
  cursor: pointer;
}
.copiar-icono:hover { background: var(--fondo-alt); }
.copiar-icono svg { grid-area: 1 / 1; transition: opacity .2s, transform .2s var(--curva); }
.copiar-icono .icono-hecho { opacity: 0; transform: scale(.6); color: var(--olivo); }
.copiar-icono.hecho .icono-copiar { opacity: 0; transform: scale(.6); }
.copiar-icono.hecho .icono-hecho { opacity: 1; transform: none; }
.copiado { margin: .5rem 0 0 !important; color: var(--acento); font-weight: 600; }
.copiado:empty { display: none; }

/* Número de cuenta tapado: mismos huecos que los datos reales, borrosos, con el aviso encima */
.datos-cuenta { position: relative; }
.tapado .iban, .tapado .bic { filter: blur(6px); opacity: .75; user-select: none; }
.tapado .copiar-icono { visibility: hidden; }
.velo {
  position: absolute;
  inset: -.5rem -.5rem;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .5rem;
  border: 1px dashed #CBBBA3;
  border-radius: 1rem;
  background: rgb(250 246 239 / .55);
  cursor: pointer;
  font: inherit;
  color: var(--texto);
}
.velo[hidden] { display: none; }
.velo-texto { display: flex; align-items: center; justify-content: center; gap: .4rem; font-size: .95rem; font-weight: 600; line-height: 1.3; text-align: center; color: var(--acento); }
@media (prefers-reduced-motion: no-preference) {
  .velo:hover { background: rgb(250 246 239 / .35); }
  .desvelado { animation: desvelar .7s var(--curva) both; }
}
@keyframes desvelar { from { opacity: 0; filter: blur(8px); } }

/* Formulario de Tally */
#formulario iframe { display: block; width: 100%; min-height: 320px; border: 0; }
#formulario iframe.sin-ajuste { min-height: 900px; }   /* si no se pudo ajustar la altura */
.abrir-formulario { text-align: center; font-size: 1rem; }

/* Galería: carrusel horizontal (se desliza con el dedo o con las flechas) */
.galeria {
  display: flex;
  width: 100%;          /* nunca más ancha que la pantalla (si no, la página se desplaza en horizontal) */
  min-width: 0;
  gap: .75rem;
  margin-top: 1.25rem;
  padding: .25rem .25rem .75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.galeria::-webkit-scrollbar { display: none; }
.galeria figure { flex: 0 0 auto; margin: 0; scroll-snap-align: center; }
.galeria picture { display: block; overflow: hidden; border-radius: .9rem; box-shadow: var(--sombra); }
/* Cada foto cabe entera: alto máximo y, como mucho, el 82 % del ancho (asoma la siguiente) */
.galeria img { width: auto; height: auto; max-width: min(82vw, 40rem); max-height: min(46vh, 24rem); max-height: min(46svh, 24rem); }
.galeria figcaption {
  text-align: center;
  font-family: var(--titulos);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--texto-suave);
  margin-top: .35rem;
}
.galeria-controles { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: .25rem; }
.galeria-controles button {
  width: 2.75rem; height: 2.75rem;
  border: 1px solid var(--linea); border-radius: 50%;
  background: var(--tarjeta); color: var(--acento);
  font: inherit; font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.galeria-pista { font-size: .95rem; color: var(--texto-suave); }
@media (prefers-reduced-motion: no-preference) {
  .js .galeria .revelar img { transform: scale(1.08); transition: transform 1.4s var(--curva); }
  .js .galeria .revelar.visible img { transform: none; }
}

/* Pie */
.pie {
  text-align: center;
  padding: 4rem 1.25rem calc(4rem + env(safe-area-inset-bottom));
  background: var(--acento);
  color: #F7EDEE;
}
.pie p { margin: .25rem 0; }
.pie-nombres { font-family: var(--titulos); font-size: 2.4rem; color: #fff; }
.pie .amp { color: #E9D8B8; }
.pie-fecha { letter-spacing: .25em; font-size: .95rem; margin-top: .75rem !important; }

.centrado { text-align: center; }

/* ───────── Día de la boda: "Ahora" ───────── */
.ahora {
  margin: 2rem auto 1rem;
  max-width: 26rem;
  padding: 1.5rem 1.25rem;
  background: var(--tarjeta);
  border: 1px solid var(--linea);
  border-radius: 1.25rem;
  box-shadow: var(--sombra);
}
.ahora p { margin: 0 0 .35rem; }
.ahora-etiqueta {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .9rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--olivo);
}
.ahora-punto { width: .6rem; height: .6rem; border-radius: 50%; background: #3F8A4A; }
@media (prefers-reduced-motion: no-preference) {
  .ahora-punto { animation: latido 1.6s ease-in-out infinite; }
}
@keyframes latido { 0%, 100% { box-shadow: 0 0 0 0 rgb(63 138 74 / .5); } 50% { box-shadow: 0 0 0 7px rgb(63 138 74 / 0); } }
.ahora-titulo { font-family: var(--titulos); font-size: 2rem; font-weight: 600; line-height: 1.1; color: var(--acento); }
.ahora-lugar { font-size: 1.2rem; font-weight: 600; }
.ahora-direccion { color: var(--texto-suave); font-size: 1rem; margin-bottom: 1rem !important; }
.ahora-despues { margin-top: 1rem !important; color: var(--texto-suave); font-size: 1rem; font-style: italic; }

/* ───────── Botón grande y botón flotante de confirmar ───────── */
.boton-grande { min-height: 3.75rem; padding: .9rem 2.2rem; font-size: 1.2rem; }

.cta-flotante {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: calc(1rem + env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 3.5rem;
  padding: .8rem 1.6rem;
  border-radius: 999px;
  background: var(--acento);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 10px 30px -8px rgb(94 34 44 / .55), 0 0 0 4px rgb(250 246 239 / .6);
  transform: translate(-50%, 160%);
  opacity: 0;
  visibility: hidden;
  transition: transform .45s var(--curva), opacity .3s, visibility 0s .45s;
}
.cta-flotante.mostrar {
  transform: translate(-50%, 0);
  opacity: 1;
  visibility: visible;
  transition: transform .45s var(--curva), opacity .3s, visibility 0s;
}
@media (prefers-reduced-motion: reduce) {
  .cta-flotante, .cta-flotante.mostrar { transition: none; }
}

/* ───────── Contacto ───────── */
.contacto-lista {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}
@media (min-width: 40rem) { .contacto-lista { grid-template-columns: 1fr 1fr; } }
.contacto-tarjeta {
  background: var(--tarjeta);
  border: 1px solid var(--linea);
  border-radius: 1.25rem;
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--sombra);
}
.contacto-numero { margin: 0 0 1rem; color: var(--texto-suave); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.contacto-botones { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }
.contacto-botones .boton { flex: 1 1 8rem; }
@media (max-width: 40rem) {
  .contacto-tarjeta { padding: 1.1rem 1rem; }
  .contacto-tarjeta h3 { font-size: 1.5rem; margin-bottom: .1rem; }
  .contacto-numero { margin-bottom: .75rem; font-size: 1rem; }
  .contacto-botones { flex-wrap: nowrap; gap: .5rem; }
  .contacto-botones .boton { flex: 1 1 0; min-height: 2.6rem; padding: .4rem .75rem; font-size: .95rem; box-shadow: none; }
}
.boton-whatsapp { background: #1F7A4D; box-shadow: 0 6px 16px -8px rgb(31 122 77 / .6); }
.boton-whatsapp:hover { background: #17603C; }

/* ───────── Página /confirmar-asistencia ───────── */
.pagina-simple .barra { background: rgb(250 246 239 / .9); box-shadow: 0 1px 0 var(--linea); }
.pagina-simple main { padding-top: calc(var(--alto-barra) + env(safe-area-inset-top)); }
.pagina-simple .monograma { background: transparent; }
.gracias .boton.secundario { background: transparent; color: var(--acento); box-shadow: inset 0 0 0 2px var(--acento); }
.pagina-simple .seccion { padding-top: 3rem; }
.gracias { text-align: center; }
.gracias-icono { font-size: 3rem; margin: 0; }
@media (prefers-reduced-motion: no-preference) {
  .gracias:not([hidden]) { animation: entrar .8s var(--curva) both; }
}

/* ───────── Botón secundario (p. ej. Waze el día de la boda) ───────── */
.boton-secundario {
  background: var(--tarjeta);
  color: var(--acento);
  box-shadow: inset 0 0 0 2px var(--acento);
}
.boton-secundario:hover { background: var(--fondo-alt); }
.ahora-acciones { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }


/* ───────── Galería: fotos que se abren a pantalla completa ───────── */
.foto-boton {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  border-radius: .9rem;
}
.foto-boton picture { transition: transform .3s var(--curva), box-shadow .3s; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .foto-boton:hover picture { transform: translateY(-2px); box-shadow: 0 14px 30px -14px rgb(60 40 30 / .45); }
}

body.visor-abierto .barra,
body.visor-abierto .cta-flotante { visibility: hidden; }
.visor {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgb(22 18 16 / .95);
  touch-action: pan-y pinch-zoom;   /* el deslizamiento lateral lo gestiona la web */
  -webkit-user-select: none;
  user-select: none;
}
@media (prefers-reduced-motion: no-preference) {
  .visor:not([hidden]) { animation: visor-entrar .25s ease-out; }
  .visor img.entra { animation: foto-cambiar .35s var(--curva); }
}
@keyframes visor-entrar { from { opacity: 0; } }
@keyframes foto-cambiar { from { opacity: 0; transform: scale(.97); } }
.visor-figura {
  position: absolute;
  inset: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  padding: 4rem .75rem 4.5rem;
}
.visor-figura picture { display: contents; }
.visor-figura img {
  max-width: 100%;
  max-height: calc(100vh - 10rem);
  max-height: calc(100svh - 10rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: .5rem;
  box-shadow: 0 20px 60px rgb(0 0 0 / .5);
}
.visor-pie {
  margin: 0;
  color: #F3ECE0;
  font-family: var(--titulos);
  font-style: italic;
  font-size: 1.4rem;
  text-align: center;
}
.visor-boton {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / .14);
  color: #fff;
  font: inherit;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.visor-boton:hover { background: rgb(255 255 255 / .26); }
.visor-boton:focus-visible { outline-color: #fff; }
.visor-cerrar { top: calc(.75rem + env(safe-area-inset-top)); right: .75rem; font-size: 1.3rem; }
.visor-anterior, .visor-siguiente { top: 50%; transform: translateY(-50%); font-size: 2.2rem; }
.visor-anterior { left: .75rem; }
.visor-siguiente { right: .75rem; }
/* En el móvil las flechas van abajo, para no tapar la foto */
@media (max-width: 40rem) {
  .visor-anterior, .visor-siguiente { top: auto; bottom: calc(.9rem + env(safe-area-inset-bottom)); transform: none; }
  .visor-anterior { left: 1rem; }
  .visor-siguiente { right: 1rem; }
}
.visor-contador {
  position: absolute;
  left: 50%;
  bottom: calc(1.6rem + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  margin: 0;
  color: #D8CFC3;
  font-size: .95rem;
  letter-spacing: .12em;
  font-variant-numeric: tabular-nums;
}

/* ───────── Juego (pantalla completa) ───────── */
.juego-pantalla {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  background: #231D1A;
  color: #fff;
  touch-action: none;           /* que tocar no mueva ni amplíe la página */
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.juego-barra {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  width: 100%;
  max-width: 60rem;
  padding: .25rem 1rem;
}
.juego-nivel { font-family: var(--titulos); font-size: 1.5rem; font-weight: 600; }
.juego-marcador { display: flex; gap: .75rem; align-items: center; font-size: 1.2rem; }
.juego-vidas { letter-spacing: .1em; color: #E0526B; }
.juego-vidas .perdida { color: #6A5F5A; }
.juego-cerrar {
  font: inherit;
  font-size: 1.4rem;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / .15);
  color: #fff;
  cursor: pointer;
}
.juego-zona {
  position: relative;
  width: min(100vw, calc((100vh - 11rem) * 1.5));
  width: min(100vw, calc((100dvh - 11rem) * 1.5));
  aspect-ratio: 3 / 2;
}
.juego-zona canvas { display: block; width: 100%; height: 100%; }

.juego-cartel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: 1rem;
  overflow: auto;
  text-align: center;
  background: rgb(250 246 239 / .93);
  color: var(--texto);
}
.juego-cartel p { margin: 0; max-width: 30rem; }
.juego-cartel-titulo { font-family: var(--titulos); font-size: 1.7rem; font-weight: 600; line-height: 1.15; color: var(--acento); }
.juego-cartel-texto { font-size: 1.1rem; }
.juego-cartel-botones { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: .25rem; }
.juego-cartel-botones .boton { min-height: 2.9rem; padding: .5rem 1.3rem; }
.juego-cartel-botones .secundario { background: transparent; color: var(--acento); box-shadow: inset 0 0 0 2px var(--acento); }

.juego-controles {
  display: flex;
  gap: 1rem;
  width: 100%;
  max-width: 40rem;
  padding: 0 1rem .5rem;
}
.juego-controles button {
  flex: 1;
  min-height: 4.5rem;
  border: 0;
  border-radius: 1rem;
  background: var(--acento);
  color: #fff;
  font: inherit;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: none;
}
.juego-controles button:active,
.juego-controles button.pulsado { background: var(--acento-oscuro); transform: translateY(2px); }

/* Móvil en horizontal: botones a los lados, encima del juego, para dejarle toda la altura */
@media (orientation: landscape) and (max-height: 540px) {
  .juego-barra { padding: 0 1rem; }
  .juego-nivel { font-size: 1.2rem; }
  .juego-cerrar { width: 2.5rem; height: 2.5rem; }
  .juego-zona {
    width: min(100vw, calc((100vh - 3.5rem) * 1.5));
    width: min(100vw, calc((100dvh - 3.5rem) * 1.5));
  }
  .juego-controles {
    position: absolute;
    inset: auto 0 .75rem 0;
    max-width: none;
    justify-content: space-between;
    pointer-events: none;
  }
  .juego-controles button {
    flex: 0 0 auto;
    width: 7.5rem;
    min-height: 4rem;
    font-size: 1.05rem;
    opacity: .85;
    pointer-events: auto;
  }
}

/* ───────── Ranking del juego ───────── */
.juego-ranking {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(1rem + env(safe-area-inset-top)) 1rem calc(1rem + env(safe-area-inset-bottom));
  background: rgb(35 29 26 / .92);
  overflow-y: auto;
  touch-action: auto;
  -webkit-user-select: text;
  user-select: text;
}
.juego-ranking-caja {
  width: min(26rem, 100%);
  max-height: 100%;
  overflow-y: auto;
  padding: 1.25rem 1.25rem 1.1rem;
  border-radius: 1.1rem;
  background: var(--fondo);
  color: var(--texto);
  text-align: center;
}
.juego-ranking-titulo { margin: 0 0 .75rem; font-size: 2rem; }
.juego-ranking-titulo::after { margin-top: .5rem; }
.juego-ranking-form { margin-bottom: .75rem; }
.juego-ranking-form label { display: block; margin-bottom: .5rem; font-size: 1.02rem; }
.juego-ranking-fila { display: flex; gap: .5rem; }
.juego-ranking-fila input {
  flex: 1;
  min-width: 0;
  min-height: 3rem;
  padding: 0 .9rem;
  border: 1px solid #CBBBA3;
  border-radius: .75rem;
  background: #fff;
  color: var(--texto);
  font: inherit;
  font-size: 1.1rem;   /* 16 px o más: así el iPhone no amplía la pantalla al escribir */
}
.juego-ranking-fila .boton { min-height: 3rem; padding: .5rem 1.1rem; }
.juego-ranking-estado { min-height: 1.4em; margin: .25rem 0 .5rem; color: var(--texto-suave); font-weight: 600; }
.juego-ranking-lista {
  list-style: none;
  counter-reset: puesto;
  margin: 0 0 1rem;
  padding: 0;
  text-align: left;
}
.juego-ranking-lista li {
  counter-increment: puesto;
  display: flex;
  align-items: baseline;
  gap: .6rem;
  padding: .45rem .6rem;
  border-bottom: 1px solid var(--linea);
  font-size: 1.02rem;
}
.juego-ranking-lista li::before {
  content: counter(puesto) ".";
  min-width: 1.8rem;
  color: var(--texto-suave);
  font-variant-numeric: tabular-nums;
}
.juego-ranking-lista li:nth-child(1)::before { content: "🥇"; }
.juego-ranking-lista li:nth-child(2)::before { content: "🥈"; }
.juego-ranking-lista li:nth-child(3)::before { content: "🥉"; }
.juego-ranking-lista .nombre { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.juego-ranking-lista .km { font-weight: 700; color: var(--acento); font-variant-numeric: tabular-nums; }
.juego-ranking-lista li.mia { background: var(--fondo-alt); border-radius: .5rem; font-weight: 700; }
.juego-ranking .secundario { background: transparent; color: var(--acento); box-shadow: inset 0 0 0 2px var(--acento); }

/* ───────── Scroll por secciones ─────────
   Cada apartado ocupa una pantalla (debajo de la barra) con toda su información, y el
   scroll se detiene siempre en un apartado completo. En pantallas muy bajas (móvil en
   horizontal) se desactiva y la página se desplaza normal. */
@media (min-height: 560px) {
  html { scroll-snap-type: y proximity; }

  /* Portada: exactamente una pantalla; la foto se adapta al hueco que deja el texto
     (también el día de la boda, con el recuadro "Ahora" y sus botones). */
  .portada {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100svh;
    scroll-snap-align: start;
  }
  .portada-marco { flex: 1 1 0; min-height: 18vh; height: auto; }
  .portada-texto { flex: none; margin-top: -3.5rem; padding-bottom: 1rem; }
  .nombres { font-size: clamp(2.6rem, min(14vw, 8vh), 6.5rem); }
  .portada-fecha { margin-top: .6rem; font-size: 1.6rem; }
  .cuenta { margin: 1.1rem 0 1rem; }
  .bajar { margin-top: .9rem; }
  .ahora { margin: 1rem auto .25rem; padding: 1.1rem 1rem; }

  main > .seccion {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(100vh - var(--alto-barra-real));
    min-height: calc(100svh - var(--alto-barra-real));
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    scroll-snap-align: start;
  }
  .pie { scroll-snap-align: end; }
  h2, .titulo-pagina { margin-bottom: 1.1rem; }
  h2::after, .titulo-pagina::after { margin-top: .6rem; }
}
@media (min-height: 680px) {
  html { scroll-snap-type: y mandatory; }
}
/* Móviles: hueco abajo para que el botón flotante "Confirmar asistencia" no tape nada */
@media (min-height: 560px) and (max-width: 40rem) {
  main > .seccion { padding-top: 1rem; padding-bottom: 4.25rem; }
  h2 { font-size: 2.3rem; }
  .kicker { margin-bottom: .1rem; }
  .cta-flotante { min-height: 3rem; padding: .6rem 1.3rem; font-size: 1rem; }
  /* Cuándo y dónde */
  .destacado { margin-bottom: .75rem; font-size: 1.3rem; }
  .itinerario li { margin-bottom: .75rem; }
  .tarjeta { padding: .85rem .9rem .9rem; }
  .tarjeta p { margin-bottom: .35rem; }
  .tarjeta h3 { font-size: 1.5rem; }
  .tarjeta .direccion { font-size: .95rem; margin-bottom: .7rem; }
  .tarjeta-acciones .boton { min-height: 2.75rem; padding: .45rem .9rem; font-size: 1rem; }
  /* Regalos */
  .texto-regalos { font-size: 1.2rem; margin-bottom: 1rem !important; }
  .cuenta-banco { padding: 1rem; }
  /* Nuestra historia */
  .galeria { margin-top: .9rem; }
  .galeria img { max-height: min(38vh, 24rem); max-height: min(38svh, 24rem); }
  /* Contacto */
  .contacto-lista { margin-top: 1rem; gap: .75rem; }
}
/* Móviles más bajos (Android pequeños): un poco más compacto todavía */
@media (min-height: 560px) and (max-height: 720px) and (max-width: 40rem) {
  main > .seccion { padding-top: .75rem; padding-bottom: 4rem; }
  .kicker { font-size: .8rem; }
  h2 { font-size: 2.1rem; margin-bottom: .8rem; }
  .destacado { font-size: 1.2rem; margin-bottom: .6rem; }
  .itinerario li { margin-bottom: .6rem; }
  .tarjeta h3 { font-size: 1.4rem; }
  .texto-regalos { font-size: 1.1rem; }
  .galeria img { max-height: 34vh; max-height: 34svh; }
}
/* Coreano en móvil: los nombres llevan el original entre paréntesis y el texto de regalos es más largo */
@media (min-height: 560px) and (max-width: 40rem) {
  :lang(ko) .tarjeta h3 { font-size: 1.2rem; }
  :lang(ko) .texto-regalos { font-size: 1rem; line-height: 1.6; }
  :lang(ko) .itinerario-hora.hora-texto { font-size: .9rem; }
}
/* Día de la boda: el recuadro "Ahora" con Google Maps y Waze en una sola línea, para que
   la portada completa quepa en una pantalla */
.ahora-acciones { flex-wrap: nowrap; }
.ahora-acciones .boton { flex: 1 1 auto; min-height: 2.9rem; padding: .55rem .9rem; font-size: 1rem; }
@media (min-height: 560px) and (max-width: 40rem) {
  .ahora { padding: .9rem .9rem 1rem; }
  .ahora-titulo { font-size: 1.75rem; }
  .ahora-lugar { font-size: 1.1rem; }
  .ahora-direccion { font-size: .95rem; margin-bottom: .7rem !important; }
  .ahora-despues { margin-top: .6rem !important; font-size: .92rem; }
  html[data-momento="dia"] .bajar { margin-top: .5rem; }
}

/* ───────── Juego en el móvil en vertical: ocupa toda la pantalla ─────────
   Marcador arriba, zona de juego con todo el alto disponible (más cielo) y botones
   grandes abajo, donde llega el pulgar. */
@media (orientation: portrait) and (max-width: 40rem) {
  .juego-pantalla { justify-content: flex-start; gap: 0; }
  .juego-barra { padding: .4rem .75rem; }
  .juego-zona { flex: 1 1 0; min-height: 0; width: 100%; aspect-ratio: auto; }
  .juego-controles {
    gap: .75rem;
    padding: .75rem .75rem calc(.75rem + env(safe-area-inset-bottom));
    max-width: none;
  }
  .juego-controles button { min-height: 5.25rem; border-radius: 1.25rem; font-size: 1.35rem; }
}
/* Marcador del juego en una sola línea (nombres de etapa largos como "De Madrid a Jerez") */
.juego-nivel { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.juego-marcador { flex: none; white-space: nowrap; }
@media (max-width: 40rem) {
  .juego-nivel { font-size: 1.2rem; }
  .juego-marcador { font-size: 1.05rem; gap: .5rem; }
}

/* ───────── Páginas secundarias (confirmar asistencia, alojamiento): scroll normal ───────── */
html.sin-secciones { scroll-snap-type: none; }
html.sin-secciones main > .seccion { display: block; min-height: 0; padding-bottom: 3rem; }

/* ───────── Alojamiento: carrusel en la web (resumen + un hotel por pantalla) ───────── */
.aloj-carrusel {
  display: flex;
  width: 100%;          /* nunca más ancho que la pantalla */
  min-width: 0;
  gap: .75rem;
  padding: .25rem .25rem .75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.aloj-carrusel::-webkit-scrollbar { display: none; }
/* Cada diapositiva ocupa casi todo el ancho: asoma la siguiente para invitar a deslizar */
.aloj-diapositiva {
  flex: 0 0 88%;
  max-width: 26rem;
  min-width: 0;
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: 1rem 1rem 1.1rem;
  border: 1px solid var(--linea);
  border-radius: 1.1rem;
  background: var(--tarjeta);
  box-shadow: var(--sombra);
}
.aloj-diapositiva p { margin: 0; }
.aloj-diapositiva > .boton { margin-top: auto; min-height: 2.9rem; padding: .5rem 1rem; font-size: 1rem; }
.aloj-portada > p { font-size: 1rem; text-align: center; }
/* Foto en el carrusel: ocupa el hueco que queda (todas las tarjetas miden lo mismo) */
.aloj-hotel-foto { position: relative; display: block; flex: 1 1 0; min-height: 4.5rem; max-height: 12rem; margin: -1rem -1rem .1rem; overflow: hidden; border-radius: 1.05rem 1.05rem 0 0; background: var(--fondo-alt); }
.aloj-hotel-foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.aloj-hotel-zona { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--olivo); }
:lang(ko) .aloj-hotel-zona { letter-spacing: .03em; }
.aloj-hotel .hotel-nombre { font-size: 1.45rem; }
.aloj-hotel-linea { font-size: .92rem; color: var(--texto-suave); }
.aloj-hotel-oferta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem .5rem;
  padding: .6rem .7rem;
  border-radius: .8rem;
  background: var(--fondo-alt);
}
.aloj-hotel-oferta .codigo { font-size: .98rem; }
.hotel-sinreserva { font-style: italic; color: var(--texto-suave); }
.aloj-hotel .hotel-sinreserva { margin-top: auto !important; text-align: center; }

.aloj-resumen {
  list-style: none;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
}
.aloj-resumen li { border-bottom: 1px solid var(--linea); }
.aloj-resumen-fila {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  width: 100%;
  padding: .14rem .2rem;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-size: .93rem;
  text-align: left;
  cursor: pointer;
}
.aloj-resumen-fila:hover .aloj-resumen-nombre { color: var(--acento); }
.aloj-resumen-nombre { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.insignia {
  flex: none;
  display: inline-block;
  padding: .1rem .55rem;
  border-radius: 999px;
  background: var(--acento);
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ───────── Alojamiento: página ───────── */
.aloj-pagina { max-width: calc(48rem + 2.5rem); }
.zona { margin-bottom: 2.5rem; }
.zona-titulo { font-size: 2rem; margin-bottom: .5rem; }
.zona-titulo::after { margin-top: .5rem; }
.zona-nota { text-align: center; color: var(--texto-suave); margin: 0 0 1rem; }
.hoteles-rejilla { display: grid; gap: 1rem; }
@media (min-width: 48rem) { .hoteles-rejilla { grid-template-columns: 1fr 1fr; } }

.hotel {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  padding: 1.15rem 1.1rem 1.1rem;
  border: 1px solid var(--linea);
  border-radius: 1.1rem;
  background: var(--tarjeta);
  box-shadow: var(--sombra);
  scroll-margin-top: 1rem;   /* la barra ya la descuenta el scroll-padding de html */
}
.hotel p, .hotel dl { margin: 0; }
/* Foto del hotel: arriba, a todo lo ancho de la tarjeta */
.hotel-foto { display: block; margin: -1.15rem -1.1rem .15rem; }
.hotel-foto img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 1.05rem 1.05rem 0 0; background: var(--fondo-alt); }
.hotel-nombre { margin: 0; font-size: 1.55rem; line-height: 1.15; }
.hotel-meta { display: flex; gap: .9rem; align-items: baseline; }
.hotel-estrellas { color: #C9A227; letter-spacing: .1em; }
.hotel-precio { font-weight: 700; color: var(--olivo); letter-spacing: .05em; }
.hotel-precio-resto { color: var(--linea); }
.hotel-direccion { font-size: 1rem; color: var(--texto-suave); }
.hotel-oferta {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  padding: .75rem .85rem;
  border-radius: .8rem;
  background: var(--fondo-alt);
}
.hotel-oferta-titulo { display: flex; align-items: center; gap: .6rem; font-weight: 700; }
.hotel-codigo { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; }
.etiqueta-codigo { font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--texto-suave); }
.codigo {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 1.05rem;
  font-weight: 700;
  padding: .15rem .5rem;
  border: 1px dashed #CBBBA3;
  border-radius: .4rem;
  background: var(--tarjeta);
  /* Es un botón: al tocarlo se copia */
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 2.3rem;
  color: var(--texto);
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}
.codigo:hover { border-color: var(--acento); }
.codigo-icono { font-family: var(--cuerpo); font-size: .8rem; font-weight: 700; }
.codigo.copiado { border-style: solid; border-color: var(--olivo); }
.codigo.copiado .codigo-icono { color: var(--olivo); }
.boton-copiar {
  min-height: 2.5rem;
  padding: .3rem .8rem;
  border: 2px solid var(--acento);
  border-radius: 999px;
  background: transparent;
  color: var(--acento);
  font: inherit;
  font-size: .92rem;
  font-weight: 700;
  cursor: pointer;
}
.hotel-caduca { font-size: .9rem; color: var(--texto-suave); }
.hotel-reserva { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; }
.hotel-reserva h4 {
  margin: .2rem 0 0;
  font-size: .85rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--olivo);
}
:lang(ko) .hotel-reserva h4 { letter-spacing: .03em; }
.hotel-reserva .boton { min-height: 2.9rem; padding: .55rem 1.1rem; font-size: 1rem; }
.hotel-proximamente { font-style: italic; color: var(--texto-suave); }
.nota-pequena { font-size: .9rem; color: var(--texto-suave); }

.condiciones { border-top: 1px solid var(--linea); padding-top: .5rem; }
.condiciones summary { cursor: pointer; font-weight: 700; color: var(--acento); min-height: 2.5rem; display: flex; align-items: center; }
.condiciones ul { margin: .25rem 0 0; padding-left: 1.2rem; font-size: .95rem; }
.condiciones li { margin-bottom: .4rem; }

.hotel-reserva p { font-size: 1rem; }
/* Precios especiales (Virrey Laserna) */
.precios-boda { margin: 0; padding-left: 1.15rem; font-size: 1rem; }
.precios-boda li { margin-bottom: .15rem; }
.precio-antes { margin-right: .35rem; color: var(--texto-suave); }
.precio-ahora { color: var(--acento); font-size: 1.08rem; }
/* Soho e Itaca: "Reserva por email" y el botón del email, en el recuadro del descuento */
.oferta-email { font-weight: 700; }
.hotel-oferta .boton { align-self: flex-start; min-height: 2.9rem; padding: .55rem 1.1rem; font-size: 1rem; }
/* "Más información para hacer la reserva": mismo aspecto que "Condiciones" */
.mas-info > :not(summary) { font-size: .95rem; }
.mas-info p { margin: .25rem 0; }
.mas-info ul { margin: .25rem 0 .6rem; padding-left: 1.2rem; }
.mas-info li { margin-bottom: .2rem; }

/* ───────── Autobuses ───────── */
/* Ida y vuelta en una sola tarjeta */
.bus-rutas {
  width: 100%;
  margin-top: 1rem;
  margin-bottom: .9rem;
  padding: .3rem 1rem;
  list-style: none;
  border: 1px solid var(--linea);
  border-radius: 1rem;
  background: var(--tarjeta);
  box-shadow: var(--sombra);
  font-size: 1rem;
}
.bus-rutas li { padding: .6rem 0; }
.bus-rutas li + li { border-top: 1px solid var(--linea); }
.bus-etiqueta { display: block; margin-bottom: .15rem; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--olivo); }
:lang(ko) .bus-etiqueta { letter-spacing: .03em; }
.bus-paradas { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .45rem; }
.bus-parada { padding: .15rem .65rem; border-radius: 999px; background: #F6E3BC; font-size: .88rem; font-weight: 600; }
.bus-pie { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 .75rem; margin-top: .25rem; }
.bus-confirmar { font-size: .88rem; font-style: italic; color: var(--texto-suave); }
.bus-confirmar[hidden] { display: none; }
.bus-mapa, .aloj-mapa { display: inline-flex; align-items: center; gap: .3rem; min-height: 2.5rem; font-size: .92rem; font-weight: 700; color: var(--acento); }
/* Alojamiento: entre las flechas del carrusel, la pista y debajo "Ver en el mapa" (cabe en la altura de las flechas) */
.aloj-controles-centro { display: flex; flex-direction: column; align-items: center; line-height: 1.25; text-align: center; }
.aloj-controles-centro .galeria-pista { font-size: .88rem; }
.aloj-mapa { min-height: 1.6rem; }
/* "Horarios y cómo solicitarlo: próximamente": una línea sencilla, sin recuadro */
.bus-proximamente { padding: 0; border: 0; background: none; font-size: .98rem; }
/* Móvil: todo Autobuses en una pantalla */
@media (min-height: 560px) and (max-width: 40rem) {
  #autobuses > p[data-t="bus.intro"] { margin-top: .6rem; margin-bottom: .6rem; font-size: 1rem; }
}
@media (min-height: 560px) and (max-height: 720px) and (max-width: 40rem) {
  .bus-rutas li { padding: .45rem 0; }
  /* Coreano: la barra es más alta (aviso de traducción) y los textos, más largos */
  :lang(ko) #autobuses > p[data-t="bus.intro"] { font-size: .95rem; }
  :lang(ko) .bus-rutas { font-size: .93rem; }
  :lang(ko) .bus-parada { font-size: .82rem; }
  /* Cuándo y dónde en coreano (los nombres llevan el original entre paréntesis) */
  :lang(ko) .tarjeta h3 { font-size: 1.08rem; }
  :lang(ko) .tarjeta .direccion { font-size: .88rem; margin-bottom: .55rem; }
  /* Regalos en coreano (texto más largo y nota de envíos desde el extranjero) */
  :lang(ko) .texto-regalos { font-size: .95rem; line-height: 1.45; }
  :lang(ko) #regalos .nota { margin-top: .5rem; margin-bottom: 0; font-size: .85rem; }
}
@media (min-height: 560px) and (max-height: 720px) and (max-width: 40rem) {
  .aloj-portada > p { font-size: .98rem; }
  .aloj-portada > .boton > span[aria-hidden] { display: none; }   /* sin icono, el botón cabe en una línea */
  .aloj-resumen-fila { padding: .08rem .2rem; font-size: .9rem; }
  .aloj-resumen .insignia { font-size: .8rem; padding: .05rem .5rem; }
  .aloj-diapositiva { gap: .4rem; padding: .85rem .9rem .95rem; }
  .aloj-hotel-foto { margin: -.85rem -.9rem .1rem; }
  .aloj-hotel .hotel-nombre { font-size: 1.3rem; }
  #alojamiento .galeria-controles button { width: 2.5rem; height: 2.5rem; }
}

/* En Alojamiento no sale el botón flotante: no hace falta dejarle hueco abajo */
@media (min-height: 560px) and (max-width: 40rem) {
  main > #alojamiento { padding-bottom: 1.5rem; }
}

/* Botón de cerrar (mapa) */
.dialogo-cerrar {
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--linea);
  border-radius: 50%;
  background: var(--tarjeta);
  color: var(--texto);
  font: inherit;
  font-size: 1.1rem;
  cursor: pointer;
}
/* ───────── Mapa de hoteles (página /alojamiento) ───────── */
/* Texto solo para lectores de pantalla */
.solo-lectores {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.boton-mapa { min-height: 2.9rem; padding: .5rem 1.2rem; font-size: 1rem; }
.mapa-dialogo {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--fondo);
  color: var(--texto);
}
.mapa-dialogo[open] { display: flex; flex-direction: column; }
.mapa-dialogo::backdrop { background: var(--fondo); }
.mapa-cabecera {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: calc(.5rem + env(safe-area-inset-top)) .75rem .5rem;
  border-bottom: 1px solid var(--linea);
}
.mapa-vistas { display: flex; flex: 1; gap: .4rem; }
.mapa-vistas button {
  min-height: 2.75rem;
  padding: .3rem .95rem;
  border: 2px solid var(--acento);
  border-radius: 999px;
  background: transparent;
  color: var(--acento);
  font: inherit;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
}
.mapa-vistas button[aria-pressed="true"] { background: var(--acento); color: #fff; }
.mapa-dialogo .dialogo-cerrar { flex: none; }
.mapa-cuerpo { position: relative; flex: 1 1 auto; min-height: 0; }
.mapa-lienzo { position: absolute; inset: 0; background: #EDE6D8; }
.mapa-estado {
  position: absolute;
  z-index: 1000;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(20rem, calc(100% - 2rem));
  margin: 0;
  padding: 1rem;
  border-radius: .9rem;
  background: var(--tarjeta);
  box-shadow: var(--sombra);
  text-align: center;
}
.mapa-leyenda {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1rem;
  margin: 0;
  padding: .6rem .9rem calc(.6rem + env(safe-area-inset-bottom));
  list-style: none;
  border-top: 1px solid var(--linea);
  font-size: .88rem;
  line-height: 1.3;
}
.mapa-leyenda li { display: flex; align-items: center; gap: .4rem; }

/* Marcas: círculos con un icono (la iglesia y la finca, más grandes) */
.marca {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgb(30 20 15 / .4);
  line-height: 1;
}
.marca-iglesia { background: var(--acento); }
.marca-finca { background: var(--olivo); }
.marca-hotel { background: #fff; border-color: var(--acento); }
.marca-bus { background: #E8A93A; }
.mapa-leyenda .marca { width: 1.6rem; height: 1.6rem; font-size: .8rem; border-width: 1.5px; }
.marca-mapa .marca { width: 100%; height: 100%; font-size: 1rem; }
.marca-mapa .marca-iglesia, .marca-mapa .marca-finca { font-size: 1.35rem; border-width: 3px; }
.marca-mapa .marca-extra { position: absolute; top: -9px; right: -11px; width: 20px; height: 20px; font-size: 11px; border-width: 1.5px; }
.mapa-dialogo .leaflet-tooltip.etiqueta-mapa {
  padding: .2rem .5rem;
  border: 0;
  border-radius: .45rem;
  background: rgb(255 255 255 / .95);
  box-shadow: 0 1px 4px rgb(30 20 15 / .3);
  color: var(--texto);
  font: 700 .85rem/1.3 var(--cuerpo);
}
.mapa-dialogo .leaflet-tooltip.etiqueta-mapa::before { display: none; }
.etiqueta-mapa small { display: block; font-size: .78rem; font-weight: 600; color: var(--texto-suave); }
.mapa-lejos .etiqueta-parada { visibility: hidden; }   /* "hidden" y no "none": así conservan su tamaño y se colocan bien */
.mapa-dialogo .leaflet-popup-content { margin: .85rem .9rem; font: .95rem/1.4 var(--cuerpo); }
.mapa-dialogo .leaflet-popup-content p { margin: 0; }
.mapa-dialogo .leaflet-container a.leaflet-popup-close-button { width: 2rem; height: 2rem; font-size: 1.4rem; line-height: 2rem; }
.popup-hotel { display: flex; flex-direction: column; gap: .45rem; }
.popup-foto img { display: block; width: 100%; height: 7.5rem; object-fit: cover; border-radius: .6rem; background: var(--fondo-alt); }
.popup-nombre { margin-right: 1.25rem !important; font-family: var(--titulos); font-size: 1.3rem; font-weight: 600; line-height: 1.15; color: var(--acento); }
.popup-hotel .boton { min-height: 2.6rem; padding: .4rem .9rem; font-size: .92rem; color: #fff; }

/* ───────── Ordenador (pantallas anchas) ─────────
   En móvil no cambia nada. A partir de 64rem (unos 1024 px) se aprovecha el ancho. */
.barra-cta { display: none; }
@media (min-width: 64rem) {
  /* Barra: "Confirmar asistencia" siempre a la vista; el botón flotante sobra */
  .barra-cta:not([hidden]) { display: inline-flex; min-height: 2.6rem; padding: .4rem 1.1rem; font-size: .95rem; margin-right: .35rem; }
  .cta-flotante { display: none; }
  .barra-fila { padding-left: 1.75rem; padding-right: 1.75rem; }

  /* Cuándo y dónde: misa y celebración, una al lado de la otra, con la línea en horizontal */
  main > #cuando { max-width: calc(60rem + 2.5rem); }
  .itinerario { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; max-width: 58rem; }
  .itinerario::before { left: .35rem; right: 0; top: 1.15rem; bottom: auto; width: auto; height: 2px; }
  .itinerario li { grid-template-columns: 1fr; gap: .9rem; margin: 0; }
  .itinerario li::before { left: 0; top: .85rem; }
  /* La línea pasa por detrás de la hora (sin que parezca tachada) */
  .itinerario-hora { position: relative; z-index: 1; justify-self: start; margin: 0 0 0 1.1rem; padding: 0 .6rem; text-align: left; background: var(--fondo); }
  .itinerario-hora.hora-texto { padding-top: .35rem; }
  .itinerario .tarjeta { height: 100%; }

  /* Autobuses: ida y vuelta en dos columnas */
  .bus-rutas { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2rem; max-width: 52rem; padding: .5rem 1.5rem; }
  .bus-rutas li { padding: .9rem 0; }
  .bus-rutas li + li { border-top: 0; border-left: 1px solid var(--linea); padding-left: 2rem; }

  /* Alojamiento: tres tarjetas a la vez en el carrusel */
  main > #alojamiento { max-width: calc(72rem + 2.5rem); }
  .aloj-carrusel { gap: 1rem; }
  .aloj-diapositiva { flex-basis: calc((100% - 2rem) / 3); max-width: none; scroll-snap-align: start; }
  .aloj-hotel-foto { min-height: min(10rem, 18vh); max-height: 14rem; }

  /* Nuestra historia: la galería aprovecha el ancho */
  #historia .galeria, #historia .galeria-controles { max-width: 72rem; }
  .galeria img { max-height: min(44vh, 26rem); }

  /* Página de alojamiento: hoteles en tres columnas */
  .aloj-pagina { max-width: calc(74rem + 2.5rem); }
  .hoteles-rejilla { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
  .aloj-pagina > p, .zona-nota { max-width: 44rem; margin-left: auto; margin-right: auto; }
}
