/* ============================================================
   Adymia (interno: innermi) — "Ádyton en calma" (Dana aprobó 2026-10-08)
   Adymia viene de ádyton, el cuarto interior y silencioso de un templo:
   letra de inscripción (Marcellus) + una redonda y suave para la interfaz
   (Nunito). De día, niebla de salvia; de noche (modo oscuro del equipo),
   musgo profundo: quien la abre para dormir no recibe luz blanca.
   Formas: todo redondo, círculos que respiran (4 s suben, 6 s bajan).
   Los nombres --accent / --soft / --ok / --err son roles, no colores:
   el color de cada uno vive SOLO aquí arriba.
   ============================================================ */

:root {
    /* Superficies */
    --bg:        #edf1ee;   /* niebla de salvia */
    --bg-2:      #e1e8e3;   /* piedra húmeda: paneles flotantes */
    --ink:       #22312d;   /* musgo hondo: el texto */
    --muted:     #5f6f69;
    --muted-2:   #85948e;

    /* Acentos (roles) */
    --accent:    #4f7867;   /* musgo: la acción principal */
    --accent-2:  #436a5a;
    --accent-rgb: 79, 120, 103;
    --on-accent: #f4f8f5;   /* texto encima del botón */
    --soft:      #6f68a8;   /* lavanda: enlaces, estados */
    --soft-rgb:  138, 131, 189;
    --soft-ink:  #3f3a6e;
    --alba:      #b9704f;   /* calidez: solo el nombre de la persona (y el «tú» de la portada) */
    --sage:      #3f7a5f;   /* ok */
    --ok-rgb:    63, 122, 95;
    --ok-ink:    #23523d;
    --coral:     #b4495a;   /* error */
    --err-rgb:   180, 73, 90;
    --err-ink:   #7d2534;
    --warn-rgb:  166, 110, 20;   /* ámbar: "falta esto" bajo un campo (entrada única, 2026-10-11) */
    --warn-ink:  #8a5a10;

    /* Velos y sombras: en claro el velo es tinta; en oscuro, luz */
    --veil-rgb:  34, 49, 45;
    --shade-rgb: 30, 52, 44;
    --field:     #f7faf8;   /* fondo de los campos */

    /* Tarjetas */
    --glass:     rgba(255, 255, 255, .55);
    --glass-2:   rgba(255, 255, 255, .75);
    --glass-brd: rgba(34, 49, 45, .12);
    --glass-brd-strong: rgba(34, 49, 45, .24);

    --glow-amber: 0 0 0 1px rgba(var(--accent-rgb),.45), 0 10px 26px -14px rgba(var(--accent-rgb),.55);
    --glow-lilac: 0 0 0 1px rgba(var(--soft-rgb),.45), 0 10px 22px -14px rgba(var(--soft-rgb),.5);

    --radius:    26px;
    --radius-sm: 16px;
    --radius-lg: 34px;

    --font-display: "Marcellus", "Trajan Pro", Georgia, serif;
    --font-ui: "Nunito", "Segoe UI", system-ui, sans-serif;

    --ease: cubic-bezier(.2, .8, .2, 1);
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg:        #121917;   /* musgo de noche */
        --bg-2:      #1b2522;
        --ink:       #e3ebe7;
        --muted:     #9aaca5;
        --muted-2:   #6f817a;

        --accent:    #8fbca6;
        --accent-2:  #7aa892;
        --accent-rgb: 143, 188, 166;
        --on-accent: #102019;
        --soft:      #aba5d8;
        --soft-rgb:  171, 165, 216;
        --soft-ink:  #dcd8f5;
        --alba:      #e9b99f;
        --sage:      #8fcfae;
        --ok-rgb:    143, 207, 174;
        --ok-ink:    #cdeee0;
        --coral:     #ef8f9c;
        --err-rgb:   239, 143, 156;
        --err-ink:   #ffc9d0;
        --warn-rgb:  232, 190, 110;
        --warn-ink:  #e8c27c;

        --veil-rgb:  227, 235, 231;
        --shade-rgb: 0, 0, 0;
        --field:     rgba(0, 0, 0, .22);

        --glass:     rgba(227, 235, 231, .045);
        --glass-2:   rgba(227, 235, 231, .075);
        --glass-brd: rgba(227, 235, 231, .12);
        --glass-brd-strong: rgba(227, 235, 231, .24);
        color-scheme: dark;
    }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    font-family: var(--font-ui);
    background: var(--bg);
    color: var(--ink);
    min-height: 100dvh;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-synthesis: none;   /* Marcellus solo tiene 400: sin negrita ni cursiva falsas */
    overflow-x: hidden;
}

/* ---------- Atmósfera: círculos que respiran ---------- */
.bg-layer { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.bg-glow {
    position: absolute; inset: -20%;
    background:
        radial-gradient(38% 30% at 18% 8%, rgba(var(--accent-rgb),.12), transparent 70%),
        radial-gradient(44% 40% at 88% 92%, rgba(var(--soft-rgb),.12), transparent 72%);
}
/* Tres anillos concéntricos detrás del contenido: se agrandan en 4 s y bajan en 6,
   el ritmo de una respiración lenta. Muy tenues: atmósfera, no adorno. */
.bg-grain {
    position: absolute; left: 50%; top: 34%; width: min(150vw, 980px); aspect-ratio: 1;
    transform: translate(-50%, -50%); border-radius: 50%;
    background:
        radial-gradient(circle, transparent 41%, rgba(var(--accent-rgb),.10) 41.4%, transparent 42.2%),
        radial-gradient(circle, transparent 55%, rgba(var(--accent-rgb),.07) 55.4%, transparent 56.2%),
        radial-gradient(circle, transparent 69%, rgba(var(--accent-rgb),.05) 69.4%, transparent 70.2%);
    animation: respirar 10s ease-in-out infinite;
}
@keyframes respirar {
    0%, 100% { transform: translate(-50%, -50%) scale(.9); }
    40%, 55% { transform: translate(-50%, -50%) scale(1); }
}

/* ---------- Shell ---------- */
.shell {
    position: relative;
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    min-height: 100dvh;
    padding: clamp(18px, 4vw, 30px) clamp(18px, 5vw, 26px) 110px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.shell--wide { max-width: 680px; }

.stack { display: flex; flex-direction: column; gap: 16px; }
.grow { flex: 1; }
.row { display: flex; align-items: center; gap: 12px; }
.row--between { justify-content: space-between; }
.row--wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.center { text-align: center; }
.hidden { display: none !important; }

/* ---------- Tipografía ---------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; letter-spacing: .01em; line-height: 1.12; text-wrap: balance; }
h1 { font-size: clamp(34px, 8.5vw, 48px); }
h2 { font-size: clamp(26px, 6.5vw, 34px); }
h3 { font-size: clamp(20px, 5vw, 24px); }
h1 em, h2 em, .brand em { font-style: normal; color: var(--alba); }

.brand {
    font-family: var(--font-display); font-weight: 400; letter-spacing: .04em; line-height: 1;
    color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 10px;
}
.brand:hover { text-decoration: none; }
.brand--xl { font-size: clamp(40px, 11vw, 60px); }
.brand--lg { font-size: clamp(26px, 7vw, 34px); }
.brand--sm { font-size: 24px; }
/* «by muktiflow» abajo a la derecha del nombre de la barra (Dana 2026-10-30).
   Columna con el nombre arriba y la firma pegada a la derecha: no suma ancho
   (la firma es más angosta que «Adymia»), así la barra a 390 px no se parte. */
.brand-firma { display: inline-flex; flex-direction: column; align-items: flex-end; flex: none; }
.brand-by {
    font-size: 10px; line-height: 1; letter-spacing: .03em; color: var(--muted);
    text-decoration: none; margin-top: 1px; padding: 2px 0;
}
.brand-by:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }

.eyebrow {
    font-size: 11px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
    color: var(--muted);
}
.muted { color: var(--muted); }
.faint { color: var(--muted-2); }
.lead { color: var(--muted); font-size: 16px; line-height: 1.55; }
.small { font-size: 13px; }
.serif { font-family: var(--font-display); }

a { color: var(--soft); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
.muted a, .footer-links a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--muted-2); text-underline-offset: 3px; }
.muted a:hover, .footer-links a:hover { text-decoration-color: var(--accent); }

/* ---------- Ensō (la marca) ---------- */
.enso { color: var(--accent); display: block; filter: drop-shadow(0 0 12px rgba(var(--accent-rgb),.22)); }
.enso path {
    fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round;
    /* El arco mide ~95 unidades (r=18, 300°): se dibuja de un trazo, como un
       ensō de verdad, y el hueco lo deja la geometría, no el dash. */
    stroke-dasharray: 100; stroke-dashoffset: 100;
    animation: enso-draw 1.6s var(--ease) .15s forwards;
}
.enso--breathing path { animation: enso-draw 1.6s var(--ease) forwards, breathe 6s ease-in-out 1.6s infinite; }
@keyframes enso-draw { to { stroke-dashoffset: 0; } }
@keyframes breathe { 0%, 100% { opacity: .75; transform: scale(.97); } 50% { opacity: 1; transform: scale(1.03); } }
.enso--breathing { transform-origin: 50% 50%; }

/* ---------- Tarjetas ---------- */
.card {
    background: linear-gradient(160deg, var(--glass-2), var(--glass));
    border: 1px solid var(--glass-brd);
    border-radius: var(--radius);
    padding: 22px;
    backdrop-filter: blur(14px) saturate(120%);
    -webkit-backdrop-filter: blur(14px) saturate(120%);
    box-shadow: inset 0 1px 0 rgba(var(--veil-rgb),.06), 0 24px 44px -30px rgba(var(--shade-rgb),.45);
}
.card--pad { padding: 28px; }
.card--tight { padding: 16px; }
.card--warm { border-color: rgba(var(--accent-rgb),.28); box-shadow: 0 0 40px -18px rgba(var(--accent-rgb),.5); }

/* ---------- Botones ---------- */
.btn {
    -webkit-appearance: none; appearance: none;
    font-family: var(--font-ui); font-weight: 700; font-size: 15px;
    border: 1px solid transparent; border-radius: 999px;
    padding: 14px 24px; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    transition: transform .12s var(--ease), box-shadow .2s var(--ease),
                background .2s var(--ease), border-color .2s var(--ease), opacity .2s;
    user-select: none; -webkit-tap-highlight-color: transparent;
    text-decoration: none; color: var(--ink);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn--block { width: 100%; }
.btn--sm { padding: 9px 16px; font-size: 13px; }
.btn--lg { padding: 18px 28px; font-size: 17px; }

.btn--primary {
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
    color: var(--on-accent);
    box-shadow: 0 0 0 1px rgba(var(--accent-rgb),.4), 0 14px 30px -16px rgba(var(--accent-rgb),.55);
}
.btn--primary:hover { box-shadow: 0 0 0 1px rgba(var(--accent-rgb),.6), 0 16px 36px -14px rgba(var(--accent-rgb),.7); }

.btn--secondary { background: transparent; color: var(--soft); border-color: rgba(var(--soft-rgb),.45); }
.btn--secondary:hover { background: rgba(var(--soft-rgb),.08); box-shadow: var(--glow-lilac); }

.btn--ghost { background: var(--glass); color: var(--ink); border-color: var(--glass-brd); }
.btn--ghost:hover { border-color: var(--glass-brd-strong); background: var(--glass-2); }

.btn--link { background: none; border: none; color: var(--muted); font-size: 13px; padding: 8px 10px; font-weight: 600; }
.btn--link:hover { color: var(--ink); }

/* ---------- Cabecera ---------- */
.appbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.appbar .nav { display: flex; align-items: center; gap: 6px; }
.nav-link { color: var(--muted); font-size: 14px; font-weight: 600; padding: 8px 10px; border-radius: 999px; }
.nav-link:hover { color: var(--ink); text-decoration: none; background: var(--glass); }
/* Saldo en minutos (cabecera): «Saldo: N min · Recargar», lleva a
   /crear/paquetes (prueba del ignorante 2026-10-28; del 2026-10-11 a ese día
   solo informaba). */
.nav-saldo { white-space: nowrap; text-decoration: none; }
.nav-saldo:hover { text-decoration: none; border-color: var(--accent); background: rgba(var(--accent-rgb),.08); }
.nav-saldo__recargar { text-decoration: underline; text-underline-offset: 2px; }

.credit-pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 14px; border-radius: 999px;
    background: rgba(var(--accent-rgb),.09); border: 1px solid rgba(var(--accent-rgb),.32);
    font-weight: 700; color: var(--accent); font-size: 14px;
}

/* ---------- Selector de idioma ---------- */
.lang {
    display: inline-flex; align-items: center; gap: 4px; padding: 4px;
    background: var(--field); border: 1px solid var(--glass-brd); border-radius: 999px;
}
.lang__icon { font-size: 14px; padding: 0 4px 0 8px; opacity: .8; }
.lang__opt {
    padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
    color: var(--ink); opacity: .78; text-decoration: none; transition: opacity .15s, background .15s;
}
.lang__opt:hover { opacity: 1; text-decoration: none; }
.lang__opt.is-active { background: var(--accent); color: var(--on-accent); opacity: 1; }

/* ---------- Formularios ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field label, .label { font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.field .hint { font-size: 13px; color: var(--muted-2); line-height: 1.45; }
.input, textarea.input, select.input {
    font-family: var(--font-ui); font-size: 16px; color: var(--ink);
    background: var(--field); border: 1px solid var(--glass-brd);
    border-radius: var(--radius-sm); padding: 14px 16px; width: 100%;
    transition: border-color .2s, box-shadow .2s;
}
.input::placeholder { color: var(--muted-2); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.14); }
/* Campo que se pasa del tope de services/entrada.py (contador de Crear). */
.input--pasado, .input--pasado:focus { border-color: rgba(var(--err-rgb),.7); }
.field .hint.contador { display: block; text-align: right; }
.field .hint.contador--pasado { color: var(--err-ink); }
.field .hint.contador[hidden] { display: none; }
textarea.input { resize: vertical; min-height: 96px; line-height: 1.5; }
select.input { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
select.input option { background: var(--bg-2); color: var(--ink); }

.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.45; cursor: pointer; color: var(--muted); }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: none; }

.divider { display: flex; align-items: center; gap: 12px; color: var(--muted-2); font-size: 12px; margin: 4px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--glass-brd); }

/* Secciones del formulario de Crear */
.section { display: flex; flex-direction: column; gap: 16px; }
.section__head { display: flex; align-items: baseline; gap: 12px; }
.section__head .eyebrow { color: var(--accent); }
.section__head h3 { font-size: 22px; }

/* Opciones tipo chip (radio ocultos) */
.opts { display: flex; flex-direction: column; gap: 8px; }
.opts--row { flex-direction: row; flex-wrap: wrap; }
.opt {
    display: flex; align-items: center; gap: 12px;
    padding: 13px 16px; border-radius: var(--radius-sm); cursor: pointer;
    background: var(--glass); border: 1px solid var(--glass-brd);
    font-size: 15px; color: var(--ink);
    transition: border-color .15s, background .15s, transform .12s var(--ease);
}
.opts--row .opt { flex: 1 1 auto; justify-content: center; min-width: 110px; padding: 11px 14px; font-size: 14px; }
.opt:hover { border-color: var(--glass-brd-strong); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt::before {
    content: ""; width: 16px; height: 16px; border-radius: 50%; flex: none;
    border: 1.5px solid var(--muted-2); transition: border-color .15s, box-shadow .15s, background .15s;
}
.opts--row .opt::before { display: none; }
.opt:has(input:checked), .opt.is-selected {
    border-color: var(--accent); background: rgba(var(--accent-rgb),.08); box-shadow: var(--glow-amber);
}
.opt:has(input:checked)::before, .opt.is-selected::before { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 3px var(--bg-2); }

/* Duración */
.dur-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dur {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 20px 14px; border-radius: var(--radius); text-align: center; cursor: pointer;
    background: var(--glass); border: 1px solid var(--glass-brd);
    transition: transform .12s var(--ease), border-color .2s, box-shadow .2s;
}
.dur input { position: absolute; opacity: 0; pointer-events: none; }
.dur:hover { transform: translateY(-2px); }
.dur__t { font-family: var(--font-display); font-weight: 600; font-size: 34px; line-height: 1; }
.dur__t small { font-family: var(--font-ui); font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 4px; }
.dur__p { font-size: 13px; color: var(--muted); }
.dur__p s { color: var(--muted-2); margin-right: 4px; }
.dur:has(input:disabled), .dur--off { opacity: .45; cursor: not-allowed; }
.dur:has(input:disabled):hover, .dur--off:hover { transform: none; }
.dur:has(input:checked), .dur.is-selected { border-color: var(--accent); box-shadow: var(--glow-amber); background: rgba(var(--accent-rgb),.06); }

/* Ánimo */
.mood { display: flex; gap: 6px; justify-content: space-between; }
.mood__opt {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 10px 4px; border-radius: var(--radius-sm); cursor: pointer;
    background: var(--glass); border: 1px solid var(--glass-brd); text-align: center;
    transition: border-color .15s, background .15s;
}
.mood__opt input { position: absolute; opacity: 0; pointer-events: none; }
.mood__opt .e { font-size: 22px; line-height: 1; }
.mood__opt .l { font-size: 11px; color: var(--muted); }
.mood__opt:hover { border-color: var(--glass-brd-strong); }
.mood__opt:has(input:checked) { border-color: var(--soft); background: rgba(var(--soft-rgb),.10); box-shadow: var(--glow-lilac); }

/* Precio */
.price {
    text-align: center; padding: 20px; border-radius: var(--radius);
    background: rgba(var(--soft-rgb),.08); border: 1px solid rgba(var(--soft-rgb),.25);
}
.price--free { background: rgba(var(--ok-rgb),.08); border-color: rgba(var(--ok-rgb),.35); }
.price__label { font-size: 13px; color: var(--muted); }
.price__amount { font-family: var(--font-display); font-weight: 600; font-size: 40px; line-height: 1.05; margin: 4px 0; color: var(--ink); }
.price--free .price__amount { color: var(--sage); letter-spacing: .04em; }
/* «No pagas nada» (2026-10-28): una frase, no una cifra. */
.price__amount--texto { font-size: clamp(26px, 7vw, 32px); letter-spacing: .01em; }

.offer {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 14px; border-radius: 999px; font-size: 13px; text-align: center;
    background: rgba(var(--accent-rgb),.08); border: 1px solid rgba(var(--accent-rgb),.3); color: var(--accent);
}
.free-banner {
    display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px;
    background: rgba(var(--ok-rgb),.1); border: 1px solid rgba(var(--ok-rgb),.35); color: var(--sage);
    font-weight: 700; font-size: 14px;
}

/* Paquetes */
.pkg { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; }
.pkg__name { font-weight: 700; }
.pkg__meta { font-size: 13px; color: var(--muted); }
.pkg__gift { color: var(--sage); font-weight: 700; }
.pkg--destacado { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.pkg__badge { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: var(--accent); color: var(--on-accent); vertical-align: middle; }
.pkg__price { font-family: var(--font-display); font-weight: 600; font-size: 22px; white-space: nowrap; }
.pkg__price s { font-family: var(--font-ui); font-size: 13px; font-weight: 500; color: var(--muted-2); margin-right: 4px; }
/* La moneda junto a cada precio (2026-10-28: «$6.00» sin moneda): Bold cobra en USD. */
.pkg__moneda { font-family: var(--font-ui); font-size: 12px; font-weight: 700; color: var(--muted); }
.pkg__buy { display: flex; align-items: center; gap: 12px; }
@media (max-width: 520px) { .pkg__buy { flex-direction: column; align-items: flex-end; gap: 8px; } }

/* Resumen (checkout / gratis) */
.summary { display: flex; flex-direction: column; }
.summary div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--glass-brd); font-size: 15px; }
.summary div:last-child { border-bottom: none; }
.summary .k { color: var(--muted); flex: none; }
.summary .v { text-align: right; font-weight: 600; }

/* ---------- Avisos ---------- */
.alert { padding: 13px 16px; border-radius: var(--radius-sm); font-size: 14px; line-height: 1.45; }
.alert--error { background: rgba(var(--err-rgb),.1); border: 1px solid rgba(var(--err-rgb),.32); color: var(--err-ink); }
.alert--ok    { background: rgba(var(--ok-rgb),.1); border: 1px solid rgba(var(--ok-rgb),.35); color: var(--ok-ink); }
.alert--info  { background: rgba(var(--soft-rgb),.09); border: 1px solid rgba(var(--soft-rgb),.3); color: var(--soft-ink); }
.alert--prose p { margin: 0 0 10px; } .alert--prose p:last-child { margin: 0; }
.alert a { color: var(--ink); text-decoration: underline; }

/* ---------- Reproductor ---------- */
.player { display: flex; flex-direction: column; gap: 18px; }
.player__head { display: flex; align-items: center; gap: 14px; }
/* El ensō no se encoge aunque el título sea largo (2026-10-28: un título de 5
   líneas lo dejaba como un puntito). */
.player__head .enso { flex: none; }
.player__textos { min-width: 0; }
.player__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(24px, 6vw, 30px); line-height: 1.1; overflow-wrap: anywhere; }
.player__sub { color: var(--muted); font-size: 14px; }
/* Al tocar play con mala señal (2026-10-28): main.js lo muestra mientras el
   audio no llega, y el botón respira más lento. */
.player__cargando { margin: 0; color: var(--muted); }
.play.is-cargando { animation: pulse 1.4s ease-in-out infinite; }
.player__ctrl { display: flex; align-items: center; gap: 16px; }
.play {
    width: 68px; height: 68px; border-radius: 50%; flex: none; cursor: pointer; border: none;
    background: linear-gradient(180deg, var(--accent), var(--accent-2)); color: var(--on-accent);
    display: grid; place-items: center; font-size: 24px;
    box-shadow: 0 0 0 1px rgba(var(--accent-rgb),.4), 0 18px 40px -16px rgba(var(--accent-rgb),.8);
    transition: transform .12s var(--ease), box-shadow .2s;
}
.play:hover { box-shadow: 0 0 0 1px rgba(var(--accent-rgb),.6), 0 20px 50px -14px rgba(var(--accent-rgb),1); }
.play:active { transform: scale(.96); }
.play.is-playing { animation: breathe 5s ease-in-out infinite; }
.play__ico { display: block; width: 24px; height: 24px; }
.player__bar { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.track { position: relative; height: 6px; border-radius: 6px; background: rgba(var(--veil-rgb),.08); overflow: hidden; cursor: pointer; }
.track__fill { position: absolute; inset: 0 auto 0 0; width: 0%; border-radius: 6px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width .25s linear; }
.times { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--glass); border: 1px solid var(--glass-brd); color: var(--muted); }
.chip--amber { color: var(--accent); border-color: rgba(var(--accent-rgb),.3); }

/* Subtítulos (demo) */
.caption {
    min-height: 92px; display: flex; align-items: center; justify-content: center; text-align: center;
    font-family: var(--font-display); font-size: clamp(20px, 5.4vw, 25px); line-height: 1.38;
    color: var(--ink); padding: 8px 6px;
}
.caption span { opacity: 0; transform: translateY(6px); animation: cap-in .6s var(--ease) forwards; }
@keyframes cap-in { to { opacity: 1; transform: none; } }

/* ---------- Librería ---------- */
.lib-card {
    display: flex; align-items: center; gap: 14px; padding: 16px 18px; color: var(--ink);
    text-decoration: none; transition: transform .12s var(--ease), border-color .2s;
}
.lib-card:hover { transform: translateX(3px); border-color: var(--glass-brd-strong); text-decoration: none; }
.lib-card__ico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; background: rgba(var(--accent-rgb),.1); border: 1px solid rgba(var(--accent-rgb),.3); color: var(--accent); }
.lib-card__body { flex: 1; min-width: 0; }
.lib-card__t { display: block; font-family: var(--font-display); font-weight: 600; font-size: 20px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-card__s { display: block; font-size: 13px; color: var(--muted); }
.lib-card__meta { text-align: right; font-size: 12px; color: var(--muted-2); flex: none; }
/* Bienvenida con la racha (2026-10-20) */
.racha { display: flex; flex-direction: column; gap: 4px; }
.racha__hola { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 20px; line-height: 1.15; }
.racha__linea { margin: 0; font-size: 14px; }

/* ---------- Progreso (generando) ---------- */
.progress { width: 100%; height: 8px; border-radius: 6px; background: rgba(var(--veil-rgb),.08); overflow: hidden; }
.progress__fill { height: 100%; width: 0%; border-radius: 6px; background: linear-gradient(90deg, var(--soft), var(--accent)); transition: width .5s var(--ease); }

.spinner {
    width: 34px; height: 34px; margin: 0 auto; border-radius: 50%;
    border: 3px solid var(--glass-brd); border-top-color: var(--accent);
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Features (portada) ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.feature { padding: 16px 14px; text-align: left; }
.feature__t { font-family: var(--font-display); font-weight: 600; font-size: 20px; line-height: 1.1; margin-bottom: 4px; }
.feature__d { font-size: 13px; color: var(--muted); line-height: 1.45; }
@media (max-width: 520px) { .features { grid-template-columns: 1fr; } .feature { display: flex; flex-direction: column; } }

/* ---------- Demo de la portada ---------- */
.demo { position: relative; overflow: hidden; min-height: 380px; padding: 0; }
/* Una escena a la vez: la que sale se quita del flujo (display) y la que entra
   sube con `rise`. Un crossfade con absolute dejaba las dos encimadas. */
.demo__scene { display: none; padding: 22px; flex-direction: column; gap: 14px; }
.demo__scene.is-on { display: flex; animation: rise .5s var(--ease); }
.demo__fake { display: flex; flex-direction: column; gap: 6px; }
.demo__fake .label { font-size: 12px; }
.demo__fake .input { padding: 11px 14px; font-size: 15px; min-height: 44px; }
.demo__fake input.input:focus { border-color: var(--soft); box-shadow: 0 0 0 3px rgba(var(--soft-rgb),.16); }
.demo__caret::after { content: "|"; color: var(--accent); animation: pulse 1s infinite; margin-left: 1px; }
.demo__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.demo__chips .opt { padding: 8px 12px; font-size: 13px; }
.demo__chips button.opt { font-family: var(--font-ui); }
.demo__steps { display: flex; flex-direction: column; gap: 10px; align-items: center; justify-content: center; flex: 1; text-align: center; min-height: 300px; }
.demo__step { color: var(--muted); font-size: 15px; opacity: 0; transition: opacity .3s, color .3s; }
.demo__step.is-on { opacity: 1; color: var(--ink); }
.demo__step.is-done { opacity: .55; }
.demo .caption { min-height: 110px; }
.demo .play.is-paused { animation: none; opacity: .85; }
.play-hint { text-align: center; font-size: 13px; color: var(--muted); }

/* Portada 2026-10-08: subtítulo de escena, título del ejemplo y la "pantalla"
   del formulario completo, que se desplaza sola como una grabación. */
.land-scene { font-size: clamp(22px, 5.6vw, 28px); line-height: 1.3; margin-top: 14px; color: var(--ink); }
/* 2026-10-26: «Tu meditación.» arriba, el «tú» con el color de la persona y la
   palabra que rota (landing.js) en su propia línea, en musgo. */
.land-title__1 { display: block; }
.land-title__tu { font-style: normal; color: var(--alba); }
.land-rota__linea { display: block; color: var(--accent); }
.land-rota { display: inline-block; transition: opacity .35s ease, transform .35s ease; }
.land-rota.is-out { opacity: 0; transform: translateY(-6px); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.demo-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.demo-head__t { font-size: 14px; font-weight: 700; color: var(--muted); min-width: 0; }
.demo { height: 560px; }
@media (max-width: 520px) { .demo { height: 500px; } }
.demo__screen { height: 100%; overflow: hidden; }   /* lo desplaza el JS; el dedo mueve la PÁGINA, no el demo */
.demo__screen::-webkit-scrollbar { display: none; }
.demo__form { display: flex; flex-direction: column; gap: 24px; padding-bottom: 8px; }
.demo__h { font-size: 26px; }
.demo__form .section__head h3 { font-size: 19px; }
.demo__form .input { min-height: 46px; font-size: 15px; padding: 11px 14px; }
.demo__area { min-height: 84px; line-height: 1.5; }
.demo__form .dur { padding: 14px 10px; }
.demo__form .dur__t { font-size: 28px; }
.mood__opt.is-selected { border-color: var(--soft); background: rgba(var(--soft-rgb),.12); box-shadow: var(--glow-lilac); }
.demo__after { display: flex; flex-direction: column; gap: 12px; }
.demo .demo__steps h3 { font-size: 24px; }
.demo [data-scene="creating"], .demo [data-scene="player"] { height: 100%; justify-content: center; }

/* El cursor que "hace clic": un puntero que viaja al chip o al campo y pulsa.
   Es lo que convierte "aparece seleccionado" en "alguien lo eligió". */
.demo__cursor {
    position: absolute; z-index: 5; left: 40px; top: 40px; width: 18px; height: 18px; pointer-events: none;
    opacity: 0; transition: left .55s var(--ease), top .55s var(--ease), opacity .25s, transform .12s;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 3l14 8.5-6.2 1.6L9.5 20z' fill='%23f2edff' stroke='%230c0b16' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
    filter: drop-shadow(0 4px 10px rgba(var(--shade-rgb),.6));
}
.demo__cursor.is-visible { opacity: 1; }
.demo__cursor.is-click { transform: scale(.78); }

/* El ejemplo no se lee como la app de verdad (prueba del ignorante 2026-10-28:
   «toqué ese botón pensando que era el de verdad»). Una marca fija en la
   esquina, los botones de mentira con borde punteado y sin relleno, y nada de
   adentro responde al dedo salvo el nombre y el play (lo que landing.js deja
   tocar). */
.demo__marca {
    position: absolute; top: 10px; right: 10px; z-index: 4; pointer-events: none;
    padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
    background: var(--bg-2); border: 1px dashed var(--glass-brd-strong); color: var(--muted);
}
.demo .opt, .demo .mood__opt, .demo .dur, .demo__falso { pointer-events: none; cursor: default; }
.demo .btn.demo__falso {
    background: transparent; box-shadow: none; color: var(--muted);
    border: 1.5px dashed var(--glass-brd-strong);
}

/* ---------- Feedback (flotante) ---------- */
.fb { position: fixed; right: 16px; bottom: 16px; z-index: 60; }
.fb summary { list-style: none; }
.fb summary::-webkit-details-marker { display: none; }
.fb__btn {
    cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px; border-radius: 999px;
    background: var(--bg-2); border: 1px solid var(--glass-brd-strong); color: var(--ink); font-size: 14px; font-weight: 700;
    box-shadow: 0 10px 30px rgba(var(--shade-rgb),.45);
}
.fb__btn:hover { border-color: var(--accent); }
.fb__panel {
    position: absolute; right: 0; bottom: 56px; width: min(92vw, 360px); padding: 18px;
    border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--glass-brd-strong);
    box-shadow: 0 20px 50px rgba(var(--shade-rgb),.55);
}
.fb__title { font-family: var(--font-display); font-weight: 600; font-size: 22px; }
/* Cuando la página llega a los bordes de la pantalla (celular, tableta), el
   botón flotante tapaba lo de abajo a la derecha, como «Ver sugerencias para
   mí» (prueba del ignorante 2026-10-28). Ahí va al final de la página, antes
   del pie (base.html lo pone ahí), y el panel abre hacia arriba, centrado. Con
   880 px o más hay margen a los lados de la columna (560 px) y sigue flotando. */
@media (max-width: 879px) {
    .fb { position: relative; right: auto; bottom: auto; z-index: 20; align-self: center; }
    .fb__btn { box-shadow: none; }
    .fb__panel { right: 50%; transform: translateX(50%); }
}
.stars { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.stars input { position: absolute; opacity: 0; pointer-events: none; }
.stars label { font-size: 26px; color: var(--muted-2); cursor: pointer; transition: color .15s; line-height: 1; }
.stars label:hover, .stars label:hover ~ label, .stars input:checked ~ label { color: var(--accent); }

/* WhatsApp */
.wa {
    position: fixed; left: 16px; bottom: 16px; z-index: 60;
    width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
    background: #25D366; color: #fff; box-shadow: 0 10px 30px rgba(var(--shade-rgb),.45); text-decoration: none;
    transition: transform .12s var(--ease);
}
.wa:hover { transform: scale(1.06); text-decoration: none; }

/* ---------- Pie ---------- */
.footer { text-align: center; color: var(--muted-2); font-size: 12px; line-height: 1.6; padding-top: 8px; }
.footer-links { font-size: 12px; }

/* ---------- Animaciones ---------- */
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.rise { opacity: 0; animation: rise .55s var(--ease) forwards; }
.rise:nth-child(1) { animation-delay: .04s; }
.rise:nth-child(2) { animation-delay: .10s; }
.rise:nth-child(3) { animation-delay: .16s; }
.rise:nth-child(4) { animation-delay: .22s; }
.rise:nth-child(5) { animation-delay: .28s; }
.rise:nth-child(6) { animation-delay: .34s; }
.rise:nth-child(7) { animation-delay: .40s; }
.rise:nth-child(8) { animation-delay: .46s; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .enso path { stroke-dashoffset: 0; }
    html { scroll-behavior: auto; }
}

/* ---------- htmx ---------- */
.htmx-request .btn[type=submit], .btn.htmx-request, .btn:disabled { opacity: .6; pointer-events: none; }

/* ---------- Crear: revisión antes de cobrar (2026-10-08) ---------- */
/* La misma ruedita de "generando", chica y en línea, junto al texto. */
.spinner--sm { display: inline-block; width: 16px; height: 16px; margin: 0 8px 0 0; border-width: 2px; vertical-align: -3px; }
.crear-revisando { margin: 0; }
/* El campo que nombró el aviso (largo o revisor): mismo borde que el contador pasado. */
.input--revisar, .input--revisar:focus { border-color: rgba(var(--err-rgb),.7); }

/* Momento de vida (Crear, 2026-10-11): la fila con "Cambiar" cuando ya está
   guardado, y lo que la IA sugiere para ese momento, de otro color (lavanda)
   y con un asterisco, encima de las opciones de siempre. */
.etapa__actual { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.etapa__actual p { margin: 0; }
.opts__grupo { display: block; margin: 6px 0 0; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); }
.opts__grupo--sug { color: var(--soft); }
.opt--sugerida { background: rgba(var(--soft-rgb), .16); border-color: rgba(var(--soft-rgb), .5); }
.opt--sugerida:hover { border-color: rgba(var(--soft-rgb), .6); }
/* Sugerida para un texto de hoy que la persona ya cambió (2026-10-21): no se elige */
.opt--apagada { opacity: .45; cursor: not-allowed; }
.opt--sugerida:has(input:checked), .opt--sugerida.is-selected { border-color: var(--soft); background: rgba(var(--soft-rgb), .24); box-shadow: var(--glow-lilac); }
.opt--sugerida:has(input:checked)::before, .opt--sugerida.is-selected::before { border-color: var(--soft); background: var(--soft); box-shadow: inset 0 0 0 3px var(--bg-2); }
/* El asterisco de una sugerida (Dana 2026-10-11: la nota a la vista ocupaba
   mucho). Al tocarlo, la nota sale abajo como mensaje temporal (#sug-nota).
   Es un botón dentro del label: tocarlo no elige la opción. */
.opt__ast {
    flex: none; margin: -8px -8px -8px auto; width: 36px; height: 36px; padding: 0;
    display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent;
    color: var(--soft); font: inherit; font-size: 20px; font-weight: 700; line-height: 1; cursor: pointer;
}
.opt__ast:hover, .opt__ast:focus-visible { background: rgba(var(--soft-rgb), .2); }
.sug-nota {
    position: fixed; left: 50%; bottom: 84px; z-index: 70; transform: translate(-50%, 8px);
    width: min(calc(100vw - 32px), 420px); padding: 12px 16px; border-radius: var(--radius-sm);
    background: var(--bg-2); border: 1px solid rgba(var(--soft-rgb), .6);
    box-shadow: 0 14px 40px rgba(var(--shade-rgb), .45);
    display: flex; flex-direction: column; gap: 2px; font-size: 14px; line-height: 1.4; color: var(--ink);
    opacity: 0; transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.sug-nota[hidden] { display: none; }
.sug-nota.is-on { opacity: 1; transform: translate(-50%, 0); }
.sug-nota strong { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); }
/* Pantalla de espera: el mensaje que rota se apaga y vuelve (main.js). */
.gen-rota { transition: opacity .3s var(--ease); min-height: 2.8em; }
/* Librería: la que se está creando o falló, más tenue que las listas. */
.lib-card--creando, .lib-card--fallida { border-style: dashed; }
.lib-card--fallida .lib-card__ico { color: var(--muted); background: var(--glass); border-color: var(--glass-brd); }

/* ---------- Entrada única (Dana 2026-10-11) ----------
   pages/entrada.html: 1 Entrar, 2a Ya tienes cuenta, 2b Es tu primera vez /
   Falta un paso, 3 Revisa tu correo. Lo que falta se avisa en ámbar bajo el
   campo (mismo texto en el JS y en el servidor). */
.entrada h2 { font-size: clamp(24px, 6vw, 30px); }
.entrada__texto { margin: 8px 0 0; color: var(--ink); line-height: 1.5; }
.entrada__ayuda { margin: 0; font-size: 13px; color: var(--muted-2); line-height: 1.45; }
.chip-correo {
    display: inline-flex; align-items: center; gap: 4px; max-width: 100%; align-self: flex-start;
    font-size: 13px; padding: 4px 4px 4px 13px; border-radius: 999px;
    background: var(--glass); border: 1px solid var(--glass-brd); color: var(--ink);
}
.chip-correo b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.chip-correo a { flex: none; font-size: 12px; font-weight: 700; color: var(--soft); padding: 5px 10px; border-radius: 999px; }
.chip-correo a:hover { background: rgba(var(--soft-rgb), .12); text-decoration: none; }
.msg-campo { margin: 0; font-size: 13px; font-weight: 700; line-height: 1.4; color: var(--warn-ink); }
.msg-campo[hidden] { display: none; }
.entrada .input[aria-invalid="true"] { border-color: rgba(var(--warn-rgb), .8); }
.linkish {
    font: 600 14px var(--font-ui); line-height: 1.45; color: var(--soft); background: none; border: 0;
    padding: 4px 0; cursor: pointer; text-align: center;
    text-decoration: underline; text-decoration-color: rgba(var(--soft-rgb), .45); text-underline-offset: 3px;
}
.linkish:hover { color: var(--soft-ink); text-decoration-color: currentColor; }
.entrada__clave > summary { list-style: none; display: block; width: fit-content; margin: 0 auto; }
.entrada__clave > summary::-webkit-details-marker { display: none; }
.entrada__clave[open] > summary { margin-bottom: 14px; }
.entrada .check a, .legal-linea a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--muted-2); text-underline-offset: 3px; }
/* Tienda: «Al continuar aceptas…» bajo los paquetes y bajo «Pagar con Bold». */
.legal-linea { margin: 0; font-size: 13px; color: var(--muted); text-align: center; line-height: 1.5; }
