:root {
	--blue-dark: #C5D2DA;
	--blue-light: #EEF3F6;
	--yellow-dark: #f3e256;
	--yellow-light: #fef4ac;
    --white:        #fff;
    --black:        #000;
    --surface-dark: #14171a;
    --surface-mid:  #3a4046;
    --gray-soft:    #eeeeee;
    --gray-line-soft: #ccc;
    --steel:        #979da9;
    --steel-dark:   #737983;
    --gray-text:    #666;
    --accent-blue:   #4a6b8a;
    --accent-orange: #ff6a3d;
    --brand-pink:    #a51243;
    --red:          #f44336;
    --orange:       #f5b301;
    --pink-soft:    #ffb7b2;
    --name-pink:        pink;
    --name-blue:        blue;
    --name-lavender:    lavender;
    --trans-a00: transparent;
    --c-0099ff                      : #0099ff;
    --c-129094                      : #129094;
    --c-2c46c8                      : #2c46c8;
    --c-5a7b9a                      : #5a7b9a;
    --c-6666ff                      : #6666ff;
    --c-b5ead7                      : #b5ead7;
    --c-c7ceea                      : #c7ceea;
    --c-e0bbff                      : #e0bbff;
    --c-ff3399                      : #ff3399;
    --c-ffe7ee                      : #ffe7ee;
    --rgb-14-41-84                  : rgb(14,41,84);
    --rgb-15-112-168                : rgb(15,112,168);
    --rgb-43-10-38                  : rgb(43,10,38);
    --trans-a10: rgba(255, 255, 255, 0.14);
    --trans-a25: rgba(255, 255, 255, 0.28);
    --trans-a20:    rgba(0, 0, 0, 0.25);
    --trans-a30                : rgba(0,0,0,0.35);
    --trans-a40: rgba(0, 0, 0, 0.45);
    --trans-a50                : rgba(0,0,0,0.55);
    --trans-a60                : rgba(0,0,0,0.6);
    --trans-a70                : rgba(0,0,0,0.7);
    --trans-a90          : rgba(255,255,255,0.92);

    --icon-online: #49e85f;

    /* Shell-bredder — fluid med klassiske desktop caps */
    --content:        clamp(20rem, 92vw, 58.125rem);
    --content-inner:  clamp(18rem, 84vw, 48.125rem);

    /* Spacing-skala (rem) */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-7: 3rem;

    /* Border-radii */
    --radius-sm: 0.25rem;
    --radius:    0.5rem;
    --radius-lg: 1.5em;          /* matcher det runde toprow-look */

    /* Fluid type-skala — clamp(min, preferred, max).
       Justeret 2026-06-04 til at matche det oprindelige design's
       CSS-keyword-sizes (xx-small ≈ 9px, x-small ≈ 10-11px, small ≈ 13px). */
    --fs-xxs:  clamp(0.50rem, 0.50rem + 0.05vw, 0.5625rem); /*  8-9px */
    --fs-xs:   clamp(0.625rem, 0.60rem + 0.08vw, 0.6875rem); /* 10-11px */
    --fs-sm:   clamp(0.75rem, 0.72rem + 0.06vw, 0.8125rem);  /* 12-13px */

    --fs-body: 0.6875rem; /* 11px - default body, matcher OG x-small/11px */
    --fs-lead: clamp(1.10rem, 1.02rem + 0.40vw, 1.30rem);

    --fs-h1:   clamp(1.00rem, 0.95rem + 0.20vw, 1.15rem);
    --fs-h2:   clamp(0.94rem, 0.90rem + 0.16vw, 1.06rem);
    --fs-h3:   clamp(0.86rem, 0.84rem + 0.10vw, 0.95rem);
    --fs-h7:   clamp(1.25rem, 1.08rem + 0.85vw, 1.625rem);

    /* Semantic design tokens — shared by the base layer and then
       overridden by page-specific sections. */
    --surface-page: var(--white);
    --surface-panel: var(--blue-light);
    --surface-panel-strong: var(--blue-dark);
    --surface-header: var(--blue-dark);
    --surface-header-text: var(--gray-text);
    --surface-card: var(--white);
    --surface-border: var(--blue-dark);
    --surface-border-strong: var(--black);
    --surface-shadow: var(--trans-a20);
    --radius-panel: 0.19rem;
    --radius-card: 0.5rem;
    --radius-popover: 0.75rem;
    --space-section-mobile: var(--space-4);
    --space-section-desktop: 3em;

}


/* Global box-sizing reset — alle ~52 individuelle box-sizing: border-box
   declarationer er fjernet til fordel for denne ene. Specifikke rules der
   bevidst skal være content-box (typisk gamle 'height + padding-top som
   vertikalcentrerings-trick') overrider eksplicit med box-sizing: content-box. */
*, *::before, *::after {
    box-sizing: border-box;
}

html ,body {
    height: 100dvh;
    overflow: hidden;
}

body {
	margin: 0;
    background: linear-gradient(168deg,var(--rgb-43-10-38) 0%, var(--rgb-14-41-84) 50%, var(--rgb-43-10-38) 100%);
    background-attachment: fixed;
    overflow-y: scroll;
}

/* Typografi */
html {
    font-size: 100%;
}

body, button {
    font-size: var(--fs-body);
    font-family: Verdana, sans-serif;
}

html:has(body.is-mobile-layout) {
    overflow: hidden;
    overscroll-behavior-y: none;
}

button {
    font-size: inherit;
}

h1 {
    font-size: var(--fs-h1);
    line-height: 1.15;
}

h2 {
    font-size: var(--fs-h2);
    line-height: 1.2;
}

h3 {
    font-size: var(--fs-h3);
    line-height: 1.25;
}

h7 {
    font-size: var(--fs-h7);
    font-weight: bold;
    color: var(--white);
}

a {
	color: var(--black);

    &:not([href]) {
        cursor: pointer;
    }
}

img, video {
    max-width: 100%;
    height: auto;
}

ol li {
	margin: 0.31rem;
}

.grid-c2 {
    grid-column: span 2;
}

.grid-c3 {
    grid-column: span 3;
}

.right {
	text-align: right;
}

[onclick] {
    cursor: pointer;
}

.no-deco {
    text-decoration: none;
}

.p2 {
    padding: 2em;
}

.p3 {
    padding: 3em;
}

.pr2 {
    padding-right: 2em;
}

.ptb1 {
    padding-top: 1em;
    padding-bottom: 1em;
}

.ptb3 {
    padding-top: 3em;
    padding-bottom: 3em;
}

.red {
    color: var(--red);
}

.bold {
    font-weight: bold;
}

.pointer {
    cursor: pointer;
}










/*
    Generelt design og layout
*/
body > div {
    display: flex;
    justify-content: center;

    & #boyfriend {
        width: 100%;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        flex: 1;
        min-height: 0;

        body.is-browser:not(.is-mobile-layout) & {
            width: var(--content);
            display: block;
            flex: initial;
            min-height: initial;
        }

    }

    & #team_container {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-top: 1.5em;

        /* TODO: skjult midlertidigt på mobil — "tager over" content-pane'en
           ved refresh på en profil. Skal integreres ordentligt i
           three-pane layout senere.
           Se /memories/repo/mobile-team-sidepanel-todo.md. */
        display: none;

        & #team_menu,
        & #team {
            width: 100%;
            max-width: 100%;
        }

        body.is-browser:not(.is-mobile-layout) & {
            display: block;
            width: var(--content-inner);
            margin-left: 1.5em;

            & #team_menu,
            & #team {
                width: var(--content-inner);
            }
        }

        /* Team-sidepanel må aldrig vises i mobile shell-layout. */
        body.is-mobile-layout & {
            display: none !important;
        }
    }

    & #toprowcontainer {
        width: 100%;
        position: relative;
        flex-shrink: 0;

        & .toprow {
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: var(--space-2);
            padding: 0 1em 0.4em;
            position: relative;

            body.is-browser & {
                padding: 1.5em 1em 0.4em;
            }

            & #logo {
                cursor: pointer;
                position: static;
                width: 50vw;
            }

            & #newsticker, & #menu, & #topmenu_right, & .status_online {
                display: none;
            }

            /* Desktop-only install-pille — på mobil overtager .bf-menu-install-box. */
            & #bf-install-desktop {
                display: none;
            }

            & #bf-dev-reload {
                display: block;
                width: 2.25rem;
                height: 2.25rem;
                border: 0;
                background: var(--trans-a00);
                color: var(--white);
                font-size: 1.375rem;
                line-height: 1;
                cursor: pointer;
                z-index: 10;
            }

            & #bf-topbar-counters {
                display: flex;
                gap: var(--space-2);
                margin-left: auto;

                & a {
                    display: inline-flex;
                    align-items: center;
                    gap: var(--space-1);
                    padding: 0.19rem 0.44rem;
                    color: var(--white);
                    text-decoration: none;
                    background: var(--trans-a10);
                    border-radius: 999px;
                }

                & .bf-tc-pill {
                    display: inline-block;
                    min-width: 1.2em;
                    padding: 0 0.45em;
                    background: var(--accent-orange);
                    color: var(--white);
                    border-radius: 999px;
                    font-size: var(--fs-sm);
                    font-weight: bold;
                    text-align: center;
                    line-height: 1.5;
                }

                & a.bf-tc-iconly {
                    position: relative;
                    padding: 0.25rem 0.38rem;
                    gap: 0;

                    & .bf-tc-icon {
                        display: inline-flex;
                        align-items: center;
                        justify-content: center;
                        line-height: 0;

                        & svg {
                            width: 1.38rem;
                            height: 1.38rem;
                            display: block;
                        }
                    }

                    & .bf-tc-pill {
                        position: absolute;
                        top: -0.25rem;
                        right: -0.5rem;
                        min-width: 1.2em;
                        padding: 0.05em 0.35em;
                        font-size: var(--fs-xs);
                        line-height: 1.3;
                        box-shadow: 0 0 0 1px var(--white);
                    }
                }
            }
        }

        @media (min-width: 64em) {
            width: var(--content);

            & .toprow {
                display: block;
                height: 5.56rem;
                width: var(--content);
                padding: 0 ! important;
                background-image: linear-gradient(to bottom, var(--steel), var(--steel-dark) 62%, var(--gray-text) 62% 66%, var(--blue-dark) 66%, var(--blue-dark));
                border-bottom-left-radius: var(--radius-lg);
                border-bottom-right-radius: var(--radius-lg);

                & #logo {
                    position: relative;
                    top: 0.94rem;
                    left: 1.75rem;
                    width: auto;
                }

                & #newsticker {
                    display: block;
                    position: absolute;
                    top: 0.31rem;
                    left: 43.75rem;
                    width: 10.06rem;
                    height: 2.94rem;
                    /* Samme tekst-skygge som status-tællerne (arves til
                       #ticker + #link). */
                    text-shadow: 0 1px 1px var(--trans-a30);
                    border-left: 1px solid var(--trans-a10);
                    border-right: 1px solid var(--trans-a10);
                    background:
                        radial-gradient(ellipse at left center, var(--trans-a10) 0%, var(--trans-a00) 50%),
                        radial-gradient(ellipse at right center, var(--trans-a10) 0%, var(--trans-a00) 50%);

                    & #ticker {
                        font-size: var(--fs-xxs);
                        color: var(--white);
                        padding: 0.12rem;
                        z-index: 2;
                        position: absolute;
                        top: 0;
                        left: 0.19rem;
                        width: 9.38rem;
                        height: 2.56rem;
                        overflow: hidden;

                        & .date,
                        & .title {
                            text-decoration: none;
                            color: var(--white);
                        }

                        & .title {
                            font-weight: bold;
                        }
                    }

                    & #link {
                        position: absolute;
                        right: 0.31rem;
                        top: 2.19rem;
                        z-index: 10;

                        & a {
                            font-size: var(--fs-xxs);
                            color: var(--white);
                            text-decoration: none;
                        }
                    }
                }

                /* Status-tællere flyttet ind i top-baren, højre-forankret lige
                   til venstre for #newsticker (som ligger på left: 43.75rem).
                   Samme tekststørrelser som i status-panelet — kun container-
                   layoutet skifter fra boks til vandret række. */
                & .status_online {
                    display: flex;
                    gap: 1.5rem;
                    align-items: flex-end;
                    position: absolute;
                    /* Bund-forankret til TEASER-tekstens bund (#ticker), ikke
                       hele nyhedsboksen — så tællerne flugter med selve teksten
                       og ikke den fritstående "nyheder"-link nederst. #ticker:
                       #newsticker top 0.31 + #ticker height 2.56 = 2.87rem fra
                       top → 5.56 - 2.87 = 2.69rem fra toprow-bund.
                       align-items: flex-end bund-justerer de to tællere ift.
                       hinanden — bevidst IKKE flex på selve containerne, da
                       profile.js sætter inline display:block på visits/profiles
                       (inline vinder over en CSS display:flex). */
                    bottom: 2.69rem;
                    right: calc(100% - 42.75rem);
                    width: auto;
                    padding: 0;
                    background: none;
                    text-shadow: 0 1px 1px var(--trans-a30);

                    & .visits_container,
                    & .online_container,
                    & .profiles_container {
                        margin: 0;
                        padding: 0;

                        & > div {
                            height: 1.5em;
                        }
                    }

                    /* Labels i samme størrelse som nyhedstickeren, på én linje
                       (skjul markup-<br>'et "besøg de seneste<br>7 dage"). */
                    & span {
                        font-size: var(--fs-xxs);
                        white-space: nowrap;

                        & br {
                            display: none;
                        }
                    }

                    & .disclaimer {
                        display: none;
                    }
                }

                /* Mobil-only widgets skjules på desktop. */
                & #bf-topbar-counters,
                & #bf-dev-reload {
                    display: none;
                }

                /* Install-pille øverst til højre i toprow. Skjult som default
                   (hidden attribut); pwa() viser den når beforeinstallprompt fyrer. */
                & #bf-install-desktop {
                    position: absolute;
                    top: 1rem;
                    right: 1.5rem;
                    z-index: 5;
                    padding: 0.4rem 0.85rem;
                    background: var(--accent-blue);
                    color: var(--white);
                    border: 0;
                    border-radius: 999px;
                    font-size: var(--fs-xs);
                    font-weight: bold;
                    cursor: pointer;
                    box-shadow: 0 1px 3px var(--trans-a30);

                    &:hover {
                        background: var(--c-5a7b9a);
                    }
                }
            }

            & #menu {
                display: block;

                & a { text-decoration: none; }

                & #menu_default   { display: block; }
                & #menu_logged_in { display: none; }

                & ul {
                    position: absolute;
                    z-index: 8000;
                    top: 3.44rem;
                    left: 0;
                    margin: 0;
                    padding: 0 0 0 0.62rem;
                    list-style: none;

                    & li {
                        list-style-type: none;
                        float: left;
                        position: relative;
                        text-decoration: none;
                        padding: 0.75rem 0 1.25rem 0;
                        height: 0.62rem;
                        box-sizing: content-box;

                        &:hover {
                            background-image: linear-gradient(to top, var(--trans-a00) 2.375rem, var(--white) 2.375rem);
                        }

                        &:hover ul {
                            display: block;
                        }

                        & a { padding: 0.62rem 1rem; }

                        & ul {
                            position: absolute;
                            display: none;
                            top: 1.38rem;
                            left: 0;

                            & li {
                                list-style-type: none;
                                float: none;
                                overflow: hidden;
                                width: 7.5rem;
                                height: 1.12rem;
                                padding: 0.5rem 0.19rem 0.19rem 0;
                                margin: 0;
                                border-width: 0 0.19rem 0.19rem 0.19rem;
                                border-style: solid;
                                border-color: var(--white);
                                background-color: var(--blue-light);
                                left: -0.62rem;
                                top: 0.75rem;
                                position: relative;
                                white-space: nowrap;
                                box-sizing: content-box;

                                & a { padding: 0.5rem 6.25rem 0.5rem 1.06rem; }

                                :hover:first-child {
                                    background-color: var(--blue-dark);
                                }

                                & input {
                                    background-color: var(--white) !important;
                                }
                            }
                        }

                        & .search {
                            height: 3.75rem;
                            border: 0.12rem solid var(--white);
                            width: 10.94rem;
                            padding: 0;
                            margin: 0;
                            overflow: visible;

                            & > div {
                                padding: 1em;

                                & .box {
                                    display: flex;

                                    & > div:nth-child(1) input {
                                        border: 1px solid var(--steel-dark);
                                        width: 7.19rem;
                                    }

                                    & > div:nth-child(2) {
                                        border: 1px solid var(--steel-dark);
                                        border-radius: var(--radius);
                                        height: 1.44rem;
                                        font-size: var(--fs-sm);
                                        font-weight: bold;
                                        margin-left: 0.3em;
                                        line-height: 1.25rem;
                                        aspect-ratio: 1;
                                        background-color: var(--blue-dark);
                                        text-align: center;
                                        cursor: pointer;
                                    }
                                }
                            }
                        }
                    }
                }

                & #logins_saved {
                    & li {
                        padding: 0.31rem 0.5rem 0.62rem 0;
                        text-align: left;
                    }

                    & div {
                        font-size: var(--fs-xs);
                        padding: 0 0 0 1.06rem;
                        font-weight: bold;
                    }
                }
            }

            & #topmenu_right {
                display: block;
                position: absolute;
                top: 3.62rem;
                left: 45.88rem;
                width: 10.94rem;
                color: var(--white);
                font-size: var(--fs-xxs);
                padding: 0.19rem 0 0 0;
                text-align: right;
                z-index: 8000;
                height: 1.88rem;

                & #abonnementsboks {
                    height: 2.5rem;
                    margin: 0.5em 0 0 2em;
                    border: 0.12rem solid var(--white);
                    display: none;
                    z-index: 9999;
                    text-align: left;
                    padding: 0.5em 1em 1.5em 1em;
                    width: 9.38rem;
                    color: var(--white);
                    background-color: var(--steel);
                }

                &:hover #abonnementsboks {
                    display: block;
                    z-index: 8000;
                }
            }

            & .expire,
            & .active {
                text-decoration: none;
                color: var(--white);
            }

            & .expire { font-weight: bold; }

            & .expired {
                text-decoration: none;
                color: var(--brand-pink);
                font-weight: bold;
            }
        }
    }

    #content_container {
        text-align: left;
        display: flex;
        flex-direction: column;
        flex: 1;
        min-height: 0;

        & > .content {
            width: 100%;

            & #if_content,
            & #if_menu,
            & #if_ad,
            & #if_profile_content,
            & #if_profile_menu {
                background-color: var(--white);
                overflow: hidden;
                width: 100%;
            }

            & #if_profile_content,
            & #if_profile_menu {
            }

            & #if_ad img {
                float: left;
            }
        }

        @media (min-width: 64em) {
            margin-top: 1.5em;
            width: var(--content);
            flex-direction: row;
            flex: initial;
            min-height: initial;

            & > .content {
                width: var(--content-inner);

                & #if_content,
                & #if_menu,
                & #if_ad,
                & #if_profile_content,
                & #if_profile_menu {
                    width: var(--content-inner);
                }
            }

            /* Logget UD (desktop): status-sidebjælken peger på login-krævende
               indhold — skjul den og lad hovedindholdet (login-siden) fylde
               hele bredden. */
            body.is-logged-out & {
                & > #status {
                    display: none;
                }

                & > .content {
                    width: var(--content);

                    /* Hele panelet skal være fuld bredde, ikke kun midten.
                       Panelet er tre lag: #if_menu (tab-strip + afrundet top),
                       #if_content (login-indhold), #if_bottom (afrundet bund).
                       Tidligere udvidede vi kun #if_content, så top/bund-capsene
                       blev hængende på --content-inner og panelet så ujævnt ud.
                       Udvid alle tre — så bevares afrundede hjørner naturligt. */
                    & #if_menu,
                    & #if_content,
                    & #if_bottom {
                        width: var(--content);
                    }

                    /* Tab-strip'ens ul (display:table) er kun så bred som de fire
                       faste tabs (770px); resten af den nu-930px strip viste
                       #menu_sub's mørke bg. Lad ul'en fylde hele bredden, så
                       table-cellerne (tabs) strækkes ud til kanten. */
                    & #if_menu #menu_sub ul {
                        width: 100%;
                    }
                }
            }
        }

        /* ====================================================================
        Status sidebar — højre kolonne på desktop, fuld bredde over indhold
        på mobil-stak.

        Sektioner:
            .top / .header   — gradient-overskrift
            .heading         — overskriftstekst
            .status_main     — hovedindhold (skjult by default, toggles via JS)
            #item_chat       — chat-modul (skjult by default, toggles via JS)
            .bottom          — afrundet footer
        Mobil: fuld bredde, ingen afrunding. Desktop (>= 64em): 160px fast
        bredde med afrundede hjørner.
        ==================================================================== */

        #status {
            & .top,
            & .header {
                background-image: linear-gradient(to bottom, var(--steel), var(--steel-dark));
                font-weight: bold;
                color: var(--white);
                text-align: center;
                height: 2em;
                padding: 1em 0 0 0;
                /* Skal være content-box (overrider den globale border-box reset)
                så padding ikke spises ind i height: 2em — ellers kollapser
                headeren til kun selve tekstens højde. */
                box-sizing: content-box;
            }

            & .header { margin: 0; }

            & .heading {
                padding: 0 0 0 1.88rem;
                font-weight: bold;
                color: var(--white);
                text-decoration: none;
            }

            & .status_main {
                /* JS toggler display via hover/klik — startes skjult. */
                display: none;
                padding: 0 1em 1em 1em;
                color: var(--white);
                width: 100%;
                background-color: var(--steel);

                & #postikon {
                    display: none;
                    padding: 1em 0 0 0;

                    & a {
                        color: var(--white);
                        text-decoration: none;
                        font-weight: bold;
                        line-height: 1.8em;

                        & img { margin: 0 0.25rem 0.19rem 0.38rem; }
                    }
                }

                & .link,
                & .link a {
                    width: auto;
                    overflow: hidden;
                    height: 1.25rem;
                    white-space: nowrap;
                    color: var(--white);
                }

                & .link a { text-decoration: underline; }
            }

            & #item_chat {
                /* Som .status_main: JS-toggled. */
                display: none;

                & .chat {
                    padding: 0 1em 1em 1em;
                    color: var(--white);
                    width: 100%;
                    height: 2em;
                    position: relative;
                    background-color: var(--steel);
                    border-bottom: 1px solid var(--steel-dark);
                }

                & #status_chat_header {
                    display: flex;
                    justify-content: space-between;

                    & > div {
                        padding: 0.4em 0 0.2em 0;

                        & > a {
                            text-decoration: none;
                            color: var(--white);
                        }
                    }
                }

                & #status_chat_content {
                    height: 7.81rem;
                    overflow: hidden;
                    padding: 0.5em 1em 1em 1em;
                    color: var(--white);
                    width: 100%;
                    background-color: var(--steel);
                    /* OG brugte 9px her; --fs-xxs ≈ 8-9px. */
                    font-size: var(--fs-xxs);
                    text-decoration: none !important;

                    & div {
                        margin: 0 0 0.3em 0;

                        & a {
                            color: var(--white);
                            font-weight: bold;
                        }
                    }

                    & .red { color: var(--red); }
                }
            }

            & .bottom {
                background-color: var(--steel);
                width: 100%;
                height: 1.5em;
            }

            /* === Desktop layout (>= 64em) === */
            @media (min-width: 64em) {
                & .top,
                & .header,
                & .status_main,
                & #item_chat .chat,
                & #item_chat #status_chat_content,
                & .bottom {
                    width: 10rem;
                }

                & .top {
                    border-top-right-radius: var(--radius-lg);
                }

                & .bottom {
                    border-bottom-right-radius: var(--radius-lg);
                }
            }
        }

    }

    #if_bottom {
        display: none;

        @media (min-width: 64em) {
            display: block;
            height: 1.62rem;
            width: var(--content-inner);
            line-height: 1.62rem;
            text-align: center;
            background-image: linear-gradient(to bottom, var(--blue-dark), var(--blue-light));
            border-bottom-left-radius: var(--radius-lg);
            border-bottom-right-radius: var(--radius-lg);
        }
    }
}

/* Drawer på mobile */
body.is-mobile-layout {
    /* Mobile shell: page itself must never scroll.
       Only pane scrollers (.bf-content-scroll / #bf_status_tab_body) may scroll. */
    overflow-y: hidden;
    overscroll-behavior-y: none;

    & #bf_menu_backdrop {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 3.5rem;
        background: var(--trans-a50);
        z-index: 9998;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
    }

    &.is-pwa #bf_menu_backdrop {
        bottom: 4.5rem;
    }

    &.bf-menu-open {
        overflow: hidden;

        & #bf_menu_backdrop {
            opacity: 1;
            pointer-events: auto;
        }
    }

    /* Mobile content bottom-bar stack inside swiper content pane. */
    & #bf_mobile_swiper > .bf-pane--content > #bf_content_bottombar {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        display: flex;
        flex-direction: column;
        z-index: 6;
    }

    /* Bottom nav is stacked naturally as a flex item inside bottombar. */
    & #bf_mobile_swiper > .bf-pane--content > #bf_content_bottombar > #bf_content_bottomnav {
        position: static;
    }

    /* Suppress iOS/Android native text-selection/callout on long-press nav actions. */
    & #bf_mobile_swiper > .bf-pane--content #bf_content_bottomnav a[data-bn-area] {
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
        touch-action: manipulation;
    }

    /* Long-press panel dock shell in content bottombar. */
    & #bf_mobile_swiper > .bf-pane--content > #bf_content_bottombar > #bf_lp_panel {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 0.25rem;
        padding: 0.75rem 0.5rem 0.75rem;
        background: var(--trans-a00);
        border-bottom: 1px solid var(--trans-a25);
        border-radius: 0;
        opacity: 0;
        transform: translateY(8px);
        transition: opacity 0.18s ease, transform 0.18s ease;
        pointer-events: none;

        &[hidden] {
            display: none;
        }

        &.is-open {
            opacity: 1;
            transform: translateY(0);
            pointer-events: auto;
        }
        & a {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 0.25rem;
            padding: 0.5rem 0.25rem;
            color: var(--gray-soft);
            text-decoration: none;
            line-height: 1.1;
            text-align: center;
            border-radius: 0.5rem;
            transition: background 0.12s, color 0.12s;

            &:active {
                background: var(--trans-a10);
                color: var(--white);
            }
            & svg {
                width: 1.5rem;
                height: 1.5rem;
                fill: none;
                stroke: currentColor;
                stroke-width: 1.7;
                stroke-linecap: round;
                stroke-linejoin: round;
                display: block;
            }
        }
    }

    /* Mail action sheet dock in status bottombar (mobile messenger/post pane). */
    & #bf_mobile_swiper > .bf-pane--status > #bf_status_bottombar > #bf_mail_actions {
        display: flex;
        flex-direction: column;
        padding: 0.62rem 0.5rem 0.75rem;
        background: var(--trans-a00);
        border-bottom: 1px solid var(--trans-a10);
        opacity: 0;
        transform: translateY(8px);
        transition: opacity 0.18s ease, transform 0.18s ease;
        pointer-events: none;

        &[hidden] {
            display: none;
        }
        &.is-open {
            opacity: 1;
            transform: translateY(0);
            pointer-events: auto;
        }

        & .bf-mail-actions-title {
            color: var(--white);
            font-size: var(--fs-sm);
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            opacity: 0.85;
            padding: 0 0.5rem;
            margin-bottom: 0.38rem;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        & .bf-mail-actions-list {
            display: flex;
            flex-direction: row;
            gap: 0.25rem;
            justify-content: space-around;
        }

        &.bf-mail-sheet--insert .bf-mail-actions-list {
            display: block;
        }

        & a {
            flex: 1 1 0;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 0.25rem;
            padding: 0.5rem 0.25rem;
            color: var(--gray-soft);
            text-decoration: none;
            font-size: var(--fs-sm);
            line-height: 1.1;
            text-align: center;
            border-radius: 0.5rem;
            transition: background 0.12s, color 0.12s;

            &:active {
                background: var(--trans-a10);
                color: var(--white);
            }
            & svg {
                width: 1.5rem;
                height: 1.5rem;
                fill: none;
                stroke: currentColor;
                stroke-width: 1.7;
                stroke-linecap: round;
                stroke-linejoin: round;
                display: block;
            }
        }

        & .bf-emote-grid {
            display: grid;
            grid-template-columns: repeat(10, minmax(0, 1fr));
            gap: 0.25rem;
            max-height: 14.5rem;
            overflow-y: auto;
            padding: 0 0.12rem;

            & a {
                flex: 0 0 auto;
                display: flex;
                align-items: center;
                justify-content: center;
                padding: 0.2rem;
                border-radius: 0.38rem;
                min-height: 1.9rem;
                background: var(--trans-a00);
            }

            & img {
                width: 1.25rem;
                height: 1.25rem;
                object-fit: contain;
                display: block;
            }
        }

        & .bf-reply-list {
            display: flex;
            flex-direction: column;
            gap: 0.25rem;
            max-height: 14rem;
            overflow-y: auto;
            padding: 0 0.12rem;

            & a {
                flex: 0 0 auto;
                display: flex;
                align-items: center;
                justify-content: flex-start;
                text-align: left;
                gap: 0;
                padding: 0.56rem 0.62rem;
                border-radius: 0.5rem;
                font-size: var(--fs-sm);
                line-height: 1.25;
            }
        }

        & .bf-reply-empty {
            color: var(--gray-line-soft);
            font-size: var(--fs-sm);
            text-align: center;
            padding: 0.62rem;
        }
    }

    /* Status bottombar stack and tab-body offset in mobile swiper status pane. */
    & #bf_mobile_swiper > .bf-pane--status > #bf_status_bottombar {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        display: flex;
        flex-direction: column;
        z-index: 6;
    }

    & #bf_mobile_swiper > .bf-pane--status > #bf_status_bottombar > * + * {
        border-top: 1px solid var(--trans-a25);
    }

    & #bf_mobile_swiper > .bf-pane--status > #bf_status_bottombar > #bf_status_bottomnav {
        position: static;
    }

    & #bf_mobile_swiper > .bf-pane--status:has(> #bf_status_bottombar) > #bf_status_tab_body {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: var(--bf-status-bottomnav-h, 3.5rem);
        background-color: var(--white);
    }

    & #bf_mobile_swiper > .bf-pane--status:has(.section_mail_messenger) > #bf_status_tab_body {
        background-color: var(--trans-a00) !important;
    }

    /* PWA standalone nav padding tweak in mobile shell. */
    &.is-pwa #bf_mobile_swiper > .bf-pane--content #bf_content_bottomnav,
    &.is-pwa #bf_mobile_swiper > .bf-pane--status #bf_status_bottomnav {
        padding-bottom: 1rem;
    }
}

/* ============================================================
   v3-demo: "Rapportér fejl"-knap + dialog.
   Injiceres kun af errorlog.js på v3.boyfriend.dk, så reglerne her
   rammer aldrig noget på prod/dev (elementerne findes simpelthen ikke).
   ============================================================ */
#bf-report-fab {
    position: fixed;
    right: var(--space-3);
    bottom: var(--space-3);
    z-index: 2147483000;
    padding: var(--space-2) var(--space-4);
    border: none;
    border-radius: var(--radius-lg);
    background: var(--brand-pink);
    color: var(--white);
    font-size: var(--fs-sm);
    font-weight: 700;
    box-shadow: 0 2px 10px var(--trans-a40);
    cursor: pointer;
}

#bf-report-fab:hover { background: var(--accent-orange); }

/* Mobil: knappen sidder i toprow'en mellem logo og reload (⟳) i stedet
   for at flyde. Kompakt pille der matcher topbar-counters-pillerne. */
#bf-report-fab.bf-report-fab--topbar {
    position: static;
    right: auto;
    bottom: auto;
    box-shadow: none;
    padding: 0.19rem 0.6rem;
    font-size: var(--fs-xs);
    line-height: 1.3;
    white-space: nowrap;
    align-self: center;
}

#bf-report-box {
    position: fixed;
    inset: 0;
    z-index: 2147483001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
    background: var(--trans-a50);
}

#bf-report-box[hidden] { display: none; }

#bf-report-card {
    width: 100%;
    max-width: 26rem;
    box-sizing: border-box;
    padding: var(--space-5);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--black);
    box-shadow: 0 8px 30px var(--trans-a50);
}

#bf-report-card h2 {
    margin: 0 0 var(--space-2);
    font-size: var(--fs-h2);
    color: var(--brand-pink);
}

#bf-report-card p { margin: 0 0 var(--space-3); font-size: var(--fs-sm); }

#bf-report-text {
    width: 100%;
    box-sizing: border-box;
    padding: var(--space-2);
    border: 1px solid var(--gray-line-soft);
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: var(--fs-sm);
    resize: vertical;
}

#bf-report-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-2);
    margin-top: var(--space-3);
}

#bf-report-actions button {
    padding: var(--space-2) var(--space-4);
    border: none;
    border-radius: var(--radius-sm);
    font-size: var(--fs-sm);
    font-weight: 700;
    cursor: pointer;
}

#bf-report-cancel { background: var(--gray-soft); color: var(--black); }
#bf-report-send   { background: var(--brand-pink); color: var(--white); }
#bf-report-send:hover { background: var(--accent-orange); }

#bf-report-thanks {
    margin: 0;
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--accent-blue);
}
