/* Narrenverein Rhinschnooge Kappel e.V. – Homepage
   Vom Handy aus gedacht: Grundregeln gelten fürs Handy, @media (min-width) erweitert für größere Bildschirme.
   Reihenfolge: Schriften, Tokens, Grundlagen, Rahmen (Kopf, Leiste, Fuß), Bausteine, Seiten. */

@font-face { font-family: "Grenze"; src: url("../fonts/grenze.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Grenze Gotisch"; src: url("../fonts/grenze-gotisch.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("../fonts/source-sans-3.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("../fonts/source-sans-3-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  --auen: #1e5b3c;
  --auen-tief: #143f29;
  --auen-hell: #e3ece5;
  --wappen: #a3262a;
  --wappen-tief: #85191d;
  --tinte: #1b231f;
  --grau: #4f5954;          /* Nebentext: Kontrast 7:1 auf Weiß, auch draußen lesbar */
  --linie: #cfd6d1;
  --papier: #ffffff;
  --stein: #f1f3f0;

  --font-display: "Grenze", Georgia, serif;
  --font-ruf: "Grenze Gotisch", "Grenze", Georgia, serif;
  --font-text: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;

  --t-0: 1.125rem;  /* 18 */
  --t-1: 1.375rem;  /* 22 */
  --t-2: 1.75rem;   /* 28 */
  --t-3: 2.2rem;    /* 35 */
  --t-4: 2.75rem;   /* 44 */

  --wrap: 75rem;
  --gutter: 1rem;
  --space: 3rem;
  --tap: 3rem;          /* Mindesthöhe für Tippflächen: 48px */
  --tabbar: 4rem;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
@media (min-width: 600px) { :root { --gutter: 1.5rem; --space: 4.5rem; } }
@media (min-width: 900px) { :root { --gutter: 2.5rem; --space: 6rem; --tabbar: 0rem; } }

/* ---------- Grundlagen ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 1rem; }
body {
  margin: 0;
  background: var(--papier); color: var(--tinte);
  font-family: var(--font-text); font-size: var(--t-0); line-height: 1.6;
  padding-bottom: calc(var(--tabbar) + var(--safe-bottom));
  -webkit-tap-highlight-color: rgba(30, 91, 60, .15);
}
img { max-width: 100%; height: auto; display: block; }
picture { display: contents; }
a { color: var(--auen); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--auen-tief); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--wappen); outline-offset: 2px; }
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.1; overflow-wrap: break-word; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
button { font: inherit; color: inherit; }
dialog { color: var(--tinte); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 46rem; }
.icon { width: 1.4rem; height: 1.4rem; flex: none; }
.pending { color: var(--grau); font-style: italic; }
.only-desktop { display: none; }
@media (min-width: 900px) {
  .only-desktop { display: block; }
  .only-mobile { display: none !important; }
}
.note { color: var(--grau); margin-top: 1.5rem; max-width: 40rem; }

.skip { position: absolute; left: 1rem; top: -5rem; z-index: 60; background: var(--tinte); color: #fff; padding: .7rem 1rem; }
.skip:focus { top: 1rem; }

.preview-note { margin: 0; padding: .35rem var(--gutter); background: var(--tinte); color: #e9eee9; font-size: .875rem; line-height: 1.35; text-align: center; }

/* ---------- Kopf ---------- */
.masthead { background: var(--papier); border-bottom: 1px solid var(--linie); }
.bunting {
  height: 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='112' height='16'%3E%3Cpath d='M0 1.5H112' stroke='%231e5b3c' stroke-width='1.5'/%3E%3Cpath d='M2 2h24l-12 13z' fill='%231e5b3c'/%3E%3Cpath d='M30 2h24l-12 13z' fill='%231b231f'/%3E%3Cpath d='M58 2h24l-12 13z' fill='%23a3262a'/%3E%3Cpath d='M86 2h24l-12 13z' fill='%23aab2ad'/%3E%3C/svg%3E") repeat-x 0 0 / 84px 12px;
}
.masthead-inner { max-width: var(--wrap); margin: 0 auto; padding: .5rem var(--gutter); display: flex; align-items: center; gap: 1rem; min-height: 3.5rem; }
.brand { display: flex; align-items: center; gap: .6rem; min-height: 2.75rem; color: var(--tinte); text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 1rem; line-height: 1.05; }
.brand img { width: 30px; }
.topnav { display: none; }
.members-link {
  margin-left: auto; font-weight: 600; font-size: .95rem; text-decoration: none;
  color: var(--auen); padding: .55rem .2rem; min-height: 2.75rem; display: flex; align-items: center; text-align: right; line-height: 1.15;
}

@media (min-width: 900px) {
  .bunting { height: 16px; background-size: 112px 16px; }
  .masthead { position: sticky; top: 0; z-index: 30; }
  .brand { font-size: 1.05rem; }
  .brand img { width: 34px; }
  .topnav { display: flex; gap: 1.5rem; margin-left: auto; }
  .topnav a { color: var(--tinte); text-decoration: none; font-weight: 600; padding: .4rem 0; }
  .topnav a:hover, .topnav a[aria-current="page"] { color: var(--auen); box-shadow: inset 0 -3px 0 var(--auen); }
  .members-link { margin-left: 1.5rem; border: 2px solid var(--auen); border-radius: 2px; padding: .35rem .85rem; min-height: 0; }
  .members-link:hover { background: var(--auen); color: #fff; }
  html { scroll-padding-top: 6rem; }
}

/* ---------- Untere Leiste (Handy) ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--papier); border-top: 1px solid var(--linie);
  padding-bottom: var(--safe-bottom);
  box-shadow: 0 -1px 0 rgba(0, 0, 0, .03);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem;
  height: var(--tabbar); color: var(--grau); text-decoration: none;
  font-size: .8rem; font-weight: 600; line-height: 1;
}
.tabbar a[aria-current="page"] { color: var(--auen); box-shadow: inset 0 3px 0 var(--auen); }
.tabbar .icon { width: 1.6rem; height: 1.6rem; }
@media (min-width: 900px) { .tabbar { display: none; } }

/* ---------- Fuß ---------- */
.footer { background: var(--auen-tief); color: #dbe7de; padding: 2.5rem 0 3rem; font-size: 1rem; }
.footer a { color: #fff; }
.footer-grid { display: grid; gap: 1.5rem; }
.footer-ruf { font-family: var(--font-ruf); font-weight: 800; font-size: var(--t-3); color: #fff; line-height: 1; margin-bottom: 1rem; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; }
.footer-links a { display: flex; align-items: center; min-height: var(--tap); }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.2fr 1fr auto; gap: 2rem; } }

/* ---------- Bausteine ---------- */
.section { padding: var(--space) 0; }
.section-first { padding-top: 2rem; }
.section-stone { background: var(--stein); }
.section-green { background: var(--auen); color: #fff; }
.section-green a { color: #fff; }

.page-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.3rem, 9vw, 3.6rem); margin-bottom: .75rem; }
.page-title-year { color: var(--grau); font-weight: 600; }
.section-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.9rem, 7vw, 3.2rem); margin-bottom: .75rem; max-width: 22ch; }
.section-green .section-title { color: #fff; }
.section-intro { max-width: 40rem; font-size: 1.15rem; margin-bottom: 1.75rem; }
.sub-title { font-family: var(--font-display); font-weight: 700; font-size: var(--t-2); margin-bottom: .6rem; }
.list-title { font-family: var(--font-display); font-weight: 700; font-size: var(--t-1); margin: 1.75rem 0 .4rem; }
.list-title:first-child { margin-top: 0; }
.stand { display: block; color: var(--grau); font-size: 1rem; margin-top: .4rem; }
.more-link { margin-top: 1.25rem; font-weight: 600; }
.more-link a { display: inline-flex; align-items: center; min-height: var(--tap); }
.back-link { margin: 0 0 .5rem; }
.back-link a { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 600; }
.back-link a::before { content: "‹"; font-size: 1.5rem; line-height: 1; margin-right: .4rem; }

.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font: 700 1.05rem/1.2 var(--font-text); text-decoration: none; text-align: center;
  color: #fff; background: var(--auen); border: 2px solid var(--auen); border-radius: 2px;
  padding: .65rem 1.1rem; min-height: var(--tap); cursor: pointer;
}
.button:hover { background: var(--auen-tief); border-color: var(--auen-tief); color: #fff; }
.button-quiet { background: transparent; color: var(--auen); }
.button-quiet:hover { background: var(--auen-hell); color: var(--auen-tief); border-color: var(--auen); }
.button-small { min-height: 2.75rem; padding: .4rem .8rem; font-size: 1rem; }
.button-block { width: 100%; }
.button[data-done] { background: var(--auen-tief); border-color: var(--auen-tief); color: #fff; }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  font: 600 1rem var(--font-text); color: var(--auen);
  background: var(--papier); border: 2px solid var(--auen); border-radius: 2px;
  padding: .4rem .8rem; min-height: var(--tap); cursor: pointer;
}
.chip:hover { background: var(--auen-hell); }
.chip[aria-pressed="true"] { background: var(--auen); color: #fff; }

.field-label { display: block; font-weight: 600; margin: 1rem 0 .35rem; }
.field {
  width: 100%; font: 400 1.15rem var(--font-text); color: var(--tinte);
  background: var(--papier); border: 2px solid var(--tinte); border-radius: 2px;
  padding: .7rem .8rem; min-height: 3.25rem; -webkit-appearance: none; appearance: none;
}
.field::-webkit-search-cancel-button { -webkit-appearance: none; }

/* ---------- Saisonstreifen ---------- */
.season-banner {
  display: flex; align-items: center; justify-content: center; gap: .4rem; min-height: var(--tap);
  background: var(--wappen); color: #fff; text-decoration: none; font-size: 1.05rem; padding: .5rem var(--gutter); text-align: center;
}
.season-banner:hover { background: var(--wappen-tief); color: #fff; }

/* ---------- Start: Logo, Als Nächstes, Narrenruf ---------- */
.home-hero { padding: 1.25rem 0 var(--space); }
.home-grid { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
.emblem-stage { position: relative; width: fit-content; margin: 0 auto; }
.emblem-img { height: min(38vh, 34rem); width: auto; mix-blend-mode: multiply; }
.emblem-spots { position: absolute; inset: 0; }
.spot { position: absolute; background: none; border: 0; padding: 0; cursor: pointer; border-radius: 2px; }
.spot:focus-visible { outline-offset: 0; }
.spot[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--wappen); background: rgba(163, 38, 42, .07); }
@media (hover: hover) { .spot:hover { box-shadow: 0 0 0 2px var(--auen); background: rgba(30, 91, 60, .05); } }
.emblem-choices { margin-top: .75rem; text-align: center; }
.emblem-hint { margin: 0 0 .4rem; color: var(--grau); font-size: 1rem; }
/* Handy: eine Zeile, notfalls seitlich schiebbar */
.emblem-choices .chips { flex-wrap: nowrap; overflow-x: auto; justify-content: safe center; gap: .4rem; padding-bottom: 2px; scrollbar-width: none; }
.emblem-choices .chips::-webkit-scrollbar { display: none; }
.emblem-choices .chip { flex: none; font-size: .95rem; padding: .35rem .6rem; }
@media (max-width: 439px) {
  .emblem-choices .chips { display: grid; grid-template-columns: 1fr 1fr; overflow: visible; }
}
.home-grid { gap: 1.25rem; }

/* Reihenfolge: Narrenruf, Begrüßung, „Als Nächstes“ */
.home-side { display: flex; flex-direction: column; }
.home-side .ruf { order: 1; }
.home-side .hero-lead { order: 2; }
.home-side .next-block { order: 3; margin-top: 1.75rem; }
.next-block { border-top: 3px solid var(--wappen); padding-top: 1rem; }
.next-label { margin: 0 0 .2rem; font-weight: 700; color: var(--wappen); font-size: 1rem; }
.next-date { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: var(--t-3); line-height: 1; color: var(--wappen); }
.next-day { font-size: 1.45em; font-weight: 800; }
.next-title { margin: .4rem 0 0; font-family: var(--font-display); font-weight: 700; font-size: var(--t-2); line-height: 1.15; }
.next-meta { margin: .2rem 0 0; color: var(--grau); }

.ruf { font-family: var(--font-ruf); font-weight: 800; font-size: clamp(2.1rem, 9.5vw, 3.9rem); line-height: 1; margin: 0 0 1rem; }
.ruf-line { display: block; }
.ruf-line + .ruf-line { margin-top: .12em; }
.ruf-answer { color: var(--auen); }
.hero-lead { max-width: 34rem; font-size: 1.15rem; }

/* Desktop: Erklärung zur Figur direkt neben dem Logo */
.home-side.is-figure > :not(.figure-panel) { display: none; }
.figure-panel { max-width: 36rem; }
.figure-panel:focus { outline: none; }
.figure-back {
  background: none; border: 0; padding: .4rem 0; margin-bottom: .75rem; cursor: pointer;
  font-weight: 600; color: var(--auen); text-decoration: underline; text-underline-offset: .18em; min-height: 2.75rem;
}
.figure-panel .sheet-title { font-size: var(--t-4); }
.figure-panel.is-entering { animation: panel-in .25s ease-out; }
@keyframes panel-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (min-width: 900px) {
  .home-hero { padding-top: clamp(1.5rem, 3vw, 3rem); }
  .home-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
  .emblem-stage { margin: 0; }
  .emblem-img { height: auto; width: 100%; max-width: 28rem; }
  .emblem-choices { text-align: left; max-width: 28rem; }
  .emblem-choices .chips { justify-content: flex-start; flex-wrap: wrap; overflow: visible; }
  .emblem-choices .chip { font-size: 1rem; padding: .4rem .8rem; }
  .home-side { padding-top: 1rem; }
  .home-side .next-block { margin-top: 2rem; max-width: 34rem; }
  .ruf-answer { display: block; padding-left: clamp(1.25rem, 3vw, 2.75rem); }
}

/* ---------- Termine ---------- */
.events { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--linie); }
.event-row {
  display: grid; grid-template-columns: 4.6rem minmax(0, 1fr) auto; gap: .9rem; align-items: center;
  width: 100%; min-height: 5.5rem; padding: .9rem 0; text-align: left;
  background: none; border: 0; border-bottom: 1px solid var(--linie); cursor: pointer;
}
.event-row:hover { background: var(--stein); }
.event-date { font-family: var(--font-display); color: var(--wappen); line-height: 1; }
.event-day { display: block; font-size: var(--t-3); font-weight: 800; }
.event-month { display: block; font-size: 1.05rem; font-weight: 600; margin-top: .1rem; }
.event-tbd { display: block; font-family: var(--font-text); font-size: .95rem; font-weight: 700; color: var(--grau); line-height: 1.2; }
.event-body { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.event-title { font-family: var(--font-display); font-weight: 700; font-size: var(--t-1); line-height: 1.15; hyphens: auto; }
.event-meta { color: var(--grau); font-size: 1rem; line-height: 1.35; }
.event-note { color: var(--grau); font-size: .95rem; line-height: 1.35; font-style: italic; }
.event-more {
  font-weight: 700; font-size: .95rem; color: var(--auen); padding-right: .25rem;
  display: flex; align-items: center; gap: .2rem;
}
.event-more::after { content: "›"; font-size: 1.6rem; line-height: 1; font-weight: 400; }
@media (min-width: 600px) {
  .event-row { grid-template-columns: 6rem minmax(0, 1fr) auto; gap: 1.5rem; padding: 1.1rem .5rem; }
  .event-day { font-size: var(--t-4); }
}

.help { margin-top: 1.5rem; border-top: 1px solid var(--linie); border-bottom: 1px solid var(--linie); }
.help summary { cursor: pointer; min-height: var(--tap); display: flex; align-items: center; font-weight: 700; color: var(--auen); }
.help p { margin: .5rem 0 1rem; }
.copy-line { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.copy-line code { font-size: .95rem; background: var(--papier); border: 1px solid var(--linie); padding: .3rem .5rem; overflow-wrap: anywhere; }

/* ---------- Blatt (Bottom Sheet, am Desktop Seitenpanel) ---------- */
.sheet {
  position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: none;
  max-height: 88vh; max-height: 88dvh; padding: 0; border: 0;
  background: var(--papier); border-radius: 10px 10px 0 0;
  overflow: hidden; display: none; flex-direction: column;
  padding-bottom: var(--safe-bottom);
}
.sheet[open] { display: flex; animation: sheet-up .26s cubic-bezier(.2, .8, .2, 1); }
.sheet::backdrop { background: rgba(20, 30, 24, .45); }
.sheet.is-dragging { animation: none; transition: none; }
.sheet.is-closing { transition: transform .2s ease-in; transform: translateY(100%); }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
.sheet-grip { width: 3rem; height: 5px; border-radius: 3px; background: #b9c2bc; margin: .6rem auto .2rem; flex: none; touch-action: none; }
.sheet-bar { display: flex; justify-content: flex-end; padding: 0 .5rem; flex: none; touch-action: none; }
.sheet-close {
  background: none; border: 0; font-weight: 700; color: var(--auen); min-height: var(--tap); padding: 0 .75rem; cursor: pointer;
  text-decoration: underline; text-underline-offset: .18em;
}
.sheet-body { overflow-y: auto; padding: 0 var(--gutter) 1.5rem; overscroll-behavior: contain; }
.sheet-title { font-family: var(--font-display); font-weight: 800; font-size: var(--t-3); color: var(--auen); margin: 0 0 .5rem; }
.sheet-sub { font-weight: 700; color: var(--wappen); margin: 0 0 .25rem; font-size: 1.1rem; }
.sheet-photo { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; margin: .5rem 0 .4rem; }
.sheet-caption { color: var(--grau); font-size: .95rem; margin: 0 0 1rem; }
.sheet-emblem { width: 10rem; height: auto; margin: .5rem 0 .4rem; mix-blend-mode: multiply; }
.sheet-actions { display: grid; gap: .6rem; margin-top: 1.25rem; }
.sheet-actions .button { justify-content: flex-start; width: 100%; }
.sheet-steps { display: flex; justify-content: space-between; gap: .75rem; margin-top: 1.5rem; border-top: 1px solid var(--linie); padding-top: .75rem; }
.sheet-steps button { background: none; border: 0; color: var(--auen); font-weight: 700; min-height: var(--tap); padding: 0 .25rem; cursor: pointer; }
.sheet-steps button:disabled { color: var(--linie); cursor: default; }
@media (min-width: 900px) {
  .sheet { inset: 0 0 0 auto; width: 28rem; max-height: none; height: 100%; border-radius: 0; }
  .sheet[open] { animation-name: sheet-in; }
  .sheet.is-closing { transform: translateX(100%); }
  .sheet-grip { display: none; }
  .sheet-bar { padding-top: .75rem; }
  @keyframes sheet-in { from { transform: translateX(100%); } to { transform: none; } }
}

/* ---------- Teaser ---------- */
.teaser { display: grid; gap: 1.75rem; align-items: center; }
.teaser-map { display: block; border: 1px solid var(--linie); background: var(--papier); padding: .5rem; }
.teaser-photo { margin: 0; }
.teaser-photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.teaser-photo figcaption { color: var(--grau); font-size: .95rem; margin-top: .35rem; }
@media (min-width: 900px) { .teaser { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4rem; } }

/* ---------- Plan (gemeinsame Zeichnung) ---------- */
.map-static, .map-live { display: block; width: 100%; height: auto; }
.map-art .road { fill: none; stroke: #f0dd8a; stroke-linecap: round; stroke-linejoin: round; }
.map-art .road-main { stroke-width: 26; }
.map-art .road-minor { stroke: #e2e5e1; stroke-width: 14; }
.map-art .lineup-line { fill: none; stroke: var(--auen); stroke-width: 20; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.map-art .wagon-line { fill: none; stroke: #6f9a3a; stroke-width: 20; stroke-linecap: round; }
.map-art .route { fill: none; stroke: var(--wappen); stroke-width: 7; stroke-dasharray: 2 13; stroke-linecap: round; stroke-linejoin: round; }
.map-art .street-label { font: 600 22px var(--font-text); fill: #49524d; }
.map-art .place-label { font: 700 26px var(--font-display); fill: var(--tinte); }
.map-art .dir-label { font: 400 19px var(--font-text); fill: var(--grau); }
.map-art .end-label { font: 800 40px var(--font-display); fill: var(--wappen); }
.map-art .wc rect { fill: var(--tinte); }
.map-art .wc text { font: 700 15px var(--font-text); fill: #fff; }
.map-art .pin circle { fill: var(--papier); stroke: var(--wappen); stroke-width: 3.5; }
.map-art .pin text { font: 700 21px var(--font-text); fill: var(--wappen); pointer-events: none; }
.map-art .pin.is-own circle { fill: var(--auen); stroke: var(--auen); }
.map-art .pin.is-own text { fill: #fff; }
.map-art .is-highlight .lineup-line, .map-art .lineup-line.is-highlight { stroke: var(--wappen); opacity: 1; }

/* Plan im Vollbild: Nummern sind tippbar */
.map-live .pin { cursor: pointer; }
.map-live .pin:focus { outline: none; }
.map-live .pin:focus-visible circle { stroke: var(--tinte); stroke-width: 6; }
.map-live .pin[aria-pressed="true"] circle { fill: var(--wappen); stroke: var(--wappen); }
.map-live .pin[aria-pressed="true"] text { fill: #fff; }
.map-live .wc, .map-live .place-hit { cursor: pointer; }
.map-live .wc[aria-pressed="true"] rect { fill: var(--wappen); }
.map-live .place-hit { fill: transparent; }
.map-live .place-hit[aria-pressed="true"] { fill: rgba(163, 38, 42, .12); stroke: var(--wappen); stroke-width: 3; }

/* ---------- Umzugsseite ---------- */
.umzug-when { font-family: var(--font-display); font-weight: 700; font-size: var(--t-1); color: var(--wappen); margin: 0 0 .5rem; }
.umzug-grid { display: grid; gap: 2.5rem; }
@media (min-width: 900px) { .umzug-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 3rem; align-items: start; } }

/* Desktop: Plan direkt anklickbar, Details und Standliste daneben */
.map-inline { background: var(--papier); border: 1px solid var(--linie); padding: .75rem; }
.map-inline .pin:hover circle { stroke-width: 6; }
.station-detail { border-top: 3px solid var(--wappen); padding-top: 1rem; margin-bottom: 2rem; min-height: 7rem; }
.station-detail-num { font-family: var(--font-display); font-weight: 800; font-size: var(--t-4); line-height: 1; color: var(--wappen); margin: 0; }
.station-detail-name { font-family: var(--font-display); font-weight: 700; font-size: var(--t-2); margin: .3rem 0 .2rem; line-height: 1.15; }
.stations { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 1rem; }
.stations li { break-inside: avoid; }
.station-btn {
  display: flex; gap: .55rem; align-items: baseline; width: 100%; min-height: 2.6rem;
  font: 400 1rem/1.3 var(--font-text); text-align: left;
  background: none; border: 0; border-radius: 2px; padding: .45rem .3rem; cursor: pointer;
}
.station-btn:hover { background: var(--auen-hell); }
.station-btn[aria-pressed="true"] { background: var(--wappen); color: #fff; }
.station-num { font-weight: 700; min-width: 1.4rem; color: var(--wappen); }
.station-btn[aria-pressed="true"] .station-num { color: #fff; }

.map-preview {
  position: relative; display: block; width: 100%; padding: .5rem; cursor: zoom-in;
  background: var(--papier); border: 1px solid var(--linie); border-radius: 2px;
}
.map-preview-label {
  position: absolute; left: .75rem; bottom: .75rem;
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--auen); color: #fff; font-weight: 700; padding: .6rem 1rem; min-height: var(--tap); border-radius: 2px;
}
.map-preview:hover .map-preview-label { background: var(--auen-tief); }

.legend { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem 1.2rem; margin: .8rem 0 0; padding: 0; font-size: .95rem; color: var(--grau); }
.legend li { display: flex; align-items: center; gap: .5rem; }
.key { display: inline-block; width: 1.8rem; height: .55rem; }
.key-route { background: radial-gradient(circle, var(--wappen) 45%, transparent 50%) 0 50% / .55rem .55rem repeat-x; }
.key-line { background: var(--auen); }
.key-wagons { background: #6f9a3a; }
.key-wc { width: auto; height: auto; background: var(--tinte); color: #fff; font: 700 .7rem var(--font-text); padding: .1rem .3rem; }

/* Gruppensuche */
.search-block { scroll-margin-top: 1rem; }
.combo { position: relative; }
.combo-options {
  list-style: none; margin: .25rem 0 0; padding: 0;
  background: var(--papier); border: 2px solid var(--tinte); border-radius: 2px;
  max-height: 20rem; overflow-y: auto;
}
.combo-options li {
  display: flex; gap: .75rem; align-items: center; min-height: 3.25rem; padding: .5rem .8rem;
  border-bottom: 1px solid var(--linie); cursor: pointer; line-height: 1.25;
}
.combo-options li:last-child { border-bottom: 0; }
.combo-options li[aria-selected="true"], .combo-options li:hover { background: var(--auen-hell); }
.combo-options .opt-pos { font-weight: 700; color: var(--grau); min-width: 1.8rem; text-align: right; font-variant-numeric: tabular-nums; }
.combo-options mark { background: none; color: var(--auen); font-weight: 700; }
.combo-status { min-height: 1.5em; margin: .5rem 0 0; color: var(--grau); }

.group-result, .my-group { border: 2px solid var(--wappen); background: var(--papier); padding: 1rem; margin-top: 1rem; }
.group-result:focus { outline: none; }
.my-group { margin: 0 0 2rem; }
.result-name { font-family: var(--font-display); font-weight: 700; font-size: var(--t-1); margin: 0 0 .5rem; line-height: 1.2; }
.result-pos { display: flex; align-items: baseline; gap: .5rem; margin: 0; color: var(--wappen); font-family: var(--font-display); }
.result-pos strong { font-size: 4rem; line-height: .9; font-weight: 800; }
.result-pos span { font-size: var(--t-1); font-weight: 700; }
.result-neighbours { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .5rem; }
.result-neighbours li { display: grid; grid-template-columns: 6.5rem 1fr; gap: .5rem; line-height: 1.3; }
.result-neighbours .label { color: var(--grau); }
.result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: 1.25rem; }
.result-forget { margin-top: .75rem; background: none; border: 0; color: var(--grau); text-decoration: underline; min-height: 2.75rem; padding: 0; cursor: pointer; font-size: 1rem; }

/* Orte entlang der Strecke */
.places-grid { display: grid; gap: 1rem 3rem; }
@media (min-width: 760px) { .places-grid { grid-template-columns: 1fr 1fr; } }
.place-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--linie); }
.place-row {
  display: flex; align-items: center; gap: .85rem; width: 100%; min-height: 3.25rem; padding: .4rem .25rem;
  background: none; border: 0; border-bottom: 1px solid var(--linie); text-align: left; cursor: pointer; line-height: 1.25;
}
.place-row:hover { background: var(--papier); }
.place-row::after { content: "›"; margin-left: auto; font-size: 1.6rem; color: var(--auen); line-height: 1; }
.place-mark {
  flex: none; display: grid; place-items: center; min-width: 2.2rem; height: 2.2rem; padding: 0 .35rem;
  border: 2.5px solid var(--wappen); border-radius: 999px; color: var(--wappen); font-weight: 700; font-size: .95rem; background: var(--papier);
}
.place-mark-own { background: var(--auen); border-color: var(--auen); color: #fff; }
.place-mark-wc { border-radius: 2px; background: var(--tinte); border-color: var(--tinte); color: #fff; font-size: .75rem; }
.place-mark-end { border-radius: 2px; border-color: var(--wappen); background: var(--wappen); color: #fff; font-size: .8rem; }
.place-mark-p { border-radius: 2px; border-color: #2e5c9a; background: #2e5c9a; color: #fff; }

/* Aufstellung */
.lineup-all { border-top: 1px solid var(--linie); border-bottom: 1px solid var(--linie); }
.lineup-all summary { cursor: pointer; min-height: var(--tap); display: flex; align-items: center; font-weight: 700; color: var(--auen); list-style: none; gap: .5rem; }
.lineup-all summary::-webkit-details-marker { display: none; }
.lineup-all summary::before { content: "+"; font-size: 1.4rem; width: 1rem; }
.lineup-all[open] summary::before { content: "–"; }
.lineup-list { list-style: none; margin: 0 0 1rem; padding: 0; }
.lineup-list li { border-top: 1px solid var(--linie); scroll-margin-top: 6rem; }
.lineup-btn {
  display: flex; gap: .75rem; width: 100%; min-height: 2.75rem; align-items: center;
  padding: .45rem .25rem; background: none; border: 0; text-align: left; line-height: 1.3; cursor: pointer;
}
.lineup-btn:hover { background: var(--auen-hell); }
.lineup-list li.is-hit .lineup-btn:hover { background: var(--wappen-tief); }
.lineup-list li.is-dim { opacity: .35; }
.lineup-pos { min-width: 2rem; text-align: right; color: var(--grau); font-variant-numeric: tabular-nums; }
.lineup-list li.is-home { font-weight: 700; color: var(--auen); }
.lineup-list li.is-hit { background: var(--wappen); color: #fff; }
.lineup-list li.is-hit .lineup-pos { color: #fff; }
/* Desktop: Suche links, ganze Aufstellung rechts immer sichtbar */
.lineup { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
@media (min-width: 900px) {
  .lineup { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 3rem; align-items: start; }
  .lineup .search-block { position: sticky; top: 6rem; }
  .lineup-all { border: 0; }
  .lineup-all summary { display: none; }
  .lineup-list { columns: 2; column-gap: 2rem; font-size: 1rem; }
  .lineup-list li { break-inside: avoid; }
}
.section-last { padding-top: 0; }
@media (min-width: 900px) { .section-last { padding-top: var(--space); } }

.live-note { margin-top: var(--space); border-left: 3px solid var(--wappen); padding-left: 1rem; }

/* ---------- Plan im Vollbild ---------- */
.viewer {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: #f6f7f5; display: none; flex-direction: column; overflow: hidden;
}
.viewer[open] { display: flex; }
.viewer::backdrop { background: #f6f7f5; }
.viewer-bar {
  display: flex; align-items: center; gap: 1rem; flex: none;
  padding: calc(.35rem + env(safe-area-inset-top, 0px)) .5rem .35rem var(--gutter);
  background: var(--papier); border-bottom: 1px solid var(--linie);
}
.viewer-title { font-family: var(--font-display); font-size: var(--t-1); margin: 0; }
.viewer-close {
  margin-left: auto; background: var(--auen); color: #fff; border: 0; border-radius: 2px;
  font-weight: 700; min-height: var(--tap); padding: 0 1.1rem; cursor: pointer;
}
.viewer-stage { position: relative; flex: 1; min-height: 0; touch-action: none; cursor: grab; overflow: hidden; }
.viewer-stage.is-panning { cursor: grabbing; }
.viewer-stage svg { width: 100%; height: 100%; }
.viewer-zoom {
  position: absolute; right: .75rem; bottom: calc(1rem + var(--safe-bottom)); display: grid; gap: .5rem; z-index: 2;
}
.viewer-zoom button {
  min-width: 3.25rem; min-height: 3.25rem; background: var(--papier); color: var(--tinte);
  border: 2px solid var(--tinte); border-radius: 2px; font-size: 1.6rem; font-weight: 700; line-height: 1; cursor: pointer;
}
.viewer-info {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  background: var(--papier); border-top: 3px solid var(--wappen);
  padding: .9rem var(--gutter) calc(1rem + var(--safe-bottom));
  display: grid; grid-template-columns: auto 1fr auto; gap: .25rem 1rem; align-items: start;
}
.viewer-info .place-mark { grid-row: span 2; margin-top: .15rem; }
.viewer-info-name { font-family: var(--font-display); font-weight: 700; font-size: var(--t-1); margin: 0; line-height: 1.2; }
.viewer-info-text { margin: 0; color: var(--grau); grid-column: 2; }
.viewer-info-close { grid-row: 1; grid-column: 3; background: none; border: 0; color: var(--auen); font-weight: 700; min-height: 2.75rem; cursor: pointer; text-decoration: underline; }
.viewer-info:not([hidden]) ~ .viewer-zoom, .viewer:has(.viewer-info:not([hidden])) .viewer-zoom { bottom: 8.5rem; }

/* ---------- Verein ---------- */
.groups { list-style: none; margin: 0; padding: 0; display: grid; gap: 2rem; }
.group img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; margin-bottom: .9rem; }
.group h2 { font-family: var(--font-display); font-weight: 800; font-size: var(--t-2); margin-bottom: .35rem; }
.group-textonly { border-top: 3px solid var(--auen); padding-top: 1rem; }
@media (min-width: 560px) { .groups { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .groups { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; } }

.timeline { list-style: none; margin: 1.25rem 0 0; padding: 0; max-width: 54rem; }
.timeline li { display: grid; gap: .5rem; padding: 1.5rem 0; border-top: 1px solid var(--linie); }
.year { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: var(--t-4); line-height: 1; color: var(--auen); }
.year-small { font-size: var(--t-2); }
.timeline blockquote { margin: 1rem 0; padding-left: 1rem; border-left: 3px solid var(--auen); font-family: var(--font-display); font-weight: 500; font-size: var(--t-1); line-height: 1.35; }
@media (min-width: 700px) { .timeline li { grid-template-columns: 11rem minmax(0, 1fr); gap: 2rem; } .year-small { padding-top: .4rem; } }

.presidents { margin-top: 2rem; max-width: 40rem; border-top: 1px solid var(--linie); border-bottom: 1px solid var(--linie); }
.presidents summary { cursor: pointer; min-height: var(--tap); display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-weight: 700; color: var(--auen); list-style: none; }
.presidents summary::-webkit-details-marker { display: none; }
.presidents summary::after { content: "+"; font-size: 1.5rem; }
.presidents[open] summary::after { content: "–"; }
.presidents table { border-collapse: collapse; width: 100%; margin-bottom: 1rem; }
.presidents th, .presidents td { text-align: left; padding: .5rem 0; border-top: 1px solid var(--linie); vertical-align: top; }
.presidents th { font-weight: 600; width: 7.5rem; color: var(--grau); font-variant-numeric: tabular-nums; }

.verses { margin: 1.5rem 0 0; padding-left: 1.6rem; font-size: 1.15rem; }
.verses li { margin-bottom: 1.1rem; padding-left: .3rem; }
.verses li::marker { font-family: var(--font-display); font-weight: 800; color: var(--auen); }
.verses .refrain { list-style: none; margin-left: -1.6rem; padding: .8rem 1rem; background: var(--auen-hell); font-weight: 600; }
.refrain-label { display: block; font-family: var(--font-display); font-weight: 700; color: var(--auen); }

.split { display: grid; gap: 2rem; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 5rem; } }
.section-green p { max-width: 36rem; font-size: 1.15rem; }
.contact dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .4rem 1.2rem; font-size: 1.1rem; }
.contact dt { color: #cfe0d4; }
.contact dd { margin: 0; font-weight: 600; }
.pending-light { margin-top: 1rem; color: #cfe0d4; font-style: italic; }

/* ---------- Bilder ---------- */
.year-jump { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; }
.year-jump a {
  display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; min-width: 3.75rem;
  border: 2px solid var(--auen); border-radius: 2px; text-decoration: none; font-weight: 700; padding: 0 .6rem;
}
.year-jump a:hover { background: var(--auen-hell); }
.year-block { padding-top: 1.5rem; }
.year-title { font-family: var(--font-display); font-weight: 800; font-size: var(--t-3); color: var(--auen); margin-bottom: .75rem; }
.gallery-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 1rem; }
@media (min-width: 700px) { .gallery-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .gallery-list { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.gallery-link { display: block; color: var(--tinte); text-decoration: none; }
.gallery-link img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin-bottom: .5rem; background: var(--stein); }
.gallery-title { display: block; font-weight: 700; line-height: 1.25; hyphens: auto; overflow-wrap: anywhere; }
.gallery-link:hover .gallery-title { color: var(--auen); text-decoration: underline; }
.gallery-meta { display: block; color: var(--grau); font-size: .95rem; }

.thumbs { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; }
@media (min-width: 700px) { .thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; } }
@media (min-width: 1100px) { .thumbs { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.thumbs a { display: block; }
.thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--stein); }

.lightbox {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: #111814; color: #fff; display: none; flex-direction: column;
}
.lightbox[open] { display: flex; }
.lightbox::backdrop { background: #111814; }
.lightbox-bar { display: flex; align-items: center; padding: calc(.35rem + env(safe-area-inset-top, 0px)) .5rem .35rem var(--gutter); flex: none; }
.lightbox-count { margin: 0; font-weight: 600; }
.lightbox-close { margin-left: auto; background: var(--papier); color: var(--tinte); border: 0; border-radius: 2px; font-weight: 700; min-height: var(--tap); padding: 0 1.1rem; cursor: pointer; }
.lightbox-stage { flex: 1; min-height: 0; display: grid; place-items: center; touch-action: pan-y pinch-zoom; overflow: hidden; }
.lightbox-stage img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform .2s; }
.lightbox-nav { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; padding: .5rem var(--gutter) calc(.75rem + var(--safe-bottom)); flex: none; }
.lightbox-nav button { min-height: var(--tap); background: transparent; color: #fff; border: 2px solid #fff; border-radius: 2px; font-weight: 700; cursor: pointer; }
.lightbox-nav button:disabled { opacity: .35; cursor: default; }

/* ---------- Text-Seiten ---------- */
.prose .sub-title { margin-top: 2rem; }

/* ---------- Bewegung ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
