/* Burgerschaft Baltschieder – klar und modern, mit Wärme aus Geschichte und Wappen.
   Layout: zentrierte Titelbereiche, abwechselnd weisse und warm-graue Flächen, abgerundete Kacheln.
   Farben aus dem Wappen: Blau (Grund), Gold (Löwe, Sterne) als kleiner Akzent. */
:root {
  --bg: #ffffff;
  --grau: #f4f3ef;          /* warmes Hellgrau, wie gekalkter Stein */
  --text: #1d1d1f;
  --text-2: #4f4f55;        /* Nebentext, gut lesbar */
  --blau: #1b5fb4;          /* Links, Wappenblau */
  --blau-tief: #1d4f9c;
  --gold: #c9971c;          /* Wappengold, nur als Akzent */
  --knopf-bg: #1b5fb4;
  --knopf-fg: #ffffff;
  --linie: #d8d5cd;
  --karte: #ffffff;
  --nav-bg: rgba(255, 255, 255, 0.86);
  --fuss-bg: #f4f3ef;
  color-scheme: light;   /* bewusst nur heller Modus */
  --frei: #17723a;     --frei-bg: #e3f2e7;
  --anfrage: #8f5200;  --anfrage-bg: #fdf0d5;
  --besetzt: #b42a41;  --besetzt-bg: #fbe5e8;

  /* Aliase für die Verwaltung */
  --stein: var(--text); --stein-2: var(--text-2); --kalk: var(--bg); --kalk-2: var(--grau);
  --wein: var(--blau); --auf-wein: var(--knopf-fg); --wein-hell: var(--grau);

  /* Systemschriften: keine externen Schriftdienste, keine Datenübermittlung */
  --f: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;
  --f-titel: "Iowan Old Style", Charter, "Bitstream Charter", Georgia, "Times New Roman", serif;

  --s-held: clamp(2.7rem, 6.5vw, 4.6rem);
  --s-1: clamp(2.4rem, 5.5vw, 3.6rem);
  --s-2: clamp(2rem, 4vw, 2.9rem);
  --s-3: 1.35rem;
  --s-lead: clamp(1.2rem, 2.1vw, 1.45rem);
  --s-text: 1.125rem;
  --s-klein: 1rem;

  --breite: 980px;
  --breit: 1200px;
  --radius: 22px;
  --rand: max(20px, env(safe-area-inset-left, 0px));
  --rand-r: max(20px, env(safe-area-inset-right, 0px));
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--f); font-size: var(--s-text); line-height: 1.55; letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: var(--blau); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.18em; }
:focus-visible { outline: 3px solid var(--blau); outline-offset: 3px; border-radius: 6px; }
h1, h2 { font-family: var(--f-titel); font-weight: 600; line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; margin: 0; }
h1 { font-size: var(--s-1); }
h2 { font-size: var(--s-2); }
h3 { font-family: var(--f); font-size: var(--s-3); font-weight: 600; line-height: 1.25; letter-spacing: -0.015em; text-wrap: balance; margin: 0; }
p { margin: 0; }
code { font-size: 0.92em; }
.zahl { font-variant-numeric: tabular-nums; }
.leise { color: var(--text-2); }
.klein { font-size: var(--s-klein); }
.lead { font-size: var(--s-lead); line-height: 1.4; letter-spacing: -0.01em; }

/* Raster */
.huelle { max-width: var(--breite); margin: 0 auto; padding-left: var(--rand); padding-right: var(--rand-r); }
.huelle.breit { max-width: var(--breit); }
.abschnitt { padding-block: clamp(3.5rem, 8vw, 6rem); }
.abschnitt.grau { background: var(--grau); }
.stapel { display: grid; gap: 1rem; }
.stapel-gross { display: grid; gap: clamp(2.25rem, 5vw, 3.25rem); }
.mitte { text-align: center; justify-items: center; }
.mitte p { max-width: 40rem; }
.seitenkopf { display: grid; gap: 0.9rem; text-align: center; justify-items: center; }
.seitenkopf p { max-width: 42rem; }
.links { display: flex; flex-wrap: wrap; gap: 0.75rem 1.75rem; justify-content: center; align-items: center; }
.weiter::after { content: " ›"; }
.seit { display: inline-flex; align-items: center; gap: 0.55rem; font-size: var(--s-klein); color: var(--text-2); }
.seit::before { content: ""; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--gold); }
.zwei-spalten { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.zwei-spalten > * { min-width: 0; }
@media (max-width: 760px) { .zwei-spalten { grid-template-columns: 1fr; } }

/* Navigation */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
.kopf { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--linie); }
.kopf .huelle { max-width: var(--breit); display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 64px; }
.marke { display: flex; align-items: center; gap: 0.65rem; color: var(--text); }
.marke:hover { text-decoration: none; }
.marke img { width: 30px; height: auto; }
.marke-text { font-family: var(--f-titel); font-weight: 600; font-size: 1.15rem; letter-spacing: -0.01em; }
.marke-text small { display: none; }
.nav { display: flex; align-items: center; gap: 0.15rem; }
.nav a { color: var(--text); font-size: 1rem; padding: 0.5rem 0.8rem; border-radius: 8px; }
.nav a:hover { text-decoration: none; background: var(--grau); }
.nav a[aria-current="page"] { font-weight: 600; color: var(--blau); }
.nav a.knopf { color: var(--knopf-fg); padding: 0.55rem 1.1rem; margin-left: 0.6rem; font-size: 1rem; border-radius: 980px; }
.nav a.knopf:hover { background: var(--knopf-bg); }
.menue-knopf { display: none; background: none; border: 1px solid var(--linie); border-radius: 8px; padding: 0.45rem 0.9rem; color: var(--text); cursor: pointer; font: inherit; font-size: 1rem; }
@media (max-width: 860px) {
  .menue-knopf { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 70px; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); padding: 0.75rem var(--rand-r) 1.5rem var(--rand); border-bottom: 1px solid var(--linie);
    min-height: calc(100vh - 64px); }
  .nav.offen { display: flex; }
  .nav a { font-family: var(--f-titel); font-size: 1.7rem; font-weight: 600; padding: 0.6rem 0; border-radius: 0; border-bottom: 1px solid var(--linie); }
  .nav a:hover { background: transparent; }
  .nav a.knopf { font-family: var(--f); margin: 1.25rem 0 0; font-size: 1.1rem; padding: 0.9rem 1.2rem; text-align: center; border-bottom: 0; border-radius: 980px; }
}

/* Buttons */
.knopf { display: inline-block; background: var(--knopf-bg); color: var(--knopf-fg); border: 1px solid var(--knopf-bg);
  border-radius: 980px; padding: 0.75rem 1.5rem; font: inherit; font-size: 1.1rem; font-weight: 600; line-height: 1.2;
  cursor: pointer; text-align: center; }
.knopf:hover { text-decoration: none; filter: brightness(1.1); }
.knopf-zwei { background: transparent; color: var(--blau); border-color: var(--blau); }
.knopf-zwei:hover { background: var(--blau); color: var(--knopf-fg); filter: none; }
.knopf-gross { font-size: 1.15rem; padding: 0.9rem 1.8rem; }
.knopf[disabled] { opacity: 0.5; cursor: progress; }

/* Bilder: Foto aus img/ oder ruhiger Platzhalter */
.bild { position: relative; margin: 0; background: var(--grau); overflow: hidden; border-radius: var(--radius); aspect-ratio: 4 / 3; max-width: 100%;
  display: grid; place-items: center; }
.abschnitt.grau .bild { background: color-mix(in srgb, var(--grau) 60%, var(--linie)); }
.bild img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bild figcaption { color: var(--text-2); font-size: var(--s-klein); }
.bild:has(img) figcaption { position: absolute; left: 1rem; bottom: 0.8rem; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.55); font-size: 0.9rem; }
.bild-breit { aspect-ratio: 16 / 7; }
@media (max-width: 600px) { .bild-breit { aspect-ratio: 4 / 3; } }

/* Startseite */
.held { padding-block: clamp(3rem, 7vw, 5rem) 0; text-align: center; }
.held .wappen-held { width: 72px; height: auto; margin: 0 auto 1.25rem; }
.held h1 { font-size: var(--s-held); }
.held .seit { margin-bottom: 0.9rem; }
.held .lead { margin: 1rem auto 1.75rem; max-width: 36rem; color: var(--text-2); }
.held .bild { margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.held + .abschnitt { margin-top: clamp(3rem, 6vw, 4.5rem); }
.held.ohne-bild + .abschnitt { margin-top: clamp(2.5rem, 5vw, 3.5rem); }

/* Kacheln: die ganze Kachel ist ein Link */
.kacheln { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
@media (max-width: 760px) { .kacheln { grid-template-columns: 1fr; } }
.kachel { background: var(--karte); border-radius: var(--radius); overflow: hidden; min-width: 0;
  display: grid; grid-template-rows: auto 1fr; color: var(--text); border: 1px solid transparent; transition: border-color .15s, transform .15s; }
a.kachel:hover { text-decoration: none; border-color: var(--linie); transform: translateY(-2px); }
a.kachel:hover .weiter { text-decoration: underline; text-underline-offset: 0.18em; }
.abschnitt:not(.grau) .kachel { background: var(--grau); }
.kachel .bild { border-radius: 0; aspect-ratio: 16 / 9; }
.kachel .text { display: grid; gap: 0.4rem; padding: 1.5rem 1.6rem 1.7rem; align-content: start; }
.kachel .kopfzeile { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.kachel h3 { font-family: var(--f-titel); font-size: 1.7rem; letter-spacing: -0.02em; }
.kachel .kennzahl { color: var(--text-2); font-size: 1rem; font-variant-numeric: tabular-nums; }
.kachel .weiter { color: var(--blau); margin-top: 0.5rem; font-weight: 600; }
.kachel-text .text { padding: clamp(1.75rem, 4vw, 2.5rem); text-align: center; justify-items: center; }
.kachel-text .links { margin-top: 0.75rem; }
@media (prefers-reduced-motion: reduce) { a.kachel:hover { transform: none; } }

/* Zeitleiste – echte Abfolge */
.zeitleiste { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; max-width: 46rem; width: 100%; text-align: left; }
.zeitleiste li { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1.5rem; padding-block: 1.4rem; border-top: 1px solid var(--linie); align-items: baseline; }
.zeitleiste li:last-child { border-bottom: 1px solid var(--linie); }
.zeitleiste .jahr { font-family: var(--f-titel); font-weight: 600; font-size: 1.9rem; letter-spacing: -0.02em; color: var(--blau-tief); font-variant-numeric: lining-nums tabular-nums; }
.zeitleiste h3 { font-size: 1.2rem; margin-bottom: 0.2rem; }
@media (max-width: 520px) { .zeitleiste li { grid-template-columns: 1fr; gap: 0.2rem; } }

/* Raum-Detail */
.raum-detail { display: grid; gap: clamp(2rem, 4vw, 2.75rem); scroll-margin-top: 5rem; }
.eckdaten { display: grid; grid-template-columns: max-content 1fr; gap: 0; max-width: 38rem; width: 100%; margin: 0 auto; }
.eckdaten dt, .eckdaten dd { margin: 0; padding: 0.85rem 0; border-top: 1px solid var(--linie); }
.eckdaten dt { color: var(--text-2); padding-right: 2rem; }
.eckdaten dd { font-weight: 600; }
.eckdaten dt:last-of-type, .eckdaten dd:last-of-type { border-bottom: 1px solid var(--linie); }
.bilder { display: grid; grid-template-columns: 2fr 1fr; grid-auto-rows: 1fr; gap: 1rem; }
.bilder > * { min-width: 0; }
.bilder .bild { aspect-ratio: auto; min-height: 11rem; }
.bilder .bild:first-child { grid-row: span 2; min-height: 22rem; }
.bilder.einzeln { grid-template-columns: 1fr; }
.bilder.einzeln .bild:first-child { grid-row: auto; aspect-ratio: 16 / 7; min-height: 0; }
@media (max-width: 680px) {
  .bilder { grid-template-columns: 1fr 1fr; }
  .bilder .bild:first-child { grid-column: 1 / -1; grid-row: auto; min-height: 0; aspect-ratio: 4 / 3; }
  .bilder .bild { min-height: 0; aspect-ratio: 1; }
}

/* Karten, Listen, Tabellen */
.karte { background: var(--karte); border-radius: var(--radius); padding: clamp(1.5rem, 3vw, 2.25rem); display: grid; gap: 1rem; align-content: start; min-width: 0; }
.abschnitt:not(.grau) .karte { background: var(--grau); }
.karte ul { margin: 0; padding-left: 1.15rem; display: grid; gap: 0.5rem; }
.tabelle { width: 100%; border-collapse: collapse; }
.tabelle th, .tabelle td { text-align: left; padding: 0.75rem 0; border-bottom: 1px solid var(--linie); }
.tabelle th { font-weight: 600; color: var(--text-2); font-size: var(--s-klein); }
.tabelle td:last-child, .tabelle th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.tabelle tr:last-child td { border-bottom: 0; }
.liste-dok { list-style: none; padding: 0 !important; margin: 0; display: block !important; }
.liste-dok li { display: flex; justify-content: space-between; gap: 1rem; padding-block: 0.8rem; border-bottom: 1px solid var(--linie); }
.liste-dok li:last-child { border-bottom: 0; }
.liste-dok li span:last-child { color: var(--text-2); font-variant-numeric: tabular-nums; }

/* Burgerrat */
.personen { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1.25rem; width: 100%; }
.person { background: var(--karte); border-radius: var(--radius); overflow: hidden; display: grid; grid-template-rows: auto 1fr; }
.abschnitt:not(.grau) .person { background: var(--grau); }
.portraet { margin: 0; aspect-ratio: 1; background: color-mix(in srgb, var(--grau) 55%, var(--linie)); }
.portraet img { width: 100%; height: 100%; object-fit: cover; }
.person .text { padding: 1.25rem 1.4rem 1.5rem; display: grid; gap: 0.15rem; align-content: start; }
.person strong { font-family: var(--f-titel); font-weight: 600; font-size: 1.35rem; letter-spacing: -0.015em; }
.person .rolle { color: var(--text-2); margin-bottom: 0.6rem; }
.person .kontakt { display: grid; gap: 0.2rem; font-size: 1rem; overflow-wrap: anywhere; }
.wappen-figur { margin: 0; }
.wappen-figur img { width: 96px; height: auto; }

/* Formulare */
.formular { display: grid; gap: 1.15rem; }
.feldreihe { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.feldreihe > * { min-width: 0; }
@media (max-width: 560px) { .feldreihe { grid-template-columns: 1fr; } }
.feld { display: grid; gap: 0.35rem; }
.feld label, .feld legend { font-weight: 600; font-size: 1rem; padding: 0; }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--linie); border-radius: 12px;
  padding: 0.8rem 0.95rem; width: 100%; min-height: 3.1rem;
}
input:focus, select:focus, textarea:focus { border-color: var(--blau); outline: 3px solid color-mix(in srgb, var(--blau) 22%, transparent); outline-offset: 0; }
textarea { min-height: 7rem; resize: vertical; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.wahl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
.wahl label { display: flex; align-items: center; gap: 0.6rem; border: 1px solid var(--linie); background: var(--bg);
  padding: 0.8rem 0.95rem; border-radius: 12px; cursor: pointer; font-weight: 400; min-width: 0; }
.wahl input { width: 1.15rem; height: 1.15rem; min-height: 0; accent-color: var(--knopf-bg); flex: none; }
.wahl label:has(input:checked) { border-color: var(--blau); box-shadow: 0 0 0 1px var(--blau); }
@media (max-width: 380px) { .wahl { grid-template-columns: 1fr; } }
.check { display: flex; gap: 0.65rem; align-items: flex-start; font-weight: 400 !important; }
.check input { width: 1.15rem; height: 1.15rem; min-height: 0; margin-top: 0.25rem; accent-color: var(--knopf-bg); flex: none; }
.topf { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.meldung { padding: 1rem 1.2rem; border-radius: 14px; }
.meldung.gut { background: var(--frei-bg); color: var(--text); }
.meldung.fehler { background: var(--besetzt-bg); color: var(--text); }
.meldung strong { display: block; font-size: 1.25rem; margin-bottom: 0.3rem; }
.meldung p + p { margin-top: 0.4rem; }

/* Reservation in zwei Schritten */
.schrittanzeige { list-style: none; margin: 0 auto; padding: 0; display: flex; justify-content: center; gap: 0.5rem; counter-reset: schritt; flex-wrap: wrap; }
.schrittanzeige li { counter-increment: schritt; display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.45rem 1rem 0.45rem 0.5rem;
  border-radius: 980px; background: var(--karte); color: var(--text-2); }
.schrittanzeige li::before { content: counter(schritt); width: 1.75rem; height: 1.75rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--grau); color: var(--text-2); font-weight: 600; font-size: 0.95rem; }
.schrittanzeige li[aria-current="step"] { color: var(--text); font-weight: 600; }
.schrittanzeige li[aria-current="step"]::before { background: var(--knopf-bg); color: var(--knopf-fg); }
.schrittanzeige li.erledigt::before { content: "✓"; background: var(--frei-bg); color: var(--frei); }
.schritt-raster { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.schritt-raster > * { min-width: 0; }
@media (max-width: 880px) { .schritt-raster { grid-template-columns: 1fr; } }
.zusammenfassung { background: var(--grau); border-radius: 14px; padding: 1rem 1.2rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: baseline; }
.zusammenfassung button { background: none; border: 0; padding: 0; font: inherit; color: var(--blau); cursor: pointer; font-weight: 600; }
.zusammenfassung button:hover { text-decoration: underline; }
.knopfzeile { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; justify-content: space-between; }
.knopf-text { background: none; border: 0; padding: 0.5rem 0; font: inherit; color: var(--blau); cursor: pointer; }
.knopf-text::before { content: "‹ "; }
.knopf-text:hover { text-decoration: underline; }

/* Belegungskalender */
.monat-nav { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; width: 100%; }
.monat-nav button { background: var(--grau); border: 0; color: var(--blau); border-radius: 50%; width: 2.6rem; height: 2.6rem;
  font: inherit; font-size: 1.4rem; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.monat-nav button:hover { background: color-mix(in srgb, var(--blau) 14%, var(--grau)); }
.monat-nav button:disabled { color: var(--text-2); opacity: 0.35; cursor: default; background: var(--grau); }
.monat-name { font-family: var(--f-titel); font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; }
.raumwahl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; background: var(--grau);
  padding: 3px; border-radius: 12px; width: 100%; }
.raumwahl button { font: inherit; font-size: 0.95rem; background: transparent; border: 0; color: var(--text); padding: 0.6rem 0.4rem; border-radius: 9px; cursor: pointer; min-width: 0; line-height: 1.2; }
.raumwahl button[aria-pressed="true"] { background: var(--bg); box-shadow: 0 1px 4px rgba(0,0,0,.14); font-weight: 600; }
@media (max-width: 500px) { .raumwahl { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kalender { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.kalender .wt { text-align: center; font-size: 0.85rem; font-weight: 600; color: var(--text-2); padding-bottom: 0.2rem; }
.tag { aspect-ratio: 1; border-radius: 50%; border: 0; background: transparent; color: var(--text);
  font: inherit; font-size: 1.05rem; font-variant-numeric: tabular-nums; display: grid; place-items: center; position: relative;
  cursor: pointer; min-width: 0; padding: 0; max-width: 3.4rem; justify-self: center; width: 100%; }
.tag .st { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.tag.frei { background: var(--frei-bg); color: var(--frei); font-weight: 600; }
.tag.frei:hover { box-shadow: inset 0 0 0 2px var(--frei); }
.tag.anfrage { background: var(--anfrage-bg); color: var(--anfrage); font-weight: 600; }
.tag.anfrage:hover { box-shadow: inset 0 0 0 2px var(--anfrage); }
.tag.besetzt { background: var(--besetzt-bg); color: var(--besetzt); cursor: not-allowed; text-decoration: line-through; }
.tag.vergangen { color: var(--text-2); opacity: 0.45; cursor: default; }
.tag.leer { visibility: hidden; }
.tag.gewaehlt { background: var(--knopf-bg) !important; color: var(--knopf-fg) !important; box-shadow: none !important; }
.tag.heute .nr { text-decoration: underline; text-underline-offset: 3px; }
.legende { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.25rem; font-size: 0.95rem; color: var(--text-2); }
.legende span { display: inline-flex; align-items: center; gap: 0.45rem; }
.legende i { width: 0.8rem; height: 0.8rem; border-radius: 50%; display: inline-block; }
.legende .l-frei { background: var(--frei); }
.legende .l-anfrage { background: var(--anfrage); }
.legende .l-besetzt { background: var(--besetzt); }
.vorschau-band { display: inline-block; background: var(--anfrage-bg); border-radius: 980px; padding: 0.5rem 1.1rem; font-size: 0.95rem; }

/* Fuss */
.fuss { background: var(--fuss-bg); color: var(--text-2); padding-block: 3rem; font-size: 1rem; border-top: 1px solid var(--linie); }
.fuss a { color: var(--text-2); }
.fuss a:hover { color: var(--text); }
.fuss-raster { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; padding-bottom: 1.75rem; border-bottom: 1px solid var(--linie); }
.fuss-raster > * { min-width: 0; }
.fuss h2 { font-family: var(--f); font-size: 1rem; font-weight: 600; color: var(--text); letter-spacing: 0; margin-bottom: 0.7rem; }
.fuss ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.fuss .stapel { gap: 0.6rem; }
.fuss .klein { margin-top: 1.25rem; font-size: 0.95rem; }
@media (max-width: 700px) { .fuss-raster { grid-template-columns: 1fr 1fr; } .fuss-raster > :first-child { grid-column: 1 / -1; } }

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

.schrittanzeige { scroll-margin-top: 6rem; }

/* Fotos mit kleiner Auflösung nicht über volle Breite ziehen */
.bild-mittel { max-width: 880px; margin-inline: auto; aspect-ratio: 820 / 484; }
.geschichte-haus { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.geschichte-haus .bild { aspect-ratio: 820 / 484; }
@media (max-width: 800px) { .geschichte-haus { grid-template-columns: 1fr; } }
.bild:has(img) figcaption { display: none; }
.bilder.einzeln { max-width: 980px; margin-inline: auto; width: 100%; }
.bilder.einzeln .bild:first-child { aspect-ratio: 3 / 2; }
.bilder.zwei { grid-template-columns: 1fr 1fr; grid-auto-rows: auto; }
.bilder.zwei .bild, .bilder.zwei .bild:first-child { grid-row: auto; grid-column: auto; min-height: 0; aspect-ratio: 4 / 3; }
@media (max-width: 680px) { .bilder.zwei { grid-template-columns: 1fr; } }


/* Ausführliche Geschichte und Textseiten */
.ausfuehrlich { max-width: 46rem; width: 100%; text-align: left; border-top: 1px solid var(--linie); border-bottom: 1px solid var(--linie); }
.ausfuehrlich summary { cursor: pointer; padding: 1.1rem 0; font-weight: 600; color: var(--blau); list-style: none; display: flex; justify-content: space-between; align-items: center; }
.ausfuehrlich summary::-webkit-details-marker { display: none; }
.ausfuehrlich summary::after { content: "+"; font-size: 1.5rem; font-weight: 400; line-height: 1; }
.ausfuehrlich[open] summary::after { content: "–"; }
.ausfuehrlich-text, .text-seite { display: grid; gap: 1rem; padding-bottom: 1.5rem; }
.ausfuehrlich-text h3, .text-seite h3 { margin-top: 1rem; }
.ausfuehrlich-text ul { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.6rem; }
.ausfuehrlich-text p, .text-seite p { max-width: 42rem; }
.text-seite { max-width: 46rem; }
.text-seite h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); margin-top: 1.5rem; scroll-margin-top: 5rem; }
.text-seite h2:first-child { margin-top: 0; }

/* Handy-Feinschliff */
a.weiter { display: inline-block; padding-block: 0.55rem; }
.kalender .wt { font-size: 0.9rem; }
@media (max-width: 480px) {
  .schrittanzeige { flex-wrap: nowrap; gap: 0.35rem; }
  .schrittanzeige li { font-size: 0.92rem; padding: 0.35rem 0.75rem 0.35rem 0.35rem; gap: 0.4rem; white-space: nowrap; }
  .schrittanzeige li::before { width: 1.5rem; height: 1.5rem; font-size: 0.85rem; }
  .karte { padding: 1.25rem; }
  .kalender { gap: 4px; }
}
@media (max-width: 350px) { .schrittanzeige { flex-wrap: wrap; } }
@media (max-width: 400px) { .marke-text { font-size: 1rem; } .marke img { width: 26px; } }

/* Preistabelle */
.tabelle-huelle { overflow-x: auto; }
.preistabelle { min-width: 30rem; }
.preistabelle th, .preistabelle td { padding: 0.85rem 0.75rem; vertical-align: top; }
.preistabelle thead th { color: var(--text); font-size: 0.95rem; text-align: right; line-height: 1.3; }
.preistabelle thead th span { font-weight: 400; color: var(--text-2); }
.preistabelle thead th:first-child, .preistabelle tbody th { text-align: left; padding-left: 0; }
.preistabelle tbody th { font-weight: 400; max-width: 16rem; }
.preistabelle td { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.preistabelle td:last-child { padding-right: 0; }
.preistabelle tbody tr:last-child th { border-bottom: 0; }
@media (max-width: 560px) {
  .preistabelle { min-width: 0; font-size: 0.95rem; }
  .preistabelle th, .preistabelle td { padding: 0.7rem 0.35rem; }
  .preistabelle thead th span { display: none; }
  .preistabelle thead th { font-size: 0.85rem; hyphens: auto; }
}
.preise-mobil { display: none; }
@media (max-width: 560px) {
  .preise .tabelle-huelle { display: none; }
  .preise-mobil { display: grid; gap: 1.5rem; }
  .preis-raum h3 { font-family: var(--f-titel); font-size: 1.35rem; margin-bottom: 0.3rem; }
  .preis-raum ul { list-style: none; padding: 0 !important; margin: 0; display: block !important; }
  .preis-raum li { display: flex; justify-content: space-between; gap: 1rem; padding-block: 0.55rem; border-bottom: 1px solid var(--linie); }
  .preis-raum li span:first-child { color: var(--text-2); }
  .preis-raum li span:last-child { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .preis-raum li span:last-child::before { content: "CHF "; font-weight: 400; color: var(--text-2); }
}

/* Link «Ansehen und reservieren» in allen Kacheln auf gleicher Höhe */
.kacheln { align-items: stretch; }
.kachel .text { display: flex; flex-direction: column; gap: 0.4rem; }
.kachel .text .weiter { margin-top: auto; padding-top: 0.75rem; align-self: flex-start; }

/* Aufgaben des Burgerrats, aufklappbar */
.aufgaben { margin-top: 0.7rem; border-top: 1px solid var(--linie); padding-top: 0.5rem; }
.aufgaben summary { cursor: pointer; color: var(--blau); font-weight: 600; font-size: 1rem; list-style: none; display: flex; align-items: center; gap: 0.4rem; padding-block: 0.3rem; }
.aufgaben summary::-webkit-details-marker { display: none; }
.aufgaben summary::after { content: "+"; font-weight: 400; font-size: 1.25rem; line-height: 1; }
.aufgaben[open] summary::after { content: "–"; }
.aufgaben ul { margin: 0.4rem 0 0; padding-left: 1.1rem; display: grid; gap: 0.35rem; font-size: 1rem; color: var(--text-2); }
.satzungen-liste { max-width: 46rem; width: 100%; margin: 0 auto; }

/* Hinweis auf der Startseite (im Admin bearbeitbar) */
.hinweis-band { background: #fff4d6; border-bottom: 1px solid #e9d39a; color: var(--text); }
.hinweis-band p { padding-block: 0.9rem; max-width: none; text-align: center; font-weight: 600; }

/* Wappenfarben: Blau und Gold, als Akzent und sehr hell in den Kacheln */
:root { --wappen-blau: #1d4f9c; --wappen-gold: #c9971c; --ton-blau: #edf2fa; --ton-gold: #faf3e2; --ton-blau-linie: #d6e1f2; --ton-gold-linie: #efe1bb; }
.held .seit { color: #8a6810; font-weight: 600; letter-spacing: 0.04em; font-size: 1.05rem; }
.held .seit::before { background: var(--wappen-gold); }

/* Sehr schmale Handys: lange Titel nicht über den Rand */
h1, h2 { overflow-wrap: break-word; hyphens: auto; }
@media (max-width: 360px) { :root { --s-1: 2.05rem; --s-held: 2.3rem; --s-2: 1.75rem; } }

/* Burgerrat: alle Kacheln gleich aufgebaut und gleich hoch */
.personen { grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr)); align-items: stretch; }
.person, .abschnitt:not(.grau) .person { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); grid-template-rows: 1fr auto; align-items: start; column-gap: 1.1rem; padding: 1.25rem; }
.portraet { width: 6.5rem; aspect-ratio: 1; margin: 0; border-radius: 16px; overflow: hidden; }
.person .text { padding: 0; gap: 0.1rem; min-height: 9.9rem; grid-template-columns: minmax(0, 1fr); }
.person .text > * { min-width: 0; }
.person strong { font-size: 1.3rem; line-height: 1.25; }
.person .rolle { line-height: 1.35; margin-bottom: 0.5rem; }
.person .kontakt { font-size: 0.95rem; gap: 0.15rem; overflow-wrap: normal; }
.person .kontakt a { overflow-wrap: normal; word-break: normal; hyphens: none; }
.person .kontakt .nw { white-space: nowrap; }
.person .aufgaben { grid-column: 1 / -1; align-self: end; margin-top: 1rem; }
@media (max-width: 440px), (min-width: 700px) and (max-width: 860px) {
  .person, .abschnitt:not(.grau) .person { grid-template-columns: 5rem minmax(0, 1fr); column-gap: 0.9rem; padding: 1.1rem; }
  .portraet { width: 5rem; border-radius: 14px; }
  .person .kontakt { font-size: 0.9rem; }
}

/* Jahresprogramm: jedes Datum als gleich grosses Kalenderblatt */
.programm { list-style: none; margin: 0 auto; padding: 0; display: grid; max-width: 46rem; width: 100%; text-align: left; }
.programm li { display: grid; grid-template-columns: 5rem minmax(0, 1fr); gap: 1.4rem; align-items: center; padding-block: 1.25rem; border-top: 1px solid var(--linie); }
.programm li:last-child { border-bottom: 1px solid var(--linie); }
.programm h3 { font-size: 1.2rem; margin-bottom: 0.2rem; }
.programm p { margin: 0; }
@media (max-width: 420px) {
  .programm li { grid-template-columns: 4.5rem minmax(0, 1fr); gap: 1rem; align-items: start; }
}


/* Nächste Anlässe auf der Startseite: gleiches Kachel-System wie die Räume */
.anlass-kacheln { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; width: 100%; }
.anlass-kacheln.anzahl-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 52rem; margin-inline: auto; }
.anlass-kacheln.anzahl-1 { grid-template-columns: minmax(0, 1fr); max-width: 30rem; margin-inline: auto; }
.kachel.anlass .text { display: flex; flex-direction: column; gap: 0.6rem; height: 100%; text-align: left; }
.anlass-kopf { display: flex; flex-direction: column; gap: 0.9rem; align-items: flex-start; }
.anlass-kopf h3 { font-size: 1.45rem; line-height: 1.2; }
.anlass-kopf .kennzahl { margin-top: 0.2rem; }
.kachel.anlass p { margin: 0; }
.kachel.anlass .weiter { margin-top: auto; padding-top: 0.6rem; align-self: flex-start; }
.anlaesse .huelle > .weiter { align-self: center; justify-self: center; text-align: center; }
@media (max-width: 900px) { .anlass-kacheln, .anlass-kacheln.anzahl-2 { grid-template-columns: minmax(0, 1fr); max-width: 36rem; margin-inline: auto; } }
.zwei-spalten.einzeln { grid-template-columns: minmax(0, 1fr); max-width: 40rem; margin-inline: auto; }

.meldung-zeile { border: 1px solid var(--linie); border-radius: 14px; padding: 1rem 1.1rem 1.1rem; margin: 0; display: grid; gap: 0.75rem; min-width: 0; }
.meldung-zeile legend { font-weight: 600; padding-inline: 0.35rem; }
.marke-alt { font-weight: 500; font-size: 0.875rem; color: #9a3b12; }

/* Wappenfarben dezent: Aktuelles in hellem Gold, Fusszeile in hellem Wappenblau */
.fuss { background: #edf1f7; border-top: 2px solid #dcbd6a; }
.fuss-raster { border-bottom-color: #d5dde9; }

@media (max-width: 380px) { .person .kontakt .nw ~ .nw { white-space: normal; } }

/* Jahresprogramm nach Jahren */
.programm-jahr { display: grid; gap: 0.75rem; width: 100%; max-width: 46rem; margin-inline: auto; text-align: left; }
.programm-jahr + .programm-jahr { margin-top: clamp(1.5rem, 4vw, 2.5rem); }
.programm-jahr h2 { font-size: var(--s-2, 2rem); color: var(--blau-tief); font-variant-numeric: lining-nums; }

/* Kalenderblatt: weiss, goldene Kante oben, Monat in Wappenblau, Tag gross */
.blatt { width: 5rem; height: 5.25rem; display: grid; grid-template-rows: auto 1fr; align-content: start; background: #fff; border-radius: 14px; border: 1px solid var(--linie); border-top: 3px solid var(--wappen-gold); box-shadow: 0 1px 3px rgb(0 0 0 / 0.06); text-align: center; padding: 0.5rem 0.25rem 0.35rem; }
.blatt .monat { color: var(--wappen-blau); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.2; white-space: nowrap; }
.blatt .tag { display: flex; align-items: center; justify-content: center; gap: 0.15rem; font-family: var(--f-titel); font-weight: 600; font-size: 2.1rem; line-height: 1; color: var(--text); font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.blatt .tag .und { font-family: var(--f); font-size: 0.8125rem; font-weight: 600; color: var(--wappen-gold); }
.blatt.mehrere .tag { font-size: 1.45rem; letter-spacing: -0.02em; }
.blatt.ohne-tag .tag { font-family: var(--f); font-size: 0.8125rem; font-weight: 600; line-height: 1.25; color: var(--text-2); white-space: normal; }
@media (max-width: 420px) {
  .blatt { width: 4.5rem; height: 4.75rem; padding-top: 0.4rem; }
  .blatt .tag { font-size: 1.85rem; }
  .blatt.mehrere .tag { font-size: 1.25rem; }
}

.anlaesse .huelle > * { min-width: 0; max-width: 100%; }
.anlass-kopf > div { min-width: 0; }
.anlass-kopf h3 { overflow-wrap: break-word; hyphens: auto; }
@media (max-width: 360px) { .anlass-kopf h3 { font-size: 1.25rem; } }
@media (max-width: 420px) { .kachel.anlass .text { padding: 1.25rem 1.2rem 1.4rem; } }
@media (max-width: 360px) { .anlass-kopf h3 { font-size: 1.15rem; overflow-wrap: anywhere; } }
