/* Notioneers App-Basis v1.24.1 – theme.css: daisyUI-Theme «notioneers» (Design: docs/design/HANDOVER.md, Werte: docs/design/basis.css).
   Läuft unter Weg A (CDN) und Weg B (Build) gleich: reines CSS, kein Tailwind-Processing.
   Overrides liegen in denselben Ebenen wie daisyUI (utilities.daisyui.l1…): Grundform in l1.l2.l3, Varianten in l1.l2, Hover in l1.
   So gewinnen Grössen (btn-sm), Varianten und Tailwind-Klassen in den Seiten weiterhin. */

@font-face { font-family: "TWK Lausanne"; font-weight: 300; font-display: swap; src: url("fonts/TWKLausanne-300.woff2") format("woff2"); }
@font-face { font-family: "TWK Lausanne"; font-weight: 400; font-display: swap; src: url("fonts/TWKLausanne-400.woff2") format("woff2"); }

[data-theme="notioneers"] {
  color-scheme: light;
  --color-base-100: #FFFFFF;
  --color-base-200: #F2F4F2;  /* halo: Seite, Hover */
  --color-base-300: #E3E6E3;  /* Rahmen */
  --color-base-content: #00340D;  /* depth */
  --color-primary: #00340D;
  --color-primary-content: #71F08D;  /* bloom */
  --color-secondary: #A0F5AE;  /* ease: Hero */
  --color-secondary-content: #00340D;
  --color-accent: #07DC5B;  /* pulse: nur Live-Indikator */
  --color-accent-content: #00340D;
  --color-neutral: #00340D;
  --color-neutral-content: #FFFFFF;
  --color-info: #0F5C75;
  --color-info-content: #FFFFFF;
  --color-success: #178A45;
  --color-success-content: #FFFFFF;
  --color-warning: #8C6A04;
  --color-warning-content: #FFFFFF;
  --color-error: #8E1A14;
  --color-error-content: #FFFFFF;
  --radius-selector: 9999px;
  --radius-field: 0.5rem;
  --radius-box: 0.75rem;
  --size-selector: 0.25rem;
  --size-field: 0.225rem;  /* Felder und Buttons 36 px (Beli v1.15.0: kompakter; vorher 44) */
  --border: 1px;
  --depth: 0;
  --noise: 0;
  --root-bg: var(--color-base-200);

  /* Zusätzliche Tokens (nicht daisyUI). Nur in Shell-Helfern als Tailwind-Klasse mit Variable (text-(--color-stone)); Seiten nehmen text-muted. */
  --color-mist: #DEECDC;      /* frei (Status «Aktiv» = ease-alt) */
  --color-divider: #ECEFEC;   /* Zeilen in Listen und Tabellen */
  --color-veil: #D1E2D1;      /* nur Icon-Flächen */
  --color-root: #405143;      /* Hinweise, Eyebrows, Tabellenkopf */
  --color-stone: #5E6B5F;     /* Zweittext, inaktive Navigation */
  --color-shade: #0B1E0F;     /* Hover Primär */
  --color-ease-alt: #E1FFE3;  /* Toast-Icon, Status «Aktiv» */
  --color-green-ui: #49B841;  /* Tab-Linie, Toggle an */
  --color-segment: #E9ECE9;   /* Segment-Fläche */
  --color-loader-line: #3FF68C; /* nur Linie im Notioneers-Loader */
  --color-aeris-light: #C1E2F1;  --color-aeris-label: #0F5C75;
  --color-nimbus-light: #DAD8FF; --color-nimbus-label: #3938C2;
  --color-muse-light: #F0D8FF;   --color-muse-label: #6A0DA5;
  --color-coral-light: #FFD2D2;  --color-coral-label: #8E1A14;
  --color-solea-light: #FFF4D0;  --color-solea-label: #8C6A04;
  --color-cove-light: #F5DBCB;   --color-cove-label: #7A2C08;
  /* Pastell-Mitteltöne (base, aus Invest): Farbpunkt, Kategorien, Diagramme */
  --color-aeris-base: #9ED8F0; --color-nimbus-base: #928EFF; --color-muse-base: #D7A0F0;
  --color-coral-base: #E8A7A9; --color-solea-base: #FDE49A; --color-rose-base: #F5C2D8;
  --color-dot-border: color-mix(in oklab, var(--color-base-content) 25%, transparent);
  --radius-sm: 0.375rem;   /* Buttons, Tags, Segment-Einträge */
  --radius-tile: 0.625rem; /* Kacheln mit eckiger Ecke unten links (App-Icon, Avatar, Listen-Icon) */
  --radius-hero: 1.25rem;  /* Hero, Dialog */
}

@layer base {
  [data-theme="notioneers"] {
    font-family: "TWK Lausanne", system-ui, -apple-system, "Helvetica Neue", sans-serif;
    font-weight: 300;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
  }
  [data-theme="notioneers"] body { font-size: 0.9375rem; }
  [data-theme="notioneers"] :where(h1, h2, h3, h4, h5, h6, b, strong) { font-weight: 400; }
  /* Lucide-Icons feiner (1.5 statt 2), passend zur Schrift 300 */
  [data-theme="notioneers"] svg[stroke="currentColor"] { stroke-width: 1.5; }
}

/* Mobil: Felder und Buttons 40 statt 36 px, überall gleich (Kopf und Inhalt, seit v1.22.2; vorher 48, Kopf 40).
   Schrift in Feldern 16 px (seit v1.23.0): unter 16 px zoomt iOS Safari beim Fokus die ganze Seite. Höhe bleibt 40. */
@media (max-width: 767px) {
  [data-theme="notioneers"] { --size-field: 0.25rem; }
  [data-theme="notioneers"] :is(.input, .select, .textarea, .file-input) { --font-size-min: 1rem; }
}

/* ── Grundform der Komponenten ── */
@layer utilities.daisyui.l1.l2.l3 {
  /* Buttons: weiss mit grauem Rahmen, Radius 6, Gewicht 400 */
  [data-theme="notioneers"] .btn {
    --radius-field: var(--radius-sm);
    --fontsize: 0.875rem;
    --btn-p: 0.875rem;
    font-weight: 400;
    text-shadow: none;
  }
  /* Nur gefüllte Buttons: daisyUI legt outline/ghost/… in dieselbe Ebene, darum ausnehmen */
  [data-theme="notioneers"] .btn:not(.btn-outline, .btn-dash, .btn-ghost, .btn-link, .btn-soft) {
    --btn-bg: var(--btn-color, var(--color-base-100));
    --btn-border: var(--btn-color, var(--color-base-300));
  }

  /* Felder: Rahmen grau, Fokus = Rahmen depth + Ring depth 10 % */
  [data-theme="notioneers"] :is(.input, .select, .textarea, .file-input) {
    --input-color: var(--color-base-300);
    --font-size-min: 0.9375rem;
    box-shadow: none;
  }
  [data-theme="notioneers"] :is(.input, .select, .textarea):is(:focus, :focus-within) {
    --input-color: var(--color-base-content);
    box-shadow: 0 0 0 3px color-mix(in oklab, var(--color-base-content) 10%, transparent);
    outline: none;
  }
  [data-theme="notioneers"] :is(.input, .textarea)::placeholder,
  [data-theme="notioneers"] .input input::placeholder { color: var(--color-stone); }
  [data-theme="notioneers"] .label { color: var(--color-base-content); font-size: 0.875rem; font-weight: 400; }
  /* Formular: Luft zwischen den Feldern, Legende als Abschnittstitel */
  [data-theme="notioneers"] .fieldset { font-size: 0.9375rem; gap: 0.5rem; }
  [data-theme="notioneers"] .fieldset > label.label { margin-top: 0.75rem; }
  /* Hilfe- und Fehlertext unter Feldern (p.label) bricht um; daisyUI setzt .label auf nowrap und macht die Seite mobil sonst zu breit. */
  [data-theme="notioneers"] p.label { white-space: normal; }
  [data-theme="notioneers"] .fieldset-legend { font-size: 1rem; font-weight: 400; padding-bottom: 0; }
  [data-theme="notioneers"] .checkbox { border-radius: 0.25rem; }
  [data-theme="notioneers"] .checkbox:not(:checked, :indeterminate) { --input-color: var(--color-base-300); }

  /* Toggle: Spur grau, an = grün, Knopf immer weiss */
  [data-theme="notioneers"] .toggle {
    --input-color: var(--color-base-300);
    background-color: var(--color-base-300);
    border-color: transparent;
    color: var(--color-base-100); /* Knopf = currentColor */
    box-shadow: none;
  }
  [data-theme="notioneers"] .toggle:before { box-shadow: none; }
  [data-theme="notioneers"] .toggle:focus-visible { outline-color: var(--color-base-content); }
  [data-theme="notioneers"] .toggle:is(:checked, [aria-checked="true"]) { background-color: var(--color-green-ui); --input-color: var(--color-green-ui); }

  /* Kbd: klein, weiss, Rahmen grau */
  [data-theme="notioneers"] .kbd {
    --size: 1.25rem;
    border: 1px solid var(--color-base-300);
    border-radius: var(--radius-sm);
    background-color: var(--color-base-100);
    color: var(--color-stone);
    font-size: 0.6875rem;
    box-shadow: none;
  }

  /* Sidebar-Navigation (menu): Eintrag 42 px, inaktiv stone, aktiv/hover halo + depth; Gruppen als Eyebrow */
  [data-theme="notioneers"] .menu {
    --menu-active-bg: var(--color-base-200);
    --menu-active-fg: var(--color-base-content);
    font-size: 0.9375rem;
  }
  [data-theme="notioneers"] .menu :where(li:not(.menu-title) > :is(a, button, summary)) {
    min-height: 2.625rem;
    align-content: center; /* daisyUI: flex-start, sonst klebt Icon + Text oben im 42-px-Eintrag */
    padding-inline: 0.75rem;
    gap: 0.625rem;
    color: var(--color-stone);
  }
  [data-theme="notioneers"] .menu :where(li:not(.menu-title) > :is(a, button, summary)):hover,
  [data-theme="notioneers"] .menu :where(li > .menu-active) {
    background-color: var(--color-base-200);
    color: var(--color-base-content);
  }
  [data-theme="notioneers"] .menu .menu-active { font-weight: 400; }
  [data-theme="notioneers"] .menu-title {
    padding: 1rem 0.75rem 0.375rem;
    font-size: 0.6875rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-root);
  }

  /* Breadcrumbs: 13 px root, Trenner «/» */
  [data-theme="notioneers"] .breadcrumbs { font-size: 0.8125rem; color: var(--color-root); }
  [data-theme="notioneers"] .breadcrumbs > ul > li + :before {
    content: "/";
    width: auto;
    height: auto;
    rotate: none;
    border: 0;
    margin-inline: 0.5rem;
  }

  /* Tabs (tabs-border, seit v1.21.0): anderer Inhalt der Funktion bzw. Abschnitte des Datensatzes. Im Seitenkopf liefert sie die Shell,
     die Linie des aktiven Tabs liegt auf der Unterkante des Kopfs. Handy 44 px / 16 px, ab md 40 px / 15 px. Icon nur ab md, Zähler .tab-count. */
  [data-theme="notioneers"] .tabs-border { gap: 1.5rem; }
  [data-theme="notioneers"] .tabs-border > .tab {
    --tab-p: 0.125rem;
    --tab-height: 2.75rem;
    --tab-border-color: transparent;
    gap: 0.5rem;
    font-size: 1rem;
  }
  @media (min-width: 768px) {
    [data-theme="notioneers"] .tabs-border > .tab { --tab-height: 2.5rem; font-size: 0.9375rem; }
  }
  [data-theme="notioneers"] .tabs-border > .tab:before { height: 2px; border-radius: 0; }
  [data-theme="notioneers"] .tabs-border .tab-count {
    border-radius: 999px;
    background-color: var(--color-base-200);
    padding-inline: 0.4375rem;
    font-size: 0.75rem;
    line-height: 1.25rem;
    font-variant-numeric: tabular-nums;
    color: var(--color-root);
  }

  /* Tab-Leiste Handy (dock, seit v1.18.2): Icons 24 px, Strich 1.75 (nur hier), inaktiv root,
     aktiv Pille mist hinter dem Icon, kein Strich unten. */
  [data-theme="notioneers"] .dock > * { color: var(--color-root); }
  [data-theme="notioneers"] .dock > .dock-active { color: var(--color-base-content); }
  [data-theme="notioneers"] .dock > .dock-active:after { display: none; }
  [data-theme="notioneers"] .dock > * > svg {
    box-sizing: content-box;
    padding: 0.25rem 1.125rem;
    border-radius: 999px;
    stroke-width: 1.75;
  }
  [data-theme="notioneers"] .dock > .dock-active > svg { background-color: var(--color-mist); }

  /* Segment-Eintrag: 36 px, aktiv neutral (Fläche bei den Varianten, l1.l2) */
  [data-theme="notioneers"] .tabs-box > .tab {
    --tab-height: 2.25rem;
    --tab-p: 1rem;
    border-radius: var(--radius-sm);
    color: var(--color-root);
  }

  /* Badge: Status-Grösse 28 px, 14 px/400; Tag/Typ-Tag stellen Höhe und Radius in der Shell um */
  [data-theme="notioneers"] .badge {
    --size: 1.75rem;
    padding-inline: 0.75rem;
    gap: 0.4375rem;
    font-size: 0.875rem;
    font-weight: 400;
    white-space: nowrap;
  }

  /* Karte: Rahmen grau, Titel 400 */
  [data-theme="notioneers"] .card-title { font-size: 1rem; font-weight: 400; }

  /* Tabelle: Kopf 12 px Versalien root, Zellen 18/24, Hairlines, Hover halo */
  [data-theme="notioneers"] .table { font-size: 0.9375rem; }
  [data-theme="notioneers"] .table :where(th, td) { padding: 1.125rem 1.5rem; }
  [data-theme="notioneers"] .table :where(thead) {
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-root);
  }
  [data-theme="notioneers"] .table :where(thead th) { padding-block: 1rem; font-weight: inherit; } /* Browser setzt th fett */
  [data-theme="notioneers"] .table :where(thead tr, tbody tr:not(:last-child)) { border-bottom-color: var(--color-divider); }
  [data-theme="notioneers"] .table :where(tbody tr):hover { background-color: var(--color-base-200); }

  /* Liste: Zeile ≥ 72 px, Hairline zwischen Zeilen */
  [data-theme="notioneers"] .list-row {
    min-height: 4.5rem;
    padding: 1rem 1.5rem;
    align-items: center;
    border-radius: 0;
  }
  [data-theme="notioneers"] .list > :not(:last-child).list-row:after { border-color: var(--color-divider); inset-inline: 0; }

  /* Kennzahl: Wert 30 px/400 tabular, Label 14 px root */
  [data-theme="notioneers"] .stat-title { font-size: 0.875rem; color: var(--color-root); }
  [data-theme="notioneers"] .stat-value { font-size: 1.875rem; font-weight: 400; font-variant-numeric: tabular-nums; }
  [data-theme="notioneers"] .stat-desc { font-size: 0.8125rem; color: var(--color-stone); }

  /* Alert: Radius 10, Icon oben links; neutral = weiss + Rahmen */
  [data-theme="notioneers"] .alert {
    border-radius: 0.625rem;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 1.125rem 1.25rem;
    font-size: 0.9375rem;
    --alert-border-color: var(--color-base-300);
    background-color: var(--alert-color, var(--color-base-100));
    box-shadow: none;
    background-image: none;
  }

  /* Dialog: Radius 20 */
  [data-theme="notioneers"] .modal-box { --radius-box: var(--radius-hero); box-shadow: none; }
}

/* ── Varianten ── */
@layer utilities.daisyui.l1.l2 {
  [data-theme="notioneers"] .btn-ghost { --btn-bg: transparent; --btn-border: transparent; }
  [data-theme="notioneers"] .btn-outline.btn-error { --btn-border: var(--color-coral-light); }
  [data-theme="notioneers"] .card-border { border-color: var(--color-base-300); }

  /* Segment (tabs-box): Fläche. Warum nötig: daisyUI hat keine Variante für grauen Hintergrund (Fläche base-200 = Seitenfarbe, verschwindet). Muss in l1.l2 stehen wie daisyUIs tabs-box, sonst gewinnt dessen base-200 (bis v1.23.4 kam #E9ECE9 darum nie an). Passt sich dem Hintergrund an (seit v1.23.5), Seiten tun nichts:
     auf der grauen Seite weisse Fläche mit Rahmen base-300, auf weiss (Karte, Dialog, bg-base-100) graue Fläche ohne Rahmen. */
  [data-theme="notioneers"] .tabs-box {
    background-color: var(--color-base-100);
    border: 1px solid var(--color-base-300);
    border-radius: 0.625rem;
    gap: 2px;
    box-shadow: none;
  }
  [data-theme="notioneers"] :is(.card, .modal-box, .bg-base-100) .tabs-box {
    background-color: var(--color-segment);
    border-color: transparent;
  }
  [data-theme="notioneers"] .input-ghost:is(:focus, :focus-within) { --input-color: transparent; background-color: transparent; box-shadow: none; }

  /* Inaktive Tabs: root statt daisyUI-50 %, damit sie klickbar wirken und nicht deaktiviert */
  [data-theme="notioneers"] :is(.tabs-border, .tabs-box) > .tab:not(.tab-active, [aria-selected="true"], [aria-current="page"], :checked, label:has(:checked)) {
    color: var(--color-root);
  }
  /* Aktiver Tab: Text depth, Linie green-ui (seit v1.22.0, vorher depth), Zähler mist */
  [data-theme="notioneers"] .tabs-border > .tab:is(.tab-active, [aria-selected="true"], [aria-current="page"]) {
    color: var(--color-base-content);
    font-weight: 400;
  }
  /* daisyUI zeichnet die Linie in currentColor (Fläche + border-top), darum hier am :before */
  [data-theme="notioneers"] .tabs-border > .tab:is(.tab-active, [aria-selected="true"], [aria-current="page"]):before {
    background-color: var(--color-green-ui);
    border-top-color: var(--color-green-ui);
  }
  [data-theme="notioneers"] .tabs-border > .tab:is(.tab-active, [aria-selected="true"]) .tab-count { background-color: var(--color-mist); }
  /* Aktives Segment: neutral */
  [data-theme="notioneers"] .tabs-box > .tab:is(.tab-active, [aria-selected="true"], [aria-current="page"], :checked) {
    --tab-bg: var(--color-neutral);
    color: var(--color-neutral-content);
    font-weight: 400;
    box-shadow: none;
  }
}

@layer utilities.daisyui.l1 {
  /* Inaktiver Tab beim Drüberfahren: Text depth (Linie nur beim aktiven) */
  [data-theme="notioneers"] .tabs-border > .tab:hover { color: var(--color-base-content); }

  /* Fokus per Tastatur: feiner Ring wie bei Feldern statt dickem Rahmen (z. B. Schliessen-Knopf beim Öffnen eines Dialogs) */
  [data-theme="notioneers"] .btn:focus-visible {
    outline: 2px solid color-mix(in oklab, var(--color-base-content) 25%, transparent);
    outline-offset: 2px;
  }
  [data-theme="notioneers"] .alert-soft { --alert-border-color: transparent; } /* daisyUI zeichnet sonst einen grauen Rand um die Farbfläche */
  [data-theme="notioneers"] .alert-soft.alert-info { background: var(--color-aeris-light); color: var(--color-aeris-label); }
  [data-theme="notioneers"] .alert-soft.alert-success { background: var(--color-ease-alt); color: var(--color-base-content); }
  [data-theme="notioneers"] .alert-soft.alert-warning { background: var(--color-solea-light); color: var(--color-solea-label); }
  [data-theme="notioneers"] .alert-soft.alert-error { background: var(--color-coral-light); color: var(--color-coral-label); }
  /* Stufen (steps) in den Farben des Status-Badges (STATUS_TONES), nicht die kräftigen daisyUI-Töne (Beli 2026-11-07: «wie der Status selbst») */
  [data-theme="notioneers"] .steps .step { --step-bg: var(--color-base-200); --step-fg: var(--color-stone); } /* kommende Stufen zurückhaltend, sonst wirkt Grau kräftiger als der helle Status */
  [data-theme="notioneers"] .steps .step:not([class*="step-"]) { color: var(--color-stone); }
  [data-theme="notioneers"] .steps .step-success + .step-success:before, [data-theme="notioneers"] .steps .step-success:after { --step-bg: var(--color-ease-alt); --step-fg: var(--color-base-content); }
  [data-theme="notioneers"] .steps .step-warning + .step-warning:before, [data-theme="notioneers"] .steps .step-warning:after { --step-bg: var(--color-solea-light); --step-fg: var(--color-solea-label); }
  [data-theme="notioneers"] .steps .step-error + .step-error:before, [data-theme="notioneers"] .steps .step-error:after { --step-bg: var(--color-coral-light); --step-fg: var(--color-coral-label); }
  [data-theme="notioneers"] .steps .step-info + .step-info:before, [data-theme="notioneers"] .steps .step-info:after { --step-bg: var(--color-aeris-light); --step-fg: var(--color-aeris-label); }

  /* Hover: Standard halo, Primär shade, Löschen coral-light */
  @media (hover: hover) {
    [data-theme="notioneers"] .btn:hover { --btn-bg: var(--btn-color, var(--color-base-200)); }
    [data-theme="notioneers"] .btn-primary:hover { --btn-bg: var(--color-shade); --btn-border: var(--color-shade); }
    [data-theme="notioneers"] .btn-ghost:hover { --btn-border: transparent; }
    [data-theme="notioneers"] .btn-outline.btn-error:hover { --btn-bg: var(--color-coral-light); --btn-border: var(--color-coral-light); --btn-fg: var(--color-error); color: var(--color-error); }
    /* Klickbare Karte: Rahmen dunkler, Fläche bleibt weiss. Warum nötig: Hover halo = Seitenfarbe, die Karte verschwand (Feedback Beli v1.24.4) */
    [data-theme="notioneers"] a.card:hover { border-color: var(--color-stone); }
  }
}

@layer utilities.daisyui.l1 {
  /* Button klein 30 px (mobil 33), volle Breite 52 px (Dialog, mobile Hauptaktion) */
  [data-theme="notioneers"] .btn-sm { --size: calc(var(--size-field) * 8.3334); --fontsize: 0.8125rem; --btn-p: 0.625rem; }
  [data-theme="notioneers"] .btn-block { --size: 3.25rem; --fontsize: 1rem; --radius-field: 0.75rem; }

  /* Listen-Zweizeiler: Titel + Untertitel, in Listen, Tabellen und Suche */
  .list-title { font-size: 1rem; font-weight: 400; line-height: 1.3; color: var(--color-base-content); }
  .list-sub { font-size: 0.8125rem; font-weight: 300; line-height: 1.3; color: var(--color-stone); margin-top: 2px; }

  /* Grauer Zweittext in Seiten (Zeitstempel, Hinweise, Zusätze). Einzige Zusatzfarbe, die Seiten direkt nutzen. */
  .text-muted { color: var(--color-stone); }
}

/* tag_select(): nicht gewählter Tag neutral und gestrichelt. Ohne Ebene, damit es die Farbklassen von tag() schlägt. */
[data-theme="notioneers"] .tag-select > .badge { cursor: pointer; }
[data-theme="notioneers"] .tag-select > input:not(:checked) + .badge {
  background-color: var(--color-base-100);
  border: 1px dashed var(--color-base-300);
  color: var(--color-stone);
}
[data-theme="notioneers"] .tag-select > input:not(:checked) + .badge:hover { border-color: var(--color-stone); }
[data-theme="notioneers"] .tag-select > input:focus-visible + .badge { outline: 2px solid var(--color-base-content); outline-offset: 2px; }

/* brand_loader(): Notioneers-N zeichnet sich selbst (Depth-Kachel, Linie, dann Bloom-Fläche). */
[data-theme="notioneers"] .brand-loader {
  display: grid;
  place-items: center;
  width: 6rem;
  height: 6rem;
  border-radius: 1rem 1rem 1rem 0;
  background: var(--color-primary);
}
[data-theme="notioneers"] .brand-loader svg { width: 5.125rem; height: 5.125rem; }
[data-theme="notioneers"] .brand-loader path {
  fill: var(--color-primary-content);
  stroke: var(--color-loader-line);
  stroke-width: 6;
  stroke-linejoin: round;
  stroke-linecap: round;
  stroke-dasharray: 1400;
  animation: brand-loader-draw 3.4s ease-in-out infinite;
}
@keyframes brand-loader-draw {
  0%   { stroke-dashoffset: 1400; fill-opacity: 0; opacity: 1; }
  38%  { stroke-dashoffset: 0;    fill-opacity: 0; }
  50%  { stroke-dashoffset: 0;    fill-opacity: 1; }
  90%  { stroke-dashoffset: 0;    fill-opacity: 1; opacity: 1; }
  100% { stroke-dashoffset: 0;    fill-opacity: 1; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  [data-theme="notioneers"] .brand-loader path { animation: none; fill-opacity: 1; stroke-dashoffset: 0; }
}

/* ── Laden (seit v1.23.0, Regeln: docs/laden-und-caching.md › 3, Styleguide «Feedback → Laden») ── */
/* Seitenwechsel ohne View Transition (seit v1.23.5): Safari bis 26.x hat Fehler bei Cross-Document-Übergängen (Seite reagierte auf dem iPad
   nicht mehr auf Tipps, Beli 2026-11-07; WebKit-Fixes erst in Safari 27). Wieder einschalten, wenn Safari 27 verbreitet ist:
   @view-transition { navigation: auto; }  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 150ms; } */

/* Ladebalken: 2 px oben in green-ui. assets/app.js setzt body.loading 300 ms nach dem Klick (schnelle Wechsel ohne Balken),
   er läuft bis 90 % und verschwindet mit der neuen Seite. */
.load-bar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  height: 2px;
  width: 0;
  background-color: var(--color-green-ui);
  opacity: 0;
  pointer-events: none;
  transition: width 8s cubic-bezier(0.1, 0.8, 0.2, 1), opacity 0.2s;
}
body.loading .load-bar { width: 90%; opacity: 1; }
body.loading { cursor: progress; }

/* thumb(): Bild in einer Box fester Grösse (nichts springt), grau bis das Bild da ist (kein Einblenden per JS, seit v1.23.3), Icon statt Bild bei Fehler. Radius wie tile(),
   Form und Grösse kommen als Tailwind-Klassen (darum in der daisyUI-Ebene, damit rounded-box u. Ä. gewinnen). */
@layer utilities.daisyui.l1.l2.l3 {
  [data-theme="notioneers"] .thumb {
    position: relative;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: var(--radius-tile);
    border-bottom-left-radius: 0;
    background-color: var(--color-base-200);
    color: var(--color-stone);
  }
  [data-theme="notioneers"] .thumb > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  [data-theme="notioneers"] .thumb > svg { opacity: 0; }
  [data-theme="notioneers"] .thumb.thumb-error > svg { opacity: 1; }
  [data-theme="notioneers"] .thumb.thumb-error > img { display: none; } /* Safari zeigt sonst sein «?» */
}

/* ── Toast nach einer Aktion (flash(), seit v1.24.0). Warum eigenes CSS: daisyUI hat für toast keine Animation.
   Einflug von oben mit leichtem Nachfedern, Haken springt rein, Zeitlinie unten läuft in 4 s ab (dann blendet app.js aus). */
.flash-toast { animation: flash-in 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.25) both; }
.flash-toast .flash-mark { animation: flash-pop 0.4s 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.4) both; }
.flash-toast .flash-mark path { stroke-width: 3; stroke-dasharray: 24; animation: flash-draw 0.35s 0.35s ease-out both; }
.flash-toast .flash-timer { transform-origin: left; animation: flash-timer 4s linear both; }
.flash-leave .flash-toast { animation: flash-out 0.2s ease-in both; }
@keyframes flash-in    { from { opacity: 0; transform: translateY(-16px) scale(0.96); } }
@keyframes flash-out   { to { opacity: 0; transform: translateY(-8px) scale(0.98); } }
@keyframes flash-pop   { from { transform: scale(0); } }
@keyframes flash-draw  { from { stroke-dashoffset: 24; } }
@keyframes flash-timer { to { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) {
  .flash-toast, .flash-toast .flash-mark, .flash-toast .flash-mark path, .flash-leave .flash-toast { animation: none; }
}

/* Desktop: Platz für die Scrollleiste immer reservieren, sonst rutscht der Inhalt zwischen kurzen und langen Seiten (Windows). */
@media (min-width: 768px) { html { scrollbar-gutter: stable; } }
/* Als App installiert: kein Gummiband am Seitenrand, das wirkt wie eine Webseite. */
@media (display-mode: standalone) { html { overscroll-behavior-y: none; } }
@media (prefers-reduced-motion: reduce) {
  .load-bar { transition: none; }
}
