/* Paleta y letras de Kamala (manual de marca). Las "tinta" son versiones oscuras de los mismos
   tonos para que el texto se lea: ningún color de la paleta pasa contraste AA sobre el crema. */
:root {
  --crema: #F1E8DD;
  --papel: #FBF7F1;
  --salvia: #A8BAA5;
  --verde: #799575;
  --verde-tinta: #4A6346;
  --lila: #C0B4CE;
  --violeta: #AB9BBE;
  --violeta-tinta: #5E4E73;
  --tierra: #A9957B;
  --tierra-claro: #E4D8C8;
  --tinta: #3B3631;
  --tinta-suave: #6E665C;
  --error: #9A3B2E;

  --display: 'Antic Didone', Georgia, serif;
  --texto: 'Quicksand', system-ui, sans-serif;
  --adorno: 'Italianno', cursive;

  --radio: 18px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 16px; }
html, body { margin: 0; }
body {
  background: var(--crema);
  color: var(--tinta);
  font-family: var(--texto);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--violeta-tinta); outline-offset: 2px; }
[hidden] { display: none !important; }
a { color: var(--verde-tinta); }

/* ───── Portada ───── */
.portada {
  position: relative;
  text-align: center;
  padding: 40px 16px 28px;
  overflow: hidden;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(192, 180, 206, .45), transparent 70%),
    radial-gradient(90% 60% at 100% 100%, rgba(168, 186, 165, .35), transparent 70%);
}
.cielo {
  display: block;
  width: min(360px, 92%);
  margin: 0 auto -18px;
  color: var(--violeta-tinta);
}
.cielo .sol { stroke: var(--violeta-tinta); }
.cielo .rayos { animation: late 5s ease-in-out infinite; }
.cielo .ola2 { stroke: var(--salvia); }
@keyframes late { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.cielo .ola { stroke: var(--verde); }
.cielo .gotas { color: var(--violeta); }
.estrella { transform-box: fill-box; transform-origin: center; animation: titila 4s ease-in-out infinite; }
.e2 { animation-delay: -1s; } .e3 { animation-delay: -2.2s; } .e4 { animation-delay: -3.1s; }
.gotas circle { animation: cae 6s ease-in-out infinite; }
.gotas circle:nth-child(2) { animation-delay: -1.5s; } .gotas circle:nth-child(3) { animation-delay: -3s; }
.gotas circle:nth-child(4) { animation-delay: -4.2s; } .gotas circle:nth-child(5) { animation-delay: -2.4s; }
@keyframes titila { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
@keyframes cae { 0%, 100% { transform: translateY(0); opacity: 1; } 50% { transform: translateY(6px); opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .estrella, .gotas circle, .cielo .rayos { animation: none; } html { scroll-behavior: auto; } }

.adorno {
  font-family: var(--adorno);
  font-size: 44px;
  line-height: 1;
  color: var(--verde);
  margin: 0;
}
h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(42px, 12vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}
.anfitriones {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: 13px;
  font-weight: 600;
  color: var(--tinta-suave);
}
.datos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 28px;
  margin: 22px auto 0;
  max-width: 480px;
}
.datos dt {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: var(--tinta-suave);
  font-weight: 600;
}
.datos dd { margin: 2px 0 0; font-size: 17px; font-weight: 500; }
.datos a { color: inherit; text-decoration-color: var(--salvia); text-underline-offset: 3px; }
.sep::before { content: " · "; color: var(--tierra); }

.pestanas {
  position: sticky; top: 0; z-index: 5;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 8px 12px;
  background: rgba(241, 232, 221, .92);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--tierra-claro);
}
.pestanas a {
  display: flex; align-items: center; justify-content: center;
  min-height: 44px; border-radius: 999px;
  color: var(--tinta-suave); text-decoration: none;
  font-weight: 700; font-size: 15px;
  transition: background-color .15s, color .15s;
}
.pestanas a[aria-selected="true"] { background: var(--verde-tinta); color: var(--papel); }
.pestanas a:not([aria-selected="true"]):hover { background: rgba(168, 186, 165, .25); color: var(--tinta); }
@media (min-width: 560px) { .pestanas { padding: 10px calc(50% - 260px); } }

.selector {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  padding: 4px; margin-bottom: 22px;
  border-radius: 999px; background: var(--tierra-claro);
}
.selector button {
  min-height: 40px; border: 0; border-radius: 999px;
  background: transparent; color: var(--tinta-suave);
  font-weight: 700; font-size: 14px;
}
.selector button[aria-pressed="true"] { background: var(--papel); color: var(--tinta); box-shadow: 0 1px 4px rgba(59, 54, 49, .12); }

/* ───── Secciones ───── */
main { padding: 0 16px; }
.seccion {
  max-width: 520px;
  margin: 0 auto;
  padding: 28px 0 8px;
  min-height: 70vh;
}
.numero {
  margin: 0;
  font-family: var(--display);
  color: var(--tierra);
  font-size: 15px;
  letter-spacing: .1em;
}
h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 34px;
  line-height: 1.1;
  margin: 2px 0 6px;
}
.bajada { margin: 0 0 18px; color: var(--tinta-suave); }

.tarjeta {
  background: var(--papel);
  border-radius: var(--radio);
  padding: 20px;
  box-shadow: 0 1px 0 rgba(59, 54, 49, .04), 0 10px 30px -18px rgba(94, 78, 115, .35);
}

/* ───── Formulario ───── */
.formulario { display: grid; gap: 18px; }
.campo { display: grid; gap: 6px; }
.campo > span { font-weight: 600; font-size: 14px; }
.campo em { font-style: normal; font-weight: 400; color: var(--tinta-suave); }
.dos { display: grid; gap: 18px; }
@media (min-width: 480px) { .dos { grid-template-columns: 1fr 1fr; } }
input:not([type]), input[type="text"], input[type="email"], input[type="tel"], textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--tierra-claro);
  border-radius: 12px;
  background: #fff;
  font-size: 16px; /* 16px evita que iOS haga zoom al tocar */
}
input:focus, textarea:focus { border-color: var(--verde); outline: none; box-shadow: 0 0 0 3px rgba(121, 149, 117, .25); }
textarea { resize: vertical; }

.opciones { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opciones legend { font-weight: 600; font-size: 14px; margin-bottom: 6px; padding: 0; }
.opcion { position: relative; }
.opcion input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opcion span {
  display: flex; align-items: center; justify-content: center;
  min-height: 48px; border-radius: 12px;
  border: 1px solid var(--tierra-claro); background: #fff;
  font-weight: 600;
  transition: background-color .15s, border-color .15s, color .15s;
}
.opcion input:checked + span { background: var(--verde-tinta); border-color: var(--verde-tinta); color: var(--papel); }
.opcion input:focus-visible + span { outline: 2px solid var(--violeta-tinta); outline-offset: 2px; }

.cuantos { display: grid; gap: 14px; }
.contador { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 600; font-size: 15px; }
.pasos { display: flex; align-items: center; gap: 4px; }
.pasos button {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--tierra-claro); background: #fff;
  font-size: 20px; line-height: 1;
}
.pasos button:disabled { opacity: .35; cursor: default; }
.pasos output { min-width: 32px; text-align: center; font-size: 18px; font-variant-numeric: tabular-nums; }

.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  border: 0; border-radius: 999px;
  background: var(--verde-tinta); color: var(--papel);
  font-weight: 700; letter-spacing: .01em;
  transition: background-color .15s, opacity .15s;
}
.boton:hover { background: #3d5239; }
.boton:disabled { opacity: .55; cursor: default; }
.boton-suave { background: transparent; color: var(--verde-tinta); box-shadow: inset 0 0 0 1px var(--salvia); }
.boton-suave:hover { background: rgba(168, 186, 165, .18); }
.boton-chico { min-height: 38px; padding: 0 16px; font-size: 14px; }
.boton-violeta { background: var(--violeta-tinta); }
.boton-violeta:hover { background: #4d3f60; }
.boton.cargando::after {
  content: ""; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: gira .7s linear infinite;
}
@keyframes gira { to { transform: rotate(360deg); } }

.error { margin: 0; color: var(--error); font-weight: 600; font-size: 14px; }
.cargando { color: var(--tinta-suave); }
.nota { margin: 0; font-size: 13px; color: var(--tinta-suave); }

#confirmado { display: grid; gap: 6px; justify-items: start; margin-bottom: 0; }
.ok-titulo { margin: 0; font-family: var(--display); font-size: 24px; }
.ok-detalle { margin: 0 0 10px; color: var(--tinta-suave); }

/* ───── Juego ───── */
.juego-pronto {
  display: flex; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, rgba(192, 180, 206, .5), rgba(168, 186, 165, .4));
}
.juego-pronto span {
  width: 76px; height: 92px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--papel);
  font-family: var(--display); font-size: 48px; color: var(--violeta-tinta);
}

/* ───── Regalos ───── */
.interruptor { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px; font-size: 14px; font-weight: 600; cursor: pointer; }
.interruptor input { width: 20px; height: 20px; accent-color: var(--verde-tinta); }

.categoria {
  margin: 30px 0 12px;
  font-family: var(--display); font-weight: 400;
  font-size: 22px; line-height: 1.2;
  color: var(--violeta-tinta);
}
.categoria:first-child { margin-top: 6px; }
.regalos { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.regalo {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  background: var(--papel);
  border-radius: var(--radio);
  padding: 16px;
  box-shadow: 0 1px 0 rgba(59, 54, 49, .04), 0 10px 30px -20px rgba(94, 78, 115, .35);
}
.regalo-foto {
  width: 64px; height: 64px; border-radius: 12px; object-fit: cover;
  background: var(--tierra-claro);
}
.regalo-icono {
  width: 64px; height: 64px; border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(192, 180, 206, .35); color: var(--violeta-tinta);
}
.regalo h4 { margin: 0; font-size: 17px; line-height: 1.3; font-weight: 700; }
.regalo .detalle { margin: 2px 0 0; color: var(--tinta-suave); font-size: 14px; }
.regalo .pie-regalo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; }
.regalo .estado { font-size: 13px; font-weight: 600; color: var(--tinta-suave); }
.regalo .ver { font-size: 14px; font-weight: 600; text-underline-offset: 3px; }
.regalo .acciones-regalo { margin-left: auto; display: flex; gap: 8px; }

.regalo.agotado { opacity: .62; }
.regalo.agotado h4 { text-decoration: line-through; text-decoration-color: var(--tierra); }
.regalo.mio { box-shadow: inset 0 0 0 2px var(--salvia), 0 10px 30px -20px rgba(94, 78, 115, .35); }
.sello {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: .02em;
}
.sello-mio { background: rgba(168, 186, 165, .4); color: var(--verde-tinta); }
.sello-agotado { background: var(--tierra-claro); color: var(--tinta-suave); }
.sello-grupo { background: rgba(192, 180, 206, .45); color: var(--violeta-tinta); }
.regalo .sellos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.regalo .links { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.nota-grupo { color: var(--violeta-tinta); font-weight: 600; }

/* ───── Aporte ───── */
.datos-banco { display: grid; gap: 16px; }
.fila-copia { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fila-copia strong { display: block; font-size: 18px; word-break: break-all; }
.fila-copia .cbu { font-size: 15px; font-variant-numeric: tabular-nums; }
.etiqueta { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .2em; font-weight: 600; color: var(--tinta-suave); }
.titular { margin: 0; color: var(--tinta-suave); font-size: 14px; }

/* ───── Pie ───── */
.pie { text-align: center; padding: 56px 16px 72px; }

/* ───── Diálogo de reserva ───── */
dialog {
  border: 0; padding: 0;
  width: 100%; max-width: 480px;
  margin: auto auto 0;
  border-radius: 24px 24px 0 0;
  background: var(--papel); color: var(--tinta);
  box-shadow: 0 -10px 40px rgba(59, 54, 49, .2);
}
dialog::backdrop { background: rgba(59, 54, 49, .35); }
dialog[open] { animation: sube .22s ease-out; }
@keyframes sube { from { transform: translateY(30px); opacity: 0; } }
@media (min-width: 560px) { dialog { margin: auto; border-radius: 24px; } }
#form-reserva { display: grid; gap: 16px; padding: 24px 20px calc(20px + env(safe-area-inset-bottom)); }
#form-reserva h3 { margin: -10px 0 0; font-family: var(--display); font-weight: 400; font-size: 26px; line-height: 1.15; }
.acciones { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }

/* ───── Tarjeta tocable ───── */
.regalo { cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; }
.regalo:hover { box-shadow: 0 1px 0 rgba(59, 54, 49, .04), 0 14px 34px -18px rgba(94, 78, 115, .45); }
.regalo:active { transform: scale(.99); }
.regalo .abrir {
  all: unset; cursor: pointer;
  font: inherit; font-weight: 700;
  display: inline;
}
.regalo .abrir:focus-visible { outline: 2px solid var(--violeta-tinta); outline-offset: 2px; border-radius: 4px; }
.regalo .abrir::after { content: " ›"; color: var(--tierra); font-weight: 400; }

/* ───── Ficha ───── */
.ficha { max-height: 92vh; overflow: auto; }
.ficha .cerrar {
  position: sticky; top: 10px; float: right; margin: 10px 10px -46px 0; z-index: 2;
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: rgba(251, 247, 241, .92); color: var(--tinta);
  font-size: 22px; line-height: 1; box-shadow: 0 1px 6px rgba(59, 54, 49, .18);
}
.ficha-foto { background: #fff; display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: 24px 24px 0 0; overflow: hidden; }
.ficha-foto img { width: 100%; height: 100%; object-fit: contain; }
.ficha-cuerpo { display: grid; gap: 12px; padding: 22px 20px calc(20px + env(safe-area-inset-bottom)); }
.ficha:has(.ficha-foto[hidden]) .ficha-cuerpo { padding-top: 56px; } /* sin foto: que la X no tape el título */
.ficha-cuerpo h3 { margin: -6px 0 0; font-family: var(--display); font-weight: 400; font-size: 28px; line-height: 1.15; }
.ficha-cuerpo .etiqueta:empty { display: none; }
.ficha-detalle { margin: 0; font-size: 16px; }
.ficha-desc { padding: 12px 14px; border-radius: 12px; background: var(--crema); }
.ficha-desc p { margin: 4px 0 0; font-size: 14px; color: var(--tinta-suave); }
.ficha .acciones { margin-top: 4px; }
.ficha .acciones:has(> :only-child) { grid-template-columns: 1fr; }

/* ───── Aviso flotante ───── */
.aviso {
  position: fixed; left: 50%; bottom: 20px;
  transform: translate(-50%, 140%);
  max-width: calc(100% - 32px);
  padding: 12px 18px; border-radius: 14px;
  background: var(--tinta); color: var(--papel);
  font-weight: 600; font-size: 14px;
  transition: transform .25s ease, visibility 0s .25s;
  visibility: hidden; /* vacío es tan chico que asomaba por el borde */
  z-index: 10;
}
.aviso.visible { transform: translate(-50%, 0); visibility: visible; transition: transform .25s ease; }
