/* needstobe UI – gemeinsame Grundschicht für Hub, Apps und Admin. Auf jedem Host unter /ui.css, vor /style.css laden.
   Vertrag und Bausteine: docs/UI.md. Alles liegt in Ebenen; App-CSS bleibt ungeschichtet und gewinnt damit immer.
   Bausteine benutzen nur Tokens, nie Rohfarben. Präfix nt-. Keine externen Quellen (CSP). */
@layer reset, base, ui;

/* ---------- Tokens: neutrale Vorgaben, jede App überschreibt die Theme-Werte in ihrem :root ---------- */
@layer base {
  :root {
    /* Theme (pro App) */
    --bg: #f1f0ec;            /* Seitengrund */
    --surface: #fff;          /* Felder, Blätter, Karten */
    --ink: #161616;           /* Haupttext */
    --ink-2: #6c6c66;         /* Nebentext, Labels */
    --ink-3: #a3a29b;         /* Platzhalter, inaktive Symbole */
    --line: #d8d7d0;          /* Trennlinien */
    --field-line: var(--line);/* Rand von Feldern und Sekundär-Buttons */
    --accent: #161616;        /* Primäraktion, aktiver Tab */
    --on-accent: #fff;
    --danger: #c8321e;
    --warn: #9a5a00;          /* Hinweis, kein Fehler */
    --press: color-mix(in srgb, var(--ink) 6%, transparent); /* Antipp-Fläche */
    --focus: var(--accent);
    --font: ui-sans-serif, -apple-system, system-ui, sans-serif;
    --font-size: 16px;
    --mark-1: var(--ink); --mark-2: var(--ink-2); --mark-3: var(--ink-3); --mark-4: var(--ink);
    /* Navigation (Vorgabe: wie die Seite) */
    --tabs-bg: var(--bg); --tabs-ink: var(--ink-3); --tabs-on: var(--accent); --tabs-line: var(--line);
    --tabs-on-bg: color-mix(in srgb, var(--ink) 7%, transparent);

    /* System (selten überschrieben) */
    --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-7: 32px; --s-8: 48px;
    --t-xs: 12px; --t-sm: 14px; --t-md: 1rem; --t-lg: 20px; --t-xl: 32px; --t-2xl: clamp(40px, 11vw, 56px);
    --title-weight: 600; --title-tracking: -.03em;
    --control: 48px;          /* Mindesthöhe von Feldern und Buttons */
    --target: 44px;           /* Mindest-Tippziel */
    --radius: 12px; --radius-sm: 8px; --radius-pill: 999px;
    --rule: 1px;              /* Linienstärke (notes: 1.5px) */
    --page: 640px; --page-wide: 1080px; --gutter: 20px; --sidebar: 240px;
    --ease-out: cubic-bezier(.23, 1, .32, 1); --ease-in-out: cubic-bezier(.77, 0, .175, 1); --ease-drawer: cubic-bezier(.32, .72, 0, 1);
    --dur-1: .12s; --dur-2: .2s; --dur-3: .32s;
  }
}

/* ---------- Reset ---------- */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; scrollbar-gutter: stable; interpolate-size: allow-keywords; }
  body { margin: 0; min-height: 100svh; }
  h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
  ul[class], ol[class] { list-style: none; margin: 0; padding: 0; }
  a { color: inherit; text-decoration: none; }
  button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
  button { cursor: pointer; margin: 0; padding: 0; border: 0; background: none; }
  img, svg, video { display: block; max-width: 100%; }
  fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
  legend { padding: 0; }
  summary { list-style: none; cursor: pointer; }
  summary::-webkit-details-marker { display: none; }
  [hidden] { display: none !important; }
}

/* ---------- Basis: Schrift, Browser-Flächen ---------- */
@layer base {
  html { background: var(--bg); color-scheme: light; }
  body { background: var(--bg); color: var(--ink); font: 400 var(--font-size)/1.4 var(--font); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
  ::selection { background: var(--ink); color: var(--bg); }
  :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
  input, textarea { caret-color: var(--accent); }
  strong, b { font-weight: 600; }
  html { scrollbar-color: color-mix(in srgb, var(--ink) 25%, transparent) transparent; }
  .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nt-i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

  /* Seitenwechsel: Gerüst. Die Choreografie (Keyframes je Typ next/prev/push/pop) gehört der App. */
  @view-transition { navigation: auto; }
  @media (prefers-reduced-motion: reduce) {
    ::view-transition-group(*) { animation: none !important; }
    ::view-transition-old(root) { animation: .14s ease both nt-fade-out !important; }
    ::view-transition-new(root) { animation: .2s ease both nt-fade-in !important; }
  }
  @keyframes nt-fade-out { to { opacity: 0; } }
  @keyframes nt-fade-in { from { opacity: 0; } }
  /* motion.js: .hold = Android-Übergang läuft noch */
  .hold *, .hold *::before, .hold *::after { animation-play-state: paused !important; }
}

@layer ui {
  /* ---------- Gerüst: Kopf, Navigation, Inhalt ----------
     <body class="nt-app [has-tabs]"><header class="nt-top">Marke · Werkzeuge</header><nav class="nt-tabs">…</nav><main class="nt-main [wide]">…</main>
     Handy: Tabs unten fest. Ab 960 px: Tabs als Seitenleiste links, Marke darüber. */
  .nt-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); max-width: var(--page); min-height: calc(60px + env(safe-area-inset-top)); margin: 0 auto; padding: calc(16px + env(safe-area-inset-top)) var(--gutter) 0; view-transition-name: nt-top; }
  .nt-brand { display: inline-flex; align-items: center; gap: 10px; min-height: var(--target); font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
  .nt-mark { display: grid; grid-template-columns: repeat(2, 8px); gap: 2px; transform: rotate(-12deg); }
  .nt-mark i { width: 8px; height: 8px; background: var(--mark-1); }
  .nt-mark i:nth-child(2) { background: var(--mark-2); }
  .nt-mark i:nth-child(3) { background: var(--mark-3); }
  .nt-mark i:nth-child(4) { background: var(--mark-4); }
  .nt-tools { display: flex; align-items: center; margin-right: -10px; }

  .nt-main { max-width: var(--page); margin: 0 auto; padding: var(--s-3) var(--gutter) calc(var(--s-8) + env(safe-area-inset-bottom)); display: grid; gap: var(--s-4); align-content: start; }
  .nt-main.wide { max-width: var(--page-wide); }
  .nt-top:has(+ .nt-main.wide, + .nt-tabs + .nt-main.wide) { max-width: var(--page-wide); }

  .nt-tabs { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; display: flex; padding: var(--s-1) var(--s-1) calc(var(--s-1) + env(safe-area-inset-bottom)); background: var(--tabs-bg); border-top: var(--rule) solid var(--tabs-line); view-transition-name: nt-tabs; }
  .nt-tab { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; padding: 6px 4px; color: var(--tabs-ink); font-size: var(--t-xs); font-weight: 600; transition: color var(--dur-2) ease; }
  .nt-tab .nt-i { width: 22px; height: 22px; transition: transform var(--dur-1) var(--ease-out); }
  .nt-tab:active .nt-i { transform: scale(.9); }
  .nt-tab[aria-current] { color: var(--tabs-on); }
  .has-tabs .nt-main { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }

  @media (min-width: 960px) {
    .has-tabs { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); grid-template-rows: auto 1fr; }
    .has-tabs .nt-top { grid-column: 1; grid-row: 1; max-width: none; min-height: 0; margin: 0; padding: 28px 24px 24px; }
    .has-tabs .nt-top .nt-tools { display: none; }
    .has-tabs .nt-tabs { grid-column: 1; grid-row: 2; position: sticky; top: 0; align-self: start; height: calc(100dvh - 92px); flex-direction: column; gap: 2px; padding: 0 12px 20px; background: none; border: 0; }
    .has-tabs .nt-tab { flex: none; flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 40px; padding: 0 12px; border-radius: var(--radius-sm); font-size: 15px; color: var(--ink-2); transition: color var(--dur-2) ease, background-color var(--dur-2) ease; }
    .has-tabs .nt-tab .nt-i { width: 20px; height: 20px; }
    .has-tabs .nt-tab[aria-current] { background: var(--tabs-on-bg); color: var(--ink); }
    .has-tabs .nt-main { grid-column: 2; grid-row: 1 / span 2; width: 100%; margin: 0; padding: 44px 48px 64px; }
    .has-tabs .nt-main.wide { max-width: calc(var(--page-wide) + 96px); }
    .has-tabs .nt-main:not(.wide) { max-width: calc(var(--page) + 96px); }
  }
  @media (min-width: 960px) and (hover: hover) and (pointer: fine) { .has-tabs .nt-tab:not([aria-current]):hover { background: var(--press); color: var(--ink); } }

  /* Zwei Spalten am Desktop (Liste mit Seitenleiste): <main class="nt-main wide nt-split"><div class="nt-side">…</div><div class="nt-flow">…</div></main>.
     Mobil: eine Spalte in Quellreihenfolge. */
  .nt-side, .nt-flow { display: grid; gap: var(--s-4); align-content: start; min-width: 0; }
  @media (max-width: 959px) { .nt-split > .nt-side, .nt-split > .nt-flow { display: contents; } }
  @media (min-width: 960px) {
    .nt-split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; }
    .nt-split > .nt-side { position: sticky; top: 24px; }
  }

  /* ---------- Layout-Primitives ---------- */
  .nt-stack { display: grid; gap: var(--gap, var(--s-3)); align-content: start; min-width: 0; }
  .nt-cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap, var(--s-2)); }
  .nt-repel { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); min-width: 0; }

  /* ---------- Kopf einer Seite: Zurück, Titel, Aktion ---------- */
  .nt-back { justify-self: start; display: inline-flex; align-items: center; gap: 4px; min-height: var(--target); margin-left: -6px; padding: 0 8px 0 2px; border-radius: var(--radius-sm); color: var(--ink-2); font-size: var(--t-md); font-weight: 500; transition: color var(--dur-2) ease; }
  .nt-back .nt-i { width: 20px; height: 20px; }
  @media (hover: hover) and (pointer: fine) { .nt-back:hover { color: var(--ink); } }
  .nt-head { display: grid; gap: var(--s-1); }
  .nt-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-3); }
  .nt-title { font-size: var(--t-xl); font-weight: var(--title-weight); line-height: 1.08; letter-spacing: var(--title-tracking); overflow-wrap: anywhere; text-wrap: balance; }
  .nt-title.big { font-size: var(--t-2xl); line-height: 1; }
  .nt-sub { color: var(--ink-2); font-size: 15px; }

  /* ---------- Abschnitt ---------- */
  .nt-section { display: grid; gap: var(--s-2); min-width: 0; }
  .nt-section + .nt-section { margin-top: var(--s-4); }
  .nt-section-h { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); min-height: 28px; font-size: var(--t-sm); font-weight: 600; color: var(--ink-2); }
  .nt-section-h .nt-icon-btn { margin: -8px -10px -8px 0; }

  /* ---------- Buttons ---------- */
  .nt-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: var(--control); padding: 0 var(--s-5); border: var(--rule) solid transparent; border-radius: var(--radius); background: none; color: var(--ink); font-size: var(--t-md); font-weight: 600; line-height: 1.2; text-align: center; white-space: nowrap; transition: transform var(--dur-1) var(--ease-out), background-color var(--dur-2) ease, border-color var(--dur-2) ease, color var(--dur-2) ease; }
  .nt-btn:active { transform: scale(.98); }
  .nt-btn:disabled, .nt-btn[aria-disabled="true"] { opacity: .5; cursor: default; transform: none; }
  .nt-btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
  .nt-btn.secondary { border-color: var(--field-line); }
  .nt-btn.quiet { padding: 0 var(--s-3); color: var(--ink-2); }
  .nt-btn.danger { border-color: color-mix(in srgb, var(--danger) 40%, transparent); color: var(--danger); }
  .nt-btn.small { min-height: 36px; padding: 0 var(--s-3); border-radius: var(--radius-sm); font-size: 15px; }
  .nt-btn.block { width: 100%; }
  @media (hover: hover) and (pointer: fine) {
    .nt-btn.secondary:hover { border-color: var(--ink); }
    .nt-btn.quiet:hover { color: var(--ink); }
    .nt-btn.danger:hover { background: color-mix(in srgb, var(--danger) 8%, transparent); }
    .nt-btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--ink)); }
  }
  .nt-btn.danger:active { background: color-mix(in srgb, var(--danger) 10%, transparent); }
  .nt-icon-btn { display: inline-grid; place-items: center; flex: none; width: var(--target); height: var(--target); padding: 0; border: 0; border-radius: var(--radius); background: none; color: var(--ink-2); transition: color var(--dur-2) ease, background-color var(--dur-2) ease, transform var(--dur-1) var(--ease-out); }
  .nt-icon-btn .nt-i { width: 22px; height: 22px; }
  .nt-icon-btn:active { transform: scale(.92); background: var(--press); }
  .nt-icon-btn[aria-current], .nt-icon-btn[aria-pressed="true"] { color: var(--ink); }
  .nt-icon-btn.danger { color: var(--ink-3); }
  @media (hover: hover) and (pointer: fine) { .nt-icon-btn:hover { color: var(--ink); } .nt-icon-btn.danger:hover { color: var(--danger); } }
  .nt-actions { display: grid; gap: var(--s-3); margin-top: var(--s-2); }
  /* Löschen: immer abgesetzt am Ende */
  .nt-danger-zone { margin-top: var(--s-6); }

  /* ---------- Formulare ---------- */
  .nt-form { display: grid; gap: var(--s-3); }
  .nt-field { display: grid; gap: 6px; min-width: 0; }
  .nt-label { font-size: var(--t-sm); font-weight: 600; color: var(--ink-2); }
  .nt-opt { font-weight: 400; color: var(--ink-3); }
  .nt-hint { font-size: var(--t-sm); color: var(--ink-2); }
  .nt-control, .nt-field > :is(input, select, textarea) { width: 100%; min-width: 0; min-height: var(--control); padding: 0 14px; border: var(--rule) solid var(--field-line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font-size: max(16px, var(--t-md)); transition: border-color var(--dur-2) ease, box-shadow var(--dur-2) ease; }
  .nt-field > textarea, textarea.nt-control { padding: 12px 14px; line-height: 1.45; resize: vertical; }
  .nt-field > select, select.nt-control { padding-right: 36px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%); background-position: calc(100% - 19px) 52%, calc(100% - 14px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
  .nt-control::placeholder, .nt-field > :is(input, textarea)::placeholder { color: var(--ink-3); }
  .nt-control:focus, .nt-field > :is(input, select, textarea):focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
  .nt-field > :is(input, select, textarea):user-invalid { border-color: var(--danger); }
  .nt-pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
  @media (max-width: 380px) { .nt-pair { grid-template-columns: 1fr; } }

  /* Auswahl: Chips (Mehrfach- oder Einfachauswahl über echte Checkboxen/Radios) */
  .nt-choice { display: flex; flex-wrap: wrap; gap: var(--s-2); }
  .nt-choice > legend { width: 100%; margin-bottom: var(--s-2); font-size: var(--t-sm); font-weight: 600; color: var(--ink-2); }
  .nt-choice label { position: relative; display: block; }
  .nt-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
  .nt-choice span, .nt-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px; border: var(--rule) solid var(--field-line); border-radius: var(--radius-pill); color: var(--ink); font-size: 15px; font-weight: 600; cursor: pointer; transition: background-color var(--dur-2) ease, color var(--dur-2) ease, border-color var(--dur-2) ease, transform var(--dur-1) var(--ease-out); }
  .nt-choice span:active, .nt-chip:active { transform: scale(.96); }
  .nt-choice input:checked + span, .nt-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
  .nt-choice input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
  .nt-chip .nt-i { width: 16px; height: 16px; color: var(--ink-2); }
  @media (hover: hover) and (pointer: fine) { .nt-choice span:hover, a.nt-chip:hover { border-color: var(--ink); } }

  /* Schalter */
  .nt-switch { position: relative; display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); min-height: 52px; cursor: pointer; }
  .nt-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
  .nt-switch i { position: relative; flex: none; width: 46px; height: 28px; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--ink) 18%, var(--bg)); transition: background-color var(--dur-2) ease; }
  .nt-switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .2); transition: transform .26s var(--ease-out); }
  .nt-switch input:checked + i { background: var(--accent); }
  .nt-switch input:checked + i::after { transform: translateX(18px); }
  .nt-switch input:focus-visible + i { outline: 2px solid var(--focus); outline-offset: 3px; }

  /* Aufklapp-Formular: geschlossen ein Button, offen das Formular */
  details::details-content { block-size: 0; opacity: 0; overflow: clip; transition: block-size .26s var(--ease-out), opacity var(--dur-2) ease, content-visibility .26s allow-discrete; }
  details[open]::details-content { block-size: auto; opacity: 1; }
  .nt-add > summary { display: flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: var(--control); border: var(--rule) solid var(--field-line); border-radius: var(--radius); font-weight: 600; transition: transform var(--dur-1) var(--ease-out), border-color var(--dur-2) ease, background-color var(--dur-2) ease, color var(--dur-2) ease; }
  .nt-add.primary > summary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
  .nt-add > summary:active { transform: scale(.98); }
  .nt-add[open] > summary { justify-content: flex-start; min-height: 40px; border-color: transparent; background: none; color: var(--ink); }
  .nt-add[open] > summary .nt-i { transform: rotate(45deg); }
  .nt-add > summary .nt-i { transition: transform var(--dur-3) var(--ease-out); }
  .nt-add > .nt-form { padding: var(--s-1) 0 var(--s-3); }
  @media (hover: hover) and (pointer: fine) { .nt-add:not([open]):not(.primary) > summary:hover { border-color: var(--ink); } }
  /* Aufklappen als Zeile (z. B. „Verlauf“, „Erledigt“) */
  .nt-more > summary { display: inline-flex; align-items: center; gap: var(--s-2); min-height: var(--target); font-size: var(--t-sm); font-weight: 600; color: var(--ink-2); }
  .nt-more > summary::after { content: ''; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform var(--dur-2) var(--ease-out); }
  .nt-more[open] > summary::after { transform: translateY(1px) rotate(-135deg); }
  /* in einer Liste: wie eine Zeile, Pfeil rechts */
  .nt-list .nt-more > summary { display: flex; min-height: 56px; font-size: var(--t-md); font-weight: 500; color: var(--ink); }
  .nt-list .nt-more > summary::after { margin-left: auto; margin-right: 6px; border-color: var(--ink-3); }
  .nt-list .nt-more > .nt-form { padding: var(--s-1) 0 var(--s-4); }

  /* ---------- Listen ----------
     <ul class="nt-list"><li><a class="nt-row" href>…<span class="nt-row-main"><strong>Titel</strong><small>Zusatz</small></span><span class="nt-row-side">…</span>Chevron</a></li></ul> */
  .nt-list { display: grid; border-top: var(--rule) solid var(--line); }
  * + .nt-list.actions, .nt-list + .nt-list { margin-top: var(--s-6); }
  .nt-list.flush { border-top: 0; }
  .nt-list > li { min-width: 0; border-bottom: var(--rule) solid var(--line); }
  .nt-row { display: flex; align-items: center; gap: var(--s-3); width: 100%; min-height: 56px; padding: 10px 0; border: 0; background: none; text-align: left; color: inherit; transition: background-color var(--dur-1) ease; }
  .nt-list > :is(.nt-row, .nt-switch) { border-bottom: var(--rule) solid var(--line); }
  :is(a, button).nt-row:active { background: var(--press); }
  .nt-row-main { flex: 1; display: grid; gap: 2px; min-width: 0; }
  .nt-row-main strong { font-weight: 500; overflow-wrap: anywhere; }
  .nt-row small, .nt-row-sub { color: var(--ink-2); font-size: var(--t-sm); }
  .nt-row-side { flex: none; display: grid; gap: 2px; justify-items: end; text-align: right; white-space: nowrap; }
  .nt-row > .nt-i:last-child { color: var(--ink-3); }
  .nt-row.danger { color: var(--danger); }
  .nt-row form { margin: 0; }
  .nt-row .nt-icon-btn { margin: -8px -10px -8px 0; }

  /* Rückmeldung */
  .nt-notice { padding: var(--s-3) var(--s-4); border-radius: var(--radius); background: var(--surface); color: var(--ink); font-size: 15px; }
  .nt-notice.error { background: color-mix(in srgb, var(--danger) 12%, var(--bg)); color: var(--danger); }
  .nt-error { color: var(--danger); font-size: var(--t-sm); }
  .nt-empty { padding: var(--s-6) 0; color: var(--ink-2); }
  .nt-tag { display: inline-block; margin-left: var(--s-2); padding: 1px 8px; border: var(--rule) solid var(--line); border-radius: var(--radius-pill); color: var(--ink-2); font-size: var(--t-xs); font-style: normal; font-weight: 600; letter-spacing: .01em; line-height: 1.5; vertical-align: .15em; white-space: nowrap; }
  .nt-tag.warn { border-color: color-mix(in srgb, var(--warn) 35%, transparent); background: color-mix(in srgb, var(--warn) 10%, var(--bg)); color: var(--warn); }
  .nt-toast { position: fixed; z-index: 50; left: 50%; bottom: calc(var(--s-6) + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 14px; max-width: calc(100vw - 32px); padding: 10px 10px 10px 16px; border-radius: var(--radius); background: var(--ink); color: var(--bg); font-size: 15px; font-weight: 600; box-shadow: 0 6px 24px rgb(0 0 0 / .18); opacity: 0; transform: translate(-50%, 10px) scale(.97); transition: opacity .18s ease, transform .24s var(--ease-out); pointer-events: none; }
  .nt-toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
  .nt-toast:not(:has(button)) { padding-right: 16px; }
  .nt-toast button { min-height: 32px; padding: 0 10px; border: 0; border-radius: var(--radius-sm); background: var(--bg); color: var(--ink); font-weight: 600; }
  .has-tabs .nt-toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
  @media (min-width: 960px) { .has-tabs .nt-toast { bottom: 32px; left: calc(50% + var(--sidebar) / 2); } }

  /* Blatt: natives <dialog class="nt-sheet">, unten am Handy, mittig am Desktop */
  .nt-sheet { width: 100%; max-width: 560px; max-height: 86dvh; margin: auto auto 0; padding: 10px var(--gutter) calc(16px + env(safe-area-inset-bottom)); border: 0; border-radius: 18px 18px 0 0; background: var(--bg); color: var(--ink); overflow: auto; overscroll-behavior: contain; }
  .nt-sheet::backdrop { background: rgb(0 0 0 / .35); }
  .nt-sheet[open] { animation: nt-sheet-in .32s var(--ease-drawer); }
  .nt-sheet::before { content: ''; display: block; width: 40px; height: 4px; margin: 0 auto 12px; border-radius: 2px; background: var(--ink-3); }
  @keyframes nt-sheet-in { from { transform: translateY(100%); } }
  @media (min-width: 960px) { .nt-sheet { margin: auto; border-radius: 16px; padding-top: 20px; } .nt-sheet::before { display: none; } @keyframes nt-sheet-in { from { opacity: 0; transform: translateY(16px) scale(.98); } } }
  @media (prefers-reduced-motion: reduce) { .nt-sheet[open] { animation: nt-fade-in .2s ease; } }

  /* Fehler- und Einstiegsseiten */
  .nt-gate { display: grid; gap: var(--s-6); padding-top: 8vh; }
  .nt-gate .nt-title { font-size: clamp(40px, 11vw, 60px); line-height: .98; letter-spacing: -.04em; }
  .nt-gate p:not(.nt-error) { color: var(--ink-2); }

  /* ---------- Teilen (Blatt auf allen App-Hosts) und Mitglieder-Initialen ---------- */
  .nt-share { display: grid; gap: var(--s-4); }
  .nt-share .nt-title { overflow-wrap: anywhere; }
  .nt-share-list { display: grid; border-top: var(--rule) solid var(--line); }
  .nt-share-list li { display: flex; align-items: center; gap: 10px; min-height: 52px; border-bottom: var(--rule) solid var(--line); }
  .nt-share-list form { margin-left: auto; }
  .nt-av, .nt-members span { display: inline-grid; place-items: center; flex: none; border-radius: 50%; background: color-mix(in srgb, var(--ink) 12%, var(--bg)); color: var(--ink-2); font-weight: 600; letter-spacing: .02em; }
  .nt-av { width: 28px; height: 28px; font-size: 11px; }
  .nt-name { overflow-wrap: anywhere; }
  .nt-role { color: var(--ink-2); font-size: var(--t-sm); }
  .nt-share-add { display: grid; gap: var(--s-2); }
  .nt-members { display: inline-flex; gap: 2px; margin-left: 6px; vertical-align: middle; }
  .nt-members span { width: 18px; height: 18px; font-size: 9px; }
}
