@font-face {
  font-family: "Atkinson"; font-weight: 400; font-display: swap;
  src: url("/vendor/fuente/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Atkinson"; font-weight: 700; font-display: swap;
  src: url("/vendor/fuente/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2");
}
:root {
  --fondo: #f4efe6;
  --fondo-2: #ebe3d6;
  --tarjeta: #fffdf9;
  --texto: #1d2327;
  --suave: #545b62;
  --acento: #0b6b69;
  --acento-osc: #07504f;
  --acento-claro: #dcefec;
  --borde: #d9d0c1;
  --foco: #e8a33d;
  --sombra: 0 1px 2px rgba(60, 40, 10, 0.06), 0 6px 18px rgba(60, 40, 10, 0.08);
  --radio: 20px;
  font-size: 22px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--fondo); color: var(--texto);
  font-family: "Atkinson", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.4; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent;
}
h1 { font-size: 2rem; line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h2 { font-size: 1.45rem; line-height: 1.2; margin: 0 0 0.3em; }
p { margin: 0 0 0.8em; }
b { font-weight: 700; }
.entradilla { font-size: 1.15rem; color: var(--suave); }
.nota { color: var(--suave); font-size: 0.9rem; }
.pantalla { display: none; min-height: 100dvh; }
.pantalla.activa { display: block; animation: entrar 0.25s ease-out; }
@keyframes entrar { from { opacity: 0; transform: translateY(8px); } }
.centro { max-width: 680px; margin: 0 auto; padding: 32px 20px 48px; text-align: center; }

/* ------------------------------------------------------------ botones */
.btn {
  font: inherit; font-weight: 700; min-height: 68px; padding: 0 36px; border-radius: 999px;
  border: 3px solid var(--acento); background: var(--tarjeta); color: var(--acento);
  cursor: pointer; touch-action: manipulation; display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  transition: transform 0.08s, background 0.15s, box-shadow 0.15s;
}
.btn:active { transform: scale(0.97); }
.btn.principal { background: var(--acento); color: #fff; box-shadow: 0 4px 14px rgba(11, 107, 105, 0.3); }
.btn.principal:active { background: var(--acento-osc); }
.btn.grande { min-height: 80px; font-size: 1.2rem; min-width: 280px; margin-top: 12px; }
.btn.suave { border: 2px solid var(--borde); color: var(--texto); min-height: 60px; padding: 0 22px; background: var(--tarjeta); }
.btn:disabled { opacity: 0.35; cursor: default; box-shadow: none; transform: none; }
:focus-visible { outline: 4px solid var(--foco); outline-offset: 3px; }

/* ------------------------------------------------------------ portada */
.portada {
  min-height: 100dvh; max-width: 980px; margin: 0 auto; padding: 32px 20px 40px; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.portada h1 { font-size: 2.4rem; max-width: 22ch; margin: 8px auto 14px; }
.portada .entradilla { font-size: 1.2rem; max-width: 44ch; margin: 0 auto 26px; }
.desfile { display: flex; justify-content: center; align-items: flex-end; margin-bottom: 18px; }
.desfile img {
  width: 120px; height: 120px; object-fit: contain; margin: 0 -10px; border-radius: 50%;
  background: radial-gradient(circle at 50% 58%, #fff 0, #fff 52%, var(--fondo-2) 100%); box-shadow: var(--sombra);
  animation: flotar 4s ease-in-out infinite;
}
.desfile img:nth-child(2), .desfile img:nth-child(6) { width: 140px; height: 140px; animation-delay: -1s; z-index: 1; }
.desfile img:nth-child(3), .desfile img:nth-child(5) { width: 160px; height: 160px; animation-delay: -2s; z-index: 2; }
.desfile img:nth-child(4) { width: 200px; height: 200px; animation-delay: -3s; z-index: 3; }
@keyframes flotar { 50% { transform: translateY(-8px); } }
.portada .btn.grande { min-width: 320px; }
.pie { color: var(--suave); font-size: 0.9rem; margin-top: 18px; }

/* ------------------------------------------------------------ pasos */
.pasos { display: flex; align-items: center; gap: 12px; padding: 14px 20px; max-width: 900px; margin: 0 auto; }
.atras {
  flex: none; width: 60px; height: 60px; border-radius: 50%; border: 2px solid var(--borde); background: var(--tarjeta);
  font-size: 2rem; line-height: 1; color: var(--texto); cursor: pointer;
}
.pasos ol { list-style: none; display: flex; flex: 1; gap: 8px; margin: 0; padding: 0; counter-reset: paso; }
.pasos li { flex: 1; font-size: 0.85rem; color: var(--suave); padding-top: 10px; border-top: 6px solid var(--borde); counter-increment: paso; }
.pasos li::before { content: counter(paso) ". "; }
.pasos li.hecho { border-color: var(--acento); }
.pasos li.actual { color: var(--texto); font-weight: 700; }

/* ------------------------------------------------------------ datos */
fieldset { border: 0; padding: 0; margin: 12px 0 36px; }
legend { font-size: 1.35rem; font-weight: 700; margin: 0 auto 16px; }
.par { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.opcion {
  font: inherit; font-size: 1.3rem; font-weight: 700; min-height: 100px; border-radius: var(--radio);
  border: 3px solid var(--borde); background: var(--tarjeta); color: var(--texto); cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 14px; box-shadow: var(--sombra);
}
.opcion .marca { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--borde); flex: none; }
.opcion[aria-pressed="true"] { border-color: var(--acento); background: var(--acento-claro); color: var(--acento-osc); }
.opcion[aria-pressed="true"] .marca { border-color: var(--acento); background: var(--acento) radial-gradient(circle, #fff 0 30%, transparent 32%); }
.edad { display: flex; align-items: center; justify-content: center; gap: 18px; }
.edad-caja {
  display: flex; flex-direction: column; align-items: center; background: var(--tarjeta); border: 3px solid var(--borde);
  border-radius: var(--radio); padding: 6px 10px 8px; box-shadow: var(--sombra);
}
.edad-caja:focus-within { border-color: var(--acento); }
.edad-caja input {
  width: 3.4em; font: inherit; font-size: 2.4rem; font-weight: 700; text-align: center; border: 0; background: none; color: var(--texto); padding: 0;
}
.edad-caja input:focus { outline: none; }
.edad-caja span { font-size: 0.85rem; color: var(--suave); }
.redondo {
  width: 84px; height: 84px; border-radius: 50%; border: 3px solid var(--acento); background: var(--tarjeta);
  color: var(--acento); font-size: 2.4rem; font-weight: 700; line-height: 1; cursor: pointer; touch-action: manipulation; flex: none;
}
.redondo:active { background: var(--acento-claro); }

/* ------------------------------------------------------------ elegir */
.intro { text-align: center; padding: 6px 20px 10px; }
.intro p { color: var(--suave); }
.rejilla {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px;
  padding: 10px 20px 170px; max-width: 1240px; margin: 0 auto;
}
.tarjeta {
  position: relative; font: inherit; color: inherit; text-align: center; padding: 0 0 14px; overflow: hidden;
  border-radius: var(--radio); border: 3px solid transparent; background: var(--tarjeta); box-shadow: var(--sombra);
  cursor: pointer; transition: transform 0.12s, box-shadow 0.12s;
}
.tarjeta:active { transform: scale(0.98); }
.tarjeta .foto { display: block; background: radial-gradient(circle at 50% 62%, #fff 0, #fff 45%, #efe8dc 100%); padding: 10px; }
.tarjeta img { width: 100%; aspect-ratio: 1; object-fit: contain; display: block; }
.tarjeta .nombre { display: block; font-size: 1.15rem; font-weight: 700; margin-top: 10px; }
.tarjeta .ver { display: block; font-size: 0.85rem; color: var(--acento); }
.tarjeta.elegido { border-color: var(--acento); }
.tarjeta.elegido .ver { display: none; }
.tarjeta .sello {
  position: absolute; top: 10px; right: 10px; padding: 6px 14px 6px 10px; border-radius: 999px;
  background: var(--acento); color: #fff; font-size: 0.85rem; font-weight: 700; display: none;
}
.tarjeta.elegido .sello { display: block; }

.barra {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); background: rgba(255, 253, 249, 0.96);
  border-top: 1px solid var(--borde); box-shadow: 0 -6px 20px rgba(60, 40, 10, 0.08); backdrop-filter: blur(8px);
}
.barra .btn.principal { min-width: 200px; flex: none; }
.bandeja-caja { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bandeja-titulo { font-weight: 700; font-size: 0.95rem; }
.bandeja { display: flex; gap: 8px; }
.hueco {
  width: 64px; height: 64px; border-radius: 14px; border: 2px dashed var(--borde); background: var(--fondo);
  display: flex; align-items: center; justify-content: center; color: var(--borde); font-weight: 700; padding: 0; flex: none;
  position: relative; font: inherit;
}
.hueco.lleno { border: 2px solid var(--acento); background: #fff; cursor: pointer; }
.hueco.lleno img { width: 100%; height: 100%; object-fit: contain; }
.hueco.lleno::after {
  content: "×"; position: absolute; top: -8px; right: -8px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--texto); color: #fff; font-size: 18px; line-height: 25px; text-align: center;
}

/* ------------------------------------------------------------ visor */
.visor { position: fixed; inset: 0; z-index: 10; background: var(--fondo); display: flex; flex-direction: column; animation: entrar 0.2s ease-out; }
.visor[hidden] { display: none; }
body.con-visor { overflow: hidden; }
.v-arriba { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; gap: 12px; }
.v-pos { color: var(--suave); font-size: 0.95rem; }
.v-cuerpo { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr minmax(340px, 400px); gap: 0 16px; padding: 0 16px 16px; }
.escenario {
  position: relative; min-height: 0; border-radius: 28px; overflow: hidden; background: #6b5a44;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06), var(--sombra);
}
.lienzo { position: absolute; inset: 0; touch-action: none; cursor: grab; }
.lienzo:active { cursor: grabbing; }
.lienzo canvas { display: block; width: 100%; height: 100%; }
.cargando {
  position: absolute; inset: 0; display: flex; flex-direction: column; gap: 14px; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5); pointer-events: none;
}
.cargando[hidden] { display: none; }
.rueda { width: 48px; height: 48px; border-radius: 50%; border: 5px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; animation: girar 0.9s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
.flecha {
  position: absolute; top: 50%; transform: translateY(-50%); width: 72px; height: 72px; border-radius: 50%; border: 0;
  background: rgba(255, 253, 249, 0.92); color: var(--texto); font-size: 2.6rem; line-height: 1; cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25); display: flex; align-items: center; justify-content: center; padding-bottom: 6px;
}
.flecha:active { transform: translateY(-50%) scale(0.94); }
.flecha.izq { left: 14px; }
.flecha.der { right: 14px; }
.v-panel { display: flex; flex-direction: column; justify-content: center; padding: 8px 4px; overflow-y: auto; }
.v-tipo { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; font-weight: 700; color: var(--acento); margin: 0 0 4px; }
.v-panel h2 { font-size: 2rem; margin: 0 0 6px; }
.v-texto { font-size: 1.1rem; color: var(--suave); }
.megusta { width: 100%; margin-top: 8px; }
.megusta .dos { display: flex; flex-direction: column; line-height: 1.15; }
.megusta .dos small { font-size: 0.75rem; font-weight: 400; }
.megusta[aria-pressed="true"] { background: var(--acento-claro); color: var(--acento-osc); box-shadow: none; }
.aviso { color: #8a3a00; font-weight: 700; min-height: 1.4em; margin: 10px 0 0; text-align: center; }
.v-bandeja { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--borde); display: flex; flex-direction: column; gap: 8px; }

/* ------------------------------------------------------------ gracias */
.sello-ok {
  width: 96px; height: 96px; margin: 8px auto 18px; border-radius: 50%; background: var(--acento); color: #fff;
  font-size: 3rem; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 20px rgba(11, 107, 105, 0.35);
}
.resumen { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin: 18px 0 30px; }
.resumen figure { margin: 0; width: 120px; }
.resumen img { width: 120px; height: 120px; object-fit: contain; background: var(--tarjeta); border-radius: 18px; box-shadow: var(--sombra); }
.resumen figcaption { font-size: 0.95rem; font-weight: 700; margin-top: 6px; }

/* ------------------------------------------------------------ pantallas estrechas */
@media (max-width: 860px) {
  .v-cuerpo { grid-template-columns: 1fr; grid-template-rows: 1fr auto; gap: 12px; }
  .v-panel { padding: 0; text-align: center; overflow: visible; }
  .v-panel h2 { font-size: 1.6rem; }
  .v-texto { margin-bottom: 6px; }
  .v-bandeja { display: none; }
}
@media (max-width: 560px) {
  :root { font-size: 19px; }
  .desfile img:nth-child(1), .desfile img:nth-child(2), .desfile img:nth-child(6), .desfile img:nth-child(7) { display: none; }
  .desfile img { width: 76px; height: 76px; margin: 0 -8px; }
  .desfile img:nth-child(2), .desfile img:nth-child(6) { width: 84px; height: 84px; }
  .desfile img:nth-child(3), .desfile img:nth-child(5) { width: 100px; height: 100px; }
  .desfile img:nth-child(4) { width: 130px; height: 130px; }
  .portada h1 { font-size: 1.9rem; }
  .portada .btn.grande { min-width: 0; }
  h1 { font-size: 1.7rem; }
  .rejilla { grid-template-columns: 1fr 1fr; gap: 12px; padding: 8px 12px 190px; }
  .barra { flex-direction: column; align-items: stretch; gap: 10px; }
  .barra .btn.principal { min-height: 60px; }
  .hueco { width: 54px; height: 54px; }
  .bandeja { justify-content: space-between; }
  .redondo { width: 72px; height: 72px; }
  .flecha { width: 60px; height: 60px; font-size: 2.2rem; top: auto; bottom: 14px; transform: none; }
  .flecha:active { transform: scale(0.94); }
  .btn.grande { min-width: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }
#inicio { overflow: hidden; }
