/* Neovers Ratsinformation – Mandatsträger-App (PWA /mobil/ und Android-Hülle), Design B mobil.
   Ruhige App-Oberfläche wie die Kita-Eltern-App: helle Titelleiste, Listen in Gruppen, Status immer Symbol + Wort,
   untere Tab-Leiste mit Strich-Symbolen, Text und Zähler. Alle Farben über Variablen, hell und dunkel nach Gerät. */
@font-face { font-family: "Fira Sans"; font-weight: 400; font-display: swap; src: url("../fonts/fira-sans-400.woff2") format("woff2"); }
@font-face { font-family: "Fira Sans"; font-weight: 500; font-display: swap; src: url("../fonts/fira-sans-500.woff2") format("woff2"); }
@font-face { font-family: "Fira Sans"; font-weight: 600 700; font-display: swap; src: url("../fonts/fira-sans-600.woff2") format("woff2"); }
@font-face { font-family: "Fira Sans Condensed"; font-weight: 400 500; font-display: swap; src: url("../fonts/fira-sans-condensed-400.woff2") format("woff2"); }
@font-face { font-family: "Fira Sans Condensed"; font-weight: 600 700; font-display: swap; src: url("../fonts/fira-sans-condensed-600.woff2") format("woff2"); }
:root {
  --hg: #f6f5f1; --flaeche: #fcfbf8; --flaeche2: #ebe8e1; --text: #1c1a17; --text2: #57524a; --leise: #6f695f; --linie: #d6d1c7; --linie2: #8a8275;
  --akzent: #1d5a3a; --akzent2: #14452c; --akzent-fg: #ffffff; --akzent-hg: #dde8df;
  --warn: #7a4600; --warn-i: #a86800; --warn-hg: #f4e2bd; --fehler: #a3221a; --fehler-hg: #f5dcd6;
  --cond: "Fira Sans Condensed", "Fira Sans", "Arial Narrow", sans-serif;
  --sym-ok: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cmask id='m'%3E%3Crect width='16' height='16' fill='white'/%3E%3Cpath d='M4.6 8.2l2.3 2.3 4.6-4.8' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/mask%3E%3Ccircle cx='8' cy='8' r='7.2' mask='url%28%23m%29'/%3E%3C/svg%3E");
  --sym-warn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cmask id='m'%3E%3Crect width='16' height='16' fill='white'/%3E%3Cpath d='M8 5.6v4.1' stroke='black' stroke-width='1.9' stroke-linecap='round'/%3E%3Ccircle cx='8' cy='12.1' r='1.05' fill='black'/%3E%3C/mask%3E%3Cpath d='M8 1.1l7.3 13.2H.7z' stroke='black' stroke-width='1' stroke-linejoin='round' mask='url%28%23m%29'/%3E%3C/svg%3E");
  --sym-err: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cmask id='m'%3E%3Crect width='16' height='16' fill='white'/%3E%3Cpath d='M5.5 5.5l5 5M10.5 5.5l-5 5' stroke='black' stroke-width='1.9' stroke-linecap='round'/%3E%3C/mask%3E%3Cpath d='M5.1.8h5.8l4.3 4.3v5.8l-4.3 4.3H5.1L.8 10.9V5.1z' mask='url%28%23m%29'/%3E%3C/svg%3E");
  --sym-offen: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='5.9' fill='none' stroke='black' stroke-width='2.1'/%3E%3C/svg%3E");
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root {
  --hg: #1b1a17; --flaeche: #211f1c; --flaeche2: #2a2824; --text: #e9e5dc; --text2: #a8a295; --leise: #948e81; --linie: #36332d; --linie2: #756f63;
  --akzent: #7cc79a; --akzent2: #9bd8b3; --akzent-fg: #10140f; --akzent-hg: #22362a;
  --warn: #e9b95a; --warn-i: #e9b95a; --warn-hg: #2f2614; --fehler: #f28b7d; --fehler-hg: #3a1c17; color-scheme: dark; } }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--hg); color: var(--text); font: 16px/1.45 "Fira Sans", "Segoe UI", Roboto, Arial, sans-serif; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
a { color: var(--akzent); text-underline-offset: 2px; }
:focus-visible { outline: 3px solid var(--akzent); outline-offset: 2px; }
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Titelleiste */
.kopf { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 6px; min-height: 52px; padding: calc(8px + env(safe-area-inset-top)) 12px 8px 16px;
  background: var(--flaeche); border-bottom: 1px solid var(--linie); }
.kopf .zurueck { display: inline-flex; align-items: center; margin-left: -8px; padding: 6px; border-radius: 8px; color: var(--text); text-decoration: none; }
#kopf-titel { flex: 1; font-weight: 600; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.netz { font-size: 12.5px; padding: 2px 8px; border-radius: 6px; color: var(--text2); background: var(--flaeche2); }
.netz.aus { background: var(--warn-hg); color: var(--warn); }

main { padding: 16px; max-width: 640px; margin: 0 auto; }
h1 { font-size: 22px; line-height: 1.25; margin: 4px 2px 14px; font-weight: 600; }
h2.ab { font-size: 15px; margin: 22px 2px 8px; font-weight: 600; color: var(--text); }
h2.ab .z { font-weight: 400; color: var(--leise); margin-left: 4px; }
.muted { color: var(--text2); } .leise { color: var(--leise); } .klein { font-size: 14px; } .mitte { text-align: center; }

/* Gruppen und Zeilen */
.gruppe { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; overflow: hidden; margin-bottom: 12px; }
.gruppe > * + * { border-top: 1px solid var(--linie); }
.feld { padding: 14px 16px; }
.feld > h2 { margin: 0 0 6px; font-size: 16px; }
.feld p { margin: 6px 0; }
.zeile { display: flex; align-items: center; gap: 12px; padding: 12px 16px; color: var(--text); text-decoration: none; min-height: 52px; }
a.zeile:active { background: var(--flaeche2); }
.zeile .inhalt { flex: 1; min-width: 0; }
.zeile .titel { font-weight: 600; line-height: 1.3; }
.zeile .unter { color: var(--text2); font-size: 14px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; }
.pfeil { color: var(--leise); flex: none; } .pfeil.ic { width: 18px; height: 18px; }
.leer { padding: 14px 16px; color: var(--text2); }
/* Sitzung in der Liste: Datum als schmale Spalte (Wochentag klein, Datum fett, Condensed) */
.dat { flex: none; width: 46px; align-self: flex-start; padding-top: 1px; font-family: var(--cond); line-height: 1.15; }
.dat small { display: block; color: var(--leise); font-size: 13px; }
.dat b { display: block; font-size: 17px; font-weight: 600; }
.zeile .st { margin-top: 5px; }

/* Status: Symbol + Wort, nur Abweichungen farbig */
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 500; color: var(--text2); white-space: nowrap; }
.st::before { content: ""; width: 14px; height: 14px; flex: none; background: currentColor; -webkit-mask: var(--sym-offen) center/contain no-repeat; mask: var(--sym-offen) center/contain no-repeat; }
.st.ok { color: var(--leise); } .st.ok::before { -webkit-mask-image: var(--sym-ok); mask-image: var(--sym-ok); }
.st.warn { color: var(--warn); } .st.warn::before { background: var(--warn-i); -webkit-mask-image: var(--sym-warn); mask-image: var(--sym-warn); }
.st.fehler { color: var(--fehler); } .st.fehler::before { -webkit-mask-image: var(--sym-err); mask-image: var(--sym-err); }
.st.live { color: var(--fehler); } .st.live::before { -webkit-mask: none; mask: none; width: 9px; height: 9px; border-radius: 50%; background: var(--fehler); }
.st + .st { margin-left: 10px; }
.st.text::before { display: none; }

/* Knöpfe und Felder */
button, .btn { font: inherit; font-weight: 600; font-size: 15px; border: 1px solid var(--akzent); border-radius: 8px; padding: 11px 16px; background: var(--akzent); color: var(--akzent-fg);
  cursor: pointer; text-align: center; text-decoration: none; display: inline-block; }
button.zweit, .btn.zweit { background: var(--flaeche); color: var(--text); border-color: var(--linie2); }
button.voll, .btn.voll { width: 100%; }
button.klein { padding: 7px 12px; font-size: 14px; font-weight: 500; }
button:disabled { opacity: .5; cursor: default; }
.reihe { display: flex; gap: 8px; flex-wrap: wrap; } .reihe > * { flex: 1; }
.oben { margin-top: 10px; }
label { display: block; margin: 12px 0 5px; font-size: 14px; font-weight: 500; color: var(--text2); }
input, select, textarea { width: 100%; font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--linie2); border-radius: 8px; background: var(--flaeche); color: var(--text); }
input[type=checkbox] { width: 18px; height: 18px; margin: 0 8px 0 0; accent-color: var(--akzent); }
.check { display: flex; align-items: center; color: var(--text); font-weight: 400; margin-top: 12px; }
.fehlertext { color: var(--fehler); font-size: 14px; min-height: 1em; }

/* Laufende Sitzung als hervorgehobene Zeile */
.laeuft { border-left: 3px solid var(--fehler); }

/* Tagesordnung */
.teil { font-size: 13.5px; font-weight: 600; color: var(--text2); padding: 10px 16px 4px; background: var(--flaeche2); }
.punkt { padding: 12px 16px; }
.punkt .kopfzeile { display: flex; gap: 10px; }
.punkt .nr { flex: none; min-width: 30px; font-weight: 600; font-family: var(--cond); }
.punkt .t { flex: 1; min-width: 0; }
.punkt.abgesetzt .t, .punkt.vertagt .t { text-decoration: line-through; color: var(--leise); }
.punkt .meta { margin: 4px 0 0 40px; }
.doks { list-style: none; padding: 0; margin: 6px 0 0 40px; }
.doks li { padding: 3px 0; }
.doks a { display: inline-flex; gap: 6px; align-items: baseline; text-decoration: none; }
.doks a::before { content: "PDF"; font: 600 11px/1 var(--cond); color: var(--text2); border: 1px solid var(--linie2); border-radius: 3px; padding: 2px 3px; flex: none; }
.gruppe > .doks { margin: 0; padding: 8px 16px 12px; }
details { margin: 8px 0 0 40px; }
details summary { cursor: pointer; color: var(--akzent); font-size: 14px; }
details textarea { margin-top: 8px; }
pre.text { white-space: pre-wrap; font: inherit; margin: 8px 0 0; }

/* Abstimmung */
.vote { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.vote button { font-size: 18px; padding: 20px 6px; background: var(--flaeche); color: var(--text); border: 2px solid var(--linie2); }
.vote button.ja { border-color: var(--akzent); color: var(--akzent); } .vote button.nein { border-color: var(--fehler); color: var(--fehler); }
.vote button:disabled { opacity: .45; }

/* Untere Tab-Leiste */
.navi { position: fixed; bottom: 0; left: 0; right: 0; display: flex; background: var(--flaeche); border-top: 1px solid var(--linie); padding-bottom: env(safe-area-inset-bottom); z-index: 5; }
.navi a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 7px; color: var(--text2); text-decoration: none; font-size: 12px; position: relative; }
.navi a.aktiv { color: var(--akzent); font-weight: 600; } .navi a.aktiv .ic { stroke-width: 2.1; }
.zahl { position: absolute; top: 3px; left: calc(50% + 6px); font-style: normal; min-width: 18px; height: 18px; line-height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--fehler); color: var(--flaeche); font-size: 11px; font-weight: 600; text-align: center; }

.toast { position: fixed; left: 12px; right: 12px; bottom: calc(78px + env(safe-area-inset-bottom)); background: var(--text); color: var(--hg); padding: 12px 14px; border-radius: 10px; z-index: 10; text-align: center; }
.toast.fehler { background: var(--fehler); color: var(--flaeche); }
.hinweis { background: var(--warn-hg); color: var(--text); border-left: 3px solid var(--warn-i); border-radius: 6px; padding: 10px 12px; margin-bottom: 12px; }
.hidden { display: none !important; }

/* Unterlagen: Anzeige mit Anmerkungen (Werkzeugleiste klebt unter der Titelleiste, Seiten als Bilder mit SVG-Ebene) */
main:has(.viewer) { max-width: none; padding: 0 0 16px; }
.viewer .werkzeuge { position: sticky; top: calc(52px + env(safe-area-inset-top)); z-index: 4; display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  padding: 8px 12px; background: var(--flaeche); border-bottom: 1px solid var(--linie); }
.viewer .wz { padding: 7px 10px; font-size: 14px; font-weight: 500; background: var(--flaeche); color: var(--text); border-color: var(--linie2); }
.viewer .wz.an { background: var(--akzent); color: var(--akzent-fg); border-color: var(--akzent); }
.viewer .farben { display: inline-flex; gap: 6px; margin-left: 4px; }
.viewer .farbe { width: 30px; height: 30px; padding: 0; border-radius: 50%; background: var(--f); border: 2px solid var(--linie2); }
.viewer .farbe.an { outline: 3px solid var(--text); outline-offset: 1px; }
.viewer .zoom { display: inline-flex; gap: 4px; margin-left: auto; } .viewer .zoom button { padding: 6px 12px; }
.viewer .vkopf { padding: 8px 14px 0; margin: 0; }
.seiten { overflow-x: auto; padding: 8px 8px 0; }
.seite { position: relative; margin: 0 auto 14px; width: calc(min(100%, 900px) * var(--zoom, 1)); max-width: none; background: #fff; box-shadow: 0 1px 3px #0003; }
.seite img { display: block; width: 100%; height: 100%; object-fit: contain; }
.seite svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.seite svg .notiz { pointer-events: auto; cursor: pointer; }
.seiten.zeichnen .seite svg { pointer-events: auto; touch-action: none; cursor: crosshair; }
.seite figcaption { position: absolute; left: 0; right: 0; bottom: -26px; display: flex; justify-content: space-between; font-size: 12.5px; color: var(--leise); padding: 0 2px; }
.seite { margin-bottom: 40px; }
.seite.fehlt::after { content: "Seite nicht verfügbar (offline nicht gespeichert)"; position: absolute; inset: 0; display: grid; place-items: center; color: #57524a; font-size: 14px; }
.linkknopf { background: none; border: 0; padding: 0; color: var(--akzent); font-size: 12.5px; font-weight: 500; text-decoration: underline; }
.seitentext { position: relative; margin-top: 30px; white-space: pre-wrap; font: 14px/1.5 ui-monospace, monospace; background: var(--flaeche); color: var(--text);
  border: 1px solid var(--linie); border-radius: 8px; padding: 10px 12px; max-height: 60vh; overflow: auto; }
.offline-zeile { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.doks .offl { font-size: 12px; color: var(--leise); margin-left: 6px; }
