/* Lyron central: tus pantallas de cuenta (crear, entrar, invitación, tu cuenta) y el protocolo de crisis. Mismo lenguaje
   que la app: blanco, azul y objetos 3D. La portada y las demás páginas públicas usan además sitio.css.
   Tema: automático, o el que la persona eligió al pie (el central pone <html data-tema="claro|oscuro"> con su galleta). */
:root {
  --fondo: #ffffff; --superficie: #ffffff; --superficie-2: #f0f3f8; --borde: #e7ebf2; --borde-fuerte: #d5dbe6;
  --texto: #0e1320; --texto-2: #465066; --suave: #5f677a; --acento: #1e6bff; --acento-2: #0f55e0; --acento-suave: #e8f0ff;
  --peligro: #e11d48; --ok: #12a150;
  --cielo-1: #ffffff; --cielo-2: #f1f6ff; --cielo-3: #cfe1ff;
  --sombra-1: 0 1px 2px rgba(18, 38, 84, 0.05);
  --sombra-2: 0 1px 2px rgba(18, 38, 84, 0.04), 0 10px 30px rgba(18, 38, 84, 0.08);
  --sombra-objeto: drop-shadow(0 10px 14px rgba(30, 70, 170, 0.22));
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-tema="claro"]) {
    --fondo: #0e0f12; --superficie: #171a20; --superficie-2: #1e2229; --borde: #262a33; --borde-fuerte: #333842;
    --texto: #eef1f6; --texto-2: #b6bdcb; --suave: #8a93a4; --acento: #4c8dff; --acento-2: #6aa1ff; --acento-suave: #172643;
    --cielo-1: #0e0f12; --cielo-2: #101624; --cielo-3: #16294f;
    --sombra-1: none; --sombra-2: 0 10px 30px rgba(0, 0, 0, 0.35);
    --sombra-objeto: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.5));
    color-scheme: dark;
  }
}
:root[data-tema="oscuro"] {
  --fondo: #0e0f12; --superficie: #171a20; --superficie-2: #1e2229; --borde: #262a33; --borde-fuerte: #333842;
  --texto: #eef1f6; --texto-2: #b6bdcb; --suave: #8a93a4; --acento: #4c8dff; --acento-2: #6aa1ff; --acento-suave: #172643;
  --cielo-1: #0e0f12; --cielo-2: #101624; --cielo-3: #16294f;
  --sombra-1: none; --sombra-2: 0 10px 30px rgba(0, 0, 0, 0.35);
  --sombra-objeto: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.5));
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--fondo); color: var(--texto); font: 16px/1.5 Figtree, system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; }
body { min-height: 100dvh; display: flex; flex-direction: column; }
img { -webkit-user-drag: none; user-select: none; }
button, .boton-enlace { font: inherit; cursor: pointer; }

/* ---------- La marca: la cabecita del robot de Lyron junto a su nombre (quieta; desde el 7 oct 2026 el personaje es el
   robot). Sus ojos de luz salen de public/i3d/robot.json: los pone central/sincronizar.ts, encima de la cabeza 3D. ---------- */
.marca-robot { --t: 36px; width: var(--t); height: var(--t); flex: none; background-position: center; background-size: contain; background-repeat: no-repeat; filter: drop-shadow(0 2px 3px rgba(34, 30, 78, 0.2)); }
/* marca: inicio (los ojos de luz del robot sobre su cabeza: lo pone central/sincronizar.ts; NO editar aquí) */
.marca-robot { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cdefs%3E%3Cfilter id='m-h0' x='-2' y='-2' width='5' height='5'%3E%3CfeGaussianBlur stdDeviation='1.61'/%3E%3C/filter%3E%3Cfilter id='m-r0' x='-3' y='-3' width='7' height='7'%3E%3CfeGaussianBlur stdDeviation='5.24'/%3E%3C/filter%3E%3Cfilter id='m-b0' x='-3' y='-3' width='7' height='7'%3E%3CfeGaussianBlur stdDeviation='1.22'/%3E%3C/filter%3E%3ClinearGradient id='m-g0' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fffcf6'/%3E%3Cstop offset='1' stop-color='%23ffeed6'/%3E%3C/linearGradient%3E%3CclipPath id='m-vc'%3E%3Cpath d='M82.66%2C55.28 L82.66%2C52.48 L82.5%2C49.64 L81.79%2C46.92 L80.52%2C44.43 L78.73%2C42.27 L76.49%2C40.52 L73.86%2C39.26 L70.91%2C38.57 L67.74%2C38.53 L64.89%2C38.64 L62.42%2C38.71 L60.24%2C38.76 L58.27%2C38.8 L56.46%2C38.83 L54.75%2C38.85 L53.13%2C38.86 L51.55%2C38.87 L50%2C38.87 L48.45%2C38.87 L46.87%2C38.86 L45.25%2C38.85 L43.54%2C38.83 L41.73%2C38.8 L39.76%2C38.76 L37.58%2C38.71 L35.11%2C38.64 L32.26%2C38.53 L29.09%2C38.57 L26.14%2C39.26 L23.51%2C40.52 L21.27%2C42.27 L19.48%2C44.43 L18.21%2C46.92 L17.5%2C49.64 L17.34%2C52.48 L17.34%2C55.28 L17.34%2C58.06 L17.5%2C60.82 L18.21%2C63.54 L19.48%2C66.1 L21.27%2C68.4 L23.51%2C70.37 L26.14%2C71.88 L29.09%2C72.87 L32.26%2C73.25 L35.11%2C73.38 L37.58%2C73.47 L39.85%2C73.39 L42.09%2C72.87 L44.13%2C72.15 L45.86%2C71.55 L47.35%2C71.16 L48.71%2C70.94 L50%2C70.87 L51.29%2C70.94 L52.65%2C71.16 L54.14%2C71.55 L55.87%2C72.15 L57.91%2C72.87 L60.15%2C73.39 L62.42%2C73.47 L64.89%2C73.38 L67.74%2C73.25 L70.91%2C72.87 L73.86%2C71.88 L76.49%2C70.37 L78.73%2C68.4 L80.52%2C66.1 L81.79%2C63.54 L82.5%2C60.82 L82.66%2C58.06 Z'/%3E%3C/clipPath%3E%3C/defs%3E%3Cg clip-path='url(%23m-vc)'%3E%3Cg opacity='1'%3E%3Cg opacity='0.38' filter='url(%23m-r0)'%3E%3Crect x='31.01' y='50.93' width='7.34' height='11.7' rx='2.9' fill='%23ff9a4a' /%3E%3C/g%3E%3Cg opacity='1' filter='url(%23m-h0)'%3E%3Crect x='31.01' y='50.93' width='7.34' height='11.7' rx='2.9' fill='%23ffa552' /%3E%3C/g%3E%3Crect x='31.01' y='50.93' width='7.34' height='11.7' rx='2.9' fill='url(%23m-g0)' /%3E%3C/g%3E%3Cg opacity='1'%3E%3Cg opacity='0.38' filter='url(%23m-r0)'%3E%3Crect x='61.65' y='50.93' width='7.34' height='11.7' rx='2.9' fill='%23ff9a4a' /%3E%3C/g%3E%3Cg opacity='1' filter='url(%23m-h0)'%3E%3Crect x='61.65' y='50.93' width='7.34' height='11.7' rx='2.9' fill='%23ffa552' /%3E%3C/g%3E%3Crect x='61.65' y='50.93' width='7.34' height='11.7' rx='2.9' fill='url(%23m-g0)' /%3E%3C/g%3E%3C/g%3E%3C/svg%3E"), var(--cabeza-marca, url("/i3d/robot-cabeza-p.webp")); }
/* marca: fin */
@keyframes flotar { 50% { transform: translateY(-4%); } }

/* ---------- Barra de arriba ---------- */
.barra { display: flex; align-items: center; justify-content: space-between; padding: calc(12px + env(safe-area-inset-top)) clamp(16px, 3vw, 32px) 10px; position: relative; z-index: 3; }
.marca { display: inline-flex; align-items: center; gap: 9px; font-size: 21px; font-weight: 700; letter-spacing: -0.02em; color: var(--texto); text-decoration: none; }

/* ---------- Botones ---------- */
.principal, .proveedor, .peligro-lleno {
  width: 100%; padding: 14px 22px; border-radius: 99px; border: 0; font-weight: 600; font-size: 16px; display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: transform 0.1s, background 0.15s, opacity 0.15s; text-decoration: none;
}
.principal { background: var(--acento); color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--acento) 30%, transparent); }
.principal:hover { background: var(--acento-2); }
.principal:active, .proveedor:active { transform: scale(0.98); }
.principal:disabled { opacity: 0.6; cursor: default; }
.principal.chico { width: auto; padding: 9px 18px; font-size: 14.5px; box-shadow: none; }
.proveedor { background: var(--superficie); color: var(--texto); border: 1px solid var(--borde); }
.proveedor.apple { background: var(--texto); color: var(--fondo); border: 0; }
.proveedor svg { width: 20px; height: 20px; }
.proveedor img { width: 24px; height: 24px; }
.en-app { width: 100%; display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.en-app small { color: var(--texto-2); font-size: 13.5px; text-align: center; line-height: 1.35; }
#btn-google { display: flex; justify-content: center; min-height: 44px; }
.texto { background: none; border: 0; color: var(--texto-2); padding: 10px 14px; font-size: 15px; border-radius: 99px; }
.texto:hover { background: var(--superficie-2); }
.texto b { color: var(--acento); }
.peligro { color: var(--peligro); }
.peligro-lleno { background: var(--peligro); color: #fff; width: auto; padding: 10px 20px; }

/* ---------- Formularios (crear cuenta, entrar, tu cuenta) ---------- */
body[data-pantalla]:not([data-pantalla="inicio"]) { background: radial-gradient(120% 70% at 50% 112%, var(--cielo-3) 0%, transparent 62%), var(--fondo); background-attachment: fixed; }
.caja { width: min(420px, 100%); margin: auto; padding: 8px 16px calc(40px + env(safe-area-inset-bottom)); }
body[data-pantalla="inicio"] .caja { display: none; }
.caja section { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; animation: entrar 0.25s ease-out; position: relative; }
@keyframes entrar { from { opacity: 0; transform: translateY(8px); } }
h2 { font-size: 30px; letter-spacing: -0.03em; margin: 4px 0 0; line-height: 1.15; }
.caja .sub { color: var(--texto-2); margin: 0 0 8px; }
.objeto { width: 104px; height: 104px; filter: var(--sombra-objeto); animation: flotar 5.5s ease-in-out infinite; }
form { width: 100%; display: flex; flex-direction: column; gap: 12px; text-align: left; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--texto-2); }
input {
  font: inherit; font-size: 16px; padding: 13px 16px; border-radius: 16px; border: 1px solid var(--borde-fuerte);
  background: var(--superficie); color: var(--texto); outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus { border-color: var(--acento); box-shadow: 0 0 0 4px color-mix(in srgb, var(--acento) 16%, transparent); }
input[readonly] { background: var(--superficie-2); color: var(--texto-2); }
input.codigo { text-align: center; font-size: 30px; letter-spacing: 12px; font-weight: 700; padding: 14px; }
.error { color: var(--peligro); font-size: 14px; min-height: 1.2em; margin: 0; }
.atras { position: absolute; left: -6px; top: -2px; background: none; border: 0; font-size: 34px; line-height: 1; color: var(--texto-2); padding: 4px 12px; border-radius: 50%; }
.atras:hover { background: var(--superficie-2); }
.tarjeta { width: 100%; background: var(--superficie); border: 1px solid var(--borde); border-radius: 22px; padding: 14px 16px; display: flex; align-items: center; gap: 14px; text-align: left; box-shadow: var(--sombra-1); }
.tarjeta > img { width: 56px; height: 56px; flex: none; }
.tarjeta > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tarjeta strong { font-size: 16px; }
.tarjeta span { color: var(--texto-2); font-size: 14.5px; }
.tarjeta.lista strong::before { content: "● "; color: var(--ok); }
.tarjeta.error strong { color: var(--peligro); }
.tarjeta.plan { flex-direction: column; align-items: flex-start; gap: 3px; }
.barra-avance { height: 6px; background: var(--superficie-2); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.barra-avance i { display: block; height: 100%; width: 35%; background: var(--acento); border-radius: 99px; animation: avance 1.4s ease-in-out infinite; }
@keyframes avance { from { transform: translateX(-100%); } to { transform: translateX(290%); } }
.tarjeta.lista .barra-avance, .tarjeta.error .barra-avance { display: none; }
.plan .etiqueta { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: var(--acento-suave); color: var(--acento); margin-bottom: 4px; width: fit-content; }
.acciones { display: flex; justify-content: space-between; width: 100%; gap: 8px; }
dialog { border: 0; border-radius: 26px; padding: 24px; width: min(390px, calc(100% - 32px)); background: var(--superficie); color: var(--texto); box-shadow: 0 24px 64px rgba(10, 20, 50, 0.35); }
dialog::backdrop { background: rgba(10, 14, 24, 0.45); backdrop-filter: blur(3px); }
dialog h3 { margin: 0 0 6px; font-size: 21px; letter-spacing: -0.02em; }
dialog p { color: var(--texto-2); font-size: 14.5px; margin: 0 0 12px; }
dialog form { gap: 10px; }

/* ---------- Idioma (al pie, discreto) ---------- */
.pie-idioma { display: flex; justify-content: center; align-items: center; gap: 2px; padding: 6px 16px calc(14px + env(safe-area-inset-bottom)); color: var(--suave); font-size: 13px; }
.pie-idioma button { background: none; border: 0; color: var(--suave); font-size: 13px; padding: 5px 8px; border-radius: 99px; }
.pie-idioma button:hover { background: var(--superficie-2); color: var(--texto-2); }
.pie-idioma button[aria-current="true"] { color: var(--texto-2); font-weight: 600; }
.pie-idioma span { opacity: 0.6; }

@media (prefers-reduced-motion: reduce) { .objeto, .barra-avance i { animation: none; } }

/* ---------- Lista de espera (carril REGISTRO, 14 oct 2026): por qué llegaste, «Ya tengo invitación» y «Entrar» ---------- */
.aviso-lista { margin: 0 0 4px; padding: 12px 14px; border-radius: 16px; background: var(--acento-suave); color: var(--texto); font-size: 14.5px; line-height: 1.45; }
.lista-listo p strong { font-size: 17px; }
.lista-listo .texto { color: var(--acento-texto, var(--acento)); font-weight: 600; }
.lista-enlaces { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-top: 6px; }
.lista-enlaces > .texto { color: var(--acento-texto, var(--acento)); font-weight: 600; }
.lista-enlaces form { align-self: stretch; margin: 2px 0 6px; padding: 14px; border-radius: 18px; background: var(--superficie-2); }
.lista-enlaces form input { background: var(--superficie); }
.ya-cuenta { margin: 0; color: var(--texto-2); font-size: 15px; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; }
.ya-cuenta .texto { color: var(--acento-texto, var(--acento)); font-weight: 700; padding-left: 6px; padding-right: 6px; }
/* La cuenta sola (/cuenta; la invitación con SITIO_PUBLICO): sin portada, «Entrar» no tiene a dónde regresar */
body[data-solo-cuenta] section[data-pantalla="entrar"] > .atras { visibility: hidden; }
body:not([data-solo-cuenta]) .sin-cuenta { display: none; }
