/* Marktgemeinde Kapelln – Buchungs-Tool
   Farben wie Turnsaal-Eintragung: Blau #1d4f91, Gelb #f3c300. Mobil zuerst. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
    U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --blau: #1d4f91;
  --blau-dunkel: #143a6b;
  --blau-hell: #e8eef7;
  --gelb: #f3c300;
  --gelb-hell: #fff6cc;
  --text: #1a1f2b;
  --text-2: #4a5263;
  --linie: #d5dbe5;
  --hinter: #f5f7fa;
  --weiss: #fff;
  --gruen: #1f6b35;
  --gruen-hell: #e6f3e9;
  --rot: #a4161a;
  --rot-hell: #fbe9ea;
  --grau: #6b7280;
  --grau-hell: #eceef1;
  --radius: 10px;
  --schatten: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* v1.7: nur senkrecht scrollen – nie seitlich verschieben */
html, body { overflow-x: clip; overscroll-behavior-x: none; max-width: 100%; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--hinter);
}
img { max-width: 100%; height: auto; }
a { color: var(--blau); }
a:hover { color: var(--blau-dunkel); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 1.35rem; }
h2 { font-size: 1.25rem; color: var(--blau); }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .75em; }

:focus-visible { outline: 3px solid var(--gelb); outline-offset: 2px; border-radius: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: -999px; top: 0; background: var(--gelb); color: var(--text); padding: .5rem 1rem; z-index: 100; }
.skip-link:focus { left: 0; }

/* Kopf */
.kopf { background: var(--blau); color: var(--weiss); border-bottom: 4px solid var(--gelb); }
.kopf-innen { max-width: 1100px; margin: 0 auto; padding: .75rem 1rem; display: flex; align-items: center; gap: .75rem; }
.wappen { width: 40px; height: 46px; object-fit: contain; flex: none; display: block; }
.kopf h1, .kopf-titel { margin: 0; font-size: 1.15rem; font-weight: 700; line-height: 1.2; color: var(--weiss); min-width: 0; }
.kopf .unter { font-size: .85rem; opacity: .9; }
.kopf-rechts { margin-left: auto; position: relative; display: flex; gap: .5rem; align-items: center; flex: none; max-width: 70%; }
.kopf-menue { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.kopf-menue-knopf { display: none; }
.kopf-icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.kopf-menue .kopf-nur-menue { display: none; }
.demo-kurz { display: none; }
.kopf .benutzer { font-size: .85rem; opacity: .95; }

.demo-banner {
  background: var(--gelb); color: var(--text); text-align: center; padding: .4rem 1rem; font-size: .9rem; font-weight: 600;
}
.demo-banner button { margin-left: .5rem; }

/* Navigation (Tabs) */
.nav { background: var(--weiss); border-bottom: 1px solid var(--linie); position: sticky; top: 0; z-index: 10; }
.nav ul { list-style: none; margin: 0 auto; padding: 0 .5rem; display: flex; gap: .25rem; overflow-x: auto; max-width: 1100px; }
.nav a {
  display: block; padding: .8rem .9rem; text-decoration: none; color: var(--text-2); font-weight: 600; white-space: nowrap;
  border-bottom: 3px solid transparent; min-height: 44px;
}
.nav a[aria-current="page"] { color: var(--blau); border-bottom-color: var(--gelb); }
.nav .zahl { background: var(--gelb); color: var(--text); border-radius: 999px; padding: 0 .45rem; font-size: .8rem; margin-left: .25rem; }

main { max-width: 1100px; margin: 0 auto; padding: 1rem; }
[hidden] { display: none !important; }

/* Karten, Raster */
.karte { background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); padding: 1rem; box-shadow: var(--schatten); margin-bottom: 1rem; }
.raster { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .raster { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .raster { grid-template-columns: repeat(3, 1fr); } }
.objekt-karte { display: flex; flex-direction: column; margin: 0; }
.objekt-karte .foto { aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; margin-bottom: .75rem; background: var(--blau-hell); }
.objekt-karte .aktionen { margin-top: auto; display: flex; gap: .5rem; flex-wrap: wrap; padding-top: .5rem; }
.meta { color: var(--text-2); font-size: .9rem; }
.hinweis-box { background: var(--blau-hell); border-left: 4px solid var(--blau); padding: .5rem .75rem; border-radius: 6px; font-size: .9rem; margin: .5rem 0; }
.extern-box { background: var(--gelb-hell); border-left: 4px solid var(--gelb); padding: .5rem .75rem; border-radius: 6px; font-size: .9rem; margin: .5rem 0; }

/* Filter-Leiste (Typ) */
.segment { display: inline-flex; border: 1px solid var(--blau); border-radius: 999px; overflow: hidden; margin-bottom: 1rem; flex-wrap: wrap; }
.segment button { border: 0; background: var(--weiss); color: var(--blau); padding: .55rem 1rem; font: inherit; font-weight: 600; cursor: pointer; min-height: 44px; }
.segment button[aria-pressed="true"] { background: var(--blau); color: var(--weiss); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 44px; padding: .55rem 1rem; border-radius: 8px; border: 1px solid var(--blau);
  background: var(--blau); color: var(--weiss); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--blau-dunkel); color: var(--weiss); }
.btn.zweit { background: var(--weiss); color: var(--blau); }
.btn.zweit:hover { background: var(--blau-hell); }
.btn.gelb { background: var(--gelb); border-color: var(--gelb); color: var(--text); }
.btn.gelb:hover { background: #dcb100; }
.btn.gefahr { background: var(--weiss); color: var(--rot); border-color: var(--rot); }
.btn.gefahr:hover { background: var(--rot-hell); }
.btn.ok { background: var(--gruen); border-color: var(--gruen); }
.btn.klein { min-height: 36px; padding: .3rem .7rem; font-size: .9rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.kopf .btn.zweit { border-color: var(--weiss); }
.link-btn { background: none; border: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }

/* Formulare */
form .feld, .feld { margin-bottom: .85rem; }
label { display: block; font-weight: 600; margin-bottom: .25rem; }
.hilfe { font-size: .85rem; color: var(--text-2); font-weight: 400; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--weiss);
  border: 1px solid #b8c1d1; border-radius: 8px; padding: .55rem .7rem; min-height: 44px;
}
input[type="checkbox"] { width: auto; min-height: 0; transform: scale(1.3); margin-right: .5rem; }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blau); }
.zeile { display: grid; gap: .75rem; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.zeile-3 { display: grid; gap: .75rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .zeile-3 { grid-template-columns: repeat(3, 1fr); } }
.pflicht::after { content: " *"; color: var(--rot); }
.check-label { display: flex; align-items: center; font-weight: 500; }
fieldset { border: 1px solid var(--linie); border-radius: var(--radius); padding: .75rem; margin: 0 0 1rem; min-width: 0; }
legend { font-weight: 700; padding: 0 .3rem; color: var(--blau); }

.position { display: grid; grid-template-columns: 1fr 90px auto; gap: .5rem; align-items: end; padding: .5rem 0; border-bottom: 1px dashed var(--linie); }
.position:last-of-type { border-bottom: 0; }
.position .verf { grid-column: 1 / -1; font-size: .88rem; }

/* Meldungen */
.meldung { padding: .7rem .9rem; border-radius: 8px; margin: .75rem 0; font-weight: 500; }
.meldung.ok { background: var(--gruen-hell); color: var(--gruen); border: 1px solid #b7dcc1; }
.meldung.fehler { background: var(--rot-hell); color: var(--rot); border: 1px solid #f1c2c4; }
.meldung.info { background: var(--blau-hell); color: var(--blau-dunkel); border: 1px solid #c6d4ea; }
.toast {
  position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 50; max-width: 92vw;
  background: var(--text); color: var(--weiss); padding: .75rem 1rem; border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.toast.fehler { background: var(--rot); }

/* Status-Badges */
.badge { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.badge.offen, .badge.angefragt { background: var(--gelb-hell); color: #6b5500; border: 1px solid var(--gelb); }
.badge.bestaetigt, .badge.belegt { background: var(--blau); color: var(--weiss); }
.badge.abgelehnt { background: var(--rot-hell); color: var(--rot); border: 1px solid #f1c2c4; }
.badge.storniert { background: var(--grau-hell); color: var(--grau); text-decoration: line-through; }
.badge.gesperrt { background: repeating-linear-gradient(45deg, #d1d5db, #d1d5db 4px, #e5e7eb 4px, #e5e7eb 8px); color: var(--text); }
.badge.frei { background: var(--gruen-hell); color: var(--gruen); border: 1px solid #b7dcc1; }
.badge.typ { background: var(--blau-hell); color: var(--blau); }
.badge.extern { background: var(--gelb); color: var(--text); }

/* Kalender */
.kal-leiste { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .75rem; }
.kal-leiste .titel { font-weight: 700; margin: 0 .5rem; min-width: 12ch; }
.kal-leiste select { width: auto; flex: 1 1 220px; }
.legende { display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0 1rem; font-size: .85rem; }

.woche { display: grid; gap: .5rem; }
.tag { background: var(--weiss); border: 1px solid var(--linie); border-radius: 8px; padding: .6rem .75rem; }
.tag.heute { border-color: var(--gelb); box-shadow: inset 4px 0 0 var(--gelb); }
.tag h3 { font-size: .95rem; margin: 0 0 .35rem; }
.slots { display: flex; flex-wrap: wrap; gap: .35rem; }
.slot { font-size: .85rem; padding: .2rem .5rem; border-radius: 6px; }
.slot.belegt { background: var(--blau); color: var(--weiss); }
.slot.angefragt { background: var(--gelb-hell); color: #6b5500; border: 1px dashed #b38f00; }
.slot.gesperrt { background: repeating-linear-gradient(45deg, #d1d5db, #d1d5db 4px, #e5e7eb 4px, #e5e7eb 8px); }
.slot.frei { background: var(--gruen-hell); color: var(--gruen); }

.monat { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; background: var(--linie); border: 1px solid var(--linie); border-radius: 8px; overflow: hidden; }
.monat .wt { background: var(--blau); color: var(--weiss); text-align: center; font-size: .8rem; font-weight: 700; padding: .3rem 0; }
.monat button.mtag {
  background: var(--weiss); border: 0; min-height: 56px; padding: .25rem; text-align: left; font: inherit; cursor: pointer;
  display: flex; flex-direction: column; gap: 2px; font-size: .85rem;
}
.monat button.mtag.fremd { background: var(--hinter); color: var(--grau); }
.monat button.mtag.heute .nr { background: var(--gelb); border-radius: 999px; padding: 0 .35rem; }
.monat button.mtag[aria-pressed="true"] { outline: 3px solid var(--blau); outline-offset: -3px; }
.monat .punkte { display: flex; gap: 3px; flex-wrap: wrap; }
.monat .punkt { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.punkt.belegt { background: var(--blau); }
.punkt.angefragt { background: var(--gelb); }
.punkt.gesperrt { background: #9ca3af; }
.monat .mfrei { font-size: .72rem; color: var(--gruen); }
@media (min-width: 640px) { .monat button.mtag { min-height: 80px; } }

/* Tabellen */
.tabelle-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--weiss); font-size: .92rem; }
th, td { text-align: left; padding: .5rem; border-bottom: 1px solid var(--linie); vertical-align: top; }
th { background: var(--blau-hell); color: var(--blau-dunkel); font-weight: 700; }
tr.inaktiv td { color: var(--grau); }
.gesamtkal td { min-width: 120px; font-size: .82rem; }
.gesamtkal th:first-child, .gesamtkal td:first-child { position: sticky; left: 0; background: var(--weiss); z-index: 1; min-width: 130px; font-weight: 600; }
.gesamtkal th:first-child { background: var(--blau-hell); }
.eintrag { display: block; border-radius: 5px; padding: .15rem .35rem; margin-bottom: .2rem; }
.eintrag.bestaetigt { background: var(--blau); color: var(--weiss); }
.eintrag.offen { background: var(--gelb-hell); border: 1px dashed #b38f00; }
.eintrag.gesperrt { background: repeating-linear-gradient(45deg, #d1d5db, #d1d5db 4px, #e5e7eb 4px, #e5e7eb 8px); }

/* Anfrage-Karten (Liste) */
.anfrage { border-left: 5px solid var(--linie); }
.anfrage.offen { border-left-color: var(--gelb); }
.anfrage.bestaetigt { border-left-color: var(--blau); }
.anfrage.abgelehnt { border-left-color: var(--rot); }
.anfrage.storniert { border-left-color: var(--grau); }
.anfrage-kopf { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between; margin-bottom: .4rem; }
.anfrage dl { display: grid; grid-template-columns: max-content 1fr; gap: .2rem .75rem; margin: .4rem 0; font-size: .92rem; }
.anfrage dt { color: var(--text-2); }
.anfrage dd { margin: 0; }
.konflikt { color: var(--rot); font-weight: 600; }
.passt { color: var(--gruen); font-weight: 600; }
.leer { color: var(--text-2); font-style: italic; }

.fuss { text-align: center; color: var(--text-2); font-size: .85rem; padding: 2rem 1rem; }

/* ================================================================
   Verwaltung nach Bereichen (v1.1)
   ================================================================ */
.brotkrumen { font-size: .9rem; margin: 0 0 .75rem; }
.brotkrumen ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem; }
.brotkrumen li + li::before { content: "›"; color: var(--grau); margin: 0 .35rem 0 .1rem; }
.brotkrumen a { color: var(--blau); text-decoration: none; }
.brotkrumen a:hover { text-decoration: underline; }
.brotkrumen [aria-current] { color: var(--text-2); font-weight: 600; }

.seitenkopf { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem 1rem; margin-bottom: .75rem; }
.seitenkopf h2 { margin: 0; font-size: 1.4rem; }
h2[tabindex="-1"]:focus { outline: none; }

/* Reiter (Unternavigation) */
.reiter { border-bottom: 2px solid var(--linie); margin: 0 0 1rem; }
.reiter ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .15rem; overflow-x: auto; }
.reiter a {
  display: block; padding: .6rem .9rem; text-decoration: none; color: var(--text-2); font-weight: 600; white-space: nowrap;
  border: 1px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0; margin-bottom: -2px; min-height: 44px;
}
.reiter a:hover { background: var(--blau-hell); color: var(--blau); }
.reiter a[aria-current="page"] { background: var(--weiss); color: var(--blau); border-color: var(--linie); border-bottom: 3px solid var(--gelb); }

/* Startseite */
.gesamt-hinweis { margin: 0 0 1rem; font-size: .95rem; }
.gesamt-hinweis a { text-decoration: none; font-weight: 600; }
.gesamt-hinweis .zahl { background: var(--gelb); color: var(--text); border-radius: 999px; padding: .05rem .5rem; margin-right: .2rem; }
.bereiche { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .bereiche { grid-template-columns: 1fr 1fr; } }
.bereich-karte {
  position: relative; background: var(--weiss); border: 1px solid var(--linie); border-top: 6px solid var(--blau);
  border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--schatten); transition: box-shadow .15s, transform .15s;
}
.bereich-karte:hover { box-shadow: 0 6px 18px rgba(16, 24, 40, .12); transform: translateY(-1px); }
.bereich-karte h3 { font-size: 1.3rem; margin: 0 0 .75rem; }
.kachel-link { color: var(--blau); text-decoration: none; }
.kachel-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.kachel-link:focus-visible { outline: none; }
.kachel-link:focus-visible::after { outline: 3px solid var(--gelb); outline-offset: 2px; }
.kennzahlen { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-bottom: .75rem; }
.kennzahlen-raster { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin: 0 0 1rem; }
.kz { background: var(--blau-hell); border-radius: 8px; padding: .6rem .75rem; display: flex; flex-direction: column; }
.kz-zahl { font-size: 1.9rem; font-weight: 800; color: var(--blau); line-height: 1.1; font-variant-numeric: tabular-nums; }
.kz-zahl small { font-size: .55em; font-weight: 600; color: var(--text-2); }
.kz-text { font-size: .85rem; color: var(--text-2); }
.kz.achtung { background: var(--gelb-hell); box-shadow: inset 4px 0 0 var(--gelb); }
.kz.achtung .kz-zahl { color: #6b5500; }
.kz.gut .kz-zahl { color: var(--gruen); }
.kz.schlecht { background: var(--rot-hell); box-shadow: inset 4px 0 0 var(--rot); }
.kz.schlecht .kz-zahl { color: var(--rot); }
.mini-liste { list-style: none; margin: 0; padding: 0; font-size: .88rem; }
.mini-liste li { display: flex; justify-content: space-between; gap: .75rem; padding: .3rem 0; border-top: 1px solid var(--linie); }
.mini-name { font-weight: 600; }
.mini-wert { text-align: right; color: var(--text-2); }
.frei-text { color: var(--gruen); font-weight: 600; }
.weitere-zeile { margin-top: 1.25rem; font-size: .88rem; color: var(--text-2); }

/* Raumliste */
.raum-kachel { position: relative; margin: 0; border-top: 5px solid var(--blau); }
.raum-kachel:hover { box-shadow: 0 6px 18px rgba(16, 24, 40, .12); }
.raum-kachel.inaktiv { opacity: .7; border-top-color: var(--grau); }
.raum-kachel h3 { font-size: 1.15rem; margin-bottom: .15rem; }
.kachel-daten { display: grid; grid-template-columns: max-content 1fr; gap: .25rem .75rem; margin: .75rem 0 0; font-size: .9rem; }
.kachel-daten dt { color: var(--text-2); }
.kachel-daten dd { margin: 0; }

/* Belegungsplan (ein Raum) */
.wochenplan { display: grid; gap: .5rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .wochenplan { grid-template-columns: repeat(7, minmax(0, 1fr)); } .wochenplan .tag { min-height: 180px; } }
.wochenplan .tag h3 { font-size: .9rem; }
.eintrag { font-size: .82rem; line-height: 1.3; }
.eintrag .zeit { font-variant-numeric: tabular-nums; }
.eintrag .zweck { display: block; opacity: .9; }
.eintrag.serie { background: #3d6db0; color: var(--weiss); }
.eintrag.gesperrt { color: var(--text); }
.badge.wp-termin { background: #dbe7f7; color: #1d3f73; border: 1px solid #3d6db0; }
.badge.entfaellt { background: #fff; color: var(--grau); border: 1px dashed var(--grau); text-decoration: line-through; }
.badge.jahr { background: #ede7fb; color: #4b2f9e; border: 1px solid #b9a7ea; }
.badge.einzel { background: var(--hinter); color: var(--text-2); border: 1px solid var(--linie); }
.eintrag.wp-termin { background: #dbe7f7; color: var(--text); border-left: 4px solid #3d6db0; }
.eintrag.entfaellt { opacity: .7; text-decoration: line-through; background: #fff !important; border: 1px dashed var(--grau); border-left-width: 4px; }
.eintrag[data-wp-termin] { cursor: pointer; }
.eintrag[data-wp-termin]:hover, .eintrag[data-wp-termin]:focus-visible { outline: 2px solid var(--blau); outline-offset: 1px; }

/* Wochenplan – Stundenplan-Raster */
.wochenraster { font-size: .8rem; min-width: 640px; }
.wr-kopf, .wr-koerper { display: grid; grid-template-columns: 3.2rem repeat(var(--wr-spalten, 7), minmax(0, 1fr)); }
.wr-wt { text-align: center; font-weight: 700; background: var(--blau); color: var(--weiss); padding: .3rem 0; border-left: 1px solid rgba(255,255,255,.25); }
.wr-kopf > div:first-child { background: var(--blau); border-radius: 6px 0 0 0; }
.wr-kopf > div:last-child { border-radius: 0 6px 0 0; }
.wr-achse { position: relative; }
.wr-koerper { padding-bottom: .7rem; }
.wr-stunde { position: absolute; left: 0; right: 0; border-top: 1px solid var(--linie); }
.wr-stunde span { position: absolute; top: -.55rem; left: 0; font-size: .7rem; color: var(--text-2); background: var(--weiss); padding-right: 2px; font-variant-numeric: tabular-nums; }
.wr-tag { position: relative; border-left: 1px solid var(--linie); background-image: linear-gradient(to bottom, var(--linie) 1px, transparent 1px); }
.wr-tag:last-child { border-right: 1px solid var(--linie); }
.wr-block { position: absolute; overflow: hidden; border-radius: 5px; border-left: 4px solid; padding: 1px 4px; line-height: 1.2; color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); z-index: 1; min-width: 0; }
/* v1.3: jede Zeile einzeln mit „…“ abschneiden, nie in den nächsten Block laufen */
.wr-block > span, .wr-block > strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wr-block.kompakt { display: flex; align-items: center; padding-top: 0; padding-bottom: 0; }
.wr-block.kompakt .wr-zeile { flex: 1; min-width: 0; }
.wr-block.kompakt .wr-titel, .wr-block.kompakt .wr-zeit, .wr-block.kompakt .wr-hinweis { display: inline; font-size: .72rem; }
.wr-block.konflikt { outline: 2px solid var(--rot); outline-offset: -2px; background: var(--rot-hell) !important; border-left-color: var(--rot) !important; }
.wr-konflikt { font-size: .66rem; font-weight: 800; color: var(--rot); text-transform: uppercase; letter-spacing: .02em; }
.wr-block.einrichtung { background: repeating-linear-gradient(135deg, #eceef1 0 8px, #e2e5ea 8px 16px) !important; border-left-color: #8a919e !important; color: #3b4250; }
.wr-block[role="button"] { cursor: pointer; }
.wr-block[role="button"]:hover, .wr-block[role="button"]:focus-visible { outline: 2px solid var(--blau); z-index: 2; }
.wr-block .wr-zeit { font-size: .7rem; font-variant-numeric: tabular-nums; color: var(--text-2); }
.wr-block .wr-titel { display: block; font-size: .78rem; }
.wr-block .wr-unter, .wr-block .wr-hinweis { display: block; font-size: .7rem; color: var(--text-2); }
.wr-block .wr-hinweis { font-weight: 700; color: #4b2f9e; }
.wr-block .wr-titel { overflow-wrap: normal; }
.wr-block.schmal { padding: 1px 2px; }
.wr-block.schmal .wr-unter { display: none; }
.wr-block.schmal .wr-titel { font-size: .72rem; }
.wr-block.kuenftig { border-style: dashed; border-left-style: solid; outline: 1px dashed var(--grau); background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.55) 0 6px, transparent 6px 12px) !important; }
.wp-raum { overflow-x: auto; }
.wp-raum-kopf { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: .5rem; }
.wp-raum-kopf h3 { margin: 0; }
.wp-leiste .zr-feld input { width: auto; }
.farbpunkt { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; margin-right: .35rem; vertical-align: middle; }
.wp-tabelle tr.kuenftig td { background: #fafbfd; color: var(--text-2); }
dialog.breit { max-width: 760px; }
.wp-ausfall { border-top: 1px dashed var(--linie); margin-top: .75rem; padding-top: .5rem; }
.wp-ausfall h3 { font-size: 1rem; }
.wp-ausfall-liste { padding-left: 1.1rem; margin: .25rem 0 .5rem; }
.wp-ausfall-liste li { margin-bottom: .25rem; }
.jahr-anpassung { border: 1px solid #b9a7ea; background: #faf8ff; border-radius: 8px; padding: .5rem .75rem; margin: .5rem 0; }
.jahr-anpassung legend { font-weight: 700; color: #4b2f9e; padding: 0 .25rem; }
.anfrage.jahr { border-left-color: #6b4fc2; }
.art-wahl { border: 0; padding: 0; margin: 0 0 .75rem; }
.art-wahl .segment { border-radius: 10px; margin: 0; }
@media (max-width: 639px) { .art-wahl .segment { display: flex; flex-direction: column; } }
.art-wahl legend { font-weight: 700; margin-bottom: .35rem; }
.segment-option { display: inline-flex; align-items: center; gap: .35rem; padding: .55rem 1rem; margin: 0; cursor: pointer; font-weight: 600; color: var(--blau); min-height: 44px; }
.segment-option:has(input:checked) { background: var(--blau); color: var(--weiss); }
.segment-option:has(input:checked) .hilfe { color: #dbe7f7; }
.segment-option input { width: auto; margin: 0; accent-color: var(--gelb); }
.wp-tagliste { list-style: none; padding: 0; margin: 0; }
.wp-tagliste li { padding: .3rem .5rem; border-left: 4px solid #3d6db0; background: #f3f7fd; border-radius: 4px; margin-bottom: .25rem; font-size: .9rem; }
.wp-tagliste .zeit { font-variant-numeric: tabular-nums; font-weight: 700; margin-right: .35rem; }
#j-pruefung ul { margin: .35rem 0; padding-left: 1.1rem; }
/* Druck: Wochenplan-Aushang je Raum, A4 quer */
.wp-aushang { page: quer; break-after: page; font-family: "Inter", sans-serif; }
.wp-aushang:last-child { break-after: auto; }
.wp-aushang-kopf { display: flex; align-items: center; gap: .4cm; border-bottom: 4px solid var(--gelb); padding-bottom: .2cm; margin-bottom: .3cm; }
.wp-aushang-titel { font-size: 18pt; font-weight: 800; color: var(--blau); }
.wp-aushang-stand { margin-left: auto; text-align: right; font-size: 9pt; color: #444; }
.wp-aushang .wochenraster { min-width: 0; font-size: 7.5pt; }
.wp-aushang .wr-block .wr-titel { font-size: 7.5pt; }
.wp-aushang .wr-block .wr-zeit, .wp-aushang .wr-block .wr-unter, .wp-aushang .wr-block .wr-hinweis { font-size: 6.5pt; }
.wp-aushang .wr-block { box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.wp-aushang .wr-wt, .wp-aushang .wr-kopf > div { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.wp-aushang-fuss { font-size: 8.5pt; color: #444; margin-top: .25cm; }
@page quer { size: A4 landscape; margin: .8cm; }
.monatsplan { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; background: var(--linie); border: 1px solid var(--linie); border-radius: 8px; overflow: hidden; }
.monatsplan .wt { background: var(--blau); color: var(--weiss); text-align: center; font-size: .8rem; font-weight: 700; padding: .3rem 0; }
.mzelle { background: var(--weiss); min-height: 92px; padding: .25rem; font-size: .8rem; min-width: 0; }
.mzelle .eintrag { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mzelle.fremd { background: var(--hinter); color: var(--grau); }
.mzelle.fremd .eintrag { opacity: .6; }
.mkopf .nr { font-weight: 700; }
.mkopf .lang { display: none; }
.mzelle.heute .nr { background: var(--gelb); border-radius: 999px; padding: 0 .4rem; }
@media (max-width: 639px) {
  .monatsplan { display: block; background: none; border: 0; }
  .monatsplan .wt, .monatsplan .mzelle.fremd, .monatsplan:not(.verlauf) .mzelle.leer-tag { display: none; }
  .mzelle { min-height: 0; border: 1px solid var(--linie); border-radius: 8px; margin-bottom: .4rem; padding: .5rem .6rem; }
  .mzelle .eintrag { white-space: normal; }
  .mkopf .nr { display: none; }
  .mkopf .lang { display: inline; font-weight: 700; }
  .monatsplan.verlauf .mzelle { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; }
  .monatsplan.verlauf .mkopf { flex: 0 0 9.5rem; }
  .monatsplan.verlauf .balken { flex: 1 1 80px; }
}

/* Filter / Tabellen */
select.schmal { width: auto; min-width: 7rem; }
.filter-leiste input[type="date"] { width: auto; }
.zr-feld { display: inline-flex; align-items: center; gap: .4rem; }
.zr-feld label { margin: 0; font-weight: 500; }
.abschnitt { margin: 1rem 0 .6rem; color: var(--blau-dunkel); }
caption.links { text-align: left; font-weight: 700; padding: .4rem 0; color: var(--blau-dunkel); caption-side: top; }
table.kompakt { margin-bottom: 1rem; }
table.kompakt th[scope="row"] { background: none; color: var(--text); font-weight: 600; }
.zahl-sp { text-align: right; font-variant-numeric: tabular-nums; }
td.negativ { color: var(--rot); font-weight: 600; }
tr.korrigiert td { background: #fffbea; }
tr.korrektur-zeile td { background: #fffbea; font-size: .85rem; border-top: 0; padding-top: 0; }
.badge.korrigiert { background: #fde68a; color: #6b4e00; border: 1px solid #e0b100; }
tr.klickbar { cursor: pointer; }
tr.klickbar:hover td, tr.klickbar:hover th { background: var(--blau-hell); }
.material-tabelle th[scope="row"] { background: none; color: var(--text); }
.material-tabelle th[scope="row"] a { font-weight: 700; }
.frei-wert { font-weight: 800; padding: .05rem .45rem; border-radius: 6px; }
.frei-wert.voll { background: var(--gruen-hell); color: var(--gruen); }
.frei-wert.teil { background: var(--gelb-hell); color: #6b5500; }
.frei-wert.null { background: var(--rot-hell); color: var(--rot); }
.quote { display: inline-block; width: 70px; height: 8px; background: var(--grau-hell); border-radius: 4px; vertical-align: middle; overflow: hidden; }
.quote-balken { display: block; height: 100%; background: var(--blau); }
.hinweis-klein { font-size: .82rem; color: var(--text-2); }
.gesamtkal th.heute-sp { background: var(--gelb-hell); }
.gesamtkal th[scope="row"] a { color: var(--text); }
@media (max-width: 639px) {
  table.responsiv thead { display: none; }
  table.responsiv, table.responsiv tbody, table.responsiv tr, table.responsiv td, table.responsiv th[scope="row"] { display: block; width: 100%; }
  table.responsiv tr { border: 1px solid var(--linie); border-radius: 8px; margin-bottom: .5rem; padding: .35rem .6rem; background: var(--weiss); }
  table.responsiv td, table.responsiv th[scope="row"] { border: 0; padding: .15rem 0; text-align: left; }
  table.responsiv td[data-label]:not([data-label=""])::before { content: attr(data-label) ": "; font-weight: 600; color: var(--text-2); }
  table.responsiv tr.korrektur-zeile { margin-top: -.6rem; border-top: 0; border-radius: 0 0 8px 8px; }
  table.responsiv caption { display: block; }
}

/* Verfügbarkeitsverlauf (Material) */
.verlauf .mzelle { display: flex; flex-direction: column; gap: 3px; min-height: 78px; }
.verlauf .menge { font-weight: 800; font-size: 1rem; font-variant-numeric: tabular-nums; }
.verlauf .menge small { font-weight: 500; color: var(--text-2); }
.balken { display: block; height: 7px; background: var(--grau-hell); border-radius: 4px; overflow: hidden; }
.balken > span { display: block; height: 100%; background: var(--blau); }
.verlauf .angefragt { font-size: .72rem; color: #6b5500; background: var(--gelb-hell); border-radius: 4px; padding: 0 .25rem; align-self: flex-start; }
.mzelle.stufe-frei .menge { color: var(--gruen); }
.mzelle.stufe-teil { background: #f3f7fd; }
.mzelle.stufe-voll { background: var(--rot-hell); }
.mzelle.stufe-voll .menge { color: var(--rot); }
.mzelle.stufe-voll .balken > span { background: var(--rot); }
.mzelle.stufe-gesperrt { background: repeating-linear-gradient(45deg, #eceef1, #eceef1 6px, #f5f6f8 6px, #f5f6f8 12px); }
.mzelle.fremd.stufe-teil, .mzelle.fremd.stufe-voll { background: var(--hinter); }
.badge.stufe-teil { background: #f3f7fd; color: var(--blau); border: 1px solid #c6d4ea; }
.badge.stufe-voll { background: var(--rot-hell); color: var(--rot); border: 1px solid #f1c2c4; }

/* Einstellungen */
.einstellungen-raster { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .einstellungen-raster { grid-template-columns: 3fr 2fr; } }
.einstellungen-raster > .karte { margin: 0; }
.einstellungen-raster + .karte { margin-top: 1rem; }
.qr-vorschau { width: 200px; max-width: 100%; margin: .5rem 0; border: 1px solid var(--linie); border-radius: 8px; padding: 4px; background: #fff; }
.qr-vorschau svg { display: block; width: 100%; height: auto; }
.qr-url { font-size: .82rem; word-break: break-all; }
.aktionen-zeile { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
details.aufklapp { margin-top: .75rem; border-top: 1px dashed var(--linie); padding-top: .5rem; }
details.aufklapp summary { cursor: pointer; font-weight: 700; color: var(--blau); padding: .4rem 0; min-height: 44px; display: flex; align-items: center; }
.klein-karte { margin: 0; }
.klein-karte .btn { margin-top: .4rem; }

/* Dialog */
dialog { border: 0; border-radius: var(--radius); padding: 1.25rem; max-width: 560px; width: calc(100% - 2rem); box-shadow: 0 20px 50px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(20, 30, 50, .45); }

/* QR-Aushang (Druck) */
#druck-bereich { display: none; }
.aushang { font-family: "Inter", sans-serif; text-align: center; padding: 1cm; }
.aushang-kopf { display: flex; align-items: center; justify-content: center; gap: .6cm; margin-bottom: .8cm; text-align: left; font-size: 14pt; }
.aushang-gemeinde { font-weight: 800; font-size: 18pt; color: var(--blau); }
.aushang h1 { font-size: 34pt; color: var(--blau); margin: 0 0 .4cm; }
.aushang-text { font-size: 15pt; margin: 0 auto .6cm; max-width: 15cm; }
.aushang-qr { width: 11cm; margin: 0 auto; }
.aushang-qr svg { width: 100%; height: auto; }
.aushang-url { font-size: 9pt; color: #555; word-break: break-all; }
.aushang-fuss { margin-top: .6cm; font-size: 11pt; border-top: 4px solid var(--gelb); padding-top: .3cm; }

/* Öffentliche Seite eingebettet (iframe auf der Gemeinde-Website) */
body.eingebettet { background: transparent; }
body.eingebettet .kopf, body.eingebettet .fuss, body.eingebettet .skip-link { display: none; }
body.eingebettet .nav { position: static; }
body.eingebettet main { padding: .5rem; }
.nav a.extern-link { color: var(--blau); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print {
  .nav, .kopf-rechts, .demo-banner, .aktionen, button, .brotkrumen, .reiter { display: none !important; }
  body { background: #fff; }
  body.druck-aushang > *:not(#druck-bereich) { display: none !important; }
  body.druck-aushang #druck-bereich { display: block !important; }
  @page { size: A4; margin: 1cm; }
}
.demo-banner.klein { font-size: .8rem; padding: .2rem .5rem; }
.kal-leiste select.schmal { flex: 0 0 auto; }
@media (max-width: 639px) { table.responsiv td[data-label]:empty { display: none; } }
.nav li, .reiter li { position: relative; }

/* ================================================================
   v1.3 – Öffentliche Verfügbarkeit als Wochenraster
   ================================================================ */
.vf-auswahl { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .75rem; }
.vf-auswahl .segment { margin: 0; }
.chips { display: flex; gap: .4rem; flex-wrap: wrap; margin: 0 0 .75rem; }
.chip { border: 1px solid var(--blau); background: var(--weiss); color: var(--blau); border-radius: 999px; padding: .45rem .9rem; font: inherit; font-weight: 600; cursor: pointer; min-height: 40px; }
.chip[aria-pressed="true"] { background: var(--blau); color: var(--weiss); }
.vf-leiste { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 0 0 .6rem; }
.vf-leiste .titel { font-weight: 700; }
.vf-leiste .kw { background: var(--gelb); color: var(--text); border-radius: 6px; padding: .1rem .5rem; font-weight: 800; font-size: .85rem; }
.vf-legende { display: flex; flex-wrap: wrap; gap: .35rem .9rem; font-size: .82rem; margin: 0 0 .75rem; color: var(--text-2); }
.vf-legende span { display: inline-flex; align-items: center; gap: .35rem; }
.vf-legende i { width: 18px; height: 14px; border-radius: 3px; display: inline-block; border: 1px solid #9aa3b2; }
.lg-frei { background: var(--weiss); }
.lg-belegt { background: #cfd4dc; }
.lg-angefragt { background: repeating-linear-gradient(135deg, #fff 0 4px, #e5e7eb 4px 8px); border-style: dashed !important; }
.lg-gesperrt { background: repeating-linear-gradient(45deg, #9ca3af 0 3px, #d1d5db 3px 7px); }
.lg-eigen { background: var(--gelb); border-color: #b38f00 !important; }
.lg-eigen-angefragt { background: repeating-linear-gradient(135deg, var(--gelb) 0 5px, #fff6cc 5px 10px); border-color: #b38f00 !important; }
.lg-verein { background: #fde68a; border-color: #b38f00 !important; }
.vf-raster-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.vf-raster { min-width: 0; font-size: .8rem; }
.vf-raster .wr-wt { font-size: .82rem; line-height: 1.15; padding: .3rem 0; }
.vf-raster .wr-wt small { display: block; font-weight: 500; opacity: .9; font-size: .72rem; }
.vf-raster .wr-wt.heute { background: var(--gelb); color: var(--text); }
.vf-raster .wr-tag.heute { background-color: #fffbea; }
.vf-raster .wr-tag.vorbei { background-color: #f3f4f6; }
.wr-frei { position: absolute; left: 0; right: 0; border: 0; background: transparent; cursor: pointer; padding: 0; z-index: 0; font: inherit; }
.wr-frei:hover, .wr-frei:focus-visible { background: rgba(31, 107, 53, .1); outline: 2px solid var(--gruen); outline-offset: -2px; }
.wr-frei:hover::after, .wr-frei:focus-visible::after { content: "+ anfragen"; position: absolute; right: 4px; top: 2px; font-size: .68rem; color: var(--gruen); font-weight: 700; }
.wr-block.vf-belegt { background: #cfd4dc !important; border-left-color: #6b7280 !important; color: #374151; box-shadow: none; }
.wr-block.vf-angefragt { background: repeating-linear-gradient(135deg, #fff 0 4px, #eceef1 4px 8px) !important; border: 1px dashed #9aa3b2; border-left: 4px solid #9aa3b2 !important; color: #4a5263; box-shadow: none; }
.wr-block.vf-gesperrt { background: repeating-linear-gradient(45deg, #9ca3af 0 3px, #d1d5db 3px 7px) !important; border-left-color: #4b5563 !important; color: #111827; }
.wr-block.vf-gesperrt .wr-titel, .wr-block.vf-gesperrt .wr-hinweis { background: rgba(255,255,255,.75); border-radius: 3px; padding: 0 2px; display: inline-block; max-width: 100%; }
.wr-block.vf-eigen { background: var(--gelb) !important; border-left-color: #8a6d00 !important; color: #1a1f2b; z-index: 2; }
.wr-block.vf-eigen-angefragt { background: repeating-linear-gradient(135deg, #f3c300 0 6px, #fff1b3 6px 12px) !important; border-left-color: #8a6d00 !important; color: #1a1f2b; z-index: 2; }
.wr-block.vf-verein { background: #fde68a !important; border-left-color: #b38f00 !important; color: #1a1f2b; z-index: 2; }
.wr-block.vf-eigen .wr-hinweis, .wr-block.vf-verein .wr-hinweis, .wr-block.vf-eigen-angefragt .wr-hinweis { color: #5c4800; }
/* Handy: Tagesansicht mit Tag-Tabs und Wischen */
.vf-tage { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; margin: 0 0 .6rem; }
.vf-tage button { border: 1px solid var(--linie); background: var(--weiss); border-radius: 8px; padding: .3rem 0; font: inherit; font-size: .78rem; line-height: 1.15; cursor: pointer; min-height: 44px; color: var(--text); }
.vf-tage button small { display: block; font-size: .7rem; color: var(--text-2); }
.vf-tage button[aria-pressed="true"] { background: var(--blau); color: var(--weiss); border-color: var(--blau); }
.vf-tage button[aria-pressed="true"] small { color: #dbe7f7; }
.vf-tage button.heute:not([aria-pressed="true"]) { border-color: var(--gelb); box-shadow: inset 0 -3px 0 var(--gelb); }
.vf-tage button .punkt-frei { display: block; width: 6px; height: 6px; border-radius: 50%; margin: 2px auto 0; background: var(--gruen); }
.vf-tage button .punkt-voll { display: block; width: 6px; height: 6px; border-radius: 50%; margin: 2px auto 0; background: #9ca3af; }
.vf-hinweis { font-size: .85rem; color: var(--text-2); margin: .5rem 0 0; }
/* Material: Wochenzeile „x von y frei“ */
.mat-woche { display: grid; gap: .5rem; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.mat-tag { background: var(--weiss); border: 1px solid var(--linie); border-radius: 10px; padding: .55rem .5rem; text-align: center; display: flex; flex-direction: column; gap: .25rem; min-width: 0; font: inherit; color: var(--text); cursor: pointer; }
.mat-tag:hover, .mat-tag:focus-visible { border-color: var(--gruen); box-shadow: 0 0 0 2px rgba(31,107,53,.25); }
.mat-tag[disabled] { cursor: default; opacity: .7; box-shadow: none; }
.mat-tag.heute { border-color: var(--gelb); box-shadow: inset 0 4px 0 var(--gelb); }
.mat-tag .mt-kopf { font-weight: 700; font-size: .85rem; }
.mat-tag .mt-kopf small { display: block; font-weight: 500; color: var(--text-2); }
.mat-tag .mt-zahl { font-size: 1.6rem; font-weight: 800; color: var(--gruen); line-height: 1.1; font-variant-numeric: tabular-nums; }
.mat-tag .mt-zahl small { font-size: .55em; color: var(--text-2); font-weight: 600; }
.mat-tag.knapp .mt-zahl { color: #8a6d00; }
.mat-tag.voll .mt-zahl, .mat-tag.gesperrt .mt-zahl { color: var(--rot); }
.mat-tag .mt-balken { height: 6px; background: var(--grau-hell); border-radius: 3px; overflow: hidden; }
.mat-tag .mt-balken i { display: block; height: 100%; background: var(--gruen); }
.mat-tag .mt-text { font-size: .75rem; color: var(--text-2); }
.mat-tag .mt-eigen { font-size: .72rem; background: var(--gelb); border-radius: 4px; padding: .1rem .25rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mat-tag .mt-eigen.angefragt { background: repeating-linear-gradient(135deg, #f3c300 0 5px, #fff1b3 5px 10px); }
@media (max-width: 759px) {
  .mat-woche { grid-template-columns: 1fr; }
  .mat-tag { display: grid; grid-template-columns: 6.5rem 1fr; text-align: left; align-items: center; gap: .15rem .6rem; }
  .mat-tag .mt-kopf { grid-row: span 2; }
  .mat-tag .mt-zahl { font-size: 1.25rem; }
  .mat-tag .mt-balken, .mat-tag .mt-text, .mat-tag .mt-eigen { grid-column: 2; }
}
/* Anmeldung mit Code */
.code-feld { font-size: 1.6rem; letter-spacing: .5em; text-align: center; font-variant-numeric: tabular-nums; max-width: 14rem; }
.demo-code { background: var(--gelb-hell); border: 1px dashed #b38f00; border-radius: 8px; padding: .4rem .7rem; display: inline-block; font-weight: 700; }
.login-schritte { display: grid; gap: .25rem; }
.check-zeile { display: flex; gap: .6rem; align-items: flex-start; font-weight: 500; margin: .4rem 0; }
.check-zeile input { width: auto; min-height: 0; margin-top: .3rem; transform: scale(1.25); flex: none; }
.art-wahl-profil { display: flex; gap: .5rem; flex-wrap: wrap; margin: 0 0 .5rem; }
.art-wahl-profil label { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; border: 1px solid var(--linie); border-radius: 8px; padding: .45rem .8rem; cursor: pointer; }
.art-wahl-profil input { width: auto; min-height: 0; }
.mitglied-liste { list-style: none; margin: 0 0 .75rem; padding: 0; }
.mitglied-liste li { display: flex; flex-wrap: wrap; gap: .35rem .75rem; align-items: center; justify-content: space-between; padding: .45rem 0; border-bottom: 1px solid var(--linie); }
.badge.beantragt { background: var(--gelb-hell); color: #6b5500; border: 1px solid var(--gelb); }
.badge.verein { background: #fde68a; color: #5c4800; border: 1px solid #e0b100; }
.badge.rolle { background: var(--blau-hell); color: var(--blau); border: 1px solid #c6d4ea; }
.badge.gesperrt-person { background: var(--rot-hell); color: var(--rot); border: 1px solid #f1c2c4; }
.badge.einrichtung { background: #eceef1; color: #3b4250; border: 1px solid #c3c8d0; }
.anfrage.fremd { border-left-color: #e0b100; background: #fffdf3; }
/* Verwaltung: Personen, Mitarbeiter, Außendienst */
.filter-leiste { display: flex; flex-wrap: wrap; gap: .5rem; align-items: end; margin: 0 0 .75rem; }
.filter-leiste .feld { margin: 0; }
.filter-leiste input[type=search] { min-width: 14rem; }
.rollen-wahl { display: flex; gap: .4rem 1rem; flex-wrap: wrap; }
.rollen-wahl label { display: inline-flex; gap: .4rem; align-items: center; font-weight: 600; }
.rollen-wahl input { width: auto; min-height: 0; }
.kopf .rolle-hinweis { font-size: .75rem; opacity: .85; border: 1px solid rgba(255,255,255,.5); border-radius: 999px; padding: 0 .5rem; margin-left: .35rem; }
.ad-liste { list-style: none; margin: 0; padding: 0; }
.ad-liste li { border-bottom: 1px solid var(--linie); padding: .5rem 0; }
.wr-block.schmal.kompakt .wr-zeit { display: none; }

/* ---------- v1.4: Feiertage ---------- */
.vf-raster .wr-wt.feiertag:not(.heute), .wr-wt.feiertag:not(.heute) { background: #7a2140; }
.wr-tag.feiertag { background-color: #fdf3f6; }
.wr-feiertag { display: block; font-size: .68rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 2px; }
.vf-raster .wr-wt small.wr-feiertag { font-weight: 700; }
.lg-feiertag { background: #7a2140; }
.vf-tage button.feiertag small { color: #7a2140; font-weight: 700; }
.vf-tage button.feiertag[aria-pressed="true"] small { color: #fde2ea; }
.vf-tage button.feiertag:not([aria-pressed="true"]) { border-color: #c98aa0; background: #fdf3f6; }
.mat-tag .wr-feiertag { color: #7a2140; }
.badge.feiertag-badge { background: #fbe3ea; color: #7a2140; border: 1px solid #e8b4c4; }
.tag.feiertag { background: #fdf3f6; }
.mzelle.feiertag { background: #fdf3f6; }
.mzelle .feiertag-name, .gesamtkal .feiertag-name { display: block; font-size: .7rem; font-weight: 600; color: #7a2140; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.eintrag.feiertag-ausfall { opacity: .7; }

/* ---------- v1.4: Änderungsprotokoll ---------- */
.filter-leiste.protokoll-filter { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: .5rem .75rem; align-items: end; }
.protokoll-filter .feld { margin: 0; min-width: 0; }
.protokoll-filter input, .protokoll-filter select, .filter-leiste.protokoll-filter input[type="date"] { width: 100%; min-width: 0; }
.filter-leiste.protokoll-filter input[type=search] { min-width: 0; }
.protokoll-filter .pr-knoepfe { display: flex; gap: .4rem; flex-wrap: wrap; grid-column: 1 / -1; }
.badge.p-aktion { background: #eef2f7; color: #1f2a3a; border: 1px solid #d5dce6; }
.badge.p-insert { background: #e3f3e7; color: #1d5e2f; border-color: #b9dfc3; }
.badge.p-delete, .badge.p-abgelehnt, .badge.p-storniert, .badge.p-gesperrt { background: #fde7e4; color: #8a2b1f; border-color: #f2bdb5; }
.badge.p-bestaetigt, .badge.p-entsperrt { background: #dff3ea; color: #155d3b; border-color: #a9dcc3; }
.badge.p-anonymisiert { background: #ece8f6; color: #4b3a87; border-color: #d0c7ec; }
#protokoll-tabelle td { vertical-align: top; }
.seiten { display: flex; gap: .6rem; align-items: center; justify-content: center; margin: .75rem 0; flex-wrap: wrap; }
.verlauf-abschnitt { margin-top: .6rem; }
.verlauf-liste { list-style: none; margin: .4rem 0 0; padding: 0; font-size: .9rem; }
.verlauf-liste li { display: grid; grid-template-columns: 8.5rem 1fr; gap: .1rem .6rem; padding: .35rem 0; border-top: 1px solid var(--linie); }
.verlauf-liste li > span { min-width: 0; overflow-wrap: anywhere; }
.verlauf-zeit { color: var(--text-2); white-space: nowrap; }
.btn-link { background: none; border: 0; padding: 0 .2rem; color: var(--blau); text-decoration: underline; cursor: pointer; font: inherit; font-size: .85rem; }
.verlauf-zeile td { padding-top: 0; border-top: 0; }
table.vergleich td.vorher { background: #fff3f1; }
table.vergleich td.nachher { background: #eefaf1; }
table.vergleich td, table.vergleich th { overflow-wrap: anywhere; }
table.vergleich code { white-space: pre-wrap; font-size: .8rem; }
@media (max-width: 759px) {
  .verlauf-liste li { grid-template-columns: 1fr; }
  .filter-leiste.protokoll-filter { grid-template-columns: 1fr 1fr; }
}
.tag h3 .feiertag-badge { white-space: normal; max-width: 100%; }

/* v1.5: öffentliche Seite – Übersicht-Kacheln, Materialliste */
.uebersicht-kacheln { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 1rem; }
.grosse-kachel { display: block; text-decoration: none; color: inherit; padding: 1.5rem; border-left: 6px solid var(--gelb); }
.grosse-kachel h3 { margin: 0 0 .4rem; font-size: 1.4rem; }
.grosse-kachel p { margin: 0; }
.grosse-kachel:hover, .grosse-kachel:focus-visible { box-shadow: 0 2px 10px rgba(0,0,0,.18); }
.mat-liste { list-style: none; margin: 0 0 .9rem; padding: 0; }
.mat-liste li { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .45rem 0; border-bottom: 1px solid var(--rand, #d8dce3); }
#emilio-hinweis { margin-top: 1.25rem; }
.schritte { margin: 0 0 1rem; padding-left: 1.4rem; }
.schritte li { margin: .25rem 0; }
.zwei-spalten { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.zwei-spalten h4 { margin: 0 0 .5rem; }
.ue-liste { list-style: none; margin: 0 0 .5rem; padding: 0; }
.ue-liste li { padding: .35rem 0; border-bottom: 1px solid var(--rand, #d8dce3); }
.uebersicht-kacheln .grosse-kachel { padding: 1rem 1.25rem; }
.uebersicht-kacheln .grosse-kachel h3 { font-size: 1.2rem; }

/* ---------- v1.6: Reiter „Räume“ / „Material“ – ruhiger, Raster im Mittelpunkt ---------- */
.vf-karte { padding: .9rem 1.1rem 1rem; }
/* Auswahl als Segment-Umschalter in einer Zeile (Handy: waagrecht scrollbar) */
.vf-auswahl-zeile { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.vf-segmente { display: inline-flex; gap: 2px; padding: 3px; background: #eef1f6; border-radius: 10px; max-width: 100%; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.vf-segmente::-webkit-scrollbar { display: none; }
.vf-segment { flex: none; display: inline-flex; align-items: center; gap: .45rem; border: 0; background: transparent; color: var(--text-2); font: inherit; font-size: .92rem; font-weight: 600; padding: .45rem .9rem; border-radius: 8px; cursor: pointer; white-space: nowrap; min-height: 40px; transition: background .15s, color .15s; }
.vf-segment:hover { color: var(--blau); background: rgba(255,255,255,.6); }
.vf-segment[aria-pressed="true"] { background: var(--weiss); color: var(--blau); box-shadow: 0 1px 2px rgba(16,24,40,.12), inset 0 -2px 0 var(--gelb); }
.vf-icon { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
/* eine dezente Info-Zeile; Hinweise klappen als kleines Feld auf */
.vf-info { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1rem; margin: .55rem 0 .7rem; font-size: .86rem; color: var(--text-2); min-height: 1.6rem; }
.vf-info-text { margin: 0; }
.vf-trenner { color: #b4bcc8; margin: 0 .45rem; }
.vf-hinweise summary { list-style: none; display: inline-flex; align-items: center; gap: .3rem; cursor: pointer; color: var(--blau); font-weight: 600; border-radius: 6px; padding: .1rem .3rem; margin: 0 -.3rem; }
.vf-hinweise summary::-webkit-details-marker { display: none; }
.vf-hinweise summary:hover { background: var(--blau-hell); }
.vf-hinweise summary svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.vf-hinweise[open] summary { background: var(--blau-hell); }
.vf-hinweise > p { position: absolute; left: 0; top: calc(100% + 4px); z-index: 6; width: max-content; max-width: min(420px, 100%); margin: 0; padding: .6rem .8rem; background: var(--weiss); color: var(--text); border: 1px solid var(--linie); border-radius: 8px; box-shadow: 0 6px 18px rgba(16,24,40,.12); font-size: .88rem; line-height: 1.45; }
.vf-anfragen { margin-left: auto; border: 1px solid var(--blau); background: var(--blau); color: var(--weiss); font: inherit; font-size: .86rem; font-weight: 600; border-radius: 8px; padding: .35rem .8rem; min-height: 36px; cursor: pointer; }
.vf-anfragen:hover { background: var(--blau-dunkel); }
/* Wochenleiste: ‹ KW 48 · 23.–29.11.2026 › Heute – Legende rechts */
.vf-leiste { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem 1rem; margin: 0 0 .35rem; padding-top: .6rem; border-top: 1px solid #edf0f4; }
.vf-woche { display: flex; align-items: center; gap: .2rem; min-width: 0; }
.vf-pfeil { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 1px solid transparent; background: transparent; color: var(--blau); border-radius: 8px; cursor: pointer; padding: 0; flex: none; }
.vf-pfeil:hover { background: var(--blau-hell); }
.vf-pfeil svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.vf-zeitraum { font-weight: 600; font-size: .95rem; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; padding: 0 .2rem; }
.vf-zeitraum .kw { color: var(--blau); font-weight: 700; background: none; padding: 0; font-size: inherit; }
.vf-zeitraum .vf-trenner { margin: 0 .4rem; }
.vf-heute { margin-left: .4rem; border: 1px solid var(--linie); background: var(--weiss); color: var(--blau); font: inherit; font-size: .82rem; font-weight: 600; border-radius: 999px; padding: .25rem .8rem; min-height: 30px; cursor: pointer; flex: none; }
.vf-heute:hover { background: var(--blau-hell); }
.vf-heute.ist-heute { color: var(--text-2); border-color: transparent; background: var(--hinter); }
.vf-karte .vf-legende { gap: .25rem .85rem; font-size: .76rem; margin: 0; color: var(--text-2); }
.vf-karte .vf-legende i { width: 11px; height: 11px; border-radius: 3px; border: 1px solid #cfd5de; }
.vf-karte .lg-belegt { background: #e4e7ec; border-color: #d3d8e0 !important; }
.vf-karte .lg-feiertag { background: #f6e3ea; border-color: #d9a5b7 !important; }
.lg-mat-frei { background: var(--gruen); border-color: var(--gruen) !important; }
.lg-mat-knapp { background: #d9a400; border-color: #d9a400 !important; }
.lg-mat-voll { background: var(--rot); border-color: var(--rot) !important; }
.vf-karte .vf-hinweis { font-size: .8rem; color: var(--text-2); margin: .3rem 0 0; }
/* Raster: feine Linien, flache Blöcke, Tageskopf hell mit feiner gelber Linie für heute */
.vf-raster .wr-kopf { border-bottom: 1px solid #e3e7ed; }
.vf-raster .wr-kopf > div:first-child, .vf-raster .wr-kopf > div:last-child { background: transparent; border-radius: 0; }
.vf-raster .wr-kopf .wr-wt { position: relative; background: transparent; color: var(--text); border-left: 0; padding: .35rem 0 .5rem; font-weight: 700; font-size: .95rem; line-height: 1.15; }
.vf-raster .wr-wt .wr-wt-name { display: block; font-size: .72rem; font-weight: 500; color: var(--text-2); }
.vf-raster .wr-kopf .wr-wt small { display: inline; font-size: inherit; font-weight: inherit; opacity: 1; }
.vf-raster .wr-kopf .wr-wt.heute { background: transparent; color: var(--blau); }
.vf-raster .wr-kopf .wr-wt.heute .wr-wt-name { color: var(--blau); font-weight: 600; }
.vf-raster .wr-kopf .wr-wt.heute::after { content: ""; position: absolute; left: 50%; bottom: -1px; width: 2.2rem; height: 3px; margin-left: -1.1rem; border-radius: 2px; background: var(--gelb); }
.vf-raster .wr-kopf .wr-wt.vorbei { color: #9aa3b2; }
.vf-raster .wr-kopf .wr-wt.vorbei .wr-wt-name { color: #a7afbc; }
.vf-raster .wr-kopf .wr-wt.feiertag { background: transparent; color: #7a2140; }
.vf-raster .wr-kopf .wr-wt.feiertag .wr-wt-name { color: #7a2140; }
.vf-raster .wr-kopf .wr-wt small.wr-feiertag { display: block; font-size: .66rem; font-weight: 600; color: #7a2140; margin-top: 1px; }
.vf-raster .wr-stunde { border-top: 0; }
.vf-raster .wr-stunde span { top: -.5rem; font-size: .66rem; color: #8a93a3; background: transparent; }
.vf-raster .wr-achse .wr-stunde:first-child span { top: .1rem; }
.vf-raster .wr-tag { border-left: 1px solid #eef1f5; background-image: linear-gradient(to bottom, #eef1f5 1px, transparent 1px); }
.vf-raster .wr-tag:last-child { border-right: 0; }
.vf-raster .wr-tag.heute { background-color: #fffdf3; }
.vf-raster .wr-tag.vorbei { background-color: #fafbfc; }
.vf-raster .wr-tag.feiertag { background-color: #fdf6f8; }
.vf-raster .wr-block { border-left-width: 0; border-radius: 4px; padding: 2px 6px; box-shadow: none; }
.vf-raster .wr-block .wr-zeit { font-size: .66rem; color: #7a8394; }
.vf-raster .wr-block .wr-titel { font-size: .74rem; font-weight: 600; }
.vf-raster .wr-block.vf-belegt { background: #e4e7ec !important; color: #5b6474; }
.vf-raster .wr-tag.vorbei .wr-block.vf-belegt { background: #eceef2 !important; color: #8a93a3; }
.vf-raster .wr-block.vf-angefragt { border: 1px dashed #b4bcc8; border-left: 1px dashed #b4bcc8 !important; }
.vf-raster .wr-block.vf-gesperrt { background: repeating-linear-gradient(45deg, #d8dce3 0 3px, #eceef2 3px 7px) !important; color: #4a5263; }
.vf-raster .wr-block.vf-eigen, .vf-raster .wr-block.vf-eigen-angefragt, .vf-raster .wr-block.vf-verein { box-shadow: inset 0 0 0 1px rgba(138,109,0,.35); }
/* freie Zeiten: erst bei Hover/Fokus/Antippen sichtbar */
.vf-raster .wr-frei:hover, .vf-raster .wr-frei:focus-visible, .vf-raster .wr-frei:active { background: rgba(29,79,145,.07); outline: 1px solid rgba(29,79,145,.4); outline-offset: -1px; border-radius: 4px; }
.vf-raster .wr-frei:hover::after, .vf-raster .wr-frei:focus-visible::after, .vf-raster .wr-frei:active::after { content: "+ anfragen"; left: 6px; right: auto; top: 3px; font-size: .7rem; font-weight: 600; color: var(--blau); }
/* Material: 7 schlanke Tageskacheln */
.vf-karte .mat-woche { gap: .4rem; }
.vf-karte .mat-tag { border: 1px solid #e6e9ee; border-radius: 10px; padding: .55rem .5rem .6rem; gap: .3rem; box-shadow: none; }
.vf-karte .mat-tag:hover, .vf-karte .mat-tag:focus-visible { border-color: var(--blau); box-shadow: 0 0 0 1px var(--blau); }
.vf-karte .mat-tag.heute { border-color: #e6e9ee; box-shadow: none; }
.vf-karte .mat-tag.heute .mt-kopf { color: var(--blau); }
.vf-karte .mat-tag { position: relative; }
.vf-karte .mat-tag.heute::before { content: ""; position: absolute; left: 50%; top: -1px; width: 2.2rem; height: 3px; margin-left: -1.1rem; border-radius: 0 0 2px 2px; background: var(--gelb); }
.vf-karte .mat-tag[disabled] { opacity: .55; }
.vf-karte .mat-tag .mt-kopf { font-size: .82rem; font-weight: 600; }
.vf-karte .mat-tag .mt-wt { color: var(--text-2); font-weight: 500; }
.vf-karte .mat-tag.heute .mt-wt { color: var(--blau); }
.vf-karte .mat-tag .mt-zahl { font-size: 1.5rem; }
.vf-karte .mat-tag .mt-balken { height: 4px; border-radius: 2px; }
.vf-karte .mat-tag.knapp .mt-balken i { background: #d9a400; }
.vf-karte .mat-tag .mt-text { font-size: .72rem; }
@media (max-width: 759px) {
  .vf-karte { display: flex; flex-direction: column; padding: .75rem .8rem .9rem; }
  .vf-karte > * { min-width: 0; }
  .vf-segmente { width: 100%; }
  .vf-segment { font-size: .88rem; padding: .4rem .75rem; min-height: 40px; }
  .vf-info { font-size: .82rem; margin: .5rem 0 .55rem; }
  .vf-hinweise > p { right: 0; max-width: none; width: auto; }
  .vf-anfragen { margin-left: 0; }
  .vf-leiste { display: contents; }
  .vf-woche { order: 0; width: 100%; padding-top: .5rem; border-top: 1px solid #edf0f4; margin-bottom: .4rem; }
  .vf-pfeil { width: 36px; height: 40px; }
  .vf-zeitraum { flex: 1; text-align: center; font-size: .86rem; overflow: hidden; text-overflow: ellipsis; padding: 0; }
  .vf-zeitraum .vf-trenner { margin: 0 .25rem; }
  .vf-heute { margin-left: .15rem; min-height: 36px; padding: .2rem .65rem; }
  .vf-raster .wr-tag.heute { background-color: transparent; }
  #vf-tage, #kal-inhalt { order: 1; }
  .vf-karte .vf-legende { order: 2; margin-top: .5rem; }
  .vf-karte .vf-hinweis { order: 3; }
  .vf-tage { gap: 2px; margin: 0 0 .4rem; }
  .vf-tage button, .vf-tage button.feiertag:not([aria-pressed="true"]) { border: 0; background: transparent; border-radius: 10px; padding: .25rem 0 .2rem; min-height: 48px; line-height: 1.1; }
  .vf-tage .vt-name { display: block; font-size: .7rem; color: var(--text-2); }
  .vf-tage .vt-nr { display: block; font-size: 1rem; font-weight: 700; color: var(--text); }
  .vf-tage button[aria-pressed="true"] { background: var(--blau); }
  .vf-tage button[aria-pressed="true"] .vt-name, .vf-tage button[aria-pressed="true"] .vt-nr { color: var(--weiss); }
  .vf-tage button.heute:not([aria-pressed="true"]) { box-shadow: none; }
  .vf-tage button.heute:not([aria-pressed="true"]) .vt-nr { color: var(--blau); box-shadow: inset 0 -3px 0 var(--gelb); }
  .vf-tage button.feiertag:not([aria-pressed="true"]) .vt-name, .vf-tage button.feiertag:not([aria-pressed="true"]) .vt-nr { color: #7a2140; }
  .vf-tage button .punkt-frei, .vf-tage button .punkt-voll { width: 5px; height: 5px; margin-top: 3px; }
  .vf-tage button[aria-pressed="true"] .punkt-frei { background: #9fe0b2; }
  .vf-raster .wr-kopf:not(:has(.feiertag)) { display: none; }
  .vf-karte .mat-woche { gap: 0; border-top: 1px solid #edf0f4; }
  .vf-karte .mat-tag { display: grid; grid-template-columns: 5.2rem 1fr auto; grid-template-rows: auto auto; align-items: center; gap: .1rem .75rem; border: 0; border-bottom: 1px solid #edf0f4; border-radius: 0; padding: .55rem .2rem; text-align: left; }
  .vf-karte .mat-tag .mt-kopf { grid-row: 1 / span 2; }
  .vf-karte .mat-tag .mt-zahl { grid-column: 2; font-size: 1.15rem; }
  .vf-karte .mat-tag .mt-balken { grid-column: 2; grid-row: 2; }
  .vf-karte .mat-tag .mt-text, .vf-karte .mat-tag .mt-eigen { grid-column: 3; grid-row: 1 / span 2; }
  .vf-karte .mat-tag:hover, .vf-karte .mat-tag:focus-visible { box-shadow: inset 3px 0 0 var(--blau); }
  .vf-karte .mat-tag.heute::before { left: 0; top: 50%; width: 3px; height: 1.6rem; margin: -.8rem 0 0; border-radius: 0 2px 2px 0; }
}

/* ================================================================
   v1.7 – Handy: kompakter Kopf, umbrechende Menüs, keine waagrechten Scrollbereiche
   ================================================================ */
input, select, textarea { max-width: 100%; }
.reiter-auswahl { display: none; }
.qr-titel { margin: 0 0 .5rem; }
.qr-objekt-name { display: block; font-size: .95rem; font-weight: 600; color: var(--text-2); }
.qr-objekt-name:empty { display: none; }
.wp-tage { display: none; }
@media (max-width: 759px) {
  /* Kopf: Wappen + „Marktgemeinde Kapelln“ links, rechts Benutzer-Symbol mit Aufklappmenü */
  .kopf { border-bottom-width: 3px; }
  .kopf-innen { padding: .4rem .75rem; gap: .6rem; min-height: 52px; }
  .kopf .wappen { width: 30px; height: 35px; }
  .kopf-titel { font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1 1 auto; }
  .kopf-rechts { max-width: none; gap: .4rem; }
  .kopf-rechts > .btn.klein { min-height: 34px; padding: .2rem .65rem; font-size: .85rem; }
  .kopf-menue-knopf { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: 50%; border: 1px solid rgba(255,255,255,.55);
    background: transparent; color: var(--weiss); cursor: pointer; flex: none; }
  .kopf-menue-knopf:hover, .kopf-rechts.offen .kopf-menue-knopf { background: rgba(255,255,255,.16); }
  .kopf-menue { display: none; }
  .kopf-rechts.offen .kopf-menue {
    display: flex; flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: .5rem; position: absolute; right: 0; top: calc(100% + 10px); z-index: 40;
    width: max-content; min-width: 15rem; max-width: calc(100vw - 1.5rem); padding: .8rem; background: var(--weiss); color: var(--text);
    border: 1px solid var(--linie); border-radius: 10px; box-shadow: 0 10px 28px rgba(16, 24, 40, .22);
  }
  .kopf-rechts.offen .kopf-menue::before { content: ""; position: absolute; right: 14px; top: -7px; width: 12px; height: 12px; background: var(--weiss);
    border-left: 1px solid var(--linie); border-top: 1px solid var(--linie); transform: rotate(45deg); }
  .kopf-menue .benutzer { display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; font-size: .9rem; font-weight: 600; opacity: 1;
    overflow-wrap: anywhere; padding-bottom: .5rem; border-bottom: 1px solid var(--linie); }
  .kopf-menue .benutzer:empty { display: none; }
  .kopf-menue .rolle-hinweis { margin: 0; color: var(--blau); border-color: #c6d4ea; background: var(--blau-hell); opacity: 1; font-size: .78rem; }
  .kopf-menue .btn { width: 100%; justify-content: flex-start; min-height: 40px; }
  .kopf .kopf-menue .btn.zweit { border-color: var(--linie); }
  .kopf-menue .kopf-nur-menue { display: inline-flex; }
  /* Demo-Hinweis einzeilig */
  .demo-banner { display: flex; align-items: center; justify-content: center; gap: .5rem; padding: .15rem .5rem; font-size: .8rem; white-space: nowrap; }
  .demo-banner .demo-lang { display: none; }
  .demo-banner .demo-kurz { display: inline; }
  .demo-banner button, .demo-banner .btn.klein { margin: 0; min-height: 24px; padding: 0 .5rem; font-size: .76rem; border-radius: 6px; }
  /* Hauptmenü: kompakte Pillen, umbrechend (kein waagrechtes Scrollen) */
  .nav { position: static; touch-action: pan-y pinch-zoom; }
  .nav ul { flex-wrap: wrap; overflow: visible; gap: .35rem; padding: .5rem .75rem; }
  #nav ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav li { min-width: 0; flex: 1 1 auto; }
  .nav a { display: flex; align-items: center; justify-content: center; gap: .3rem; min-height: 38px; padding: .3rem .75rem; border: 1px solid var(--linie);
    border-radius: 999px; font-size: .9rem; white-space: nowrap; background: var(--weiss); }
  .nav a[aria-current="page"] { background: var(--blau); color: var(--weiss); border-color: var(--blau); }
  .nav a[aria-current="page"] .zahl { background: var(--gelb); }
  .nav .zahl { margin-left: 0; }
  /* Unterreiter: umbrechende Pillen bzw. Auswahlliste bei vielen Einträgen */
  .reiter { border-bottom: 0; margin-bottom: .85rem; touch-action: pan-y pinch-zoom; }
  .reiter ul { flex-wrap: wrap; overflow: visible; gap: .35rem; }
  .reiter li { min-width: 0; max-width: 100%; }
  .reiter a { display: flex; align-items: center; min-height: 36px; padding: .3rem .75rem; margin: 0; border: 1px solid var(--linie); border-radius: 999px;
    font-size: .88rem; background: var(--weiss); white-space: normal; }
  .reiter a[aria-current="page"] { background: var(--blau); color: var(--weiss); border: 1px solid var(--blau); }
  .reiter a[aria-current="page"]:hover { background: var(--blau-dunkel); color: var(--weiss); }
  .reiter.mit-auswahl ul { display: none; }
  .reiter.mit-auswahl .reiter-auswahl { display: flex; align-items: center; gap: .5rem; }
  .reiter-auswahl label { margin: 0; font-size: .9rem; color: var(--text-2); flex: none; }
  .reiter-auswahl select { flex: 1 1 auto; min-width: 0; font-weight: 600; color: var(--blau); border-color: var(--blau); }
  /* Raumauswahl öffentlich: umbrechend statt seitlich scrollen */
  .vf-segmente { flex-wrap: wrap; overflow: visible; touch-action: pan-y pinch-zoom; }
  .vf-segment { flex: 1 1 auto; justify-content: center; }
  #kal-inhalt, .vf-tage, .wp-tage { touch-action: pan-y pinch-zoom; }
  /* Tabellen: Karten statt seitlich scrollen */
  .tabelle-wrap, .vf-raster-wrap, .wp-raum { overflow-x: visible; }
  table.responsiv td, table.responsiv th[scope="row"] { overflow-wrap: anywhere; min-width: 0; }
  table.responsiv td.spannt { display: block; }
  table.responsiv tr:has(> td.leer:only-child) { border-style: dashed; }
  .gesamtkal td, .gesamtkal th:first-child, .gesamtkal td:first-child { min-width: 0; position: static; }
  table.responsiv.gesamtkal th[scope="row"] { font-size: 1rem; padding-bottom: .3rem; }
  table.responsiv.gesamtkal td[data-label]::before { display: block; font-size: .8rem; }
  table.responsiv.gesamtkal td { padding: .2rem 0 .3rem; border-top: 1px dashed var(--linie); }
  table.kompakt th[scope="row"] { font-weight: 700; }
  table.responsiv .quote { width: 50px; }
  /* Wochenplan (Verwaltung): Tagesansicht mit Tag-Leiste */
  .wochenraster { min-width: 0; }
  .wp-tage { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; margin: 0 0 .5rem; }
  .wp-tage button { border: 1px solid var(--linie); background: var(--weiss); border-radius: 10px; padding: .3rem 0; min-height: 44px; font: inherit; font-size: .85rem;
    font-weight: 700; color: var(--text); cursor: pointer; line-height: 1.1; }
  .wp-tage button small { display: block; font-size: .68rem; font-weight: 500; color: var(--text-2); }
  .wp-tage button[aria-pressed="true"] { background: var(--blau); border-color: var(--blau); color: var(--weiss); }
  .wp-tage button[aria-pressed="true"] small { color: #dbe7f7; }
  .wp-raum .wochenraster .wr-kopf { display: none; }
  /* Segment-Umschalter (Woche/Monat, gerade/ungerade KW): eine Zeile, gleich breite Teile */
  .kal-leiste > .segment, .wp-leiste > .segment { display: flex; flex-wrap: nowrap; width: 100%; }
  .kal-leiste > .segment button, .wp-leiste > .segment button { flex: 1 1 0; min-width: 0; padding: .45rem .4rem; font-size: .88rem; white-space: nowrap; }
  /* Formulare, Leisten */
  .filter-leiste input[type=search] { min-width: 0; flex: 1 1 12rem; }
  .filter-leiste .feld { min-width: 0; max-width: 100%; }
  .kal-leiste .titel { min-width: 0; }
  .zr-feld { flex-wrap: wrap; max-width: 100%; }
  dialog { width: calc(100% - 1rem); padding: 1rem; max-height: calc(100dvh - 1rem); }
  .verlauf-liste li { grid-template-columns: minmax(0, 1fr); }
  .anfrage dl { grid-template-columns: minmax(0, max-content) minmax(0, 1fr); }
  .anfrage dd, .anfrage dt { overflow-wrap: anywhere; }
}
@media (min-width: 760px) { .demo-banner .demo-kurz { display: none; } }
