/* VARIABLES DE MARCA - CHINO PC MASTER */
:root {
    --neon-cyan: #00FFFF;
    --cobalt-blue: #0047AB;
    --dark-gray: #212121;
    --accent-orange: #FF4500;
    --white: #ffffff;
    /* Texto (manual: cuerpo claro + gris técnico; no todo en cian) */
    --text-heading: #ffffff;
    --text-body: #e0e0e0;
    --text-muted: #a0a0a0;
    /* Usamos Dark Gray como base para que toda la UI respete tu paleta */
    --black: #212121;

    /* Variables dinámicas de Rifa (se sobreescriben desde rifa.js con tu Config) */
    --rifa-primario: var(--cobalt-blue);
    --rifa-secundario: var(--neon-cyan);
    --rifa-fondo: var(--dark-gray);
    --rifa-resaltado: var(--accent-orange);
    --rifa-reservado: var(--cobalt-blue);
    --rifa-texto-cards: var(--white);

    /* Splash rifa: solo entre barra superior (navbar) e inferior (footer); no las cubre */
    --rifa-splash-inset-top: 96px;
    --rifa-splash-inset-bottom: 158px;
}

@media (max-width: 768px) {
    :root {
        --rifa-splash-inset-top: 86px;
        --rifa-splash-inset-bottom: 140px;
    }
}

@media (max-width: 480px) {
    :root {
        --rifa-splash-inset-top: 78px;
        --rifa-splash-inset-bottom: 118px;
    }
}

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

body {
    background-color: var(--dark-gray); /* FONTO OSCURO OBLIGATORIO */
    color: var(--text-body);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* TIPOGRAFÍAS */
h1, h2, h3 {
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.tech-font { font-family: 'Roboto Mono', monospace; }

/* NAVEGACIÓN */
.site-header {
    position: relative;
    z-index: 1000;
}

.navbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 20px 5%;
    background-color: var(--black);
    border-bottom: 2px solid var(--cobalt-blue);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-links--desktop {
    grid-column: 2;
    justify-self: center;
}

.nav-end {
    grid-column: 3;
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    min-width: 0;
}

/* RESPONSIVE - Navbar */
@media screen and (max-width: 768px) {
    .navbar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap;
        gap: 8px;
        padding: 15px 4%;
    }

    .nav-links--desktop {
        display: none !important;
    }

    .nav-end {
        grid-column: unset;
        justify-self: unset;
        margin-left: auto;
        flex: 0 1 auto;
        min-width: 0;
        gap: 6px;
    }

    /* Logo principal de la barra: solo escritorio */
    .nav-logo--bar {
        display: none !important;
    }

    .auth-greeting {
        max-width: min(160px, 42vw);
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 12px 3%;
    }
}

.nav-brand { color: var(--neon-cyan); font-weight: bold; letter-spacing: 2px; }

/* LOGO EN NAVBAR (barra superior; en móvil se oculta y el logo vive en el sidebar) */
.nav-logo--bar {
    grid-column: 1;
    justify-self: start;
}

.nav-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    min-width: 0;
}

.logo-img {
    height: 50px;
    width: auto;
    transition: 0.3s ease;
    filter: drop-shadow(0 0 8px rgba(0, 255, 255, 0.3));
}

.nav-logo:hover .logo-img {
    filter: drop-shadow(0 0 15px rgba(0, 255, 255, 0.6));
    transform: scale(1.05);
}

/* Animación para mover el logo hacia arriba */
@keyframes logoMoveUp {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-40px);
        opacity: 1;
    }
}

/* Clase para aplicar la animación del logo principal */
.main-logo.logo-animate-up {
    animation: logoMoveUp 0.8s ease-in-out forwards;
}

/* ANIMACIONES PARA RIFA INTRO */

/* Intro de rifa - Logo y textos */
/* Contenedor del logo (permanece fijo en la parte superior) */
.rifa-logo-container {
    position: relative;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    margin: 0;
    height: auto;
    min-height: 0;
    opacity: 0;
}

.rifa-intro-logo {
    width: 384px;
    max-width: 80%;
    margin-bottom: 0;
    filter: drop-shadow(0 0 15px var(--neon-cyan));
}

/* Animación fade-in para el logo */
.rifa-logo-container.fade-in-logo {
    animation: fadeInLogo 0.6s ease-in forwards;
}

@keyframes fadeInLogo {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}


/* Efecto de aparición para el título SISTEMA DE RIFA */
.rifa-title-typing {
    opacity: 0;
    white-space: nowrap;
    margin: 50px 0;
    pointer-events: auto;
}

.rifa-title-typing.fade-in-title {
    animation: fadeInTitle 0.6s ease-in forwards 0.2s;
}

/* Animación fade-in para el título */
@keyframes fadeInTitle {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Contenido principal con fade-in */
.rifa-content {
    transition: opacity 1s ease-in-out;
    opacity: 0;
}

.rifa-content.fade-in {
    animation: fadeInContent 0.6s ease-in forwards 0.4s;
}

/* Animación fade-in para el contenido */
@keyframes fadeInContent {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* RESPONSIVE - Rifa Logo Container y Intro */
@media (max-width: 768px) {
    .rifa-logo-container {
        padding: 15px;
    }

    .rifa-intro-logo {
        width: 280px;
    }
}

@media (max-width: 480px) {
    .rifa-logo-container {
        padding: 12px;
    }

    .rifa-intro-logo {
        width: 200px;
    }
}

/* RESPONSIVE - Logo */
@media (max-width: 768px) {
    .logo-img {
        height: 40px;
    }
}

@media (max-width: 480px) {
    .logo-img {
        height: 35px;
    }
}

.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.nav-links > li {
    display: flex;
    align-items: center;
}

/* [hidden] debe prevalecer: .nav-links > li { display:flex } anulaba el oculto del ítem WebApps en escritorio */
.nav-links > li[hidden] {
    display: none !important;
}

.nav-links a { color: var(--white); text-decoration: none; transition: 0.3s; font-size: 0.9rem; }
.nav-links a:hover { color: var(--neon-cyan); }

/* CTA Contacto: Cobalt primario, hover/active en Cian (manual digital) */
.nav-links a.btn-contacto {
    padding: 10px 18px;
    border-radius: 10px;
    background: var(--cobalt-blue);
    color: var(--white);
    border: 1px solid rgba(0, 255, 255, 0.35);
    font-weight: 600;
}

.nav-links a.btn-contacto:hover {
    background: var(--neon-cyan);
    color: var(--dark-gray);
    border-color: var(--neon-cyan);
}

/* RESPONSIVE - Nav Links */
@media (max-width: 768px) {
    .nav-links { gap: 15px; }
    .nav-links a { font-size: 0.8rem; }
}

@media (max-width: 480px) {
    .nav-links { gap: 10px; }
    .nav-links a { font-size: 0.7rem; }
}

/* DROPDOWN MENU */
.dropdown {
    position: relative;
}

.dropdown-btn {
    background: none;
    border: none;
    color: var(--white);
    text-decoration: none;
    transition: 0.3s;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}

.dropdown-btn:hover {
    color: var(--neon-cyan);
}

.dropdown-btn.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* RESPONSIVE - Dropdown Button */
@media (max-width: 768px) {
    .dropdown-btn {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .dropdown-btn {
        font-size: 0.7rem;
    }
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--black);
    border: 1px solid var(--cobalt-blue);
    border-radius: 5px;
    min-width: 150px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    display: none;
    z-index: 1001;
    margin-top: 5px;
}

/* RESPONSIVE - Dropdown Menu */
@media (max-width: 768px) {
    .dropdown-menu {
        min-width: 130px;
    }
}

@media (max-width: 480px) {
    .dropdown-menu {
        min-width: 110px;
        right: -10px;
    }
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 12px 20px;
    color: var(--white);
    text-decoration: none;
    transition: 0.3s;
    border-bottom: 1px solid rgba(0, 71, 171, 0.6);
}

/* RESPONSIVE - Dropdown Item */
@media (max-width: 768px) {
    .dropdown-item {
        padding: 10px 15px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .dropdown-item {
        padding: 8px 12px;
        font-size: 0.7rem;
    }
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: var(--dark-gray);
    color: var(--neon-cyan);
}

.auth-nav-item {
    display: flex;
    align-items: center;
}

/* Login + Registro pegados; misma línea base que enlaces del header */
.auth-nav-pair {
    gap: 4px;
    margin: 0;
    padding: 0;
}

/* Botones auth: ~30% más compactos que la versión anterior; alineados con .btn-contacto */
.btn-auth {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
    padding: 7px 11px;
    border-radius: 7px;
    font-family: "Inter", sans-serif;
    font-size: calc(0.9rem * 0.7);
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    vertical-align: middle;
}

.btn-auth:focus-visible {
    outline: 2px solid var(--neon-cyan);
    outline-offset: 2px;
}

.btn-auth--login {
    background: var(--cobalt-blue);
    color: var(--white);
    border: 1px solid rgba(0, 255, 255, 0.4);
    box-shadow: 0 0 0 1px rgba(0, 71, 171, 0.35);
}

.btn-auth--login:hover {
    background: var(--neon-cyan);
    color: var(--dark-gray);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 14px rgba(0, 255, 255, 0.25);
}

.btn-auth--register {
    background: transparent;
    color: var(--white);
    border: 1px solid rgba(0, 255, 255, 0.45);
}

.btn-auth--register:hover {
    background: rgba(0, 255, 255, 0.08);
    color: var(--neon-cyan);
    border-color: var(--neon-cyan);
}

.btn-auth--logout {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid rgba(160, 160, 160, 0.45);
    font-weight: 500;
}

.btn-auth--logout:hover {
    color: var(--white);
    border-color: var(--accent-orange);
}

@media (max-width: 768px) {
    .btn-auth {
        padding: 6px 9px;
        font-size: calc(0.8rem * 0.7);
    }

    .auth-nav-pair {
        gap: 3px;
    }
}

@media (max-width: 480px) {
    .btn-auth {
        padding: 5px 7px;
        font-size: calc(0.72rem * 0.7);
    }

    .auth-nav-pair {
        gap: 2px;
    }
}

.auth-greeting {
    color: var(--text-body);
    font-size: 0.85rem;
    white-space: nowrap;
}

/* Botón hamburguesa: solo móvil */
.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0;
    border: 1px solid rgba(0, 255, 255, 0.45);
    border-radius: 10px;
    background: var(--dark-gray);
    color: var(--white);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.nav-toggle:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

.nav-toggle:focus-visible {
    outline: 2px solid var(--neon-cyan);
    outline-offset: 2px;
}

.nav-toggle__icon {
    font-size: 1.35rem;
    line-height: 1;
}

@media screen and (max-width: 768px) {
    .nav-toggle {
        display: inline-flex;
    }
}

/* Escritorio: hamburguesa oculta, logo de barra visible, logo del panel lateral oculto */
@media screen and (min-width: 769px) {
    .nav-toggle#hamburger-menu,
    #hamburger-menu.nav-toggle {
        display: none !important;
    }

    .nav-logo--bar {
        display: flex !important;
    }

    .mobile-sidebar__logo-wrap {
        display: none !important;
    }
}

/* Overlay + sidebar móvil (slide-in desde la derecha) */
.nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 11000;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease;
    pointer-events: none;
}

body.nav-active .nav-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

body.nav-active {
    overflow: hidden;
}

.mobile-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 11001;
    width: min(320px, 88vw);
    height: 100%;
    height: 100dvh;
    max-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--black);
    border-right: 2px solid var(--cobalt-blue);
    box-shadow: 12px 0 36px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
}

body.nav-active .mobile-sidebar {
    transform: translateX(0);
}

/* Cabecera del panel: logo amplio + cerrar (sin título "Menú") */
.mobile-sidebar__top {
    position: relative;
    flex-shrink: 0;
    padding: 20px 52px 16px 18px;
    border-bottom: 1px solid rgba(0, 71, 171, 0.65);
}

/* Logo dentro del panel (solo móvil; oculto en escritorio) */
.mobile-sidebar__logo-wrap {
    display: none;
    padding: 0;
    text-align: center;
    border-bottom: none;
}

@media screen and (max-width: 768px) {
    .mobile-sidebar__logo-wrap {
        display: block;
    }
}

.mobile-sidebar__logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.mobile-sidebar__logo-img {
    display: block;
    height: 52px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.35));
}

.mobile-sidebar__close {
    position: absolute;
    top: 14px;
    right: 12px;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid var(--cobalt-blue);
    background: transparent;
    color: var(--white);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    z-index: 1;
}

.mobile-sidebar__close:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

.mobile-sidebar__nav {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-sidebar__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-sidebar__list--bottom {
    margin-top: auto;
    padding: 16px 0 calc(20px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(0, 71, 171, 0.35);
}

.mobile-sidebar__list > li {
    margin: 0;
    padding: 0;
}

.mobile-sidebar__link {
    display: block;
    padding: 14px 22px;
    color: var(--white);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(0, 71, 171, 0.35);
    transition: background 0.2s ease, color 0.2s ease;
}

.mobile-sidebar__link:hover,
.mobile-sidebar__link:focus-visible {
    background: var(--dark-gray);
    color: var(--neon-cyan);
    outline: none;
}

.mobile-sidebar__link--cta {
    margin: 8px 16px 0;
    margin-bottom: 4px;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid rgba(0, 255, 255, 0.35);
    background: var(--cobalt-blue);
    text-align: center;
}

.mobile-sidebar__link--cta:hover {
    background: var(--neon-cyan);
    color: var(--dark-gray);
}

.mobile-sidebar__block {
    flex-shrink: 0;
    padding-top: 8px;
}

.mobile-sidebar__label {
    display: block;
    padding: 12px 22px 6px;
    font-size: 0.7rem;
    font-family: "Roboto Mono", monospace;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    text-transform: uppercase;
}

.mobile-sidebar__sublist {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-sidebar__sublist .mobile-sidebar__link {
    padding-left: 28px;
    font-weight: 500;
    font-size: 0.9rem;
}

.auth-message {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 2000;
    min-width: 240px;
    max-width: 420px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--cobalt-blue);
    background: rgba(33, 33, 33, 0.95);
    color: var(--white);
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.auth-message.show {
    opacity: 1;
    transform: translateY(0);
}

.auth-message.success {
    border-color: var(--neon-cyan);
    background: rgba(18, 108, 54, 0.92);
    color: #dcffe9;
}

.auth-message.error {
    border-color: var(--accent-orange);
    background: rgba(144, 24, 24, 0.94);
    color: #ffe5e5;
}

.auth-message.info {
    border-color: var(--cobalt-blue);
    background: rgba(0, 71, 171, 0.92);
    color: #e8f2ff;
}

.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 60000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.auth-modal[hidden] {
    display: none !important;
}

.auth-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
}

.auth-modal-dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 540px;
    border: 1px solid var(--cobalt-blue);
    border-radius: 14px;
    background: var(--dark-gray);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    padding: 18px;
}

.auth-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.auth-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--cobalt-blue);
    background: transparent;
    color: var(--white);
    font-size: 1.4rem;
    cursor: pointer;
}

.auth-modal-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.auth-modal-tabs[hidden] {
    display: none !important;
}

.auth-tab {
    flex: 1;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--cobalt-blue);
    background: transparent;
    color: var(--white);
    cursor: pointer;
}

.auth-tab.active {
    background: var(--cobalt-blue);
    border-color: var(--neon-cyan);
}

.auth-form {
    display: block;
}

.auth-form[hidden] {
    display: none !important;
}

.protected-link.protected-disabled {
    opacity: 0.55;
    pointer-events: auto;
}

/* HERO SECTION - LOGO PROTAGONISTA */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: radial-gradient(circle, #0047AB22 0%, #212121 100%);
    padding: 20px;
}

.main-logo {
    width: 384px; /* Tamaño imponente */
    max-width: 80%;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 15px var(--neon-cyan));
}

/* RESPONSIVE - Main Logo */
@media (max-width: 768px) {
    .main-logo {
        width: 280px;
    }
}

@media (max-width: 480px) {
    .main-logo {
        width: 200px;
        margin-bottom: 15px;
    }
}

.glitch-text {
    font-size: 3rem;
    color: var(--text-heading);
    letter-spacing: 5px;
    margin-bottom: 10px;
    text-shadow:
        0 0 20px rgba(0, 255, 255, 0.45),
        0 0 40px rgba(0, 71, 171, 0.35);
}

/* RESPONSIVE - Glitch Text */
@media (max-width: 768px) {
    .glitch-text {
        font-size: 2.2rem;
        letter-spacing: 3px;
    }
}

@media (max-width: 480px) {
    .glitch-text {
        font-size: 1.6rem;
        letter-spacing: 2px;
        margin-bottom: 8px;
    }
}

.subtitle {
    color: var(--text-muted);
    font-family: 'Roboto Mono', monospace;
    font-size: 1.1rem;
    max-width: 700px;
}

/* RESPONSIVE - Subtitle */
@media (max-width: 768px) {
    .subtitle {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .subtitle {
        font-size: 0.8rem;
    }
}

/* SECCIONES DE CONTENIDO */
section { padding: 100px 10%; }

.section-title {
    color: var(--text-heading);
    margin-bottom: 50px;
    border-left: 5px solid var(--neon-cyan);
    padding-left: 15px;
}

/* RESPONSIVE - Section Title */
@media (max-width: 768px) {
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 40px;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 30px;
        border-left-width: 4px;
    }
}

/* CARDS GENÉRICAS */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

/* RESPONSIVE - Cards Container */
@media (max-width: 768px) {
    .cards-container {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .cards-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

.card {
    background: var(--dark-gray);
    border: 1px solid var(--cobalt-blue);
    padding: 30px;
    border-radius: 15px; /* Redondeado según Guidelines */
    transition: 0.3s ease-in-out;
}

a.card.spa-page-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* RESPONSIVE - Card */
@media (max-width: 480px) {
    .card {
        padding: 20px;
        border-radius: 10px;
    }
}

.card:hover {
    border-color: var(--neon-cyan);
    transform: translateY(-10px);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.1);
}

.card h3 {
    color: var(--text-heading);
    margin: 15px 0;
    font-size: 1.2rem;
}

/* Cuerpo: gris claro; énfasis en blanco (no todo cian) */
.content-section p,
.card p {
    color: var(--text-body);
    line-height: 1.75;
}

.content-section p strong,
.card p strong {
    color: var(--text-heading);
    font-weight: 700;
}

.card-tag {
    display: inline-block;
    color: var(--text-muted);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    margin-bottom: 8px;
}

/* SERVICIOS (tarjetas compartidas por Inicio y la página de Servicios) */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.service-card {
    position: relative;
    background: linear-gradient(155deg, rgba(0, 71, 171, 0.14), rgba(33, 33, 33, 0.96));
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 15px;
    padding: 24px 20px;
    box-shadow: 0 0 0 1px rgba(0, 71, 171, 0.25), 0 10px 28px rgba(0, 0, 0, 0.28);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.service-card:hover {
    transform: translateY(-6px);
    border-color: rgba(0, 255, 255, 0.55);
    box-shadow: 0 0 18px rgba(0, 255, 255, 0.15), 0 12px 30px rgba(0, 0, 0, 0.34);
}

.service-card--link {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.service-card--link:focus-visible {
    outline: 2px solid var(--neon-cyan);
    outline-offset: 2px;
}

.service-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    border-radius: 10px;
    background: rgba(0, 71, 171, 0.35);
    color: var(--neon-cyan);
    font-size: 1rem;
}

.service-card h3 {
    color: var(--text-heading);
    margin: 6px 0 10px;
    font-size: 1.08rem;
}

.service-card p {
    color: var(--text-body);
    line-height: 1.68;
    margin: 0;
}

/* Cuatro accesos en Inicio: 4 / 2 / 1 columnas, nunca 3 + 1 */
.services-grid--four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1200px) {
    .services-grid--four {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .services-grid--four {
        grid-template-columns: 1fr;
    }
}

.services-grid--compact .service-card {
    padding: 20px 18px;
}

.services-grid--compact .service-card h3 {
    font-size: 1rem;
}

.services-grid--compact .service-card p {
    font-size: 0.93rem;
    line-height: 1.58;
}

.svc-home-more {
    display: inline-block;
    margin-top: 14px;
    color: var(--neon-cyan);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.service-icon svg {
    display: block;
}

/* INICIO: hero con invitación a explorar + bloques de recorrido */
/* .hero.home-hero: gana a la regla móvil genérica de .hero (100dvh + padding corto) */
.hero.home-hero {
    position: relative;
    overflow: hidden;
    height: auto;
    /* Altura visible bajo el navbar sticky, para que «Explorar» quede a la vista */
    min-height: calc(100vh - 92px);
    min-height: calc(100svh - 92px);
    padding: 48px 20px 96px;
}

.home-hero__bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(0, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 48px 48px;
    -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 72%);
    mask-image: radial-gradient(ellipse at center, #000 20%, transparent 72%);
}

.home-hero__bg::before,
.home-hero__bg::after {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
    animation: homeGlow 14s ease-in-out infinite alternate;
}

.home-hero__bg::before {
    top: 8%;
    left: 12%;
    background: var(--cobalt-blue);
}

.home-hero__bg::after {
    bottom: 6%;
    right: 10%;
    background: rgba(0, 255, 255, 0.45);
    animation-delay: -7s;
}

@keyframes homeGlow {
    from {
        transform: translate(0, 0) scale(1);
    }
    to {
        transform: translate(40px, -30px) scale(1.15);
    }
}

.home-hero__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Entrada escalonada: logo → nombre → eslogan → invitación */
.home-hero__content > * {
    animation: homeRise 0.7s ease-out both;
}

.home-hero__content > :nth-child(2) { animation-delay: 0.12s; }
.home-hero__content > :nth-child(3) { animation-delay: 0.24s; }
.home-hero__content > :nth-child(4) { animation-delay: 0.38s; }
.home-hero__content > :nth-child(5) { animation-delay: 0.5s; }
.home-hero__content > :nth-child(6) { animation-delay: 0.62s; }

@keyframes homeRise {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.home-hero__lead {
    max-width: 46ch;
    margin: 26px auto 0;
    color: var(--text-body);
    font-size: 1.12rem;
    line-height: 1.65;
}

.home-hero__lead strong {
    color: var(--text-heading);
}

.home-hero__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 26px;
}

.home-hero__actions .svc-btn {
    min-width: 180px;
    padding: 12px 22px;
}

.home-hero__scroll {
    position: absolute;
    left: 50%;
    bottom: 22px;
    z-index: 1;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: var(--text-muted);
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    text-decoration: none;
    transition: color 0.2s ease;
}

.home-hero__scroll svg {
    color: var(--neon-cyan);
    animation: homeNudge 1.8s ease-in-out infinite;
}

.home-hero__scroll:hover,
.home-hero__scroll:focus-visible {
    color: var(--neon-cyan);
}

@keyframes homeNudge {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

/* Bloques del recorrido: menos aire vertical que una sección suelta */
.home-block {
    padding-top: 80px;
    padding-bottom: 80px;
}

/* Al llegar desde «Explorar», el bloque empieza justo bajo el navbar sticky */
.home-block[id] {
    scroll-margin-top: 92px;
}

.home-block + .home-block {
    padding-top: 40px;
}

.home-block--band {
    padding-top: 80px !important;
    background: linear-gradient(180deg, rgba(0, 71, 171, 0.08), rgba(0, 71, 171, 0.02));
    border-top: 1px solid rgba(0, 71, 171, 0.35);
    border-bottom: 1px solid rgba(0, 71, 171, 0.35);
}

.home-block--band + .home-block {
    padding-top: 80px;
}

.content-section .home-block__lead {
    max-width: 70ch;
    margin: -24px 0 28px;
    font-size: 1.05rem;
}

.home-block__more {
    margin: 26px 0 0;
}

.home-link {
    color: var(--neon-cyan);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
}

.home-link:hover,
.home-link:focus-visible {
    text-decoration: underline;
}

/* ¿Qué le está pasando? */
.home-problems {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.home-problem {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 12px;
    background: linear-gradient(155deg, rgba(0, 71, 171, 0.14), rgba(33, 33, 33, 0.96));
    color: var(--text-heading);
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.35;
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.home-problem .service-icon {
    flex: 0 0 auto;
    margin-bottom: 0;
}

.home-problem__text {
    flex: 1 1 auto;
}

.home-problem__arrow {
    color: var(--neon-cyan);
    transition: transform 0.2s ease;
}

.home-problem:hover,
.home-problem:focus-visible {
    transform: translateY(-3px);
    border-color: rgba(0, 255, 255, 0.55);
    box-shadow: 0 0 18px rgba(0, 255, 255, 0.12);
}

.home-problem:hover .home-problem__arrow,
.home-problem:focus-visible .home-problem__arrow {
    transform: translateX(4px);
}

.home-problem:focus-visible {
    outline: 2px solid var(--neon-cyan);
    outline-offset: 2px;
}

/* ¿Por qué Chino PC Master? */
.home-values {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

.home-value {
    border-left: 2px solid rgba(0, 71, 171, 0.85);
    padding: 2px 0 2px 18px;
}

.home-value h3 {
    margin: 12px 0 6px;
    color: var(--text-heading);
    font-size: 1.05rem;
}

.content-section .home-value p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

.home-value a {
    color: var(--neon-cyan);
    white-space: nowrap;
}

/* Trabajos que ya funcionan */
.home-works {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 20px;
}

.home-work {
    display: flex;
    flex-direction: column;
}

.home-work .svc-home-more {
    margin-top: auto;
    padding-top: 14px;
}

.home-work--featured {
    padding: 0;
    overflow: hidden;
}

.home-work__media {
    aspect-ratio: 16 / 8;
    overflow: hidden;
    border-bottom: 1px solid rgba(0, 255, 255, 0.18);
    background: #1a1a1a;
}

.home-work__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top left;
    display: block;
    transition: transform 0.4s ease;
}

.home-work--featured:hover .home-work__media img {
    transform: scale(1.03);
}

.home-work__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 20px 20px 22px;
}

.home-works--two { grid-template-columns: 2fr 1fr; }

/* Rifas Digitales, protagonista de «Trabajos que ya funcionan» */
.home-spotlight {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(20px, 4vw, 48px);
    margin: 0 0 24px;
    padding: clamp(22px, 4vw, 40px);
    border: 1px solid var(--neon-cyan);
    border-radius: 14px;
    background:
        radial-gradient(circle at 85% 20%, rgba(0, 255, 255, 0.14), transparent 55%),
        linear-gradient(150deg, rgba(0, 71, 171, 0.35), rgba(20, 20, 20, 0.95));
    box-shadow: 0 0 28px rgba(0, 255, 255, 0.16);
}

.home-spotlight h3 {
    margin: 6px 0 8px;
    color: var(--text-heading);
    font-size: clamp(1.6rem, 4vw, 2.3rem);
}

.home-spotlight__lead {
    margin: 0 0 14px;
    color: var(--text-body);
    font-size: 1.05rem;
    line-height: 1.6;
}

.home-spotlight__list {
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.home-spotlight__list li {
    position: relative;
    padding-left: 22px;
    color: var(--text-body);
    line-height: 1.55;
}

.home-spotlight__list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--neon-cyan);
    font-weight: 700;
}

.home-spotlight__price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
    margin: 0 0 18px;
}

.home-spotlight__amount {
    color: var(--neon-cyan);
    font-size: clamp(2rem, 5vw, 2.6rem);
    font-weight: 800;
    line-height: 1;
}

.home-spotlight__unit {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.home-spotlight__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.home-spotlight__phone {
    margin: 14px 0 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.home-spotlight__phone a {
    color: var(--neon-cyan);
    text-decoration: none;
    white-space: nowrap;
}

.home-spotlight__media {
    display: block;
    justify-self: center;
    width: min(100%, 290px);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.55);
    transform: rotate(2deg);
    transition: transform 0.3s ease;
}

.home-spotlight__media:hover,
.home-spotlight__media:focus-visible { transform: rotate(0deg) scale(1.02); }

.home-spotlight__media img {
    display: block;
    width: 100%;
    height: auto;
}

.home-spotlight__media--video,
.home-spotlight__media--video:hover {
    margin: 0;
    overflow: visible;
    box-shadow: none;
    transform: none;
}

.home-spotlight__media--video .rd-video__player {
    box-shadow: 0 0 22px rgba(0, 255, 255, 0.14), 0 14px 38px rgba(0, 0, 0, 0.55);
}

.home-spotlight__media--video .rd-video__credit { text-align: center; }

@media (max-width: 760px) {
    .home-spotlight { grid-template-columns: 1fr; }
    .home-spotlight__media { width: min(70%, 240px); }
    .home-spotlight__media--video { width: min(100%, 290px); }
}

@media (prefers-reduced-motion: reduce) {
    .home-spotlight__media,
    .home-spotlight__media:hover { transform: none; }
}

/* «Escríbame por»: WhatsApp, Instagram y Messenger en la bienvenida */
.home-contact {
    margin-top: 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.content-section .home-contact__label,
.home-contact__label {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.home-contact__list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.home-contact__btn {
    --home-brand: var(--neon-cyan);
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 16px 9px 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-heading);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.home-contact__btn img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.home-contact__btn--whatsapp { --home-brand: #25d366; }
.home-contact__btn--instagram { --home-brand: #e1306c; }
.home-contact__btn--messenger { --home-brand: #0099ff; }

.home-contact__btn:hover,
.home-contact__btn:focus-visible {
    border-color: var(--home-brand);
    background: color-mix(in srgb, var(--home-brand) 12%, transparent);
    box-shadow: 0 0 16px color-mix(in srgb, var(--home-brand) 30%, transparent);
    transform: translateY(-2px);
}

.home-contact__btn:focus-visible {
    outline: 2px solid var(--home-brand);
    outline-offset: 2px;
}

/* Sígame y escríbame: una tarjeta por red */
.home-socials {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.home-social {
    --home-brand: var(--neon-cyan);
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 24px 22px 22px;
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 15px;
    background: linear-gradient(155deg, rgba(0, 71, 171, 0.14), rgba(33, 33, 33, 0.96));
    box-shadow: 0 0 0 1px rgba(0, 71, 171, 0.25), 0 10px 28px rgba(0, 0, 0, 0.28);
    overflow: hidden;
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

/* Franja superior con el color de cada red */
.home-social::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--home-brand);
}

.home-social--whatsapp { --home-brand: #25d366; }
.home-social--facebook { --home-brand: #1877f2; }
.home-social--instagram { --home-brand: #e1306c; }

.home-social--instagram::before {
    background: linear-gradient(90deg, #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5);
}

.home-social:hover {
    transform: translateY(-6px);
    border-color: color-mix(in srgb, var(--home-brand) 60%, transparent);
    box-shadow: 0 0 18px color-mix(in srgb, var(--home-brand) 18%, transparent), 0 12px 30px rgba(0, 0, 0, 0.34);
}

.home-social__head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.home-social__head img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    flex: 0 0 auto;
}

.home-social h3 {
    margin: 0;
    color: var(--text-heading);
    font-size: 1.1rem;
}

.content-section .home-social__handle {
    margin: 2px 0 0;
    color: var(--neon-cyan);
    font-size: 0.85rem;
}

.content-section .home-social__text {
    margin: 14px 0 18px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.home-social__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
}

.home-social__actions .svc-btn {
    flex: 1 1 auto;
}

.content-section .home-socials__foot {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.home-socials__foot a {
    color: var(--neon-cyan);
}

@media (max-width: 1100px) {
    .home-socials {
        grid-template-columns: 1fr;
    }
    .home-social__actions .svc-btn {
        flex: 0 1 auto;
    }
}

@media (max-width: 1200px) {
    .home-problems {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .home-values {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .home-works {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .home-work--featured {
        grid-column: 1 / -1;
    }
    .home-works.home-works--two {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero.home-hero {
        padding: 36px 20px 88px;
    }
    .home-hero__lead {
        font-size: 1rem;
    }
    .home-block {
        padding-top: 56px;
        padding-bottom: 56px;
    }
    .home-block--band,
    .home-block--band + .home-block {
        padding-top: 56px !important;
    }
    .content-section .home-block__lead {
        margin-top: -16px;
    }
}

@media (max-width: 600px) {
    .home-problems,
    .home-values,
    .home-works {
        grid-template-columns: 1fr;
    }
    .hero.home-hero {
        padding: 24px 16px 76px;
    }
    .home-hero__lead {
        margin-top: 16px;
    }
    .home-hero__actions {
        width: 100%;
        flex-wrap: nowrap;
        margin-top: 20px;
    }
    .home-hero__actions .svc-btn {
        flex: 1 1 0;
        min-width: 0;
        padding: 12px 10px;
    }
    /* Las tres redes en una sola fila en el celular */
    .home-contact__list {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }
    .home-contact__btn {
        justify-content: center;
        gap: 6px;
        padding: 9px 6px;
        font-size: 0.8rem;
    }
    .home-contact__btn img {
        width: 18px;
        height: 18px;
    }
    .home-hero__bg::before,
    .home-hero__bg::after {
        width: 260px;
        height: 260px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-hero__content > *,
    .home-hero__bg::before,
    .home-hero__bg::after,
    .home-hero__scroll svg {
        animation: none;
    }
}

/* SERVICIOS (página completa) */
.svc-page [id] {
    /* El navbar es sticky: que las anclas no queden tapadas */
    scroll-margin-top: 110px;
}

.svc-hero {
    max-width: 78ch;
    margin: -24px 0 28px;
}

.svc-hero p {
    margin: 0 0 10px;
}

.content-section .svc-hero__lead {
    font-size: 1.2rem;
    color: var(--text-heading);
}

.content-section .svc-hero__lead strong {
    color: var(--neon-cyan);
}

.svc-hero__hint {
    font-size: 1.02rem;
}

.content-section .svc-hero__trust {
    margin-top: 16px;
    color: var(--text-muted);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.svc-hero__trust span {
    color: var(--neon-cyan);
    margin: 0 6px;
}

/* Índice de categorías */
.svc-index {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.svc-index__link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px 9px 10px;
    border: 1px solid rgba(0, 255, 255, 0.25);
    border-radius: 999px;
    background: rgba(0, 71, 171, 0.14);
    color: var(--text-heading);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-decoration: none;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.svc-index__link:hover,
.svc-index__link:focus-visible {
    border-color: var(--neon-cyan);
    background: rgba(0, 255, 255, 0.08);
    transform: translateY(-2px);
}

.svc-index__link:focus-visible {
    outline: 2px solid var(--neon-cyan);
    outline-offset: 2px;
}

.svc-index__icon {
    display: inline-flex;
    color: var(--neon-cyan);
}

.svc-index__num {
    color: var(--accent-orange);
    margin-right: 8px;
}

/* Categoría */
.svc-category {
    margin-top: 56px;
}

.svc-category__head {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(0, 71, 171, 0.6);
}

.svc-category__icon {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    margin: 2px 0 0;
    border-radius: 12px;
}

.svc-category__icon svg {
    width: 24px;
    height: 24px;
}

.svc-category__title {
    margin: 2px 0 8px;
    color: var(--neon-cyan);
    font-family: "Orbitron", sans-serif;
    font-size: 1.45rem;
    letter-spacing: 0.02em;
    line-height: 1.25;
}

.svc-category__lead {
    margin: 0;
    max-width: 78ch;
}

.svc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 20px;
}

/* Tarjeta de servicio: pregunta (gancho) → qué hago → qué incluye → solicitar */
.svc-item {
    display: flex;
    flex-direction: column;
}

.svc-item__top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.svc-item__top .service-icon {
    margin-bottom: 0;
}

.svc-item__top .card-tag {
    margin-bottom: 0;
    color: var(--neon-cyan);
}

.svc-item__question {
    margin: 14px 0 10px;
    color: var(--text-heading);
    font-size: 1.12rem;
    line-height: 1.4;
}

.service-card.svc-item p {
    margin: 0;
}

.service-card.svc-item .svc-item__includes {
    margin: 16px 0 8px;
    color: var(--text-muted);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.svc-item__list {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.svc-item__list li {
    position: relative;
    padding-left: 18px;
    color: var(--text-body);
    font-size: 0.93rem;
    line-height: 1.55;
}

.svc-item__list li::before {
    content: "›";
    position: absolute;
    left: 2px;
    top: -1px;
    color: var(--neon-cyan);
    font-weight: 700;
}

.svc-item__list a {
    color: var(--neon-cyan);
}

.svc-item__cta,
.svc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 10px 18px;
    border: 1px solid var(--neon-cyan);
    border-radius: 6px;
    color: var(--neon-cyan);
    background: transparent;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.svc-item__cta {
    margin-top: auto;
    align-self: flex-start;
}

.svc-item__cta img,
.svc-btn img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.svc-item__cta:hover,
.svc-item__cta:focus-visible,
.svc-btn--primary,
.svc-btn--ghost:hover,
.svc-btn--ghost:focus-visible {
    background: var(--neon-cyan);
    color: var(--dark-gray);
}

.svc-btn--primary:hover,
.svc-btn--primary:focus-visible {
    background: transparent;
    color: var(--neon-cyan);
}

.svc-item__cta:focus-visible,
.svc-btn:focus-visible {
    outline: 2px solid var(--neon-cyan);
    outline-offset: 2px;
}

/* ¿Cómo trabajo? */
.svc-steps-wrap {
    margin-top: 64px;
}

.svc-steps {
    list-style: none;
    margin: 18px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

@media (max-width: 1100px) {
    .svc-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .svc-steps {
        grid-template-columns: 1fr;
    }
}

.svc-step {
    border-left: 2px solid rgba(0, 71, 171, 0.85);
    padding: 4px 0 4px 18px;
}

.svc-step__num {
    display: block;
    color: var(--accent-orange);
    font-family: "Orbitron", sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
}

.svc-step h4 {
    margin: 6px 0;
    color: var(--text-heading);
    font-size: 1.02rem;
}

.svc-step p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Llamado final */
.svc-final-cta {
    margin-top: 56px;
    padding: 26px 24px;
    border: 1px solid rgba(0, 71, 171, 0.45);
    border-radius: 14px;
    background: linear-gradient(160deg, rgba(0, 71, 171, 0.13), rgba(33, 33, 33, 0.95));
}

.svc-final-cta h3 {
    margin: 0 0 8px;
    color: var(--text-heading);
    font-size: 1.3rem;
}

.svc-final-cta p {
    margin: 0;
    max-width: 70ch;
}

.svc-final-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

@media (max-width: 768px) {
    .svc-hero {
        margin-top: -16px;
    }
    .content-section .svc-hero__lead {
        font-size: 1.08rem;
    }
    .svc-category {
        margin-top: 44px;
    }
    .svc-category__title {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .svc-hero {
        margin-top: -10px;
    }
    .svc-index__link {
        flex: 1 1 100%;
    }
    .svc-category__head {
        gap: 12px;
    }
    .svc-category__icon {
        width: 40px;
        height: 40px;
    }
    .svc-category__title {
        font-size: 1.08rem;
    }
    .svc-final-cta {
        padding: 20px 16px;
    }
    .svc-btn {
        flex: 1 1 100%;
    }
}


/* RESPONSIVE - Card Heading */
@media (max-width: 480px) {
    .card h3 {
        font-size: 1rem;
        margin: 10px 0;
    }
}

/* TRAYECTORIA / EXPERIENCE */
.log-item {
    margin-bottom: 40px;
    border-left: 2px solid rgba(0, 71, 171, 0.85);
    padding-left: 20px;
}

.log-item p {
    color: var(--text-body);
    line-height: 1.75;
}

.log-item p strong {
    color: var(--text-heading);
}

/* RESPONSIVE - Log Item */
@media (max-width: 768px) {
    .log-item {
        margin-bottom: 30px;
        padding-left: 15px;
    }
}

@media (max-width: 480px) {
    .log-item {
        margin-bottom: 20px;
        padding-left: 12px;
        border-left-width: 2px;
    }
}

/* Acento naranja puntual (jerarquía temporal, como “highlight” de marca) */
.date {
    color: var(--accent-orange);
    font-weight: bold;
}

/* CTA LinkedIn en Trayectoria */
.linkedin-container {
    margin-top: 34px;
    padding: 18px 20px;
    border: 1px solid rgba(0, 71, 171, 0.45);
    border-radius: 14px;
    background: linear-gradient(160deg, rgba(0, 71, 171, 0.13), rgba(33, 33, 33, 0.95));
}

.linkedin-aux-text {
    margin: 0 0 12px;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.linkedin-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    border: 1px solid rgba(0, 255, 255, 0.35);
    border-radius: 10px;
    background: rgba(0, 71, 171, 0.22);
    padding: 10px 14px;
    transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.linkedin-cta:hover {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 18px rgba(0, 255, 255, 0.22);
    transform: translateY(-2px);
}

.linkedin-icon {
    width: 24px;
    height: 24px;
    border-radius: 5px;
    object-fit: cover;
}

.linkedin-text {
    font-family: "Roboto Mono", monospace;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    color: var(--text-heading);
}

@media (max-width: 768px) {
    .linkedin-container {
        margin-top: 26px;
        padding: 14px;
    }
    .linkedin-cta {
        width: 100%;
        justify-content: center;
    }
    .linkedin-text {
        text-align: center;
        font-size: 0.75rem;
        line-height: 1.35;
    }
}

/* FORMULARIO DE CONTACTO */
.contact-container {
    max-width: 600px;
    margin: 0 auto;
}

.contact-form {
    background: var(--dark-gray);
    border: 1px solid var(--cobalt-blue);
    padding: 40px;
    border-radius: 15px;
}

/* RESPONSIVE - Contact Form */
@media (max-width: 768px) {
    .contact-form {
        padding: 30px;
    }
}

@media (max-width: 480px) {
    .contact-form {
        padding: 20px;
        border-radius: 10px;
    }
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: var(--text-heading);
    margin-bottom: 8px;
    font-weight: 600;
}

/* RESPONSIVE - Form Label */
@media (max-width: 480px) {
    .form-group label {
        font-size: 0.9rem;
    }
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    background-color: var(--dark-gray);
    border: 1px solid var(--cobalt-blue);
    border-radius: 8px;
    color: var(--white);
    font-family: 'Inter', sans-serif;
    transition: 0.3s;
}

/* RESPONSIVE - Form Inputs */
@media (max-width: 480px) {
    .form-group input,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 0.95rem;
    }
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

.form-group textarea {
    resize: vertical;
}

.btn-submit {
    width: 100%;
    padding: 12px;
    background: #0047AB;
    border: 1px solid var(--neon-cyan);
    color: var(--white);
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
    font-family: 'Inter', sans-serif;
}

/* RESPONSIVE - Submit Button */
@media (max-width: 480px) {
    .btn-submit {
        padding: 10px;
        font-size: 0.9rem;
        border-radius: 6px;
    }
}

.btn-submit:hover {
    background: #0047AB;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Arranque rifa: solo splash hasta datos listos; revelado 1.5s */
#rifa-app.rifa-booting .rifa-reveal-layer {
    opacity: 0;
    pointer-events: none;
}

#rifa-app.rifa-ready .rifa-reveal-layer {
    opacity: 1;
    pointer-events: auto;
    transition: opacity 1.5s ease;
}

#rifa-app.rifa-init-error .rifa-splash {
    display: none !important;
}

#rifa-app.rifa-init-error .rifa-reveal-layer {
    opacity: 1;
    pointer-events: auto;
    transition: none;
}

.rifa-splash {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--rifa-splash-inset-top);
    bottom: var(--rifa-splash-inset-bottom);
    /* Debajo del navbar (sticky, z-index 1000); el texto queda centrado solo en el área central */
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 24px;
    box-sizing: border-box;
    background: var(--dark-gray, #1a1a1a);
    opacity: 1;
    transition: opacity 1.5s ease;
    pointer-events: auto;
}

#rifa-app.rifa-ready:not(.rifa-init-error) .rifa-splash {
    opacity: 0;
    pointer-events: none;
}

#rifa-app.rifa-splash-done .rifa-splash {
    visibility: hidden;
}

.rifa-splash-img {
    display: block;
    width: min(280px, 52vw);
    height: auto;
    max-height: min(280px, 42vh);
    object-fit: contain;
}

.rifa-splash-error-text {
    margin: 0;
    text-align: center;
    color: var(--text-body, #e0e0e0);
    font-weight: bold;
    font-size: 1rem;
    line-height: 1.45;
    max-width: 36ch;
    padding: 0 16px;
}

/* ESTILO PARA APP DE RIFA */
.rifa-container {
    max-width: 1000px;
    margin: 0 auto;
}

.rifa-vista {
    display: none;
}

.rifa-vista.active {
    display: block;
}

.rifa-nav-buttons {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.btn-rifa-action {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    background: #0047AB;
    color: var(--white);
    border: 1px solid var(--neon-cyan);
    border-radius: 8px;
    cursor: pointer;
}

.btn-config-right {
    margin-left: auto;
}

.btn-icon {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.btn-rifa-action:hover {
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
    transform: translateY(-2px);
}

.btn-rifa-action .icon {
    font-size: 1.3rem;
}

/* RESPONSIVE - Mobile */
@media (max-width: 768px) {
    .rifa-nav-buttons {
        gap: 10px;
        margin-bottom: 25px;
    }

    .btn-rifa-action {
        padding: 10px 18px;
        font-size: 0.9rem;
        gap: 6px;
    }

    .btn-rifa-action .icon {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .rifa-nav-buttons {
        gap: 8px;
        margin-bottom: 20px;
    }

    .btn-rifa-action {
        padding: 10px 14px;
        font-size: 0.8rem;
        gap: 4px;
    }

    .btn-rifa-action .icon {
        font-size: 1rem;
    }

    .btn-rifa-action span:not(.icon) {
        display: none;
    }
}

.rifa-info {
    margin-bottom: 50px;
}

.config-card {
    background: var(--dark-gray);
    border: 1px solid var(--cobalt-blue);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    display: none;
}

.config-card h3 {
    color: var(--text-heading);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.config-info p {
    margin-bottom: 12px;
    line-height: 1.8;
}

.loading-indicator {
    text-align: center;
    padding: 40px;
    color: var(--text-body);
    font-weight: bold;
}

.error-message {
    color: var(--accent-orange);
    padding: 20px;
    background: rgba(255, 69, 0, 0.1);
    border-radius: 8px;
    text-align: center;
}

.numbers-grid-wrapper {
    margin-bottom: 50px;
}

.numbers-grid-wrapper h3 {
    color: var(--text-heading);
    margin-bottom: 20px;
}

.numbers-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 10px;
    padding: 20px;
    background: var(--rifa-fondo);
    border: 1px solid var(--rifa-primario);
    border-radius: 15px;
}

/* RESPONSIVE - Tablet: mantener 10 columnas hasta móvil */
@media (max-width: 1024px) {
    .numbers-grid {
        grid-template-columns: repeat(10, 1fr);
        gap: 8px;
        padding: 15px;
    }
}

/* RESPONSIVE - Móviles medianos */
@media (max-width: 768px) {
    .numbers-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
        padding: 15px;
    }
}

/* RESPONSIVE - Móviles pequeños */
@media (max-width: 480px) {
    .numbers-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
        padding: 10px;
    }
}

.number-btn {
    padding: 15px;
    border: 2px solid var(--rifa-primario);
    background-color: var(--rifa-secundario);
    color: var(--rifa-texto-cards);
    cursor: pointer;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1rem;
    transition: 0.3s ease;
    font-family: 'Roboto Mono', monospace;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
}

.number-btn.available:hover {
    background-color: var(--rifa-primario);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.4);
    transform: scale(1.1);
}

.number-btn.available.selected {
    animation: pulse 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.6);
    outline: 3px solid var(--rifa-resaltado);
}

.number-btn.reserved {
    background-color: #0047AB;
    color: var(--white);
    border-color: #0047AB;
    cursor: not-allowed;
}

.number-btn.paid {
    background-color: #FF4500;
    color: var(--white);
    border-color: #FF4500;
    cursor: not-allowed;
}

.number-btn.sold {
    background-color: #333;
    color: #666;
    cursor: not-allowed;
    opacity: 0.6;
    border-color: #555;
}

.number-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* RESPONSIVE - Número de botones */
@media (max-width: 768px) {
    .number-btn {
        font-size: 0.9rem;
        padding: 12px;
        min-height: 45px;
    }
}

@media (max-width: 480px) {
    .number-btn {
        font-size: 0.8rem;
        padding: 10px;
        min-height: 40px;
    }
}

/* PANEL DE SELECCIÓN */
.rifa-panel {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark-gray);
    border: 2px solid var(--cobalt-blue);
    padding: 30px;
    border-radius: 15px;
    box-shadow:
        0 0 0 1px rgba(0, 255, 255, 0.12),
        0 12px 40px rgba(0, 0, 0, 0.45);
    max-width: 400px;
    width: 90%;
    z-index: 500;
    animation: slideUp 0.3s ease;
}

@media (max-width: 768px) {
    .rifa-panel {
        padding: 20px;
        max-width: 90%;
        bottom: 20px;
    }
}

@media (max-width: 480px) {
    .rifa-panel {
        padding: 15px;
        bottom: 10px;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.rifa-panel h4 {
    color: var(--text-heading);
    margin-bottom: 20px;
    text-align: center;
}

.btn-cancelar {
    background: #0047AB;
    border: 1px solid var(--neon-cyan);
    color: var(--white);
    cursor: pointer;
    padding: 12px;
    border-radius: 8px;
    font-weight: bold;
    transition: 0.3s;
}

.btn-cancelar:hover {
    background: #0047AB;
}

/* Modal configuración hoja Config (por encima del logo y del resto de la rifa) */
.rifa-config-modal {
    position: fixed;
    inset: 0;
    z-index: 50000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.rifa-config-modal[hidden] {
    display: none !important;
}

.rifa-config-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    cursor: pointer;
}

.rifa-config-dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
    max-height: min(88vh, 820px);
    display: flex;
    flex-direction: column;
    color-scheme: dark;
    background: var(--dark-gray);
    border: 2px solid var(--cobalt-blue);
    border-radius: 15px;
    box-shadow:
        0 0 0 1px rgba(0, 255, 255, 0.12),
        0 16px 48px rgba(0, 0, 0, 0.5);
}

.rifa-config-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px 0;
}

.rifa-config-head h3 {
    margin: 0;
    color: var(--text-heading);
    font-size: 1.15rem;
}

.rifa-config-cerrar-x {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border: 1px solid var(--neon-cyan);
    border-radius: 8px;
    background: #0047ab;
    color: var(--white);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.rifa-config-cerrar-x:hover {
    box-shadow: 0 0 12px rgba(0, 255, 255, 0.35);
}

.rifa-config-hint {
    margin: 10px 20px 0;
    font-size: 0.85rem;
    color: var(--text-muted, #aaa);
    line-height: 1.4;
}

.rifa-config-fields {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px 8px;
    -webkit-overflow-scrolling: touch;
}

.rifa-config-fields .form-group {
    margin-bottom: 14px;
}

.rifa-config-fields .form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-heading);
    font-size: 0.9rem;
    font-weight: 600;
}

.rifa-config-fields .form-group input {
    width: 100%;
    box-sizing: border-box;
}

.rifa-config-field input[type="date"],
#rifa-config-fields input.rifa-cfg-date {
    max-width: 100%;
    padding: 10px 12px;
    padding-inline-end: 14px;
    border-radius: 8px;
    border: 1px solid var(--cobalt-blue);
    background: rgba(0, 0, 0, 0.25);
    color: var(--white);
    font-family: inherit;
    color-scheme: dark;
}

/*
 * Icono nativo del calendario (Chrome, Edge, Safari, Opera):
 * brightness(0) deja el glifo negro; invert(1) lo pasa a blanco.
 */
#rifa-app input[type="date"] { color-scheme: dark; }

.rifa-config-field input[type="date"]::-webkit-calendar-picker-indicator,
#rifa-config-fields input.rifa-cfg-date::-webkit-calendar-picker-indicator,
#rifa-config-modal input[type="date"]::-webkit-calendar-picker-indicator,
#rifa-app input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 1;
    width: 22px;
    height: 22px;
    padding: 2px;
    margin-left: 4px;
    filter: brightness(0) invert(1);
}

.rifa-config-date-preview {
    margin-top: 8px;
    font-size: 0.88rem;
    color: var(--text-muted, #aaa);
    line-height: 1.35;
}

.rifa-config-date-preview strong {
    color: var(--text-heading);
    font-weight: 600;
}

.rifa-config-input-corto {
    max-width: 100%;
}

.rifa-config-input-wa {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
}

.rifa-config-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 20px 20px;
    flex-shrink: 0;
}

.rifa-config-btn-primary,
.rifa-config-btn-secondary {
    width: 100%;
}

@media (min-width: 480px) {
    .rifa-config-actions {
        flex-direction: row;
    }

    .rifa-config-btn-primary,
    .rifa-config-btn-secondary {
        flex: 1;
    }
}

/* TABLA DE RIFA */
.rifa-table-wrapper {
    width: 100%;
    background: var(--dark-gray);
    border: 1px solid var(--cobalt-blue);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 50px;
}

.rifa-tabla {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 1rem;
}

.rifa-tabla thead tr {
    background-color: var(--cobalt-blue);
}

.rifa-tabla th {
    padding: 15px;
    color: var(--white);
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.rifa-tabla td {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(0, 71, 171, 0.6);
}

.rifa-tabla tbody tr:hover {
    background-color: rgba(0, 255, 255, 0.06);
}

.rifa-tabla tbody tr.estado-disponible {
    /* No hay color especial */
}

.rifa-tabla tbody tr.estado-reservado {
    /* Reservado */
}

.rifa-tabla tbody tr.estado-pagado {
    /* Pagado */
}

.rifa-tabla input[type="text"],
.rifa-tabla select {
    width: 100%;
    padding: 8px 12px;
    background-color: var(--dark-gray);
    border: 1px solid var(--cobalt-blue);
    border-radius: 5px;
    color: var(--white);
    font-family: 'Inter', sans-serif;
    transition: 0.3s;
    font-size: 0.95rem;
}

.rifa-tabla input[type="text"]:focus,
.rifa-tabla select:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.3);
}

/* RESPONSIVE - Mobile */
@media (max-width: 768px) {
    .rifa-tabla {
        font-size: 0.9rem;
    }

    .rifa-tabla th {
        padding: 12px;
        font-size: 0.75rem;
    }

    .rifa-tabla td {
        padding: 10px 12px;
    }

    .rifa-tabla input[type="text"],
    .rifa-tabla select {
        padding: 6px 10px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .rifa-table-wrapper {
        border-radius: 10px;
        margin-bottom: 30px;
    }

    .rifa-tabla {
        font-size: 0.8rem;
    }

    .rifa-tabla th {
        padding: 10px;
        font-size: 0.65rem;
    }

    .rifa-tabla td {
        padding: 8px 10px;
    }

    .rifa-tabla input[type="text"],
    .rifa-tabla select {
        padding: 5px 8px;
        font-size: 0.8rem;
    }
}

.num-badge {
    display: inline-block;
    background: var(--cobalt-blue);
    color: var(--white);
    padding: 6px 10px;
    border-radius: 6px;
    font-weight: bold;
    min-width: 30px;
    text-align: center;
}

.rifa-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 40px;
    margin-bottom: 50px;
}

/* RESPONSIVE - Tablet */
@media (max-width: 1024px) {
    .rifa-stats {
        gap: 12px;
        margin-top: 30px;
        margin-bottom: 40px;
    }
}

/* RESPONSIVE - Móviles medianos */
@media (max-width: 768px) {
    .rifa-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-top: 25px;
        margin-bottom: 30px;
    }
}

/* RESPONSIVE - Móviles pequeños */
@media (max-width: 480px) {
    .rifa-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin-top: 20px;
        margin-bottom: 25px;
    }
}

.stat-card {
    background: var(--dark-gray);
    border: 1px solid var(--cobalt-blue);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    transition: 0.3s ease;
}

.stat-card:hover {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}

.stat-label {
    display: block;
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    display: block;
    color: var(--text-heading);
    font-size: 1.8rem;
    font-weight: bold;
    font-family: 'Roboto Mono', monospace;
}

/* RESPONSIVE - Mobile */
@media (max-width: 768px) {
    .stat-card {
        padding: 15px;
    }

    .stat-label {
        font-size: 0.65rem;
        margin-bottom: 6px;
    }

    .stat-value {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .stat-card {
        padding: 12px;
    }

    .stat-label {
        font-size: 0.6rem;
        margin-bottom: 4px;
    }

    .stat-value {
        font-size: 1.3rem;
    }
}

/* El footer del sitio se define en la sección «SITE FOOTER» al final de este archivo. */

/* RESPONSIVE GENERAL */
@media (max-width: 1024px) {
    section { 
        padding: 80px 5%; 
    }
}

@media (max-width: 768px) {
    section { 
        padding: 60px 5%; 
    }

    .section-title {
        font-size: 1.8rem;
    }

    .glitch-text {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    section { 
        padding: 40px 4%; 
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 30px;
    }

    .glitch-text {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 0.85rem;
    }
}

/* ==============================
   EXPORT JPG (canvas-render)
   ============================== */

#canvas-render {
    width: 1080px;
    height: 1920px;
    position: fixed;
    left: -10000px;
    top: 0;
    padding: 40px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* background-color y font-family se ajustan desde rifa.js */
    color: white;
}

/* Título del cartel JPG: Orbitron, compacto, máx. ~2 líneas */
#canvas-render .canvas-brand-title {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 34px;
    line-height: 1.2;
    max-width: 980px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    word-break: break-word;
    hyphens: auto;
}

/* Teléfono al pie del JPG: Orbitron + Accent Orange de marca */
#canvas-render .canvas-brand-phone {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 52px;
    letter-spacing: 0.06em;
    color: var(--accent-orange);
}

#canvas-render .wa-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.b-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 10px;
    width: 100%;
}

.b-num {
    width: 90px;
    height: 90px;
    border: 1px solid var(--rifa-primario);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-sizing: border-box;
}

.sold-img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --------------------------------------------------------------------------
   RWD general (mobile-first complemento): sin tocar lógica interna de rifa
   -------------------------------------------------------------------------- */
main {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

#main-content {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

@media screen and (max-width: 768px) {
    .cards-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    section.content-section,
    .content-section {
        padding: 56px 5%;
    }

    .section-title {
        margin-bottom: 28px;
        font-size: 1.65rem;
        word-break: break-word;
    }

    .glitch-text {
        font-size: clamp(1.35rem, 6.5vw, 2rem);
        letter-spacing: 0.12em;
        padding: 0 8px;
    }

    .subtitle {
        font-size: 0.88rem;
        padding: 0 12px;
    }

    .hero {
        min-height: 100vh;
        min-height: 100dvh;
        padding: 16px 4%;
    }

    .contact-container {
        max-width: 100%;
    }

    .contact-form {
        padding: 24px 18px;
    }

    .auth-message {
        right: 12px;
        left: 12px;
        bottom: 12px;
        max-width: none;
        min-width: 0;
    }
}

@media screen and (max-width: 480px) {
    section.content-section,
    .content-section {
        padding: 40px 4%;
    }

    .section-title {
        font-size: 1.4rem;
        margin-bottom: 22px;
    }

    .card {
        padding: 22px 18px;
    }

    .glitch-text {
        letter-spacing: 0.08em;
    }
}

/* --- CERTIFICADOS (admin): pestañas neon / formularios / modal --- */
.certificados-admin-section .certificados-admin-lead {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: -8px 0 28px;
    max-width: 640px;
}

.cert-admin {
    position: relative;
    max-width: 720px;
    margin: 0 auto;
}

.cert-tab-state {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    pointer-events: none;
}

.cert-tab-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 22px;
}

.cert-tab-btn {
    flex: 1;
    text-align: center;
    padding: 12px 14px;
    font-family: "Orbitron", sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--black);
    border: 1px solid rgba(0, 71, 171, 0.6);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.22s ease, color 0.22s ease, box-shadow 0.22s ease;
}

.cert-tab-btn:hover {
    color: var(--neon-cyan);
    border-color: rgba(0, 255, 255, 0.4);
}

#cert-tab-gen:checked ~ .cert-tab-bar label[for="cert-tab-gen"],
#cert-tab-can:checked ~ .cert-tab-bar label[for="cert-tab-can"] {
    color: var(--neon-cyan);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 22px rgba(0, 255, 255, 0.22);
}

.cert-panel--gen,
.cert-panel--can {
    display: none;
}

#cert-tab-gen:checked ~ .cert-panel--gen {
    display: block;
}

#cert-tab-gen:checked ~ .cert-panel--can {
    display: none;
}

#cert-tab-can:checked ~ .cert-panel--gen {
    display: none;
}

#cert-tab-can:checked ~ .cert-panel--can {
    display: block;
}

.cert-panel-inner.cert-glass {
    padding: 26px 24px 28px;
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(0, 71, 171, 0.12), rgba(33, 33, 33, 0.95));
    border: 1px solid rgba(0, 255, 255, 0.22);
    box-shadow: 0 0 0 1px rgba(0, 71, 171, 0.35), 0 12px 40px rgba(0, 0, 0, 0.35);
}

.cert-panel-title {
    font-family: "Orbitron", sans-serif;
    font-size: 1rem;
    letter-spacing: 0.06em;
    color: var(--text-heading);
    margin-bottom: 8px;
}

.cert-panel-hint {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 22px;
    line-height: 1.5;
}

.cert-form .form-group {
    margin-bottom: 16px;
}

.cert-loading--inline {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(0, 71, 171, 0.2);
    border: 1px solid rgba(0, 255, 255, 0.2);
    color: var(--text-body);
    font-size: 0.88rem;
}

/* Fuerza ocultar loaders cuando llevan atributo hidden */
.cert-loading[hidden],
.cert-loading--inline[hidden],
.admin-users-loader[hidden] {
    display: none !important;
}

.cert-spinner {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(0, 255, 255, 0.25);
    border-top-color: var(--neon-cyan);
    border-radius: 50%;
    animation: cert-spin 0.75s linear infinite;
}

@keyframes cert-spin {
    to {
        transform: rotate(360deg);
    }
}

.cert-btn-primary {
    margin-top: 8px;
    width: 100%;
    max-width: 280px;
}

.cert-btn-secondary {
    background: transparent;
    border: 1px solid var(--cobalt-blue);
    color: var(--text-heading);
}

.cert-btn-secondary:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

.cert-btn-accent {
    background: linear-gradient(135deg, var(--cobalt-blue), #003080);
    border-color: rgba(0, 255, 255, 0.35);
    margin-top: 16px;
    width: 100%;
}

.cert-btn-copy {
    background: var(--neon-cyan);
    color: var(--dark-gray);
    border-color: var(--neon-cyan);
    font-family: "Roboto Mono", monospace;
    font-weight: 700;
}

.cert-btn-copy:hover {
    filter: brightness(1.08);
    color: var(--black);
}

.cert-search-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 14px;
    margin-bottom: 8px;
}

.cert-search-field {
    flex: 1 1 200px;
    margin-bottom: 0;
}

.cert-search-row .btn-submit {
    flex: 0 0 auto;
    margin-bottom: 2px;
}

.cert-canje-card {
    margin-top: 22px;
    padding: 20px 20px 22px;
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 255, 0.28);
    background: rgba(0, 0, 0, 0.25);
}

.cert-canje-card__title {
    font-family: "Orbitron", sans-serif;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    color: var(--neon-cyan);
    margin-bottom: 14px;
}

.cert-canje-dl {
    display: grid;
    grid-template-columns: minmax(0, 100px) 1fr;
    gap: 8px 16px;
    font-size: 0.88rem;
}

.cert-canje-dl dt {
    color: var(--text-muted);
    font-weight: 600;
}

.cert-canje-dl dd {
    color: var(--text-body);
    margin: 0;
}

.cert-modal {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.cert-modal[hidden] {
    display: none !important;
}

.cert-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(4px);
}

.cert-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 400px);
    padding: 28px 24px 24px;
    border-radius: 16px;
    background: var(--dark-gray);
    border: 1px solid rgba(0, 255, 255, 0.35);
}

.cert-modal__dialog--glow {
    box-shadow:
        0 0 0 1px rgba(0, 255, 255, 0.15),
        0 0 36px rgba(0, 255, 255, 0.25),
        0 20px 50px rgba(0, 0, 0, 0.55);
}

.cert-modal__title {
    font-family: "Orbitron", sans-serif;
    font-size: 1rem;
    letter-spacing: 0.06em;
    color: var(--text-heading);
    margin-bottom: 12px;
}

.cert-modal__label {
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.cert-modal__code {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--neon-cyan);
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.45);
    margin-bottom: 16px;
    word-break: break-all;
}

.cert-modal__pdf-warning {
    font-size: 0.88rem;
    color: var(--accent-orange);
    margin: -8px 0 18px;
    line-height: 1.45;
}

.cert-modal__pdf-block {
    margin-bottom: 20px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 71, 171, 0.45);
}

.cert-modal__actions--stack {
    flex-direction: column;
    align-items: stretch;
}

.cert-modal__email-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.cert-modal__email-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.06em;
}

.cert-modal__email-input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 255, 0.25);
    background: var(--black);
    color: var(--text-body);
    font-size: 0.95rem;
}

.cert-modal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cert-modal__actions .btn-submit {
    flex: 1 1 auto;
    min-width: 120px;
}

@media (max-width: 480px) {
    .cert-tab-btn {
        font-size: 0.65rem;
        padding: 10px 8px;
    }

    .cert-panel-inner.cert-glass {
        padding: 20px 16px 22px;
    }

    .cert-modal__code {
        font-size: 1.1rem;
    }
}

/* --- CANJE (público): verificador --- */
.canje-public-section {
    width: min(100%, 1040px);
    margin: 0 auto;
}

.canje-public-lead {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: -8px 0 28px;
    text-align: left;
    line-height: 1.55;
    max-width: 820px;
}

.canje-public-card.canje-glass {
    width: 100%;
    padding: 28px 24px 26px;
    border-radius: 16px;
    background: linear-gradient(160deg, rgba(0, 71, 171, 0.14), rgba(33, 33, 33, 0.96));
    border: 1px solid rgba(0, 255, 255, 0.22);
    box-shadow: 0 0 0 1px rgba(0, 71, 171, 0.35), 0 14px 44px rgba(0, 0, 0, 0.38);
}

.canje-public-field {
    margin-bottom: 18px;
}

.canje-public-input {
    font-size: 1rem;
    letter-spacing: 0.04em;
}

.canje-public-btn {
    width: min(100%, 280px);
    margin-bottom: 8px;
}

.canje-sello-valid {
    position: relative;
    margin-top: 26px;
    padding: 22px 20px 24px;
    border-radius: 14px;
    text-align: center;
    border: 1px solid rgba(0, 255, 255, 0.45);
    background: radial-gradient(ellipse at 50% 0%, rgba(0, 255, 255, 0.12), rgba(0, 40, 60, 0.35));
    box-shadow: 0 0 28px rgba(0, 255, 255, 0.18);
}

.canje-sello-valid__ring {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 50%;
    border: 3px solid rgba(0, 255, 255, 0.35);
    border-top-color: var(--neon-cyan);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.35);
}

.canje-sello-valid__title {
    font-family: "Orbitron", sans-serif;
    font-size: 0.95rem;
    letter-spacing: 0.1em;
    color: var(--neon-cyan);
    margin-bottom: 4px;
}

.canje-sello-valid__sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 18px;
}

.canje-sello-dl {
    text-align: left;
    display: grid;
    grid-template-columns: minmax(0, 88px) 1fr;
    gap: 8px 14px;
    font-size: 0.88rem;
    max-width: 760px;
    margin: 0;
}

@media (max-width: 768px) {
    .canje-public-lead {
        text-align: center;
    }
    .canje-public-btn {
        width: 100%;
    }
    .canje-sello-dl {
        max-width: 100%;
        margin: 0 auto;
    }
}

.canje-sello-dl dt {
    color: var(--text-muted);
    font-weight: 600;
}

.canje-sello-dl dd {
    margin: 0;
    color: var(--text-body);
}

.canje-alert-invalid {
    margin-top: 22px;
    padding: 18px 18px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 69, 0, 0.55);
    background: rgba(255, 69, 0, 0.08);
    box-shadow: 0 0 20px rgba(255, 69, 0, 0.12);
}

.canje-alert-invalid__title {
    font-family: "Orbitron", sans-serif;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    color: var(--accent-orange);
    display: block;
    margin-bottom: 8px;
}

.canje-alert-invalid__msg {
    color: var(--text-body);
    font-size: 0.88rem;
    line-height: 1.45;
    margin: 0;
}

/* --- PANEL ADMIN USUARIOS --- */
.admin-users-section {
    max-width: 96%;
}

.admin-users-lead {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: -8px 0 24px;
}

.admin-users-card {
    padding: 22px;
    border-radius: 14px;
    background: linear-gradient(160deg, rgba(0, 71, 171, 0.14), rgba(33, 33, 33, 0.96));
    border: 1px solid rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 0 1px rgba(0, 71, 171, 0.28), 0 10px 34px rgba(0, 0, 0, 0.35);
}

.admin-users-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
}

.admin-users-title {
    margin: 0 0 6px;
}

.admin-users-hint {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.82rem;
}

.admin-users-btn-reload {
    white-space: nowrap;
}

.admin-users-filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(170px, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.admin-users-filters .form-group {
    margin: 0;
}

.admin-users-loader {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(0, 71, 171, 0.18);
    border: 1px solid rgba(0, 255, 255, 0.2);
    margin-bottom: 12px;
}

.admin-users-table-wrap {
    overflow: auto;
    border: 1px solid rgba(0, 255, 255, 0.14);
    border-radius: 10px;
}

.admin-users-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1280px;
}

.admin-users-table th,
.admin-users-table td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 8px;
    text-align: left;
    vertical-align: middle;
}

.admin-users-table th {
    font-family: "Orbitron", sans-serif;
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: rgba(0, 71, 171, 0.22);
}

.admin-users-input,
.admin-users-select {
    width: 100%;
    background: rgba(12, 19, 31, 0.9);
    border: 1px solid rgba(0, 71, 171, 0.5);
    border-radius: 8px;
    padding: 7px 8px;
    color: var(--text-body);
    font-size: 0.84rem;
}

.admin-users-input--readonly {
    opacity: 0.85;
    color: var(--text-muted);
}

.admin-users-pass-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.admin-users-eye {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 255, 0.45);
    background: rgba(0, 71, 171, 0.2);
    color: var(--neon-cyan);
    cursor: pointer;
}

.admin-users-check {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.admin-users-btn-save {
    width: 100%;
    min-width: 90px;
    padding: 8px 10px;
}

.admin-users-empty {
    color: var(--text-muted);
    text-align: center;
    padding: 20px 12px !important;
}

@media (max-width: 980px) {
    .admin-users-toolbar {
        flex-direction: column;
    }
    .admin-users-filters {
        grid-template-columns: repeat(2, minmax(160px, 1fr));
    }
}

/* --- Ángeles (Maestro / Organizador / Participante) --- */
.cpm-angels-route .main-content,
.cpm-angels-route #main-content {
    width: 95%;
    max-width: 95%;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.angels-root {
    color: #e8eaf6;
}

.angels-hero {
    margin-bottom: 1.5rem;
}

.angels-title {
    font-size: clamp(1.4rem, 4vw, 2rem);
    letter-spacing: 0.08em;
    background: linear-gradient(120deg, #7c4dff, #00e5ff, #ff6e40);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.angels-subtitle {
    color: rgba(200, 210, 255, 0.75);
    font-size: 0.95rem;
}

.angels-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* [hidden] debe ganar a .angels-panel { display:flex } (si no, admin/usuario se ven en el dashboard). */
.angels-panel[hidden] {
    display: none !important;
}

.angels-root--dash #angels-admin-wrap,
.angels-root--dash #angels-user-wrap {
    display: none !important;
}

.angels-glass {
    background: rgba(15, 22, 45, 0.72);
    border: 1px solid rgba(124, 77, 255, 0.25);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(10px);
}

.angels-card {
    padding: 1rem 1.1rem;
}

.angels-card-title {
    font-family: "Orbitron", sans-serif;
    font-size: 0.95rem;
    margin: 0 0 0.75rem 0;
    color: #80deea;
}

.angels-hint {
    font-size: 0.85rem;
    color: rgba(200, 210, 255, 0.7);
}

.angels-hint code {
    font-size: 0.78rem;
    color: #ffab91;
}

.angels-form-grid {
    display: grid;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
}

.angels-form-grid label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.82rem;
    color: rgba(200, 210, 255, 0.85);
}

.angels-input,
.angels-root select {
    background: rgba(8, 12, 28, 0.95);
    border: 1px solid rgba(0, 229, 255, 0.35);
    border-radius: 8px;
    padding: 8px 10px;
    color: #eceff1;
    font-size: 0.9rem;
}

.angels-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.angels-row--end {
    justify-content: flex-end;
}

.angels-btn {
    border-radius: 8px;
    border: 1px solid rgba(0, 229, 255, 0.45);
    background: rgba(0, 71, 171, 0.35);
    color: #e0f7fa;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 0.85rem;
}

.angels-btn--primary {
    background: linear-gradient(135deg, rgba(124, 77, 255, 0.55), rgba(0, 229, 255, 0.35));
    border-color: rgba(124, 77, 255, 0.6);
}

.angels-btn--outline {
    background: transparent;
    border-color: rgba(0, 229, 255, 0.55);
    color: #b2ebf2;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.angels-btn--outline:hover {
    background: rgba(0, 229, 255, 0.12);
    border-color: rgba(0, 229, 255, 0.85);
}

.angels-img-help__lead {
    margin: 0 0 0.65rem 0;
    line-height: 1.45;
}

.angels-img-help__actions {
    margin: 0 0 0.85rem 0;
}

.angels-btn--sm {
    padding: 4px 8px;
    font-size: 0.75rem;
}

.angels-pre {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 8px;
    overflow: auto;
    font-size: 0.72rem;
    max-height: 280px;
}

.angels-table-actions {
    white-space: nowrap;
}

.angels-edit-readonly {
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    font-size: 0.8rem;
}

.angels-edit-kv {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    max-width: 100%;
}

.angels-edit-code {
    font-size: 0.72rem;
    word-break: break-all;
}

.angels-links-cell {
    vertical-align: middle;
}

.angels-link-box {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.55rem;
    border: 1px solid rgba(124, 77, 255, 0.35);
    border-radius: 10px;
    background: rgba(8, 12, 28, 0.55);
    max-width: min(100%, 380px);
}

.angels-link-pair {
    display: inline-flex;
    align-items: stretch;
    gap: 0.3rem;
    flex: 0 0 auto;
}

.angels-link-main-btn {
    flex: 1 1 auto;
    min-width: 4.25rem;
    margin: 0;
    padding: 0.35rem 0.5rem;
    font-size: 0.72rem;
    line-height: 1.25;
    text-align: center;
    border-radius: 6px;
    border: 1px solid rgba(0, 229, 255, 0.4);
    background: rgba(0, 71, 171, 0.4);
    color: #e0f7fa;
    cursor: pointer;
    font-family: inherit;
}

.angels-link-main-btn:hover {
    border-color: rgba(0, 229, 255, 0.65);
    background: rgba(0, 71, 171, 0.55);
}

.angels-link-copy-mini {
    flex: 0 0 auto;
    width: 2rem;
    min-width: 2rem;
    margin: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid rgba(124, 77, 255, 0.45);
    background: rgba(15, 22, 45, 0.9);
    color: #e0f7fa;
    cursor: pointer;
    font-size: 0.75rem;
    line-height: 1;
}

.angels-link-copy-mini:hover {
    border-color: #00e5ff;
    background: rgba(124, 77, 255, 0.25);
}

.angels-table-wrap {
    overflow-x: auto;
    margin-top: 0.75rem;
}

.angels-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.angels-table th,
.angels-table td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 6px;
    text-align: left;
}

.angels-table th {
    color: #80cbc4;
    font-family: "Orbitron", sans-serif;
    font-size: 0.68rem;
    letter-spacing: 0.05em;
}

.angels-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.cpm-angels-route #angels-admin-app,
.cpm-angels-route #angels-user-wrap {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.angels-tab {
    border: 1px solid rgba(124, 77, 255, 0.35);
    background: rgba(10, 16, 32, 0.8);
    color: #b0bec5;
    padding: 8px 12px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.8rem;
}

.angels-tab.is-active {
    color: #fff;
    border-color: #00e5ff;
    background: rgba(0, 229, 255, 0.12);
}

.angels-tab-panels .angels-tab-panel {
    display: none;
}

.angels-tab-panels .angels-tab-panel.is-active {
    display: block;
}

.angels-split {
    display: grid;
    grid-template-columns: 1fr minmax(260px, 360px);
    gap: 1rem;
    align-items: start;
}

@media (max-width: 900px) {
    .angels-split {
        grid-template-columns: 1fr;
    }
}

.angels-fieldset {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0.5rem 0.65rem;
    margin: 0;
}

.angels-fieldset legend {
    padding: 0 0.35rem;
    font-size: 0.75rem;
    color: #90caf9;
}

.angels-typo-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.65rem;
}

.angels-typo-group:last-child {
    margin-bottom: 0;
}

.angels-typo-label {
    font-size: 0.82rem;
    color: rgba(200, 210, 255, 0.85);
}

.angels-rt-dialog {
    margin: 0.5rem 0;
    padding: 0.85rem;
    border: 1px solid rgba(0, 229, 255, 0.35);
    border-radius: 10px;
    background: rgba(10, 16, 32, 0.95);
}

.angels-design-grid {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    margin: 0.75rem 0;
}

.angels-design-form-scroll {
    max-height: min(78vh, 900px);
    overflow-y: auto;
    padding-right: 0.35rem;
}

.angels-design-section {
    padding: 0.75rem 0.85rem;
    border-radius: 12px;
    margin-bottom: 0.65rem;
    border: 1px solid rgba(124, 77, 255, 0.22);
}

.angels-design-section__title {
    margin: 0 0 0.35rem 0;
    font-size: 0.95rem;
    color: #e1f5fe;
}

.angels-design-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1rem;
    margin-bottom: 0.35rem;
}

.angels-design-check {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    font-size: 0.85rem;
}

.angels-design-label {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.82rem;
}

.angels-grad-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
    margin: 0.35rem 0 0.5rem 0;
    padding: 0.45rem 0 0 0;
    border-top: 1px dashed rgba(255, 255, 255, 0.12);
}

/* [hidden] debe ganar a display:flex: «Fondo 2 / Orientación» solo con «Gradiente» marcado. */
.angels-grad-fields[hidden] {
    display: none;
}

.angels-input--narrow {
    width: 4.2rem;
    display: inline-block;
}

.angels-input--greeting-short {
    width: 100%;
    max-width: 100%;
}

.angels-status-legend {
    padding: 0.75rem 0.9rem;
    margin-bottom: 0.85rem;
    border-radius: 12px;
}

.angels-status-legend__title {
    margin: 0 0 0.5rem 0;
    font-family: "Orbitron", sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #80deea;
}

.angels-status-legend__list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.45rem;
    font-size: 0.82rem;
    color: rgba(224, 230, 255, 0.88);
}

.angels-status-legend__badge {
    font-weight: 600;
    color: #e8eaf6;
}

.angels-btn:disabled,
.angels-btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

/* Ángel que ya envió su mensaje de la semana: se muestra, pero no se puede seleccionar.
   Tono verde apagado = completado (no es un error ni un deshabilitado neutro). */
#usr-angel-select option[data-done="1"] {
    color: #7fd4b8;
    background: rgba(16, 44, 38, 0.95);
    font-style: italic;
}

#usr-angel-select option[data-done="error"] {
    color: #ffb4a6;
    background: rgba(52, 24, 22, 0.95);
    font-style: italic;
}

.angels-angel-done-note {
    margin: 0.35rem 0 0.6rem 0;
    padding: 0.5rem 0.7rem;
    border-radius: 10px;
    border: 1px solid rgba(127, 212, 184, 0.4);
    background: rgba(16, 44, 38, 0.45);
    color: #b7ead9;
    font-size: 0.8rem;
    line-height: 1.45;
}

.angels-angel-done-note[hidden] {
    display: none !important;
}

/* Overlay de proceso: bloquea la pantalla mientras viaja la petición (evita dobles envíos). */
.angels-busy {
    position: fixed;
    inset: 0;
    z-index: 12500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.angels-busy[hidden] {
    display: none !important;
}

.angels-busy__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 6, 16, 0.78);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.angels-busy__card {
    position: relative;
    z-index: 1;
    max-width: 360px;
    width: 100%;
    padding: 1.4rem 1.2rem;
    text-align: center;
}

.angels-busy__spinner {
    width: 42px;
    height: 42px;
    margin: 0 auto 0.9rem auto;
    box-sizing: border-box;
    border: 3px solid rgba(0, 229, 255, 0.22);
    border-top-color: #00e5ff;
    border-radius: 50%;
    animation: cpm-app-loader-spin 0.78s linear infinite;
}

.angels-busy__title {
    margin: 0 0 0.4rem 0;
    font-size: 0.95rem;
    color: #80deea;
    letter-spacing: 0.04em;
}

.angels-busy__text {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.5;
    color: rgba(224, 230, 255, 0.85);
}

.angels-notice .angels-modal__card {
    text-align: center;
}

.angels-notice__icon {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
    line-height: 1;
}

.angels-notice__text {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.55;
    color: rgba(224, 230, 255, 0.9);
}

.angels-notice__detail {
    margin: 0.75rem 0 0;
    font-size: 0.7rem;
    line-height: 1.45;
    color: rgba(224, 230, 255, 0.55);
    word-break: break-word;
}

.angels-notice .angels-modal__actions {
    justify-content: center;
}

.angels-notice--error .angels-modal__card h3 {
    color: #ff8a80;
}

@media (prefers-reduced-motion: reduce) {
    .angels-busy__spinner {
        animation-duration: 2.4s;
    }
}

.angels-textarea {
    width: 100%;
    min-height: 5rem;
    resize: vertical;
    font-family: ui-monospace, monospace;
    font-size: 0.78rem;
}

.angels-dropzone {
    position: relative;
    display: block;
    min-height: 4.5rem;
    border: 2px dashed rgba(0, 229, 255, 0.45);
    border-radius: 10px;
    padding: 0.85rem 0.75rem;
    text-align: center;
    cursor: pointer;
    background: rgba(6, 14, 32, 0.55);
    transition: border-color 0.2s, background 0.2s;
}

.angels-dropzone--active {
    border-color: rgba(0, 229, 255, 0.95);
    background: rgba(0, 229, 255, 0.08);
}

.angels-dropzone__text {
    font-size: 0.8rem;
    color: #b0bec5;
    pointer-events: none;
}

.angels-dropzone__file {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.angels-preview-col {
    position: relative;
}

.angels-user-head {
    position: sticky;
    top: 0;
    z-index: 90;
    margin: 0 0 0.75rem 0;
    padding: 0.4rem 0;
    background: linear-gradient(180deg, rgba(8, 10, 22, 0.98) 55%, rgba(8, 10, 22, 0.82) 85%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.angels-user-head .angels-tabs {
    margin-bottom: 0;
    width: 100%;
}

.angels-user-preview-fab {
    display: none;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(0, 229, 255, 0.55);
    background: rgba(0, 229, 255, 0.12);
    color: #e0f7fa;
    font-family: "Orbitron", sans-serif;
    font-size: 0.68rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.angels-user-preview-fab[aria-expanded="true"] {
    background: rgba(0, 229, 255, 0.28);
    border-color: #00e5ff;
    color: #fff;
}

@media (max-width: 900px) {
    #angels-user-wrap .angels-user-preview-fab.is-visible {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        top: 0;
        bottom: auto;
        width: 100%;
        max-width: 100%;
        margin: 0;
        box-sizing: border-box;
        border-radius: 0 0 14px 14px;
        border-top: none;
        border-left: none;
        border-right: none;
        padding: 0.7rem 1rem;
        padding-top: calc(0.7rem + env(safe-area-inset-top, 0px));
        z-index: 96;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
        transition: border-radius 0.15s ease, box-shadow 0.15s ease;
    }

    /* Menú desplegable abierto: barra superior sin radio inferior para fundirse con el panel */
    #angels-user-wrap .angels-user-preview-fab.is-visible[aria-expanded="true"] {
        border-radius: 0;
        box-shadow: none;
        border-bottom: 1px solid rgba(0, 229, 255, 0.4);
    }

    /* Espacio bajo la barra fija superior (Vista Previa) para que el bloque de pestañas no quede tapado */
    #angels-user-wrap:has(.angels-user-preview-fab.is-visible) {
        padding-top: calc(3.75rem + env(safe-area-inset-top, 0px));
    }

    #angels-user-wrap:has(.angels-user-preview-fab.is-visible) .angels-user-head {
        top: calc(3.75rem + env(safe-area-inset-top, 0px));
    }
}

.angels-preview-toggle {
    display: none;
    width: 100%;
    margin-bottom: 0.5rem;
}

.angels-preview-box {
    border-radius: 12px;
    overflow: hidden;
    min-height: 200px;
    flex-direction: column;
}

@media (min-width: 901px) {
    .angels-preview-box {
        display: flex;
    }
}

@media (max-width: 900px) {
    .angels-preview-toggle {
        display: block;
    }
    #usr-preview-toggle {
        display: none !important;
    }
    .angels-preview-box:not(.is-open) {
        display: none !important;
    }
    .angels-preview-box.is-open {
        display: flex !important;
        flex-direction: column;
        max-height: 88vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Panel anclado al borde inferior del botón fijo «Vista Previa» (mismo ancho, sensación de desplegable) */
    .angels-split--preview-tall .angels-preview-col.angels-preview-col--floating-open {
        position: fixed;
        left: 0;
        right: 0;
        top: var(--angels-user-fab-bottom, calc(3.75rem + env(safe-area-inset-top, 0px)));
        bottom: calc(0.65rem + env(safe-area-inset-bottom, 0px));
        z-index: 95;
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        animation: angels-preview-from-fab 0.2s ease-out;
    }

    @keyframes angels-preview-from-fab {
        from {
            opacity: 0.88;
            transform: translateY(-6px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .angels-split--preview-tall .angels-preview-col.angels-preview-col--floating-open .angels-preview-box {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none !important;
        border-radius: 0 0 14px 14px;
        border-top: none;
        box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
    }

    .angels-split--preview-tall .angels-preview-col.angels-preview-col--floating-open .angels-preview-frame {
        flex: 1 1 auto;
        min-height: 220px;
    }
}

.angels-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.angels-preview-mode {
    width: auto;
    max-width: 55%;
    margin: 0 0.5rem;
    padding: 4px 8px;
    font-size: 0.78rem;
}

.angels-dark-warn {
    margin: 0.5rem 0 0 0;
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 171, 64, 0.45);
    background: rgba(255, 171, 64, 0.1);
    color: #ffcc80;
    font-size: 0.85rem;
}

.angels-preview-title {
    font-size: 0.8rem;
    color: #80deea;
    font-family: "Orbitron", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.angels-preview-frame {
    width: 100%;
    min-height: 240px;
    border: 0;
    background: transparent;
    display: block;
    flex: 1 1 auto;
}

/* Vista previa de mensajes ya redactados (#a → «Mensajes»): metadatos y estado vacío */
.angels-preview-meta {
    margin: 0;
    padding: 6px 12px;
    font-size: 0.75rem;
    line-height: 1.35;
    color: rgba(224, 230, 255, 0.78);
    background: rgba(0, 0, 0, 0.22);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.angels-preview-empty {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    padding: 1.25rem;
    text-align: center;
}

.angels-preview-empty p {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(224, 230, 255, 0.7);
}

.angels-preview-empty[hidden] {
    display: none;
}

.angels-preview-frame[hidden] {
    display: none;
}

/* Lista de Ángeles con su mensaje: fila activa resaltada */
.angels-table--messages td:last-child {
    width: 1%;
    white-space: nowrap;
}

.angels-table--messages tr.is-selected {
    background: rgba(0, 229, 255, 0.12);
}

.angels-table--messages tr.is-selected td:first-child {
    box-shadow: inset 3px 0 0 #00e5ff;
}

/* Vista previa (#u Redactar / #a Diseño email): 50% formulario · 50% preview en escritorio */
@media (min-width: 901px) {
    .angels-split--preview-tall {
        align-items: start;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .angels-split--preview-tall .angels-preview-col {
        position: sticky;
        top: 1rem;
        align-self: start;
        height: calc(100vh - 2rem);
        display: flex;
        flex-direction: column;
    }

    .angels-split--preview-tall .angels-preview-box {
        min-height: 0;
        overflow: hidden;
        flex: 1 1 auto;
    }

    .angels-split--preview-tall .angels-preview-frame {
        height: 100%;
        max-height: none;
    }
}

.angels-header-upload-preview {
    margin-top: 0.65rem;
}

.angels-header-upload-preview__img {
    display: block;
    max-width: 100%;
    max-height: 180px;
    object-fit: contain;
    margin-top: 0.35rem;
    border-radius: 8px;
    border: 1px solid rgba(0, 229, 255, 0.25);
    background: rgba(6, 10, 22, 0.6);
}

.angels-rich {
    min-height: 160px;
    border: 1px solid rgba(0, 229, 255, 0.35);
    border-radius: 10px;
    padding: 10px;
    background: rgba(6, 10, 22, 0.9);
    margin: 0.5rem 0;
}

.angels-rt-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
    margin-top: 0.35rem;
}

.angels-icon-btn {
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.25);
    color: #e0e0e0;
    padding: 6px 10px;
    cursor: pointer;
}

/* Alineación: iconos de líneas (como en Word) para distinguir izquierda, centro, derecha y justificar. */
.angels-icon-btn--align {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.angels-icon-btn--align svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
}

.angels-disclaimer {
    font-size: 0.78rem;
    color: #ffab91;
    margin: 0.5rem 0;
}

.angels-error {
    color: #ff8a80;
    font-size: 0.85rem;
}

.angels-mt {
    margin-top: 1rem;
}

.angels-accordion details {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0.5rem 0.65rem;
    margin-bottom: 0.5rem;
    background: rgba(8, 12, 28, 0.6);
}

.angels-acc-body {
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

/* Respuestas: solo el texto del angelado, siempre legible sobre el fondo oscuro. */
.angels-reply-meta {
    margin: 0 0 0.45rem;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.6);
}

.angels-reply-text {
    color: #fff;
    font-size: 0.95rem;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    padding: 0.65rem 0.8rem;
    border-left: 3px solid rgba(0, 229, 255, 0.55);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
}

.angels-simple-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.angels-simple-list li {
    padding: 0.45rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.angels-row--wrap {
    flex-wrap: wrap;
}

.angels-wizard {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.angels-wizard-step-label {
    font-family: "Orbitron", sans-serif;
    font-size: 0.9rem;
    color: #80deea;
    margin: 0;
}

.angels-wizard-track {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    list-style: none;
    margin: 0 0 0.5rem 0;
    padding: 0;
    counter-reset: wiz;
}

.angels-wizard-track li {
    counter-increment: wiz;
    font-size: 0.72rem;
    padding: 0.35rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(200, 210, 255, 0.65);
}

.angels-wizard-track li.is-done {
    border-color: rgba(0, 229, 255, 0.45);
    color: #e0f7fa;
}

.angels-wizard-track li.is-current {
    background: rgba(124, 77, 255, 0.25);
    border-color: #7c4dff;
    color: #fff;
}

.angels-textarea-readonly {
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
    min-height: 180px;
    font-family: "Roboto Mono", ui-monospace, monospace;
    font-size: 0.72rem;
    line-height: 1.45;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 229, 255, 0.25);
    border-radius: 10px;
    color: #eceff1;
    padding: 10px;
}

.angels-instruct-list {
    margin: 0.5rem 0 0 1.1rem;
    padding: 0;
    color: rgba(220, 230, 255, 0.92);
    font-size: 0.88rem;
    line-height: 1.55;
}

.angels-instruct-list li {
    margin-bottom: 0.45rem;
}

.angels-wizard-panel--success {
    border-color: rgba(105, 240, 174, 0.35);
}

.angels-wizard-nav-buttons {
    justify-content: flex-start;
    gap: 0.65rem;
}

body.cpm-angels-standalone .site-header,
body.cpm-angels-standalone footer {
    display: none !important;
}

body.cpm-angels-standalone #main-content {
    width: 95%;
    max-width: 95%;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    padding-top: 12px;
}

.angels-public-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 10px 14px;
    margin-bottom: 1rem;
    border-radius: 12px;
    background: rgba(11, 16, 32, 0.92);
    border: 1px solid rgba(0, 229, 255, 0.28);
    font-size: 0.88rem;
}

.angels-public-bar__brand {
    color: #80deea;
    font-family: "Orbitron", sans-serif;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-decoration: none;
}

.angels-public-bar__brand:hover {
    color: #fff;
}

.angels-public-bar__sep {
    color: rgba(255, 255, 255, 0.35);
}

.angels-public-bar__tag {
    color: rgba(200, 210, 255, 0.85);
}

.angels-hub-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    padding: 0.65rem 1rem;
    margin-bottom: 1rem;
}

.angels-hub-toolbar__left,
.angels-hub-toolbar__right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.angels-hub-toolbar__center {
    flex: 1 1 200px;
    text-align: center;
    min-width: 0;
}

.angels-hub-master-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.45rem 0.5rem;
    margin-top: 0.35rem;
    max-width: 52rem;
    margin-left: auto;
    margin-right: auto;
}

.angels-hub-master-heading {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(224, 230, 255, 0.95);
    white-space: nowrap;
}

.angels-hub-master-input {
    flex: 1 1 12rem;
    min-width: 10rem;
    max-width: 22rem;
    text-align: left;
}

.angels-hub-master-hint {
    margin: 0.35rem 0 0 0;
    color: rgba(180, 195, 255, 0.75);
    line-height: 1.35;
}

.angels-hub-lead--compact {
    margin: 0.25rem 0 0 0;
    font-size: 0.8rem;
}

.angels-btn--toolbar-sm {
    padding: 4px 8px;
    font-size: 0.7rem;
    line-height: 1.2;
    border-radius: 6px;
}

.hub-nav-btn.is-active {
    border-color: #00e5ff;
    box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.35);
}

.angels-btn--danger {
    border-color: rgba(255, 107, 107, 0.65);
    background: rgba(120, 20, 40, 0.45);
    color: #ffcdd2;
}

.angels-hub-header {
    padding: 1.1rem 1.2rem;
    margin-bottom: 1rem;
}

.angels-hub-title {
    margin: 0 0 0.35rem 0;
    font-size: clamp(1.2rem, 3vw, 1.65rem);
}

.angels-hub-lead {
    margin: 0 0 1rem 0;
    color: rgba(200, 210, 255, 0.82);
    font-size: 0.9rem;
    line-height: 1.5;
}

.angels-hub-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.angels-hub-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 0.25rem;
    padding: 1rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(124, 77, 255, 0.35);
    background: rgba(8, 12, 28, 0.75);
    color: #e8eaf6;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.angels-hub-card:hover {
    border-color: rgba(0, 229, 255, 0.55);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
    transform: translateY(-2px);
}

.angels-hub-card.is-active {
    border-color: #00e5ff;
    box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.25);
}

.angels-hub-card__icon {
    font-size: 1.35rem;
    line-height: 1;
}

.angels-hub-card__title {
    font-family: "Orbitron", sans-serif;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    color: #b2ebf2;
}

.angels-hub-card__desc {
    font-size: 0.75rem;
    color: rgba(200, 210, 255, 0.72);
    line-height: 1.35;
}

.angels-hub-pane {
    margin-bottom: 1rem;
}

.angels-modal {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.angels-modal[hidden] {
    display: none !important;
}

.angels-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.angels-modal__card {
    position: relative;
    z-index: 1;
    max-width: 420px;
    width: 100%;
    padding: 1.1rem 1.2rem;
    max-height: 90vh;
    overflow: auto;
}

.angels-modal__card h3 {
    margin: 0 0 0.75rem 0;
    font-family: "Orbitron", sans-serif;
    font-size: 1rem;
    color: #80deea;
}

.angels-modal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    justify-content: flex-end;
}

.angels-guide {
    padding: 1.15rem 1.25rem;
}

.angels-guide__h {
    font-family: "Orbitron", sans-serif;
    font-size: 0.95rem;
    color: #80deea;
    margin: 1.25rem 0 0.5rem 0;
}

.angels-guide__h:first-child {
    margin-top: 0;
}

.angels-guide__p {
    margin: 0.4rem 0;
    color: rgba(225, 230, 255, 0.9);
    font-size: 0.88rem;
    line-height: 1.55;
}

.angels-guide__list {
    margin: 0.35rem 0 0.5rem 1.1rem;
    padding: 0;
    color: rgba(220, 228, 255, 0.92);
    font-size: 0.86rem;
    line-height: 1.55;
}

.angels-guide__list--ol {
    list-style: decimal;
}

.angels-guide__list a {
    color: #80deea;
}

.angels-guide__pre {
    margin: 0.5rem 0;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(0, 229, 255, 0.22);
    font-family: "Roboto Mono", ui-monospace, monospace;
    font-size: 0.72rem;
    line-height: 1.45;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
    color: #eceff1;
}

.angels-wizard-toolbar {
    margin-bottom: 0.75rem;
}

/* —— Pantalla de carga global (todas las rutas SPA) —— */
.cpm-app-loader {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(4, 8, 18, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

body.cpm-app-loading .cpm-app-loader {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.cpm-app-loader__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.1rem;
    padding: 2rem 2.5rem;
    border-radius: 16px;
    border: 1px solid rgba(0, 229, 255, 0.28);
    background: rgba(10, 16, 36, 0.92);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    max-width: 90vw;
}

.cpm-app-loader__logo {
    display: block;
    height: auto;
    max-width: min(200px, 55vw);
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(0, 229, 255, 0.25));
}

.cpm-app-loader__spinner {
    width: 46px;
    height: 46px;
    border: 3px solid rgba(0, 229, 255, 0.2);
    border-top-color: #00e5ff;
    border-radius: 50%;
    animation: cpm-app-loader-spin 0.78s linear infinite;
}

@keyframes cpm-app-loader-spin {
    to {
        transform: rotate(360deg);
    }
}

.cpm-app-loader__text {
    margin: 0;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    color: rgba(179, 229, 252, 0.95);
    text-transform: uppercase;
}

#main-content {
    transition: opacity 0.38s ease;
}

.cpm-angels-route #main-content {
    overflow: visible;
    overflow-x: visible;
}

body.cpm-app-loading #main-content {
    opacity: 0.02;
    pointer-events: none;
}

body:not(.cpm-app-loading) #main-content {
    opacity: 1;
}

/* Vista previa móvil (#u Redactar): fondo no debe desplazarse mientras el desplegable está abierto */
html.cpm-angels-user-preview-scroll-lock,
body.cpm-angels-user-preview-scroll-lock {
    overflow: hidden !important;
    overscroll-behavior: none;
}

/* Carga de datos solo dentro de un panel Ángeles (evita tapar pestañas y apagar #main-content) */
.angels-panel--data-loading {
    position: relative;
    min-height: 100px;
}

.angels-panel--data-loading::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 30;
    background: rgba(4, 8, 18, 0.78);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: inherit;
    pointer-events: auto;
}

.angels-panel--data-loading::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 31;
    width: 42px;
    height: 42px;
    margin: -21px 0 0 -21px;
    box-sizing: border-box;
    border: 3px solid rgba(0, 229, 255, 0.22);
    border-top-color: #00e5ff;
    border-radius: 50%;
    animation: cpm-app-loader-spin 0.78s linear infinite;
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .cpm-app-loader {
        transition: none;
    }

    .cpm-app-loader__spinner {
        animation: none;
        border-color: rgba(0, 229, 255, 0.45);
        border-top-color: #00e5ff;
    }

    #main-content {
        transition: none;
    }

    .angels-panel--data-loading::before {
        animation: none;
        border-color: rgba(0, 229, 255, 0.45);
        border-top-color: #00e5ff;
    }
}
/* ========== Bingo Digital: links por rol sin el chrome del sitio ========== */
body.cpm-bingo-standalone .site-header,
body.cpm-bingo-standalone footer,
body.cpm-bingo-standalone .nav-overlay,
body.cpm-bingo-standalone #mobile-sidebar {
    display: none !important;
}

body.cpm-bingo-standalone main {
    min-height: 100vh;
}

body.cpm-bingo-standalone #main-content {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 12px max(16px, env(safe-area-inset-right, 0px)) 2rem max(16px, env(safe-area-inset-left, 0px));
    box-sizing: border-box;
}

/* ========== Rifa multi-proyecto (hub + admin) ========== */
/* Link admin (#r/<hash>): app independiente, sin chrome del sitio */
body.cpm-rifa-standalone .site-header,
body.cpm-rifa-standalone footer,
body.cpm-rifa-standalone .nav-overlay,
body.cpm-rifa-standalone #mobile-sidebar {
    display: none !important;
}

body.cpm-rifa-standalone main {
    min-height: 100vh;
}

body.cpm-rifa-standalone #main-content {
    width: 95%;
    max-width: 95%;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    padding-top: 12px;
    padding-bottom: 2rem;
}

body.cpm-rifa-standalone .rifa-public-bar {
    display: flex;
}

.rifa-public-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 10px 14px;
    margin-bottom: 1rem;
    border-radius: 12px;
    background: rgba(11, 16, 32, 0.92);
    border: 1px solid rgba(0, 229, 255, 0.28);
    font-size: 0.88rem;
}

.rifa-public-bar__brand {
    color: #80deea;
    font-family: "Orbitron", sans-serif;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-decoration: none;
}

.rifa-public-bar__brand:hover {
    color: var(--neon-cyan);
}

.rifa-public-bar__sep {
    color: rgba(255, 255, 255, 0.35);
}

.rifa-public-bar__tag {
    color: var(--text-muted);
}

.rifa-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.55rem 1rem;
    border: 1px solid var(--cobalt-blue);
    background: rgba(0, 71, 171, 0.25);
    color: var(--white);
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
    transition: 0.2s ease;
}
.rifa-btn:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}
.rifa-btn--primary {
    background: var(--cobalt-blue);
    border-color: var(--neon-cyan);
}
.rifa-btn--primary:hover {
    box-shadow: 0 0 12px rgba(0, 255, 255, 0.35);
}
.rifa-btn--toolbar { padding: 0.4rem 0.75rem; font-size: 0.9rem; }
.rifa-btn--sm { padding: 0.3rem 0.6rem; font-size: 0.8rem; }
.rifa-btn--lg { padding: 0.9rem 1.6rem; font-size: 1.15rem; }
.rifa-btn--danger { border-color: var(--accent-orange); color: #ffb399; }
.rifa-btn-plus { font-size: 1.25rem; line-height: 1; font-weight: 700; }
.rifa-btn.is-active,
.hub-nav-btn.is-active {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: inset 0 0 0 1px var(--neon-cyan);
}

.rifa-input {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--cobalt-blue);
    border-radius: 8px;
    background: #121212;
    color: var(--white);
    font: inherit;
    box-sizing: border-box;
}
.rifa-input:focus {
    outline: 2px solid var(--neon-cyan);
    border-color: var(--neon-cyan);
}

.rifa-hub-toolbar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: start;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    background: linear-gradient(135deg, rgba(0, 71, 171, 0.35), rgba(33, 33, 33, 0.9));
    border: 1px solid var(--cobalt-blue);
    border-radius: 14px;
}
.rifa-hub-toolbar__left,
.rifa-hub-toolbar__right {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}
.rifa-hub-toolbar__center { text-align: center; }
.rifa-hub-title {
    margin: 0 0 0.5rem;
    font-size: clamp(1.1rem, 2.5vw, 1.6rem);
    color: var(--neon-cyan);
    letter-spacing: 0.04em;
}
.rifa-hub-master-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
}
.rifa-hub-master-heading { font-size: 0.85rem; color: var(--text-muted); }
.rifa-hub-master-input { max-width: 220px; }
.rifa-hub-master-hint {
    margin: 0.4rem 0 0;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.rifa-hub-pane { margin-top: 0.5rem; }
.rifa-table-scroll { overflow-x: auto; }
.rifa-projects-table,
.rifa-lista-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}
.rifa-projects-table th,
.rifa-projects-table td,
.rifa-lista-table th,
.rifa-lista-table td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid rgba(0, 71, 171, 0.5);
    text-align: left;
    vertical-align: middle;
}
.rifa-projects-table th { color: var(--neon-cyan); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
.rifa-muted { color: var(--text-muted); font-size: 0.85rem; }
.rifa-error { color: var(--accent-orange); }

.rifa-guide {
    padding: 1.25rem 1.5rem;
    background: rgba(33, 33, 33, 0.85);
    border: 1px solid var(--cobalt-blue);
    border-radius: 14px;
    line-height: 1.55;
}
.rifa-guide h3 { color: var(--neon-cyan); margin-top: 1.25rem; }
.rifa-guide h3:first-child { margin-top: 0; }
.rifa-guide code { color: #9ef; }

.rifa-new-form,
.rifa-config-form {
    width: 100%;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(33, 33, 33, 0.85);
    border: 1px solid var(--cobalt-blue);
    border-radius: 14px;
}
.rifa-adpanel--config .rifa-config-form {
    margin-left: auto;
    margin-right: auto;
}
.rifa-card-title { margin: 0; color: var(--neon-cyan); }
.rifa-field { display: flex; flex-direction: column; gap: 0.35rem; }
/* [hidden] debe ganar a display:flex: así se ocultan los premios 2 y 3 según la cantidad elegida */
.rifa-field[hidden] { display: none; }
.rifa-field__label { font-weight: 600; color: var(--white); }
.rifa-field__help { font-size: 0.82rem; color: var(--text-muted); line-height: 1.45; }
.rifa-field__hint { font-size: 0.8rem; color: var(--neon-cyan); }
.rifa-form-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.5rem; }
.rifa-new-result {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--neon-cyan);
    border-radius: 10px;
    background: rgba(0, 255, 255, 0.08);
    word-break: break-all;
}
.rifa-check { display: flex; align-items: center; gap: 0.5rem; margin: 0.35rem 0; }

/* Admin */

.rifa-admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 5px 0 0.85rem;
}
.rifa-tab {
    padding: 0.5rem 0.9rem;
    border: 1px solid var(--cobalt-blue);
    background: transparent;
    color: var(--white);
    border-radius: 999px;
    cursor: pointer;
    font: inherit;
}
.rifa-tab.is-active {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    background: rgba(0, 255, 255, 0.08);
}

.rifa-admin .rifa-public-bar {
    margin-bottom: 5px;
}

.rifa-toolbar-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.55rem;
    margin: 0.75rem 0 1rem;
}
.rifa-stat-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 0.9rem;
    border: 1px solid var(--cobalt-blue);
    border-radius: 8px;
    background: rgba(0, 71, 171, 0.25);
    color: var(--white);
    font-size: 0.9rem;
    line-height: 1.2;
}
.rifa-stat-chip strong {
    font-variant-numeric: tabular-nums;
}
.rifa-stat-chip--disp {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}
.rifa-stat-chip--res {
    border-color: #4d8fd9;
    color: #9ec5ff;
}
.rifa-stat-chip--pag {
    border-color: var(--accent-orange);
    color: #ffb399;
}

.rifa-adpanel--config {
    display: flex;
    justify-content: center;
}

/* [hidden] debe ganar a display:flex del panel Config */
.rifa-adpanel[hidden] {
    display: none !important;
}

.rifa-form-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1rem;
}
.rifa-form-row--colors {
    gap: 0.5rem 0.85rem;
}
.rifa-form-row--head {
    align-items: flex-start;
}
.rifa-inline-field {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.88rem;
    color: var(--text-muted);
}
.rifa-inline-field--grow {
    flex: 1 1 160px;
    min-width: 140px;
}
.rifa-inline-field input[type="color"] {
    width: 2.25rem;
    height: 1.75rem;
    padding: 0;
    border: 1px solid var(--cobalt-blue);
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
}
.rifa-input--compact {
    max-width: 180px;
    flex: 0 0 auto;
}
.rifa-head-slot {
    flex: 1 1 180px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
}
.rifa-icon-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem 0.85rem;
}
.rifa-icon-upload {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}
.rifa-icon-upload[hidden] {
    display: none !important;
}

.rifa-banner-form {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 1rem;
    background: rgba(33, 33, 33, 0.9);
    border: 1px solid var(--cobalt-blue);
    border-radius: 14px;
}
.rifa-banner-form h4 {
    margin: 0.55rem 0 0.15rem;
    color: var(--neon-cyan);
    font-size: 0.92rem;
}
.rifa-banner-form h4:first-child {
    margin-top: 0;
}

.rifa-typo-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem 0.85rem;
    align-items: center;
}
.rifa-typo-cell {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.45rem;
    min-width: 0;
}
.rifa-typo-label {
    flex: 0 1 7.5rem;
    font-size: 0.84rem;
    color: var(--text-muted);
    line-height: 1.2;
}
.rifa-typo-unit {
    font-size: 0.78rem;
    color: var(--text-muted);
}
.rifa-input--px {
    width: 4.25rem;
    flex: 0 0 auto;
    padding: 0.35rem 0.4rem;
    text-align: center;
}
.rifa-input--font {
    flex: 1 1 7rem;
    min-width: 0;
    max-width: 100%;
}
.rifa-typo-cell.is-logo-mode .rifa-input--font {
    display: none !important;
}
@media (max-width: 900px) {
    .rifa-typo-row {
        grid-template-columns: 1fr;
    }
}

.rifa-grid-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
    gap: 1rem;
    align-items: start;
}
.rifa-grid-layout .numbers-grid-wrapper { margin-bottom: 0; }

.rifa-num-btn.estado-disponible {
    background-color: rgba(0, 71, 171, 0.45);
    border-color: var(--cobalt-blue);
    color: var(--white);
    cursor: pointer;
}
.rifa-num-btn.estado-disponible:hover {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.35);
}
.rifa-num-btn.estado-reservado {
    background-color: #0047AB;
    border-color: #0047AB;
    color: var(--white);
}
.rifa-num-btn.estado-pagado {
    background-color: #FF4500;
    border-color: #FF4500;
    color: var(--white);
}
.rifa-num-btn.selected {
    outline: 3px solid var(--neon-cyan);
    box-shadow: 0 0 14px rgba(0, 255, 255, 0.55);
}

.rifa-select-panel {
    position: sticky;
    top: 1rem;
    padding: 1rem;
    background: linear-gradient(160deg, rgba(0, 71, 171, 0.4), rgba(18, 18, 18, 0.95));
    border: 1px solid var(--cobalt-blue);
    border-radius: 14px;
    z-index: 5;
}
.rifa-select-panel__toggle {
    display: none;
    width: 100%;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    border: 1px solid var(--neon-cyan);
    background: transparent;
    color: var(--neon-cyan);
    border-radius: 8px;
    cursor: pointer;
}
.rifa-select-panel h4 { margin: 0 0 0.75rem; color: var(--neon-cyan); }

.rifa-lista-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 1rem;
}
.rifa-lista-table tr.is-selected { background: rgba(0, 255, 255, 0.08); }

.rifa-banner-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}
.rifa-banner-preview-col {
    position: sticky;
    top: 1rem;
}
.rifa-preview-toggle { display: none; margin-bottom: 0.75rem; }
.rifa-banner-preview-box {
    display: flex;
    justify-content: center;
    padding: 0.75rem;
    background: #0a0a0a;
    border: 1px solid var(--cobalt-blue);
    border-radius: 14px;
    overflow: auto;
    max-height: calc(100vh - 2rem);
}
.rifa-banner-stage {
    background: #000;
    border-radius: 8px;
}

.rifa-rng {
    text-align: center;
    padding: 2rem 1rem 3rem;
}
.rifa-rng-display {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(4rem, 18vw, 7rem);
    color: var(--neon-cyan);
    letter-spacing: 0.08em;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 24px rgba(0, 255, 255, 0.45);
}
.rifa-rng-winners {
    list-style: none;
    padding: 0;
    margin: 1.5rem auto 0;
    max-width: 420px;
    text-align: left;
}
.rifa-rng-winners li {
    padding: 0.65rem 0.85rem;
    margin-bottom: 0.5rem;
    border: 1px solid var(--cobalt-blue);
    border-radius: 10px;
    background: rgba(0, 71, 171, 0.2);
}

.rifa-capture-root {
    position: fixed;
    left: -10000px;
    top: 0;
    pointer-events: none;
}

/* Resultado del banner (móvil): guardar / compartir / mantener presionado */
.rifa-banner-result {
    position: fixed;
    inset: 0;
    /* Sobre la barra de pestañas del teléfono (1500), bajo los avisos (2000) */
    z-index: 1900;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.82);
    overflow: auto;
}
.rifa-banner-result__box {
    width: min(420px, 100%);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--neon-cyan);
    border-radius: 14px;
    background: var(--dark-gray);
    color: var(--text-body);
}
.rifa-banner-result__hint {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.35;
    color: var(--text-muted);
    text-align: center;
}
.rifa-banner-result__imgwrap {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    display: flex;
    justify-content: center;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.35);
}
.rifa-banner-result__img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    -webkit-touch-callout: default;
    -webkit-user-select: auto;
    user-select: auto;
}
.rifa-banner-result__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}
.rifa-banner-result__actions .rifa-btn {
    flex: 1 1 auto;
    min-width: 8rem;
}

@media (max-width: 900px) {
    .rifa-hub-toolbar {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .rifa-hub-toolbar__left,
    .rifa-hub-toolbar__right { justify-content: center; }

    .rifa-grid-layout {
        grid-template-columns: 1fr;
    }
    .rifa-select-panel {
        position: fixed;
        left: 0;
        right: 0;
        top: 0;
        z-index: 40;
        border-radius: 0 0 14px 14px;
        max-height: 70vh;
        overflow: auto;
    }
    .rifa-select-panel__toggle { display: block; }

    .rifa-banner-split { grid-template-columns: 1fr; }
    .rifa-banner-preview-col { position: static; }
    .rifa-preview-toggle { display: inline-flex; }
    .rifa-banner-preview-box:not(.is-open) { display: none; }
    .rifa-banner-preview-box.is-open {
        display: flex;
        position: fixed;
        inset: 0;
        z-index: 50;
        max-height: none;
        border-radius: 0;
        background: rgba(0, 0, 0, 0.92);
    }
}

@media (max-width: 768px) {
    .rifa-numbers-grid.numbers-grid,
    .numbers-grid.rifa-numbers-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.rifa-link-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.rifa-mt { margin-top: 0.65rem; }
.rifa-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    padding: 0;
    border: 1px solid var(--cobalt-blue);
    border-radius: 8px;
    background: rgba(0, 71, 171, 0.28);
    color: var(--white);
    cursor: pointer;
    text-decoration: none;
    transition: 0.2s ease;
}
.rifa-icon-btn:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}
.rifa-icon-btn--primary {
    border-color: var(--neon-cyan);
    background: rgba(0, 255, 255, 0.12);
    color: var(--neon-cyan);
}
.rifa-icon-btn--warn {
    border-color: #e6a817;
    color: #ffd666;
}
.rifa-icon-btn--warn:hover {
    border-color: #ffd666;
    color: #ffe9a8;
}
.rifa-icon-btn--danger {
    border-color: var(--accent-orange);
    color: #ffb399;
}
.rifa-icon-btn--danger:hover {
    color: #ffd0c0;
    border-color: #ff7040;
}
.rifa-ico {
    width: 1.15rem;
    height: 1.15rem;
    display: block;
}
.rifa-admin-link-text {
    display: inline-block;
    margin: 0.35rem 0;
    word-break: break-all;
    font-size: 0.85rem;
}

/* ---------- Hub: Activas / Archivadas, vigencia ---------- */
.rifa-hub-subtabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 0.85rem;
}

.rifa-count {
    display: inline-block;
    min-width: 1.4em;
    margin-left: 0.25rem;
    padding: 0 0.35em;
    border-radius: 999px;
    background: rgba(0, 255, 255, 0.12);
    color: var(--neon-cyan);
    font-size: 0.78rem;
    font-weight: 700;
    text-align: center;
}

.rifa-count:empty {
    display: none;
}

.rifa-hub-warning {
    margin: 0 0 0.85rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid rgba(224, 176, 87, 0.55);
    border-radius: 10px;
    background: rgba(224, 176, 87, 0.1);
    color: #f2dcae;
    font-size: 0.88rem;
}

.rifa-vig {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-heading);
}

.rifa-dialog {
    /* El reinicio global de márgenes quita el centrado nativo del <dialog> */
    margin: auto;
    width: min(420px, calc(100vw - 32px));
    padding: 0;
    border: 1px solid rgba(0, 255, 255, 0.35);
    border-radius: 14px;
    background: #1c1f26;
    color: var(--text-body);
}

.rifa-dialog::backdrop {
    background: rgba(0, 0, 0, 0.65);
}

.rifa-dialog__form {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 1.25rem;
}

/* ================= Rifa de quien la organiza (#r/<hash>) ================= */
/* Títulos en minúscula normal: la app es para cualquier persona, no un panel técnico */
.rf-app h1,
.rf-app h2,
.rf-app h3 {
    font-family: Inter, sans-serif;
    text-transform: none;
}

.rf-app {
    --rf-libre: rgba(255, 255, 255, 0.05);
    --rf-apartado: #e0b057;
    --rf-pagado: #5fd39a;
    max-width: 980px;
    margin: 0 auto;
    padding-bottom: 24px;
}

.rf-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.rf-dot--libre { background: transparent; border: 1.5px solid rgba(0, 255, 255, 0.7); }
.rf-dot--apartado { background: var(--rf-apartado, #e0b057); }
.rf-dot--pagado { background: var(--rf-pagado, #5fd39a); }

/* Encabezado */
.rf-top {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 14px 4px 10px;
}

.rf-top__brand {
    color: var(--neon-cyan);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-decoration: none;
    white-space: nowrap;
}

.rf-top__title {
    margin: 0;
    color: var(--text-heading);
    font-family: Inter, sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: 0;
}

.rf-top__help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(0, 255, 255, 0.4);
    border-radius: 50%;
    color: var(--neon-cyan);
    font-weight: 800;
    text-decoration: none;
}

.rf-top__help:hover,
.rf-top__help:focus-visible {
    background: rgba(0, 255, 255, 0.1);
}

/* Resumen */
.rf-summary {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) auto auto;
    align-items: center;
    gap: 12px 22px;
    padding: 14px 16px;
    border: 1px solid rgba(0, 255, 255, 0.18);
    border-radius: 14px;
    background: linear-gradient(140deg, rgba(0, 71, 171, 0.18), rgba(33, 33, 33, 0.95));
}

.rf-progress__text {
    margin: 0 0 6px;
    color: var(--text-body);
    font-size: 0.92rem;
}

.rf-progress__text strong {
    color: var(--text-heading);
    font-size: 1.15rem;
}

.rf-progress__bar {
    display: flex;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.rf-progress__paid { background: var(--rf-pagado); transition: width 0.4s ease; }
.rf-progress__res { background: var(--rf-apartado); transition: width 0.4s ease; }

.rf-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.85rem;
    color: var(--text-body);
}

.rf-legend li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.rf-legend strong { color: var(--text-heading); }

.rf-money {
    display: flex;
    gap: 16px;
}

.rf-money div {
    display: flex;
    flex-direction: column;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.rf-money strong {
    color: var(--text-heading);
    font-size: 1.05rem;
    letter-spacing: 0;
    text-transform: none;
}

.rf-money div:last-child strong { color: var(--rf-apartado); }

/* Pestañas (arriba en computadora, abajo en el teléfono) */
.rf-tabs {
    display: flex;
    gap: 6px;
    margin: 14px 0 6px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
}

.rf-tab {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 8px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text-muted);
    font: inherit;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.rf-tab[hidden] { display: none; }

.rf-tab svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 auto;
}

.rf-tab:hover { color: var(--text-heading); }

.rf-tab.is-active {
    background: rgba(0, 255, 255, 0.12);
    color: var(--neon-cyan);
}

.rf-tab:focus-visible {
    outline: 2px solid var(--neon-cyan);
    outline-offset: 1px;
}

/* Paneles */
.rf-panel {
    padding: 8px 2px 0;
}

.rf-panel__head h2 {
    margin: 8px 0 4px;
    color: var(--text-heading);
    font-family: Inter, sans-serif;
    font-size: 1.35rem;
    letter-spacing: 0;
}

.rf-panel__head p {
    margin: 0 0 14px;
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

.rf-panel__head strong { color: var(--text-heading); }

.rf-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.rf-search {
    flex: 1 1 220px;
    min-width: 0;
}

.rf-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.rf-chip {
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: transparent;
    color: var(--text-body);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.rf-chip.is-active {
    border-color: var(--neon-cyan);
    background: rgba(0, 255, 255, 0.12);
    color: var(--neon-cyan);
}

/* Cuadrícula de números */
.rf-grid {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 6px;
    max-width: 760px;
    margin: 0 auto;
}

.rf-num {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    aspect-ratio: 1;
    min-height: 44px;
    padding: 2px;
    border: 1.5px solid rgba(0, 255, 255, 0.28);
    border-radius: 10px;
    background: var(--rf-libre);
    color: var(--text-heading);
    font: inherit;
    cursor: pointer;
    transition: transform 0.12s ease, opacity 0.2s ease, box-shadow 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.rf-num__n {
    font-family: 'Roboto Mono', monospace;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1;
}

.rf-num__who {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.62rem;
    font-weight: 600;
    opacity: 0.9;
}

.rf-num:hover { box-shadow: 0 0 0 1px rgba(0, 255, 255, 0.45); }
.rf-num:active { transform: scale(0.95); }

.rf-num.estado-reservado {
    border-color: var(--rf-apartado);
    background: var(--rf-apartado);
    color: #2b2100;
}

.rf-num.estado-pagado {
    border-color: var(--rf-pagado);
    background: var(--rf-pagado);
    color: #062b19;
}

.rf-num.is-dim { opacity: 0.18; }

.rf-num.is-selected {
    outline: 3px solid var(--neon-cyan);
    outline-offset: 2px;
    box-shadow: 0 0 14px rgba(0, 255, 255, 0.45);
    opacity: 1;
}

.rf-num.is-selected::after {
    content: "✓";
    position: absolute;
    top: -7px;
    right: -7px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--neon-cyan);
    color: #102027;
    font-size: 0.7rem;
    font-weight: 900;
    line-height: 18px;
    text-align: center;
}

.rf-num:focus-visible {
    outline: 2px solid var(--neon-cyan);
    outline-offset: 2px;
}

/* Barra de selección */
.rf-selbar {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    position: sticky;
    bottom: 12px;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 10px 10px 10px 16px;
    border: 1px solid var(--neon-cyan);
    border-radius: 14px;
    background: #14232b;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.rf-selbar[hidden] { display: none; }

.rf-selbar__info {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    color: var(--text-body);
    font-size: 0.82rem;
}

.rf-selbar__info strong {
    color: var(--text-heading);
    font-size: 0.98rem;
}

.rf-selbar__clear {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    background: transparent;
    color: var(--text-heading);
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
}

.rf-selbar #rf-selbar-go { flex: 0 0 auto; }

.rf-selbar__info span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: 'Roboto Mono', monospace;
}

/* Tarjetas */
.rf-card {
    padding: 18px;
    border: 1px solid rgba(0, 255, 255, 0.16);
    border-radius: 14px;
    background: linear-gradient(155deg, rgba(0, 71, 171, 0.12), rgba(33, 33, 33, 0.96));
}

.rf-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 4px;
    color: var(--text-heading);
    font-family: Inter, sans-serif;
    font-size: 1.08rem;
    letter-spacing: 0;
}

.rf-card__sub {
    margin: 0 0 14px;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.rf-card__sub strong { color: var(--text-heading); }

.rf-card__note {
    margin: 12px 0 0;
    color: var(--rf-apartado);
    font-size: 0.85rem;
}

.rf-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--neon-cyan);
    color: #102027;
    font-size: 0.85rem;
    font-weight: 900;
}

.rf-label {
    margin: 14px 0 8px;
    color: var(--text-heading);
    font-weight: 700;
    font-size: 0.92rem;
}

.rf-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.rf-actions--stack {
    flex-direction: column;
}

.rf-actions--stack .rifa-btn { width: 100%; }

.rf-linkbtn {
    margin-top: 10px;
    padding: 4px 0;
    border: 0;
    background: none;
    color: var(--neon-cyan);
    font: inherit;
    font-size: 0.85rem;
    text-align: left;
    text-decoration: underline;
    cursor: pointer;
}

.rf-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.rf-form[hidden] { display: none; }

.rf-empty {
    padding: 28px 16px;
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    color: var(--text-muted);
    text-align: center;
}

/* Compradores */
.rf-buyers {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 12px;
}

.rf-buyer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border: 1px solid rgba(95, 211, 154, 0.35);
    border-left: 4px solid var(--rf-pagado);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
}

.rf-buyer.is-due {
    border-color: rgba(224, 176, 87, 0.4);
    border-left-color: var(--rf-apartado);
}

.rf-buyer__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.rf-buyer h3 {
    margin: 0;
    color: var(--text-heading);
    font-family: Inter, sans-serif;
    font-size: 1rem;
    letter-spacing: 0;
}

.rf-buyer__head p {
    margin: 2px 0 0;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.rf-buyer__due,
.rf-buyer__ok {
    flex: 0 0 auto;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.rf-buyer__due { background: rgba(224, 176, 87, 0.16); color: var(--rf-apartado); }
.rf-buyer__ok { background: rgba(95, 211, 154, 0.14); color: var(--rf-pagado); }

.rf-buyer__nums {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.rf-chipnum {
    padding: 3px 8px;
    border-radius: 7px;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.85rem;
    font-weight: 700;
}

.rf-chipnum.estado-reservado { background: var(--rf-apartado); color: #2b2100; }
.rf-chipnum.estado-pagado { background: var(--rf-pagado); color: #062b19; }

.rf-buyer__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Secciones avanzadas plegables */
.rf-advanced {
    margin-top: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
}

.rf-advanced > summary {
    padding: 12px 14px;
    color: var(--text-body);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
}

.rf-advanced[open] > summary { border-bottom: 1px solid rgba(255, 255, 255, 0.08); }

.rf-advanced__body {
    padding: 14px;
}

.rf-advanced .rifa-banner-form {
    padding: 0;
    border: 0;
    background: none;
}

/* Desplegable destacado: tiene que verse a la primera */
.rf-advanced--destacado {
    border: 2px solid var(--neon-cyan);
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.14), rgba(0, 71, 171, 0.32));
    box-shadow: 0 0 18px rgba(0, 255, 255, 0.22);
    animation: rf-destacar 2.6s ease-in-out infinite;
}

.rf-advanced--destacado[open] {
    animation: none;
    background: rgba(0, 71, 171, 0.12);
}

@keyframes rf-destacar {
    0%, 100% { box-shadow: 0 0 10px rgba(0, 255, 255, 0.18); }
    50% { box-shadow: 0 0 24px rgba(0, 255, 255, 0.45); }
}

@media (prefers-reduced-motion: reduce) {
    .rf-advanced--destacado { animation: none; }
}

.rf-advanced--destacado > summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    list-style: none;
}

.rf-advanced--destacado > summary::-webkit-details-marker { display: none; }

.rf-advanced--destacado > summary::after {
    content: "";
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    margin-left: auto;
    border-right: 3px solid var(--neon-cyan);
    border-bottom: 3px solid var(--neon-cyan);
    transform: rotate(45deg) translateY(-3px);
    transition: transform 0.2s ease;
}

.rf-advanced--destacado[open] > summary::after { transform: rotate(-135deg) translateY(-3px); }

.rf-advanced--destacado[open] > summary { border-bottom-color: rgba(0, 255, 255, 0.3); }

.rf-advanced__ico {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--neon-cyan);
}

.rf-advanced__ico svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: #102027;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.rf-advanced__txt {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.rf-advanced__txt strong {
    color: var(--neon-cyan);
    font-size: 1.02rem;
    line-height: 1.25;
}

.rf-advanced__txt small {
    color: var(--text-body);
    font-size: 0.82rem;
    font-weight: 400;
    line-height: 1.4;
}

/* Compartir rápido (al inicio y al final de «Compartir») */
.rf-quickshare {
    margin: 0 0 16px;
    padding: 14px;
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 14px;
    background: linear-gradient(155deg, rgba(0, 71, 171, 0.22), rgba(33, 33, 33, 0.96));
}

.rf-quickshare--end { margin: 16px 0 0; }

.rf-quickshare__title {
    margin: 0 0 10px;
    color: var(--text-heading);
    font-weight: 700;
    font-size: 0.95rem;
}

.rf-quickshare__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.rf-quickshare__grid .rifa-btn {
    min-height: 48px;
    padding: 0.55rem 0.6rem;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
}

@media (max-width: 900px) {
    .rf-quickshare__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rf-quickshare__grid .rifa-btn--primary,
    .rf-quickshare__grid .rifa-btn:last-child { grid-column: 1 / -1; }
}

/* Personalizar la imagen */
.rf-custom { gap: 14px; }

.rf-custom__live {
    position: sticky;
    top: 8px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border: 1px solid rgba(0, 255, 255, 0.25);
    border-radius: 12px;
    background: rgba(20, 24, 32, 0.96);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.rf-custom__live p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.45;
}

.rf-custom__live strong { color: var(--text-heading); }

.rf-custom__mini {
    flex: 0 0 auto;
    width: 108px;
    height: 192px;
    overflow: hidden;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}

.rf-custom__sec {
    min-width: 0;
    margin: 0;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
}

.rf-custom__sec legend {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 6px;
    color: var(--text-heading);
    font-weight: 700;
    font-size: 1rem;
}

.rf-custom__sec > * + * { margin-top: 12px; }

.rf-custom__help,
.rf-custom__sub {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.45;
}

.rf-custom__sub {
    color: var(--text-heading);
    font-weight: 700;
}

.rf-seg.rf-seg--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 0;
}

.rf-colors {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr));
    gap: 8px;
}

.rf-color {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-body);
    font-size: 0.88rem;
    cursor: pointer;
}

.rf-color[hidden] { display: none; }

.rf-color input[type="color"] {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    background: none;
    cursor: pointer;
}

.rf-color input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.rf-color input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 50%; }
.rf-color input[type="color"]::-moz-color-swatch { border: 0; border-radius: 50%; }

.rf-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-body);
    font-size: 0.92rem;
    cursor: pointer;
}

.rf-switch input {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    accent-color: var(--neon-cyan);
}

.rf-sizes {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rf-size {
    display: grid;
    grid-template-columns: minmax(0, 8.5rem) minmax(0, 1fr) 2.6rem;
    align-items: center;
    gap: 6px 10px;
}

.rf-size[hidden] { display: none; }

.rf-size__label {
    color: var(--text-body);
    font-size: 0.88rem;
}

.rf-size input[type="range"] {
    width: 100%;
    accent-color: var(--neon-cyan);
}

.rf-size__val {
    color: var(--neon-cyan);
    font-family: 'Roboto Mono', monospace;
    font-size: 0.85rem;
    text-align: right;
}

/* La letra por texto solo aparece si se pidió */
.rf-size__font { display: none; }
.is-font-each .rf-size__font:not([hidden]) {
    display: block;
    grid-column: 1 / -1;
}

.rf-logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.rf-logo[hidden] { display: none; }

.rf-logo__thumb {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    border: 1px dashed rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    background: repeating-conic-gradient(#3a3a3a 0% 25%, #2b2b2b 0% 50%) 50% / 16px 16px;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-align: center;
    overflow: hidden;
}

.rf-logo__thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.rf-logo__actions {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
}

/* Botón que abre el selector de archivos (el input queda invisible encima) */
.rf-upload {
    position: relative;
    overflow: hidden;
}

.rf-upload input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.rf-icon + .rf-icon {
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.rf-icon__opts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 8px 0 0 30px;
}

.rf-icon__opts[hidden] { display: none; }
.rf-icon__opts .rf-linkbtn { margin: 0; }

.rf-custom__save {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.rf-custom__save .rifa-btn { min-height: 46px; }

@media (max-width: 480px) {
    #rf-banner-advanced > .rf-advanced__body { padding: 10px 8px; }
    .rf-custom__sec { padding: 12px 10px; }
    .rf-size { grid-template-columns: minmax(0, 1fr) 2.6rem; }
    .rf-size__label { grid-column: 1 / -1; }
    .rf-custom__save { grid-template-columns: 1fr; }
    .rf-custom__mini { width: 81px; height: 144px; }
}

/* Compartir */
.rf-share {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 16px;
    align-items: start;
}

.rf-share__preview {
    display: flex;
    justify-content: center;
    padding: 10px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.35);
}

.rf-share__preview .rifa-banner-stage {
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.45);
}

.rf-themes {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.rf-theme {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border: 2px solid transparent;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-body);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.rf-theme.is-active {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

.rf-theme__swatch {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100%;
    height: 46px;
    border-radius: 8px;
}

.rf-theme__swatch span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 5px;
    font-size: 0.66rem;
    font-weight: 800;
}

.rf-checks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    margin: 14px 0;
}

.rf-check {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-body);
    font-size: 0.9rem;
    cursor: pointer;
}

.rf-check input {
    width: 18px;
    height: 18px;
    accent-color: var(--neon-cyan);
}

.rf-msg-text {
    min-height: 220px;
    font-family: Inter, sans-serif;
    font-size: 0.9rem;
    line-height: 1.5;
    resize: vertical;
}

.rf-share__msg .rifa-field + .rifa-field { margin-top: 12px; }

/* Ajustes */
.rf-settings {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.rf-settings > .rf-card:first-child {
    grid-row: span 3;
}

/* Modales (hoja inferior en el teléfono) */
body.rf-modal-open {
    overflow: hidden;
}

.rf-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.62);
}

.rf-modal[hidden] { display: none; }

.rf-modal__box {
    width: min(480px, 100%);
    max-height: calc(100dvh - 32px);
    overflow: auto;
    padding: 18px;
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 16px;
    background: #1b1e24;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}

.rf-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.rf-modal__head h3 {
    margin: 0;
    color: var(--text-heading);
    font-family: Inter, sans-serif;
    font-size: 1.15rem;
    letter-spacing: 0;
}

.rf-modal__close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-heading);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
}

.rf-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}

.rf-sheet-current {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 4px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-body);
    font-size: 0.88rem;
}

.rf-sheet-current[hidden] { display: none; }

.rf-sheet-current div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rf-sheet-current small { color: var(--text-muted); }

.rf-estado {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}

.rf-estado__opt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 6px;
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-heading);
    font: inherit;
    cursor: pointer;
}

.rf-estado__opt small {
    color: var(--text-muted);
    font-size: 0.72rem;
}

.rf-estado__opt.is-active {
    border-color: var(--neon-cyan);
    background: rgba(0, 255, 255, 0.1);
}

.rifa-btn--danger.rifa-btn--primary {
    border-color: var(--accent-orange);
    background: var(--accent-orange);
    color: #fff;
}

/* Acceso directo */
.rf-install-list {
    margin: 10px 0 0;
    padding-left: 1.3rem;
    color: var(--text-body);
    line-height: 1.6;
}

.rf-install-list li + li { margin-top: 8px; }
.rf-install-list strong { color: var(--text-heading); }

.rf-ico-inline {
    display: inline-block;
    width: 20px;
    height: 20px;
    vertical-align: -4px;
    color: var(--neon-cyan);
}

.rf-install-warn {
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(224, 176, 87, 0.12);
    color: #f2dcae;
    font-size: 0.9rem;
    line-height: 1.5;
}

.rf-install-ok {
    color: var(--rf-pagado);
    font-weight: 700;
}

.rf-install-native { width: 100%; }

/* Asistente */
.rf-wizard {
    position: fixed;
    inset: 0;
    z-index: 2100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: radial-gradient(ellipse at 50% 30%, rgba(0, 71, 171, 0.45), rgba(10, 10, 12, 0.96) 70%);
}

.rf-wizard[hidden] { display: none; }

.rf-wizard__box {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(560px, 100%);
    max-height: calc(100dvh - 32px);
    overflow: auto;
    padding: 22px 22px 18px;
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 18px;
    background: #1b1e24;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
}

.rf-wizard__progress {
    height: 5px;
    margin-bottom: 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.rf-wizard__progress span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--cobalt-blue), var(--neon-cyan));
    transition: width 0.35s ease;
}

.rf-wizard__step {
    margin: 0 0 6px;
    color: var(--neon-cyan);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.rf-wz-pane h2 {
    margin: 0 0 6px;
    color: var(--text-heading);
    font-family: Inter, sans-serif;
    font-size: 1.45rem;
    letter-spacing: 0;
    line-height: 1.25;
}

.rf-wz-pane > p {
    margin: 0 0 14px;
    color: var(--text-body);
    line-height: 1.55;
}

.rf-wz-pane .rifa-field + .rifa-field { margin-top: 12px; }

.rf-wz-list {
    margin: 0 0 14px;
    padding-left: 1.2rem;
    color: var(--text-body);
    line-height: 1.7;
}

.rf-wz-list strong { color: var(--text-heading); }

.rf-wz-note {
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(0, 255, 255, 0.07);
    font-size: 0.9rem;
}

/* Advertencia del sorteo en el asistente: no se puede cambiar después */
.rf-warn {
    margin: 4px 0 14px;
    padding: 12px 14px;
    border: 2px solid #FFB020;
    border-left-width: 6px;
    border-radius: 10px;
    background: rgba(255, 176, 32, 0.14);
    color: var(--text-heading);
}

.rf-warn[hidden] { display: none; }

.rf-warn > strong {
    display: block;
    margin-bottom: 4px;
    color: #FFC94D;
    font-size: 1rem;
}

.rf-warn p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.45;
}

.rf-warn p strong { color: #FFC94D; }

/* Sorteo fijo (Ajustes y asistente después del primer uso) */
.rf-locked {
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
}

.rf-locked[hidden] { display: none; }

.rf-locked p { margin: 0; }

.rf-locked__title {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.rf-locked__value {
    margin-top: 4px !important;
    color: var(--text-heading);
    font-weight: 700;
}

.rf-locked__note {
    margin-top: 6px !important;
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

.rf-wz-big {
    font-size: 1.15rem;
    padding: 0.85rem 0.9rem;
}

.rf-seg {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 14px;
}

.rf-seg button {
    padding: 10px 6px;
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-heading);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.rf-seg button.is-active {
    border-color: var(--neon-cyan);
    background: rgba(0, 255, 255, 0.1);
    color: var(--neon-cyan);
}

.rf-radio-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.rf-radio-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
}

.rf-radio-card:has(input:checked) {
    border-color: var(--neon-cyan);
    background: rgba(0, 255, 255, 0.07);
}

.rf-radio-card input {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    accent-color: var(--neon-cyan);
}

.rf-radio-card span {
    display: flex;
    flex-direction: column;
    color: var(--text-heading);
}

.rf-radio-card small {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.rifa-field__hint.is-error { color: #ffb399; }

.rf-wz-style {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: start;
}

.rf-wz-style .rf-themes { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.rf-wz-preview {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.5);
}

.rf-wizard__error {
    min-height: 1.2em;
    margin: 10px 0 0;
    color: #ffb399;
    font-size: 0.9rem;
}

.rf-wizard__nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.rf-wizard__nav #rf-wz-next { margin-left: auto; }
.rf-wizard__nav [hidden] { display: none; }
.rf-wizard__nav .rf-linkbtn { margin-top: 0; }

/* --- Teléfono --- */
@media (max-width: 768px) {
    body.cpm-rifa-standalone #main-content .rf-app {
        padding-bottom: 96px;
    }

    .rf-top { padding: 8px 2px 6px; }

    .rf-summary {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 10px 12px;
    }

    .rf-progress__text { font-size: 0.85rem; margin-bottom: 4px; }
    .rf-legend { font-size: 0.8rem; gap: 4px 12px; }
    .rf-money strong { font-size: 0.95rem; }

    .rf-panel__head h2 { font-size: 1.15rem; margin-top: 4px; }
    .rf-panel__head p { font-size: 0.85rem; margin-bottom: 10px; }

    .rf-tools { gap: 8px; margin-bottom: 10px; }
    .rf-search { flex-basis: 100%; }

    /* Filtros en una sola fila que se desliza con el dedo */
    .rf-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        width: 100%;
        scrollbar-width: none;
    }

    .rf-filters::-webkit-scrollbar { display: none; }
    .rf-chip { flex: 0 0 auto; padding: 6px 12px; }

    .rf-money {
        justify-content: space-between;
    }

    /* Los avisos no tapan la barra de secciones ni la de selección */
    body.cpm-rifa-standalone .auth-message {
        left: 12px;
        right: 12px;
        bottom: calc(78px + env(safe-area-inset-bottom));
        max-width: none;
        min-width: 0;
    }

    body.cpm-rifa-standalone.rf-has-selbar .auth-message {
        bottom: calc(150px + env(safe-area-inset-bottom));
    }

    .rf-tabs {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1500;
        margin: 0;
        padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
        border: 0;
        border-top: 1px solid rgba(0, 255, 255, 0.25);
        border-radius: 0;
        background: rgba(20, 22, 27, 0.97);
        backdrop-filter: blur(8px);
    }

    .rf-tab {
        flex-direction: column;
        gap: 3px;
        padding: 6px 2px;
        font-size: 0.7rem;
    }

    .rf-tab svg { width: 22px; height: 22px; }

    .rf-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 8px;
    }

    .rf-num__n { font-size: 1.15rem; }
    .rf-num__who { font-size: 0.68rem; }

    .rf-selbar {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: calc(70px + env(safe-area-inset-bottom));
        margin: 0;
    }

    .rf-share,
    .rf-settings {
        grid-template-columns: 1fr;
    }

    .rf-settings > .rf-card:first-child { grid-row: auto; }

    .rf-modal {
        align-items: flex-end;
        padding: 0;
    }

    .rf-modal__box {
        width: 100%;
        max-height: 92dvh;
        border-radius: 18px 18px 0 0;
        padding-bottom: calc(18px + env(safe-area-inset-bottom));
    }

    .rf-wizard {
        align-items: stretch;
        padding: 0;
    }

    .rf-wizard__box {
        max-height: none;
        height: 100dvh;
        border: 0;
        border-radius: 0;
        padding: calc(18px + env(safe-area-inset-top)) 18px calc(14px + env(safe-area-inset-bottom));
    }

    .rf-wizard__nav {
        margin-top: auto;
        padding-top: 12px;
    }

    .rf-wz-style { grid-template-columns: 1fr; }
    .rf-wz-style .rf-themes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .rf-wz-preview { justify-self: center; }
}

@media (max-width: 400px) {
    .rf-checks { grid-template-columns: 1fr; }
    .rf-top__brand { display: none; }
    .rf-top { grid-template-columns: minmax(0, 1fr) auto; }
    .rf-top__title { text-align: left; }
}


/* ==========================================================================
   SITE FOOTER — pie de página institucional
   Se oculta en rutas de aplicación mediante .cpm-no-footer (ver app.js).
   ========================================================================== */

.site-footer {
    position: relative;
    z-index: 950;
    background: #1a1a1a;
    color: var(--text-muted);
    border-top: 1px solid rgba(0, 71, 171, 0.6);
    padding: 60px 10% 0;
}

body.cpm-no-footer .site-footer {
    display: none !important;
}

.site-footer__inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1.2fr 1.1fr 1.5fr;
    gap: 40px 32px;
    align-items: start;
    max-width: 1280px;
    margin: 0 auto;
    padding-bottom: 48px;
}

/* --- Columna de marca --- */
.site-footer__logo-link {
    display: inline-block;
    line-height: 0;
}

.site-footer__logo {
    width: 190px;
    height: auto;
    max-width: 100%;
    opacity: 0.95;
    transition: opacity 0.2s ease;
}

.site-footer__logo-link:hover .site-footer__logo,
.site-footer__logo-link:focus-visible .site-footer__logo {
    opacity: 1;
}

.site-footer__tagline {
    margin-top: 14px;
    color: var(--neon-cyan);
    font-family: 'Roboto Mono', monospace;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
}

.site-footer__blurb {
    margin-top: 10px;
    max-width: 38ch;
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-muted);
}

.site-footer__social {
    display: flex;
    gap: 10px;
    list-style: none;
    margin: 20px 0 0;
    padding: 0;
}

.site-footer__social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.site-footer__social a:hover,
.site-footer__social a:focus-visible {
    border-color: var(--neon-cyan);
    background: rgba(0, 255, 255, 0.08);
    transform: translateY(-2px);
}

.site-footer__social img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    display: block;
}

/* --- Columnas de enlaces --- */
.site-footer__title {
    color: var(--text-heading);
    font-family: 'Roboto Mono', monospace;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.site-footer__list a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.92rem;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.site-footer__list a:hover,
.site-footer__list a:focus-visible {
    color: var(--neon-cyan);
    padding-left: 4px;
}

.site-footer__list--contact a {
    word-break: break-word;
}

.site-footer__contact-line {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.site-footer__contact-line img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex: 0 0 auto;
}

.site-footer__cta {
    display: inline-block;
    margin-top: 20px;
    padding: 11px 20px;
    border: 1px solid var(--neon-cyan);
    border-radius: 6px;
    color: var(--neon-cyan);
    background: transparent;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.site-footer__cta:hover,
.site-footer__cta:focus-visible {
    background: var(--neon-cyan);
    color: var(--dark-gray);
}

/* --- Barra inferior --- */
.site-footer__bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 0 26px;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.site-footer__copy {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
}

.site-footer__legal {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer__legal a {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-footer__legal a:hover,
.site-footer__legal a:focus-visible {
    color: var(--neon-cyan);
    text-decoration: underline;
}

/* Acceso discreto: el login ya no está en la barra superior */
.site-footer__login {
    padding: 0;
    border: 0;
    background: none;
    color: var(--text-muted);
    font: inherit;
    font-size: 0.8rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.site-footer__login[hidden] { display: none; }

.site-footer__login:hover,
.site-footer__login:focus-visible {
    color: var(--neon-cyan);
    text-decoration: underline;
}

/* Cinco columnas no caben cómodas: la marca pasa arriba y los enlaces quedan en una fila */
@media (max-width: 1360px) {
    .site-footer__inner {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .site-footer__brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 1024px) {
    .site-footer {
        padding: 50px 6% 0;
    }
    .site-footer__inner {
        grid-template-columns: 1fr 1fr;
        gap: 36px 28px;
    }
    .site-footer__brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 600px) {
    .site-footer {
        padding: 40px 6% 0;
    }
    .site-footer__inner {
        grid-template-columns: 1fr;
        gap: 30px;
        padding-bottom: 34px;
    }
    .site-footer__blurb {
        max-width: none;
    }
    .site-footer__bar {
        flex-direction: column;
        align-items: flex-start;
        padding: 18px 0 24px;
    }
    .site-footer__legal {
        gap: 6px 16px;
    }
}

/* ==========================================================================
   PARCHES Y NOTICIAS (bitácora pública)
   ========================================================================== */

.patch-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 14px;
}

.patch-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.82rem;
    padding: 7px 14px;
    cursor: pointer;
    transition: border-color 0.18s, color 0.18s, background 0.18s;
}

.patch-chip:hover {
    border-color: rgba(0, 255, 255, 0.45);
    color: var(--text-body);
}

.patch-chip.is-active {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    background: rgba(0, 255, 255, 0.08);
}

.patch-chip__n {
    font-family: "Roboto Mono", ui-monospace, monospace;
    font-size: 0.72rem;
    opacity: 0.75;
}

.patch-count {
    margin: 0 0 26px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* La línea vertical hace que la bitácora se lea como una sucesión de hitos. */
.patch-feed {
    position: relative;
    display: grid;
    gap: 18px;
    padding-left: 26px;
}

.patch-feed::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 8px;
    bottom: 8px;
    width: 1px;
    background: linear-gradient(
        180deg,
        rgba(0, 255, 255, 0.55),
        rgba(0, 71, 171, 0.35) 45%,
        rgba(255, 255, 255, 0.06)
    );
}

.patch-card {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.22);
    padding: 20px 22px;
}

.patch-card::before {
    content: "";
    position: absolute;
    left: -24px;
    top: 26px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--dark-gray);
    border: 2px solid rgba(0, 255, 255, 0.45);
}

.patch-card--featured {
    border-color: rgba(0, 255, 255, 0.42);
    background: rgba(0, 255, 255, 0.045);
}

.patch-card--featured::before {
    background: var(--neon-cyan);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.6);
}

.patch-card__flag {
    margin: 0 0 10px;
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--neon-cyan);
}

.patch-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.patch-tag {
    display: inline-block;
    border: 1px solid rgba(0, 71, 171, 0.75);
    border-radius: 4px;
    padding: 3px 9px;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    color: #cfe4ff;
    background: rgba(0, 71, 171, 0.28);
}

.patch-tag--angeles {
    border-color: rgba(155, 140, 240, 0.7);
    background: rgba(155, 140, 240, 0.18);
    color: #d8d0ff;
}

.patch-tag--rifa {
    border-color: rgba(255, 69, 0, 0.6);
    background: rgba(255, 69, 0, 0.16);
    color: #ffcbb8;
}

.patch-tag--bingo {
    border-color: rgba(255, 196, 0, 0.6);
    background: rgba(255, 196, 0, 0.14);
    color: #ffe7a3;
}

.patch-tag--certificados {
    border-color: rgba(95, 211, 154, 0.6);
    background: rgba(95, 211, 154, 0.15);
    color: #bdf0d7;
}

.patch-tag--admin {
    border-color: rgba(224, 176, 87, 0.6);
    background: rgba(224, 176, 87, 0.15);
    color: #f2dcae;
}

.patch-tag--sitio {
    border-color: rgba(0, 255, 255, 0.5);
    background: rgba(0, 255, 255, 0.1);
    color: #b8f6f6;
}

.patch-card__date {
    font-size: 0.74rem;
    color: var(--text-muted);
    letter-spacing: 0.03em;
}

.patch-card__hour {
    opacity: 0.7;
}

/* Solo admin: copia el parche con formato de WhatsApp */
.patch-copy {
    margin-left: auto;
    border: 1px solid rgba(37, 211, 102, 0.55);
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    color: #bdf5d2;
    background: rgba(37, 211, 102, 0.12);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.patch-copy:hover,
.patch-copy:focus-visible {
    background: rgba(37, 211, 102, 0.24);
    border-color: rgba(37, 211, 102, 0.85);
}

.patch-copy.is-done {
    color: #0b1a10;
    background: #25d366;
    border-color: #25d366;
}

.patch-card__title {
    margin: 0 0 8px;
    font-size: 1.12rem;
    line-height: 1.35;
    color: var(--text-heading);
}

.patch-card__lead {
    margin: 0 0 16px;
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--text-body);
    max-width: 82ch;
}

.patch-card__changes {
    display: grid;
    gap: 14px;
}

/* Parche de un día que tocó varias áreas: un bloque por área */
.patch-area + .patch-area {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px dashed rgba(255, 255, 255, 0.12);
}

.patch-area__head {
    margin: 0 0 10px;
}

.patch-change__label {
    margin: 0 0 6px;
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.patch-change__label.is-nuevo { color: #5fd39a; }
.patch-change__label.is-mejorado { color: #7fc6ff; }
.patch-change__label.is-corregido { color: #e0b057; }
.patch-change__label.is-nota { color: var(--text-muted); }

.patch-change__list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 7px;
}

.patch-change__list li {
    position: relative;
    padding-left: 18px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-body);
}

.patch-change__list li::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 0.62em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.32);
}

.patch-change--nuevo .patch-change__list li::before { background: rgba(95, 211, 154, 0.85); }
.patch-change--mejorado .patch-change__list li::before { background: rgba(127, 198, 255, 0.85); }
.patch-change--corregido .patch-change__list li::before { background: rgba(224, 176, 87, 0.85); }

.patch-empty {
    margin: 0;
    padding: 22px;
    border: 1px dashed rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.patch-foot {
    margin-top: 34px;
}

.patch-foot a {
    color: var(--neon-cyan);
}

@media (max-width: 768px) {
    .patch-feed {
        padding-left: 20px;
        gap: 14px;
    }

    .patch-feed::before {
        left: 5px;
    }

    .patch-card {
        padding: 17px 16px;
    }

    .patch-card::before {
        left: -19px;
        top: 22px;
    }

    .patch-card__title {
        font-size: 1.02rem;
    }
}

/* ==========================================================================
   PÁGINAS DE DOCUMENTO (Ángeles Secretos, Términos, Privacidad)
   ========================================================================== */

/*
 * .doc-page es la propia <section>, así que su max-width incluye el padding
 * lateral. Se define un canal fijo (en vez del 10% heredado de `section`) para
 * que el ancho útil no se encoja al crecer la pantalla.
 */
.content-section.doc-page {
    box-sizing: border-box;
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding-left: clamp(20px, 3vw, 40px);
    padding-right: clamp(20px, 3vw, 40px);
}

.doc-lead {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-body);
    max-width: 78ch;
    margin-bottom: 26px;
}

.doc-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    margin: 0 0 38px;
    padding: 0;
}

.doc-facts li {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 0.78rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
}

.doc-facts strong {
    color: var(--neon-cyan);
    font-weight: 700;
}

.doc-routes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-bottom: 12px;
}

.doc-route {
    border: 1px solid rgba(0, 71, 171, 0.55);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.18);
    padding: 20px 22px;
}

.doc-route h3 {
    font-size: 1.05rem;
    color: var(--text-heading);
    margin-bottom: 10px;
}

.doc-route code {
    display: inline-block;
    color: var(--neon-cyan);
    background: rgba(0, 255, 255, 0.08);
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.doc-route p {
    margin: 0;
    font-size: 0.92rem;
    color: var(--text-muted);
}

.doc-block {
    padding: 56px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 46px;
}

.doc-eyebrow {
    color: var(--neon-cyan);
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.doc-h2 {
    font-size: 1.55rem;
    color: var(--text-heading);
    margin-bottom: 8px;
}

.doc-sub {
    color: var(--text-muted);
    max-width: 76ch;
    margin-bottom: 6px;
}

.doc-h3 {
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 1.02rem;
    color: var(--text-heading);
    margin: 36px 0 10px;
}

.doc-list {
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
}

.doc-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 9px;
    color: var(--text-body);
    line-height: 1.7;
}

.doc-list li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 0.68em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--neon-cyan);
}

.doc-list strong {
    color: var(--text-heading);
}

.doc-figure {
    margin: 22px 0 30px;
}

.doc-figure img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: #0f0f0f;
}

.doc-figure figcaption {
    margin-top: 9px;
    font-size: 0.76rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.doc-figure--phone img {
    max-width: 330px;
    margin: 0 auto;
}

.doc-figure--phone figcaption {
    text-align: center;
}

.doc-figure-pair {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.doc-figure-pair .doc-figure {
    margin-top: 0;
}

.doc-states {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 6px 0 22px;
    padding: 0;
}

.doc-states li {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.03);
}

.doc-states .is-todo { color: #e0b057; }
.doc-states .is-pending { color: #9b8cf0; }
.doc-states .is-sent { color: #5fd39a; }
.doc-states .is-error { color: #e88080; }

.doc-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 22px;
}

/* 8 tarjetas: 4x2 en pantallas anchas, 2x4 en el resto. */
@media (min-width: 1080px) {
    .doc-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Rifas Digitales: pasos numerados, dos columnas fijas y el estado «Libre» */
.doc-list--steps {
    counter-reset: doc-step;
}

.doc-list--steps li {
    counter-increment: doc-step;
    padding-left: 34px;
}

.doc-list--steps li::before {
    content: counter(doc-step);
    top: 0.2em;
    width: 22px;
    height: 22px;
    background: var(--neon-cyan);
    color: #102027;
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 22px;
    text-align: center;
}

@media (min-width: 1080px) {
    .doc-grid.doc-grid--two {
        grid-template-columns: repeat(2, 1fr);
    }

    .doc-grid.doc-grid--three {
        grid-template-columns: repeat(3, 1fr);
    }
}

.doc-states .rd-state--libre { color: var(--neon-cyan); }

.doc-grid article {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.18);
    padding: 18px 20px;
}

.doc-grid h4 {
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    font-size: 0.88rem;
    letter-spacing: 0.4px;
    color: var(--text-heading);
    margin-bottom: 8px;
}

.doc-grid p {
    margin: 0;
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.doc-cta {
    margin-top: 40px;
    padding: 26px 24px;
    border: 1px solid rgba(0, 71, 171, 0.55);
    border-radius: 8px;
    background: rgba(0, 71, 171, 0.08);
    text-align: center;
}

.doc-cta p {
    margin-bottom: 16px;
    color: var(--text-body);
}

.doc-cta__btn {
    display: inline-block;
    text-decoration: none;
    width: auto;
    padding: 12px 28px;
}

.doc-cta__alt {
    display: block;
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
}

.doc-cta__alt:hover,
.doc-cta__alt:focus-visible {
    color: var(--neon-cyan);
}

.doc-note {
    margin-top: 44px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.doc-note a,
.doc-lead a,
.doc-legal a {
    color: var(--neon-cyan);
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 255, 255, 0.35);
}

.doc-note a:hover,
.doc-lead a:hover,
.doc-legal a:hover {
    border-bottom-color: var(--neon-cyan);
}

/* --- Páginas legales --- */
.content-section.doc-page--legal {
    max-width: 1040px;
}

.doc-legal-meta {
    color: var(--text-muted);
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 22px;
}

.doc-legal {
    list-style: none;
    margin: 0;
    padding: 0;
}

.doc-legal > li {
    padding: 26px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.doc-legal > li:first-child {
    border-top: 0;
    padding-top: 8px;
}

.doc-legal h3 {
    font-size: 1rem;
    color: var(--text-heading);
    margin-bottom: 12px;
}

.doc-legal p {
    color: var(--text-body);
    line-height: 1.8;
    margin-bottom: 12px;
    max-width: 80ch;
}

.doc-legal p:last-child {
    margin-bottom: 0;
}

.doc-tablewrap {
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin: 16px 0;
}

.doc-table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.doc-table th,
.doc-table td {
    text-align: left;
    padding: 11px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    vertical-align: top;
    color: var(--text-body);
}

.doc-table tbody tr:last-child td {
    border-bottom: 0;
}

.doc-table th {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 400;
    background: rgba(255, 255, 255, 0.04);
}

@media (max-width: 768px) {
    .doc-routes,
    .doc-grid,
    .doc-figure-pair {
        grid-template-columns: 1fr;
    }
    .doc-block {
        padding-top: 40px;
        margin-top: 34px;
    }
    .doc-h2 {
        font-size: 1.3rem;
    }
}

/* --- Nota de encabezado --- */
.doc-note--top {
    margin-top: 0;
    margin-bottom: 34px;
    padding-top: 0;
    border-top: 0;
    border-left: 3px solid var(--neon-cyan);
    padding-left: 16px;
    max-width: 82ch;
}

/* --- Callout de novedades (páginas de documento) --- */
.doc-callout {
    display: block;
    border: 1px solid rgba(0, 255, 255, 0.35);
    border-left: 3px solid var(--neon-cyan);
    border-radius: 10px;
    background: rgba(0, 255, 255, 0.05);
    padding: 22px clamp(18px, 2.4vw, 28px);
    margin: 0 0 34px;
}

.doc-callout__eyebrow {
    margin: 0 0 6px;
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--neon-cyan);
}

.doc-callout__title {
    margin: 0 0 14px;
    font-size: clamp(1.05rem, 2.4vw, 1.25rem);
    color: var(--text-heading);
    font-weight: 600;
}

.doc-callout__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 9px;
}

.doc-callout__list li {
    position: relative;
    padding-left: 20px;
    color: var(--text-body);
    line-height: 1.65;
    font-size: 0.95rem;
}

.doc-callout__list li::before {
    content: "+";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--neon-cyan);
    font-family: 'Roboto Mono', monospace;
}

.doc-callout__list strong {
    color: var(--text-heading);
}

.doc-callout__foot {
    margin: 16px 0 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.doc-callout__text {
    margin: 0;
    color: var(--text-body);
    line-height: 1.7;
}

.rd-offer + .doc-callout { margin: 22px 0 0; }

.doc-callout__text a,
.doc-callout__foot a {
    color: var(--neon-cyan);
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 255, 255, 0.4);
}

.doc-page .doc-list a,
.doc-page .doc-grid a {
    color: var(--neon-cyan);
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 255, 255, 0.4);
}

.doc-page .doc-list a:hover,
.doc-page .doc-list a:focus-visible,
.doc-page .doc-grid a:hover,
.doc-page .doc-grid a:focus-visible,
.doc-callout__text a:hover,
.doc-callout__text a:focus-visible,
.doc-callout__foot a:hover,
.doc-callout__foot a:focus-visible {
    border-bottom-color: var(--neon-cyan);
}

/* --- Rifas Digitales: precio y contacto --- */
.rd-offer {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: clamp(18px, 3vw, 34px);
    margin: 0 0 34px;
    padding: clamp(20px, 3vw, 30px);
    border: 1px solid var(--neon-cyan);
    border-radius: 12px;
    background: linear-gradient(150deg, rgba(0, 71, 171, 0.3), rgba(0, 0, 0, 0.25));
    box-shadow: 0 0 22px rgba(0, 255, 255, 0.12);
}

.rd-offer--end { margin: 22px 0 0; }

.rd-offer__price {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 18px 26px;
    border: 1px solid rgba(0, 255, 255, 0.45);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.3);
    text-align: center;
}

.rd-offer__label {
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.rd-offer__amount {
    color: var(--neon-cyan);
    font-size: clamp(2rem, 6vw, 2.6rem);
    font-weight: 800;
    line-height: 1;
}

.rd-offer__unit {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.rd-offer__title {
    margin: 0 0 8px;
    color: var(--text-heading);
    font-size: clamp(1.15rem, 2.6vw, 1.4rem);
}

.rd-offer__body p {
    margin: 0 0 16px;
    color: var(--text-body);
    line-height: 1.7;
}

.rd-offer__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
}

.rd-offer__btn { padding: 12px 22px; }

.rd-offer__phone {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    color: var(--neon-cyan);
    text-decoration: none;
    font-size: 1.05rem;
}

.rd-offer__phone-label {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.rd-offer__phone:hover .tech-font,
.rd-offer__phone:focus-visible .tech-font { text-decoration: underline; }

@media (max-width: 600px) {
    .rd-offer { grid-template-columns: 1fr; }
    .rd-offer__price { justify-self: stretch; }
}

/* --- Rifas Digitales: video promocional (vertical) --- */
.rd-video {
    margin: 0 auto 38px;
    max-width: 360px;
    text-align: center;
}

.rd-video__title {
    margin: 0 0 14px;
    color: var(--text-heading);
    font-size: clamp(1.15rem, 2.6vw, 1.4rem);
}

.rd-video__player {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 9 / 16;
    border: 1px solid rgba(0, 255, 255, 0.45);
    border-radius: 14px;
    background: #0f0f0f;
    box-shadow: 0 0 22px rgba(0, 255, 255, 0.14);
}

.rd-video__credit {
    margin-top: 9px;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.rd-video__credit span { display: block; line-height: 1.6; }

.rd-warn {
    margin: 18px 0;
    padding: 14px 16px;
    border: 2px solid #FFB020;
    border-left-width: 6px;
    border-radius: 10px;
    background: rgba(255, 176, 32, 0.12);
    color: var(--text-body);
    line-height: 1.6;
}

.rd-warn strong { color: #FFC94D; }

/* --- Bloque de donaciones --- */
.doc-donate {
    border: 1px solid rgba(0, 71, 171, 0.55);
    border-radius: 10px;
    background: rgba(0, 71, 171, 0.08);
    padding: 30px clamp(20px, 3vw, 36px) 34px;
    margin-top: 22px;
    text-align: center;
}

.doc-donate p {
    color: var(--text-body);
    line-height: 1.8;
    margin: 0 auto 16px;
    max-width: 74ch;
    text-align: left;
}

.doc-donate strong {
    color: var(--text-heading);
}

.doc-sinpe {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin: 12px auto 22px;
    padding: 18px 34px;
    border: 1px solid var(--neon-cyan);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.28);
}

.doc-sinpe__label {
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.doc-sinpe__number {
    font-size: clamp(1.6rem, 5vw, 2.1rem);
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--neon-cyan);
    line-height: 1.1;
}

.doc-donate .doc-cta__btn {
    margin-top: 6px;
}

.doc-donate .doc-cta__alt {
    color: var(--text-muted);
}

/* --- Línea de tiempo del origen --- */
.doc-timeline {
    list-style: none;
    margin: 24px 0 34px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    counter-reset: hito;
}

.doc-timeline > li {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 2px solid var(--neon-cyan);
    border-radius: 0 0 8px 8px;
    background: rgba(0, 0, 0, 0.18);
    padding: 16px 18px 18px;
    counter-increment: hito;
}

.doc-timeline > li::before {
    content: counter(hito, decimal-leading-zero);
    display: block;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    color: var(--neon-cyan);
    margin-bottom: 8px;
}

.doc-timeline__tag {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-heading);
    letter-spacing: 0.02em;
    margin-bottom: 8px;
}

.doc-timeline p {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.65;
    color: var(--text-muted);
}

/* --- Relato del origen --- */
.doc-story p {
    color: var(--text-body);
    line-height: 1.85;
    margin-bottom: 18px;
    max-width: 78ch;
}

.doc-story p:last-child {
    margin-bottom: 0;
}

.doc-story strong {
    color: var(--text-heading);
}

@media (max-width: 900px) {
    .doc-timeline {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .doc-timeline {
        grid-template-columns: 1fr;
    }
    .doc-sinpe {
        padding: 16px 22px;
        width: 100%;
    }
}
