/* =========================================================
   Lameno · Prototipo de entrada — estilos de cada pantalla
   ========================================================= */

/* ---------- A · Splash: pieza de identidad ----------
   Composición: el logotipo en el tercio superior óptico; el orbe sale por abajo
   como un sol en el horizonte (la metáfora del sofoco), nunca detrás del texto. */
.p--splash { padding: 0; background: var(--bosque); overflow: hidden; }
.splash__sol { position: absolute; left: 50%; bottom: -250px; width: 500px; height: 500px; margin-left: -250px; }
/* Halo con fucsia, no con rosa: el rosa translúcido sobre bosque se vuelve gris. Caída corta para que no ensucie. */
.splash__sol .orbe {
  width: 100%; height: 100%; --b: 26px;
  background: radial-gradient(circle, var(--fucsia) 0 24%, rgb(255 79 216 / .6) 40%, rgb(255 79 216 / 0) 62%);
  animation: respira 7s ease-in-out 1.6s infinite alternate;
}
.splash__marca {
  position: absolute; left: 0; right: 0; top: 43%; transform: translateY(-50%);
  display: grid; justify-items: center; text-align: center;
}
.splash__logo { font-size: 84px; font-weight: 400; color: var(--fucsia); margin-left: -.04em; transform-origin: 0 0; }

/* Entrada: el sol sube, «La» se acerca en susurro, «meno» se planta desde abajo */
.entra .splash__sol { animation: sol-sube 1.5s var(--ease) both; }
.entra .splash__logo .logo__la { animation: la-entra .9s var(--ease) .25s both; }
.entra .splash__logo .logo__meno { animation: meno-entra 1s var(--ease) .42s both; }
@keyframes sol-sube { from { opacity: 0; transform: translateY(180px) scale(.72); } }
@keyframes la-entra { from { opacity: 0; transform: translateX(-.18em); } }
@keyframes meno-entra { from { opacity: 0; clip-path: inset(0 0 100% 0); transform: translateY(.22em); } to { clip-path: inset(-20% -10% -20% -10%); } }
@keyframes respira { from { transform: scale(.95); } to { transform: scale(1.05); } }

/* Salida de marca: el fondo se retira y el logotipo viaja a su sitio en la portada */
.splash--sale { animation: splash-fondo 1s var(--ease) both; pointer-events: none; }
.splash--sale .splash__sol { animation: sol-baja .8s var(--ease-suave) both; }
@keyframes splash-fondo { 12% { background-color: rgb(27 54 25 / 1); } to { background-color: rgb(27 54 25 / 0); } }
@keyframes sol-baja { to { opacity: 0; transform: translateY(160px) scale(.8); } }

/* ---------- A · Portada de primera apertura ---------- */
.p--portada { padding: 0; background: var(--bosque); color: var(--crema); }
.portada__foto { position: absolute; inset: 0 0 auto; height: 55%; overflow: hidden; }
.portada__foto img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.portada__bloque { position: absolute; inset: auto 0 0; padding: 26px var(--lado) calc(var(--abajo) + 6px); background: var(--bosque); }
.portada__logo { display: block; font-size: 34px; color: var(--fucsia); margin: 0 0 18px -.04em; }
.portada__bloque .titulo { margin: 0 0 24px; font-size: 50px; line-height: .94; }
.portada__bloque .acciones { display: grid; gap: 2px; }
.marca-llega .portada__foto { animation: foto-revela 1.1s var(--ease) .15s both; }
.marca-llega .portada__foto img { animation: foto-zoom 1.6s var(--ease) .15s both; }
.marca-llega .portada__logo { opacity: 0; }
.marca-llega .r { animation-delay: calc(var(--i, 0) * 90ms + 620ms); }
.p__barra--sin-atras { padding-left: var(--lado); }
@keyframes foto-revela { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }
@keyframes foto-zoom { from { transform: scale(1.1); } }

/* ---------- B · Bienvenida (3 pantallas) ---------- */
.p--bienv { --fondo: var(--rosa); --texto: var(--bosque); background: var(--fondo); color: var(--texto); }
.p--bienv[data-color="ciruela"] { --fondo: var(--ciruela); --texto: var(--rosa); }
.p--bienv[data-color="lima"] { --fondo: var(--lima); --texto: var(--tinta); }
.bienv__barra { display: flex; align-items: center; justify-content: space-between; min-height: 60px; padding: 4px 20px 0 var(--lado); flex: none; }
.puntos { display: flex; gap: 6px; }
.puntos span { width: 22px; height: 6px; border-radius: 3px; background: currentColor; opacity: .25; transition: width .5s var(--ease), opacity .3s; }
.puntos .activo { width: 44px; opacity: 1; }
.bienv__barra .saltar { color: inherit; }
.bienv__marco { position: relative; flex: 1 1 auto; min-height: 0; margin: 4px 16px 0; border-radius: 28px; overflow: hidden; background: rgb(20 26 20 / .08); }
.bienv__marco img { width: 100%; height: 100%; object-fit: cover; }
.p--bienv { touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.p--bienv img { -webkit-user-drag: none; pointer-events: none; }
.bienv__texto { flex: none; padding: 26px var(--lado) 0; }
.bienv__texto .titulo { color: inherit; font-size: 46px; line-height: .95; margin: 0 0 12px; }
.p--bienv[data-color="ciruela"] .titulo { color: var(--crema); }
.p--bienv[data-color="ciruela"] .titulo em { color: var(--lima); }
.bienv__texto .texto { max-width: 32ch; }
.p--bienv .p__pie { padding-top: 22px; }
.entra.desliza-llega .bienv__marco img, .entra.marca-llega .bienv__marco img { animation: foto-zoom 1.4s var(--ease) both; }

/* Detalles sobre la foto: enseñan la función sin dibujar la app entera */
.sobre { position: absolute; left: 14px; right: 14px; bottom: 14px; }
.pastillas { display: flex; flex-wrap: wrap; gap: 8px; }
.pastilla { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px 0 12px; border-radius: 999px; background: var(--crema); color: var(--tinta); font-weight: 600; font-size: 17px; }
.pastilla .ic { width: 22px; height: 22px; }
.pastilla--fucsia { background: var(--fucsia); }
.pastilla--lima { background: var(--lima); }
.entra .pastilla { animation: brota .7s var(--ease) both; animation-delay: calc(var(--i) * 110ms + 420ms); }
@keyframes brota { from { opacity: 0; transform: translateY(14px) scale(.92); } }
.tarjeta-mito { padding: 16px 18px 18px; border-radius: 20px; background: var(--rosa); color: var(--bosque); }
.tarjeta-mito .etiqueta { color: var(--frambuesa); margin-bottom: 6px; }
.tarjeta-mito p { font: 400 26px/1.05 var(--f-serif); }
.noti { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 20px; background: var(--tinta); color: var(--crema); text-align: left; }
.noti .app-icono { width: 40px; height: 40px; font-size: 25px; }
.noti__meta { display: flex; justify-content: space-between; gap: 8px; font: 500 var(--t-etiqueta)/1.2 var(--f-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--rosa); }
.noti__texto { display: block; font-size: 17px; line-height: 1.3; margin-top: 3px; }
.noti--crema { background: var(--crema); color: var(--tinta); }
.noti--crema .noti__meta { color: var(--suave); }
.sobre--arriba { top: 14px; bottom: auto; }
.entra .sobre > * { animation: brota .8s var(--ease) .45s both; }
.entra .sobre > * + * { animation-delay: .6s; }

/* ---------- C · Correo ---------- */
.privacidad { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; margin-top: 28px; padding-top: 20px; border-top: 1px solid rgb(20 26 20 / .12); font-size: var(--t-ui); line-height: 1.45; color: var(--suave); }
.privacidad .ic { color: var(--bosque); margin-top: 1px; }
.cambio-flujo { margin-top: 18px; font-size: var(--t-ui); color: var(--suave); }
.no-encontrado { margin-top: 22px; padding: 22px 22px 12px; border-radius: var(--r-bloque); background: var(--rosa); color: var(--bosque); }
.no-encontrado__titulo { font: 400 var(--t-sub)/1.05 var(--f-serif); margin-bottom: 8px; }
.no-encontrado p { font-size: var(--t-ui); line-height: 1.45; }
.no-encontrado .boton { margin-top: 14px; min-height: 56px; }
.no-encontrado .boton--texto { margin-top: 0; }

/* ---------- C · Código ---------- */
.p--codigo .p__cuerpo { padding-bottom: 6px; }
.casillas { display: grid; grid-template-columns: repeat(3, 1fr) 14px repeat(3, 1fr); gap: 6px; margin-top: 22px; max-width: 342px; }
.casillas::before { content: ""; grid-column: 4; grid-row: 1; align-self: center; justify-self: center; width: 10px; height: 2px; background: var(--borde); }
.casilla {
  position: relative; height: 66px; display: grid; place-items: center;
  border: 2px solid var(--borde); border-radius: 16px; background: var(--campo);
  font: 600 32px/1 var(--f-sans); font-variant-numeric: tabular-nums;
  transition: border-color .2s, background-color .35s var(--ease), box-shadow .25s var(--ease);
}
.casilla:nth-child(4) { grid-column: 5; }
.casilla--activa { border-color: var(--tinta); box-shadow: 0 0 0 5px var(--rosa); }
.casilla--activa::after { content: ""; width: 2px; height: 30px; background: var(--tinta); animation: cursor 1.1s steps(1) infinite; }
@keyframes cursor { 50% { opacity: 0; } }
.casilla--llena { border-color: var(--tinta); animation: cifra .25s var(--ease); }
@keyframes cifra { from { transform: scale(.9); } }
.casillas--error .casilla { border-color: var(--frambuesa); color: var(--frambuesa); }
.casillas--caducado .casilla { border-color: var(--borde); color: var(--suave); background: var(--arena); }
.casillas--ok .casilla { border-color: var(--lima); background: var(--lima); color: var(--tinta); animation: pulsa .5s var(--ease) both; animation-delay: calc(var(--n) * 40ms); }
.casillas--error { animation: tiembla .45s ease; }
@keyframes tiembla { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes pulsa { 40% { transform: scale(1.06); } }
.codigo__estado { margin-top: 18px; min-height: 76px; display: grid; gap: 6px; align-content: start; font-size: var(--t-ui); line-height: 1.45; }
.codigo__linea { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; }
.codigo__linea .ic { margin-top: 1px; }
.codigo__linea--error { color: var(--frambuesa); font-weight: 500; }
.codigo__linea--ok { color: var(--bosque); font-weight: 600; }
.codigo__linea--ok .ic { background: var(--lima); border-radius: 50%; padding: 3px; }
.codigo__reloj { color: var(--suave); font-variant-numeric: tabular-nums; }
.codigo__reloj b { color: var(--tinta); font-weight: 600; }
.codigo__reenviar { justify-self: start; min-height: 48px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--arena); font-weight: 600; font-size: var(--t-ui); }
.codigo__reenviar--fuerte { background: var(--fucsia); }
.p--codigo .p__pie { padding-bottom: 12px; padding-top: 4px; }
.teclado { flex: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 8px 8px calc(var(--abajo) + 2px); background: var(--arena); }
.tecla {
  height: 54px; border: 0; border-radius: 14px; background: var(--crema); color: var(--tinta);
  font: 500 26px/1 var(--f-sans); font-variant-numeric: tabular-nums;
  display: grid; place-items: center; transition: background-color .15s, transform .15s;
}
.tecla:active, .tecla.pulsada { background: var(--rosa); transform: scale(.97); }
.tecla--vacia { background: transparent; pointer-events: none; }
.tecla--borrar { background: transparent; }
.tecla--borrar .ic { width: 30px; height: 30px; }

/* ---------- C · Bloqueo ---------- */
.borde { display: grid; align-content: start; justify-items: start; padding-top: 24px; }
.borde .baldosa { margin-bottom: 26px; }
.borde .etiqueta { color: var(--frambuesa); margin-bottom: 12px; }
.cuenta-atras { display: block; margin: 22px 0 6px; font: 400 116px/.9 var(--f-serif); letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--bosque); }
.cuenta-atras__ud { font: italic 400 var(--t-sub)/1 var(--f-serif); color: var(--suave); }

/* ---------- D · Consentimientos ---------- */
.puntos-consent { display: flex; gap: 6px; }
.garantias { display: grid; margin: 18px 0 8px; }
.garantias li { display: grid; grid-template-columns: 48px 1fr; gap: 16px; align-items: start; padding: 11px 0; border-top: 1px solid rgb(20 26 20 / .1); font-size: var(--t-ui); line-height: 1.4; }
.garantias li:first-child { border-top: 0; padding-top: 4px; }
.garantias b { display: block; font-weight: 600; margin-bottom: 1px; }
.garantias .baldosa { width: 48px; height: 48px; }
.garantias .baldosa .ic { width: 24px; height: 24px; }
.enlaces { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 4px 0 6px; font-size: var(--t-ui); }
.marca {
  display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: start; cursor: pointer;
  margin-top: 14px; padding: 18px 18px 18px 16px; border-radius: 20px; background: var(--arena);
  font-size: var(--t-ui); line-height: 1.4; font-weight: 600; transition: background-color .3s, box-shadow .3s;
}
.marca input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.marca__caja { width: 34px; height: 34px; border-radius: 10px; border: 2.5px solid var(--tinta); background: var(--campo); display: grid; place-items: center; color: var(--lima); transition: background-color .2s, border-color .2s; }
.marca__caja .ic { width: 22px; height: 22px; transform: scale(0); transition: transform .35s var(--ease); }
.marca:has(input:checked) { background: var(--rosa); }
.marca input:checked + .marca__caja { background: var(--bosque); border-color: var(--bosque); }
.marca input:checked + .marca__caja .ic { transform: scale(1); }
.marca input:focus-visible + .marca__caja { outline: 3px solid var(--fucsia); outline-offset: 3px; }
.marca--aviso { box-shadow: inset 0 0 0 2px var(--frambuesa); animation: tiembla .45s ease; }
.p__pie--consent { gap: 8px; padding-top: 10px; box-shadow: inset 0 1px 0 rgb(20 26 20 / .1); }
.p__pie--consent .marca { margin-top: 0; padding-block: 14px; }
.p__pie--consent .p__ayuda:empty { display: none; }
.nota-consent { margin-top: 14px; font-size: var(--t-ui); color: var(--suave); }

/* ---------- E · Perfil ---------- */
.perfil__barra { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 8px var(--lado) 0 14px; flex: none; }
.perfil__saltar { display: flex; justify-content: flex-end; padding: 0 20px; min-height: 48px; flex: none; }
.perfil__saltar--vacio { visibility: hidden; }
.p--perfil .p__cuerpo { padding-top: 0; }

.edad { display: grid; grid-template-columns: 72px 1fr 72px; align-items: center; margin-top: 34px; }
.edad__boton { width: 72px; height: 72px; border: 0; border-radius: 50%; background: var(--arena); display: grid; place-items: center; transition: transform .2s var(--ease); }
.edad__boton:active { transform: scale(.94); }
.edad__boton:disabled { opacity: .4; }
.edad__boton .ic { width: 28px; height: 28px; }
.edad__cifra { text-align: center; border: 0; background: none; padding: 0; }
.edad__num { display: block; font: 400 140px/.9 var(--f-serif); letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--bosque); }
.edad__ud { display: block; margin-top: 6px; font: italic 400 var(--t-sub)/1 var(--f-serif); color: var(--suave); }
.edad__lista { display: flex; justify-content: center; margin-top: 30px; }
.edad__lista .codigo__reenviar { justify-self: center; }

.hoja-edad { max-height: 72%; grid-template-rows: auto auto minmax(0, 1fr) auto; }
.lista-edades { width: 100%; height: 300px; overflow-y: auto; display: grid; gap: 6px; scrollbar-width: none; padding: 4px 0; border-block: 1px solid rgb(20 26 20 / .12); }
.lista-edades::-webkit-scrollbar { display: none; }
.lista-edades button { min-height: 56px; border: 0; border-radius: 18px; background: transparent; font: 400 30px/1 var(--f-serif); font-variant-numeric: tabular-nums; color: var(--tinta); }
.lista-edades button[aria-checked="true"] { background: var(--bosque); color: var(--lima); }

.opciones { display: grid; gap: 10px; margin-top: 22px; }
.opcion {
  display: grid; grid-template-columns: 1fr 32px; gap: 4px 14px; align-items: center; text-align: left;
  min-height: 80px; padding: 16px 18px 16px 22px; border: 0; border-radius: var(--r-bloque);
  background: var(--arena); color: var(--tinta); transition: background-color .25s, color .25s, transform .3s var(--ease);
}
.opcion:active { transform: scale(.985); }
.opcion__titulo { font: 400 30px/1 var(--f-serif); }
.opcion__sub { grid-column: 1; font-size: var(--t-ui); line-height: 1.35; color: var(--suave); }
.opcion__marca { grid-column: 2; grid-row: 1 / span 2; width: 32px; height: 32px; border-radius: 50%; border: 2.5px solid var(--borde); display: grid; place-items: center; }
.opcion__marca .ic { width: 20px; height: 20px; transform: scale(0); transition: transform .35s var(--ease); }
.opcion[aria-checked="true"] { background: var(--bosque); color: var(--crema); }
.opcion[aria-checked="true"] .opcion__sub { color: var(--rosa); }
.opcion[aria-checked="true"] .opcion__marca { background: var(--lima); border-color: var(--lima); color: var(--tinta); }
.opcion[aria-checked="true"] .opcion__marca .ic { transform: scale(1); }
/* Variante con baldosa de icono (¿qué mejorar?) */
.opcion--icono { grid-template-columns: 56px 1fr 32px; min-height: 76px; padding: 10px 18px 10px 10px; }
.opcion--icono .opcion__titulo { font-size: 28px; }
.opcion--icono .opcion__marca { grid-column: 3; grid-row: 1; }
.opcion--icono .baldosa { background: var(--crema); }
.opcion--icono[aria-checked="true"] .baldosa { background: var(--rosa); }
.opcion--icono[aria-checked="true"] .baldosa .orbe { opacity: 1; }

.intereses { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.interes {
  display: inline-flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 20px 0 16px;
  border: 0; border-radius: 999px; background: var(--arena); color: var(--tinta);
  font: 500 var(--t-ui)/1.15 var(--f-sans); text-align: left; transition: background-color .25s, color .25s, transform .3s var(--ease);
}
.interes:active { transform: scale(.97); }
.interes .ic { width: 22px; height: 22px; }
.interes[aria-pressed="true"] { background: var(--bosque); color: var(--lima); font-weight: 600; }
.interes__check { display: none; }
.interes[aria-pressed="true"] .interes__check { display: block; }
.interes[aria-pressed="true"] .interes__icono { display: none; }

/* Avisos (ciruela): foto del pastillero con las dos notificaciones reales */
.avisos__marco { position: relative; height: 300px; flex: none; margin: 0 16px; border-radius: 28px; overflow: hidden; }
.avisos__marco img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.avisos__marco .sobre { display: grid; gap: 8px; }
.avisos__marco img { object-position: 50% 100%; }
.p--avisos .p__cuerpo { padding-top: 22px; }
.p--avisos .texto { color: var(--rosa); }

/* ---------- F · Cierre y recuperado ---------- */
.p--cierre { overflow: hidden; }
.cierre__escena { position: relative; flex: 1 1 auto; min-height: 0; margin: 12px 16px 0; }
.cierre__orbe { position: absolute; width: 520px; height: 520px; left: 50%; top: 50%; margin: -260px 0 0 -260px; --b: 34px;
  background: radial-gradient(circle, var(--c1) 0 22%, rgb(255 79 216 / .55) 38%, rgb(255 79 216 / 0) 60%); }
.cierre__orbe.orbe--lima { background: radial-gradient(circle, var(--lima) 0 22%, rgb(215 243 107 / .5) 38%, rgb(215 243 107 / 0) 60%); }
.entra .cierre__orbe { animation: orbe-nace 1.4s var(--ease) both; }
.cierre__orbe { animation: respira 8s ease-in-out 1.4s infinite alternate; }
@keyframes orbe-nace { from { opacity: 0; transform: scale(.55); } }
.cierre__foto { position: absolute; inset: 34px 34px 0; border-radius: 200px 200px 28px 28px; overflow: hidden; }
.cierre__foto img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.entra .cierre__foto { animation: foto-revela 1.1s var(--ease) .25s both; }
.cierre__texto { flex: none; padding: 26px var(--lado) 0; }
.cierre__texto .etiqueta { color: var(--lima); margin-bottom: 12px; }
.cierre__texto .titulo { font-size: 56px; line-height: .94; margin-bottom: 14px; }
.cierre__texto .texto { color: var(--crema); max-width: 32ch; }
.cierre__texto .texto b { color: var(--lima); font-weight: 600; }

/* ---------- F · Hoy (marcador sobrio, no es la home) ---------- */
.hoy__fecha { color: var(--suave); margin-top: 10px; }
.marcador { margin-top: 26px; min-height: 380px; border: 2px dashed var(--borde); border-radius: var(--r-bloque); display: grid; place-content: center; justify-items: center; gap: 12px; padding: 28px; text-align: center; }
.marcador .etiqueta { color: var(--suave); }
.marcador p { font: 400 var(--t-sub)/1.1 var(--f-serif); max-width: 12em; color: var(--bosque); }
.tabbar { flex: none; display: grid; grid-template-columns: repeat(5, 1fr); padding: 10px 8px calc(var(--abajo) - 2px); background: var(--arena); }
.tab { display: grid; justify-items: center; gap: 6px; min-height: 60px; border: 0; background: none; padding: 6px 2px; font: 500 13px/1.1 var(--f-sans); font-stretch: 90%; color: var(--tinta); }
.tab .ic { width: 26px; height: 26px; }
.tab[aria-current="page"] { font-weight: 700; }
.tab[aria-current="page"] .ic { box-sizing: content-box; background: var(--fucsia); padding: 7px 16px; margin: -7px 0 -4px; border-radius: 18px; }
