* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background: #0d1a1f;
    min-height: 100vh;
    color: #f0ebe3;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(37,58,54,0.6) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 80%, rgba(19,32,39,0.8) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* ── SETUP SCREEN ── */
.inicio {
    position: relative;
    z-index: 1;
    max-width: 940px;
    margin: 0 auto;
    padding: 48px 24px;
}

.inicio-titulo { font-size: 28px; font-weight: 800; color: #c9b99a; margin-bottom: 6px; }
.inicio-subtitulo { font-size: 14px; color: #4a6a60; margin-bottom: 40px; }
.lc-toggle {
    display: flex; align-items: center; gap: 8px; font-size: 13px; color: #8b949e;
    margin-bottom: 24px; cursor: pointer; user-select: none;
}
.lc-toggle input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; accent-color: #6ac0aa; }

.seccion-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #4a6a60;
    margin-bottom: 12px;
}

.cards { display: flex; gap: 12px; margin-bottom: 32px; }

.card {
    flex: 1;
    background: linear-gradient(145deg, #1a2e35, #253a36);
    border: 1px solid rgba(201,185,154,0.1);
    border-radius: 14px;
    padding: 18px;
    cursor: pointer;
    transition: all 0.25s;
}

.card:hover { border-color: rgba(201,185,154,0.3); transform: translateY(-2px); }

.card.seleccionado {
    border-color: #c9b99a;
    background: linear-gradient(145deg, #1e3530, #2d4a3e);
    box-shadow: 0 0 0 1px rgba(201,185,154,0.2), 0 8px 24px rgba(0,0,0,0.3);
}

.card-emoji { font-size: 24px; margin-bottom: 10px; }
.card-nombre { font-size: 13px; font-weight: 600; color: #c9b99a; margin-bottom: 4px; }
.card-desc { font-size: 11px; color: #4a6a60; line-height: 1.6; }

.card-dificultad {
    display: inline-block;
    font-size: 9px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    margin-top: 8px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.facil   { background: rgba(46,125,50,0.15);  color: #6dbf70; border: 1px solid rgba(46,125,50,0.2); }
.medio   { background: rgba(230,115,0,0.15);  color: #ffaa44; border: 1px solid rgba(230,115,0,0.2); }
.dificil { background: rgba(198,40,40,0.15);  color: #ff6b6b; border: 1px solid rgba(198,40,40,0.2); }

/* modo cards (3 opciones) */
.seccion-modo { display: flex; gap: 12px; margin-bottom: 32px; }

.modo-card {
    flex: 1;
    background: linear-gradient(145deg, #1a2e35, #253a36);
    border: 1px solid rgba(201,185,154,0.1);
    border-radius: 14px;
    padding: 18px;
    cursor: pointer;
    transition: all 0.25s;
    text-align: center;
}

.modo-card:hover { border-color: rgba(201,185,154,0.3); transform: translateY(-2px); }

.modo-card.seleccionado {
    border-color: #c9b99a;
    background: linear-gradient(145deg, #1e3530, #2d4a3e);
    box-shadow: 0 0 0 1px rgba(201,185,154,0.2), 0 8px 24px rgba(0,0,0,0.3);
}

.modo-card .card-emoji { font-size: 22px; }
.modo-card .card-nombre { font-size: 13px; font-weight: 600; color: #c9b99a; margin-top: 8px; }
.modo-card .card-desc { font-size: 11px; color: #4a6a60; margin-top: 4px; line-height: 1.5; }

/* etapa cards */
.etapa-cards { display: flex; gap: 10px; margin-bottom: 32px; }

.etapa-card {
    flex: 1;
    background: rgba(13,26,31,0.6);
    border: 1px solid rgba(201,185,154,0.1);
    border-radius: 10px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.etapa-card:hover { border-color: rgba(201,185,154,0.3); }

.etapa-card.seleccionado {
    border-color: #c9b99a;
    background: rgba(201,185,154,0.08);
}

.etapa-card .card-emoji { font-size: 18px; margin-bottom: 6px; }
.etapa-card .card-nombre { font-size: 11px; font-weight: 600; color: #c9b99a; }
.etapa-card .card-desc { font-size: 10px; color: #4a6a60; margin-top: 4px; line-height: 1.5; }

/* contexto toggle */
.contexto-venta {
    background: linear-gradient(145deg, #1a2e35, #1e3530);
    border: 1px solid rgba(201,185,154,0.1);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 32px;
}

.contexto-toggle {
    display: flex;
    background: rgba(13,26,31,0.6);
    border: 1px solid rgba(201,185,154,0.12);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 20px;
    gap: 4px;
}

.toggle-btn {
    flex: 1;
    padding: 9px 12px;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: #4a6a60;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.toggle-btn.activo {
    background: linear-gradient(135deg, #1e3530, #253a36);
    color: #c9b99a;
    border: 1px solid rgba(201,185,154,0.2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.aviso-sin-contexto {
    background: rgba(201,185,154,0.05);
    border: 1px solid rgba(201,185,154,0.15);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
}

.aviso-sin-contexto p { font-size: 13px; color: #5a7a70; line-height: 1.6; margin-bottom: 12px; }

.aviso-sin-contexto a {
    font-size: 12px;
    font-weight: 600;
    color: #c9b99a;
    text-decoration: none;
    border-bottom: 1px solid rgba(201,185,154,0.3);
    padding-bottom: 1px;
}

.resumen-contexto {
    background: rgba(201,185,154,0.05);
    border: 1px solid rgba(201,185,154,0.12);
    border-radius: 10px;
    padding: 14px 16px;
}

.resumen-item { font-size: 12px; color: #6a8a80; line-height: 1.7; display: flex; gap: 8px; }
.resumen-item strong { color: #8a9a90; font-weight: 600; min-width: 80px; }

.ctx-selectors { margin-top: 12px; display: flex; flex-direction: column; gap: 12px; }

.ctx-mini-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #7a9a90;
    margin-bottom: 6px;
}

.ctx-select {
    width: 100%;
    background: rgba(13,26,31,0.6);
    border: 1px solid rgba(201,185,154,0.15);
    border-radius: 9px;
    padding: 10px 14px;
    color: #c9b99a;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    outline: none;
    cursor: pointer;
}
.ctx-select option { background: #1a2e35; color: #c9b99a; }

.ctx-obj-chips { display: flex; flex-wrap: wrap; gap: 7px; }

.ctx-obj-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(106,192,170,0.06);
    border: 1px solid rgba(106,192,170,0.18);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    color: #6a9a8a;
    cursor: pointer;
    user-select: none;
    transition: all 0.15s;
}
.ctx-obj-chip input[type=checkbox] { display: none; }
.ctx-obj-chip.checked {
    background: rgba(106,192,170,0.16);
    border-color: rgba(106,192,170,0.4);
    color: #6ac0aa;
}
.ctx-obj-chip:hover { border-color: rgba(106,192,170,0.3); color: #8abcac; }

.contexto-fila { display: flex; gap: 12px; margin-bottom: 12px; }

.contexto-campo {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.contexto-campo label {
    font-size: 11px;
    color: #4a6a60;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.contexto-campo input,
.contexto-campo textarea {
    padding: 10px 14px;
    background: rgba(13,26,31,0.6);
    border: 1px solid rgba(201,185,154,0.15);
    border-radius: 8px;
    font-size: 13px;
    color: #f0ebe3;
    outline: none;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s;
}

.contexto-campo input:focus,
.contexto-campo textarea:focus { border-color: rgba(201,185,154,0.4); }

.contexto-campo input::placeholder,
.contexto-campo textarea::placeholder { color: #3a5a50; }

.contexto-campo textarea { resize: none; height: 70px; }

.badge-beta {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #0d1a1f;
    background: #c9b99a;
    border-radius: 4px;
    padding: 2px 5px;
    vertical-align: middle;
    margin-left: 4px;
}

/* Pantalla avatar (modo avatar puro) */
.avatar-screen {
    display: none;
    position: relative;
    z-index: 1;
    flex-direction: row;
    height: calc(100vh - 65px);
    gap: 16px;
    padding: 16px 24px;
}

.avatar-principal {
    flex: 1;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(201,185,154,0.1);
    position: relative;
}

.avatar-principal iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.avatar-principal-estado {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(13,26,31,0.75);
    border: 1px solid rgba(201,185,154,0.15);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 11px;
    color: #c9b99a;
    letter-spacing: 1px;
    backdrop-filter: blur(4px);
}

.avatar-contexto-panel {
    width: 260px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ctx-card {
    background: linear-gradient(145deg, #1a2e35, #253a36);
    border: 1px solid rgba(201,185,154,0.12);
    border-radius: 14px;
    padding: 20px;
}

.ctx-tag {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #4a6a60;
    margin-bottom: 12px;
}

.ctx-titulo {
    font-size: 16px;
    font-weight: 700;
    color: #c9b99a;
    margin-bottom: 8px;
}

.ctx-desc {
    font-size: 12px;
    color: #5a7a70;
    line-height: 1.7;
}

.ctx-objetivo {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(201,185,154,0.08);
}

.ctx-objetivo-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #4a6a60;
    margin-bottom: 6px;
}

.ctx-objetivo-texto {
    font-size: 12px;
    color: #8aaa9a;
    line-height: 1.6;
}

.ctx-dificultad {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.ctx-dificultad.facil  { background: rgba(76,175,130,0.15); color: #4caf82; border: 1px solid rgba(76,175,130,0.3); }
.ctx-dificultad.medio  { background: rgba(201,185,154,0.12); color: #c9b99a; border: 1px solid rgba(201,185,154,0.25); }
.ctx-dificultad.dificil { background: rgba(224,112,112,0.12); color: #e07070; border: 1px solid rgba(224,112,112,0.25); }

/* botón iniciar */
.btn-iniciar {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #c9b99a, #8a7a5a);
    color: #0d1a1f;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    letter-spacing: 0.5px;
    font-family: 'Inter', sans-serif;
}

.btn-iniciar:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-iniciar:disabled { background: #2a3a35; color: #4a6a60; cursor: not-allowed; transform: none; opacity: 1; }

/* ── SESSION SCREEN ── */
.session-screen {
    display: none;
    position: relative;
    z-index: 1;
    flex-direction: column;
    height: calc(100vh - 65px);
}

.session-topbar {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    border-bottom: 1px solid rgba(201,185,154,0.08);
    flex-shrink: 0;
}

.session-topbar h2 { font-size: 16px; font-weight: 600; color: #c9b99a; }
.session-topbar p  { font-size: 12px; color: #4a6a60; margin-top: 2px; }

/* ── SESSION PROFILE BAR ── */
.session-profilebar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 24px;
    background: rgba(8,15,18,0.5);
    border-bottom: 1px solid rgba(255,255,255,0.04);
    flex-shrink: 0;
    animation: profileBarIn 0.4s ease;
}
@keyframes profileBarIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.sp-avatar {
    width: 38px; height: 38px; border-radius: 50%;
    background: linear-gradient(135deg, rgba(201,185,154,0.18), rgba(106,192,170,0.08));
    border: 1.5px solid rgba(201,185,154,0.3);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 800; color: #c9b99a;
    flex-shrink: 0;
}
.sp-divider {
    width: 1px; height: 32px;
    background: rgba(255,255,255,0.06);
    flex-shrink: 0;
}
.sp-nombre {
    font-size: 13px; font-weight: 700; color: #e0dbd4;
    white-space: nowrap;
}
.sp-role {
    font-size: 11px; color: #4a6a60; margin-top: 1px;
    white-space: nowrap;
}
.sp-producto {
    font-size: 12px; color: #5a7870;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 220px;
}
.sp-vende {
    font-size: 11px; color: #3a5a50;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 220px; margin-top: 2px;
}
.sp-obs {
    display: flex; gap: 6px; flex-wrap: nowrap;
    overflow: hidden; flex: 1;
}
.sp-ob {
    font-size: 10px; color: #6a7060;
    background: rgba(224,112,112,0.06);
    border: 1px solid rgba(224,112,112,0.12);
    border-radius: 20px; padding: 3px 9px;
    white-space: nowrap; flex-shrink: 0;
}
.sp-badge {
    font-size: 10px; font-weight: 700;
    letter-spacing: 0.5px; text-transform: uppercase;
    padding: 4px 10px; border-radius: 20px; flex-shrink: 0;
    margin-left: auto;
}
.sp-badge.facil   { background: rgba(46,125,50,0.12);  color: #6dbf70; border: 1px solid rgba(46,125,50,0.2); }
.sp-badge.medio   { background: rgba(201,185,154,0.1); color: #c9b99a; border: 1px solid rgba(201,185,154,0.2); }
.sp-badge.dificil { background: rgba(198,40,40,0.12);  color: #ff6b6b; border: 1px solid rgba(198,40,40,0.2); }

.btn-terminar {
    padding: 10px 20px;
    background: rgba(198,40,40,0.15);
    color: #ff6b6b;
    border: 1px solid rgba(198,40,40,0.3);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
}

.btn-terminar:hover { background: rgba(198,40,40,0.25); }

.session-body {
    display: flex;
    gap: 16px;
    flex: 1;
    overflow: hidden;
    padding: 16px 24px;
}

/* Avatar panel */
.avatar-side {
    width: 40%;
    background: transparent;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.avatar-side iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.avatar-halo-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 1;
    filter: blur(36px);
    transform: scale(1.3);
    pointer-events: none;
}

.avatar-gl-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 2;
}

.avatar-overlay {
    position: absolute;
    bottom: 12px;
    left: 12px;
    z-index: 3;
    background: rgba(13,26,31,0.7);
    border: 1px solid rgba(201,185,154,0.15);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 11px;
    color: #c9b99a;
    letter-spacing: 1px;
    backdrop-filter: blur(4px);
}

/* Self-view de la cámara del candidato (lenguaje corporal) — flotando sobre
   el orbe, esquina superior derecha. display:none por defecto; JS la
   muestra solo mientras lenguajeCorporalActivo es true. Espejada
   (scaleX(-1)) para que se vea como una selfie normal — esto es puramente
   visual, no afecta los frames que MediaPipe analiza por debajo. */
.lc-camera-preview {
    display: none;
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 4;
    width: 104px;
    height: 104px;
    object-fit: cover;
    border-radius: 16px;
    border: 1.5px solid rgba(106,192,170,0.45);
    box-shadow: 0 0 0 3px rgba(106,192,170,0.08), 0 6px 18px rgba(0,0,0,0.35);
    transform: scaleX(-1);
    background: #0d1a1f;
}
.lc-camera-preview.activa { display: block; }

/* Chat panel */
.chat-side {
    flex: 1;
    background: linear-gradient(145deg, #1a2e35, #253a36);
    border: 1px solid rgba(201,185,154,0.1);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

.mensajes {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mensajes::-webkit-scrollbar { width: 4px; }
.mensajes::-webkit-scrollbar-track { background: transparent; }
.mensajes::-webkit-scrollbar-thumb { background: rgba(201,185,154,0.2); border-radius: 2px; }

.mensaje {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.6;
}

.mensaje.usuario {
    background: linear-gradient(135deg, #c9b99a, #8a7a5a);
    color: #0d1a1f;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    font-weight: 500;
}

.mensaje.cliente {
    background: rgba(13,26,31,0.6);
    border: 1px solid rgba(201,185,154,0.1);
    color: #c9b0a0;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.nombre {
    font-size: 10px;
    font-weight: 600;
    margin-bottom: 4px;
    opacity: 0.6;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.cargando {
    color: #4a6a60;
    font-style: italic;
    font-size: 13px;
    align-self: flex-start;
}

/* Input area */
.input-area {
    padding: 14px;
    border-top: 1px solid rgba(201,185,154,0.08);
    flex-shrink: 0;
}

.input-texto-row {
    display: flex;
    gap: 10px;
}

.input-texto-row input {
    flex: 1;
    padding: 11px 16px;
    background: rgba(13,26,31,0.6);
    border: 1px solid rgba(201,185,154,0.15);
    border-radius: 10px;
    font-size: 14px;
    color: #f0ebe3;
    outline: none;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s;
}

.input-texto-row input:focus { border-color: rgba(201,185,154,0.4); }
.input-texto-row input::placeholder { color: #3a5a50; }

.btn-enviar {
    padding: 11px 20px;
    background: linear-gradient(135deg, #c9b99a, #8a7a5a);
    color: #0d1a1f;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    transition: opacity 0.2s;
}

.btn-enviar:hover { opacity: 0.85; }

/* Voz input */
.input-voz-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.interim-texto {
    width: 100%;
    min-height: 32px;
    padding: 8px 14px;
    background: rgba(13,26,31,0.4);
    border: 1px solid rgba(201,185,154,0.08);
    border-radius: 8px;
    font-size: 13px;
    color: #7a9a90;
    font-style: italic;
    text-align: center;
}

.voz-controles {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-mic {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #253a36, #1e3530);
    border: 2px solid rgba(201,185,154,0.3);
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.btn-mic:hover { border-color: rgba(201,185,154,0.6); transform: scale(1.05); }

.btn-mic.escuchando {
    background: linear-gradient(135deg, #6a2a2a, #8a3030);
    border-color: #e07070;
    animation: mic-pulse 1.5s ease-in-out infinite;
}

.btn-mic.procesando {
    background: linear-gradient(135deg, #2a3a1a, #3a5020);
    border-color: #8abf70;
    animation: none;
}

@keyframes mic-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(224,112,112,0.4); }
    70%  { box-shadow: 0 0 0 14px rgba(224,112,112,0); }
    100% { box-shadow: 0 0 0 0 rgba(224,112,112,0); }
}

.mic-estado {
    font-size: 12px;
    color: #4a6a60;
    letter-spacing: 0.5px;
}

.mic-estado.escuchando { color: #e07070; }
.mic-estado.procesando { color: #8abf70; }

/* ── Botón interrumpir TTS ── */
.btn-skip-tts {
    display: none !important;
}
.btn-skip-tts:hover {
    background: rgba(224,112,112,0.22);
    border-color: rgba(224,112,112,0.7);
    transform: scale(1.04);
}
@keyframes skip-appear {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Panel mic bloqueado ── */
.mic-bloqueado-panel {
    width: 100%;
    background: rgba(100,30,30,0.25);
    border: 1px solid rgba(224,112,112,0.2);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.mic-bloqueado-titulo {
    font-size: 13px;
    font-weight: 700;
    color: #e07070;
}
.mic-bloqueado-pasos {
    font-size: 12px;
    color: #a07070;
    line-height: 1.7;
}
.mic-bloqueado-pasos ol {
    padding-left: 18px;
    margin-top: 4px;
}
.mic-bloqueado-btn {
    align-self: flex-start;
    padding: 7px 16px;
    border-radius: 8px;
    background: rgba(224,112,112,0.12);
    border: 1px solid rgba(224,112,112,0.3);
    color: #e07070;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
}
.mic-bloqueado-btn:hover { background: rgba(224,112,112,0.22); }

/* ── Banner offline ── */
.banner-offline {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 9998;
    background: rgba(60,20,20,0.97);
    border-bottom: 1px solid rgba(224,112,112,0.3);
    color: #e07070;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    padding: 10px;
    display: none;
}
.banner-offline.visible { display: block; }

/* ── Sistema de toasts ── */
.toast-container {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    pointer-events: none;
}
.toast {
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    max-width: 320px;
    text-align: center;
    white-space: nowrap;
}
.toast.visible { opacity: 1; transform: translateY(0); }
.toast-info    { background: rgba(20,50,45,0.97); border: 1px solid rgba(106,192,170,0.3); color: #7ac0b0; }
.toast-warning { background: rgba(50,42,18,0.97); border: 1px solid rgba(201,185,154,0.3); color: #c9b99a; }
.toast-error   { background: rgba(55,18,18,0.97); border: 1px solid rgba(224,112,112,0.3); color: #e07070; }
.toast-success { background: rgba(18,52,28,0.97); border: 1px solid rgba(76,175,130,0.3);  color: #4caf82; }

.mic-waveform {
    border-radius: 8px;
    background: rgba(13,26,31,0.5);
    border: 1px solid rgba(201,185,154,0.08);
    display: block;
}

.mensaje.error-retry {
    background: rgba(100,30,30,0.3);
    border: 1px solid rgba(224,112,112,0.25);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-self: center;
    max-width: 80%;
}

.mensaje.error-retry .nombre { color: #e07070; font-size: 12px; font-weight: 600; }
.mensaje.error-retry .texto  { color: #a07070; font-size: 13px; }

.btn-retry {
    margin-top: 4px;
    align-self: flex-start;
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid rgba(224,112,112,0.4);
    background: rgba(224,112,112,0.1);
    color: #e07070;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-retry:hover { background: rgba(224,112,112,0.2); }

/* Panel ayuda */
.ayuda-side {
    width: 240px;
    background: linear-gradient(145deg, #1a2e35, #253a36);
    border: 1px solid rgba(201,185,154,0.1);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    flex-shrink: 0;
}

.panel-titulo {
    font-size: 10px;
    font-weight: 600;
    color: #4a6a60;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.engagement-barra {
    height: 6px;
    background: rgba(13,26,31,0.6);
    border-radius: 6px;
    overflow: hidden;
    margin-top: 10px;
}

.engagement-fill {
    height: 100%;
    background: linear-gradient(90deg, #c9b99a, #8a7a5a);
    border-radius: 6px;
    transition: width 0.6s ease;
}

.engagement-valor {
    font-size: 28px;
    font-weight: 800;
    color: #c9b99a;
    margin-top: 8px;
}

.consejo-box {
    background: rgba(201,185,154,0.06);
    border-left: 2px solid #c9b99a;
    border-radius: 8px;
    padding: 12px;
    font-size: 13px;
    color: #8a9a90;
    line-height: 1.6;
}

/* ── SCORE ── */
.score-panel {
    display: none;
    position: relative;
    z-index: 1;
    max-width: 640px;
    margin: 0 auto;
    padding: 48px 24px;
}

.score-numero {
    font-size: 88px;
    font-weight: 800;
    text-align: center;
    background: linear-gradient(135deg, #f0ebe3, #c9b99a, #8a7a5a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.score-label {
    text-align: center;
    color: #4a6a60;
    font-size: 13px;
    margin-bottom: 32px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.score-box {
    background: linear-gradient(145deg, #1a2e35, #253a36);
    border: 1px solid rgba(201,185,154,0.1);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 16px;
}

.score-box h3 {
    font-size: 11px;
    font-weight: 600;
    color: #4a6a60;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.score-box p  { font-size: 14px; color: #8a9a90; line-height: 1.7; }
.score-box ul { padding-left: 16px; }
.score-box li { font-size: 14px; color: #8a9a90; line-height: 1.9; }

.btn-reintentar {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #c9b99a, #8a7a5a);
    color: #0d1a1f;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 24px;
    font-family: 'Inter', sans-serif;
    transition: opacity 0.2s;
}

.btn-reintentar:hover { opacity: 0.85; }

/* ── MODO TABS ── */
.modo-tabs {
    display: flex;
    background: rgba(13,26,31,0.5);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
    margin-bottom: 28px;
}
.modo-tab {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: #4a6a60;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.modo-tab.active {
    background: linear-gradient(135deg, #1e3530, #253a36);
    color: #c9b99a;
    border: 1px solid rgba(201,185,154,0.2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.modo-tab:hover:not(.active) { background: rgba(255,255,255,0.03); color: #8a9a90; }

/* ── CHALLENGES ── */
.ch-search-row { display: flex; gap: 10px; margin-bottom: 14px; }
.ch-search-wrap { flex: 1; position: relative; }
.ch-search-icon {
    position: absolute; left: 13px; top: 50%;
    transform: translateY(-50%);
    font-size: 14px; pointer-events: none; color: #3a5550;
}
.ch-search {
    width: 100%;
    padding: 11px 16px 11px 40px;
    background: rgba(13,26,31,0.6);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px;
    font-size: 13px; color: #f0ebe3;
    outline: none; font-family: 'Inter', sans-serif;
    transition: border-color 0.2s;
}
.ch-search::placeholder { color: #3a5550; }
.ch-search:focus { border-color: rgba(201,185,154,0.3); }

.ch-filters { display: flex; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; }
.ch-filter {
    padding: 8px 14px;
    background: rgba(13,26,31,0.6);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 8px;
    font-size: 12px; color: #6a8f88;
    cursor: pointer; font-family: 'Inter', sans-serif;
    transition: all 0.15s;
    appearance: none; outline: none;
}
.ch-filter:focus, .ch-filter:hover { border-color: rgba(201,185,154,0.25); color: #c9b99a; }
.ch-filter option { background: #0d1a1f; }

.ch-empty { text-align: center; padding: 40px 0; color: #3a5550; font-size: 14px; }

.ch-seccion-ia-titulo { font-size: 15px; font-weight: 700; color: #f0ebe3; margin-bottom: 4px; }
.ch-seccion-ia-sub { font-size: 12px; color: #6a8a80; margin: 0 0 12px; }

.ch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 18px;
}
.ch-card {
    background: linear-gradient(145deg, #1a2e35, #253a36);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 18px;
    padding: 24px 24px 24px 28px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.ch-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px; height: 100%;
    background: linear-gradient(to bottom, #c9b99a, #5a4a2a);
}
.ch-card:hover {
    border-color: rgba(201,185,154,0.25);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.ch-card-empresa {
    box-shadow: 0 14px 26px -10px rgba(76,175,130,0.35);
}
.ch-card-empresa:hover {
    box-shadow: 0 16px 30px -10px rgba(76,175,130,0.5), 0 8px 24px rgba(0,0,0,0.3);
}
.ch-card-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 11px; }
.ch-tag {
    font-size: 10px; font-weight: 600;
    padding: 3px 9px; border-radius: 20px; letter-spacing: 0.3px;
}
.ch-tag-ind  { background: rgba(106,192,170,0.1); color: #6ac0aa; border: 1px solid rgba(106,192,170,0.2); }
.ch-tag-per  { background: rgba(201,185,154,0.1); color: #c9b99a; border: 1px solid rgba(201,185,154,0.2); }
.ch-tag-mom  { background: rgba(140,130,220,0.1); color: #a09de0; border: 1px solid rgba(140,130,220,0.2); }
.ch-tag-src-global   { background: rgba(74,160,240,0.1);  color: #4aa0f0; border: 1px solid rgba(74,160,240,0.25);  margin-left: auto; }
.ch-tag-src-personal { background: rgba(201,185,154,0.12); color: #c9b99a; border: 1px solid rgba(201,185,154,0.3); margin-left: auto; }
.ch-tag-src-empresa  { background: rgba(180,130,220,0.1); color: #c090e0; border: 1px solid rgba(180,130,220,0.25); margin-left: auto; }
.ch-tag-temporal      { background: rgba(224,170,70,0.12); color: #e0aa46; border: 1px solid rgba(224,170,70,0.3); }
.ch-card-titulo { font-size: 18px; font-weight: 700; color: #f0ebe3; margin-bottom: 4px; line-height: 1.3; }
.ch-card-desc {
    font-size: 12px;
    color: #5a7870;
    line-height: 1.6;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ch-card-cta {
    width: 100%;
    margin-top: auto;
    padding: 10px;
    background: rgba(201,185,154,0.07);
    border: 1px solid rgba(201,185,154,0.18);
    border-radius: 8px;
    color: #c9b99a; font-size: 12px; font-weight: 600;
    cursor: pointer; font-family: 'Inter', sans-serif;
    transition: all 0.15s; text-align: center;
}
.ch-card-cta:hover { background: rgba(201,185,154,0.14); border-color: rgba(201,185,154,0.4); }

/* ── CHALLENGE MODAL ── */
.ch-modal-bg {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 500;
    backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    animation: fadeInBg 0.2s ease;
}
@keyframes fadeInBg { from { opacity: 0; } to { opacity: 1; } }
.ch-modal {
    background: linear-gradient(145deg, #121e24, #1a2e35);
    border: 1px solid rgba(201,185,154,0.2);
    border-radius: 20px;
    width: 100%; max-width: 500px;
    max-height: 92vh; overflow-y: auto;
    padding: 32px;
    position: relative;
    animation: slideUpModal 0.3s ease;
}
@keyframes slideUpModal {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.ch-modal::-webkit-scrollbar { width: 4px; }
.ch-modal::-webkit-scrollbar-thumb { background: rgba(201,185,154,0.2); border-radius: 2px; }
.ch-modal-close {
    position: absolute; top: 16px; right: 16px;
    background: rgba(255,255,255,0.05); border: none;
    border-radius: 8px; width: 30px; height: 30px;
    color: #4a6a60; font-size: 14px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.15s;
}
.ch-modal-close:hover { background: rgba(255,255,255,0.1); color: #c9b99a; }
.ch-modal-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.ch-modal-titulo { font-size: 20px; font-weight: 800; color: #f0ebe3; margin-bottom: 8px; }
.ch-modal-desc   { font-size: 14px; color: #5a7870; line-height: 1.6; margin-bottom: 18px; }
.ch-modal-producto {
    background: rgba(201,185,154,0.05);
    border: 1px solid rgba(201,185,154,0.12);
    border-radius: 10px; padding: 14px 16px; margin-bottom: 18px;
}
.ch-modal-prod-label { font-size: 10px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: #4a6a60; margin-bottom: 6px; }
.ch-modal-prod-texto { font-size: 13px; color: #8a9a90; line-height: 1.6; }
.ch-modal-sec-label { font-size: 10px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: #4a6a60; margin-bottom: 10px; }
.ch-modal-obs-pills { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 24px; }
.ch-modal-obs-pill {
    padding: 5px 12px;
    background: rgba(224,112,112,0.07);
    border: 1px solid rgba(224,112,112,0.2);
    border-radius: 20px; font-size: 12px; color: #e07070;
}
.ch-modal-cards { display: flex; gap: 8px; margin-bottom: 20px; }
.ch-modal-card {
    flex: 1;
    background: rgba(13,26,31,0.6);
    border: 1px solid rgba(201,185,154,0.1);
    border-radius: 10px; padding: 12px;
    cursor: pointer; transition: all 0.15s; text-align: center;
}
.ch-modal-card:hover { border-color: rgba(201,185,154,0.3); }
.ch-modal-card.seleccionado {
    background: rgba(201,185,154,0.1);
    border-color: rgba(201,185,154,0.5);
}
.ch-modal-card-emoji { font-size: 18px; margin-bottom: 6px; }
.ch-modal-card-nombre { font-size: 12px; font-weight: 600; color: #c9b99a; }
.ch-modal-card-desc { font-size: 10px; color: #4a6a60; margin-top: 3px; line-height: 1.4; }
.ch-modal-btn {
    width: 100%; padding: 14px;
    background: linear-gradient(135deg, #c9b99a, #8a7a5a);
    color: #0d1a1f; border: none; border-radius: 12px;
    font-size: 15px; font-weight: 700;
    cursor: pointer; font-family: 'Inter', sans-serif;
    transition: opacity 0.2s; margin-top: 4px;
}
.ch-modal-btn:hover { opacity: 0.85; }
.ch-modal-btn:disabled { background: #2a3a35; color: #4a6a60; cursor: not-allowed; opacity: 1; }
.ch-modal-avatar-note {
    text-align: center; font-size: 11px; color: #3a5550;
    margin-top: 10px;
}

/* ── CHALLENGE SUB-TABS ── */
.ch-subtabs { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.ch-subtab {
    padding: 7px 16px;
    background: rgba(13,26,31,0.5);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    font-size: 12px; font-weight: 600; color: #4a6a60;
    cursor: pointer; font-family: 'Inter', sans-serif;
    transition: all 0.2s;
}
.ch-subtab.active {
    background: linear-gradient(135deg, #1e3530, #253a36);
    color: #c9b99a;
    border-color: rgba(201,185,154,0.2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.ch-subtab:hover:not(.active) { color: #8a9a90; border-color: rgba(255,255,255,0.1); }

/* ── CHALLENGE CARD ACTIONS ── */
.ch-card-actions { display: flex; gap: 6px; margin-bottom: 8px; }
.ch-card-action-btn {
    padding: 5px 10px;
    background: rgba(201,185,154,0.05);
    border: 1px solid rgba(201,185,154,0.12);
    border-radius: 6px; font-size: 11px; color: #6a8a80;
    cursor: pointer; font-family: 'Inter', sans-serif; transition: all 0.15s;
}
.ch-card-action-btn:hover { background: rgba(201,185,154,0.12); color: #c9b99a; }
.ch-card-action-del:hover { background: rgba(224,112,112,0.1); color: #e07070; border-color: rgba(224,112,112,0.2); }

/* ── CHALLENGE FORM MODAL ── */
.chf-row { margin-bottom: 12px; }
.chf-row-2 { display: flex; gap: 10px; }
.chf-row-2 .chf-campo { flex: 1; }
.chf-campo { display: flex; flex-direction: column; gap: 5px; }
.chf-input {
    width: 100%; padding: 9px 13px;
    background: rgba(13,26,31,0.6);
    border: 1px solid rgba(201,185,154,0.15);
    border-radius: 8px;
    font-size: 13px; color: #f0ebe3;
    font-family: 'Inter', sans-serif;
    outline: none; transition: border-color 0.2s; box-sizing: border-box;
}
.chf-input:focus { border-color: rgba(201,185,154,0.4); }
.chf-input::placeholder { color: #3a5a50; }
.chf-textarea { resize: none; height: 64px; }
.chf-obj-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 8px; min-height: 8px; }
.chf-obj-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 10px;
    background: rgba(224,112,112,0.07);
    border: 1px solid rgba(224,112,112,0.2);
    border-radius: 20px; font-size: 11px; color: #e07070;
}
.chf-obj-chip button {
    background: none; border: none; color: #e07070;
    cursor: pointer; font-size: 12px; padding: 0; line-height: 1;
}
.chf-obj-row { display: flex; gap: 8px; }
.chf-obj-btn {
    padding: 9px 14px;
    background: rgba(201,185,154,0.07);
    border: 1px solid rgba(201,185,154,0.2);
    border-radius: 8px; font-size: 12px; font-weight: 600; color: #c9b99a;
    cursor: pointer; font-family: 'Inter', sans-serif;
    white-space: nowrap; transition: all 0.15s;
}
.chf-obj-btn:hover { background: rgba(201,185,154,0.14); }

/* Btn crear en tab Míos */
.ch-btn-crear {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 18px; margin-bottom: 16px;
    background: rgba(201,185,154,0.08);
    border: 1px solid rgba(201,185,154,0.2);
    border-radius: 10px; font-size: 13px; font-weight: 600; color: #c9b99a;
    cursor: pointer; font-family: 'Inter', sans-serif; transition: all 0.2s;
}
.ch-btn-crear:hover { background: rgba(201,185,154,0.15); }

/* ── Acciones del topbar (info + terminar agrupados a la derecha) ── */
.topbar-acciones {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

/* ── Botón info contexto en topbar ── */
.btn-ctx-info {
    background: rgba(201,185,154,0.08);
    border: 1px solid rgba(201,185,154,0.18);
    color: #c9b99a;
    border-radius: 50%;
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}
.btn-ctx-info:hover { background: rgba(201,185,154,0.16); }

/* ── Modal contexto de sesión ── */
.ctx-modal-bg {
    position: fixed; inset: 0; z-index: 8000;
    background: rgba(0,0,0,0.65);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    animation: ctxFadeIn 0.18s ease;
}
@keyframes ctxFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.ctx-modal {
    background: linear-gradient(145deg, #1a2e35, #1e3530);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 18px;
    width: 100%; max-width: 520px;
    max-height: 85vh;
    display: flex; flex-direction: column;
    animation: ctxSlideIn 0.22s ease;
    overflow: hidden;
}
@keyframes ctxSlideIn {
    from { opacity: 0; transform: translateY(12px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.ctx-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 22px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    flex-shrink: 0;
}
.ctx-modal-titulo {
    font-size: 15px; font-weight: 700; color: #e0dbd4;
}
.ctx-modal-cerrar {
    background: rgba(255,255,255,0.05); border: none;
    color: #5a7870; border-radius: 50%;
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; cursor: pointer; transition: all 0.15s;
}
.ctx-modal-cerrar:hover { background: rgba(255,255,255,0.1); color: #c9b99a; }
.ctx-modal-body {
    overflow-y: auto; padding: 18px 22px 22px;
    display: flex; flex-direction: column; gap: 14px;
}
.ctx-modal-body::-webkit-scrollbar { width: 4px; }
.ctx-modal-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 4px; }

/* Secciones del modal */
.ctxm-section {
    background: rgba(13,26,31,0.5);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 14px 16px;
}
.ctxm-label {
    font-size: 9px; font-weight: 700; letter-spacing: 2px;
    text-transform: uppercase; color: #4a6a60; margin-bottom: 8px;
}
.ctxm-value {
    font-size: 13px; color: #c0b8ac; line-height: 1.55;
}
.ctxm-badge-row {
    display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px;
}
.ctxm-badge {
    font-size: 11px; font-weight: 600; padding: 4px 11px;
    border-radius: 20px;
}
.ctxm-badge.facil   { background: rgba(46,125,50,0.12);  color: #6dbf70; border: 1px solid rgba(46,125,50,0.2); }
.ctxm-badge.medio   { background: rgba(201,185,154,0.1); color: #c9b99a; border: 1px solid rgba(201,185,154,0.2); }
.ctxm-badge.dificil { background: rgba(198,40,40,0.12);  color: #ff6b6b; border: 1px solid rgba(198,40,40,0.2); }
.ctxm-badge.etapa   { background: rgba(140,130,220,0.1); color: #a09de0; border: 1px solid rgba(140,130,220,0.2); }
.ctxm-chips {
    display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px;
}
.ctxm-chip {
    font-size: 11px; color: #e07070;
    background: rgba(224,112,112,0.07);
    border: 1px solid rgba(224,112,112,0.15);
    border-radius: 20px; padding: 4px 11px; line-height: 1.4;
}
.ctxm-chip.verde {
    color: #6ac0aa;
    background: rgba(106,192,170,0.07);
    border-color: rgba(106,192,170,0.15);
}

/* ── COUNTDOWN CHALLENGE ── */
.cd-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(6px);
    z-index: 700;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    animation: fadeInBg 0.2s ease;
}
.cd-content {
    background: linear-gradient(145deg, #121e24, #1a2e35);
    border: 1px solid rgba(201,185,154,0.2);
    border-radius: 20px;
    width: 100%; max-width: 360px;
    padding: 40px 24px;
    text-align: center;
    animation: slideUpModal 0.3s ease;
}
.cd-number {
    font-size: 90px;
    font-weight: 800;
    color: #c9b99a;
    line-height: 1;
    animation: cdPop 0.8s ease;
}
@keyframes cdPop {
    0%   { transform: scale(0.4); opacity: 0; }
    50%  { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}
.cd-objetivo { animation: fadeInBg 0.3s ease; }
.cd-objetivo-icon { font-size: 36px; margin-bottom: 14px; }
.cd-objetivo-texto {
    font-size: 17px;
    font-weight: 600;
    color: #f0ebe3;
    line-height: 1.4;
}

#lcPanelEnVivo {
    position: fixed; top: 70px; right: 16px; z-index: 50;
    background: rgba(13,26,31,0.92); border: 1px solid rgba(106,192,170,0.25);
    border-radius: 10px; padding: 10px 14px; font-size: 11px; line-height: 1.6;
    color: #8b949e; max-width: 220px; pointer-events: none;
}
#lcPanelEnVivo strong { color: #6ac0aa; }
#lcPanelEnVivo .lc-alerta { color: #e07070; font-weight: 600; }

/* Panel de la prueba de transcripción local (Whisper) */
#sttLocalPanel {
    /* Empieza después del menú lateral (240 px); en móvil el menú se oculta */
    position: fixed; bottom: 16px; left: 256px; z-index: 150;
    background: rgba(13,26,31,0.95); border: 1px solid rgba(201,185,154,0.3);
    border-radius: 10px; padding: 10px 14px; font-size: 11px; line-height: 1.55;
    color: #8b949e; width: 340px; max-height: 60vh; overflow-y: auto;
}
#sttLocalPanel strong { color: #c9b99a; }
#sttLocalPanel .stt-titulo { display: flex; justify-content: space-between; align-items: center; font-weight: 700; color: #f0ebe3; margin-bottom: 4px; }
#sttLocalPanel .stt-cerrar { background: none; border: none; color: #6a8f88; cursor: pointer; font-size: 14px; padding: 0 2px; }
#sttLocalPanel .stt-par { border-top: 1px solid rgba(255,255,255,0.06); margin-top: 6px; padding-top: 6px; }
#sttLocalPanel .stt-nav { color: #8bb8ff; }
#sttLocalPanel .stt-whisper { color: #6ac0aa; }
#sttLocalPanel .stt-alerta { color: #e07070; font-weight: 600; }
.stt-toggle-fila { align-items: center; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.stt-toggle-fila .lc-toggle { margin-bottom: 0; }
.stt-modelo {
    background: rgba(13,26,31,0.7); color: #c9b99a; font-size: 12px; font-family: inherit;
    border: 1px solid rgba(201,185,154,0.25); border-radius: 8px; padding: 4px 8px; cursor: pointer;
}
@media (max-width: 768px) {
    #sttLocalPanel { left: 16px; right: 16px; width: auto; }
}
