/* Anwendungsrahmen und Seiten (wächst mit den Schritten 2.2 ff.). */
.page { max-width: 960px; margin: 0 auto; padding: var(--space-7) var(--space-5); animation: fade-in var(--dur-slow) var(--ease-out); }
.page-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-6); }
.page-header > * { min-width: 0; }
.section { margin-bottom: var(--space-7); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.grid-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: var(--space-3); }
.swatch { border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; font-size: var(--text-xs); }
.swatch-color { height: 48px; }
.swatch-label { padding: var(--space-2); color: var(--text-muted); }
.sw-bg { background: var(--bg); } .sw-subtle { background: var(--bg-subtle); } .sw-muted { background: var(--bg-muted); }
.sw-surface { background: var(--surface-raised); } .sw-border { background: var(--border); } .sw-text { background: var(--text); }
.sw-accent { background: var(--accent); } .sw-danger { background: var(--danger); } .sw-success { background: var(--success); } .sw-warning { background: var(--warning); }
.type-sample > * { margin-bottom: var(--space-2); }
@media (max-width: 640px) { .page { padding: var(--space-5) var(--space-4); } }

/* ---- Anmeldung (2.2) ---- */
.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: var(--space-5) var(--space-4); animation: fade-in var(--dur-slow) var(--ease-out); }
.auth-brand { font-weight: var(--weight-bold); font-size: var(--text-lg); margin-bottom: var(--space-5); letter-spacing: -0.01em; }
.auth-card { width: 100%; max-width: 380px; padding: var(--space-6); background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); animation: pop-in var(--dur-med) var(--ease-out); }
.auth-card h1 { font-size: var(--text-xl); }
.auth-submit { width: 100%; margin-top: var(--space-2); }
.auth-card .field-error:empty { display: none; }
.auth-secret { margin: var(--space-3) 0; padding: var(--space-3); background: var(--bg-muted); border-radius: var(--radius-md); }
.auth-secret code { font-size: var(--text-lg); letter-spacing: 0.08em; word-break: break-all; }
.auth-uri { display: block; margin-top: var(--space-2); font-size: var(--text-xs); word-break: break-all; }
.auth details { margin-bottom: var(--space-4); font-size: var(--text-sm); }
.backup-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-2); padding: 0; list-style: none; margin: 0 0 var(--space-4); }
.backup-codes li { padding: var(--space-2); background: var(--bg-muted); border-radius: var(--radius-sm); text-align: center; }

/* ---- Rahmen: Seitenleiste, Kopfzeile, Inhalt (2.2) ---- */
.shell { display: flex; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; width: var(--sidebar-width); flex: none; display: flex; flex-direction: column;
  background: var(--bg-subtle); border-right: 1px solid var(--border); font-size: var(--text-sm); }
.sidebar-top { display: flex; align-items: center; gap: var(--space-1); padding: var(--space-2); }
.sidebar-user { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--space-2); padding: var(--space-1) var(--space-2); border: 0; background: none; border-radius: var(--radius-md); cursor: pointer; text-align: left; font-weight: var(--weight-medium); }
.sidebar-user:hover { background: var(--bg-hover); }
.sidebar-user-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 22px; height: 22px; flex: none; display: inline-grid; place-items: center; border-radius: var(--radius-sm); background: var(--accent); color: var(--accent-text); font-size: var(--text-xs); }
.sidebar-close { display: none; }
.sidebar-nav { padding: 0 var(--space-2) var(--space-2); }
.sidebar-link { display: flex; width: 100%; align-items: center; gap: var(--space-2); padding: 5px var(--space-2); border: 0; background: none; border-radius: var(--radius-sm); color: var(--text-muted); cursor: pointer; text-align: left; }
.sidebar-link:hover { background: var(--bg-hover); text-decoration: none; color: var(--text); }
.sidebar-link:disabled { opacity: 0.55; cursor: default; }
.sidebar-scroll { flex: 1; overflow-y: auto; padding: 0 var(--space-2) var(--space-5); }
.sidebar-section { margin-top: var(--space-4); }
.sidebar-heading { display: flex; align-items: center; gap: var(--space-1); min-height: 26px; padding: 0 var(--space-2); color: var(--text-faint); font-size: var(--text-xs); font-weight: var(--weight-medium); border-radius: var(--radius-sm); }
.space-heading .space-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.space-private { display: inline-flex; color: var(--text-faint); }
.sidebar-empty { padding: var(--space-3); }
.row-action { opacity: 0; transition: opacity var(--dur-fast); width: 22px; height: 22px; }
.sidebar-heading:hover .row-action, .tree-row:hover .row-action, .row-action:focus-visible { opacity: 1; }
@media (hover: none) { .row-action { opacity: 1; } }

.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree-row { display: flex; align-items: center; gap: 2px; min-height: 28px; padding-right: var(--space-1); border-radius: var(--radius-sm); position: relative; transition: background-color var(--dur-fast); }
.tree-row:hover { background: var(--bg-hover); }
.tree-row[aria-current] { background: var(--bg-active); font-weight: var(--weight-medium); }
.tree-row.dragging { opacity: 0.4; }
.tree-row.drop-inside, .sidebar-heading.drop-inside { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.tree-row.drop-before::before, .tree-row.drop-after::after { content: ''; position: absolute; left: 8px; right: 4px; height: 2px; background: var(--accent); border-radius: 1px; }
.tree-row.drop-before::before { top: -1px; } .tree-row.drop-after::after { bottom: -1px; }
.tree-toggle { flex: none; width: 20px; height: 20px; display: inline-grid; place-items: center; border: 0; background: none; padding: 0; border-radius: var(--radius-sm); color: var(--text-faint); cursor: pointer; }
.tree-toggle:hover { background: var(--bg-active); }
.tree-toggle svg { transition: transform var(--dur-fast) var(--ease-out); }
[aria-expanded="true"] > .tree-row .tree-toggle svg { transform: rotate(90deg); }
.tree-toggle-empty { cursor: default; }
.tree-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--space-2); padding: 3px var(--space-1); color: var(--text); border-radius: var(--radius-sm); }
.tree-link:hover { text-decoration: none; }
.tree-link svg { flex: none; color: var(--text-muted); }
.tree-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-empty { padding: 3px var(--space-2) 3px 28px; font-size: var(--text-xs); }
.tree [role="group"]:not(:empty) { animation: fade-in var(--dur-med) var(--ease-out); }
.node-emoji { flex: none; width: 18px; text-align: center; line-height: 1; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: var(--space-2); min-height: 44px; padding: var(--space-1) var(--space-3); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); }
.sidebar-open { display: none; }
.breadcrumbs { flex: 1; min-width: 0; font-size: var(--text-sm); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.breadcrumbs li { display: flex; align-items: center; min-width: 0; }
.breadcrumbs li + li::before { content: '/'; color: var(--text-faint); margin: 0 var(--space-1); }
.crumb { padding: 2px var(--space-1); border-radius: var(--radius-sm); color: var(--text-muted); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.crumb:hover { background: var(--bg-hover); text-decoration: none; color: var(--text); }
.crumb[aria-current] { color: var(--text); }
.topbar-actions { display: flex; align-items: center; gap: var(--space-1); }
.topbar-star[aria-pressed="true"] { color: var(--warning); }
.topbar-star[aria-pressed="true"] svg path { fill: currentColor; }
.content { flex: 1; outline: none; }

.page-wide { max-width: 1200px; }
.page-head { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-5); }
.page-icon { font-size: 40px; line-height: 1; }
.page-title { flex: 1; min-width: 0; border: 0; background: none; padding: 0; font-size: 2.25rem; font-weight: var(--weight-bold); letter-spacing: -0.02em; line-height: 1.2; }
.page-title::placeholder { color: var(--text-faint); }
/* Titel als mehrzeiliges Feld mit automatischer Höhe (FEHLER-015): bricht um statt abzuschneiden */
textarea.page-title { display: block; width: 100%; resize: none; overflow: hidden; font-family: inherit; color: inherit; white-space: pre-wrap; overflow-wrap: anywhere; }
.page-title:focus-visible { box-shadow: none; }
.section-head { justify-content: space-between; margin-bottom: var(--space-2); }
.section-head h2 { margin: 0; font-size: var(--text-lg); }
.child-list { list-style: none; margin: 0; padding: 0; }
.child-link { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-1) var(--space-2); border-radius: var(--radius-sm); color: var(--text); }
.child-link:hover { background: var(--bg-hover); text-decoration: none; }
.view-tabs { display: flex; gap: var(--space-1); border-bottom: 1px solid var(--border); margin-bottom: var(--space-4); overflow-x: auto; }
.view-tab { border: 0; background: none; padding: var(--space-2) var(--space-3); color: var(--text-muted); border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.view-tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--text); }
.home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--space-3); }
.home-card { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); padding: var(--space-3) var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out); }
a.home-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.home-space .muted { width: 100%; font-size: var(--text-xs); }

.move-body { width: min(480px, 80vw); }
.move-list { list-style: none; margin: var(--space-3) 0 0; padding: 0; max-height: 50vh; overflow-y: auto; }
.move-target { display: flex; width: 100%; align-items: center; flex-wrap: wrap; gap: var(--space-2); padding: var(--space-2); border: 0; background: none; border-radius: var(--radius-sm); text-align: left; cursor: pointer; }
.move-target:hover, .move-target:focus-visible { background: var(--bg-hover); }
.move-path { width: 100%; padding-left: 26px; font-size: var(--text-xs); }

/* Schmale Bildschirme: Seitenleiste als Schublade */
.sidebar-scrim { display: none; }
@media (max-width: 768px) {
  /* Geschlossen: unsichtbar (kein Schattenstreifen am Rand, nicht per Tab erreichbar); erst nach dem Hinausgleiten ausblenden (6.8) */
  .sidebar { position: fixed; z-index: 30; left: 0; top: 0; height: 100dvh; width: min(var(--sidebar-width), 86vw); transform: translateX(-100%); visibility: hidden; box-shadow: none;
    transition: transform var(--dur-med) var(--ease-out), visibility 0s linear var(--dur-med), box-shadow 0s linear var(--dur-med); }
  .shell.sidebar-visible .sidebar { transform: none; visibility: visible; box-shadow: var(--shadow-lg); transition: transform var(--dur-med) var(--ease-out); }
  .shell.sidebar-visible .sidebar-scrim { display: block; position: fixed; inset: 0; z-index: 25; background: var(--scrim); animation: fade-in var(--dur-med); }
  .sidebar-close, .sidebar-open { display: inline-flex; }
  .page-title { font-size: 1.75rem; }
}

/* ---- Ansichten: Tabs, Werkzeugleiste, Tabelle (2.3) ---- */
.view-tabs { align-items: center; }
.view-tab:focus-visible { box-shadow: var(--focus-ring); }
.view-add { margin-left: var(--space-1); }
.view-toolbar { display: flex; justify-content: flex-end; gap: var(--space-2); margin: calc(-1 * var(--space-2)) 0 var(--space-2); min-height: 0; }
.view-toolbar:empty { display: none; }
.table-wrap { overflow-x: auto; margin: 0 calc(-1 * var(--space-2)); padding: 0 var(--space-2) var(--space-4); }
.db-table { border-collapse: collapse; table-layout: fixed; width: max-content; min-width: 100%; font-size: var(--text-sm); animation: fade-in var(--dur-med) var(--ease-out); }
.db-table th, .db-table td { border: 1px solid var(--border); border-left: 0; text-align: left; vertical-align: top; overflow: hidden; }
.db-table th:last-child, .db-table td:last-child { border-right: 0; }
.db-table thead th { position: relative; font-weight: var(--weight-normal); color: var(--text-muted); border-top: 0; }
.th-button { display: flex; align-items: center; gap: var(--space-2); width: 100%; min-height: 32px; padding: 0 var(--space-2); border: 0; background: none; color: inherit; cursor: pointer; text-align: left; white-space: nowrap; }
.th-button:hover { background: var(--bg-hover); }
.th-name { overflow: hidden; text-overflow: ellipsis; }
.type-glyph { flex: none; width: 16px; text-align: center; color: var(--text-faint); font-size: var(--text-xs); }
.col-resize { position: absolute; top: 0; right: -3px; width: 6px; height: 100%; cursor: col-resize; z-index: 1; }
.col-resize:hover, .col-resize:focus-visible { background: var(--accent); opacity: 0.6; }
body.resizing { cursor: col-resize; user-select: none; }
.db-table td { position: relative; height: 34px; padding: 0; cursor: default; }
.db-table td:not([aria-readonly]) { cursor: text; }
.db-table td:focus-visible, .db-table td.editing { box-shadow: inset 0 0 0 2px var(--accent); border-radius: 0; }
.cell-content { display: flex; flex-wrap: nowrap; align-items: center; gap: var(--space-1); min-height: 33px; padding: 6px var(--space-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
td.wrap .cell-content { white-space: normal; flex-wrap: wrap; word-break: break-word; }
.db-table tbody tr { transition: background-color var(--dur-fast); }
.db-table tbody tr:hover { background: var(--bg-hover); }
.db-table td[data-type="title"] .cell-content { font-weight: var(--weight-medium); padding-right: 64px; }
.row-open { position: absolute; right: 6px; top: 6px; padding: 1px var(--space-2); font-size: var(--text-xs); border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-muted); opacity: 0; transition: opacity var(--dur-fast); }
.db-table tr:hover .row-open, .db-table td:focus-within .row-open, .row-open:focus-visible { opacity: 1; text-decoration: none; }
@media (hover: none) { .row-open { opacity: 1; } }
.num { margin-left: auto; font-variant-numeric: tabular-nums; }
.chips { display: inline-flex; gap: var(--space-1); flex-wrap: inherit; min-width: 0; }
.ref-chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; color: var(--text); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 2px; white-space: nowrap; }
.ref-chip:hover { text-decoration-color: currentColor; }
.person-chip { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.avatar-sm { width: 18px; height: 18px; font-size: 10px; }
.check-view { display: inline-grid; place-items: center; width: 16px; height: 16px; border: 1.5px solid var(--border-strong); border-radius: 3px; }
.check-view[data-checked="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.cell-error { color: var(--danger); }
.rt-bold { font-weight: var(--weight-bold); } .rt-italic { font-style: italic; } .rt-strikethrough { text-decoration: line-through; }
.rt-underline { text-decoration: underline; } .rt-code { font-family: var(--font-mono); background: var(--bg-muted); padding: 0 3px; border-radius: 3px; }
.db-table tfoot td { border: 0; height: auto; }
.calc-btn { display: flex; justify-content: flex-end; gap: var(--space-1); width: 100%; min-height: 30px; padding: 0 var(--space-2); border: 0; background: none; color: var(--text-faint); font-size: var(--text-xs); cursor: pointer; }
.calc-btn:hover { background: var(--bg-hover); }
.calc-hint { opacity: 0; transition: opacity var(--dur-fast); }
.calc-btn:hover .calc-hint, .calc-btn:focus-visible .calc-hint { opacity: 1; }
.calc-name { color: var(--text-faint); } .calc-value { color: var(--text); font-weight: var(--weight-medium); }
.add-row { display: flex; align-items: center; gap: var(--space-2); width: 100%; padding: var(--space-2); border: 0; border-bottom: 1px solid var(--border); background: none; color: var(--text-muted); cursor: pointer; font-size: var(--text-sm); }
.add-row:hover { background: var(--bg-hover); }
.load-more { margin-top: var(--space-3); }
.table-empty { padding: var(--space-3) var(--space-2); }
.cell-editor { position: fixed; z-index: 40; max-width: calc(100vw - 16px); padding: var(--space-2); background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); animation: pop-in var(--dur-fast) var(--ease-out); }
.cell-editor .field { margin-bottom: var(--space-2); }
.option-list { display: flex; flex-direction: column; max-height: 240px; overflow-y: auto; margin-top: var(--space-2); }
.option-item { display: flex; align-items: center; gap: var(--space-2); padding: 4px var(--space-2); border: 0; background: none; border-radius: var(--radius-sm); cursor: pointer; text-align: left; }
.option-item:hover, .option-item:focus-visible { background: var(--bg-hover); }
.option-check { width: 14px; display: inline-grid; place-items: center; color: var(--accent); }
.option-empty { padding: var(--space-2); margin: 0; }
.editor-actions { justify-content: flex-end; margin-top: var(--space-2); }

/* ---- Filter, Sortierung, Gruppierung (2.4) ---- */
.view-toolbar { flex-wrap: wrap; align-items: center; }
.view-toolbar .btn[data-active="true"] { color: var(--accent); }
.view-search { width: 160px; min-height: 28px; height: 28px; }
.input-sm, .select-sm { min-height: 28px; height: 28px; padding: 0 var(--space-2); font-size: var(--text-sm); width: auto; }
.override-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: 0 0 var(--space-3); padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); background: var(--accent-soft); font-size: var(--text-sm); animation: fade-in var(--dur-med) var(--ease-out); }
.override-bar[hidden] { display: none; }
.override-bar > span { flex: 1; min-width: 180px; }
.popover { position: fixed; z-index: 45; max-height: 70vh; overflow: auto; padding: var(--space-3); background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); animation: pop-in var(--dur-fast) var(--ease-out); }
.filter-group { display: flex; flex-direction: column; gap: var(--space-2); }
.filter-group.nested { padding: var(--space-2); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-subtle); flex: 1; min-width: 0; }
.filter-items { display: flex; flex-direction: column; gap: var(--space-2); }
.filter-line { display: flex; align-items: flex-start; gap: var(--space-2); }
.filter-conj { flex: none; width: 60px; padding-top: 5px; font-size: var(--text-sm); }
.filter-line > select.select-sm { flex: none; width: 60px; }
.filter-cond { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1); flex: 1; min-width: 0; }
.filter-cond > select, .filter-cond > input { flex: 1 1 110px; min-width: 0; }
.filter-date { display: inline-flex; gap: var(--space-1); flex: 1 1 160px; }
.filter-actions { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.sort-editor { display: flex; flex-direction: column; gap: var(--space-2); align-items: flex-start; }
.sort-line { display: flex; gap: var(--space-1); width: 100%; }
.sort-line select:first-child { flex: 1; min-width: 0; }
.group-editor .field { margin-bottom: var(--space-2); }
.group-editor .select-sm { width: 100%; }
.group-extras { margin-bottom: var(--space-3); font-size: var(--text-sm); }
.check-label { display: inline-flex; align-items: center; gap: var(--space-1); }
.small { font-size: var(--text-sm); }
.group-row th { padding: 0; border-left: 0; border-right: 0; background: var(--bg); text-align: left; }
.group-toggle { display: flex; align-items: center; gap: var(--space-2); width: 100%; min-height: 34px; padding-right: var(--space-2); border: 0; background: none; cursor: pointer; font-weight: var(--weight-medium); text-align: left; }
.group-toggle:hover { background: var(--bg-hover); }
.group-toggle svg { transition: transform var(--dur-fast) var(--ease-out); color: var(--text-faint); }
.group-toggle[aria-expanded="true"] svg { transform: rotate(90deg); }
.group-count { font-weight: var(--weight-normal); font-size: var(--text-xs); }

/* ---- Seite öffnen, Eigenschaften, Relationen, Formel-Editor (2.5) ---- */
.dialog.dialog-wide { width: min(900px, calc(100vw - 32px)); max-width: none; }
.formula-editor { display: grid; grid-template-columns: 1fr; gap: var(--space-3); margin: var(--space-2) 0; }
@media (min-width: 720px) { .formula-editor { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.formula-main, .formula-side { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.formula-input { width: 100%; min-height: 180px; resize: vertical; padding: var(--space-2); font-family: var(--font-mono); font-size: var(--text-sm); line-height: 1.5; tab-size: 2; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.formula-input:focus-visible { border-color: var(--accent); }
.formula-input[aria-invalid="true"] { border-color: var(--danger); }
.formula-status { min-height: 1.5em; font-size: var(--text-sm); }
.formula-preview { margin-top: 2px; color: var(--text-muted); }
.formula-search { width: 100%; min-height: var(--control-height); padding: 0 var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.formula-list { max-height: 320px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-1); }
.formula-heading { margin: var(--space-2) var(--space-2) 2px; font-size: var(--text-xs); font-weight: var(--weight-bold); text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); }
.formula-items { display: flex; flex-direction: column; }
.formula-item { display: flex; align-items: baseline; gap: var(--space-2); width: 100%; padding: 4px var(--space-2); border: 0; border-radius: var(--radius-sm); background: none; font-size: var(--text-sm); text-align: left; cursor: pointer; }
.formula-item:hover, .formula-item:focus-visible { background: var(--bg-hover); }
.formula-name { font-family: var(--font-mono); white-space: nowrap; }
.formula-sig { font-size: var(--text-xs); color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.prop-list { display: flex; flex-direction: column; gap: 2px; margin-bottom: var(--space-5); }
.prop-row { display: grid; grid-template-columns: minmax(120px, 180px) minmax(0, 1fr); align-items: start; gap: var(--space-2); min-height: 34px; }
.prop-name { display: flex; align-items: center; gap: var(--space-2); min-height: 32px; padding: 0 var(--space-2); border: 0; background: none; border-radius: var(--radius-sm); color: var(--text-muted); font-size: var(--text-sm); text-align: left; overflow: hidden; }
.prop-name span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.prop-name { cursor: pointer; } button.prop-name:hover { background: var(--bg-hover); }
.prop-value { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1); min-height: 32px; width: 100%; padding: 4px var(--space-2); border: 0; background: none; border-radius: var(--radius-sm); font-size: var(--text-sm); text-align: left; min-width: 0; overflow-wrap: anywhere; }
button.prop-value { cursor: pointer; } button.prop-value:hover { background: var(--bg-hover); }
.prop-value.editing { box-shadow: inset 0 0 0 2px var(--accent); }
.prop-value .num { margin-left: 0; }
.prop-add { align-self: flex-start; margin-top: var(--space-2); }
@media (max-width: 520px) { .prop-row { grid-template-columns: 1fr; gap: 0; } }

.rel-picker { display: flex; flex-direction: column; gap: var(--space-2); }
.rel-selected, .rel-results { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.rel-selected { flex-direction: row; flex-wrap: wrap; gap: var(--space-1); }
.rel-chip { display: inline-flex; align-items: center; gap: 2px; padding-left: var(--space-2); border-radius: var(--radius-sm); background: var(--bg-muted); font-size: var(--text-sm); }
.rel-chip .btn-icon { width: 22px; height: 22px; }
.rel-results { max-height: 280px; overflow-y: auto; }
.rel-item { display: flex; align-items: center; gap: var(--space-2); width: 100%; padding: 5px var(--space-2); border: 0; background: none; border-radius: var(--radius-sm); text-align: left; cursor: pointer; font-size: var(--text-sm); }
.rel-item:hover, .rel-item:focus-visible { background: var(--bg-hover); }
.rel-item[aria-pressed="true"] { color: var(--accent); }
.rel-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rel-new { color: var(--text-muted); }
.rel-empty { font-size: var(--text-sm); padding: var(--space-1) var(--space-2); }
.option-new { color: var(--text-muted); }

.peek-backdrop { position: fixed; inset: 0; z-index: 35; background: var(--scrim); animation: fade-in var(--dur-med) var(--ease-out); }
.peek-backdrop[data-mode="side"] { background: transparent; }
.peek { position: fixed; z-index: 36; display: flex; flex-direction: column; background: var(--bg); box-shadow: var(--shadow-lg); border: 1px solid var(--border); }
.peek[data-mode="side"] { top: 0; right: 0; bottom: 0; width: min(640px, 100vw); border-width: 0 0 0 1px; animation: slide-in-right var(--dur-med) var(--ease-out); }
.peek[data-mode="center"] { top: 6vh; left: 50%; width: min(900px, calc(100vw - 32px)); max-height: 88vh; transform: translateX(-50%); border-radius: var(--radius-lg); animation: fade-in var(--dur-med) var(--ease-out); }
.peek-bar { display: flex; align-items: center; gap: var(--space-1); padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--border); }
.peek-bar .spacer { flex: 1; }
.peek-body { flex: 1; overflow-y: auto; padding: var(--space-5) var(--space-6); }
@media (max-width: 640px) { .peek[data-mode] { inset: 0; top: 0; left: 0; width: 100vw; max-height: none; transform: none; border-radius: 0; } .peek-body { padding: var(--space-4); } }

/* ---- Board (2.6) ---- */
.board-wrap { overflow-x: auto; margin: 0 calc(-1 * var(--space-2)); padding: 0 var(--space-2) var(--space-5); }
.board { display: flex; gap: var(--space-3); align-items: flex-start; min-width: min-content; animation: fade-in var(--dur-med) var(--ease-out); }
.board.with-lanes { flex-direction: column; gap: var(--space-4); }
.board-lane-head, .lane-columns { display: flex; gap: var(--space-3); }
.board-lane-head .column-head { width: var(--col-w); flex: none; }
.lane-title { margin-bottom: var(--space-2); font-weight: var(--weight-medium); font-size: var(--text-sm); }
.board { --col-w: 260px; }
.board[data-size="small"] { --col-w: 220px; } .board[data-size="large"] { --col-w: 320px; }
.board-column { width: var(--col-w); flex: none; display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-2); border-radius: var(--radius-md); transition: background-color var(--dur-fast), box-shadow var(--dur-fast); }
.board[data-colored="true"] .board-column, .board[data-colored="true"] .column-head { background: var(--opt-default-bg); }
.board[data-colored="true"] [data-color="gray"] { background: var(--opt-gray-bg); } .board[data-colored="true"] [data-color="brown"] { background: var(--opt-brown-bg); }
.board[data-colored="true"] [data-color="orange"] { background: var(--opt-orange-bg); } .board[data-colored="true"] [data-color="yellow"] { background: var(--opt-yellow-bg); }
.board[data-colored="true"] [data-color="green"] { background: var(--opt-green-bg); } .board[data-colored="true"] [data-color="blue"] { background: var(--opt-blue-bg); }
.board[data-colored="true"] [data-color="purple"] { background: var(--opt-purple-bg); } .board[data-colored="true"] [data-color="pink"] { background: var(--opt-pink-bg); }
.board[data-colored="true"] [data-color="red"] { background: var(--opt-red-bg); }
.board-column.drop-target { box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-soft); }
.column-head { display: flex; align-items: center; gap: var(--space-2); min-height: 30px; padding: 0 var(--space-1); border-radius: var(--radius-sm); font-size: var(--text-sm); }
.column-head .btn-icon { margin-left: auto; opacity: 0; transition: opacity var(--dur-fast); }
.column-head:hover .btn-icon, .column-head .btn-icon:focus-visible { opacity: 1; }
.column-count { font-size: var(--text-xs); }
.column-cards { display: flex; flex-direction: column; gap: var(--space-2); min-height: 8px; }
.board-card { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-2) var(--space-3); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); cursor: pointer; font-size: var(--text-sm);
  transition: box-shadow var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); animation: pop-in var(--dur-med) var(--ease-out); }
.board-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.board-card:focus-visible { box-shadow: var(--focus-ring); }
.board-card.dragging { opacity: 0.4; }
.board-card[draggable="true"] { cursor: grab; }
.board[data-size="large"] .board-card { padding: var(--space-3) var(--space-4); }
.card-title { display: flex; align-items: center; gap: var(--space-1); font-weight: var(--weight-medium); overflow-wrap: anywhere; }
.card-prop { display: flex; flex-wrap: wrap; gap: var(--space-1); color: var(--text-muted); min-width: 0; overflow: hidden; }
.card-prop .num { margin-left: 0; }
.add-card { display: flex; align-items: center; gap: var(--space-1); padding: var(--space-1) var(--space-2); border: 0; background: none; border-radius: var(--radius-sm); color: var(--text-muted); cursor: pointer; font-size: var(--text-sm); }
.add-card:hover { background: var(--bg-hover); }
.board-hidden { margin-top: var(--space-4); font-size: var(--text-sm); }
.board-hidden ul { list-style: none; padding: 0; margin: var(--space-2) 0 0; display: flex; flex-direction: column; gap: var(--space-1); }
.board-hidden li { display: flex; align-items: center; gap: var(--space-2); }
.layout-editor { display: flex; flex-direction: column; gap: var(--space-3); }
.layout-editor .field { margin: 0; }
.layout-props { display: flex; flex-direction: column; gap: var(--space-1); max-height: 260px; overflow-y: auto; font-size: var(--text-sm); }

/* ---- Liste und Galerie (2.7) ---- */
.list-wrap, .gallery-wrap { animation: fade-in var(--dur-med) var(--ease-out); }
.card-group { margin-bottom: var(--space-4); }
.card-group > .group-toggle { min-height: 32px; padding-left: var(--space-1); }
.list-view { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.list-item { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2) var(--space-4); min-height: 38px; padding: var(--space-1) var(--space-2); border-bottom: 1px solid var(--border); cursor: pointer; transition: background-color var(--dur-fast); }
.list-item:hover { background: var(--bg-hover); }
.list-item:focus-visible { box-shadow: inset var(--focus-ring); border-radius: 0; }
.list-title { display: flex; align-items: center; gap: var(--space-2); flex: 1 1 200px; min-width: 0; font-weight: var(--weight-medium); }
.list-title > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-title svg { flex: none; color: var(--text-muted); }
.list-props { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); color: var(--text-muted); font-size: var(--text-sm); }
.item-prop { display: inline-flex; flex-wrap: wrap; gap: var(--space-1); max-width: 260px; overflow: hidden; }
.item-prop .num { margin-left: 0; }
.gallery { --card-w: 240px; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(var(--card-w), 100%), 1fr)); gap: var(--space-3); }
.gallery[data-size="small"] { --card-w: 180px; } .gallery[data-size="large"] { --card-w: 320px; }
.gallery-card { display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); cursor: pointer;
  transition: box-shadow var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); animation: pop-in var(--dur-med) var(--ease-out); }
.gallery-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.gallery-card:focus-visible { box-shadow: var(--focus-ring); }
.gallery-preview { display: grid; place-items: center; height: 110px; background: var(--bg-muted); border-bottom: 1px solid var(--border); }
.gallery[data-size="large"] .gallery-preview { height: 160px; } .gallery[data-size="small"] .gallery-preview { height: 80px; }
.gallery-icon { font-size: 40px; line-height: 1; }
.gallery-initial { font-size: 32px; font-weight: var(--weight-bold); color: var(--text-faint); }
.gallery-body { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-2) var(--space-3) var(--space-3); font-size: var(--text-sm); min-width: 0; }
.gallery-add { margin-top: var(--space-3); border-bottom: 0; }

/* ---- Kalender (2.8) ---- */
.calendar-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); margin-bottom: var(--space-3); }
.calendar-title { margin: 0; font-size: var(--text-lg); min-width: 180px; }
.calendar-settings { margin-left: auto; }
.flip { display: inline-flex; transform: scaleX(-1); }
.calendar-grid { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; animation: fade-in var(--dur-med) var(--ease-out); }
.calendar-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-row + .calendar-row { border-top: 1px solid var(--border); }
.calendar-wd { padding: var(--space-1) var(--space-2); font-size: var(--text-xs); color: var(--text-muted); text-align: left; background: var(--bg-subtle); }
.calendar-day { min-height: 112px; padding: var(--space-1); display: flex; flex-direction: column; gap: 2px; min-width: 0; transition: background-color var(--dur-fast), box-shadow var(--dur-fast); }
.calendar-day + .calendar-day { border-left: 1px solid var(--border); }
.calendar-grid[data-mode="week"] .calendar-day { min-height: 320px; }
.calendar-day[data-out="true"] { background: var(--bg-subtle); }
.calendar-day[data-out="true"] .day-num { color: var(--text-faint); }
.calendar-day.drop-target { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.day-head { display: flex; align-items: center; justify-content: space-between; min-height: 22px; }
.day-num { font-size: var(--text-xs); padding: 1px 6px; border-radius: var(--radius-pill); color: var(--text-muted); }
.calendar-day[data-today="true"] .day-num { background: var(--danger); color: #fff; font-weight: var(--weight-bold); }
.day-add { opacity: 0; width: 20px; height: 20px; transition: opacity var(--dur-fast); }
.calendar-day:hover .day-add, .day-add:focus-visible { opacity: 1; }
@media (hover: none) { .day-add { opacity: 1; } }
.day-entries { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.calendar-entry { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--space-1); padding: 2px 6px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); font-size: var(--text-xs); cursor: pointer; min-width: 0;
  transition: box-shadow var(--dur-fast), transform var(--dur-fast); animation: pop-in var(--dur-med) var(--ease-out); }
.calendar-entry:hover { box-shadow: var(--shadow-md); }
.calendar-entry:focus-visible { box-shadow: var(--focus-ring); }
.calendar-entry[data-cont="true"] { background: var(--accent-soft); border-color: transparent; }
.calendar-entry.dragging { opacity: 0.4; }
.entry-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: var(--weight-medium); min-width: 0; max-width: 100%; }
.entry-time { color: var(--text-muted); }
.entry-prop { width: 100%; color: var(--text-muted); overflow: hidden; }
.day-more { border: 0; background: none; color: var(--text-muted); font-size: var(--text-xs); text-align: left; cursor: pointer; padding: 2px 6px; }
.day-more:hover { color: var(--text); }
.calendar-undated { margin-top: var(--space-4); font-size: var(--text-sm); }
.calendar-undated ul { list-style: none; padding: 0; margin: var(--space-2) 0 0; display: flex; flex-wrap: wrap; gap: var(--space-1); }
@media (max-width: 640px) { .calendar-day { min-height: 72px; } .calendar-entry .entry-time { display: none; } .calendar-settings { margin-left: 0; } }
/* Handy (6.8): Monatsraster schmal – kurze Streifen statt Karten, „+3“ statt „+3 weitere“, nichts ragt aus der Zelle */
@media (max-width: 480px) {
  .calendar-grid[data-mode="month"] .calendar-day { padding: 2px 1px; overflow: hidden; }
  .calendar-grid[data-mode="month"] .calendar-entry { padding: 0 3px; font-size: 10px; line-height: 16px; box-shadow: none; }
  .calendar-grid[data-mode="month"] .entry-prop { display: none; }
  .calendar-grid[data-mode="month"] .day-num { padding: 0 3px; }
  .calendar-grid[data-mode="month"] .day-add { width: 16px; height: 16px; }
  .day-more-word { display: none; }
  .day-more { padding: 0 3px; }
  .calendar-wd { padding: var(--space-1) 2px; text-align: center; }
}

/* ---- Formular (2.9) ---- */
.form-wrap { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); animation: fade-in var(--dur-med) var(--ease-out); }
.form-mode { display: flex; gap: var(--space-1); align-self: flex-end; }
.form-mode .btn[aria-pressed="true"] { background: var(--bg-active); }
.form-card { width: 100%; max-width: 640px; padding: var(--space-6); background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.form-title { font-size: var(--text-xl); }
.form-description { color: var(--text-muted); white-space: pre-wrap; }
.form-question { display: flex; flex-direction: column; gap: var(--space-1); margin: var(--space-5) 0; }
.form-label { font-weight: var(--weight-medium); }
.form-required { color: var(--danger); }
.form-help { margin: 0; font-size: var(--text-sm); color: var(--text-muted); }
.form-question .field-error:empty { display: none; }
.form-question [aria-invalid="true"] { border-color: var(--danger); }
.form-choices { display: flex; flex-direction: column; gap: var(--space-1); }
.form-question select[multiple] { min-height: 110px; padding: var(--space-1); }
.form-submit { margin-top: var(--space-2); }
.form-thanks { text-align: center; }
.form-thanks-icon { display: inline-grid; place-items: center; width: 56px; height: 56px; margin-bottom: var(--space-3); border-radius: 50%; background: var(--success-soft); color: var(--success); animation: pop-in var(--dur-slow) var(--ease-spring); }
.form-builder h3 { margin-top: var(--space-5); font-size: var(--text-md); }
.form-builder-list { list-style: none; margin: 0 0 var(--space-3); padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.form-builder-item { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-2) var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.form-builder-item .row strong { flex: 1; min-width: 0; }
.form-req { font-size: var(--text-sm); }
@media (max-width: 640px) { .form-card { padding: var(--space-4); } }
/* Suche über alles (2.10) */
.dialog.dialog-search { width: min(680px, 100%); max-height: min(80vh, 720px); display: flex; flex-direction: column; }
.search { display: flex; flex-direction: column; gap: var(--space-2); min-height: 0; flex: 1; }
.search-box { display: flex; align-items: center; gap: var(--space-2); color: var(--text-muted); }
.search-box .search-input { flex: 1; min-width: 0; }
.search-filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); font-size: var(--text-sm); }
.search-filters > * { max-width: 100%; }
.search-check, .search-date { display: inline-flex; align-items: center; gap: var(--space-1); }
.search-status { font-size: var(--text-sm); margin: 0; }
.search-results { list-style: none; margin: 0; padding: 0; overflow-y: auto; min-height: 0; flex: 1; }
.search-item { display: flex; align-items: flex-start; gap: var(--space-2); padding: var(--space-2); border-radius: var(--radius-md); cursor: pointer; }
.search-item > svg, .search-item > .node-emoji { flex: none; margin-top: 2px; }
.search-item[aria-selected="true"] { background: var(--bg-hover); }
.search-item-text { min-width: 0; flex: 1; }
.search-item-title { font-weight: 500; overflow-wrap: anywhere; }
.search-item-path, .search-item-excerpt { font-size: var(--text-sm); overflow-wrap: anywhere; }
.search-item mark { background: var(--accent-soft); color: inherit; border-radius: 2px; }
.search-more { align-self: center; }

/* ---- Block-Editor (Schritt 3.2) ---- */
.editor { margin: var(--space-4) 0 var(--space-6); min-height: 2rem; }
.blk { position: relative; }
.blk-body { padding: 1px 0; }
.blk-children { padding-left: 1.5em; }
.blk-text { min-height: 1.5em; padding: 3px 2px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; outline: none; border-radius: var(--radius-sm); }
.blk-text:empty::before { content: attr(data-placeholder); color: var(--text-faint); pointer-events: none; }
.blk[data-type="paragraph"] > .blk-body > .blk-text:empty:not(:focus)::before { content: ""; }
.blk[data-type="heading_1"] > .blk-body > .blk-text { font-size: 1.875rem; font-weight: var(--weight-bold); line-height: 1.3; margin-top: 1.2em; }
.blk[data-type="heading_2"] > .blk-body > .blk-text { font-size: 1.5rem; font-weight: var(--weight-bold); line-height: 1.3; margin-top: 1em; }
.blk[data-type="heading_3"] > .blk-body > .blk-text { font-size: 1.25rem; font-weight: var(--weight-bold); line-height: 1.3; margin-top: 0.8em; }
.blk[data-type="heading_4"] > .blk-body > .blk-text { font-size: 1.1rem; font-weight: var(--weight-bold); margin-top: 0.6em; }
.blk[data-type="code"] > .blk-body > .blk-text { font-family: var(--font-mono, ui-monospace, monospace); background: var(--surface-2, rgba(127,127,127,.08)); padding: var(--space-3); }
.blk-divider { border: 0; border-top: 1px solid var(--border); margin: var(--space-3) 0; }
.blk-unsupported { color: var(--text-faint); font-size: var(--text-sm); padding: 3px 2px; }
.editor-tail { min-height: 4rem; cursor: text; }
.editor-empty { margin: var(--space-4) 0; }
.m-bold { font-weight: var(--weight-bold); }
.m-italic { font-style: italic; }
.m-underline { text-decoration: underline; }
.m-strike { text-decoration: line-through; }
.m-underline.m-strike { text-decoration: underline line-through; }
.m-code { font-family: var(--font-mono, ui-monospace, monospace); font-size: 0.9em; padding: 0 0.25em; border-radius: var(--radius-sm); background: rgba(127,127,127,.15); color: var(--danger, #c4554d); }
.rt-atom { color: var(--text-muted); }

/* ---- Formatierung (Schritt 3.3) ---- */
.c-gray { color: var(--opt-gray-fg); } .c-brown { color: var(--opt-brown-fg); } .c-orange { color: var(--opt-orange-fg); }
.c-yellow { color: var(--opt-yellow-fg); } .c-green { color: var(--opt-green-fg); } .c-blue { color: var(--opt-blue-fg); }
.c-purple { color: var(--opt-purple-fg); } .c-pink { color: var(--opt-pink-fg); } .c-red { color: var(--opt-red-fg); }
.bg-gray { background: var(--opt-gray-bg); } .bg-brown { background: var(--opt-brown-bg); } .bg-orange { background: var(--opt-orange-bg); }
.bg-yellow { background: var(--opt-yellow-bg); } .bg-green { background: var(--opt-green-bg); } .bg-blue { background: var(--opt-blue-bg); }
.bg-purple { background: var(--opt-purple-bg); } .bg-pink { background: var(--opt-pink-bg); } .bg-red { background: var(--opt-red-bg); }
.blk-text a[data-link] { color: inherit; text-decoration: underline; text-decoration-color: var(--text-faint); text-underline-offset: 2px; }
.format-bar { position: fixed; z-index: 60; display: flex; align-items: center; padding: 2px; border-radius: var(--radius-md); background: var(--surface, #fff); border: 1px solid var(--border); box-shadow: var(--shadow-md, 0 4px 16px rgba(0,0,0,.12)); }
.format-bar[hidden] { display: none; }
.format-tools { display: flex; gap: 1px; }
.format-tools[hidden] { display: none; }
.format-btn { display: inline-flex; align-items: center; gap: 2px; min-width: 28px; height: 28px; padding: 0 6px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--text); font-size: var(--text-sm); cursor: pointer; }
.format-btn:hover { background: var(--hover, rgba(127,127,127,.12)); }
.format-btn[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); }
.format-color { text-decoration: underline; }
.format-link { display: flex; gap: var(--space-2); align-items: center; padding: var(--space-1); }
.format-link[hidden] { display: none; }
.format-link-input { width: 260px; }
.color-swatch { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: var(--radius-sm); border: 1px solid var(--border); font-weight: var(--weight-bold); }

/* Listen, Aufgaben, Toggle, Callout (Schritt 3.5) */
.editor, .blk-children { counter-reset: num; }
/* Neue Liste nach anderem Block: counter-set statt counter-reset. counter-reset am Geschwister legt in Chromium einen
   zweiten Zähler an, die Liste zählte dann 1, 1, 2 (FEHLER-013). counter-set wirkt nach counter-increment, daher 1. */
.blk:not([data-type="numbered_list_item"]) + .blk[data-type="numbered_list_item"] { counter-set: num 1; }
.blk[data-type="numbered_list_item"] { counter-increment: num; }
.blk[data-type="bulleted_list_item"] > .blk-body, .blk[data-type="numbered_list_item"] > .blk-body,
.blk[data-type="to_do"] > .blk-body, .blk[data-open] > .blk-body, .blk[data-type="callout"] > .blk-body { display: flex; align-items: flex-start; gap: 4px; }
.blk[data-type="bulleted_list_item"] > .blk-body::before { content: "•"; flex: none; width: 1.5em; text-align: center; line-height: 1.5; padding-top: 3px; }
.blk-children .blk[data-type="bulleted_list_item"] > .blk-body::before { content: "◦"; }
.blk-children .blk-children .blk[data-type="bulleted_list_item"] > .blk-body::before { content: "▪"; }
.blk[data-type="numbered_list_item"] > .blk-body::before { content: counter(num) "."; flex: none; min-width: 1.5em; text-align: right; padding-right: 2px; line-height: 1.5; padding-top: 3px; }
.blk-children .blk[data-type="numbered_list_item"] > .blk-body::before { content: counter(num, lower-alpha) "."; }
.blk-children .blk-children .blk[data-type="numbered_list_item"] > .blk-body::before { content: counter(num, lower-roman) "."; }
.blk-check { flex: none; width: 18px; height: 18px; margin: 6px 4px 0 2px; padding: 0; border: 1.5px solid var(--text-muted); border-radius: 3px; background: var(--surface); color: #fff; font-size: 13px; line-height: 1; cursor: pointer; }
.blk-check[aria-checked="true"] { background: var(--accent); border-color: var(--accent); }
.blk[data-type="to_do"][data-checked="true"] > .blk-body > .blk-text { text-decoration: line-through; color: var(--text-muted); }
.blk-toggle { flex: none; width: 1.5em; height: 1.6em; margin-top: 2px; padding: 0; border: 0; border-radius: var(--radius-sm); background: none; color: var(--text-muted); cursor: pointer; transition: transform var(--dur-fast, 120ms); }
.blk-toggle:hover { background: var(--bg-hover, rgba(127,127,127,.12)); }
.blk[data-open="true"] > .blk-body > .blk-toggle { transform: rotate(90deg); }
.blk[data-open="false"] > .blk-children { display: none; }
.blk[data-open] > .blk-children { padding-left: 1.6em; }
.blk-toggle-empty { margin: 2px 0; padding: 3px 2px; border: 0; background: none; color: var(--text-faint); font-size: var(--text-sm); cursor: pointer; text-align: left; }
.blk[data-type="callout"] > .blk-body { padding: var(--space-3); border-radius: var(--radius-md); background: var(--opt-default-bg, rgba(127,127,127,.1)); }
.blk[data-type="callout"] > .blk-body > .blk-text { padding: 0 2px; background: none; }
.blk-icon { flex: none; width: 1.8em; height: 1.8em; padding: 0; border: 0; border-radius: var(--radius-sm); background: none; font-size: 1.1em; cursor: pointer; }
.blk-icon:hover:not(:disabled) { background: var(--bg-hover, rgba(127,127,127,.12)); }
.blk-page { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px; border-radius: var(--radius-sm); color: var(--text); text-decoration: none; font-weight: var(--weight-medium); }
a.blk-page:hover { background: var(--bg-hover, rgba(127,127,127,.12)); }
.blk-page .blk-page-title { text-decoration: underline; text-decoration-color: var(--border-strong, var(--border)); text-underline-offset: 3px; }
.blk-page-hidden { color: var(--text-faint); font-weight: var(--weight-normal); }
.blk-page-hidden .blk-page-title { text-decoration: none; font-style: italic; }
.blk-page-arrow { color: var(--text-faint); font-size: 0.85em; }
.page-picker { display: flex; flex-direction: column; gap: var(--space-2); }
.page-picker-list { max-height: 260px; overflow-y: auto; }
.blk-body > .blk-text { flex: 1; min-width: 0; }
.blk[data-type="quote"] > .blk-body > .blk-text { border-left: 3px solid currentColor; padding-left: var(--space-3); }

/* ---- Blockgriff, Auswahl, Ziehen, Slash-Menü (Schritt 3.4) ---- */
.editor { position: relative; outline: none; }
.blk-body { position: relative; }
.blk-gutter { position: absolute; left: -52px; top: 3px; display: flex; gap: 2px; opacity: 0; transition: opacity var(--dur-fast, 120ms); user-select: none; }
.blk-body:hover > .blk-gutter, .blk-gutter:focus-within { opacity: 1; }
.blk-gutter button { width: 22px; height: 24px; padding: 0; border: 0; border-radius: var(--radius-sm); background: none; color: var(--text-faint); font-size: 14px; line-height: 1; cursor: pointer; }
.blk-gutter button:hover { background: var(--bg-hover, rgba(127,127,127,.12)); color: var(--text-muted); }
.blk-handle { cursor: grab; letter-spacing: -2px; }
.blk[data-selected] > .blk-body { background: var(--accent-soft); border-radius: var(--radius-sm); }
.drop-line { position: absolute; height: 3px; border-radius: 2px; background: var(--accent); pointer-events: none; z-index: 5; }
.drop-line[hidden] { display: none; }
.slash-menu { position: fixed; z-index: 60; width: 280px; max-height: 320px; overflow-y: auto; }
.slash-menu[hidden] { display: none; }
.slash-head { padding: var(--space-1) var(--space-3); font-size: var(--text-xs, 12px); color: var(--text-faint); }
.slash-item { display: flex; flex-direction: column; align-items: flex-start; cursor: pointer; }
.slash-hint { font-size: var(--text-xs, 12px); color: var(--text-faint); }
.slash-empty { padding: var(--space-2) var(--space-3); color: var(--text-faint); font-size: var(--text-sm); }
/* Handy (6.8): links ist kein Platz – Griff und „+“ rechts am Block mit dem Cursor; unsichtbare Griffe fangen keine Fingertipps ab */
@media (max-width: 640px) {
  .blk-gutter { left: auto; right: 0; top: 0; padding: 2px; background: var(--surface); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); pointer-events: none; }
  .blk-body:focus-within > .blk-gutter, .blk-body:hover > .blk-gutter, .blk-gutter:focus-within { opacity: 1; pointer-events: auto; }
  .blk-body:focus-within { padding-right: 52px; }
  .blk-gutter button { width: 26px; height: 28px; }
}

/* ---- Erwähnungen und Backlinks (Schritt 3.6) ---- */
.rt-atom[data-kind] { border-radius: var(--radius-sm); padding: 0 2px; }
.rt-mention { cursor: pointer; font-weight: var(--weight-medium); text-decoration: underline; text-decoration-color: var(--border-strong, var(--border)); text-underline-offset: 3px; color: var(--text); }
.rt-mention:hover { background: var(--bg-hover, rgba(127,127,127,.12)); }
.rt-atom[data-kind="user"], .rt-atom[data-kind="date"] { color: var(--text-muted); }
.rt-hidden { color: var(--text-faint); font-style: italic; }
.backlinks { margin: var(--space-2) 0; }
.backlink-list { margin: var(--space-1) 0 0; padding-left: var(--space-4); }
.backlink-list[hidden] { display: none; }

/* ---- Datenbank im Seiteninhalt (Schritt 3.7) ---- */
.blk-db { margin: var(--space-2) 0; min-width: 0; overflow-x: auto; }
.db-embed-head { margin: var(--space-2) 0; }
.db-embed-title { font-size: 1.25rem; font-weight: var(--weight-bold); color: var(--text); text-decoration: none; }
.db-embed-title:hover { text-decoration: underline; }
.db-embed .view-tabs { margin-bottom: var(--space-2); }

/* ---- Medien und Dateien (Schritt 3.9) ---- */
.blk-image { margin: var(--space-2) 0; }
.blk-image img { display: block; max-width: 100%; height: auto; border-radius: var(--radius-sm); }
.blk-video video { display: block; max-width: 100%; border-radius: var(--radius-sm); }
.blk-audio audio { width: 100%; max-width: 520px; }
.blk-pdf { display: flex; flex-direction: column; gap: var(--space-1); }
.blk-pdf iframe { width: 100%; height: 520px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.blk-file { display: inline-flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--text); text-decoration: none; max-width: 100%; }
a.blk-file:hover { background: var(--bg-hover, rgba(127,127,127,.12)); }
.blk-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blk-file-size, .blk-file-link { color: var(--text-faint); font-size: var(--text-sm); }
.blk-upload { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2); color: var(--text-muted); font-size: var(--text-sm); }
.blk-media { min-width: 0; flex: 1; }
.page-cover { width: 100%; height: 220px; object-fit: cover; display: block; border-radius: 0 0 var(--radius-md) var(--radius-md); }
.page-icon-img { width: 48px; height: 48px; object-fit: cover; border-radius: var(--radius-sm); }
/* ---- Blocktypen 2 (Schritt 3.8) ---- */
/* Spalten */
.blk[data-type="column_list"] { margin: var(--space-1) 0; }
.blk[data-type="column_list"][data-selected] > .blk-cols { background: var(--accent-soft); border-radius: var(--radius-sm); }
.blk-cols { display: flex; align-items: stretch; gap: 0; }
.blk-col { flex: 1 1 0; min-width: 0; padding: 0 var(--space-2); }
.blk-col > .blk-children { padding-left: 0; min-height: 1.5em; height: 100%; }
.col-resizer { flex: none; width: 10px; margin: 0 -5px; cursor: col-resize; position: relative; z-index: 2; }
.col-resizer:hover::after { content: ""; position: absolute; left: 4px; top: 0; bottom: 0; width: 2px; background: var(--accent); border-radius: 1px; }
@media (max-width: 640px) { .blk-cols { flex-direction: column; } .col-resizer { display: none; } .blk-col { padding: 0; } }
.drop-line[data-side] { border-radius: 2px; }
.blk[data-flash] > .blk-body { animation: blk-flash 1.2s ease-out; }
@keyframes blk-flash { from { background: var(--accent-soft); } to { background: transparent; } }

/* Code */
.blk[data-type="code"] > .blk-body { position: relative; }
.blk-code-bar { display: flex; align-items: center; gap: var(--space-1); font-size: var(--text-sm); color: var(--text-muted); padding: 2px 4px 0; user-select: none; }
.blk-code-bar button { background: none; border: 0; color: inherit; font: inherit; padding: 2px 6px; border-radius: var(--radius-sm); cursor: pointer; }
.blk-code-bar button:hover:not(:disabled) { background: var(--bg-hover, rgba(127,127,127,.12)); color: var(--text); }
.blk-code-bar button:disabled { cursor: default; }
.blk-code-bar button[aria-pressed="true"] { color: var(--accent); }
.blk-code-space { flex: 1; }
.blk[data-type="code"] > .blk-body > .blk-text { white-space: pre; overflow-x: auto; overflow-wrap: normal; tab-size: 2; }
.blk[data-type="code"] > .blk-body > .blk-text.code-wrap { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Inhaltsverzeichnis */
.blk-toc { display: flex; flex-direction: column; padding: 2px 0; }
.blk-toc-item { text-align: left; background: none; border: 0; color: var(--text-muted); font: inherit; padding: 3px 4px; border-radius: var(--radius-sm); cursor: pointer; text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px; overflow-wrap: anywhere; }
.blk-toc.c-gray .blk-toc-item, .blk-toc[class*=" c-"] .blk-toc-item, .blk-toc[class*=" bg-"] .blk-toc-item { color: inherit; }
.blk-toc-item:hover { background: var(--bg-hover, rgba(127,127,127,.12)); color: var(--text); }
.blk-toc-item[data-level="2"] { padding-left: calc(4px + 1.5em); }
.blk-toc-item[data-level="3"] { padding-left: calc(4px + 3em); }
.blk-toc-empty { color: var(--text-faint); margin: 0; padding: 3px 4px; }

/* Lesezeichen (nur Link, keine Vorschau) */
.blk-bookmark { display: flex; flex-direction: column; gap: 2px; padding: var(--space-2) var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--text); text-decoration: none; margin: 2px 0; min-width: 0; }
.blk-bookmark:hover { background: var(--bg-hover, rgba(127,127,127,.08)); }
.blk-bookmark-host { font-weight: var(--weight-medium); }
.blk-bookmark-url { color: var(--text-muted); font-size: var(--text-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blk-bookmark-form { display: flex; flex-wrap: wrap; gap: var(--space-2); padding: var(--space-2); border: 1px dashed var(--border); border-radius: var(--radius-md); margin: 2px 0; }
.blk-bookmark-input { flex: 1 1 14rem; min-width: 0; }

/* Einfache Tabelle */
.blk-table-wrap { position: relative; padding: 0 22px 22px 0; margin: 2px 0; max-width: 100%; }
.blk-table-scroll { overflow-x: auto; }
.blk-table { border-collapse: collapse; min-width: 100%; }
.tbl-cell { border: 1px solid var(--border); padding: 6px 8px; min-width: 120px; vertical-align: top; text-align: left; font-weight: inherit; white-space: pre-wrap; overflow-wrap: anywhere; outline: none; line-height: 1.5; }
th.tbl-cell { background: var(--surface-2, rgba(127,127,127,.08)); font-weight: var(--weight-medium); }
.tbl-cell:focus { box-shadow: inset 0 0 0 2px var(--accent); }
.tbl-add-row, .tbl-add-col { position: absolute; background: none; border: 1px solid transparent; color: var(--text-faint); border-radius: var(--radius-sm); cursor: pointer; opacity: 0; transition: opacity var(--dur-fast, 120ms); }
.blk-table-wrap:hover .tbl-add-row, .blk-table-wrap:hover .tbl-add-col, .tbl-add-row:focus, .tbl-add-col:focus { opacity: 1; }
.tbl-add-row:hover, .tbl-add-col:hover { background: var(--bg-hover, rgba(127,127,127,.12)); color: var(--text); }
.tbl-add-col { right: 0; top: 0; bottom: 22px; width: 18px; }
.tbl-add-row { left: 0; right: 22px; bottom: 0; height: 18px; }
@media (hover: none) { .tbl-add-row, .tbl-add-col { opacity: 1; } }
.page-decor { margin-bottom: var(--space-2); }
.page-decor .page-cover { margin: calc(-1 * var(--space-7)) 0 var(--space-4); }
.page-decor .page-icon { font-size: 3rem; line-height: 1; }
.page-decor .page-icon.icon-img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--radius-md); }
.page-icon-btn { padding: 0; border: 0; background: none; cursor: pointer; border-radius: var(--radius-md); }
.page-icon-btn:hover { background: var(--bg-hover, rgba(127,127,127,.12)); }
.page-decor-actions { display: flex; gap: var(--space-1); opacity: 0; transition: opacity var(--dur-fast, 120ms); }
.page-decor:hover .page-decor-actions, .page-decor-actions:focus-within { opacity: 1; }
.node-emoji.icon-img { width: 1.1em; height: 1.1em; object-fit: cover; border-radius: 3px; vertical-align: -0.15em; }
.files-editor { display: flex; flex-direction: column; gap: var(--space-2); }
.files-list { margin: 0; padding: 0; list-style: none; }
.files-list li { display: flex; align-items: center; gap: var(--space-2); }
.files-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip { text-decoration: none; }
@media (hover: none) { .page-decor-actions { opacity: 1; } }
.editor-uploads { display: flex; flex-direction: column; gap: var(--space-1); }

/* ---- Kommentare und Posteingang (3.10b) ---- */
.page-head .page-title { flex: 1; min-width: 0; }
.page-tools { display: flex; gap: var(--space-1); flex-shrink: 0; }
.comment-count:not(:empty) { margin-left: 2px; padding: 0 6px; border-radius: var(--radius-pill); background: var(--accent-soft); color: var(--accent); font-size: var(--text-xs); }
.page-comments { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-4); }
.page-comments .comment-add { align-self: flex-start; color: var(--text-muted); }
.comment-page-threads { display: flex; flex-direction: column; gap: var(--space-2); }
.comment-thread { border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-3); background: var(--surface); display: flex; flex-direction: column; gap: var(--space-2); animation: comment-in var(--dur-med) var(--ease-out); }
.comment-thread[data-resolved="true"] { opacity: .8; }
.comment-thread.comment-flash { box-shadow: var(--focus-ring); }
@keyframes comment-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.comment-thread-head { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.comment-quote { flex: 1; min-width: 0; text-align: left; border: 0; border-left: 3px solid #e9b949; background: none; padding: 0 var(--space-2); color: var(--text-muted); font: inherit; font-size: var(--text-sm); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comment-quote-block { border-left-color: var(--border-strong); }
.comment-resolve { margin-left: auto; }
.comment { display: flex; flex-direction: column; gap: 2px; }
.comment-meta { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); }
.comment-meta .comment-more { margin-left: auto; opacity: 0; transition: opacity var(--dur-fast); }
.comment:hover .comment-more, .comment-more:focus-visible, .comment-more[aria-expanded="true"] { opacity: 1; }
.comment-time, .comment-edited { font-size: var(--text-xs); }
.comment-body { white-space: pre-wrap; overflow-wrap: anywhere; padding-left: 28px; }
.comment-reactions { display: flex; flex-wrap: wrap; gap: 4px; padding-left: 28px; }
.comment-reactions:empty { display: none; }
.reaction { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--surface); font: inherit; font-size: var(--text-xs); cursor: pointer; transition: transform var(--dur-fast) var(--ease-spring); }
.reaction:hover { background: var(--bg-hover); }
.reaction:active { transform: scale(.92); }
.reaction[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.reaction-add { color: var(--text-faint); }
.comment-composer { position: relative; display: flex; flex-direction: column; gap: var(--space-1); }
.comment-input { width: 100%; resize: none; min-height: 34px; padding: 6px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); color: var(--text); font: inherit; font-size: var(--text-sm); }
.comment-input:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus-ring); }
.comment-composer-actions { display: flex; justify-content: flex-end; gap: var(--space-1); }
.comment-thread .comment-composer-actions .comment-send:disabled { opacity: .5; }
.comment-mention-list { position: absolute; top: 100%; left: 0; z-index: 60; min-width: 200px; max-height: 220px; overflow: auto; padding: 4px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-raised); box-shadow: var(--shadow-md); }
.comment-mention-item { display: flex; align-items: center; gap: var(--space-2); padding: 4px 8px; border-radius: var(--radius-sm); cursor: pointer; font-size: var(--text-sm); }
.comment-mention-item[aria-selected="true"], .comment-mention-item:hover { background: var(--bg-hover); }
.comment-panel { display: flex; flex-direction: column; gap: var(--space-2); max-height: min(70vh, 640px); overflow: auto; }
.comment-panel-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); position: sticky; top: 0; background: inherit; }
.comment-tabs { display: flex; gap: 2px; }
.comment-tab { border: 0; background: none; padding: 4px 10px; border-radius: var(--radius-sm); font: inherit; font-size: var(--text-sm); color: var(--text-muted); cursor: pointer; }
.comment-tab[aria-selected="true"] { background: var(--bg-active); color: var(--text); }
.comment-empty { padding: var(--space-3) 0; }
/* Inline-Kommentare: offene Diskussionen hervorheben, aufgelöste nicht */
.m-comment.cm-open { background: rgba(233, 185, 73, .28); border-bottom: 2px solid rgba(233, 185, 73, .9); cursor: pointer; }
.blk-comment-badge { position: absolute; right: -36px; top: 2px; display: inline-flex; align-items: center; gap: 2px; height: 22px; padding: 0 6px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--text-muted); font-size: var(--text-xs); cursor: pointer; }
.blk-comment-badge:hover { background: var(--bg-hover); color: var(--text); }
@media (max-width: 720px) { .blk-comment-badge { right: 0; top: -18px; } }
/* Posteingang */
.inbox-badge { margin-left: auto; min-width: 18px; padding: 0 6px; border-radius: var(--radius-pill); background: var(--danger); color: #fff; font-size: var(--text-xs); text-align: center; }
.inbox-tabs { margin-bottom: var(--space-3); }
.inbox-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.inbox-item { display: flex; align-items: flex-start; gap: var(--space-2); border-bottom: 1px solid var(--border); }
.inbox-link { flex: 1; min-width: 0; display: flex; gap: var(--space-2); padding: var(--space-3) var(--space-2); color: inherit; text-decoration: none; border-radius: var(--radius-sm); }
.inbox-link:hover { background: var(--bg-hover); }
.inbox-dot { width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; flex-shrink: 0; }
.inbox-item[data-read="false"] .inbox-dot { background: var(--accent); }
.inbox-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.inbox-line { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.inbox-text { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-time { font-size: var(--text-xs); }
.inbox-actions { display: flex; flex-direction: column; padding-top: var(--space-2); }
.inbox-empty { padding: var(--space-4) 0; }

/* ---- Seitenverlauf, Papierkorb, Einstellungen (3.11b) ---- */
.dialog.dialog-wide { width: min(960px, calc(100vw - 32px)); max-width: none; }
.version-dialog { display: grid; grid-template-columns: 260px 1fr; gap: var(--space-4); min-height: 360px; max-height: min(70vh, 640px); }
.version-list { list-style: none; margin: 0; padding: 0; overflow: auto; border-right: 1px solid var(--border); padding-right: var(--space-2); }
.version-item { display: flex; flex-direction: column; gap: 2px; padding: var(--space-2); border-radius: var(--radius-sm); cursor: pointer; font-size: var(--text-sm); }
.version-item:hover { background: var(--bg-hover); }
.version-item[aria-selected="true"] { background: var(--accent-soft); }
.version-item:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.version-preview { overflow: auto; padding: 0 var(--space-2); }
.version-preview-title { font-size: var(--text-xl); margin: 0 0 var(--space-3); }
.version-blk { display: flex; gap: var(--space-2); padding: 2px 0; }
.version-blk[data-type="heading_1"] { font-size: var(--text-xl); font-weight: var(--weight-bold); }
.version-blk[data-type="heading_2"] { font-size: var(--text-lg); font-weight: var(--weight-bold); }
.version-blk[data-type="heading_3"] { font-weight: var(--weight-bold); }
.version-blk[data-type="quote"] { border-left: 3px solid var(--text); padding-left: var(--space-2); }
.version-blk hr { flex: 1; border: 0; border-top: 1px solid var(--border); }
.version-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
pre.version-text { font-family: var(--font-mono); font-size: var(--text-sm); background: var(--bg-subtle); padding: var(--space-2); border-radius: var(--radius-sm); flex: 1; }
@media (max-width: 720px) { .version-dialog { grid-template-columns: 1fr; } .version-list { border-right: 0; max-height: 180px; border-bottom: 1px solid var(--border); } }
.trash-search { width: 100%; margin-bottom: var(--space-3); }
.trash-list { list-style: none; margin: 0; padding: 0; }
.trash-item { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-2); border-bottom: 1px solid var(--border); }
.trash-icon { width: 24px; display: inline-grid; place-items: center; flex-shrink: 0; }
.trash-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.trash-meta { font-size: var(--text-xs); }
.trash-actions { display: flex; gap: var(--space-1); flex-wrap: wrap; justify-content: flex-end; }
.trash-empty { padding: var(--space-4) 0; }
@media (max-width: 720px) { .trash-item { flex-wrap: wrap; } .trash-actions { width: 100%; justify-content: flex-start; } }
.settings-form { max-width: 420px; }
.field-hint { font-size: var(--text-xs); margin: 0; }

/* ---- Vorlagen (3.12) ---- */
.btn-split { display: inline-flex; }
.btn-split > .btn:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.btn-split > .btn-split-more { border-top-left-radius: 0; border-bottom-left-radius: 0; padding: 0 6px; border-left: 1px solid rgba(255, 255, 255, .35); }
.template-panel { display: flex; flex-direction: column; gap: var(--space-2); max-height: min(70vh, 560px); overflow: auto; }
.template-manage { display: flex; flex-direction: column; gap: var(--space-2); }
.template-hint { font-size: var(--text-xs); margin: 0; }
.template-row { display: flex; flex-direction: column; gap: 4px; padding: var(--space-2); border: 1px solid var(--border); border-radius: var(--radius-md); }
.template-row .template-name { flex: 1; min-width: 0; }
.template-checks { gap: var(--space-3); flex-wrap: wrap; font-size: var(--text-sm); color: var(--text-muted); }
.template-check { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.template-repeat { display: flex; flex-direction: column; gap: 4px; font-size: var(--text-sm); }
.template-repeat-edit { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-2); }
.template-repeat-state { margin: 0; }
.template-banner { margin-bottom: var(--space-3); padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); background: var(--warning-soft); color: var(--warning); font-size: var(--text-sm); }

/* ---- Seitenfunktionen (3.13) ---- */
.page.page-full-width { max-width: none; padding-left: clamp(var(--space-4), 6vw, 96px); padding-right: clamp(var(--space-4), 6vw, 96px); }
.lock-chip { color: var(--text-muted); }
.lock-chip:disabled { opacity: 1; cursor: default; }

/* ---- Buttons (Schritt 4.9) ---- */
.prop-button, .blk-button-press { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.prop-button span, .blk-button-press span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blk-button { padding: 2px 0; display: flex; align-items: center; gap: 4px; }
.blk-button-edit { opacity: 0; }
.blk:hover .blk-button-edit, .blk-button-edit:focus-visible { opacity: 1; }
@media (hover: none) { .blk-button-edit { opacity: 1; } }
td[data-type="button"] .cell-content { overflow: visible; }

/* ---- Automatisierungen (Schritt 4.11a) ---- */
.auto-panel { display: flex; flex-direction: column; gap: var(--space-3); max-height: min(70vh, 760px); overflow-y: auto; padding-right: 4px; }
.auto-panel h3 { margin: var(--space-2) 0 0; font-size: var(--text-md, 1rem); }
.auto-list, .auto-runs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.auto-item { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-md, 8px); }
.auto-item[data-enabled="false"] .auto-main strong { color: var(--text-muted); }
.auto-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.auto-main .muted { font-size: var(--text-sm); overflow-wrap: anywhere; }
.auto-actions { display: flex; gap: var(--space-1); flex-shrink: 0; }
.auto-enabled { flex-shrink: 0; font-size: var(--text-sm); }
.auto-triggers, .auto-rule, .auto-rule-extra, .auto-to { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-2); }
.field { display: inline-flex; flex-direction: column; gap: 2px; }
.field-label { font-size: var(--text-xs); color: var(--text-muted); }
.auto-action-list { display: flex; flex-direction: column; gap: var(--space-2); }
.auto-action { border: 1px solid var(--border); border-radius: var(--radius-md, 8px); padding: var(--space-2) var(--space-3); display: flex; flex-direction: column; gap: var(--space-2); }
.auto-action-head { display: flex; justify-content: space-between; align-items: center; }
.auto-set { display: flex; flex-direction: column; gap: var(--space-1); }
.auto-set-row { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.auto-set-name { min-width: 120px; font-size: var(--text-sm); }
.auto-recipients { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.auto-formula-wrap { display: inline-flex; gap: 4px; align-items: center; flex: 1; min-width: 200px; }
.auto-formula-wrap input { flex: 1; }
.auto-formula { font-family: var(--font-mono, monospace); }
.auto-error { color: var(--danger, #c0392b); margin: 0; }
.auto-save { display: flex; justify-content: flex-end; }
.auto-run { display: grid; grid-template-columns: auto auto 1fr auto; gap: var(--space-2); align-items: center; padding: var(--space-1) 0; border-bottom: 1px solid var(--border); }
.auto-run-error { color: var(--danger, #c0392b); grid-column: 1 / -1; font-size: var(--text-sm); }
@media (max-width: 600px) {
  .auto-open-label { display: none; }
  .auto-item { flex-wrap: wrap; }
  /* FEHLER-019: Textspalte nicht auf 0 schrumpfen lassen; Knöpfe rutschen in die nächste Zeile */
  .auto-main { flex: 1 1 180px; }
  .auto-main .chip { align-self: flex-start; max-width: 100%; white-space: normal; height: auto; }
  .auto-actions { margin-left: auto; }
  .auto-run { grid-template-columns: auto 1fr; }
}

/* ---- Erinnerungen (Schritt 4.11c) ---- */
.prop-bell { margin-left: auto; padding: 0 4px; opacity: .45; font-size: 12px; }
.prop-bell[data-on="true"] { opacity: 1; }
.prop-row:hover .prop-bell, .prop-bell:focus-visible { opacity: 1; }
.reminder-editor { display: flex; flex-direction: column; gap: var(--space-2); }
.rt-atom[data-reminder] { color: var(--accent); }

/* ---- Anbindungen (Schritt 5.1) ---- */
.integration-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.integration-item, .mailbox-item { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-3); padding: var(--space-2) var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-md, 8px); }
.integration-main, .mailbox-item .integration-main { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.integration-main .muted { font-size: var(--text-sm); }

/* ---- E-Mail-Entwurf (Schritt 5.4) ---- */
/* FEHLER-021: keine Mindestbreite über der Dialogbreite (480 px), sonst scrollt der Dialog seitlich und der Innenabstand verschwindet. */
.mail-form { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.mail-form .field { min-width: 0; }
.mail-body { resize: vertical; min-height: 140px; font: inherit; }

/* ---- Antwort-Mails (Schritt 5.6) ---- */
.reply-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.reply-item { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--space-3); padding: var(--space-2) var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-md, 8px); }
.reply-main { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.reply-preview { font-size: var(--text-sm); color: var(--text-muted); }
.reply-lead { font-size: var(--text-sm); }
.reply-actions { display: flex; gap: var(--space-1); flex-wrap: wrap; }

/* ---- API-Tokens (Schritt 5.9) ---- */
.token-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-2); }
.token-created { margin-top: var(--space-3); padding: var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-md, 8px); background: var(--bg-subtle, transparent); }
.token-plain { font-family: var(--font-mono, monospace); overflow-wrap: anywhere; user-select: all; padding: 2px 6px; }
.table-scroll { overflow-x: auto; }
.token-table { border-collapse: collapse; width: 100%; font-size: var(--text-sm); }
.token-table th, .token-table td { text-align: left; padding: var(--space-1) var(--space-2); border-bottom: 1px solid var(--border); vertical-align: top; }

/* Ansicht „Diagramm“ (6.2) */
.chart-view { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.chart-head { display: flex; align-items: center; gap: var(--space-3); min-height: 28px; }
.chart-note { font-size: var(--text-xs); }
.chart-figure { margin: 0; min-width: 0; }
.chart-svg { display: block; max-width: 100%; height: auto; overflow: visible; font-family: var(--font-sans); }
.chart-tick { font-size: 11px; fill: var(--text-muted); }
.chart-axis-title { font-size: 12px; fill: var(--text-muted); font-weight: var(--weight-medium); }
.chart-datalabel { font-size: 11px; fill: var(--text); }
.chart-datalabel-in { fill: #fff; font-weight: var(--weight-medium); }
.chart-gridline { stroke: var(--border); stroke-width: 1; }
.chart-zero { stroke: var(--border-strong); stroke-width: 1; }
.chart-bar, .chart-slice, .chart-point { transition: opacity var(--dur-fast); }
.chart-bar:hover, .chart-slice:hover, .chart-point:hover { opacity: 0.8; }
.chart-center-value { font-size: 22px; font-weight: var(--weight-bold); fill: var(--text); }
.chart-donut { margin: 0 auto; }
.chart-legend { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); margin: var(--space-3) 0 0; padding: 0; font-size: var(--text-sm); }
.chart-legend li { display: inline-flex; align-items: center; gap: var(--space-1); min-width: 0; }
.chart-swatch { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.chart-number { padding: var(--space-5) var(--space-4); }
.chart-number-value { font-size: 3rem; font-weight: var(--weight-bold); line-height: 1.1; font-variant-numeric: tabular-nums; }
.chart-empty { padding: var(--space-5) 0; display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); }
.chart-table { border-collapse: collapse; font-size: var(--text-sm); min-width: 280px; }
.chart-table th, .chart-table td { border-bottom: 1px solid var(--border); padding: var(--space-1) var(--space-3); text-align: left; }
.chart-table td { text-align: right; font-variant-numeric: tabular-nums; }
.chart-editor { display: flex; flex-direction: column; gap: var(--space-2); max-height: min(70vh, 560px); overflow: auto; }
.chart-editor-head { font-size: var(--text-sm); margin-top: var(--space-2); }

/* Ansicht „Dashboard“ (6.3): 4 Spalten, auf schmalen Bildschirmen eine */
.dashboard { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.dash-bar { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.dash-count { margin-right: auto; font-size: var(--text-sm); }
.dash-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3); }
.dash-widget { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.dash-widget[data-height="small"] { height: 280px; }
.dash-widget[data-height="medium"] { height: 400px; }
.dash-widget[data-height="large"] { height: 560px; }
.dash-widget:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.dash-widget.dragging { opacity: 0.5; }
.dashboard[data-editing="true"] .dash-widget { border-style: dashed; cursor: grab; }
.dash-head { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--border); min-height: 40px; }
.dash-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--text-sm); }
.dash-db { display: inline-flex; align-items: center; gap: var(--space-1); font-weight: var(--weight-medium); color: inherit; text-decoration: none; }
.dash-db:hover { text-decoration: underline; }
.dash-tools { display: flex; align-items: center; gap: 2px; flex: none; }
.dash-body { flex: 1; min-height: 0; overflow: auto; padding: var(--space-2) var(--space-3); }
.dash-body .db-embed-head { display: none; }
.dash-noaccess { padding: var(--space-4) 0; }
.dash-empty { padding: var(--space-5) 0; }
@media (max-width: 720px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .dash-widget { grid-column: auto !important; }
  .dash-head { flex-wrap: wrap; }
}

/* Globale Dashboard-Filter (6.4) */
.dash-filters { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); }
.dash-chip { display: inline-flex; align-items: center; gap: var(--space-1); padding: 2px var(--space-1) 2px var(--space-2); border-radius: var(--radius-md); background: var(--accent-soft); font-size: var(--text-sm); max-width: 100%; }
.dash-chip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-local { font-size: var(--text-xs); }
.dash-badge { margin-left: var(--space-2); padding: 0 var(--space-1); border-radius: var(--radius-sm, 4px); background: var(--accent-soft); font-size: var(--text-xs); color: var(--text); }
.dash-filter-editor { display: flex; flex-direction: column; gap: var(--space-2); }
.dash-filter-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; align-items: center; gap: var(--space-2); }
.dash-filter-row .dash-range { grid-column: 1 / -1; gap: var(--space-2); }
.dash-filter-hint { font-size: var(--text-xs); }

/* Animationen (6.4): Widgets blenden ein, Balken wachsen; bei „weniger Bewegung“ aus (base.css) */
.dash-widget { animation: dash-in var(--dur-slow) var(--ease-out) both; }
@keyframes dash-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.chart-bar { transform-box: fill-box; transform-origin: 50% 100%; animation: bar-grow var(--dur-slow) var(--ease-out) both; }
@keyframes bar-grow { from { transform: scaleY(0); } to { transform: none; } }
.chart-hbar { transform-origin: 0 50%; animation-name: bar-grow-x; }
@keyframes bar-grow-x { from { transform: scaleX(0); } to { transform: none; } }
.chart-slice, .chart-line, .chart-area, .chart-point { animation: fade-in var(--dur-slow) var(--ease-out) both; }

/* Ansicht „Timeline“ (6.5) */
.timeline-wrap { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.timeline-tools { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.timeline-hint { font-size: var(--text-xs); }
.timeline-scroll { overflow: auto; max-height: 70vh; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.timeline-grid { position: relative; min-width: 100%; }
.timeline-header { position: sticky; top: 0; z-index: 3; display: flex; background: var(--surface); border-bottom: 1px solid var(--border); height: 48px; }
.timeline-corner { position: sticky; left: 0; z-index: 4; flex: none; width: var(--tl-label); padding: var(--space-2) var(--space-3); background: var(--surface); border-right: 1px solid var(--border); font-size: var(--text-sm); color: var(--text-muted); }
.timeline-scale { position: relative; flex: none; }
.timeline-scale-top, .timeline-scale-bottom { position: relative; height: 24px; }
.timeline-scale span { position: absolute; top: 4px; white-space: nowrap; font-size: var(--text-xs); color: var(--text-muted); padding-left: 4px; border-left: 1px solid var(--border); }
.timeline-scale-top span { font-weight: var(--weight-medium); color: var(--text); }
.timeline-scale-bottom span[data-weekend="true"] { background: var(--surface-sunken, rgba(0,0,0,0.03)); }
.timeline-body { position: relative; }
.timeline-row { position: relative; border-bottom: 1px solid var(--border); }
.timeline-row:hover { background: var(--accent-soft); }
.timeline-label { position: sticky; left: 0; z-index: 2; width: var(--tl-label); height: 100%; padding: 0 var(--space-3); border: 0; border-right: 1px solid var(--border); background: var(--surface); text-align: left; font: inherit; font-size: var(--text-sm); color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.timeline-label:focus-visible { outline: none; box-shadow: inset var(--focus-ring); }
.timeline-group { position: sticky; left: 0; padding: var(--space-2) var(--space-3); font-size: var(--text-sm); font-weight: var(--weight-medium); background: var(--surface); border-bottom: 1px solid var(--border); }
.timeline-bar { position: absolute; top: 6px; height: 24px; display: flex; align-items: center; border-radius: var(--radius-md); background: var(--chart-1); color: #fff; font-size: var(--text-xs); cursor: grab; touch-action: none; user-select: none; overflow: hidden; z-index: 1; animation: fade-in var(--dur-med) var(--ease-out) both; }
.timeline-bar.dragging { cursor: grabbing; opacity: 0.85; box-shadow: var(--shadow-md, 0 2px 8px rgba(0,0,0,.2)); }
.timeline-bar:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.timeline-bar-label { flex: 1; min-width: 0; padding: 0 var(--space-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }
.timeline-handle { position: absolute; top: 0; width: 6px; height: 100%; cursor: ew-resize; pointer-events: none; }
.timeline-handle-start { left: 0; }
.timeline-handle-end { right: 0; }
.timeline-bar:hover .timeline-handle { background: rgba(255,255,255,0.35); }
.timeline-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--danger, #dc2626); opacity: 0.6; z-index: 2; pointer-events: none; }
.timeline-undated summary { cursor: pointer; font-size: var(--text-sm); color: var(--text-muted); }
.timeline-undated ul { list-style: none; padding: 0; margin: var(--space-2) 0 0; display: flex; flex-wrap: wrap; gap: var(--space-1); }

/* Eigenschaft „Ort“ (6.6) */
.place-pin { color: var(--text-muted); }
.place-coords { gap: var(--space-2); }
.place-coords .field { flex: 1; min-width: 0; }

/* Ansicht „Karte“ (6.7b): eigene Kachelanzeige */
.map-wrap { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.map-viewport { position: relative; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-md); background: #dfe7ec; cursor: grab; touch-action: none; user-select: none; }
.map-viewport.dragging { cursor: grabbing; }
.map-viewport:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.map-tiles, .map-pins { position: absolute; inset: 0; }
.map-tile { position: absolute; width: 256px; height: 256px; max-width: none; pointer-events: none; }
.map-pin { position: absolute; width: 28px; height: 28px; margin: -28px 0 0 -14px; padding: 0; border: 0; background: none; cursor: pointer; }
.map-pin-dot { display: block; width: 18px; height: 18px; margin: 2px auto 0; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--danger, #dc2626); border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.35); }
.map-pin:focus-visible { outline: none; }
.map-pin:focus-visible .map-pin-dot { box-shadow: var(--focus-ring); }
.map-controls { position: absolute; top: var(--space-2); right: var(--space-2); display: flex; flex-direction: column; gap: 2px; }
.map-controls .btn { min-width: 32px; background: var(--surface); }
.map-attribution { position: absolute; right: 0; bottom: 0; padding: 1px 6px; font-size: 11px; background: rgba(255,255,255,0.85); color: #333; }
.map-attribution a { color: inherit; }
.map-geocode { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.map-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }

/* ---- Handy: Touch-Ziehen (6.8, public/js/ui/touch-drag.js) ---- */
[draggable="true"] { -webkit-touch-callout: none; }
.touch-drag-ghost { position: fixed; left: 0; top: 0; z-index: 1000; pointer-events: none; opacity: 0.85; box-shadow: var(--shadow-lg); border-radius: var(--radius-md); background: var(--surface); margin: 0; }
body.touch-dragging, body.touch-dragging * { user-select: none; -webkit-user-select: none; }

/* ---- Barrierefreiheit (6.10) ---- */
.skip-link { position: fixed; left: var(--space-2); top: var(--space-2); z-index: 1100; padding: var(--space-2) var(--space-3); border: 0; border-radius: var(--radius-md);
  background: var(--accent); color: var(--accent-text); font-weight: var(--weight-medium); cursor: pointer; transform: translateY(-200%); }
.skip-link:focus, .skip-link:focus-visible { transform: none; box-shadow: var(--focus-ring); }
.content:focus-visible { box-shadow: none; } /* Ziel des Sprunglinks, kein Rahmen um den ganzen Inhalt */

/* ---- Postfächer (Schritt 9.1b) ---- */
.mailbox-add { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-3); padding: var(--space-3); border: 1px dashed var(--border); border-radius: var(--radius-md, 8px); max-width: 480px; }
.mailbox-add h3 { margin: 0; font-size: var(--text-base, 1rem); }
.mailbox-add .btn { align-self: flex-start; }
.default-sender { margin-bottom: var(--space-3); }
.default-sender .row { display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; }
.default-sender .input { flex: 1 1 220px; min-width: 0; }
.mailbox-queue { flex: 1 0 100%; margin: 0; padding-left: var(--space-5, 20px); font-size: var(--text-sm); display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.throttle-form .row { display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; }
.throttle-form .row .input { width: auto; flex: 0 1 120px; min-width: 0; }
.throttle-form .day-row { gap: var(--space-3); }
.metrics-table { border-collapse: collapse; font-size: var(--text-sm); }
.metrics-table th, .metrics-table td { padding: 4px 8px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.metrics-body .row { display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; margin-top: var(--space-2); }
.domain-checks { list-style: none; margin: 4px 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: var(--text-sm); overflow-wrap: anywhere; }
