/* Plenary Dashboard — Optik „Klarsicht“ aus dem Schwesterprojekt OpenRCV (redesign/assets/klarsicht.css):
   Systemschrift, helle Flächen, gruppierte Listen, Segmentschalter, ein Akzent für Bedienung.
   Richtungsvertrag in index.html, Maßstab: docs/REGELKATALOG.md. Keine externen Ressourcen. */

/* ---------- Tokens ---------- */
:root {
  /* drei bedeutungstragende Töne: Bedienung (Blau), Markierung des Büros (Grün), Jetzt (Rot) */
  --tint: #1B4FD8;
  --mark: #126E5A; --mark-ink: #FFFFFF;
  /* Ein Farbton je Grund (Nutzerentscheid 14.10.2026); weiße Schrift ≥ 4,5:1, Balken zur Karte ≥ 3:1 */
  --tone-beobachten: #56606F; --tone-redezeit: #A64B00; --tone-abstimmung: var(--mark); --tone-gast: #7440B8;
  --votes-bg: color-mix(in srgb, var(--label) 6%, var(--surface));   /* Abstimmungsblöcke: leichtgraue Fläche */
  --now: #D70015; --on-now: #FFFFFF;
  --bg: #F5F5F7; --sidebar: #EDEDF0; --surface: #FFFFFF;
  --label: #1D1D1F; --label2: #6A6A70; --past: #56565B;   /* past: vergangene Titel, ≥ 7:1 auf Weiß */
  --sep: rgba(60, 60, 67, .16); --fill: rgba(118, 118, 128, .12); --chip: #F0F0F3;   /* chip: deckend, damit Kontraste ohne Mischung gelten */
  --sel-ink: var(--tint); --seg-on: #FFFFFF; --on-tint: #FFFFFF; --ph: #5E5E63;
  --shadow-pop: 0 14px 34px -10px rgba(0, 0, 0, .28), 0 0 0 1px var(--sep);
  --ease: cubic-bezier(.2, .8, .2, 1);   /* Feder ohne Überschwingen (Dämpfung 1) */
  /* Glas für alles, was über dem Inhalt schwebt (Menü, Hinweis) */
  --glass: color-mix(in srgb, var(--surface) 82%, transparent);
  --glass-fx: blur(22px) saturate(180%);
  --field: #FFFFFF;
  --glass-edge: inset 0 0 0 1px rgba(255, 255, 255, .55), inset 1px 1px 0 rgba(255, 255, 255, .9);
  --toast: rgba(29, 29, 31, .92); --toast-ink: #F5F5F7;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI Variable Text", "Segoe UI", Roboto, sans-serif;
  /* Schriftgrößen im Tagesordnungs-Container: genau vier */
  --fs-day: 1.25rem;    /* 20 px Tageskopf */
  --fs-l: 1.0625rem;    /* 17 px Titel, Blockkopf, Zeit, Nummer */
  --fs-m: 0.875rem;     /* 14 px Meta, deutsche Zeile, Notizen */
  --fs-s: 0.8125rem;    /* 13 px Chips, Zähler, Stempel, Jetzt */
  --spur: 72px; --gap: 12px; --gutter: 28px; --sticky: 64px; --panel: 440px; --content: 1320px;
  color-scheme: light dark;
}
@media (max-width: 1359px) { :root { --panel: 360px; --content: 1240px; } }   /* ab 1360 px: Liste 800 + Panel 440, mittig */
@media (max-width: 767px) { :root { --spur: 52px; --gap: 8px; --gutter: 16px; --sticky: 56px; } }
/* Dunkel: folgt dem System, außer im Menü ist „Hell“ gewählt; die Wahl „Dunkel“ gilt immer (data-theme aus
   assets/theme.js, vor dem ersten Zeichnen). Beide Blöcke müssen gleich bleiben. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --tint: #7D9CF5;
    --mark: #23836B; --mark-ink: #FFFFFF;
    --tone-beobachten: #6B7586; --tone-redezeit: #B8590D; --tone-gast: #8C5AD2;
    --now: #FF453A; --on-now: #000000;
    --bg: #000000; --sidebar: #161618; --surface: #1C1C1E;
    --label: #F5F5F7; --label2: #A1A1A6; --past: #B4B4B9;
    --sep: rgba(84, 84, 88, .55); --fill: rgba(118, 118, 128, .24); --chip: #2C2C2E;
    --sel-ink: #AFC2FA; --seg-on: #636366; --on-tint: #0A0A12; --ph: var(--label2);
    --shadow-pop: 0 14px 34px -10px rgba(0, 0, 0, .7), 0 0 0 1px var(--sep);
    --glass: color-mix(in srgb, #2C2C2E 78%, transparent); --field: #2C2C2E;
    --glass-edge: inset 0 0 0 1px rgba(255, 255, 255, .1), inset 1px 1px 0 rgba(255, 255, 255, .28);
    --toast: rgba(58, 58, 60, .94);
  }
}
:root[data-theme="dark"] {
  --tint: #7D9CF5;
  --mark: #23836B; --mark-ink: #FFFFFF;
  --tone-beobachten: #6B7586; --tone-redezeit: #B8590D; --tone-gast: #8C5AD2;
  --now: #FF453A; --on-now: #000000;
  --bg: #000000; --sidebar: #161618; --surface: #1C1C1E;
  --label: #F5F5F7; --label2: #A1A1A6; --past: #B4B4B9;
  --sep: rgba(84, 84, 88, .55); --fill: rgba(118, 118, 128, .24); --chip: #2C2C2E;
  --sel-ink: #AFC2FA; --seg-on: #636366; --on-tint: #0A0A12; --ph: var(--label2);
  --shadow-pop: 0 14px 34px -10px rgba(0, 0, 0, .7), 0 0 0 1px var(--sep);
  --glass: color-mix(in srgb, #2C2C2E 78%, transparent); --field: #2C2C2E;
  --glass-edge: inset 0 0 0 1px rgba(255, 255, 255, .1), inset 1px 1px 0 rgba(255, 255, 255, .28);
  --toast: rgba(58, 58, 60, .94);
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
@media (prefers-contrast: more) { :root { --label2: #4A4A50; --sep: rgba(60, 60, 67, .4); --fill: rgba(118, 118, 128, .2); } }
@media (prefers-contrast: more) and (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --label2: #C7C7CC; --sep: rgba(200, 200, 210, .5); --fill: rgba(160, 160, 170, .28); } }
@media (prefers-contrast: more) { :root[data-theme="dark"] { --label2: #C7C7CC; --sep: rgba(200, 200, 210, .5); --fill: rgba(160, 160, 170, .28); } }
/* Dunkel: „Nächstes für uns“ hebt sich von der dunklen Seitenleiste ab */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 280ms; }   /* Wechsel hell/dunkel blendet weich über */

/* ---------- Grundlagen ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--sticky) + 8px); }
@media (max-width: 767px) { html { scroll-padding-top: calc(var(--sticky) + 56px); } }
body { margin: 0; background: var(--bg); color: var(--label); font: 400 1rem/1.4 var(--font); letter-spacing: -0.006em; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 600; line-height: 1.25; }
p { margin: 0; }
ol, ul { margin: 0; padding: 0; list-style: none; }
button, select, textarea, input { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
abbr[title] { text-decoration: none; }
a { color: var(--label); text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); text-underline-offset: 2px; }
a:hover { text-decoration-color: currentColor; }
::selection { background: color-mix(in srgb, var(--tint) 25%, transparent); }
:focus-visible { outline: 2px solid var(--label); outline-offset: 2px; }
[hidden] { display: none !important; }
.nw { white-space: nowrap; }   /* Zahl und Wort bleiben zusammen */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg { display: inline-block; vertical-align: middle; flex: none; }
kbd { font: 600 .8125rem/1 ui-monospace, "SF Mono", Menlo, monospace; padding: 3px 6px; border-radius: 5px; box-shadow: inset 0 0 0 1px var(--sep); }
.app { min-height: 100dvh; }

/* Sichtbarkeit nach Breite: Handy < 768, Laptop ≥ 768 (seit 16.10.2026 keine Seitenleiste mehr; ab 1360 px steht der Inhalt mittig) */
@media (max-width: 767px) { .desk { display: none !important; } }
@media (min-width: 768px) { .mob { display: none !important; } }

/* ---------- Bedienelemente (Klarsicht) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 12px;
  border: 0; border-radius: 10px; background: var(--fill); color: var(--tint); font-size: .8125rem; font-weight: 600; white-space: nowrap;
  transition: background-color 150ms ease-out, transform 120ms var(--ease);
}
.btn.quiet { background: transparent; font-weight: 500; padding: 0 8px; }
.btn-primary { background: var(--tint); color: var(--on-tint); }
.btn-block { width: 100%; min-height: 44px; font-size: .9375rem; }
.btn.small { min-height: 32px; padding: 0 10px; }
.btn[disabled], .btn[aria-busy="true"] { opacity: .4; cursor: default; }
.btn[aria-pressed="true"] { background: color-mix(in srgb, var(--tint) 11%, transparent); color: var(--sel-ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tint) 45%, transparent); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover:not([disabled]) { background: color-mix(in srgb, var(--tint) 11%, transparent); }
  .btn.quiet:hover:not([disabled]) { background: var(--fill); }
  .btn-primary:hover:not([disabled]) { background: color-mix(in srgb, var(--tint) 88%, #000); }
}
.btn:active:not([disabled]), .lbl:active, .seg .tab:active, .mi:active { transform: scale(.97); }   /* Rückmeldung schon beim Drücken */
.cnt { display: inline-block; min-width: 1.5em; padding: 1px 7px; border-radius: 999px; background: var(--fill); color: var(--label); font-weight: 600; font-variant-numeric: tabular-nums; text-align: center; line-height: 1.35; }
.btn[aria-pressed="true"] .cnt { background: var(--tint); color: var(--on-tint); }
.btn svg { flex: none; }
.btn[aria-pressed="true"] svg path { fill: currentColor; }   /* Mond gefüllt = dunkel an */
@media (max-width: 399px) { .btn .tt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }
.select { position: relative; display: inline-block; }
.select select {
  appearance: none; -webkit-appearance: none; height: 36px; max-width: 18rem; padding: 0 30px 0 12px; border: 0; border-radius: 9px;
  background: var(--fill); color: var(--label); font-size: .8125rem; font-weight: 500; cursor: pointer;
}
.select svg { position: absolute; right: 11px; top: 50%; margin-top: -3px; pointer-events: none; color: var(--label2); }
.select-wide { display: block; } .select-wide select { width: 100%; max-width: none; }
input[type="text"], input[type="password"], textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 0; border-radius: 11px; background: var(--field);
  box-shadow: inset 0 0 0 1px var(--sep); font-size: 1rem;   /* ≥ 16 px: iOS zoomt sonst beim Tippen */
}
input::placeholder, textarea::placeholder { color: var(--ph); }
textarea { resize: vertical; min-height: 88px; line-height: 1.4; }
.field { display: grid; gap: 6px; }
.field-label { font-size: .8125rem; font-weight: 600; color: var(--label2); }
.field-hint { font-size: .8125rem; color: var(--label2); line-height: 1.4; }
.field-error { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--chip); color: var(--label); font-size: .875rem; font-weight: 500; }
.field-error::before { content: "Fehler: "; font-weight: 600; }

/* Segmentschalter: grauer Trog, das gewählte Segment liegt erhaben darauf und gleitet mit (app.js) */
.seg { position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; padding: 2px; border-radius: 12px; background: var(--fill); }
.seg .tab {
  position: relative; z-index: 1; min-width: 44px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent;
  color: var(--label); font-size: .9375rem; font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums;
  transition: transform 120ms var(--ease);
}
.seg .tab[aria-current="page"] { font-weight: 600; }
.seg .tab .cnt { margin-left: 2px; padding: 0 5px; background: transparent; color: var(--past); font-size: .8125rem; font-weight: 500; }   /* ≥ 4,5:1 auch auf dem grauen Trog */
.seg .tab[aria-current="page"] .cnt { color: var(--label); font-weight: 600; }
.seg-thumb { position: absolute; z-index: 0; left: 0; top: 2px; bottom: 2px; border-radius: 10px; background: var(--seg-on); box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 0 0 .5px rgba(0, 0, 0, .04); pointer-events: none; will-change: transform; }
.seg-thumb.go { transition: transform 300ms var(--ease); }
@media (hover: hover) and (pointer: fine) { .seg .tab:not([aria-current="page"]):hover { background: color-mix(in srgb, var(--fill) 70%, transparent); } }
.seg:not(.has-thumb) .tab[aria-current="page"] { background: var(--seg-on); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }

/* ---------- Anmeldung ---------- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 32px 16px; }
.login-form { width: 100%; max-width: 380px; display: grid; gap: 16px; padding: 32px 28px 28px; border-radius: 20px; background: var(--surface); box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 18px 40px -24px rgba(0, 0, 0, .25); }
.login-icon { justify-self: center; width: 64px; height: 64px; border-radius: 15px; }
.login-title { text-align: center; font-size: 1.625rem; font-weight: 700; letter-spacing: -0.02em; }
.login-sub { margin-top: -8px; text-align: center; color: var(--label2); font-size: .9375rem; line-height: 1.4; }
.login .group { display: grid; gap: 12px; }

/* ---------- Rahmen: Seitenleiste und Inhalt ---------- */
.shell { display: flex; min-height: 100dvh; }
.side-h { padding: 0 10px; font-size: .8125rem; font-weight: 600; color: var(--label2); }   /* kleine Überschrift im Panel („Markiert an diesem Tag“) und in der Tagesleiste */
.content { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.content > * { width: 100%; max-width: var(--content); margin-left: auto; margin-right: auto; padding-left: var(--gutter); padding-right: var(--gutter); }

.skip-link { position: absolute; left: 16px; top: -4rem; z-index: 60; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 10px; background: var(--label); color: var(--surface); font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 8px; }

/* ---------- Kopf ---------- */
.top { position: relative; padding-top: 26px; padding-bottom: 12px; }
.top-row { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 16px; }
.titles { min-width: 0; }
h1.big { font-size: 2.125rem; line-height: 1.12; font-weight: 700; letter-spacing: -0.022em; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-icon { flex: none; width: 36px; height: 36px; border-radius: 8px; }
/* Woche im Untertitel ist der Umschalter: sichtbar Text + Pfeil, darüber ein durchsichtiges natives select (Systemliste, Tastatur, Vorlesen) */
.weekline { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.wk-pick { position: relative; display: inline-flex; align-items: center; gap: 6px; margin: -2px -6px; padding: 2px 6px; border-radius: 8px; }
.wk-pick #brand-week { color: var(--label); font-weight: 500; }
.wk-c { display: inline-flex; color: var(--label2); }
.wk-pick select { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; border: 0; opacity: 0; cursor: pointer; font: inherit; -webkit-appearance: none; appearance: none; }
.wk-pick:focus-within { outline: 2px solid var(--label); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .wk-pick:hover { background: var(--fill); } }
@media (pointer: coarse) { .wk-pick select { inset: -8px -6px; width: auto; height: auto; } }   /* Trefferfläche 44 px ohne Layoutverschiebung */
.wk-arch { display: inline-block; height: 22px; padding: 0 8px; border-radius: 6px; background: var(--chip); color: var(--label2); font-size: var(--fs-s); font-weight: 600; line-height: 22px; }
.sub { margin-top: 6px; font-size: .9375rem; color: var(--label2); }
.sub { min-height: 1.35em; }
.standline { margin-top: 4px; font-size: .8125rem; color: var(--label2); }
.standline { min-height: 1.35em; }
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 4px; }
@media (min-width: 1024px) { .top-row { flex-wrap: nowrap; } .titles { flex: 1 1 0; min-width: 0; } .tools { flex: none; } }   /* langer Stand schiebt die Werkzeuge nicht in eine zweite Zeile */
@media (max-width: 767px) {
  .top { padding-top: 18px; padding-bottom: 10px; }
  h1.big { font-size: 1.5rem; }
  .brand { gap: 10px; }
  .brand-icon { width: 30px; height: 30px; border-radius: 7px; }
  .wk-pick { margin: 0; padding: 0; }
  .wk-pick select, .wk-c { display: none; }   /* Saal: Woche wählt man im Menü */
  .wk-pick #brand-week { color: inherit; font-weight: inherit; }
  .standline { display: none; }
  .tools .btn { min-height: 44px; min-width: 44px; }
}

/* Menü: schwebendes Glas am Knopf, wächst aus der Ecke des Knopfs */
.pop { position: absolute; z-index: 40; padding: 6px; border-radius: 14px; background: var(--glass); -webkit-backdrop-filter: var(--glass-fx); backdrop-filter: var(--glass-fx); box-shadow: var(--glass-edge), var(--shadow-pop); transform-origin: top right; animation: pop-in 180ms var(--ease); }
@keyframes pop-in { from { opacity: 0; transform: scale(.94) translateY(-4px); } }
.menu { width: min(320px, calc(100vw - 16px)); display: flex; flex-direction: column; gap: 2px; }   /* Lage setzt app.js am Knopf */
.menu-sec { display: flex; flex-direction: column; gap: 6px; padding: 8px 4px 4px; }
.menu-h { padding: 0 6px; font-size: .8125rem; font-weight: 600; color: var(--label2); }
.seg-full { display: grid; width: 100%; }
.seg-full .tab { min-width: 0; padding: 0 4px; font-size: .8125rem; }
.seg .tab[aria-pressed="true"] { background: var(--seg-on); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); font-weight: 600; }
.menu-me { padding: 8px 10px 10px; font-size: .8125rem; color: var(--label2); }
.menu-me strong { color: var(--label); }
.menu .select { margin: 0 4px 6px; }
.menu hr { margin: 4px 10px; border: 0; border-top: 1px solid var(--sep); }
.mi { display: flex; align-items: center; gap: 6px; width: 100%; min-height: 44px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent; text-align: left; font-size: .9375rem; color: var(--label); transition: background-color 120ms ease-out, transform 120ms var(--ease); }
.mi:hover:not([disabled]) { background: var(--fill); }
.mi[disabled] { opacity: .4; cursor: default; }
.menu-sub { font-size: .8125rem; color: var(--label2); }

.help { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px 16px; margin-bottom: 12px; }
.help > div { flex: 1 1 32rem; max-width: 72ch; padding: 14px 16px; border-radius: 14px; background: var(--surface); font-size: .875rem; line-height: 1.5; }
.help p + p { margin-top: 8px; }

/* ---------- Tagesleiste (klebend, deckend) ---------- */
.tabs { position: sticky; top: 0; z-index: 10; height: var(--sticky); background: var(--bg); }
.tabs::after { content: ""; position: absolute; left: var(--gutter); right: var(--gutter); bottom: 0; height: 1px; background: var(--sep); }
.tabs-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 100%; }
.tabs-nav { min-width: 0; }
.tabs-act { display: flex; align-items: center; gap: 8px; }
.tabs-nfu { display: none; min-width: 0; }
.j-l { display: none; }
@media (min-width: 1024px) {
  /* Leiste im Spaltenraster des Inhalts: Tage links, Filter und „Jetzt“ an der Listenkante, „Nächstes für uns“ deckungsgleich mit dem Panel */
  .tabs-row { display: grid; grid-template-columns: minmax(0, 1fr) var(--panel); column-gap: 24px; }
  .tabs-nav { grid-column: 1; grid-row: 1; justify-self: start; }
  .tabs-act { grid-column: 1; grid-row: 1; justify-self: end; }
  .tabs-nfu:not([hidden]) { display: block; grid-column: 2; grid-row: 1; }
  .tabs-row:has(> .tabs-nfu[hidden]) > .tabs-act { grid-column: 1 / -1; }   /* ohne „Nächstes für uns“ (Vorbereitung, Archiv) rechts außen */
  .tabs-nfu .nfu-main { min-height: 48px; padding: 5px 12px; }
  .tabs-nfu .nfu-l1 { overflow: hidden; white-space: nowrap; }   /* Zeit und Grund bleiben ganz; gekürzt wird nur der Titel */
  .tabs-nfu .nfu-us { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (min-width: 1280px) { .j-s { display: none; } .j-l { display: inline; } }   /* „Jetzt · Abstimmungen bis 13:00“ */
@media (min-width: 1360px) { .tabs-nfu .nfu-us { position: static; width: auto; height: auto; overflow: visible; clip: auto; } }
.tabs .btn { min-height: 40px; }
@media (max-width: 767px) {
  .tabs-nav { flex: 1 1 auto; }
  .tabs-row .seg { display: grid; width: 100%; }
  .tabs-row .seg .tab { min-width: 0; padding: 0 2px; font-size: .875rem; }
  .tabs::after { left: 0; right: 0; }
}

/* Nächstes für uns: am Handy eine Zeile unter der Tagesleiste, am Laptop in der Seitenleiste */
.nfu { position: sticky; top: var(--sticky); z-index: 9; min-height: 56px; padding-top: 6px; padding-bottom: 6px; background: var(--bg); }
.nfu-wrap { display: flex; align-items: center; gap: 8px; }
[data-role="next-for-us"] { flex: 1 1 auto; min-width: 0; }
.nfu-main { display: block; width: 100%; min-height: 44px; padding: 4px 10px; border: 0; border-radius: 12px; background: var(--surface); text-align: left; font-size: .8125rem; line-height: 18px; color: var(--label); transition: transform 120ms var(--ease); }
.nfu-main:active { transform: scale(.985); }
.nfu-l1 { display: block; min-width: 0; }   /* Zeit und Grund entfallen nie per Auslassung */
.nfu-t { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; min-width: 0; }
.nfu-k { color: var(--label2); font-weight: 500; }
.nfu-t { font-size: .875rem; font-weight: 600; }
.nfu [data-role="label"], .tabs-nfu [data-role="label"] { height: 20px; padding: 0 8px; line-height: 20px; vertical-align: 1px; }
/* Saal: Zeile 1 bleibt einzeilig, auch mit langem Grund — „für uns“ nur ab 480 px sichtbar, „Nächstes:“ ab 400 px (Screenreader lesen beides) */
@media (max-width: 479px) { .nfu-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }
@media (max-width: 399px) { .nfu .nfu-lead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }
.nfu-n { color: var(--label2); font-variant-numeric: tabular-nums; }
.nfu .btn { flex: none; min-height: 44px; min-width: 56px; }
@media (hover: hover) and (pointer: fine) { .nfu-main:hover { background: color-mix(in srgb, var(--surface) 70%, var(--fill)); } }

.notice { margin-top: 12px; }
.notice-box { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 10px 14px; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--sep); font-size: .875rem; line-height: 1.45; }

/* ---------- Liste mit Detail daneben ---------- */
.layout { display: block; padding-bottom: 24px; }
[data-view="week"] .layout { padding-bottom: 8px; }
@media (min-width: 1024px) { .layout.with-panel { display: grid; grid-template-columns: minmax(0, 1fr) var(--panel); gap: 24px; align-items: start; } }
main { min-width: 0; }
main[aria-busy="true"] .sk { display: block; height: 14px; margin: 18px 0; border-radius: 7px; background: var(--fill); }

/* ---------- Tag ---------- */
[data-role="day"] { position: relative; }
.dh-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; margin: 20px 14px 8px 10px; }
[data-role="day-head"] { font-size: var(--fs-m); font-weight: 400; line-height: 1.3; color: var(--label2); letter-spacing: 0; }
[data-role="day-head"] .dvotes { white-space: nowrap; }   /* „Abstimmungen 12:00“ bricht nie vor der Uhrzeit */
@media (max-width: 767px) { .aday [data-role="day-head"] .sep-v { display: none; } .aday [data-role="day-head"] .dvotes { display: block; } }   /* Saal: Abstimmungszeit eigene Zeile, kein hängender Trenner */
[data-role="day-head"] .wd { font-size: var(--fs-day); font-weight: 700; color: var(--label); letter-spacing: -0.016em; }
.aday [data-role="day-head"] .wdc, .aday [data-role="day-head"] .dd { font-size: var(--fs-day); font-weight: 700; color: var(--label); letter-spacing: -0.016em; }
[data-role="day-note"] { font-size: var(--fs-s); color: var(--label2); }
@media (max-width: 767px) {
  .aday .dh-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 2px 12px; }
  .aday [data-role="day-head"] { grid-column: 1; grid-row: 1; }
  .aday .dcount { grid-column: 2; grid-row: 1; white-space: nowrap; }
  .aday [data-role="day-note"] { grid-column: 1 / -1; }
  .aday [data-role="day-head"] .sep:not(.sep-v) { display: none; }   /* Datum in Zeile 1, Zeiten in Zeile 2: kein hängender Punkt */
  .aday [data-role="day-head"] .dspan::before { content: ""; display: block; margin-top: 2px; }   /* Umbruch vor den Zeiten, Abstimmung bleibt in derselben Zeile */
}
.dcount { font-size: var(--fs-m); font-weight: 400; color: var(--label2); text-align: right; }
/* Eine weiße Fläche je Tag (gruppierte Liste); Blöcke darin durch Haarlinien getrennt */
.dcard { padding: 2px 0; border-radius: 14px; background: var(--surface); }

/* ---------- Blöcke ---------- */
[data-role="block"] { padding: 10px 14px 12px 10px; scroll-margin-top: calc(var(--sticky) + 56px); }
[data-role="block"] + [data-role="block"] { border-top: 1px solid var(--sep); }
.bh-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 8px; }
.bh-grid { display: grid; grid-template-columns: minmax(var(--spur), max-content) minmax(0, 1fr); column-gap: 0; }
[data-role="block-head"] { font-size: var(--fs-l); font-weight: 600; }
[data-role="block-time"] { grid-area: 1 / 1; padding-right: 6px; font-variant-numeric: tabular-nums; }
[data-role="block-time"] .t1 { display: block; font-size: var(--fs-l); font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
[data-role="block-time"] .t2 { display: block; font-size: var(--fs-m); font-weight: 400; line-height: 1.3; color: var(--label2); }
.bh-text { grid-area: 1 / 2; min-width: 0; padding-top: 2px; overflow-wrap: anywhere; font-size: var(--fs-m); font-weight: 400; line-height: 1.3; color: var(--label2); }
.bh-text .art { font-size: var(--fs-l); font-weight: 600; color: var(--label); letter-spacing: -0.01em; }
/* Abstimmungen heben sich ab: der ganze Block liegt auf leichtgrauer Fläche (Nutzerentscheid 14.10.2026), bis an die Kartenecken */
[data-role="block"][data-kind="votes"], .wgroup[data-kind="votes"] { background: var(--votes-bg); }
/* Die Fläche rückt 6 px vom Kartenrand ab (sonst verschwimmt sie mit dem Seitengrund); das Polster gleicht aus, Zeitspur und Titelkante bleiben */
.dcard > [data-role="block"][data-kind="votes"] { margin: 4px 6px; border-radius: 10px; padding-left: 4px; padding-right: 8px; }
.dcard > [data-role="block"][data-kind="votes"], .dcard > [data-role="block"][data-kind="votes"] + [data-role="block"] { border-top: 0; }
[data-kind="votes"] .stamp.next { background: var(--surface); }
.bh-btn { width: 100%; min-height: 44px; padding: 0; border: 0; border-radius: 10px; background: none; text-align: left; color: inherit; align-items: center; }
.bh-btn.bh-grid { grid-template-columns: minmax(var(--spur), max-content) minmax(0, 1fr); }
/* Tagesordnung: Blockkopf einzeilig und leise (Nutzerentscheid 14.10.2026) — Beginn 17/600 in der Spur, daneben „–Ende · Art · n Punkte“ in 14 px; der Titel bleibt das einzige große Element */
.bh-line { align-items: baseline; }
.bh-line .bh-text { display: block; overflow: hidden; padding-top: 0; }
/* Trenner ohne Hänger: jeder Abschnitt (Fließtext, Umbruch nur zwischen Abschnitten) zieht seinen „·“ in die Lücke davor; am Zeilenanfang liegt er links außerhalb und wird abgeschnitten */
.bh-line .hs { margin-left: -.9em; margin-right: .9em; white-space: nowrap; }
.bh-line .hs:last-child { margin-right: 0; }
.bh-line .hs:has(.art) { white-space: normal; }   /* lange Blockart („Aussprache (nach Abstimmung)“) bricht innen um statt abgeschnitten zu werden */
.bh-line .hs-t { font-size: 0; }   /* Trenner im Text (Vorlesen, A3), sichtbar ist nur der „·“ davor; bleibt Fließtext, damit keine eigene Kante entsteht */
.bh-line .hs::before { content: "·"; display: inline-block; width: .9em; text-align: center; color: var(--label2); }
.bh-line .bh-text .art { font-size: var(--fs-m); letter-spacing: 0; }
.bh-line .bh-text .t2 { font-variant-numeric: tabular-nums; }
/* Abstimmungsblock einklappbar: der ganze Kopf ist der Schalter, Pfeil rechts dreht sich wie an den Zeilen; Trefferfläche größer als die Zeile */
.bh-fold { margin: 0; }
.bh-tog { width: 100%; margin: -6px 0; padding: 6px 0; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
  grid-template-columns: minmax(var(--spur), max-content) minmax(0, 1fr) auto; }
.bh-tog .fold-c { grid-column: 3; grid-row: 1; align-self: center; display: block; width: 18px; height: 18px; margin-left: 10px; color: var(--label2); transition: transform 200ms var(--ease); }
.bh-tog .fold-c svg { display: block; width: 18px; height: 18px; }
.bh-tog[aria-expanded="true"] .fold-c { transform: rotate(90deg); }
@media (hover: hover) and (pointer: fine) { .bh-tog:hover .art, .bh-tog:hover .fold-c { color: var(--tint); } }
@media (max-width: 767px) { .bh-tog { margin: -11px 0; padding: 11px 0; } }
@media (prefers-reduced-motion: reduce) { .bh-tog .fold-c { transition: none; } }
.bh-btn [data-role="block-time"] { white-space: nowrap; }
.bh-btn [data-role="block-time"] .t1 { display: block; font-size: var(--fs-m); font-weight: 600; }
.bh-btn [data-role="block-time"] .t2 { display: block; font-size: var(--fs-m); line-height: 1.2; }   /* gleiche Form wie offen: Beginn über Ende */
.bh-btn [data-role="block-time"] .t1 { line-height: 1.2; }
.bh-btn .bh-text .art { font-size: var(--fs-m); }
.bh-btn .bh-text { padding-top: 0; }
.bh-btn .bh-text::after { content: " ›"; color: var(--label2); }
@media (hover: hover) and (pointer: fine) { .bh-btn:hover .art { color: var(--tint); } }
[data-role="block"]:has(> .bh-row > [data-role="block-head"] > .bh-btn) { padding-top: 6px; padding-bottom: 6px; }
[data-role="block"]:has(> .bh-row > [data-role="block-head"] > .bh-btn) .bh-row { align-items: center; min-height: 44px; }
/* Stempel als Wort in einer Pille: Läuft (Rot wie das Jetzt), Als Nächstes (neutral), Beendet (still) */
.stamp { display: inline-flex; align-items: center; justify-content: center; text-align: center; height: 24px; margin-top: 1px; padding: 0 9px; border-radius: 7px; font-size: var(--fs-s); font-weight: 600; line-height: 1; white-space: nowrap; }
.stamp.current { background: var(--now); color: var(--on-now); }
.stamp.next { background: var(--chip); color: var(--label); }
.stamp.past { padding: 0 2px; color: var(--label2); font-weight: 500; }
[data-state="past"] [data-role="title"], [data-state="past"] .bh-text .art, [data-state="past"] [data-role="block-time"] .t1 { color: var(--past); }
@media (max-width: 767px) { [data-role="block-time"] .t2, .bh-text { color: var(--past); } }
[data-state="past"] [data-role="meta"], [data-state="past"] [data-role="title-de"], [data-state="past"] [data-role="num"] { color: var(--label2); }

/* Jetzt: rote Linie über die volle Breite, die Uhrzeit in einer Pille (wie im Kalender) */
[data-role="now"] { position: relative; display: flex; align-items: center; min-height: 26px; margin: 2px 0; padding: 0 14px 0 10px; }
[data-role="now"]::after { content: ""; flex: 1 1 auto; height: 3px; border-radius: 2px; background: var(--now); }
.now-t { flex: none; display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 13px; background: var(--now); color: var(--on-now); font-size: var(--fs-s); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
[data-role="now"] + [data-role="block"] { border-top: 0; }

/* Gruppenüberschrift (Gemeinsame Aussprache) */
[data-role="group-head"] { padding: 2px 0 6px var(--spur); font-size: var(--fs-m); font-weight: 600; line-height: 1.3; color: var(--label2); }

/* ---------- Punktzeile ---------- */
.items { margin-top: 8px; }
.items > li + li { margin-top: var(--gap); }
[data-role="item"] {
  display: grid; grid-template-columns: var(--spur) minmax(0, 1fr) auto; grid-template-areas: "num title office" "num de office" "num meta office";
  align-items: start; min-height: 48px; margin: 0 -6px 0 -4px; padding: 0 6px 0 4px; border-left: 0; border-radius: 10px; cursor: pointer;
  background: transparent; box-shadow: none; transition: background-color 150ms ease-out, transform 120ms var(--ease);
}
[data-tone="beobachten"] { --mk: var(--tone-beobachten); }
[data-tone="redezeit"] { --mk: var(--tone-redezeit); }
[data-tone="abstimmung"] { --mk: var(--tone-abstimmung); }
[data-tone="gast"] { --mk: var(--tone-gast); }
[data-role="item"][data-marked] { border-left: 4px solid var(--mk, var(--mark)); padding-left: 0; border-top-left-radius: 3px; border-bottom-left-radius: 3px; }   /* gerader Balken wie im Kalender */
/* Zeigen und Öffnen ohne Fläche (Regelkatalog D3): der Titel nimmt die Bedienfarbe an, das Caret dreht sich */
@media (hover: hover) and (pointer: fine) { [data-role="item"]:hover [data-role="title"] { color: var(--tint); } }
[data-role="item"]:active { transform: scale(.992); }
[data-role="item"][aria-expanded="true"] [data-role="title"] { text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--sep); text-underline-offset: 3px; }
[data-role="item"][aria-expanded="true"] [data-role="caret"] { color: var(--label); }
[data-role="item"]:focus-visible { outline-offset: 0; }
[data-role="num"] { grid-area: num; padding-right: 14px; text-align: right; font-size: var(--fs-l); font-weight: 400; line-height: 1.3; color: var(--label2); font-variant-numeric: tabular-nums; }
[data-role="title"] {
  grid-area: title; max-width: 68ch; font-size: var(--fs-l); font-weight: 600; line-height: 1.25; letter-spacing: -0.012em; overflow-wrap: anywhere; text-wrap: pretty;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
[data-marked] [data-role="title"] { display: block; -webkit-line-clamp: unset; overflow: visible; }
[data-role="title-de"] { grid-area: de; max-width: 58ch; margin-top: 1px; font-size: var(--fs-m); font-weight: 400; line-height: 1.25; color: var(--label2); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
[data-role="meta"] { grid-area: meta; max-width: 58ch; min-height: 1.25em; margin-top: 1px; font-size: var(--fs-m); font-weight: 400; line-height: 1.25; color: var(--label2); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 767px) {
  [data-role="item"][data-marked] { grid-template-columns: var(--spur) minmax(0, 1fr); grid-template-areas: "num office" "num title" "num meta"; }
  [data-role="item"][data-marked] [data-role="office"] { justify-content: flex-start; height: 22px; padding-left: 0; margin-bottom: 3px; }
  [data-role="item"][data-marked] [data-role="num"] { padding-top: 25px; }
  [data-marked] [data-role="title"] { display: -webkit-box; -webkit-line-clamp: 3; overflow: hidden; }   /* Saal: höchstens drei Zeilen, das Detail zeigt den ganzen Titel */
  [data-role="item"][data-marked] [data-role="caret"] { margin-left: auto; }
}
.li.sib [data-role="title"], .li.sib [data-role="title-de"], .li.sib [data-role="meta"] { margin-left: 14px; }
[data-role="office"] { grid-area: office; display: flex; align-items: center; justify-content: flex-end; gap: 8px; height: 24px; padding-left: 12px; }
[data-role="label"] { display: inline-block; height: 22px; padding: 0 8px; border-radius: 6px; background: var(--mk, var(--mark)); color: var(--mark-ink); font-size: var(--fs-s); font-weight: 500; line-height: 22px; white-space: nowrap; letter-spacing: 0; }
[data-role="note-count"] { display: inline-flex; align-items: center; gap: 3px; font-size: var(--fs-m); font-weight: 400; line-height: 22px; color: var(--label2); font-variant-numeric: tabular-nums; }
[data-role="note-count"] svg { width: 15px; height: 15px; }
/* Plenary Notes: umrandete Pille „PN“ — sichtbar auf weißer und grauer Fläche, klar getrennt von den gefüllten Grund-Chips */
[data-role="briefing-badge"] { display: inline-block; height: 22px; padding: 0 6px; border-radius: 6px; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--label2) 75%, transparent); font-size: var(--fs-m); font-weight: 400; line-height: 22px; color: var(--label2); letter-spacing: .02em; }   /* Schrift wie Meta (C2: ein fettes Element je Zeile) */
[data-role="caret"] { display: inline-flex; width: 18px; height: 18px; color: var(--label2); transition: transform 200ms var(--ease); }
[data-role="caret"] svg { width: 18px; height: 18px; }
[aria-expanded="true"] > [data-role="office"] > [data-role="caret"] { transform: rotate(90deg); }
li > [data-role="more"] { display: block; width: 100%; min-height: 44px; padding: 0 0 0 var(--spur); border: 0; border-radius: 10px; background: none; text-align: left; font-size: var(--fs-m); font-weight: 600; color: var(--tint); }
@media (hover: hover) and (pointer: fine) { li > [data-role="more"]:hover { background: var(--fill); } }

/* ---------- Detail ---------- */
[data-role="detail"].panel {
  position: sticky; top: calc(var(--sticky) + 12px); max-height: calc(100dvh - var(--sticky) - 24px); overflow: auto; overscroll-behavior: contain;
  margin-top: 22px; padding: 22px 24px 28px; border-radius: 18px; background: var(--surface);
}
[data-role="detail"].panel.enter > * { animation: detail-in 260ms var(--ease); }
@keyframes detail-in { from { opacity: 0; transform: translateX(14px); } }
[data-role="detail"].inline { margin: 8px 0 4px; padding: 4px 0 6px var(--spur); }
[data-role="detail"].inline.enter { animation: inline-in 220ms var(--ease); }
@keyframes inline-in { from { opacity: 0; transform: translateY(-6px); } }
.d-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.d-title { max-width: 72ch; font-size: 1.375rem; font-weight: 650; line-height: 1.2; letter-spacing: -0.018em; text-wrap: balance; }
.d-title:focus { outline: none; }
.d-title-inline { padding-top: 10px; font-size: var(--fs-m); font-weight: 400; line-height: 1.3; color: var(--label2); }
.d-de { margin-top: 6px; max-width: 72ch; font-size: .9375rem; line-height: 1.35; color: var(--label2); }
[data-role="detail"].inline .d-de { font-size: var(--fs-m); }
.d-pos { margin-top: 8px; font-size: .8125rem; color: var(--label2); }
.d-sec { margin-top: 22px; }
.d-sec > h3 { margin-bottom: 8px; font-size: .9375rem; font-weight: 600; letter-spacing: -0.01em; }
.d-sec > h5 { margin-bottom: 6px; font-size: var(--fs-m); font-weight: 600; }
.d-markline { margin-bottom: 10px; font-size: .875rem; font-weight: 500; }
[data-role="detail"].inline .d-markline { font-size: var(--fs-m); }
.labels { display: flex; flex-wrap: wrap; gap: 8px; }
.labels-g { margin-top: 14px; }
.lbl-g { margin-bottom: 8px; font-size: var(--fs-m); font-weight: 600; color: var(--label); }   /* Gruppenname über den Status-Knöpfen */
.labels-g .labels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }   /* Status als 2 × 2, auch im schmalen Panel */
@media (max-width: 767px) {   /* Saal: Gründe im Zweierraster, lange Namen brechen im Knopf um */
  .labels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .labels .lbl { padding: 6px 10px; white-space: normal; line-height: 1.2; }
}
.lbl {
  min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--fill); color: var(--label); font-size: .875rem; font-weight: 500;
  transition: background-color 150ms ease-out, transform 120ms var(--ease);
}
.lbl { min-width: 44px; }   /* auch „?“ der Redezeit bleibt ein volles Ziel */
.lbl[aria-pressed="true"] { background: var(--mk, var(--mark)); color: var(--mark-ink); font-weight: 600; }
@media (hover: hover) and (pointer: fine) { .lbl:hover:not([aria-pressed="true"]):not([disabled]) { background: color-mix(in srgb, var(--mk, var(--mark)) 14%, var(--fill)); } }
.lbl[aria-busy="true"] { opacity: .6; }
.lbl[disabled] { opacity: .4; cursor: default; }
@media (max-width: 767px), (pointer: coarse) { .lbl, .btn, .mi { min-height: 44px; } }
.b-empty { grid-column: 2; margin-top: 4px; padding-left: var(--spur); font-size: var(--fs-m); line-height: 1.3; color: var(--label2); }   /* leerer Block: sagt, warum */
.d-close { margin-top: 18px; }
.hint { margin-top: 8px; font-size: .8125rem; line-height: 1.4; color: var(--label2); }
[data-role="detail"].inline .hint { font-size: var(--fs-s); }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 14px 20px; max-width: 72ch; margin: 0; font-size: .875rem; line-height: 1.4; align-items: baseline; }
[data-role="detail"].inline .facts { font-size: var(--fs-m); }
.facts dt { color: var(--label2); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.facts a, [data-role="briefing"] a { padding-block: 3px; margin-block: -3px; }   /* Trefferfläche 24 px ohne höhere Zeile, 8 px Abstand */
@media (max-width: 767px) {
  .facts { grid-template-columns: minmax(0, 1fr); gap: 0; }   /* Saal: Bezeichnung über dem Wert, Links bekommen die volle Breite */
  .facts dt { margin-top: 10px; font-size: var(--fs-s); }
  .facts dt:first-child { margin-top: 0; }
  .facts a, [data-role="briefing"] a { display: inline-block; min-height: 44px; line-height: 44px; padding-block: 0; margin-block: 0; }
}
.docline { display: block; }
.docline + .docline { margin-top: 8px; }
.facts .row-btn { margin-top: 4px; margin-left: -8px; }
.notes > li + li { margin-top: 8px; }
[data-role="note"] { max-width: 72ch; padding: 10px 12px; border-radius: 12px; background: var(--fill); font-size: .875rem; line-height: 1.4; }
[data-role="detail"].inline [data-role="note"] { font-size: var(--fs-m); }
.note-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-bottom: 2px; }
[data-role="note-head"] { font-size: var(--fs-s); font-weight: 600; }
.note-top .b-none { font-size: var(--fs-s); }
.note-actions { display: inline-flex; gap: 8px; margin-left: auto; margin-right: -8px; }
@media (min-width: 768px) and (pointer: fine) { .note-actions .btn { min-height: 32px; } }
.note-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.nform { display: grid; gap: 8px; max-width: 72ch; margin-top: 12px; }
.nform label { font-size: .8125rem; font-weight: 600; color: var(--label2); }
.nform-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.nform-actions .btn:first-child { background: var(--tint); color: var(--on-tint); }
[data-role="briefing"] { max-width: 72ch; padding: 12px 14px; border-radius: 12px; background: var(--fill); font-size: .875rem; line-height: 1.45; }
[data-role="detail"].inline [data-role="briefing"] { font-size: var(--fs-m); }
[data-role="briefing"] p, [data-role="briefing"] li { margin: 0 0 8px; }
[data-role="briefing"] h3, [data-role="briefing"] h4 { margin: 12px 0 4px; font-size: inherit; }
[data-role="briefing"] ul, [data-role="briefing"] ol { margin-bottom: 8px; padding-left: 18px; list-style: disc; }
[data-role="briefing"] ol { list-style: decimal; }
[data-role="briefing"] table { margin: 0 0 8px; border-collapse: collapse; }
[data-role="briefing"] td, [data-role="briefing"] th { padding: 3px 6px; border: 1px solid var(--sep); text-align: left; vertical-align: top; }
.b-meta { margin-bottom: 8px; font-weight: 600; }
.b-none { font-size: .875rem; color: var(--label2); }
[data-role="detail"].inline .b-none { font-size: var(--fs-m); }
[data-role="detail"].panel:has(.panel-empty) { background: transparent; }
.panel-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 220px; padding: 0 12px; text-align: center; font-size: .8125rem; line-height: 1.45; color: var(--label2); }
.panel-empty strong { font-size: .9375rem; font-weight: 600; color: var(--label); }
.panel-nfu { margin-bottom: 4px; }
/* Leeres Panel: Index der markierten Punkte des Tags, Zeilen als weiße Kärtchen mit Balken im Ton des Grundes */
.pidx { margin: 8px 0 4px; }
.pidx ul { display: grid; gap: 8px; margin-top: 6px; }
.pidx .wline { position: relative; padding: 8px 12px 8px 20px; border-radius: 12px; background: var(--surface); }
.pidx .wline::before { content: ""; position: absolute; left: 8px; top: 9px; bottom: 9px; width: 4px; border-radius: 2px; background: var(--mk, var(--mark)); }
.pidx + .panel-empty { min-height: 0; padding-top: 18px; }   /* 1024–1359 px: „Nächstes für uns“ oben im leeren Panel, wie in der Seitenleiste */
.panel-nfu + .panel-empty { min-height: 0; padding-top: 18px; }

/* ---------- Woche: vier Tage, nur das Markierte ---------- */
[data-role="week-view"] { display: grid; grid-template-columns: 1fr; gap: 4px 16px; }
@media (min-width: 640px) { [data-role="week-view"] { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
@media (min-width: 1024px) { [data-role="week-view"] { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.wday { min-width: 0; }
/* Tageskopf: Wochentag und Zähler in einer Zeile, darunter Datum, Sitzungszeit und Abstimmung als eigene Zeilen */
.wday .dh-row { position: relative; display: block; margin: 14px 6px 10px 12px; }
.wday [data-role="day-head"] { flex: 1 1 auto; min-width: 0; }
.wday [data-role="day-head"] .wd { display: block; margin-bottom: 3px; padding-right: 8.5rem; }   /* Platz für den Zähler nur neben dem Wochentag */
.wday [data-role="day-head"] .wdc, .wday [data-role="day-head"] .sep-v { display: none; }   /* Komma und Trenner nur, wenn alles in einer Zeile steht */
.wday [data-role="day-head"] .dvotes { display: block; }
.wday .dcount { position: absolute; top: 0; right: 0; line-height: 1.4; padding-top: 5px;   /* Grundlinie wie der Wochentag */ text-align: right; white-space: nowrap; }
@media (min-width: 1024px) { .wday .dh-row { min-height: 76px; } }
.wday .dcard { padding: 2px 0; }
.wgroup { padding: 12px 16px 14px; }
.wgroup + .wgroup { border-top: 1px solid var(--sep); }
.dcard > .wgroup[data-kind="votes"] { margin: 4px 6px; border-radius: 10px; padding-left: 10px; padding-right: 10px; }
.dcard > .wgroup[data-kind="votes"], .dcard > .wgroup[data-kind="votes"] + .wgroup { border-top: 0; }
.wgroup .bh-row { grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 12px; }
/* Woche: jeder Blockkopf zweizeilig, Zeit über Art — gleiche Kanten und Höhen, nichts läuft unter Stempel oder Zähler */
.wgroup .bh-grid, .wgo .bh-grid { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.wgroup [data-role="block-time"] { display: block; padding-right: 0; margin-right: 0; white-space: nowrap; }
.wgroup [data-role="block-time"] .t1, .wgroup [data-role="block-time"] .t2 { display: inline; font-size: var(--fs-m); font-weight: 600; line-height: 1.4; color: var(--label); }
.wgroup .bh-text { display: block; padding-top: 0; line-height: 1.4; overflow-wrap: normal; }
.wgroup .bh-text .art { font-size: var(--fs-m); color: var(--past); font-weight: 500; }
.wgroup .stamp { height: 22px; }
.wgroup ol, .wgroup ul { margin-top: 10px; }
.wgroup li + li { margin-top: 12px; }
.wline {
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "wt lab" "ti ti"; align-items: center; gap: 4px 8px; width: 100%; min-height: 44px;
  padding: 2px 0 2px 12px; border: 0; border-radius: 0; background: transparent; text-align: left; font-size: var(--fs-m); color: var(--label);
  transition: background-color 150ms ease-out, transform 120ms var(--ease);
}
.wgroup li[data-marked] .wline { border-left: 4px solid var(--mk, var(--mark)); border-radius: 2px; padding-left: 12px; }
.wline-1 { grid-template-areas: "lab lab" "ti ti"; }   /* Einzelpunkt: kein Präfix, die Zeit steht im Kopf */
.wline.has-x { grid-template-areas: "wt lab" "ti ti" "wx wx"; }
.wline-1.has-x { grid-template-areas: "lab lab" "ti ti" "wx wx"; }
.wline .wx { grid-area: wx; font-size: var(--fs-s); line-height: 1.3; color: var(--label2); font-variant-numeric: tabular-nums; }   /* Gegenstück: „Abstimmung: Di 12:00 · Nr. 8“ */
.wline .wt { grid-area: wt; font-variant-numeric: tabular-nums; color: var(--label2); }
.wline [data-role="label"] { grid-area: lab; justify-self: start; }
.wline .ti { grid-area: ti; min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
@media (hover: hover) and (pointer: fine) { .wline:hover .ti { color: var(--tint); } }
.wline:active { transform: scale(.99); }
.wday [data-role="now"] { margin: 4px 0; padding-left: 12px; padding-right: 16px; }
.wgroup[data-state="past"] .ti, .wgroup[data-state="past"] [data-role="block-time"] .t1, .wgroup[data-state="past"] [data-role="block-time"] .t2 { color: var(--past); }
/* Deutsche Titel trennen (lange Komposita am Handy); englische nie (C6) */
[data-role="title"]:lang(de), .d-title:lang(de), .wline .ti:lang(de), .nfu-tt:lang(de) {
  hyphens: auto; -webkit-hyphens: auto;
  hyphenate-limit-chars: 14 6 6; -webkit-hyphenate-limit-before: 6; -webkit-hyphenate-limit-after: 6;   /* nur lange Komposita trennen, nicht „Im-munität“ */
}
.wempty { padding: 14px 16px; font-size: .875rem; color: var(--label2); }
/* Woche ausklappen: Schalter über der Woche, je Karte unten „Alle n Punkte zeigen“; ausgeklappt alle Punkte als Einzeiler */
.wk-bar { grid-column: 1 / -1; display: flex; justify-content: flex-end; margin: 6px 0 -6px; }
.wk-all, .wmore { gap: 0; }
.wk-all .fold-c, .wmore .fold-c { display: inline-flex; width: 16px; height: 16px; margin-right: 6px; transition: transform 200ms var(--ease); }
.wk-all .fold-c svg, .wmore .fold-c svg { width: 16px; height: 16px; }
.wk-all[aria-expanded="true"] .fold-c, .wmore[aria-expanded="true"] .fold-c { transform: rotate(90deg); }
.wmore { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 10px 16px; border: 0; border-top: 1px solid var(--sep); border-radius: 0 0 14px 14px; background: none; color: var(--tint); font: inherit; font-size: var(--fs-m); font-weight: 600; text-align: left; cursor: pointer; }
.dcard > .wmore:first-child { border-top: 0; border-radius: 14px; }
@media (hover: hover) and (pointer: fine) { .wmore:hover { background: var(--fill); } }
@media (prefers-reduced-motion: reduce) { .wk-all .fold-c, .wmore .fold-c { transition: none; } }
.wl-plain { grid-template-columns: 10px minmax(0, 1fr) auto; grid-template-areas: "wt ti pn"; align-items: baseline; min-height: 0; padding: 3px 0; column-gap: 6px; }   /* Nummer in der Spur des Balkens: Titel auf derselben Kante wie markierte Zeilen */
.wl-plain .wt { justify-self: end; white-space: nowrap; }
.wl-plain .ti { font-weight: 500; }
.wl-plain [data-role="briefing-badge"] { grid-area: pn; margin-left: 4px; height: 20px; line-height: 20px; }
.wgroup li:has(> .wl-plain) + li, .wgroup li + li:has(> .wl-plain) { margin-top: 6px; }
.wnone { margin-top: 6px; font-size: var(--fs-m); color: var(--label2); }
@media (max-width: 767px) { .wl-plain { min-height: 40px; align-items: center; } }
/* Tag ohne Markierung: Blöcke als ruhige Kopfzeilen, ganze Zeile tippbar */
.wplain { padding: 0; }
.wgo { display: grid; width: 100%; min-height: 44px; padding: 11px 16px; border: 0; background: transparent; text-align: left; border-radius: 0; transition: background-color 150ms ease-out; }
.wgo { column-gap: 12px; }
.wgo .stamp { align-self: center; }
.wcnt { align-self: center; font-size: var(--fs-m); color: var(--label2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dcard > .wplain:first-child .wgo { border-radius: 14px 14px 0 0; }
.dcard > .wplain:last-child .wgo { border-radius: 0 0 14px 14px; }
.dcard > .wplain:only-child .wgo { border-radius: 14px; }
.dcard > .wplain[data-kind="votes"] { padding: 0; }
.dcard > .wplain[data-kind="votes"] .wgo { padding-left: 10px; padding-right: 10px; border-radius: 10px; }
@media (hover: hover) and (pointer: fine) { .wgo:hover { background: var(--fill); } .wgo:hover .art { color: var(--tint); } }
.wgo:active { background: var(--fill); }
.dcard > .wempty:only-child { padding: 14px 16px; }
.empty { margin-top: 22px; padding: 26px 24px; border-radius: 14px; background: var(--surface); max-width: 72ch; line-height: 1.45; }
.empty h2 { margin-bottom: 8px; font-size: var(--fs-l); }
.empty p { font-size: var(--fs-m); color: var(--label2); }
.empty p + p { margin-top: 12px; }

/* ---------- Hinweis (Toast) ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 50; transform: translateX(-50%); display: flex; align-items: center; gap: 12px;
  max-width: calc(100vw - 32px); padding: 10px 10px 10px 16px; border-radius: 14px; background: var(--toast); color: var(--toast-ink);
  -webkit-backdrop-filter: var(--glass-fx); backdrop-filter: var(--glass-fx); box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .45);
  font-size: .875rem; font-weight: 500; animation: toast-in 280ms var(--ease);
}
.toast:not(:has(.toast-action)) { padding-right: 16px; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 14px) scale(.98); } }
.toast.is-error::before { content: "Fehler: "; font-weight: 600; }
.toast-action { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px; border: 0; border-radius: 9px; background: rgba(255, 255, 255, .14); color: var(--toast-ink); font-weight: 600; }
.toast-action:hover { background: rgba(255, 255, 255, .2); }
.toast-key { color: inherit; box-shadow: inset 0 0 0 1px currentColor; }
@media (hover: none) { .toast-key { display: none; } }

/* ---------- Dialog ---------- */
.dialog { width: calc(100vw - 32px); max-width: 360px; padding: 0; border: 0; border-radius: 18px; background: var(--surface); color: var(--label); box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .45); }
.dialog[open] { animation: pop-in 200ms var(--ease); transform-origin: center; }
.dialog::backdrop { background: rgba(0, 0, 0, .32); }
.dialog-form { display: grid; gap: 14px; padding: 22px; }
.dialog-title { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.016em; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }

.colophon { margin-top: auto; padding-top: 12px; padding-bottom: 12px; font-size: .8125rem; line-height: 1.5; color: var(--label2); }
.colophon p { max-width: none; padding-top: 10px; border-top: 1px solid var(--sep); }
.colophon a { display: inline-block; min-height: 24px; line-height: 24px; color: inherit; }

/* ---------- Reduzierte Bewegung, Transparenz ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
  .btn:active, .lbl:active, .seg .tab:active, .mi:active, [data-role="item"]:active, .wline:active, .nfu-main:active { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .pop, .toast { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .toast { background: #1D1D1F; }
}
@media (prefers-contrast: more) { .pop { background: var(--surface); box-shadow: 0 0 0 1px var(--label2), var(--shadow-pop); } }

/* ---------- Druck: Wochen-Briefing ---------- */
.print { display: none; }
@media print {
  body { background: #fff; }
  body > *:not(#app), #app > *:not(.print) { display: none !important; }
  .print { display: block; font: 400 11pt/1.35 var(--font); color: #000; }
  .print h1 { font-size: 16pt; margin: 0 0 4pt; }
  .print h2 { font-size: 13pt; margin: 14pt 0 2pt; padding-bottom: 2pt; border-bottom: 1.5pt solid #000; }
  .print h3 { font-size: 11pt; margin: 8pt 0 2pt; }
  .print h2, .print h3 { break-after: avoid; }
  .print .pprov { font-weight: 600; }
  .print h3.pv { padding: 2pt 4pt; background: #EDEDED; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .print .pi { display: grid; grid-template-columns: 52pt 1fr; gap: 0 8pt; margin: 3pt 0; break-inside: avoid; }
  .print .pt { font-variant-numeric: tabular-nums; }
  .print .pl { font-weight: 700; }
  .print .pn { margin-left: 60pt; color: #222; }
  .print .pb { margin-left: 60pt; font-style: italic; }
  .print .pfoot { position: fixed; bottom: 0; left: 0; right: 0; padding-top: 2pt; border-top: 1pt solid #000; background: #fff; font-size: 9pt; }
  .print .pwrap { width: 100%; border-collapse: collapse; }
  .print .pwrap td { padding: 0; vertical-align: top; }
  .print .pspace { height: 24pt; }
}
