html.jlo-active,
body.jlo-active {
    overflow: hidden !important;
}

.jlo-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 1;
    visibility: visible;
    transition: opacity .28s ease, visibility .28s ease;
}

.jlo-overlay.jlo-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.jlo-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 10, 14, .56);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.jlo-card {
    position: relative;
    width: min(620px, 100%);
    max-height: calc(100vh - 48px);
    overflow: auto;
    padding: clamp(28px, 5vw, 52px);
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 24px;
    background: rgba(18, 21, 28, .90);
    box-shadow: 0 30px 80px rgba(0,0,0,.40);
    color: #fff;
    text-align: center;
}

.jlo-mark {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 16px;
    background: rgba(255,255,255,.08);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: .08em;
}

.jlo-title {
    margin: 0;
    color: #fff;
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -.035em;
}

.jlo-subtitle {
    margin: 14px 0 30px;
    color: rgba(255,255,255,.72);
    font-size: clamp(16px, 2.4vw, 20px);
    line-height: 1.5;
}

.jlo-links {
    display: grid;
    gap: 12px;
}

.jlo-link,
.jlo-link:visited {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    width: 100%;
    padding: 17px 18px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 15px;
    background: rgba(255,255,255,.07);
    color: #fff !important;
    text-decoration: none !important;
    font-size: 17px;
    font-weight: 650;
    text-align: left;
    transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.jlo-link:hover,
.jlo-link:focus-visible {
    transform: translateY(-1px);
    background: rgba(255,255,255,.13);
    border-color: rgba(255,255,255,.28);
    color: #fff !important;
    outline: none;
}

.jlo-arrow {
    flex: 0 0 auto;
    font-size: 22px;
    opacity: .78;
}

@media (max-width: 560px) {
    .jlo-overlay { padding: 14px; }
    .jlo-card {
        max-height: calc(100vh - 28px);
        padding: 28px 20px;
        border-radius: 20px;
    }
    .jlo-link { padding: 15px 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .jlo-overlay,
    .jlo-link { transition: none; }
}

/* Fast genåbningsknap */
.jlo-reopen {
    position: fixed;
    right: max(18px, env(safe-area-inset-right));
    bottom: max(18px, env(safe-area-inset-bottom));
    z-index: 2147482990;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 11px 17px;
    border: 1px solid rgba(255,255,255,.20);
    border-radius: 999px;
    background: rgba(18, 21, 28, .92);
    box-shadow: 0 10px 32px rgba(0,0,0,.28);
    color: #fff !important;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .01em;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform .18s ease, opacity .18s ease, background .18s ease, border-color .18s ease;
}

.jlo-reopen:hover,
.jlo-reopen:focus-visible {
    transform: translateY(-1px);
    background: rgba(30, 34, 44, .97);
    border-color: rgba(255,255,255,.36);
    outline: none;
}

.jlo-reopen.jlo-reopen-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Undgå et kort blink af overlayet, før JS har læst sessionsvalget. */
.jlo-overlay.jlo-pending {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

@media (max-width: 560px) {
    .jlo-reopen {
        right: 14px;
        bottom: 14px;
        min-height: 44px;
        padding: 10px 15px;
    }
}
