/* Phase 97: safe navigation guard and scroll restore UI. */
.safe-nav-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(3, 9, 25, 0.72);
    backdrop-filter: blur(10px);
}
.safe-nav-modal.active { display: flex; }
.safe-nav-card {
    width: min(520px, 100%);
    border: 1px solid var(--border);
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(13, 29, 75, 0.98), rgba(8, 20, 53, 0.98));
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
    padding: 22px;
    color: var(--text);
}
.safe-nav-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(241, 196, 75, 0.14);
    color: var(--accent);
    font-size: 1.35rem;
    margin-bottom: 12px;
}
.safe-nav-copy h2 {
    margin: 0 0 8px;
    font-size: 1.25rem;
}
.safe-nav-copy p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}
.safe-nav-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 18px;
}
body.safe-nav-open { overflow: hidden; }
@media (max-width: 560px) {
    .safe-nav-card { border-radius: 20px; padding: 18px; }
    .safe-nav-actions { justify-content: stretch; }
    .safe-nav-actions .btn { flex: 1 1 100%; justify-content: center; }
}
