.app-privacy-overlay {
    position: fixed;
    inset: 0;
    /*
       Capa Helper/Ayuda:
       ventanas App 15000-17000 < helpers principales 19000 < privacidad 19500
       < ImageView 19990 < GlobalMessageBox 20000 < LoadingPage/LoadingInicio 99999+.
    */
    z-index: 19500;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(10, 23, 39, .48);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .22s ease, visibility .22s ease;
}

.app-privacy-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.app-privacy-window {
    display: flex;
    flex-direction: column;
    width: min(760px, 100%);
    max-height: min(86vh, 820px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .82);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 32px 90px rgba(9, 39, 68, .28);
    transform: translateY(18px) scale(.985);
    transition: transform .25s ease;
}

.app-privacy-overlay.show .app-privacy-window { transform: translateY(0) scale(1); }

.app-privacy-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex: 0 0 auto;
    padding: 23px 26px 20px;
    border-bottom: 1px solid #dbe9f7;
    background: linear-gradient(135deg, #f7fbff, #fff);
}

.app-privacy-kicker {
    display: block;
    margin-bottom: 2px;
    color: #087cff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.app-privacy-header h2 { margin: 0; color: #17202a; font-size: clamp(20px, 3vw, 27px); letter-spacing: -.025em; }

.app-privacy-close {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border: 1px solid #cfe2f5;
    border-radius: 13px;
    background: #fff;
    color: #286ca7;
    cursor: pointer;
    transition: background .18s ease, transform .18s ease;
}
.app-privacy-close:hover { background: #edf6ff; transform: rotate(3deg); }

.app-privacy-content {
    min-height: 180px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 28px 30px 34px;
    color: #526476;
    scrollbar-width: thin;
    scrollbar-color: #a9c9e7 transparent;
}

.app-privacy-content::-webkit-scrollbar { width: 8px; }
.app-privacy-content::-webkit-scrollbar-thumb { border-radius: 99px; background: #a9c9e7; }

.app-privacy-meta { display: inline-flex; margin-bottom: 22px; padding: 5px 9px; border-radius: 8px; background: #edf6ff; color: #2877bf; font-size: 11px; font-weight: 700; }
.app-privacy-introduction { margin: 0 0 16px; line-height: 1.72; }
.app-privacy-section { padding: 24px 0; border-top: 1px solid #e1edf7; }
.app-privacy-section h3 { margin: 0 0 13px; color: #1c354b; font-size: 17px; }
.app-privacy-section p { margin: 0 0 12px; line-height: 1.7; }
.app-privacy-section ul { display: grid; gap: 8px; margin: 12px 0 0; padding-left: 21px; }
.app-privacy-section a { color: #087cff; font-weight: 700; text-underline-offset: 3px; }
.app-privacy-closing { margin: 20px 0 0; padding: 18px; border: 1px solid #d8e9f8; border-radius: 13px; background: #f5faff; color: #3f617e; line-height: 1.65; }

.app-privacy-loading,
.app-privacy-error { display: grid; place-items: center; align-content: center; gap: 12px; min-height: 220px; text-align: center; }
.app-privacy-spinner { width: 30px; height: 30px; border: 3px solid #d4e7f8; border-top-color: #087cff; border-radius: 50%; animation: app-privacy-spin .8s linear infinite; }
@keyframes app-privacy-spin { to { transform: rotate(360deg); } }

.app-privacy-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 18px;
    padding: 12px 14px;
    border: 1px solid #cde1f3;
    border-radius: 11px;
    background: #f8fbff;
    color: #286ca7;
    font-weight: 700;
    cursor: pointer;
}
.app-privacy-link:hover { background: #edf6ff; }

.app-privacy-map-link {
    position: fixed;
    right: 16px;
    bottom: 12px;
    z-index: 10;
    color: #687585;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: underline;
    text-underline-offset: 3px;
    opacity: .82;
    cursor: pointer;
    transition: color .16s ease, opacity .16s ease;
}

.app-privacy-map-link:hover,
.app-privacy-map-link:focus-visible {
    color: #087cff;
    opacity: 1;
}

@media (max-width: 700px) {
    .app-privacy-map-link {
        right: 14px;
        bottom: calc(76px + env(safe-area-inset-bottom));
    }
}

@media (max-width: 700px) and (display-mode: standalone) {
    .app-privacy-map-link {
        bottom: calc(108px + env(safe-area-inset-bottom));
    }
}

@media (max-width: 600px) {
    .app-privacy-overlay { align-items: end; padding: 0; }
    .app-privacy-window { width: 100%; max-height: calc(100dvh - 34px); border-radius: 22px 22px 0 0; transform: translateY(100%); }
    .app-privacy-overlay.show .app-privacy-window { transform: translateY(0); }
    .app-privacy-header { padding: 20px 18px 17px; }
    .app-privacy-content { padding: 24px 20px calc(30px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
    .app-privacy-overlay,
    .app-privacy-window,
    .app-privacy-close { transition: none; }
    .app-privacy-spinner { animation-duration: 1.4s; }
}
