/* ERZEUGT — nicht von Hand ändern.
 *
 * Quelle:  design-system/ (Span Design System v0.19.0 (1ce234f))
 * Befehl:  bash scripts/design-system.sh build
 *
 * Tokens und Komponentenmaße gehören dem Design System. Eine Farbe, ein
 * Abstand oder ein Radius, der hier von Hand dazukommt, ist beim nächsten
 * build weg — und bis dahin eine zweite Wahrheit.
 */
/* Span Design System: aus tokens.json erzeugt, nicht von Hand ändern */
:root, [data-theme="light"] {--surface-canvas: #f1f3f5; --surface-raised: #ffffff; --surface-sunken: #e8ecf0; --surface-navy: #0e2744; --surface-navy-deep: #081a30; --line: #d9dfe6; --line-strong: #7b899d; --ink: #0f1f3a; --ink-muted: #4f5f7a; --ink-faint: #66748a; --on-navy: #ffffff; --on-navy-muted: #c5d0e0; --navy: #0e2744; --on-navy-fill: #ffffff; --navy-soft: #e3eaf4; --accent: #c08a3e; --accent-ink: #8a5a16; --accent-soft: #f6ecda; --success: #11695f; --success-soft: #dcf2ea; --warning: #8f5400; --warning-soft: #fcefd2; --danger: #b02a24; --danger-soft: #fbe3e0; --on-danger: #ffffff; --info: #1f4e8c; --info-soft: #e1eaf7; --focus: var(--info); --link: var(--info); --shadow-floating: 0 1px 2px rgba(15, 31, 58, 0.06), 0 8px 24px rgba(15, 31, 58, 0.10);}
[data-theme="dark"] {--surface-canvas: #0b1220; --surface-raised: #121b2d; --surface-sunken: #0d1524; --surface-navy: #0e2744; --surface-navy-deep: #081a30; --line: #243149; --line-strong: #5b6b86; --ink: #e6ecf5; --ink-muted: #a3b2c9; --ink-faint: #8291ab; --on-navy: #ffffff; --on-navy-muted: #c5d0e0; --navy: #dfe7f3; --on-navy-fill: #0e2744; --navy-soft: #182a47; --accent: #d9a85c; --accent-ink: #e3b876; --accent-soft: #2e2412; --success: #5ecfae; --success-soft: #10302a; --warning: #f0b45a; --warning-soft: #3a2a0d; --danger: #ff8c82; --danger-soft: #3d1512; --on-danger: #0b1220; --info: #8db4f0; --info-soft: #16284a; --focus: var(--info); --link: var(--info); --shadow-floating: 0 1px 2px rgba(0, 0, 0, 0.40), 0 8px 24px rgba(0, 0, 0, 0.50);}
[data-brand="pierspot"][data-theme="dark"], [data-brand="pierspot"] [data-theme="dark"], [data-theme="dark"] [data-brand="pierspot"] {--surface-canvas: #0a1512; --surface-raised: #111e1a; --surface-sunken: #0c1916; --surface-navy: #17473b; --surface-navy-deep: #0f3329; --line: #22352e; --line-strong: #5a7469; --ink: #e3eee9; --ink-muted: #a1b8ae; --ink-faint: #839c91; --on-navy: #ffffff; --on-navy-muted: #bfd8cd; --navy: #cfe8dd; --on-navy-fill: #12382d; --navy-soft: #163a30; --accent: #cfc0a6; --accent-ink: #e0d1b6; --accent-soft: #2a251c; --success: #79c9df; --success-soft: #0f2c35; --tenant: var(--navy);}
[data-brand="pierspot"], [data-brand="pierspot"] [data-theme="light"], [data-brand="pierspot"][data-theme="light"] {--surface-canvas: #f0f4f2; --surface-raised: #ffffff; --surface-sunken: #e7eeea; --surface-navy: #17473b; --surface-navy-deep: #0f3329; --line: #d5e0da; --line-strong: #71877d; --ink: #12261f; --ink-muted: #465c53; --ink-faint: #5a6e65; --on-navy: #ffffff; --on-navy-muted: #bfd8cd; --navy: #1e5a4a; --on-navy-fill: #ffffff; --navy-soft: #e1efe9; --accent: #a88d68; --accent-ink: #66563f; --accent-soft: #f4eee3; --success: #0c6276; --success-soft: #dcf0f4; --tenant: var(--navy);}
[data-brand="neutral"][data-theme="dark"], [data-brand="neutral"] [data-theme="dark"], [data-theme="dark"] [data-brand="neutral"] {--surface-canvas: #0b1220; --surface-raised: #121b2d; --surface-sunken: #0d1524; --surface-navy: #0e2744; --surface-navy-deep: #081a30; --line: #243149; --line-strong: #5b6b86; --ink: #e6ecf5; --ink-muted: #a3b2c9; --ink-faint: #8291ab; --on-navy: #ffffff; --on-navy-muted: #c5d0e0; --navy: #dfe7f3; --on-navy-fill: #0e2744; --navy-soft: #182a47; --accent: #d9a85c; --accent-ink: #e3b876; --accent-soft: #2e2412; --success: #5ecfae; --success-soft: #10302a; --tenant: var(--navy);}
[data-brand="neutral"], [data-brand="neutral"] [data-theme="light"], [data-brand="neutral"][data-theme="light"] {--surface-canvas: #f1f3f5; --surface-raised: #ffffff; --surface-sunken: #e8ecf0; --surface-navy: #0e2744; --surface-navy-deep: #081a30; --line: #d9dfe6; --line-strong: #7b899d; --ink: #0f1f3a; --ink-muted: #4f5f7a; --ink-faint: #66748a; --on-navy: #ffffff; --on-navy-muted: #c5d0e0; --navy: #0e2744; --on-navy-fill: #ffffff; --navy-soft: #e3eaf4; --accent: #c08a3e; --accent-ink: #8a5a16; --accent-soft: #f6ecda; --success: #11695f; --success-soft: #dcf2ea; --tenant: var(--navy);}
:root {--space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px; --space-12: 48px; --space-16: 64px; --space-24: 96px; --space-32: 128px; --radius-xs: 4px; --radius-sm: 6px; --radius-md: 10px; --radius-lg: 16px; --control-sm: 28px; --control-md: 36px; --control-lg: 44px; --control-touch: 56px; --row-height: 36px; --sidebar-width: 240px; --content-max: 1200px; --reading-max: 640px; --hairline: 1px; --hatch: 6px; --tenant: var(--navy); --font-sans: "Hanken Grotesk", "Helvetica Neue", Arial, system-ui, sans-serif; --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace; --font-serif: "Newsreader", "Source Serif 4", Georgia, serif;}
.mk-display { font-family: var(--font-sans); font-size: 64px; line-height: 68px; font-weight: 500; letter-spacing: -0.02em; }
.mk-heading-lg { font-family: var(--font-sans); font-size: 48px; line-height: 52px; font-weight: 500; letter-spacing: -0.015em; }
.mk-heading { font-family: var(--font-sans); font-size: 36px; line-height: 40px; font-weight: 500; letter-spacing: -0.01em; }
.mk-heading-sm { font-family: var(--font-sans); font-size: 28px; line-height: 34px; font-weight: 500; letter-spacing: -0.005em; }
.mk-lead { font-family: var(--font-sans); font-size: 18px; line-height: 28px; font-weight: 400; }
.mk-body { font-family: var(--font-sans); font-size: 16px; line-height: 26px; font-weight: 400; }
.mk-eyebrow { font-family: var(--font-sans); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.08em; }
.app-title { font-family: var(--font-sans); font-size: 24px; line-height: 30px; font-weight: 600; letter-spacing: -0.01em; }
.app-section { font-family: var(--font-sans); font-size: 18px; line-height: 24px; font-weight: 600; letter-spacing: -0.005em; }
.app-body { font-family: var(--font-sans); font-size: 14px; line-height: 20px; font-weight: 400; }
.app-body-strong { font-family: var(--font-sans); font-size: 14px; line-height: 20px; font-weight: 600; }
.app-label { font-family: var(--font-sans); font-size: 13px; line-height: 16px; font-weight: 500; }
.app-cell { font-family: var(--font-sans); font-size: 13px; line-height: 18px; font-weight: 400; }
.app-caption { font-family: var(--font-sans); font-size: 12px; line-height: 16px; font-weight: 400; }
.app-kpi { font-family: var(--font-sans); font-size: 28px; line-height: 32px; font-weight: 500; letter-spacing: -0.01em; }
.halle-title { font-family: var(--font-sans); font-size: 22px; line-height: 28px; font-weight: 600; }
.halle-body { font-family: var(--font-sans); font-size: 18px; line-height: 26px; font-weight: 500; }
.halle-button { font-family: var(--font-sans); font-size: 18px; line-height: 24px; font-weight: 600; }
.board-value { font-family: var(--font-sans); font-size: 56px; line-height: 60px; font-weight: 500; letter-spacing: -0.02em; }
.mono-id { font-family: var(--font-mono); font-size: 13px; line-height: 18px; font-weight: 500; letter-spacing: 0.01em; }
.mono-id-lg { font-family: var(--font-mono); font-size: 16px; line-height: 22px; font-weight: 500; letter-spacing: 0.01em; }
.mono-id-xl { font-family: var(--font-mono); font-size: 28px; line-height: 36px; font-weight: 500; letter-spacing: 0.01em; }
.quote { font-family: var(--font-serif); font-size: 24px; line-height: 32px; font-weight: 400; font-style: italic; }

/* Span components. Alle Farben, Maße und Schriften kommen aus tokens.css; hier steht nur Struktur. */

.ys, .ys * { box-sizing: border-box; }
.ys { font-family: var(--font-sans); color: var(--ink); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
/* Native Teile folgen dem Thema: Scrollbalken, Datumswaehler, Auswahllisten des Browsers. Ohne das
   bleibt im Dunkelmodus ein heller Scrollbalken stehen, und der verraet, dass die Oberflaeche nur
   angemalt ist. */
:root { color-scheme: light; }
:root[data-theme="dark"], [data-theme="dark"] { color-scheme: dark; }
.ys input, .ys select, .ys textarea { font-family: inherit; color: inherit; }
.ys input.ys-input-mono { font-family: var(--font-mono); }
.ys-btn, .ys-tab, .ys-chip, .ys-nav-toggle, .ys-ws { font-family: inherit; }
.ys :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--radius-xs); }

/* ---------- Button ---------- */
.ys-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); height: var(--control-md); padding: 0 var(--space-4); font-weight: 500; border-radius: var(--radius-sm); border: var(--hairline) solid transparent; background: transparent; cursor: pointer; white-space: nowrap; transition: background-color 150ms ease-out, border-color 150ms ease-out, color 150ms ease-out; text-decoration: none; }
.ys-btn:disabled { opacity: .4; cursor: default; }
.ys-btn[aria-disabled="true"] { opacity: .4; cursor: default; pointer-events: none; }
.ys-btn-primary { background: var(--navy); color: var(--on-navy-fill); }
.ys-btn-primary:hover:not(:disabled) { filter: brightness(.94); }
.ys-btn-outline { border-color: var(--line-strong); color: var(--ink); background: var(--surface-raised); }
.ys-btn-outline:hover:not(:disabled) { background: var(--surface-sunken); }
.ys-btn-ghost { color: var(--ink); }
.ys-btn-ghost:hover:not(:disabled) { background: var(--surface-sunken); }
.ys-btn-danger { border-color: var(--danger); color: var(--danger); background: var(--surface-raised); }
.ys-btn-danger:hover:not(:disabled) { background: var(--danger-soft); }
.ys-btn-danger.ys-btn-filled { background: var(--danger); color: var(--on-danger); border-color: var(--danger); }
.ys-btn-danger.ys-btn-filled:hover:not(:disabled) { background: var(--danger); filter: brightness(.94); }
.ys-btn-sm { height: var(--control-sm); padding: 0 var(--space-2); font-size: 13px; line-height: 16px; font-weight: 500; }
.ys-btn-sm svg { width: 14px; height: 14px; }
.ys-btn-lg { height: var(--control-lg); padding: 0 var(--space-5); }
.ys-btn-touch { height: var(--control-touch); padding: 0 var(--space-6); border-radius: var(--radius-md); }
.ys-btn-block { display: flex; width: 100%; }
.ys-btn-icon { width: var(--control-md); padding: 0; }
.ys-btn-icon.ys-btn-sm { width: var(--control-sm); }
.ys-btn-icon.ys-btn-lg { width: var(--control-lg); }
.ys-btn-icon[aria-pressed="true"] { background: var(--surface-sunken); color: var(--ink); }
.ys-btn-onnavy.ys-btn-outline { border-color: var(--on-navy); color: var(--on-navy); background: transparent; }
.ys-btn-onnavy.ys-btn-outline:hover:not(:disabled) { background: rgba(255,255,255,.08); }
.ys-btn-onnavy.ys-btn-primary { background: var(--on-navy); color: var(--surface-navy); }
.ys-btn svg { width: 16px; height: 16px; flex: none; }
.ys-btn-touch svg { width: 24px; height: 24px; }

/* ---------- Field, Input, Select, Checkbox ---------- */
.ys-field { display: flex; flex-direction: column; gap: var(--space-1); max-width: var(--reading-max); min-width: 0; }
.ys-field-label { color: var(--ink); }
.ys-field-label .ys-optional { color: var(--ink-muted); font-weight: 400; margin-left: var(--space-1); }
.ys-control { display: flex; align-items: center; height: var(--control-md); padding: 0 var(--space-3); border: var(--hairline) solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-raised); color: var(--ink); gap: var(--space-2); transition: border-color 150ms ease-out; }
.ys-control:focus-within { border-color: var(--focus); outline: 2px solid var(--focus); outline-offset: 2px; }
.ys .ys-control :focus-visible { outline: none; }  /* Der Ring gehoert dem Control, nicht dem Knoten darin (README, Interaktion und Zustaende) */
.ys-control input, .ys-control select { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; padding: 0; outline: none; }
.ys-control input::placeholder { color: var(--ink-faint); }
.ys-control select { appearance: none; -webkit-appearance: none; padding-right: var(--space-5); }
.ys-control .ys-affix { color: var(--ink-muted); flex: none; }
.ys-control > svg { width: 16px; height: 16px; flex: none; color: var(--ink-muted); }
.ys-control-lg { height: var(--control-lg); padding: 0 var(--space-4); }
.ys-control-touch { height: var(--control-touch); padding: 0 var(--space-4); border-radius: var(--radius-md); }
.ys-control-error { border-color: var(--danger); }
.ys-control-disabled, .ys-control:has(> :disabled) { opacity: .4; }
.ys-check:has(input:disabled) { opacity: .4; cursor: default; }
.ys-field-help { color: var(--ink-muted); }
.ys-field-error { color: var(--danger); display: flex; align-items: flex-start; gap: var(--space-1); }
.ys-field-error svg { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.ys-input-mono { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.01em; }
.ys-select-wrap { position: relative; }
.ys-select-wrap .ys-chevron { position: absolute; right: var(--space-3); top: 50%; width: 16px; height: 16px; margin-top: -8px; color: var(--ink-muted); pointer-events: none; }

.ys-check { position: relative; display: flex; align-items: flex-start; gap: var(--space-3); cursor: pointer; }
/* Schalter (03, Formulare). Die EINZIGE runde Form im System (tokens.json, radius.note). Ein Schalter
   wirkt SOFORT; was erst mit „Speichern" gilt, ist ein Kaestchen. */
.ys-switch { display: inline-flex; align-items: center; gap: var(--space-2); cursor: pointer; }
.ys-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; margin: 0; }
.ys-switch-track { position: relative; flex: none; width: 36px; height: 20px; border-radius: 10px; background: var(--surface-sunken); border: var(--hairline) solid var(--line-strong); transition: background-color 150ms ease-out, border-color 150ms ease-out; }
.ys-switch-track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 7px; background: var(--surface-raised); transition: transform 150ms ease-out; }
.ys-switch input:checked + .ys-switch-track { background: var(--navy); border-color: var(--navy); }
.ys-switch input:checked + .ys-switch-track::after { transform: translateX(16px); background: var(--on-navy-fill); }
.ys-switch input:focus-visible + .ys-switch-track { outline: 2px solid var(--focus); outline-offset: 2px; }
.ys-switch input:disabled + .ys-switch-track { opacity: 0.5; }
.ys-switch-text { color: var(--ink); }

/* Dateien ablegen (03, Formulare). Das Feld bleibt ein echtes <input type="file">: Ablegen ist die
   Zugabe, Auswaehlen der Weg — dieselbe Zusage wie beim Umsortieren. */
.ys-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-2); min-height: 120px; padding: var(--space-6); border: var(--hairline) dashed var(--line-strong); border-radius: var(--radius-md); background: var(--surface-raised); color: var(--ink-muted); text-align: center; }
.ys-drop[data-over="true"] { border-style: solid; border-color: var(--navy); background: var(--navy-soft); color: var(--ink); }
.ys-drop svg { width: 20px; height: 20px; color: var(--ink-faint); }
.ys-drop-hint { color: var(--ink-faint); }
.ys-check input { position: absolute; left: 0; top: 1px; width: 18px; height: 18px; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.ys-check-box { width: 18px; height: 18px; flex: none; margin-top: 1px; border: var(--hairline) solid var(--line-strong); border-radius: var(--radius-xs); background: var(--surface-raised); display: grid; place-items: center; color: var(--on-navy-fill); transition: background-color 150ms ease-out, border-color 150ms ease-out; }
.ys-check-box svg { width: 12px; height: 12px; opacity: 0; }
.ys-check input:checked + .ys-check-box { background: var(--navy); border-color: var(--navy); }
.ys-check input:checked + .ys-check-box svg { opacity: 1; }
.ys-check input:focus-visible + .ys-check-box { outline: 2px solid var(--focus); outline-offset: 2px; }
.ys-check-text { display: flex; flex-direction: column; gap: 2px; }
.ys-check-desc { color: var(--ink-muted); }

/* 0.10.0: das native Feld liegt unsichtbar genau über dem Kästchen, damit Zeiger und Testwerkzeuge es treffen. */
.ys-switch input { width: 36px; height: 20px; }
.ys-halle .ys-check input { width: 24px; height: 24px; }
.ys-table .ys-table-check input { top: 0; width: 16px; height: 16px; }
.ys-switch .ys-check-box { width: 36px; height: 20px; border-radius: 10px; position: relative; background: var(--surface-sunken); border-color: var(--line-strong); }
.ys-switch .ys-check-box::after { content: ""; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 7px; background: var(--line-strong); transition: transform 150ms ease-out, background-color 150ms ease-out; }
.ys-switch input:checked + .ys-check-box { background: var(--navy); border-color: var(--navy); }
.ys-switch input:checked + .ys-check-box::after { transform: translateX(16px); background: var(--on-navy-fill); }
.ys-switch .ys-check-box svg { display: none; }

/* ---------- Badge, Ident ---------- */
.ys-badge { display: inline-flex; align-items: center; gap: var(--space-1); height: 22px; padding: 0 var(--space-2); border-radius: var(--radius-sm); background: var(--surface-sunken); color: var(--ink-muted); white-space: nowrap; }
.ys-badge svg { width: 12px; height: 12px; }
.ys-badge-info { background: var(--info-soft); color: var(--info); }
.ys-badge-warning { background: var(--warning-soft); color: var(--warning); }
.ys-badge-success { background: var(--success-soft); color: var(--success); }
.ys-badge-danger { background: var(--danger-soft); color: var(--danger); }
.ys-badge-stale { background: var(--warning-soft); color: var(--warning); }
.ys-badge-lg { height: 28px; padding: 0 var(--space-3); }
.ys-ident { font-family: var(--font-mono); color: var(--ink); white-space: nowrap; }
.ys-ident-muted { color: var(--ink-muted); }

/* ---------- Table ---------- */
.ys-table-wrap { border-top: var(--hairline) solid var(--line); background: transparent; overflow: auto; }
/* Reihenfolge aendern (03, Listen und Tabellen). Der Griff ist der Anfasser; Ziehen ist eine Zugabe und
   nie der einzige Weg — daneben steht immer ein Knopfpaar, das dieselbe Zeile ohne Maus bewegt. */
.ys-sortlist { display: flex; flex-direction: column; gap: var(--space-1); }
.ys-sortrow { display: flex; align-items: center; gap: var(--space-2); min-height: var(--control-lg); padding: 0 var(--space-2); border: var(--hairline) solid var(--line); border-radius: var(--radius-sm); background: var(--surface-raised); }
.ys-sortrow-grip { display: inline-flex; align-items: center; color: var(--ink-faint); cursor: grab; flex: none; touch-action: none; }
.ys-sortrow-grip svg { width: 16px; height: 16px; }
.ys-sortrow[data-dragging="true"] { opacity: 0.4; }
.ys-sortrow[data-dragging="true"] .ys-sortrow-grip { cursor: grabbing; }
.ys-sortrow[data-over="true"] { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); }
.ys-sortrow-off { background: var(--surface-sunken); }
/* Scrollbarer Bereich mit Tastaturzugang: Fokusring innen (README, Barrierefreiheit). */
.ys-scrollregion:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.ys-table-wrap.ys-table-framed { border: var(--hairline) solid var(--line); border-radius: var(--radius-md); background: var(--surface-raised); }
.ys-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.ys-table th { position: sticky; top: 0; z-index: 1; text-align: left; background: var(--surface-raised); color: var(--ink-muted); font-weight: 500; padding: 0 var(--space-3); height: 32px; border-bottom: var(--hairline) solid var(--line); white-space: nowrap; }
.ys-table-framed .ys-table th { background: var(--surface-raised); }
.ys-table td { padding: 0 var(--space-3); height: var(--row-height); border-bottom: var(--hairline) solid var(--line); color: var(--ink); white-space: nowrap; }
.ys-table tr:last-child td { border-bottom: 0; }
.ys-table tbody tr:hover td { background: var(--surface-sunken); }
.ys-table tbody tr:hover td { background: var(--surface-sunken); }
.ys-table tr.ys-selected td { background: var(--navy-soft); }
.ys-table .ys-right { text-align: right; }
.ys-table .ys-muted { color: var(--ink-muted); }
.ys-table-compact td { height: 32px; }
.ys-table-comfortable td { height: 40px; }
.ys-table-touch td { height: var(--control-touch); }
.ys-table th .ys-th-inner { display: inline-flex; align-items: center; gap: var(--space-1); background: none; border: 0; padding: 0; font: inherit; color: inherit; }
.ys-table th .ys-th-inner svg { width: 12px; height: 12px; }
.ys-table th.ys-sorted { color: var(--ink); }
.ys-table th.ys-sortable { cursor: pointer; }
.ys-table th.ys-right .ys-th-inner { flex-direction: row-reverse; }
.ys-table .ys-table-checkcol { width: 36px; min-width: 36px; padding: 0 0 0 var(--space-3); }
.ys-table .ys-table-check { position: relative; display: inline-flex; vertical-align: middle; }
.ys-table .ys-table-check .ys-check-box { margin-top: 0; width: 16px; height: 16px; }
.ys-table .ys-table-check .ys-check-box svg { width: 11px; height: 11px; }
.ys-table tr.ys-clickable { cursor: pointer; }
.ys-table td a { color: inherit; text-decoration: none; } .ys-table td a:hover { text-decoration: underline; }
.ys-table tfoot td { position: sticky; bottom: 0; background: var(--surface-raised); border-top: var(--hairline) solid var(--line-strong); border-bottom: 0; color: var(--ink); font-weight: 500; }
.ys-table tbody tr:last-child td { border-bottom: var(--hairline) solid var(--line); }
.ys-table-wrap:not(:has(tfoot)) tbody tr:last-child td { border-bottom: 0; }

/* ---------- Card, KpiTile, Timeline, Tabs, Toolbar ---------- */
.ys-card { background: var(--surface-raised); border: var(--hairline) solid var(--line); border-radius: var(--radius-md); padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); }
.ys-card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.ys-card-head .ys-card-actions { display: flex; gap: var(--space-2); }
.ys-card-lg { padding: var(--space-6); }

.ys-kpi { display: flex; flex-direction: column; gap: var(--space-1); min-width: 160px; }
.ys-kpi-label { color: var(--ink-muted); }
.ys-kpi-value { color: var(--ink); }
.ys-kpi-delta { display: inline-flex; align-items: center; gap: var(--space-1); }
.ys-kpi-delta svg { width: 14px; height: 14px; }
.ys-kpi-up { color: var(--success); }
.ys-kpi-down { color: var(--danger); }
.ys-kpi-success { color: var(--success); }
.ys-kpi-danger { color: var(--danger); }
.ys-kpi-neutral { color: var(--ink-muted); }
.ys-kpi-note { color: var(--ink-muted); }
.ys-kpirow { display: flex; flex-wrap: wrap; overflow: hidden; border-top: var(--hairline) solid var(--line); border-bottom: var(--hairline) solid var(--line); }
.ys-kpirow > .ys-kpi { flex: 1 1 160px; padding: var(--space-4) var(--space-5); margin: 0 0 calc(-1 * var(--hairline)) calc(-1 * var(--hairline)); border-left: var(--hairline) solid var(--line); border-bottom: var(--hairline) solid var(--line); }

.ys-timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ys-timeline li { position: relative; padding: 0 0 var(--space-4) var(--space-6); }
.ys-timeline li::before { content: ""; position: absolute; left: 5px; top: 8px; width: 8px; height: 8px; border-radius: 4px; background: var(--line-strong); }
.ys-timeline li::after { content: ""; position: absolute; left: 8.5px; top: 20px; bottom: 0; width: var(--hairline); background: var(--line); }
.ys-timeline li:last-child::after { display: none; }
.ys-timeline li.ys-tl-accent::before { background: var(--accent); }
.ys-timeline .ys-tl-meta { color: var(--ink-muted); display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; }

.ys-tabs { display: flex; gap: var(--space-5); border-bottom: var(--hairline) solid var(--line); }
.ys-tab { position: relative; padding: var(--space-2) 0 var(--space-3); color: var(--ink-muted); background: none; border: 0; cursor: pointer; display: inline-flex; gap: var(--space-2); align-items: center; }
.ys-tab[aria-selected="true"] { color: var(--ink); }
.ys-tab[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--navy); }
a.ys-tab, a.ys-chip { text-decoration: none; }
.ys-tab[aria-current="page"] { color: var(--ink); }
.ys-tab[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--navy); }
.ys-toolbar-search { display: contents; }
.ys-tab-count { color: var(--ink-muted); }

.ys-toolbar { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.ys-toolbar .ys-control { height: var(--control-sm); width: 240px; border-color: var(--line); }
.ys-toolbar .ys-control input { font-size: 13px; line-height: 16px; }
.ys-toolbar .ys-spacer { flex: 1; }
.ys-chip { display: inline-flex; align-items: center; gap: var(--space-1); height: var(--control-sm); padding: 0 var(--space-2); font-size: 13px; line-height: 16px; font-weight: 500; border: var(--hairline) solid var(--line); border-radius: var(--radius-sm); background: var(--surface-raised); color: var(--ink); cursor: pointer; }
/* Abschnitt zum Auf- und Zuklappen (03, Detailseiten). `details`/`summary`, kein JavaScript. Was
   ausgefuellt werden MUSS, steht nie hinter einem zugeklappten Abschnitt. */
.ys-acc { display: flex; flex-direction: column; border-top: var(--hairline) solid var(--line); }
.ys-acc-item { border-bottom: var(--hairline) solid var(--line); }
.ys-acc-head { display: flex; align-items: center; gap: var(--space-2); min-height: var(--control-lg); cursor: pointer; color: var(--ink); list-style: none; }
.ys-acc-head::-webkit-details-marker { display: none; }
.ys-acc-head:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.ys-acc-head .ys-acc-chev { width: 14px; height: 14px; flex: none; color: var(--ink-muted); transition: transform 150ms ease-out; }
.ys-acc-item[open] > .ys-acc-head .ys-acc-chev { transform: rotate(180deg); }
.ys-acc-head .ys-spacer { flex: 1; }
.ys-acc-body { padding-bottom: var(--space-4); }
@media (prefers-reduced-motion: reduce) { .ys-acc-head .ys-acc-chev, .ys-switch-track, .ys-switch-track::after { transition: none; } }
.ys-chip:hover { background: var(--surface-sunken); }
.ys-chip-active { background: var(--surface-sunken); border-color: var(--line); color: var(--ink); }
.ys-chip svg { width: 14px; height: 14px; color: var(--ink-muted); }

/* ---------- Sidebar, PageHeader ---------- */
.ys-sidebar { width: var(--sidebar-width); background: var(--surface-raised); border-right: var(--hairline) solid var(--line); display: flex; flex-direction: column; padding: var(--space-4) var(--space-3); gap: var(--space-4); min-height: 100%; }
.ys-sidebar-brand { padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.ys-ws { display: flex; align-items: center; gap: var(--space-2); height: 32px; padding: 0 var(--space-2); border: 0; background: transparent; border-radius: var(--radius-sm); color: var(--ink); cursor: pointer; width: 100%; text-align: left; text-decoration: none; }
.ys-ws:hover { background: var(--surface-sunken); }
.ys-ws .ys-mark { width: 30px; height: 21px; color: var(--navy); flex: none; }
.ys-ws .ys-ws-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ys-ws .ys-ws-chev { width: 14px; height: 14px; color: var(--ink-muted); flex: none; }
.ys-sidebar-search { display: flex; align-items: center; gap: var(--space-2); height: var(--control-sm); padding: 0 var(--space-2); border: var(--hairline) solid var(--line); border-radius: var(--radius-sm); background: var(--surface-raised); color: var(--ink-muted); }
.ys-sidebar-search svg { width: 14px; height: 14px; flex: none; }
.ys-sidebar-search .ys-kbd { margin-left: auto; font-family: var(--font-sans); font-weight: 400; font-size: 12px; line-height: 16px; padding: 0 4px; border: var(--hairline) solid var(--line); border-radius: var(--radius-xs); color: var(--ink-muted); }
.ys-brandrow { display: flex; align-items: center; gap: var(--space-2); height: 24px; color: var(--ink); }
.ys-mark { width: 24px; height: 17px; flex: none; }
.ys-mark-slot { display: inline-flex; align-items: center; justify-content: center; }
.ys-mark-slot > svg, .ys-mark-slot > img { width: 100%; height: 100%; }
.ys-sidebar-collapsed { width: 56px; padding: var(--space-4) var(--space-2); align-items: stretch; }
.ys-sidebar-collapsed .ys-sidebar-brand { padding: 0; align-items: center; }
.ys-sidebar-collapsed .ys-nav-item { justify-content: center; padding: 0; width: 40px; margin: 0 auto; }
.ys-nav-sep { height: var(--hairline); background: var(--line); margin: var(--space-2) var(--space-1); }
.ys-sidebar-foot { margin-top: auto; }
.ys-nav-toggle { width: 100%; border: 0; background: transparent; color: var(--ink-muted); text-align: left; }
.ys-nav-toggle:hover { color: var(--ink); }
.ys-nav-toggle svg { color: inherit; }
.ys-wordmark { font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.ys-sidebar-tenant { color: var(--ink-muted); }
.ys-nav-group { display: flex; flex-direction: column; gap: 2px; }
.ys-nav-group-label { color: var(--ink-muted); padding: var(--space-2) var(--space-2) var(--space-1); }
.ys-nav-count { margin-left: auto; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.ys-nav-item { position: relative; display: flex; align-items: center; gap: var(--space-2); height: 30px; padding: 0 var(--space-2); border-radius: var(--radius-sm); color: var(--ink-muted); text-decoration: none; cursor: pointer; }
.ys-nav-item:hover { background: var(--surface-sunken); color: var(--ink); }
.ys-nav-item:hover { background: var(--surface-sunken); }
.ys-nav-item[aria-current="page"] { background: var(--surface-sunken); color: var(--ink); font-weight: 500; }
.ys-nav-item svg { width: 16px; height: 16px; color: var(--ink-faint); flex: none; }
.ys-nav-item[aria-current="page"] svg { color: var(--navy); }

.ys-pagehead { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.ys-pagehead .ys-spacer { flex: 1; }
.ys-pagehead .ys-actions { display: flex; gap: var(--space-2); }

/* ---------- Dialog, Toast, EmptyState ---------- */
.ys-scrim { position: fixed; inset: 0; background: color-mix(in srgb, var(--ink) 20%, transparent); }
.ys-dialog { width: 480px; max-width: 100%; background: var(--surface-raised); border: var(--hairline) solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-floating); padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-4); }
.ys-dialog-foot { display: flex; justify-content: flex-end; gap: var(--space-2); }
.ys-toast { display: inline-flex; align-items: center; gap: var(--space-3); min-width: 320px; max-width: 480px; background: var(--surface-raised); border: var(--hairline) solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-floating); padding: var(--space-3) var(--space-4); }
.ys-toast svg { width: 18px; height: 18px; flex: none; }
.ys-toast-danger svg { color: var(--danger); }
.ys-toast-success svg { color: var(--ink); }
.ys-toast .ys-spacer { flex: 1; }
.ys-empty { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); padding: var(--space-8) 0; max-width: var(--reading-max); }
.ys-empty p { margin: 0; color: var(--ink-muted); }
.ys-empty .ys-btn { margin-top: var(--space-2); }

/* ---------- Boards ---------- */
.ys-board-tile { background: var(--surface-raised); border: var(--hairline) solid var(--line); border-radius: var(--radius-lg); padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-3); min-height: 200px; }
.ys-board-tile-title { color: var(--ink-muted); }
.ys-board-value { display: flex; align-items: baseline; gap: var(--space-2); color: var(--ink); }
.ys-board-unit { color: var(--ink-muted); }
.ys-board-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ys-board-list li { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-2) 0; border-top: var(--hairline) solid var(--line); min-height: 48px; }
.ys-board-item-text { display: flex; flex-direction: column; min-width: 0; }
.ys-board-item-text .halle-body { overflow-wrap: break-word; }
.ys-board-item-sub { color: var(--ink-muted); font-size: 16px; line-height: 22px; }
.ys-board-item-value { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ys-board-tile-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); }
.ys-board-tile-meta { color: var(--ink-muted); white-space: nowrap; }
.ys-board-tile-foot { color: var(--ink-muted); font-size: 16px; line-height: 22px; }
.ys-board-tile-warning { border-color: var(--warning); }
.ys-board-tile-warning .ys-board-tile-title { color: var(--warning); }
.ys-board-progress { height: 1px; background: var(--line); border-radius: 1px; overflow: hidden; margin-top: auto; }
.ys-board-progress span { display: block; height: 100%; width: 40%; background: var(--line-strong); }

/* ---------- Marketing ---------- */
.ys-navbar { display: flex; align-items: center; gap: var(--space-8); height: 60px; padding: 0 var(--space-12); background: var(--surface-raised); border-bottom: var(--hairline) solid var(--line); }
.ys-navbar-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.ys-navbar-mark { width: 42px; height: 30px; color: var(--navy); }
.ys-navbar .ys-wordmark { font-size: 19px; }
.ys-navbar-links { display: flex; gap: var(--space-6); flex: 1; }
.ys-navbar-links a { color: var(--ink-muted); text-decoration: none; font-size: 14px; line-height: 20px; font-weight: 500; }
.ys-navbar-links a:hover { color: var(--ink); }
.ys-navbar-actions { display: flex; gap: var(--space-2); }

.ys-hero { display: flex; flex-direction: column; gap: var(--space-12); padding: var(--space-16) 0 0; }
.ys-hero-text { display: flex; flex-direction: column; gap: var(--space-5); max-width: 880px; }
.ys-hero-eyebrow { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink-muted); }
.ys-hero-title { margin: 0; font-size: 60px; line-height: 64px; font-weight: 500; letter-spacing: -0.02em; color: var(--ink); text-wrap: balance; }
.ys-hero-muted { color: var(--ink-muted); }
.ys-hero-lead { margin: 0; color: var(--ink-muted); max-width: 640px; }
.ys-hero-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.ys-hero-frame { position: relative; background: var(--surface-sunken); border: var(--hairline) solid var(--line); border-radius: var(--radius-lg); padding: 12px; height: 520px; overflow: hidden; }
.ys-hero-frame-in { background: var(--surface-raised); border: var(--hairline) solid var(--line); border-radius: var(--radius-md); height: 100%; overflow: hidden; }
.ys-hero-frame::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; background: linear-gradient(to bottom, transparent, var(--surface-raised)); pointer-events: none; }
@media (max-width: 900px) { .ys-hero-title { font-size: 40px; line-height: 44px; } .ys-navbar { padding: 0 var(--space-4); } .ys-navbar-links { display: none; } }

/* ---------- Mock screen (für Produkt-Rahmen in Vorschauen) ---------- */
.ys-mock { background: var(--surface-raised); border: var(--hairline) solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.ys-mock-row { display: flex; align-items: center; gap: var(--space-3); padding: 0 var(--space-3); height: 36px; border-bottom: var(--hairline) solid var(--line); }
.ys-mock-row:last-child { border-bottom: 0; }
.ys-mock-head { background: var(--surface-sunken); color: var(--ink-muted); }
.ys-mock .ys-spacer { flex: 1; }

/* ---------- Status ---------- */
.ys-status { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--ink); white-space: nowrap; }
.ys-status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); flex: none; }
.ys-status-neutral { color: var(--ink-muted); }
.ys-status-info .ys-status-dot { background: var(--ink); }
.ys-status-active .ys-status-dot { background: var(--ink); }
.ys-status-unverified .ys-status-dot { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-muted); }
.ys-status-success .ys-status-dot { background: var(--success); }
.ys-status-warning .ys-status-dot { background: var(--warning); }
.ys-status-warning { color: var(--warning); }
.ys-status-danger .ys-status-dot { background: var(--danger); }
.ys-status-danger { color: var(--danger); }
.ys-status-stale .ys-status-dot { background: transparent; box-shadow: inset 0 0 0 1.5px var(--warning); }
.ys-status-stale { color: var(--warning); }

/* ---------- Textarea, Radio, DateField, Calendar, Combobox ---------- */
.ys-control-area { height: auto; padding: var(--space-2) var(--space-3); align-items: stretch; }
.ys-control-area textarea { flex: 1; border: 0; background: transparent; padding: 0; outline: none; resize: vertical; min-height: 72px; }
.ys-control-area textarea::placeholder { color: var(--ink-faint); }
.ys-radiogroup { border: 0; padding: 0; margin: 0; min-width: 0; }
.ys-radiogroup legend { padding: 0; margin-bottom: var(--space-2); }
.ys-radios { display: flex; flex-direction: column; gap: var(--space-2); }
.ys-radiogroup-inline .ys-radios { flex-direction: row; flex-wrap: wrap; gap: var(--space-5); }
.ys-radio .ys-check-box { border-radius: 50%; }
.ys-radio input:checked + .ys-check-box { background: var(--surface-raised); border-color: var(--navy); box-shadow: inset 0 0 0 4px var(--navy); }
.ys-radio input:focus-visible + .ys-check-box { outline: 2px solid var(--focus); outline-offset: 2px; }
.ys-datefield input { flex: 1; }
.ys-datefield svg { width: 16px; height: 16px; }
.ys-daterange-row { display: flex; align-items: center; gap: var(--space-3); max-width: var(--reading-max); }
.ys-daterange-row .ys-control { flex: 1; min-width: 0; }
.ys-daterange-sep { color: var(--ink-muted); flex: none; }
.ys-daterange-dur { color: var(--ink-muted); white-space: nowrap; flex: none; }
.ys-portal .ys-datefield, .ys-portal .ys-daterange { height: var(--control-lg); padding: 0 var(--space-4); }
/* Schmal wie FieldRow (640px): Beginn oben, darunter „bis“ und Ende, die Dauer unter dem Feld; jedes Datum bleibt ganz lesbar. */
@media (max-width: 640px) {
  .ys .ys-daterange-row { flex-wrap: wrap; row-gap: var(--space-1); }
  .ys .ys-daterange-row .ys-control { flex: 1 1 100%; }
  .ys .ys-daterange { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--space-2); height: auto; }
  .ys .ys-daterange input { height: var(--control-md); }
  .ys .ys-daterange input:first-child { grid-column: 1 / -1; }
  .ys-portal .ys .ys-daterange input { height: var(--control-lg); }
}
.ys-popover { background: var(--surface-raised); border: var(--hairline) solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-floating); padding: var(--space-1); }
.ys-popover-foot { color: var(--ink-muted); padding: var(--space-2) var(--space-2) var(--space-1); border-top: var(--hairline) solid var(--line); margin-top: var(--space-1); }
.ys-combobox-anchor { position: relative; display: block; }
.ys-combobox-list { position: absolute; left: 0; right: 0; top: 100%; margin-top: var(--space-1); z-index: 10; max-height: 320px; overflow: auto; display: flex; flex-direction: column; }
.ys-combobox-list > [role="listbox"] { flex: 1 1 auto; min-height: 0; overflow: auto; }
.ys-option { display: flex; align-items: center; gap: var(--space-3); height: 32px; padding: 0 var(--space-2); border-radius: var(--radius-sm); cursor: pointer; }
.ys-option:hover, .ys-option-active { background: var(--surface-sunken); }
.ys-option .ys-ident { min-width: 96px; }
.ys-option-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ys-option-meta { color: var(--ink-muted); white-space: nowrap; }
.ys-calendar { width: 280px; padding: var(--space-3); background: var(--surface-raised); border: var(--hairline) solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-floating); display: flex; flex-direction: column; gap: var(--space-2); }
.ys-cal-head { display: flex; align-items: center; justify-content: space-between; }
.ys-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.ys-cal-dow { text-align: center; color: var(--ink-muted); height: 24px; line-height: 24px; }
.ys-cal-day { position: relative; height: 32px; border: 0; background: transparent; border-radius: var(--radius-sm); color: var(--ink); cursor: pointer; font-family: inherit; }
.ys-cal-day:hover:not(:disabled) { background: var(--surface-sunken); }
.ys-cal-muted { color: var(--ink-faint); }
.ys-cal-closed { color: var(--ink-faint); cursor: default; text-decoration: line-through; }
.ys-cal-today { box-shadow: inset 0 0 0 1px var(--line-strong); }
.ys-cal-selected, .ys-cal-selected:hover:not(:disabled) { background: var(--navy); color: var(--on-navy-fill); }
.ys-cal-mark { position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; margin-left: -2px; border-radius: 2px; background: var(--ink-muted); }
.ys-cal-selected .ys-cal-mark { background: var(--on-navy-fill); }
.ys-cal-foot { color: var(--ink-muted); border-top: var(--hairline) solid var(--line); padding-top: var(--space-2); }

/* ---------- Menu, Avatar, Skeleton, Pagination ---------- */
.ys-menu { min-width: 220px; display: flex; flex-direction: column; }
.ys-menu-item { display: flex; align-items: center; gap: var(--space-2); height: 32px; padding: 0 var(--space-2); border: 0; background: transparent; border-radius: var(--radius-sm); color: var(--ink); cursor: pointer; text-align: left; font-family: inherit; }
.ys-menu-item:hover:not(:disabled) { background: var(--surface-sunken); }
.ys-menu-item:disabled { opacity: .4; cursor: default; }
.ys-menu-item svg { width: 16px; height: 16px; color: var(--ink-muted); flex: none; }
.ys-menu-item .ys-menu-label { flex: 1; }
.ys-menu-danger { color: var(--danger); } .ys-menu-danger svg { color: var(--danger); }
.ys-menu-sep { height: var(--hairline); background: var(--line); margin: var(--space-1) 0; }
.ys-kbd { font-family: var(--font-sans); font-weight: 400; font-size: 12px; line-height: 16px; padding: 0 4px; border: var(--hairline) solid var(--line); border-radius: var(--radius-xs); color: var(--ink-muted); white-space: nowrap; }
.ys-avatar { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-sunken); color: var(--ink-muted); font-size: 12px; line-height: 1; font-weight: 500; letter-spacing: .02em; flex: none; }
/* Sechs leise Tönungen, aus dem Namen gewählt; Text bleibt dunkel, Hintergrund hell */
.ys-avatar-t0 { background: var(--navy-soft); color: var(--navy); }
.ys-avatar-t1 { background: var(--success-soft); color: var(--success); }
.ys-avatar-t2 { background: var(--info-soft); color: var(--info); }
.ys-avatar-t3 { background: var(--surface-sunken); color: var(--ink); }
.ys-avatar-t4 { background: var(--navy-soft); color: var(--ink); }
.ys-avatar-t5 { background: var(--success-soft); color: var(--ink); }
.ys-avatar-sm { width: 20px; height: 20px; font-size: 12px; letter-spacing: 0; }
.ys-avatar-lg { width: 32px; height: 32px; font-size: 14px; }
.ys-skeleton-group { display: flex; flex-direction: column; gap: var(--space-2); }
.ys-skeleton { display: block; border-radius: var(--radius-xs); background: var(--surface-sunken); animation: ys-pulse 1.4s ease-in-out infinite; }
/* Fortschritt (03, Laden). NUR wenn der Anteil wirklich bekannt ist; sonst `Skeleton`. Ein Balken, der
   eine Zahl erfindet, ist schlimmer als kein Balken. */
.ys-progress { display: block; width: 100%; height: 6px; border-radius: var(--radius-xs); background: var(--surface-sunken); overflow: hidden; }
.ys-progress-bar { display: block; height: 100%; background: var(--navy); border-radius: var(--radius-xs); transition: width 150ms ease-out; }
.ys-progress-indeterminate .ys-progress-bar { width: 40%; animation: ys-progress-slide 1.2s ease-in-out infinite; }
@keyframes ys-progress-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
@media (prefers-reduced-motion: reduce) { .ys-progress-indeterminate .ys-progress-bar { animation: none; width: 100%; } .ys-progress-bar { transition: none; } }
@keyframes ys-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .ys-skeleton { animation: none; } }
.ys-pagination { display: flex; align-items: center; gap: var(--space-3); color: var(--ink-muted); white-space: nowrap; }
.ys-pagination .ys-spacer { flex: 1; }
.ys-pagination-size { height: var(--control-sm); border-color: var(--line); position: relative; width: auto; padding-right: var(--space-6); }
.ys-pagination-size select { color: var(--ink-muted); }
.ys-pagination-size .ys-chevron { position: absolute; right: var(--space-2); top: 50%; width: 14px; height: 14px; margin-top: -7px; color: var(--ink-muted); pointer-events: none; }
.ys-pagination-page { color: var(--ink-muted); }

/* ---------- Banner, Proposal, BulkBar ---------- */
.ys-banner { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); border: var(--hairline) solid var(--line); background: var(--surface-raised); color: var(--ink); }
.ys-banner-icon { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.ys-banner-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ys-banner-actions { display: flex; gap: var(--space-2); flex: none; }
.ys-banner-info { background: var(--surface-raised); border-color: var(--line); } .ys-banner-info .ys-banner-icon { color: var(--info); }
.ys-banner-warning { background: var(--warning-soft); border-color: transparent; } .ys-banner-warning .ys-banner-icon { color: var(--warning); }
.ys-banner-danger { background: var(--danger-soft); border-color: transparent; } .ys-banner-danger .ys-banner-icon { color: var(--danger); }
.ys-banner-neutral { background: var(--surface-raised); border-color: var(--line); }
.ys-banner-success { background: var(--surface-raised); border-color: var(--line); } .ys-banner-success .ys-banner-icon { color: var(--success); }
.ys-banner-compact { padding: var(--space-2) var(--space-3); border-radius: 0; align-items: center; }
.ys-proposal { border: var(--hairline) solid var(--line); border-left: var(--hairline) solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-raised); display: flex; flex-direction: column; }
.ys-proposal-head { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); padding: var(--space-2) var(--space-3); border-bottom: var(--hairline) solid var(--line); }
.ys-proposal-head > * { flex-shrink: 0; }
.ys-proposal-src { color: var(--ink-muted); white-space: nowrap; }
.ys-proposal-acts { display: inline-flex; gap: var(--space-2); margin-left: auto; }
.ys-proposal-body { padding: var(--space-3); color: var(--ink); }
.ys-proposal-body dl { display: grid; grid-template-columns: 140px 1fr; gap: var(--space-1) var(--space-3); margin: 0; }
.ys-proposal-body dt { color: var(--ink-muted); } .ys-proposal-body dd { margin: 0; }
.ys-bulkbar { display: flex; align-items: center; gap: var(--space-2); height: var(--control-sm); padding: 0; }
.ys-bulkbar-floating { height: 44px; padding: 0 var(--space-3) 0 var(--space-4); background: var(--surface-raised); border: var(--hairline) solid var(--line-strong); border-radius: var(--radius-md); box-shadow: var(--shadow-floating); }
.ys-bulk-sep { width: var(--hairline); height: 20px; background: var(--line); margin: 0 var(--space-2); }
.ys-bulkbar .ys-spacer { flex: 1; }

/* ---------- FormSection, FieldRow, SaveBar, Path ---------- */
.ys-formsect { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-6) 0; border-top: var(--hairline) solid var(--line); }
.ys-formsect:first-of-type { border-top: 0; padding-top: 0; }
.ys-formsect-head { display: flex; flex-direction: column; gap: 2px; }
.ys-formsect-head p { color: var(--ink-muted); }
.ys-formsect-body { display: flex; flex-direction: column; gap: var(--space-4); max-width: var(--reading-max); }
.ys-fieldrow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); max-width: var(--reading-max); }
.ys-fieldrow .ys-field { max-width: none; }
.ys-savebar { display: flex; align-items: center; gap: var(--space-2); height: 60px; padding: 0 var(--space-6); border-top: var(--hairline) solid var(--line); background: var(--surface-raised); position: sticky; bottom: 0; }
.ys-savebar .ys-spacer { flex: 1; }
.ys-savebar-note { color: var(--ink-muted); }
.ys-path { display: flex; align-items: center; gap: var(--space-1); color: var(--ink-muted); }
.ys-path a { color: var(--ink-muted); text-decoration: none; } .ys-path a:hover { color: var(--ink); text-decoration: underline; }
.ys-path-item { display: inline-flex; gap: var(--space-1); }
.ys-path-sep { color: var(--ink-faint); }
.ys-path [aria-current="page"] { color: var(--ink); }

/* ---------- CommandPalette ---------- */
.ys-cmdk { width: 640px; max-width: 100%; background: var(--surface-raised); border: var(--hairline) solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-floating); display: flex; flex-direction: column; overflow: hidden; }
.ys-cmdk-input { display: flex; align-items: center; gap: var(--space-3); height: 48px; padding: 0 var(--space-4); border-bottom: var(--hairline) solid var(--line); }
.ys-cmdk-input svg { width: 18px; height: 18px; color: var(--ink-muted); flex: none; }
.ys-cmdk-input input { flex: 1; border: 0; outline: none; background: transparent; }
.ys-cmdk-input input::placeholder { color: var(--ink-faint); }
.ys-cmdk-body { padding: var(--space-2); max-height: 520px; overflow: auto; display: flex; flex-direction: column; gap: var(--space-2); }
.ys-cmdk-group-label { color: var(--ink-muted); padding: var(--space-2) var(--space-2) var(--space-1); }
.ys-cmdk-item { display: flex; align-items: center; gap: var(--space-3); height: 36px; padding: 0 var(--space-2); border-radius: var(--radius-sm); cursor: pointer; }
.ys-cmdk-item:hover, .ys-cmdk-active { background: var(--surface-sunken); }
.ys-cmdk-item > svg { width: 16px; height: 16px; color: var(--ink-muted); flex: none; }
.ys-cmdk-item .ys-ident, .ys-cmdk-pad { min-width: 96px; display: inline-block; }
.ys-cmdk-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ys-cmdk-meta { color: var(--ink-muted); white-space: nowrap; }
.ys-cmdk-foot { display: flex; gap: var(--space-4); padding: var(--space-2) var(--space-4); border-top: var(--hairline) solid var(--line); color: var(--ink-muted); }
.ys-cmdk-hint { display: inline-flex; align-items: center; gap: var(--space-1); }

/* ---------- SegmentedControl, Tooltip, Drawer ---------- */
.ys-seg { display: inline-flex; height: var(--control-md); padding: 2px; border: var(--hairline) solid var(--line); border-radius: var(--radius-sm); background: var(--surface-raised); gap: 2px; }
.ys-seg-sm { height: var(--control-sm); }
.ys-seg-item { display: inline-flex; align-items: center; gap: var(--space-1); padding: 0 var(--space-3); border: 0; border-radius: 4px; background: transparent; color: var(--ink-muted); cursor: pointer; font-family: inherit; }
.ys-seg-sm .ys-seg-item { padding: 0 var(--space-2); }
.ys-seg-item:hover { color: var(--ink); }
.ys-seg-item[aria-checked="true"] { background: var(--surface-sunken); color: var(--ink); }
.ys-seg-item svg { width: 14px; height: 14px; }
.ys-tooltip-wrap { position: relative; display: inline-flex; }
.ys-tooltip { position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); background: var(--ink); color: var(--surface-raised); padding: 4px 8px; border-radius: var(--radius-xs); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 150ms ease-out; display: inline-flex; gap: var(--space-2); align-items: center; z-index: 20; }
.ys-tooltip-bottom { bottom: auto; top: calc(100% + 6px); }
.ys-tooltip-wrap:hover .ys-tooltip, .ys-tooltip-wrap:focus-within .ys-tooltip, .ys-tooltip-open { opacity: 1; }
.ys-tooltip-kbd { color: inherit; opacity: .7; border-color: currentColor; }
[data-theme="dark"] .ys-tooltip { background: var(--ink); color: var(--surface-canvas); }
.ys-drawer { width: 400px; max-width: 100%; height: 100%; background: var(--surface-raised); border-left: var(--hairline) solid var(--line); box-shadow: var(--shadow-floating); display: flex; flex-direction: column; }
.ys-drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); padding: var(--space-4) var(--space-4) var(--space-3) var(--space-6); border-bottom: var(--hairline) solid var(--line); }
.ys-drawer-titles { display: flex; flex-direction: column; gap: 2px; }
.ys-drawer-sub { color: var(--ink-muted); }
.ys-drawer-body { flex: 1; overflow: auto; padding: var(--space-4) var(--space-6); display: flex; flex-direction: column; gap: var(--space-4); }
.ys-drawer-foot { display: flex; justify-content: flex-end; gap: var(--space-2); padding: var(--space-3) var(--space-6); border-top: var(--hairline) solid var(--line); }

/* ---------- Schedule ---------- */
.ys-sched { border-top: var(--hairline) solid var(--line); border-bottom: var(--hairline) solid var(--line); overflow: auto; }
.ys-sched-row { display: grid; align-items: stretch; }
.ys-sched-head { border-bottom: var(--hairline) solid var(--line); }
.ys-sched-corner { color: var(--ink-muted); padding: var(--space-2) var(--space-3); display: flex; align-items: flex-end; }
.ys-sched-day { padding: var(--space-2) var(--space-2) var(--space-1); border-left: var(--hairline) solid var(--line); display: flex; flex-direction: column; gap: 0; color: var(--ink); }
.ys-sched-day .app-caption { color: var(--ink-muted); }
.ys-sched-today .app-label { color: var(--ink); font-weight: 600; }
.ys-sched-sub { border-bottom: var(--hairline) solid var(--line); }
.ys-sched-slot { color: var(--ink-faint); padding: 2px var(--space-2); border-left: var(--hairline) solid var(--line); }
.ys-sched-group-label { color: var(--ink-muted); padding: var(--space-3) var(--space-3) var(--space-1); border-bottom: var(--hairline) solid var(--line); }
.ys-sched-res { min-height: 72px; border-bottom: var(--hairline) solid var(--line); position: relative; }
.ys-sched-res:last-child { border-bottom: 0; }
.ys-sched-label { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; justify-content: center; padding: 0 var(--space-3); gap: 0; }
.ys-sched-label .app-caption { color: var(--ink-muted); }
.ys-sched-cell { border-left: var(--hairline) solid var(--line); }
.ys-sched-cell:not(.ys-sched-cell-dayStart) { border-left-style: dashed; }
.ys-sched-cell-today { background: var(--surface-canvas); }
.ys-sched-block { margin: 6px 3px; padding: 5px 7px; hyphens: auto; -webkit-hyphens: auto; border: var(--hairline) solid var(--line); border-radius: var(--radius-sm); background: var(--navy-soft); display: flex; flex-direction: column; justify-content: center; gap: 1px; min-width: 0; overflow: hidden; z-index: 1; cursor: pointer; }
.ys-sched-block:hover { border-color: var(--line-strong); }
.ys-sched-block-label { font-weight: 500; line-height: 16px; overflow-wrap: break-word; }
.ys-sched-block-sub { line-height: 15px; overflow-wrap: break-word; }
.ys-sched-block-sub { color: var(--ink-muted); }
.ys-sched-danger { border-color: var(--danger); background: var(--danger-soft); }
.ys-sched-danger .ys-sched-block-sub { color: var(--danger); opacity: .85; }
.ys-sched-danger .ys-sched-block-label { color: var(--danger); }
.ys-sched-muted { border-color: var(--line); color: var(--ink-muted); background: var(--surface-raised); }
.ys-sched-muted .ys-sched-block-label { color: var(--ink-muted); }
.ys-sched-draft { border-style: dashed; background: transparent; border-color: var(--line-strong); }
.ys-sched-selected { outline: 2px solid var(--navy); outline-offset: -1px; background: var(--surface-raised); }
.ys-sched-now { border-left: 2px solid var(--ink); margin-left: -1px; z-index: 2; pointer-events: none; opacity: .5; }
.ys-sched-blocked { border-color: var(--line); background: repeating-linear-gradient(135deg, var(--line) 0 var(--hairline), var(--surface-raised) var(--hairline) var(--hatch)); }
.ys-sched-blocked .ys-sched-block-label { color: var(--ink-muted); }
a.ys-sched-block { color: inherit; text-decoration: none; }
.ys-sched-block:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.ys-sched-compact { padding: 0; }
.ys-sched-compact > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ys-sched-weekend .app-label, .ys-sched-weekend .app-caption { color: var(--ink-muted); }
.ys-sched-monthStart, .ys-sched-cell-monthStart { border-left-color: var(--line-strong); }
.ys-sched-top { position: sticky; top: 0; z-index: 4; background: var(--surface-raised); }
.ys-sched-wide > * { width: max-content; min-width: 100%; }
.ys-sched-wide .ys-sched-corner, .ys-sched-wide .ys-sched-label { position: sticky; left: 0; z-index: 3; background: var(--surface-raised); border-right: var(--hairline) solid var(--line); }
.ys-sched-wide .ys-sched-group-label > span { position: sticky; left: var(--space-3); }
.ys-sched-slotlink { display: flex; align-items: center; justify-content: center; color: transparent; text-decoration: none; }
.ys-sched-slotlink svg { width: 14px; height: 14px; }
.ys-sched-slotlink:focus-visible { color: var(--ink-muted); outline-offset: -2px; }
.ys-sched-slotlink:hover { color: var(--ink-muted); background: var(--surface-sunken); }

/* ---------- Charts ---------- */
.ys-chart { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.ys-chart-title { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); }
.ys-chart-title .app-caption { color: var(--ink-muted); }
.ys-chart svg { display: block; overflow: visible; }
.ys-chart-tick { font-family: var(--font-sans); font-size: 11px; fill: var(--ink-muted); font-variant-numeric: tabular-nums; }
.ys-chart-legend { display: flex; gap: var(--space-4); color: var(--ink-muted); }
.ys-chart-legend span { display: inline-flex; align-items: center; gap: var(--space-2); }
.ys-chart-legend i { width: 12px; height: 2px; display: inline-block; border-radius: 1px; }

/* ---------- DocumentPage (A4, 794×1123 bei 96dpi) ---------- */
.ys-doc { width: 794px; min-height: 1123px; padding: 76px 76px 60px; background: #ffffff; color: #0f1f3a; font-family: var(--font-sans); font-size: 10pt; line-height: 14pt; display: flex; flex-direction: column; gap: 24px; box-sizing: border-box; position: relative; }
.ys-doc * { box-sizing: border-box; }
.ys-doc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.ys-doc-brand { display: flex; align-items: center; gap: 10px; }
.ys-doc-brand svg { height: 28px; width: auto; }
.ys-doc-tenant { font-size: 16pt; font-weight: 600; letter-spacing: -0.01em; }
.ys-doc-sender { text-align: right; color: #4f5f7a; font-size: 8pt; line-height: 11pt; white-space: pre-line; }
.ys-doc-addr { display: grid; grid-template-columns: 1fr 240px; gap: 24px; margin-top: 16px; }
.ys-doc-addr-block { display: flex; flex-direction: column; }
.ys-doc-return { font-size: 7pt; color: #4f5f7a; border-bottom: 1px solid #d9dfe6; padding-bottom: 2px; margin-bottom: 8px; width: 85mm; }
.ys-doc-meta { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; font-size: 9pt; line-height: 12pt; align-content: start; }
.ys-doc-meta div { display: contents; }
.ys-doc-meta dt { color: #4f5f7a; } .ys-doc-meta dd { margin: 0; text-align: right; }
.ys-doc-mono { font-family: var(--font-mono); font-size: 9pt; }
.ys-doc-title { font-size: 14pt; line-height: 18pt; font-weight: 600; margin: 8px 0 0; letter-spacing: -0.01em; }
.ys-doc-p { margin: 0; max-width: 150mm; }
.ys-doc-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ys-doc-table th { text-align: left; font-weight: 500; font-size: 8pt; color: #4f5f7a; padding: 6px 8px; background: #e8ecf0; border-bottom: 1px solid #d9dfe6; }
.ys-doc-table td { padding: 6px 8px; border-bottom: 1px solid #d9dfe6; vertical-align: top; }
.ys-doc-table .ys-right { text-align: right; }
.ys-doc-sums { align-self: flex-end; width: 260px; display: flex; flex-direction: column; }
.ys-doc-sum { display: flex; justify-content: space-between; padding: 4px 8px; border-bottom: 1px solid #d9dfe6; }
.ys-doc-sum-strong { font-weight: 600; border-bottom: 2px solid #0f1f3a; }
.ys-doc-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid #d9dfe6; display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 16px; font-size: 7.5pt; line-height: 10.5pt; color: #4f5f7a; }
.ys-doc-foot div { display: flex; flex-direction: column; }
.ys-doc-page { text-align: right; }
.ys-totals { display: flex; flex-direction: column; width: 260px; margin-left: auto; font-variant-numeric: tabular-nums; }
.ys-totals-block { width: auto; margin-left: 0; }
.ys-totals-list { margin: 0; display: flex; flex-direction: column; }
.ys-totals-row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); padding: var(--space-1) var(--space-2); border-bottom: var(--hairline) solid var(--line); }
.ys-totals-row dt { margin: 0; display: flex; flex-direction: column; min-width: 0; }
.ys-totals-row dd { margin: 0; text-align: right; white-space: nowrap; }
.ys-totals-tax, .ys-totals-rownote, .ys-totals-note { color: var(--ink-muted); }
.ys-totals-strong { font-weight: 600; border-bottom: 2px solid var(--ink); }
.ys-totals-note { margin: 0; padding: var(--space-1) var(--space-2) 0; }
.ys-doc .ys-totals { font-size: inherit; line-height: inherit; color: inherit; }
.ys-doc .ys-totals-row { border-bottom: 1px solid #d9dfe6; }
.ys-doc .ys-totals-strong { border-bottom: 2px solid #0f1f3a; }
.ys-doc .ys-totals-tax, .ys-doc .ys-totals-rownote, .ys-doc .ys-totals-note { color: #4f5f7a; }

/* ---------- Halle ---------- */
.ys-halle-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); height: 72px; padding: 0 var(--space-6); border-bottom: var(--hairline) solid var(--line); background: var(--surface-raised); }
.ys-halle-head-left, .ys-halle-head-right { display: flex; align-items: center; gap: var(--space-4); min-width: 0; }
.ys-halle-head-right { flex: none; }
.ys-halle-head-left { flex: 1; }
.ys-halle-mark { width: 40px; height: 29px; color: var(--navy); flex: none; }
.ys-halle-back { flex: none; }
.ys-halle-titles { display: flex; flex-direction: column; min-width: 0; }
.ys-halle-sub { color: var(--ink-muted); font-weight: 400; font-size: 16px; line-height: 22px; }
.ys-halle-conn { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--ink-muted); }
.ys-halle-conn .ys-status-dot { background: var(--success); }
.ys-halle-conn-warning .ys-status-dot { background: var(--warning); } .ys-halle-conn-warning { color: var(--warning); }
.ys-halle-user { display: flex; align-items: center; gap: var(--space-3); height: var(--control-touch); padding: 0 var(--space-3) 0 var(--space-2); border: 0; border-radius: var(--radius-md); background: transparent; color: var(--ink); cursor: pointer; font-family: inherit; }
.ys-halle-user:hover { background: var(--surface-sunken); }
.ys-halle-timeout { color: var(--ink-muted); }
.ys-touchrow { display: flex; align-items: center; gap: var(--space-4); width: 100%; min-height: var(--control-touch); padding: var(--space-2) var(--space-4); border: 0; border-bottom: var(--hairline) solid var(--line); background: transparent; color: var(--ink); text-align: left; cursor: pointer; font-family: inherit; border-radius: 0; }
.ys-touchrow:last-child { border-bottom: 0; }
.ys-touchrow-active { background: var(--navy-soft); }
.ys-touchrow-icon { width: 24px; height: 24px; color: var(--ink-muted); flex: none; }
.ys-touchrow-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ys-touchrow-sub { color: var(--ink-muted); }
.ys-touchrow-value { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ys-touchrow-chev { width: 20px; height: 20px; color: var(--ink-faint); flex: none; }
.ys-stepper { display: flex; flex-direction: column; gap: var(--space-2); }
.ys-stepper-label { color: var(--ink-muted); }
.ys-stepper-controls { display: flex; align-items: center; gap: var(--space-4); }
.ys-stepper-value { display: flex; align-items: baseline; gap: var(--space-2); min-width: 120px; justify-content: center; }
.ys-stepper-unit { color: var(--ink-muted); }
.ys-pinpad { display: flex; flex-direction: column; align-items: center; gap: var(--space-4); }
.ys-pin-dots { display: flex; gap: var(--space-4); height: 24px; align-items: center; }
.ys-pin-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-strong); }
.ys-pin-dot-on { background: var(--ink); border-color: var(--ink); }
.ys-pin-error .ys-pin-dot { border-color: var(--danger); } .ys-pin-error .ys-pin-dot-on { background: var(--danger); }
.ys-pin-msg { color: var(--ink-muted); min-height: 26px; }
.ys-pin-error + .ys-pin-msg { color: var(--danger); }
.ys-pin-keys { display: grid; grid-template-columns: repeat(3, 72px); gap: var(--space-3); }
.ys-pin-key { height: 72px; width: 72px; border: var(--hairline) solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface-raised); color: var(--ink); cursor: pointer; font-family: inherit; }
.ys-pin-key:hover { background: var(--surface-sunken); }
.ys-photo { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-md); background: var(--surface-sunken); border: var(--hairline) solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: var(--space-1); padding: 30px var(--space-3) var(--space-3); text-align: center; color: var(--ink-muted); }
.ys-photo-ph { width: 28px; height: 28px; color: var(--ink-faint); }
.ys-photo-cap { color: var(--ink); position: absolute; left: var(--space-3); right: var(--space-3); bottom: var(--space-2); text-align: left; overflow-wrap: break-word; }
.ys-photo-state { position: absolute; left: var(--space-3); top: var(--space-2); color: var(--ink-muted); }
.ys-photo-add { border: var(--hairline) dashed var(--line-strong); background: transparent; cursor: pointer; }
.ys-photo-add svg { width: 32px; height: 32px; color: var(--ink); }
.ys-photo-add { justify-content: center; padding-top: var(--space-3); }
.ys-photo-add .ys-photo-cap { position: static; text-align: center; color: var(--ink); }
.ys-photo-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.ys-photo-has-img { padding: 0; overflow: hidden; }
.ys-photo-has-img .ys-photo-cap, .ys-photo-has-img .ys-photo-state { background: var(--surface-raised); padding: 2px var(--space-1); border-radius: var(--radius-xs); right: auto; max-width: calc(100% - 2 * var(--space-2)); }
.ys-photo-has-img .ys-photo-cap { left: var(--space-2); bottom: var(--space-2); }
.ys-photo-has-img .ys-photo-state { left: auto; right: var(--space-2); top: var(--space-2); }
.ys-scan { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-4) var(--space-5); border: var(--hairline) solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface-raised); }
.ys-scan-row { display: flex; align-items: center; gap: var(--space-2); color: var(--ink-muted); }
.ys-scan-row svg { width: 18px; height: 18px; }
.ys-scan-time { margin-left: auto; }
.ys-scan-code { color: var(--ink); }
.ys-scan-sub { color: var(--ink-muted); }
.ys-scan-error { border-color: var(--danger); } .ys-scan-error .ys-scan-row { color: var(--danger); }

/* Halle-Dichte: nichts unter 16px außer Zeitstempeln */
.ys-halle .app-body, .ys-halle .app-label, .ys-halle .app-body-strong, .ys-halle .app-cell { font-size: 16px; line-height: 22px; }
.ys-halle .app-caption { font-size: 16px; line-height: 22px; }
.ys-halle .ys-halle-conn, .ys-halle .ys-halle-timeout { font-size: 16px; line-height: 22px; }
.ys-halle .ys-avatar-lg { font-size: 16px; width: 36px; height: 36px; }
.ys-halle textarea { resize: none; }
.ys-btn-icon.ys-btn-touch { width: var(--control-touch); }
.ys-halle .ys-badge-lg { height: 32px; }
.ys-halle .ys-control { height: var(--control-touch); border-radius: var(--radius-md); padding: 0 var(--space-4); }
.ys-halle .ys-control-area { height: auto; padding: var(--space-3) var(--space-4); }
.ys-halle .ys-check-box { width: 24px; height: 24px; }
.ys-halle .ys-check-box svg { width: 16px; height: 16px; }

/* ---------- BoardShell ---------- */
.ys-board { display: flex; flex-direction: column; width: 1920px; height: 1080px; background: var(--surface-canvas); color: var(--ink); padding: 40px 48px 32px; gap: 32px; box-sizing: border-box; }
.ys-board-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); }
.ys-board-head-left { display: flex; align-items: baseline; gap: var(--space-4); }
.ys-board-sub { color: var(--ink-muted); font-weight: 400; }
.ys-board-head-right { display: flex; align-items: center; gap: var(--space-8); }
.ys-board-conn { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--ink-muted); font-weight: 400; }
.ys-board-conn .ys-status-dot { background: var(--success); width: 10px; height: 10px; }
.ys-board-conn-warning .ys-status-dot { background: var(--warning); } .ys-board-conn-warning { color: var(--warning); }
.ys-board-time { font-variant-numeric: tabular-nums; margin-left: var(--space-4); }
/* Boards aus sechs Metern: nichts unter 18px außer Fußnoten */
.ys-board .app-body, .ys-board .app-body-strong, .ys-board .app-label, .ys-board .ys-board-item-sub, .ys-board .ys-board-tile-foot { font-size: 18px; line-height: 26px; }
.ys-board .ys-badge-lg { height: 36px; padding: 0 var(--space-3); }
.ys-board .ys-badge svg { width: 18px; height: 18px; }
.ys-board .ys-board-list li { min-height: 60px; }
.ys-board-brand { display: inline-flex; align-items: center; gap: var(--space-3); color: var(--ink); }
.ys-board-mark { width: 36px; height: 26px; color: var(--ink); }
.ys-board-brand .ys-wordmark { font-size: 22px; }
.ys-board-grid { flex: 1; display: grid; grid-auto-rows: minmax(0, 1fr); gap: var(--space-6); min-height: 0; }
.ys-board .ys-board-tile { min-height: 0; overflow: hidden; }
.ys-board-foot { display: flex; align-items: center; gap: var(--space-6); }
.ys-board-rot-label { color: var(--ink-muted); white-space: nowrap; font-weight: 400; }
.ys-board-rot { flex: 1; height: 1px; background: var(--line); border-radius: 1px; overflow: hidden; }
.ys-board-rot span { display: block; height: 100%; background: var(--line-strong); transition: width 1s linear; }
.ys-board-light { background: var(--surface-raised); }
.ys-pairing { align-items: center; justify-content: center; }
.ys-pairing-in { display: flex; flex-direction: column; align-items: center; gap: var(--space-6); max-width: 720px; text-align: center; }
.ys-pairing-lead { color: var(--ink-muted); }
.ys-pairing-code { font-family: var(--font-mono); font-weight: 500; font-size: 128px; line-height: 136px; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }
.ys-pairing-steps { margin: 0; padding-left: 1.2em; text-align: left; display: flex; flex-direction: column; gap: var(--space-2); }
.ys-pairing-note { color: var(--ink-muted); font-size: 16px; line-height: 22px; }

/* ---------- TopNav (Portale): Mandantenfarbe über --tenant, sonst navy ---------- */
.ys-portal p a, .ys-portal small a { color: var(--info); }
.ys-portal { --navy: var(--tenant, #0e2744); --on-navy-fill: #ffffff; }
.ys-topnav { background: var(--surface-raised); border-bottom: var(--hairline) solid var(--line); }
.ys-topnav-in { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--space-6); height: 64px; display: flex; align-items: center; gap: var(--space-8); }
.ys-topnav-compact .ys-topnav-in { height: 56px; padding: 0 var(--space-4); gap: var(--space-3); }
.ys-topnav-brand { display: flex; align-items: center; gap: var(--space-3); color: var(--ink); text-decoration: none; }
.ys-topnav-name { font-weight: 600; letter-spacing: -0.01em; font-size: 16px; }
.ys-topnav-portal { color: var(--ink-muted); padding-left: var(--space-3); border-left: var(--hairline) solid var(--line); }
.ys-topnav-links { display: flex; gap: var(--space-6); flex: 1; }
.ys-topnav-links a { color: var(--ink-muted); text-decoration: none; display: inline-flex; gap: var(--space-1); align-items: center; height: 64px; border-bottom: 2px solid transparent; }
.ys-topnav-links a:hover { color: var(--ink); }
.ys-topnav-links a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--navy); }
.ys-topnav-count { color: var(--ink-muted); }
.ys-topnav-right { display: flex; align-items: center; gap: var(--space-2); margin-left: auto; }
.ys-topnav-user { display: inline-flex; align-items: center; gap: var(--space-2); height: var(--control-md); padding: 0 var(--space-2); border: 0; background: transparent; border-radius: var(--radius-sm); color: var(--ink); cursor: pointer; font-family: inherit; }
.ys-topnav-user:hover { background: var(--surface-sunken); }
.ys-topnav-user svg { width: 14px; height: 14px; color: var(--ink-muted); }
.ys-tenant-logo { width: 32px; height: 32px; border-radius: var(--radius-sm); background: var(--tenant, var(--navy)); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 13px; letter-spacing: .02em; flex: none; }

/* Kennungen und Werte mit Einheit brechen nie um */
.mono-id, .mono-id-lg, .mono-id-xl, .ys-doc-mono, .ys-nowrap { white-space: nowrap; }

.ys-topnav-org { color: var(--ink-muted); padding-left: 8px; border-left: var(--hairline) solid var(--line); }

/* Umbruch: Absätze ohne Einzelwort am Ende, Überschriften ausgeglichen. Kennungen, Beträge und Werte mit Einheit verbinden die Daten mit geschütztem Leerzeichen bzw. U+2011. */
html { text-wrap: pretty; }
h1, h2, h3, .app-title, .app-section { text-wrap: balance; }
.ys-pin-keys > .ys-pin-key, .ys-pin-keys > .ys-btn { width: 72px !important; height: 72px !important; min-width: 72px; }
.ys-portal .ys-btn-lg { font-size: 16px; line-height: 24px; }
.ys-portal b, .ys-portal strong { font-weight: 600; }

.ys-portal .ys-topnav-user { height: var(--control-lg); }
.ys-portal .ys-topnav-compact .ys-btn { width: var(--control-lg); height: var(--control-lg); }
.ys-portal textarea, .ys-portal input { font-size: 16px; line-height: 24px; }
.ys-portal .ys-avatar { background: var(--surface-sunken); color: var(--ink-muted); }

/* ---------- Mobile App: AppBar, BottomNav, Sheet, MeasureTile, Liste (Kapitel 08) ---------- */
.ys-shell { display: flex; flex-direction: column; min-height: 100%; }
.ys-shell > .ys-sidebar { display: none; }
.ys-shell-main { display: flex; flex-direction: column; flex: 1; min-width: 0; }
@media (min-width: 900px) { .ys-shell { flex-direction: row; } .ys-shell > .ys-sidebar { display: flex; flex: none; position: sticky; top: 0; align-self: flex-start; height: 100vh; height: 100dvh; min-height: 0; overflow-y: auto; } .ys-shell > .ys-shell-main > .ys-appbar { display: none; } }
.ys-mobile { min-height: 100%; background: var(--surface-raised); padding-bottom: calc(var(--control-touch) + env(safe-area-inset-bottom)); }
.ys-mobile-body { display: flex; flex-direction: column; gap: var(--space-6); padding: var(--space-4); }
@media (min-width: 900px) { .ys-mobile-body { gap: var(--space-4); padding: var(--space-5) var(--space-6); } }
.ys-appbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: var(--space-3); height: var(--control-touch); padding: 0 var(--space-4); background: var(--surface-raised); border-bottom: var(--hairline) solid var(--line); }
.ys-appbar-mark { display: inline-flex; align-items: center; color: var(--navy); flex: none; text-decoration: none; }
.ys-appbar-mark svg { width: 39px; height: 28px; }  /* Das Zeichen ist 56:40, kein Quadrat (08, Aufbau einer Seite) */
.ys-appbar-context { flex: 1; min-width: 0; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ys-appbar-actions { display: flex; align-items: center; gap: var(--space-1); flex: none; }
.ys-appbar .ys-btn-icon { width: var(--control-lg); height: var(--control-lg); }

.ys-bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface-raised); border-top: var(--hairline) solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.ys-bottomnav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: var(--control-touch); color: var(--ink-muted); text-decoration: none; }
.ys-bottomnav-item svg { width: 24px; height: 24px; color: var(--ink-faint); }
.ys-bottomnav-item[aria-current="page"] { color: var(--ink); font-weight: 500; }
.ys-bottomnav-item[aria-current="page"] svg { color: var(--navy); }
.ys-bottomnav-label { display: inline-flex; align-items: baseline; gap: var(--space-1); }
.ys-bottomnav-count { color: var(--ink-muted); font-variant-numeric: tabular-nums; }
@media (min-width: 900px) { .ys-bottomnav { display: none; } .ys-mobile { padding-bottom: 0; } }
.ys-shell:has(.ys-savebar) > .ys-shell-main > .ys-bottomnav { display: none; }
.ys-shell:has(.ys-savebar) .ys-mobile { padding-bottom: 0; }
.ys-shell .ys-savebar { height: calc(60px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); }

.ys-sheet-wrap { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.ys-sheet { width: 100%; max-height: 90vh; background: var(--surface-raised); border-top: var(--hairline) solid var(--line); border-radius: var(--radius-lg) var(--radius-lg) 0 0; box-shadow: var(--shadow-floating); display: flex; flex-direction: column; }
.ys-sheet .ys-drawer-head, .ys-sheet .ys-drawer-body, .ys-sheet .ys-drawer-foot { padding-left: var(--space-4); padding-right: var(--space-4); }
.ys-sheet .ys-drawer-foot { padding-bottom: calc(var(--space-3) + env(safe-area-inset-bottom)); }

.ys-measure-grid { display: grid; gap: var(--space-3); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ys-measure { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-4); background: var(--surface-raised); border: var(--hairline) solid var(--line); border-radius: var(--radius-md); min-width: 0; }
.ys-measure-label { color: var(--ink-muted); }
.ys-measure-value { display: flex; align-items: baseline; gap: var(--space-1); color: var(--ink); white-space: nowrap; }
.ys-measure-unit { color: var(--ink-muted); }
.ys-measure-note { color: var(--ink-faint); }
@media (min-width: 900px) { .ys-measure-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.ys-list { display: flex; flex-direction: column; border-top: var(--hairline) solid var(--line); }
.ys-list-item { display: flex; flex-direction: column; gap: var(--space-1); justify-content: center; min-height: var(--control-touch); padding: var(--space-3) var(--space-2); border-bottom: var(--hairline) solid var(--line); color: inherit; text-decoration: none; }
.ys-list-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); }
.ys-list-value { color: var(--ink); font-variant-numeric: tabular-nums; text-align: right; flex: none; }
.ys-list-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-3); color: var(--ink-muted); }
@media (hover: hover) { .ys-list-item:hover { background: var(--surface-sunken); } }
.ys-list-pick { flex-direction: row; align-items: stretch; gap: 0; padding: 0; }
.ys-list-pick > .ys-check { flex: none; align-items: center; justify-content: center; gap: 0; width: var(--control-touch); min-height: var(--control-touch); }
.ys-list-pick > .ys-check input { top: 0; width: 100%; height: 100%; }
.ys-list-pick > .ys-check .ys-check-box { margin-top: 0; }
.ys-list-pick-link { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--space-1); justify-content: center; padding: var(--space-3) var(--space-2) var(--space-3) 0; color: inherit; text-decoration: none; }

/* ---------- StatePanel: Zustandstafel (Kapitel 03) ---------- */
.ys-state { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-6); background: var(--surface-raised); border: var(--hairline) solid var(--line); border-radius: var(--radius-md); }
.ys-state-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; }
.ys-state-titles { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
.ys-state-value { display: flex; align-items: baseline; gap: var(--space-2); color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ys-state-unit { color: var(--ink-muted); }
.ys-state-trend { display: inline-flex; align-items: center; gap: var(--space-1); color: var(--ink-muted); }
.ys-state-trend svg { width: 14px; height: 14px; }
.ys-state-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-3); color: var(--ink-faint); }
.ys-state-marks { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.ys-state-note { color: var(--ink-muted); text-wrap: pretty; margin: 0; }

/* ---------- Thread: Verlauf einer Rückfrage (Kapitel 05) ---------- */
.ys-thread { display: flex; flex-direction: column; border-top: var(--hairline) solid var(--line); }
.ys-thread-item { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-3); border-bottom: var(--hairline) solid var(--line); }
.ys-thread-own { background: var(--navy-soft); }
.ys-thread-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); color: var(--ink-muted); }
.ys-thread-text { color: var(--ink); text-wrap: pretty; white-space: pre-line; margin: 0; }

/* ---------- Links im Text und Fließtext (README, Interaktion) ---------- */
.ys-link, .ys-prose a { color: var(--link); text-decoration: underline; text-decoration-thickness: var(--hairline); text-underline-offset: 3px; }
.ys-prose { max-width: var(--reading-max); color: var(--ink); }
.ys-prose > :first-child { margin-top: 0; }
.ys-prose > :last-child { margin-bottom: 0; }
.ys-prose p, .ys-prose ul, .ys-prose ol { margin: 0 0 var(--space-3); text-wrap: pretty; }
.ys-prose ul, .ys-prose ol { padding-left: var(--space-5); }
.ys-prose li + li { margin-top: var(--space-1); }
.ys-prose h1 { font-size: 24px; line-height: 30px; font-weight: 600; letter-spacing: -0.01em; margin: var(--space-8) 0 var(--space-3); text-wrap: balance; }
.ys-prose h2 { font-size: 18px; line-height: 24px; font-weight: 600; margin: var(--space-6) 0 var(--space-2); text-wrap: balance; }
.ys-prose h3 { font-size: 14px; line-height: 20px; font-weight: 600; margin: var(--space-5) 0 var(--space-1); text-wrap: balance; }
.ys-prose code { font-family: var(--font-mono); font-size: 13px; line-height: 18px; font-weight: 500; letter-spacing: 0.01em; white-space: nowrap; }
@media (hover: hover) {
  .ys-link:hover, .ys-prose a:hover { text-decoration-thickness: 2px; }
}

/* ---------- SignInLayout: Anmeldeseite (03, Anmelden) ---------- */
.ys-anmelden { min-height: 100vh; display: flex; flex-direction: column; background: var(--surface-raised); }
.ys-anmelden-kopf { display: flex; align-items: center; justify-content: space-between; padding: var(--space-5) var(--space-8); }
.ys-anmelden-marke { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--ink); text-decoration: none; }
.ys-anmelden-marke svg { width: 40px; height: 29px; display: block; color: var(--navy); }
.ys-anmelden-marke .ys-wordmark { font-size: 19px; }
.ys-anmelden-kopf a, .ys-anmelden-fuss a, .ys-anmelden-links button { color: var(--ink-muted); text-decoration: none; }
.ys-anmelden-mitte { flex: 1; display: flex; align-items: flex-start; justify-content: center; padding: var(--space-16) var(--space-6) var(--space-12); }
.ys-anmelden-form { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: var(--space-5); }
.ys-anmelden-form h1 { margin: 0; }
.ys-anmelden-form p { margin: 0; color: var(--ink-muted); text-wrap: pretty; }
.ys-anmelden-oder { display: flex; align-items: center; gap: var(--space-3); color: var(--ink-muted); }
.ys-anmelden-oder::before, .ys-anmelden-oder::after { content: ""; flex: 1; height: var(--hairline); background: var(--line); }
.ys-anmelden-links { display: flex; justify-content: space-between; gap: var(--space-4); }
.ys-anmelden-links button { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.ys-anmelden-fuss { display: flex; justify-content: space-between; gap: var(--space-4); padding: var(--space-5) var(--space-8); border-top: var(--hairline) solid var(--line); color: var(--ink-muted); flex-wrap: wrap; }
.ys-anmelden-fuss span:last-child { display: flex; gap: var(--space-4); }
@media (hover: hover) {
  .ys-anmelden-kopf a:hover, .ys-anmelden-fuss a:hover, .ys-anmelden-links button:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
}
.ys-anmelden-frei { min-height: 0; }

/* ---------- 0.10.0 ---------- */

/* 0.10.0: Ketten (chain), ein Vorgang in Abschnitten auf mehreren Zeilen (03, Planung). Die Kante, an der es
   weitergeht, ist gerade und trägt 2px line-strong; Hover oder Fokus auf einem Abschnitt hebt alle hervor. */
.ys-sched-chain-in { border-top-left-radius: 0; border-bottom-left-radius: 0; border-left: 2px solid var(--line-strong); margin-left: 0; }
.ys-sched-chain-out { border-top-right-radius: 0; border-bottom-right-radius: 0; border-right: 2px solid var(--line-strong); margin-right: 0; }
.ys-sched-chain-hot { border-color: var(--line-strong); background: var(--surface-sunken); }

/* 0.10.0: Leseseite ohne Anmeldung (width="reading"): Text bis reading-max, oben näher am Kopf. */
.ys-anmelden-mitte-lesen { padding-top: var(--space-8); }
.ys-anmelden-lesen { width: 100%; max-width: var(--reading-max); display: flex; flex-direction: column; gap: var(--space-5); }

/* 0.10.0: Rahmen einer Portalseite und Auswahl im Portal (05, Portale). */
.ys-portal-body { flex: 1; display: flex; flex-direction: column; }
.ys-portal-options { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-4); }
.ys-portal-option { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; justify-content: space-between; padding-bottom: var(--space-4); border-bottom: var(--hairline) solid var(--line); }
.ys-portal-option-text { display: flex; flex-direction: column; min-width: 0; }
.ys-portal-option-end { display: flex; gap: var(--space-4); align-items: center; }

/* Layout ohne eigene Stile (README, Layout; Regelkarten Stack, Inline, Text, AppLayout, PhotoGrid, HoneypotField,
   CopyValue, DocumentFrame). Abstände nur aus den Stufen des Rasters, Text nur über die Typo-Klassen. */

.ys-stack { display: flex; flex-direction: column; min-width: 0; }
.ys-inline { display: flex; flex-wrap: wrap; align-items: center; min-width: 0; }
span.ys-inline, span.ys-stack { display: inline-flex; }
fieldset.ys-stack, fieldset.ys-inline { border: 0; margin: 0; padding: 0; }
ul.ys-stack, ol.ys-stack, ul.ys-inline { list-style: none; margin: 0; padding: 0; }
form.ys-stack, form.ys-inline { margin: 0; }
.ys-inline-nowrap { flex-wrap: nowrap; }
.ys-gap-1 { gap: var(--space-1); }
.ys-gap-2 { gap: var(--space-2); }
.ys-gap-3 { gap: var(--space-3); }
.ys-gap-4 { gap: var(--space-4); }
.ys-gap-5 { gap: var(--space-5); }
.ys-gap-6 { gap: var(--space-6); }
.ys-gap-8 { gap: var(--space-8); }
.ys-gap-10 { gap: var(--space-10); }
.ys-gap-12 { gap: var(--space-12); }
.ys-align-start { align-items: flex-start; }
.ys-align-end { align-items: flex-end; }
.ys-align-baseline { align-items: baseline; }
.ys-justify-end { justify-content: flex-end; }
.ys-justify-between { justify-content: space-between; }
.ys-reading { max-width: var(--reading-max); }
/* Aus Tabelle wird Liste (08). Das Kapitel schreibt den Wechsel vor, aber die Tabelle aus 03 und
   die Liste aus 08 sind zwei verschiedene Markups — eine Oberflaeche stellt deshalb beide in das
   Dokument und zeigt je eine davon. Hier und nur hier steht die Umschaltung, damit niemand den
   Haltepunkt abschreibt: 900px ist kein Token, und eine zweite 900 im Projekt waere eine zweite
   Wahrheit ueber die Stelle, an der die Oberflaeche wechselt. */
.ys-wide-only { display: none; }
.ys-narrow-only { display: block; }
@media (min-width: 900px) { .ys-wide-only { display: block; } .ys-narrow-only { display: none; } }
.ys-text { margin: 0; text-wrap: pretty; }
.ys-text-muted { color: var(--ink-muted); }

/* App-Shell (03): Sidebar links in voller Höhe, Inhalt mit Seitenrand space-6, Titelzeile bis Inhalt im Abstand space-4. */
.ys-app { display: flex; min-height: 100vh; background: var(--surface-raised); }
.ys-app > .ys-sidebar { flex: none; min-height: 100vh; }
.ys-app-main { flex: 1; min-width: 0; padding: var(--space-5) var(--space-6); display: flex; flex-direction: column; gap: var(--space-4); }

/* Fotoreihe (04, Fotos): Kacheln gleich breit, umbrechend. */
.ys-photogrid { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.ys-photogrid > li { width: calc(var(--space-12) * 2); }

/* Falle für Bots (05, Portale): außerhalb des Bildes, nicht fokussierbar, aria-hidden. */
.ys-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Wert zum Kopieren: mono-id, lange Werte brechen an jeder Stelle um statt gekürzt zu werden. */
.ys-copy { position: relative; display: inline-flex; align-items: center; gap: var(--space-1); min-width: 0; max-width: 100%; flex-wrap: wrap; }
.ys-copy .ys-copy-value { white-space: normal; overflow-wrap: anywhere; min-width: 0; }
.ys-copy-state { color: var(--ink-muted); }
.ys-copy-state:empty { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* Beleg in der App: A4 auf surface-canvas mit Rand space-6, scrollt waagerecht. */
.ys-docframe { overflow-x: auto; background: var(--surface-canvas); padding: var(--space-6); }
