/* Dampfhammer – Vereinsgrün, Kegelring-Rot, Anzeigetafel für Zahlen */
:root {
  --gruen: #1f5130;
  --gruen-tief: #143821;
  --rot: #b3202a;
  --flaeche: #eef1ec;
  --karte: #ffffff;
  --text: #18201a;
  --text-leise: #56625a;
  --linie: #c9d1c6;
  --plus: #1f6b3a;
  --minus: #b3202a;
  --tafel-text: #f4f7f2;
  --schrift-titel: "Bahnschrift", "DIN Alternate", "Roboto Condensed", "Arial Narrow", sans-serif;
  --schrift: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --flaeche: #121813; --karte: #1b231d; --text: #e6ece5; --text-leise: #9daa9f;
    --linie: #2e3a31; --plus: #5fbf7f; --minus: #ef6b6b; --gruen: #2c6b42; --rot: #d9434c;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--flaeche); color: var(--text); font: 16px/1.5 var(--schrift); }
a { color: var(--gruen); }
@media (prefers-color-scheme: dark) { a { color: #7fcf98; } }
:focus-visible { outline: 3px solid var(--rot); outline-offset: 2px; }

/* Kopfzeile: drei Kegelringe als Markenzeichen */
.kopf { background: var(--gruen-tief); color: var(--tafel-text); }
.kopf-innen { max-width: 1240px; margin: 0 auto; display: flex; align-items: center; gap: 1rem; padding: .75rem 1rem; flex-wrap: wrap; }
.marke { flex: none; display: flex; align-items: center; gap: .6rem; color: inherit; text-decoration: none; font: 600 1.35rem/1 var(--schrift-titel); }
.kegel { width: 14px; height: 30px; border-radius: 7px 7px 4px 4px; background: #fff; position: relative; }
.kegel::before, .kegel::after { content: ""; position: absolute; left: 0; right: 0; height: 3px; background: var(--rot); }
.kegel::before { top: 9px; } .kegel::after { top: 14px; }
.nav { display: flex; gap: .1rem; flex-wrap: nowrap; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--tafel-text); text-decoration: none; padding: .4rem .55rem; border-radius: 4px; white-space: nowrap; font-size: .97rem; }
.nav a:hover, .nav a[aria-current="page"] { background: rgba(255,255,255,.12); }
.benutzer { flex: none; display: flex; align-items: center; gap: .75rem; font-size: .9rem; }
.benutzer form { margin: 0; }
.benutzer button { background: none; border: 1px solid rgba(255,255,255,.4); color: inherit; padding: .3rem .7rem; border-radius: 4px; cursor: pointer; }

main { max-width: 1240px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
h1, h2, h3 { font-family: var(--schrift-titel); font-weight: 600; line-height: 1.15; }
h1 { font-size: 2rem; margin: 0 0 1rem; }
h2 { font-size: 1.4rem; margin: 2rem 0 .75rem; }
.kopfzeile { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.kopfzeile h1 { margin: 0; }
.leise { color: var(--text-leise); }

/* Anzeigetafel: das eine auffällige Element */
.tafel { background: var(--gruen-tief); color: var(--tafel-text); border-radius: 6px; padding: 1.25rem 1.5rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.25rem; border-bottom: 4px solid var(--rot); }
.tafel-wert { font: 600 2.4rem/1 var(--schrift-titel); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.tafel-wert.minus { color: #ff9a9a; }
.tafel-label { font-size: .9rem; opacity: .8; margin-top: .35rem; }

/* Tabellen */
.tabelle-wrap { overflow-x: auto; background: var(--karte); border: 1px solid var(--linie); border-radius: 6px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--linie); vertical-align: top; }
th { font-size: .85rem; color: var(--text-leise); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
td.zahl, th.zahl { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.plus { color: var(--plus); } .minus { color: var(--minus); }
.inaktiv td { color: var(--text-leise); }

/* Inhaltsflächen */
.flaeche { background: var(--karte); border: 1px solid var(--linie); border-radius: 6px; padding: 1.25rem; }
.raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.felder { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.5rem; margin: 0; }
.felder dt { color: var(--text-leise); }
.felder dd { margin: 0; }
.regeln { max-width: 70ch; }
.regeln h2 { font-size: 1.2rem; }
.marke-text { display: inline-block; font-size: .8rem; padding: .1rem .5rem; border-radius: 3px; background: var(--flaeche); border: 1px solid var(--linie); }

/* Formulare */
.formular { max-width: 640px; }
.feld { margin-bottom: 1rem; }
.feld label { display: block; font-weight: 600; margin-bottom: .3rem; }
.feld input:not([type=checkbox]):not([type=radio]), .feld select, .feld textarea {
  width: 100%; padding: .55rem .65rem; font: inherit; color: var(--text);
  background: var(--karte); border: 1px solid var(--linie); border-radius: 4px;
}
.feld textarea { font-family: ui-monospace, Consolas, monospace; font-size: .95rem; }
.feld .hilfe { font-size: .85rem; color: var(--text-leise); margin-top: .25rem; }
.feld .fehler { color: var(--minus); font-size: .9rem; margin-top: .25rem; }
.feld-checkbox label { display: flex; gap: .5rem; align-items: center; font-weight: 400; }
.feld ul { list-style: none; padding: 0; margin: 0; columns: 2; }
.feld ul label { font-weight: 400; display: flex; gap: .4rem; }

.knopf { display: inline-block; padding: .55rem 1rem; border-radius: 4px; border: 1px solid var(--gruen); background: var(--gruen); color: #fff; text-decoration: none; font: 600 .95rem var(--schrift); cursor: pointer; }
.knopf:hover { background: var(--gruen-tief); }
.knopf.zweit { background: transparent; color: var(--gruen); }
@media (prefers-color-scheme: dark) { .knopf.zweit { color: #7fcf98; border-color: #7fcf98; } }
.knopf.gefahr { background: var(--rot); border-color: var(--rot); }
.knoepfe { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

.meldungen { list-style: none; padding: 0; margin: 0 0 1rem; }
.meldungen li { padding: .7rem 1rem; border-radius: 4px; background: var(--karte); border-left: 4px solid var(--plus); margin-bottom: .5rem; }
.meldungen li.error { border-left-color: var(--minus); }
.filter { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .75rem; }
.filter a { padding: .25rem .7rem; border: 1px solid var(--linie); border-radius: 999px; text-decoration: none; color: var(--text); font-size: .9rem; background: var(--karte); }
.filter a[aria-current="true"] { background: var(--gruen); color: #fff; border-color: var(--gruen); }

.anmelden { max-width: 380px; margin: 4rem auto; }
.leer { padding: 2rem; text-align: center; color: var(--text-leise); }

/* Kegelabende */
:root { --gold: #b8860b; --gold-flaeche: #fbf3dc; --stechen: #b3202a; --stechen-flaeche: #fdecec; }
@media (prefers-color-scheme: dark) { :root { --gold: #e3b341; --gold-flaeche: #2e2712; --stechen-flaeche: #3a1a1c; } }

.status { display: inline-block; font-size: .8rem; font-weight: 600; padding: .1rem .55rem; border-radius: 999px; border: 1px solid var(--linie); white-space: nowrap; }
.status-abgeschlossen { color: var(--plus); border-color: currentColor; }
.status-stechen { color: #fff; background: var(--stechen); border-color: var(--stechen); }
.status-geplant { color: var(--text-leise); }

.koenige { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.koenig { border-radius: 6px; padding: 1rem 1.25rem; border: 1px solid var(--linie); background: var(--karte); display: flex; gap: 1rem; align-items: center; }
.koenig-kegel { border-left: 6px solid var(--gold); background: var(--gold-flaeche); }
.koenig-pumpe { border-left: 6px solid var(--rot); }
.koenig-name { font: 600 1.6rem/1.1 var(--schrift-titel); }
.koenig-titel { font-size: .9rem; color: var(--text-leise); }
.krone { width: 36px; height: 30px; flex: none; }

/* Stechen: bewusst laut, solange es offen ist */
.stechen { border: 2px solid var(--stechen); background: var(--stechen-flaeche); border-radius: 6px; padding: 1rem 1.25rem; margin-bottom: 1.5rem; }
.stechen h2 { margin: 0 0 .25rem; color: var(--stechen); }
.stechen .feld ul { columns: 1; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.stechen-erledigt { border: 1px solid var(--linie); border-left: 6px solid var(--gold); background: var(--karte); border-radius: 6px; padding: .75rem 1.25rem; margin-bottom: .75rem; }

/* Erfassungsbogen */
.bogen th, .bogen td { padding: .35rem .4rem; }
.bogen th { font-size: .78rem; line-height: 1.2; vertical-align: bottom; }
.bogen .spieler { position: sticky; left: 0; background: var(--karte); z-index: 1; white-space: nowrap; font-weight: 600; min-width: 7.5rem; }
.bogen input[type=text] { width: 4.2rem; padding: .35rem .4rem; font: inherit; text-align: right; border: 1px solid var(--linie); border-radius: 4px; background: var(--karte); color: var(--text); }
.bogen input.grund { width: 8rem; text-align: left; }
.bogen input[type=checkbox] { width: 1.3rem; height: 1.3rem; accent-color: var(--gruen); }
.bogen tr.abwesend td:not(.spieler):not(.anw) { opacity: .3; }
.bogen tr.abwesend .spieler { color: var(--text-leise); font-weight: 400; }
.bogen tr.hat-fehler td { background: var(--stechen-flaeche); }
.bogen .zeilenfehler td { color: var(--minus); font-size: .85rem; padding-top: 0; }
.bogen .preis { display: block; font-weight: 400; color: var(--text-leise); }
.kopf-felder { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 1rem; }

/* Saison-Matrix */
.matrix th, .matrix td { padding: .35rem .5rem; font-size: .9rem; }
.matrix td.zahl, .matrix th.zahl { min-width: 3.2rem; }
.matrix .summe { font-weight: 700; background: var(--flaeche); }
.matrix .spieler { position: sticky; left: 0; background: var(--karte); white-space: nowrap; }
.matrix .bester { color: var(--gold); font-weight: 700; }
.matrix .krone-zelle { color: var(--gold); font-weight: 700; }
.saisonwahl { display: flex; gap: .4rem; flex-wrap: wrap; }

/* Auswahl im Stechen als große Schaltflächen */
.stechen .feld > div[id] { display: flex; flex-wrap: wrap; gap: .5rem; }
.stechen .feld > div[id] label { display: flex; gap: .5rem; align-items: center; font-weight: 600; margin: 0;
  padding: .55rem 1rem; border: 1px solid var(--linie); border-radius: 4px; background: var(--karte); cursor: pointer; }
.stechen .feld > div[id] label:has(:checked) { border-color: var(--stechen); box-shadow: inset 0 0 0 1px var(--stechen); }
.stechen .feld > div[id] input { accent-color: var(--stechen); width: 1.1rem; height: 1.1rem; }
.stechen .feld input[type=text] { max-width: 24rem; }
.matrix .bester-pumpe { color: var(--rot); }
main.breit { max-width: 1600px; }
.bogen thead th { min-width: 5rem; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
.matrix td.schnitt, td.schnitt { font-style: italic; color: var(--text-leise); }

/* Druck: Spielbericht und Saisonübersicht */
@media print {
  @page { size: A4 landscape; margin: 12mm; }
  :root { --flaeche: #fff; --karte: #fff; --text: #000; --text-leise: #444; --linie: #999; color-scheme: light; }
  body { background: #fff; font-size: 10pt; }
  .nicht-drucken, .meldungen, .stechen form, .knopf { display: none !important; }
  main, main.breit { max-width: none; padding: 0; }
  .tafel { background: #fff; color: #000; border: 1px solid #000; }
  .tafel-wert.minus { color: #000; }
  .tabelle-wrap { overflow: visible; border-color: #999; }
  th, td { padding: .2rem .4rem; }
  .koenig { break-inside: avoid; }
  table, h2 { break-inside: avoid-page; }
  a { color: inherit; text-decoration: none; }
}

/* Satzung */
.satzung-aktuell { display: grid; grid-template-columns: 1fr minmax(260px, 340px); gap: 1.5rem; align-items: center; margin-bottom: 1rem; }
@media (max-width: 720px) { .satzung-aktuell { grid-template-columns: 1fr; } }
.matrix td.geaendert { background: var(--gold-flaeche); font-weight: 700; }
.matrix tr.trenner td { border-top: 2px solid var(--linie); }
.matrix th .preis { display: block; font-weight: 400; color: var(--text-leise); }
.feld input[type=file] { border: 1px dashed var(--linie); padding: .75rem; background: var(--flaeche); }
.feld input:disabled { opacity: .6; }

/* Dashboard */
.saison-wahl { display: flex; align-items: center; gap: .5rem; }
.saison-wahl label { font-weight: 600; }
.saison-wahl select { font: inherit; padding: .45rem .6rem; border: 1px solid var(--linie); border-radius: 4px; background: var(--karte); color: var(--text); min-width: 9rem; }
.dashboard { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; align-items: start; }
.feld-karte { background: var(--karte); border: 1px solid var(--linie); border-radius: 6px; padding: 1rem 1.25rem 1.25rem; }
.feld-karte header { margin-bottom: .75rem; }
.feld-karte h2 { margin: 0; display: flex; align-items: center; gap: .5rem; font-size: 1.35rem; }
.feld-karte h2 .krone { width: 26px; height: 22px; }
.feld-karte .leer { padding: 1.5rem 0; text-align: center; color: var(--text-leise); }
.rangliste { list-style: none; margin: 0; padding: 0; }
.rangliste li { display: grid; grid-template-columns: 2rem minmax(5.5rem, auto) 1fr 3.2rem; align-items: center; gap: .5rem; padding: .3rem 0; border-bottom: 1px solid var(--linie); }
.rangliste li:last-child { border-bottom: 0; }
.rangliste .platz { color: var(--text-leise); font-variant-numeric: tabular-nums; text-align: right; }
.rangliste .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rangliste .wert { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.balken { height: .7rem; background: var(--flaeche); border-radius: 999px; overflow: hidden; }
.balken > span { display: block; height: 100%; border-radius: 999px; min-width: 2px; }
.balken-kegel { background: var(--gold); }
.balken-pumpe { background: var(--rot); }
.rangliste li.fuehrend .name, .rangliste li.fuehrend .wert { color: var(--gold); font-weight: 700; }
.rangliste li.fuehrend-pumpe .name, .rangliste li.fuehrend-pumpe .wert { color: var(--rot); font-weight: 700; }
.titel-zeile { margin: .75rem 0 0; padding-top: .5rem; border-top: 2px solid var(--gold); }
.termin-datum { display: flex; align-items: center; gap: 1rem; margin: .5rem 0 .75rem; }
.termin-tag { font: 600 3.4rem/1 var(--schrift-titel); color: #fff; background: var(--gruen-tief); border-bottom: 4px solid var(--rot); border-radius: 6px; padding: .5rem .75rem; font-variant-numeric: tabular-nums; }
.termin-monat { font: 600 1.4rem/1.2 var(--schrift-titel); }
.termin-countdown { font-size: 1.05rem; }
.letzter-abend { margin-top: 1rem; padding-top: .75rem; border-top: 1px solid var(--linie); font-size: .95rem; }
.tafel-klein { padding: .9rem 1.25rem; margin-bottom: 1.5rem; }
.tafel-klein .tafel-wert { font-size: 1.7rem; }

/* Schmale Bildschirme und Tablets: Menü als eigene (wischbare) Zeile unter Logo und Benutzer */
@media (max-width: 1000px) {
  .kopf-innen { gap: .5rem; padding: .6rem .75rem; justify-content: space-between; }
  .nav { order: 3; flex: 1 0 100%; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
         margin: 0 -.75rem; padding: 0 .75rem .2rem; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .benutzer { gap: .5rem; font-size: .85rem; }
  .kopfzeile h1 { font-size: 1.6rem; }
}

/* Reiter Übersicht / Spieltag */
.matrix .info-zeile th, .matrix .info-zeile td { font-size: .78rem; font-weight: 600; background: var(--flaeche); line-height: 1.25; vertical-align: top; }
.matrix .info-spiel td { color: var(--text-leise); font-weight: 400; }
.matrix .info-gold td { color: var(--gold); }
.matrix .info-rot td { color: var(--rot); }
.matrix thead .info-zeile:last-child th, .matrix thead .info-zeile:last-child td { border-bottom: 2px solid var(--linie); }
.spieltage tr.naechster td { background: var(--gold-flaeche); }
.spieltage .aktionen { min-width: 11rem; }
.spieltage .aktionen-liste { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .25rem .75rem; }
.spieltage .datum-zelle { white-space: nowrap; }
.gefahr-link { color: var(--minus) !important; }
.knopf-rechts { margin-left: auto; }
.matrix .info-zeile td { text-align: right; }
.bogen thead th.zahl { white-space: normal; min-width: 4.8rem; }

/* Vereinslogo */
.marke-logo { width: 52px; height: 52px; flex: none; border-radius: 50%; margin: -4px 0; }
.marke { gap: .7rem; }
.anmelden-logo { display: block; width: 100%; max-width: 300px; height: auto; margin: 0 auto 1.25rem; border-radius: 6px; }
@media (prefers-color-scheme: dark) { .anmelden-logo { background: #fff; padding: .5rem; } }
.unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nur-drucken { display: none; }
@media print {
  .nur-drucken { display: flex; }
  .druck-kopf { align-items: center; gap: .6rem; font: 600 14pt var(--schrift-titel); margin-bottom: 8mm; padding-bottom: 3mm; border-bottom: 1px solid #999; }
}
@media (max-width: 720px) { .marke-logo { width: 34px; height: 34px; } }
.fuss { max-width: 1240px; margin: 0 auto; padding: 0 1rem 2rem; font-size: .8rem; color: var(--text-leise); }
.benutzer .symbol { display: inline-flex; width: 1.9rem; height: 1.9rem; align-items: center; justify-content: center; border-radius: 4px; text-decoration: none; }
.benutzer .symbol:hover { background: rgba(255,255,255,.12); }
.benutzer .symbol svg { width: 1.15rem; height: 1.15rem; }
.strafen-detail thead th.zahl { white-space: normal; min-width: 4.5rem; font-size: .78rem; vertical-align: bottom; }
/* Ausdruck: Erklärtexte unter den Tabellen weglassen (Spielbericht, Übersicht) */
@media print { main p.leise { display: none !important; } }

/* Gemeinsamer Ausdruck: Spielbericht + Jahresübersicht */
.druckansicht .druck-seite > h1 { margin-bottom: .2rem; }
.druck-unterzeile { color: var(--text-leise); margin: 0 0 1rem; }
.druckansicht .druck-seite + .druck-seite { margin-top: 3rem; padding-top: 2rem; border-top: 2px dashed var(--linie); }
@media print {
  .druck-neue-seite { break-before: page; page-break-before: always; }
  .druckansicht .druck-seite + .druck-seite { margin-top: 0; padding-top: 0; border-top: 0; }
  .druck-block { break-inside: avoid; page-break-inside: avoid; }
  .druck-block h2 { margin-top: 4mm; }
  .matrix th, .matrix td { padding: .12rem .3rem; font-size: 8pt; }
  .koenige { margin-bottom: 3mm; }
  .koenig { padding: .4rem .8rem; }
  .koenig-name { font-size: 14pt; }
  .tafel { padding: .5rem 1rem; }
  .tafel-wert { font-size: 16pt; }
  h1 { font-size: 18pt; }
  h2 { font-size: 12pt; margin: 4mm 0 2mm; }
}

/* Kompakter Ausdruck (Spielbericht + Jahresübersicht), überschreibt die allgemeinen Druckregeln */
@media print {
  @page { size: A4 landscape; margin: 9mm 10mm; }
  body { font-size: 9pt; line-height: 1.3; }
  table { break-inside: auto; page-break-inside: auto; }
  tr { break-inside: avoid; }
  h2 { break-after: avoid; page-break-after: avoid; }
  th, td { padding: .06rem .35rem !important; font-size: 8pt !important; line-height: 1.25 !important; }
  .tabelle-wrap { border-radius: 0; }
  .druck-kopf { margin-bottom: 3mm; padding-bottom: 2mm; font-size: 11pt; }
  .druck-kopf img { width: 30px; height: 30px; }
  h1 { font-size: 15pt; margin: 0 0 1mm; }
  h2 { font-size: 10.5pt; margin: 3mm 0 1.5mm; }
  .druck-unterzeile, .kopfzeile .leise { font-size: 8.5pt; margin-bottom: 2mm; }
  .kopfzeile { margin-bottom: 2mm; }
  .koenige { gap: 3mm; margin-bottom: 2mm; }
  .koenig { padding: 1.5mm 3mm; gap: 2mm; }
  .koenig .krone { width: 22px; height: 18px; }
  .koenig-name { font-size: 12pt; }
  .koenig-titel { font-size: 8pt; }
  .tafel { padding: 1.5mm 4mm; gap: 2mm; margin-bottom: 2mm !important; border-bottom-width: 2px; }
  .tafel-wert { font-size: 13pt; }
  .tafel-label { font-size: 7.5pt; margin-top: 0; }
  .stechen, .stechen-erledigt { padding: 1.5mm 3mm; margin-bottom: 2mm; font-size: 8.5pt; }
  .stechen h2 { margin: 0; }
  .status, .marke-text { font-size: 7pt; padding: 0 .3rem; }
  .druck-block { break-inside: avoid; page-break-inside: avoid; }
  .druck-block h2 { margin-top: 3mm; }
  .matrix .info-zeile th, .matrix .info-zeile td { font-size: 7pt !important; }
  .strafen-detail thead th.zahl { min-width: 0; }
  .fuss { display: none; }
}
@media print {
  .druckansicht .druck-seite:first-child th, .druckansicht .druck-seite:first-child td,
  .druck-seite th, .druck-seite td { padding-top: 0 !important; padding-bottom: 0 !important; line-height: 1.18 !important; }
  .druck-seite .koenige { margin-bottom: 1.5mm; }
  .druck-seite .tafel { padding: 1mm 4mm; }
  .druck-seite .tafel-wert { font-size: 12pt; }
  .druck-seite h2 { margin: 2mm 0 1mm; }
  .druck-seite .stechen-erledigt { padding: 1mm 3mm; margin-bottom: 1.5mm; }
}

/* Ausgefallene Termine */
.status-ausgefallen { color: var(--text-leise); border-style: dashed; text-decoration: line-through; }
.spieltage tr.ausgefallen-zeile td { color: var(--text-leise); }
.spieltage tr.ausgefallen-zeile td:nth-child(2) strong { text-decoration: line-through; }
.matrix th.ausgefallen a { text-decoration: line-through; color: var(--text-leise); }
.matrix td.ausgefallen { background: repeating-linear-gradient(135deg, transparent 0 6px, var(--flaeche) 6px 9px); color: var(--text-leise); }
.matrix .info-zeile td.ausgefallen { font-style: italic; font-weight: 400; color: var(--text-leise); }
.inline-form { display: inline; margin: 0; }
.link-knopf { background: none; border: 0; padding: 0; font: inherit; color: var(--gruen); text-decoration: underline; cursor: pointer; }
@media (prefers-color-scheme: dark) { .link-knopf { color: #7fcf98; } }
@media print { .matrix td.ausgefallen { background: #eee; } }

/* Strichlisten-Uploads */
.strichlisten { margin: 2rem 0 1rem; padding: 1rem 1.25rem; background: var(--karte); border: 1px solid var(--linie); border-radius: 6px; }
.strichlisten-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.strichliste-karte { margin: 0; border: 1px solid var(--linie); border-radius: 4px; overflow: hidden; background: var(--flaeche); }
.strichliste-karte a { display: flex; align-items: center; justify-content: center; height: 150px; background: var(--flaeche); text-decoration: none; }
.strichliste-karte img { width: 100%; height: 100%; object-fit: cover; }
.strichliste-karte figcaption { padding: .35rem .5rem; font-size: .8rem; display: flex; justify-content: space-between; gap: .5rem; align-items: center; }
.strichliste-karte figcaption form { margin: 0; }
.datei-symbol { font: 600 1.4rem var(--schrift-titel); color: var(--text-leise); border: 2px solid var(--linie); border-radius: 4px; padding: .6rem .8rem; }
.strichliste-upload { display: flex; flex-wrap: wrap; gap: .5rem .75rem; align-items: center; }
.strichliste-upload input[type=file] { font: inherit; max-width: 100%; }
@media print { .strichlisten { display: none !important; } }

/* Einstellungen */
.einstellungen { max-width: 760px; }
.einstellungen section { margin-bottom: 1rem; }
.einstellungen h2 { margin-top: 0; }
.farbwahl { display: flex; align-items: center; gap: .75rem; }
.farbwahl input[type=color] { width: 3.5rem !important; height: 2.4rem; padding: .15rem !important; cursor: pointer; }
.logo-wahl { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.logo-vorschau-rund { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; display: block; margin-bottom: .75rem; background: #fff; }
.logo-vorschau-voll { max-width: 220px; max-height: 110px; display: block; margin-bottom: .75rem; background: #fff; border-radius: 4px; padding: .25rem; }
.marke-logo { object-fit: cover; background: #fff; }
.hinweis-box { background: var(--gold-flaeche); border-left: 6px solid var(--gold); border-radius: 6px; padding: .85rem 1.1rem; margin-bottom: 1.25rem; font-weight: 600; }

/* Mitgliederfotos */
.avatar { display: inline-flex; flex: none; border-radius: 50%; object-fit: cover; vertical-align: middle; }
.avatar-initialen { align-items: center; justify-content: center; background: var(--gruen); color: #fff; font-weight: 700; letter-spacing: .02em; }
.mit-avatar { display: flex; align-items: center; gap: .5rem; }
td.mit-avatar { display: table-cell; }
td.mit-avatar .avatar { margin-right: .5rem; }
.rangliste .name.mit-avatar { gap: .4rem; }
.rangliste li { grid-template-columns: 2rem minmax(7rem, auto) 1fr 3.2rem; }
@media print { .avatar { display: none !important; } }
.duplikat { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .4rem 0; border-top: 1px solid var(--linie); }
/* Mittlere Breiten: Schriftzug ausblenden, damit alle Menüpunkte in eine Zeile passen (Logo bleibt) */
@media (min-width: 1001px) and (max-width: 1200px) {
  .marke-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .marke { gap: 0; }
}

/* Zugänge */
.zugaenge td { vertical-align: middle; }
.marke-text.rolle { margin: 0 .15rem .15rem 0; display: inline-block; }
.klein { font-size: .78rem; }
.verknuepfen { display: flex; gap: .4rem; align-items: center; margin: 0; }
.verknuepfen select { font: inherit; padding: .3rem .4rem; border: 1px solid var(--linie); border-radius: 4px; background: var(--karte); color: var(--text); }
.rollen-erklaerung { margin-top: 1.5rem; }
.rollen-erklaerung summary { cursor: pointer; }
.startpasswort code.passwort { font-size: 1.4rem; letter-spacing: .06em; padding: .15rem .5rem; background: var(--gold-flaeche); border-radius: 4px; }
.startpasswort textarea { width: 100%; font: .95rem ui-monospace, Consolas, monospace; padding: .6rem; border: 1px solid var(--linie); border-radius: 4px; background: var(--flaeche); color: var(--text); }

/* Vorlage Strichliste */
.vorlage-aktuell { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .75rem; }
.vorlage-name { font: 600 1.25rem var(--schrift-titel); }
.vorlage-upload summary, .vorlage-upload + details summary { cursor: pointer; }

.strichliste-wahl { align-items: center; }
.strichliste-wahl select { font: inherit; padding: .45rem .5rem; border: 1px solid var(--linie); border-radius: 4px; background: var(--karte); color: var(--text); }
.strichliste-wahl label { display: inline-flex; gap: .3rem; align-items: center; }

/* Vorschlag aus der Foto-Erkennung */
.vorschlag { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 420px); gap: 1.25rem; align-items: start;
  background: var(--gold-flaeche); border-left: 6px solid var(--gold); border-radius: 6px; padding: 1rem 1.25rem; margin: 1rem 0; }
.vorschlag h2 { margin: 0 0 .4rem; font-size: 1.1rem; }
.vorschlag ul { margin: .4rem 0; padding-left: 1.2rem; }
.vorschlag-bild img { width: 100%; border-radius: 4px; border: 1px solid var(--linie); display: block; }
@media (max-width: 800px) { .vorschlag { grid-template-columns: 1fr; } }
td.unsicher { background: rgba(255, 150, 0, .28) !important; box-shadow: inset 0 0 0 2px rgb(255, 150, 0); }
.strichliste-karte figcaption { flex-wrap: wrap; }
