/* Brote · pantalla de bienvenida y entrada */
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("/fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("/fonts/inter-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("/fonts/inter-600.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url("/fonts/inter-700.woff2") format("woff2"); }
:root { --fondo: #FFFFFF; --blanco: #FFFFFF; --ink: #121412; --ink-2: #5E645F; --ink-3: #9BA19C; --card: #F2F4F3; --line: #E4E8E5; --lima: #C2EC63; --lima-claro: #E4F9B0; --rojo: #D9483F; --sobre-tinta: #FFFFFF; --aviso-bg: #FFF4E5; --aviso-tx: #8A4B00; --ok-tx: #2E5A0C; color-scheme: light; }
@media (prefers-color-scheme: dark) { :root { --fondo: #0D0F0D; --blanco: #262A26; --ink: #EEF2EC; --ink-2: #A9B1A7; --ink-3: #6E776D; --card: #1B1E1B; --line: #2E332E; --lima: #C2EC63; --lima-claro: #2A3618; --rojo: #FF7A70; --sobre-tinta: #0D0F0D; --aviso-bg: #33270F; --aviso-tx: #F2C77E; --ok-tx: #CFEFA0; color-scheme: dark; } }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overscroll-behavior: none; overflow-x: hidden; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--fondo); color: var(--ink); font: 16px/1.45 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; color: inherit; }
button, a, label { -webkit-user-select: none; user-select: none; }
[hidden] { display: none !important; }

.app { max-width: 440px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding: calc(14px + env(safe-area-inset-top)) 22px calc(22px + env(safe-area-inset-bottom)); }
@media (min-width: 700px) { body { background: var(--card); } .app { background: var(--fondo); min-height: auto; margin: 5vh auto; border-radius: 34px; padding: 26px 28px 30px; box-shadow: 0 20px 60px rgba(18,20,18,.08); } .vista { min-height: 640px; } }
.vista { flex: 1; display: flex; flex-direction: column; animation: entra .45s cubic-bezier(.2,.8,.2,1); }
.vista.centro { justify-content: center; text-align: center; }
@keyframes entra { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

h1 { font-size: 28px; line-height: 1.15; letter-spacing: -.035em; margin: 18px 0 8px; font-weight: 700; }
.sub { color: var(--ink-2); margin: 0 0 22px; font-size: 16px; }
.sub.izq { margin-top: 12px; }

/* arranque */
.splash { position: fixed; inset: 0; z-index: 50; background: var(--fondo); display: grid; place-content: center; justify-items: center; gap: 14px; transition: opacity .35s ease, visibility .35s; }
.splash.fuera { opacity: 0; visibility: hidden; }
.splash-logo { width: 108px; height: 108px; animation: pop .55s cubic-bezier(.3,1.5,.5,1) both; }
.splash-logo .tallo { stroke-dasharray: 16; stroke-dashoffset: 16; animation: crece .4s .35s ease-out forwards; }
.splash-logo .hoja { transform-box: fill-box; transform: scale(0); animation: hoja .45s cubic-bezier(.3,1.6,.5,1) forwards; }
.splash-logo .h1 { transform-origin: 0% 100%; animation-delay: .6s; }
.splash-logo .h2 { transform-origin: 100% 100%; animation-delay: .7s; }
.splash-nombre { font-size: 30px; font-weight: 800; letter-spacing: -.04em; opacity: 0; animation: aparece .4s .8s ease forwards; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes crece { to { stroke-dashoffset: 0; } }
@keyframes hoja { to { transform: scale(1); } }
@keyframes aparece { to { opacity: 1; } }

/* bienvenida */
.intro-top { display: flex; justify-content: space-between; align-items: center; }
.mini-logo { width: 40px; height: 40px; }
.saltar { border: 0; background: var(--card); border-radius: 999px; padding: 9px 16px; font-weight: 600; font-size: 14px; cursor: pointer; }
.carrusel { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -22px; }
.carrusel::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: center; padding: 0 22px; display: flex; flex-direction: column; justify-content: center; }
.slide h1 { margin-top: 8px; }
.slide p { color: var(--ink-2); margin: 0; font-size: 16.5px; }
.ilus { background: var(--lima-claro); border-radius: 32px; aspect-ratio: 1.15; display: grid; place-items: center; margin: 10px 0 18px; overflow: hidden; }
.ilus svg { width: 86%; height: auto; }
.intro-pie { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 18px; }
.puntos { display: flex; gap: 6px; }
.puntos i { width: 8px; height: 8px; border-radius: 99px; background: var(--line); transition: width .25s, background .25s; }
.puntos i.on { width: 26px; background: var(--ink); }

/* botones */
.btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; border: 0; border-radius: 999px; padding: 15px 20px; font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer; transition: transform .1s, filter .15s; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: default; }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn.lima { background: var(--lima); color: #121412; }
.btn.negro { background: var(--ink); color: var(--sobre-tinta); }
.btn.google { background: var(--fondo); color: var(--ink); border: 1.5px solid var(--line); }
.btn.apple { background: #000; color: #fff; }
.btn.grande { padding: 17px 22px; }
.intro-pie .btn { width: auto; min-width: 150px; }
.botones { display: grid; gap: 10px; margin-top: 4px; text-align: left; }
.logo-grande { width: 92px; height: 92px; align-self: center; animation: pop .5s cubic-bezier(.3,1.5,.5,1) both; }
.logo-grande.peq { width: 64px; height: 64px; margin-top: 30px; }
.legal { font-size: 13px; color: var(--ink-3); margin: 22px 0 0; }
.legal a { color: var(--ink-2); }
.aviso { background: var(--aviso-bg); color: var(--aviso-tx); border-radius: 16px; padding: 12px 14px; font-size: 14.5px; margin-bottom: 14px; text-align: left; }

/* formularios */
.barra { display: grid; grid-template-columns: 46px 1fr 46px; align-items: center; text-align: center; margin-bottom: 18px; }
.barra b { font-size: 17px; }
.redondo { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--card); display: grid; place-items: center; cursor: pointer; }
.redondo svg { width: 22px; height: 22px; }
.redondo.vacio { background: none; }
.seg { display: flex; background: var(--card); border-radius: 999px; padding: 4px; margin-bottom: 20px; }
.seg button { flex: 1; border: 0; background: none; border-radius: 999px; padding: 11px; font-weight: 500; color: var(--ink-2); cursor: pointer; }
.seg button.on { background: var(--fondo); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(18,20,18,.08); }
form { display: flex; flex-direction: column; gap: 14px; }
.campo { display: flex; flex-direction: column; gap: 7px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.campo input { width: 100%; border: 1.5px solid transparent; background: var(--card); border-radius: 18px; padding: 15px 16px; font-size: 16px; outline: none; transition: border-color .15s, background .15s; }
.campo input:focus { border-color: var(--ink); background: var(--fondo); }
.pass { position: relative; display: block; }
.pass input { padding-right: 64px; }
.ver { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: var(--fondo); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.chk { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.chk input { width: 20px; height: 20px; accent-color: var(--ink); }
.error { color: var(--rojo); font-size: 14.5px; min-height: 0; }
.error:empty { display: none; }
.ok { background: var(--lima-claro); color: var(--ok-tx); border-radius: 16px; padding: 12px 14px; font-size: 14.5px; }
.enlace { border: 0; background: none; color: var(--ink-2); font-weight: 600; font-size: 15px; cursor: pointer; padding: 6px; }
form.registro .solo-entrar, form.entrar .solo-registro { display: none; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition: none !important; } .splash-logo .tallo { stroke-dashoffset: 0; } .splash-logo .hoja { transform: none; } .splash-nombre { opacity: 1; } }
/* iPhone y Android: letra del sistema y zonas seguras */
html.ios body, html.ios button, html.ios input { font-family: -apple-system, "SF Pro Text", "SF Pro Display", system-ui, sans-serif; }
html.android body, html.android button, html.android input { font-family: Roboto, "Google Sans", system-ui, sans-serif; }
html.android .btn { border-radius: 999px; }
/* invitación a instalar (navegador del móvil) */
.instalar { margin-top: 16px; text-align: left; }
.instalar-btn { width: 100%; display: flex; align-items: center; gap: 12px; border: 0; background: var(--lima-claro); border-radius: 20px; padding: 13px 16px; cursor: pointer; color: var(--ink); text-align: left; }
.instalar-btn > span:first-child { font-size: 26px; }
.instalar-btn b { display: block; font-size: 15px; }
.instalar-btn small { color: var(--ink-2); font-size: 13px; }
.instalar-btn .flecha { margin-left: auto; font-size: 22px; color: var(--ink-2); }
.instalar-pasos { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.instalar-pasos li { display: flex; gap: 10px; align-items: flex-start; background: var(--card); border-radius: 16px; padding: 10px 12px; font-size: 14.5px; line-height: 1.4; }
.instalar-pasos li > span { width: 24px; height: 24px; border-radius: 50%; background: var(--lima); display: grid; place-items: center; font-weight: 700; font-size: 12.5px; flex: none; }
/* instalada: como app nativa */
html.instalada, html.instalada body { overscroll-behavior: none; }
html.instalada body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
html.instalada input { -webkit-user-select: text; user-select: text; }
html.ios.instalada.bajo-barra body::before { content: ""; position: fixed; top: 0; left: 0; right: 0; height: env(safe-area-inset-top); background: linear-gradient(to bottom, rgba(18,20,18,.42), rgba(18,20,18,.18) 60%, rgba(18,20,18,0)); z-index: 400; pointer-events: none; }
html.ios.instalada .app { padding-top: calc(16px + env(safe-area-inset-top)); }

.campo input:focus, .ver, .seg button.on { background: var(--blanco); }
.instalar-pasos li > span, .puntos i.on { color: #121412; }
.puntos i.on { background: var(--ink); }
@media (min-width: 700px) { body { background: var(--card); } .app { background: var(--fondo); } }
@media (prefers-color-scheme: dark) { html.ios.instalada.bajo-barra body::before { display: none; } .splash-nombre { color: var(--ink); } .redondo.vacio { background: none; } }
@media (prefers-color-scheme: dark) { .btn.apple { background: #fff; color: #000; } }
/* volver a otra cuenta de este aparato */
.otras-cuentas { margin-top: 22px; text-align: left; }
.otras-cuentas p { font-size: 13px; color: var(--ink-2, #5E655D); margin: 0 0 8px; text-align: center; }
.otra-cta { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 0; border-radius: 18px; background: var(--card, #F2F4F3); color: inherit; font: inherit; cursor: pointer; margin-bottom: 8px; text-align: left; }
.otra-cta:active { transform: scale(.98); }
.oc-av { position: relative; width: 40px; height: 40px; border-radius: 50%; background: var(--lima, #C2EC63); color: #121412; display: grid; place-items: center; font-weight: 700; overflow: hidden; flex: none; }
.oc-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.oc-tx { flex: 1; min-width: 0; }
.oc-tx b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oc-tx small { display: block; font-size: 13px; opacity: .65; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oc-fl { font-size: 22px; opacity: .4; }
