/* Gemeinsame Grundlage: Typografie, Layout und Komponenten der eigenständigen Bereiche. */

/* Lokal eingebundene variable Schrift, Gewichte 100–900. */
@font-face {
    font-family: "Inter";
    src: url("fonts/InterVariable.woff2") format("woff2");
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}

@font-face {
    font-family: "Inter";
    src: url("fonts/InterVariable-Italic.woff2") format("woff2");
    font-style: italic;
    font-weight: 100 900;
    font-display: swap;
}

/* ==========================================================================
Grundlagen und Schrift
========================================================================== */

:root {
    /* Seitenabzug wächst von 2 rem bei 480 px auf 3,8 rem bei 1024 px. */
    --layout-side-space: clamp(2rem, calc(-.186159rem + 7.287197vw), 3.8rem);
    --layout-wide: min(min(100% - 2.8rem, 94%), 1464px);
    --layout-heading: min(75%, 1200px);
    --layout-stage-heading: min(75vw, 1200px);
    --layout-stage-gutter: clamp(0px, calc(12vw - 57.6px), min(6vw, 4rem));
    --layout-stage: min(100%, calc(var(--layout-stage-heading) + 2 * var(--layout-stage-gutter)));
    --layout-content: 768px;
    --layout-space: clamp(2.5rem, 6vw, 6rem);
    --layout-heading-tint: transparent;
    --layout-content-tint: transparent;
    --layout-wide-tint: transparent;
    --link-color: #743d8d;
    --link-feedback-duration: 250ms;
    --link-feedback-easing: linear;
    scrollbar-gutter: stable;
    font-family: "Inter", system-ui, sans-serif;
    font-optical-sizing: auto;
    font-feature-settings: "calt" 1, "ss07" 1, "ss08" 1, "cv05" 1;
    font-size: clamp(16px, calc(13.6px + 0.5vw), 20px);
    line-height: 1.56;
    color: #363438;
    background-color: #faf9fb;
}

html {
    background-color: #faf9fb;
}

body {
    background-color: #faf9fb;
    margin: 0;
    padding: 0;
    background-image: linear-gradient(to bottom, rgba(45, 35, 30, 0.05) 0, rgba(45, 35, 30, 0.03) 6rem, rgba(45, 35, 30, 0.01) 14rem, transparent 24rem),
        radial-gradient(ellipse at 50% 45%, transparent 35%, rgba(45, 35, 30, 0.005) 70%, rgba(45, 35, 30, 0.03) 100%),
        url("paper-scratches.svg"),
        url("paper-grain.svg");
    background-size: 100% 24rem, 100% 100%, 960px 760px, 180px 180px;
    background-repeat: no-repeat, no-repeat, repeat, repeat;
    background-attachment: scroll;
}

a {
    transition: color var(--link-feedback-duration, 250ms) var(--link-feedback-easing, linear);
    color: var(--link-color);
    text-underline-offset: 0.15em;
}

a:hover {
    color: #000;
}

@media (hover: hover) {
    a:hover {
        --link-feedback-duration: 350ms;
        --link-feedback-easing: ease-in-out;
    }
}


h1,
h2,
h3 {
    line-height: 1.05;
    text-wrap: balance;
    text-wrap: pretty;
}

h1 {
    font-size: clamp(2.2rem, calc(10.333333vw - 14.4px), 5rem);
    position: relative;
    font-weight: 780;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2rem;
    margin-top: 2em;
}

/* Inhaltsüberschriften: gleicher Wachstumsbereich wie H1.
Karten und Sections behalten ihre eigenen Schriftgrößen. */
h2:where(:not(.story-card *, section *)) {
    font-size: clamp(1.5rem, calc(11.2px + 2.666667vw), 2rem);
}

.page-label {
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 0.6rem;
    color: #777;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
    font-weight: 460;
    line-height: 1.4;
}

main {
    min-height: 60vh;
    width: 100%;
    max-width: none;
    margin: 2rem auto 3rem;
}

/* Textspalte unabhängig von der Breite der Bilder und des Artikels. */
.story p,
.story li,
.story figcaption {
    max-width: var(--layout-content);
}

.story > p {
    margin-block-start: 1.5rem;
}

/* ==========================================================================
Beitragslisten und Seitennavigation
========================================================================== */

.entries article {
    padding: 1rem 0;
    border-bottom: 1px solid #ddd;
}

.entries h2 {
    font-size: 1.3rem;
    margin-top: auto;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 2rem;
}

/* ==========================================================================
Geschichten-Übersicht: Bilderraster ohne automatische Textauszüge
========================================================================== */

.story-grid {
    --card-inset: 1rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(1.5rem, 3.2vw, 3rem) clamp(1rem, 2.4vw, 2rem);
}

.story-card {
    --card-background: rgba(255, 255, 255, .26);
    --card-hover-overlay: rgba(255, 255, 255, .08);
    --card-feedback-duration: 250ms;
    --card-feedback-easing: linear;
    position: relative;
    min-width: 0;
    border-radius: 3px;
    overflow: visible;
}

.story-card::before,
.story-card::after,
.story-card-link {
    translate: 0 var(--card-offset, 0px);
    transition: translate var(--card-feedback-duration) ease-in-out,
        transform var(--card-feedback-duration) ease-in-out;
}

/* Helle Grundfläche und Schatten liegen außerhalb der Multiply-Ebene. */
.story-card::before,
.story-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    transform: rotate(calc(var(--card-angle, 0deg) * var(--card-rotation-factor, 1))) scale(var(--card-scale, 1));
    pointer-events: none;
}

.story-card::after {
    background: var(--card-background);
    box-shadow: 0 .5rem 1.25rem rgba(45, 35, 30, .1);
}

.story-card::before {
    background: var(--card-hover-overlay);
    box-shadow: 0 .5rem 1.25rem rgba(45, 35, 30, .025);
    opacity: 0;
    will-change: opacity;
    transition: opacity var(--card-feedback-duration) var(--card-feedback-easing),
        translate var(--card-feedback-duration) ease-in-out,
        transform var(--card-feedback-duration) ease-in-out;
}

.story-card-link {
    overflow: hidden;
    border-radius: inherit;
    position: relative;
    z-index: 1;
    transform: rotate(calc(var(--card-angle, 0deg) * var(--card-rotation-factor, 1))) scale(var(--card-scale, 1));
    mix-blend-mode: multiply;
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
    background: transparent;
}

.story-card-link:focus-visible {
    outline: 2px solid var(--link-color);
    outline-offset: 0.4rem;
}

.story-card-image {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    box-sizing: border-box;
    height: clamp(13rem, 28vw, 20rem);
    overflow: hidden;
    padding: var(--card-inset);
    background: transparent;
}

.story-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    min-width: 0;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center top;
    mix-blend-mode: multiply;
}

/* Bilder bleiben vollständig und ungedreht; die gesamte Karte wird geneigt. */
.story-card-photo .story-card-image {
    padding: var(--card-inset);
}

.story-card-photo .story-card-image img {
    object-fit: contain;
}

.tilt-left {
    --card-angle: -0.4deg;
}

.tilt-right {
    --card-angle: 0.4deg;
}

.tilt-soft-left {
    --card-angle: -0.2deg;
}

.tilt-soft-right {
    --card-angle: 0.2deg;
}

/* Auch Dokumente und empfindliche Motive bleiben vollständig sichtbar. */
.story-card-complete .story-card-image {
    padding: var(--card-inset);
}

.story-card h2 {
    margin: auto 0 0;
    padding: .65rem var(--card-inset) .35rem;
    font-size: clamp(1.45rem, 2.6vw, 2rem);
    line-height: 1.2;
    color: var(--link-color);
    transition: color var(--card-feedback-duration) var(--card-feedback-easing);
}

.reading-time {
    display: block;
    padding: 0.5em calc(var(--card-inset) + 2rem) var(--card-inset) var(--card-inset);
    text-align: left;
    font-size: 0.75rem;
    line-height: 1;
    color: #00000044;
    transition: color var(--card-feedback-duration) var(--card-feedback-easing);
}

.story-card-link:focus-visible h2 {
    color: #000;
    text-decoration: none;
}

/* Der Pfeil dunkelt zurückhaltend ab und bleibt dezenter als der Titel. */
.story-card-link::after {
    content: "→";
    position: absolute;
    right: var(--card-inset);
    bottom: var(--card-inset);
    font-size: 1.4rem;
    font-weight: 400;
    line-height: 1;
    color: #000;
    opacity: .25;
    transition: opacity var(--card-feedback-duration) var(--card-feedback-easing);
}

@media (hover: hover) {
    .story-card:hover {
        --card-feedback-duration: 350ms;
        --card-feedback-easing: ease-in-out;
        --card-offset: -3px;
        --card-scale: 1.01;
        --card-rotation-factor: .5;
    }
    .story-card:hover::before { opacity: 1; }
    .story-card-link:hover::after { opacity: .45; }
    .story-card-link:hover h2 { color: #000; }
    .story-card-link:hover .reading-time { color: #00000066; }
}

.story-card:focus-within {
    outline: 2px solid var(--link-color);
    outline-offset: 0.25rem;
}

.story-card:focus-within::before { opacity: 1; }

.story-card-link:focus-visible::after {
    opacity: .45;
}

.story-card-link:focus-visible .reading-time { color: #00000066; }

@media (prefers-reduced-motion: reduce) {
    .story-card:hover {
        --card-offset: 0px;
        --card-scale: 1;
        --card-rotation-factor: 1;
    }

    .story-card,
    .story-card::before,
    .story-card::after,
    .story-card-link,
    .story-card h2,
    .story-card .reading-time,
    .story-card-link::after {
        transition: none;
    }

}

@media (min-width: 64rem) {
    .story-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

.story-card-copy { display: contents; }

/* Einspaltig: querformatige Einträge statt hoher, aufgezogener Karten. */
@media (min-width: 40rem) and (max-width: 63.999rem) {
    .story-grid {
        row-gap: clamp(1rem, 2.4vw, 2rem);
    }

    .story-card-link {
        display: grid;
        grid-template-columns: fit-content(55%) minmax(0, 1fr);
        grid-template-rows: 1fr auto;
        height: 100%;
    }

    .story-card-image {
        grid-column: 1;
        grid-row: 1 / 3;
        align-self: center;
        height: auto;
        min-width: 0;
    }

    .story-card .story-card-image { padding-right: .45rem; }

    .story-card-image img {
        width: auto;
        height: auto;
        max-height: calc(clamp(14rem, 34vw, 21rem) - var(--card-inset) - var(--card-inset));
        object-position: left center;
    }

    .story-card-copy { display: contents; }

    .story-card h2 {
        grid-column: 2;
        grid-row: 1;
        align-self: center;
        min-width: 0;
        margin: 0;
        padding: var(--card-inset) var(--card-inset) .6rem .45rem;
        text-align: left;
    }

    .story-card .reading-time {
        grid-column: 2;
        grid-row: 2;
        align-self: end;
        padding: 0 calc(var(--card-inset) + 2rem) var(--card-inset) .45rem;
        line-height: 1.35;
    }
}

@media (max-width: 63.999rem) {
    .story-card { --card-inset: .9rem; }
}

@media (max-width: 39.999rem) {
    /* Gestapelt bestimmt das Bildformat die Höhe, ohne seitliche Leerflächen. */
    .story-card-image {
        height: auto;
        max-height: none;
    }

    .story-card-image img {
        width: 100%;
        height: auto;
        max-height: none;
    }
}

/* ==========================================================================
Bilder und Bildunterschriften
========================================================================== */

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

main img { border-radius: 2px; }

figure {
    margin: 2.5rem 0;
    font-size: 0.9rem;
    color: #777;
}

figure img {
    display: block;
}

figure p {
    margin-block-start: 0.5rem;
}

figcaption,
small {
    color: #777;
}

.featured-image {
    margin: 0.5rem 0 10rem;
    position: relative;
}

.featured-image::after {
    content: "";
    position: absolute;
    bottom: -5.8rem;
    left: calc(50% - 0.8rem);
    width: 1.6rem;
    height: 1.6rem;
    background: url("TeBe-Kern_schwarz.svg") center / contain no-repeat;
    opacity: 0.75;
}

/* Gegner: ohne Trennlogo und mit kompakterem Abstand zum Text. */
body.gegner .featured-image,
body.verein .featured-image {
    margin: .5rem 0 2rem;
}

body.gegner .featured-image::after,
body.verein .featured-image::after {
    content: none;
}

.featured-image img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    mix-blend-mode: multiply;
}

.featured-image figcaption {
    margin-top: 0.6rem;
    font-size: 0.95rem;
}

.featured-image figcaption p {
    margin: 0.3rem 0;
    line-height: 1.4;
    font-style: italic;
}

/* ==========================================================================
Schlagworte und weitere Inhaltselemente
========================================================================== */

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0;
    list-style: none;
}

.chips a {
    display: block;
    padding: 0.1rem 0.6rem;
    border-radius: 0.3rem;
    border: 1px solid;
    text-decoration: none;
}

.chips a:hover {
    background: #fff;
}

.terms {
    columns: 3;
    column-width: 15rem;
}

.terms li {
    break-inside: avoid;
}

blockquote {
    box-sizing: border-box;
    max-width: var(--layout-content);
    margin: 2.5rem 0 3rem;
    padding: 0 2.5rem;
    border: 0;
    color: #777;
}

/* Zitatzeichen mittig oberhalb des Textes, ohne seitliche Umfließung. */
blockquote::before {
    content: "”";
    display: block;
    height: 0.25em;
    line-height: 0.75em;
    font-size: clamp(4rem, 12vw, 9rem);
    text-align: left;
    color: rgba(70, 55, 65, 0.2);
    pointer-events: none;
    position: relative;
    left: -2.75rem;
}

blockquote > p:first-child {
    margin-top: 0;
}

table {
    display: block;
    max-width: 100%;
    overflow: auto;
}

dt {
    font-weight: bold;
}

dd {
    margin-bottom: 0.6rem;
}

/* ==========================================================================
Begegnungen auf Gegnerseiten
========================================================================== */

/* Gleichrangige Bereiche: Begegnungen und zugehörige Geschichten. */
.entry-updated {
    margin-top: 1.5rem;
    font-size: 0.75rem;
    color: #777;
}

.search-result-group,
.opponent-matches,
.related-stories {
    margin: 5rem 0 2.5rem;
}

.headline-frame + :is(.search-result-group, .opponent-matches, .related-stories) {
    margin-top: 2.5rem;
}

.opponent-matches > h2,
.related-stories > h2,
.search-result-group > h2 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.05;
    margin: 0 0 1.125rem;
}

/* Gemeinsame zweite Ebene: Mannschaften und verknüpfte Beitragstitel. */
.match-team > summary,
.linked-entries :is(h2, h3) {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.35;
}

.match-team,
.linked-entries article {
    border-top: 1px solid rgba(70, 55, 65, 0.2);
}

.match-team:last-child,
.linked-entries article:last-child {
    border-bottom: 1px solid rgba(70, 55, 65, 0.2);
}

.match-team > summary,
.linked-entries :is(h2, h3) a {
    -webkit-user-select: none;
    user-select: none;
    position: relative;
    padding: 0.8rem 2rem 0.8rem 0;
    list-style: none;
    cursor: pointer;
}

.match-team > summary {
    color: var(--link-color);
}

.match-team > summary:hover {
    color: #000;
}

.match-team > summary::-webkit-details-marker {
    display: none;
}

.linked-entries :is(h2, h3) a::after {
    content: "→";
    font-weight: 400;
    color: rgba(70, 55, 65, 0.2);
}

.match-team > summary::after {
    font-weight: 400;
}

.linked-entries article {
    padding: 0;
    border-bottom: 0;
}

.linked-entries article:last-child {
    border-bottom: 1px solid rgba(70, 55, 65, 0.2);
}

.linked-entries :is(h2, h3) {
    margin: 0;
}

.linked-entries :is(h2, h3) a {
    display: block;
    text-decoration: none;
}

.linked-entries :is(h2, h3) a:hover,
.linked-entries :is(h2, h3) a:focus-visible {
    color: #000;
    text-decoration: none;
}

.linked-entries :is(h2, h3) a:hover::after,
.linked-entries :is(h2, h3) a:focus-visible::after {
    color: #000;
}

.match-team > summary:focus-visible,
.linked-entries :is(h2, h3) a:focus-visible,
.match-table-scroll:focus-visible {
    outline: 2px solid var(--link-color);
    outline-offset: 0.2rem;
}

/* Gegnerlisten: kleines Vereinszeichen und die zugehörigen Bestandszahlen. */
.linked-entries :is(h2, h3) a.opponent-list-link {
    display: flex;
    align-items: center;
}

.opponent-list-logo {
    display: flex;
    flex: 0 0 3rem;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
}

.opponent-list-logo img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.opponent-list-text {
    min-width: 0;
}

.opponent-list-counts,
.profile-list-counts {
    display: block;
    color: #777;
    font-size: 0.7rem;
    font-weight: 400;
    line-height: 1.5;
}

.opponent-list-counts span {
    display: block;
}

/* Schlagwortseiten: eigenständiger Einstieg zum ausführlichen Themenbeitrag. */
.topic-intro {
    margin: 1rem 0 4rem;
}


.story-grid.topic-intro {
    margin-top: 1rem;
    margin-bottom: 3.5rem;
}


.match-group-title {
    margin: 1.5rem 0 0.7rem;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
}

/* Kleine Bildschirme: nur die Tabelle scrollt, nicht die ganze Seite. */
.match-table-scroll {
    max-width: 100%;
    margin: 0 0 1rem;
    overflow-x: auto;
}

.match-table {
    display: table;
    width: 100%;
    min-width: 44rem;
    border-collapse: collapse;
    font-size: 0.7rem;
    line-height: 1.5;
}

.match-table th,
.match-table td {
    padding: 0.4rem 0.45rem;
    text-align: left;
    vertical-align: top;
}

.match-table th {
    color: #605968;
    font-weight: 500;
    border-bottom: 1px solid rgba(70, 55, 65, 0.25);
}

.match-table td {
    border-top: 1px solid rgba(70, 55, 65, 0.1);
}

.match-table .match-new-season td {
    border-top: 2px solid rgba(70, 55, 65, 0.25);
    padding-top: 0.7rem;
}

.match-table .match-season,
.match-table .match-date,
.match-table .match-result {
    white-space: nowrap;
}

.match-table .match-attendance,
.match-table .match-result {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.match-table .match-fixture {
    min-width: 12rem;
}

.match-result {
    font-weight: 600;
}

/* ==========================================================================
Footer und Suche
========================================================================== */

.site-footer {
    box-sizing: border-box;
    margin: 5rem auto 0;
    padding: 2rem 0 2.5rem;
}

.footer-bottom {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem 2rem;
}

.footer-links {
    display: flex;
    flex: 0 1 auto;
    flex-wrap: wrap;
    gap: .4rem;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.5;
}

.footer-links a {
    text-decoration: none;
}

.footer-links-global {
    justify-content: flex-end;
    margin-left: auto;
}

.footer-links a:focus-visible {
    outline: 2px solid var(--link-color);
    outline-offset: 0.2rem;
}

@media (max-width: 47.999rem) {
    .footer-bottom {
        flex-direction: column;
        gap: .5rem;
    }
    .footer-links-global {
        margin-left: 0;
        justify-content: flex-start;
    }
}

input,
button {
    padding: 0.3rem 0.6rem;
    font: inherit;
}

form {
    margin: 1rem 0;
}

.footer-search {
    display: flex;
    align-items: stretch;
    gap: 1rem;
    width: 100%;
    margin: 0 0 2.5rem;
    border-bottom: 2px solid rgba(70, 55, 65, 0.2);
    font-size: clamp(1.25rem, 3.5vw, 2rem);
}

.footer-search input {
    font-feature-settings: "calt" 1, "ss02" 1, "ss07" 1, "ss08" 1, "cv05" 1;
    flex: 1;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: none;
    padding: 0.65rem 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--link-color);
}

.footer-search input::placeholder {
    color: #777;
    opacity: 1;
}

.footer-search button {
    flex: none;
    padding: 0.65rem 0;
    border: 0;
    background: transparent;
    color: rgba(70, 55, 65, 0.2);
    font-weight: 400;
    cursor: pointer;
}

.footer-search > button[type="submit"] {
    width: 1.25em;
    text-align: center;
}

/* Ein Fokuszeichen für die gesamte Suchzeile statt einzelner Rahmen. */
.footer-search:focus-within {
    border-bottom-color: var(--link-color);
}

.footer-search:focus-within .footer-search-icon {
    color: var(--link-color);
}

.footer-search :focus-visible {
    outline: none;
}

.footer-search input:not(:placeholder-shown) + button {
    color: var(--link-color);
}

/* Der native Löschen-Knopf rechts entfällt zugunsten des linken Buttons. */
.footer-search input::-webkit-search-cancel-button,
.footer-search input::-webkit-search-decoration {
    -webkit-appearance: none;
    display: none;
}

.footer-search-leading {
    display: flex;
    flex: 0 0 1.25em;
    align-items: center;
    justify-content: center;
    color: rgba(70, 55, 65, 0.2);
}

.footer-search-icon {
    position: relative;
    width: 0.55em;
    height: 0.55em;
    margin: -0.12em 0.15em 0 0;
    border: 3px solid currentColor;
    border-radius: 50%;
}

.footer-search-icon::after {
    content: "";
    position: absolute;
    right: -0.25em;
    bottom: -0.1em;
    width: 0.3em;
    height: 3px;
    background: currentColor;
    transform: rotate(45deg);
}

.footer-search .footer-search-clear {
    padding: 0;
    width: 1.25em;
    color: var(--link-color);
    line-height: 1;
}

.footer-search .footer-search-clear:hover,
.footer-search .footer-search-clear:focus-visible {
    color: #000;
}

.footer-search-leading [hidden] {
    display: none;
}

/* ==========================================================================
Layout: Wide, Headline, Inhalt und volle Breite
========================================================================== */
/* Unter Desktop: gemeinsame Headline-/Inhaltsbreite, maximal 768 px. */
@media (max-width: 63.999rem) {
    :root {
        --layout-heading: min(var(--layout-wide), 768px);
        --layout-stage-heading: min(100vw - 2.8rem, 94vw, 1464px, 768px);
        --layout-content: var(--layout-heading);
    }
}

main > :not(.story):not(.story-grid),
.story-grid,
.layout-heading,
.site-footer {
    box-sizing: border-box;
    width: var(--layout-heading);
    max-width: none;
    margin-inline: auto;
    background-color: var(--layout-heading-tint);
}

.layout-content {
    width: var(--layout-content);
    margin-inline: auto;
    background: var(--layout-content-tint);
}

.layout-wide {
    width: var(--layout-wide);
    margin-inline: auto;
    background: var(--layout-wide-tint);
}

/* Stage: eigener Außenrahmen; Text bleibt auf der Headline-Breite. */
.layout-stage {
    box-sizing: border-box;
    width: var(--layout-stage);
    margin-inline: auto;
}

.layout-stage > .layout-heading {
    width: min(100%, var(--layout-stage-heading));
    margin-inline: auto;
}

.layout-full {
    width: 100%;
    background: var(--layout-heading-tint);
    padding-block: var(--layout-space);
}

.layout-full > .layout-heading {
    background: transparent;
}

main > .story {
    width: 100%;
    max-width: none;
}

.story > * {
    box-sizing: border-box;
    width: var(--layout-content);
    max-width: none;
    margin-inline: auto;
    background-color: var(--layout-content-tint);
}

.story > h1,
.story > nav,
.story > aside,
.story > .related-stories,
.story > .opponent-matches {
    width: var(--layout-heading);
    max-width: none;
    background-color: var(--layout-heading-tint);
}

.story > h1 {
    margin-block: 2rem;
}

.story p, .story li {
    max-width: none;
}

.story > p {
    width: var(--layout-content);
    max-width: none;
}

.story > :is(ul, ol) {
    padding-left: 1.5rem;
}

main > .entries, main > .search-result-group {
    width: var(--layout-heading);
    background-color: var(--layout-heading-tint);
}

/* Absätze beginnen an der linken Kante der Inhaltsebene. */
.story > :not(h1):not(nav):not(aside):not(figure):not(.related-stories):not(.opponent-matches):not(.headline-frame) {
    margin-left: calc((100% - var(--layout-content)) / 2);
    margin-right: auto;
}

/* ==========================================================================
H1: Breitenabhängige Typografie und freistehende Labels
========================================================================== */
/* Der Container bleibt auf Headline-Breite, auch wenn der Text schmaler ist. */
.headline-frame {
    container-type: inline-size;
}

main > .headline-frame,
.story > .headline-frame {
    width: var(--layout-heading);
    margin-inline: auto;
    background-color: var(--layout-heading-tint);
}

.headline-frame > h1 {
    font-size: clamp(2.2rem, calc(11.636364px + 7.363636cqw), 5rem);
}

.headline-frame > h1 {
    width: 100%;
    max-width: min(100%, 36rem);
    margin-inline: 0;
}

.headline-frame > h1,
.story > .headline-frame > h1 {
    margin-top: 0.67em;
    margin-bottom: 0.67em;
    position: relative;
}

.headline-frame > h1 > .page-label {
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: .25rem;
}

@media (min-width: 64rem) {
    .headline-frame > h1 {
        max-width: min(100%, calc(36rem + 100cqw - 768px));
    }
}

.headline-frame--long > h1 {
    max-width: 100%;
}

/* Auf der Startseite bleibt der Titel nur für assistive Technik vorhanden. */
main > .stories-home-heading,
.headline-frame:has(> .stories-home-heading) {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
}

main > .stories-home-heading {
    padding: 0;
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
Artikelbilder und Bildbeschriftungen
========================================================================== */
.story > figure {
    width: var(--layout-stage);
    max-width: none;
    background-color: var(--layout-wide-tint);
    margin-block: var(--layout-space);
}

.story > figure img {
    margin-inline: auto;
}

.story > figure figcaption {
    width: min(66.6667%, 36rem);
    max-width: none;
    margin-inline: auto;
    padding-block: .75rem;
}

.story > figure figcaption p {
    max-width: none;
}

@media (max-width: 63.999rem) {
    .story > figure figcaption {
        width: calc(100% - 2rem);
    }
}

/* Große Querformate beginnen an der Headline-Kante; kompakte Motive mittig. */
main .story > .featured-image {
    width: var(--layout-heading);
    margin-inline: auto;
    margin-top: 1rem;
    margin-bottom: 10rem;
}

main .story > .featured-image img,
main .story > .featured-image > .image-caption-group {
    margin-inline: 0 auto;
}

/* Kompakte Motive beginnen an der Inhaltskante, ohne Originale zu vergrößern. */
main .story > .featured-image--compact {
    width: var(--layout-content);
}

main .story > .featured-image--compact > .image-caption-group,
main .story > .featured-image--compact img {
    margin-inline: 0 auto;
}

body.verein main .story > .featured-image {
    margin-bottom: 2rem;
}

body.gegner main .story > .featured-image {
    margin-bottom: 3rem;
}

/* Formatklassen bleiben für die automatische Bilderkennung erhalten. */
.story > :is(.featured-image--narrow, .featured-image--compact) {
    background-color: var(--layout-content-tint);
}

.story > .featured-image--heading {
    background-color: var(--layout-heading-tint);
}

.story > .featured-image--stage {
    background-color: var(--layout-wide-tint);
}

.story > .article-image {
    width: var(--layout-content);
    background-color: var(--layout-content-tint);
}

.story > .article-image img {
    width: auto;
    max-width: 100%;
    height: auto;
    margin-inline: 0 auto;
}

.story > .article-image--heading {
    width: var(--layout-heading);
    background-color: var(--layout-heading-tint);
}

.story > .article-image--heading img {
    margin-inline: auto;
}

.layout-headline-measure {
    position: fixed;
    width: var(--layout-heading);
    height: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Beschriftungen folgen der tatsächlichen Bildkante, nicht dem äußeren Raster. */
.image-caption-group {
    width: fit-content;
    max-width: 100%;
    margin-inline: auto;
}

:is(.featured-image--narrow, .featured-image--compact, .article-image--narrow, .article-image--content) > .image-caption-group {
    margin-inline: 0 auto;
}

.story > figure .image-caption-group > figcaption {
    contain: inline-size;
    box-sizing: border-box;
    width: auto;
    margin: .5rem 0 0;
    padding: 0;
    text-align: left;
    line-height: 1.4;
}

.story > figure .image-caption-group > figcaption p {
    margin: 0;
}

.story > figure .image-caption-group > figcaption p + p {
    margin-top: .25rem;
}

/* ==========================================================================
Einspaltige Titellisten und animierte Begegnungen
========================================================================== */
.linked-entries {
    display: block;
}

.linked-entries article {
    min-width: 0;
}

.linked-entries :is(h2, h3) a:not(.opponent-list-link) {
    box-sizing: border-box;
    display: flex;
    align-items: baseline;
    padding-right: 0;
    overflow-wrap: anywhere;
}

.opponent-list-text, .list-link-label {
    max-width: 36rem;
}

.list-link-label {
    min-width: 0;
}

.linked-entries :is(h2, h3) a,
.linked-entries :is(h2, h3) a:not(.opponent-list-link),
.match-team > summary {
    padding-left: 0;
    gap: 1.05rem;
}

.linked-entries :is(h2, h3) a.opponent-list-link {
    gap: .75rem;
}

.match-team > summary {
    display: flex;
    align-items: center;
    padding-right: 0;
}

.linked-entries :is(h2, h3) a::after,
.match-team > summary::after {
    position: static;
    display: inline-flex;
    order: -1;
    flex: 0 0 1.6rem;
    width: 1.6rem;
    height: 1.6875rem;
    align-self: center;
    align-items: center;
    justify-content: center;
    text-align: center;
    transform: none;
    line-height: 1;
}

.linked-entries :is(h2, h3) a::after {
    justify-content: flex-start;
    font-size: 1.4rem;
    transition: color var(--link-feedback-duration, 250ms) var(--link-feedback-easing, linear),
        transform var(--link-feedback-duration, 250ms) var(--link-feedback-easing, linear);
}

@media (hover: hover) {
    .linked-entries :is(h2, h3) a:hover::after {
        transform: translateX(.2rem);
    }
}

/* Zwei Striche drehen sich; der senkrechte zieht sich zum Minus ein. */
.match-team > summary::after,
.match-team[open] > summary::after {
    content: "";
    font-size: 1.8rem;
    background-image: linear-gradient(currentColor, currentColor), linear-gradient(currentColor, currentColor);
    background-repeat: no-repeat;
    background-position: 3px center, calc(.475rem + 1.5px) center;
    background-size: .95rem 3px, 3px .95rem;
    transform: rotate(0deg);
    transform-origin: calc(.475rem + 3px) 50%;
    transition: transform 320ms ease, background-size 320ms ease;
}

.match-team[open] > summary::after {
    background-size: .95rem 3px, 3px 0;
    transform: rotate(180deg);
}

@keyframes match-content-reveal {
    from { opacity: 0; transform: translateY(-.35rem); }
    to { opacity: 1; transform: translateY(0); }
}

.match-team[open] > :not(summary) {
    animation: match-content-reveal 320ms ease-out both;
}

@media (prefers-reduced-motion: reduce) {
    .match-team > summary::after,
    .linked-entries :is(h2, h3) a::after {
        transition: none;
        transform: none;
    }

    .match-team[open] > :not(summary) {
        animation: none;
    }
}

/* ==========================================================================
Gegner- und Persönlichkeitenverzeichnisse
========================================================================== */
.profile-directory .directory-group {
    display: grid;
    grid-template-columns: 4rem minmax(0, 1fr);
    gap: 0 1rem;
    margin-block: 0;
}

.profile-directory .directory-letter {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    margin: .65rem 0 0;
    color: #b3aab8;
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 650;
    line-height: 1;
    padding-left: 3px;
}

.profile-directory .directory-entry {
    margin: 0;
    position: relative;
    grid-column: 2;
    border: 0;
}

.profile-directory .directory-entry:last-child {
    border-bottom: 0;
}

.profile-directory .directory-entry h3 {
    margin: 0;
}

.profile-directory .directory-entry a.opponent-list-link {
    padding: .6rem .75rem;
    gap: 1.25rem;
    align-items: center;
    border-radius: .25rem;
    transition: color var(--link-feedback-duration, 250ms) var(--link-feedback-easing, linear);
}

.profile-directory .directory-entry a::after {
    content: "→";
    order: 0;
    margin-left: auto;
    flex-shrink: 0;
}

.profile-directory .directory-entry a:is(:hover, :focus-visible) {
    background-color: transparent;
}

.profile-directory .opponent-list-logo {
    flex: 0 0 3.5rem;
    width: 3.5rem;
    height: 3.5rem;
}

.profile-directory .opponent-list-logo img {
    max-width: 100%;
    max-height: 100%;
}

.profile-directory .opponent-list-text {
    max-width: 36rem;
}

.profile-directory .opponent-list-counts {
    display: flex;
    flex-wrap: wrap;
    gap: .15rem 1rem;
    margin-top: .35rem;
}

.profile-directory .profile-list-counts {
    margin-top: .35rem;
}

.profile-directory .directory-personality .opponent-list-logo {
    height: 3.75rem;
    background: #78668009;
    border-radius: .15rem;
}

.profile-directory .directory-personality .opponent-list-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@media (max-width: 47.999rem) {
    .profile-directory .directory-group {
        grid-template-columns: 2.25rem minmax(0, 1fr);
        gap: 0 .5rem;
    }

    .profile-directory .directory-entry a.opponent-list-link {
        padding-inline: .35rem;
        gap: .75rem;
    }

    .profile-directory .opponent-list-logo {
        flex-basis: 2.75rem;
        width: 2.75rem;
        height: 2.75rem;
    }

    .profile-directory .directory-personality .opponent-list-logo {
        height: 3.75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .profile-directory .directory-entry a.opponent-list-link {
        transition: none;
    }
}

.profile-directory .directory-initials {
    color: #968b9c;
    font-size: .9rem;
    font-weight: 500;
    letter-spacing: .04em;
}

/* Gleiche 1-px-Linien wie in Geschichtenlisten, über die gesamte Gruppe. */
.profile-directory .directory-items {
    display: contents;
}

.profile-directory .directory-entry::before,
.profile-directory .directory-entry:last-child::after {
    content: "";
    position: absolute;
    left: -5rem;
    right: 0;
    border-top: 1px solid rgba(70, 55, 65, 0.2);
    pointer-events: none;
}

.profile-directory .directory-entry::before {
    top: 0;
}

.profile-directory .directory-entry:last-child::after {
    bottom: 0;
}

@media (max-width: 47.999rem) {
    .profile-directory .directory-letter {
        font-size: 2rem;
    }

    .profile-directory .directory-entry::before,
    .profile-directory .directory-entry:last-child::after {
        left: -2.75rem;
    }
}

/* Gruppen schließen ohne zusätzliche Leerzeile und doppelte Trennlinie an. */
.profile-directory .directory-group + .directory-group .directory-entry:first-of-type::before {
    border-top: 0;
}

/* ==========================================================================
Header: Logo, Hauptmenü und Untermenü
========================================================================== */



.header-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
}

.brand {
    font-size: 1.35rem;
    font-weight: 700;
}

.header-main .brand {
    flex: 0 1 220px;
    width: 220px;
}

.brand img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
}

.header-navigation {
    flex: 1;
    min-width: 0;
    margin-left: auto;
}

.header-primary {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.site-header nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1rem 0;
}

.header-main nav {
    justify-content: flex-end;
    margin-left: auto;
    text-align: right;
}

.header-navigation nav {
    justify-content: flex-end;
    text-align: right;
}

.header-navigation nav[aria-label="Hauptnavigation"] {
    margin-bottom: 0.5rem;
}

.header-primary nav[aria-label="Hauptnavigation"] {
    margin: 0.1rem 0 0;
}

.site-header nav a {
    font-size: 1.25rem;
    font-weight: 600;
    text-decoration: none;
}

.site-header nav a[aria-current] {
    text-decoration-line: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.2em;
}

.site-header nav a[aria-current="page"] {
    text-decoration-color: currentColor;
}

.site-header nav a[aria-current="location"] {
    text-decoration-color: #fff;
}

.subnav {
    justify-content: flex-end;
    padding: 0.5rem 0.8rem;
    background: transparent;
    border-radius: 0;
}

.header-navigation .subnav {
    margin: 0;
    padding: 0;
    background: none;
}

.subnav a {
    font-size: 0.95rem;
}

/* ==========================================================================
Kleine Bildschirme: bis 40rem (640px bei Standardschriftgröße)
========================================================================== */

@media (max-width: 40rem) {
    blockquote {
        padding-left: 1rem;
        padding-right: 0.5rem;
    }
    blockquote::before {
       left: calc(-0.25em);
    }

    input {
        max-width: 90%;
    }

    .header-main {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .header-main .brand {
        flex-basis: 220px;
    }

    .header-main nav {
        width: 100%;
        margin-top: 0.5rem;
    }

    .header-navigation {
        flex-basis: 100%;
    }
}

/* ==========================================================================
Mobiles Vollbildmenü: unter 64rem (1024 px)
========================================================================== */

.menu-toggle {
    display: none;
}

@media (max-width: 63.999rem) {
    .menu-ready .header-main .brand {
        position: relative;
        z-index: 102;
        flex: 0 1 auto;
        width: min(60vw, 220px);
    }

    .menu-ready .menu-toggle {
        position: relative;
        z-index: 103;
        display: flex;
        flex: none;
        align-items: center;
        justify-content: center;
        width: 2.75rem;
        height: 2.75rem;
        margin-left: auto;
        padding: 0;
        border: 0;
        background: transparent;
        color: inherit;
        cursor: pointer;
    }

    .menu-toggle span {
        position: absolute;
        width: 1.5rem;
        height: 2px;
        background: currentColor;
        transition: transform 220ms ease, opacity 160ms ease;
    }

    .menu-toggle span:first-child {
        transform: translateY(-0.45rem);
    }

    .menu-toggle span:last-child {
        transform: translateY(0.45rem);
    }

    .menu-open .menu-toggle span:first-child {
        transform: rotate(45deg);
    }

    .menu-open .menu-toggle span:nth-child(2) {
        opacity: 0;
    }

    .menu-open .menu-toggle span:last-child {
        transform: rotate(-45deg);
    }

    .menu-toggle:focus-visible {
        outline: 2px solid var(--link-color);
        outline-offset: 0.15rem;
    }

    .menu-ready .header-navigation {
        position: fixed;
        inset: 0;
        z-index: 100;
        display: flex;
        flex-direction: column;
        justify-content: safe center;
        box-sizing: border-box;
        margin: 0;
        padding: 9rem 1.5rem 2rem;
        overflow-y: auto;
        background-color: #faf9fb;
        background-image: url("paper-grain.svg");
        visibility: hidden;
    }

    .menu-open .header-navigation {
        visibility: visible;
    }

    .menu-ready .header-primary {
        flex: none;
    }

    .menu-ready .header-primary nav {
        flex-direction: column;
        align-items: flex-end;
        gap: 0.8rem;
        width: 100%;
        margin: 0;
        font-size: clamp(1.5rem, 5vw, 2.25rem);
        line-height: 1.2;
    }

    .menu-ready .header-navigation .subnav {
        flex: none;
        width: 100%;
        margin: 1.5rem 0 0;
        padding-top: 1rem;
        border-top: 1px solid #d8d2dc;
    }

    .menu-ready .subnav a {
        font-size: 1rem;
    }

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

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

/* ==========================================================================
Header: Vereinslogo, Bereichstitel, Navigation und Suche
========================================================================== */
.header-main {
    width: var(--layout-wide);
    margin-inline: auto;
}

.header-topline, .section-title {
    display: none;
}

.site-header {
    /* 3rem bei 480px, 3.6rem bei 1280px; berücksichtigt die fließende Basisschrift. */
    --header-logo-size: clamp(3rem, calc(2.470588rem + 1.764706vw), 3.6rem);
    /* Mindestabstand: 1,4 rem entsprechen 28 px bei 1280 px Fensterbreite. */
    --header-brand-gap: clamp(1rem, calc(0.647059rem + 1.176471vw), 1.4rem);
    --header-heading-width: min(75vw, 1200px);
    width: var(--layout-wide);
    margin-inline: auto;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--header-heading-width) minmax(0, 1fr);
    align-items: center;
    row-gap: 1.5rem;
    /* Padding wächst von 480 bis 1280 px und bleibt außerhalb konstant. */
    padding: clamp(1.2rem, calc(.935294rem + .882353vw), 1.5rem) 0
        clamp(1.6rem, calc(.188235rem + 4.705882vw), 3.2rem);
   padding: clamp(1.2rem, calc(.935294rem + .882353vw), 1.5rem) 0
     clamp(1.2rem, calc(.935294rem + .882353vw), 1.5rem);

}

.site-header :is(.header-topline, .header-main) {
    display: contents;
}

.site-header :is(.brand, .stories-home-link) {
    display: none;
}

/* Logo und rechte Bedienelemente folgen Wide, auch bei gedeckelten Breiten. */
.site-header .club-logo {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: start;
    width: var(--header-logo-size);
    height: var(--header-logo-size);
    margin-left: 0;
    transform: translate(-.05rem, .1rem);
    mix-blend-mode: multiply;
}

.club-logo img {
    display: block;
    width: 100%;
    height: 100%;
    mix-blend-mode: normal;
}

.site-header .header-navigation {
    grid-column: 2;
    grid-row: 1;
    margin: 0 0 0 11.35rem;
    padding-right: 3.5rem;
}

.site-header .header-primary {
    justify-content: flex-start;
}

.site-header .header-navigation nav {
    justify-content: flex-start;
    margin-left: 0;
    text-align: left;
    gap: 1.5rem;
}

.site-header .section-title {
    display: flex;
    align-items: center;
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: start;
    align-self: center;
    margin-top: 0;
    /* Headline-Kante, solange der Abstand zum Logo mindestens erhalten bleibt. */
    margin-left: max(
        calc((100% - var(--header-heading-width)) / 2),
        calc(var(--header-logo-size) + var(--header-brand-gap))
    );
    font-family: "Brush Script MT", "Segoe Script", cursive;
    font-style: normal;
    font-weight: 600;
    font-size: 2.25rem;
    line-height: 1.15;
    color: var(--link-color);
    text-shadow: none;
    text-decoration: none;
    transform: none;
    transform-origin: center;
    translate: -3px -1px;
    transition: color var(--link-feedback-duration, 250ms) var(--link-feedback-easing, linear);
}



.site-header .section-title:is(:hover, :focus-visible) {
    color: #000;
}

/* Nur direkt aufgerufene Übersichten (ein Punkt) verwenden die H1-Textfarbe. */
.site-header .header-primary nav a[aria-current="page"],
.site-header .section-title[aria-current="page"] {
    color: #363438;
}

/* Desktop: Punkt kennzeichnet die aktuelle Seite bzw. deren Rubrik. */
@media (min-width: 64rem) {
    .site-header .header-primary nav a,
    .site-header .section-title {
        position: relative;
        text-decoration: none;
    }

    .site-header .header-primary nav a::after,
    .site-header .section-title::after {
        content: "";
        position: absolute;
        left: 50%;
        top: calc(100% + .1rem);
        width: .3rem;
        height: .3rem;
        box-sizing: border-box;
        border: 1px solid var(--link-color);
        border-radius: 50%;
        translate: -50% 0;
        background: var(--link-color);
        opacity: 0;
        transition: opacity var(--link-feedback-duration, 250ms) var(--link-feedback-easing, linear);
    }

    .site-header .section-title::after {
        top: calc(100% - .15rem);
    }

    .site-header .header-primary nav a[aria-current]::after,
    .site-header .section-title[aria-current]::after {
        opacity: 1;
    }

    .site-header .header-primary nav a:not([aria-current]):focus-visible::after,
    .site-header .section-title:not([aria-current]):focus-visible::after {
        opacity: .35;
    }

    @media (hover: hover) {
        .site-header .header-primary nav a:not([aria-current]):hover::after,
        .site-header .section-title:not([aria-current]):hover::after {
            opacity: .35;
        }
    }

    @media (prefers-reduced-motion: reduce) {
        .site-header .header-primary nav a::after,
        .site-header .section-title::after {
            transition: none;
        }
    }

    .site-header .header-primary nav a[aria-current="location"]::after,
    .site-header .section-title[aria-current="location"]::after {
        width: .8rem;
        border: 0;
        border-radius: 0;
        background: radial-gradient(circle closest-side, var(--link-color) 95%, transparent) left center / .3rem .3rem no-repeat,
            radial-gradient(circle closest-side, var(--link-color) 95%, transparent) right center / .3rem .3rem no-repeat;
    }
}

.site-header .header-search-disclosure {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: end;
    position: relative;
    z-index: 95;

}

.header-search-disclosure > summary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    color: var(--link-color);
    cursor: pointer;
    list-style: none;
    font-size: 1.65rem;
}

.header-search-disclosure > summary::-webkit-details-marker {
    display: none;
}

.header-search-close {
    display: none;
    font-size: 2.25rem;
    line-height: 1;
    color: var(--link-color);
    translate: 0 -.12em;
}
.header-search-disclosure[open] > summary .footer-search-icon { display: none; }
.header-search-disclosure[open] > summary .header-search-close { display: block; }

.header-search-disclosure > summary:focus-visible {
    outline: 2px solid var(--link-color);
    outline-offset: 2px;
}

.header-search {
    position: fixed;
    left: 50%;
    top: calc(var(--search-viewport-top, 0px) + var(--search-viewport-height, 100dvh) / 2 - 1rem);
    transform: translate(-50%, -50%);
    z-index: 1;
    box-sizing: border-box;
    width: min(28rem, calc(100vw - 2rem));
    margin: 0;
    background: #faf9fb;
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    gap: .5rem;
}

.header-search,
.site-header .mobile-menu-search {
    box-sizing: border-box;
    padding-inline: .5rem;
}

.header-search {
    padding: .5rem .75rem;
    border: 0;
    border-radius: 3px;
    background: #faf9fb;
    box-shadow: 0 .4rem 1.5rem rgba(45, 35, 50, .14);
}

.header-search-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    cursor: pointer;
    background: rgba(20, 15, 25, .45);
}

.header-search-disclosure[open] > summary {
    position: relative;
    z-index: 0;
}

.header-search-disclosure[open] .header-search { z-index: 2; }

.header-search .footer-search-leading,
.header-search > button[type="submit"] {
    font-size: 1.75rem;
}

.header-search .footer-search-clear {
    font-size: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-search .footer-search-clear[hidden] { display: none; }

.header-search .footer-search-clear span {
    display: block;
    font-size: 1.3em;
    line-height: 1;
    translate: 0 -.09em;
}

.header-search input::placeholder,
.footer-search input::placeholder {
    color: #b3aab8;
    opacity: 1;
}

/* Gemeinsame vertikale Mitte ohne Neupositionierung am Menü-Breakpoint. */
.mobile-menu-search { display: none; }
.site-header .mobile-menu-secondary { display: none; }

.site-header .header-navigation { align-self: center; }
.site-header .header-primary { align-items: center; }
.site-header .header-primary nav { margin-block: 0; }
.site-header .header-search-disclosure { align-self: center; margin-top: 0; }
.site-header .club-logo { align-self: start; }

@media (max-width: 63.999rem) {
    .site-header {
        --header-heading-width: min(100%, 768px);
        /* Schmale Displays: Symbole bleiben neben der unveränderten Wortmarke. */
        --header-control-size: clamp(1.75rem, calc(25vw - 62px), 2.75rem);
    }

    .header-search-disclosure > summary { width: var(--header-control-size); }

    .site-header .menu-toggle {
        grid-column: 1 / -1;
        grid-row: 1;
        justify-self: end;
        width: var(--header-control-size);
        margin-right: -.15rem;
        color: var(--link-color);
    }

    .site-header .header-navigation {
        margin: 0;
        /* Desktop-Grid-Ausrichtung darf das feste Overlay nicht zentrieren. */
        grid-area: auto;
        align-self: stretch;
        justify-self: stretch;
        inset: 0;
        width: 100%;
        height: 100dvh;
        --menu-text-edge: max(
            calc((100vw - 768px) / 2),
            calc((100vw - min(100vw - 2.8rem, 94vw, 1464px)) / 2 + var(--header-logo-size) + var(--header-brand-gap) - 3px)
        );
        padding: calc(var(--header-logo-size) + 4rem) max(1rem, calc((100vw - var(--layout-stage-heading)) / 2)) 2rem var(--menu-text-edge);
        justify-content: flex-start;
        gap: 2rem;
    }

    .site-header .header-search-disclosure {
        display: none;
    }

    .site-header .header-primary nav {
        align-items: flex-start;
    }

    .site-header .header-primary nav a[aria-current],
    .site-header .section-title[aria-current] {
        position: relative;
        text-decoration: none;
    }

    .site-header .header-primary nav a[aria-current]::after,
    .site-header .section-title[aria-current]::after {
        content: "";
        position: absolute;
        left: calc(100% + .5rem);
        top: 50%;
        translate: 0 -50%;
        width: .3rem;
        height: .3rem;
        border-radius: 50%;
        background: var(--link-color);
        pointer-events: none;
    }

    .site-header .section-title[aria-current]::after {
        top: calc(50% + .15rem);
        transform: rotate(1.5deg);
    }

    html:not(.menu-open) .site-header .section-title[aria-current]::after {
        display: none;
    }

    .site-header .header-primary nav a[aria-current="location"]::after,
    .site-header .section-title[aria-current="location"]::after {
        width: .8rem;
        border-radius: 0;
        background: radial-gradient(circle closest-side, var(--link-color) 95%, transparent) left center / .3rem .3rem no-repeat,
            radial-gradient(circle closest-side, var(--link-color) 95%, transparent) right center / .3rem .3rem no-repeat;
    }

    .site-header .mobile-menu-secondary {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: .4rem;
        margin: 0;
    }

    .site-header .mobile-menu-secondary a {
        font-weight: 400;
        font-size: 1rem;
    }

    .site-header .mobile-menu-search {
        display: flex;
        flex-shrink: 0;
        width: var(--layout-stage-heading);
        margin: 0;
        margin-left: calc((100vw - var(--layout-stage-heading)) / 2 - var(--menu-text-edge));
        font-size: clamp(1rem, 2.5vw, 1.4rem);
        gap: .5rem;
    }

    .mobile-menu-search .footer-search-leading,
    .mobile-menu-search > button[type="submit"] {
        font-size: 1.75rem;
    }

    .mobile-menu-search .footer-search-clear {
        font-size: inherit;
    }

    .mobile-menu-search .footer-search-clear span {
        display: block;
        font-size: 1.3em;
        line-height: 1;
    }

    .site-header .menu-toggle span {
        width: 1.8rem;
        height: 3px;
    }

    .site-header :is(.club-logo, .section-title) {
        position: relative;
        z-index: 102;
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-header .section-title {
        transition: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    a { --link-feedback-duration: 0ms; }
}


/* Auch ohne Hover erkennbarer Hinweis zum Schließen der Desktop-Suche. */
.header-search-hint {
    position: absolute;
    top: calc(100% + .6rem);
    left: 0;
    width: 100%;
    color: #fff;
    font-size: .75rem;
    line-height: 1.4;
    text-align: center;
    pointer-events: none;
}
