/* ==========================================================================
   LC Builder — Design System
   --------------------------------------------------------------------------
   Sin frameworks. Sin dependencias. Todo lo que hay aquí es CSS nativo:
   custom properties, grid, container queries y :has(). Los iconos son SVG
   inline en el HTML y las tipografías son Google Fonts (licencia libre).

   Estructura:
     01 · Tokens            06 · Wizard: tipo de negocio
     02 · Reset y base      07 · Editor (shell, rail, panel, lienzo)
     03 · Utilidades        08 · Controles del panel
     04 · Componentes       09 · Asistente de IA
     05 · Chrome (header)   10 · Planes y checkout
                            11 · Responsive y accesibilidad
     14 · Dirección del sitio (paso de planes)
   ========================================================================== */

/* ==========================================================================
   01 · TOKENS
   ========================================================================== */
:root {
    /* — Marca — */
    --lc-brand:        #6C5CE7;
    --lc-brand-2:      #00E5A0;
    --lc-brand-soft:   color-mix(in srgb, var(--lc-brand) 18%, transparent);
    --lc-gradient:     linear-gradient(135deg, #6C5CE7 0%, #A855F7 45%, #00E5A0 100%);
    --lc-gradient-sut: linear-gradient(135deg, color-mix(in srgb, #6C5CE7 14%, transparent), color-mix(in srgb, #00E5A0 12%, transparent));

    /* — Superficies (tema oscuro por defecto) — */
    --lc-bg:           #0A0A0F;
    --lc-bg-2:         #101018;
    --lc-surface:      #16161F;
    --lc-surface-2:    #1E1E2B;
    --lc-surface-3:    #2A2A3A;
    --lc-border:       #34344A;
    --lc-border-soft:  #24242F;

    /* — Texto — */
    --lc-text:         #F4F4F7;
    --lc-text-2:       #A8A8B8;
    --lc-text-3:       #6E6E82;

    /* — Semánticos — */
    --lc-ok:           #22C55E;
    --lc-warn:         #F59E0B;
    --lc-danger:       #F43F5E;
    --lc-info:         #38BDF8;

    /* — Lienzo del sitio (siempre claro: es el sitio del cliente) — */
    --lc-canvas:       #E8E8EE;

    /* — Radios — */
    --r-xs: 6px;  --r-sm: 9px;  --r-md: 13px;  --r-lg: 18px;  --r-xl: 26px;  --r-full: 999px;

    /* — Sombras — */
    --sh-sm:  0 1px 2px rgba(0,0,0,.32);
    --sh-md:  0 6px 20px -6px rgba(0,0,0,.5);
    --sh-lg:  0 20px 48px -12px rgba(0,0,0,.6);
    --sh-glow: 0 0 0 1px color-mix(in srgb, var(--lc-brand) 40%, transparent),
               0 8px 32px -8px color-mix(in srgb, var(--lc-brand) 55%, transparent);

    /* — Espaciado — */
    --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px;
    --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;

    /* — Tipografía — */
    --lc-font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --lc-mono: ui-monospace, 'SF Mono', 'Cascadia Code', Menlo, monospace;

    /* — Medidas del layout — */
    --rail-w:    76px;
    --panel-w:   356px;
    --header-h:  58px;

    /* — Movimiento — */
    --ease:      cubic-bezier(.32, .72, 0, 1);
    --ease-out:  cubic-bezier(.16, 1, .3, 1);
    --dur:       .22s;
}

/* — Tema claro del editor — */
[data-tema="claro"] {
    --lc-bg:          #F6F7FB;
    --lc-bg-2:        #FFFFFF;
    --lc-surface:     #FFFFFF;
    --lc-surface-2:   #F3F4F8;
    --lc-surface-3:   #E9EAF1;
    --lc-border:      #E1E3EC;
    --lc-border-soft: #EDEEF4;
    --lc-text:        #14141C;
    --lc-text-2:      #5A5A6E;
    --lc-text-3:      #8E8EA3;
    --lc-canvas:      #DDDDE6;
    --sh-sm:  0 1px 2px rgba(20,20,28,.07);
    --sh-md:  0 6px 20px -6px rgba(20,20,28,.14);
    --sh-lg:  0 20px 48px -12px rgba(20,20,28,.2);
}

/* ==========================================================================
   02 · RESET Y BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

.bldr-body {
    margin: 0;
    min-height: 100dvh;
    background: var(--lc-bg);
    color: var(--lc-text);
    font-family: var(--lc-font);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overscroll-behavior-y: none;
}

/* El reset va dentro de :where() para que tenga especificidad CERO. Sin esto,
   `.bldr-body button` (0,1,1) le gana a cualquier clase de componente (0,1,0)
   y deja sin fondo a las tarjetas, planes y fichas, que son <button>. */
:where(.bldr-body h1, .bldr-body h2, .bldr-body h3,
       .bldr-body h4, .bldr-body h5, .bldr-body h6,
       .bldr-body p, .bldr-body figure) { margin: 0; }

:where(.bldr-body ul, .bldr-body ol) { margin: 0; padding: 0; list-style: none; }
:where(.bldr-body a) { color: inherit; text-decoration: none; }
:where(.bldr-body img, .bldr-body svg) { display: block; max-width: 100%; }
:where(.bldr-body button, .bldr-body input, .bldr-body select, .bldr-body textarea) {
    font: inherit; color: inherit;
}
:where(.bldr-body button) { cursor: pointer; background: none; border: 0; padding: 0; }

/* Scrollbars discretas y coherentes con el tema */
.bldr-body ::-webkit-scrollbar { width: 10px; height: 10px; }
.bldr-body ::-webkit-scrollbar-track { background: transparent; }
.bldr-body ::-webkit-scrollbar-thumb {
    background: var(--lc-surface-3);
    border-radius: var(--r-full);
    border: 3px solid transparent;
    background-clip: content-box;
}
.bldr-body ::-webkit-scrollbar-thumb:hover { background: var(--lc-text-3); background-clip: content-box; }

/* Foco visible y consistente en todo el builder */
.bldr-body :focus-visible {
    outline: 2px solid var(--lc-brand-2);
    outline-offset: 2px;
    border-radius: var(--r-xs);
}

/* ==========================================================================
   03 · UTILIDADES
   ========================================================================== */
.u-sr {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap; border: 0;
}
.u-row     { display: flex; align-items: center; gap: var(--s-2); }
.u-between { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.u-grow    { flex: 1; min-width: 0; }
.u-trunc   { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-hide    { display: none !important; }
.u-muted   { color: var(--lc-text-2); }
.u-dim     { color: var(--lc-text-3); }
.u-mono    { font-family: var(--lc-mono); font-variant-numeric: tabular-nums; }

.u-icon { width: 18px; height: 18px; flex: none; stroke-width: 1.9; }
.u-icon-sm { width: 15px; height: 15px; }
.u-icon-lg { width: 22px; height: 22px; }

/* ==========================================================================
   04 · COMPONENTES
   ========================================================================== */

/* — Botones — */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
    height: 40px; padding: 0 var(--s-4);
    border-radius: var(--r-sm);
    font-size: .875rem; font-weight: 650; letter-spacing: -.01em;
    white-space: nowrap;
    transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
                transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), opacity var(--dur);
}
.btn:active:not(:disabled) { transform: translateY(1px) scale(.995); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn-primary {
    background: var(--lc-brand); color: #fff;
    box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, var(--sh-sm);
}
.btn-primary:hover:not(:disabled) {
    background: color-mix(in srgb, var(--lc-brand) 88%, white);
    box-shadow: var(--sh-glow);
}

.btn-accent {
    background: var(--lc-gradient); color: #08080D;
    font-weight: 750;
    box-shadow: 0 8px 28px -10px color-mix(in srgb, var(--lc-brand) 70%, transparent);
}
.btn-accent:hover:not(:disabled) { filter: brightness(1.07); }

.btn-ghost {
    background: var(--lc-surface-2); color: var(--lc-text);
    border: 1px solid var(--lc-border);
}
.btn-ghost:hover:not(:disabled) { background: var(--lc-surface-3); border-color: var(--lc-text-3); }

.btn-quiet { background: transparent; color: var(--lc-text-2); }
.btn-quiet:hover:not(:disabled) { background: var(--lc-surface-2); color: var(--lc-text); }

.btn-sm  { height: 32px; padding: 0 var(--s-3); font-size: .8rem; border-radius: var(--r-xs); }
.btn-lg  { height: 50px; padding: 0 var(--s-6); font-size: .97rem; border-radius: var(--r-md); }
.btn-block { width: 100%; }
.btn-icon { width: 34px; height: 34px; padding: 0; border-radius: var(--r-sm); }

/* — Etiquetas — */
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    height: 26px; padding: 0 10px;
    border-radius: var(--r-full);
    background: var(--lc-surface-2); border: 1px solid var(--lc-border);
    font-size: .74rem; font-weight: 600; color: var(--lc-text-2);
}
.chip-brand { background: var(--lc-brand-soft); border-color: transparent; color: color-mix(in srgb, var(--lc-brand) 55%, var(--lc-text)); }
.chip-ok    { background: color-mix(in srgb, var(--lc-ok) 16%, transparent);   border-color: transparent; color: var(--lc-ok); }
.chip-warn  { background: color-mix(in srgb, var(--lc-warn) 16%, transparent); border-color: transparent; color: var(--lc-warn); }

/* — Tarjeta — */
.card {
    background: var(--lc-surface);
    border: 1px solid var(--lc-border);
    border-radius: var(--r-lg);
}

/* — Avisos — */
.nota {
    display: flex; gap: var(--s-3); align-items: flex-start;
    padding: var(--s-4);
    border-radius: var(--r-md);
    background: var(--lc-surface-2);
    border: 1px solid var(--lc-border);
    font-size: .84rem; color: var(--lc-text-2); line-height: 1.6;
}
.nota-brand { background: var(--lc-gradient-sut); border-color: color-mix(in srgb, var(--lc-brand) 30%, transparent); }
.nota svg { color: var(--lc-brand); margin-top: 2px; }
.nota strong { color: var(--lc-text); }

/* — Cargando — */
#bldr-loading {
    position: fixed; inset: 0; z-index: 9999;
    display: none; flex-direction: column; align-items: center; justify-content: center; gap: var(--s-4);
    background: color-mix(in srgb, var(--lc-bg) 88%, transparent);
    backdrop-filter: blur(14px);
    transition: opacity .35s var(--ease);
}
.bldr-spinner {
    width: 42px; height: 42px; border-radius: 50%;
    border: 3px solid var(--lc-border);
    border-top-color: var(--lc-brand-2);
    animation: spin .75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* — Avisos flotantes — */
#bldr-toasts {
    position: fixed; top: calc(var(--header-h) + 14px); right: 16px; z-index: 9000;
    display: flex; flex-direction: column; gap: var(--s-2);
    pointer-events: none;
}
.toast {
    display: flex; align-items: center; gap: var(--s-3);
    max-width: min(380px, calc(100vw - 32px));
    padding: 11px var(--s-4);
    border-radius: var(--r-md);
    background: var(--lc-surface-2);
    border: 1px solid var(--lc-border);
    box-shadow: var(--sh-lg);
    font-size: .85rem; font-weight: 550;
    animation: toast-in .32s var(--ease-out);
    pointer-events: auto;
}
.toast.saliendo { animation: toast-out .22s var(--ease) forwards; }
.toast-ok    svg { color: var(--lc-ok); }
.toast-error svg { color: var(--lc-danger); }
.toast-warn  svg { color: var(--lc-warn); }
.toast-info  svg { color: var(--lc-info); }
@keyframes toast-in  { from { opacity: 0; transform: translateX(24px) scale(.96); } }
@keyframes toast-out { to   { opacity: 0; transform: translateX(24px) scale(.96); } }

/* — Modal — */
.modal-fondo {
    position: fixed; inset: 0; z-index: 9500;
    display: none; align-items: center; justify-content: center;
    padding: var(--s-4);
    background: rgba(4,4,8,.72); backdrop-filter: blur(8px);
}
.modal-fondo.abierto { display: flex; animation: fade .2s var(--ease); }
.modal {
    width: min(520px, 100%);
    max-height: min(86dvh, 720px);
    display: flex; flex-direction: column;
    background: var(--lc-surface);
    border: 1px solid var(--lc-border);
    border-radius: var(--r-xl);
    box-shadow: var(--sh-lg);
    animation: modal-in .3s var(--ease-out);
    overflow: hidden;
}
.modal-cab { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-5) var(--s-5) var(--s-3); }
.modal-cab h3 { font-size: 1.06rem; font-weight: 750; letter-spacing: -.02em; }
.modal-cuerpo { padding: 0 var(--s-5) var(--s-5); overflow-y: auto; }
.modal-pie { display: flex; gap: var(--s-2); justify-content: flex-end; padding: var(--s-4) var(--s-5); border-top: 1px solid var(--lc-border-soft); background: var(--lc-surface-2); }
@keyframes fade { from { opacity: 0; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(.97); } }

/* ==========================================================================
   05 · CHROME — cabecera y pasos
   ========================================================================== */
.bldr-header {
    position: sticky; top: 0; z-index: 500;
    height: var(--header-h);
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
    gap: var(--s-4);
    padding: 0 var(--s-4);
    background: color-mix(in srgb, var(--lc-bg-2) 86%, transparent);
    backdrop-filter: blur(18px) saturate(1.5);
    border-bottom: 1px solid var(--lc-border-soft);
}
.bldr-logo { display: flex; align-items: center; gap: 9px; font-weight: 800; letter-spacing: -.03em; font-size: 1rem; }
.bldr-logo-mark {
    width: 28px; height: 28px; border-radius: 8px;
    background: var(--lc-gradient);
    display: grid; place-items: center;
    color: #07070C; font-size: .8rem; font-weight: 900;
    box-shadow: 0 4px 14px -4px color-mix(in srgb, var(--lc-brand) 80%, transparent);
}
.bldr-logo em { font-style: normal; color: var(--lc-text-3); font-weight: 600; }

/* Pasos */
.pasos { display: flex; align-items: center; gap: var(--s-1); }
.paso {
    display: flex; align-items: center; gap: 7px;
    height: 30px; padding: 0 11px;
    border-radius: var(--r-full);
    font-size: .78rem; font-weight: 600; color: var(--lc-text-3);
    transition: all var(--dur) var(--ease);
}
.paso-num {
    width: 19px; height: 19px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--lc-surface-3); color: var(--lc-text-3);
    font-size: .66rem; font-weight: 750;
    transition: all var(--dur) var(--ease);
}
.paso.hecho { color: var(--lc-text-2); }
.paso.hecho .paso-num { background: color-mix(in srgb, var(--lc-brand-2) 22%, transparent); color: var(--lc-brand-2); }
.paso.activo { background: var(--lc-surface-2); color: var(--lc-text); }
.paso.activo .paso-num { background: var(--lc-brand); color: #fff; }
.paso-linea { width: 18px; height: 1.5px; background: var(--lc-border); border-radius: 2px; }
.paso-etiqueta { display: none; }
@media (min-width: 900px) { .paso-etiqueta { display: inline; } }

.bldr-header-fin { display: flex; align-items: center; justify-content: flex-end; gap: var(--s-2); }

/* ==========================================================================
   06 · PANTALLAS DEL WIZARD
   ========================================================================== */
.pantalla { display: none; }
.pantalla.activa { display: block; animation: pantalla-in .38s var(--ease-out); }
@keyframes pantalla-in { from { opacity: 0; transform: translateY(10px); } }

.envoltura { max-width: 1180px; margin: 0 auto; padding: var(--s-7) var(--s-4) var(--s-8); }
.envoltura-estrecha { max-width: 860px; }

.titular {
    font-size: clamp(1.7rem, 1.1rem + 2.1vw, 2.6rem);
    font-weight: 800; letter-spacing: -.035em; line-height: 1.1;
    text-wrap: balance;
}
.entradilla {
    margin-top: var(--s-3);
    font-size: clamp(.95rem, .9rem + .25vw, 1.08rem);
    color: var(--lc-text-2); line-height: 1.65; max-width: 62ch;
    text-wrap: pretty;
}
.seccion-cab { margin-bottom: var(--s-6); }

/* — Barra fija de acción — */
.barra-accion {
    position: sticky; bottom: 0; z-index: 400;
    margin-top: var(--s-6);
    padding: var(--s-4) 0;
    background: linear-gradient(to top, var(--lc-bg) 62%, transparent);
}
.barra-accion-int {
    display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
    padding: var(--s-3);
    background: var(--lc-surface);
    border: 1px solid var(--lc-border);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-lg);
}

/* ==========================================================================
   07 · EDITOR
   ========================================================================== */
body.editor-abierto { overflow: hidden; }

#pantalla-editor.activa {
    display: grid;
    grid-template-columns: var(--rail-w) var(--panel-w) 1fr;
    height: calc(100dvh - var(--header-h));
    overflow: hidden;
    animation: none;
}
body.panel-plegado #pantalla-editor.activa { grid-template-columns: var(--rail-w) 0 1fr; }

/* — Rail de iconos — */
.rail {
    display: flex; flex-direction: column; align-items: center; gap: var(--s-1);
    padding: var(--s-3) 0;
    background: var(--lc-bg-2);
    border-right: 1px solid var(--lc-border-soft);
    overflow-y: auto;
}
.rail-btn {
    position: relative;
    width: 54px; height: 52px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    border-radius: var(--r-sm);
    color: var(--lc-text-3);
    font-size: .625rem; font-weight: 650; letter-spacing: -.01em;
    transition: all var(--dur) var(--ease);
}
.rail-btn:hover { background: var(--lc-surface-2); color: var(--lc-text-2); }
.rail-btn.activo { background: var(--lc-surface-2); color: var(--lc-text); }
.rail-btn.activo::before {
    content: ''; position: absolute; left: -11px; top: 50%; transform: translateY(-50%);
    width: 3px; height: 22px; border-radius: 0 3px 3px 0; background: var(--lc-brand);
}
.rail-sep { width: 26px; height: 1px; background: var(--lc-border); margin: var(--s-2) 0; }
.rail-pie { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: var(--s-1); }

/* — Panel contextual — */
.panel {
    display: flex; flex-direction: column;
    background: var(--lc-bg-2);
    border-right: 1px solid var(--lc-border-soft);
    overflow: hidden;
}
body.panel-plegado .panel { display: none; }

.panel-cab {
    display: flex; align-items: center; justify-content: space-between; gap: var(--s-2);
    padding: var(--s-4) var(--s-4) var(--s-3);
    border-bottom: 1px solid var(--lc-border-soft);
    flex: none;
}
.panel-cab h2 { font-size: .95rem; font-weight: 750; letter-spacing: -.02em; }
.panel-cab p  { font-size: .74rem; color: var(--lc-text-3); margin-top: 1px; }
.panel-cuerpo { flex: 1; overflow-y: auto; padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-5); }
.panel-pie {
    flex: none; display: flex; gap: var(--s-2);
    padding: var(--s-3) var(--s-4);
    border-top: 1px solid var(--lc-border-soft);
    background: var(--lc-bg-2);
}
.panel-vista { display: none; }
.panel-vista.activa { display: contents; }

/* — Lienzo — */
.lienzo {
    display: flex; flex-direction: column;
    background: var(--lc-canvas);
    overflow: hidden;
}
[data-tema="claro"] .lienzo { background: #C9CAD4; }

.lienzo-barra {
    flex: none;
    display: flex; align-items: center; gap: var(--s-2);
    padding: var(--s-2) var(--s-3);
    background: var(--lc-bg-2);
    border-bottom: 1px solid var(--lc-border-soft);
}
.segmento {
    display: flex; gap: 2px; padding: 3px;
    background: var(--lc-surface-2); border-radius: var(--r-sm);
    border: 1px solid var(--lc-border);
}
.segmento button {
    display: flex; align-items: center; gap: 6px;
    height: 28px; padding: 0 11px;
    border-radius: var(--r-xs);
    font-size: .77rem; font-weight: 620; color: var(--lc-text-3);
    transition: all var(--dur) var(--ease);
}
.segmento button:hover { color: var(--lc-text-2); }
.segmento button.activo { background: var(--lc-surface); color: var(--lc-text); box-shadow: var(--sh-sm); }

.lienzo-marco {
    flex: 1; display: flex; align-items: flex-start; justify-content: center;
    padding: var(--s-5); overflow: auto;
}
.dispositivo {
    position: relative;
    width: 100%; height: 100%;
    max-width: 100%;
    background: #fff;
    border-radius: var(--r-md);
    box-shadow: var(--sh-lg);
    overflow: hidden;
    transition: max-width .42s var(--ease-out);
}
.dispositivo.tablet { max-width: 834px; border-radius: var(--r-lg); }
.dispositivo.movil  { max-width: 400px; border-radius: 30px; border: 9px solid #101018; }
.dispositivo iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ==========================================================================
   08 · CONTROLES DEL PANEL
   ========================================================================== */
.campo { display: flex; flex-direction: column; gap: 6px; }
.campo > label, .grupo > label {
    font-size: .755rem; font-weight: 680; letter-spacing: .01em;
    color: var(--lc-text-2);
    display: flex; align-items: center; justify-content: space-between; gap: var(--s-2);
}
.campo-pista { font-size: .705rem; color: var(--lc-text-3); line-height: 1.5; }

/* Se estilan TODOS los campos del panel, no sólo los que están dentro de .campo:
   los editores de items generan inputs sueltos y con el estilo del navegador
   quedaban en blanco sobre el panel oscuro, ilegibles.

   Se enumeran los tipos en vez de excluirlos con :not(): encadenar varios
   :not([type=…]) suma la especificidad de cada atributo y el selector acababa
   ganándole a las clases de los propios componentes. */
.panel :is(input[type=text], input[type=tel], input[type=url], input[type=email],
           input[type=password], input[type=number], input[type=search], input:not([type]), textarea, select),
.entrada,
.modal-cuerpo :is(input[type=text], input[type=email], input[type=tel], textarea, select),
.checkout-form :is(input[type=text], input[type=email], input[type=tel], input[type=password], textarea, select),
/* Campos de las pantallas del wizard que no están en el panel, el modal ni el checkout
   (p. ej. «¿Cuál es tu dominio?» del paso de planes). Sin esto sólo reciben el reset
   `color: inherit` y conservan el fondo blanco del navegador: en tema oscuro el texto
   heredado es claro y se vuelve invisible. */
.pantalla .campo :is(input[type=text], input[type=email], input[type=tel], input[type=url],
                     input[type=search], textarea, select) {
    width: 100%;
    min-height: 38px; padding: 8px 11px;
    background: var(--lc-surface); color: var(--lc-text);
    border: 1px solid var(--lc-border); border-radius: var(--r-sm);
    font-size: .855rem; outline: none;
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur);
}
.panel textarea, .modal-cuerpo textarea, .checkout-form textarea, .pantalla .campo textarea {
    resize: vertical; min-height: 76px; line-height: 1.6;
}
.panel select, .modal-cuerpo select, .checkout-form select, .pantalla .campo select {
    appearance: none; cursor: pointer; padding-right: 30px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236E6E82' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center;
}
.panel :is(input[type=text], input[type=tel], input[type=url], input[type=email],
           input[type=password], input[type=number], input[type=search], input:not([type]), textarea, select):focus,
.entrada:focus,
.modal-cuerpo :is(input[type=text], input[type=email], input[type=tel], textarea, select):focus,
.checkout-form :is(input[type=text], input[type=email], input[type=tel], input[type=password], textarea, select):focus,
.pantalla .campo :is(input[type=text], input[type=email], input[type=tel], input[type=url],
                     input[type=search], textarea, select):focus {
    border-color: var(--lc-brand);
    box-shadow: 0 0 0 3px var(--lc-brand-soft);
}
.bldr-body :is(input, textarea)::placeholder { color: var(--lc-text-3); opacity: 1; }

.grupo { display: flex; flex-direction: column; gap: var(--s-3); }
.grupo-titulo {
    display: flex; align-items: center; gap: var(--s-2);
    font-size: .7rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase;
    color: var(--lc-text-3);
    padding-bottom: var(--s-2); border-bottom: 1px solid var(--lc-border-soft);
}

/* — Interruptor — */
.interruptor { position: relative; display: inline-flex; flex: none; width: 36px; height: 21px; }
.interruptor input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.interruptor span {
    position: absolute; inset: 0; border-radius: var(--r-full);
    background: var(--lc-surface-3); border: 1px solid var(--lc-border);
    transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.interruptor span::after {
    content: ''; position: absolute; top: 2px; left: 2px;
    width: 15px; height: 15px; border-radius: 50%;
    background: var(--lc-text-3);
    transition: transform var(--dur) var(--ease-out), background var(--dur);
}
.interruptor input:checked + span { background: var(--lc-brand); border-color: var(--lc-brand); }
.interruptor input:checked + span::after { transform: translateX(15px); background: #fff; }
.interruptor input:focus-visible + span { outline: 2px solid var(--lc-brand-2); outline-offset: 2px; }

/* — Selector de opciones (segmentado vertical) — */
.opciones { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 6px; }
.opcion {
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    padding: 9px 6px;
    background: var(--lc-surface); border: 1px solid var(--lc-border); border-radius: var(--r-sm);
    font-size: .715rem; font-weight: 620; color: var(--lc-text-2); text-align: center;
    transition: all var(--dur) var(--ease);
}
.opcion:hover { border-color: var(--lc-text-3); color: var(--lc-text); }
.opcion.activa { border-color: var(--lc-brand); background: var(--lc-brand-soft); color: var(--lc-text); }
.opcion-muestra { width: 100%; height: 26px; border-radius: var(--r-xs); overflow: hidden; border: 1px solid var(--lc-border-soft); }

/* — Paletas — */
.paletas { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: var(--s-2); }
.paleta {
    padding: 5px; border-radius: var(--r-sm);
    background: var(--lc-surface); border: 1px solid var(--lc-border);
    transition: all var(--dur) var(--ease);
}
.paleta:hover { border-color: var(--lc-text-3); transform: translateY(-1px); }
.paleta.activa { border-color: var(--lc-brand); box-shadow: 0 0 0 2px var(--lc-brand-soft); }
.paleta-tiras { display: flex; height: 30px; border-radius: var(--r-xs); overflow: hidden; }
.paleta-tiras i { flex: 1; }
.paleta-tiras i:nth-child(3) { flex: .6; }
.paleta-nombre { display: block; margin-top: 5px; font-size: .655rem; font-weight: 620; color: var(--lc-text-3); text-align: center; }
.paleta.activa .paleta-nombre { color: var(--lc-text-2); }

/* — Colores a medida — */
.colores { display: flex; flex-direction: column; gap: 7px; }
.color-fila {
    display: flex; align-items: center; gap: var(--s-3);
    padding: 6px 9px;
    background: var(--lc-surface); border: 1px solid var(--lc-border); border-radius: var(--r-sm);
}
.color-fila input[type=color] {
    width: 30px; height: 30px; flex: none; padding: 0;
    border: 1px solid var(--lc-border); border-radius: var(--r-xs);
    background: none; cursor: pointer;
}
.color-fila input[type=color]::-webkit-color-swatch-wrapper { padding: 2px; }
.color-fila input[type=color]::-webkit-color-swatch { border: none; border-radius: 4px; }
.color-fila span { font-size: .79rem; font-weight: 600; flex: 1; }
.color-fila code { font-size: .68rem; color: var(--lc-text-3); font-family: var(--lc-mono); }

/* — Deslizador — */
.deslizador { display: flex; align-items: center; gap: var(--s-3); }
.deslizador input[type=range] {
    flex: 1; height: 4px; appearance: none;
    background: var(--lc-surface-3); border-radius: var(--r-full); outline: none;
}
.deslizador input[type=range]::-webkit-slider-thumb {
    appearance: none; width: 15px; height: 15px; border-radius: 50%;
    background: var(--lc-brand); border: 2px solid var(--lc-bg-2); cursor: pointer;
    box-shadow: var(--sh-sm);
}
.deslizador input[type=range]::-moz-range-thumb {
    width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--lc-bg-2);
    background: var(--lc-brand); cursor: pointer;
}
.deslizador output { min-width: 44px; text-align: right; font-size: .74rem; color: var(--lc-text-3); font-family: var(--lc-mono); }

/* — Lista de secciones (reordenable) — */
.secciones-lista { display: flex; flex-direction: column; gap: 5px; }
.sec-fila {
    background: var(--lc-surface);
    border: 1px solid var(--lc-border);
    border-radius: var(--r-sm);
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), opacity var(--dur);
}
.sec-fila.abierta { border-color: var(--lc-brand); box-shadow: 0 0 0 2px var(--lc-brand-soft); }
.sec-fila.apagada .sec-nombre { color: var(--lc-text-3); }
.sec-fila.arrastrando { opacity: .35; }
.sec-fila.destino { border-color: var(--lc-brand-2); border-style: dashed; }

.sec-cab { display: flex; align-items: center; gap: var(--s-2); padding: 8px 9px; }
.sec-asa {
    color: var(--lc-text-3); cursor: grab; flex: none;
    display: grid; place-items: center; width: 18px; height: 26px;
    touch-action: none;
}
.sec-asa:active { cursor: grabbing; }
.sec-emoji { font-size: 1rem; flex: none; }
.sec-nombre { flex: 1; font-size: .825rem; font-weight: 640; letter-spacing: -.01em; }
.sec-conteo { font-size: .66rem; color: var(--lc-text-3); font-family: var(--lc-mono); }
.sec-editar {
    width: 26px; height: 26px; border-radius: var(--r-xs);
    display: grid; place-items: center; color: var(--lc-text-3);
    transition: all var(--dur) var(--ease);
}
.sec-editar:hover { background: var(--lc-surface-3); color: var(--lc-text); }
.sec-fila.abierta .sec-editar { color: var(--lc-brand); transform: rotate(180deg); }

.sec-cuerpo {
    display: none;
    padding: var(--s-3) var(--s-3) var(--s-4);
    border-top: 1px solid var(--lc-border-soft);
    flex-direction: column; gap: var(--s-4);
}
.sec-fila.abierta .sec-cuerpo { display: flex; animation: desplegar .26s var(--ease-out); }
@keyframes desplegar { from { opacity: 0; transform: translateY(-6px); } }

/* — Tarjetas de item — */
.items { display: flex; flex-direction: column; gap: 7px; }
.item {
    position: relative;
    padding: var(--s-3);
    background: var(--lc-surface-2);
    border: 1px solid var(--lc-border-soft);
    border-radius: var(--r-sm);
    display: flex; flex-direction: column; gap: 6px;
}
.item-cab { display: flex; align-items: center; gap: 6px; }
.panel .item .item-emoji {
    width: 34px; height: 34px; min-height: 34px; flex: none; text-align: center;
    background: var(--lc-surface); border: 1px solid var(--lc-border); border-radius: var(--r-xs);
    font-size: 1.05rem; padding: 0;
}
/* Separación entre la ayuda de la sección y el primer campo */
.sec-cuerpo > div > .campo-pista:first-child { display: block; margin-bottom: var(--s-3); }
.item-acciones { display: flex; gap: 2px; margin-left: auto; }
.item-btn {
    width: 25px; height: 25px; border-radius: var(--r-xs);
    display: grid; place-items: center; color: var(--lc-text-3);
    transition: all var(--dur) var(--ease);
}
.item-btn:hover { background: var(--lc-surface-3); color: var(--lc-text); }
.item-btn.peligro:hover { background: color-mix(in srgb, var(--lc-danger) 18%, transparent); color: var(--lc-danger); }
.item-dupla { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }

.vacio {
    padding: var(--s-5) var(--s-3); text-align: center;
    border: 1px dashed var(--lc-border); border-radius: var(--r-sm);
    color: var(--lc-text-3); font-size: .78rem;
}

/* — Estrellas — */
.estrellas { display: flex; gap: 2px; }
.estrellas button { color: var(--lc-surface-3); transition: color .15s var(--ease); }
.estrellas button.on { color: var(--lc-warn); }
.estrellas:hover button { color: var(--lc-surface-3); }
.estrellas:hover button:hover, .estrellas:hover button:hover ~ button { color: var(--lc-warn); }
/* El orden inverso hace que el hover ilumine de izquierda a derecha */
.estrellas { flex-direction: row-reverse; justify-content: flex-end; }

/* — Subida de imágenes — */
.soltar {
    position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    min-height: 92px; padding: var(--s-3);
    background: var(--lc-surface);
    border: 1.5px dashed var(--lc-border); border-radius: var(--r-sm);
    color: var(--lc-text-3); font-size: .755rem; text-align: center;
    cursor: pointer; overflow: hidden;
    transition: all var(--dur) var(--ease);
}
.soltar:hover, .soltar.encima { border-color: var(--lc-brand); color: var(--lc-text-2); background: var(--lc-surface-2); }
.soltar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.soltar .soltar-quitar {
    position: absolute; top: 6px; right: 6px; z-index: 2;
    width: 24px; height: 24px; border-radius: 50%;
    background: rgba(8,8,14,.72); color: #fff;
    display: grid; place-items: center;
    opacity: 0; transition: opacity var(--dur);
}
.soltar:hover .soltar-quitar { opacity: 1; }

.galeria-rejilla { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.galeria-celda {
    position: relative; aspect-ratio: 4/3; border-radius: var(--r-xs); overflow: hidden;
    background: var(--lc-surface-2); border: 1px solid var(--lc-border-soft);
}
.galeria-celda img { width: 100%; height: 100%; object-fit: cover; }
.galeria-celda .celda-btns {
    position: absolute; inset: auto 0 0 0; display: flex; gap: 2px; justify-content: center;
    padding: 4px; background: linear-gradient(to top, rgba(8,8,14,.85), transparent);
    opacity: 0; transition: opacity var(--dur);
}
.galeria-celda:hover .celda-btns { opacity: 1; }
.celda-btns button { width: 22px; height: 22px; border-radius: var(--r-xs); color: #fff; display: grid; place-items: center; }
.celda-btns button:hover { background: rgba(255,255,255,.2); }
.galeria-add {
    display: grid; place-items: center; aspect-ratio: 4/3;
    border: 1.5px dashed var(--lc-border); border-radius: var(--r-xs);
    color: var(--lc-text-3);
    transition: all var(--dur) var(--ease);
}
.galeria-add:hover { border-color: var(--lc-brand); color: var(--lc-brand); }

/* — Biblioteca de secciones a añadir — */
.agregar-sec { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.agregar-sec button {
    display: flex; align-items: center; gap: 7px;
    padding: 9px;
    background: var(--lc-surface); border: 1px solid var(--lc-border); border-radius: var(--r-sm);
    font-size: .75rem; font-weight: 620; color: var(--lc-text-2); text-align: left;
    transition: all var(--dur) var(--ease);
}
.agregar-sec button:hover { border-color: var(--lc-brand); color: var(--lc-text); background: var(--lc-surface-2); }

/* — Bloques de un plan superior (Agenda, Asistente) — */
.agregar-sec button.bloqueada { border-style: dashed; color: var(--lc-text-3); cursor: help; }
.agregar-sec button.bloqueada:hover { border-color: var(--lc-border); background: var(--lc-surface); color: var(--lc-text-2); }
.agregar-sec button.bloqueada span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.agregar-sec button.bloqueada small { font-size: .66rem; font-weight: 650; color: var(--lc-text-3); }
.chip-plan { height: auto; min-height: 22px; padding: 2px 8px; flex: none; white-space: nowrap;
    background: color-mix(in srgb, var(--lc-warn) 14%, transparent); border-color: transparent;
    color: color-mix(in srgb, var(--lc-warn) 70%, var(--lc-text)); font-size: .66rem; }
.sec-cab .chip-plan { max-width: 46%; overflow: hidden; text-overflow: ellipsis; }
.nota-plan { flex-direction: column; gap: var(--s-2); margin-bottom: var(--s-3); }
.campo-pista.pista-mal { color: color-mix(in srgb, var(--lc-danger) 78%, var(--lc-text)); }
.campo-pista.pista-mal[hidden] { display: none; }

/* ==========================================================================
   09 · ASISTENTE DE IA
   ========================================================================== */
.ia-lanzador {
    position: fixed; right: 20px; bottom: 20px; z-index: 600;
    display: flex; align-items: center; gap: 9px;
    height: 50px; padding: 0 18px 0 15px;
    border-radius: var(--r-full);
    background: var(--lc-gradient); color: #07070C;
    font-size: .87rem; font-weight: 750;
    box-shadow: 0 12px 34px -10px color-mix(in srgb, var(--lc-brand) 85%, transparent);
    transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease);
}
.ia-lanzador:hover { transform: translateY(-2px) scale(1.02); }
.ia-lanzador.oculto { display: none; }

.ia-panel {
    position: fixed; right: 20px; bottom: 20px; z-index: 700;
    width: min(420px, calc(100vw - 32px));
    height: min(640px, calc(100dvh - var(--header-h) - 40px));
    display: none; flex-direction: column;
    background: var(--lc-bg-2);
    border: 1px solid var(--lc-border);
    border-radius: var(--r-xl);
    box-shadow: var(--sh-lg);
    overflow: hidden;
}
.ia-panel.abierto { display: flex; animation: ia-in .34s var(--ease-out); }
@keyframes ia-in { from { opacity: 0; transform: translateY(20px) scale(.96); } }

.ia-cab {
    flex: none; display: flex; align-items: center; gap: var(--s-3);
    padding: var(--s-3) var(--s-4);
    border-bottom: 1px solid var(--lc-border-soft);
    background: var(--lc-gradient-sut);
}
.ia-avatar {
    width: 32px; height: 32px; flex: none; border-radius: var(--r-sm);
    background: var(--lc-gradient); color: #07070C;
    display: grid; place-items: center;
}
.ia-cab h3 { font-size: .87rem; font-weight: 720; letter-spacing: -.015em; }
.ia-cab p  { font-size: .69rem; color: var(--lc-text-3); }

/* — Consultas del plan (sólo suscripción) — */
.ia-medidor { flex: none; padding: 9px var(--s-4); border-bottom: 1px solid var(--lc-border-soft); }
.ia-medidor-cab { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); margin-bottom: 5px; }
.ia-medidor-cab span { font-size: .69rem; font-weight: 620; color: var(--lc-text-3); }
.ia-medidor-cab b { font-size: .69rem; font-family: var(--lc-mono); color: var(--lc-text-2); }
.ia-barra { height: 5px; border-radius: var(--r-full); background: var(--lc-surface-3); overflow: hidden; }
.ia-barra i {
    display: block; height: 100%; width: 0;
    border-radius: var(--r-full);
    background: linear-gradient(90deg, var(--lc-brand-2), var(--lc-brand));
    transition: width .5s var(--ease-out), background .3s;
}
.ia-medidor.alerta .ia-barra i { background: linear-gradient(90deg, var(--lc-warn), var(--lc-danger)); }

.ia-mensajes { flex: 1; overflow-y: auto; padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-4); }

.ia-msg { display: flex; gap: 9px; max-width: 100%; animation: msg-in .3s var(--ease-out); }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px); } }
.ia-msg-user { flex-direction: row-reverse; }
.ia-msg-avatar {
    width: 26px; height: 26px; flex: none; border-radius: var(--r-xs);
    display: grid; place-items: center;
    background: var(--lc-gradient); color: #07070C;
}
.ia-burbuja {
    padding: 10px 13px;
    border-radius: var(--r-md);
    background: var(--lc-surface-2);
    border: 1px solid var(--lc-border-soft);
    font-size: .845rem; line-height: 1.62;
    max-width: 88%;
    overflow-wrap: anywhere;
}
.ia-msg-user .ia-burbuja {
    background: var(--lc-brand); border-color: transparent; color: #fff;
    border-bottom-right-radius: var(--r-xs);
}
.ia-msg-assistant .ia-burbuja { border-bottom-left-radius: var(--r-xs); }
.ia-burbuja strong { font-weight: 700; }
.ia-burbuja ul { margin: 6px 0 0; padding-left: 16px; list-style: disc; }

.ia-fichas { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.ia-ficha {
    padding: 5px 11px; border-radius: var(--r-full);
    background: var(--lc-surface); border: 1px solid var(--lc-border);
    font-size: .745rem; font-weight: 600; color: var(--lc-text-2);
    transition: all var(--dur) var(--ease);
}
.ia-ficha:hover { border-color: var(--lc-brand); color: var(--lc-text); background: var(--lc-brand-soft); }

.ia-escribiendo { display: flex; gap: 4px; padding: 4px 0; }
.ia-escribiendo i {
    width: 6px; height: 6px; border-radius: 50%; background: var(--lc-text-3);
    animation: rebote 1.3s var(--ease) infinite;
}
.ia-escribiendo i:nth-child(2) { animation-delay: .16s; }
.ia-escribiendo i:nth-child(3) { animation-delay: .32s; }
@keyframes rebote { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-5px); opacity: 1; } }

.ia-form { flex: none; display: flex; gap: 7px; padding: var(--s-3); border-top: 1px solid var(--lc-border-soft); }
.ia-form textarea {
    flex: 1; min-height: 40px; max-height: 120px; padding: 9px 12px;
    background: var(--lc-surface); border: 1px solid var(--lc-border); border-radius: var(--r-sm);
    font-size: .855rem; resize: none; outline: none; line-height: 1.5;
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.ia-form textarea:focus { border-color: var(--lc-brand); box-shadow: 0 0 0 3px var(--lc-brand-soft); }
.ia-enviar { width: 40px; height: 40px; flex: none; border-radius: var(--r-sm); background: var(--lc-brand); color: #fff; display: grid; place-items: center; transition: all var(--dur) var(--ease); }
.ia-enviar:hover:not(:disabled) { background: color-mix(in srgb, var(--lc-brand) 88%, white); }
.ia-enviar:disabled { opacity: .4; cursor: not-allowed; }

.ia-bloqueado {
    margin: var(--s-3); padding: var(--s-4);
    border-radius: var(--r-md);
    background: color-mix(in srgb, var(--lc-warn) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--lc-warn) 32%, transparent);
    font-size: .8rem; line-height: 1.6; color: var(--lc-text-2);
}
.ia-bloqueado h4 { font-size: .85rem; font-weight: 720; color: var(--lc-text); margin-bottom: 5px; }

/* ==========================================================================
   10 · PLANES Y CHECKOUT
   ========================================================================== */
.planes { display: grid; grid-template-columns: repeat(auto-fit, minmax(228px, 1fr)); gap: var(--s-3); }
.plan {
    position: relative; display: flex; flex-direction: column;
    padding: var(--s-5);
    background: var(--lc-surface); border: 1px solid var(--lc-border); border-radius: var(--r-lg);
    text-align: left;
    transition: all var(--dur) var(--ease);
}
.plan:hover { border-color: var(--lc-text-3); transform: translateY(-2px); }
.plan.elegido { border-color: var(--lc-brand); box-shadow: var(--sh-glow); background: var(--lc-surface-2); }
.plan-sello {
    position: absolute; top: -10px; left: var(--s-5);
    padding: 3px 10px; border-radius: var(--r-full);
    background: var(--lc-gradient); color: #07070C;
    font-size: .66rem; font-weight: 800; letter-spacing: .02em;
}
.plan-nombre { font-size: .95rem; font-weight: 750; }
.plan-desc   { font-size: .765rem; color: var(--lc-text-2); margin-top: 2px; min-height: 2.6em; }
.plan-precio { margin: var(--s-4) 0 2px; font-size: 1.95rem; font-weight: 800; letter-spacing: -.04em; }
.plan-precio span { font-size: .85rem; font-weight: 600; color: var(--lc-text-3); letter-spacing: 0; }
.plan-inicial { font-size: .76rem; color: var(--lc-text-2); line-height: 1.45; }
.plan-lista { display: flex; flex-direction: column; gap: 7px; margin: var(--s-4) 0; }
.plan-lista li { display: flex; gap: 8px; align-items: flex-start; font-size: .79rem; color: var(--lc-text-2); line-height: 1.5; }
.plan-lista svg { color: var(--lc-brand-2); margin-top: 3px; flex: none; }
.plan-elegir { margin-top: auto; }

.checkout { display: grid; grid-template-columns: 1.35fr 1fr; gap: var(--s-5); align-items: start; }
.checkout-form { padding: var(--s-6); }
.checkout-form .campo { margin-bottom: var(--s-4); }
.resumen {
    position: sticky; top: calc(var(--header-h) + var(--s-4));
    padding: var(--s-5);
    background: var(--lc-surface-2); border: 1px solid var(--lc-border); border-radius: var(--r-lg);
}
.resumen h3 { font-size: .78rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; color: var(--lc-text-3); margin-bottom: var(--s-4); }
.resumen-fila { display: flex; justify-content: space-between; gap: var(--s-3); font-size: .84rem; padding: 6px 0; color: var(--lc-text-2); }
.resumen-fila b { color: var(--lc-text); font-weight: 650; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.resumen-nota { margin-top: 2px; font-size: .82rem; line-height: 1.5; color: var(--lc-text-2); text-align: right; }
.resumen-sep { height: 1px; background: var(--lc-border); margin: var(--s-3) 0; }
.resumen-total { font-size: 1.35rem; font-weight: 800; letter-spacing: -.03em; color: var(--lc-text); }

.pwd-envoltura { position: relative; }
.pwd-envoltura input { padding-right: 40px; }
.pwd-ojo {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    width: 30px; height: 30px; border-radius: var(--r-xs);
    display: grid; place-items: center; color: var(--lc-text-3);
}
.pwd-ojo:hover { background: var(--lc-surface-3); color: var(--lc-text); }

.casilla { display: flex; gap: 9px; align-items: flex-start; font-size: .8rem; color: var(--lc-text-2); line-height: 1.55; cursor: pointer; }
.casilla input { width: 17px; height: 17px; flex: none; margin-top: 1px; accent-color: var(--lc-brand); cursor: pointer; }
.casilla a { color: var(--lc-brand-2); text-decoration: underline; text-underline-offset: 2px; }

/* — Éxito — */
.exito { text-align: center; padding: var(--s-8) var(--s-4); max-width: 560px; margin: 0 auto; }
.exito-marca {
    width: 76px; height: 76px; margin: 0 auto var(--s-5);
    border-radius: 50%; display: grid; place-items: center;
    background: color-mix(in srgb, var(--lc-ok) 16%, transparent); color: var(--lc-ok);
    animation: brinco .55s var(--ease-out);
}
@keyframes brinco { from { transform: scale(.4); opacity: 0; } }

/* ==========================================================================
   11 · RESPONSIVE Y ACCESIBILIDAD
   ========================================================================== */
@media (max-width: 1180px) {
    :root { --panel-w: 320px; }
}

@media (max-width: 980px) {
    .checkout { grid-template-columns: 1fr; }
    .checkout > * { min-width: 0; }   /* sin esto el formulario o el resumen ensanchan la columna y la página se desborda a 320 px */
    .resumen { position: static; }
}
@media (max-width: 860px) {
    .pwd-ojo { width: 44px; height: 44px; right: 2px; }                 /* área táctil mínima */
    .checkout-form .pwd-envoltura input { padding-right: 52px; }       /* el texto no pasa por debajo del ojo */
}
@media (max-width: 480px) {
    .btn-lg { padding: 0 var(--s-4); }   /* el texto de «Crear cuenta y continuar» no cabía con 32 px de relleno a cada lado */
}

@media (max-width: 860px) {
    :root { --rail-w: 100%; --header-h: 54px; }

    /* En pantallas estrechas el logo completo parte la cabecera en dos líneas */
    .bldr-logo { font-size: .92rem; white-space: nowrap; }
    .bldr-logo em { display: none; }
    .bldr-header { grid-template-columns: auto 1fr auto; gap: var(--s-2); padding: 0 var(--s-3); }
    .pasos { justify-content: center; }
    .paso { padding: 0 6px; }

    /* En móvil el editor se apila: lienzo arriba, panel abajo, rail como barra. */
    #pantalla-editor.activa {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr auto auto;
        grid-template-areas: 'lienzo' 'panel' 'rail';
    }
    body.panel-plegado #pantalla-editor.activa { grid-template-columns: 1fr; }

    .lienzo { grid-area: lienzo; }
    .panel  { grid-area: panel; max-height: 46dvh; border-right: 0; border-top: 1px solid var(--lc-border); }
    .rail   { grid-area: rail; flex-direction: row; justify-content: space-around;
              border-right: 0; border-top: 1px solid var(--lc-border);
              padding: 4px var(--s-2); padding-bottom: max(4px, env(safe-area-inset-bottom)); }
    .rail-btn { width: auto; flex: 1; height: 46px; }
    .rail-btn.activo::before { left: 50%; top: -4px; transform: translateX(-50%); width: 22px; height: 3px; border-radius: 0 0 3px 3px; }
    .rail-sep, .rail-pie { display: none; }
    body.panel-plegado .panel { display: none; }

    .lienzo-marco { padding: var(--s-3); }
    .dispositivo.tablet, .dispositivo.movil { max-width: 100%; border-width: 0; border-radius: var(--r-sm); }

    .ia-panel { right: 8px; left: 8px; bottom: 8px; width: auto; height: min(72dvh, 560px); }
    .ia-lanzador { right: 12px; bottom: 76px; }
    .envoltura { padding: var(--s-6) var(--s-4) var(--s-7); }
    .barra-accion-int { flex-direction: column; align-items: stretch; }
    .barra-accion-int .btn { width: 100%; min-height: 44px; }
}

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

@media (prefers-contrast: more) {
    :root { --lc-border: #4A4A5E; --lc-text-2: #C8C8D6; --lc-text-3: #9A9AB0; }
}

@media print {
    .bldr-header, .rail, .panel, .ia-panel, .ia-lanzador, .barra-accion { display: none !important; }
}

/* ==========================================================================
   12 · SESIÓN Y SUGERENCIA DE GIRO
   ========================================================================== */

/* — Chip de sesión en la cabecera — */
.sesion-chip { position: relative; }
.sesion-btn {
    display: flex; align-items: center; gap: 7px;
    height: 34px; padding: 0 9px 0 5px;
    border-radius: var(--r-full);
    background: var(--lc-surface-2); border: 1px solid var(--lc-border);
    font-size: .82rem; font-weight: 620; color: var(--lc-text);
    transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.sesion-btn:hover { border-color: var(--lc-brand); background: var(--lc-surface-3); }
.sesion-inicial {
    width: 24px; height: 24px; flex: none; border-radius: 50%;
    background: var(--lc-gradient); color: #07070C;
    display: grid; place-items: center; font-size: .74rem; font-weight: 800;
}
.sesion-nombre { max-width: 110px; display: none; }
@media (min-width: 640px) { .sesion-nombre { display: block; } }

.sesion-menu {
    position: absolute; right: 0; top: calc(100% + 8px);
    min-width: 230px; padding: 6px;
    background: var(--lc-surface); border: 1px solid var(--lc-border);
    border-radius: var(--r-md); box-shadow: var(--sh-lg);
    display: none; z-index: 600;
}
.sesion-menu.abierto { display: block; animation: modal-in .18s var(--ease-out); }
.sesion-menu-cab { padding: 9px 11px 10px; border-bottom: 1px solid var(--lc-border-soft); margin-bottom: 5px; }
.sesion-menu-cab strong { display: block; font-size: .85rem; }
.sesion-menu-cab span   { display: block; font-size: .73rem; color: var(--lc-text-3); word-break: break-all; }
.sesion-menu a,
.sesion-menu button {
    display: flex; align-items: center; gap: 9px; width: 100%;
    padding: 9px 11px; border-radius: var(--r-sm);
    font-size: .84rem; font-weight: 600; color: var(--lc-text-2); text-align: left;
    transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.sesion-menu a:hover, .sesion-menu button:hover { background: var(--lc-surface-2); color: var(--lc-text); }
.sesion-menu a b {
    margin-left: auto; background: var(--lc-brand); color: #fff;
    font-size: .68rem; padding: 1px 7px; border-radius: var(--r-full);
}
.sesion-menu form { margin: 0; }

/* — Aviso para quien ya tiene sitios — */
.aviso-sesion {
    display: flex; align-items: center; gap: var(--s-3);
    max-width: 620px; margin: var(--s-5) auto 0;
    padding: var(--s-3) var(--s-4);
    background: var(--lc-gradient-sut);
    border: 1px solid color-mix(in srgb, var(--lc-brand) 30%, transparent);
    border-radius: var(--r-md);
    font-size: .86rem; color: var(--lc-text-2); text-align: left;
}
.aviso-sesion svg { color: var(--lc-brand); flex: none; }
.aviso-sesion .btn { flex: none; margin-left: auto; }
@media (max-width: 620px) {
    .aviso-sesion { flex-direction: column; align-items: flex-start; text-align: left; }
    .aviso-sesion .btn { margin-left: 0; width: 100%; }
}

/* — Tarjeta de sugerencia cuando el giro no existe — */
.sugerencia {
    position: relative; overflow: hidden;
    margin-top: var(--s-6);
    padding: var(--s-6);
    background: var(--lc-surface);
    border: 1px solid color-mix(in srgb, var(--lc-brand) 34%, transparent);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-md);
    animation: pantalla-in .35s var(--ease-out);
}
.sugerencia::before {
    content: ''; position: absolute; inset: 0;
    background: var(--lc-gradient-sut); pointer-events: none;
}
.sugerencia > * { position: relative; }
.sugerencia-cab { display: flex; align-items: center; gap: var(--s-2); margin-bottom: var(--s-3); }
.sugerencia-sello {
    display: inline-flex; align-items: center; gap: 6px;
    height: 26px; padding: 0 11px;
    border-radius: var(--r-full);
    background: var(--lc-brand-soft); color: var(--lc-text);
    font-size: .72rem; font-weight: 700;
}
.sugerencia h3 {
    font-size: clamp(1.15rem, 1rem + .8vw, 1.5rem); font-weight: 800;
    letter-spacing: -.025em; line-height: 1.25; text-wrap: balance;
}
.sugerencia p { margin-top: var(--s-3); font-size: .93rem; color: var(--lc-text-2); line-height: 1.7; max-width: 68ch; }
.sugerencia p strong { color: var(--lc-text); font-weight: 750; }
.sugerencia-elegida {
    display: flex; gap: 8px; align-items: center; margin: 12px 0 4px;
    padding: 10px 12px; border-radius: 10px; font-size: .86rem; font-weight: 600;
    background: color-mix(in srgb, var(--lc-ok) 14%, transparent); color: color-mix(in srgb, var(--lc-ok) 70%, var(--lc-text));
}
.sugerencia-elegida svg { flex: none; }
.sugerencia-acciones { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-5); }
.sugerencia-emoji { font-size: 1.7rem; line-height: 1; }

.sugerencia-cargando {
    display: flex; align-items: center; gap: var(--s-3);
    margin-top: var(--s-6); padding: var(--s-5);
    background: var(--lc-surface); border: 1px dashed var(--lc-border);
    border-radius: var(--r-lg);
    font-size: .88rem; color: var(--lc-text-2);
}
.sugerencia-cargando .bldr-spinner { width: 20px; height: 20px; border-width: 2px; }

/* ==========================================================================
   12 · INICIO GUIADO
   Asistente de cinco preguntas, maqueta viva y pantalla de creación.
   Sólo usa los tokens del sistema: el tema claro/oscuro sale gratis.
   ========================================================================== */
.ig {
    max-width: 1240px; margin: 0 auto;
    padding: var(--s-6) var(--s-4) var(--s-7);
    display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-7);
}
.ig-col { width: 100%; max-width: 640px; margin: 0 auto; min-width: 0; }
.ig-maq-col { display: none; }

/* — Progreso — */
.ig-progreso { margin-bottom: var(--s-6); }
.ig-progreso-txt {
    display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3);
    font-size: .82rem; font-weight: 700; color: var(--lc-text-2); margin-bottom: var(--s-3);
}
.ig-progreso-lema { font-weight: 500; font-size: .78rem; }
.ig-puntos { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.ig-puntos li { height: 5px; border-radius: var(--r-full); background: var(--lc-surface-3); transition: background .3s var(--ease); }
.ig-puntos li.hecho { background: var(--lc-brand); }
.ig-puntos li[aria-current="step"] { background: var(--lc-gradient); }

/* — Una pregunta — */
.ig-paso { animation: pantalla-in .32s var(--ease-out); }
.ig-paso[hidden] { display: none; }
.ig-titulo {
    font-size: clamp(1.65rem, 1.2rem + 1.9vw, 2.4rem);
    font-weight: 800; letter-spacing: -.035em; line-height: 1.12; text-wrap: balance;
    outline: none;
}
.ig-titulo:focus-visible { outline: none; }
.ig-apoyo {
    margin-top: var(--s-3); max-width: 52ch;
    font-size: 1.02rem; color: var(--lc-text-2); line-height: 1.6; text-wrap: pretty;
}
.ig-paso > .aviso-sesion { max-width: none; margin: 0 0 var(--s-5); }

/* — Campos — */
.ig-campo { display: flex; flex-direction: column; gap: 8px; margin-top: var(--s-5); }
.ig-campo:first-of-type { margin-top: var(--s-6); }
.ig-campo > label, .ig-ofertas legend {
    font-size: .92rem; font-weight: 700; color: var(--lc-text);
    display: flex; align-items: baseline; gap: var(--s-2); flex-wrap: wrap;
}
.ig-opc { font-size: .74rem; font-weight: 600; color: var(--lc-text-3); }
.ig-campo :is(input, textarea), .ig-oferta input, .ig-buscar input {
    width: 100%; min-height: 52px; padding: 12px 16px;
    background: var(--lc-surface); color: var(--lc-text);
    border: 1.5px solid var(--lc-border); border-radius: var(--r-md);
    font-size: 1rem; line-height: 1.4; outline: none;
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.ig-campo textarea { min-height: 132px; resize: vertical; }
.bldr-body :is(.ig-campo input, .ig-campo textarea, .ig-oferta input, .ig-buscar input):focus-visible { outline: none; }
.ig-campo :is(input, textarea):focus, .ig-oferta input:focus, .ig-buscar input:focus {
    border-color: var(--lc-brand); box-shadow: 0 0 0 4px var(--lc-brand-soft);
}
.ig-campo :is(input, textarea)::placeholder, .ig-oferta input::placeholder, .ig-buscar input::placeholder { color: var(--lc-text-3); }
.ig-campo :is(input, textarea)[aria-invalid="true"] { border-color: var(--lc-danger); box-shadow: 0 0 0 4px color-mix(in srgb, var(--lc-danger) 16%, transparent); }
.ig-pista { font-size: .82rem; color: var(--lc-text-3); line-height: 1.5; }
.ig-error {
    display: flex; gap: 8px; align-items: flex-start;
    font-size: .88rem; font-weight: 600; line-height: 1.45;
    color: color-mix(in srgb, var(--lc-danger) 78%, var(--lc-text));
}
.ig-error[hidden] { display: none; }
.ig-error::before {
    content: ''; flex: none; width: 6px; height: 6px; margin-top: .5em; border-radius: 50%; background: var(--lc-danger);
}
#ig-err-giro { margin-top: var(--s-4); }

/* — Pregunta 1: buscador y tarjetas de giro — */
.ig-buscar { position: relative; margin-top: var(--s-6); }
.ig-buscar svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--lc-text-3); pointer-events: none; }
.ig-buscar input { padding-left: 46px; border-radius: var(--r-full); }
.ig-giros {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3);
    margin-top: var(--s-5);
}
#sugerencia-giro { margin-top: var(--s-5); }
#sugerencia-giro .sugerencia-cargando { margin-top: 0; }
.ig-giro {
    position: relative; display: flex; align-items: flex-start; gap: var(--s-3);
    min-height: 68px; padding: 12px 14px; text-align: left;
    background: var(--lc-surface); border: 1.5px solid var(--lc-border); border-radius: var(--r-md);
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
                background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.ig-giro:hover { border-color: color-mix(in srgb, var(--lc-brand) 55%, var(--lc-border)); transform: translateY(-1px); }
.ig-giro.elegida {
    border-color: var(--lc-brand); background: color-mix(in srgb, var(--lc-brand) 9%, var(--lc-surface));
    box-shadow: 0 0 0 3px var(--lc-brand-soft);
}
.ig-giro-icono {
    flex: none; width: 40px; height: 40px; display: grid; place-items: center;
    border-radius: var(--r-sm); background: var(--lc-surface-2); font-size: 1.3rem; line-height: 1;
}
.ig-giro-texto { display: flex; flex-direction: column; min-width: 0; padding-right: 22px; }
.ig-giro-nombre { font-size: .93rem; font-weight: 700; letter-spacing: -.015em; line-height: 1.25; }
.ig-giro-rubro { font-size: .74rem; font-weight: 600; color: var(--lc-text-3); margin-top: 1px; }
.ig-giro-desc {
    font-size: .76rem; color: var(--lc-text-3); line-height: 1.4; margin-top: 4px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ig-giro-check {
    position: absolute; top: 10px; right: 10px; width: 20px; height: 20px; border-radius: 50%;
    background: var(--lc-brand); color: #fff; display: grid; place-items: center;
    opacity: 0; transform: scale(.5); transition: all var(--dur) var(--ease-out);
}
.ig-giro.elegida .ig-giro-check, .ig-estilo.elegida .ig-giro-check { opacity: 1; transform: scale(1); }

/* — Pregunta 3: productos o servicios — */
.ig-ofertas { margin: var(--s-6) 0 0; padding: 0; border: 0; min-width: 0; }
.ig-ofertas legend { padding: 0; margin-bottom: 6px; }
#ig-ofertas { display: flex; flex-direction: column; gap: var(--s-3); margin-top: var(--s-3); }
.ig-oferta { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 38%) 44px; gap: var(--s-2); align-items: center; }
.ig-oferta:has([hidden]) { grid-template-columns: minmax(0, 1fr) minmax(0, 38%); }
.ig-quitar {
    width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--r-md);
    color: var(--lc-text-3); transition: background var(--dur), color var(--dur);
}
.ig-quitar[hidden] { display: none; }
.ig-quitar:hover { background: var(--lc-surface-2); color: var(--lc-text); }
.ig-mas { margin-top: var(--s-3); height: 48px; }
.ig-mas[hidden] { display: none; }

/* — Pregunta 5: estilos — */
.ig-estilos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); margin-top: var(--s-6); }
.ig-estilo {
    position: relative; display: flex; flex-direction: column; gap: var(--s-3); padding: 10px 10px 12px;
    text-align: left; background: var(--lc-surface); border: 1.5px solid var(--lc-border); border-radius: var(--r-lg);
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.ig-estilo:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--lc-brand) 55%, var(--lc-border)); }
.ig-estilo.elegida { border-color: var(--lc-brand); box-shadow: 0 0 0 3px var(--lc-brand-soft); }
.ig-estilo-pie { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; min-height: 24px; }
.ig-estilo-nombre { font-size: .92rem; font-weight: 700; }
.ig-estilo .ig-giro-check { position: static; flex: none; }
.ig-mini {
    display: flex; flex-direction: column; gap: 7px; padding: 8px; aspect-ratio: 16 / 11;
    background: var(--m-fon); border-radius: var(--r-sm); overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--m-pri) 14%, transparent);
}
.ig-mini-nav { display: flex; align-items: center; gap: 4px; }
.ig-mini-nav b {
    flex: 1; min-width: 0; font-size: .6rem; font-weight: 800; color: var(--m-pri);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ig-mini-nav i { width: 14px; height: 3px; border-radius: 2px; background: color-mix(in srgb, var(--m-pri) 35%, transparent); }
.ig-mini-hero {
    flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 8px;
    border-radius: 6px; background: linear-gradient(135deg, var(--m-pri), var(--m-sec));
}
.ig-mini-hero i { display: block; height: 4px; width: 62%; border-radius: 2px; background: var(--m-txt); opacity: .92; }
.ig-mini-hero i + i { width: 40%; opacity: .55; }
.ig-mini-hero em { display: block; width: 26px; height: 8px; margin-top: 3px; border-radius: 4px; background: var(--m-aco); }
.ig-mini-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.ig-mini-cards i { height: 16px; border-radius: 4px; background: var(--m-sup); border: 1px solid color-mix(in srgb, var(--m-pri) 12%, transparent); }

/* — Pie de acciones (pegado abajo para que el botón siempre esté a mano) — */
.ig-pie {
    position: sticky; bottom: 0; z-index: 20;
    display: flex; align-items: center; gap: var(--s-3);
    margin: var(--s-6) calc(var(--s-4) * -1) 0; padding: var(--s-4) var(--s-4) max(var(--s-4), env(safe-area-inset-bottom));
    background: var(--lc-bg);              /* fondo sólido: nada se transparenta detrás de los botones */
}
.ig-pie::before {                          /* desvanecido: el contenido se va apagando antes de llegar a la barra */
    content: ''; position: absolute; left: 0; right: 0; top: -36px; height: 36px; pointer-events: none;
    background: linear-gradient(to bottom, color-mix(in srgb, var(--lc-bg) 0%, transparent), var(--lc-bg));
}
.ig-paso { padding-bottom: var(--s-6); }
.ig-pie .btn { height: 52px; min-width: 52px; font-size: 1rem; }
.ig-pie .ig-sig { margin-left: auto; padding: 0 var(--s-6); }
.ig-pie [hidden] { display: none; }

/* — Maqueta viva — */
.maq { background: var(--lc-surface); border: 1px solid var(--lc-border); border-radius: var(--r-lg); box-shadow: var(--sh-lg); overflow: hidden; }
.maq-barra { display: flex; align-items: center; gap: 6px; padding: 11px 14px; background: var(--lc-surface-2); border-bottom: 1px solid var(--lc-border); }
.maq-barra > i { width: 10px; height: 10px; border-radius: 50%; background: var(--lc-surface-3); }
.maq-url { flex: 1; height: 22px; margin-left: 10px; border-radius: var(--r-full); background: var(--lc-surface-3); opacity: .7; max-width: 320px; }
.maq-sitio {
    display: flex; flex-direction: column; background: var(--m-fon, #f4f4f8); min-height: 460px;
    transition: background .35s var(--ease);
}
.maq-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px; background: var(--m-sup, #fff); }
.maq-nav strong { min-width: 0; font-size: .86rem; font-weight: 800; color: var(--m-pri, #4b4b63); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.maq-nav span { display: flex; gap: 8px; flex: none; }
.maq-nav span i { width: 28px; height: 5px; border-radius: 3px; background: color-mix(in srgb, var(--m-pri, #4b4b63) 28%, transparent); }
.maq-hero {
    display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 38px 28px 34px;
    background: linear-gradient(135deg, var(--m-pri, #4b4b63), var(--m-sec, #6c6c88)); color: var(--m-txt, #fff);
    transition: background .35s var(--ease);
}
.maq-hero h2 { font-size: 1.55rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.12; max-width: 90%; overflow-wrap: anywhere; }
.maq-hero p { font-size: .82rem; line-height: 1.55; opacity: .86; max-width: 88%; overflow-wrap: anywhere; }
.maq-btn { width: 96px; height: 28px; margin-top: 8px; border-radius: 14px; background: var(--m-aco, #9a8cff); transition: background .35s var(--ease); }
.maq-ofertas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 22px 22px 8px; }
.maq-oferta {
    display: flex; flex-direction: column; gap: 6px; padding: 10px; min-width: 0;
    background: var(--m-sup, #fff); border-radius: 10px; border: 1px solid color-mix(in srgb, var(--m-pri, #4b4b63) 12%, transparent);
}
.maq-foto { height: 54px; border-radius: 6px; background: color-mix(in srgb, var(--m-aco, #9a8cff) 30%, var(--m-fon, #f4f4f8)); }
.maq-oferta b { font-size: .74rem; font-weight: 700; color: var(--m-pri, #4b4b63); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.maq-oferta em { font-style: normal; font-size: .74rem; font-weight: 800; color: var(--m-sec, #6c6c88); }
.maq-oferta b.vacio, .maq-oferta em.vacio { display: block; height: 7px; border-radius: 4px; background: color-mix(in srgb, var(--m-pri, #4b4b63) 16%, transparent); }
.maq-oferta em.vacio { width: 40%; height: 7px; }
.maq-pie { display: flex; flex-direction: column; gap: 6px; padding: 18px 22px 22px; margin-top: auto; }
.maq-pie i { display: block; height: 5px; width: 36%; border-radius: 3px; background: color-mix(in srgb, var(--m-pri, #4b4b63) 18%, transparent); }
.maq-pie i + i { width: 22%; }
.maq.vacia .maq-hero h2, .maq.vacia .maq-hero p { opacity: .55; }
.ig-maq-pie { margin-top: var(--s-4); text-align: center; font-size: .8rem; color: var(--lc-text-3); }

@media (min-width: 480px) {
    .ig-giros { gap: var(--s-3); }
}
@media (max-width: 479px) {
    .ig-giros { grid-template-columns: minmax(0, 1fr); }
    .ig-estilos { gap: var(--s-3); }
    .ig-oferta { grid-template-columns: minmax(0, 1fr) minmax(0, 34%) 44px; }
    .ig-pie .ig-sig { padding: 0 var(--s-5); }
}
@media (min-width: 1024px) {
    .ig { grid-template-columns: minmax(0, 600px) minmax(0, 1fr); gap: var(--s-8); align-items: start; padding-top: var(--s-7); }
    .ig-col { margin: 0 0 0 auto; }
    .ig-maq-col { display: block; position: sticky; top: calc(var(--header-h) + var(--s-6)); max-width: 640px; }
    .ig-pie { margin-inline: 0; padding-inline: 0; }
}

/* — Pantalla de creación — */
.crea {
    min-height: calc(100dvh - var(--header-h)); max-width: 460px; margin: 0 auto; padding: var(--s-7) var(--s-4);
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
}
.crea-sitio {
    position: relative; width: 148px; height: 108px; margin-bottom: var(--s-6); padding: 12px;
    display: flex; flex-direction: column; gap: 8px;
    background: var(--lc-surface); border: 1px solid var(--lc-border); border-radius: var(--r-md); box-shadow: var(--sh-lg);
}
.crea-sitio i { display: block; border-radius: 4px; background: var(--lc-surface-3); animation: crea-onda 1.8s var(--ease) infinite; }
.crea-sitio i:nth-child(1) { height: 8px; width: 55%; }
.crea-sitio i:nth-child(2) { flex: 1; background: var(--lc-gradient-sut); animation-delay: .15s; }
.crea-sitio i:nth-child(3) { height: 8px; width: 80%; animation-delay: .3s; }
.crea-sitio i:nth-child(4) { height: 8px; width: 40%; animation-delay: .45s; }
@keyframes crea-onda { 50% { opacity: .45; } }
.crea-etiqueta { font-size: .82rem; font-weight: 600; color: var(--lc-text-3); }
.crea-titulo {
    margin-top: 4px; font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.15;
    overflow-wrap: anywhere; outline: none;
}
.crea-etapas { margin-top: var(--s-6); display: flex; flex-direction: column; gap: var(--s-3); text-align: left; }
.crea-etapas li { display: flex; align-items: center; gap: var(--s-3); font-size: 1rem; color: var(--lc-text-3); transition: color var(--dur); }
.crea-etapas li.activa { color: var(--lc-text); font-weight: 650; }
.crea-etapas li.hecha { color: var(--lc-text-2); }
.crea-marca { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--lc-border); display: grid; place-items: center; }
.crea-etapas li.activa .crea-marca { border-color: var(--lc-border); border-top-color: var(--lc-brand-2); animation: spin .8s linear infinite; }
.crea-etapas li.hecha .crea-marca { border-color: var(--lc-ok); background: var(--lc-ok); animation: none; }
.crea-etapas li.hecha .crea-marca::after {
    content: ''; width: 5px; height: 9px; margin-top: -2px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.crea-nota { margin-top: var(--s-6); font-size: .84rem; color: var(--lc-text-3); }
@media (prefers-reduced-motion: reduce) {
    .crea-etapas li.activa .crea-marca { animation: none; border-color: var(--lc-brand-2); }
}

/* Cabecera en móviles angostos: sin esto «Iniciar sesión» se sale del viewport (390 y 320 px). */
@media (max-width: 430px) {
    .bldr-header { gap: 4px; padding: 0 var(--s-2); }
    .bldr-header .paso-linea { display: none; }
    .bldr-header .paso { padding: 0 2px; }
    .bldr-header-fin { gap: 4px; }
    .bldr-header-fin .btn-sm { padding: 0 var(--s-2); }
}
@media (max-width: 380px) {
    .bldr-logo { font-size: 0; gap: 0; }
}

/* Pregunta 4 en móvil: tres botones no caben en una fila; el principal va arriba. */
@media (max-width: 479px) {
    .ig-pie:has(.ig-saltar:not([hidden])) { flex-wrap: wrap; row-gap: var(--s-2); }
    .ig-pie:has(.ig-saltar:not([hidden])) .ig-sig { order: -1; flex: 1 1 100%; margin-left: 0; }
    .ig-pie:has(.ig-saltar:not([hidden])) .ig-atras,
    .ig-pie:has(.ig-saltar:not([hidden])) .ig-saltar { flex: 1 1 0; min-width: 0; padding: 0 var(--s-3); height: 48px; }
}


/* ==========================================================================
   13 · PENDIENTES, INDICADOR Y ASISTENTE (ronda 2)
   ========================================================================== */
.rail-badge {
    position: absolute; top: 3px; right: 5px; min-width: 16px; height: 16px; padding: 0 4px;
    display: grid; place-items: center; border-radius: var(--r-full);
    background: var(--lc-warn); color: #1a1205; font-size: .625rem; font-weight: 800; line-height: 1;
}
.resaltada { animation: resalte 2.4s var(--ease-out); }
@keyframes resalte {
    0%, 55% { box-shadow: 0 0 0 3px var(--lc-brand), 0 0 0 8px var(--lc-brand-soft); }
    100% { box-shadow: 0 0 0 0 transparent; }
}

/* — Vista Pendientes — */
.pend-avance { padding: var(--s-4); background: var(--lc-surface); border: 1px solid var(--lc-border); border-radius: var(--r-md); }
.pend-avance h3 { font-size: 1.05rem; font-weight: 800; letter-spacing: -.02em; }
.pend-barra { height: 8px; margin-top: var(--s-3); border-radius: var(--r-full); background: var(--lc-surface-3); overflow: hidden; }
.pend-barra i { display: block; height: 100%; border-radius: var(--r-full); background: var(--lc-gradient); transition: width .5s var(--ease-out); }
.pend-listo {
    display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4);
    border-radius: var(--r-md); border: 1px solid color-mix(in srgb, var(--lc-ok) 40%, transparent);
    background: color-mix(in srgb, var(--lc-ok) 11%, transparent);
}
.pend-listo > svg { color: var(--lc-ok); flex: none; }
.pend-listo > div { flex: 1; min-width: 0; }
.pend-listo b { font-size: .9rem; font-weight: 750; }
.pend-listo p { margin-top: 2px; font-size: .78rem; color: var(--lc-text-2); line-height: 1.5; }
.pend-grupo, .pend-resueltos { display: flex; flex-direction: column; gap: 6px; }
.pend-grupo h4, .pend-resueltos summary {
    display: flex; align-items: center; gap: 7px; font-size: .72rem; font-weight: 750; letter-spacing: .06em;
    text-transform: uppercase; color: var(--lc-text-3);
}
.pend-grupo h4 span, .pend-resueltos summary span {
    padding: 1px 7px; border-radius: var(--r-full); background: var(--lc-surface-3); color: var(--lc-text-2); letter-spacing: 0;
}
.pend-resueltos summary { cursor: pointer; min-height: 32px; margin-bottom: 4px; }
.pend-fila {
    display: flex; align-items: center; gap: var(--s-3); width: 100%; min-height: 56px; padding: 10px 12px; text-align: left;
    background: var(--lc-surface); border: 1px solid var(--lc-border); border-radius: var(--r-md);
    transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.pend-fila:hover { border-color: var(--lc-brand); background: var(--lc-surface-2); }
.pend-estado {
    flex: none; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%;
    border: 2px solid var(--lc-border); color: #fff;
}
.pend-texto { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pend-texto b { font-size: .86rem; font-weight: 680; line-height: 1.3; }
.pend-texto small { font-size: .74rem; color: var(--lc-text-3); line-height: 1.4; }
.pend-flecha { flex: none; color: var(--lc-text-3); }
.pend-fila.hecha { background: transparent; opacity: .62; min-height: 44px; }
.pend-fila.hecha .pend-estado { background: var(--lc-ok); border-color: var(--lc-ok); }
.pend-fila.hecha .pend-texto b { text-decoration: line-through; font-weight: 600; }

/* — Indicador junto a «Continuar» — */
.panel-pie { flex-wrap: wrap; }
.pend-ind {
    flex: 1 0 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--s-2);
    min-height: 40px; padding: 0 12px; border-radius: var(--r-sm);
    background: color-mix(in srgb, var(--lc-warn) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--lc-warn) 36%, transparent);
    font-size: .8rem; font-weight: 700; color: var(--lc-text);
}
.pend-ind[hidden] { display: none; }
.pend-ind.completo { justify-content: flex-start; background: color-mix(in srgb, var(--lc-ok) 13%, transparent); border-color: color-mix(in srgb, var(--lc-ok) 36%, transparent); }
.pend-ind.completo svg { color: var(--lc-ok); }
.faltan-lista { display: flex; flex-direction: column; gap: 6px; margin-top: var(--s-2); }
.faltan-lista li { position: relative; padding-left: 18px; font-size: .88rem; line-height: 1.45; color: var(--lc-text-2); }
.faltan-lista li::before { content: ''; position: absolute; left: 3px; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: var(--lc-warn); }

/* — Asistente: pendientes, cambios y acciones — */
.ia-pends { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.ia-pend, .ia-accion {
    display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); width: 100%; min-height: 40px;
    padding: 8px 12px; text-align: left; border-radius: var(--r-sm);
    background: var(--lc-surface); border: 1px solid var(--lc-border);
    border-left: 3px solid var(--lc-warn);
    font-size: .8rem; font-weight: 650; color: var(--lc-text);
    transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.ia-accion { border-left-color: var(--lc-brand); margin-top: 10px; }
.ia-pend:hover, .ia-accion:hover { background: var(--lc-surface-2); border-color: var(--lc-brand); }
.ia-pend svg, .ia-accion svg { flex: none; color: var(--lc-text-3); }
.ia-ficha { min-height: 34px; }
.ia-ficha:disabled { opacity: .45; cursor: default; pointer-events: none; }
.ia-cambios {
    display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); flex-wrap: wrap;
    margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--lc-border-soft);
    font-size: .76rem; font-weight: 650; color: var(--lc-text-2);
}
.ia-deshacer {
    min-height: 30px; padding: 0 12px; border-radius: var(--r-full); border: 1px solid var(--lc-border);
    background: var(--lc-surface); font-size: .74rem; font-weight: 700; color: var(--lc-text);
}
.ia-deshacer:hover:not(:disabled) { border-color: var(--lc-brand); background: var(--lc-brand-soft); }
.ia-deshacer:disabled { opacity: .5; cursor: default; }
.ia-nota { font-size: .78rem; line-height: 1.5; color: var(--lc-text-3); padding: var(--s-3); border-radius: var(--r-sm); background: var(--lc-surface-2); }

/* Móvil: el riel ya trae «Asistente»; el lanzador flotante tapaba «Continuar» y el indicador. */
@media (max-width: 860px) {
    .ia-lanzador { display: none; }
}

/* ==========================================================================
   Borrador guardado en el navegador
   ========================================================================== */
.ig-guardado { margin: 8px 0 0; font-size: .76rem; }
.borrador {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3);
    margin: 0 0 var(--s-5); padding: var(--s-4); min-width: 0;
    border: 1px solid var(--lc-border); border-radius: var(--r-md, 12px);
    background: var(--lc-surface-2); color: var(--lc-text);
}
.borrador[hidden] { display: none; }
.borrador-txt { flex: 1 1 220px; min-width: 0; }
.borrador-titulo { margin: 0; font-weight: 700; font-size: 1rem; overflow-wrap: anywhere; }
.borrador-titulo em { font-style: normal; color: var(--lc-brand); }
.borrador-hace { margin: 2px 0 0; font-size: .8rem; }
.borrador-acc { display: flex; flex-wrap: wrap; gap: var(--s-2); }
@media (max-width: 480px) {
    .borrador-acc { width: 100%; }
    .borrador-acc .btn { flex: 1 1 100%; }
}

/* ==========================================================================
   14 · DIRECCIÓN DEL SITIO (paso de planes)
   Subdominio gratis, dominio nuevo o dominio propio, con comprobación de
   disponibilidad. Sólo usa tokens: el tema claro/oscuro sale gratis.
   ========================================================================== */
.dir { margin-top: var(--s-5); padding: var(--s-5); }
.dir-cab { display: flex; align-items: center; gap: 10px; }
.dir-cab h3 { font-size: .98rem; font-weight: 750; letter-spacing: -.01em; }
.dir-ayuda { margin-top: 6px; font-size: .88rem; line-height: 1.55; color: var(--lc-text-2); }

.dir-opciones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); margin-top: var(--s-4); }
.dir-opcion {
    position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
    min-height: 84px; padding: 14px 40px 12px 14px; text-align: left;
    background: var(--lc-surface); border: 1.5px solid var(--lc-border); border-radius: var(--r-md);
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
}
.dir-opcion:hover:not([aria-disabled="true"]) { border-color: color-mix(in srgb, var(--lc-brand) 55%, var(--lc-border)); }
.dir-opcion[aria-checked="true"] {
    border-color: var(--lc-brand);
    background: color-mix(in srgb, var(--lc-brand) 9%, var(--lc-surface));
    box-shadow: 0 0 0 3px var(--lc-brand-soft);
}
.dir-opcion[aria-disabled="true"] { cursor: not-allowed; background: var(--lc-surface-2); }
.dir-opcion[aria-disabled="true"] :is(.dir-opcion-tit, .dir-opcion-sub) { opacity: .62; }
.dir-opcion-tit { font-size: .92rem; font-weight: 720; letter-spacing: -.01em; color: var(--lc-text); }
.dir-opcion-sub { font-size: .8rem; line-height: 1.4; color: var(--lc-text-2); overflow-wrap: anywhere; }
.dir-opcion-nota {
    margin-top: 4px; padding: 2px 10px; border-radius: var(--r-full);
    background: var(--lc-brand-soft); color: var(--lc-text); font-size: .72rem; font-weight: 750;
}
.dir-opcion-nota[hidden] { display: none; }
.dir-opcion-check {
    position: absolute; top: 12px; right: 12px; width: 20px; height: 20px; border-radius: 50%;
    display: grid; place-items: center; background: var(--lc-brand); color: #fff;
    opacity: 0; transform: scale(.5); transition: all var(--dur) var(--ease-out);
}
.dir-opcion[aria-checked="true"] .dir-opcion-check { opacity: 1; transform: scale(1); }

.dir-detalle { margin-top: var(--s-5); max-width: 640px; }
.dir-detalle[hidden] { display: none; }
.dir .campo > label { font-size: .9rem; color: var(--lc-text); }
.dir .campo-pista { font-size: .82rem; line-height: 1.5; color: var(--lc-text-2); }
.dir-fila { display: flex; gap: var(--s-2); align-items: stretch; }
.pantalla .campo .dir-fila input[type=text] { flex: 1 1 auto; min-width: 0; min-height: 46px; padding: 10px 14px; font-size: 1rem; }
.pantalla .campo input[aria-invalid="true"],
.pantalla .campo input[aria-invalid="true"]:focus {
    border-color: var(--lc-danger);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--lc-danger) 16%, transparent);
}
.dir-comprobar { flex: none; min-width: 128px; height: 46px; }
.dir-comprobar .bldr-spinner { width: 16px; height: 16px; border-width: 2px; }

/* Resultado de la comprobación (región aria-live: siempre en el DOM, sin altura si está vacía) */
.dir-res { margin-top: var(--s-3); }
.dir-res:empty { margin-top: 0; }
.dir-res-caja {
    display: flex; gap: var(--s-3); align-items: flex-start; padding: 12px 14px;
    border: 1px solid var(--lc-border); border-radius: var(--r-md); background: var(--lc-surface-2);
    font-size: .9rem; line-height: 1.55; color: var(--lc-text-2);
}
.dir-res-caja > svg { flex: none; margin-top: 3px; }
.dir-res-cuerpo { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.dir-res-cuerpo strong { color: var(--lc-text); font-weight: 720; }
.dir-res-extra { display: block; margin-top: 4px; font-size: .84rem; }
.dir-res-caja.ok   { background: color-mix(in srgb, var(--lc-ok) 11%, transparent);     border-color: color-mix(in srgb, var(--lc-ok) 40%, transparent); }
.dir-res-caja.ok   > svg { color: var(--lc-ok); }
.dir-res-caja.warn { background: color-mix(in srgb, var(--lc-warn) 12%, transparent);   border-color: color-mix(in srgb, var(--lc-warn) 40%, transparent); }
.dir-res-caja.warn > svg { color: var(--lc-warn); }
.dir-res-caja.error { background: color-mix(in srgb, var(--lc-danger) 10%, transparent); border-color: color-mix(in srgb, var(--lc-danger) 40%, transparent); }
.dir-res-caja.error > svg { color: var(--lc-danger); }
.dir-res-caja.info { background: color-mix(in srgb, var(--lc-info) 10%, transparent);   border-color: color-mix(in srgb, var(--lc-info) 38%, transparent); }
.dir-res-caja.info > svg { color: var(--lc-info); }
.dir-res-caja.espera .bldr-spinner { width: 18px; height: 18px; border-width: 2px; margin-top: 2px; flex: none; }
.dir-res-acciones { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }
.dir-res-acciones .btn { height: auto; min-height: 44px; padding: 8px var(--s-4); white-space: normal; text-align: center; line-height: 1.3; }

@media (max-width: 720px) {
    .dir { padding: var(--s-4); }
    .dir-opciones { grid-template-columns: 1fr; }
    .dir-opcion { min-height: 72px; }
}
@media (max-width: 480px) {
    .dir-fila { flex-direction: column; }
    .dir-comprobar { width: 100%; }
}

/* Enlace discreto al sitio corporativo (cabecera del builder) */
.bldr-corp-link { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px; font-size: .8rem; font-weight: 600; text-decoration: none; opacity: .8; white-space: nowrap; }
.bldr-corp-link:hover, .bldr-corp-link:focus-visible { opacity: 1; }
@media (max-width: 640px) { .bldr-corp-link span { display: none; } .bldr-corp-link { min-width: 36px; justify-content: center; padding: 0 8px; } }
