/* Unterseiten: Textseiten, Fehlerseite, Verweislisten.
   Baut auf startseite.css auf (Farben, Schriften, Knöpfe). Alle Farben kommen aus deren
   Variablen; sie wechseln mit dem Modus (html[data-theme]), deshalb steht hier keine Farbe doppelt. */

.seite { padding-block: clamp(34px, 5vw, 64px) clamp(46px, 6.5vw, 88px); }

/* Seitenüberschrift: kleiner als der Auftakt der Startseite, passt auch am Handy in die Breite */
.seite h1 { font-weight: 800; font-style: italic; font-size: clamp(2.3rem, 6vw, 4.4rem); line-height: .98; letter-spacing: .01em; overflow-wrap: break-word; hyphens: auto; }
.seite .einleitung { margin-top: 18px; max-width: 62ch; font-size: 1.1875rem; color: var(--grau); }

/* Fließtext */
.text { max-width: 68ch; }
.text > * + * { margin-top: 1em; }
.text h2 { margin-top: 1.9em; font-weight: 800; font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.05; letter-spacing: .02em; }
.text h3 { margin-top: 1.5em; font-weight: 600; font-size: 1.25rem; letter-spacing: .04em; }
.text ul { list-style: square; padding-left: 1.3em; }
.text ul > li + li { margin-top: .35em; }
.text ul > li::marker { color: var(--rot-hell); }
.text a:not(.knopf) { text-decoration: underline; text-decoration-color: var(--rot-hell); text-decoration-thickness: 2px; text-underline-offset: 4px; overflow-wrap: anywhere; }
.text a:not(.knopf):hover { text-decoration-thickness: 4px; }
/* Knöpfe mit langem Text brechen am Handy um, statt über den Rand zu laufen */
.seite .knopf { max-width: 100%; white-space: normal; }
.text strong { font-weight: 600; }

/* Hervorgehobener Hinweis, z. B. „Testbetrieb“ */
.hinweis { border-left: 4px solid var(--blau-hell); background: var(--flaeche); padding: 14px 18px; }

/* Fragen und Antworten zum Aufklappen (funktioniert ohne Skript) */
.fragen { margin-top: 1.2em; border-bottom: 1px solid var(--linie); }
.fragen details { border-top: 1px solid var(--linie); }
.fragen summary { display: flex; align-items: center; min-height: 52px; padding-block: 10px; font-weight: 600; cursor: pointer; }
.fragen summary:hover { color: var(--rot-hell); }
.fragen details > p { padding-bottom: 16px; }
.fragen details > p + p { margin-top: -6px; }

/* Abschnitt unter dem Text, z. B. eine Verweisliste über die ganze Breite */
.seite .anschluss { margin-top: clamp(30px, 5vw, 56px); }

/* Termine und Fortbildungen */
.bereiche { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.bereich { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 14px; font-weight: 600; text-decoration: none; color: var(--grau); box-shadow: inset 0 0 0 2px var(--linie); }
.bereich::before { content: ""; width: 14px; height: 14px; flex: none; box-shadow: inset 0 0 0 2px currentColor; }
.bereich.an { color: var(--weiss); box-shadow: inset 0 0 0 2px var(--rot-hell); }
.bereich.an::before { background: var(--rot-hell); box-shadow: none; }
.bereich:hover { color: var(--weiss); }
.bereich-zahl { color: var(--grau); font-weight: 400; }
.abschnitt { margin-top: 1.9em; font-weight: 800; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.termine { list-style: none; margin-top: 24px; display: grid; gap: 18px; max-width: 68ch; }
.termin { display: grid; gap: 8px; padding: 20px 22px; background: var(--flaeche); border-left: 4px solid var(--rot-hell); overflow-wrap: anywhere; }
.termin h3 { font-weight: 800; font-size: 1.5rem; line-height: 1.15; }
.termin-datum { font-weight: 600; color: var(--rot-hell); letter-spacing: .04em; }
.termin-ort { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.termin-ort .chip { font-size: .875rem; padding: 3px 9px; }
.termin-angaben { display: grid; gap: 4px; }
.termin-angaben div { display: flex; flex-wrap: wrap; gap: 0 10px; }
.termin-angaben dt { color: var(--grau); }
.termin-angaben dt::after { content: ":"; }
.termin-knoepfe { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.termin-stand { color: var(--grau); font-size: .9375rem; }
.hinweis { margin-top: 24px; }
.termin.eigen { border-left-color: var(--blau-hell); }
.termin h3 a { text-decoration: underline; text-decoration-color: var(--rot-hell); text-underline-offset: 5px; }
.kennzeile { margin-bottom: 4px; }
.steckbrief { display: grid; gap: 12px; margin-top: 1.6em; padding: 20px 22px; background: var(--flaeche); border-left: 4px solid var(--blau-hell); }
.steckbrief div { display: grid; gap: 2px; }
.steckbrief dt { color: var(--grau); font-size: .9375rem; letter-spacing: .04em; }
.steckbrief dd span { display: block; }
/* Meldeliste der Turnierseite */
.meldeliste { width: 100%; max-width: 46rem; margin-top: 22px; border-collapse: collapse; }
.meldeliste caption { text-align: left; padding-bottom: 8px; font-weight: 600; }
.meldeliste th, .meldeliste td { padding: 10px 12px 10px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--linie); overflow-wrap: anywhere; }
.meldeliste th { color: var(--grau); font-size: .9375rem; font-weight: 400; letter-spacing: .04em; }
.meldeliste .zahl { text-align: right; padding-right: 0; white-space: nowrap; }
.klein { color: var(--grau); font-size: .9375rem; }

/* Formulare (Verwaltung und Anmeldung) */
.formular { display: grid; gap: 18px; max-width: 34rem; margin-top: 26px; justify-items: start; }
.feld { display: grid; gap: 6px; width: 100%; }
.feld label { font-weight: 600; }
.feld input:not([type=radio], [type=checkbox]), .feld textarea, .feld select { width: 100%; min-height: 48px; padding: 8px 12px; font: inherit; color: var(--weiss); background: var(--flaeche); border: 2px solid var(--grau); border-radius: 0; }
.feld input:focus-visible, .feld textarea:focus-visible, .feld select:focus-visible { outline: 3px solid var(--blau-hell); outline-offset: 2px; border-color: var(--weiss); }
.feld input[aria-invalid="true"], .feld textarea[aria-invalid="true"] { border-color: var(--rot-hell); }
.fehler { color: var(--rot-hell); font-weight: 600; }
.formular button { border: 0; cursor: pointer; }
.feld-hinweis { color: var(--grau); font-size: .9375rem; }
.text ul.schul-treffer { list-style: none; margin: -6px 0 0; padding: 0; border: 2px solid var(--grau); border-top: 0; }
.text ul.schul-treffer > li + li { margin-top: 0; border-top: 1px solid var(--linie); }
.schul-treffer button { display: block; width: 100%; min-height: 44px; padding: 8px 12px; font: inherit; text-align: left; color: var(--weiss); background: var(--flaeche); }
.schul-treffer button:hover, .schul-treffer button:focus-visible { background: var(--blau-hell); color: var(--nacht); outline: 0; }
.wahl { border: 0; padding: 0; gap: 4px; }
.wahl legend { font-weight: 600; padding: 0; margin-bottom: 6px; }
.wahl label, .haken { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 400; }
.wahl input, .haken input { width: 22px; height: 22px; accent-color: var(--rot-hell); }

/* Anmeldung einer Schule */
.anmeldung { max-width: 46rem; }
.anmeldung h2 { margin-top: .6em; }
.nur-tastatur { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.mannschaft { display: grid; gap: 14px; width: 100%; min-width: 0; padding: 18px 20px 22px; border: 0; border-left: 4px solid var(--blau-hell); background: var(--flaeche); }
.mannschaft legend { float: left; width: 100%; padding: 0; font-family: var(--schau); text-transform: uppercase; font-weight: 800; font-size: 1.5rem; }
.mannschaft legend + * { clear: both; }
.mannschaft .feld input:not([type=radio], [type=checkbox]), .mannschaft .feld select { background: var(--nacht); }
.spielerzeile { display: grid; grid-template-columns: 2.2rem repeat(2, minmax(0, 1fr)) 6.5rem 5rem 9rem; gap: 6px 10px; align-items: end; }
.spielerzeile .brettnummer { align-self: end; min-height: 48px; display: flex; align-items: center; font-weight: 800; color: var(--rot-hell); }
.spielerzeile label { font-size: .875rem; color: var(--grau); font-weight: 400; }
.spielerzeile .zeilen-meldung, .spielerzeile .wertung { grid-column: 2 / -1; }
.wertung { min-width: 0; margin: 0; padding: 0; border: 0; }
.mannschaft .wertung legend { float: none; font-family: inherit; text-transform: none; font-weight: 400; font-size: .875rem; color: var(--grau); }
.wertung .haken { min-height: 40px; align-items: flex-start; padding-top: 8px; }
.wertung .haken input { flex: none; }
.wertung-suche { display: grid; gap: 8px; justify-items: start; }
.zeilen-suche { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.zeilen-suche .hinweis { margin: 0; }
.markierungen { display: flex; flex-wrap: wrap; gap: 0 28px; }
.betreuung summary { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 16px; border: 1px solid var(--linie); font-weight: 600; cursor: pointer; list-style: none; }
.betreuung summary::-webkit-details-marker { display: none; }
.betreuung summary::before { content: ""; flex: none; width: 9px; height: 9px; border-right: 3px solid var(--rot-hell); border-bottom: 3px solid var(--rot-hell); transform: rotate(-45deg); }
.betreuung[open] summary::before { transform: translateY(-3px) rotate(45deg); }
.betreuung summary:hover { border-color: var(--rot-hell); }
.betreuung summary::after { content: "aufklappen"; font-weight: 400; font-size: .875rem; color: var(--grau); }
.betreuung[open] summary::after { content: "zuklappen"; }
.betreuung[open] summary { justify-self: start; }
.betreuung[open] { display: grid; gap: 14px; }
.code { font-family: var(--schau); font-weight: 800; font-size: clamp(2rem, 6vw, 3rem); letter-spacing: .12em; }
@media (max-width: 720px) {
  .spielerzeile { grid-template-columns: 2.2rem repeat(3, minmax(0, 1fr)); padding-bottom: 12px; border-bottom: 1px solid var(--linie); }
  .spielerzeile .feld:nth-of-type(1), .spielerzeile .feld:nth-of-type(2) { grid-column: 2 / -1; }
  .spielerzeile .feld.schmal { grid-column: auto; }
  .spielerzeile .feld.schmal:nth-of-type(3) { grid-column: 2; }
}

/* Ausschreibung auf der Turnierseite (T15): Angaben als Kacheln, Hinweise, Zwischentitel */
.ausschreibung { display: grid; gap: 22px; max-width: 60rem; }
.text > .ausschreibung { max-width: none; width: min(60rem, calc(100vw - 2 * var(--rand, 24px))); }
.ausschreibung .absatz { max-width: 68ch; white-space: pre-line; }
.ausschreibung-titel { display: flex; align-items: center; gap: 14px; margin-top: 14px; font-family: var(--schau); text-transform: uppercase; font-weight: 800; font-size: 1.625rem; letter-spacing: .04em; }
.ausschreibung-titel::before { content: ""; flex: none; width: 34px; height: 4px; background: var(--rot-hell); }
.ausschreibung h4 { font-weight: 600; font-size: 1.125rem; }
.ausschreibung ul { max-width: 68ch; }
.angaben { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 12px; }
.angaben > div { display: grid; align-content: start; gap: 6px; padding: 16px 18px 18px; background: var(--flaeche); border-top: 3px solid var(--blau-hell); }
.angaben > .lang { grid-column: 1 / -1; }
.angaben dt { font-family: var(--schau); text-transform: uppercase; font-weight: 700; font-size: .9375rem; letter-spacing: .1em; color: var(--blau-hell); }
.angaben dd { margin: 0; }
.angaben .kurz dd { font-family: var(--schau); font-weight: 700; font-size: 1.4375rem; line-height: 1.15; }
.angaben .lang dd { max-width: 72ch; }
.ausschreibung-hinweis { max-width: 68ch; padding: 16px 20px; border: 2px solid var(--rot-hell); font-weight: 600; white-space: pre-line; }
.feld-hinweis code { font-family: ui-monospace, Menlo, monospace; font-size: .875rem; padding: 1px 5px; background: var(--flaeche); border: 1px solid var(--linie); white-space: nowrap; }


/* Ergebnisse & Statistik */
.ergebnisse { list-style: none; display: grid; gap: 22px; margin-top: 28px; max-width: 60rem; }
.ergebnisse > li { padding: 20px 22px; background: var(--flaeche); border-left: 4px solid var(--rot-hell); }
.ergebnisse h2 { margin-top: 6px; font-weight: 800; font-size: clamp(1.4rem, 3vw, 1.9rem); line-height: 1.1; letter-spacing: .02em; }
.ergebnisse h2 a:hover { color: var(--rot-hell); }
.ergebnisse .knopf { margin-top: 16px; }
.podest { list-style: none; display: grid; gap: 8px; margin-top: 16px; }
.podest li, .endstand-zeile { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.platz { min-width: 2.2em; font-weight: 800; color: var(--rot-hell); }
.punkte { margin-left: auto; white-space: nowrap; }
.endstand { list-style: none; max-width: 60rem; margin-top: 28px; border-bottom: 1px solid var(--linie); }
.endstand > li { padding: 14px 0; border-top: 1px solid var(--linie); }
.endstand-name { flex: 1 1 14rem; overflow-wrap: anywhere; }
.endstand .betreuung { margin-top: 10px; }
.tabellen-rahmen { max-width: 60rem; overflow-x: auto; }
.vergleich { max-width: none; }
/* Spaltenköpfe brechen zwischen den Wörtern um, nie mitten im Wort; reicht der Platz nicht, lässt sich der Rahmen seitlich schieben. */
.vergleich th.zahl { white-space: normal; overflow-wrap: normal; }
.vergleich td:first-child { min-width: 9.5rem; overflow-wrap: break-word; }
/* Am Handy stehen über den drei Platzspalten nur „1.“, „2.“, „3.“; das Wort „Platz“ bleibt für Vorleseprogramme. */
@media (max-width: 560px) {
  .vergleich .kopf-wort { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .vergleich .zahl { padding-left: 9px; }
  .vergleich td:first-child { min-width: 7.5rem; }
}

/* Anmeldung: was vorher bereitliegen sollte (T25) */
.vorbereitung { margin-top: 28px; border-left: 4px solid var(--rot); background: var(--flaeche); padding: 14px 18px; }
.vorbereitung h2 { margin-top: 0; }
.vorbereitung ul { margin: 8px 0 0; padding-left: 1.2em; list-style: disc; }
.vorbereitung li + li { margin-top: 4px; }
.vorbereitung p { margin-top: 10px; }

/* ===== Vorschau Layout (02.11.2026, noch nicht freigegeben) ===== */
/* Kopfband: dieselben Lichter wie im Auftakt der Startseite, nur oben und schwächer. */
.seite { background:
    radial-gradient(46% 300px at 82% 0, rgba(205, 19, 22, .2), transparent 72%),
    radial-gradient(30% 240px at 100% 0, rgba(0, 159, 223, .16), transparent 72%); }
html[data-theme="light"] .seite { background:
    radial-gradient(46% 300px at 82% 0, rgba(205, 19, 22, .1), transparent 72%),
    radial-gradient(30% 240px at 100% 0, rgba(0, 159, 223, .12), transparent 72%); }
.seite h1::before { content: ""; display: block; width: 56px; height: 5px; margin-bottom: 20px; background: var(--rot); }
.termin h3, .ergebnisse h2 { text-transform: none; letter-spacing: .01em; }

/* Turnierseite in zwei Spalten: links Ausschreibung und Meldeliste, rechts die Eckdaten mit Anmeldeknopf, die beim Scrollen mitlaufen. */
.turnier-raster { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); grid-template-areas: "haupt seite"; gap: 40px 56px; align-items: start; margin-top: 30px; }
.turnier-haupt { grid-area: haupt; }
.turnier-haupt > h2:first-child { margin-top: 0; }
.turnier-seite { grid-area: seite; position: sticky; top: 20px; display: grid; gap: 16px; }
.turnier-seite .steckbrief { margin-top: 0; }
.turnier-seite .knopf.rot { width: 100%; }
.turnier-seite .hinweis { margin-top: 0; }
.turnier-seite > p { margin: 0; }
@media (max-width: 900px) {
  .turnier-raster { grid-template-columns: minmax(0, 1fr); grid-template-areas: "seite" "haupt"; }
  .turnier-seite { position: static; }
}
/* In der Hauptspalte nimmt die Ausschreibung nur die Spaltenbreite ein, sonst liefe sie unter die Eckdaten. */
.turnier-haupt > .ausschreibung { width: auto; max-width: none; }
/* Steht über dem Titel schon ein Etikett („Anmeldung offen“), entfällt der rote Strich. */
.kennzeile + h1::before { display: none; }

/* ===== Breitere Unterseiten (Vorschau 07.11.2026, noch nicht freigegeben) ===== */
/* Termine: Karten ab etwa 1000 px Breite in zwei Spalten, damit die rechte Hälfte nicht leer bleibt. */
.termine.raster { max-width: none; grid-template-columns: repeat(auto-fill, minmax(min(100%, 32rem), 1fr)); align-items: start; }
/* Stadtmeisterschaft: links Fragen und Antworten, rechts die Turnierkarte, die beim Scrollen mitläuft. Auf dem Handy die Karte zuerst. */
.spalten { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 420px); grid-template-areas: "haupt seite"; gap: 40px 56px; align-items: start; margin-top: 30px; }
.spalten-haupt { grid-area: haupt; }
.spalten-haupt > h2:first-child { margin-top: 0; }
.spalten-seite { grid-area: seite; position: sticky; top: 20px; }
.spalten-seite .termine, .spalten-seite .hinweis { margin-top: 0; }
@media (max-width: 900px) {
  .spalten { grid-template-columns: minmax(0, 1fr); grid-template-areas: "seite" "haupt"; }
  .spalten-seite { position: static; }
}

/* Live-Ergebnisse (X03) */
.live-feld { max-width: 60rem; margin-top: 40px; }
.live-feld h3 { margin-top: 28px; }
.live-runde { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.live-runde > li { min-width: 0; }
.live-kampf { padding: 10px 16px; background: var(--flaeche); border-left: 4px solid var(--blau-hell); }
.live-kampf summary { min-height: 44px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; cursor: pointer; }
.live-paar { flex: 1 1 18rem; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: center; overflow-wrap: anywhere; }
.live-paar strong:first-child { text-align: right; }
.live-punkte { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.meldeliste .live-mitte { text-align: center; white-space: nowrap; }
.live-frueher { margin-top: 14px; }
.live-tabelle td, .live-tabelle th { overflow-wrap: break-word; }
.live-tabelle td:first-child { white-space: nowrap; }
.live-tabelle .zahl { padding-left: 14px; }
.live-tabelle abbr { text-decoration: none; }
.live-leiste { margin: 18px 0 0; }
