/* ============================================================
   TV Saanen-Gstaad – Design «Alpin & Warm»
   Crème, Tannengrün und Holztöne – warm und bodenständig
   ============================================================ */

:root {
  --tanne: #2f4a3e;
  --gruen: #2f4a3e; /* Hintergrund grüner Sektionen (im Dark Mode separat) */
  --tanne-dunkel: #24382f;
  --creme: #f7f2e9;
  --creme-dunkel: #efe6d7;
  --holz: #b0663c;
  --rot: #c23b2e;
  --text: #33352f;
  --text-hell: #77796f;
  --weiss: #ffffff;
  --radius: 18px;
  --schatten: 0 6px 24px rgba(47, 74, 62, 0.08);
  --schatten-gross: 0 14px 40px rgba(47, 74, 62, 0.16);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

::selection { background: var(--tanne); color: var(--creme); }

body {
  font-family: Georgia, "Times New Roman", serif;
  background: var(--creme);
  color: var(--text);
  line-height: 1.65;
  font-size: 16.5px;
}

h1, h2, h3, h4, .sans {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

img { max-width: 100%; display: block; }

a { color: var(--rot); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ---------- Barrierefreiheit: Skip-Link & Tastatur-Fokus ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 300;
  background: var(--tanne);
  color: var(--creme);
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 0 0 14px 0;
}
.skip-link:focus {
  left: 0;
  text-decoration: none;
  outline: 3px solid var(--holz);
  outline-offset: 2px;
}
a:focus-visible, button:focus-visible, summary:focus-visible,
input:focus-visible, textarea:focus-visible, [data-riege]:focus-visible {
  outline: 3px solid var(--holz);
  outline-offset: 2px;
  border-radius: 4px;
}
#inhalt:focus { outline: none; }

/* ---------- Header / Navigation ---------- */
header {
  background: var(--creme);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 2px solid var(--tanne);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 74px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  color: var(--tanne);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.1rem;
}
.logo:hover { text-decoration: none; }
.logo img { height: 46px; }

nav#nav { display: flex; gap: 2px; }

nav#nav a {
  padding: 10px 18px;
  color: var(--tanne);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 999px;
}
nav#nav a:hover { background: var(--creme-dunkel); text-decoration: none; }
nav#nav a.aktiv { background: var(--tanne); color: var(--creme); }

/* Animierte Unterstreichung der Navigation */
nav#nav a { position: relative; }
nav#nav a::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 7px;
  height: 2px;
  border-radius: 2px;
  background: var(--holz);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .28s ease;
}
nav#nav a:hover::after { transform: scaleX(1); }
nav#nav a.aktiv::after { display: none; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--tanne);
  cursor: pointer;
  padding: 6px 10px;
}

.header-turner {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--tanne);
  min-width: 0;
}
.header-turner svg { height: 48px; width: auto; }
@media (max-width: 880px) { .header-turner { display: none; } }

/* ---------- Tauschbörse: Formulare ---------- */
.tb-form {
  background: var(--weiss);
  border-radius: var(--radius);
  box-shadow: var(--schatten);
  padding: 24px 26px;
  margin-bottom: 36px;
}
.tb-form h3 { color: var(--tanne); font-size: 1.15rem; font-weight: 800; margin-bottom: 14px; }
.tb-felder { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tb-felder .voll { grid-column: 1 / -1; }
.tb-form label {
  display: block;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--holz);
  margin-bottom: 4px;
}
.tb-form input, .tb-form textarea {
  width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.95rem;
  padding: 10px 12px;
  border: 1px solid var(--creme-dunkel);
  border-radius: 8px;
  background: #fdfbf7;
  color: var(--text);
  box-sizing: border-box;
}
.tb-form input:focus, .tb-form textarea:focus { outline: 2px solid var(--tanne); background: var(--weiss); }
.tb-form button {
  margin-top: 14px;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
}
.tb-hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.kommentare { border-top: 1px dashed var(--creme-dunkel); margin-top: 12px; padding-top: 10px; }
.kommentar { font-size: 0.88rem; padding: 6px 0; font-family: -apple-system, BlinkMacSystemFont, sans-serif; }
.kommentar + .kommentar { border-top: 1px dashed var(--creme-dunkel); }
.kommentar .k-kopf { font-weight: 700; color: var(--tanne); font-size: 0.8rem; }
.kommentar .k-kopf small { color: var(--text-hell); font-weight: 500; margin-left: 6px; }
details.k-form { margin-top: 10px; }
details.k-form summary {
  cursor: pointer;
  list-style: none;
  color: var(--holz);
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
}
details.k-form summary::-webkit-details-marker { display: none; }
details.k-form .tb-felder { margin-top: 10px; }
@media (max-width: 600px) { .tb-felder { grid-template-columns: 1fr; } }

/* ---------- Hero (Startseite) ---------- */
.hero { padding: 44px 0 52px; }

.hero .wrap {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 50px;
  align-items: center;
}

.rubrik, .ueber {
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--holz);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.8rem;
  margin-bottom: 14px;
}

.hero h1 {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  color: var(--tanne);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.hero p {
  font-size: 1.08rem;
  margin: 18px 0 26px;
  font-style: italic;
}

.btn {
  display: inline-block;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  padding: 15px 32px;
  border-radius: 999px;
}
.btn:hover { text-decoration: none; }
.btn, .tb-form button { transition: transform .15s ease, background .2s ease; }
button.btn { cursor: pointer; font-size: 0.92rem; }
button.btn-linie { background: none; }
button.btn-tanne { background: var(--tanne); }
.btn:active, .tb-form button:active { transform: scale(0.96); }
.btn-tanne { background: var(--tanne); color: var(--creme); }
.btn-tanne:hover { background: var(--tanne-dunkel); }
.btn-linie { border: 2px solid var(--tanne); color: var(--tanne); margin-left: 10px; }
.btn-linie:hover { background: var(--creme-dunkel); }
.btn-creme { background: var(--creme); color: var(--tanne); }
.btn-creme:hover { background: var(--weiss); }

.hero .bild { position: relative; }
.hero .bild img.foto {
  border-radius: var(--radius);
  aspect-ratio: 4/3;
  width: 100%;
  object-fit: cover;
  box-shadow: 0 24px 60px rgba(47, 74, 62, 0.28);
}
.hero .bild img.marke {
  position: absolute;
  bottom: -26px;
  left: -26px;
  height: 96px;
  background: var(--creme);
  padding: 15px;
  border-radius: 50%;
  box-shadow: 0 10px 30px rgba(47, 74, 62, 0.25);
  cursor: pointer;
  transition: transform .2s;
}
.hero .bild img.marke:hover { transform: scale(1.08); }
@keyframes marke-dreht { to { transform: rotate(360deg) scale(1.08); } }
.hero .bild img.marke.dreht { animation: marke-dreht 0.7s ease; }
.zufall-hinweis {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(18, 18, 13, 0.65);
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 4px 16px;
  border-radius: 18px;
  /* Bei Hochformat-Bildern in mehrere Zeilen umbrechen statt abschneiden */
  width: max-content;
  max-width: calc(100% - 28px);
  box-sizing: border-box;
  text-align: center;
  line-height: 1.35;
}

/* ---------- Seitenkopf (Unterseiten) ---------- */
.seitenkopf {
  background: var(--gruen);
  color: var(--creme);
  padding: 30px 0 34px;
  position: relative;
  overflow: hidden;
}
.seitenkopf > .wrap { position: relative; }
.seitenkopf .ueber { color: #d9b98a; margin-bottom: 8px; font-size: 0.72rem; }
.seitenkopf h1 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.seitenkopf p { margin-top: 8px; max-width: 620px; font-style: italic; opacity: 0.9; font-size: 0.95rem; }

/* ---------- Sektionen ---------- */
section.gruen { background: var(--gruen); color: var(--creme); padding: 90px 0; position: relative; overflow: hidden; }
section.gruen > .wrap { position: relative; }
section.hell { padding: 90px 0; }

/* Dezentes Turnfiguren-Wasserzeichen in grünen Sektionen */
section.gruen::before, .seitenkopf::before {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -70px;
  width: min(430px, 45vw);
  aspect-ratio: 1;
  background: url("../bilder/logo_mark_weiss.png") center / contain no-repeat;
  opacity: 0.05;
  transform: rotate(-8deg);
  pointer-events: none;
}
.seitenkopf::before { width: 210px; right: 8px; bottom: -55px; opacity: 0.07; }
.abschnitt { padding: 70px 0; }

h2.gross {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 30px;
}
section.gruen h2.gross, section.gruen .gross { color: var(--creme); }
h2.gross, h2.mittel { color: var(--tanne); }
h2.mittel { font-size: 1.6rem; font-weight: 800; margin-bottom: 26px; }
.gruen .ueber { color: #d9b98a; }

/* ---------- Kacheln (Riegen-Einstieg) ---------- */
.kacheln {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 22px;
}
.kachel {
  background: var(--creme);
  color: var(--text);
  border-radius: var(--radius);
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
}
section.hell .kachel { background: var(--weiss); box-shadow: var(--schatten); }
.kachel, a.geschichte, .download { transition: transform .2s ease, box-shadow .2s ease; }
a.kachel:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--schatten-gross); }
.download:hover { transform: translateY(-2px); }
.kachel .icon { display: block; width: 38px; height: 38px; color: var(--holz); }
.kachel .icon svg { width: 100%; height: 100%; }
.gruppen-nav a svg { width: 17px; height: 17px; vertical-align: -3px; margin-right: 6px; }
.kachel h3 { color: var(--tanne); font-size: 1.3rem; font-weight: 800; margin: 12px 0 8px; }
.kachel p { font-size: 0.98rem; color: var(--text); }
.kachel .mehr {
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  display: inline-block;
  margin-top: auto; /* alle Links bündig am unteren Kachelrand */
  padding-top: 14px;
  color: var(--holz);
}

/* ---------- Termin-Karten ---------- */
.agenda-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}
.termin {
  background: var(--weiss);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--schatten);
  border-top: 5px solid var(--holz);
}
.termin .datum {
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 800;
  color: var(--holz);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.termin h3 { color: var(--tanne); font-size: 1.2rem; margin: 8px 0 6px; font-weight: 800; }
.termin p { font-size: 0.95rem; color: var(--text-hell); }

/* ---------- Geschichten / News-Karten ---------- */
.geschichten {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 26px;
}
.geschichte {
  background: var(--weiss);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--schatten);
  display: flex;
  flex-direction: column;
}
.geschichte img.titelbild { height: 210px; width: 100%; object-fit: cover; }
.geschichte img.titelbild, .riege img.titelbild { transition: transform .35s ease, opacity .5s ease; }
.geschichte:hover img.titelbild, .riege:hover img.titelbild { transform: scale(1.04); }

/* News-Bilder: ganz sichtbar und per Klick vergrösserbar */
#news-liste .geschichte img.titelbild,
#archiv-liste .geschichte img.titelbild {
  object-fit: contain;
  background: var(--creme-dunkel);
  cursor: zoom-in;
}

dialog.bild-dialog {
  border: none;
  background: transparent;
  padding: 0;
  max-width: none;
  position: fixed;
  inset: 0;
  margin: auto;
  width: fit-content;
  height: fit-content;
}
dialog.bild-dialog::backdrop { background: rgba(12, 16, 13, 0.85); }
dialog.bild-dialog img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  cursor: zoom-out;
}
.geschichte .body { padding: 26px 28px 30px; flex: 1; }
.kicker {
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  color: var(--holz);
}
.geschichte h3 { color: var(--tanne); font-size: 1.3rem; font-weight: 800; margin: 10px 0 8px; line-height: 1.25; }
.geschichte p { font-size: 0.98rem; color: var(--text-hell); }
.geschichte p strong { color: var(--text); }
.geschichte .fuss { margin-top: 12px; }

/* ---------- Riegen-Karten ---------- */
.riegen-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 26px; }
.riege {
  background: var(--weiss);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--schatten);
  display: flex;
  flex-direction: column;
}
.riege img.titelbild { height: 190px; width: 100%; object-fit: cover; }
.riege .body { padding: 24px 26px 28px; flex: 1; }
.riege h3 { color: var(--tanne); font-size: 1.3rem; font-weight: 800; margin: 8px 0 10px; }
.riege p.beschrieb { font-size: 0.98rem; color: var(--text-hell); margin-bottom: 14px; }
.riege .fakt {
  display: flex;
  gap: 10px;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.9rem;
  padding: 7px 0;
  border-top: 1px dashed var(--creme-dunkel);
  align-items: baseline;
}
.riege .fakt .label {
  flex: 0 0 78px;
  font-weight: 700;
  color: var(--holz);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

details.mehr { margin-top: 8px; }
details.mehr summary {
  cursor: pointer;
  color: var(--holz);
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  list-style: none;
}
details.mehr summary::-webkit-details-marker { display: none; }
details.mehr summary::after { content: " ▾"; }
details.mehr[open] summary::after { content: " ▴"; }
details.mehr p { margin-top: 8px; color: var(--text-hell); font-size: 0.95rem; }

/* ---------- Riegen kompakt (Zeilen mit Aufklappen) ---------- */
.gruppen-nav {
  position: sticky;
  top: 74px;
  z-index: 50;
  background: var(--creme);
  padding: 14px 0;
  border-bottom: 1px solid var(--creme-dunkel);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.gruppen-nav a {
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--creme-dunkel);
  color: var(--tanne);
}
.gruppen-nav a:hover { background: var(--tanne); color: var(--creme); text-decoration: none; }

.riegen-gruppe { padding: 34px 0 6px; }
.riegen-gruppe .gruppen-titel {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
}
.riegen-gruppe h2 { color: var(--tanne); font-size: 1.45rem; font-weight: 800; }
.riegen-gruppe .alter {
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--holz);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

details.riege-zeile {
  background: var(--weiss);
  border-radius: 14px;
  box-shadow: var(--schatten);
  margin-bottom: 10px;
  overflow: hidden;
}
details.riege-zeile summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) minmax(140px, 1fr) minmax(170px, 1.3fr) 24px;
  gap: 14px;
  align-items: baseline;
  padding: 15px 20px;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}
details.riege-zeile summary::-webkit-details-marker { display: none; }
details.riege-zeile summary:hover { background: #fdfbf7; }
.rz-name { font-weight: 800; color: var(--tanne); font-size: 1.02rem; }
.rz-wer { color: var(--holz); font-weight: 600; font-size: 0.85rem; }
.rz-wann { color: var(--text-hell); font-size: 0.88rem; }
.rz-pfeil { color: var(--holz); font-weight: 800; text-align: right; transition: transform .2s; }
details.riege-zeile[open] .rz-pfeil { transform: rotate(180deg); }
details.riege-zeile[open] summary { border-bottom: 1px dashed var(--creme-dunkel); }
.rz-detail {
  padding: 18px 20px 20px;
  display: flex;
  gap: 22px;
  align-items: flex-start;
}
.rz-detail img { width: 180px; border-radius: 10px; object-fit: cover; aspect-ratio: 4/3; flex-shrink: 0; cursor: zoom-in; transition: transform .25s ease; }
.rz-detail img:hover { transform: scale(1.03); }
.rz-detail p { font-size: 0.97rem; color: var(--text); margin-bottom: 8px; }
.rz-detail .kontakt {
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.9rem;
  color: var(--text-hell);
}
.rz-detail .kontakt strong { color: var(--tanne); }
@media (max-width: 720px) {
  details.riege-zeile summary { grid-template-columns: 1fr 24px; }
  .rz-wer, .rz-wann { grid-column: 1; }
  .rz-pfeil { grid-row: 1; grid-column: 2; }
  .rz-detail { flex-direction: column; }
  .rz-detail img { width: 100%; }
  .gruppen-nav { top: 0; }
}

/* ---------- Jahreskalender ---------- */
.kalender {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}
.monat {
  background: var(--weiss);
  border-radius: 12px;
  box-shadow: var(--schatten);
  padding: 12px 16px 14px;
  border-top: 4px solid var(--tanne);
}
.monat h3 {
  color: var(--tanne);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 6px;
}
.monat.vorbei { opacity: 0.45; }
.monat.jetzt { border-top-color: var(--holz); }
.monat.jetzt h3::after {
  content: "aktuell";
  float: right;
  background: var(--holz);
  color: var(--weiss);
  font-size: 0.62rem;
  padding: 2px 9px;
  border-radius: 999px;
  letter-spacing: 0.06em;
}
.monat .leer { color: var(--text-hell); font-style: italic; font-size: 0.8rem; font-family: Georgia, serif; }
.ev { display: flex; gap: 10px; align-items: baseline; padding: 4px 0; font-family: -apple-system, BlinkMacSystemFont, sans-serif; }
.ev + .ev { border-top: 1px dashed var(--creme-dunkel); }
.ev .tag-badge {
  flex: 0 0 62px; /* breit genug für «01. + 08.» – alle Titel bündig */
  font-weight: 800;
  color: var(--holz);
  font-size: 0.78rem;
  white-space: nowrap;
}
.ev .was { font-weight: 600; color: var(--text); font-size: 0.85rem; line-height: 1.3; }
.ev .was small { display: block; color: var(--text-hell); font-weight: 500; font-size: 0.76rem; }
.ev.abgesagt { opacity: 0.65; }
.ev.abgesagt .tag-badge { text-decoration: line-through; }
.ev.abgesagt .was s { color: var(--text-hell); }
.ev.abgesagt .was small { color: var(--rot); font-style: italic; }

/* ---------- Anlass-Timeline (horizontal, unter dem Jahreskalender) ---------- */
.zeitachse-wrap { overflow-x: auto; margin-top: 46px; }
.zeitachse {
  position: relative;
  display: flex;
  min-width: 1150px;
  height: 230px;
  padding: 0 20px;
}
.zeitachse::before {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  top: 50%;
  height: 2px;
  border-radius: 2px;
  background: var(--creme-dunkel);
}
.ta-punkt { position: relative; flex: 1; min-width: 0; }
.ta-marke {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 11px;
  height: 11px;
  margin: -7.5px 0 0 -7.5px;
  border-radius: 50%;
  background: var(--tanne);
  border: 2px solid var(--creme);
  box-shadow: 0 0 0 2px var(--tanne);
  z-index: 2;
}
/* kurzer Verbindungsstrich Marke–Text */
.ta-punkt::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 1px;
  background: var(--creme-dunkel);
}
.ta-punkt.oben::after { bottom: 50%; height: 14px; margin-bottom: 8px; }
.ta-punkt.unten::after { top: 50%; height: 14px; margin-top: 8px; }
.ta-inhalt {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 112px;
  text-align: center;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}
.ta-punkt.oben .ta-inhalt { bottom: 50%; padding-bottom: 24px; }
.ta-punkt.unten .ta-inhalt { top: 50%; padding-top: 24px; }
.ta-datum {
  display: block;
  font-weight: 800;
  color: var(--holz);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.ta-titel {
  display: block;
  font-weight: 700;
  color: var(--tanne);
  font-size: 0.76rem;
  line-height: 1.25;
  margin-top: 2px;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}
.ta-titel a { color: inherit; }
.ta-vorbei { opacity: 0.45; }
.ta-vorbei .ta-marke { background: var(--text-hell); box-shadow: 0 0 0 2px var(--text-hell); }
.ta-abgesagt { opacity: 0.55; }
.ta-abgesagt .ta-marke { background: var(--creme-dunkel); box-shadow: 0 0 0 2px var(--text-hell); }
.ta-abgesagt .ta-titel s { color: var(--text-hell); }
.ta-naechster .ta-marke { background: var(--rot); box-shadow: 0 0 0 2px var(--rot); }
.ta-naechster .ta-titel, .ta-naechster .ta-datum { color: var(--rot); }
.ta-badge {
  display: inline-block;
  background: var(--rot);
  color: var(--weiss);
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 1px 9px;
  border-radius: 999px;
  margin-top: 3px;
}

/* ---------- Trainings-Zeitachse (ohne Scrollen, passt sich der Breite an) ---------- */
.zeitplan {
  display: grid;
  grid-template-columns: 52px repeat(4, 1fr);
  gap: 0 10px;
}
@media (max-width: 760px) {
  .zeitplan { grid-template-columns: 44px repeat(4, 1fr); gap: 0 5px; }
  .zeitplan .zp-kopf { font-size: 0.62rem; letter-spacing: 0.04em; padding: 6px 4px; }
  .zp-block { padding: 3px 5px; border-left-width: 3px; left: 2px; right: 2px; }
  .zp-block .zeit { font-size: 0.56rem; }
  .zp-block .name { font-size: 0.64rem; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
  .zp-block .ort { font-size: 0.56rem; }
  .zp-zeitspalte span { font-size: 0.62rem; right: 4px; }
}
.zeitplan .zp-kopf {
  background: var(--tanne);
  color: var(--creme);
  border-radius: 10px;
  padding: 8px 10px;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-align: center;
  margin-bottom: 10px;
}
.zp-zeitspalte { position: relative; height: 480px; }
.zp-zeitspalte span {
  position: absolute;
  right: 8px;
  transform: translateY(-50%);
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-hell);
}
.zp-tag {
  position: relative;
  height: 480px;
  background: var(--weiss);
  border-radius: 12px;
  box-shadow: var(--schatten);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0px, transparent 95px,
    var(--creme-dunkel) 95px, var(--creme-dunkel) 96px
  );
}
.zp-block {
  position: absolute;
  left: 4px;
  right: 4px;
  background: var(--creme);
  border-left: 4px solid var(--holz);
  border-radius: 8px;
  padding: 5px 8px;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(47, 74, 62, 0.12);
}
.zp-block .zeit { font-weight: 800; color: var(--holz); font-size: 0.68rem; letter-spacing: 0.03em; }
.zp-block .name { font-weight: 700; color: var(--tanne); font-size: 0.8rem; line-height: 1.2; }
.zp-block .ort { color: var(--text-hell); font-size: 0.68rem; line-height: 1.2; }
.morgen-band {
  display: flex;
  gap: 12px;
  align-items: baseline;
  background: var(--weiss);
  border-left: 4px solid #c9a227;
  border-radius: 10px;
  box-shadow: var(--schatten);
  padding: 10px 16px;
  margin-bottom: 18px;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  flex-wrap: wrap;
}
.zp-block[data-riege], .morgen-band[data-riege] { cursor: pointer; transition: transform .12s, box-shadow .12s; }
.zp-block[data-riege]:hover { transform: scale(1.02); box-shadow: 0 6px 18px rgba(47, 74, 62, 0.28); z-index: 3; }
.morgen-band[data-riege]:hover { box-shadow: var(--schatten-gross); }

/* Riegen-Pop-up */
dialog.riege-dialog {
  border: none;
  border-radius: var(--radius);
  padding: 0;
  max-width: 400px;
  width: calc(100% - 40px);
  background: var(--creme);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  position: fixed;
  inset: 0;
  margin: auto;
  height: fit-content;
}
dialog.riege-dialog::backdrop { background: rgba(36, 56, 47, 0.65); }
.rd-bild { width: 100%; height: 150px; object-fit: cover; display: block; }
.rd-body { padding: 18px 22px 22px; }
.rd-body .kicker { font-size: 0.72rem; }
.rd-body h3 {
  color: var(--tanne);
  font-size: 1.2rem;
  font-weight: 800;
  margin: 4px 0 8px;
}
.rd-body p.beschrieb { font-size: 0.88rem; margin-bottom: 12px; }
.rd-fakt {
  display: flex;
  gap: 10px;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.82rem;
  padding: 7px 0;
  border-top: 1px dashed var(--creme-dunkel);
  align-items: baseline;
}
.rd-fakt .label {
  flex: 0 0 78px;
  font-weight: 700;
  color: var(--holz);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.rd-schliessen {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(247, 242, 233, 0.92);
  color: var(--tanne);
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}
.rd-schliessen:hover { background: #fff; }

.morgen-band .zeit { font-weight: 800; color: #c9a227; font-size: 0.8rem; }
.morgen-band .name { font-weight: 700; color: var(--tanne); }
.morgen-band .ort { color: var(--text-hell); font-size: 0.85rem; }

/* ---------- Tabellen ---------- */
.tabelle-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--schatten);
  background: var(--weiss);
}
table.plan { width: 100%; border-collapse: collapse; min-width: 620px; }
table.plan th {
  background: var(--tanne);
  color: var(--creme);
  text-align: left;
  padding: 14px 18px;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
table.plan td { padding: 13px 18px; border-top: 1px solid var(--creme-dunkel); font-size: 0.96rem; }
table.plan tr:nth-child(even) td { background: #fdfbf7; }
table.plan td.tag-zelle {
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  color: var(--tanne);
  white-space: nowrap;
}

/* ---------- Downloads ---------- */
.download-liste { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.download {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--weiss);
  border-radius: 14px;
  border-left: 5px solid var(--holz);
  padding: 18px 20px;
  box-shadow: var(--schatten);
  color: var(--tanne);
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
}
.download:hover { text-decoration: none; box-shadow: var(--schatten-gross); }
.download .pdf-icon {
  flex: 0 0 48px;
  height: 48px;
  background: var(--holz);
  color: #ffffff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.download small { font-weight: 500; }
.download small { display: block; color: var(--text-hell); font-weight: 500; }

.download-liste.vier-spaltig { grid-template-columns: repeat(4, 1fr); }
.vier-spaltig .download { font-size: 0.88rem; padding: 13px 14px; gap: 11px; }
.vier-spaltig .download .pdf-icon { flex: 0 0 36px; height: 36px; font-size: 0.62rem; }
@media (max-width: 1000px) { .download-liste.vier-spaltig { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .download-liste.vier-spaltig { grid-template-columns: 1fr; } }

/* ---------- Vorstand: Kontaktkarten ---------- */
.kontakt-band {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
  margin: -10px 0 30px;
}
.kontakt-karte {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--weiss);
  border-radius: 14px;
  padding: 14px 18px;
  box-shadow: var(--schatten);
  color: var(--text);
  transition: transform .2s ease, box-shadow .2s ease;
}
.kontakt-karte:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--schatten-gross); }
.kontakt-karte > span:last-child { min-width: 0; }
.kontakt-karte strong { overflow-wrap: anywhere; }
.kk-icon {
  flex: 0 0 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--creme-dunkel);
  color: var(--holz);
  display: flex;
  align-items: center;
  justify-content: center;
}
.kk-icon svg { width: 20px; height: 20px; }
.kk-label {
  display: block;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--holz);
}
.kontakt-karte strong {
  color: var(--tanne);
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.95rem;
}
.kontakt-karte small {
  display: block;
  color: var(--text-hell);
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.8rem;
}

/* ---------- Personen (Vorstand) ---------- */
.person-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 20px; }
.person {
  background: var(--weiss);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--schatten);
  text-align: center;
  border-top: 5px solid var(--tanne);
}
.person .p-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: var(--creme-dunkel);
  color: var(--holz);
  display: flex;
  align-items: center;
  justify-content: center;
}
.person .p-icon svg { width: 21px; height: 21px; }
.person .rolle {
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--holz);
  margin-bottom: 6px;
}
.person .name { font-family: -apple-system, BlinkMacSystemFont, sans-serif; font-size: 1.12rem; font-weight: 800; color: var(--tanne); margin-bottom: 4px; }
.person a { font-family: -apple-system, BlinkMacSystemFont, sans-serif; font-size: 0.88rem; word-break: break-all; }

/* ---------- Zitat ---------- */
.zitat { text-align: center; max-width: 760px; margin: 0 auto; }
.zitat blockquote { font-size: clamp(1.4rem, 3vw, 2rem); font-style: italic; color: var(--creme); line-height: 1.4; }
.zitat cite {
  display: block;
  margin-top: 18px;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: 0.9rem;
  color: #d9b98a;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

/* ---------- Kopf mit Foto-Slider ---------- */
.kopf-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 40px;
  align-items: center;
}
.kopf-slider {
  position: relative;
  aspect-ratio: 16/9;
  width: 100%;
  max-width: 320px;
  justify-self: end;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}
.kopf-slider img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.kopf-slider img.sichtbar { opacity: 1; }
.kopf-slider .sl-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: rgba(247, 242, 233, 0.88);
  color: var(--tanne);
  font-size: 1.15rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.kopf-slider .sl-btn:hover { background: #ffffff; }
.kopf-slider .sl-btn.zurueck { left: 12px; }
.kopf-slider .sl-btn.weiter { right: 12px; }

/* Volle-Breite-Karte mit Icons (Tauschbörse) */
.geschichten .breit { grid-column: 1 / -1; }
.breit-body { display: flex; justify-content: space-between; align-items: center; gap: 36px; }
.tausch-icons { display: flex; gap: 24px; padding-right: 20px; flex-shrink: 0; }
.tausch-icons svg { width: 58px; height: 58px; color: var(--holz); opacity: 0.8; }
@media (max-width: 720px) { .tausch-icons { display: none; } }

hr.trenner {
  border: none;
  border-top: 1px solid rgba(247, 242, 233, 0.25);
  margin: 32px 0;
}

.archiv-akkordeon { margin-top: 36px; overflow-anchor: none; }
.archiv-akkordeon summary {
  cursor: pointer;
  color: #d9b98a;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  list-style: none;
}
.archiv-akkordeon summary::-webkit-details-marker { display: none; }
.archiv-akkordeon summary::after { content: " ▾"; }
.archiv-akkordeon[open] summary::after { content: " ▴"; }
@media (max-width: 880px) {
  .kopf-grid { grid-template-columns: 1fr; }
  .kopf-slider { display: none; }
}

/* ---------- Fotogalerie ---------- */
.galerie {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.galerie a {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--schatten);
}
.galerie img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform .25s, opacity .5s ease;
}
.galerie a:hover img { transform: scale(1.05); }

/* Links-Karten: vier nebeneinander */
.links-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
.links-grid .geschichte .body { padding: 18px 20px 20px; }
.links-grid .geschichte h3 { font-size: 1.02rem; margin: 6px 0 6px; }
.links-grid .geschichte p { font-size: 0.85rem; line-height: 1.7; }
.links-grid .kicker { font-size: 0.65rem; }
@media (max-width: 1000px) { .links-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .links-grid { grid-template-columns: 1fr; } }

/* Kompaktes Album-Raster */
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.album-grid .geschichte img.titelbild { height: 125px; }
.album-grid .geschichte .body { padding: 12px 15px 14px; }
.album-grid .geschichte h3 { font-size: 1rem; margin: 3px 0 0; line-height: 1.25; }
.album-grid .kicker { font-size: 0.65rem; }
.album-grid .anzahl { top: 8px; right: 8px; font-size: 0.68rem; padding: 3px 9px; }

a.geschichte { color: inherit; }

/* Platzhalter-Album (Fotos folgen noch) */
.album-karte.platzhalter {
  border: 2px dashed var(--creme-dunkel);
  box-shadow: none;
  background: transparent;
}
.album-karte.platzhalter .anzahl { background: var(--holz); }
.platzhalter-text {
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.78rem;
  color: var(--text-hell);
  font-style: italic;
  margin-top: 4px;
}
a.geschichte:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--schatten-gross); transition: all .2s; }

.album-karte { position: relative; }
.album-karte .anzahl {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(36, 56, 47, 0.85);
  color: var(--creme);
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 4px 12px;
  border-radius: 999px;
}

/* ---------- Fotoarchiv (grosser Aufklapp-Button + kompakte Albenliste) ---------- */
.foto-archiv { margin-top: 36px; }
.foto-archiv summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--gruen);
  color: var(--creme);
  border-radius: var(--radius);
  padding: 20px 26px;
  box-shadow: var(--schatten);
  transition: transform .2s ease, box-shadow .2s ease;
}
.foto-archiv summary::-webkit-details-marker { display: none; }
.foto-archiv summary:hover { transform: translateY(-2px); box-shadow: var(--schatten-gross); }
.fa-icon {
  flex: 0 0 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(247, 242, 233, 0.14);
  color: #d9b98a;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fa-icon svg { width: 24px; height: 24px; }
.fa-text strong {
  display: block;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.12rem;
  font-weight: 800;
  color: #f1ecdf;
}
.fa-text small { color: #cfd8cf; font-family: -apple-system, BlinkMacSystemFont, sans-serif; font-size: 0.85rem; }
.fa-pfeil { margin-left: auto; color: #d9b98a; font-size: 1.25rem; transition: transform .25s ease; }
.foto-archiv[open] .fa-pfeil { transform: rotate(180deg); }
.archiv-alben {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 14px;
}
.aa-jahr {
  background: var(--weiss);
  border-radius: 14px;
  box-shadow: var(--schatten);
  border-top: 4px solid var(--tanne);
  padding: 13px 16px 9px;
}
.aa-jahr h3 {
  color: var(--tanne);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 5px;
}
.aa-album {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 6px 0;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.87rem;
  font-weight: 600;
  line-height: 1.3;
}
.aa-album + .aa-album { border-top: 1px dashed var(--creme-dunkel); }
.aa-album:hover { text-decoration: none; color: var(--holz); }
.aa-anzahl { color: var(--text-hell); font-size: 0.73rem; font-weight: 700; white-space: nowrap; }
.aa-anzahl::after { content: " Fotos"; }

/* ---------- Hinweis ---------- */
.hinweis {
  background: var(--creme-dunkel);
  border-left: 5px solid var(--holz);
  border-radius: 12px;
  padding: 16px 22px;
  font-size: 0.98rem;
  margin: 0 0 36px;
  font-style: italic;
}

/* ---------- Footer (kompakt) ---------- */
footer {
  background: var(--tanne-dunkel);
  color: #cfd8cf;
  padding: 34px 0 22px;
  position: relative;
  overflow: hidden;
}
/* Turnfiguren-Wasserzeichen wie in den grünen Sektionen */
footer::before {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -55px;
  width: min(300px, 40vw);
  aspect-ratio: 1;
  background: url("../bilder/logo_mark_weiss.png") center / contain no-repeat;
  opacity: 0.05;
  transform: rotate(-8deg);
  pointer-events: none;
}
footer > .wrap, footer .footer-ende { position: relative; }
.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
  align-items: start;
}
.fahne-logo-zeile { display: flex; align-items: center; gap: 16px; margin-bottom: 10px; }
footer img.footer-logo { height: 54px; opacity: 0.95; }
footer img.footer-fahne { height: 84px; width: 84px; object-fit: cover; border-radius: 10px; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3); }
footer h4 { color: var(--creme); margin-bottom: 7px; font-size: 0.92rem; }
footer ul { list-style: none; }
footer li { margin-bottom: 4px; }
footer a { color: #cfd8cf; font-family: -apple-system, BlinkMacSystemFont, sans-serif; font-size: 0.88rem; }
footer a:hover { color: var(--weiss); }
footer .sponsor { font-size: 0.82rem; font-style: italic; line-height: 1.5; }
.footer-ende {
  text-align: center;
  margin-top: 24px;
  font-size: 0.8rem;
  color: #93a596;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  position: relative;
}
/* Diskreter Admin-Login unten rechts */
.footer-ende .admin-login {
  position: absolute;
  right: 24px;
  bottom: 0;
  font-size: 0.75rem;
  color: #5f7264;
  opacity: 0.8;
}
.footer-ende .admin-login:hover { color: #cfd8cf; text-decoration: none; opacity: 1; }
/* Schmale Bildschirme: Schalter, ©-Zeile und Login untereinander statt überlappend */
@media (max-width: 620px) {
  .footer-ende {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  .thema-schalter, .footer-ende .admin-login { position: static; }
}

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .nav-toggle { display: block; }
  nav#nav {
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    background: var(--creme);
    border-bottom: 2px solid var(--tanne);
    display: none;
    flex-direction: column;
    padding: 14px 20px 20px;
    gap: 4px;
    box-shadow: 0 16px 30px rgba(47, 74, 62, 0.18);
  }
  nav#nav.offen { display: flex; }
  .hero { padding: 50px 0 60px; }
  .hero .wrap { grid-template-columns: 1fr; }
  .hero .bild { display: none; }
  section.gruen, section.hell { padding: 60px 0; }
}

/* ---------- Feinschliff für Smartphones ---------- */
@media (max-width: 880px) {
  /* Hero-Foto samt klickbarem Logo auch auf dem Handy zeigen (unterhalb des Texts) */
  .hero .bild { display: block; margin-top: 30px; }
  .hero .bild img.marke { height: 72px; bottom: -16px; left: 8px; padding: 11px; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 18px; }
  .btn { padding: 13px 26px; font-size: 0.95rem; }
  section.gruen, section.hell, .abschnitt { padding: 48px 0; }
  .geschichte .body { padding: 20px 20px 24px; }
  .termin { padding: 20px; }
  .kachel { padding: 24px 22px; }
  .breit-body { gap: 0; }
  footer { padding: 28px 0 18px; }
  .seitenkopf::before { width: 150px; }
}
@media (max-width: 420px) {
  /* Sehr schmale Geräte: alles einspaltig, Galerie zweispaltig */
  .geschichten, .riegen-liste, .kacheln, .agenda-grid, .kalender,
  .person-grid, .download-liste, .kontakt-band, .videos-grid { grid-template-columns: 1fr; }
  .galerie { grid-template-columns: repeat(2, 1fr); }
  .album-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .logo { font-size: 1rem; }
  .logo img { height: 40px; }
}

/* ---------- Videos ---------- */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.video-karte {
  background: var(--weiss);
  border-radius: 14px;
  box-shadow: var(--schatten);
  overflow: hidden;
}
.video-karte video { width: 100%; display: block; background: #000; aspect-ratio: 16/10; }
.video-titel {
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  color: var(--tanne);
  font-size: 0.85rem;
  padding: 10px 14px;
}

/* ---------- Galerie-Lightbox ---------- */
.lb-inner { position: relative; }
.lb-inner img { max-width: 92vw; max-height: 86vh; border-radius: 12px; display: block; transition: opacity .25s ease; }
.lb-inner .sl-btn {
  width: 42px;
  height: 42px;
  font-size: 1.4rem;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  border-radius: 50%;
  background: rgba(247, 242, 233, 0.88);
  color: var(--tanne);
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.lb-inner .sl-btn:hover { background: #ffffff; }
.kopf-slider .sl-btn:active, .lb-inner .sl-btn:active { transform: translateY(-50%) scale(0.88); }
.lb-inner .sl-btn.zurueck { left: 14px; }
.lb-inner .sl-btn.weiter { right: 14px; }
.lb-inner .rd-schliessen { top: 14px; right: 14px; }
.lb-zaehler {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(18, 18, 13, 0.65);
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 4px 14px;
  border-radius: 999px;
}

/* ---------- Berg-Silhouetten (Sektionsübergänge) ---------- */
.berge {
  position: relative;
  height: 68px;
  margin-bottom: -1px;
}
.berge::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--berg, var(--gruen));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 90' preserveAspectRatio='none'%3E%3Cpath d='M0 90V64L90 38l70 20L260 16l80 36 90-22 90 30 90-50 90 38 90-22 90 32 80-22 90 26 70-18 80 16v42Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 90' preserveAspectRatio='none'%3E%3Cpath d='M0 90V64L90 38l70 20L260 16l80 36 90-22 90 30 90-50 90 38 90-22 90 32 80-22 90 26 70-18 80 16v42Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.berge-zu-gruen { --berg: var(--gruen); }
.berge-zu-footer { --berg: var(--tanne-dunkel); }

/* ---------- Sanftes Auftauchen beim Scrollen ---------- */
@media (prefers-reduced-motion: no-preference) {
  .anim-bereit { opacity: 0; }
  .anim-sichtbar { opacity: 1; animation: auftauchen .6s cubic-bezier(0.25, 0.6, 0.3, 1) backwards; }
  @keyframes auftauchen {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: none; }
  }
}

/* ---------- Weiches Einblenden der Bilder beim Laden ---------- */
img.laedt { opacity: 0; }

/* ---------- Nach-oben-Knopf ---------- */
.nach-oben {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 150;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  background: var(--tanne);
  color: var(--creme);
  cursor: pointer;
  box-shadow: var(--schatten-gross);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease, background .2s ease;
}
.nach-oben.da { opacity: 1; pointer-events: auto; transform: none; }
.nach-oben:hover { background: var(--tanne-dunkel); }
.nach-oben svg { width: 22px; height: 22px; }

/* ---------- Teilen-Link bei News ---------- */
.teilen {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-hell);
}
.teilen svg { width: 14px; height: 14px; }
.teilen:hover { color: var(--holz); text-decoration: none; }
.geschichte .teilen-zeile { margin-top: 10px; }

/* ---------- Druckansicht (z. B. Jahreskalender & Trainingsplan) ---------- */
@media print {
  header, footer, .berge, .kopf-slider, .header-turner, .btn, button, .skip-link,
  .gruppen-nav, .zeitachse-wrap, .videos-grid, .nach-oben, dialog, .teilen-zeile { display: none !important; }
  body { background: #fff; color: #000; font-size: 12px; }
  .anim-bereit { opacity: 1 !important; }
  section.gruen, .seitenkopf { background: none; color: #000; padding: 8px 0; }
  section.gruen::before, .seitenkopf::before { display: none; }
  section.gruen h2.gross, section.gruen .gross, .seitenkopf h1,
  h2.gross, h2.mittel { color: #000; }
  .seitenkopf .ueber, .gruen .ueber { color: #555; }
  .wrap { max-width: none; padding: 0; }
  section.hell, section.gruen, .abschnitt { padding: 12px 0; }
  .monat, .termin, .geschichte, .download, .zp-tag, .person, .kontakt-karte {
    box-shadow: none; border: 1px solid #bbb; break-inside: avoid;
  }
  .zeitplan { min-width: 0; }
  a { color: #000; }
}

/* ---------- Konfetti (Klick aufs SM-Logo) ---------- */
img.titelbild[src*="sm-logo"] { cursor: pointer; } /* löst Konfetti aus statt Zoom */
.konfetti {
  position: fixed;
  z-index: 600;
  pointer-events: none;
  border-radius: 2px;
}

/* ---------- Dark Mode (per Schalter im Footer, Standard ist hell) ---------- */
html.dunkel {
  color-scheme: dark;
  --gruen: #1a2b22;
  --tanne: #cfe2d6;
  --tanne-dunkel: #131d16;
  --creme: #171d19;
  --creme-dunkel: #262f28;
  --holz: #d69a6b;
  --rot: #e0604f;
  --text: #d9d5c9;
  --text-hell: #9aa093;
  --weiss: #202823;
  --schatten: 0 6px 24px rgba(0, 0, 0, 0.35);
  --schatten-gross: 0 14px 40px rgba(0, 0, 0, 0.5);
}
html.dunkel section.gruen, html.dunkel .seitenkopf { color: #e7e3d6; }
html.dunkel section.gruen h2.gross, html.dunkel section.gruen .gross, html.dunkel .seitenkopf h1 { color: #eef0e5; }
html.dunkel .btn-tanne:hover { background: #b3ccbd; }
html.dunkel .btn-creme:hover { background: #242e26; }
html.dunkel header .logo img { filter: invert(0.88); }
html.dunkel .hero .bild img.marke { background: #f2ecdf; }
html.dunkel .tb-form input, html.dunkel .tb-form textarea { background: #262f28; border-color: #37423a; }
html.dunkel .tb-form input:focus, html.dunkel .tb-form textarea:focus { background: #2b352d; }
html.dunkel details.riege-zeile summary:hover { background: #262f28; }
html.dunkel table.plan tr:nth-child(even) td { background: #232b25; }
html.dunkel .ta-badge, html.dunkel .monat.jetzt h3::after { color: #1a1f1b; }
html.dunkel .album-karte .anzahl { color: #e7e3d6; }
html.dunkel footer h4 { color: #e7e3d6; }
html.dunkel .kopf-slider .sl-btn, html.dunkel .lb-inner .sl-btn, html.dunkel .rd-schliessen { color: #2f4a3e; }
html.dunkel .termin img { background: #f2ecdf; border-radius: 10px; padding: 6px; }
/* Dunkle SVG-Logos (z. B. SM-Logo) auf News-Karten im Dark Mode lesbar halten */
html.dunkel .geschichte img.titelbild[src$=".svg"] { background: #f2ecdf; }

/* Schalter im Footer */
.thema-schalter {
  position: absolute;
  left: 24px;
  bottom: -3px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid #4a5c4f;
  border-radius: 999px;
  padding: 3px 12px;
  color: #93a596;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease;
}
.thema-schalter:hover { color: #cfd8cf; border-color: #93a596; }
.thema-schalter svg { width: 13px; height: 13px; }
.thema-schalter .ts-sonne, .thema-schalter .ts-hell { display: none; }
html.dunkel .thema-schalter .ts-sonne, html.dunkel .thema-schalter .ts-hell { display: inline-flex; }
html.dunkel .thema-schalter .ts-mond, html.dunkel .thema-schalter .ts-dunkel { display: none; }
