/*
  Auftritt "matchday" für team-stuttgart.org. Übernommen aus TeamWERK (web/src/matchday.css):
  Barlow + Barlow Condensed Italic, Ink auf Gelb, Fläche und Text gerade, geschert nur was man drückt
  oder ein Ergebnis trägt, keine Rundungen außer Avataren, Grün nie als Dekor.
  Schriften: Resources/Public/Fonts (SIL OFL).
*/
@font-face { font-family: 'Barlow'; font-weight: 400; font-style: normal; font-display: swap; src: url('../Fonts/barlow-400.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 600; font-style: normal; font-display: swap; src: url('../Fonts/barlow-600.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 700; font-style: normal; font-display: swap; src: url('../Fonts/barlow-700.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 600; font-style: italic; font-display: swap; src: url('../Fonts/barlow-condensed-600i.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 800; font-style: italic; font-display: swap; src: url('../Fonts/barlow-condensed-800i.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 900; font-style: italic; font-display: swap; src: url('../Fonts/barlow-condensed-900i.woff2') format('woff2'); }

:root { --md-display: 'Barlow Condensed', Impact, sans-serif; --md-sans: 'Barlow', system-ui, sans-serif; }
body { font-family: var(--md-sans); font-weight: 400; }


/* Startseite "matchday": Ink + Gelb, geschert ist was man drückt, Fläche und Text bleiben gerade.
   Alle Klassen mit md- , damit nichts mit Tailwind oder den Unterseiten kollidiert. */
/* Farben und Flächen nur aus zwei Werten (Ink, Gelb) abgeleitet, wie in TeamWERK: ein Themenwechsel zieht alles mit.
   Grün gibt es hier bewusst nicht (in der App nur Signal für Zusagen). */
:root {
    --md-ink: #181310; --md-yellow: #FDE400; --md-skew: -8deg;
    --md-surface: color-mix(in srgb, var(--md-ink) 5%, #fff);
    --md-hair: color-mix(in srgb, var(--md-ink) 12%, #fff);
    --md-muted: color-mix(in srgb, var(--md-ink) 68%, #fff);
    --md-hover: color-mix(in srgb, var(--md-yellow) 14%, #fff);
}
.md-page { background: var(--md-surface); color: var(--md-ink); font-weight: 400; padding-bottom: 56px; }
.md-wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Kopf */
.md-header { background: var(--md-ink); color: #fff; position: sticky; top: 0; z-index: 50; isolation: isolate; transform: translateZ(0); }
.md-header .md-wrap { display: flex; align-items: center; gap: 28px; height: 72px; }
.md-logo img { width: 52px; height: 52px; border-radius: 9999px; background: #fff; }
/* Menü: Condensed Italic Versalien wie die Buttons; der aktive Punkt ist ein gelbes, geschertes Chip, Hover/geöffnet ein weißer Umriss */
.md-nav { display: flex; gap: 4px; flex: 1; }
.md-nav > li { position: relative; }
.md-nav > li > a { position: relative; isolation: isolate; display: block; padding: 10px 16px; color: #fff; font-family: var(--md-display); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 1.2rem; letter-spacing: .02em; }
.md-nav > li > a::before { content: ''; position: absolute; inset: 6px 0; z-index: -1; transform: skewX(var(--md-skew)); border: 2px solid transparent; }
.md-nav > li:hover > a::before, .md-nav > li:focus-within > a::before { border-color: #fff; }
.md-nav > li > a.is-active { color: var(--md-ink); }
.md-nav > li > a.is-active::before { background: var(--md-yellow); border-color: var(--md-yellow); }
.md-dd { display: none; position: absolute; left: 0; top: calc(100% + 2px); min-width: 240px; background: #fff; color: var(--md-ink); border: 1px solid var(--md-hair); border-top: 4px solid var(--md-yellow); z-index: 10; padding: 6px 0; }
.md-nav > li:hover > .md-dd, .md-nav > li:focus-within > .md-dd { display: block; }
.md-dd a { display: block; padding: 11px 20px; font-family: var(--md-display); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 1.15rem; white-space: nowrap; }
.md-dd a:hover { background: var(--md-yellow); }
.md-dd li { position: relative; }
.md-dd .md-dd2 { display: none; position: absolute; left: 100%; top: -10px; min-width: 240px; background: #fff; border: 1px solid var(--md-hair); border-top: 4px solid var(--md-yellow); padding: 6px 0; }
.md-dd li:hover > .md-dd2, .md-dd li:focus-within > .md-dd2 { display: block; }
.md-burger { display: none; margin-left: auto; font-size: 28px; line-height: 1; background: none; border: 0; color: #fff; cursor: pointer; padding: 8px; }

/* geschert: Buttons und Stempel */
.md-skew { --_bg: var(--md-yellow); --_fg: var(--md-ink); --_bg-h: var(--md-ink); --_fg-h: var(--md-yellow);
    position: relative; isolation: isolate; display: inline-block; min-height: 44px; padding: 10px 22px; font-weight: 900; text-transform: uppercase; letter-spacing: .02em; color: var(--_fg); }
.md-skew::before { content: ''; position: absolute; inset: 0; z-index: -1; transform: skewX(var(--md-skew)); background: var(--_bg); border: 2px solid var(--md-ink); }
.md-skew:hover { color: var(--_fg-h); }
.md-skew:hover::before { background: var(--_bg-h); }
.md-skew.is-dark { --_bg: var(--md-ink); --_fg: #fff; }
:where(a, button, [tabindex]):focus-visible { outline: 3px solid var(--md-ink); outline-offset: 3px; }
.md-header :focus-visible, .md-footer :focus-visible, .md-strip :focus-visible { outline-color: var(--md-yellow); }
.md-dd :focus-visible { outline-color: var(--md-ink); outline-offset: -3px; }

/* Hero */
/* Hero und Seitenkopf bilden einen eigenen Stapel (z-index 0): das 3D-transformierte Spielfeld darf auf iOS nicht über den Kopf mit dem offenen Menü malen */
.md-hero { background: var(--md-yellow); position: relative; overflow: hidden; isolation: isolate; z-index: 0; }
.md-court { position: absolute; left: -40px; top: -60px; color: var(--md-ink); opacity: .4; pointer-events: none;
    transform: perspective(800px) rotateX(48deg) rotateZ(-8deg) scale(1.25); transform-origin: 40% 60%;
    -webkit-mask-image: linear-gradient(to top, #000 55%, transparent 100%); mask-image: linear-gradient(to top, #000 55%, transparent 100%); }
.md-court .md-court-svg { display: block; width: 860px; height: 460px; overflow: visible; }
.md-hero .md-wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); min-height: 440px; align-items: center; }
.md-hero h1 { font-size: clamp(2rem, 7vw, 4rem); line-height: .98; font-weight: 900; font-style: italic; text-transform: uppercase; margin: 0 0 16px; }
.md-hero p { font-size: 1.25rem; max-width: 30ch; margin: 0 0 28px; font-weight: 500; }
.md-photo { height: 100%; min-height: 440px; clip-path: polygon(18% 0, 100% 0, 100% 100%, 0 100%); margin-right: -24px; }
.md-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }

/* Ergebnisleiste */
.md-strip { background: var(--md-ink); color: #fff; }
.md-strip .md-wrap { display: flex; align-items: center; gap: 20px; padding-top: 18px; padding-bottom: 18px; }
.md-strip h2 { margin: 0; font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; color: var(--md-yellow); width: 90px; flex: none; font-weight: 700; }
.md-results { display: flex; gap: 12px; flex: 1; }
.md-res { flex: 1; min-width: 0; border-left: 4px solid var(--md-yellow); padding: 2px 0 2px 12px; }
.md-res { position: relative; }
.md-res .md-pill { position: absolute; top: 0; right: 0; margin: 0; padding: 0 8px; font-size: .75rem; line-height: 1.4; color: var(--md-ink); }
.md-res small { display: block; color: #bbb; font-size: .8rem; }
.md-res b { font-size: 1.5rem; font-weight: 900; font-style: italic; display: block; line-height: 1.1; }
.md-res span { font-size: .95rem; line-height: 1.2; display: block; }
.md-nb { white-space: nowrap; }

/* Abschnitte */
.md-section { padding: 56px 0 8px; }
.md-title { font-size: clamp(1.75rem, 5vw, 2.5rem); font-weight: 900; font-style: italic; text-transform: uppercase; margin: 0; line-height: 1; }
.md-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 8px 16px; margin-bottom: 24px; }
.md-head a { display: inline-block; padding: 10px 0; font-weight: 800; white-space: nowrap; text-decoration: underline; text-decoration-color: var(--md-yellow); text-decoration-thickness: 4px; text-underline-offset: 5px; }
.md-sub { margin: -8px 0 20px; color: var(--md-muted); font-size: .95rem; }

/* Spiele der Woche */
.md-games { display: grid; gap: 14px; }
.md-game { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; background: #fff; border: 1px solid var(--md-hair); align-items: stretch; }
.md-game:hover { border-color: var(--md-ink); }
.md-date, .md-news-date { width: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--md-yellow); color: var(--md-ink); border: 2px solid var(--md-ink); text-align: center; line-height: 1.05; padding: 5px 0; font-size: .8125rem; font-weight: 700; }
.md-date { margin: 12px 0 12px 12px; align-self: start; }
.md-date b, .md-news-date b { font-size: 1.15rem; font-weight: 900; }
.md-game.is-done .md-date { background: var(--md-surface); }
.md-game-info { padding: 12px 18px 12px 14px; min-width: 0; }
.md-game-info small { color: var(--md-muted); font-weight: 600; display: block; }
.md-teams { font-size: 1.25rem; line-height: 1.25; margin: 2px 0; font-weight: 400; }
.md-teams b { font-weight: 800; }
.md-teams i { color: var(--md-muted); font-style: normal; padding: 0 6px; }
.md-live { display: inline-block; margin-top: 4px; font-weight: 800; font-size: .875rem; color: var(--md-ink); border-bottom: 3px solid var(--md-yellow); text-decoration: none; }
.md-live:hover { background: var(--md-yellow); }
.md-score { background: var(--md-ink); color: #fff; font-weight: 900; font-style: italic; font-size: 1.75rem; display: flex; align-items: center; justify-content: center; padding: 0 26px; min-width: 120px; }
.md-score.is-upcoming { background: #fff; color: var(--md-ink); font-style: normal; font-size: 1.5rem; border-left: 2px solid var(--md-ink); flex-direction: column; gap: 0; }
.md-score.is-upcoming small { font-size: .75rem; font-weight: 700; color: var(--md-muted); }
.md-empty { background: #fff; border: 1px solid var(--md-hair); padding: 20px 24px; }

/* Karten */
.md-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.md-card { display: block; background: #fff; border: 1px solid var(--md-hair); position: relative; color: inherit; text-decoration: none; }
.md-card:hover { border-color: var(--md-ink); background: var(--md-hover); }
.md-im { aspect-ratio: 16 / 9; background: #ccc; overflow: hidden; position: relative; }
.md-im img { width: 100%; height: 100%; object-fit: cover; display: block; }
.md-card-body { padding: 16px 18px 20px; }
.md-meta { font-size: .9rem; color: var(--md-muted); font-weight: 600; }
.md-card h3 { margin: 6px 0; font-size: 1.2rem; line-height: 1.2; font-weight: 800; }
.md-card p { margin: 0; color: #333; }
.md-imwrap { position: relative; }
.md-stamp { position: absolute; right: 14px; bottom: -22px; isolation: isolate; padding: 4px 14px; font-weight: 900; font-style: italic; font-size: 1.5rem; color: var(--md-ink); }
.md-stamp::before { content: ''; position: absolute; inset: 0; z-index: -1; transform: skewX(var(--md-skew)); background: var(--md-yellow); border: 2px solid var(--md-ink); }
.md-news { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; }
.md-news-side { display: flex; flex-direction: column; gap: 24px; }
.md-news-small { display: grid; grid-template-columns: 150px minmax(0, 1fr); flex: 1; }
.md-news-small .md-im { aspect-ratio: auto; height: 100%; min-height: 130px; }
.md-news-date { position: absolute; left: 12px; top: 12px; }
.md-news-date small { display: block; font-size: .75rem; font-weight: 700; }

/* Mannschaften */
.md-teams-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.md-team { --_bg: var(--md-yellow); --_fg: var(--md-ink); position: relative; isolation: isolate; display: block; padding: 18px 22px; font-weight: 900; font-size: 1.15rem; color: var(--_fg); text-decoration: none; }
.md-team::before { content: ''; position: absolute; inset: 0; z-index: -1; transform: skewX(var(--md-skew)); background: var(--_bg); border: 2px solid var(--md-ink); }
.md-panel-box { background: #fff; border: 1px solid var(--md-hair); padding: 24px 28px; }
/* Hervorhebung beim Überfahren: gelb wird Ink mit gelber Schrift, Ink (weiße Schrift) wird invertiert: weiß mit Ink-Schrift und Ink-Rand */
.md-team:hover { --_fg: var(--md-yellow); }
.md-team:hover::before { background: var(--md-ink); }
.md-team:nth-child(even):hover { --_fg: var(--md-ink); }
.md-team:nth-child(even):hover::before { background: #fff; }
.md-team:nth-child(even) { --_bg: var(--md-ink); --_fg: #fff; }

/* Partner */
.md-partners { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.md-partner { background: #fff; border: 1px solid var(--md-hair); height: 90px; display: flex; align-items: center; justify-content: center; padding: 14px; }
.md-partner img { max-width: 100%; max-height: 100%; filter: grayscale(1); object-fit: contain; }
.md-partner:hover img { filter: none; }
.md-partner:hover { border-color: var(--md-ink); }

/* Fuß */
.md-footer { background: var(--md-ink); color: #fff; position: relative; overflow: hidden; }
.md-footer .md-court-f { position: absolute; right: -60px; bottom: -250px; color: var(--md-yellow); opacity: .16; transform: scaleX(-1); pointer-events: none; }
.md-footer .md-court-f .md-court-svg { display: block; width: 520px; height: 598px; overflow: visible; }
.md-footer .md-wrap { position: relative; padding-top: 44px; padding-bottom: 44px; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.md-footer h4 { font-family: var(--md-sans); font-style: normal; margin: 0 0 8px; color: var(--md-yellow); text-transform: uppercase; font-size: .9rem; letter-spacing: .08em; font-weight: 700; }
.md-footer a { display: flex; align-items: center; min-height: 44px; }
.md-footer a:hover { color: var(--md-yellow); }
.md-social { display: flex; gap: 16px; margin-top: 12px; font-size: 1.4rem; }
.md-social a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; }

@media (max-width: 900px) {
    .md-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--md-ink); color: #fff; flex-direction: column; gap: 0; padding: 12px 24px 20px; border-bottom: 4px solid var(--md-yellow); max-height: calc(100vh - 60px); overflow-y: auto; }
    .md-header.is-open .md-nav { display: flex; }
    .md-nav { overscroll-behavior: contain; }
    /* Offenes Menü: die Seite dahinter scrollt nicht mit (sonst rutscht der Inhalt unter das Menü) */
    html.md-lock, html.md-lock body { overflow: hidden; }
    .md-nav > li > a { font-size: 1.6rem; padding: 8px 0; }
    .md-nav > li > a::before { inset: 4px -12px; }
    /* Handy: Untermenü nur beim aktiven Hauptpunkt, ohne die Teams je Saison (die zeigt die Seite selbst) */
    .md-dd, .md-dd .md-dd2 { display: none; position: static; border: 0; padding: 0 0 6px 16px; background: transparent; color: #fff; min-width: 0; }
    .md-nav > li > a.is-active + .md-dd,
    .md-nav > li:hover > a.is-active + .md-dd,
    .md-nav > li:focus-within > a.is-active + .md-dd { display: block; }
    .md-dd li:hover > .md-dd2, .md-dd li:focus-within > .md-dd2 { display: none; }
    .md-dd a { padding: 8px 0; font-size: 1.2rem; white-space: normal; }
    .md-dd a:hover { background: transparent; color: var(--md-yellow); }
    .md-burger { display: block; }
    .md-header .md-wrap { height: 60px; }
    .md-logo img { width: 42px; height: 42px; }
    .md-hero .md-wrap { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-top: 28px; }
    .md-photo { min-height: 200px; height: 200px; margin: 28px -24px 0; clip-path: polygon(0 18%, 100% 0, 100% 100%, 0 100%); }
    .md-hero p { font-size: 1.1rem; }
    .md-court { left: -10px; top: -215px; opacity: .5; transform: perspective(520px) rotateX(42deg) rotateZ(-6deg) scale(.8); transform-origin: 0 100%; }
    .md-strip .md-wrap { flex-direction: column; align-items: stretch; gap: 10px; }
    .md-results { flex-direction: column; }
    .md-res { display: flex; align-items: flex-start; gap: 12px; }
    .md-res .md-pill { position: static; order: 3; flex: none; margin-left: auto; }
    .md-res span { flex: 1; min-width: 0; padding-top: 4px; }
    .md-res small { width: 44px; flex: none; }
    .md-res b { font-size: 1.3rem; width: 70px; flex: none; }
    .md-cards, .md-news, .md-teams-grid { grid-template-columns: minmax(0, 1fr); }
    .md-partners { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .md-news-small { grid-template-columns: 110px minmax(0, 1fr); }
    .md-game { grid-template-columns: 64px minmax(0, 1fr); }
    .md-score { grid-column: 1 / -1; padding: 8px; font-size: 1.4rem; min-width: 0; }
    .md-score.is-upcoming { border-left: 0; border-top: 2px solid var(--md-ink); flex-direction: row; justify-content: flex-start; gap: 8px; padding-left: 80px; }
    .md-teams { font-size: 1.05rem; }
    .md-footer .md-wrap { grid-template-columns: minmax(0, 1fr); }
    .md-footer .md-court-f { right: -200px; bottom: -330px; }
    .md-section { padding-top: 40px; }
}
@media (prefers-reduced-motion: no-preference) { .md-card, .md-skew { transition: background-color .15s; } }

/* ================= Schrift-Rollen: Display = Condensed Italic Uppercase ================= */
.md-hero h1, .md-title, .md-res b, .md-score, .md-stamp, .md-skew, .md-team, .md-date b, .md-news-date, .md-pagehead h1,
.md-card h3, .md-page-num, .md-chip, .md-prose h2, .md-prose h3, .md-prose h4, .md-block-title, .md-match-score, .md-trainer h3 {
    font-family: var(--md-display); font-style: italic; text-transform: uppercase; letter-spacing: -.005em;
}
.md-hero h1 { font-size: clamp(2.5rem, 10vw, 5.25rem); line-height: .92; }
.md-title { font-size: clamp(2rem, 7vw, 3.25rem); }
.md-card h3 { font-size: 1.45rem; line-height: 1.05; font-weight: 800; }
.md-news-first h3 { font-size: 2rem; }
.md-skew, .md-team { font-weight: 800; letter-spacing: .02em; }
.md-skew { font-size: 1.2rem; }
.md-team { font-size: 1.5rem; }
.md-res b { font-size: 1.75rem; }
.md-score { font-size: 2.1rem; }
.md-stamp { font-size: 1.75rem; }
.md-teams { font-size: 1.35rem; }

/* ================= Unterseiten: Seitenkopf ================= */
.md-pagehead { background: var(--md-yellow); color: var(--md-ink); position: relative; overflow: hidden; isolation: isolate; z-index: 0; padding-bottom: 18px; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 18px), 0 100%); }
.md-pagehead .md-court { left: auto; right: -40px; top: -20px; opacity: .5; transform: perspective(700px) rotateX(55deg) rotateZ(-8deg) scale(.95); transform-origin: 50% 50%; -webkit-mask-image: none; mask-image: none; }
.md-pagehead .md-wrap { position: relative; padding-top: 28px; padding-bottom: 36px; }
.md-crumbs { font-size: .9rem; font-weight: 600; margin-bottom: 14px; }
.md-crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; margin: 0; padding: 0; list-style: none; }
.md-crumbs li + li::before { content: '/'; padding-right: 8px; opacity: .6; }
.md-crumbs a { display: inline-block; padding: 10px 0; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.md-pagehead h1 { font-size: clamp(1.65rem, 7.2vw, 3.75rem); line-height: .95; font-weight: 900; margin: 0; max-width: 26ch; hyphens: auto; -webkit-hyphens: auto; }
.md-pagehead .md-lead { margin: 12px 0 0; font-size: 1.2rem; font-weight: 600; max-width: 46ch; }
.md-overline { font-family: var(--md-display); font-style: italic; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; font-size: .95rem; margin-bottom: 8px; }
.md-main { max-width: 1200px; margin: 0 auto; padding: 40px 24px 16px; }
.md-main.is-narrow { max-width: 860px; }
.md-lead-image { margin: 0 0 32px; border: 1px solid var(--md-hair); background: #ccc; aspect-ratio: 16 / 7; overflow: hidden; }
.md-lead-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Season-Chips (geschert: man drückt sie) */
.md-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 28px; padding: 0; list-style: none; }
.md-chip { display: inline-block; position: relative; isolation: isolate; padding: 8px 18px; font-weight: 800; font-size: 1.1rem; color: var(--md-ink); min-height: 44px; display: inline-flex; align-items: center; }
.md-chip::before { content: ''; position: absolute; inset: 0; z-index: -1; transform: skewX(-8deg); background: #fff; border: 2px solid var(--md-ink); }
.md-chip.is-on::before, .md-chip:hover::before { background: var(--md-yellow); }

/* ================= Text (Redaktionsinhalt) ================= */
.md-block { background: #fff; border: 1px solid var(--md-hair); padding: 28px 32px; margin-bottom: 24px; }
.md-block--text { max-width: 800px; }
.md-block-title { font-size: clamp(1.6rem, 4vw, 2.1rem); font-weight: 900; line-height: 1; margin: 0 0 16px; }
.md-prose { font-size: 1.125rem; line-height: 1.65; max-width: 72ch; }
.md-prose.is-wide { max-width: none; }
.md-prose > * + * { margin-top: 1em; }
.md-prose h2 { font-size: 2rem; font-weight: 900; line-height: 1; margin-top: 1.6em; }
.md-prose h3 { font-size: 1.5rem; font-weight: 800; line-height: 1.05; margin-top: 1.4em; }
.md-prose h4 { font-size: 1.2rem; font-weight: 800; margin-top: 1.2em; }
.md-prose a { text-decoration: underline; text-decoration-color: var(--md-yellow); text-decoration-thickness: 4px; text-underline-offset: 3px; font-weight: 600; }
.md-prose a:hover { background: var(--md-yellow); text-decoration-color: var(--md-ink); }
.md-prose ul, .md-prose ol { padding-left: 1.4em; }
.md-prose ul { list-style: square; }
.md-prose ol { list-style: decimal; }
.md-prose li + li { margin-top: .3em; }
.md-prose blockquote { border-left: 6px solid var(--md-yellow); padding: 4px 0 4px 18px; font-weight: 600; }
.md-prose table { border-collapse: collapse; width: 100%; font-size: 1rem; }
.md-prose th { background: var(--md-ink); color: #fff; text-align: left; padding: 8px 12px; font-family: var(--md-display); font-style: italic; text-transform: uppercase; }
.md-prose td { border-bottom: 1px solid var(--md-hair); padding: 8px 12px; }
.md-prose img { max-width: 100%; height: auto; border: 1px solid var(--md-hair); }
.md-prose iframe { max-width: 100%; border: 1px solid var(--md-hair); }
.md-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.md-figure { margin: 0; }
.md-figure img { width: 100%; height: auto; display: block; border: 1px solid var(--md-hair); }
.md-figure figcaption { font-size: .95rem; color: var(--md-muted); margin-top: 6px; }
.md-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.md-gallery-item { aspect-ratio: 1; overflow: hidden; border: 1px solid var(--md-hair); background: #ccc; cursor: zoom-in; }
.md-gallery-item:hover { border-color: var(--md-ink); }
.md-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.md-gallery-item:hover img { transform: scale(1.04); }
.md-files a { display: block; font-weight: 600; text-decoration: underline; text-decoration-color: var(--md-yellow); text-decoration-thickness: 3px; }
/* Raw-HTML (Embeds/Widgets): nur Abstand */
.md-embed { background: #fff; border: 1px solid var(--md-hair); padding: 20px; margin-bottom: 24px; overflow-x: auto; }

/* ================= Karten (Unterseiten) ================= */
.md-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-bottom: 40px; }
.md-grid.is-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.md-grid.is-1 { grid-template-columns: minmax(0, 1fr); }
.md-list { display: flex; flex-direction: column; gap: 24px; margin-bottom: 40px; }
.md-more { display: inline-flex; margin-top: 8px; padding: 10px 0; font-weight: 800; text-decoration: underline; text-decoration-color: var(--md-yellow); text-decoration-thickness: 4px; text-underline-offset: 5px; }
.md-card .md-more { margin-top: 12px; }
.md-news-row { display: grid; grid-template-columns: 38% minmax(0, 1fr); }
.md-news-row .md-im { aspect-ratio: auto; height: 100%; min-height: 200px; }
.md-news-row .md-card-body { padding: 24px 28px; display: flex; flex-direction: column; justify-content: center; }
.md-team-card .md-card-body { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.md-team-card h3 { margin: 0; }
.md-arrow { font-family: var(--md-display); font-weight: 900; font-size: 1.6rem; flex: none; }
.md-pill { display: inline-block; background: var(--md-yellow); border: 2px solid var(--md-ink); padding: 0 10px; font-size: .85rem; font-weight: 700; margin-left: 8px; }

/* Partner-Karten */
.md-partner-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--md-hair); color: inherit; text-decoration: none; }
.md-partner-logo { aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; padding: 20px; background: #fff; border-bottom: 1px solid var(--md-hair); }
.md-partner-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.md-partner-card .md-card-body { text-align: center; font-weight: 700; flex: 1; }
a.md-partner-card:hover { border-color: var(--md-ink); background: var(--md-hover); }

/* Personen (Trainer) */
.md-people { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-bottom: 40px; }
.md-people-title { font-family: var(--md-display); font-style: italic; text-transform: uppercase; font-weight: 800; font-size: 1.5rem; margin: 0 0 14px; }
.md-trainer { background: #fff; border: 1px solid var(--md-hair); padding: 18px 14px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.md-trainer img { width: 160px; height: 160px; border-radius: 9999px; object-fit: cover; border: 3px solid var(--md-yellow); background: #eee; }
.md-trainer h3 { font-size: 1.3rem; font-weight: 800; line-height: 1.05; margin: 12px 0 0; }
.md-trainer p { margin: 4px 0 0; font-weight: 600; }
.md-trainer a { margin-top: 4px; font-size: .95rem; word-break: break-all; text-decoration: underline; text-decoration-color: var(--md-yellow); text-decoration-thickness: 3px; }
.md-trainer .md-prose { font-size: .95rem; line-height: 1.4; }

/* Spielbericht-Kopf */
.md-match { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; }
.md-match-score { position: relative; isolation: isolate; display: inline-block; padding: 6px 26px; font-weight: 900; font-size: clamp(3rem, 12vw, 5.5rem); line-height: 1; color: var(--md-yellow); }
.md-match-score::before { content: ''; position: absolute; inset: 0; z-index: -1; transform: skewX(var(--md-skew)); background: var(--md-ink); border: 2px solid var(--md-ink); }
.md-match-half { font-weight: 700; font-size: 1.05rem; }
.md-match-meta { font-size: 1.05rem; font-weight: 600; }

/* Seitennavigation (Blättern) */
.md-pager { display: flex; justify-content: center; align-items: center; gap: 10px; margin: 8px 0 40px; flex-wrap: wrap; }
.md-page-num { position: relative; isolation: isolate; min-width: 48px; height: 48px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.2rem; color: var(--md-ink); }
.md-page-num::before { content: ''; position: absolute; inset: 0; z-index: -1; transform: skewX(-8deg); background: #fff; border: 2px solid var(--md-ink); }
a.md-page-num:hover::before { background: var(--md-yellow); }
.md-page-num.is-current { color: var(--md-yellow); }
.md-page-num.is-current::before { background: var(--md-ink); }
.md-page-num.is-off { opacity: .35; }

@media (max-width: 900px) {
    .md-pagehead .md-court { right: -330px; top: -60px; }
    .md-pagehead .md-wrap { padding-top: 20px; padding-bottom: 28px; }
    .md-main { padding: 28px 24px 8px; }
    .md-block { padding: 20px 18px; }
    .md-panel-box { padding: 16px 18px; }
    .md-cols { grid-template-columns: minmax(0, 1fr); }
    .md-grid, .md-grid.is-2 { grid-template-columns: minmax(0, 1fr); }
    .md-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md-people { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md-news-row { grid-template-columns: minmax(0, 1fr); }
    .md-news-row .md-im { aspect-ratio: 16 / 9; min-height: 0; }
    .md-news-row .md-card-body { padding: 16px 18px 20px; }
    .md-prose { font-size: 1.0625rem; }
}

/* Lange Wörter und breite Inhalte dürfen die Seite nicht verbreitern (sonst wird sie am Handy rechts abgeschnitten) */
.md-pagehead h1, .md-card h3, .md-hero h1, .md-block-title, .md-teams, .md-meta, .md-prose { overflow-wrap: anywhere; }
.md-prose table { display: block; overflow-x: auto; max-width: 100%; }
.md-prose pre { overflow-x: auto; max-width: 100%; }
.md-main, .md-page { min-width: 0; }
