/* Mediathek – dunkle Oberfläche, damit die Fotos wirken. Thema ADAC Motorsport (21.10.2026):
   Gelb #FFCC00 auf Schwarz, Überschriften 900 kursiv, schräge Flächen (-17°), Doppelpfeile.
   CI-Werte von adac-motorsport.de abgelesen, nicht aus dem Styleguide; Einzelheiten in entwurf-adac/LIESMICH.md.
   Schrift: „ADAC Sans“, falls installiert/lizenziert, sonst Barlow (selbst ausgeliefert, OFL). */
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/barlow-400.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/barlow-500.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/barlow-600.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/barlow-700.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-style: italic; font-weight: 800; font-display: swap; src: url(/fonts/barlow-800-kursiv.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-style: italic; font-weight: 900; font-display: swap; src: url(/fonts/barlow-900-kursiv.woff2) format("woff2"); }
:root {
  --bg: #0b0b0b; --panel: #141414; --panel-2: #1f1f1f; --line: #2a2a2a; --line-2: #3a3a3a;
  --fg: #f2f2f2; --muted: #a8a8a8; --faint: #8c8c8c;
  --accent: #FFCC00; --accent-ink: #000000; --accent-soft: rgba(255,204,0,.13);
  --ok: #3ecf8e; --danger: #ff6b6b;
  --radius: 0px; --side: 280px; --top: 64px; --schraeg: -17deg;
  --font: "ADAC Sans", "ADACSans", "Barlow", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--fg); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.boot { display: grid; place-items: center; height: 100vh; color: var(--muted); }
.muted { color: var(--muted); } .faint { color: var(--faint); } .num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

/* Buttons & Felder */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line-2);
  background: var(--panel-2); font-weight: 600; white-space: nowrap; transition: background .12s, border-color .12s; text-decoration: none; }
.btn:hover { border-color: #4a505d; background: #232731; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: #ff7d36; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--fg); background: var(--panel-2); }
.btn.danger { color: var(--danger); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.input, select.input, textarea.input { width: 100%; height: 40px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg); }
textarea.input { height: 80px; padding: 10px 12px; resize: vertical; }
.input:focus { border-color: var(--accent); outline: none; }
.check { display: flex; gap: 8px; align-items: center; }

/* Grundgerüst */
.shell { display: grid; grid-template-columns: var(--side) 1fr; grid-template-rows: var(--top) 1fr; height: 100vh; }
.top { grid-column: 1 / -1; display: flex; align-items: center; gap: 18px; padding: 0 18px; border-bottom: 1px solid var(--line); background: var(--panel); }
.brand { display: flex; align-items: center; gap: 10px; width: calc(var(--side) - 36px); font-weight: 750; letter-spacing: -.01em; text-decoration: none; flex: none; }
.brand img { width: 28px; height: 28px; }
.search { flex: 1; max-width: 760px; position: relative; }
.search input { width: 100%; height: 42px; padding: 0 16px 0 42px; border-radius: 21px; border: 1px solid var(--line-2); background: var(--bg); font-size: 15px; }
.search input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 4px var(--accent-soft); }
.search svg { position: absolute; left: 14px; top: 12px; width: 18px; height: 18px; color: var(--faint); }
.top .spacer { flex: 1; }
.usermenu { position: relative; }
.menu { position: absolute; right: 0; top: 44px; min-width: 220px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 6px; z-index: 50; box-shadow: 0 18px 50px rgba(0,0,0,.5); }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 6px; border: 0; background: none; text-decoration: none; }
.menu a:hover, .menu button:hover { background: #2a2e37; }
.menu .who { padding: 8px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }

.side { overflow-y: auto; border-right: 1px solid var(--line); background: var(--panel); padding: 14px 14px 40px; }
.side h3 { margin: 18px 6px 8px; font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); display: flex; justify-content: space-between; align-items: center; }
.side h3 button { border: 0; background: none; color: var(--muted); font-size: 18px; line-height: 1; padding: 0 4px; }
.facet { display: grid; gap: 1px; }
.facet button, .navlink { display: flex; justify-content: space-between; gap: 10px; align-items: center; width: 100%; padding: 6px 8px; border-radius: 6px; border: 0; background: none; text-align: left; text-decoration: none; color: var(--fg); }
.facet button:hover, .navlink:hover { background: var(--panel-2); }
.facet button .n { color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.facet button.on, .navlink.on { background: var(--accent-soft); color: #ffd2b8; }
.facet button.on .n { color: #ffb48a; }
.facet .more { color: var(--muted); font-size: 12px; }
.facet.zweizeilig button { align-items: flex-start; padding-top: 7px; padding-bottom: 7px; }
.facet.zweizeilig small { display: block; margin-top: 1px; font-size: 12px; color: var(--muted); font-weight: 400; }
.facet.zweizeilig button.on small { color: inherit; opacity: .8; }
.years { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 6px; }
.years :is(button, a) { border: 1px solid var(--line-2); background: var(--bg); border-radius: 14px; padding: 3px 10px; font-size: 12px; font-variant-numeric: tabular-nums; }
.years :is(button, a).on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.years :is(button, a) .n { color: var(--faint); margin-left: 4px; }
.years :is(button, a).on .n { color: var(--accent-ink); opacity: .7; }

.main { overflow-y: auto; position: relative; }
.bar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 22px; background: rgba(15,16,19,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.bar .count { font-size: 15px; font-weight: 650; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line-2); font-size: 12px; }
.chip button { border: 0; background: none; color: var(--muted); width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; }
.chip button:hover { background: #3a3f4b; color: var(--fg); }
.zoom { width: 110px; accent-color: var(--accent); }

.pagehead { padding: 22px 22px 4px; display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.pagehead h1 { margin: 0; font-size: 24px; letter-spacing: -.02em; }
.pagehead p { margin: 4px 0 0; color: var(--muted); max-width: 70ch; }
.pagehead .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* Bildraster */
.grid { --cell: 240px; display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--cell), 1fr)); gap: 10px; padding: 16px 22px 120px; }
.tile { position: relative; aspect-ratio: 3 / 2; border-radius: 8px; overflow: hidden; background: var(--panel-2); cursor: zoom-in; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease, opacity .3s; opacity: 0; }
.tile img.loaded { opacity: 1; }
/* Hochformat im Querformat-Raster: Ausschnitt im oberen Drittel (Köpfe), nicht in der Mitte */
.tile.hoch img { object-position: 50% 22%; }
.tile:hover img { transform: scale(1.025); }
.tile .cap { position: absolute; inset: auto 0 0 0; padding: 26px 10px 8px; font-size: 12px; line-height: 1.35; background: linear-gradient(transparent, rgba(0,0,0,.85));
  opacity: 0; transition: opacity .15s; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; pointer-events: none; }
.tile:hover .cap { opacity: 1; }
.tile .sel { position: absolute; top: 8px; left: 8px; width: 24px; height: 24px; border-radius: 6px; border: 2px solid rgba(255,255,255,.8); background: rgba(0,0,0,.35);
  display: grid; place-items: center; opacity: 0; transition: opacity .12s; cursor: pointer; }
.tile:hover .sel, .grid.selecting .tile .sel { opacity: 1; }
/* Video-Kennzeichen mit Laufzeit, oben rechts */
.tile .vid { position: absolute; top: 8px; right: 8px; padding: 3px 8px; font-size: 12px; font-weight: 700; line-height: 1.3; color: #000; background: var(--accent); pointer-events: none; }
.tile.selected { outline: 3px solid var(--accent); outline-offset: -3px; }
.tile.selected .sel { opacity: 1; background: var(--accent); border-color: var(--accent); }
.tile.selected .sel::after { content: ""; width: 10px; height: 6px; border: 2px solid var(--accent-ink); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px,-1px); }
.empty { padding: 80px 22px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--fg); font-size: 17px; margin-bottom: 6px; }
.loader { padding: 30px; text-align: center; color: var(--faint); }

/* Auswahl-Leiste */
.selbar { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 18px; border-radius: 14px;
  background: var(--panel-2); border: 1px solid var(--line-2); box-shadow: 0 20px 60px rgba(0,0,0,.6); z-index: 40; }
.selbar .n { font-weight: 700; margin-right: 8px; }

/* Großansicht */
.lb { position: fixed; inset: 0; z-index: 60; display: grid; grid-template-columns: 1fr 380px; background: #07080a; }
.lb .stage { position: relative; display: grid; place-items: center; min-width: 0; min-height: 0; padding: 24px; }
.lb .stage img, .lb .stage video { max-width: 100%; max-height: calc(100vh - 48px); object-fit: contain; box-shadow: 0 10px 40px rgba(0,0,0,.6); }
.lb .stage video { background: #000; width: 100%; }
.lb .nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 64px; border: 0; border-radius: 10px; background: rgba(255,255,255,.06); color: #fff; font-size: 26px; }
.lb .nav:hover { background: rgba(255,255,255,.14); }
.lb .prev { left: 14px; } .lb .next { right: 14px; }
.lb .close { position: absolute; top: 14px; left: 14px; }
.lb .info { overflow-y: auto; border-left: 1px solid var(--line); background: var(--panel); padding: 22px; }
.lb h2 { font-size: 17px; margin: 0 0 8px; letter-spacing: -.01em; }
.lb .caption { color: #d5d9e0; margin: 0 0 18px; white-space: pre-line; }
.meta { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; margin: 0 0 18px; font-size: 13px; }
.meta dt { color: var(--faint); } .meta dd { margin: 0; word-break: break-word; }
.meta dd a { color: var(--fg); text-decoration-color: var(--line-2); }
.kw { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.kw button { border: 1px solid var(--line-2); background: var(--bg); border-radius: 12px; padding: 2px 9px; font-size: 12px; color: var(--muted); }
.kw button:hover { color: var(--fg); border-color: #4a505d; }
.lb .dl { display: grid; gap: 8px; margin-bottom: 18px; }
.lb .dl .btn { justify-content: space-between; height: 42px; }
.lb .counter { font-size: 12px; color: var(--faint); margin-bottom: 10px; }

/* Dialoge */
.modal-bg { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.6); display: grid; place-items: center; padding: 16px; }
.modal { width: min(520px, 100%); max-height: 90vh; overflow-y: auto; background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px; padding: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.modal h2 { margin: 0 0 16px; font-size: 18px; }
.modal .row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }
.list { display: grid; gap: 4px; max-height: 300px; overflow-y: auto; margin: 0 0 12px; }
.list button { display: flex; justify-content: space-between; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); text-align: left; }
.list button:hover { border-color: var(--accent); }
.linkrow { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; font-size: 13px; }
.linkrow code { font-family: var(--mono); font-size: 12px; word-break: break-all; color: #ffd2b8; }

/* Anmeldung */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(1200px 600px at 70% -10%, rgba(255,107,26,.12), transparent 60%), var(--bg); }
.auth .card { width: min(400px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 30px; }
.auth h1 { margin: 0 0 4px; font-size: 22px; letter-spacing: -.02em; display: flex; gap: 10px; align-items: center; }
.auth h1 img { width: 30px; }
.auth p { color: var(--muted); margin: 0 0 22px; }
.err { color: var(--danger); min-height: 20px; font-size: 13px; margin: -4px 0 10px; }

/* Verwaltung */
.page { padding: 4px 22px 60px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 18px 0; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.kpi b { display: block; font-size: 26px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kpi span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 12px; }
.card2 { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; min-width: 0; }
.card2 h3 { margin: 0 0 12px; font-size: 14px; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; }
.bars div { flex: 1; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 2px; position: relative; }
.bars div:hover::after { content: attr(data-t); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); white-space: nowrap; background: #000; padding: 3px 6px; border-radius: 4px; font-size: 11px; margin-bottom: 4px; }
.bars.alt div { background: #5b8def; }
.axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); margin-top: 6px; }
.rank { display: grid; gap: 6px; }
.rank .r { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.rank .r .track { grid-column: 1 / -1; height: 4px; background: var(--panel-2); border-radius: 2px; overflow: hidden; }
.rank .r .track i { display: block; height: 100%; background: var(--accent); }
.thumbrank { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.thumbrank a { position: relative; aspect-ratio: 3/2; border-radius: 6px; overflow: hidden; display: block; background: var(--panel-2); }
.thumbrank img { width: 100%; height: 100%; object-fit: cover; }
.thumbrank b { position: absolute; right: 4px; bottom: 4px; background: rgba(0,0,0,.75); border-radius: 4px; padding: 1px 6px; font-size: 11px; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.t td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 700; background: var(--panel-2); border: 1px solid var(--line-2); }
.badge.on { color: var(--ok); } .badge.off { color: var(--danger); }

/* Teilen-Ansicht (öffentlich) */
.public .top .brand { width: auto; }

#toast { position: fixed; left: 50%; top: 18px; transform: translate(-50%, -80px); background: var(--panel-2); border: 1px solid var(--line-2); padding: 10px 16px; border-radius: 10px;
  z-index: 100; transition: transform .2s; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
#toast.show { transform: translate(-50%, 0); }

.menu-toggle { display: none !important; }
@media (max-width: 900px) {
  .top { gap: 8px; padding: 0 10px; }
  .search { min-width: 0; flex: 1; }
  .top .spacer { display: none; }
  .brand img { width: 24px; }
  .search input { font-size: 16px; }
  #userbtn .uname { display: none; }
  .zoom { display: none; }
  .selbar { left: 8px; right: 8px; transform: none; flex-wrap: wrap; justify-content: center; }
  :root { --side: 0px; }
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: var(--top) auto 0 0; width: 290px; z-index: 30; transform: translateX(-100%); transition: transform .2s; }
  .shell.sideopen .side { transform: none; box-shadow: 20px 0 60px rgba(0,0,0,.5); }
  .brand { width: auto; } .brand span { display: none; }
  .menu-toggle { display: inline-flex !important; }
  .lb { grid-template-columns: 1fr; grid-template-rows: 55vh 1fr; }
  .lb .info { border-left: 0; border-top: 1px solid var(--line); }
  .grid { --cell: 150px !important; padding: 12px 12px 120px; gap: 6px; }
  .bar, .pagehead, .page { padding-left: 12px; padding-right: 12px; }
  .cards { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ═════════════════ Thema ADAC Motorsport ═════════════════ */
html, body { font-size: 15px; }
h1, h2, .pagehead h1, .modal h2, .lb h2 { font-weight: 900; font-style: italic; letter-spacing: 0; }

/* Kopf */
.top { background: #000; border-bottom: 0; }
.brand { gap: 6px; font-weight: 900; font-style: italic; font-size: 1.25rem; text-transform: uppercase; }
.brand img { width: 44px; height: 44px; }
.brand span { white-space: nowrap; font-size: 1.05rem; }
.search input { border-radius: 0; border: 2px solid transparent; background: #fff; color: #111; }
.search input::placeholder { color: #666; }
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search svg { color: #555; }
.input, select.input, textarea.input { border-radius: 0; }

/* Schräge Knöpfe: nur die Fläche wird geschert, der Text nicht */
.btn { position: relative; isolation: isolate; border: 0; background: transparent; border-radius: 0; font-style: italic; font-weight: 800; padding: 0 18px; }
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; transform: skewX(var(--schraeg)); background: var(--panel-2); border: 1px solid var(--line-2); transition: background .12s, filter .12s; }
.btn:hover { background: transparent; border-color: transparent; }
.btn:hover::before { background: #2b2b2b; }
.btn.primary, .btn.primary:hover { background: transparent; color: var(--accent-ink); }
.btn.primary::before { background: var(--accent); border-color: var(--accent); }
.btn.primary:hover::before { background: var(--accent); filter: brightness(1.07); }
.btn.ghost, .btn.ghost:hover { background: transparent; }
.btn.ghost::before { background: transparent; border-color: transparent; }
.btn.ghost:hover::before { background: var(--panel-2); }
.btn:focus-visible { outline: none; }
.btn:focus-visible::before { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn.streifen { margin-right: 14px; }
.btn.streifen::after { content: ""; position: absolute; top: 0; bottom: 0; right: -14px; width: 7px; background: var(--accent); transform: skewX(var(--schraeg)); }

/* Filter */
.facet button.on, .navlink.on { background: var(--accent-soft); color: #fff; box-shadow: inset 3px 0 0 var(--accent); border-radius: 0; }
.facet button.on .n { color: var(--accent); }
.facet button, .navlink { border-radius: 0; }
.side h3 { font-style: italic; font-weight: 800; color: var(--fg); letter-spacing: .04em; }
.years :is(button, a) { position: relative; isolation: isolate; border: 0; background: transparent; border-radius: 0; padding: 4px 12px; font-weight: 600; }
.years :is(button, a)::before { content: ""; position: absolute; inset: 0; z-index: -1; transform: skewX(var(--schraeg)); background: var(--bg); border: 1px solid var(--line-2); }
.years :is(button, a).on { background: transparent; color: #000; font-style: italic; font-weight: 800; }
.years :is(button, a).on::before { background: var(--accent); border-color: var(--accent); }
.chip { position: relative; isolation: isolate; border: 0; background: transparent; border-radius: 0; padding: 4px 8px 4px 14px; font-weight: 600; font-style: italic; }
.chip::before { content: ""; position: absolute; inset: 0; z-index: -1; transform: skewX(var(--schraeg)); background: var(--panel-2); border: 1px solid var(--line-2); }
.chip button { border-radius: 0; }
.bar { background: rgba(11,11,11,.94); }
.bar .count { font-style: italic; font-weight: 800; }
.zoom { accent-color: var(--accent); }

/* Raster */
.tile { border-radius: 0; }
.tile .sel { border-radius: 0; }
.tile.selected .sel::after { border-color: #000; }

/* Leisten, Dialoge, Großansicht */
.selbar { border-radius: 0; background: #000; border: 0; border-left: 4px solid var(--accent); }
.modal { border-radius: 0; border-left: 4px solid var(--accent); }
.list button, .linkrow, .kpi, .card2, .badge, .menu, .menu a, .menu button { border-radius: 0; }
.linkrow code { color: var(--accent); }
.kpi b { font-style: italic; font-weight: 900; }
.kw button { border-radius: 0; }
.lb .nav { border-radius: 0; }
#toast { border-radius: 0; border-left: 4px solid var(--accent); }

/* Doppelpfeil, Etikett, Titelbalken */
.pfeil { display: inline-block; flex: none; width: 1.4em; height: 1em; color: var(--accent); vertical-align: -0.1em; }
.etikett-zeile { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; }
.etikett { position: relative; isolation: isolate; display: inline-flex; color: #000; font-weight: 700; font-style: italic; font-size: .9rem; padding: 2px 12px; white-space: nowrap; }
.etikett::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--accent); transform: skewX(var(--schraeg)); }
.etikett-zeile .leise { color: var(--muted); font-size: .85rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.balken { color: #fff; padding: .02em .6em .06em .5em; background: linear-gradient(107deg, transparent .4em, #000 .4em, #000 calc(100% - .4em), transparent calc(100% - .4em));
  -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* Sparten-Reiter */
.sparten { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; padding: 10px 22px 0; }
.sparten::-webkit-scrollbar { display: none; }
.sparte { position: relative; isolation: isolate; flex: none; border: 0; background: transparent; color: var(--muted); padding: 10px 18px; min-height: 44px;
  font-style: italic; font-weight: 800; font-size: 1rem; display: inline-flex; gap: 8px; align-items: baseline; }
.sparte::before { content: ""; position: absolute; inset: 4px 2px; z-index: -1; transform: skewX(var(--schraeg)); background: transparent; }
.sparte:hover { color: #fff; } .sparte:hover::before { background: var(--panel-2); }
.sparte.on { color: #000; } .sparte.on::before { background: var(--accent); }
.sparte .n { font-style: normal; font-weight: 500; font-size: .78rem; color: var(--faint); }
.sparte.on .n { color: rgba(0,0,0,.65); }
.sparte:focus-visible { outline: none; } .sparte:focus-visible::before { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Zufallsbild aus dem Archiv */
.held { position: relative; margin: 14px 22px 0; min-height: 300px; display: grid; background: #000; overflow: hidden; }
.held img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s; }
.held img.loaded { opacity: 1; }
.held.hoch img { object-position: 50% 25%; }
.held::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.78), rgba(0,0,0,.35) 55%, rgba(0,0,0,0)); pointer-events: none; }
.held-text { position: relative; z-index: 1; align-self: end; padding: 28px; display: flex; flex-direction: column; gap: 12px; max-width: 720px; }
.held h2 { margin: 0; font-size: clamp(1.7rem, 3.4vw, 2.6rem); line-height: 1.3; }
.held h2 .pfeil { width: 1.1em; height: .7em; margin-left: .2em; vertical-align: 0; }
.held p { margin: 0; color: rgba(255,255,255,.9); font-variant-numeric: tabular-nums; }
.held .aktionen { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }

/* Serien- und Lauf-Banner */
.banner { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; margin: 14px 22px 0; }
.banner button { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 80px; padding: 14px 18px; background: #000; color: #fff; border: 1px solid var(--line);
  text-align: left; font-style: italic; font-weight: 900; font-size: 1.15rem; line-height: 1.05; text-transform: uppercase; }
.banner button small { display: block; margin-top: 6px; font-style: normal; font-weight: 500; font-size: .82rem; text-transform: none; color: #bdbdbd; font-variant-numeric: tabular-nums; }
.banner .pfeil { width: 52px; height: 32px; transition: transform .15s; }
.banner button:hover { border-color: var(--accent); } .banner button:hover .pfeil { transform: translateX(4px); }
.banner button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Großansicht */
.lb .info .etikett-zeile { margin-bottom: 10px; }
.lb h2 { font-size: 1.4rem; line-height: 1.15; }

/* Anmeldung */
.anmeldung { position: relative; min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; padding: 24px max(24px, env(safe-area-inset-right)) 18px max(24px, env(safe-area-inset-left)); background: #000; overflow: hidden; }
.anmeldung .buehne { position: fixed; inset: 0; }
.anmeldung .ebene { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s ease; background: #000 center / cover no-repeat; }
.anmeldung .ebene.sichtbar { opacity: 1; }
.anmeldung .ebene svg { width: 100%; height: 100%; display: block; }
.anmeldung .buehne::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.88), rgba(0,0,0,.5) 45%, rgba(0,0,0,.12)); }
.anmeldung > :not(.buehne) { position: relative; z-index: 1; }
.anmeldung .kopf { display: flex; align-items: center; gap: 6px; }
.anmeldung .kopf img { width: 56px; height: 56px; }
.anmeldung .kopf span { font-weight: 900; font-style: italic; font-size: 1.5rem; text-transform: uppercase; padding-left: 6px; }
.anmeldung .mitte { display: flex; align-items: center; padding-block: 36px; }
.anmeldung .karte { width: min(460px, 100%); display: flex; flex-direction: column; gap: 20px; }
.anmeldung h1 { margin: 0; font-size: clamp(2.4rem, 6.5vw, 3.8rem); line-height: 1.25; }
.anmeldung h1 .pfeil { width: 1.1em; height: .7em; margin-left: .2em; vertical-align: 0; }
.anmeldung .unter { margin: 0; color: rgba(255,255,255,.88); max-width: 40ch; }
.anmeldung form { display: flex; flex-direction: column; gap: 14px; background: rgba(0,0,0,.74); padding: 22px; border-left: 4px solid var(--accent); }
.anmeldung label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.anmeldung .input { height: 50px; background: #fff; color: #111; border: 2px solid transparent; font-size: 1rem; }
.anmeldung .input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.anmeldung .err:empty { display: none; }
.anmeldung .err { margin: 0; padding: 10px 12px; background: rgba(255,107,107,.15); border-left: 4px solid var(--danger); color: #ffd0d0; font-size: .95rem; }
.anmeldung .btn.primary { align-self: flex-start; height: 52px; padding: 0 30px; font-size: 1.1rem; font-weight: 900; margin: 4px 16px 0 6px; }
.anmeldung .btn.primary .pfeil { color: #000; width: 1.2em; height: .8em; }
.anmeldung .fuss { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; font-size: .85rem; color: rgba(255,255,255,.7); }
@media (max-width: 600px) {
  .anmeldung .buehne::after { background: linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,.88) 55%, rgba(0,0,0,.94)); }
  .anmeldung .mitte { align-items: flex-end; }
  .held { margin: 10px 12px 0; min-height: 260px; } .held-text { padding: 18px; }
  .banner { margin: 10px 12px 0; } .sparten { padding: 8px 12px 0; }
}
@media (prefers-reduced-motion: reduce) { .anmeldung .ebene { transition: none; } }

/* Kalender */
.kal h2 { font-size: 16px; margin: 22px 0 10px; }
.kal h2:first-child { margin-top: 0; }
.kal .t td { padding: 4px 6px; vertical-align: middle; }
.kal .t .input { height: 32px; width: 100%; min-width: 0; }
.kal { overflow-x: auto; }
.kal .t [name=track], .kal .t [name=topic] { min-width: 140px; }
.kal .t [name=names] { min-width: 180px; }
.kal .t .nr { width: 64px; }
.kal .t .rennen { width: 84px; }
.kal .t input[type=date] { width: 150px; }
.kal > .btn { margin-top: 8px; }
.kal-stand { margin-top: 22px; }
.kal-stand ul { margin: 8px 0; padding-left: 18px; }
.years a { text-decoration: none; color: inherit; display: inline-block; }
.years a.leer { opacity: .55; }
