/* Liegenschaften & Versicherungen – VG Falkenstein
   Neutrales Grundgerüst in Grau/Schwarz. Die Hausfarbe der gewählten Körperschaft
   (--rot, gesetzt in mandanten.js) erscheint nur im Wappen und am Punkt vor dem
   Bereichsnamen; Rot/Gelb/Grün sind den Statusangaben vorbehalten. */

:root {
  /* Hausfarbe (wird je Körperschaft überschrieben) */
  --rot: #c11b07;
  --rot-dunkel: #96150a;
  /* Flächen für Auswahl/Hover bleiben bewusst neutral, nicht in der Hausfarbe getönt */
  --rose: #f4f4f5;
  --rose-2: #e4e4e7;

  /* Neutrale Skala */
  --bg: #f7f7f8;
  --flaeche: #f4f4f5;
  --weiss: #fff;
  --linie: #ececee;
  --linie-stark: #dedee2;
  --text: #18181b;
  --text-2: #3f3f46;
  --text-leise: #71717a;
  --grau: #a1a1aa;
  --grau-dunkel: #3f3f46;

  /* Signalfarben – unabhängig von der Hausfarbe */
  --gefahr: #dc2626;
  --gefahr-dunkel: #b91c1c;
  --gefahr-hell: #fef2f2;
  --gelb: #facc15;
  --gelb-hell: #fefce8;
  --st-ueberfaellig: #dc2626;
  --st-faellig: #d97706;
  --st-ok: #16a34a;
  --st-unbekannt: #71717a;
  --st-ueberfaellig-bg: #fef2f2;
  --st-faellig-bg: #fffbeb;
  --st-ok-bg: #f0fdf4;
  --st-unbekannt-bg: #f4f4f5;

  --schrift: 'Inter Variable', 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --titel: var(--schrift);
  --radius: 12px;
  --radius-s: 8px;
  --schatten: 0 1px 2px rgba(16, 24, 40, .04);
  --schatten-m: 0 4px 12px -2px rgba(16, 24, 40, .08), 0 2px 4px -2px rgba(16, 24, 40, .04);
  --schatten-hoch: 0 24px 48px -12px rgba(16, 24, 40, .25), 0 0 0 1px rgba(16, 24, 40, .05);
  --kopf-hoehe: 56px;
  --rail-breite: 56px;
  --panel-breite: 236px;
  --fokus: 0 0 0 3px rgba(24, 24, 27, .12);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--schrift); font-size: 14px; line-height: 1.5; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; font-feature-settings: 'cv11', 'ss01';
}
a { color: var(--text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--grau); }
h1, h2, h3, h4 { font-family: var(--schrift); font-weight: 600; margin: 0; line-height: 1.3; letter-spacing: -.01em; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
::selection { background: var(--rose-2); }

.ic {
  display: inline-block; width: 1.05em; height: 1.05em; flex: none; background: currentColor; vertical-align: -0.16em;
  -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat;
}
kbd {
  font-family: var(--schrift); font-size: 11px; font-weight: 500; color: var(--text-leise); background: #fff;
  border: 1px solid var(--linie-stark); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; line-height: 16px;
}

/* =============================================================== App-Rahmen */
.rahmen { display: flex; height: 100vh; height: 100dvh; overflow: hidden; }
.app-spalte { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.haupt { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; width: 100%; padding: 28px 32px 64px; }

/* =============================================================== Kopfleiste */
.kopf {
  flex: none; z-index: 50; height: var(--kopf-hoehe); display: flex; align-items: center; gap: 12px;
  padding: 0 20px 0 24px; background: rgba(255, 255, 255, .85); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--linie);
}
.kopf__titel { font-size: 14px; font-weight: 600; white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 8px; }
.kopf__titel::before { content: ''; width: 8px; height: 8px; border-radius: 3px; background: var(--rot); flex: none; }
.demo-hinweis {
  font-size: 11px; font-weight: 600; color: #92400e; background: #fef3c7; border: 1px solid #fde68a;
  padding: 1px 8px; border-radius: 999px; flex: none;
}
.kopf__rechts { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
.menue-knopf { display: none; }

.kopf { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 560px) minmax(0, 1fr); }
.kopf__links { display: flex; align-items: center; gap: 12px; min-width: 0; }
.kopf__mitte { min-width: 0; }
.kopf__rechts { justify-self: end; }

/* =============================================================== Suche (Spotlight) */
.spot-knopf {
  width: 100%; height: 36px; display: flex; align-items: center; gap: 9px; padding: 0 8px 0 12px; cursor: text;
  border: 1px solid transparent; border-radius: 10px; background: var(--flaeche); color: var(--text-leise); font: inherit; font-size: 13.5px;
  transition: background .15s, border-color .15s;
}
.spot-knopf:hover { background: #ececee; }
.spot-knopf:focus-visible { outline: none; border-color: var(--linie-stark); box-shadow: var(--fokus); }
.spot-knopf .ic { width: 15px; height: 15px; flex: none; }
.spot-knopf__text { flex: 1; min-width: 0; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spot-knopf kbd { flex: none; }

.spot-hinter { position: fixed; inset: 0; z-index: 200; background: rgba(24, 24, 27, .28); backdrop-filter: blur(3px); animation: spot-ein .12s ease-out; }
.spot {
  position: fixed; z-index: 201; left: 50%; top: 12vh; transform: translateX(-50%); width: min(860px, calc(100vw - 32px));
  max-height: 76vh; display: flex; flex-direction: column; overflow: hidden;
  background: rgba(255, 255, 255, .96); backdrop-filter: saturate(180%) blur(20px); border-radius: 16px;
  box-shadow: 0 30px 80px -20px rgba(16, 24, 40, .45), 0 0 0 1px rgba(16, 24, 40, .08); animation: spot-auf .14s ease-out;
}
@keyframes spot-ein { from { opacity: 0; } }
@keyframes spot-auf { from { opacity: 0; transform: translateX(-50%) translateY(-6px) scale(.99); } }
.spot__eingabe { display: flex; align-items: center; gap: 12px; padding: 0 14px 0 18px; height: 60px; flex: none; }
.spot__eingabe > .ic { width: 21px; height: 21px; color: var(--text-leise); flex: none; }
.spot__eingabe input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; font: inherit; font-size: 20px; color: var(--text); outline: none; }
.spot__eingabe input::placeholder { color: var(--grau); }
.spot__esc { border: 0; background: none; padding: 4px; cursor: pointer; }
.spot__laedt { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--linie-stark); border-top-color: var(--text-leise); animation: spot-dreh .7s linear infinite; flex: none; }
@keyframes spot-dreh { to { transform: rotate(360deg); } }
.spot__inhalt { display: grid; grid-template-columns: minmax(0, 1fr) 300px; border-top: 1px solid var(--linie); min-height: 0; flex: 1; }
.spot__liste { overflow-y: auto; padding: 6px 8px 10px; max-height: calc(76vh - 60px - 38px); overscroll-behavior: contain; }
.spot__leer { padding: 28px 12px; text-align: center; color: var(--text-leise); }
.spot-gruppe__kopf {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 10px 4px;
  font-size: 11.5px; font-weight: 600; color: var(--text-leise); letter-spacing: .01em;
}
.spot-gruppe__mehr { border: 0; background: none; color: var(--text-leise); font: inherit; font-weight: 500; cursor: pointer; padding: 0; }
.spot-gruppe__mehr:hover { color: var(--text); text-decoration: underline; }
.spot-treffer { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px; color: var(--text); text-decoration: none; scroll-margin: 30px 0; }
.spot-treffer:hover { text-decoration: none; }
.spot-treffer.markiert { background: var(--text); color: #fff; }
.spot-treffer__icon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--flaeche); color: var(--text-2); flex: none; }
.spot-treffer__icon .ic { width: 16px; height: 16px; }
.spot-treffer.markiert .spot-treffer__icon { background: rgba(255, 255, 255, .14); color: #fff; }
.spot-treffer__text { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.spot-treffer__text b { font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spot-treffer__text small { font-size: 12px; color: var(--text-leise); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spot-treffer.markiert small { color: rgba(255, 255, 255, .72); }
.spot mark { background: none; color: inherit; font-weight: 700; }
.spot-kp { font-size: 10.5px; font-weight: 600; color: var(--text-leise); border: 1px solid var(--linie-stark); border-radius: 5px; padding: 0 5px; flex: none; }
.spot-treffer.markiert .spot-kp { color: #fff; border-color: rgba(255, 255, 255, .35); }
.spot-status { font-size: 11px; font-weight: 500; padding: 1px 7px; border-radius: 999px; flex: none; background: var(--flaeche); color: var(--text-2); }
.spot-status--kritisch, .spot-status--dringend { background: var(--gefahr-hell); color: var(--gefahr-dunkel); }
.spot-treffer.markiert .spot-status { background: rgba(255, 255, 255, .16); color: #fff; }

.spot-vorschau { border-left: 1px solid var(--linie); padding: 22px 20px; overflow-y: auto; max-height: calc(76vh - 60px - 38px); }
.spot-vorschau__icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--flaeche); color: var(--text-2); margin-bottom: 12px; }
.spot-vorschau__icon .ic { width: 22px; height: 22px; }
.spot-vorschau h3 { font-size: 16px; font-weight: 600; margin: 0 0 4px; line-height: 1.3; }
.spot-vorschau > p { margin: 0 0 14px; color: var(--text-leise); font-size: 12.5px; }
.spot-vorschau dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 12px; margin: 0 0 16px; font-size: 12.5px; }
.spot-vorschau dt { color: var(--text-leise); }
.spot-vorschau dd { margin: 0; overflow-wrap: anywhere; }
.spot-vorschau__knoepfe { display: flex; flex-wrap: wrap; gap: 6px; }
.spot-vorschau__knoepfe kbd { margin-left: 4px; background: rgba(255, 255, 255, .15); border-color: transparent; color: inherit; }
.spot__fuss {
  display: flex; align-items: center; gap: 16px; padding: 0 16px; height: 38px; flex: none; border-top: 1px solid var(--linie);
  font-size: 12px; color: var(--text-leise); background: rgba(244, 244, 245, .6);
}
.spot__fuss kbd { margin-right: 3px; }
.spot__zahl { margin-left: auto; }

/* =============================================================== KI-Assistent */
.ki-knopf {
  position: fixed; right: 24px; bottom: 24px; z-index: 150; width: 58px; height: 58px; border: 0; padding: 0; border-radius: 50%;
  background: none; cursor: pointer; isolation: isolate; animation: ki-erscheinen .6s cubic-bezier(.2, 1.4, .4, 1) both .4s;
  transition: transform .25s cubic-bezier(.2, 1.4, .4, 1);
}
.ki-knopf:hover { transform: translateY(-3px) scale(1.05); }
.ki-knopf:active { transform: scale(.95); }
.ki-knopf:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(24, 24, 27, .18); }
.ki-knopf::before {
  content: ''; position: absolute; inset: -4px; border-radius: 50%; filter: blur(14px); opacity: .5; z-index: -1;
  background: conic-gradient(from 0deg, var(--lumi-1), var(--lumi-2), var(--lumi-3), var(--lumi-4), var(--lumi-1));
  animation: ki-drehen 6s linear infinite, ki-atmen 3.2s ease-in-out infinite;
}
.ki-knopf:hover::before { opacity: .8; }
@keyframes ki-drehen { to { transform: rotate(360deg); } }
@keyframes ki-atmen { 0%, 100% { opacity: .35; } 50% { opacity: .75; } }
@keyframes ki-erscheinen { from { opacity: 0; transform: translateY(16px) scale(.6); } }

/* Lumi – alle Maße in em, Größe über font-size; helle Fassungen der Bereichsfarben */
.lumi, .ki-knopf { --lumi-1: #6cb4ff; --lumi-2: #a99bff; --lumi-3: #ffa877; --lumi-4: #4fd8b6; --lumi-tinte: #2a2750; }
.lumi { position: relative; display: inline-block; width: 1em; height: 1em; flex: none; animation: lumi-schweben 3.6s ease-in-out infinite; }
.lumi__koerper {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--lumi-1), var(--lumi-2), var(--lumi-3), var(--lumi-4), var(--lumi-1));
  box-shadow: inset 0 -.05em .1em rgba(42, 39, 80, .12), inset 0 .06em .1em rgba(255, 255, 255, .6);
  animation: ki-drehen 7s linear infinite;
}
.lumi__gesicht {
  position: absolute; inset: 17%; border-radius: 50%; background: radial-gradient(circle at 38% 30%, #fff 0%, #fbfaff 55%, #eeecfb 100%);
  box-shadow: 0 .02em .06em rgba(42, 39, 80, .18);
}
/* rosige Bäckchen */
.lumi__gesicht::before, .lumi__gesicht::after {
  content: ''; position: absolute; top: 52%; width: .1em; height: .06em; border-radius: 50%; background: #ffb3c4; opacity: .75;
}
.lumi__gesicht::before { left: 16%; }
.lumi__gesicht::after { right: 16%; }
.lumi__augen {
  position: absolute; left: 50%; top: 40%; display: flex; gap: .11em;
  transform: translate(calc(-50% + var(--lumi-x, 0em)), calc(-50% + var(--lumi-y, 0em))); transition: transform .18s ease-out;
}
.lumi__augen i {
  display: block; width: .09em; height: .135em; border-radius: .06em; background: var(--lumi-tinte);
  transform-origin: 50% 60%; animation: lumi-blinzeln 4.6s infinite;
}
.lumi__augen i:last-child { animation-delay: .04s; }
.lumi__mund {
  position: absolute; left: 50%; top: 64%; width: .2em; height: .08em; transform: translateX(-50%);
  border: .028em solid var(--lumi-tinte); border-top: 0; border-radius: 0 0 .12em .12em; transition: height .15s, width .15s;
}
/* lauscht: blinzelt, schaut sich ab und zu um, hüpft gelegentlich */
.lumi--ruhe { animation: lumi-schweben 3.6s ease-in-out infinite, lumi-huepfer 9s ease-in-out infinite 2s; }
.lumi--ruhe .lumi__gesicht { animation: lumi-umschauen 11s ease-in-out infinite 4s; }
/* denkt: schneller, Blick nach oben, Körper dreht flott */
.lumi--denkt { animation: lumi-huepfen .9s ease-in-out infinite; }
.lumi--denkt .lumi__koerper { animation-duration: 1.4s; }
.lumi--denkt .lumi__augen { transform: translate(calc(-50% + .04em), calc(-50% - .045em)); }
.lumi--denkt .lumi__mund { width: .1em; height: .05em; border-radius: 50%; border-top: .028em solid var(--lumi-tinte); }
/* spricht: Mund bewegt sich */
.lumi--spricht .lumi__mund { animation: lumi-sprechen .32s ease-in-out infinite alternate; }
/* freut sich: lachende Augen ^ ^ */
.lumi--freut .lumi__augen i { height: .07em; background: none; border: .028em solid var(--lumi-tinte); border-bottom: 0; border-radius: .08em .08em 0 0; animation: none; }
.lumi--freut .lumi__mund { width: .24em; height: .11em; }
@keyframes lumi-schweben { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-.035em); } }
@keyframes lumi-huepfer { 0%, 88%, 100% { transform: translateY(0) scale(1, 1); } 91% { transform: translateY(-.16em) scale(.95, 1.05); } 95% { transform: translateY(0) scale(1.07, .93); } 97% { transform: translateY(-.03em) scale(.98, 1.02); } }
@keyframes lumi-huepfen { 0%, 100% { transform: translateY(0) scale(1.04, .96); } 45% { transform: translateY(-.12em) scale(.96, 1.04); } }
@keyframes lumi-blinzeln { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes lumi-umschauen { 0%, 70%, 100% { transform: translateX(0); } 74%, 80% { transform: translateX(-.03em) rotate(-6deg); } 85%, 91% { transform: translateX(.03em) rotate(6deg); } }
@keyframes lumi-sprechen { from { height: .05em; width: .16em; } to { height: .12em; width: .2em; } }
.ki-knopf .lumi { filter: drop-shadow(0 .12em .18em rgba(91, 79, 196, .35)); }
.ki-start__lumi { margin-bottom: 14px; filter: drop-shadow(0 16px 20px rgba(108, 180, 255, .4)); }

.ki-fenster {
  position: fixed; right: 24px; bottom: 96px; z-index: 151; width: 420px; height: min(660px, calc(100dvh - 130px));
  display: flex; flex-direction: column; overflow: hidden; border-radius: 20px;
  background: rgba(255, 255, 255, .97); backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 30px 80px -20px rgba(16, 24, 40, .45), 0 0 0 1px rgba(16, 24, 40, .08);
  transform-origin: calc(100% - 29px) calc(100% + 43px); animation: ki-aufgehen .28s cubic-bezier(.2, 1.25, .4, 1);
}
@keyframes ki-aufgehen { from { opacity: 0; transform: scale(.4); } }
.ki-fenster__kopf { display: flex; align-items: center; gap: 10px; padding: 12px 10px 12px 16px; border-bottom: 1px solid var(--linie); flex: none; }
.ki-fenster__titel { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.ki-fenster__titel b { font-size: 14px; }
.ki-fenster__titel small { font-size: 11.5px; color: var(--text-leise); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ki-verlauf { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 14px; overscroll-behavior: contain; }
.ki-start { margin: auto 0; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8px 6px; }
.ki-start h3 { margin: 0 0 6px; font-size: 18px; }
.ki-start p { margin: 0 0 18px; color: var(--text-leise); font-size: 13px; max-width: 310px; }
.ki-vorschlaege { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.ki-vorschlaege button {
  text-align: left; font: inherit; font-size: 13px; color: var(--text); background: #fff; border: 1px solid var(--linie-stark);
  border-radius: 12px; padding: 9px 12px; cursor: pointer; transition: background .15s, border-color .15s, transform .15s;
  animation: ki-einblenden .35s ease-out both;
}
.ki-vorschlaege button:nth-child(2) { animation-delay: .05s; }
.ki-vorschlaege button:nth-child(3) { animation-delay: .1s; }
.ki-vorschlaege button:nth-child(4) { animation-delay: .15s; }
.ki-vorschlaege button:hover { background: var(--flaeche); border-color: var(--grau); transform: translateX(2px); }
@keyframes ki-einblenden { from { opacity: 0; transform: translateY(6px); } }
.ki-nachricht { max-width: 100%; font-size: 14px; line-height: 1.55; animation: ki-einblenden .2s ease-out; overflow-wrap: anywhere; }
.ki-nachricht--ich { align-self: flex-end; max-width: 85%; background: var(--text); color: #fff; padding: 9px 13px; border-radius: 16px 16px 4px 16px; white-space: pre-wrap; }
.ki-nachricht--ki { align-self: flex-start; }
.ki-nachricht--ki p { margin: 0 0 8px; }
.ki-nachricht--ki p:last-child, .ki-nachricht--ki ul:last-child, .ki-nachricht--ki ol:last-child { margin-bottom: 0; }
.ki-nachricht--ki ul, .ki-nachricht--ki ol { margin: 0 0 8px; padding-left: 20px; }
.ki-nachricht--ki li { margin: 2px 0; }
.ki-nachricht--ki a { color: var(--text); font-weight: 500; text-decoration: underline; text-decoration-color: var(--grau); text-underline-offset: 2px; }
.ki-nachricht--ki a:hover { text-decoration-color: var(--text); }
.ki-nachricht--ki code { font-size: 12.5px; background: var(--flaeche); border-radius: 5px; padding: 1px 5px; }
.ki-schritte { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.ki-schritt {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--text-leise); background: var(--flaeche);
  border-radius: 999px; padding: 3px 9px 3px 7px; animation: ki-einblenden .2s ease-out;
}
.ki-schritt .ic { width: 12px; height: 12px; }
.ki-schritt--aktiv {
  color: var(--text-2);
  background: linear-gradient(90deg, var(--flaeche) 0%, #e4e4e7 40%, var(--flaeche) 80%) 0 0 / 200% 100%; animation: ki-schimmer 1.2s linear infinite;
}
@keyframes ki-schimmer { to { background-position: -200% 0; } }
.ki-denkt { display: inline-flex; gap: 4px; padding: 6px 0; }
.ki-denkt i { width: 7px; height: 7px; border-radius: 50%; background: var(--grau); animation: ki-huepfen 1s ease-in-out infinite; }
.ki-denkt i:nth-child(2) { animation-delay: .15s; }
.ki-denkt i:nth-child(3) { animation-delay: .3s; }
@keyframes ki-huepfen { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }
.ki-cursor { display: inline-block; width: 7px; height: 15px; margin-left: 2px; vertical-align: -2px; border-radius: 2px; background: var(--text); animation: ki-blinken 1s steps(2) infinite; }
@keyframes ki-blinken { 50% { opacity: 0; } }
.ki-fehler { margin: 0; }
.ki-eingabe { display: flex; align-items: flex-end; gap: 8px; margin: 0 12px 12px; padding: 8px 8px 8px 14px; border: 1px solid var(--linie-stark); border-radius: 16px; background: #fff; flex: none; transition: border-color .15s, box-shadow .15s; }
.ki-eingabe:focus-within { border-color: var(--grau); box-shadow: var(--fokus); }
.ki-eingabe textarea { flex: 1; min-width: 0; border: 0; outline: none; resize: none; font: inherit; font-size: 14px; line-height: 1.45; padding: 5px 0; max-height: 140px; background: none; color: var(--text); }
.ki-senden { width: 34px; height: 34px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--text); color: #fff; cursor: pointer; flex: none; transition: transform .15s, opacity .15s; }
.ki-senden:hover:not(:disabled) { transform: scale(1.07); }
.ki-senden:disabled { opacity: .25; cursor: default; }
.ki-senden .ic { width: 17px; height: 17px; }
.ki-senden--stopp .ic { width: 13px; height: 13px; }

/* Aufklappliste (Körperschaft, Benutzer) */
.auswahl { position: relative; }
.auswahl__knopf {
  display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 8px 0 6px; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--linie-stark); background: #fff; color: var(--text); font-weight: 500; font-size: 13px;
  box-shadow: var(--schatten); transition: background .15s, border-color .15s;
}
.auswahl__knopf:hover, .auswahl__knopf.offen { background: var(--flaeche); }
.auswahl__pfeil { width: 14px; height: 14px; color: var(--text-leise); }
.auswahl__wert { white-space: nowrap; }
.auswahl__liste {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 70; background: #fff; color: var(--text);
  border-radius: 12px; box-shadow: var(--schatten-hoch); padding: 6px; max-height: 70vh; overflow: auto; animation: rein .14s ease-out;
}
.auswahl__titel { font-size: 11.5px; font-weight: 500; color: var(--text-leise); padding: 6px 10px 4px; }
.auswahl__eintrag {
  display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; cursor: pointer; text-align: left;
  padding: 7px 10px; border-radius: 8px; color: var(--text); font: inherit;
}
.auswahl__eintrag:hover { background: var(--flaeche); }
.auswahl__eintrag.aktiv { background: var(--rose); }
.auswahl__eintrag > .ic { color: var(--text); margin-left: auto; width: 16px; height: 16px; }
.auswahl__text { display: flex; flex-direction: column; min-width: 0; flex: 1; font-size: 13.5px; line-height: 1.3; }
.auswahl__text b { font-weight: 500; }
.auswahl__text small { color: var(--text-leise); font-size: 12px; }

.wappenstapel { display: inline-flex; align-items: center; flex: none; }
.wappenstapel img { width: 20px; height: auto; }
.wappenstapel--klein img { width: 18px; }
.wappenstapel--3 img { width: 16px; }
.wappenstapel--3 img + img { margin-left: -4px; }
.wappenstapel--3.wappenstapel--klein img { width: 15px; }

/* =============================================================== Navigation: Rail + Panel */
.leiste {
  flex: none; z-index: 60; height: 100%; display: flex; flex-direction: column;
  background: #fbfbfc; border-right: 1px solid var(--linie);
}
.leiste__logo {
  height: var(--kopf-hoehe); flex: none; display: flex; align-items: center; gap: 8px; padding: 0 10px 0 16px;
  border-bottom: 1px solid var(--linie);
}
.leiste--zu .leiste__logo { width: var(--rail-breite); padding: 0; justify-content: center; }
.leiste__marke { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; color: var(--text); }
.leiste__marke:hover { text-decoration: none; }
.leiste__marke .wappenstapel img { width: 24px; }
.leiste__marke .wappenstapel--3 img { width: 18px; }
.leiste__name { display: flex; flex-direction: column; font-size: 13px; font-weight: 600; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leiste__name small { font-size: 11.5px; font-weight: 500; color: var(--text-leise); }
.leiste__einklappen { margin-left: auto; border: 0; background: none; cursor: pointer; color: var(--grau); padding: 6px; border-radius: 7px; display: grid; }
.leiste__einklappen:hover { background: var(--flaeche); color: var(--text); }
.leiste__einklappen .ic { width: 17px; height: 17px; }
.leiste__korpus { flex: 1; min-height: 0; display: flex; }

.rail {
  width: var(--rail-breite); flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 0; border-right: 1px solid var(--linie);
}
.rail__knopf, .rail__ich {
  position: relative; width: 36px; height: 36px; border-radius: 10px; border: 0; cursor: pointer;
  display: grid; place-items: center; background: transparent; color: var(--text-leise); transition: background .12s, color .12s;
}
.rail__knopf .ic { width: 18px; height: 18px; }
.rail__knopf:hover { background: #efeff1; color: var(--text); }
.rail__knopf.aktiv { background: #fff; color: var(--text); box-shadow: 0 0 0 1px var(--linie), 0 1px 2px rgba(16, 24, 40, .06); }
.rail__zahl {
  position: absolute; top: -3px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--text); color: #fff; font-size: 9.5px; font-weight: 600; line-height: 16px; text-align: center;
  box-shadow: 0 0 0 2px #fbfbfc; font-variant-numeric: tabular-nums;
}
.rail__fuss { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.rail__ich { cursor: default; }
[data-tipp]:hover::after {
  content: attr(data-tipp); position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%);
  background: var(--text); color: #fff; font-size: 12px; font-weight: 500; white-space: nowrap;
  padding: 4px 8px; border-radius: 6px; pointer-events: none; z-index: 80;
}

.panel { width: var(--panel-breite); flex: none; display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.panel__titel { font-size: 13px; font-weight: 600; color: var(--text); padding: 16px 18px 4px; }
.panel__liste { flex: 1; overflow-y: auto; padding: 0 10px 14px; display: flex; flex-direction: column; gap: 1px; }
.panel__gruppe { font-size: 11.5px; font-weight: 500; color: var(--grau); padding: 14px 10px 4px; }
.panel__link {
  position: relative; display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; border-radius: 8px;
  color: var(--text-2); font-weight: 500; font-size: 13.5px; text-decoration: none; white-space: nowrap; transition: background .12s, color .12s;
}
.panel__link .ic { width: 16px; height: 16px; color: var(--text-leise); }
.panel__text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.panel__link:hover { background: #efeff1; color: var(--text); text-decoration: none; }
.panel__link.aktiv { background: #fff; color: var(--text); box-shadow: 0 0 0 1px var(--linie), var(--schatten); }
.panel__link.aktiv .ic { color: var(--text); }
.panel__zahl {
  min-width: 20px; height: 18px; padding: 0 6px; border-radius: 9px; background: #ececee; color: var(--text-2);
  font-size: 11px; font-weight: 600; line-height: 18px; text-align: center; flex: none; font-variant-numeric: tabular-nums;
}
.panel__link.aktiv .panel__zahl { background: #e4e4e7; color: var(--text); }
.leiste-hinter { display: none; }

/* =============================================================== Seite */
.seitenkopf { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.seitenkopf > div:first-child { display: flex; flex-direction: column; }
.seitenkopf h1 { font-size: 24px; font-weight: 650; letter-spacing: -.02em; color: var(--text); order: 2; }
.seitenkopf__kicker { order: 3; font-size: 13.5px; color: var(--text-leise); margin-top: 2px; }
.seitenkopf__kicker .ic { color: var(--text-leise); }
.seitenkopf__aktionen { display: flex; gap: 8px; flex-wrap: wrap; }
.zurueck { order: 1; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; margin-bottom: 6px; color: var(--text-leise); }
.zurueck:hover { color: var(--text); text-decoration: none; }

.raster { display: grid; gap: 16px; }
.raster--kpi { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.raster--2 { grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); }
.raster--3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.raster--haupt { grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr); }
.stapel { display: flex; flex-direction: column; gap: 16px; }
.raster > *, .stapel > * { min-width: 0; }

/* Karten */
.karte { background: #fff; border-radius: var(--radius); border: 1px solid var(--linie); box-shadow: var(--schatten); }
.karte__kopf { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--linie); }
.karte__kopf h2 { font-size: 14px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 8px; }
.karte__kopf h2 .ic { color: var(--text-leise); width: 16px; height: 16px; margin: 0; }
.karte__kopf > a, .karte__kopf .klein { font-size: 12.5px; font-weight: 500; color: var(--text-leise); }
.karte__kopf > a:hover { color: var(--text); }
.karte__inhalt { padding: 16px; }
.karte__fuss { padding: 10px 16px; border-top: 1px solid var(--linie); font-size: 13px; }

/* Kennzahlen */
.kpi { padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; color: inherit; transition: box-shadow .15s, border-color .15s; }
.kpi:hover { text-decoration: none; border-color: var(--linie-stark); box-shadow: var(--schatten-m); }
.kpi__titel { font-size: 12.5px; color: var(--text-leise); font-weight: 500; display: flex; align-items: center; gap: 7px; }
.kpi__titel::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--akzent, var(--linie-stark)); flex: none; }
.kpi__wert { font-size: 26px; font-weight: 650; letter-spacing: -.02em; line-height: 1.2; color: var(--text); font-variant-numeric: tabular-nums; margin-top: 4px; }
.kpi__zusatz { font-size: 12px; color: var(--text-leise); }

/* Status & Chips */
.status {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; white-space: nowrap;
  padding: 2px 8px 2px 7px; border-radius: 999px; background: var(--bg); color: var(--fg);
}
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--fg); }
.st-ueberfaellig { --fg: var(--st-ueberfaellig); --bg: var(--st-ueberfaellig-bg); }
.st-faellig { --fg: var(--st-faellig); --bg: var(--st-faellig-bg); }
.st-ok { --fg: var(--st-ok); --bg: var(--st-ok-bg); }
.st-unbekannt { --fg: var(--st-unbekannt); --bg: var(--st-unbekannt-bg); }
.punkt { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--fg); flex: none; }

.chip {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; padding: 1px 8px; border-radius: 999px;
  background: var(--flaeche); color: var(--text-2); white-space: nowrap; border: 1px solid transparent; line-height: 1.6;
}
.chip .ic { width: 13px; height: 13px; }
a.chip:hover { text-decoration: none; background: #ececee; }
.chip--rot { background: var(--gefahr-hell); color: var(--gefahr-dunkel); }
.chip--gelb { background: var(--st-faellig-bg); color: #b45309; }
.chip--gruen { background: var(--st-ok-bg); color: #15803d; }
.prio-dringend { background: var(--gefahr-hell); color: var(--gefahr-dunkel); font-weight: 600; }
.prio-hoch { background: var(--st-faellig-bg); color: #b45309; }
.prio-niedrig { color: var(--text-leise); }
.kp-chip { font-weight: 600; font-size: 11px; letter-spacing: .02em; background: #fff; border-color: var(--linie-stark); color: var(--text-2); }

.avatar {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; flex: none;
  background: #e4e4e7; color: var(--text-2); font-size: 10.5px; font-weight: 600; letter-spacing: .01em;
}
.avatar--klein { width: 22px; height: 22px; font-size: 9.5px; }
.person { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.person span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Knöpfe */
.btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center; height: 34px; padding: 0 12px;
  border: 1px solid var(--linie-stark); background: #fff; color: var(--text); border-radius: var(--radius-s);
  cursor: pointer; font-weight: 500; font-size: 13.5px; text-decoration: none; white-space: nowrap; box-shadow: var(--schatten);
  transition: background .12s, border-color .12s, box-shadow .12s;
}
.btn .ic { width: 15px; height: 15px; }
.btn:hover { background: var(--flaeche); text-decoration: none; }
.btn--primaer { background: var(--text); border-color: var(--text); color: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, .12), inset 0 1px 0 rgba(255, 255, 255, .1); }
.btn--primaer:hover { background: #27272a; border-color: #27272a; }
.btn--klein { height: 28px; padding: 0 9px; font-size: 12.5px; border-radius: 7px; }
.btn--text { border-color: transparent; background: transparent; color: var(--text-2); box-shadow: none; padding-left: 6px; padding-right: 6px; }
.btn--text:hover { background: var(--flaeche); color: var(--text); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
label.checkbox.btn { gap: 8px; }
.knopfgruppe { display: inline-flex; padding: 2px; background: var(--flaeche); border-radius: 9px; gap: 2px; }
.knopfgruppe .btn { height: 30px; border: 0; box-shadow: none; background: transparent; color: var(--text-leise); border-radius: 7px; }
.knopfgruppe .btn:hover { color: var(--text); background: transparent; }
.knopfgruppe .btn.aktiv { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(16, 24, 40, .08), 0 0 0 1px var(--linie); }
.symbolknopf { border: 0; background: none; width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; color: var(--text-leise); cursor: pointer; }
.symbolknopf:hover { background: var(--flaeche); color: var(--text); text-decoration: none; }
.schliessen { border: 0; background: none; cursor: pointer; padding: 6px; color: var(--text-leise); border-radius: 7px; display: inline-grid; }
.schliessen:hover { background: var(--flaeche); color: var(--text); }

/* Formulare */
.feld { display: flex; flex-direction: column; gap: 6px; }
.feld > span { font-size: 13px; font-weight: 500; color: var(--text-2); }
.feld > span small { font-weight: 400; color: var(--text-leise); }
.feld input, .feld select, .feld textarea, .eingabe {
  height: 36px; border: 1px solid var(--linie-stark); border-radius: var(--radius-s); padding: 0 11px; background: #fff; width: 100%;
  font-size: 13.5px; box-shadow: var(--schatten); transition: border-color .12s, box-shadow .12s;
}
.feld textarea, textarea.eingabe { height: auto; min-height: 84px; padding: 9px 11px; resize: vertical; line-height: 1.5; }
.feld input[type='file'] { padding: 6px 8px; height: auto; }
.feld input[type='checkbox'] { width: 16px; height: 16px; box-shadow: none; }
.feld input:focus, .feld select:focus, .feld textarea:focus, .eingabe:focus { border-color: var(--grau-dunkel); outline: none; box-shadow: var(--fokus); }
.feld small { color: var(--text-leise); font-size: 12px; }
.formular { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.formular .breit { grid-column: 1 / -1; }
.filterleiste { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.filterleiste .eingabe, .filterleiste select {
  width: auto; min-width: 150px; height: 34px; border: 1px solid var(--linie-stark); border-radius: var(--radius-s);
  padding: 0 10px; background: #fff; font-size: 13.5px; box-shadow: var(--schatten);
}
.filterleiste .suchfeld { min-width: 240px; flex: 1; max-width: 360px; }
.checkbox { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--text); }

/* Tabellen */
.tabelle-huelle { overflow-x: auto; }
table.tabelle { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.tabelle th {
  text-align: left; font-weight: 500; font-size: 12.5px; color: var(--text-leise); padding: 9px 14px; white-space: nowrap;
  background: #fafafa; border-bottom: 1px solid var(--linie);
}
.tabelle th:first-child { border-top-left-radius: var(--radius); }
.tabelle th:last-child { border-top-right-radius: var(--radius); }
.tabelle th button { all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
.tabelle th button:hover { color: var(--text); }
.tabelle td { padding: 11px 14px; border-bottom: 1px solid var(--linie); vertical-align: top; }
.tabelle tbody tr:last-child td { border-bottom: 0; }
.tabelle tr.klickbar { cursor: pointer; }
.tabelle tbody tr:hover td { background: #fafafa; }
.tabelle .leise { color: var(--text-leise); font-size: 12.5px; }
.tabelle .rechts { text-align: right; font-variant-numeric: tabular-nums; }
.tabelle .nowrap { white-space: nowrap; }
.tabelle .fett { font-weight: 500; }

.leise { color: var(--text-leise); }
.klein { font-size: 12.5px; }
.fett { font-weight: 600; }
.rot { color: var(--gefahr); }
.gruen { color: var(--st-ok); }
.zeile { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.zeile--zwischen { justify-content: space-between; }
.trenner { border: 0; border-top: 1px solid var(--linie); margin: 14px 0; }
.leer { padding: 36px 18px; text-align: center; color: var(--text-leise); font-size: 13.5px; }
.leer .ic { width: 28px; height: 28px; color: var(--grau); display: block; margin: 0 auto 10px; }

/* Listen */
.liste { list-style: none; margin: 0; padding: 4px 0; }
.liste > li { padding: 10px 16px; display: flex; gap: 12px; align-items: flex-start; }
.liste > li + li { border-top: 1px solid var(--linie); }
.liste a.liste__link { color: inherit; display: flex; gap: 12px; align-items: flex-start; flex: 1; min-width: 0; }
.liste a.liste__link:hover { text-decoration: none; }
.liste a.liste__link:hover .liste__titel { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--grau); }
.liste__titel { font-weight: 500; font-size: 13.5px; }
.liste__meta { font-size: 12.5px; color: var(--text-leise); }
.liste__rechts { margin-left: auto; text-align: right; flex: none; }
.datum-box { flex: none; width: 42px; text-align: center; border: 1px solid var(--linie); border-radius: 9px; overflow: hidden; font-size: 10px; line-height: 1.2; background: #fff; }
.datum-box b { display: block; font-size: 16px; font-weight: 650; padding: 4px 0 0; font-variant-numeric: tabular-nums; }
.datum-box span { display: block; color: var(--fg, var(--text-leise)); text-transform: uppercase; font-weight: 600; letter-spacing: .04em; padding: 0 0 4px; }

/* Balken */
.balken { display: flex; height: 6px; border-radius: 999px; overflow: hidden; background: var(--flaeche); gap: 2px; }
.balken > i { display: block; height: 100%; border-radius: 999px; }
.legende { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--text-leise); }
.legende span { display: inline-flex; align-items: center; gap: 6px; }

/* Liegenschaftskacheln */
.kachel { display: flex; flex-direction: column; color: inherit; overflow: hidden; transition: box-shadow .15s, border-color .15s; }
.kachel:hover { text-decoration: none; border-color: var(--linie-stark); box-shadow: var(--schatten-m); }
.kachel__band { display: none; }
.kachel__kopf { padding: 16px 16px 8px; display: flex; gap: 12px; align-items: flex-start; }
.kachel__icon { width: 36px; height: 36px; border-radius: 10px; background: var(--flaeche); color: var(--text-2); display: grid; place-items: center; flex: none; }
.kachel__icon .ic { width: 18px; height: 18px; }
.kachel h3 { font-size: 14.5px; font-weight: 600; color: var(--text); }
.kachel__nr { font-size: 12px; color: var(--text-leise); margin-bottom: 2px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.kachel__rumpf { padding: 4px 16px 14px; font-size: 13px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.kachel__fuss { padding: 10px 16px; border-top: 1px solid var(--linie); display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; background: #fcfcfd; }

/* Reiter */
.reiter { display: flex; gap: 20px; border-bottom: 1px solid var(--linie); margin-bottom: 20px; overflow-x: auto; }
.reiter button {
  border: 0; background: none; padding: 10px 0; cursor: pointer; font-weight: 500; font-size: 13.5px; color: var(--text-leise);
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center;
}
.reiter button:hover { color: var(--text); }
.reiter button.aktiv { color: var(--text); border-bottom-color: var(--text); }
.reiter .zahl { background: var(--flaeche); border-radius: 999px; padding: 0 7px; font-size: 11.5px; color: var(--text-leise); font-variant-numeric: tabular-nums; }

.daten { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; font-size: 13.5px; margin: 0; }
.daten dt { color: var(--text-leise); }
.daten dd { margin: 0; }

/* Aufgabenboard */
.board { display: grid; grid-template-columns: repeat(3, minmax(280px, 1fr)); gap: 16px; align-items: start; }
.spalte { background: var(--flaeche); border-radius: var(--radius); padding: 8px; min-height: 200px; border: 1px solid transparent; }
.spalte--ziel { border: 1px dashed var(--grau-dunkel); background: #ececee; }
.spalte__kopf { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px 10px; }
.spalte__kopf h3 { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.spalte__kopf h3 .ic { color: var(--text-leise); }
.spalte__liste { display: flex; flex-direction: column; gap: 8px; }
.karteikarte {
  position: relative; background: #fff; border-radius: 10px; padding: 11px 12px 11px 14px; border: 1px solid var(--linie);
  box-shadow: var(--schatten); cursor: pointer; color: inherit; display: block; transition: box-shadow .15s, border-color .15s;
}
.karteikarte::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--fg, transparent); }
.karteikarte:hover { box-shadow: var(--schatten-m); border-color: var(--linie-stark); text-decoration: none; }
.karteikarte[draggable='true'] { cursor: grab; }
.karteikarte__titel { font-weight: 500; font-size: 13.5px; line-height: 1.4; }
.karteikarte__meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; font-size: 12px; color: var(--text-leise); }

/* Kalender */
.kalender { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.kalender__wt { padding: 8px 10px; font-size: 12px; font-weight: 500; color: var(--text-leise); border-bottom: 1px solid var(--linie); }
.kalender__tag { min-height: 112px; padding: 6px; border-right: 1px solid var(--linie); border-bottom: 1px solid var(--linie); display: flex; flex-direction: column; gap: 3px; min-width: 0; cursor: pointer; }
.kalender__tag:nth-child(7n) { border-right: 0; }
.kalender__tag--fremd { background: #fcfcfd; color: var(--grau); }
.kalender__tag--we { background: #fcfcfd; }
.kalender__tag--heute .kalender__nr { background: var(--text); color: #fff; }
.kalender__nr { font-size: 12px; font-weight: 600; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; font-variant-numeric: tabular-nums; }
.termin {
  font-size: 11.5px; line-height: 1.35; padding: 2px 6px 2px 9px; border-radius: 5px; background: var(--bg); color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; cursor: pointer; position: relative;
}
.termin::before { content: ''; position: absolute; left: 3px; top: 4px; bottom: 4px; width: 2px; border-radius: 2px; background: var(--fg); }
.termin:hover { text-decoration: none; filter: brightness(.97); }
.termin--aufgabe { --fg: var(--text-leise); --bg: var(--flaeche); }
.mehr { font-size: 11.5px; color: var(--text-leise); cursor: pointer; background: none; border: 0; padding: 0 4px; text-align: left; }

/* Karte */
.kartenansicht { position: relative; height: calc(100vh - var(--kopf-hoehe) - 150px); min-height: 520px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--linie); background: #e5e7e4; }
.kartenansicht .karte-canvas, .minikarte .karte-canvas { position: absolute; inset: 0; }
.minikarte { height: 240px; border-radius: 10px; overflow: hidden; position: relative; background: #e5e7e4; }
.kartenpanel {
  position: absolute; z-index: 5; top: 12px; left: 12px; width: 290px; max-height: calc(100% - 24px); overflow: auto;
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); border-radius: 12px; box-shadow: var(--schatten-hoch); font-size: 13px;
}
.kartenpanel section { padding: 12px 14px; border-bottom: 1px solid var(--linie); }
.kartenpanel h4 { font-size: 12px; font-weight: 500; color: var(--text-leise); margin-bottom: 8px; }
.ebenen { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.ebenen button {
  border: 1px solid var(--linie-stark); background: #fff; border-radius: 9px; padding: 8px 6px; cursor: pointer; font-size: 12px; font-weight: 500;
  display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--text-2);
}
.ebenen button .ic { width: 17px; height: 17px; }
.ebenen button.aktiv { border-color: var(--text); background: #fff; color: var(--text); box-shadow: 0 0 0 1px var(--text); }
.kartenpanel .checkbox { display: flex; padding: 3px 0; }
.kartenpanel__liste { list-style: none; margin: 0; padding: 4px; }
.kartenpanel__liste li { display: flex; gap: 10px; align-items: center; padding: 7px 10px; cursor: pointer; border-radius: 8px; }
.kartenpanel__liste li:hover { background: var(--flaeche); }
.kartenmarker { width: 30px; height: 30px; padding: 0; border: 0; background: none; cursor: pointer; }
.kartenmarker > i {
  width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--fg); border: 2px solid #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .3); display: grid; place-items: center;
}
.kartenmarker .ic { transform: rotate(45deg); color: #fff; width: 14px; height: 14px; }
.kartenmarker:hover > i { box-shadow: 0 0 0 3px #fff, 0 4px 12px rgba(0, 0, 0, .35); }
.maplibregl-popup-content { font-family: var(--schrift); border-radius: 12px; padding: 12px 14px; box-shadow: var(--schatten-hoch); }
.popup h4 { font-size: 14px; font-weight: 600; margin: 0 0 4px; }
.popup p { margin: 4px 0; font-size: 12.5px; }
.kartenhinweis { position: absolute; z-index: 5; right: 12px; bottom: 34px; background: rgba(255, 255, 255, .92); font-size: 11.5px; padding: 3px 8px; border-radius: 6px; color: var(--text-leise); }

/* Dialoge */
.dialog-hinter {
  position: fixed; inset: 0; background: rgba(24, 24, 27, .4); backdrop-filter: blur(3px); z-index: 100;
  display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; overflow-y: auto; animation: einblenden .15s ease-out;
}
.dialog { background: #fff; border-radius: 16px; box-shadow: var(--schatten-hoch); width: 100%; max-width: 640px; animation: rein .18s ease-out; }
.dialog--breit { max-width: 820px; }
.dialog__kopf { padding: 18px 22px 14px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.dialog__kopf h2 { font-size: 17px; font-weight: 600; }
.dialog__kopf p { margin: 2px 0 0; color: var(--text-leise); font-size: 13px; }
.dialog__inhalt { padding: 4px 22px 20px; }
.dialog__fuss { padding: 14px 22px; border-top: 1px solid var(--linie); display: flex; justify-content: flex-end; gap: 8px; background: #fcfcfd; border-radius: 0 0 16px 16px; }
.fehlermeldung { background: var(--gefahr-hell); color: var(--gefahr-dunkel); padding: 9px 12px; border-radius: 9px; font-size: 13px; margin-bottom: 14px; border: 1px solid #fecaca; }
.ergebniswahl { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ergebniswahl button { border: 1px solid var(--linie-stark); background: #fff; border-radius: 9px; padding: 8px 4px; cursor: pointer; font-size: 12.5px; font-weight: 500; }
.ergebniswahl button.aktiv { border-color: var(--fg); background: var(--bg); color: var(--fg); box-shadow: 0 0 0 1px var(--fg); }
.mangelzeile { display: grid; grid-template-columns: 1fr 170px 32px; gap: 8px; align-items: center; margin-bottom: 8px; }
.checkliste { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }

/* Toasts */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--text); color: #fff; padding: 10px 14px; border-radius: 10px; box-shadow: var(--schatten-hoch); font-size: 13.5px;
  display: flex; gap: 10px; align-items: center; max-width: 440px; animation: rein .2s ease-out;
}
.toast--ok .ic { color: #4ade80; }
.toast--fehler { background: var(--gefahr); }
@keyframes rein { from { transform: translateY(6px); opacity: 0; } }
@keyframes einblenden { from { opacity: 0; } }

.laden { padding: 60px; text-align: center; color: var(--text-leise); font-size: 13px; }
.laden::before {
  content: ''; display: block; width: 22px; height: 22px; margin: 0 auto 10px; border-radius: 50%;
  border: 2px solid var(--linie-stark); border-top-color: var(--text); animation: dreh .7s linear infinite;
}
@keyframes dreh { to { transform: rotate(360deg); } }

.kommentar { display: flex; gap: 10px; padding: 12px 0; }
.kommentar + .kommentar { border-top: 1px solid var(--linie); }
.kommentar p { margin: 2px 0 0; font-size: 13.5px; }
.qr { width: 120px; height: 120px; border: 1px solid var(--linie); border-radius: 10px; padding: 6px; background: #fff; }
.hinweisbox { background: var(--gelb-hell); border: 1px solid #fef08a; padding: 10px 14px; border-radius: 10px; font-size: 13px; color: #713f12; }
.hinweisbox--rot { background: var(--gefahr-hell); border-color: #fecaca; color: var(--gefahr-dunkel); }
.fussnote { margin-top: 30px; font-size: 12px; color: var(--text-leise); text-align: center; }
.anhaenge { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

/* Dokumente */
.ablage { position: relative; min-height: 240px; border-radius: var(--radius); }
.ablage--aktiv, .ablagekarte--aktiv { outline: 2px dashed var(--grau-dunkel); outline-offset: 4px; }
.ablagekarte { position: relative; }
.ablage__hinweis {
  position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; pointer-events: none; border-radius: var(--radius);
  font-size: 15px; font-weight: 600; color: var(--text); background: rgba(244, 244, 245, .94);
}
.ablage__hinweis .ic { width: 22px; height: 22px; margin-right: 8px; }
.ablage__leer { cursor: pointer; border-style: dashed; box-shadow: none; }
.ablage__leer:hover { border-color: var(--grau-dunkel); }
.ablage__filter { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 16px 0; }
.filterpille { border: 1px solid var(--linie-stark); background: #fff; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 500; color: var(--text-2); cursor: pointer; }
.filterpille span { color: var(--text-leise); margin-left: 2px; }
.filterpille.aktiv { background: var(--text); border-color: var(--text); color: #fff; }
.filterpille.aktiv span { color: rgba(255, 255, 255, .65); }
.ablage__leerflaeche {
  margin: 14px 16px 16px; width: calc(100% - 32px); border: 1px dashed var(--linie-stark); border-radius: 10px; background: #fcfcfd;
  padding: 22px 16px; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; color: var(--text-2); font: inherit; font-size: 13.5px;
}
.ablage__leerflaeche:hover { border-color: var(--grau-dunkel); background: var(--flaeche); }
.ablage__leerflaeche .ic { width: 22px; height: 22px; color: var(--text-2); }
.ablage__leerflaeche small { color: var(--text-leise); font-size: 12px; }
.dokliste { list-style: none; margin: 0; padding: 4px 0; }
.dokliste li { display: flex; gap: 12px; align-items: center; padding: 8px 16px; }
.dokliste li:hover { background: #fafafa; }
.dokliste__text { flex: 1; min-width: 0; }
.dokliste__text a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; color: var(--text); }
.dokliste__aktionen { display: flex; gap: 2px; opacity: 0; transition: opacity .12s; }
.dokliste li:hover .dokliste__aktionen, .dokliste li:focus-within .dokliste__aktionen { opacity: 1; }
.vorschau { width: 36px; height: 36px; object-fit: cover; border-radius: 8px; border: 1px solid var(--linie); flex: none; }
.dateisymbol { width: 36px; height: 36px; border-radius: 8px; background: var(--flaeche); color: var(--text-leise); display: grid; place-items: center; flex: none; }
.dateisymbol .ic { width: 17px; height: 17px; }
.dateiliste { list-style: none; margin: 0; padding: 0; border: 1px solid var(--linie); border-radius: 10px; max-height: 260px; overflow: auto; }
.dateiliste li { display: flex; gap: 10px; align-items: center; padding: 8px 12px; font-size: 13px; }
.dateiliste li + li { border-top: 1px solid var(--linie); }
.fortschrittsbalken { height: 4px; background: var(--flaeche); border-radius: 2px; margin-top: 5px; overflow: hidden; }
.fortschrittsbalken i { display: block; height: 100%; background: var(--text); transition: width .15s; }
.dateifeld { border: 1px dashed var(--linie-stark); border-radius: 10px; padding: 10px 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; background: #fcfcfd; }
.dateifeld .dateiliste { flex-basis: 100%; background: #fff; }
.dateifeld--aktiv { border-color: var(--grau-dunkel); background: var(--flaeche); }

/* Versicherungen */
.matrix th { white-space: normal; text-align: center; min-width: 76px; vertical-align: bottom; }
.matrix th:first-child { text-align: left; min-width: 220px; }
.matrix--zahlen th { text-align: right; }
.matrix--zahlen th:first-child { text-align: left; }
.zelle { text-align: center; vertical-align: middle; }
.zelle .ic { width: 14px; height: 14px; }
.zelle--ok { color: var(--st-ok); }
.zelle--ok a { color: var(--st-ok); display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--st-ok-bg); }
.zelle--ok a:hover { background: #dcfce7; text-decoration: none; }
td.zelle--fehlt { color: var(--gefahr); }
td.zelle--fehlt .ic { display: block; margin: 0 auto; width: 26px; height: 26px; border-radius: 7px; -webkit-mask: none; mask: none; background: var(--gefahr-hell); position: relative; }
td.zelle--fehlt .ic::after { content: '✕'; position: absolute; inset: 0; display: grid; place-items: center; color: var(--gefahr); font-size: 12px; font-weight: 700; }
.zelle--vg { color: #1d4ed8; }
.zelle--vg .klein { background: #eff6ff; border-radius: 999px; padding: 2px 8px; font-weight: 500; white-space: nowrap; }
.zelle--leer { color: var(--linie-stark); }
.zelle-muster { display: inline-grid; place-items: center; width: 22px; height: 20px; border-radius: 6px; margin-right: 4px; }
.zelle-muster.zelle--ok { background: var(--st-ok-bg); }
.zelle-muster.zelle--fehlt { background: var(--gefahr-hell); color: var(--gefahr); }
.summenzeile td { font-weight: 600; background: #fafafa; border-top: 1px solid var(--linie-stark); }
.chip.auswahl { cursor: pointer; user-select: none; }
.objektwahl { border: 1px solid var(--linie); border-radius: 10px; padding: 6px 10px; max-height: 260px; overflow: auto; display: flex; flex-direction: column; gap: 4px; }

/* Prüfbuch (Druck) */
.pruefbuch { background: #fff; padding: 36px 44px; border: 1px solid var(--linie); border-radius: var(--radius); max-width: 1000px; margin: 0 auto; }
.pruefbuch__kopf { display: flex; gap: 18px; align-items: center; border-bottom: 2px solid var(--text); padding-bottom: 14px; margin-bottom: 18px; }
.pruefbuch__kopf img { width: 48px; }
.pruefbuch h1 { font-size: 22px; }
.pruefbuch h2 { font-size: 14px; color: var(--text); margin: 22px 0 8px; }

@media print {
  .kopf, .leiste, .seitenkopf__aktionen, .nicht-drucken, .toasts { display: none !important; }
  .rahmen, .haupt { display: block; height: auto; overflow: visible; }
  body { background: #fff; font-size: 11px; }
  .haupt { padding: 0; }
  .pruefbuch { border: 0; padding: 0; }
  .tabelle td, .tabelle th { padding: 4px 6px; }
}

/* =============================================================== Kleinere Bildschirme */
@media (max-width: 1180px) {
  .raster--haupt { grid-template-columns: 1fr; }
  .spot-knopf__text { font-size: 0; }
  .spot-knopf__text::before { content: 'Suchen …'; font-size: 13.5px; }
}
@media (max-width: 900px) {
  html, body { overflow-x: hidden; }
  .kopf { padding: 0 10px 0 8px; gap: 8px; }
  .demo-hinweis, .nur-breit, .auswahl__wert { display: none; }
  .kopf__rechts { gap: 6px; }
  .menue-knopf { display: inline-grid; place-items: center; border: 0; background: none; color: var(--text); border-radius: 8px; width: 36px; height: 36px; cursor: pointer; flex: none; }
  .menue-knopf:hover { background: var(--flaeche); }
  .auswahl__knopf { padding: 0 6px; gap: 4px; }
  .auswahl__liste { position: fixed; left: 12px; right: 12px; top: calc(var(--kopf-hoehe) + 6px); width: auto !important; }
  .leiste {
    position: fixed; inset: 0 auto 0 0; height: 100vh; width: min(calc(var(--rail-breite) + 250px), 86vw);
    transform: translateX(-105%); transition: transform .22s ease; box-shadow: var(--schatten-hoch); z-index: 90;
  }
  .leiste--offen { transform: none; }
  .leiste--offen .panel { flex: 1; width: auto; min-width: 0; }
  .leiste-hinter { display: block; position: fixed; inset: 0; background: rgba(24, 24, 27, .4); backdrop-filter: blur(2px); z-index: 85; }
  [data-tipp]:hover::after { display: none; }
  .kopf { grid-template-columns: auto minmax(0, 1fr) auto auto; }
  .kopf__mitte { grid-column: 3; }
  .kopf__links { grid-column: 2; }
  .kopf__rechts { grid-column: 4; }
  .spot-knopf { width: 36px; padding: 0; justify-content: center; background: none; }
  .spot-knopf__text, .spot-knopf kbd { display: none; }
  .spot { top: 0; width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; }
  .spot__inhalt { grid-template-columns: 1fr; }
  .spot__liste { max-height: none; }
  .spot-vorschau, .spot__fuss { display: none; }
  .ki-knopf { right: 16px; bottom: 16px; width: 52px; height: 52px; }
  .ki-knopf--offen { display: none; }
  .ki-fenster { inset: 0; width: auto; height: 100dvh; border-radius: 0; transform-origin: 100% 100%; }
  .haupt { padding: 18px 16px 48px; }
  .seitenkopf h1 { font-size: 21px; }
  .raster--2, .raster--3 { grid-template-columns: 1fr; }
  .raster--kpi { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kpi { padding: 14px; }
  .kpi__wert { font-size: 22px; }
  .board { grid-template-columns: 1fr; }
  .formular { grid-template-columns: 1fr; }
  .ergebniswahl { grid-template-columns: repeat(2, 1fr); }
  .kalender__tag { min-height: 60px; }
  .termin { font-size: 0; padding: 0; height: 5px; background: var(--fg); }
  .termin::before { display: none; }
  .kalender__wt { font-size: 10.5px; padding: 6px 2px; text-align: center; }
  .kartenpanel { width: auto; right: 12px; max-height: 45%; }
  .kartenansicht { height: calc(100vh - var(--kopf-hoehe) - 120px); }
  .filterleiste .eingabe, .filterleiste select { min-width: 0; flex: 1 1 140px; }
  .filterleiste .suchfeld { max-width: none; flex-basis: 100%; }
  .mangelzeile { grid-template-columns: 1fr 120px 32px; }
  .tabelle--karten thead { display: none; }
  .tabelle--karten tr { display: block; padding: 10px 4px; border-bottom: 1px solid var(--linie); }
  .tabelle--karten td { display: block; border: 0; padding: 2px 10px; }
  .tabelle--karten td.rechts { text-align: left; }
  .pruefbuch { padding: 18px; }
  .liste > li { padding: 10px 14px; flex-wrap: wrap; }
  .liste a.liste__link { flex: 1 1 100%; }
  .liste__rechts { margin-left: 54px; text-align: left; }
  .karte__kopf { padding: 12px 14px; }
  .dokliste__aktionen { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Formulare als eigene Seiten */
.formseite__karte { padding: 24px; }
.formseite__fuss { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
/* Auf breiten Bildschirmen mehr Spalten statt gedehnter Felder */
.formseite .formular { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.formseite .seitenkopf__aktionen .btn:not(.btn--primaer) { display: none; }

/* Fuhrpark */
.fz-icon { width: 30px; height: 30px; padding: 0; justify-content: center; flex: none; border-radius: 8px; }
.fz-icon .ic { width: 15px; height: 15px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.wochenplan th, .wochenplan td { min-width: 110px; }
.wochenplan th:first-child, .wochenplan td:first-child { min-width: 180px; }
.wochenplan .heute { background: #fafafa; }
.belegung { display: flex; flex-direction: column; background: var(--flaeche); border-left: 3px solid var(--text); border-radius: 6px; padding: 4px 7px; font-size: 12px; margin-bottom: 4px; }
.belegung span { color: var(--text-leise); }
.wochenplan .frei { all: unset; cursor: pointer; display: block; text-align: center; color: var(--text-leise); border: 1px dashed var(--linie-stark); border-radius: 6px; padding: 3px 0; opacity: 0; }
.wochenplan td:hover .frei, .wochenplan .frei:focus-visible { opacity: 1; }
.kopfwahl { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-leise); }
.kopfwahl .eingabe { height: 34px; min-width: 180px; }

/* ---------------------------------------------------------------------------
   Bereichsfarben: dunkle Rail, je Bereich eine Farbe, farbige Symbolkacheln.
   Die Hausfarbe der Körperschaft bleibt dem Wappen vorbehalten.
   ------------------------------------------------------------------------- */
:root {
  --b-liegenschaften: #1d64b0; --b-liegenschaften-hell: #e8f1fb; --b-liegenschaften-rail: #8fbbec;
  --b-versicherungen: #5b4fc4; --b-versicherungen-hell: #efedfe; --b-versicherungen-rail: #b4aef0;
  --b-fuhrpark: #c2410c;       --b-fuhrpark-hell: #ffeddf;       --b-fuhrpark-rail: #fdae79;
  --b-magazin: #be185d;        --b-magazin-hell: #fdeaf3;        --b-magazin-rail: #f4a3c8;
  --b-warnung: #b91c1c;        --b-warnung-hell: #fdeaea;
  --rail-bg: #18181b;
}
[data-bereich='liegenschaften'], [data-thema='liegenschaften'] { --bf: var(--b-liegenschaften); --bh: var(--b-liegenschaften-hell); --br: var(--b-liegenschaften-rail); }
[data-bereich='versicherungen'], [data-thema='versicherungen'] { --bf: var(--b-versicherungen); --bh: var(--b-versicherungen-hell); --br: var(--b-versicherungen-rail); }
[data-bereich='fuhrpark'], [data-thema='fuhrpark'] { --bf: var(--b-fuhrpark); --bh: var(--b-fuhrpark-hell); --br: var(--b-fuhrpark-rail); }
[data-bereich='magazin'], [data-thema='magazin'] { --bf: var(--b-magazin); --bh: var(--b-magazin-hell); --br: var(--b-magazin-rail); }
[data-thema='warnung'] { --bf: var(--b-warnung); --bh: var(--b-warnung-hell); }

/* Rail */
.rail { background: var(--rail-bg); border-right-color: var(--rail-bg); }
.rail__knopf { color: var(--br, #a1a1aa); }
.rail__knopf:hover { background: #27272a; color: #fff; }
.rail__knopf.aktiv { background: var(--bf); color: #fff; box-shadow: none; }
.rail__knopf:not([data-bereich]) { color: #a1a1aa; }
.rail__zahl { background: #fff; color: var(--rail-bg); box-shadow: 0 0 0 2px var(--rail-bg); }
.rail__ich .avatar { box-shadow: 0 0 0 1.5px #3f3f46; }
.leiste--zu .leiste__logo { background: var(--rail-bg); border-bottom-color: var(--rail-bg); }
.leiste--zu .leiste__einklappen, .leiste--zu .leiste__marke { color: #fff; }

/* Panel: aktiver Punkt in Bereichsfarbe */
.panel__link.aktiv .ic { color: var(--bf); }
.panel__link.aktiv .panel__zahl { background: var(--bh); color: var(--bf); }

/* Kartenköpfe: Symbol als farbige Kachel */
.karte__kopf h2:has(> .ic:first-child) { position: relative; padding-left: 36px; min-height: 26px; }
.karte__kopf h2:has(> .ic:first-child)::before {
  content: ''; position: absolute; left: 0; top: 50%; width: 26px; height: 26px; margin-top: -13px;
  border-radius: 8px; background: var(--bh, var(--flaeche));
}
.karte__kopf h2 > .ic:first-child { position: absolute; left: 5px; top: 50%; margin-top: -8px; color: var(--bf, var(--text-2)); }
.karte__kopf h2:has(> .ic[data-thema='fuhrpark']:first-child) { --bf: var(--b-fuhrpark); --bh: var(--b-fuhrpark-hell); }
.karte__kopf h2:has(> .ic[data-thema='versicherungen']:first-child) { --bf: var(--b-versicherungen); --bh: var(--b-versicherungen-hell); }
.karte__kopf h2:has(> .ic[data-thema='liegenschaften']:first-child) { --bf: var(--b-liegenschaften); --bh: var(--b-liegenschaften-hell); }
.karte__kopf h2:has(> .ic[data-thema='warnung']:first-child) { --bf: var(--b-warnung); --bh: var(--b-warnung-hell); }

/* Reiter und Kennzahlen greifen die Bereichsfarbe auf */
.reiter button.aktiv { border-bottom-color: var(--bf, var(--text)); }
.kpi:hover { border-color: var(--bf, var(--linie-stark)); }
.fz-icon { background: var(--b-fuhrpark-hell); color: var(--b-fuhrpark); }
/* Während des Speicherns: Absende-Knöpfe sichtbar gesperrt */
form[aria-busy='true'] button[type='submit'], .btn:disabled { opacity: .6; cursor: progress; pointer-events: none; }
/* Mehrere Knöpfe in einer Zelle: gleiche Höhe, mittig, mit Abstand */
.knopfzeile { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; }
.rechts > .knopfzeile { justify-content: flex-end; }
.btn--symbol { width: 28px; padding: 0; }
.btn--symbol:not(.btn--klein) { width: 34px; }

/* Anmeldung, Einladung, Bestätigung */
.anmeldung { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--bg); }
.seite > .anmeldung { min-height: 0; padding-top: 48px; background: transparent; }
.anmeldung__karte { width: 100%; max-width: 400px; background: #fff; border: 1px solid var(--linie); border-radius: 16px; box-shadow: var(--schatten-m); padding: 32px 28px; display: flex; flex-direction: column; gap: 14px; }
.anmeldung__marke { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; line-height: 1.2; margin-bottom: 8px; }
.anmeldung__marke small { display: block; font-size: 11.5px; font-weight: 500; color: var(--text-leise); }
.anmeldung__marke .wappenstapel img { width: 22px; }
.anmeldung h1 { font-size: 22px; letter-spacing: -.02em; margin: 0; }
.anmeldung__unter { margin: -6px 0 6px; color: var(--text-leise); font-size: 13.5px; }
.anmeldung__oder { display: flex; align-items: center; gap: 10px; color: var(--text-leise); font-size: 12px; }
.anmeldung__oder::before, .anmeldung__oder::after { content: ''; flex: 1; height: 1px; background: var(--linie); }
.anmeldung__wechsel { align-self: center; }
.btn--gross { height: 42px; font-size: 14px; width: 100%; }
.code-eingabe { font-size: 22px !important; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; height: 48px !important; }
.wahl { all: unset; box-sizing: border-box; display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--linie-stark); border-radius: 12px; cursor: pointer; }
.wahl:hover, .wahl:focus-visible { border-color: var(--text); background: var(--flaeche); }
.wahl > .ic { width: 20px; height: 20px; margin-top: 2px; }
.wahl b { display: block; font-size: 14px; }
.wahl small { display: block; color: var(--text-leise); font-size: 12.5px; margin-top: 2px; line-height: 1.45; }
.totp { display: flex; gap: 14px; align-items: flex-start; }
.totp__qr { flex: none; width: 132px; height: 132px; border: 1px solid var(--linie); border-radius: 10px; padding: 4px; background: #fff; }
.totp__qr svg { width: 100%; height: 100%; display: block; }
.totp__schluessel { display: inline-block; font-size: 12.5px; background: var(--flaeche); padding: 6px 8px; border-radius: 6px; word-break: break-all; }
.linkfeld { display: flex; gap: 8px; align-items: center; }
.linkfeld code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 8px; padding: 7px 10px; font-size: 12.5px; }

/* Dashboard */
:root { --b-dashboard: #0f766e; --b-dashboard-hell: #e0f2ef; --b-dashboard-rail: #7fd1c3; }
[data-bereich='dashboard'] { --bf: var(--b-dashboard); --bh: var(--b-dashboard-hell); --br: var(--b-dashboard-rail); }
.raster--dashboard-kopf { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); align-items: stretch; }
.raster--kacheln { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.kpi--dashboard { position: relative; overflow: hidden; }
.kpi__symbol { position: absolute; right: 14px; top: 14px; width: 18px; height: 18px; color: var(--grau); }
.lagebild { display: flex; flex-direction: column; }
.lagebild .karte__inhalt { flex: 1; }
.lagebild__text { margin: 0 0 10px; font-size: 14.5px; line-height: 1.6; color: var(--text); }
.lagebild__liste { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
.lagebild__liste--punkte { padding-left: 18px; }
.lagebild__positiv { display: flex; gap: 6px; align-items: flex-start; margin: 12px 0 0; font-size: 13px; color: #15803d; }
.lagebild__positiv .ic { margin-top: 2px; }
.skelett { display: flex; flex-direction: column; gap: 8px; }
.skelett i { height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--flaeche), #ececee, var(--flaeche)); background-size: 200% 100%; animation: skelett 1.4s ease-in-out infinite; }
@keyframes skelett { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skelett i { animation: none; } }

.diagramm { position: relative; width: 100%; }
.diagramm svg { display: block; overflow: visible; }
.diagramm .gitter { stroke: var(--linie); stroke-width: 1; }
.diagramm .achse { stroke: var(--linie-stark); stroke-width: 1; }
.diagramm .heute { stroke: var(--text-2); stroke-width: 1; stroke-dasharray: 3 3; }
.diagramm .achse__text { font-size: 11px; fill: var(--text-leise); font-variant-numeric: tabular-nums; }
.diagramm__tip { position: absolute; z-index: 5; pointer-events: none; min-width: 170px; max-width: 220px; background: #fff; border: 1px solid var(--linie); border-radius: 10px; box-shadow: var(--schatten-m); padding: 8px 10px; font-size: 12.5px; display: flex; flex-direction: column; gap: 3px; }
.diagramm__tip > div { display: flex; align-items: center; gap: 6px; color: var(--text-2); }
.diagramm__tip > div span { margin-left: auto; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.diagramm__tip i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.diagramm__tip .tip__gruppe { font-size: 11px; color: var(--text-leise); text-transform: none; margin-top: 3px; }
.legende { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: 12.5px; color: var(--text-2); }
.legende span { display: inline-flex; align-items: center; gap: 6px; }
.legende i { width: 10px; height: 10px; border-radius: 3px; }

.balkenliste { display: flex; flex-direction: column; gap: 9px; }
.balkenliste__zeile { display: grid; grid-template-columns: minmax(90px, 150px) 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.balkenliste__name { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.balkenliste__spur { height: 12px; }
.balkenliste__stapel { display: flex; gap: 2px; height: 12px; }
.balkenliste__stapel i { border-radius: 3px; min-width: 3px; }
.balkenliste__wert { font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 12.5px; }
.minibalken { display: flex; align-items: center; gap: 8px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.minibalken span { width: 80px; height: 6px; border-radius: 3px; background: var(--flaeche); overflow: hidden; flex: none; }
.minibalken i { display: block; height: 100%; border-radius: 3px; }
.brennpunkt__punkt { width: 8px; height: 8px; border-radius: 50%; flex: none; margin-top: 6px; }
tr.gewaehlt td { background: var(--flaeche); }
@media (max-width: 1100px) { .raster--dashboard-kopf { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .raster--kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)); } .balkenliste__zeile { grid-template-columns: 90px 1fr auto; } }


/* =============================================================== Hoamatbladl */
.mag-ausgaben { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.mag-ausgabe { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; color: var(--text); transition: border-color .15s; }
.mag-ausgabe:hover { text-decoration: none; border-color: var(--linie-stark); }
.mag-ausgabe__kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; font-size: 15px; }
.mag-ausgabe p { margin: 0; font-size: 13px; }
.mag-zahlen { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0; }
.mag-zahlen dt { font-size: 11.5px; color: var(--text-leise); }
.mag-zahlen dd { margin: 0; font-size: 17px; font-weight: 600; }

.mag-st { display: inline-block; font-size: 11px; font-weight: 500; padding: 1px 7px; border-radius: 999px; background: var(--flaeche); color: var(--text-2); white-space: nowrap; }
.mag-st--entwurf { background: #e8f1fb; color: #1d4f8c; }
.mag-st--korrektur { background: #fff3dd; color: #92580a; }
.mag-st--frei { background: var(--st-ok-bg); color: #15803d; }

.mag-plan { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 18px; align-items: start; }
.mag-ablage { position: sticky; top: 0; display: flex; flex-direction: column; max-height: calc(100vh - var(--kopf-hoehe) - 60px); transition: box-shadow .12s; }
.mag-ablage--ziel { box-shadow: 0 0 0 2px var(--b-magazin); }
.mag-ablage__kopf { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 14px 8px; }
.mag-ablage__neu { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 0 12px 10px; }
.mag-ablage__neu .btn { justify-content: center; font-size: 12.5px; padding-left: 6px; padding-right: 6px; }
.mag-ablage__liste { flex: 1; min-height: 80px; overflow-y: auto; padding: 8px 12px; border-top: 1px solid var(--linie); display: flex; flex-direction: column; gap: 6px; }
.mag-ablage__leer { margin: 6px 0; text-align: center; }
.mag-ablage__stand { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px 14px; border-top: 1px solid var(--linie); font-size: 12px; color: var(--text-leise); }

.mag-bogen { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px 22px; align-items: start; }
/* Querformat: eine Doppelseite braucht mehr Breite */
.mag-bogen--quer { grid-template-columns: repeat(auto-fill, minmax(min(100%, 600px), 1fr)); }
.mag-bogen--quer .mag-seite { min-height: 210px; }
.mag-doppel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; }
.mag-doppel--rechts .mag-seite { grid-column: 2; }
.mag-seite { background: #fff; border: 1px solid var(--linie-stark); border-radius: 4px; aspect-ratio: var(--seite, 210 / 297); display: flex; flex-direction: column; min-width: 0; transition: box-shadow .12s, opacity .12s; }
.mag-seite--ziel { box-shadow: 0 0 0 2px var(--b-magazin); }
.mag-seite--vor { box-shadow: -4px 0 0 var(--b-magazin); }
.mag-seite--zieht { opacity: .4; }
.mag-seite__kopf { display: flex; align-items: center; gap: 4px; padding: 5px 6px 4px; font-size: 12px; cursor: grab; border-bottom: 1px solid var(--linie); min-height: 30px; }
.mag-griff { width: 13px; height: 13px; color: var(--grau); flex: none; }
.mag-seite__notiz { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mag-seite__aktionen { margin-left: auto; display: flex; opacity: 0; transition: opacity .12s; }
.mag-seite:hover .mag-seite__aktionen, .mag-seite:focus-within .mag-seite__aktionen { opacity: 1; }
.mag-mini { border: 0; background: none; color: var(--text-leise); width: 22px; height: 22px; border-radius: 5px; display: inline-grid; place-items: center; cursor: pointer; }
.mag-mini:hover { background: var(--flaeche); color: var(--text); }
.mag-mini .ic { width: 13px; height: 13px; }
.mag-seite__inhalt { flex: 1; min-height: 0; overflow-y: auto; padding: 6px; display: flex; flex-direction: column; gap: 5px; }
.mag-marke { height: 3px; border-radius: 2px; background: var(--b-magazin); flex: none; }
.mag-seiten-neu { display: flex; gap: 6px; align-self: center; justify-self: center; }

.mag-karte { display: flex; flex-direction: column; gap: 4px; padding: 6px 8px; border: 1px solid var(--linie-stark); border-left: 3px solid var(--b-magazin); border-radius: 6px; background: #fff; color: var(--text); font-size: 12.5px; cursor: grab; flex: none; }
.mag-karte:hover { text-decoration: none; box-shadow: var(--schatten); }
.mag-karte--zieht { opacity: .4; }
.mag-karte--kasten { border-left-color: #0f766e; }
.mag-karte--bild { border-left-color: #1d64b0; }
.mag-karte--anzeige { border-left-color: var(--grau); background: var(--flaeche); }
.mag-karte__bild { width: 100%; height: 62px; object-fit: cover; border-radius: 3px; }
.mag-karte__zeile { display: flex; align-items: flex-start; gap: 5px; line-height: 1.3; }
.mag-karte__zeile .ic { width: 13px; height: 13px; flex: none; margin-top: 2px; color: var(--text-leise); }
.mag-karte__zeile b { font-weight: 500; overflow-wrap: anywhere; }
.mag-karte__zu { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mag-karte__fuss { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; font-size: 11px; }
.mag-karte__personen { margin-left: auto; display: inline-flex; gap: 2px; }
.mag-live { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--p); color: #fff; font-size: 9.5px; font-weight: 600; box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--p); }
.mag-fortsetzung { display: flex; align-items: center; gap: 5px; padding: 5px 7px; border: 1px dashed var(--linie-stark); border-radius: 6px; font-size: 11.5px; color: var(--text-leise); }
.mag-fortsetzung .ic { width: 12px; height: 12px; flex: none; }

.mag-beitrag { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.mag-beitrag__kopf .zurueck { order: -1; margin: 0; }
.mag-beitrag__kopf { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.mag-beitrag__status { display: flex; align-items: center; gap: 12px; }
.mag-verbindung { font-size: 12px; color: var(--text-leise); }
.mag-verbindung--getrennt, .mag-verbindung--beendet { color: var(--gefahr-dunkel); font-weight: 500; }
.mag-anwesend { display: inline-flex; gap: 6px; }
.mag-leiste { position: sticky; top: -28px; z-index: 5; display: flex; align-items: center; gap: 2px; padding: 5px 8px; margin-bottom: 10px; background: #fff; border: 1px solid var(--linie); border-radius: 10px; box-shadow: var(--schatten); flex-wrap: wrap; }
.mag-leiste button { width: 32px; height: 32px; border: 0; background: none; color: var(--text-2); border-radius: 7px; display: grid; place-items: center; cursor: pointer; }
.mag-leiste button:hover { background: var(--flaeche); }
.mag-leiste button.aktiv { background: var(--text); color: #fff; }
.mag-leiste button .ic { width: 16px; height: 16px; }
.mag-leiste__trenner { width: 1px; height: 20px; background: var(--linie-stark); margin: 0 5px; }
.mag-leiste__zahl { margin-left: auto; padding: 0 6px; }
.mag-papier { padding: 34px 44px 60px; min-height: 620px; max-width: 820px; margin: 0 auto; }
.mag-papier input, .mag-papier textarea { display: block; width: 100%; border: 0; outline: none; background: none; padding: 2px 0; color: var(--text); font-family: inherit; resize: none; overflow: hidden; }
.mag-papier input::placeholder, .mag-papier textarea::placeholder { color: var(--grau); }
.mag-rubrik { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.mag-titel { font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; margin-bottom: 4px; }
.mag-unterzeile { font-size: 17px; color: var(--text-2) !important; margin-bottom: 4px; }
.mag-autor { font-size: 13px; color: var(--text-leise) !important; margin-bottom: 16px; }
.mag-bild { display: block; max-width: 100%; max-height: 420px; border-radius: 6px; margin-bottom: 14px; }
.mag-bildhinweis { display: inline-flex; margin-bottom: 12px; }
.mag-blatt { font-family: Georgia, 'Times New Roman', serif; font-size: 16.5px; line-height: 1.65; }
.mag-text { position: relative; outline: none; min-height: 320px; white-space: pre-wrap; overflow-wrap: anywhere; }
/* Leerer Text: zeigen, wo geschrieben wird */
.mag-text:has(> p:only-child > br.ProseMirror-trailingBreak:only-child)::before { content: attr(data-platzhalter); position: absolute; left: 0; top: 0; color: var(--grau); font-style: italic; pointer-events: none; }
.mag-papier input[hidden] { display: none; }
.mag-text p { margin: 0 0 .7em; }
.mag-text h3 { font-family: var(--schrift, inherit); font-size: 19px; font-weight: 700; margin: 1.2em 0 .4em; }
.mag-text blockquote { margin: 1em 0; padding-left: 16px; border-left: 3px solid var(--b-magazin); font-style: italic; font-size: 19px; }
.mag-text ul { margin: 0 0 .7em; padding-left: 24px; }
.mag-text li p { margin: 0 0 .2em; }
.ProseMirror-yjs-cursor { position: relative; margin-left: -1px; margin-right: -1px; border-left: 1px solid; border-right: 1px solid; word-break: normal; pointer-events: none; }
.ProseMirror-yjs-cursor > div { position: absolute; top: -1.15em; left: -1px; font: 600 11px/1 Inter, system-ui, sans-serif; padding: 2px 5px; color: #fff; border-radius: 4px 4px 4px 0; white-space: nowrap; user-select: none; }
.ProseMirror-yjs-selection { background: rgba(190, 24, 93, .16); }
.ProseMirror-gapcursor { display: none; pointer-events: none; position: absolute; }
.ProseMirror-focused .ProseMirror-gapcursor { display: block; }

.mag-beitrag__seite { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 0; }
.mag-felder { display: flex; flex-direction: column; gap: 10px; }
.mag-loeschen { align-self: flex-start; color: var(--gefahr-dunkel); }
.mag-reiter { display: flex; border-bottom: 1px solid var(--linie); }
.mag-reiter button { flex: 1; display: flex; justify-content: center; align-items: center; gap: 6px; border: 0; background: none; padding: 10px 6px; font: inherit; font-size: 13px; color: var(--text-leise); cursor: pointer; border-bottom: 2px solid transparent; }
.mag-reiter button .ic { width: 14px; height: 14px; }
.mag-reiter button.aktiv { color: var(--text); font-weight: 500; border-bottom-color: var(--text); }
.mag-kommentare { padding: 12px; display: flex; flex-direction: column; gap: 10px; max-height: 480px; overflow-y: auto; }
.mag-kommentar-neu { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.mag-kommentar-neu textarea { width: 100%; font: inherit; font-size: 13px; border: 1px solid var(--linie-stark); border-radius: 8px; padding: 7px 9px; resize: vertical; }
.mag-kommentare blockquote { position: relative; align-self: stretch; margin: 0 0 4px; padding: 3px 24px 3px 8px; border-left: 2px solid var(--b-magazin); font-size: 12px; color: var(--text-leise); }
.mag-kommentar-neu .mag-mini { position: absolute; right: 0; top: 0; }
.mag-kommentarliste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.mag-kommentar { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; padding-bottom: 8px; border-bottom: 1px solid var(--linie); font-size: 13px; }
.mag-kommentar--erledigt { opacity: .6; }
.mag-kommentar p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.mag-kommentar__kopf { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mag-versionen { list-style: none; margin: 0; padding: 6px; max-height: 480px; overflow-y: auto; }
.mag-version { display: flex; flex-direction: column; width: 100%; gap: 1px; border: 0; background: none; text-align: left; font: inherit; font-size: 13px; padding: 7px 8px; border-radius: 7px; cursor: pointer; }
.mag-version:hover { background: var(--flaeche); }
.mag-version b { font-weight: 500; }
.mag-version__text { padding: 8px; font-size: 12.5px; }
.mag-version__text p { margin: 0 0 6px; }

@media (max-width: 1100px) {
  .mag-plan, .mag-beitrag { grid-template-columns: minmax(0, 1fr); }
  .mag-ablage, .mag-beitrag__seite { position: static; max-height: none; }
  .mag-ablage__liste { max-height: 260px; }
}
@media (max-width: 900px) {
  .mag-papier { padding: 20px 18px 40px; }
  .mag-titel { font-size: 23px; }
  .mag-seite__aktionen { opacity: 1; }
  .mag-leiste { top: -18px; }
}

/* =============================================================== Hoamatbladl: zum Mitschreiben
   Große Flächen, klare Wörter: gedacht für Menschen, die selten am Computer arbeiten. */
:root { --hb-serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, 'Times New Roman', serif; --hb-papier: #fffcf6; }

.hb-held { display: grid; grid-template-columns: minmax(260px, 420px) minmax(0, 1fr); gap: 28px; padding: 22px; align-items: center; }
.hb-held__heft { position: relative; display: block; border-radius: 6px; box-shadow: 0 14px 30px -12px rgba(40, 20, 10, .35), 0 0 0 1px rgba(0, 0, 0, .06); transition: transform .2s, box-shadow .2s; }
.hb-held__heft:hover { text-decoration: none; transform: translateY(-2px) rotate(-.4deg); box-shadow: 0 20px 40px -14px rgba(40, 20, 10, .4), 0 0 0 1px rgba(0, 0, 0, .06); }
.hb-held__lupe { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; background: rgba(24, 24, 27, .82); color: #fff; font-size: 12.5px; font-weight: 500; opacity: 0; transition: opacity .2s; }
.hb-held__heft:hover .hb-held__lupe, .hb-held__heft:focus-visible .hb-held__lupe { opacity: 1; }
.hb-held__text h2 { font-family: var(--hb-serif); font-size: 28px; font-weight: 700; letter-spacing: -.01em; margin: 2px 0 4px; }
.hb-held__text > p { margin: 0 0 12px; font-size: 14.5px; }
.hb-kicker { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--b-magazin); }
.hb-frist { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 10px; background: var(--flaeche); font-size: 14px; margin-bottom: 18px; }
.hb-frist--knapp { background: var(--st-faellig-bg); color: #92400e; }
.hb-frist--vorbei { background: var(--gefahr-hell); color: var(--gefahr-dunkel); }
.hb-aktionen { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.hb-gross { display: flex; align-items: center; gap: 12px; padding: 14px 16px; min-height: 68px; border: 1px solid var(--linie-stark); border-radius: 14px; background: #fff; color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.hb-gross:hover { text-decoration: none; border-color: var(--grau); box-shadow: var(--schatten-m); transform: translateY(-1px); }
.hb-gross > .ic { width: 26px; height: 26px; flex: none; color: var(--b-magazin); }
.hb-gross span { display: flex; flex-direction: column; line-height: 1.3; }
.hb-gross b { font-size: 16px; font-weight: 600; }
.hb-gross small { font-size: 12.5px; color: var(--text-leise); }
.hb-gross--primaer { background: var(--b-magazin); border-color: var(--b-magazin); color: #fff; }
.hb-gross--primaer > .ic, .hb-gross--primaer small { color: rgba(255, 255, 255, .88); }
.hb-gross--primaer:hover { border-color: #9d174d; background: #9d174d; }
.hb-planer { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 16px; }
.hb-planer a { display: inline-flex; align-items: center; gap: 5px; color: var(--text-2); }

.hb-abschnitt { margin-top: 26px; }
.hb-abschnitt__kopf { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.hb-abschnitt__kopf h2 { font-size: 17px; }
.hb-liste { display: flex; flex-direction: column; gap: 8px; }
.hb-zeile { display: flex; align-items: center; gap: 14px; padding: 12px 14px; color: var(--text); transition: border-color .15s; }
.hb-zeile:hover { text-decoration: none; border-color: var(--grau); }
.hb-zeile__icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--b-magazin-hell); color: var(--b-magazin); flex: none; }
.hb-zeile__icon .ic { width: 18px; height: 18px; }
.hb-zeile__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hb-zeile__text b { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-zeile__text small { color: var(--text-leise); font-size: 12.5px; }
.hb-leer { text-align: center; padding: 40px 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.hb-leer > .ic { width: 34px; height: 34px; color: var(--b-magazin); }
.hb-leer h2 { font-size: 19px; }
.hb-leer p { margin: 0 0 6px; max-width: 460px; color: var(--text-2); font-size: 14.5px; }
.hb-leer--klein { padding: 22px; }

/* Fotos hochladen */
.hb-ablage { border: 2px dashed var(--linie-stark); border-radius: 14px; background: #fcfcfd; transition: border-color .15s, background .15s; }
.hb-ablage--aktiv { border-color: var(--b-magazin); background: var(--b-magazin-hell); }
.hb-ablage__knopf { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; padding: 22px 16px; border: 0; background: none; font: inherit; cursor: pointer; color: var(--text); border-radius: 12px; }
.hb-ablage__knopf:hover { background: rgba(190, 24, 93, .04); }
.hb-ablage__knopf > .ic { width: 30px; height: 30px; color: var(--b-magazin); margin-bottom: 4px; }
.hb-ablage__knopf b { font-size: 16px; }
.hb-ablage__knopf span { font-size: 13px; color: var(--text-leise); }
.hb-ablage--gross .hb-ablage__knopf { padding: 40px 16px; }
.hb-laeufe { list-style: none; margin: 0; padding: 0 14px 12px; display: flex; flex-direction: column; gap: 8px; }
.hb-laeufe li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; }
.hb-laeufe li > .ic { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--st-ok); }
.hb-laeufe li > div { flex: 1; min-width: 0; }
.hb-laeufe b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-lauf--fehler > .ic { color: var(--gefahr) !important; }
.hb-lauf--fehler span { color: var(--gefahr-dunkel); }
.hb-fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 12px; margin-bottom: 12px; }
.hb-foto { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; padding: 10px; border: 1px solid var(--linie); border-radius: 12px; background: #fff; font-family: var(--schrift); }
.hb-foto--ohne-bild { grid-template-columns: minmax(0, 1fr); border: 0; padding: 0; margin-bottom: 14px; }
.hb-foto__bild { display: block; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--flaeche); }
.hb-foto__bild img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hb-foto__bild span { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; color: var(--text-leise); padding: 6px; text-align: center; overflow-wrap: anywhere; }
.hb-foto__felder { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hb-foto__felder label { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.mag-papier .hb-foto__felder input, .mag-papier .hb-foto__felder textarea, .hb-foto__felder input, .hb-foto__felder textarea {
  display: block; width: 100%; font: inherit; font-size: 14px; font-weight: 400; color: var(--text); border: 1px solid var(--linie-stark); border-radius: 8px; padding: 7px 9px; background: #fff; resize: vertical; overflow: auto;
}
.hb-foto__hinweis { display: flex; gap: 6px; font-size: 12.5px; color: #92400e; background: var(--st-faellig-bg); padding: 6px 8px; border-radius: 8px; }
.hb-foto__hinweis .ic { flex: none; margin-top: 2px; }
.hb-foto__fuss { display: flex; justify-content: flex-end; align-items: center; gap: 8px; min-height: 26px; }
.hb-gespeichert { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--st-ok); margin-right: auto; }
.hb-hinweis { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--gelb-hell); font-size: 13.5px; }
.hb-hinweis .ic { flex: none; margin-top: 2px; color: #a16207; }

/* Schreiben */
.hb-zurueck { border: 0; background: none; font: inherit; cursor: pointer; padding: 0; }
.hb-speicher { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; background: var(--flaeche); color: var(--text-leise); }
.hb-speicher--verbunden { background: var(--st-ok-bg); color: #15803d; }
.hb-speicher--getrennt, .hb-speicher--beendet { background: var(--gefahr-hell); color: var(--gefahr-dunkel); font-weight: 500; }
.mag-leiste button.mag-leiste__mit-text { width: auto; padding: 0 9px; gap: 5px; display: inline-flex; align-items: center; font-size: 12.5px; }
.hb-fotobereich { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--linie); font-family: var(--schrift); }
.hb-fotobereich h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; margin-bottom: 12px; }
.hb-abgabe { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; max-width: 820px; margin: 14px auto 0; padding: 16px 20px; border-radius: 14px; background: var(--b-magazin-hell); border: 1px solid #f9c6dd; }
.hb-abgabe b { display: inline-flex; align-items: center; gap: 6px; font-size: 15.5px; }
.hb-abgabe p { margin: 2px 0 0; font-size: 13.5px; color: var(--text-2); }
.hb-abgabe__knopf { height: 46px; font-size: 15px; padding: 0 20px; background: var(--b-magazin); border-color: var(--b-magazin); }
.hb-abgabe__knopf:hover { background: #9d174d; border-color: #9d174d; }
.hb-abgabe--abgegeben { background: #fff8eb; border-color: #fde3b0; }
.hb-abgabe--frei { background: var(--st-ok-bg); border-color: #bbf7d0; }
.hb-planung summary { display: flex; align-items: center; gap: 8px; padding: 12px 14px; cursor: pointer; font-weight: 500; font-size: 13.5px; list-style: none; }
.hb-planung summary::-webkit-details-marker { display: none; }
.hb-planung summary::after { content: '›'; margin-left: auto; color: var(--text-leise); transition: transform .15s; }
.hb-planung[open] summary::after { transform: rotate(90deg); }
.hb-planung[open] summary { border-bottom: 1px solid var(--linie); }
.hb-fotoseite .feld { margin-top: 6px; font-family: var(--schrift); }

/* Willkommenstour */
.tour { position: relative; max-width: 560px; overflow: hidden; margin-top: 4vh; }
.tour__zu { position: absolute; right: 12px; top: 12px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .85); cursor: pointer; display: grid; place-items: center; }
.tour__bild { height: 210px; display: grid; place-items: center; background: linear-gradient(135deg, #fdeaf3, #fff6ea); animation: einblenden .25s ease-out; }
/* Feste Höhe: „Weiter“ bleibt beim Durchklicken an derselben Stelle */
.tour__inhalt { padding: 22px 28px 6px; min-height: 236px; }
.tour .btn--primaer { background: var(--b-magazin); border-color: var(--b-magazin); }
.tour .btn--primaer:hover { background: #9d174d; border-color: #9d174d; }
.tour__schritt { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--b-magazin); }
.tour__inhalt h2 { font-family: var(--hb-serif); font-size: 26px; margin: 4px 0 8px; }
.tour__inhalt p { margin: 0 0 10px; font-size: 16px; line-height: 1.55; color: var(--text-2); }
.tour__tipp { display: flex; gap: 8px; font-size: 14px !important; background: var(--gelb-hell); padding: 9px 12px; border-radius: 10px; }
.tour__tipp .ic { flex: none; margin-top: 3px; color: #a16207; }
.tour__fuss { display: flex; align-items: center; gap: 10px; padding: 14px 28px 24px; }
.tour__fuss .btn--gross { width: auto; padding: 0 22px; }
.tour__punkte { display: flex; gap: 6px; margin-right: auto; }
.tour__punkte i { width: 8px; height: 8px; border-radius: 50%; background: var(--linie-stark); transition: background .2s, width .2s; }
.tour__punkte i.aktiv { background: var(--b-magazin); width: 22px; border-radius: 4px; }
.tour-heft { width: 220px; aspect-ratio: 297 / 210; background: var(--b-magazin); color: #fff; border-radius: 4px; box-shadow: 0 16px 30px -12px rgba(120, 20, 60, .5); display: flex; flex-direction: column; justify-content: flex-end; padding: 16px; transform: rotate(-3deg); }
.tour-heft span { font-family: var(--hb-serif); font-size: 32px; font-weight: 700; line-height: 1; }
.tour-heft small { font-size: 11px; opacity: .85; margin-top: 4px; }
.tour-stapel { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.tour-knopf { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 12px; background: var(--b-magazin); color: #fff; font-weight: 600; font-size: 15px; box-shadow: 0 8px 18px -8px rgba(190, 24, 93, .6); }
.tour-knopf--hell { background: #fff; color: var(--text); box-shadow: var(--schatten-m); }
.tour-knopf--gross { padding: 13px 22px; font-size: 16px; }
.tour-papier { width: 260px; background: #fff; border-radius: 8px; padding: 12px 16px; box-shadow: var(--schatten-m); font-family: var(--hb-serif); }
.tour-papier b { display: block; font-size: 18px; margin-bottom: 8px; }
.tour-zeilen { display: flex; flex-direction: column; gap: 6px; }
.tour-zeilen i { display: block; height: 6px; border-radius: 3px; background: var(--linie-stark); }
.tour-gespeichert { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; background: var(--st-ok-bg); color: #15803d; font-weight: 600; font-size: 15px; box-shadow: var(--schatten-m); }
.tour-gespeichert .ic { width: 20px; height: 20px; }
.tour-fotos { display: flex; gap: 10px; align-items: stretch; }
.tour-foto { width: 84px; background: #fff; border-radius: 8px; padding: 6px; box-shadow: var(--schatten-m); display: flex; flex-direction: column; gap: 6px; }
.tour-foto > .ic { width: 100%; height: 56px; background: linear-gradient(135deg, #bfdbfe, #fbcfe8); color: rgba(255, 255, 255, .9); border-radius: 5px; -webkit-mask: none; mask: none; }
.tour-foto > i { height: 6px; border-radius: 3px; background: var(--linie-stark); }
.tour-ablage { width: 120px; border: 2px dashed var(--b-magazin); border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--b-magazin); background: rgba(255, 255, 255, .7); }
.tour-ablage .ic { width: 24px; height: 24px; }
.tour-notiz { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: #fff; font-size: 13px; box-shadow: var(--schatten); color: var(--text-2); }
.tour-blaettern { position: relative; display: flex; gap: 2px; filter: drop-shadow(0 12px 18px rgba(60, 20, 30, .25)); }
.tour-seite { width: 150px; aspect-ratio: 297 / 210; background: var(--hb-papier); padding: 10px; display: flex; flex-direction: column; gap: 8px; border-radius: 3px 0 0 3px; }
.tour-seite + .tour-seite { border-radius: 0 3px 3px 0; }
.tour-seite b { display: block; height: 10px; width: 70%; background: var(--b-magazin); border-radius: 2px; }
.tour-seite--foto > i { display: block; height: 44px; border-radius: 3px; background: linear-gradient(135deg, #bfdbfe, #fbcfe8); }
.tour-pfeil { position: absolute; right: -18px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; background: var(--b-magazin); color: #fff; display: grid; place-items: center; }

/* Kleine Titelseite (Startseite) */
.heft-mini { container-type: inline-size; width: 100%; border-radius: 6px; overflow: hidden; background: var(--hb-papier); }
.heft-mini--leer { background: linear-gradient(135deg, #fdeaf3, #fff6ea); }

/* =============================================================== Hoamatbladl: Durchblättern */
.lesen { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; background: radial-gradient(ellipse at 50% 40%, #3a3532, #1c1a18 70%); color: #f5f1ea; animation: einblenden .2s ease-out; }
.lesen .laden { color: #d6d0c6; margin: auto; }
.lesen__fehler { margin: auto; color: var(--text); }
.lesen__kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; }
.lesen__titel { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.lesen__titel b { font-family: var(--hb-serif); font-size: 20px; }
.lesen__titel span { font-size: 13.5px; color: #c9c1b5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lesen__rechts { display: flex; align-items: center; gap: 10px; }
.lesen__zaehler { font-size: 14px; font-variant-numeric: tabular-nums; }
.lesen__zaehler small { color: #a8a094; font-size: 13px; }
.lesen__knopf { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .06); color: inherit; font: inherit; font-size: 14px; cursor: pointer; }
.lesen__knopf:hover, .lesen__knopf.aktiv { background: rgba(255, 255, 255, .16); }
.lesen__buehne { flex: 1; min-height: 0; position: relative; display: flex; align-items: center; justify-content: center; margin: 0 84px; perspective: 2400px; }
.lesen__seite { position: relative; flex: none; }
.lesen__drehen { width: 100%; height: 100%; container-type: inline-size; cursor: pointer; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7), 0 0 0 1px rgba(0, 0, 0, .2); border-radius: 3px; overflow: hidden; transform-style: preserve-3d; }
.lesen__drehen--vor { transform-origin: left center; animation: umblaettern-vor .45s cubic-bezier(.2, .7, .2, 1); }
.lesen__drehen--zurueck { transform-origin: right center; animation: umblaettern-zurueck .45s cubic-bezier(.2, .7, .2, 1); }
@keyframes umblaettern-vor { from { transform: rotateY(-38deg) translateX(4%); opacity: .2; } to { transform: none; opacity: 1; } }
@keyframes umblaettern-zurueck { from { transform: rotateY(38deg) translateX(-4%); opacity: .2; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .lesen__drehen--vor, .lesen__drehen--zurueck { animation: einblenden .15s; } }
.lesen__pfeil { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 58px; height: 58px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); color: #1c1a18; display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 16px rgba(0, 0, 0, .35); transition: transform .15s, opacity .15s; }
.lesen__pfeil .ic { width: 28px; height: 28px; }
.lesen__pfeil:hover:not(:disabled) { transform: translateY(-50%) scale(1.06); }
.lesen__pfeil:disabled { opacity: .18; cursor: default; }
.lesen__pfeil--zurueck { left: -74px; }
.lesen__pfeil--vor { right: -74px; }
.lesen__leiste { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; padding: 14px 18px 4px; }
.lesen__punkt { min-width: 34px; height: 34px; padding: 0 8px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .05); color: #d6d0c6; font: inherit; font-size: 13px; cursor: pointer; font-variant-numeric: tabular-nums; }
.lesen__punkt:hover { background: rgba(255, 255, 255, .14); }
.lesen__punkt.aktiv { background: #fff; color: #1c1a18; font-weight: 600; }
.lesen__hinweis { text-align: center; font-size: 12px; color: #a8a094; margin: 6px 16px 12px; }
.lesen__uebersicht { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px; padding: 10px 28px 28px; align-content: start; }
.lesen__mini { border: 0; background: none; color: inherit; font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 6px; align-items: center; padding: 0; }
.lesen__mini-blatt { width: 100%; container-type: inline-size; border-radius: 3px; overflow: hidden; box-shadow: 0 10px 22px -10px rgba(0, 0, 0, .7); outline: 3px solid transparent; outline-offset: 3px; transition: outline-color .15s; pointer-events: none; }
.lesen__mini:hover .lesen__mini-blatt, .lesen__mini.aktiv .lesen__mini-blatt { outline-color: #f9a8d4; }
.lesen__mini span { font-size: 13px; color: #d6d0c6; }

/* Eine Heftseite – alle Maße relativ zur Seitenbreite (cqw), damit sie in jeder Größe gleich aussieht */
.blatt { position: relative; width: 100%; height: 100%; background: var(--hb-papier); color: #231f1c; font-family: var(--hb-serif); padding: 5.2cqw 5cqw 4.6cqw; display: flex; flex-direction: column; overflow: hidden; user-select: none; }
.blatt::after { content: ''; position: absolute; inset: 0; pointer-events: none; }
.blatt--links::after { background: linear-gradient(to left, rgba(0, 0, 0, .07), transparent 4%); }
.blatt--rechts::after { background: linear-gradient(to right, rgba(0, 0, 0, .08), transparent 4%); }
.blatt__kopfzeile { position: absolute; top: 2.2cqw; left: 5cqw; right: 5cqw; display: flex; justify-content: space-between; font-family: var(--schrift); font-size: .9cqw; letter-spacing: .08em; text-transform: uppercase; color: #8b8178; }
.blatt__kopfmarke { color: var(--b-magazin); font-weight: 700; }
.blatt__fusszeile { position: absolute; bottom: 1.9cqw; font-family: var(--schrift); font-size: 1cqw; font-weight: 600; color: #8b8178; }
.blatt--links .blatt__fusszeile { left: 5cqw; }
.blatt--rechts .blatt__fusszeile { right: 5cqw; }
.blatt__satz { flex: 1; min-height: 0; display: flex; gap: 2.6cqw; overflow: hidden; }
.blatt--links .blatt__satz--fotos { flex-direction: row-reverse; }
.blatt__spalte { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2.2cqw; }
.blatt__fotos { width: 36%; flex: none; display: flex; flex-direction: column; gap: 1.6cqw; min-height: 0; }
.blatt__foto { margin: 0; display: flex; flex-direction: column; gap: .6cqw; min-height: 0; flex: 1; }
.blatt__foto img { width: 100%; flex: 1; min-height: 0; object-fit: cover; border-radius: .2cqw; }
.blatt__foto-ersatz { flex: 1; min-height: 8cqw; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6cqw; background: #ece6dc; color: #8b8178; font-family: var(--schrift); font-size: 1cqw; border-radius: .2cqw; text-align: center; padding: 1cqw; }
.blatt__foto-ersatz .ic { width: 3cqw; height: 3cqw; }
.blatt__foto figcaption { font-family: var(--schrift); font-size: .95cqw; line-height: 1.35; color: #4a433d; }
.blatt__foto figcaption span { color: #8b8178; }
.blatt__beitrag { min-width: 0; }
.blatt__rubrik { font-family: var(--schrift); font-size: .95cqw; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--b-magazin); margin-bottom: .6cqw; }
.blatt__titel { font-size: 3.3cqw; line-height: 1.08; font-weight: 700; letter-spacing: -.01em; margin: 0 0 .9cqw; }
.blatt__kastentitel { font-family: var(--schrift); font-size: 1.5cqw; font-weight: 700; margin: 0 0 .8cqw; }
.blatt__unterzeile { font-size: 1.6cqw; line-height: 1.3; font-style: italic; color: #4a433d; margin: 0 0 .8cqw; }
.blatt__autor { font-family: var(--schrift); font-size: .95cqw; color: #8b8178; margin: 0 0 1.3cqw; text-transform: uppercase; letter-spacing: .06em; }
.blatt__text { font-size: 1.22cqw; line-height: 1.48; column-gap: 2cqw; hyphens: auto; text-align: justify; }
.blatt__text p { margin: 0 0 .7em; }
.blatt__beitrag:not(.blatt__kasten) .blatt__text > p:first-child::first-letter { float: left; font-size: 3.4em; line-height: .82; font-weight: 700; color: var(--b-magazin); margin: .06em .08em 0 0; }
.blatt__text h4 { font-family: var(--schrift); font-size: 1.15cqw; font-weight: 700; margin: 1em 0 .35em; break-after: avoid; }
.blatt__text blockquote { margin: .8em 0; padding: .2em 0 .2em .9em; border-left: .25cqw solid var(--b-magazin); font-size: 1.45cqw; font-style: italic; line-height: 1.35; text-align: left; break-inside: avoid; }
.blatt__text ul { margin: 0 0 .7em; padding-left: 1.2em; }
.blatt__weiter { font-family: var(--schrift); font-size: .9cqw; color: var(--b-magazin); font-weight: 600; text-align: right; }
.blatt__leertext { font-size: 1.2cqw; color: #b3aa9f; font-style: italic; margin: 0; }
.blatt__fortsetzung { font-family: var(--schrift); font-size: .95cqw; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #8b8178; margin-bottom: 1cqw; }
.blatt__kasten { background: #f4ece0; padding: 1.6cqw 1.8cqw; border-radius: .4cqw; }
.blatt__kasten .blatt__text { font-family: var(--schrift); font-size: 1.05cqw; text-align: left; }
.blatt__koerper { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 2cqw; }
.blatt__anzeigen { flex: none; display: flex; gap: 1.6cqw; min-height: 0; }
.blatt__anzeige { flex: 1; min-width: 0; min-height: 0; border: .12cqw solid #d9d0c2; border-radius: .3cqw; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4cqw; font-family: var(--schrift); color: #6b6158; background: #f7f2ea; overflow: hidden; }
.blatt__anzeige img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.blatt__anzeige small { font-size: .8cqw; letter-spacing: .1em; text-transform: uppercase; }
.blatt__anzeige b { font-size: 1.5cqw; text-align: center; padding: 0 1cqw; }
.blatt__anzeige span { font-size: .9cqw; }
.blatt--anzeigenseite { padding: 3cqw; }
.blatt--anzeigenseite .blatt__anzeige { border: 0; background: none; }
.blatt__leer { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1cqw; color: #b3aa9f; font-family: var(--schrift); font-size: 1.4cqw; border: .15cqw dashed #e2d9cc; border-radius: .6cqw; }
.blatt__leer .ic { width: 3.5cqw; height: 3.5cqw; }
.blatt--voll .blatt__satz { -webkit-mask: linear-gradient(to bottom, #000 88%, transparent); mask: linear-gradient(to bottom, #000 88%, transparent); }
.blatt__mehr { position: absolute; left: 50%; bottom: 1.6cqw; transform: translateX(-50%); font-family: var(--schrift); font-size: .9cqw; padding: .3cqw 1cqw; border-radius: 999px; background: #fdeaf3; color: #9d174d; white-space: nowrap; }

/* Titelseite */
.blatt--titel { padding: 0; background: linear-gradient(140deg, #be185d 0%, #9d174d 55%, #6d1036 100%); color: #fff; }
.blatt--titel::after { display: none; }
.blatt__titelfoto { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.blatt--mit-foto::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(100deg, rgba(20, 8, 14, .78) 0%, rgba(20, 8, 14, .35) 48%, rgba(20, 8, 14, .05) 75%); }
.blatt--titel .blatt__kopfzeile { z-index: 2; color: rgba(255, 255, 255, .8); top: 3cqw; }
.blatt__masthead { position: relative; z-index: 2; padding: 9cqw 5cqw 0; }
.blatt__marke { font-family: var(--hb-serif); font-size: 11.5cqw; font-weight: 700; line-height: .9; letter-spacing: -.02em; }
.blatt__ausgabe { font-family: var(--schrift); font-size: 1.6cqw; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; margin-top: 1.6cqw; }
.blatt__claim { font-size: 1.9cqw; font-style: italic; opacity: .9; margin-top: .6cqw; }
.blatt__teaser { position: absolute; z-index: 2; right: 4cqw; bottom: 4cqw; width: 34%; background: rgba(255, 252, 246, .94); color: #231f1c; border-radius: .6cqw; padding: 1.6cqw 1.8cqw; box-shadow: 0 1cqw 3cqw rgba(0, 0, 0, .25); }
.blatt__teaser-kopf { font-family: var(--schrift); font-size: .9cqw; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--b-magazin); margin-bottom: .8cqw; }
.blatt__teaser-zeile { display: flex; justify-content: space-between; align-items: baseline; gap: 1cqw; padding: .55cqw 0; border-top: .08cqw solid #e5dccf; font-size: 1.35cqw; line-height: 1.2; }
.blatt__teaser-zeile span { display: flex; flex-direction: column; }
.blatt__teaser-zeile small { font-family: var(--schrift); font-size: .75cqw; letter-spacing: .1em; text-transform: uppercase; color: #8b8178; }
.blatt__teaser-zeile b { font-family: var(--schrift); font-size: 1.4cqw; color: var(--b-magazin); }

@media (max-width: 1100px) {
  .hb-held { grid-template-columns: minmax(0, 1fr); }
  .hb-held__heft { max-width: 460px; }
}
@media (max-width: 760px) {
  .hb-held { padding: 14px; gap: 18px; }
  .hb-held__text h2 { font-size: 23px; }
  .hb-foto { grid-template-columns: 88px minmax(0, 1fr); }
  .hb-zeile .btn { display: none; }
  .hb-abgabe__knopf { width: 100%; justify-content: center; }
  .lesen__buehne { margin: 0 8px; }
  .lesen__pfeil { width: 44px; height: 44px; top: auto; bottom: -56px; transform: none; }
  .lesen__pfeil:hover:not(:disabled) { transform: scale(1.06); }
  .lesen__pfeil--zurueck { left: calc(50% - 56px); }
  .lesen__pfeil--vor { right: calc(50% - 56px); }
  .lesen__leiste { margin-top: 56px; }
  .lesen__titel span { display: none; }
  .tour__bild { height: 170px; }
  .tour__inhalt { padding: 18px 20px 4px; }
  .tour__fuss { padding: 12px 20px 20px; }
}

/* =============================================================== Hoamatbladl: Anzeigen */
/* Segment-Umschalter wie unter macOS/iOS */
.segment { display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px; background: rgba(118, 118, 128, .12); }
.segment button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 30px; padding: 0 14px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 13px; font-weight: 500; color: var(--text-2); cursor: pointer; transition: background .2s, box-shadow .2s, color .2s; }
.segment button:hover:not(:disabled):not(.aktiv) { color: var(--text); }
.segment button.aktiv { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 0 0 .5px rgba(0, 0, 0, .04); }
.segment button span { font-size: 11.5px; color: var(--text-leise); font-variant-numeric: tabular-nums; }
.segment button:disabled { cursor: default; }
.segment--klein { display: flex; }
.segment--klein button { flex: 1; min-height: 28px; padding: 0 6px; font-size: 13px; }

.az-ausgabe { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 4px 0 12px; border-radius: 10px; background: #fff; border: 1px solid var(--linie-stark); }
.az-ausgabe select { border: 0; background: none; font: inherit; font-size: 13.5px; font-weight: 500; padding: 0 6px; height: 100%; cursor: pointer; }
.az-kennzahlen { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; position: relative; padding-bottom: 14px; }
.az-kennzahl { display: flex; flex-direction: column; padding: 16px 18px; border-radius: 16px; background: #fff; border: 1px solid var(--linie); box-shadow: 0 1px 2px rgba(16, 24, 40, .03); }
.az-kennzahl span { font-size: 12.5px; font-weight: 500; color: var(--text-leise); }
.az-kennzahl b { font-size: 30px; font-weight: 650; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.az-kennzahl small { font-size: 12.5px; color: var(--text-leise); }
.az-kennzahl--gruen b { color: #15803d; }
.az-kennzahl--orange b { color: #c2410c; }
.az-fortschritt { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; border-radius: 2px; background: rgba(118, 118, 128, .14); overflow: hidden; }
.az-fortschritt i { display: block; height: 100%; border-radius: 2px; background: #34c759; transition: width .5s cubic-bezier(.2, .7, .2, 1); }
.az-leiste { display: flex; justify-content: space-between; align-items: center; margin: 22px 0 14px; }
.az-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.az-karte { display: flex; flex-direction: column; border-radius: 18px; background: #fff; border: 1px solid var(--linie); overflow: hidden; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); transition: box-shadow .2s, transform .2s; }
.az-karte:hover { box-shadow: 0 10px 28px -12px rgba(16, 24, 40, .22); transform: translateY(-1px); }
.az-vorschau { position: relative; aspect-ratio: 4 / 3; background: repeating-conic-gradient(#f4f4f5 0% 25%, #fafafa 0% 50%) 0 0 / 16px 16px; display: grid; place-items: center; }
.az-vorschau img { width: 100%; height: 100%; object-fit: contain; padding: 14px; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .12)); }
.az-datei { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px; text-align: center; color: var(--text-2); border: 0; background: none; font: inherit; max-width: 100%; }
.az-datei:hover { text-decoration: none; }
.az-datei > .ic { width: 34px; height: 34px; color: var(--text-leise); }
.az-datei b { font-size: 12px; letter-spacing: .08em; color: var(--text-leise); }
.az-datei span { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.az-datei--fehlt { cursor: pointer; width: calc(100% - 28px); height: calc(100% - 28px); justify-content: center; border: 2px dashed #fdba74; border-radius: 12px; background: rgba(255, 247, 237, .9); color: #9a3412; }
.az-datei--fehlt > .ic { color: #ea580c; }
.az-datei--fehlt b { color: #9a3412; font-size: 14px; letter-spacing: 0; }
.az-groesse { position: absolute; left: 10px; top: 10px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: rgba(255, 255, 255, .78); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.az-hochladen { position: absolute; left: 14px; right: 14px; bottom: 12px; }
.az-inhalt { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 12px; }
.az-kunde { width: 100%; border: 0; padding: 4px 6px; margin: -4px -6px 0; border-radius: 8px; font: inherit; font-size: 16px; font-weight: 600; letter-spacing: -.01em; background: none; color: var(--text); }
.az-kunde:hover:not(:read-only), .az-kunde:focus { background: var(--flaeche); outline: none; }
.az-kunde::placeholder { color: var(--grau); font-weight: 500; }
.az-platz { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.az-platz a { margin-left: auto; font-size: 13px; font-weight: 500; color: #0a64d6; }
.az-punkt { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.az-platz--ja .az-punkt { background: #34c759; box-shadow: 0 0 0 3px rgba(52, 199, 89, .18); }
.az-platz--nein { color: #9a3412; }
.az-platz--nein .az-punkt { background: #ff9500; box-shadow: 0 0 0 3px rgba(255, 149, 0, .2); }
.az-wahl { width: 100%; height: 34px; border-radius: 10px; border: 1px solid var(--linie-stark); background: #fff; font: inherit; font-size: 13.5px; padding: 0 10px; cursor: pointer; }
.az-karte--offen .az-wahl { border-color: #fdba74; background: #fffaf3; }
.az-aktionen { display: flex; justify-content: space-between; align-items: center; margin-top: 2px; padding-top: 8px; border-top: 1px solid var(--linie); }
.az-weg { color: var(--text-leise); }
.az-weg:hover { color: var(--gefahr-dunkel); }

/* =============================================================== Hoamatbladl: Feinschliff im Apple-Stil */
.lesen__kopf { position: relative; z-index: 3; background: rgba(28, 26, 24, .55); backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px); border-bottom: 1px solid rgba(255, 255, 255, .07); }
.lesen__knopf { border-radius: 999px; border-color: rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .08); font-weight: 500; transition: background .2s; }
.lesen__leiste { align-self: center; margin-top: 14px; padding: 5px; gap: 3px; border-radius: 999px; background: rgba(255, 255, 255, .08); backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px); border: 1px solid rgba(255, 255, 255, .08); }
.lesen__punkt { min-width: 32px; height: 30px; border: 0; border-radius: 999px; background: none; transition: background .2s, color .2s; }
.lesen__pfeil { background: rgba(255, 255, 255, .86); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); box-shadow: 0 8px 24px rgba(0, 0, 0, .35), inset 0 0 0 .5px rgba(255, 255, 255, .6); }
.lesen__pfeil:active:not(:disabled) { transform: translateY(-50%) scale(.96); }
.lesen__hinweis { opacity: .75; }
.hb-held { border-radius: 20px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 32px -18px rgba(16, 24, 40, .18); }
.hb-gross { border-radius: 16px; }
.hb-gross:active { transform: scale(.985); }
.hb-zeile, .hb-leer, .hb-abgabe, .tour { border-radius: 18px; }
.dialog.tour { border-radius: 22px; }
@media (max-width: 900px) {
  .az-kennzahlen { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.lesen__quer { display: none; }
@media (max-width: 760px) {
  .lesen__kopf { padding: 10px 12px; }
  .lesen__zaehler, .lesen__knopf > span:not(.ic) { display: none; }
  .lesen__knopf { padding: 0 11px; }
  .lesen__titel b { font-size: 18px; }
  /* Auf dem Handy blättert man per Wischen oder Tippen auf die Seitenhälften */
  .lesen__pfeil { display: none; }
  .lesen__leiste { margin-top: 18px; max-width: calc(100% - 24px); overflow-x: auto; flex-wrap: nowrap; }
  .lesen__uebersicht { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; padding: 10px 14px 20px; }
}
@media (max-width: 760px) and (orientation: portrait) {
  .lesen__quer { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 10px 16px 0; font-size: 13px; color: #e9e3d9; }
}
/* Klare Rangfolge: Schreiben ist die Hauptsache, Fotos und Blättern daneben */
.hb-aktionen { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hb-aktionen .hb-gross--primaer { grid-column: 1 / -1; min-height: 76px; }
.hb-aktionen .hb-gross--primaer b { font-size: 18px; }
@media (max-width: 520px) { .hb-aktionen { grid-template-columns: minmax(0, 1fr); } }

/* =============================================================== Hoamatbladl: Mitwirkende */
.mt-einleitung { margin: -6px 0 18px; max-width: 720px; color: var(--text-2); font-size: 14.5px; }
.mt-liste { list-style: none; margin: 0; padding: 4px 0; border-radius: 18px; }
.mt-liste li { display: grid; grid-template-columns: auto minmax(0, 1.4fr) minmax(0, 1.2fr) auto; align-items: center; gap: 14px; padding: 12px 18px; }
.mt-liste li + li { border-top: 1px solid var(--linie); }
.mt-person { display: flex; flex-direction: column; min-width: 0; }
.mt-person b { font-size: 15px; font-weight: 600; }
.mt-person span { font-size: 13px; color: var(--text-leise); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-status { font-size: 13px; }
.mt-status--warten { color: #9a6700; }
.mt-status--warten .az-punkt { background: #ffcc00; box-shadow: 0 0 0 3px rgba(255, 204, 0, .22); }
.mt-status--aus { color: var(--text-leise); }
.mt-status--aus .az-punkt { background: var(--grau); }
.mt-zeile--aus .mt-person b { color: var(--text-leise); }
.mt-aktionen { display: flex; gap: 6px; justify-content: flex-end; }
.mt-dialog { max-width: 520px; border-radius: 22px; }
.mt-erfolg { display: grid; place-items: center; margin: 4px 0 14px; }
.mt-erfolg .ic { width: 46px; height: 46px; color: #34c759; }
.mt-link { display: flex; flex-direction: column; gap: 10px; }
.mt-link__knoepfe { display: flex; gap: 8px; flex-wrap: wrap; }
.mt-link p { margin: 0; }
.mt-neu { margin-bottom: 16px; border-radius: 18px; }
.mt-neu__kopf { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
@media (max-width: 760px) {
  .mt-liste li { grid-template-columns: auto minmax(0, 1fr); }
  .mt-status, .mt-aktionen { grid-column: 2; justify-content: flex-start; }
}
