/* Ratsinformationssystem – Grundgestaltung
   Farben aus dem Gemeindewappen (Blau, Gold, Weiß). Anpassbar über die
   Variablen unten. Kontraste nach WCAG 2.1 AA. */
:root {
  --primaer: #1d4f9c;
  --primaer-dunkel: #153a73;
  --primaer-hell: #e8eef8;
  --akzent: #f2c500;
  --text: #1b2230;
  --text-leise: #4f5869;
  --linie: #d5dbe5;
  --flaeche: #ffffff;
  --hintergrund: #f4f6fa;
  --erfolg: #1f7a3d;
  --erfolg-hell: #e5f4ea;
  --warnung: #8a5a00;
  --warnung-hell: #fff4d1;
  --fehler: #b42318;
  --fehler-hell: #fdeceb;
  --nichtoeff: #7a2e8c;
  --nichtoeff-hell: #f5ebf8;
  --radius: 8px;
  --schatten: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --primaer: #8fb3ff; --primaer-dunkel: #b8cdff; --primaer-hell: #1d2a44;
    --text: #e8ecf3; --text-leise: #a9b2c3; --linie: #333d50; --flaeche: #1a2130; --hintergrund: #11161f;
    --erfolg: #6fd394; --erfolg-hell: #15301f; --warnung: #f5c451; --warnung-hell: #33290f;
    --fehler: #ff8a80; --fehler-hell: #3a1714; --nichtoeff: #e0a6ee; --nichtoeff-hell: #2c1a33;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { font-size: 100%; }
body { margin: 0; font-family: "Segoe UI", "Liberation Sans", Arial, sans-serif; font-size: 1rem; line-height: 1.55;
       color: var(--text); background: var(--hintergrund); }
a { color: var(--primaer); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--akzent); outline-offset: 2px; }
h1 { font-size: 1.6rem; margin: 0 0 .25rem; line-height: 1.25; }
h2 { font-size: 1.2rem; margin: 1.5rem 0 .75rem; }
h3 { font-size: 1.05rem; margin: 1rem 0 .5rem; }
.leise { color: var(--text-leise); }
.klein { font-size: .9rem; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sprunglink { position: absolute; left: -999px; top: 0; background: var(--akzent); color: #000; padding: .5rem 1rem; z-index: 10; }
.sprunglink:focus { left: 0; }

/* Layout */
.layout { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.seitenleiste { background: var(--primaer-dunkel); color: #fff; padding: 1.25rem 1rem; position: sticky; top: 0;
                height: 100vh; overflow-y: auto; border-right: 4px solid var(--akzent); }
@media (prefers-color-scheme: dark) { .seitenleiste { background: #0d1a33; } }
.marke { display: flex; gap: .75rem; align-items: center; color: #fff; text-decoration: none; margin-bottom: 1.5rem; }
.marke img { width: 44px; height: auto; }
.marke strong { display: block; font-size: 1.05rem; line-height: 1.2; }
.marke span { font-size: .8rem; opacity: .85; }
.nav { list-style: none; margin: 0; padding: 0; }
.nav li { margin: 2px 0; }
.nav a { display: flex; gap: .6rem; align-items: center; color: #fff; text-decoration: none; padding: .6rem .75rem;
         border-radius: 6px; font-size: 1rem; }
.nav a:hover { background: rgba(255, 255, 255, .1); }
.nav a[aria-current="page"] { background: rgba(255, 255, 255, .18); font-weight: 600; box-shadow: inset 3px 0 0 var(--akzent); }
.nav .abschnitt { text-transform: uppercase; font-size: .72rem; letter-spacing: .06em; opacity: .7; margin: 1.25rem .75rem .25rem; }
.nav svg { width: 20px; height: 20px; flex: none; }
.haupt { min-width: 0; }
.kopfleiste { display: flex; align-items: center; justify-content: flex-end; gap: 1rem; padding: .75rem 2rem;
              background: var(--flaeche); border-bottom: 1px solid var(--linie); }
.kopfleiste .wer { color: var(--text-leise); font-size: .95rem; }
.menue-knopf { display: none; }
.inhalt { padding: 1.5rem 2rem 3rem; max-width: 1200px; }
.testbanner { background: repeating-linear-gradient(45deg, #ffe58a, #ffe58a 12px, #ffd84d 12px, #ffd84d 24px);
              color: #3d2c00; text-align: center; font-weight: 700; padding: .35rem; font-size: .9rem; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .seitenleiste { position: fixed; inset: 0 auto 0 0; width: 280px; transform: translateX(-100%); transition: transform .2s;
                  z-index: 20; }
  .seitenleiste.offen { transform: none; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .4); }
  .menue-knopf { display: inline-flex; margin-right: auto; }
  .kopfleiste { padding: .6rem 1rem; }
  .inhalt { padding: 1rem 1rem 3rem; }
}

/* Bausteine */
.seitenkopf { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; justify-content: space-between; margin-bottom: 1.25rem; }
.knopfreihe { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 1.25rem;
         box-shadow: var(--schatten); margin-bottom: 1.25rem; }
.karte > h2:first-child, .karte > h3:first-child { margin-top: 0; }
.raster { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.raster > .karte { margin-bottom: 0; }
.kennzahl { font-size: 2rem; font-weight: 700; color: var(--primaer); line-height: 1.1; }
.knopf { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--primaer); background: var(--primaer);
         color: #fff; padding: .55rem 1rem; border-radius: 6px; font: inherit; font-weight: 600; text-decoration: none;
         cursor: pointer; min-height: 44px; }
@media (prefers-color-scheme: dark) { .knopf { color: #0b1220; } }
.knopf:hover { background: var(--primaer-dunkel); border-color: var(--primaer-dunkel); }
.knopf.zweit { background: transparent; color: var(--primaer); }
.knopf.zweit:hover { background: var(--primaer-hell); }
.knopf.gefahr { background: var(--fehler); border-color: var(--fehler); }
.knopf.klein { padding: .3rem .65rem; min-height: 36px; font-size: .9rem; }
.knopf-link { background: none; border: none; padding: 0; color: var(--primaer); font: inherit; cursor: pointer; text-decoration: underline; }

.meldungen { list-style: none; padding: 0; margin: 0 0 1rem; }
.meldung { padding: .75rem 1rem; border-radius: 6px; margin-bottom: .5rem; border-left: 4px solid; }
.meldung.success { background: var(--erfolg-hell); border-color: var(--erfolg); }
.meldung.info { background: var(--primaer-hell); border-color: var(--primaer); }
.meldung.warning { background: var(--warnung-hell); border-color: var(--warnung); }
.meldung.error { background: var(--fehler-hell); border-color: var(--fehler); }

.marke-status { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 600;
                border: 1px solid currentColor; white-space: nowrap; }
.st-entwurf { color: var(--warnung); background: var(--warnung-hell); }
.st-eingeladen { color: var(--erfolg); background: var(--erfolg-hell); }
.st-durchgefuehrt, .st-abgeschlossen { color: var(--text-leise); }
.st-abgesagt { color: var(--fehler); background: var(--fehler-hell); }
.st-nichtoeff { color: var(--nichtoeff); background: var(--nichtoeff-hell); }

table.tabelle { width: 100%; border-collapse: collapse; background: var(--flaeche); }
.tabelle th, .tabelle td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--linie); vertical-align: top; }
.tabelle th { font-size: .85rem; color: var(--text-leise); font-weight: 600; background: var(--hintergrund); }
.tabelle-huelle { overflow-x: auto; border: 1px solid var(--linie); border-radius: var(--radius); }
.tabelle-huelle .tabelle th:first-child, .tabelle-huelle .tabelle td:first-child { padding-left: 1rem; }

.liste-schlicht { list-style: none; margin: 0; padding: 0; }
.liste-schlicht > li { padding: .65rem 0; border-bottom: 1px solid var(--linie); }
.liste-schlicht > li:last-child { border-bottom: none; }
.datumsblock { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 3.4rem;
               height: 3.4rem; border-radius: 8px; background: var(--primaer-hell); color: var(--primaer); flex: none; line-height: 1.1; }
.datumsblock b { font-size: 1.3rem; }
.datumsblock small { font-size: .72rem; text-transform: uppercase; }
.termin { display: flex; gap: .9rem; align-items: center; }
.termin a { font-weight: 600; }

/* Formulare */
.formular { max-width: 720px; }
.feld { margin-bottom: 1.1rem; }
.feld > label, .feld > .label { display: block; font-weight: 600; margin-bottom: .3rem; }
.feld input[type=text], .feld input[type=email], .feld input[type=password], .feld input[type=number],
.feld input[type=date], .feld input[type=datetime-local], .feld input[type=search], .feld select, .feld textarea {
  width: 100%; padding: .6rem .7rem; border: 1px solid #8792a5; border-radius: 6px; font: inherit; background: var(--flaeche);
  color: var(--text); min-height: 44px; }
.feld textarea { min-height: 80px; }
.feld .hilfe { font-size: .88rem; color: var(--text-leise); margin-top: .25rem; }
.feld .fehler, .fehlerliste { color: var(--fehler); font-weight: 600; font-size: .92rem; margin: .25rem 0 0; padding: 0; list-style: none; }
.feld.check { display: flex; gap: .6rem; align-items: flex-start; }
.feld.check input { width: 1.25rem; height: 1.25rem; margin-top: .2rem; flex: none; }
.feld.check label { font-weight: 600; margin: 0; }
.feld ul.auswahl { list-style: none; padding: 0; margin: 0; columns: 2; }
.feld ul.auswahl label { font-weight: normal; }
.filterleiste { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; margin-bottom: 1rem; }
.filterleiste .feld { margin: 0; }
.reiter { display: flex; gap: .25rem; border-bottom: 2px solid var(--linie); margin-bottom: 1rem; }
.reiter a { padding: .5rem 1rem; text-decoration: none; color: var(--text-leise); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.reiter a[aria-current="page"] { color: var(--primaer); border-color: var(--primaer); }

/* Anmeldung */
.schlicht { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem;
            background: linear-gradient(160deg, var(--primaer-dunkel) 0 38%, var(--hintergrund) 38%); }
.anmeldekarte { width: 100%; max-width: 460px; background: var(--flaeche); border-radius: 12px; padding: 2rem;
                box-shadow: 0 10px 30px rgba(0, 0, 0, .15); border-top: 6px solid var(--akzent); }
.anmeldekarte.breit { max-width: 640px; }
.anmeldekarte .kopf { text-align: center; margin-bottom: 1.5rem; }
.anmeldekarte .kopf img { width: 64px; }
.anmeldekarte .knopf { width: 100%; justify-content: center; }
.qr { background: #fff; padding: .75rem; border-radius: 8px; display: inline-block; border: 1px solid var(--linie); }
.qr svg { width: 200px; height: 200px; display: block; }
.code { font-family: "Liberation Mono", Consolas, monospace; font-size: 1.05rem; letter-spacing: .05em; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: .4rem 1.5rem; padding: 1rem; background: var(--hintergrund);
         border-radius: 8px; list-style: none; margin: 1rem 0; }

/* Tagesordnung */
.to-teil { margin-bottom: 1.5rem; }
.to-teil h3 { display: flex; gap: .5rem; align-items: center; }
.to-liste { list-style: none; margin: 0; padding: 0; }
.to-liste .to-liste { margin-left: 2rem; }
.to-punkt { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 6px; margin: .4rem 0; }
.to-zeile { display: flex; gap: .75rem; align-items: flex-start; padding: .65rem .75rem; }
.to-nr { font-weight: 700; min-width: 3.2rem; color: var(--primaer); }
.to-titel { flex: 1; }
.to-titel p { margin: .25rem 0 0; color: var(--text-leise); font-size: .93rem; white-space: pre-line; }
.to-aktionen { display: flex; gap: .4rem; flex: none; }
.griff { cursor: grab; color: var(--text-leise); padding: 0 .25rem; user-select: none; font-size: 1.2rem; line-height: 1; border: none; background: none; }
.to-leer { border: 2px dashed var(--linie); border-radius: 6px; padding: .75rem; color: var(--text-leise); text-align: center; }
.sortable-ghost { opacity: .45; background: var(--primaer-hell); }
.nichtoeff-teil { border-left: 4px solid var(--nichtoeff); padding-left: 1rem; }
.gesperrt { color: var(--text-leise); font-style: italic; }
.speicherhinweis { font-size: .9rem; color: var(--text-leise); min-height: 1.4em; }

/* Kalender */
.kalender { width: 100%; border-collapse: collapse; table-layout: fixed; background: var(--flaeche); }
.kalender th { padding: .4rem; font-size: .85rem; color: var(--text-leise); }
.kalender td { border: 1px solid var(--linie); height: 6.5rem; vertical-align: top; padding: .3rem; font-size: .85rem; }
.kalender td.aussen { background: var(--hintergrund); color: var(--text-leise); }
.kalender td.heute .tagnr { background: var(--primaer); color: #fff; border-radius: 50%; display: inline-block; width: 1.7rem; text-align: center; }
.kalender .eintrag { display: block; background: var(--primaer-hell); border-left: 3px solid var(--primaer); padding: .15rem .3rem;
                     margin-top: .2rem; border-radius: 3px; text-decoration: none; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 700px) { .kalender-raster { display: none; } }
@media (min-width: 701px) { .kalender-liste { display: none; } }

pre.diff { background: var(--hintergrund); padding: .75rem; border-radius: 6px; white-space: pre-wrap; font-size: .9rem; margin: .5rem 0 0; }
.diff .plus { color: var(--erfolg); }
.diff .minus { color: var(--fehler); text-decoration: line-through; }
details > summary { cursor: pointer; font-weight: 600; }
@media print { .seitenleiste, .kopfleiste, .knopfreihe, .to-aktionen, .griff { display: none !important; } .layout { display: block; } }
.abstand-oben { margin-top: 1.5rem; }
.kopfleiste .menue-knopf { display: none; }
@media (min-width: 901px) {
  .layout { background: linear-gradient(to right, var(--primaer-dunkel) 260px, transparent 260px); }
}
@media (max-width: 900px) { .kopfleiste .menue-knopf { display: inline-flex; margin-right: auto; } }
@media (max-width: 600px) {
  .to-zeile { flex-wrap: wrap; }
  .to-aktionen { width: 100%; justify-content: flex-end; }
  .to-liste .to-liste { margin-left: 1rem; }
  .seitenkopf h1 { font-size: 1.35rem; }
}

/* Phase 3: Vorlagen, Anlagen, Niederschriften, Suche */
.st-v-entwurf, .st-v-pruefung { color: var(--warnung); background: var(--warnung-hell); }
.st-v-freigegeben, .st-v-beratung { color: var(--erfolg); background: var(--erfolg-hell); }
.st-v-erledigt, .st-v-zurueckgezogen { color: var(--text-leise); }
.vorlage-titel { font-size: 1.1rem; font-weight: 600; margin: .25rem 0; }
.raster-breit { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 1000px) { .raster-breit { grid-template-columns: 1fr; } }
.fliesstext p { margin: 0 0 .6rem; }
.beratungsfolge { padding-left: 1.2rem; margin: 0; }
.beratungsfolge li { margin-bottom: .6rem; }
.anlagen { list-style: none; padding: 0; margin: .4rem 0 .6rem; }
.anlagen li { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; padding: .3rem 0; }
.anlagen svg { width: 16px; height: 16px; flex: none; color: var(--text-leise); }
form.inline { display: inline; }
.to-unterlagen { margin-top: .35rem; font-size: .93rem; }
.to-unterlagen .anlagen { margin: .2rem 0; }
.vorlage-verweis { display: inline-block; margin-top: .25rem; font-size: .93rem; }
.treffer { margin-bottom: .9rem; }
.treffer .art { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-leise); }
.treffer .auszug { color: var(--text-leise); font-size: .93rem; }
.treffer mark { background: var(--akzent); color: #000; padding: 0 .1rem; }
.zahlen { display: flex; gap: .75rem; flex-wrap: wrap; }
.zahlen .feld { width: 7.5rem; }
code { font-family: "Liberation Mono", Consolas, monospace; font-size: .9em; background: var(--hintergrund); padding: 0 .25rem; border-radius: 3px; }
.fehlertext { color: var(--fehler); }
.st-n-entwurf, .st-n-pruefung { color: var(--warnung); background: var(--warnung-hell); }
.st-n-unterzeichnet, .st-n-genehmigt { color: var(--erfolg); background: var(--erfolg-hell); }
dl.daten { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.25rem; margin: 0; }
dl.daten dt { font-weight: 600; color: var(--text-leise); }
dl.daten dd { margin: 0; }
@media (max-width: 600px) { dl.daten { grid-template-columns: 1fr; } dl.daten dd { margin-bottom: .4rem; } }
.n-punkt { padding: .25rem 0 .75rem; border-bottom: 1px solid var(--linie); margin-bottom: .75rem; }
.n-punkt h4 { margin: .25rem 0 .4rem; font-size: 1rem; }
.beschluss-kasten { background: var(--primaer-hell); border-left: 4px solid var(--primaer); padding: .6rem .8rem; border-radius: 4px; margin: .5rem 0; }
.tabelle td.feld { margin: 0; }
.suchfeld { flex: 1 1 22rem; }
.kopfsuche { margin-right: auto; }
.kopfsuche input { padding: .45rem .7rem; border: 1px solid #8792a5; border-radius: 6px; font: inherit; min-height: 40px; width: 16rem; background: var(--flaeche); color: var(--text); }
@media (max-width: 900px) { .kopfsuche { margin-right: 0; } .kopfsuche input { width: 9rem; } }
.abstand-oben-klein { margin-top: .6rem; margin-bottom: 0; }

/* --- Phase 4: Digitaler Sitzungsordner ----------------------------------------- */
.brotkrumen { margin: 0 0 .5rem; }
.marke-neu { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 700;
             background: var(--akzent); color: #2b2100; white-space: nowrap; }
.marke-neu.geaendert { background: var(--primaer-hell); color: var(--primaer); border: 1px solid var(--primaer); }
.ordner-kacheln { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.ordner-kachel { display: flex; gap: 1rem; align-items: center; padding: 1.1rem 1.25rem; background: var(--flaeche);
                 border: 1px solid var(--linie); border-radius: var(--radius); box-shadow: var(--schatten);
                 color: var(--text); text-decoration: none; min-height: 88px; }
.ordner-kachel:hover { border-color: var(--primaer); }
.ordner-kachel strong { color: var(--primaer); font-size: 1.05rem; }
.ordner-kachel.abgesagt strong { text-decoration: line-through; }
.hinweis-neu { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; }
ul.unterlagen { list-style: none; margin: .5rem 0; padding: 0; display: grid; gap: .5rem;
                grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.unterlage-knopf { display: flex; gap: .75rem; align-items: center; padding: .75rem 1rem; min-height: 56px;
                   border: 1px solid var(--linie); border-radius: var(--radius); background: var(--flaeche);
                   color: var(--text); text-decoration: none; }
.unterlage-knopf:hover { border-color: var(--primaer); background: var(--primaer-hell); }
.unterlage-knopf svg { width: 26px; height: 26px; flex: none; color: var(--primaer); }
.unterlage-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.unterlage-titel { font-weight: 600; overflow-wrap: anywhere; }
.unterlage.ist-neu .unterlage-knopf, .unterlage.ist-geaendert .unterlage-knopf { border-left: 5px solid var(--akzent); }
ol.ordner-punkte { list-style: none; margin: 0; padding: 0; }
.ordner-punkt { padding: 1rem 0; border-bottom: 1px solid var(--linie); scroll-margin-top: 1rem; }
.ordner-punkt:last-child { border-bottom: none; }
.ordner-punkt.unterpunkt { margin-left: 1.5rem; }
.ordner-punkt-kopf { display: flex; gap: .75rem; align-items: baseline; }
.ordner-punkt-kopf .to-nr { flex: none; min-width: 4.2rem; font-weight: 700; color: var(--primaer); }
.ordner-punkt-kopf p { margin: .25rem 0 0; }
details.notiz { margin-top: .6rem; }
details.notiz > summary { cursor: pointer; display: inline-flex; gap: .5rem; align-items: center; min-height: 44px;
                          color: var(--primaer); font-weight: 600; list-style: none; }
details.notiz > summary::-webkit-details-marker { display: none; }
details.notiz > summary svg { width: 20px; height: 20px; flex: none; }
details.notiz[data-hat-notiz] > summary { color: var(--text); }
details.notiz[data-hat-notiz] > summary svg { color: var(--akzent); }
.notiz-vorschau { font-weight: 400; }
.notiz-form textarea { width: 100%; box-sizing: border-box; font: inherit; padding: .6rem .75rem; border: 1px solid var(--linie);
                       border-radius: 6px; background: #fffdf3; color: #1b2230; min-height: 6rem; resize: vertical; }
@media (prefers-color-scheme: dark) { .notiz-form textarea { background: #222a1a; color: var(--text); } }
.notiz-form .knopfreihe { margin-top: .4rem; }
.notiz-karte h2 { margin: .1rem 0 .6rem; font-size: 1.1rem; }
.adresse-feld { width: 100%; box-sizing: border-box; font: inherit; font-family: monospace; padding: .5rem; }

/* Integrierter PDF-Betrachter */
body.mit-betrachter .inhalt { max-width: none; padding: 0; }
.betrachter { display: flex; flex-direction: column; height: calc(100vh - 62px); }
.testbanner ~ .layout .betrachter { height: calc(100vh - 94px); }
.betrachter-leiste { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .5rem 1rem;
                     background: var(--flaeche); border-bottom: 1px solid var(--linie); }
.betrachter-titel { font-size: 1.05rem; margin: 0; flex: 1 1 220px; min-width: 0; overflow: hidden; text-overflow: ellipsis;
                    white-space: nowrap; }
.betrachter-steuerung .knopf { min-width: 48px; justify-content: center; }
.betrachter-flaeche { flex: 1; display: flex; min-height: 0; }
.betrachter-seiten { flex: 1; overflow: auto; background: #525659; padding: 12px; display: flex; flex-direction: column;
                     align-items: center; gap: 12px; -webkit-overflow-scrolling: touch; }
.betrachter-blatt { background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .4); flex: none; }
.betrachter-blatt canvas { display: block; }
.betrachter-hinweis { color: #fff; }
.betrachter-notiz { width: 340px; flex: none; padding: 1rem; background: var(--flaeche); border-left: 1px solid var(--linie);
                    overflow-y: auto; }
.betrachter-notiz h2 { margin-top: 0; font-size: 1.05rem; }
.betrachter-notiz textarea { min-height: 40vh; }
.betrachter-notiz[hidden] { display: none; }
@media (max-width: 900px) {
  .betrachter { height: calc(100vh - 58px); }
  .betrachter-flaeche { flex-direction: column; }
  .betrachter-notiz { width: auto; border-left: none; border-top: 1px solid var(--linie); max-height: 45vh; }
  .betrachter-notiz textarea { min-height: 8rem; }
  .ordner-punkt.unterpunkt { margin-left: .75rem; }
  ul.unterlagen { grid-template-columns: 1fr; }
}
/* Im Betrachter gehört die volle Breite dem Dokument: Menü wie auf kleinen Bildschirmen */
body.mit-betrachter .layout { grid-template-columns: 1fr; }
body.mit-betrachter .seitenleiste { position: fixed; inset: 0 auto 0 0; width: 280px; transform: translateX(-100%);
                                    transition: transform .2s; z-index: 20; }
body.mit-betrachter .seitenleiste.offen { transform: none; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .4); }
body.mit-betrachter .menue-knopf { display: inline-flex; margin-right: auto; }

/* Offline-App */
body.offline-app { background: var(--hintergrund); }
.offline-kopf { display: flex; gap: .75rem; align-items: center; padding: .6rem 1rem; background: var(--primaer-dunkel); color: #fff;
                border-bottom: 4px solid var(--akzent); position: sticky; top: 0; z-index: 5; }
.offline-kopf img { width: 36px; height: auto; }
.offline-kopf strong { display: block; line-height: 1.2; }
.offline-kopf span { font-size: .8rem; opacity: .85; }
.offline-netz { margin-left: auto; font-size: .8rem; font-weight: 700; padding: .15rem .6rem; border-radius: 999px; }
.offline-netz.ist-online { background: #e5f4ea; color: #1f7a3d; }
.offline-netz.ist-offline { background: #fff4d1; color: #8a5a00; }
.offline-inhalt { max-width: 1100px; margin: 0 auto; padding: 1rem; }
.offline-sitzung > summary { cursor: pointer; min-height: 48px; padding: .25rem 0; }
.offline-sitzung[open] > summary { margin-bottom: .75rem; }
.offline-teil { font-weight: 700; color: var(--nichtoeff); padding: .75rem 0 .25rem; }
.offline-notiz { background: #fffdf3; color: #1b2230; border-left: 4px solid var(--akzent); padding: .5rem .75rem; white-space: pre-wrap; margin: .5rem 0 0; }
button.unterlage-knopf { width: 100%; text-align: left; font: inherit; cursor: pointer; }
button.unterlage-knopf:disabled { opacity: .5; cursor: not-allowed; }
.offline-betrachter { display: flex; flex-direction: column; height: calc(100vh - 80px); }
.offline-betrachter .betrachter-seiten { flex: 1; }
