/* ============================================================================
 * willy-console.css — sistema visual de la Consola WillyAI (/willy)
 * ----------------------------------------------------------------------------
 * POR QUÉ ESTE ARCHIVO ES GLOBAL Y NO 15 .razor.css
 *
 * El aislamiento de CSS de Blazor es excelente para componentes que viven en
 * contextos distintos. Acá pasa lo contrario: la consola es UN sistema visual
 * compartido por ~15 componentes que sólo existen adentro de /willy. Con
 * isolation, cada widget del lienzo necesitaría repetir los tokens o encadenar
 * ::deep desde el padre — más CSS, más frágil, y ::deep rompe justo cuando
 * insertás un componente intermedio.
 *
 * La decisión: los TOKENS y las PRIMITIVAS del sistema viven acá, con prefijo
 * `wc-` (willy console) que actúa como namespace. Lo que sí es específico de un
 * componente y no se comparte vive en su `.razor.css`. Lo mejor de los dos.
 *
 * TODO lo de acá cuelga de .wc-console: no puede pisar estilos del resto del sitio.
 * ==========================================================================*/

.wc-console {
    /* ── Color ─────────────────────────────────────────────────────────── */
    --wc-brand: #0d9488;
    --wc-brand-600: #0f766e;
    --wc-brand-700: #115e59;
    --wc-brand-soft: #ccfbf1;
    --wc-brand-tint: rgba(13, 148, 136, .08);

    --wc-ink: #0f172a;
    --wc-ink-2: #334155;
    --wc-muted: #64748b;
    --wc-faint: #94a3b8;

    --wc-bg: #f6f8fa;
    --wc-surface: #ffffff;
    --wc-surface-2: #f8fafc;
    --wc-line: #e6ebf1;
    --wc-line-strong: #d4dce6;

    --wc-warn: #f59e0b;
    --wc-danger: #ef4444;
    --wc-ok: #10b981;

    /* ── Forma ─────────────────────────────────────────────────────────── */
    --wc-r-sm: 8px;
    --wc-r: 14px;
    --wc-r-lg: 20px;
    --wc-r-pill: 999px;

    --wc-shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
    --wc-shadow: 0 4px 16px -6px rgba(15, 23, 42, .12);
    --wc-shadow-lg: 0 18px 48px -24px rgba(15, 23, 42, .28);

    /* ── Movimiento ────────────────────────────────────────────────────────
       Una sola curva para todo el producto. La diferencia entre una IA
       "básica" y una "premium" es que todo se mueve con el mismo ritmo. */
    --wc-ease: cubic-bezier(.22, 1, .36, 1);
    --wc-fast: 140ms;
    --wc-mid: 260ms;
    --wc-slow: 420ms;

    /* Reparto del split. Lo escribe el JS del divisor. */
    --wc-split: 42%;
}

/* ════════════════════════════════════════════════════════════════════════
   SHELL
   ════════════════════════════════════════════════════════════════════════ */

.wc-console {
    /* Ocupa el viewport menos el navbar del sitio (64px). No usamos
       position:fixed para no pelearnos con el scroll y el z-index del layout:
       la consola es una página más, sólo que del alto exacto de la pantalla.

       dvh, NO vh. En Safari de iPhone 100vh es el viewport "grande": el que
       habria si la barra de direcciones y la barra inferior estuvieran
       ocultas. Estando visibles, la consola medía ~100px mas que la pantalla
       real, y como aca abajo hay overflow:hidden, el composer —que es el
       ultimo hijo de .wc-left— quedaba abajo del borde SIN forma de scrollear
       hasta el. O sea: en el telefono no se podia escribir. La linea con vh
       queda de fallback para navegadores que no entienden dvh. */
    height: calc(100vh - var(--wc-top, 64px));
    height: calc(100dvh - var(--wc-top, 64px));
    display: flex;
    flex-direction: column;
    background: var(--wc-bg);
    color: var(--wc-ink);
    font-family: Inter, system-ui, -apple-system, sans-serif;
    overflow: hidden;
    position: relative;
}

.wc-body {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: var(--wc-split) 6px 1fr;
}

/* Durante el arrastre apagamos transiciones y punteros internos: sin esto el
   navegador intenta animar el ancho en cada pixel y el drag se siente pegajoso. */
.wc-console.is-resizing * { transition: none !important; }
.wc-console.is-resizing iframe,
.wc-console.is-resizing .wc-map { pointer-events: none; }

.wc-splitter {
    position: relative;
    cursor: col-resize;
    background: transparent;
    border: 0;
    padding: 0;
    touch-action: none;
}
.wc-splitter::before {
    content: "";
    position: absolute;
    inset: 0 2px;
    background: var(--wc-line);
    transition: background var(--wc-fast) var(--wc-ease);
}
.wc-splitter::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 40px;
    transform: translate(-50%, -50%);
    border-radius: var(--wc-r-pill);
    background: var(--wc-line-strong);
    transition: background var(--wc-fast) var(--wc-ease), height var(--wc-fast) var(--wc-ease);
}
.wc-splitter:hover::before,
.wc-splitter:focus-visible::before { background: var(--wc-brand-soft); }
.wc-splitter:hover::after,
.wc-splitter:focus-visible::after { background: var(--wc-brand); height: 64px; }
.wc-splitter:focus-visible { outline: none; }

/* ── Barra superior ───────────────────────────────────────────────────── */

.wc-top {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 18px;
    background: var(--wc-surface);
    border-bottom: 1px solid var(--wc-line);
    box-shadow: var(--wc-shadow-sm);
    z-index: 5;
}

.wc-brandmark {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.wc-avatar {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    /* Tile oscuro con la chispa de WillyAI (la misma del home y del menú). */
    background: #0a0b0f;
    box-shadow: 0 6px 14px -8px rgba(2, 6, 23, .6), inset 0 0 0 1px rgba(255, 255, 255, .06);
    flex: 0 0 auto;
}
/* Anillo que late sólo cuando WillyAI está trabajando. Cuando no, quieto:
   una animación permanente es ruido, no vida. */
.wc-avatar::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 15px;
    border: 2px solid var(--wc-brand);
    opacity: 0;
}
.wc-console.is-busy .wc-avatar::after { animation: wc-ring 1.6s var(--wc-ease) infinite; }
@keyframes wc-ring {
    0%   { opacity: .55; transform: scale(.94); }
    70%  { opacity: 0;   transform: scale(1.18); }
    100% { opacity: 0;   transform: scale(1.18); }
}

.wc-titles { min-width: 0; }
.wc-titles h1 {
    margin: 0;
    font-family: Sora, Inter, sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.2;
}
.wc-titles p {
    margin: 1px 0 0;
    font-size: 11.5px;
    color: var(--wc-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}
.wc-live-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--wc-ok);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, .16);
}
.wc-console.is-busy .wc-live-dot {
    background: var(--wc-warn);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, .18);
    animation: wc-blink 1.1s ease-in-out infinite;
}
@keyframes wc-blink { 50% { opacity: .35; } }

.wc-top-spacer { flex: 1; min-width: 8px; }

/* Chips de filtro activo (los "criterios pegajosos" hechos visibles) */
.wc-filters {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    max-width: 46%;
}
.wc-filters::-webkit-scrollbar { display: none; }

.wc-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--wc-r-pill);
    background: var(--wc-brand-tint);
    border: 1px solid rgba(13, 148, 136, .22);
    color: var(--wc-brand-700);
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
    animation: wc-pop var(--wc-mid) var(--wc-ease) both;
}
.wc-filter small { color: var(--wc-brand); opacity: .75; font-weight: 500; }

@keyframes wc-pop {
    from { opacity: 0; transform: translateY(-4px) scale(.94); }
    to   { opacity: 1; transform: none; }
}

/* ── Botones ──────────────────────────────────────────────────────────── */

.wc-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 13px;
    border-radius: var(--wc-r-pill);
    border: 1px solid var(--wc-line-strong);
    background: var(--wc-surface);
    color: var(--wc-ink-2);
    font: 600 12.5px/1 Inter, sans-serif;
    cursor: pointer;
    white-space: nowrap;
    transition: transform var(--wc-fast) var(--wc-ease),
                border-color var(--wc-fast) var(--wc-ease),
                background var(--wc-fast) var(--wc-ease),
                color var(--wc-fast) var(--wc-ease);
}
.wc-btn:hover { border-color: var(--wc-brand); color: var(--wc-brand-700); transform: translateY(-1px); }
.wc-btn:active { transform: translateY(0) scale(.98); }
.wc-btn--primary {
    background: linear-gradient(140deg, var(--wc-brand) 0%, var(--wc-brand-600) 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 6px 16px -8px rgba(13, 148, 136, .85);
}
.wc-btn--primary:hover { color: #fff; filter: brightness(1.05); }
.wc-btn--ghost { background: transparent; border-color: transparent; }
.wc-btn--ghost:hover { background: var(--wc-surface-2); }
.wc-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ════════════════════════════════════════════════════════════════════════
   PANEL IZQUIERDO — CONVERSACIÓN
   ════════════════════════════════════════════════════════════════════════ */

.wc-left {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    background: var(--wc-surface);
    border-right: 1px solid transparent;
}

.wc-thread {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 22px 22px 8px;
    scroll-behavior: smooth;
}
.wc-thread::-webkit-scrollbar { width: 10px; }
.wc-thread::-webkit-scrollbar-thumb {
    background: var(--wc-line-strong);
    border-radius: var(--wc-r-pill);
    border: 3px solid var(--wc-surface);
}
.wc-thread::-webkit-scrollbar-track { background: transparent; }

/* ── Burbujas ─────────────────────────────────────────────────────────── */

.wc-turn { margin-bottom: 18px; animation: wc-rise var(--wc-mid) var(--wc-ease) both; }
@keyframes wc-rise {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}

.wc-turn--user { display: flex; justify-content: flex-end; }

.wc-bubble {
    max-width: 88%;
    padding: 11px 15px;
    border-radius: var(--wc-r-lg);
    font-size: 14.5px;
    line-height: 1.62;
    letter-spacing: -.005em;
}

.wc-turn--user .wc-bubble {
    background: linear-gradient(140deg, var(--wc-brand) 0%, var(--wc-brand-600) 100%);
    color: #fff;
    border-bottom-right-radius: 7px;
    box-shadow: 0 8px 20px -12px rgba(13, 148, 136, .9);
}

.wc-turn--bot .wc-bubble {
    background: var(--wc-surface-2);
    border: 1px solid var(--wc-line);
    border-bottom-left-radius: 7px;
    color: var(--wc-ink);
    max-width: 100%;
}
.wc-turn--bot.is-error .wc-bubble {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

/* Markdown adentro de la burbuja */
/* Los headings del markdown ANTES de cualquier otra cosa: si no se acotan,
   un "## Transporte" que escribe WillyAI sale con el 2em default del browser y
   dentro de una burbuja de 14.5px parece un cartel de ruta. Se degradan a
   subtítulos discretos — en una respuesta de chat, la jerarquía la tiene que
   dar el peso, no el tamaño. */
.wc-bubble h1,
.wc-bubble h2,
.wc-bubble h3,
.wc-bubble h4,
.wc-bubble h5,
.wc-bubble h6 {
    margin: 1.1em 0 .45em;
    font-family: Sora, Inter, sans-serif;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--wc-muted);
}
.wc-bubble > :first-child { margin-top: 0; }

/* Separador fino arriba de cada bloque, para que se lean como secciones sin
   necesidad de que el título grite. */
.wc-bubble h1 + *,
.wc-bubble h2 + *,
.wc-bubble h3 + * { margin-top: 0; }

.wc-bubble hr {
    margin: 1em 0;
    border: 0;
    border-top: 1px solid var(--wc-line);
}

.wc-bubble p { margin: 0 0 .6em; }
.wc-bubble p:last-child { margin-bottom: 0; }
.wc-bubble strong { font-weight: 700; color: inherit; }
.wc-bubble ul, .wc-bubble ol { margin: .4em 0 .6em; padding-left: 1.15em; }
.wc-bubble li { margin: .15em 0; }
.wc-bubble code {
    background: rgba(15, 23, 42, .06);
    padding: 1px 5px;
    border-radius: 5px;
    font-size: .9em;
}
.wc-bubble table {
    width: 100%;
    border-collapse: collapse;
    margin: .5em 0;
    font-size: 13px;
}
.wc-bubble th, .wc-bubble td {
    padding: 6px 8px;
    border-bottom: 1px solid var(--wc-line);
    text-align: left;
}
.wc-bubble th { color: var(--wc-muted); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; }

/* Cursor de escritura durante el streaming */
.wc-caret {
    display: inline-block;
    width: 2px;
    height: 1.05em;
    margin-left: 2px;
    vertical-align: -.14em;
    background: var(--wc-brand);
    border-radius: 1px;
    animation: wc-caret 1s steps(2, start) infinite;
}
@keyframes wc-caret { 50% { opacity: 0; } }

/* ── Traza de tools en vivo ───────────────────────────────────────────── */

.wc-trace {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 9px;
    padding-left: 2px;
}
.wc-step {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--wc-muted);
    animation: wc-slide var(--wc-mid) var(--wc-ease) both;
}
@keyframes wc-slide {
    from { opacity: 0; transform: translateX(-8px); }
    to   { opacity: 1; transform: none; }
}
.wc-step.is-done { color: var(--wc-ink-2); }

.wc-step-ico {
    width: 15px; height: 15px;
    border-radius: 50%;
    display: grid; place-items: center;
    flex: 0 0 auto;
    background: var(--wc-line);
    color: #fff;
}
.wc-step.is-done .wc-step-ico { background: var(--wc-brand); }
.wc-step.is-fail .wc-step-ico { background: var(--wc-danger); }

/* Spinner del paso en curso — un anillo, no tres puntitos genéricos. */
.wc-step:not(.is-done) .wc-step-ico {
    background: transparent;
    border: 2px solid var(--wc-line-strong);
    border-top-color: var(--wc-brand);
    animation: wc-spin .7s linear infinite;
}
@keyframes wc-spin { to { transform: rotate(360deg); } }

/* ── Estado vacío del hilo ────────────────────────────────────────────── */

.wc-hero { padding: 8vh 6px 0; max-width: 560px; }
/* Estado inicial con la estética del home: la chispa de WillyAI, tipografía
   del sistema (SF Pro en Apple), titular en dos tonos y nada de degradés en
   el texto. */
.wc-hero-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font: 600 14px/1 -apple-system, BlinkMacSystemFont, Inter, sans-serif;
    letter-spacing: -.01em;
    color: var(--wc-ink);
}
.wc-hero h2 {
    margin: 18px 0 26px;
    font-family: -apple-system, BlinkMacSystemFont, Inter, sans-serif;
    font-size: clamp(26px, 3.2vw, 36px);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -.03em;
    color: var(--wc-ink);
    text-wrap: balance;
}
.wc-hero h2 span { display: block; color: #86868b; }
.wc-hero p { margin: 0 0 24px; font-size: 14.5px; line-height: 1.6; color: var(--wc-muted); max-width: 52ch; }

.wc-suggestions { display: flex; flex-direction: column; gap: 8px; }
.wc-suggestion {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--wc-line);
    border-radius: var(--wc-r);
    background: var(--wc-surface);
    color: var(--wc-ink);
    font: 500 13.5px/1.35 Inter, sans-serif;
    text-align: left;
    cursor: pointer;
    transition: transform var(--wc-fast) var(--wc-ease),
                border-color var(--wc-fast) var(--wc-ease),
                box-shadow var(--wc-fast) var(--wc-ease);
    animation: wc-rise var(--wc-mid) var(--wc-ease) both;
}
.wc-suggestion:hover {
    border-color: var(--wc-brand);
    transform: translateX(4px);
    box-shadow: var(--wc-shadow);
}
.wc-suggestion svg { color: var(--wc-brand); flex: 0 0 auto; }
.wc-suggestion span { flex: 1; }
.wc-suggestion i {
    font-style: normal;
    color: var(--wc-faint);
    transition: transform var(--wc-fast) var(--wc-ease), color var(--wc-fast) var(--wc-ease);
}
.wc-suggestion:hover i { color: var(--wc-brand); transform: translateX(3px); }

/* ── Composer ─────────────────────────────────────────────────────────── */

.wc-composer { padding: 10px 22px 18px; background: var(--wc-surface); }

.wc-inputbar {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 8px 8px 8px 16px;
    border: 1.5px solid var(--wc-line-strong);
    border-radius: var(--wc-r-lg);
    background: var(--wc-surface);
    box-shadow: var(--wc-shadow-sm);
    transition: border-color var(--wc-fast) var(--wc-ease), box-shadow var(--wc-fast) var(--wc-ease);
}
/* Al escribir, el borde toma el espectro de la chispa (borde transparente
   + fondo en dos capas: la de adentro tapa, la de afuera se ve en el filo). */
.wc-inputbar:focus-within {
    border-color: transparent;
    background:
        linear-gradient(var(--wc-surface), var(--wc-surface)) padding-box,
        linear-gradient(100deg, #5eead4, #60a5fa 40%, #a78bfa 70%, #f472b6) border-box;
    box-shadow: 0 8px 26px -12px rgba(96, 165, 250, .45);
}

.wc-input {
    flex: 1;
    border: 0;
    outline: none;
    resize: none;
    background: transparent;
    font: 400 14.5px/1.5 Inter, sans-serif;
    color: var(--wc-ink);
    max-height: 132px;
    padding: 6px 0;
}
.wc-input::placeholder { color: var(--wc-faint); }

.wc-send {
    width: 38px; height: 38px;
    flex: 0 0 auto;
    display: grid; place-items: center;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(140deg, var(--wc-brand) 0%, var(--wc-brand-600) 100%);
    color: #fff;
    cursor: pointer;
    transition: transform var(--wc-fast) var(--wc-ease), filter var(--wc-fast) var(--wc-ease);
}
.wc-send:hover:not(:disabled) { transform: scale(1.06); filter: brightness(1.06); }
.wc-send:disabled { background: var(--wc-line-strong); cursor: not-allowed; }

.wc-hint {
    margin: 7px 2px 0;
    font-size: 11px;
    color: var(--wc-faint);
    display: flex;
    gap: 12px;
}
.wc-hint kbd {
    font: 600 10px/1 Inter, sans-serif;
    padding: 2px 5px;
    border: 1px solid var(--wc-line-strong);
    border-bottom-width: 2px;
    border-radius: 5px;
    background: var(--wc-surface-2);
    color: var(--wc-muted);
}

/* ── Controles contextuales (micro-frontends de entrada) ─────────────── */

.wc-control {
    margin-bottom: 10px;
    padding: 14px 16px;
    border: 1px solid var(--wc-line);
    border-radius: var(--wc-r);
    background: linear-gradient(180deg, var(--wc-surface-2) 0%, var(--wc-surface) 100%);
    animation: wc-rise var(--wc-mid) var(--wc-ease) both;
}
.wc-control-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}
.wc-control-head strong { font-size: 12.5px; font-weight: 700; }
.wc-control-value {
    font: 700 13px/1 Sora, Inter, sans-serif;
    color: var(--wc-brand-700);
    font-variant-numeric: tabular-nums;
}

/* Slider doble: dos <input range> superpuestos sobre un riel compartido.
   Es la única forma de tener rango doble nativo sin traer una librería. */
.wc-range { position: relative; height: 26px; margin: 0 4px; }
.wc-range-rail {
    position: absolute;
    top: 11px; left: 0; right: 0;
    height: 4px;
    border-radius: var(--wc-r-pill);
    background: var(--wc-line-strong);
}
.wc-range-fill {
    position: absolute;
    top: 11px;
    height: 4px;
    border-radius: var(--wc-r-pill);
    background: var(--wc-brand);
    transition: left var(--wc-fast) linear, right var(--wc-fast) linear;
}
.wc-range input[type=range] {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 26px;
    margin: 0;
    background: none;
    pointer-events: none;
    appearance: none;
    -webkit-appearance: none;
}
.wc-range input[type=range]::-webkit-slider-thumb {
    pointer-events: auto;
    appearance: none;
    -webkit-appearance: none;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 2.5px solid var(--wc-brand);
    box-shadow: var(--wc-shadow);
    cursor: grab;
    transition: transform var(--wc-fast) var(--wc-ease);
}
.wc-range input[type=range]::-webkit-slider-thumb:active { transform: scale(1.18); cursor: grabbing; }
.wc-range input[type=range]::-moz-range-thumb {
    pointer-events: auto;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 2.5px solid var(--wc-brand);
    box-shadow: var(--wc-shadow);
    cursor: grab;
}

.wc-choices { display: flex; gap: 7px; flex-wrap: wrap; }
.wc-choice {
    padding: 7px 14px;
    border-radius: var(--wc-r-pill);
    border: 1px solid var(--wc-line-strong);
    background: var(--wc-surface);
    font: 600 12.5px/1 Inter, sans-serif;
    color: var(--wc-ink-2);
    cursor: pointer;
    transition: all var(--wc-fast) var(--wc-ease);
}
.wc-choice:hover { border-color: var(--wc-brand); color: var(--wc-brand-700); }
.wc-choice.is-on { background: var(--wc-brand); border-color: var(--wc-brand); color: #fff; }

/* ════════════════════════════════════════════════════════════════════════
   PANEL DERECHO — LIENZO DE CONTEXTO VIVO
   ════════════════════════════════════════════════════════════════════════ */

.wc-right {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    background: var(--wc-bg);
}

/* Tirador de la lamina de resultados. Oculto por defecto: en desktop el panel
   derecho es una columna fija y no hay nada que bajar. Se prende en el @media
   de mobile. */
.wc-sheet-handle { display: none; }

.wc-canvas-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 18px;
    border-bottom: 1px solid var(--wc-line);
    background: var(--wc-surface);
}
.wc-canvas-title { min-width: 0; flex: 1; }
.wc-canvas-title h3 {
    margin: 0;
    font-family: Sora, Inter, sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -.012em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wc-canvas-title p {
    margin: 1px 0 0;
    font-size: 11.5px;
    color: var(--wc-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wc-tabs { display: flex; gap: 5px; overflow-x: auto; scrollbar-width: none; }
.wc-tabs::-webkit-scrollbar { display: none; }
.wc-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border-radius: var(--wc-r-pill);
    border: 1px solid transparent;
    background: var(--wc-surface-2);
    color: var(--wc-muted);
    font: 600 11.5px/1 Inter, sans-serif;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--wc-fast) var(--wc-ease);
}
.wc-tab:hover { color: var(--wc-ink); background: var(--wc-line); }
.wc-tab.is-on {
    background: var(--wc-brand-tint);
    border-color: rgba(13, 148, 136, .3);
    color: var(--wc-brand-700);
}

.wc-canvas {
    flex: 1;
    min-height: 0;
    position: relative;
    overflow: hidden;
}

/* La transición entre cuadros: el saliente se va hacia arriba difuminado y el
   entrante sube desde abajo. 260ms — suficiente para leerse como movimiento,
   no tanto como para estorbar. */
.wc-frame {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 18px;
    animation: wc-frame-in var(--wc-slow) var(--wc-ease) both;
}
@keyframes wc-frame-in {
    from { opacity: 0; transform: translateY(14px) scale(.99); }
    to   { opacity: 1; transform: none; }
}
.wc-frame--flush { padding: 0; }

/* ── Estado inactivo / esqueleto ──────────────────────────────────────── */

.wc-idle {
    height: 100%;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 14px;
    text-align: center;
    padding: 24px;
    color: var(--wc-muted);
}
.wc-idle-art {
    width: 86px; height: 86px;
    border-radius: 26px;
    display: grid; place-items: center;
    background: #0a0b0f;
    box-shadow: 0 14px 30px -16px rgba(2, 6, 23, .55), inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.wc-idle h4 {
    margin: 0;
    font-family: Sora, Inter, sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--wc-ink);
}
.wc-idle p { margin: 0; font-size: 13px; max-width: 320px; line-height: 1.6; }

.wc-idle-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 6px;
    width: min(420px, 100%);
}
.wc-idle-cap {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 11px;
    border-radius: var(--wc-r-sm);
    background: var(--wc-surface);
    border: 1px solid var(--wc-line);
    font-size: 12px;
    color: var(--wc-ink-2);
    text-align: left;
}
.wc-idle-cap svg { color: var(--wc-brand); flex: 0 0 auto; }

/* Skeleton mientras la tool corre y el cuadro todavía no llegó */
.wc-skel {
    border-radius: var(--wc-r);
    background: linear-gradient(100deg, var(--wc-line) 18%, #eef2f6 34%, var(--wc-line) 52%);
    background-size: 280% 100%;
    animation: wc-shimmer 1.25s linear infinite;
}
@keyframes wc-shimmer { to { background-position: -180% 0; } }

/* ── Tarjetas del lienzo ──────────────────────────────────────────────── */

.wc-card {
    background: var(--wc-surface);
    border: 1px solid var(--wc-line);
    border-radius: var(--wc-r);
    padding: 15px 17px;
    box-shadow: var(--wc-shadow-sm);
}
.wc-card + .wc-card { margin-top: 12px; }
.wc-card > h5 {
    margin: 0 0 12px;
    font: 700 11px/1 Inter, sans-serif;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--wc-muted);
}

.wc-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
    gap: 10px;
}
.wc-stat {
    padding: 11px 13px;
    border-radius: var(--wc-r-sm);
    background: var(--wc-surface-2);
    border: 1px solid var(--wc-line);
}
.wc-stat dt {
    margin: 0 0 3px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--wc-muted);
}
.wc-stat dd {
    margin: 0;
    font: 700 17px/1.15 Sora, Inter, sans-serif;
    color: var(--wc-ink);
    font-variant-numeric: tabular-nums;
    letter-spacing: -.02em;
}
.wc-stat dd small { font-size: 11.5px; font-weight: 600; color: var(--wc-muted); }
.wc-stat--hero { background: var(--wc-brand-tint); border-color: rgba(13, 148, 136, .22); }
.wc-stat--hero dd { color: var(--wc-brand-700); font-size: 22px; }

.wc-chart { position: relative; height: 210px; }
.wc-chart--tall { height: 270px; }

.wc-note {
    margin: 12px 0 0;
    padding: 9px 11px;
    border-radius: var(--wc-r-sm);
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    font-size: 11.5px;
    line-height: 1.55;
}

/* ── Carrusel de propiedades ──────────────────────────────────────────── */

.wc-carousel { display: flex; flex-direction: column; height: 100%; min-height: 0; }

.wc-carousel-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 4px 2px 8px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
    gap: 13px;
    align-content: start;
}

.wc-prop {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: var(--wc-r);
    background: var(--wc-surface);
    border: 1px solid var(--wc-line);
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--wc-shadow-sm);
    transition: transform var(--wc-mid) var(--wc-ease),
                box-shadow var(--wc-mid) var(--wc-ease),
                border-color var(--wc-fast) var(--wc-ease);
    animation: wc-rise var(--wc-mid) var(--wc-ease) both;
}
.wc-prop:hover { transform: translateY(-4px); box-shadow: var(--wc-shadow-lg); }
.wc-prop.is-on {
    border-color: var(--wc-brand);
    box-shadow: 0 0 0 3px var(--wc-brand-tint), var(--wc-shadow);
}

/* ALTURA FIJA, NO aspect-ratio.
   El `aspect-ratio: 4/3` que había acá dependía del ancho, y el ancho viene de
   un track `1fr` del grid cuya fila mide `auto` — o sea que la altura dependía
   del ancho y la fila dependía de la altura. Esa circularidad el browser la
   resuelve por aproximación, la card terminaba midiendo más que su fila y el
   `overflow:hidden` le comía el botón de abajo. Con una altura en píxeles la
   cadena se corta y la fila mide bien. */
.wc-prop-img {
    position: relative;
    flex: 0 0 148px;
    height: 148px;
    background: var(--wc-line);
    overflow: hidden;
}
.wc-prop-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--wc-slow) var(--wc-ease);
}
.wc-prop:hover .wc-prop-img img { transform: scale(1.055); }
.wc-prop-img .wc-skel { position: absolute; inset: 0; border-radius: 0; }

/* Aviso sin fotos cargadas. Un skeleton eterno haría creer que algo está
   cargando para siempre; esto dice claramente que la foto no existe. */
.wc-prop-nopic {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 5px;
    background: linear-gradient(160deg, var(--wc-surface-2) 0%, var(--wc-line) 100%);
    color: var(--wc-faint);
}
.wc-prop-nopic span {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .03em;
}

.wc-prop-price {
    position: absolute;
    left: 9px; bottom: 9px;
    padding: 5px 10px;
    border-radius: var(--wc-r-pill);
    background: rgba(15, 23, 42, .84);
    backdrop-filter: blur(6px);
    color: #fff;
    font: 700 12.5px/1 Sora, Inter, sans-serif;
    font-variant-numeric: tabular-nums;
}
.wc-prop-badge {
    position: absolute;
    top: 9px; left: 9px;
    padding: 4px 9px;
    border-radius: var(--wc-r-pill);
    font: 700 9.5px/1 Inter, sans-serif;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: #fff;
    background: var(--wc-ink);
}
.wc-prop-badge.is-deal { background: linear-gradient(120deg, #f59e0b, #ea580c); }
.wc-prop-badge.is-multi { background: #2563eb; }

.wc-fav {
    position: absolute;
    top: 7px; right: 7px;
    width: 30px; height: 30px;
    display: grid; place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(6px);
    color: var(--wc-ink-2);
    cursor: pointer;
    opacity: 0;
    transform: translateY(-4px);
    transition: all var(--wc-fast) var(--wc-ease);
}
.wc-prop:hover .wc-fav, .wc-fav.is-on { opacity: 1; transform: none; }
.wc-fav:hover { transform: scale(1.12); }
.wc-fav.is-on { color: var(--wc-danger); }

/* flex-shrink 0 en la imagen y en las acciones: lo único que puede ceder
   espacio es el cuerpo. Sin esto, un título de dos líneas empujaba y el
   navegador encogía la foto y el botón hasta hacerlos desaparecer. */
.wc-prop-body {
    padding: 11px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    flex: 1 1 auto;
    min-height: 0;
}
.wc-prop-title {
    margin: 0;
    font: 600 13px/1.35 Inter, sans-serif;
    color: var(--wc-ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.wc-prop-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    font-size: 11.5px;
    color: var(--wc-muted);
}
.wc-prop-meta span { display: inline-flex; align-items: center; gap: 4px; }
.wc-prop-meta svg { color: var(--wc-faint); }
.wc-prop-where {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--wc-brand-700);
}
.wc-prop-m2 {
    font-size: 10.5px;
    color: var(--wc-faint);
    font-variant-numeric: tabular-nums;
}

.wc-prop-actions {
    display: flex;
    gap: 6px;
    padding: 0 12px 12px;
    flex: 0 0 auto;
    margin-top: auto;     /* siempre pegado abajo, aunque la card se estire */
}
.wc-prop-actions .wc-btn { flex: 1; justify-content: center; padding: 7px 8px; font-size: 11.5px; }

/* ── Mapa ─────────────────────────────────────────────────────────────── */

.wc-map { width: 100%; height: 100%; min-height: 240px; background: var(--wc-line); }

/* La atribución de OSM es obligatoria por licencia, pero en un panel de 38% de
   alto compite con el contenido. La dejamos legible y discreta. */
.wc-map .leaflet-control-attribution {
    background: rgba(255, 255, 255, .82);
    backdrop-filter: blur(4px);
    font-size: 9.5px;
    padding: 1px 6px;
    border-radius: var(--wc-r-pill) 0 0 0;
    color: var(--wc-faint);
}
.wc-map .leaflet-control-attribution a { color: var(--wc-muted); }

/* Los controles de zoom, con la forma del resto de la consola. */
.wc-map .leaflet-control-zoom a {
    border-radius: var(--wc-r-sm) !important;
    color: var(--wc-ink-2);
    border-color: var(--wc-line);
}
.wc-map .leaflet-control-zoom a:hover { color: var(--wc-brand-700); }
.wc-map-wrap { position: relative; flex: 1; min-height: 0; border-radius: var(--wc-r); overflow: hidden; border: 1px solid var(--wc-line); }

/* Pines con el precio flotando. Se dibujan con divIcon: HTML real, estilable. */
.wc-pin-wrap { background: none !important; border: 0 !important; }
.wc-pin {
    display: inline-block;
    transform: translate(-50%, -130%);
    padding: 4px 9px;
    border-radius: var(--wc-r-pill);
    background: var(--wc-surface);
    border: 1.5px solid var(--wc-brand);
    color: var(--wc-brand-700);
    font: 700 11.5px/1 Inter, sans-serif;
    white-space: nowrap;
    box-shadow: 0 4px 12px -4px rgba(15, 23, 42, .35);
    cursor: pointer;
    transition: transform var(--wc-fast) var(--wc-ease), background var(--wc-fast) var(--wc-ease);
}
.wc-pin::after {
    content: "";
    position: absolute;
    left: 50%; bottom: -5px;
    width: 7px; height: 7px;
    transform: translateX(-50%) rotate(45deg);
    background: inherit;
    border-right: 1.5px solid var(--wc-brand);
    border-bottom: 1.5px solid var(--wc-brand);
}
.wc-pin:hover { transform: translate(-50%, -145%) scale(1.06); }
.wc-pin.is-on {
    background: var(--wc-brand);
    color: #fff;
    border-color: var(--wc-brand-700);
    transform: translate(-50%, -148%) scale(1.1);
    z-index: 500;
}
.wc-pin.is-on::after { border-color: var(--wc-brand-700); }

.wc-dot-wrap { background: none !important; border: 0 !important; }
.wc-dot {
    display: block;
    width: 11px; height: 11px;
    border-radius: 50%;
    background: var(--dot, #64748b);
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, .3);
}

.wc-legend {
    position: absolute;
    left: 10px; bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    padding: 7px 10px;
    border-radius: var(--wc-r-sm);
    background: rgba(255, 255, 255, .93);
    backdrop-filter: blur(8px);
    border: 1px solid var(--wc-line);
    box-shadow: var(--wc-shadow);
    z-index: 500;
    max-width: calc(100% - 20px);
}
.wc-legend span { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 600; color: var(--wc-ink-2); }
.wc-legend i { width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 0 2px #fff; }

/* ── Comparador ───────────────────────────────────────────────────────── */

.wc-compare { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
.wc-compare th, .wc-compare td {
    padding: 9px 11px;
    border-bottom: 1px solid var(--wc-line);
    text-align: left;
    vertical-align: middle;
}
.wc-compare thead th {
    position: sticky; top: 0;
    background: var(--wc-surface);
    font: 700 10.5px/1.3 Inter, sans-serif;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--wc-muted);
    z-index: 2;
}
.wc-compare tbody tr { transition: background var(--wc-fast) var(--wc-ease); cursor: pointer; }
.wc-compare tbody tr:hover { background: var(--wc-surface-2); }
.wc-compare tbody tr.is-on { background: var(--wc-brand-tint); }
.wc-compare td.num { font-variant-numeric: tabular-nums; font-weight: 600; }
.wc-delta { font-size: 11px; font-weight: 700; }
.wc-delta.up { color: var(--wc-danger); }
.wc-delta.down { color: var(--wc-ok); }

/* ── Agenda inline ────────────────────────────────────────────────────── */

.wc-sched-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.wc-day {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 9px 2px;
    border-radius: var(--wc-r-sm);
    border: 1px solid var(--wc-line);
    background: var(--wc-surface);
    cursor: pointer;
    transition: all var(--wc-fast) var(--wc-ease);
}
.wc-day small { font-size: 9.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--wc-muted); font-weight: 700; }
.wc-day b { font: 700 15px/1 Sora, Inter, sans-serif; }
.wc-day:hover { border-color: var(--wc-brand); transform: translateY(-2px); }
.wc-day.is-on { background: var(--wc-brand); border-color: var(--wc-brand); color: #fff; }
.wc-day.is-on small { color: rgba(255, 255, 255, .8); }
.wc-day:disabled { opacity: .35; cursor: not-allowed; transform: none; }

.wc-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; margin-top: 12px; }
.wc-slot {
    padding: 8px 4px;
    border-radius: var(--wc-r-sm);
    border: 1px solid var(--wc-line);
    background: var(--wc-surface);
    font: 600 12.5px/1 Inter, sans-serif;
    font-variant-numeric: tabular-nums;
    color: var(--wc-ink-2);
    cursor: pointer;
    transition: all var(--wc-fast) var(--wc-ease);
}
.wc-slot:hover { border-color: var(--wc-brand); color: var(--wc-brand-700); }
.wc-slot.is-on { background: var(--wc-brand); border-color: var(--wc-brand); color: #fff; }

.wc-sched-done {
    display: grid; place-items: center; gap: 10px;
    padding: 28px 18px; text-align: center;
}
.wc-check {
    width: 54px; height: 54px;
    border-radius: 50%;
    display: grid; place-items: center;
    background: var(--wc-ok);
    color: #fff;
    animation: wc-check .5s var(--wc-ease) both;
}
@keyframes wc-check {
    0%   { transform: scale(.4); opacity: 0; }
    60%  { transform: scale(1.12); opacity: 1; }
    100% { transform: scale(1); }
}

/* ── Semáforo de confianza ────────────────────────────────────────────── */

.wc-conf { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; }
.wc-conf i { width: 8px; height: 8px; border-radius: 50%; }
.wc-conf.alta   { color: #047857; } .wc-conf.alta i   { background: var(--wc-ok); }
.wc-conf.media  { color: #b45309; } .wc-conf.media i  { background: var(--wc-warn); }
.wc-conf.baja   { color: #b91c1c; } .wc-conf.baja i   { background: var(--wc-danger); }

/* Barra de rango de tasación */
.wc-gauge { margin-top: 14px; }
.wc-gauge-rail {
    position: relative;
    height: 8px;
    border-radius: var(--wc-r-pill);
    background: linear-gradient(90deg, #fde68a 0%, var(--wc-brand-soft) 50%, #fde68a 100%);
}
.wc-gauge-mark {
    position: absolute;
    top: -5px;
    width: 3px; height: 18px;
    border-radius: 2px;
    background: var(--wc-brand-700);
    transform: translateX(-50%);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .9);
    animation: wc-mark var(--wc-slow) var(--wc-ease) both;
}
@keyframes wc-mark { from { opacity: 0; transform: translateX(-50%) scaleY(.3); } to { opacity: 1; } }
.wc-gauge-labels {
    display: flex; justify-content: space-between;
    margin-top: 7px;
    font-size: 11px;
    color: var(--wc-muted);
    font-variant-numeric: tabular-nums;
}

/* ════════════════════════════════════════════════════════════════════════
   RESPONSIVE — en pantallas chicas el split no tiene sentido: se apilan y
   el lienzo aparece como hoja desde abajo cuando hay algo que mostrar.
   ════════════════════════════════════════════════════════════════════════ */

@media (max-width: 980px) {
    .wc-console {
        /* Alto de la lamina y cuanto asoma cuando esta bajada. En dvh y no en
           % a proposito: el padding-bottom de .wc-left tiene que valer lo
           mismo, y un padding en % se resuelve contra el ANCHO del contenedor,
           no contra el alto — daria cualquier cosa. */
        --wc-sheet-h: 55dvh;
        --wc-sheet-peek: 38px;
    }

    .wc-body { grid-template-columns: 1fr; grid-template-rows: 1fr; }
    .wc-splitter { display: none; }

    .wc-right {
        position: absolute;
        inset: auto 0 0 0;
        height: var(--wc-sheet-h);
        border-top-left-radius: var(--wc-r-lg);
        border-top-right-radius: var(--wc-r-lg);
        box-shadow: 0 -14px 40px -18px rgba(15, 23, 42, .35);
        transform: translateY(100%);
        transition: transform var(--wc-slow) var(--wc-ease);
        z-index: 20;
    }
    .wc-console.has-canvas .wc-right { transform: none; }

    /* Bajada: solo asoma el tirador, y el chat recupera la pantalla entera. */
    .wc-console.has-canvas.canvas-colapsado .wc-right {
        transform: translateY(calc(100% - var(--wc-sheet-peek)));
    }

    /* ── El composer NUNCA queda atras de la lamina ──────────────────────
       Este era el nudo del problema: la lamina se apoya encima del chat con
       z-index 20, asi que el campo para escribir —ultimo hijo de .wc-left—
       quedaba tapado apenas aparecia un resultado. Reservandole el alto de la
       lamina al panel izquierdo, el composer se apoya justo arriba de ella y
       el hilo scrollea en lo que queda. */
    .wc-console.has-canvas .wc-left { padding-bottom: var(--wc-sheet-h); }
    .wc-console.has-canvas.canvas-colapsado .wc-left { padding-bottom: var(--wc-sheet-peek); }
    .wc-left { transition: padding-bottom var(--wc-slow) var(--wc-ease); }

    /* Tirador: barra fina, full width, que es lo que asoma al bajarla. */
    .wc-sheet-handle {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        flex: 0 0 auto;
        height: var(--wc-sheet-peek);
        width: 100%;
        padding: 0 14px;
        border: 0;
        border-top-left-radius: var(--wc-r-lg);
        border-top-right-radius: var(--wc-r-lg);
        background: var(--wc-surface);
        color: var(--wc-muted);
        font-family: inherit;
        font-size: 12.5px;
        font-weight: 600;
        cursor: pointer;
    }
    .wc-sheet-grip {
        width: 32px;
        height: 4px;
        border-radius: 999px;
        background: var(--wc-line-strong);
    }
    .wc-sheet-chev { transition: transform var(--wc-mid) var(--wc-ease); }
    /* Bajada, la flecha apunta para arriba ("subir"); abierta, para abajo. */
    .wc-console:not(.canvas-colapsado) .wc-sheet-chev { transform: rotate(180deg); }

    .wc-filters { display: none; }
    .wc-thread { padding: 16px 14px 8px; }
    .wc-composer { padding: 8px 14px 14px; }
}

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

/* ════════════════════════════════════════════════════════════════════════
   ESCENARIO DEL LIENZO — mapa persistente arriba, cuadro activo abajo
   ------------------------------------------------------------------------
   El mapa NO se desmonta al cambiar de pestaña (ver WillyCanvasPanel): se
   esconde. `display:none` sería más limpio pero Leaflet pierde el tamaño al
   volver; por eso se colapsa con altura 0 + visibility, que conserva el
   layout interno y deja que invalidateSize() lo recupere al instante.
   ════════════════════════════════════════════════════════════════════════ */

.wc-canvas { display: flex; flex-direction: column; }

.wc-stage-map {
    display: flex;
    flex: 0 0 auto;
    height: var(--wc-map-h, 38%);
    min-height: 0;
    padding: 14px 14px 0;
    overflow: hidden;
    transition: height var(--wc-slow) var(--wc-ease),
                padding var(--wc-slow) var(--wc-ease),
                opacity var(--wc-mid) var(--wc-ease);
}
.wc-stage-map.is-off {
    height: 0;
    padding-top: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.wc-stage-content { position: relative; flex: 1; min-height: 0; }

/* Cuando hay mapa arriba, el cuadro de abajo no necesita tanto aire. */
.wc-stage-content.has-map .wc-frame { padding: 14px; }

/* Filas del carrusel virtualizado: alto fijo, que es lo que Virtualize precisa
   para calcular el scroll sin medir el DOM. */
.wc-carousel-scroll--virtual { display: block; }
.wc-carousel-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
    height: 272px;
    padding-bottom: 13px;
    box-sizing: border-box;
}
.wc-carousel-row .wc-prop { height: 100%; }

/* En el carrusel de proyectos las cards no tienen foto: una sola columna se lee
   mejor que dos angostas llenas de texto. */
.wc-frame .wc-carousel-scroll:has(.wc-prop-body:first-child) { grid-template-columns: 1fr; }

/* ════════════════════════════════════════════════════════════════════════
   EL BOTÓN FLOTANTE DE CONI, EN /willy
   ------------------------------------------------------------------------
   .coni-fab vive en el MainLayout (position:fixed, bottom 26px, left 26px), o
   sea que aparece en todas las páginas — y en la consola cae justo encima del
   composer, tapando el arranque del input.

   Lo escondemos sólo acá. Dos asistentes de IA flotando en la misma pantalla
   confunden, y en /willy el asistente es Willy: Coni (soporte) sigue disponible
   en el resto del sitio.

   El :has() apunta al body sólo cuando la consola está montada, así que no
   afecta a ninguna otra ruta. El !important es necesario para ganarle a la
   especificidad del CSS aislado del componente (.coni-fab[b-xxxxx]).
   ════════════════════════════════════════════════════════════════════════ */
body:has(.wc-console) .coni-fab { display: none !important; }
