:root {
    --fondo: #0f1021;
    --texto: #e2e8f0;
    --suave: #94a3b8;
    --tarjeta: rgba(255, 255, 255, .04);
    --borde: rgba(255, 255, 255, .08);
    --acento: #818cf8;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--fondo);
    color: var(--texto);
    font-family: Inter, system-ui, sans-serif;
    overflow-x: hidden;
}

a { color: var(--acento); }

main {
    position: relative;
    flex: 1;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 16px 16px 32px;
}
/* Solo las páginas con cabecera centrada (portada y errores) llevan aire arriba: en un módulo sobra. */
main:has(> header) { padding-top: 64px; }

header { text-align: center; margin-bottom: 40px; }
h1 { margin: 0 0 8px; font-size: 2.25rem; font-weight: 700; }
header p { margin: 0 0 8px; color: var(--suave); }

.zona { margin-bottom: 32px; padding: 20px; border: 1px solid var(--borde); border-radius: 20px; }
.zona-modulos { background: rgba(129, 140, 248, .08); border-color: rgba(129, 140, 248, .35); }

.sesion { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: .875rem; color: var(--suave); }
.sesion form { margin: 0; }

.boton {
    display: inline-block;
    padding: 8px 14px;
    font: inherit;
    font-size: .875rem;
    color: var(--texto);
    text-decoration: none;
    cursor: pointer;
    background: var(--tarjeta);
    border: 1px solid var(--borde);
    border-radius: 10px;
}

.boton:hover { border-color: var(--acento); }
.boton-principal { background: #4f46e5; border-color: #6366f1; }

.aviso {
    margin: 0 0 24px;
    padding: 12px 16px;
    text-align: center;
    border: 1px solid rgba(129, 140, 248, .5);
    border-radius: 12px;
}

.herramientas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.tarjeta {
    position: relative;
    display: block;
    padding: 20px;
    color: inherit;
    text-decoration: none;
    background: var(--tarjeta);
    border: 1px solid var(--borde);
    border-radius: 16px;
    transition: background .25s, border-color .25s, transform .25s;
}

a.tarjeta:hover {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(129, 140, 248, .5);
    transform: translateY(-2px);
}

.tarjeta i { font-size: 1.5rem; color: var(--suave); }
.tarjeta h3 { margin: 12px 0 4px; font-size: 1rem; font-weight: 600; }
.tarjeta p { margin: 0; font-size: .875rem; color: var(--suave); }

.etiquetas { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

.etiqueta {
    padding: 2px 8px;
    font-size: .75rem;
    color: var(--suave);
    border: 1px solid var(--borde);
    border-radius: 999px;
}

.vacio { text-align: center; color: var(--suave); }

footer {
    position: relative;
    padding: 24px 16px;
    text-align: center;
    font-size: .8rem;
    color: var(--suave);
}

.texto { max-width: 680px; margin: 0 auto; line-height: 1.6; }
.texto h2 { margin: 28px 0 8px; font-size: 1.125rem; font-weight: 600; }
.texto .fecha { color: var(--suave); font-size: .875rem; }

.panel { max-width: 640px; margin: 0 auto; }
.panel h1 { margin-bottom: 16px; }
.panel .zona { margin-bottom: 20px; padding: 16px; }
.panel .zona h2 { margin: 0 0 12px; font-size: 1rem; font-weight: 600; }
.migas { margin: 0 0 12px; }
.migas a { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; min-height: 40px; padding: 6px 14px 6px 8px; font-size: .875rem; font-weight: 500;
           color: var(--texto); text-decoration: none; background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 999px; }
.migas a:hover { border-color: var(--acento); }
.migas a:focus-visible { outline: 2px solid var(--acento); outline-offset: 2px; }
.migas a:active { transform: scale(.97); }
.migas span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.migas .bi { flex: none; color: var(--suave); }
@media (pointer: coarse) { .migas a { min-height: 44px; } }
.ayuda { margin: 8px 0; font-size: .875rem; color: var(--suave); overflow-wrap: anywhere; }

.filas { display: flex; flex-direction: column; gap: 8px; }

.fila {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 10px 12px;
    color: inherit;
    text-decoration: none;
    background: var(--tarjeta);
    border: 1px solid var(--borde);
    border-radius: 12px;
}

.fila > .bi { color: var(--suave); }
.fila form { margin: 0; }
.fila-texto { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.fila-texto strong { display: block; font-size: .9375rem; font-weight: 600; }
.fila-texto small, .fila > small { font-size: .8125rem; color: var(--suave); }

.fila .boton, .alta .boton { min-height: 44px; white-space: nowrap; }

.alta { display: flex; flex-wrap: wrap; gap: 8px; }

.formulario { display: flex; flex-direction: column; gap: 12px; }
.formulario label { display: flex; flex-direction: column; gap: 4px; font-size: .875rem; color: var(--suave); }

.alta input, .formulario input, .formulario textarea {
    width: 100%;
    min-height: 44px;
    padding: 8px 12px;
    font: inherit;
    font-size: 16px; /* por debajo de 16px, iOS hace zoom al escribir */
    color: var(--texto);
    background: var(--tarjeta);
    border: 1px solid var(--borde);
    border-radius: 10px;
}

.alta input { flex: 1 1 200px; width: auto; min-width: 0; }
.formulario .boton, .acciones .boton { min-height: 44px; }
.acciones { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.acciones form { margin: 0; }
.boton-peligro { color: #fca5a5; border-color: rgba(252, 165, 165, .4); }

code { font-size: .85em; overflow-wrap: anywhere; }

.ejemplo {
    margin: 8px 0;
    padding: 10px 12px;
    overflow-x: auto;
    font-size: .8125rem;
    background: rgba(0, 0, 0, .25);
    border-radius: 10px;
}

.llamada {
    padding: 10px 12px;
    background: var(--tarjeta);
    border: 1px solid var(--borde);
    border-radius: 12px;
}

.llamada p { margin: 8px 0 0; font-size: .9375rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.llamada .llamada-error { font-size: .8125rem; color: #fca5a5; }
.llamada-cabecera { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.llamada-cabecera small { font-size: .75rem; color: var(--suave); }

.estado { padding: 2px 8px; font-size: .75rem; border: 1px solid var(--borde); border-radius: 999px; }
.estado-enviada { color: #86efac; border-color: rgba(134, 239, 172, .4); }
.estado-error { color: #fca5a5; border-color: rgba(252, 165, 165, .4); }
.estado-recibida { color: #93c5fd; border-color: rgba(147, 197, 253, .4); }
.estado-pausado { color: var(--suave); }

/* Cuenta es de escritorio: sus tablas no caben en el ancho general. */
main:has(.panel-ancho) { max-width: 1360px; }
.panel-ancho { margin: 0 auto; }
.panel-ancho .zona { margin-bottom: 20px; padding: 16px; }
.panel-ancho .zona h2 { margin: 0 0 12px; font-size: 1rem; font-weight: 600; }

.pestanas { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 1px solid var(--borde); }
.pestanas a { padding: 10px 14px; color: var(--suave); text-decoration: none; border-bottom: 2px solid transparent; }
.pestanas a:hover { color: var(--texto); }
.pestanas a.activa { color: var(--texto); border-bottom-color: var(--acento); }

.cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 20px; }
.cifras div { padding: 14px 16px; background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 12px; }
.cifras small { display: block; margin-bottom: 4px; font-size: .8125rem; color: var(--suave); }
.cifras strong { font-size: 1.375rem; font-weight: 600; }
.positivo { color: #86efac; }
.negativo { color: #fca5a5; }

.filtros, .en-linea { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filtros { margin-bottom: 16px; }
.empuja { margin-left: auto; }
.derecha { justify-content: flex-end; }

.panel-ancho input:not([type=file]):not([type=color]), .panel-ancho select {
    min-height: 38px;
    padding: 6px 10px;
    font: inherit;
    font-size: .875rem;
    color: var(--texto);
    background: var(--tarjeta);
    border: 1px solid var(--borde);
    border-radius: 8px;
}

.panel-ancho select option, .panel-ancho select optgroup { color: #0f1021; }
.panel-ancho input.importe { width: 110px; text-align: right; }
.panel-ancho input[type=color] { width: 42px; height: 38px; padding: 2px; background: none; border: 1px solid var(--borde); border-radius: 8px; }
.panel-ancho .boton { padding: 6px 12px; }
.formulario-corto { max-width: 480px; }

.tabla { width: 100%; font-size: .875rem; border-collapse: collapse; }
.tabla th { padding: 8px; font-weight: 500; color: var(--suave); text-align: left; border-bottom: 1px solid var(--borde); }
.tabla td { padding: 8px; vertical-align: middle; border-bottom: 1px solid var(--borde); }
.tabla td strong { font-weight: 500; }
.tabla td small { display: block; color: var(--suave); }
.tabla .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tabla .fecha { white-space: nowrap; color: var(--suave); }
.tabla .apagada { opacity: .5; }
.selector-categoria { max-width: 190px; }
.acciones-fila { white-space: nowrap; text-align: right; }
.acciones-fila form { display: inline; margin: 0; }
.paginacion { display: flex; gap: 8px; justify-content: center; }

.fila-categoria { cursor: pointer; }
.fila-categoria td { font-weight: 600; }
.fila-categoria .bi-chevron-down { display: inline-block; margin-right: 6px; font-size: .7rem; color: var(--suave); transition: transform .15s; }
.fila-categoria.plegada .bi-chevron-down { transform: rotate(-90deg); }
.fila-categoria:hover td { background: rgba(255, 255, 255, .03); }
.fila-total td { font-weight: 700; border-top: 2px solid var(--borde); border-bottom: 0; }
.tabla-densa td, .tabla-densa th { padding: 7px 6px; }
.tabla-mensual td, .tabla-mensual th { font-size: .8125rem; }
.tabla-mensual td small { display: block; font-size: .6875rem; }

.pct { color: var(--suave); }
.pct-sube { color: #fda4af; }
.pct-baja { color: #6ee7b7; }
.pct-chip { padding: 2px 6px; border-radius: 6px; }
.pct-chip.pct-sube { background: rgba(244, 63, 94, .15); }
.pct-chip.pct-baja { background: rgba(16, 185, 129, .15); }

.cifras small + strong + small { margin: 4px 0 0; }
.casilla { display: inline-flex; align-items: center; gap: 6px; font-size: .875rem; color: var(--suave); }

.barra { position: relative; height: 12px; background: var(--tarjeta); border-radius: 6px; }
.barra span { display: block; height: 100%; border-radius: 6px; }
.barra-bien { background: #34d399; }
.barra-mal { background: #fb7185; }
.barra i { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--texto); }

.cabecera-seccion { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.cabecera-seccion h2 { margin: 0 !important; }
.conmutador { display: flex; gap: 4px; }
.conmutador .boton.activo { background: #4f46e5; border-color: #6366f1; }
.fila-sub td { color: var(--suave); }
.fila-sub td:first-child { padding-left: 28px; }
.punto { display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 50%; }

.dos-columnas { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grafico { position: relative; height: 280px; }

.cabecera-categoria { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.subcategorias { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 4px 10px; font-size: .8125rem; border: 1px solid var(--borde); border-radius: 999px; }
.chip button { padding: 0; font-size: 1rem; color: var(--suave); cursor: pointer; background: none; border: 0; }

.estado-general { margin: 0 0 16px; padding: 12px 16px; font-weight: 600; border-radius: 12px; }
.estado-general.bien { color: #6ee7b7; background: rgba(16, 185, 129, .12); }
.estado-general.mal { color: #fda4af; background: rgba(244, 63, 94, .15); }
.aviso-entrar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 0 0 24px;
    padding: 16px 20px;
    color: #fde68a;
    background: rgba(245, 158, 11, .16);
    border: 2px solid #f59e0b;
    border-radius: 14px;
    animation: llamar .5s ease-out 2;
}
.aviso-entrar > .bi { font-size: 1.5rem; color: #fbbf24; }
.aviso-entrar strong { flex: 1 1 220px; font-size: 1.0625rem; font-weight: 600; }
.aviso-entrar .boton { color: #fff; text-decoration: none; }
@keyframes llamar { 50% { transform: scale(1.015); box-shadow: 0 0 0 6px rgba(245, 158, 11, .25); } }
@media (prefers-reduced-motion: reduce) { .aviso-entrar { animation: none; } }

.semaforo { flex: none; width: 12px; height: 12px; border-radius: 50%; }
.semaforo.bien { background: #34d399; }
.semaforo.mal { background: #fb7185; }
.semaforo.aviso { background: #fbbf24; }
.periodos { flex-wrap: wrap; margin-bottom: 12px; }
.periodos .boton { text-decoration: none; }
.periodos .boton.activo { background: #4f46e5; border-color: #6366f1; }
.panel .grafico { height: 240px; }
.enlace-salud { margin-bottom: 20px; }

/* Recuerden. */
.rc { max-width: 960px; margin: 0 auto; }
.rc h1 { margin-bottom: 16px; font-size: 1.75rem; overflow-wrap: anywhere; }
.rc .zona { margin: 16px 0; padding: 16px; }
.rc .zona h2 { margin: 0 0 12px; font-size: 1rem; }
.rc .boton { min-height: 44px; text-decoration: none; }
.rc input:not([type=checkbox]):not([type=file]), .rc select, .rc textarea,
.vn-filtros input, .vn-filtros select {
    width: 100%; min-width: 0; min-height: 44px; padding: 8px 12px; font: inherit; font-size: 16px; color: var(--texto);
    background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 10px;
}
.rc select option, .vn-filtros option { color: #0f1021; }
.rc .alta { margin-top: 12px; }
.rc-cabecera { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.rc-cabecera h1 { margin: 0; }
.rc-filtros { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-bottom: 16px; }
.rc-cuadricula { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; }
.rc-celda { position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; aspect-ratio: 1;
            font-size: 2rem; color: var(--suave); text-decoration: none; background: var(--tarjeta); border-radius: 8px; }
.rc-celda img { width: 100%; height: 100%; object-fit: cover; }
.rc-celda span { position: absolute; right: 4px; bottom: 4px; padding: 0 5px; font-size: .6875rem; color: #fff;
                 background: rgba(0, 0, 0, .6); border-radius: 4px; }
.rc-progreso { overflow: hidden; height: 8px; margin-top: 10px; background: var(--tarjeta); border-radius: 4px; }
.rc-progreso div { width: 0; height: 100%; background: var(--acento); transition: width .2s; }
.rc .alerta { color: #fcd34d; }
.rc .acciones { flex-wrap: wrap; }
.rc-subir.rc-soltar { border-color: var(--acento); outline: 2px dashed var(--acento); }
.rc-albumes { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.rc-album { display: flex; flex-direction: column; gap: 4px; padding: 10px; color: inherit; text-decoration: none; background: var(--tarjeta);
            border: 1px solid var(--borde); border-radius: 12px; }
.rc-album small { color: var(--suave); }
.rc-portada { position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; aspect-ratio: 4 / 3;
              margin-bottom: 4px; font-size: 2rem; color: var(--suave); background: rgba(0, 0, 0, .2); border-radius: 8px; }
.rc-portada img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rc-ano-titulo { grid-column: 1 / -1; margin: 10px 0 2px; font-size: 1rem; font-weight: 600; color: var(--suave); }
.rc-celda > i { position: absolute; }
.rc-celda img { position: relative; }
.rc-play { position: absolute; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; font-size: 1.25rem;
           color: #fff; background: rgba(0, 0, 0, .55); border-radius: 50%; }
.rc-seleccion .rc-celda { cursor: pointer; }
.rc-celda.marcada { outline: 3px solid var(--acento); outline-offset: -3px; }
.rc-celda.marcada::after { content: "✓"; position: absolute; top: 4px; left: 4px; display: flex; align-items: center; justify-content: center;
                           width: 22px; height: 22px; font-size: .8125rem; color: #fff; background: #4f46e5; border-radius: 50%; }
.rc-lote { position: sticky; bottom: 8px; z-index: 5; display: flex; flex-direction: column; gap: 8px; margin-top: 12px; padding: 12px;
           background: #181a3a; border: 1px solid var(--acento); border-radius: 12px; }
.rc-lote[hidden] { display: none; }
.rc-cabecera .boton, .rc-ficha .boton { display: inline-flex; align-items: center; gap: 6px; }
.rc-chips-lista { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.rc-chips-lista:empty { display: none; }
.rc-chip { min-height: 32px; padding: 2px 10px; font: inherit; font-size: .875rem; color: var(--texto); cursor: pointer;
           background: rgba(129, 140, 248, .2); border: 1px solid var(--acento); border-radius: 999px; }
.rc-visor { position: relative; margin-bottom: 4px; }
.rc-nav { position: absolute; top: 50%; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; font-size: 1.25rem;
          color: #fff; text-decoration: none; background: rgba(0, 0, 0, .5); border-radius: 50%; transform: translateY(-50%); }
.rc-nav-a { left: 6px; }
.rc-nav-s { right: 6px; }
.rc-posicion { margin: 0 0 12px; font-size: .8125rem; color: var(--suave); text-align: center; }
.rc-ficha h1 { margin-bottom: 4px; font-size: 1.25rem; }
.rc-ficha .ayuda { margin: 0 0 8px; }
.rc-ficha .etiqueta { text-decoration: none; }
.rc-notas { white-space: pre-wrap; overflow-wrap: anywhere; }
.rc-editar summary { cursor: pointer; font-weight: 600; }
.rc-editar .formulario { margin-top: 12px; }
.rc-papelera-mini { position: relative; display: flex; flex: none; align-items: center; justify-content: center; overflow: hidden; width: 48px; height: 48px;
                    color: var(--suave); background: rgba(0, 0, 0, .2); border-radius: 6px; }
.rc-papelera-mini img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rc-persona input { flex: 1 1 90px; min-width: 0; width: auto !important; }
.rc-persona small { color: var(--suave); }
.rc-visor { margin-bottom: 16px; text-align: center; }
.rc-visor img, .rc-visor video { max-width: 100%; max-height: 75vh; border-radius: 10px; }
.rc-ano { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; }

/* El Archivo de la Curiosidad. */
.ar { max-width: 760px; margin: 0 auto; }
.ar h1 { margin-bottom: 8px; font-size: 1.75rem; overflow-wrap: anywhere; }
.ar-preguntar, .ar-entrar, .ar-tema { margin: 0 0 12px; background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 12px; }
.ar-preguntar { padding: 12px; }
.ar-preguntar textarea { width: 100%; padding: 8px 10px; font: inherit; font-size: 16px; color: var(--texto); resize: vertical;
                         background: rgba(0, 0, 0, .2); border: 1px solid var(--borde); border-radius: 8px; }
.ar-pie { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.ar-pie small { color: var(--suave); }
.ar .boton { min-height: 44px; text-decoration: none; }
.ar-entrar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; font-size: .9375rem; }
.ar-buscar { display: flex; gap: 8px; margin: 16px 0; }
.ar-buscar input { flex: 1; min-width: 0; min-height: 44px; padding: 8px 12px; font: inherit; font-size: 16px; color: var(--texto);
                   background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 10px; }
.ar-tema { padding: 0 14px; }
.ar-tema summary { padding: 14px 0; cursor: pointer; }
.ar-tema summary strong { font-weight: 600; overflow-wrap: anywhere; }
.ar-tema summary small { display: block; margin-top: 2px; color: var(--suave); }
.ar-texto { line-height: 1.65; overflow-wrap: anywhere; }
.ar-texto p { margin: 0 0 12px; }
.ar-fuentes { margin: 8px 0; padding-left: 20px; font-size: .875rem; overflow-wrap: anywhere; }
.ar-sugerencias { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.ar-sugerencias form { margin: 0; }
.ar-sugerencia { min-height: 32px; font: inherit; font-size: .8125rem; color: var(--acento); text-align: left; cursor: pointer;
                 background: none; border-radius: 12px; }
.ar-enlace { margin: 8px 0 12px; font-size: .875rem; }
.ar-hijos { margin: 0 0 12px; padding-left: 10px; border-left: 2px solid var(--borde); }
.ar .zona { margin: 16px 0; padding: 16px; }
.ar .zona h2 { margin: 0 0 12px; font-size: 1rem; }

/* Filtro de Municipios. */
main:has(.fm) { max-width: 1120px; }
.fm h1 { margin-bottom: 16px; font-size: 1.75rem; }
.fm-buscador { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.fm-campo { position: relative; flex: 1 1 240px; min-width: 0; }
.fm input { min-height: 44px; padding: 8px 12px; font: inherit; font-size: 16px; color: var(--texto); background: var(--tarjeta);
            border: 1px solid var(--borde); border-radius: 10px; }
.fm-campo input { width: 100%; }
.fm-radio { display: flex; align-items: center; gap: 6px; font-size: .875rem; color: var(--suave); }
.fm-radio input { width: 84px; }
.fm-sugerencias { position: absolute; z-index: 1000; top: calc(100% + 4px); right: 0; left: 0; overflow-y: auto; max-height: 320px;
                  background: #14152e; border: 1px solid var(--borde); border-radius: 10px; }
.fm-sugerencias button { display: block; width: 100%; min-height: 44px; padding: 8px 12px; font: inherit; color: var(--texto);
                         text-align: left; cursor: pointer; background: none; border: 0; border-bottom: 1px solid var(--borde); }
.fm-sugerencias button:hover, .fm-sugerencias button.activa { background: rgba(129, 140, 248, .2); }
.fm-sugerencias strong { display: block; font-weight: 600; }
.fm-sugerencias small { color: var(--suave); }
.fm-resultado { display: grid; grid-template-columns: 3fr 2fr; gap: 16px; }
.fm-mapa { height: 480px; border-radius: 12px; }
.fm-lista { overflow-y: auto; max-height: 480px; }
.fm-lista .fila { width: 100%; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.fm-lista .importe { font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
    .fm-resultado { grid-template-columns: 1fr; }
    .fm-mapa { height: 320px; }
    .fm-lista { max-height: none; }
}

/* BuenaLista: pensada para el móvil. */
.bl { max-width: 680px; margin: 0 auto; }
.bl h1 { margin-bottom: 16px; font-size: 1.75rem; }
.bl .zona { margin-bottom: 16px; padding: 16px; }
.bl .zona h2 { margin: 0 0 12px; font-size: 1rem; font-weight: 600; }
.bl .pestanas { overflow-x: auto; }
.bl .pestanas a { white-space: nowrap; }
.bl .importe { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bl .alerta { color: #fcd34d; }
.bl input:not([type=checkbox]), .bl select {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 8px 12px;
    font: inherit;
    font-size: 16px; /* por debajo de 16px, iOS hace zoom al escribir */
    color: var(--texto);
    background: var(--tarjeta);
    border: 1px solid var(--borde);
    border-radius: 10px;
}
.bl select option { color: #0f1021; }
.bl .boton { min-height: 44px; }
.bl .filtros { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.bl .tabla { table-layout: fixed; }
.bl .tabla th, .bl .tabla td { padding: 8px 4px; overflow-wrap: anywhere; }
.bl .tabla th:first-child { width: 46%; }
.bl .tabla .num { white-space: normal; }
.bl .fila input[type=checkbox] { width: 22px; height: 22px; flex: none; }
.bl .fila[hidden] { display: none; }
.bl .grupo-alias[hidden] { display: none; }
.bl .nombres-alias summary { padding: 6px 12px; font-size: .8125rem; color: var(--suave); cursor: pointer; }
.bl .nombres-alias .fila { margin: 6px 0 0 24px; min-height: 48px; }
.bl .alta { margin-top: 12px; }
.bl .fijo { position: sticky; top: 8px; z-index: 2; margin-top: 0; background: #181a3a; }
.bl .buscador { margin-bottom: 12px; }
.bl .dos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.captura form { display: flex; flex-direction: column; gap: 10px; }
.captura form + form { margin-top: 10px; }
.captura .boton { width: 100%; }
.boton-grande { min-height: 64px !important; font-size: 1.125rem; font-weight: 600; }
.boton:disabled { opacity: .5; cursor: not-allowed; }

.dialogo { width: min(92vw, 480px); padding: 16px; color: var(--texto); background: #14152e; border: 1px solid var(--borde); border-radius: 16px; }
.dialogo::backdrop { background: rgba(0, 0, 0, .7); }
.dialogo h2 { margin: 0 0 12px; font-size: 1.125rem; }
.dialogo img { display: block; width: 100%; max-height: 60vh; object-fit: contain; border-radius: 8px; }

.foto summary { cursor: pointer; font-weight: 600; }
.foto-marco { margin-top: 12px; overflow: auto; max-height: 70vh; text-align: center; border-radius: 8px; }
.foto-marco img { max-width: 100%; transition: transform .2s; }
.foto-marco img.ampliada { max-width: none; width: 220%; }

.articulo { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--borde); }
.articulo .ayuda { margin: 0; }
.articulo-linea { display: flex; gap: 6px; }
.quitar { flex: none; width: 44px; padding: 0; font-size: 1.25rem; }
#anadir { margin-top: 12px; }

.grafico-alto { position: relative; height: 380px; }

.orbe {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    opacity: .3;
    pointer-events: none;
}

.orbe-1 {
    width: 600px;
    height: 600px;
    top: -200px;
    left: -150px;
    background: radial-gradient(circle, #6366f1, #4f46e5);
}

.orbe-2 {
    width: 400px;
    height: 400px;
    right: -100px;
    bottom: -100px;
    background: radial-gradient(circle, #8b5cf6, #7c3aed);
}

/* Vinilen */
.vn .acciones { flex-wrap: wrap; }
.vn .alerta { color: #fcd34d; }
.vn-cabecera { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.vn-cabecera h1 { margin: 0; }
.vn-cabecera .ayuda { margin: 2px 0 0; }
.vn-cabecera .boton { display: inline-flex; align-items: center; gap: 6px; }
.vn-filtros { display: flex; gap: 8px; margin-bottom: 16px; }
.vn-filtros input { flex: 1; width: auto !important; min-width: 0; }
.vn-filtros select { flex: none; width: auto !important; }
.vn-rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.vn-grupo { grid-column: 1 / -1; margin: 10px 0 0; font-size: 1rem; font-weight: 600; color: var(--suave); }
.vn-grupo[hidden], .vn-disco[hidden] { display: none; }
.vn-disco { display: flex; flex-direction: column; min-width: 0; background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 14px; }
.vn-caratula { position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; aspect-ratio: 1;
               font-size: 3rem; color: var(--suave); background: rgba(0, 0, 0, .25); border-radius: 13px 13px 0 0; }
.vn-caratula img { width: 100%; height: 100%; object-fit: cover; }
.vn-estado { position: absolute; top: 8px; right: 8px; padding: 2px 10px; font-size: .75rem; color: #fde68a; background: rgba(0, 0, 0, .7); border-radius: 999px; }
.vn-estado.vn-error { color: #fca5a5; }
.vn-miniaturas { display: flex; gap: 6px; padding: 8px 10px 0; overflow-x: auto; }
.vn-miniaturas button { flex: none; width: 48px; height: 48px; padding: 0; overflow: hidden; cursor: pointer; background: none; border: 1px solid var(--borde); border-radius: 8px; }
.vn-miniaturas img { display: block; width: 100%; height: 100%; object-fit: cover; }
.vn-datos { display: flex; flex-direction: column; gap: 4px; padding: 12px; }
.vn-datos p { margin: 0; }
.vn-titulo { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.vn-titulo h2 { margin: 0; font-size: 1rem; font-weight: 600; overflow-wrap: anywhere; }
.vn-artista { font-size: .875rem; color: var(--suave); }
.vn-meta { font-size: .75rem; color: var(--suave); }
.vn-aviso { font-size: .8125rem; color: #fca5a5; }
.vn-enlaces { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px !important; }
.vn-enlaces a { padding: 3px 10px; font-size: .8125rem; color: var(--texto); text-decoration: none; border: 1px solid var(--borde); border-radius: 999px; }
.vn-menu { position: relative; flex: none; }
.vn-menu summary { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; cursor: pointer; list-style: none; color: var(--suave); }
.vn-menu summary::-webkit-details-marker { display: none; }
.vn-menu > div { position: absolute; top: 34px; right: 0; z-index: 20; display: flex; flex-direction: column; width: 190px; overflow: hidden;
                 background: #181a3a; border: 1px solid var(--borde); border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); }
.vn-menu button, .vn-menu a { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 12px; font: inherit; font-size: .875rem; color: var(--texto);
                              text-align: left; text-decoration: none; cursor: pointer; background: none; border: 0; }
.vn-menu .vn-peligro { color: #fca5a5; }
.vn-vacio { text-align: center; }
.vn-vacio > i { font-size: 2.5rem; color: var(--suave); }
.vn-dialogo { width: min(460px, calc(100vw - 32px)); max-height: 85vh; padding: 20px; color: var(--texto); background: #181a3a; border: 1px solid var(--borde); border-radius: 14px; }
.vn-dialogo::backdrop { background: rgba(0, 0, 0, .6); }
.vn-dialogo h2 { margin-top: 0; }
.vn-previas { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.vn-previas:empty { display: none; }
.vn-previas > div { position: relative; width: 84px; height: 84px; font-size: .625rem; overflow-wrap: anywhere; color: var(--suave); }
.vn-previas img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.vn-previas button { position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; padding: 0; color: #fff; cursor: pointer; background: #4f46e5; border: 0; border-radius: 50%; }
.vn-soltar { outline: 2px dashed var(--acento); }
.vn-recorte { height: 55vh; margin: 10px 0; overflow: hidden; background: #000; border-radius: 10px; }
.vn-recorte img { display: block; max-width: 100%; max-height: 100%; }
.vn-giro { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0; }
.vn-giro input { flex: 1 1 120px; min-width: 0; }
.vn-giro span { width: 42px; font-size: .8125rem; color: var(--suave); text-align: right; }

/* Accesos */
.ac-filtros { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-bottom: 16px; }
.ac-filtros input:not([type=checkbox]), .ac-filtros select { width: 100%; min-width: 0; min-height: 44px; padding: 8px 12px; font: inherit; font-size: 16px;
    color: var(--texto); background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 10px; }
.ac-filtros option { color: #0f1021; }
.ac-filtros .casilla { display: flex; align-items: center; gap: 8px; font-size: .875rem; color: var(--suave); }
.ac-top { margin: 12px 0; }
.ac-top summary { cursor: pointer; font-weight: 600; }
.ac-tabla { margin-top: 8px; overflow-x: auto; }
.ac-tabla td strong { overflow-wrap: anywhere; }
.ac-lista { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.ac-fila { min-width: 0; background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 10px; }
.ac-fila summary { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; cursor: pointer; list-style: none; }
.ac-fila summary::-webkit-details-marker { display: none; }
.ac-estado { flex: none; padding: 1px 7px; font-size: .75rem; font-variant-numeric: tabular-nums; border-radius: 6px; }
.ac-2 { color: #86efac; background: rgba(34, 197, 94, .15); }
.ac-3 { color: #93c5fd; background: rgba(59, 130, 246, .15); }
.ac-4 { color: #fcd34d; background: rgba(234, 179, 8, .15); }
.ac-5 { color: #fca5a5; background: rgba(239, 68, 68, .2); }
.ac-peticion { display: flex; flex-direction: column; min-width: 0; }
.ac-peticion strong { font-size: .875rem; font-weight: 500; overflow-wrap: anywhere; }
.ac-peticion small { font-size: .75rem; color: var(--suave); }
.ac-fila dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 0; padding: 0 10px 10px; font-size: .8125rem; }
.ac-fila dt { color: var(--suave); }
.ac-fila dd { margin: 0; overflow-wrap: anywhere; }
.ac-cifras { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.ac-cifras > div { padding: 8px 12px; }
.ac-cifras strong { font-size: 1.125rem; }

/* Administren: lista de apps */
.ad-marcas { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0; }
.ad-marcas span { padding: 1px 8px; font-size: .75rem; color: var(--suave); border: 1px solid var(--borde); border-radius: 999px; }
.ad-marcas { align-items: center; }
.ad-marcas > .bi { font-size: 1rem; color: var(--suave); }
.ad-marcas > .ad-invitacion { color: #c7d2fe; }
.ad-filtros { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.ad-filtros button { min-height: 36px; padding: 4px 12px; font: inherit; font-size: .8125rem; color: var(--suave); cursor: pointer;
                     background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 999px; }
.ad-filtros button[aria-pressed=true] { color: var(--texto); background: rgba(129, 140, 248, .2); border-color: var(--acento); }
.filas .fila[hidden] { display: none; }
.ad-marcas .ad-inactiva { color: #fcd34d; }

/* Emergencia */
.em-cuenta { margin: 4px 0 12px; font-size: 2.5rem; font-weight: 700; font-variant-numeric: tabular-nums; color: #fca5a5; }

/* Cuenta: movimientos por categorizar */
.celda-categoria { white-space: nowrap; }
.celda-categoria select { white-space: normal; }
.sin-categoria { margin-right: 6px; font-size: 1rem; color: #fbbf24; }

/* Administren: usuarios */
.us-buscador { width: 100%; min-height: 44px; margin-bottom: 8px; padding: 8px 12px; font: inherit; font-size: 16px; color: var(--texto);
               background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 10px; }
.filas .us-fila[hidden] { display: none; }

/* Correo */
.co-vista[hidden] { display: none; }
.co-vista-cabecera { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.co-vista iframe { display: block; width: 100%; height: 480px; background: #fff; border: 1px solid var(--borde); border-radius: 10px; }
.co-destinatario { position: relative; }
.co-sugerencias { position: absolute; top: 100%; left: 0; right: 0; z-index: 10; max-height: 320px; margin: 4px 0 0; padding: 4px; overflow-y: auto; list-style: none;
                  background: #181a3a; border: 1px solid var(--borde); border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); }
.co-sugerencias[hidden] { display: none; }
.co-sugerencias li { display: flex; flex-direction: column; min-height: 44px; justify-content: center; padding: 6px 10px; cursor: pointer; border-radius: 6px; overflow-wrap: anywhere; }
.co-sugerencias li:hover, .co-sugerencias li[aria-selected=true] { background: rgba(129, 140, 248, .2); }
.co-sugerencias strong { font-size: .9375rem; font-weight: 500; }
.co-sugerencias small { font-size: .75rem; color: var(--suave); }

/* Recuerden: lo usa sobre todo gente mayor. Claro, grande y con mucho contraste. */
.tema-recuerden { --fondo: #faf7f2; --texto: #1c1917; --suave: #57534e; --tarjeta: #ffffff; --borde: #d6d3d1; --acento: #1d4ed8;
                  color: var(--texto); background: var(--fondo); }
.tema-recuerden .orbe { display: none; }
.tema-recuerden footer a { color: var(--acento); }
.tema-recuerden .rc { max-width: 760px; font-size: 1.1875rem; line-height: 1.5; }
.rc h1 { font-size: 2rem; line-height: 1.2; }
.rc a { color: var(--acento); }
.rc .ayuda, .rc small { font-size: 1.0625rem; color: var(--suave); }
.rc .aviso { font-size: 1.125rem; background: #eff6ff; border: 2px solid var(--acento); }
.rc .alerta { color: #b91c1c; }
.rc .zona { background: var(--tarjeta); border: 1px solid var(--borde); box-shadow: none; }
.rc .zona h2 { font-size: 1.25rem; }
.rc label { font-size: 1.125rem; color: var(--texto); }
.rc .boton { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 12px 20px; font-size: 1.125rem; font-weight: 500;
             color: var(--texto); text-align: center; background: var(--tarjeta); border: 2px solid #a8a29e; border-radius: 12px; }
.rc .boton-principal { color: #fff; background: #1d4ed8; border-color: #1d4ed8; }
.rc .boton-peligro { color: #b91c1c; border-color: #b91c1c; }
.rc .boton:focus-visible, .rc summary:focus-visible, .rc input:focus-visible, .rc select:focus-visible, .rc textarea:focus-visible, .rc-chip:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 2px; }
.rc .boton[disabled] { opacity: .6; }
.rc-grande { width: 100%; min-height: 68px !important; font-size: 1.3125rem !important; font-weight: 600 !important; }
.rc input:not([type=checkbox]):not([type=file]), .rc select, .rc textarea { min-height: 56px; font-size: 1.125rem; color: var(--texto); background: #fff; border: 2px solid #a8a29e; }
.rc select option { color: var(--texto); }
.rc ::placeholder { color: #78716c; }
.rc input[type=checkbox] { width: 28px; height: 28px; flex: none; }
.rc .casilla { display: flex; flex-direction: row; align-items: center; gap: 12px; min-height: 44px; }
.rc .migas a { min-height: 52px; font-size: 1.0625rem; border: 2px solid #a8a29e; }
.rc .migas .bi { color: var(--texto); }
.rc summary { min-height: 52px; padding: 10px 0; cursor: pointer; font-size: 1.125rem; font-weight: 600; color: var(--acento); }
.rc-subir { margin-bottom: 16px; }

.rc-progreso { height: 14px; margin-top: 14px; background: #e7e5e4; }
.rc-progreso div { background: #1d4ed8; }
.rc-buscar { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.rc-buscar-fila { display: flex; gap: 8px; }
.rc-buscar-fila input { flex: 1; width: auto !important; }
.rc-filtros { margin: 8px 0 0; }
.rc-cuadricula { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.rc-celda { background: #e7e5e4; border-radius: 10px; color: var(--suave); }
.rc-celda span { font-size: .9375rem; }
.rc-ano-titulo { margin: 16px 0 4px; font-size: 1.375rem; color: var(--texto); }
.rc-vacio { grid-column: 1 / -1; padding: 24px 0; text-align: center; }
.rc-album { background: #fff; border: 1px solid var(--borde); }
.rc-album strong { font-size: 1.3125rem; }
.rc-portada { background: #e7e5e4; }
.rc-albumes { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.rc-mas { margin-top: 20px; padding-top: 8px; border-top: 1px solid var(--borde); }
.rc-mas-botones { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.rc-mas-botones .boton, .rc-mas-botones form { width: 100%; }
.rc-lote { background: #fff; border: 2px solid #1d4ed8; box-shadow: 0 -8px 24px rgba(0, 0, 0, .15); max-height: 70vh; overflow-y: auto; }
.rc-etiqueta { margin: 0; font-size: 1.125rem; }
.rc-chips-lista { gap: 8px; margin-bottom: 8px; }
.rc-chip { min-height: 48px; padding: 6px 16px; font-size: 1.0625rem; color: var(--texto); background: #fff; border: 2px solid #a8a29e; }
.rc-chip[aria-pressed=true] { color: #fff; background: #1d4ed8; border-color: #1d4ed8; }
.rc-chips-nueva { display: flex; gap: 8px; }
.rc-chips-nueva input { flex: 1; width: auto !important; min-width: 0; }
.rc-visor { background: #1c1917; border-radius: 12px; overflow: hidden; }
.rc-visor img, .rc-visor video { display: block; width: 100%; max-height: 70vh; object-fit: contain; }
.rc-visor > .ayuda { color: #fff; padding: 24px; }
.rc-visor > .boton { margin: 24px; }
.rc-pasos { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin: 12px 0; }
.rc-pasos .boton:last-child { justify-self: end; }
.rc-pasos .boton:first-child { justify-self: start; }
.rc-posicion { margin: 0; font-size: 1.0625rem; color: var(--suave); }
.rc-ficha { margin: 16px 0; }
.rc-ficha h1 { font-size: 1.625rem; }
.rc-ficha dl { display: grid; gap: 2px; margin: 8px 0 0; }
.rc-ficha dt { margin-top: 8px; font-size: 1rem; color: var(--suave); }
.rc-ficha dd { margin: 0; font-size: 1.1875rem; }
.rc-recuerdos { margin: 20px 0; padding-top: 16px; border-top: 1px solid var(--borde); }
.rc-recuerdos h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 1.375rem; }
.rc-cuenta { padding: 2px 10px; font-size: 1rem; color: var(--suave); background: #e7e5e4; border-radius: 999px; }
.rc-recuerdo { margin: 0 0 12px; padding: 14px 16px; background: #fff; border: 1px solid var(--borde); border-left: 4px solid #1d4ed8; border-radius: 12px; }
.rc-recuerdo-autor { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 6px; font-size: 1.0625rem; }
.rc-recuerdo-autor time { font-size: .9375rem; color: var(--suave); }
.rc-recuerdo .rc-notas { margin: 0; font-size: 1.1875rem; line-height: 1.5; }
.rc-recuerdo-acciones { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; margin-top: 12px; }
.rc-recuerdo-cambiar[open] { flex-basis: 100%; }
.rc-recuerdo-cambiar summary { display: inline-flex; list-style: none; cursor: pointer; }
.rc-recuerdo-cambiar summary::-webkit-details-marker { display: none; }
.rc-recuerdo-cambiar[open] summary { display: none; }
.rc-recuerdo-cambiar .formulario { margin-top: 0; }
.rc-recuerdo-nuevo { margin-top: 16px; }
.rc-recuerdo-nuevo label { font-size: 1.0625rem; color: var(--texto); }
.rc-recuerdo-nuevo textarea { font-size: 1.125rem; }
.rc-editar { margin: 16px 0; }
.rc-editar summary { list-style: none; }
.rc-editar summary::-webkit-details-marker { display: none; }
.rc-editar .formulario { margin-top: 16px; }
.rc-entrada { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 48px 0; text-align: center; }
.rc-entrada > .bi { font-size: 3.5rem; color: #1d4ed8; }
.rc-entrada .boton { min-height: 68px; margin-top: 16px; padding: 14px 32px; font-size: 1.3125rem; font-weight: 600; }
.rc .fila { background: #fff; border-color: var(--borde); }
.rc .fila-texto strong { font-size: 1.125rem; }
.rc-persona { flex-wrap: wrap; }
.rc-papelera-mini { width: 64px; height: 64px; background: #e7e5e4; }
.rc .filas .fila { flex-wrap: wrap; }
@media (max-width: 480px) { .rc-chips-nueva .boton, .rc-buscar-fila .boton { padding-right: 14px; padding-left: 14px; } }
.rc-lote-campos { display: flex; flex-direction: column; gap: 8px; }
.rc-lote-campos[hidden], #lote-pasos[hidden] { display: none; }
.bl details.zona > summary { cursor: pointer; font-weight: 600; }
.bl details.zona > .formulario { margin-top: 12px; }

/* Recuerden: mientras se sube, nada más en pantalla */
.rc-subida { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(28, 25, 23, .75); }
.rc-subida[hidden], #subida-progreso[hidden], #subida-ok[hidden] { display: none; }
.rc-subida-caja { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 440px; max-height: 100%; padding: 24px; overflow-y: auto; text-align: center;
                  color: var(--texto); background: #fff; border-radius: 18px; }
.rc-subida-foto { position: relative; display: flex; align-items: center; justify-content: center; align-self: center; overflow: hidden; width: 148px; height: 148px;
                  font-size: 3.5rem; color: #a8a29e; background: #e7e5e4; border-radius: 14px; }
.rc-subida-foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rc-subida-foto.hecho { color: #15803d; background: #dcfce7; }
.rc-subida-foto.hecho .bi-exclamation-triangle-fill { color: #b45309; }
.rc-subida h2 { margin: 0; font-size: 1.5rem; line-height: 1.25; }
.rc-subida .rc-progreso { height: 20px; margin: 0; border-radius: 999px; }
.rc-subida-pct { margin: 8px 0 0; font-size: 1.375rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.rc-subida-nota { margin: 0; font-size: 1.125rem; color: var(--suave); }
.rc-subida-errores { margin: 0; padding: 0; font-size: 1.0625rem; color: #b91c1c; text-align: left; list-style: none; overflow-wrap: anywhere; }
.rc #ver-todas[hidden] { display: none; }

/* Administren: gastos de IA */
.ia-orden { padding: 12px; overflow-x: auto; background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 10px; }
.ia-aviso { display: flex; gap: 6px; }
.ia-cabecera { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.ia-cabecera h2 { margin: 0 !important; }
.ia-cabecera .conmutador { margin: 0; }
.ia-tabla td strong { display: block; overflow-wrap: anywhere; word-break: normal; }
.ia-tabla th:first-child, .ia-tabla td:first-child { min-width: 120px; }
.ia-cifras { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
@media (max-width: 480px) { .ia-opcional { display: none; } .ia-cifras strong { font-size: 1.1875rem; }
    .ia-tabla { font-size: .875rem; } .ia-tabla th, .ia-tabla td { padding-right: 4px; padding-left: 4px; } .ia-tabla th:first-child, .ia-tabla td:first-child { min-width: 96px; } }
.ia-tabla td small { display: block; font-size: .75rem; color: var(--suave); }
.ia-barra { display: block; height: 4px; margin-top: 6px; overflow: hidden; background: rgba(148, 163, 184, .15); border-radius: 999px; }
.ia-barra > span { display: block; height: 100%; background: #818cf8; border-radius: 999px; }
.ia-barra-tope { height: 8px; }
.ia-cerca > span { background: #fbbf24; }
.ia-pasado > span { background: #f87171; }
.ia-mal { color: #f87171; }
.ia-caras { display: flex; flex-direction: column; gap: 8px; }
.ia-cara { padding: 10px 14px; background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 12px; }
.ia-cara summary { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; cursor: pointer; list-style: none; }
.ia-cara summary::-webkit-details-marker { display: none; }
.ia-cara summary strong { grid-row: span 2; align-self: center; min-width: 64px; font-variant-numeric: tabular-nums; }
.ia-cara summary span { overflow-wrap: anywhere; }
.ia-cara summary small { font-size: .8125rem; color: var(--suave); }
.ia-cara h3 { margin: 12px 0 4px; font-size: .875rem; }
.ia-cara h3 small { font-weight: 400; color: var(--suave); }
.ia-cara pre { max-height: 260px; margin: 0; padding: 10px; overflow: auto; font-size: .8125rem; white-space: pre-wrap; overflow-wrap: anywhere; background: rgba(0, 0, 0, .2); border-radius: 8px; }
.ia-presupuestos { display: flex; flex-direction: column; gap: 8px; }
.ia-presupuesto { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 8px 12px; padding: 10px 14px; background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 12px; }
.ia-presupuesto-texto small { display: block; font-size: .8125rem; color: var(--suave); }
.ia-cantidad { display: flex; align-items: center; gap: 4px; color: var(--suave); }
.ia-cantidad input { width: 96px; min-height: 40px; padding: 6px 10px; font: inherit; font-size: 16px; text-align: right;
                     color: var(--texto); background: rgba(0, 0, 0, .2); border: 1px solid var(--borde); border-radius: 10px; }
@media (max-width: 480px) { .ia-presupuesto { grid-template-columns: 1fr auto; } .ia-presupuesto-texto { grid-column: 1 / -1; } }

/* Administren: bitácora */
.bt-filtros { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.bt-filtros .conmutador { margin: 0; }
.bt-filtros select { width: auto; min-width: 180px; min-height: 40px; padding: 6px 12px; font: inherit; font-size: 16px;
    color: var(--texto); background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 10px; }
.bt-filtros option { color: #0f1021; }
.bt-dias { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.bt-dia { padding: 14px 16px; background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 14px; }
.bt-dia h2 { margin: 0 0 8px; font-size: 1rem; font-weight: 600; }
.bt-visitas { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 0 0 8px; font-size: .875rem; color: var(--suave); }
.bt-apps { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.bt-apps a { color: var(--suave); }
.bt-mal { color: #f87171; }
.bt-quien { font-size: .8125rem; color: var(--suave); }
.bt-eventos { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.bt-eventos li { display: grid; grid-template-columns: 18px 42px 1fr; align-items: baseline; gap: 8px; font-size: .9375rem; }
.bt-eventos li > i { color: var(--suave); }
.bt-eventos time { font-size: .8125rem; color: var(--suave); font-variant-numeric: tabular-nums; }
.bt-eventos li span { overflow-wrap: anywhere; }
.bt-eventos a { color: inherit; }
.bt-chip { display: inline-block; margin-right: 4px; padding: 0 8px; font-size: .75rem; text-decoration: none; background: rgba(129, 140, 248, .18); border-radius: 999px; }
.bt-despliegue > i { color: #818cf8; }
.bt-incidencia > i, .bt-copia-mal > i, .bt-errores > i { color: #f87171; }
.bt-abierta span { color: #f87171; font-weight: 600; }
.bt-emergencia > i, .bt-arranque > i, .bt-sospechosa > i { color: #fbbf24; }
.bt-copia > i { color: #34d399; }
.bt-resumen { margin-bottom: 10px; padding: 10px 14px; background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 12px; }
.bt-resumen summary { cursor: pointer; }
.bt-resumen summary small { margin-left: 6px; font-size: .8125rem; color: var(--suave); }
.bt-resumen p { margin: 10px 0 0; line-height: 1.55; }

/* PWA: instalada en el móvil */
html { background: var(--fondo); -webkit-tap-highlight-color: transparent; }
html:has(body.tema-recuerden) { --fondo: #faf7f2; }
a, button, .boton, summary, label { touch-action: manipulation; }
/* Con la barra de estado translúcida (Pangeapp) y en el iPhone apaisado, nada debajo del reloj ni de la isla. */
body { padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left); }
footer { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
.rc-subida { padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
.rc-lote { bottom: calc(8px + env(safe-area-inset-bottom)); }
.sin-conexion { text-align: center; }

.instalar { position: fixed; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); left: 12px; z-index: 40; display: flex; align-items: flex-start; gap: 12px;
            max-width: 520px; margin: 0 auto; padding: 14px 14px 14px 16px; color: var(--texto); background: #1b1c33; border: 1px solid rgba(129, 140, 248, .35);
            border-radius: 18px; box-shadow: 0 12px 40px rgba(0, 0, 0, .45); animation: instalar-entra .35s ease-out; }
.instalar[hidden] { display: none; }
.instalar img { flex: none; border-radius: 12px; }
.instalar-texto { flex: 1; min-width: 0; }
.instalar-texto strong { display: block; font-size: 1rem; line-height: 1.3; }
.instalar-texto p { margin: 4px 0 0; font-size: .9375rem; line-height: 1.45; color: var(--suave); }
.instalar-texto .bi { color: var(--acento); font-size: 1.05em; }
.instalar-texto .boton { margin-top: 10px; }
.instalar.es-ios .instalar-otros, .instalar:not(.es-ios) .instalar-ios { display: none; }
.instalar-cerrar { flex: none; width: 36px; height: 36px; padding: 0; color: var(--suave); background: none; border: 0; border-radius: 50%; font-size: 1rem; cursor: pointer; }
.tema-recuerden .instalar { background: #fff; border: 2px solid #1d4ed8; box-shadow: 0 12px 40px rgba(28, 25, 23, .25); }
.tema-recuerden .instalar-texto strong { font-size: 1.1875rem; }
.tema-recuerden .instalar-texto p { font-size: 1.0625rem; color: var(--texto); }
@keyframes instalar-entra { from { opacity: 0; transform: translateY(16px); } }
@media (prefers-reduced-motion: reduce) { .instalar { animation: none; } }

/* --- Advienten: noche de pino, papel de regalo y lazos dorados ------------------------------ */
.tema-advienten { --fondo: #0b1d1a; --texto: #f8f1e4; --suave: #a9b8a8; --tarjeta: rgba(255, 248, 230, .05); --borde: rgba(255, 236, 200, .14); --acento: #fbbf24;
                  background: radial-gradient(ellipse at 50% -10%, #17403a 0%, #0b1d1a 55%) fixed, var(--fondo); }
html:has(body.tema-advienten) { --fondo: #0b1d1a; }
.tema-advienten .orbe { display: none; }
.tema-advienten .boton-principal { background: #b91c1c; border-color: #dc2626; color: #fff; }
.tema-advienten .aviso { border-color: rgba(251, 191, 36, .5); background: rgba(251, 191, 36, .06); }
.av { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }
.av .zona { background: var(--tarjeta); }
.av h2 { font-size: 1.125rem; margin: 0 0 8px; }
.av-titulo { font-family: Fraunces, Georgia, serif; font-weight: 800; font-size: 2.5rem; letter-spacing: -.01em; text-align: center; margin: 8px 0 4px; }
.av-lema { margin: 0 0 20px; text-align: center; color: var(--suave); }
.av-centro { text-align: center; }
.av-estado { margin: 0 0 20px; padding: 12px 16px; text-align: center; border: 1px solid var(--borde); border-radius: 14px; background: rgba(251, 191, 36, .07); }
.av-estado .bi { color: var(--acento); }
.av-acciones { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 20px; }
.av-acciones .boton { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; }
.av-cuenta { padding: 1px 7px; font-size: .75rem; border-radius: 999px; background: rgba(255, 255, 255, .1); }
.av-boton-aviso { border-color: var(--acento); }
.av-boton-aviso .av-cuenta { background: var(--acento); color: #1c1917; font-weight: 600; }
.av-dos { display: grid; grid-template-columns: 1fr 110px; gap: 12px; }
.av input[type=date] { color-scheme: dark; }
.visualmente-oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* La cuadrícula: cada cajita es un regalo con su lazo; abierta, deja ver la foto. */
.av-cuadricula { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (min-width: 640px) { .av-cuadricula { grid-template-columns: repeat(6, 1fr); gap: 12px; } }
.av-caja { --papel: #b91c1c; --lazo: #fbbf24; --tinta: #fff8e7;
           position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; aspect-ratio: 1; margin: 0; overflow: hidden;
           color: var(--tinta); text-decoration: none; border-radius: 12px; background: var(--papel);
           box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .18), 0 6px 14px rgba(0, 0, 0, .35); }
.av-caja > button { all: unset; position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; border-radius: 12px; }
.av-caja > button:focus-visible { outline: 3px solid var(--acento); outline-offset: 2px; }
.av-color-0 { --papel: #b91c1c; }
.av-color-1 { --papel: #166534; }
.av-color-2 { --papel: #e9dcc0; --lazo: #b91c1c; --tinta: #7f1d1d; }
.av-color-3 { --papel: #1e3a8a; --lazo: #e5e7eb; }
.av-color-4 { --papel: #7f1d1d; }
.av-color-5 { --papel: #b45309; --lazo: #fef3c7; }
.av-tapa { position: absolute; inset: 0; pointer-events: none; transition: transform .5s cubic-bezier(.5, -.4, .7, 1), opacity .5s;
           background: linear-gradient(90deg, transparent 43%, var(--lazo) 43%, var(--lazo) 57%, transparent 57%),
                       linear-gradient(0deg, transparent 43%, var(--lazo) 43%, var(--lazo) 57%, transparent 57%); opacity: .9; }
.av-num { position: relative; z-index: 1; font-family: Fraunces, Georgia, serif; font-weight: 800; font-size: clamp(1.5rem, 7vw, 2.25rem); line-height: 1;
          padding: 4px 8px; border-radius: 8px; background: var(--papel); }
.av-caja small { position: relative; z-index: 1; margin-top: 4px; font-size: .75rem; font-weight: 600; }
.av-num small { display: block; margin: 0; font-family: Inter, system-ui, sans-serif; font-size: .625rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; opacity: .85; }
.av-caja-cerrada { filter: saturate(.75) brightness(.8); }
.av-caja-cerrada .av-tapa { opacity: .55; }
.av-caja-por_abrir { animation: av-latido 2.4s ease-in-out infinite; }
.av-caja-por_abrir small { padding: 1px 6px; border-radius: 6px; background: var(--papel); }
.av-caja-hoy { outline: 3px solid var(--acento); outline-offset: 2px; }
.av-abriendo .av-tapa { transform: translateY(-115%) rotate(-18deg); opacity: 0; }
.av-abriendo { animation: av-sacudida .5s ease-in-out; }
.av-caja-abierta, .av-caja-respondida, .av-caja-tuya, .av-caja-desvelada { background: #000 var(--foto, none) center / cover no-repeat; }
.av-caja-abierta .av-num, .av-caja-respondida .av-num, .av-caja-tuya .av-num, .av-caja-desvelada .av-num { font-size: 1rem; position: absolute; top: 6px; left: 6px; padding: 2px 7px;
          background: rgba(0, 0, 0, .55); color: #fff; }
.av-caja-abierta small, .av-caja-respondida small, .av-caja-tuya small { position: absolute; bottom: 6px; right: 6px; padding: 2px 7px; border-radius: 999px; color: #1c1917; background: var(--acento); }
.av-caja-respondida small { background: #4ade80; }
.av-caja-tuya small { background: #f8f1e4; }
.av-caja-vacia, .av-caja-tuya_vacia { background: transparent; border: 2px dashed var(--borde); box-shadow: none; color: var(--suave); }
.av-caja-vacia .av-num, .av-caja-tuya_vacia .av-num { background: transparent; }
.av-caja-tuya_vacia { border-color: #f87171; color: #fca5a5; }
.av-marca { position: absolute; z-index: 2; top: 5px; right: 5px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
            color: #1c1917; background: var(--acento); font-size: .8rem; text-decoration: none; box-shadow: 0 2px 6px rgba(0, 0, 0, .4); }
.av-marca-lista { background: #4ade80; }
.av-leyenda { text-align: center; margin-top: 16px; }
@keyframes av-latido { 0%, 100% { transform: scale(1); box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .18), 0 6px 14px rgba(0, 0, 0, .35); }
                       50% { transform: scale(1.04); box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .18), 0 0 22px rgba(251, 191, 36, .55); } }
@keyframes av-sacudida { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-5deg); } 50% { transform: rotate(4deg); } 75% { transform: rotate(-2deg); } }

/* El día: la cajita grande, la foto y a quién señalar. */
.av-dia-fecha { margin: 8px 0 0; text-align: center; color: var(--acento); font-size: .875rem; letter-spacing: .06em; text-transform: uppercase; }
.av-regalo { display: flex; justify-content: center; margin: 24px 0; }
.av-regalo .av-caja { width: min(60vw, 260px); border: 0; padding: 0; cursor: pointer; font: inherit; }
.av-regalo .av-num { font-size: 4rem; }
.av-regalo small { font-size: 1rem; }
.av-foto { margin: 16px 0 20px; text-align: center; }
.av-foto img { display: block; max-width: 100%; max-height: 70vh; margin: 0 auto; border-radius: 14px; border: 6px solid #fff8e7; box-shadow: 0 16px 40px rgba(0, 0, 0, .5); }
.av-foto figcaption { margin-top: 14px; font-family: Fraunces, Georgia, serif; font-size: 1.25rem; font-style: italic; }
.av-foto-recien img { animation: av-sale .8s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes av-sale { from { transform: scale(.3) rotate(-8deg); opacity: 0; } to { transform: none; opacity: 1; } }
.av-senalar { text-align: center; }
.av-sospechosos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-top: 12px; }
.av-sospechosos .boton { display: flex; align-items: center; gap: 8px; min-height: 52px; font-size: 1rem; text-align: left; }
.av-sospechosos .boton:hover { background: rgba(251, 191, 36, .12); }
.av-inicial { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font-weight: 700; color: #1c1917; background: var(--acento); }
.av-espera { text-align: center; }
.av-espera > .bi { font-size: 2.5rem; color: var(--acento); }
.av-espera .boton { min-height: 44px; margin-top: 8px; }
.av-desvelada { text-align: center; }
.av-votos { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 12px 0; padding: 0; list-style: none; }
.av-votos li { padding: 4px 10px; font-size: .875rem; border-radius: 999px; border: 1px solid var(--borde); }
.av-votos small { color: var(--suave); }
.av-acierto { background: rgba(74, 222, 128, .12); border-color: rgba(74, 222, 128, .4) !important; }
.av-acierto .bi { color: #4ade80; }
.av-fallo .bi { color: #f87171; }

/* Mis días */
.av-mis-dias { display: grid; gap: 12px; }
.av-mi-dia { margin: 0; }
.av-mi-dia-falta { border-color: rgba(251, 191, 36, .5); }
.av-mi-dia-cabecera { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.av-mi-num { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 10px; font-family: Fraunces, Georgia, serif; font-weight: 800; font-size: 1.5rem;
             color: var(--tinta, #fff8e7); background: var(--papel); }
.av-mi-foto { display: block; max-width: 100%; max-height: 320px; margin: 0 auto 12px; border-radius: 10px; }
/* Las fotos que faltan, como botones que llevan a cada día. */
.av-estado > p { margin: 0; }
.av-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px !important; }
.av-chip { display: inline-flex; align-items: baseline; gap: 6px; min-height: 40px; padding: 8px 14px; align-items: center; color: var(--texto); text-decoration: none; font-weight: 600;
           border: 1px solid rgba(251, 191, 36, .5); border-radius: 999px; background: rgba(251, 191, 36, .12); }
.av-chip small { font-weight: 400; color: var(--suave); }
.av-chip:active { transform: scale(.97); }
/* Tu cajita cerrada: entera es un enlace a su foto. */
a.av-caja-mia { text-decoration: none; }
a.av-caja-mia:active { transform: scale(.97); }
/* Nombre y fechas, plegado al final de Ajustes (como «Crear un calendario»). */
.av-plegable > summary { cursor: pointer; font-weight: 600; }
.av-plegable > summary small { font-weight: 400; color: var(--suave); }
.av-plegable[open] > summary { margin-bottom: 12px; }
.av-mi-texto { font-style: italic; text-align: center; }
.av-urge { color: #fca5a5; font-weight: 600; }
.av-elegir { position: relative; display: flex !important; align-items: center; justify-content: center; min-height: 52px; padding: 10px; cursor: pointer;
             color: var(--texto) !important; font-size: 1rem !important; border: 2px dashed var(--borde); border-radius: 12px; }
.av-elegir:hover { border-color: var(--acento); }
.av-elegir input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* Inicio */
.av-lista { display: grid; gap: 12px; margin-bottom: 24px; }
.av-tarjeta { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 18px 18px 18px 88px; color: inherit; text-decoration: none; overflow: hidden;
              background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 16px; }
.av-tarjeta:hover { border-color: var(--acento); }
.av-tarjeta:hover .av-regalito { transform: rotate(-6deg) scale(1.06); }
.av-tarjeta strong { font-family: Fraunces, Georgia, serif; font-size: 1.25rem; }
.av-tarjeta small { color: var(--suave); }
.av-tarjeta-estado { font-size: .875rem; color: var(--acento); }
/* Un regalo pequeño: la caja con su cinta cruzada y el lazo encima, con los colores de las cajitas. */
.av-regalito { --papel: #b91c1c; --lazo: #fbbf24; position: absolute; top: 50%; left: 18px; width: 52px; height: 52px; margin-top: -22px; border-radius: 9px;
               background: var(--papel); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .18), 0 4px 10px rgba(0, 0, 0, .35); transition: transform .2s; }
.av-regalito .av-tapa { opacity: 1; border-radius: 9px; }
.av-regalito .av-lazo { position: absolute; top: -9px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--lazo); }
.av-regalito .av-lazo::before, .av-regalito .av-lazo::after { content: ""; position: absolute; top: -1px; width: 14px; height: 12px; border: 3px solid var(--lazo); border-radius: 50%; box-sizing: border-box; }
.av-regalito .av-lazo::before { right: 8px; transform: rotate(-20deg); }
.av-regalito .av-lazo::after { left: 8px; transform: rotate(20deg); }
.av-nuevo summary, .av-como summary { cursor: pointer; font-weight: 600; }
.av-nuevo[open] summary, .av-como[open] summary { margin-bottom: 12px; }
.av-como ol { margin: 0; padding-left: 20px; line-height: 1.55; }
.av-como li { margin-bottom: 8px; }
.av-entrada { max-width: 420px; margin: 48px auto; text-align: center; }
.av-entrada > .bi { font-size: 3rem; color: var(--acento); }
.av-entrada h1 { font-family: Fraunces, Georgia, serif; }
.av-peligro summary { cursor: pointer; color: #fca5a5; }

/* Resultados */
.av-clasificacion { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.av-clasificacion li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, .03); }
.av-clasificacion li:first-child { background: rgba(251, 191, 36, .14); }
.av-clasificacion .av-yo { outline: 1px solid var(--acento); }
.av-puesto { width: 22px; text-align: center; font-weight: 700; color: var(--suave); }
.av-clasificacion li:first-child .av-puesto { color: var(--acento); }
.av-aciertos { font-family: Fraunces, Georgia, serif; font-weight: 800; font-size: 1.5rem; }
.av-premios { margin-top: 16px; }
.av-premios p { margin: 8px 0; }
.av-premios .bi { color: var(--acento); }
.av-resultados { display: grid; gap: 12px; }
.av-resultado { display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: start; margin: 0; }
.av-resultado img { width: 110px; height: 110px; object-fit: cover; border-radius: 10px; }
.av-resultado h3 { margin: 0 0 4px; font-size: 1rem; }
.av-resultado-dia { margin: 0; font-size: .8125rem; color: var(--acento); }
.av-resultado .av-votos { justify-content: flex-start; margin: 8px 0 0; }

/* Lo que hay que hacer, en forma de botón; y lo urgente, en rojo. */
.av [hidden] { display: none !important; }
.av-estado .boton { display: flex; width: fit-content; min-height: 44px; margin: 10px auto 0; align-items: center; }
.av-urgente { border-color: rgba(248, 113, 113, .55); background: rgba(248, 113, 113, .1); }
.av-urgente .bi { color: #fca5a5; }
.av-urgente a:not(.boton) { color: inherit; font-weight: 600; }
.av-urgente small { color: var(--suave); }
.av-pie { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 24px 0 8px; }
.av-pie .boton { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.av-confirmar { text-align: center; margin-top: 12px; }
.av-confirmar p { margin: 0; font-family: Fraunces, Georgia, serif; font-size: 1.375rem; }
.av-confirmar .acciones { justify-content: center; }
.av-elegir-principal { border-style: solid; border-color: var(--acento); background: rgba(251, 191, 36, .08); font-weight: 600; }
.av-subiendo .av-elegir { border-style: solid; color: var(--suave) !important; }
.av-gira { display: inline-block; animation: av-gira 1s linear infinite; }
@keyframes av-gira { to { transform: rotate(360deg); } }
.av-caja-cerrada { cursor: pointer; }
.av-nono { animation: av-nono .3s ease-in-out; }
@keyframes av-nono { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.av-toast { position: fixed; left: 50%; bottom: 24px; z-index: 5; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 10px 16px;
            font-size: .9375rem; text-align: center; color: var(--texto); border: 1px solid var(--borde); border-radius: 999px;
            background: #17403a; box-shadow: 0 8px 24px rgba(0, 0, 0, .45); animation: av-sube .25s ease-out; }
@keyframes av-sube { from { transform: translate(-50%, 12px); opacity: 0; } }

/* Nieve: unos copos que caen despacio, detrás de todo. */
.av-nieve { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.av-nieve i { position: absolute; top: -10px; left: var(--x); width: var(--t); height: var(--t); border-radius: 50%; background: rgba(255, 255, 255, .5);
              animation: av-copo var(--d) linear var(--r) infinite; }
@keyframes av-copo { to { transform: translate3d(20px, 105vh, 0); } }
@media (prefers-reduced-motion: reduce) {
    .av-nieve { display: none; }
    .av-caja-por_abrir, .av-abriendo, .av-foto-recien img, .av-gira, .av-nono, .av-toast { animation: none; }
}

/* --- Jueguen ----------------------------------------------------------------------------- */
.jg { max-width: 760px; margin: 0 auto; }
.jg-titulo { text-align: center; margin: 8px 0 4px; font-size: 2.25rem; }
.jg-lema { margin: 0 0 24px; text-align: center; color: var(--suave); }
.jg-centro { justify-content: center; }
.jg-lista { display: grid; gap: 12px; }
@media (min-width: 640px) { .jg-lista { grid-template-columns: 1fr 1fr; } }
.jg-tarjeta { display: flex; gap: 14px; padding: 16px; color: inherit; text-decoration: none; background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 16px;
              transition: border-color .2s, transform .2s; }
.jg-tarjeta:hover { border-color: var(--acento); transform: translateY(-2px); }
.jg-icono { flex: none; display: grid; place-items: center; width: 48px; height: 48px; font-size: 1.5rem; color: #fff; border-radius: 12px;
            background: linear-gradient(135deg, #4f46e5, #818cf8); }
.jg-sin-movil .jg-icono { background: linear-gradient(135deg, #334155, #64748b); }
.jg-tarjeta-texto { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.jg-tarjeta-texto strong { font-size: 1.0625rem; }
.jg-tarjeta-texto small { font-size: .875rem; color: var(--suave); line-height: 1.4; }
.jg-aptos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.jg-apto, .jg-record-lista { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; font-size: .75rem; color: #a7f3d0; border: 1px solid rgba(52, 211, 153, .35); border-radius: 999px; }
.jg-apto-no { color: #fca5a5; border-color: rgba(248, 113, 113, .4); }
.jg-record-lista { color: #fde68a; border-color: rgba(251, 191, 36, .4); }
.jg-record-lista[hidden] { display: none; }

.jg-cabecera { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; }
.jg-cabecera h1 { margin: 0; font-size: 1.75rem; }
.jg-marcadores { display: flex; gap: 8px; }
.jg-marcadores span { display: flex; flex-direction: column; min-width: 84px; padding: 6px 12px; text-align: center; border: 1px solid var(--borde); border-radius: 12px; background: var(--tarjeta); }
.jg-marcadores small { font-size: .6875rem; text-transform: uppercase; letter-spacing: .06em; color: var(--suave); }
.jg-marcadores strong { font-size: 1rem; font-variant-numeric: tabular-nums; }
.jg-aviso-movil { display: none; margin: 0 0 12px; padding: 10px 14px; color: #fecaca; border: 1px solid rgba(248, 113, 113, .4); border-radius: 12px; background: rgba(248, 113, 113, .08); }
@media (pointer: coarse) { .jg-aviso-movil { display: block; } }
.jg-controles { text-align: center; }
.jg-juego { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; outline: none; user-select: none; -webkit-user-select: none; }
.jg-lienzo { display: block; max-width: 100%; border-radius: 14px; border: 1px solid var(--borde); touch-action: none; }
.jg-juego-asedio .jg-lienzo { cursor: none; }
.jg-capa { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; padding: 16px; border-radius: 14px; background: rgba(8, 10, 24, .78); backdrop-filter: blur(3px); }
.jg-capa > div { max-width: 340px; text-align: center; }
.jg-capa h2 { margin: 0 0 8px; font-size: 1.5rem; }
.jg-capa p { margin: 0 0 16px; color: var(--texto); line-height: 1.5; }
.jg-capa .boton { min-height: 48px; padding: 10px 24px; font-size: 1rem; }

/* Parejas */
.jg-parejas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: min(100%, 440px); }
.jg-carta { position: relative; aspect-ratio: 1; padding: 0; border: 0; background: none; cursor: pointer; perspective: 600px; }
.jg-carta > span { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 12px; backface-visibility: hidden; transition: transform .35s; }
.jg-carta-dorso { background: repeating-linear-gradient(45deg, #4f46e5 0 8px, #4338ca 8px 16px); border: 2px solid #818cf8; }
.jg-carta-cara { transform: rotateY(180deg); background: #f8fafc; font-size: 2rem; }
.jg-vuelta .jg-carta-dorso, .jg-hecha .jg-carta-dorso { transform: rotateY(180deg); }
.jg-vuelta .jg-carta-cara, .jg-hecha .jg-carta-cara { transform: rotateY(360deg); }
.jg-hecha .jg-carta-cara { box-shadow: 0 0 0 3px #34d399 inset; }

/* Serpentina */
.jg-cruceta { display: none; grid-template-areas: ". ar ." "iz . de" ". ab ."; grid-template-columns: repeat(3, 64px); gap: 6px; }
@media (pointer: coarse) { .jg-cruceta { display: grid; } }
.jg-cruceta button { height: 56px; font-size: 1.5rem; color: var(--texto); background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 14px; touch-action: none; }
.jg-cruceta button:active { background: rgba(129, 140, 248, .3); }
.jg-cruceta [data-d=arriba] { grid-area: ar; } .jg-cruceta [data-d=abajo] { grid-area: ab; }
.jg-cruceta [data-d=izquierda] { grid-area: iz; } .jg-cruceta [data-d=derecha] { grid-area: de; }

/* Reflejos */
.jg-reflejos { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: min(60vh, 420px); padding: 20px;
               font: inherit; color: #fff; border: 0; border-radius: 16px; cursor: pointer; touch-action: manipulation; }
.jg-reflejos strong { font-size: 2.25rem; }
.jg-reflejos span { font-size: 1rem; opacity: .9; }
.jg-reflejos-espera { background: #b91c1c; }
.jg-reflejos-ya { background: #16a34a; }
.jg-reflejos-pronto { background: #c2410c; }
.jg-reflejos-visto { background: #1e3a8a; }

/* Secuencia */
.jg-secuencia { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: min(100%, 380px); aspect-ratio: 1; }
.jg-pulsador { border: 0; border-radius: 24px; opacity: .45; cursor: pointer; transition: opacity .08s, transform .08s; touch-action: manipulation; font: inherit; }
.jg-pulsador span { font-size: .875rem; color: rgba(0, 0, 0, .45); font-weight: 700; }
.jg-pulsador-0 { background: #22c55e; border-top-left-radius: 50%; } .jg-pulsador-1 { background: #ef4444; border-top-right-radius: 50%; }
.jg-pulsador-2 { background: #eab308; border-bottom-left-radius: 50%; } .jg-pulsador-3 { background: #3b82f6; border-bottom-right-radius: 50%; }
.jg-encendido { opacity: 1; transform: scale(.97); box-shadow: 0 0 30px currentColor; }
.jg-secuencia-centro { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 34%; height: 34%; transform: translate(-50%, -50%);
                       font-weight: 700; font-size: 1.25rem; border-radius: 50%; background: var(--fondo); border: 6px solid var(--fondo); pointer-events: none; }

/* Teclea */
.jg-teclea-entrada { width: min(100%, 360px); min-height: 48px; padding: 8px 14px; font: inherit; font-size: 1.25rem; text-align: center; color: var(--texto);
                     background: var(--tarjeta); border: 1px solid var(--acento); border-radius: 12px; }

/* Rompebloques: la barra de control táctil, bajo el lienzo. */
.jg-barra { display: none; position: relative; width: 100%; max-width: 440px; height: 64px; border-radius: 32px; background: var(--tarjeta); border: 1px solid var(--borde); touch-action: none; }
@media (pointer: coarse) { .jg-barra { display: block; } }
.jg-barra::before { content: ""; position: absolute; top: 50%; left: 28px; right: 28px; height: 4px; transform: translateY(-50%); border-radius: 2px; background: rgba(255, 255, 255, .12); }
.jg-barra-mando { position: absolute; top: 4px; width: 56px; height: 56px; margin-left: 0; display: grid; place-items: center; border-radius: 50%; font-size: 1.25rem;
                  color: #fff; background: linear-gradient(135deg, #4f46e5, #818cf8); box-shadow: 0 4px 12px rgba(0, 0, 0, .4); }

/* Serpentina: modo y pausa encima del lienzo. */
.jg-opciones { position: relative; z-index: 3; display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; max-width: 440px; }
.jg-opciones .boton { min-height: 40px; }
.jg-modos .boton.activo { background: #4f46e5; border-color: #818cf8; }
.jg-pausa { width: 48px; font-size: 1.125rem; }
.jg-pausa:disabled { opacity: .4; }

/* Sudoku */
.jg-reloj { min-width: 72px; padding: 6px 12px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; border: 1px solid var(--borde); border-radius: 10px; }
.jg-sudoku { display: grid; grid-template-columns: repeat(9, 1fr); width: min(100%, 460px); aspect-ratio: 1; overflow: hidden;
             border: 2px solid #94a3b8; border-radius: 10px; background: #0b1220; }
.jg-celda { position: relative; display: grid; place-items: center; min-width: 0; padding: 0; font: inherit; font-size: clamp(1.1rem, 5.6vw, 1.6rem); font-weight: 500;
            color: #a5b4fc; background: transparent; border: 0; border-right: 1px solid rgba(148, 163, 184, .22); border-bottom: 1px solid rgba(148, 163, 184, .22);
            cursor: pointer; touch-action: manipulation; }
.jg-celda:nth-child(9n) { border-right: 0; }
.jg-celda:nth-child(n+73) { border-bottom: 0; }
.jg-borde-d { border-right: 2px solid #94a3b8 !important; }
.jg-borde-b { border-bottom: 2px solid #94a3b8 !important; }
.jg-fija { color: #f1f5f9; font-weight: 700; }
.jg-pistada { color: #fbbf24; }
.jg-relacionada { background: rgba(129, 140, 248, .09); }
.jg-igual { background: rgba(129, 140, 248, .28); }
.jg-elegida { background: rgba(129, 140, 248, .5); }
.jg-mala { color: #f87171 !important; background: rgba(248, 113, 113, .16); }
.jg-elegida.jg-mala { background: rgba(248, 113, 113, .4); }
.jg-notas { position: absolute; inset: 2px; display: grid; grid-template-columns: repeat(3, 1fr); font-size: clamp(.5rem, 2.3vw, .7rem); font-weight: 500; line-height: 1; color: #94a3b8; }
.jg-notas span { display: grid; place-items: center; }
.jg-notas .jg-nota-igual { color: #c7d2fe; font-weight: 700; }
.jg-teclado-sudoku { display: grid; grid-template-columns: repeat(9, 1fr); gap: 5px; width: min(100%, 460px); }
.jg-num { position: relative; height: 54px; padding: 0; font: inherit; font-size: 1.375rem; font-weight: 600; color: var(--texto); background: var(--tarjeta);
          border: 1px solid var(--borde); border-radius: 10px; cursor: pointer; touch-action: manipulation; }
.jg-num small { position: absolute; top: 3px; right: 5px; font-size: .625rem; font-weight: 500; color: var(--suave); }
.jg-num:active { background: rgba(129, 140, 248, .3); }
.jg-num-hecho { opacity: .3; }
.jg-modo-lapiz .jg-num { color: #a5b4fc; font-size: 1rem; border-style: dashed; }
.jg-herramientas { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 4px; }
.jg-herramientas .boton { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 54px; padding: 6px 4px; font-size: .75rem; touch-action: manipulation; }
.jg-herramientas .bi { font-size: 1.125rem; }
.jg-lapiz.activo { background: #4f46e5; border-color: #818cf8; }

/* Jueguen: Machaca y Frenesí (comparten la barra de tiempo) */
.jg-machaca-reloj { width: min(100%, 440px); height: 8px; overflow: hidden; border-radius: 4px; background: rgba(255, 255, 255, .1); }
.jg-machaca-reloj span { display: block; width: 100%; height: 100%; background: linear-gradient(90deg, #34d399, #a3e635); }
.jg-apura span { background: linear-gradient(90deg, #ef4444, #f97316); }
.jg-machaca { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; width: min(100%, 420px); }
.jg-hueco { position: relative; aspect-ratio: 1; padding: 0; overflow: hidden; border: 0; border-radius: 50%; cursor: pointer; touch-action: manipulation;
            background: radial-gradient(ellipse at 50% 70%, #1c1917 0 45%, #44403c 46% 60%, #57534e 61%); box-shadow: inset 0 6px 12px rgba(0, 0, 0, .5); }
.jg-bicho { position: absolute; inset: 14%; display: grid; place-items: center; border-radius: 50%; font-size: clamp(2rem, 11vw, 3.25rem);
            background: rgba(255, 255, 255, .08); transform: translateY(110%); transition: transform .12s ease-out; }
.jg-fuera .jg-bicho { transform: translateY(0); }
.jg-bomba .jg-bicho { background: rgba(248, 113, 113, .18); }
.jg-tocado .jg-bicho { transform: translateY(0) scale(.6); opacity: .4; transition: transform .1s, opacity .15s; }
.jg-temblor { animation: jg-temblor .3s; }
@keyframes jg-temblor { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.jg-frenesi { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: min(78vw, 320px); aspect-ratio: 1;
              color: #fff; font: inherit; border: 0; border-radius: 50%; cursor: pointer; touch-action: manipulation;
              background: radial-gradient(circle at 35% 30%, #fb7185, #e11d48 60%, #9f1239); box-shadow: 0 10px 0 #881337, 0 18px 40px rgba(225, 29, 72, .35); }
.jg-frenesi strong { font-size: clamp(2.5rem, 14vw, 4rem); font-variant-numeric: tabular-nums; line-height: 1; }
.jg-frenesi span { font-size: .9375rem; opacity: .9; font-variant-numeric: tabular-nums; }
.jg-pum { animation: jg-pum .09s; }
@keyframes jg-pum { 50% { transform: translateY(6px) scale(.97); box-shadow: 0 4px 0 #881337, 0 8px 20px rgba(225, 29, 72, .35); } }
.jg-frenesi-fin { filter: grayscale(.5); }

/* Jueguen: Clavado */
.jg-clavado { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: min(60vh, 420px);
              padding: 20px; color: #fff; font: inherit; border: 0; border-radius: 14px; cursor: pointer; touch-action: manipulation; background: #1e293b; }
.jg-clavado small { font-size: .875rem; text-transform: uppercase; letter-spacing: .08em; opacity: .7; }
.jg-clavado strong { font-size: clamp(3.5rem, 18vw, 5.5rem); font-variant-numeric: tabular-nums; line-height: 1; }
.jg-clavado span { font-size: 1rem; opacity: .85; }
.jg-a-ciegas { background: #312e81; }
.jg-a-ciegas strong { opacity: .35; }
.jg-clavado-fin { background: #7c2d12; }
.jg-clavado-bien { background: #166534; }

/* Jueguen: Derrumbe */
.jg-mandos { display: grid; grid-template-columns: repeat(4, 1fr) 52px; gap: 8px; width: 100%; max-width: 440px; }
.jg-mandos button { height: 56px; font-size: 1.5rem; color: var(--texto); background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 14px; touch-action: manipulation; }
.jg-mandos button:active { background: rgba(129, 140, 248, .3); }
@media (pointer: fine) { .jg-mandos { grid-template-columns: 52px; justify-content: center; } .jg-mandos button:not(:last-child) { display: none; } }

/* Jueguen: Preguntas */
.jg-preguntas { display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: 560px; }
.jg-pr-lema { margin: 0; text-align: center; color: var(--suave); }
.jg-pr-categorias { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 560px) { .jg-pr-categorias { grid-template-columns: repeat(3, 1fr); } }
.jg-pr-categoria { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 92px; padding: 12px 14px; text-align: left; color: #fff; font: inherit;
                   border: 1px solid hsla(var(--h), 80%, 70%, .35); border-radius: 16px; cursor: pointer; touch-action: manipulation;
                   background: linear-gradient(140deg, hsla(var(--h), 70%, 45%, .55), hsla(var(--h), 70%, 25%, .35)); transition: transform .15s, border-color .15s; }
.jg-pr-categoria:hover:not(:disabled) { transform: translateY(-2px); border-color: hsla(var(--h), 80%, 75%, .8); }
.jg-pr-categoria:disabled { opacity: .45; cursor: default; }
.jg-pr-categoria .bi { font-size: 1.5rem; color: hsl(var(--h), 90%, 80%); }
.jg-pr-categoria strong { font-size: 1rem; line-height: 1.2; }
.jg-pr-categoria small { font-size: .75rem; opacity: .8; }
.jg-pr-mezcla { grid-column: 1 / -1; min-height: 72px; }
.jg-pr-ia { padding: 16px; border: 1px dashed rgba(167, 139, 250, .5); border-radius: 16px; background: rgba(129, 140, 248, .07); }
.jg-pr-ia h2 { margin: 0 0 6px; font-size: 1.125rem; }
.jg-pr-ia h2 .bi { color: #c4b5fd; }
.jg-pr-ia p { margin: 0 0 10px; color: var(--suave); font-size: .9375rem; line-height: 1.45; }
.jg-pr-ia-fila { display: grid; grid-template-columns: 1fr; gap: 8px; margin-bottom: 10px; }
@media (min-width: 560px) { .jg-pr-ia-fila { grid-template-columns: 200px 1fr; } }
.jg-pr-ia select, .jg-pr-ia input { min-height: 44px; padding: 8px 12px; font: inherit; color: var(--texto); background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 10px; }
.jg-pr-ia-pie { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 14px; }
.jg-pr-ia-pie .boton { min-height: 44px; }
.jg-pr-quedan { color: var(--suave); }
.jg-pr-ia-estado { margin: 10px 0 0 !important; }
.jg-pr-ia-estado:empty { display: none; }
.jg-pr-pensando { color: #c4b5fd !important; animation: jg-latido 1.4s infinite; }
@keyframes jg-latido { 50% { opacity: .5; } }
.jg-pr-ia-estado.jg-pr-bien { color: #6ee7b7 !important; }
.jg-pr-ia-estado.jg-pr-mal { color: #fca5a5 !important; }
.jg-pr-cabecera { display: flex; justify-content: space-between; align-items: center; }
.jg-pr-etiqueta { padding: 2px 10px; font-size: .8125rem; color: #c4b5fd; border: 1px solid rgba(167, 139, 250, .4); border-radius: 999px; }
.jg-pr-cuenta { font-variant-numeric: tabular-nums; color: var(--suave); }
.jg-preguntas .jg-machaca-reloj { max-width: none; }
.jg-pr-pregunta { margin: 4px 0; font-size: clamp(1.2rem, 5vw, 1.5rem); line-height: 1.35; text-align: center; }
.jg-pr-opciones { display: grid; gap: 10px; }
.jg-pr-opcion { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 14px; text-align: left; font: inherit; font-size: 1.0625rem; color: var(--texto);
                background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 14px; cursor: pointer; touch-action: manipulation; transition: background .15s, border-color .15s; }
.jg-pr-opcion:hover:not(:disabled) { border-color: var(--acento); }
.jg-pr-opcion kbd { flex: none; display: grid; place-items: center; width: 28px; height: 28px; font: inherit; font-size: .8125rem; font-weight: 700; color: var(--suave);
                    border: 1px solid var(--borde); border-radius: 8px; }
.jg-pr-opcion:disabled { cursor: default; opacity: .55; }
.jg-pr-opcion.jg-pr-correcta { opacity: 1; background: rgba(22, 163, 74, .35); border-color: #4ade80; }
.jg-pr-opcion.jg-pr-fallo { opacity: 1; background: rgba(220, 38, 38, .3); border-color: #f87171; }
.jg-pr-resultado { padding: 14px 16px; border-radius: 14px; border: 1px solid var(--borde); background: var(--tarjeta); }
.jg-pr-resultado.jg-pr-bien { border-color: rgba(74, 222, 128, .5); }
.jg-pr-resultado.jg-pr-mal { border-color: rgba(248, 113, 113, .5); }
.jg-pr-resultado strong { font-size: 1.125rem; }
.jg-pr-resultado p { margin: 6px 0 0; color: var(--suave); line-height: 1.45; }
.jg-pr-pie { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }
.jg-pr-pie .boton { min-height: 48px; padding: 10px 22px; }
.jg-pr-avisar { padding: 6px 0; font: inherit; font-size: .8125rem; color: var(--suave); text-decoration: underline; background: none; border: 0; cursor: pointer; }
.jg-pr-fin { padding: 24px 16px; text-align: center; border: 1px solid var(--borde); border-radius: 16px; background: var(--tarjeta); }
.jg-pr-fin h2 { margin: 0 0 4px; }
.jg-pr-fin p { margin: 0 0 14px; color: var(--suave); }
.jg-pr-gordo { font-size: 2.5rem; font-weight: 800; color: var(--texto) !important; margin: 4px 0 2px !important; }

/* Jueguen: Enjambre */
.jg-enj-mandos { display: grid; grid-template-columns: 1fr 56px; gap: 8px; width: 100%; max-width: 440px; }
.jg-enj-mandos button { height: 54px; font: inherit; font-size: 1.0625rem; font-weight: 600; color: var(--texto); background: var(--tarjeta);
                        border: 1px solid var(--borde); border-radius: 14px; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.jg-enj-mandos button:active { transform: scale(.96); }
/* A quién apunta: tres botones de colores (cian, rosa, ámbar); el activo, relleno y brillando. */
.jg-enj-modos { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.jg-enj-mandos .jg-enj-modo { height: 46px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 4px; font-size: .9375rem;
                              color: var(--c); background: color-mix(in srgb, var(--c) 10%, transparent); border: 1.5px solid color-mix(in srgb, var(--c) 45%, transparent);
                              transition: transform .1s, background-color .15s, color .15s, box-shadow .15s; white-space: nowrap; }
.jg-enj-mandos .jg-enj-modo.activo { color: #0b1020; background: var(--c); border-color: var(--c); box-shadow: 0 0 18px color-mix(in srgb, var(--c) 55%, transparent); }
.jg-enj-modo .bi { font-size: 1.375rem; }
.jg-enj-escena { display: grid; place-items: center; width: 100%; }
/* La Nova: medidor de carga (una pista que se va llenando) y botón; también se lanza pellizcando el lienzo o con espacio. */
.jg-enj-nova { position: relative; overflow: hidden; display: flex; align-items: center; gap: 8px; height: 54px; padding: 0 14px; border-radius: 999px;
               color: var(--suave); font-size: .9375rem; font-weight: 600; background: rgba(45, 212, 191, .07); box-shadow: inset 0 0 0 1px rgba(45, 212, 191, .18); }
.jg-enj-nova > b { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(13, 148, 136, .55), rgba(45, 212, 191, .4)); transform-origin: left; transform: scaleX(0); transition: transform .15s; }
.jg-enj-nova > .bi { position: relative; font-size: 1.25rem; color: #2dd4bf; }
.jg-enj-nova > em { position: relative; font-style: normal; color: var(--texto); }
.jg-enj-nova span { font-variant-numeric: tabular-nums; color: var(--suave); }
.jg-enj-nova > small { position: relative; margin-left: auto; font-size: .75rem; font-weight: 500; color: var(--suave); opacity: 0; transition: opacity .2s; }
.jg-enj-nova.jg-enj-lista { background: #5eead4; box-shadow: 0 0 24px rgba(94, 234, 212, .5); animation: jg-latido 1s infinite; }
.jg-enj-nova.jg-enj-lista > b { opacity: 0; }
.jg-enj-nova.jg-enj-lista > .bi, .jg-enj-nova.jg-enj-lista > em, .jg-enj-nova.jg-enj-lista span, .jg-enj-nova.jg-enj-lista > small { color: #042f2e; }
.jg-enj-nova.jg-enj-lista > small { opacity: 1; }
.jg-enj-nova { cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
.jg-enj-nova.jg-enj-lista:active { transform: scale(.97); }
.jg-enj-mejoras { overflow-y: auto; align-items: start; overscroll-behavior: contain; }
.jg-enj-mejoras > div { max-width: 420px; width: 100%; padding: 8px 0 24px; }
.jg-enj-grupo { margin: 10px 2px 0; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #a5b4fc; text-align: left; }
.jg-enj-cartas > .jg-enj-grupo:first-child { margin-top: 0; }
.jg-enj-carta-nueva { border-color: #5eead4; box-shadow: 0 0 18px rgba(94, 234, 212, .2); }
.jg-enj-carta-nueva strong em { color: #5eead4; }
.jg-enj-luego { margin-top: 6px; }
/* Con todas las mejoras a la vista, cartas más compactas (las de superpoder, como antes). */
.jg-enj-mejoras:not(.jg-enj-poderes) .jg-enj-cartas { gap: 7px; }
.jg-enj-mejoras:not(.jg-enj-poderes) .jg-enj-carta { padding: 9px 12px; gap: 10px; }
.jg-enj-mejoras:not(.jg-enj-poderes) .jg-enj-carta > .bi { width: 34px; height: 34px; font-size: 1.0625rem; border-radius: 10px; }
.jg-enj-mejoras:not(.jg-enj-poderes) .jg-enj-carta strong { font-size: .9375rem; }
.jg-enj-mejoras:not(.jg-enj-poderes) .jg-enj-carta small { font-size: .78rem; line-height: 1.3; }
.jg-enj-mejoras:not(.jg-enj-poderes) .jg-enj-cambios { font-size: .78rem; margin-top: 2px; }
.jg-enj-luego .jg-enj-tienes { justify-content: flex-start; margin-top: 8px; }
.jg-enj-luego .jg-enj-tienes li { color: var(--suave); border-color: var(--borde); }
.jg-enj-luego .jg-enj-nota { text-align: left; }
/* «A tu manera»: el diagrama de araña para las prioridades de ataque. */
.jg-enj-radar-capa { overflow-y: auto; align-items: start; }
.jg-enj-radar-capa > div { max-width: 380px; width: 100%; padding: 6px 0 20px; }
.jg-enj-radar-capa h2 .bi { color: #a78bfa; }
.jg-enj-radar { display: block; width: 100%; max-width: 340px; margin: 0 auto; touch-action: none; user-select: none; -webkit-user-select: none; }
.jg-enj-anillo { fill: none; stroke: rgba(167, 139, 250, .18); stroke-width: 1; }
.jg-enj-eje { stroke: rgba(167, 139, 250, .3); stroke-width: 1; }
.jg-enj-etiqueta { fill: #c4b5fd; font: 600 12px system-ui, sans-serif; }
.jg-enj-forma { fill: rgba(167, 139, 250, .28); stroke: #a78bfa; stroke-width: 2; stroke-linejoin: round; }
.jg-enj-punta { fill: #a78bfa; stroke: #ede9fe; stroke-width: 2; cursor: grab; }
.jg-enj-valor { fill: #1e1b4b; font: 800 11px system-ui, sans-serif; }
.jg-enj-radar-botones { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 0 0; }
.jg-enj-radar-botones .boton { min-height: 46px; justify-content: center; }
.jg-enj-radar-capa > div > p { margin-bottom: 6px; }
.jg-enj-ejes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 10px 0 14px; padding: 0; list-style: none; }
.jg-enj-ejes button { display: flex; gap: 8px; width: 100%; padding: 7px 9px; text-align: left; font: inherit; color: var(--texto); cursor: pointer;
                      border: 1px solid rgba(167, 139, 250, .3); border-radius: 10px; background: rgba(167, 139, 250, .08); touch-action: manipulation; }
.jg-enj-ejes button .bi { color: #a78bfa; margin-top: 2px; }
.jg-enj-ejes button span { display: flex; flex-direction: column; min-width: 0; }
.jg-enj-ejes strong { font-size: .8125rem; }
.jg-enj-ejes small { font-size: .6875rem; color: var(--suave); line-height: 1.3; }
.jg-enj-cartas { display: grid; gap: 10px; }
.jg-enj-carta { display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-align: left; font: inherit; color: var(--texto); cursor: pointer; touch-action: manipulation;
                background: linear-gradient(135deg, rgba(79, 70, 229, .35), rgba(15, 23, 42, .6)); border: 1px solid rgba(129, 140, 248, .5); border-radius: 14px;
                transition: transform .12s, border-color .12s; }
.jg-enj-carta:hover { transform: translateY(-2px); border-color: #a5b4fc; }
.jg-enj-mejoras .jg-enj-carta { animation: jg-enj-entra .32s cubic-bezier(.2, .9, .3, 1.25) both; }
@keyframes jg-enj-entra { from { opacity: 0; transform: translateY(18px) scale(.94); } }
.jg-enj-poderes h2 { color: #fcd34d; text-shadow: 0 0 18px rgba(251, 191, 36, .55); }
.jg-enj-carta-poder { background: linear-gradient(135deg, rgba(180, 83, 9, .45), rgba(15, 23, 42, .7)); border-color: rgba(251, 191, 36, .7);
                      box-shadow: 0 0 22px rgba(251, 191, 36, .18); position: relative; overflow: hidden; }
.jg-enj-carta-poder > .bi { color: #fcd34d; background: rgba(251, 191, 36, .16); }
.jg-enj-carta-poder::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .16) 50%, transparent 65%);
                             transform: translateX(-100%); animation: jg-enj-brillo 2.4s 1s infinite; pointer-events: none; }
@keyframes jg-enj-brillo { 40%, 100% { transform: translateX(100%); } }
.jg-enj-pausa-botones { display: grid; gap: 10px; }
.jg-enj-pausa-botones .boton { min-height: 48px; justify-content: center; }
.jg-enj-nota { display: block; margin-top: 10px; font-size: .8125rem; color: var(--suave); }
.jg-enj-pausa-capa { overflow-y: auto; }
.jg-enj-pausa-capa > div { width: 100%; max-width: 380px; }
.jg-enj-pestanas { display: flex; margin: 14px 0 10px; }
.jg-enj-pestanas .boton { flex: 1; min-height: 40px; font-size: .875rem; }
.jg-enj-hoja { text-align: left; }
.jg-enj-hoja[hidden] { display: none; }
.jg-enj-vacio { color: var(--suave); text-align: center; font-size: .875rem; }
.jg-enj-lista-mejoras { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; max-height: 46vh; overflow-y: auto; }
.jg-enj-lista-mejoras li { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 1px solid rgba(129, 140, 248, .3); border-radius: 12px; background: rgba(79, 70, 229, .12); }
.jg-enj-lista-mejoras li > .bi { flex: none; width: 30px; height: 30px; display: grid; place-items: center; color: #5eead4; border-radius: 9px; background: rgba(94, 234, 212, .12); }
.jg-enj-lista-mejoras li > span { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.jg-enj-lista-mejoras strong { font-size: .875rem; }
.jg-enj-lista-mejoras small { font-size: .75rem; color: var(--suave); line-height: 1.35; }
.jg-enj-lista-mejoras b { flex: none; font-size: .75rem; color: #a5b4fc; font-variant-numeric: tabular-nums; }
.jg-enj-lista-mejoras li.jg-enj-poder { border-color: rgba(251, 191, 36, .45); background: rgba(180, 83, 9, .16); }
.jg-enj-lista-mejoras li.jg-enj-poder > .bi, .jg-enj-lista-mejoras li.jg-enj-poder b { color: #fcd34d; }
.jg-enj-stats { display: grid; grid-template-columns: auto 1fr; gap: 5px 14px; margin: 0; font-size: .875rem; }
.jg-enj-stats dt { color: var(--suave); }
.jg-enj-stats dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.jg-enj-punto { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.jg-enj-guardada { font-size: .75em; color: #fcd34d; margin-left: 2px; }
.jg-enj-tienes { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 16px 0 0; padding: 0; list-style: none; }
.jg-enj-tienes li { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; font-size: .75rem; color: #c7d2fe; border: 1px solid rgba(129, 140, 248, .4); border-radius: 999px; }
.jg-enj-tienes li.jg-enj-poder { color: #fcd34d; border-color: rgba(251, 191, 36, .55); }
/* En el móvil, la partida ocupa toda la pantalla: sin cabecera ni pie, y el lienzo tan alto como quepa. */
@media (pointer: coarse) {
    html.jg-enj-fijo, html.jg-enj-fijo body { overflow: hidden; overscroll-behavior: none; height: 100%; }
    .jg-enj-fijo .jg-juego-enjambre { position: fixed; inset: 0; z-index: 50; gap: 8px; justify-content: flex-start; background: #070912;
                                     padding: calc(env(safe-area-inset-top) + 6px) 8px calc(env(safe-area-inset-bottom) + 8px); }
    .jg-enj-fijo .jg-juego-enjambre > .jg-opciones { display: none; }
    .jg-enj-fijo .jg-enj-escena { flex: 1; min-height: 0; }
    .jg-enj-fijo .jg-juego-enjambre .jg-lienzo { border-radius: 12px; }
    .jg-enj-fijo .jg-juego-enjambre .jg-capa { border-radius: 0; }
    .jg-enj-fijo .jg-enj-mandos { max-width: none; }
}
.jg-enj-carta > .bi { flex: none; display: grid; place-items: center; width: 42px; height: 42px; font-size: 1.25rem; color: #5eead4; border-radius: 12px; background: rgba(94, 234, 212, .12); }
.jg-enj-carta span { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.jg-enj-carta small { color: var(--suave); line-height: 1.35; }
.jg-enj-carta strong { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.jg-enj-carta strong em { font-style: normal; font-weight: 600; font-size: .6875rem; text-transform: uppercase; letter-spacing: .05em; color: #a5b4fc; }
.jg-enj-carta-poder strong em { color: #fcd34d; }
.jg-enj-cambios { display: grid !important; gap: 2px !important; margin-top: 4px; font-size: .8125rem; }
.jg-enj-cambios > span { display: flex !important; flex-direction: row !important; justify-content: space-between; gap: 8px; }
.jg-enj-cambios > span > span { color: var(--suave); }
.jg-enj-cambios b { color: #5eead4; font-variant-numeric: tabular-nums; white-space: nowrap; }
.jg-enj-carta kbd { font: inherit; font-size: .75rem; color: var(--suave); border: 1px solid var(--borde); border-radius: 6px; padding: 1px 6px; }
@media (pointer: coarse) { .jg-enj-carta kbd { display: none; } }

/* Jueguen · Rebaño */
.jg-reb-mandos { display: grid; grid-template-columns: 1fr 56px; gap: 8px; width: 100%; max-width: 440px; }
.jg-reb-mandos button { height: 54px; font: inherit; font-size: 1.0625rem; font-weight: 600; color: var(--texto); background: var(--tarjeta);
    border: 1px solid var(--borde); border-radius: 14px; cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.jg-reb-ladrar { display: flex; align-items: center; justify-content: center; gap: 8px; color: #1a2e05 !important; background: #a3e635 !important; border-color: #bef264 !important; transition: opacity .2s; }
.jg-reb-ladrar.jg-reb-recargando { opacity: .45; }
.jg-mic-mandos { align-items: center; }
.jg-mic-ayuda { font-size: .8125rem; color: var(--suave); text-align: center; line-height: 1.3; }

/* Administren · Usuarios: estado del registro de actividad de cada app */
.us-registro { margin: 0 0 14px; }
.us-registro summary { cursor: pointer; color: var(--suave); }
.us-registro .filas { margin-top: 8px; }
.us-mal { color: #fca5a5; font-weight: 600; }

/* Jueguen · Vida */
.jg-vida-ajustes { display: grid; gap: 12px; width: 100%; max-width: 440px; }
.jg-vida-ajustes[hidden], .jg-vida-escena[hidden], .jg-vida-sub[hidden], .jg-vida-aviso[hidden], .jg-vida-aviso [hidden] { display: none; }
.jg-vida-ajustes section { display: grid; gap: 10px; padding: 14px; background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 16px; }
.jg-vida-ajustes h3 { margin: 0; font-size: .8125rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--suave); }
.jg-vida-sub { display: grid; gap: 10px; }
.jg-vida-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.jg-vida-chip { min-height: 38px; padding: 6px 13px; font: inherit; font-size: .9375rem; color: var(--texto); background: rgba(255, 255, 255, .04);
                border: 1px solid var(--borde); border-radius: 999px; cursor: pointer; touch-action: manipulation; transition: background .15s, color .15s; }
.jg-vida-chip[aria-pressed="true"] { color: #04111d; font-weight: 600; background: #5eead4; border-color: #5eead4; }
.jg-vida-nota { margin: 0; font-size: .875rem; line-height: 1.45; color: var(--suave); }
.jg-vida-cifras { display: grid; gap: 6px; }
.jg-vida-cifras > span { font-size: .875rem; }
.jg-vida-cifras > div { display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; }
.jg-vida-cifras button { height: 40px; padding: 0; font: inherit; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--suave); background: rgba(255, 255, 255, .03);
                         border: 1px solid var(--borde); border-radius: 10px; cursor: pointer; touch-action: manipulation; transition: background .15s, color .15s; }
.jg-vida-nace button[aria-pressed="true"] { color: #04111d; background: #5eead4; border-color: #5eead4; }
.jg-vida-vive button[aria-pressed="true"] { color: #0b0820; background: #a78bfa; border-color: #a78bfa; }
.jg-vida-campo { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; font-size: .9375rem; }
.jg-vida-campo input { width: 100%; accent-color: #5eead4; }
.jg-vida-campo output { min-width: 4.5ch; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.jg-vida-marca { display: flex; align-items: center; gap: 10px; font-size: .9375rem; cursor: pointer; }
.jg-vida-marca input { flex: none; width: 20px; height: 20px; accent-color: #5eead4; }
.jg-vida-acciones { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; }
.jg-vida-acciones .boton { justify-content: center; min-height: 52px; font-size: 1rem; }
.jg-vida-escena { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }
.jg-vida-regla { font-size: .8125rem; color: var(--suave); text-align: center; }
.jg-vida-tablero { position: relative; max-width: 100%; }
.jg-vida-tablero canvas { display: block; max-width: 100%; border: 1px solid var(--borde); border-radius: 14px; touch-action: none; cursor: crosshair; }
.jg-vida-aviso { position: absolute; left: 10px; right: 10px; bottom: 10px; display: grid; gap: 4px; padding: 12px 14px; background: rgba(8, 10, 24, .9);
                 border: 1px solid rgba(94, 234, 212, .35); border-radius: 14px; backdrop-filter: blur(4px); animation: jg-vida-sube .25s ease-out; }
.jg-vida-aviso span { font-size: .875rem; line-height: 1.4; color: var(--suave); }
.jg-vida-aviso div { display: flex; gap: 6px; margin-top: 6px; }
.jg-vida-aviso .boton { flex: 1; justify-content: center; min-height: 42px; }
@keyframes jg-vida-sube { from { opacity: 0; transform: translateY(8px); } }
.jg-vida-datos { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 14px; font-size: .875rem; color: var(--suave); font-variant-numeric: tabular-nums; }
.jg-vida-datos b { color: var(--texto); }
.jg-vida-curva { display: block; width: 100%; max-width: 440px; height: 40px; }
.jg-vida-barra { display: grid; grid-template-columns: 52px 48px 1fr 48px 48px; gap: 6px; width: 100%; max-width: 440px; }
.jg-vida-barra button { min-height: 48px; padding: 0; font: inherit; font-size: 1.25rem; color: var(--texto); background: var(--tarjeta); border: 1px solid var(--borde);
                        border-radius: 12px; cursor: pointer; touch-action: manipulation; }
.jg-vida-barra button:active { transform: scale(.95); }
.jg-vida-barra .jg-vida-parada { color: #04111d; background: #5eead4; border-color: #5eead4; }
.jg-vida-vel { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums;
               border: 1px solid var(--borde); border-radius: 12px; background: var(--tarjeta); }
.jg-vida-vel button { min-height: 46px; border: 0; background: none; }

/* Webhookeen: autorefresco */
.vivo-punto { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; font-size: .75rem; font-weight: 500; letter-spacing: 0; text-transform: none;
              color: var(--suave); vertical-align: middle; }
.vivo-punto::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #34d399; animation: vivo-late 2.4s ease-in-out infinite; }
.vivo-punto.vivo-parado::before { background: #64748b; animation: none; }
@keyframes vivo-late { 50% { opacity: .3; } }
.vivo-nuevo { animation: vivo-llega 2.2s ease-out; }
@keyframes vivo-llega { from { background-color: rgba(52, 211, 153, .16); box-shadow: inset 0 0 0 1px rgba(52, 211, 153, .55); } }
@media (prefers-reduced-motion: reduce) { .vivo-punto::before, .vivo-nuevo { animation: none; } }
.zona.wh-plegable { margin-bottom: 12px; padding: 0; }
.wh-plegable > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; cursor: pointer; list-style: none; }
.wh-plegable > summary::-webkit-details-marker { display: none; }
.wh-plegable > summary span { display: grid; gap: 2px; }
.wh-plegable > summary strong { font-size: 1.125rem; font-weight: 600; }
.wh-plegable > summary small { font-size: .8125rem; color: var(--suave); }
.wh-plegable > summary .bi { color: var(--suave); transition: transform .2s; }
.wh-plegable[open] > summary .bi { transform: rotate(180deg); }
.wh-plegable > :not(summary) { margin-left: 16px; margin-right: 16px; }
.zona.wh-plegable[open] { padding-bottom: 16px; }
.wh-plegable + .zona:not(.wh-plegable) { margin-top: 24px; }
.wh-hace { color: var(--texto); font-weight: 500; }
.wh-ajeno { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: -4px 0 16px; padding: 10px 14px;
            font-size: .9375rem; color: var(--suave); background: rgba(129, 140, 248, .08); border: 1px solid rgba(129, 140, 248, .3); border-radius: 14px; }
.wh-ajeno strong { color: var(--texto); }
.wh-ajeno form { margin: 0; }
.wh-ajeno .boton { min-height: 38px; }
.wh-personas { margin-bottom: 12px; }
.wh-plegable .alta { margin-top: 4px; }
.ad-recientes { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 6px; }
.ad-recientes span { padding: 2px 8px; font-size: .75rem; color: var(--suave); background: rgba(255, 255, 255, .04); border: 1px solid var(--borde); border-radius: 999px; }
.ad-recientes b { font-weight: 600; color: var(--texto); }

/* Administren: peticiones HTTP */
.hp-titulo { margin: 20px 0 0; font-size: 1rem; }
.hp-filtro { color: inherit; text-decoration: none; }
.hp-filtro:hover strong { text-decoration: underline; }
.hp-ultima { display: block; font-size: .75rem; color: var(--suave); }
.hp-red { color: #cbd5e1; background: rgba(100, 116, 139, .25); }
.hp-fila .ac-peticion strong { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8125rem; }
.hp-detalle { padding: 0 10px 10px; }
.ac-fila .hp-detalle dl { padding: 0 0 8px; }
.hp-parte { margin-top: 8px; }
.hp-parte h3 { margin: 0 0 4px; font-size: .8125rem; color: var(--suave); text-transform: uppercase; letter-spacing: .04em; }
.hp-parte pre { max-height: 320px; margin: 4px 0 0; padding: 10px; overflow: auto; font-size: .75rem; white-space: pre-wrap; overflow-wrap: anywhere;
                background: rgba(0, 0, 0, .2); border-radius: 8px; }
.hp-cabeceras summary { cursor: pointer; font-size: .8125rem; color: var(--suave); }
.ac-fila .hp-cabeceras dl { padding: 4px 0 0; }
/* Webhookeen: lo que ya había al entrar, plegado, y avisos de lo que llega. */
.wh-separador { margin: 0; font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #34d399; }
.wh-previas { border: 1px dashed var(--borde); border-radius: 14px; }
.wh-previas > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; font-size: .875rem;
                        color: var(--suave); cursor: pointer; list-style: none; }
.wh-previas > summary::-webkit-details-marker { display: none; }
.wh-previas > summary:hover { color: var(--texto); }
.wh-previas > summary .bi { transition: transform .2s; }
.wh-previas[open] > summary .bi { transform: rotate(180deg); }
.wh-previas > .filas { padding: 0 10px 10px; }
.wh-toasts { position: fixed; right: 16px; bottom: 16px; z-index: 20; display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
             max-width: min(420px, calc(100% - 32px)); pointer-events: none; }
.wh-toast { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; font-size: .9375rem; line-height: 1.35; color: var(--texto);
            text-decoration: none; overflow-wrap: anywhere; background: #1b1d3a; border: 1px solid rgba(52, 211, 153, .45); border-radius: 14px;
            box-shadow: 0 10px 28px rgba(0, 0, 0, .5); cursor: pointer; pointer-events: auto; animation: wh-entra .25s ease-out; transition: opacity .25s, transform .25s; }
.wh-toast .bi { flex: none; margin-top: 1px; color: #34d399; }
.wh-toast-error { border-color: rgba(252, 165, 165, .5); }
.wh-toast-error .bi { color: #fca5a5; }
.wh-toast-recibida .bi { color: #93c5fd; }
.wh-toast-recibida { border-color: rgba(147, 197, 253, .45); }
.wh-toast-pausado { border-color: var(--borde); }
.wh-toast-pausado .bi { color: var(--suave); }
a.wh-toast:hover { border-color: var(--acento); }
.wh-toast-fuera { opacity: 0; transform: translateY(8px); }
@keyframes wh-entra { from { opacity: 0; transform: translateY(12px); } }
@media (max-width: 600px) { .wh-toasts { left: 16px; right: 16px; align-items: stretch; max-width: none; } }
@media (prefers-reduced-motion: reduce) { .wh-toast { animation: none; transition: none; } }
