/* =========================================================
   HBS GARAGE 2026 · Hauptnavigation
   ========================================================= */


/* ---------------------------------------------------------
   Desktop Header
   --------------------------------------------------------- */

.site-header .header-inner {
    min-height: var(--header-height, 74px);
    flex-wrap: nowrap;
}

.desktop-main-navigation {
    display: flex;
    align-items: center;
    gap: .25rem;

    margin-left: auto;
}

.desktop-main-navigation > a,
.nav-dropdown-toggle {
    position: relative;

    min-height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;

    padding: .62rem .82rem;

    border: 0;
    border-radius: 999px;

    background: transparent;
    color: #27322b;

    font: inherit;
    font-size: .88rem;
    font-weight: 680;

    text-decoration: none;
    white-space: nowrap;

    cursor: pointer;

    transition:
        background-color 160ms ease,
        color 160ms ease;
}

.desktop-main-navigation > a:hover,
.nav-dropdown-toggle:hover,
.nav-dropdown-toggle.is-open {
    background: var(--hbs-green-050);
    color: var(--hbs-green-900);
}

.desktop-main-navigation > a.is-active,
.nav-dropdown-toggle.is-active {
    background: var(--hbs-green-050);
    color: var(--hbs-green-950);
}

.desktop-main-navigation > a.is-active::after,
.nav-dropdown-toggle.is-active::after {
    content: "";

    position: absolute;

    left: 50%;
    bottom: .18rem;

    width: 18px;
    height: 2px;

    border-radius: 999px;

    background: var(--hbs-green-700);

    transform: translateX(-50%);
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-chevron {
    display: inline-block;

    font-size: .72rem;

    transition: transform 160ms ease;
}

.nav-dropdown-toggle.is-open .nav-dropdown-chevron {
    transform: rotate(180deg);
}


/* ---------------------------------------------------------
   Dropdowns
   --------------------------------------------------------- */

.nav-dropdown-menu {
    position: absolute;

    top: calc(100% + .7rem);
    left: 0;

    z-index: 2200;

    width: 320px;

    display: none;
    gap: .4rem;

    padding: .65rem;

    border: 1px solid var(--color-border);
    border-radius: 18px;

    background: #fff;

    box-shadow: var(--shadow-medium);
}

.nav-dropdown-menu.is-open {
    display: grid;
}

.nav-dropdown-menu a {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: .75rem;
    align-items: center;

    padding: .8rem;

    border-radius: 13px;

    color: var(--color-text);
    text-decoration: none;
}

.nav-dropdown-menu a:hover {
    background: var(--hbs-green-050);
}

.nav-dropdown-icon {
    width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    border-radius: 12px;

    background: var(--hbs-green-100);

    font-size: 1.1rem;
}

.nav-dropdown-menu strong {
    display: block;

    font-size: .84rem;
    line-height: 1.25;
}

.nav-dropdown-menu small {
    display: block;

    margin-top: .15rem;

    color: var(--color-text-muted);

    font-size: .7rem;
    line-height: 1.35;
}


/* ---------------------------------------------------------
   Header Aktionen
   --------------------------------------------------------- */

.header-actions {
    flex: 0 0 auto;

    display: flex;
    align-items: center;
    gap: .45rem;

    margin-left: .4rem;
}

.header-notification {
    position: relative;

    width: 40px;
    height: 40px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    color: var(--color-text);

    text-decoration: none;

    transition:
        background-color 160ms ease,
        color 160ms ease;
}

.header-notification:hover,
.header-notification.is-active {
    background: var(--hbs-green-050);
    color: var(--hbs-green-900);
}

.header-notification-count {
    position: absolute;

    top: -1px;
    right: -2px;

    min-width: 18px;
    height: 18px;

    display: grid;
    place-items: center;

    padding: 0 .22rem;

    border: 2px solid #fff;
    border-radius: 999px;

    background: var(--hbs-green-700);
    color: #fff;

    font-size: .58rem;
    font-weight: 850;
}

.header-actions .nav-profile {
    width: 40px;
    height: 40px;

    overflow: hidden;

    border: 1px solid var(--color-border) !important;
    border-radius: 50% !important;

    background:
        linear-gradient(
            145deg,
            var(--hbs-green-100),
            #fff
        ) !important;
}


/* ---------------------------------------------------------
   Einstellen Button
   --------------------------------------------------------- */

.desktop-main-navigation .desktop-create-button {
    min-height: 42px;

    padding: .62rem .9rem;

    border-radius: 11px;

    background: var(--hbs-green-900);

    font-size: .86rem;
}

.desktop-main-navigation .desktop-create-button:hover,
.desktop-main-navigation .desktop-create-button.is-open {
    background: var(--hbs-green-950);
}


/* ---------------------------------------------------------
   Mobile Grundzustand
   --------------------------------------------------------- */

.mobile-neighborhood-backdrop,
.mobile-neighborhood-sheet {
    display: none;
}


/* ---------------------------------------------------------
   Tablet / Mobile
   --------------------------------------------------------- */

@media (max-width: 860px) {

    body {
        padding-bottom:
            calc(
                var(--mobile-nav-height, 78px)
                + env(safe-area-inset-bottom)
            );
    }

    body.has-mobile-overlay {
        overflow: hidden;
    }

    .site-header .header-inner {
        min-height: 64px;

        display: flex;
        justify-content: space-between;
        align-items: center;

        gap: .75rem;
    }

    .desktop-main-navigation {
        display: none !important;
    }

    .site-header .brand {
        margin-right: auto;
    }

    .header-actions {
        display: flex;

        margin-left: auto;
    }

    .header-actions .desktop-account-menu {
        display: none;
    }

    .header-notification {
        width: 42px;
        height: 42px;

        background: var(--color-surface);
        border: 1px solid var(--color-border);
    }

    .mobile-bottom-nav {
        position: fixed;

        left: 0;
        right: 0;
        bottom: 0;

        z-index: 2500;

        min-height: var(--mobile-nav-height, 78px);

        display: grid;

        grid-template-columns:
            repeat(2, minmax(0, 1fr))
            72px
            repeat(2, minmax(0, 1fr));

        align-items: end;

        padding:
            .4rem
            max(.45rem, env(safe-area-inset-right))
            max(.35rem, env(safe-area-inset-bottom))
            max(.45rem, env(safe-area-inset-left));

        background:
            linear-gradient(
                180deg,
                var(--hbs-green-900),
                var(--hbs-green-950)
            );

        box-shadow:
            0 -8px 28px rgba(5, 48, 27, .16);
    }

    .mobile-bottom-nav > a,
    .mobile-bottom-nav > button {
        min-width: 0;
        min-height: 58px;

        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: .18rem;

        padding: .25rem;

        border: 0;

        background: transparent;
        color: rgba(255, 255, 255, .78);

        text-decoration: none;

        font: inherit;
        font-size: .62rem;
        font-weight: 650;

        cursor: pointer;
    }

    .mobile-bottom-nav > a:hover,
    .mobile-bottom-nav > a.is-active,
    .mobile-bottom-nav > button:hover,
    .mobile-bottom-nav > button.is-active,
    .mobile-bottom-nav > button.is-open {
        color: #fff;
    }

    .mobile-nav-icon {
        min-height: 24px;

        display: grid;
        place-items: center;

        font-size: 1.18rem;
        line-height: 1;
    }

    .mobile-create-wrap {
        position: relative;

        align-self: center;

        display: grid;
        place-items: center;
    }

    .mobile-create-button {
        position: absolute;

        bottom: .1rem;

        width: 62px;
        height: 62px;
        min-height: 62px !important;

        display: grid !important;
        place-items: center !important;

        padding: 0 !important;

        border: 2px solid #fff !important;
        border-radius: 50% !important;

        background: var(--hbs-green-900) !important;
        color: #fff !important;

        box-shadow:
            0 8px 20px rgba(5, 48, 27, .25);

        font-size: 2rem !important;
        font-weight: 300 !important;
        line-height: 1 !important;

        transition: transform 180ms ease;
    }

    .mobile-create-button.is-open {
        transform: rotate(45deg);
    }


    /* Mobile Overlays */

    .mobile-create-backdrop,
    .mobile-neighborhood-backdrop {
        position: fixed;

        inset: 0;

        z-index: 3000;

        display: block;

        border: 0;

        background: rgba(20, 28, 22, .34);

        opacity: 0;
        pointer-events: none;

        transition: opacity 180ms ease;
    }

    .mobile-create-backdrop.is-open,
    .mobile-neighborhood-backdrop.is-open {
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-create-menu,
    .mobile-neighborhood-sheet {
        position: fixed;

        right: .75rem;
        bottom:
            calc(
                var(--mobile-nav-height, 78px)
                + env(safe-area-inset-bottom)
                + .7rem
            );
        left: .75rem;

        z-index: 3010;

        width: auto;

        display: grid;

        border: 1px solid var(--color-border);
        border-radius: 22px;

        background: #fff;

        box-shadow:
            0 24px 65px rgba(24, 48, 32, .22);

        transform: translateY(calc(100% + 2rem));
        opacity: 0;
        pointer-events: none;

        transition:
            transform 200ms ease,
            opacity 180ms ease;
    }

    .mobile-create-menu.is-open,
    .mobile-neighborhood-sheet.is-open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-create-menu {
        gap: .4rem;

        padding: .7rem;
    }

    .mobile-create-menu a {
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr);
        gap: .8rem;
        align-items: center;

        padding: .8rem;

        border-radius: 14px;

        color: var(--color-text);

        text-decoration: none;
    }

    .mobile-create-menu a:hover {
        background: var(--hbs-green-050);
    }

    .mobile-create-menu-icon {
        width: 44px;
        height: 44px;

        display: grid;
        place-items: center;

        border-radius: 13px;

        background: var(--hbs-green-100);
    }


    /* Nachbarschaft Sheet */

    .mobile-neighborhood-sheet {
        overflow: hidden;
    }

    .mobile-sheet-handle {
        width: 42px;
        height: 4px;

        margin: .55rem auto .1rem;

        border-radius: 999px;

        background: var(--color-border-strong);
    }

    .mobile-sheet-heading {
        display: grid;

        padding: .55rem 1rem .8rem;

        border-bottom: 1px solid var(--color-border);
    }

    .mobile-sheet-heading .eyebrow {
        margin-bottom: .2rem;

        font-size: .65rem;
    }

    .mobile-sheet-heading strong {
        font-size: 1.05rem;
    }

    .mobile-sheet-links {
        display: grid;

        gap: .4rem;

        padding: .7rem;
    }

    .mobile-sheet-links a {
        display: grid;
        grid-template-columns: 46px minmax(0, 1fr);
        gap: .8rem;
        align-items: center;

        padding: .85rem;

        border-radius: 14px;

        color: var(--color-text);
        text-decoration: none;
    }

    .mobile-sheet-links a:hover {
        background: var(--hbs-green-050);
    }

    .mobile-sheet-icon {
        width: 46px;
        height: 46px;

        display: grid;
        place-items: center;

        border-radius: 13px;

        background: var(--hbs-green-100);
    }

    .mobile-sheet-links strong,
    .mobile-create-menu strong {
        display: block;

        font-size: .85rem;
        line-height: 1.25;
    }

    .mobile-sheet-links small,
    .mobile-create-menu small {
        display: block;

        margin-top: .12rem;

        color: var(--color-text-muted);

        font-size: .7rem;
        line-height: 1.35;
    }
}


/* ---------------------------------------------------------
   Sehr kleine Smartphones
   --------------------------------------------------------- */

@media (max-width: 430px) {

    .mobile-bottom-nav {
        grid-template-columns:
            minmax(0, 1fr)
            minmax(0, 1.12fr)
            64px
            minmax(0, 1.2fr)
            minmax(0, 1.15fr);

        padding-inline: .2rem;
    }

    .mobile-bottom-nav > a,
    .mobile-bottom-nav > button {
        font-size: .57rem;
    }

    .mobile-nav-icon {
        font-size: 1.08rem;
    }

    .mobile-create-button {
        width: 58px;
        height: 58px;
        min-height: 58px !important;
    }
}


/* =========================================================
   HBS GARAGE · Neue Startseite
   ========================================================= */

.home-dashboard {
    display: grid;
    gap: 1.4rem;
}

.home-dashboard-hero {
    min-height: 270px;

    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 2rem;

    padding: clamp(1.7rem, 4vw, 3rem);

    border: 1px solid var(--color-border);
    border-radius: 24px;

    background:
        radial-gradient(
            circle at 90% 15%,
            rgba(119, 153, 116, .18),
            transparent 24rem
        ),
        linear-gradient(
            135deg,
            #f7f6ee,
            #edf4e9
        );
}

.home-dashboard-hero > div {
    max-width: 720px;
}

.home-dashboard-hero h1 {
    margin: .15rem 0 0;

    font-size: clamp(2.6rem, 6vw, 4.8rem);
    line-height: .98;
    letter-spacing: -.05em;
}

.home-dashboard-hero p {
    max-width: 620px;

    margin: 1rem 0 0;

    color: var(--color-text-muted);

    font-size: 1.05rem;
}

.home-dashboard-actions {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.home-action-card {
    min-height: 125px;

    display: grid;
    grid-template-columns:
        48px minmax(0, 1fr) auto;
    gap: .9rem;
    align-items: center;

    padding: 1.15rem;

    border: 1px solid var(--color-border);
    border-radius: 18px;

    background: var(--color-surface);

    color: var(--color-text);
    text-decoration: none;

    box-shadow: var(--shadow-small);

    transition:
        transform 160ms ease,
        border-color 160ms ease,
        box-shadow 160ms ease;
}

.home-action-card:hover {
    transform: translateY(-2px);

    border-color: rgba(48, 93, 61, .28);

    box-shadow: var(--shadow-medium);
}

.home-action-icon {
    width: 48px;
    height: 48px;

    display: grid;
    place-items: center;

    border-radius: 14px;

    background: var(--color-primary-light);

    font-size: 1.35rem;
}

.home-action-card strong,
.home-action-card small {
    display: block;
}

.home-action-card strong {
    font-size: 1rem;
}

.home-action-card small {
    margin-top: .2rem;

    color: var(--color-text-muted);

    font-size: .76rem;
}

.home-action-arrow {
    color: var(--color-primary);

    font-size: 1.25rem;
}

.home-dashboard-secondary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;

    padding: 1.5rem;

    border: 1px solid var(--color-border);
    border-radius: 18px;

    background: var(--color-surface);
}

.home-dashboard-secondary h2 {
    margin: .1rem 0 0;

    font-size: 1.5rem;
}

.home-dashboard-secondary p {
    max-width: 620px;

    margin: .45rem 0 0;

    color: var(--color-text-muted);
}


@media (max-width: 860px) {

    .home-dashboard-hero {
        min-height: auto;

        align-items: flex-start;
        flex-direction: column;
    }

    .home-dashboard-actions {
        grid-template-columns: 1fr;
    }

    .home-action-card {
        min-height: 92px;
    }

    .home-dashboard-secondary {
        align-items: stretch;
        flex-direction: column;
    }
}


@media (max-width: 600px) {

    .home-dashboard-hero {
        padding: 1.35rem;

        border-radius: 20px;
    }

    .home-dashboard-hero h1 {
        font-size: 2.55rem;
    }

    .home-dashboard-hero .btn {
        width: 100%;
    }

    .home-action-card {
        grid-template-columns:
            44px minmax(0, 1fr) auto;

        padding: .95rem;
    }

    .home-action-icon {
        width: 44px;
        height: 44px;
    }
}


/* =========================================================
   Gegenstände · Liste / Karte
   ========================================================= */

.items-view-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1.5rem;

    margin-bottom: 1.2rem;
}

.items-view-toolbar h2 {
    margin: .1rem 0 0;

    font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.items-view-toolbar p {
    margin: .4rem 0 0;

    color: var(--color-text-muted);

    font-size: .88rem;
}

.items-view-switch {
    flex: 0 0 auto;

    display: inline-grid;
    grid-template-columns: repeat(2, auto);
    gap: .25rem;

    padding: .25rem;

    border: 1px solid var(--color-border);
    border-radius: 12px;

    background: var(--color-surface-muted);
}

.items-view-button {
    min-height: 40px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;

    padding: .55rem .85rem;

    border: 0;
    border-radius: 9px;

    background: transparent;
    color: var(--color-text-muted);

    font: inherit;
    font-size: .8rem;
    font-weight: 750;

    cursor: pointer;

    transition:
        background-color 160ms ease,
        color 160ms ease,
        box-shadow 160ms ease;
}

.items-view-button:hover {
    color: var(--color-primary-dark);
}

.items-view-button.is-active {
    background: #fff;
    color: var(--color-primary-dark);

    box-shadow:
        0 2px 8px rgba(29, 49, 37, .08);
}

.items-view-panel[hidden] {
    display: none !important;
}


/* Karten-Platzhalter */

.items-map-placeholder {
    min-height: 430px;

    display: grid;
    grid-template-columns:
        auto minmax(0, 560px);
    justify-content: center;
    align-items: center;
    gap: 1.5rem;

    padding: clamp(1.5rem, 5vw, 4rem);

    border: 1px solid var(--color-border);
    border-radius: 22px;

    background:
        radial-gradient(
            circle at 70% 30%,
            rgba(119, 153, 116, .16),
            transparent 18rem
        ),
        linear-gradient(
            135deg,
            #f7f8f3,
            #eef4eb
        );
}

.items-map-placeholder-icon {
    width: 86px;
    height: 86px;

    display: grid;
    place-items: center;

    border: 1px solid rgba(49, 92, 59, .12);
    border-radius: 24px;

    background: rgba(255, 255, 255, .8);

    font-size: 2.6rem;

    box-shadow: var(--shadow-small);
}

.items-map-placeholder h3 {
    margin: .1rem 0 0;

    font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.items-map-placeholder p {
    max-width: 520px;

    margin: .65rem 0 0;

    color: var(--color-text-muted);

    line-height: 1.6;
}

.items-map-preview-row {
    max-width: 420px;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;

    margin-top: 1.2rem;
    padding: .85rem 1rem;

    border: 1px solid var(--color-border);
    border-radius: 14px;

    background: #fff;

    box-shadow: var(--shadow-small);
}

.items-map-preview-row > span:first-child {
    display: grid;
}

.items-map-preview-row small {
    margin-top: .15rem;

    color: var(--color-text-muted);

    font-size: .72rem;
}

.items-map-preview-count {
    min-width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    padding: 0 .65rem;

    border-radius: 999px;

    background: var(--hbs-green-900);
    color: #fff;

    font-size: .8rem;
    font-weight: 850;
}


@media (max-width: 700px) {

    .items-view-toolbar {
        align-items: stretch;
        flex-direction: column;

        gap: .9rem;
    }

    .items-view-switch {
        width: 100%;

        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .items-view-button {
        width: 100%;
    }

    .items-map-placeholder {
        min-height: 370px;

        grid-template-columns: 1fr;

        justify-items: start;

        padding: 1.25rem;
    }

    .items-map-placeholder-icon {
        width: 64px;
        height: 64px;

        border-radius: 18px;

        font-size: 2rem;
    }

    .items-map-preview-row {
        width: 100%;
    }
}


/* =========================================================
   Gegenstände · echte PLZ-Karte
   ========================================================= */

.items-map-layout {
    display: grid;
    grid-template-columns: minmax(230px, 300px) minmax(0, 1fr);

    min-height: 540px;

    overflow: hidden;

    border: 1px solid var(--color-border);
    border-radius: 22px;

    background: #fff;

    box-shadow: var(--shadow-small);
}

.items-map-places {
    position: relative;
    z-index: 2;

    display: flex;
    flex-direction: column;

    min-width: 0;

    border-right: 1px solid var(--color-border);

    background: #fff;
}

.items-map-places-header {
    display: grid;
    gap: .3rem;

    padding: 1.15rem;

    border-bottom: 1px solid var(--color-border);
}

.items-map-places-header strong {
    line-height: 1.35;
}

.items-map-places-header .text-link {
    width: fit-content;

    margin-top: .25rem;

    font-size: .72rem;
}

.items-map-place-list {
    display: grid;
    align-content: start;
    gap: .45rem;

    overflow-y: auto;

    padding: .65rem;
}

.items-map-place {
    width: 100%;

    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .75rem;
    align-items: center;

    padding: .8rem;

    border: 1px solid transparent;
    border-radius: 13px;

    background: transparent;
    color: var(--color-text);

    font: inherit;
    text-align: left;

    cursor: pointer;
}

.items-map-place:hover,
.items-map-place.is-active {
    border-color: var(--color-border);

    background: var(--color-primary-light);
}

.items-map-place-copy {
    min-width: 0;

    display: grid;
}

.items-map-place-copy strong {
    overflow: hidden;

    font-size: .82rem;

    white-space: nowrap;
    text-overflow: ellipsis;
}

.items-map-place-copy small {
    margin-top: .15rem;

    color: var(--color-text-muted);

    font-size: .67rem;
}

.items-map-place-count {
    min-width: 34px;
    height: 34px;

    display: grid;
    place-items: center;

    padding: 0 .5rem;

    border-radius: 999px;

    background: var(--hbs-green-900);
    color: #fff;

    font-size: .72rem;
    font-weight: 850;
}

.items-map-stage {
    position: relative;

    min-width: 0;
    min-height: 540px;

    background: var(--color-surface-muted);
}

.items-map {
    position: absolute;
    inset: 0;

    z-index: 1;
}

.items-map-privacy {
    position: absolute;
    right: .8rem;
    bottom: .8rem;
    z-index: 500;

    display: flex;
    align-items: center;
    gap: .35rem;

    max-width: calc(100% - 1.6rem);

    padding: .5rem .7rem;

    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: 999px;

    background: rgba(255, 255, 255, .92);
    color: var(--color-text-muted);

    font-size: .65rem;
    font-weight: 700;

    box-shadow: 0 4px 14px rgba(25, 45, 32, .12);

    backdrop-filter: blur(8px);
}

.hbs-map-marker-wrap {
    background: transparent !important;
    border: 0 !important;
}

.hbs-map-marker {
    width: 46px;
    height: 46px;

    display: grid;
    place-items: center;

    border: 4px solid #fff;
    border-radius: 50%;

    background: var(--hbs-green-900);
    color: #fff;

    box-shadow:
        0 5px 16px rgba(18, 56, 32, .25);

    font-size: .8rem;
    font-weight: 900;
}

.hbs-map-popup {
    min-width: 155px;

    display: grid;
    gap: .25rem;
}

.hbs-map-popup strong {
    color: var(--color-text);

    font-size: .82rem;
}

.hbs-map-popup span {
    color: var(--color-text-muted);

    font-size: .7rem;
}

.hbs-map-popup button {
    margin-top: .35rem;
    padding: .5rem .65rem;

    border: 0;
    border-radius: 8px;

    background: var(--hbs-green-900);
    color: #fff;

    font: inherit;
    font-size: .68rem;
    font-weight: 800;

    cursor: pointer;
}

.items-map-empty,
.items-map-unavailable {
    display: grid;
    gap: .4rem;

    padding: 1rem;

    color: var(--color-text-muted);
}

.items-map-empty strong,
.items-map-unavailable strong {
    color: var(--color-text);
}


@media (max-width: 760px) {

    .items-map-layout {
        position: relative;

        display: block;

        min-height: 590px;

        border-radius: 18px;
    }

    .items-map-stage {
        min-height: 590px;
    }

    .items-map-places {
        position: absolute;
        right: .65rem;
        bottom: .65rem;
        left: .65rem;
        z-index: 600;

        max-height: 190px;

        overflow: hidden;

        border: 1px solid var(--color-border);
        border-radius: 17px;

        background: rgba(255, 255, 255, .96);

        box-shadow:
            0 12px 34px rgba(25, 45, 32, .18);

        backdrop-filter: blur(10px);
    }

    .items-map-places-header {
        padding: .7rem .8rem;
    }

    .items-map-places-header .eyebrow,
    .items-map-places-header .text-link {
        display: none;
    }

    .items-map-places-header strong {
        font-size: .75rem;
    }

    .items-map-place-list {
        display: flex;

        overflow-x: auto;
        overflow-y: hidden;

        padding: .45rem;

        scrollbar-width: none;
    }

    .items-map-place-list::-webkit-scrollbar {
        display: none;
    }

    .items-map-place {
        flex: 0 0 auto;

        width: min(240px, 76vw);

        padding: .65rem .7rem;

        background: #fff;

        border-color: var(--color-border);
    }

    .items-map-privacy {
        top: .65rem;
        right: .65rem;
        bottom: auto;

        font-size: .6rem;
    }
}


/* =========================================================
   Gegenstände-Karte · Mobile Feinschliff
   ========================================================= */

.items-map-stage .leaflet-interactive {
    stroke: var(--hbs-green-900);
}

.items-map-stage .leaflet-control-attribution {
    margin: 0 4px 4px 0 !important;
    padding: 2px 5px !important;

    border-radius: 5px;

    background: rgba(255, 255, 255, .82) !important;

    font-size: 9px !important;
}

.items-map-place {
    transition:
        background .18s ease,
        border-color .18s ease,
        transform .18s ease,
        box-shadow .18s ease;
}

.items-map-place.is-active {
    border-color: rgba(5, 83, 49, .28);

    background: #f1f8f4;

    box-shadow:
        0 5px 14px rgba(18, 56, 32, .08);
}

.hbs-map-marker {
    transition:
        transform .18s ease,
        box-shadow .18s ease;
}

.hbs-map-marker-wrap.is-active .hbs-map-marker {
    transform: scale(1.12);

    box-shadow:
        0 7px 22px rgba(18, 56, 32, .32);
}


@media (max-width: 760px) {

    .items-map-layout {
        min-height: 500px;
    }

    .items-map-stage {
        min-height: 500px;
    }

    .items-map-places {
        right: .7rem;
        bottom: .7rem;
        left: .7rem;

        max-height: 150px;

        border-radius: 18px;
    }

    .items-map-places-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: .5rem;

        padding: .6rem .75rem;
    }

    .items-map-places-header strong {
        overflow: hidden;

        font-size: .7rem;
        line-height: 1.2;

        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .items-map-place-list {
        gap: .4rem;

        padding: .4rem;
        padding-top: 0;
    }

    .items-map-place {
        width: min(210px, 68vw);

        padding: .55rem .65rem;

        border-radius: 13px;
    }

    .items-map-place-copy strong {
        font-size: .72rem;
    }

    .items-map-place-copy small {
        font-size: .61rem;
    }

    .items-map-place-count {
        min-width: 30px;
        height: 30px;

        font-size: .67rem;
    }

    .items-map-privacy {
        top: .6rem;
        right: .6rem;

        max-width: 210px;

        padding: .4rem .55rem;

        font-size: .55rem;
    }

    .items-map-stage .leaflet-control-attribution {
        bottom: 150px;
    }

    .hbs-map-marker {
        width: 42px;
        height: 42px;

        border-width: 3px;

        font-size: .75rem;
    }
}


@media (max-width: 420px) {

    .items-map-layout,
    .items-map-stage {
        min-height: 470px;
    }

    .items-map-places {
        max-height: 145px;
    }

    .items-map-place {
        width: min(195px, 70vw);
    }
}


/* =========================================================
   Gegenstände · Suchradius
   ========================================================= */

.items-radius-control {
    display: grid;
    gap: .7rem;

    margin-bottom: .8rem;
    padding: .85rem 1rem;

    border: 1px solid var(--color-border);
    border-radius: 16px;

    background: #fff;

    box-shadow: var(--shadow-small);
}

.items-radius-heading {
    display: flex;
    align-items: center;
    gap: .4rem;

    color: var(--color-text);

    font-size: .78rem;
}

.items-radius-heading strong {
    color: var(--hbs-green-900);
}

.items-radius-slider-row {
    display: grid;
    grid-template-columns:
        auto minmax(0, 1fr) auto;
    gap: .7rem;
    align-items: center;

    color: var(--color-text-muted);

    font-size: .65rem;
    font-weight: 700;
}

.items-radius-slider-row input[type="range"] {
    width: 100%;

    accent-color: var(--hbs-green-900);

    cursor: pointer;
}

.items-radius-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
}

.items-radius-presets {
    display: flex;
    gap: .3rem;
}

.items-radius-preset {
    min-width: 34px;
    height: 32px;

    padding: 0 .45rem;

    border: 1px solid var(--color-border);
    border-radius: 9px;

    background: #fff;
    color: var(--color-text-muted);

    font: inherit;
    font-size: .67rem;
    font-weight: 750;

    cursor: pointer;
}

.items-radius-preset:hover,
.items-radius-preset.is-active {
    border-color: var(--hbs-green-900);

    background: var(--hbs-green-900);
    color: #fff;
}

.items-radius-apply {
    min-height: 34px;

    padding: .45rem .8rem;

    border: 0;
    border-radius: 9px;

    background: var(--hbs-green-900);
    color: #fff;

    font: inherit;
    font-size: .7rem;
    font-weight: 800;

    cursor: pointer;
}

.items-radius-note {
    margin: 0;

    color: var(--color-text-muted);

    font-size: .61rem;
}


@media (max-width: 600px) {

    .items-radius-control {
        gap: .6rem;

        padding: .75rem;

        border-radius: 14px;
    }

    .items-radius-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .items-radius-presets {
        display: grid;
        grid-template-columns:
            repeat(5, minmax(0, 1fr));
    }

    .items-radius-preset {
        width: 100%;
    }

    .items-radius-apply {
        width: 100%;
    }
}


/* =========================================================
   Navigation · Nachbarschaftszentrale
   ========================================================= */

.nav-neighborhood-control {
    display: flex;
    align-items: center;

    min-height: 42px;

    border-radius: 999px;

    transition:
        background-color 160ms ease,
        color 160ms ease;
}

.nav-neighborhood-control:hover,
.nav-neighborhood:has(
    .nav-neighborhood-toggle.is-open
) .nav-neighborhood-control {
    background: var(--hbs-green-050);
}

.nav-neighborhood-link {
    position: relative;

    min-height: 42px;

    display: inline-flex;
    align-items: center;

    padding:
        .62rem .35rem
        .62rem .82rem;

    border-radius:
        999px 0 0 999px;

    color: #27322b;

    font-size: .88rem;
    font-weight: 680;

    text-decoration: none;
    white-space: nowrap;
}

.nav-neighborhood-link:hover {
    color: var(--hbs-green-900);
}

.nav-neighborhood-link.is-active {
    color: var(--hbs-green-950);
}

.nav-neighborhood-link.is-active::after {
    content: "";

    position: absolute;

    left: calc(50% + .15rem);
    bottom: .18rem;

    width: 18px;
    height: 2px;

    border-radius: 999px;

    background: var(--hbs-green-700);

    transform: translateX(-50%);
}

.nav-neighborhood-toggle {
    width: 30px;
    min-height: 42px;

    display: grid;
    place-items: center;

    padding: 0 .55rem 0 .15rem;

    border: 0;
    border-radius:
        0 999px 999px 0;

    background: transparent;
    color: #27322b;

    font: inherit;

    cursor: pointer;
}

.nav-neighborhood-toggle:hover,
.nav-neighborhood-toggle.is-open {
    color: var(--hbs-green-900);
}

.nav-neighborhood-toggle.is-open
.nav-dropdown-chevron {
    transform: rotate(180deg);
}


/* =========================================================
   Gegenstände-Karte · feste Höhe
   ========================================================= */

.items-map-layout {
    height: clamp(520px, 68vh, 720px);
    min-height: 0;
}

.items-map-places {
    min-height: 0;
    overflow: hidden;
}

.items-map-place-list {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.items-map-stage {
    height: 100%;
    min-height: 0;
}

.items-map {
    height: 100%;
}


@media (max-width: 760px) {

    .items-map-layout {
        height: min(68vh, 560px);
        min-height: 470px;
    }

    .items-map-stage {
        height: 100%;
        min-height: 470px;
    }

    .items-map-place-list {
        overflow-x: auto;
        overflow-y: hidden;
    }
}


/* =========================================================
   Gegenstände-Karte · feste Höhe
   ========================================================= */

.items-map-layout {
    height: clamp(520px, 68vh, 720px);
    min-height: 0;
}

.items-map-places {
    min-height: 0;
    overflow: hidden;
}

.items-map-place-list {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.items-map-stage {
    height: 100%;
    min-height: 0;
}

.items-map {
    height: 100%;
}


@media (max-width: 760px) {

    .items-map-layout {
        height: min(68vh, 560px);
        min-height: 470px;
    }

    .items-map-stage {
        height: 100%;
        min-height: 470px;
    }

    .items-map-place-list {
        overflow-x: auto;
        overflow-y: hidden;
    }
}


/* =========================================================
   Nachbarschaftshilfe · Live-Filter
   ========================================================= */

[data-help-results-container] {
    transition: opacity 140ms ease;
}

[data-help-results-container].is-loading {
    opacity: .45;
    pointer-events: none;
}


/* =========================================================
   HBS Garage · Mobile Create Bottom Sheet
   ========================================================= */

@media (max-width: 860px) {

    /*
     * Das Aktionsmenü ist ein echtes Bottom Sheet.
     * Es liegt oberhalb der mobilen Hauptnavigation.
     */
    .mobile-create-menu {
        position: fixed;

        left: 12px;
        right: 12px;
        bottom: calc(
            var(--mobile-nav-height)
            + env(safe-area-inset-bottom)
            + 14px
        );

        z-index: 1450;

        width: auto;
        max-width: none;

        display: grid;
        gap: 6px;

        padding:
            10px
            10px
            12px;

        border: 1px solid
            rgba(31, 64, 43, .12);

        border-radius: 22px;

        background:
            rgba(255, 255, 255, .98);

        box-shadow:
            0 18px 55px
            rgba(13, 40, 23, .20);

        /*
         * Geschlossener Zustand.
         */
        visibility: hidden;
        opacity: 0;

        transform:
            translateY(24px)
            scale(.985);

        transform-origin:
            center bottom;

        pointer-events: none;

        transition:
            opacity 180ms ease,
            transform 220ms ease,
            visibility 0s linear 220ms;
    }


    .mobile-create-menu::before {
        content: "";

        width: 38px;
        height: 4px;

        justify-self: center;

        margin:
            1px
            0
            5px;

        border-radius: 999px;

        background:
            #d7ddd8;
    }


    .mobile-create-menu.is-open {
        /*
         * Alte Regeln aus style.css/navigation.css
         * vollständig überschreiben.
         */
        left: 12px;
        right: 12px;

        width: auto;
        max-width: none;

        display: grid;

        visibility: visible;
        opacity: 1;

        transform:
            translateY(0)
            scale(1);

        pointer-events: auto;

        transition:
            opacity 180ms ease,
            transform 220ms ease,
            visibility 0s;
    }


    /*
     * Aktionen
     */
    .mobile-create-menu > a {
        min-width: 0;
        min-height: 68px;

        display: grid;

        grid-template-columns:
            48px
            minmax(0, 1fr)
            24px;

        gap: 12px;

        align-items: center;

        padding:
            10px
            12px;

        border-radius: 15px;

        color:
            var(--color-text);

        text-decoration: none;

        -webkit-tap-highlight-color:
            transparent;
    }


    .mobile-create-menu > a::after {
        content: "›";

        justify-self: end;

        color:
            #87948b;

        font-size: 1.5rem;
        font-weight: 400;
        line-height: 1;
    }


    .mobile-create-menu > a:active {
        background:
            var(--hbs-green-050);

        transform:
            scale(.99);
    }


    .mobile-create-menu-icon {
        width: 48px;
        height: 48px;

        display: grid;
        place-items: center;

        border-radius: 14px;

        background:
            var(--hbs-green-100);

        font-size: 1.3rem;
    }


    .mobile-create-menu strong {
        display: block;

        overflow: hidden;

        color:
            var(--color-text);

        font-size: .94rem;
        font-weight: 800;
        line-height: 1.2;

        text-overflow: ellipsis;
    }


    .mobile-create-menu small {
        display: block;

        margin-top: 4px;

        overflow: hidden;

        color:
            var(--color-text-muted);

        font-size: .75rem;
        line-height: 1.25;

        text-overflow: ellipsis;
    }


    /*
     * Ruhigerer Hintergrund.
     */
    .mobile-create-backdrop.is-open {
        position: fixed;
        inset: 0;

        z-index: 1390;

        display: block;

        border: 0;

        background:
            rgba(12, 29, 18, .30);

        backdrop-filter:
            blur(3px);

        -webkit-backdrop-filter:
            blur(3px);
    }


    /*
     * Das zentrale + bleibt Teil der Navigation
     * und wird beim Öffnen zum ×.
     */
    .mobile-create-button {
        transition:
            transform 200ms ease,
            background-color 160ms ease,
            box-shadow 160ms ease !important;
    }


    .mobile-create-button.is-open {
        transform:
            rotate(45deg);

        background:
            var(--hbs-green-950) !important;

        box-shadow:
            0 8px 24px
            rgba(5, 48, 27, .34);
    }
}


/*
 * Sehr kleine Displays:
 * etwas weniger Außenabstand.
 */
@media (max-width: 380px) {

    .mobile-create-menu,
    .mobile-create-menu.is-open {
        left: 8px;
        right: 8px;
    }

    .mobile-create-menu > a {
        min-height: 64px;

        grid-template-columns:
            44px
            minmax(0, 1fr)
            20px;

        gap: 10px;

        padding:
            8px
            10px;
    }

    .mobile-create-menu-icon {
        width: 44px;
        height: 44px;
    }
}
