/* EchoSeiten – öffentliche UI: Variablen, Kreisbuttons, einheitliches Menü */


/* Layoutstabilität beim Öffnen/Schließen des Vollbildmenüs.
   Die echte Scrollbarbreite wird vom vorhandenen Header-JavaScript vor dem
   Scroll-Lock als --scrollbar-width gesetzt. Die Kompensation erfolgt unten
   am fixierten Body; dadurch bleibt die 500-px-Mittelachse exakt stehen. */

:root {
    --ui-text: #1d1d1f;
    --ui-text-muted: #6e6e6e;
    --ui-border: #dedede;
    --ui-border-light: #e8e8e8;
    --ui-surface: #fff;
    --ui-surface-hover: #f6f6f6;
    --ui-surface-selected: #f1f1f1;
    --ui-radius-small: 8px;
    --ui-radius-control: 999px;
    --ui-control-size: 48px;
    --ui-control-icon-size: 20px;
    --ui-control-stroke: 1.75px;
    --ui-control-border: #d8d8d8;
    --ui-control-color: #1f1f1f;
    --ui-control-hover: #f4f4f4;
    --ui-focus-ring: #333;
    --ui-arrow-color: #8c8174;
    --site-menu-title-size: calc(0.8rem - 1px);
    --site-menu-link-size: calc(1.1rem - 2px);
    --site-menu-link-size-tablet: clamp(calc(1rem - 2px), 1.25vw, calc(1.35rem - 2px));
    --site-public-header-height: 60px;
    --public-page-padding-inline: clamp(16px, 4vw, 48px);
}

/* Kreisbuttons */

.ui-circle-button {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--ui-control-size);
    height: var(--ui-control-size);
    padding: 0;
    border: var(--ui-control-stroke) solid var(--ui-control-border);
    border-radius: var(--ui-radius-control);
    background: var(--ui-surface);
    color: var(--ui-control-color);
    cursor: pointer;
    text-decoration: none;
    flex-shrink: 0;
    transition: background-color 180ms ease, border-color 180ms ease;
}

.ui-circle-button:hover {
    background: var(--ui-control-hover);
}

.ui-circle-button:focus-visible {
    outline: 2px solid var(--ui-focus-ring);
    outline-offset: 2px;
}

.ui-circle-button__svg {
    width: var(--ui-control-icon-size);
    height: var(--ui-control-icon-size);
    display: block;
}

.ui-circle-button__icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ui-circle-button__icon--menu {
    flex-direction: column;
    gap: 4px;
}

.ui-circle-button__icon--menu span {
    display: block;
    width: 16px;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
    transition: transform 180ms ease, opacity 180ms ease;
}

.ui-circle-button__icon--close {
    display: none;
}

.ui-circle-button[aria-expanded="true"] .ui-circle-button__icon--menu {
    display: none;
}

.ui-circle-button[aria-expanded="true"] .ui-circle-button__icon--close {
    display: flex;
}

.ui-circle-button--on-dark {
    background: transparent;
    border-color: #4a4a4a;
    color: #fff;
}

.ui-circle-button--on-dark:hover {
    background: #161616;
}

.ui-circle-button--on-dark:focus-visible {
    outline-color: #fff;
}

/* Header-Menübereich */

.site-header-menu-area,
#header-menu-area {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
    z-index: 2100;
}

.site-public-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    z-index: 2100;
    background: var(--ui-surface);
    border-bottom: 1px solid var(--ui-border-light);
}

.site-public-header--dark {
    background: #000;
    border-bottom-color: #5e5e5e;
}

.site-public-header--dark .site-header-place h1,
.site-public-header--dark #echoseite h1 {
    color: #6e6e6e;
}

.site-header-banner,
#banner.site-public-header__banner {
    height: var(--site-public-header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 auto;
    padding: 0 12px;
    position: relative;
}

.site-header-place,
#echoseite {
    flex: 1 1 0;
    min-width: 0;
}

.site-header-place h1,
#echoseite h1 {
    margin: 0;
    font-size: 16px;
    font-weight: 400;
    line-height: 1;
    color: var(--ui-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-header-logo,
#logo {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-header-logo img,
#logo img {
    display: block;
    height: 40px;
    width: auto;
    max-width: 120px;
}

.site-public-header--dark .site-header-logo,
.site-public-header--dark #logo {
    position: absolute;
    left: 50%;
    top: 8px;
    transform: translateX(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50px;
    background: #fff;
}

.site-public-header--dark .site-header-logo img,
.site-public-header--dark #logo img {
    height: 44px;
    width: 44px;
    max-width: none;
    border-radius: 50px;
}

/* Einheitliches Full-Screen-Menü */

.site-menu-overlay {
    position: fixed;
    top: var(--site-public-header-height);
    left: 0;
    width: 100%;
    box-sizing: border-box;
    bottom: 0;
    z-index: 2000;
    display: block;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--ui-surface);
    color: var(--ui-text);
    font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition:
        opacity 220ms ease,
        transform 260ms ease,
        visibility 220ms ease;
}

.site-menu-overlay[hidden] {
    display: block;
}

.site-menu-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

body.site-menu-open {
    overflow: hidden;
}

.site-menu-overlay__inner {
    box-sizing: border-box;
    width: min(1180px, calc(100% - var(--public-page-padding-inline) * 2));
    margin: 0 auto;
    padding: 24px 0 40px;
}

.site-menu-overlay__groups {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: start;
}

.site-menu-overlay__group--beitraege { grid-column: 1; }
.site-menu-overlay__group--profile { grid-column: 1; }
.site-menu-overlay__group--zugang { grid-column: 1; }
.site-menu-overlay__group--informationen { grid-column: 1; }

.site-menu-overlay__title {
    margin: 0 0 7px;
    font-size: var(--site-menu-title-size);
    font-weight: 600;
    letter-spacing: 0.055em;
    text-transform: uppercase;
    color: #444;
}

.site-menu-overlay__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-menu-overlay__list > li + li {
    margin-top: 2px;
}

.site-menu-overlay__link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 42px;
    padding: 9px 12px;
    border-radius: 10px;
    color: var(--ui-text);
    font-size: var(--site-menu-link-size);
    font-weight: 400;
    line-height: 1.28;
    text-decoration: none;
    transition:
        background-color 180ms ease,
        transform 180ms ease;
}

.site-menu-overlay__link:visited,
.site-menu-overlay__link:hover,
.site-menu-overlay__link:focus,
.site-menu-overlay__link:active {
    text-decoration: none;
    color: var(--ui-text);
}

.site-menu-overlay__link:hover,
.site-menu-overlay__link:focus-visible {
    background: var(--ui-surface-hover);
    transform: translateX(3px);
}

.site-menu-overlay__link:focus-visible {
    outline: 2px solid var(--ui-focus-ring);
    outline-offset: 2px;
}

.site-menu-overlay__link-text {
    min-width: 0;
}

.site-menu-overlay__arrow {
    flex-shrink: 0;
    color: var(--ui-arrow-color);
    font-size: 1.05em;
    line-height: 1;
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 180ms ease, transform 180ms ease;
}

.site-menu-overlay__link:hover .site-menu-overlay__arrow,
.site-menu-overlay__link:focus-visible .site-menu-overlay__arrow {
    opacity: 1;
    transform: translateX(0);
}

.site-menu-overlay__link[aria-current="page"] {
    font-weight: 600;
    background: var(--ui-surface-selected);
    color: #181818;
    padding-left: 18px;
}

.site-menu-overlay__link[aria-current="page"]::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 48%;
    border-radius: 2px;
    background: #333;
}

.site-menu-overlay__link[aria-current="page"]:hover,
.site-menu-overlay__link[aria-current="page"]:focus-visible {
    background: #ececec;
}

/* Tablet: zwei Spalten */

@media (min-width: 768px) {
    .site-menu-overlay__link {
        font-size: var(--site-menu-link-size-tablet);
    }

    .site-menu-overlay__groups {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.75rem 2.5rem;
    }

    .site-menu-overlay__group--beitraege {
        grid-column: 1;
        grid-row: 1;
    }

    .site-menu-overlay__group--profile {
        grid-column: 2;
        grid-row: 1;
    }

    .site-menu-overlay__group--zugang {
        grid-column: 2;
        grid-row: 2;
    }

    .site-menu-overlay__group--informationen {
        grid-column: 1;
        grid-row: 2;
    }
}

/* Desktop: drei Spalten */

@media (min-width: 1080px) {
    .site-menu-overlay__groups {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 2rem clamp(2rem, 3.5vw, 3.5rem);
    }

    .site-menu-overlay__group--beitraege {
        grid-column: 1;
        grid-row: 1;
    }

    .site-menu-overlay__group--profile {
        grid-column: 2;
        grid-row: 1;
    }

    .site-menu-overlay__group--zugang {
        grid-column: 2;
        grid-row: 2;
    }

    .site-menu-overlay__group--informationen {
        grid-column: 3;
        grid-row: 1 / span 2;
    }
}

.site-public-header--dark #profile {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

.site-public-header--dark #profile a {
    color: #fff;
    font-size: 14px;
    text-decoration: none;
}

#hauptnav .ui-circle-button {
    margin: 8px 0 0 10px;
}

/* Öffentliche Seitenleiste / Toolbar */

.public-page-toolbar {
    display: flex;
    align-items: center;
    padding: 12px var(--public-page-padding-inline) 0;
    max-width: 1180px;
    margin: 0 auto;
}

.public-page-toolbar--profile {
    max-width: 900px;
}

.public-page-toolbar--profile-detail {
    max-width: 960px;
}

@media (prefers-reduced-motion: reduce) {
    .site-menu-overlay,
    .site-menu-overlay__link,
    .site-menu-overlay__arrow,
    .ui-circle-button,
    .ui-circle-button__icon--menu span {
        transition: none;
    }

    .site-menu-overlay__link:hover,
    .site-menu-overlay__link:focus-visible {
        transform: none;
    }
}

/* =========================================================
   EchoSeiten Dark-Public-Layout / Legacy-Header-Kompatibilität
   Einheitliche 500-px-Achse für Feed und Profilseiten.
   ========================================================= */

body.public-profile-dark {
    margin: 0;
    background: #000;
    color: #f2f2f2;
    font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

body.public-profile-dark *,
body.public-profile-dark *::before,
body.public-profile-dark *::after {
    box-sizing: border-box;
}

body.public-profile-dark .site-header-menu,
body.public-profile-dark .site-public-header,
body.public-profile-dark #header {
    position: sticky;
    position: -webkit-sticky;
    top: 0;
    left: auto;
    width: 100%;
    z-index: 2200;
    background: #000;
    border-bottom: 1px solid #6e6e6e;
}

body.public-profile-dark .site-header-banner,
body.public-profile-dark #banner,
body.public-profile-dark .site-public-header__banner {
    width: 100%;
    height: 65px;
    margin: 0 auto;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    position: relative;
    color: #fff;
    background-color: #000;
    z-index: 1400;
}

body.public-profile-dark .site-header-place,
body.public-profile-dark #echoseite {
    flex: 1 1 0;
    display: block;
    position: static;
    min-width: 0;
    padding-right: 0;
}

body.public-profile-dark .site-header-menu-area,
body.public-profile-dark #header-menu-area {
    flex: 1 1 0;
    min-width: 0;
}

body.public-profile-dark .site-header-place h1,
body.public-profile-dark #echoseite h1 {
    margin: 0;
    color: #6e6e6e;
    font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.public-profile-dark .site-header-logo,
body.public-profile-dark #logo {
    flex: 0 0 auto;
    position: absolute;
    left: 50%;
    top: 12px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50px;
    background-color: #fff;
    z-index: 1200;
}

body.public-profile-dark .site-header-logo img,
body.public-profile-dark #logo img {
    display: block;
    width: 38px;
    height: 38px;
    max-width: none;
    margin: 0;
    border-radius: 50px;
}

body.public-profile-dark .site-header-menu-area,
body.public-profile-dark #header-menu-area {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    z-index: 2300;
}

body.public-profile-dark .header-menu-toggle,
body.public-profile-dark .ui-circle-button--on-dark {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid #2d2d2d;
    border-radius: 50%;
    background: #050505;
    color: #fff;
    cursor: pointer;
}

body.public-profile-dark .header-menu-toggle span {
    display: block;
    width: 16px;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
    transition: transform 180ms ease, opacity 180ms ease;
}

body.public-profile-dark .header-menu-toggle:hover,
body.public-profile-dark .header-menu-toggle[aria-expanded="true"] {
    background-color: #161616;
}

body.public-profile-dark .header-menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
body.public-profile-dark .header-menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}
body.public-profile-dark .header-menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

@media screen and (min-width: 375px) {
    body.public-profile-dark .site-header-place h1,
    body.public-profile-dark #echoseite h1 {
        font-size: 18px;
        font-weight: 500;
    }
}

@media screen and (min-width: 630px) {
    body.public-profile-dark .site-header-banner,
    body.public-profile-dark #banner,
    body.public-profile-dark .site-public-header__banner {
        width: 500px;
    }
}

/* Altes header_menu.php */
body.public-profile-dark .header-menu[hidden] {
    display: none;
}

body.public-profile-dark .header-menu {
    position: fixed;
    top: 60px;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2100;
    height: calc(100dvh - 60px);
    padding: 22px 16px 42px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff;
    color: #111;
    border: 0;
    border-radius: 12px 12px 0 0;
}

body.public-profile-dark .header-menu-section-title,
body.public-profile-dark .header-menu-item {
    width: min(500px, 100%);
    margin-inline: auto;
}

body.public-profile-dark .header-menu-section-title {
    margin-top: 18px;
    margin-bottom: 5px;
    padding: 0 10px;
    color: #6e6e6e;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: .08em;
    text-transform: uppercase;
}

body.public-profile-dark .header-menu-item,
body.public-profile-dark .header-menu-item:visited {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 18px;
    min-height: 44px;
    padding: 9px 10px;
    border-bottom: 0;
    background: #fff;
    color: #111;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.25;
    text-decoration: none;
}

body.public-profile-dark .header-menu-item:hover,
body.public-profile-dark .header-menu-item:focus-visible,
body.public-profile-dark .header-menu-item:active {
    background: #f4f4f4;
    color: #111;
    border-radius: 8px;
}

body.public-profile-dark .header-menu-item:focus-visible {
    outline: 2px solid #111;
    outline-offset: -2px;
}

body.public-profile-dark .header-menu-arrow {
    color: #6e6e6e;
}

/* Neues site-menu-overlay: ebenfalls Dark-Theme */
body.public-profile-dark .site-menu-overlay {
    background: #fff;
    color: #111;
}

body.public-profile-dark .site-menu-overlay__inner {
    width: min(500px, calc(100% - 32px));
}

body.public-profile-dark .site-menu-overlay__title {
    color: #6e6e6e;
}

body.public-profile-dark .site-menu-overlay__link,
body.public-profile-dark .site-menu-overlay__link:visited,
body.public-profile-dark .site-menu-overlay__link:hover,
body.public-profile-dark .site-menu-overlay__link:focus,
body.public-profile-dark .site-menu-overlay__link:active {
    color: #111;
}

body.public-profile-dark .site-menu-overlay__link:hover,
body.public-profile-dark .site-menu-overlay__link:focus-visible,
body.public-profile-dark .site-menu-overlay__link[aria-current="page"] {
    background: #f4f4f4;
    color: #111;
}

body.public-profile-dark .site-menu-overlay__link[aria-current="page"]::before {
    display: none;
}

body.public-profile-dark .site-menu-overlay__arrow {
    color: #6e6e6e;
}

html.header-menu-open,
html.header-menu-open body,
body.header-menu-open,
body.site-menu-open {
    overflow: hidden !important;
}

/* Der Header-Code setzt body beim geöffneten Menü auf position:fixed und
   width:100%. Dadurch verschwindet die äußere Browser-Scrollbar. Deren zuvor
   gemessene Breite wird hier rechts als Innenraum zurückgegeben. Weil der
   Body border-box verwendet, bleibt seine Inhaltsbreite identisch zur
   geschlossenen Ansicht und alle zentrierten 500-px-Elemente springen nicht. */
body.public-profile-dark.header-menu-open {
    box-sizing: border-box;
    padding-right: var(--scrollbar-width, 0px) !important;
}

/* =========================================================
   Desktop-Menü Profile: gleiche 500-px-Achse wie die Profilseiten
   ========================================================= */
@media screen and (min-width: 768px) {
    /* Altes header_menu.php */
    body.public-profile-dark .header-menu-section-title,
    body.public-profile-dark .header-menu-item {
        width: min(500px, calc(100% - 32px));
    }

    body.public-profile-dark .header-menu-item {
        gap: 12px;
        padding-left: 6px;
        padding-right: 6px;
    }

    body.public-profile-dark .header-menu:not([hidden]) .header-menu-section-title,
    body.public-profile-dark .header-menu:not([hidden]) .header-menu-item {
        animation: echoseitenPublicMenuContentIn 150ms ease-out both;
    }

    /* Neues site-menu-overlay */
    body.public-profile-dark .site-menu-overlay__inner {
        width: min(500px, calc(100% - 32px));
    }

    /* Profilmenü bleibt einspaltig, nutzt aber dieselbe 500-px-Außenachse wie die Profilseite. */
    body.public-profile-dark .site-menu-overlay__groups {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 18px !important;
    }

    body.public-profile-dark .site-menu-overlay__group--beitraege,
    body.public-profile-dark .site-menu-overlay__group--profile,
    body.public-profile-dark .site-menu-overlay__group--zugang,
    body.public-profile-dark .site-menu-overlay__group--informationen {
        grid-column: 1 !important;
        grid-row: auto !important;
    }

    body.public-profile-dark .site-menu-overlay__link {
        padding-left: 6px;
        padding-right: 6px;
    }
}

@keyframes echoseitenPublicMenuContentIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    body.public-profile-dark .header-menu:not([hidden]) .header-menu-section-title,
    body.public-profile-dark .header-menu:not([hidden]) .header-menu-item {
        animation: none;
    }
}

/* =========================================================
   Header-Abgleich mit dem Hauptfeed – FINAL 23.08.2026
   Die Werte entsprechen exakt dem Header der Startseite.
   ========================================================= */
body.public-profile-dark .site-header-banner,
body.public-profile-dark #banner,
body.public-profile-dark .site-public-header__banner {
    width: min(100%, 620px);
    height: 58px;
    margin: 0 auto;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: relative;
    color: #fff;
    background-color: #000;
    z-index: 1400;
}

body.public-profile-dark .site-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

body.public-profile-dark .site-brand:visited {
    color: inherit;
}

body.public-profile-dark .site-header-logo,
body.public-profile-dark #logo {
    position: static;
    left: auto;
    top: auto;
    transform: none;
    flex: 0 0 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #fff;
    z-index: auto;
}

body.public-profile-dark .site-header-logo img,
body.public-profile-dark #logo img {
    display: block;
    width: 40px;
    height: 40px;
    max-width: none;
    margin: 0;
    border-radius: 50%;
}

body.public-profile-dark .site-header-place,
body.public-profile-dark #echoseite {
    flex: 0 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 0;
}

body.public-profile-dark .site-brand__name {
    display: block;
    margin: 0 0 1px;
    color: #71767b;
    font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: 0.01em;
}

body.public-profile-dark .site-header-place h1,
body.public-profile-dark #echoseite h1 {
    margin: 0;
    color: #9aa0a6;
    font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.public-profile-dark .site-header-menu-area,
body.public-profile-dark #header-menu-area {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
    z-index: 2300;
}

body.public-profile-dark .header-menu-toggle,
body.public-profile-dark .ui-circle-button--on-dark {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    width: 40px;
    height: 40px;
    padding: 0;
    background-color: transparent;
    border: 1px solid #2f3336;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
}

body.public-profile-dark .header-menu-toggle:hover,
body.public-profile-dark .header-menu-toggle[aria-expanded="true"],
body.public-profile-dark .ui-circle-button--on-dark:hover {
    background-color: #161616;
}

@media screen and (min-width: 640px) {
    body.public-profile-dark .site-header-banner,
    body.public-profile-dark #banner,
    body.public-profile-dark .site-public-header__banner {
        border-left: 1px solid #2f3336;
        border-right: 1px solid #2f3336;
    }
}

/* =========================================================
   ECHOSEITEN – GEMEINSAMER ÖFFENTLICHER HEADER
   EINZIGE QUELLE für Feed und Profilseiten.
   23.08.2026
   ========================================================= */
:root {
    --echo-header-width: 620px;
    --echo-header-height: 58px;
    --echo-header-control-size: 40px;
    --echo-header-border: #2f3336;
    --echo-header-brand-muted: #71767b;
    --echo-header-place: #9aa0a6;
}

/* Feed bleibt fixiert; Profilseiten bleiben sticky. Optik und Geometrie sind identisch. */
body:not(.public-profile-dark) #container > header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 2200 !important;
    background: rgba(0, 0, 0, 0.97) !important;
    border-bottom: 1px solid var(--echo-header-border) !important;
}

body.public-profile-dark #container > header,
body.public-profile-dark .site-header-menu,
body.public-profile-dark .site-public-header,
body.public-profile-dark #header {
    position: sticky !important;
    position: -webkit-sticky !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 2200 !important;
    transform: none !important;
    background: rgba(0, 0, 0, 0.97) !important;
    border-bottom: 1px solid var(--echo-header-border) !important;
}

#banner,
.site-header-banner,
.site-public-header__banner,
#banner.site-public-header__banner,
body.public-profile-dark #banner,
body.public-profile-dark .site-header-banner,
body.public-profile-dark .site-public-header__banner {
    box-sizing: border-box !important;
    width: min(100%, var(--echo-header-width)) !important;
    height: var(--echo-header-height) !important;
    margin: 0 auto !important;
    padding: 0 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    position: relative !important;
    background: #000 !important;
    color: #fff !important;
    z-index: 1400 !important;
}

.site-brand,
.site-brand:visited,
body.public-profile-dark .site-brand,
body.public-profile-dark .site-brand:visited {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-width: 0 !important;
    color: inherit !important;
    text-decoration: none !important;
}

#logo,
.site-header-logo,
body.public-profile-dark #logo,
body.public-profile-dark .site-header-logo {
    position: static !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    flex: 0 0 var(--echo-header-control-size) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: var(--echo-header-control-size) !important;
    height: var(--echo-header-control-size) !important;
    border-radius: 50% !important;
    background: #fff !important;
    z-index: auto !important;
}

#logo img,
.site-header-logo img,
body.public-profile-dark #logo img,
body.public-profile-dark .site-header-logo img {
    display: block !important;
    width: var(--echo-header-control-size) !important;
    height: var(--echo-header-control-size) !important;
    max-width: none !important;
    margin: 0 !important;
    border-radius: 50% !important;
}

#echoseite,
.site-header-place,
body.public-profile-dark #echoseite,
body.public-profile-dark .site-header-place {
    flex: 0 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    min-width: 0 !important;
    padding: 0 !important;
}

.site-brand__name,
body.public-profile-dark .site-brand__name {
    display: block !important;
    margin: 0 0 1px !important;
    color: var(--echo-header-brand-muted) !important;
    font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.05 !important;
    letter-spacing: 0.01em !important;
    text-decoration: none !important;
}

#echoseite h1,
.site-header-place h1,
body.public-profile-dark #echoseite h1,
body.public-profile-dark .site-header-place h1 {
    margin: 0 !important;
    color: var(--echo-header-place) !important;
    font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
    font-size: 18px !important;
    font-weight: 500 !important;
    line-height: 1.08 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    text-decoration: none !important;
}

#header-menu-area,
.site-header-menu-area,
body.public-profile-dark #header-menu-area,
body.public-profile-dark .site-header-menu-area {
    position: relative !important;
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    min-width: 0 !important;
    z-index: 2300 !important;
}

.header-menu-toggle,
.ui-circle-button--on-dark,
body.public-profile-dark .header-menu-toggle,
body.public-profile-dark .ui-circle-button--on-dark {
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: column !important;
    gap: 4px !important;
    width: var(--echo-header-control-size) !important;
    height: var(--echo-header-control-size) !important;
    min-width: var(--echo-header-control-size) !important;
    min-height: var(--echo-header-control-size) !important;
    padding: 0 !important;
    border: 1px solid var(--echo-header-border) !important;
    border-radius: 50% !important;
    background: transparent !important;
    color: #fff !important;
    cursor: pointer !important;
}

.header-menu-toggle span {
    display: block;
    width: 16px;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
    transition: transform 180ms ease, opacity 180ms ease;
}

.header-menu-toggle:hover,
.header-menu-toggle[aria-expanded="true"],
.ui-circle-button--on-dark:hover {
    background: #161616 !important;
}

.header-menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.header-menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.header-menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Dasselbe alte header_menu.php wird auf Feed UND Profilen verwendet. */
.header-menu[hidden] { display: none !important; }
.header-menu {
    position: fixed !important;
    top: var(--echo-header-height) !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    z-index: 2100 !important;
    width: 100% !important;
    height: calc(100dvh - var(--echo-header-height)) !important;
    padding: 22px 16px 42px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    background: #fff !important;
    color: #111 !important;
    border: 0 !important;
    border-radius: 12px 12px 0 0 !important;
    box-shadow: none !important;
}

.header-menu-section-title,
.header-menu-item,
body.public-profile-dark .header-menu-section-title,
body.public-profile-dark .header-menu-item {
    width: min(var(--echo-header-width), calc(100% - 32px)) !important;
    margin-inline: auto !important;
}

.header-menu-section-title {
    margin-top: 18px !important;
    margin-bottom: 5px !important;
    padding: 0 6px !important;
    color: #71767b !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    letter-spacing: .08em !important;
    text-transform: uppercase !important;
}

.header-menu-item,
.header-menu-item:visited {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    align-items: center !important;
    gap: 12px !important;
    min-height: 44px !important;
    padding: 9px 6px !important;
    background: #fff !important;
    color: #111 !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.25 !important;
    text-decoration: none !important;
}

.header-menu-item:hover,
.header-menu-item:focus-visible,
.header-menu-item:active {
    background: #f4f4f4 !important;
    color: #111 !important;
    border-radius: 8px !important;
}

.header-menu-arrow { color: #71767b !important; }

html.header-menu-open,
html.header-menu-open body,
body.header-menu-open {
    overflow: hidden !important;
}

@media (min-width: 640px) {
    #banner,
    .site-header-banner,
    .site-public-header__banner,
    body.public-profile-dark #banner,
    body.public-profile-dark .site-header-banner,
    body.public-profile-dark .site-public-header__banner {
        border-left: 1px solid var(--echo-header-border) !important;
        border-right: 1px solid var(--echo-header-border) !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .header-menu-toggle span { transition: none; }
}

/* =========================================================
   23.08.2026 – Header beim Öffnen des Menüs horizontal stabil halten
   Der vorhandene Scroll-Lock setzt --scrollbar-width, bevor die Browser-
   scrollbar verschwindet. Nur der Header wird um exakt diese Breite
   kompensiert. Feed- und Profil-Layout werden dabei nicht verändert.
   ========================================================= */
html {
    scrollbar-gutter: stable;
}

html.header-menu-open body:not(.public-profile-dark) #container > header {
    left: 0 !important;
    right: var(--scrollbar-width, 0px) !important;
    width: auto !important;
}

body.public-profile-dark.header-menu-open {
    box-sizing: border-box;
    padding-right: var(--scrollbar-width, 0px) !important;
}

/* =========================================================
   23.08.2026 – Samsung/One-UI-artiges Hauptmenü v8
   Ruhige, luftige Abstände auf Mobile UND Desktop.
   Keine höhenabhängige „Zusammenquetsch“-Media-Query.
   ========================================================= */

html {
    scrollbar-gutter: stable !important;
}

html.header-menu-open {
    overflow: hidden !important;
    scrollbar-gutter: stable !important;
}

body.header-menu-open,
body.public-profile-dark.header-menu-open {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    width: auto !important;
    padding-right: 0 !important;
    overflow: hidden !important;
}

html.header-menu-open body:not(.public-profile-dark) #container > header,
body.public-profile-dark.header-menu-open #container > header {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
}

.header-menu[hidden] {
    display: none !important;
}

.header-menu {
    position: fixed !important;
    top: var(--echo-header-height) !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 2100 !important;
    box-sizing: border-box !important;
    width: 100% !important;
    height: calc(100dvh - var(--echo-header-height)) !important;
    padding: 16px 16px 20px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: contain !important;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    background: #121212 !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Menü bleibt vollständig per Touch/Mausrad scrollbar, die Scrollleiste selbst ist unsichtbar. */
.header-menu::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
}

.header-menu-groups {
    box-sizing: border-box;
    width: min(var(--echo-header-width), 100%);
    min-height: 100%;
    height: auto;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: 17px;
}

.header-menu-group {
    min-width: 0;
    margin: 0;
    padding: 0;
}

.header-menu-group__title {
    margin: 0 0 9px !important;
    padding: 0 12px !important;
    color: #a7a9ad !important;
    font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
    letter-spacing: .015em !important;
    text-transform: none !important;
}

.header-menu-card {
    overflow: hidden;
    padding: 2px 0;
    background: #202124;
    border: 1px solid #2a2b2e;
    border-radius: 17px;
}

.header-menu .header-menu-item,
.header-menu .header-menu-item:visited,
body.public-profile-dark .header-menu .header-menu-item,
body.public-profile-dark .header-menu .header-menu-item:visited {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 14px !important;
    width: 100% !important;
    min-height: 40px !important;
    margin: 0 !important;
    padding: 9px 14px !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(255,255,255,.055) !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #f1f3f4 !important;
    font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.25 !important;
    text-decoration: none !important;
    transition: background-color 120ms ease !important;
}

.header-menu-card .header-menu-item:last-child {
    border-bottom: 0 !important;
}

.header-menu .header-menu-item:hover,
.header-menu .header-menu-item:focus-visible,
.header-menu .header-menu-item:active {
    background: #2b2c2f !important;
    color: #fff !important;
    transform: none !important;
}

.header-menu .header-menu-item:focus-visible {
    outline: 2px solid #8ab4f8 !important;
    outline-offset: -2px !important;
}

.header-menu .header-menu-arrow,
body.public-profile-dark .header-menu .header-menu-arrow {
    color: #8b8d92 !important;
    font-size: 20px !important;
    font-weight: 300 !important;
    line-height: 1 !important;
}

/* Desktop / breite Tablets: mehr Luft zwischen den vier Bereichen. */
@media (min-width: 700px) {
    .header-menu {
        padding: 22px 18px 26px !important;
    }

    .header-menu-groups {
        width: min(860px, calc(100% - 36px));
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px 22px;
    }

    .header-menu-group--beitraege { grid-column: 1; grid-row: 1; }
    .header-menu-group--profile { grid-column: 2; grid-row: 1; }
    .header-menu-group--informationen { grid-column: 1; grid-row: 2; }
    .header-menu-group--zugang { grid-column: 2; grid-row: 2; }

    .header-menu-group__title {
        margin-bottom: 11px !important;
        padding-inline: 10px !important;
        font-size: 15px !important;
    }

    .header-menu-card {
        border-radius: 20px;
    }

    .header-menu .header-menu-item,
    .header-menu .header-menu-item:visited,
    body.public-profile-dark .header-menu .header-menu-item,
    body.public-profile-dark .header-menu .header-menu-item:visited {
        min-height: 46px !important;
        padding: 11px 16px !important;
        font-size: 15px !important;
    }
}

/* Sehr schmale Smartphones bleiben bewusst lesbar und werden NICHT
   höhenabhängig auf Mini-Abstände heruntergedrückt. */
@media (max-width: 420px) {
    .header-menu {
        padding: 13px 12px 16px !important;
    }

    .header-menu-groups {
        gap: 15px;
    }

    .header-menu-group__title {
        margin-bottom: 8px !important;
        padding-inline: 10px !important;
        font-size: 13px !important;
    }

    .header-menu-card {
        border-radius: 16px;
    }

    .header-menu .header-menu-item,
    .header-menu .header-menu-item:visited,
    body.public-profile-dark .header-menu .header-menu-item,
    body.public-profile-dark .header-menu .header-menu-item:visited {
        min-height: 39px !important;
        padding: 8px 12px !important;
        font-size: 13.5px !important;
    }
}
