/* ===========================================================================
   Brokanto Design System
   Ein Token-Layer. Zwei Themes. Alles andere leitet sich hieraus ab.
   =========================================================================== */

:root {
  /* — Farbe: Rohpigmente ————————————————————————————————————— */
  --jade-100: #E4FFF6;
  --jade-300: #9CFADD;
  --jade-400: #64F0C0;
  --jade-500: #2FD9A4;
  --jade-700: #0E8C68;

  --iris-100: #EDEAFF;
  --iris-300: #C4BBFF;
  --iris-400: #9B8CFF;
  --iris-500: #7663F5;
  --iris-700: #4A38B8;

  --amber-400: #FFC26B;
  --amber-500: #F5A038;
  --rose-400: #FF8098;
  --rose-500: #F0546F;
  --sky-400: #7BD0FF;

  /* — Typografie ————————————————————————————————————————————— */
  --font-sans: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Inter, system-ui, sans-serif;
  --font-text: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Inter, system-ui, sans-serif;
  --font-mono: "SF Mono", ui-monospace, "JetBrains Mono", "Roboto Mono",
    Menlo, monospace;

  --fs-display: clamp(1.9rem, 1.4rem + 1.2vw, 2.5rem);
  --fs-h1: clamp(1.75rem, 1.1rem + 1.4vw, 2.3rem);
  --fs-h2: clamp(1.25rem, 1rem + 0.65vw, 1.6rem);
  --fs-h3: 1.0625rem;
  --fs-body: 0.9375rem;
  --fs-sm: 0.875rem;
  --fs-xs: 0.8125rem;
  --fs-2xs: 0.75rem;

  --lh-tight: 1.06;
  --lh-snug: 1.28;
  --lh-body: 1.5;

  --tr-display: -0.035em;
  --tr-head: -0.022em;
  --tr-body: -0.008em;
  --tr-caps: 0.14em;

  /* — Raum ——————————————————————————————————————————————————— */
  --s-1: 2px;  --s-2: 4px;  --s-3: 6px;  --s-4: 8px;  --s-5: 12px;
  --s-6: 16px; --s-7: 20px; --s-8: 24px; --s-9: 32px; --s-10: 40px;
  --s-11: 56px; --s-12: 72px; --s-13: 96px; --s-14: 128px;

  --r-xs: 6px; --r-sm: 10px; --r-md: 14px; --r-lg: 16px; --r-xl: 24px;
  --r-2xl: 28px; --r-full: 999px;

  /* — Bewegung ——————————————————————————————————————————————— */
  --e-out: cubic-bezier(.16, 1, .3, 1);
  --e-in-out: cubic-bezier(.65, 0, .35, 1);
  --e-spring: cubic-bezier(.34, 1.56, .64, 1);
  --t-fast: 130ms;
  --t-base: 220ms;
  --t-slow: 420ms;
  --t-lazy: 780ms;

  /* — Layout ————————————————————————————————————————————————— */
  --measure: 46ch;           /* Lesbare Zeilenlänge für Deutsch */
  --rail-w: 192px;
  --dock-w: 300px;
  --topbar-h: 56px;
  --shell-max: 1440px;
}

/* ——— DARK (Default) ——————————————————————————————————————————— */
:root, :root[data-theme="dark"] {
  --bg-0: #080A10;
  --bg-1: #0D1018;
  --bg-2: #121722;
  --bg-3: #1A2230;
  --bg-4: #242D3C;

  --surface: rgba(255,255,255,.032);
  --surface-2: rgba(255,255,255,.052);
  --surface-3: rgba(255,255,255,.078);
  --glass: rgba(14, 17, 25, .72);
  --glass-strong: rgba(10, 12, 18, .88);

  --line: rgba(255,255,255,.075);
  --line-2: rgba(255,255,255,.125);
  --line-3: rgba(255,255,255,.2);

  --ink-0: #F4F6FA;          /* primär */
  --ink-1: #C3CAD8;          /* sekundär */
  --ink-2: #8891A3;          /* tertiär */
  --ink-3: #7A8397;          /* schwach — noch lesbar, 5.1:1 auf bg-1 */

  --acc: var(--jade-400);
  --acc-text: var(--jade-400);   /* Akzent als Schrift */
  --acc-fill: var(--jade-400);   /* Akzent als Fläche unter Schrift */
  --marke-a: var(--jade-400);    /* Verlauf für Initialen und Marke */
  --marke-b: var(--iris-400);
  --marke-ink: #04140F;
  --acc-soft: rgba(100, 240, 192, .14);
  --acc-line: rgba(100, 240, 192, .3);
  --acc-ink: #04140F;

  --iris: var(--iris-400);
  --iris-soft: rgba(155, 140, 255, .15);
  --iris-line: rgba(155, 140, 255, .32);

  --warn: var(--amber-400);
  --warn-soft: rgba(255, 194, 107, .14);
  --warn-text: var(--amber-400);
  --danger: var(--rose-400);
  --danger-soft: rgba(255, 128, 152, .14);
  --danger-text: var(--rose-400);
  --info: var(--sky-400);
  --info-soft: rgba(123, 208, 255, .13);
  --info-text: var(--sky-400);

  --shadow-sm: 0 1px 3px rgba(0,0,0,.12);
  --shadow-md: 0 8px 24px rgba(0,0,0,.2);
  --shadow-lg: 0 20px 64px rgba(0,0,0,.35);
  --shadow-glow: 0 0 0 1px var(--acc-line), 0 0 24px color-mix(in srgb, var(--acc) 8%, transparent);

  --hairline: inset 0 1px 0 rgba(255,255,255,.055);
  --grain-opacity: .025;
  --aurora-opacity: .28;
  --chart-grid: rgba(255,255,255,.06);
  --glass-saturate: 1.6;
}

/* ——— LIGHT ————————————————————————————————————————————————————— */
:root[data-theme="light"] {
  --bg-0: #F5F4F0;
  --bg-1: #FAF9F6;
  --bg-2: #FFFFFF;
  --bg-3: #FFFFFF;
  --bg-4: #F1F0EC;

  --surface: rgba(16, 20, 30, .028);
  --surface-2: rgba(16, 20, 30, .05);
  --surface-3: rgba(16, 20, 30, .075);
  /* Ohne Sättigungsanhebung: sonst schlagen die Objektgrafiken
     als rosa Schlieren durch die Kopfleiste durch. */
  --glass: rgba(250,249,246,.93);
  --glass-strong: rgba(250,249,246,.97);
  --glass-saturate: 1.05;

  --line: rgba(16, 20, 30, .1);
  --line-2: rgba(16, 20, 30, .16);
  --line-3: rgba(16, 20, 30, .26);

  --ink-0: #0B0E15;
  --ink-1: #333B4B;
  --ink-2: #5F6878;
  --ink-3: #656D7D;          /* 4.9:1 — vorher 2.9:1 und damit unlesbar */

  --acc: #0B9E74;            /* Marke: Linien, Diagramme, Symbole */
  --acc-text: #06704F;       /* Schrift unter 14 px: 5.8:1 */
  --acc-fill: #067050;       /* Fläche mit weisser Schrift: 6.1:1 statt 3.4:1 */
  /* Hell: der Verlauf trägt dunkle Schrift, also müssen beide Enden hell sein. */
  --marke-a: var(--jade-300);
  --marke-b: var(--iris-300);
  --marke-ink: #0B0E15;
  --acc-soft: rgba(11, 158, 116, .1);
  --acc-line: rgba(11, 158, 116, .28);
  --acc-ink: #FFFFFF;

  --iris: #5A45D6;
  --iris-soft: rgba(90, 69, 214, .1);
  --iris-line: rgba(90, 69, 214, .26);

  --warn: #B5741A;           /* Fläche, Linie, Symbol */
  --warn-soft: rgba(181, 116, 26, .12);
  --warn-text: #8A5606;      /* Schrift: 5.8:1 statt 3.8:1 */
  --danger: #CE2F4D;
  --danger-soft: rgba(206, 47, 77, .1);
  --danger-text: #B41F3B;
  --info: #1878B8;
  --info-soft: rgba(24, 120, 184, .1);
  --info-text: #14618F;

  --shadow-sm: 0 1px 2px rgba(16,20,30,.06), 0 2px 8px rgba(16,20,30,.05);
  --shadow-md: 0 2px 6px rgba(16,20,30,.06), 0 14px 34px rgba(16,20,30,.09);
  --shadow-lg: 0 4px 12px rgba(16,20,30,.07), 0 30px 70px rgba(16,20,30,.14);
  --shadow-glow: 0 0 0 1px var(--acc-line);

  --hairline: inset 0 1px 0 rgba(255,255,255,.9);
  --grain-opacity: .025;
  --aurora-opacity: .12;
  --chart-grid: rgba(16,20,30,.07);
}

@media (prefers-reduced-motion: reduce) {
  :root { --t-fast: 1ms; --t-base: 1ms; --t-slow: 1ms; --t-lazy: 1ms; }
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===========================================================================
   Base — Reset, Typografie, Atmosphäre
   =========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100dvh;
  /* Kein `overflow` auf Wurzel oder Körper: beides macht daraus einen
     Rollbehälter und nimmt der Kopfzeile ihr `position: sticky`.
     Seitliches Rollen wird dort verhindert, wo es entsteht.            */
  /* Deutsch baut lange Wörter. „Zustandsnachweis“ oder „Occasionshandel“
     passen nicht in jede Spalte — dann wird getrennt statt übergelaufen. */
  overflow-wrap: break-word;
  hyphens: auto;
  background: var(--bg-0);
  color: var(--ink-0);
  font-family: var(--font-text);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: var(--tr-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1, "liga" 1, "cv05" 1, "ss01" 1;
  transition: background var(--t-slow) var(--e-out), color var(--t-slow) var(--e-out);
}

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 600;
  line-height: var(--lh-snug);
  letter-spacing: var(--tr-head);
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p { text-wrap: pretty; }

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
ul, ol { list-style: none; padding: 0; }
svg { display: block; }
canvas { display: block; }

:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}
::selection { background: var(--acc-soft); color: var(--ink-0); }

/* — Scrollbars —————————————————————————————————————————————— */
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--line-2); border-radius: 99px;
  border: 3px solid transparent; background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--line-3); background-clip: content-box; }

/* — Atmosphäre ————————————————————————————————————————————— */
.aurora {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: var(--aurora-opacity); overflow: hidden;
  transition: opacity var(--t-lazy) var(--e-out);
}
.aurora__blob {
  position: absolute; border-radius: 50%;
  filter: blur(90px);
}
.aurora__blob--a {
  width: 46vw; height: 46vw; left: -10vw; top: -14vw;
  background: radial-gradient(circle at 40% 40%, rgba(100,240,192,.30), transparent 65%);
}
.aurora__blob--b {
  width: 52vw; height: 52vw; right: -16vw; top: 4vh;
  background: radial-gradient(circle at 50% 50%, rgba(155,140,255,.26), transparent 66%);
}
.aurora__blob--c {
  width: 40vw; height: 40vw; left: 24vw; bottom: -22vw;
  background: radial-gradient(circle at 50% 50%, rgba(123,208,255,.16), transparent 68%);
}

.grain {
  position: fixed; inset: -50%; z-index: 1; pointer-events: none;
  opacity: var(--grain-opacity); mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

/* — Boot ——————————————————————————————————————————————————— */
.boot {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-content: center; gap: var(--s-8);
  justify-items: center; background: var(--bg-0);
  transition: opacity var(--t-slow) var(--e-out), visibility var(--t-slow);
}
.boot--done { opacity: 0; visibility: hidden; }
.boot__mark { color: var(--acc); animation: mark-pulse 2.2s var(--e-in-out) infinite; }
@keyframes mark-pulse {
  0%,100% { opacity: .5; transform: scale(.96); }
  50% { opacity: 1; transform: scale(1); }
}
.boot__lines {
  font-family: var(--font-mono); font-size: var(--fs-2xs);
  color: var(--ink-3); text-align: left; min-width: 320px;
  line-height: 1.9; letter-spacing: .02em;
}
.boot__lines b { color: var(--acc); font-weight: 500; }

/* — Utilities ——————————————————————————————————————————————— */
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.tnum { font-variant-numeric: tabular-nums; }
.caps {
  font-size: var(--fs-2xs); font-weight: 600;
  letter-spacing: var(--tr-caps); text-transform: uppercase;
  color: var(--ink-3);
}
.dim { color: var(--ink-2); }
.dimmer { color: var(--ink-3); }
/* Beschreibungen brechen bei 46 Zeichen um — 100 Zeichen bei 12 px liest
   niemand zu Ende. `p`/`div` bekommen die Grenze, `span` inline nicht.   */
p.dimmer, div.dimmer, .expl { max-width: var(--measure); }
.expl { font-size: var(--fs-sm); color: var(--ink-2); line-height: var(--lh-body); }
.acc { color: var(--acc-text); }
.iris { color: var(--iris); }
.warn { color: var(--warn); }
.danger { color: var(--danger); }
.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.stack { display: grid; gap: var(--s-5); }
.row { display: flex; align-items: center; gap: var(--s-4); }
.row--wrap { flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.spacer { flex: 1; }
.hairline { height: 1px; background: var(--line); border: 0; }

[hidden] { display: none !important; }


/* ——— Sprungmarke ————————————————————————————————————————— */
.skip {
  position: fixed; top: -60px; left: var(--s-6); z-index: 120;
  padding: 10px 18px; border-radius: 0 0 var(--r-sm) var(--r-sm);
  background: var(--acc-fill); color: var(--acc-ink); font-weight: 600;
  font-size: var(--fs-sm); transition: top var(--t-base) var(--e-out);
}
.skip:focus { top: 0; }

/* ===========================================================================
   Shell — Rail, Topbar, Canvas, Agent-Dock
   =========================================================================== */

.app {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  min-height: 100dvh;
}

/* ——— RAIL ————————————————————————————————————————————————— */
.rail {
  position: sticky; top: 0; height: 100dvh; min-width: 0;
  display: flex; flex-direction: column; gap: 12px; padding: 12px 10px;
  border-right: 1px solid var(--line);
  background: linear-gradient(165deg, color-mix(in srgb, var(--iris) 4%, var(--bg-1)), var(--bg-0) 65%);
  z-index: 40;
}
.rail__head { display: flex; align-items: center; flex: none; min-height: 40px; }
.rail__brand { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 0 4px; }
.rail__brand b { font-size: 18px; font-weight: 650; letter-spacing: -.045em; }
.rail__logo {
  color: var(--acc); display: grid; place-items: center; flex: none;
  width: 32px; height: 32px; border-radius: 11px;
  background: linear-gradient(140deg, var(--acc-soft), var(--iris-soft));
  box-shadow: inset 0 0 0 1px var(--acc-line), 0 0 22px var(--acc-soft);
}
.rail__nav { display: flex; flex-direction: column; gap: 0; min-height: 0; overflow-y: auto;
  flex: 1; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.rail__group { display: grid; gap: 2px; padding: 8px 0; }
.rail__group + .rail__group { border-top: 1px solid var(--line); }
.rail__item {
  position: relative; display: flex; align-items: center; gap: 10px; min-width: 0;
  width: 100%; min-height: 35px; padding: 8px 11px; border: 1px solid transparent;
  border-radius: 10px; color: var(--ink-2);
  transition: color var(--t-fast), background var(--t-fast), border-color var(--t-fast);
}
.rail__item > svg { flex: none; opacity: .8; }
.rail__label { font-size: 13px; line-height: 1.3; font-weight: 500; letter-spacing: -.012em; hyphens: none; white-space: nowrap; }
.rail__item:hover { color: var(--ink-0); background: var(--surface-2); }
.rail__item[aria-current="page"] {
  color: var(--acc-text); border-color: var(--acc-line);
  background: linear-gradient(100deg, var(--acc-soft), color-mix(in srgb, var(--acc-soft) 30%, transparent));
  box-shadow: inset 2px 0 var(--acc), 0 2px 12px color-mix(in srgb, var(--acc-soft) 35%, transparent);
}
.rail__item[aria-current="page"] > svg { opacity: 1; }
.rail__agent { display: flex; min-width: 0; align-items: center; gap: 2px; }
.rail__agent > .rail__item { flex: 1; }
.rail__agent-toggle { display: grid; place-items: center; flex: none; width: 28px; min-height: 32px;
  border-radius: 9px; color: var(--iris); background: var(--iris-soft); }
.rail__agent-toggle:hover, .rail__agent-toggle[aria-expanded="true"] { box-shadow: inset 0 0 0 1px var(--iris-line); }
.rail__utility { display: flex; align-items: center; gap: 4px; padding-top: 10px; border-top: 1px solid var(--line); flex: none; }
.rail__tool { display: flex; align-items: center; justify-content: center; gap: 7px; position: relative;
  min-width: 32px; min-height: 34px; border-radius: 9px; color: var(--ink-2); }
.rail__tool:hover { background: var(--surface-2); color: var(--ink-0); }
.rail__command { flex: 1; justify-content: flex-start; padding-inline: 6px; }
.rail__command > span { font-size: 11px; letter-spacing: -.025em; }
.rail__command kbd { padding: 1px 3px; font-size: 9px; margin-left: auto; }
.rail__close { display: none; }
.rail__tip { display: none; }
.rail--static { gap: 16px; }
.rail--static .rail__nav { gap: 2px; }

/* ——— MAIN ————————————————————————————————————————————————— */
.main { display: flex; flex-direction: column; min-width: 0; }

.topbar {
  position: sticky; top: 0; z-index: 25;
  height: var(--topbar-h); display: flex; align-items: center; gap: var(--s-5);
  padding: 0 var(--s-8); border-bottom: 1px solid var(--line);
  background: var(--glass); backdrop-filter: blur(22px) saturate(var(--glass-saturate));
}
.topbar__crumbs { display: flex; align-items: center; gap: var(--s-3); min-width: 0; flex: 0 1 auto; flex-wrap: nowrap; }
.topbar > .btn, .topbar > a, .topbar > .row { flex: none; }
.topbar__crumbs > * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.topbar__crumbs b { font-weight: 600; font-size: var(--fs-sm); letter-spacing: var(--tr-head); }
.topbar__crumbs span { color: var(--ink-3); font-size: var(--fs-sm); }

.omni {
  /* Darf schrumpfen, damit die Knöpfe rechts nie abgeschnitten werden. */
  flex: 1 1 180px; min-width: 0; max-width: 620px; height: 38px; display: flex; align-items: center;
  gap: var(--s-4); padding: 0 var(--s-5); border-radius: var(--r-full);
  background: var(--surface); border: 1px solid var(--line);
  color: var(--ink-2); font-size: var(--fs-sm); cursor: text;
  transition: border-color var(--t-base), background var(--t-base), box-shadow var(--t-base);
}
.omni:hover { border-color: var(--line-2); background: var(--surface-2); }
.omni:focus-within { border-color: var(--acc-line); box-shadow: 0 0 0 4px var(--acc-soft); }
.omni input {
  flex: 1; background: none; border: 0; outline: none; min-width: 0;
  color: var(--ink-0);
}
.omni input::placeholder { color: var(--ink-3); }
.omni kbd { flex: none; }

kbd {
  font-family: var(--font-mono); font-size: 10px; padding: 2px 6px;
  border-radius: 5px; background: var(--surface-2); border: 1px solid var(--line);
  color: var(--ink-2); line-height: 1.4;
}
/* In einem gefüllten Knopf erbt die Taste dessen Schriftfarbe — sonst
   steht Grau auf Grün. */
.btn kbd {
  color: inherit; opacity: .72;
  background: color-mix(in srgb, currentColor 14%, transparent);
  border-color: color-mix(in srgb, currentColor 26%, transparent);
}

.canvas {
  flex: 1; min-width: 0;
  padding: var(--s-9) var(--s-8) var(--s-13);
  animation: view-in var(--t-slow) var(--e-out) both;
}
/* Bewusst nur Deckkraft: eine bleibende transform-Matrix würde die
   Fläche zum Bezugsrahmen machen und feste Leisten darin einsperren. */
@keyframes view-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.canvas__inner { max-width: var(--shell-max); margin: 0 auto; }

/* ——— AGENT DOCK ——————————————————————————————————————————— */
.dock {
  position: fixed; top: 8px; bottom: 8px; left: calc(var(--rail-w) + 8px);
  height: calc(100dvh - 16px); width: var(--dock-w); max-width: calc(100vw - var(--rail-w) - 24px);
  display: flex; flex-direction: column; border: 1px solid var(--line-2); border-radius: var(--r-lg);
  overflow: hidden; visibility: hidden; opacity: 0; transform: translateX(-10px); pointer-events: none;
  background: linear-gradient(155deg, color-mix(in srgb, var(--iris) 5%, var(--bg-1)), var(--bg-0) 65%);
  box-shadow: var(--shadow-lg); z-index: 50;
  transition: opacity var(--t-base), transform var(--t-base) var(--e-out);
}
.dock--open { visibility: visible; opacity: 1; transform: none; pointer-events: auto; }
.dock__toggle { color: var(--iris); }
html.shell-panel-open { overflow: hidden; }
html.shell-panel-open .app::after { content: ""; position: fixed; inset: 0; z-index: 35; pointer-events: none;
  background: color-mix(in srgb, var(--bg-0) 50%, transparent); backdrop-filter: blur(2px); }

.dock__head {
  height: var(--topbar-h); flex: none; display: flex; align-items: center;
  gap: var(--s-4); padding: 0 var(--s-5); border-bottom: 1px solid var(--line);
  min-width: 0; overflow: hidden;
}
.dock__head > .btn { flex: none; }
.dock__pulse {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  display: grid; place-items: center; background: var(--iris-soft); color: var(--iris);
  box-shadow: inset 0 0 0 1px var(--iris-line);
}
.dock__title-text { flex: 1; min-width: 0; }
.dock__title-text b { display: block; font-size: var(--fs-sm); font-weight: 600; }
.dock__title-text span { display: block; font-size: var(--fs-2xs); color: var(--ink-3); }

.dock__body { flex: 1; overflow-y: auto; padding: var(--s-6) var(--s-5) var(--s-9); }
.dock__section { margin-bottom: var(--s-8); }
.dock__section > .caps { margin-bottom: var(--s-5); display: block; }
.dock__identity { display: grid; place-items: center; width: 42px; height: 42px; flex: none;
  border-radius: var(--r-md); color: var(--iris); background: var(--iris-soft); }
.dock__foot { padding: 12px; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.dock__action { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 8px;
  color: var(--ink-1); font-size: var(--fs-xs); border-radius: var(--r-sm); }
.dock__action > svg:first-child { color: var(--iris); }
.dock__action > svg:last-child { margin-left: auto; color: var(--ink-3); }
.dock__action:hover { background: var(--iris-soft); color: var(--ink-0); }

.agentcard {
  padding: var(--s-5); border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line);
  display: grid; gap: var(--s-4);
}
.agentcard + .agentcard { margin-top: var(--s-4); }
.agentcard__top { display: flex; align-items: center; gap: var(--s-4); }
.agentcard__avatar {
  width: 32px; height: 32px; border-radius: var(--r-sm); flex: none;
  display: grid; place-items: center; font-family: var(--font-mono);
  font-size: 11px; font-weight: 700; letter-spacing: -.03em;
}
.agentcard__name { font-size: var(--fs-sm); font-weight: 600; }
.agentcard__meta { font-size: var(--fs-2xs); color: var(--ink-3); font-family: var(--font-mono); }

/* ——— RESPONSIVE ——————————————————————————————————————————— */
.topbar .topbar__menu, .mobile-navigation { display: none; }
.topbar__brand { font-size: 15px; font-weight: 550; letter-spacing: -.025em; color: var(--ink-2); }
.omni__submit { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; flex: none; }
.omni__submit:hover { background: var(--acc-soft); color: var(--acc-text); }
@media (min-width: 761px) { .topbar__brand { display: none; } }
@media (max-width: 1000px) { .topbar__crumbs { display: none; } }
@media (max-width: 760px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .rail { position: fixed; top: 0; bottom: 0; left: 0; width: min(280px, calc(100vw - 32px));
    height: 100dvh; padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px));
    visibility: hidden; transform: translateX(-100%); box-shadow: var(--shadow-lg);
    transition: transform var(--t-base) var(--e-out); }
  .rail--open { visibility: visible; transform: none; }
  .rail__head { justify-content: space-between; }
  .rail__close { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; color: var(--ink-2); }
  .rail__item { min-height: 42px; padding: 10px 12px; }
  .rail__label { font-size: 14px; }
  .rail__agent-toggle { width: 40px; min-height: 40px; }
  .rail__tool { min-height: 42px; min-width: 40px; }
  .rail__command > span { font-size: 13px; }
  .rail__command kbd { font-size: 11px; }
  .rail--static { display: none; }
  .topbar .topbar__menu { display: inline-flex; width: 36px; min-height: 40px; justify-content: center; padding: 0; }
  .topbar__brand { margin-right: auto; font-size: 16px; color: var(--ink-0); }
  .topbar__sell { min-height: 36px; }
  .dock { left: 8px; width: min(340px, calc(100vw - 16px)); max-width: none; }
  .mobile-navigation { display: block; flex: none; margin-right: auto; }
  .mobile-navigation summary { display: grid; place-items: center; width: 36px; height: 40px; cursor: pointer; list-style: none; }
  .mobile-navigation summary::-webkit-details-marker { display: none; }
  /* The blurred topbar is a containing block: size the menu from the viewport. */
  .mobile-navigation__panel { position: fixed; left: 0; top: var(--topbar-h); bottom: auto;
    height: calc(100dvh - var(--topbar-h));
    width: min(280px, calc(100vw - 32px)); overflow-y: auto; padding: 12px;
    background: var(--bg-1); box-shadow: var(--shadow-lg); border-right: 1px solid var(--line-2); }
  .mobile-navigation__panel .rail__nav { overflow: visible; gap: 2px; }
}

/* ===========================================================================
   Komponenten
   =========================================================================== */

/* ——— Buttons ——————————————————————————————————————————————— */
.btn {
  --btn-bg: var(--surface-2);
  --btn-ink: var(--ink-0);
  --btn-line: var(--line-2);
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--s-4); height: 38px; padding: 0 var(--s-6);
  border-radius: var(--r-sm); font-size: var(--fs-sm); font-weight: 550;
  letter-spacing: -.01em; color: var(--btn-ink); background: var(--btn-bg);
  border: 1px solid var(--btn-line); white-space: nowrap;
  box-shadow: none;
  transition: transform var(--t-fast) var(--e-out), background var(--t-fast),
              border-color var(--t-fast), box-shadow var(--t-base), opacity var(--t-fast);
}
/* Über die Variable, nicht über `background` — sonst überschreibt der
   Schwebezustand jede gefüllte Variante und macht sie unlesbar. */
.btn:hover { --btn-bg: var(--surface-3); }
.btn:active { transform: translateY(0) scale(.985); }
/* Grün auf Grün sieht man nicht: bei gefüllten Knöpfen ein doppelter Ring. */
.btn--primary:focus-visible, .btn--iris:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--bg-1), 0 0 0 4px var(--ink-0);
}
.btn:disabled { opacity: .42; pointer-events: none; }
.btn svg { flex: none; }

.btn--primary {
  --btn-bg: var(--acc-fill); --btn-ink: var(--acc-ink); --btn-line: transparent;
  font-weight: 650;
  box-shadow: none;
}
.btn--primary:hover { --btn-bg: color-mix(in oklab, var(--acc-fill) 88%, white); }
.btn--iris {
  --btn-bg: var(--iris); --btn-ink: #fff; --btn-line: transparent; font-weight: 650;
  box-shadow: none;
}
.btn--iris:hover { --btn-bg: color-mix(in oklab, var(--iris) 86%, white); }
.btn--danger:hover { --btn-bg: color-mix(in oklab, var(--danger) 18%, transparent); }
.btn--outline:hover { --btn-bg: var(--surface-2); }
.btn--ghost { --btn-bg: transparent; --btn-line: transparent; color: var(--ink-1); }
.btn--ghost:hover { --btn-bg: var(--surface-2); color: var(--ink-0); }
.btn--outline { --btn-bg: transparent; }
.btn--danger { --btn-bg: var(--danger-soft); --btn-ink: var(--danger); --btn-line: transparent; }
.btn--lg { height: 46px; padding: 0 var(--s-8); font-size: var(--fs-body); border-radius: var(--r-md); }
.btn--sm { height: 30px; padding: 0 var(--s-5); font-size: var(--fs-xs); border-radius: var(--r-xs); }
.btn--icon { width: 34px; height: 34px; padding: 0; }
.btn--block { width: 100%; }

/* ——— Chips / Pills ———————————————————————————————————————— */
.chip {
  display: inline-flex; align-items: center; gap: var(--s-3);
  height: 26px; padding: 0 var(--s-4); border-radius: var(--r-full);
  font-size: var(--fs-xs); font-weight: 500; color: var(--ink-1);
  background: var(--surface); border: 1px solid var(--line);
  white-space: nowrap;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
button.chip { cursor: pointer; }
.chip[aria-disabled="true"] { opacity: .45; pointer-events: none; }
button.chip:hover { background: var(--surface-3); color: var(--ink-0); }
.chip[aria-pressed="true"], .chip--on {
  background: var(--acc-soft); border-color: var(--acc-line); color: var(--acc-text);
}
.chip--iris { background: var(--iris-soft); border-color: var(--iris-line); color: var(--iris); }
.btn--danger { --btn-ink: var(--danger-text); }
.chip--warn { background: var(--warn-soft); border-color: transparent; color: var(--warn-text); }
.chip--danger { background: var(--danger-soft); border-color: transparent; color: var(--danger-text); }
.chip--info { background: var(--info-soft); border-color: transparent; color: var(--info-text); }
.chip--plain { background: transparent; }
.chip--xs { height: 21px; font-size: var(--fs-2xs); padding: 0 var(--s-3); gap: var(--s-2); }
.chip i.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }

/* ——— Panel / Card ————————————————————————————————————————— */
.panel {
  position: relative; border-radius: var(--r-lg);
  background: var(--bg-2);
  border: 1px solid var(--line); box-shadow: none;
  overflow: hidden;
}
.panel--flush { background: var(--bg-2); }
.panel--glass { background: var(--glass); backdrop-filter: blur(20px); }
.panel__head {
  display: flex; align-items: center; gap: var(--s-5);
  padding: var(--s-6) var(--s-7); border-bottom: 1px solid var(--line);
}
.panel__head h3 { font-size: var(--fs-sm); font-weight: 600; letter-spacing: -.01em; }
.panel__head .caps { color: var(--ink-3); }
.panel__body { padding: var(--s-7); container-type: inline-size; }
.panel__body--tight { padding: var(--s-5); }
.panel__foot {
  padding: var(--s-5) var(--s-7); border-top: 1px solid var(--line);
  background: var(--surface); display: flex; align-items: center; gap: var(--s-4);
}

.card {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  background: var(--bg-2); border: 1px solid var(--line);
  box-shadow: none; text-align: left; display: block; width: 100%;
  transition: transform var(--t-base) var(--e-out), box-shadow var(--t-base),
              border-color var(--t-base);
}
.card:hover {
  transform: translateY(-2px); box-shadow: var(--shadow-sm);
  border-color: var(--line-2);
}
.card:hover .card__art i { transform: scale(1.025); }

/* ——— Grid Helpers ————————————————————————————————————————— */
.grid { display: grid; gap: var(--s-6); }
.grid--2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid--auto { grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); }
.grid--wide { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
@media (max-width: 1100px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 720px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

/* ——— Section Header ——————————————————————————————————————— */
.sect { margin-bottom: var(--s-6); display: flex; align-items: flex-end; gap: var(--s-6); }
.sect__t { flex: 1; min-width: 0; }
.sect__t h2 { font-size: var(--fs-h3); font-weight: 600; }
.sect__t p { font-size: var(--fs-sm); color: var(--ink-2); margin-top: 2px; }

/* ——— Stat ————————————————————————————————————————————————— */
/* Feste Zeilen: sonst sitzen fünf Zahlen nebeneinander auf fünf Höhen,
   weil die Beschriftungen verschieden oft umbrechen. */
.stat {
  display: grid; grid-template-rows: 2.5em auto 2.4em;
  align-content: start; gap: var(--s-3);
}
.stat__k {
  font-size: var(--fs-2xs); font-weight: 600; letter-spacing: var(--tr-caps);
  text-transform: uppercase; color: var(--ink-2); align-self: start;
  line-height: 1.25;
}
.stat__v {
  font-family: var(--font-sans); font-size: 1.75rem; font-weight: 600;
  letter-spacing: -.035em; line-height: 1; font-variant-numeric: tabular-nums;
  align-self: center;
}
.stat__v small { font-size: .55em; font-weight: 500; color: var(--ink-2); margin-left: 4px; }
.stat__d { font-size: var(--fs-xs); color: var(--ink-2); line-height: 1.35; align-self: start; }
/* Ohne Beschreibung keine leere dritte Zeile. */
.stat:not(:has(.stat__d)) { grid-template-rows: 2.5em auto; }

/* ——— Inputs ——————————————————————————————————————————————— */
.field { display: grid; gap: var(--s-3); }
.field > label { font-size: var(--fs-xs); font-weight: 550; color: var(--ink-1); }
.field > .hint { font-size: var(--fs-2xs); color: var(--ink-3); }
.input, .select, .textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 9px var(--s-5); color: var(--ink-0);
  font-size: var(--fs-sm); outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.input:hover, .select:hover, .textarea:hover { border-color: var(--line-2); }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--acc-line); box-shadow: 0 0 0 4px var(--acc-soft); background: var(--bg-2);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-3); }
.textarea { resize: vertical; min-height: 92px; line-height: 1.55; }
.select { appearance: none; cursor: pointer; padding-right: var(--s-9);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' stroke='%238891A3' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
.select option { background: var(--bg-2); color: var(--ink-0); }

input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 22px;
  background: none; cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 4px; border-radius: 99px;
  background: linear-gradient(90deg, var(--acc) var(--fill, 50%), var(--surface-3) var(--fill, 50%));
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%;
  background: var(--ink-0); margin-top: -6px; border: 3px solid var(--bg-2);
  box-shadow: var(--shadow-sm); transition: transform var(--t-fast) var(--e-spring);
}
input[type="range"]:hover::-webkit-slider-thumb { transform: scale(1.16); }

.switch {
  position: relative; width: 38px; height: 22px; border-radius: 99px; flex: none;
  background: var(--surface-3); border: 1px solid var(--line);
  transition: background var(--t-base), border-color var(--t-base); cursor: pointer;
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--ink-2);
  transition: transform var(--t-base) var(--e-spring), background var(--t-base);
}
.switch[aria-checked="true"] { background: var(--acc-soft); border-color: var(--acc-line); }
.switch[aria-checked="true"]::after { transform: translateX(16px); background: var(--acc); }

.segmented {
  display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--r-sm);
  background: var(--surface); border: 1px solid var(--line);
  /* Rollt in jeder Breite, wenn die Schalter nicht passen — nicht erst
     unterhalb einer Bildschirmgrösse. */
  max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
.segmented::-webkit-scrollbar { display: none; }
.segmented button { flex: none; }
.segmented button {
  height: 28px; padding: 0 var(--s-5); border-radius: 7px; font-size: var(--fs-xs);
  font-weight: 550; color: var(--ink-2);
  transition: background var(--t-fast), color var(--t-fast);
}
.segmented button:hover { color: var(--ink-0); }
.segmented button[aria-pressed="true"] {
  background: var(--surface-3); color: var(--ink-0); box-shadow: var(--hairline);
}

/* ——— Table ———————————————————————————————————————————————— */
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table th {
  text-align: left; font-size: var(--fs-2xs); font-weight: 600;
  letter-spacing: var(--tr-caps); text-transform: uppercase; color: var(--ink-3);
  padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: var(--s-5); border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr { transition: background var(--t-fast); }
.table tbody tr:hover { background: var(--surface); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--font-mono); }

/* ——— Meter / Progress ————————————————————————————————————— */
.meter { height: 5px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.meter > i {
  display: block; height: 100%; border-radius: 99px; background: var(--acc);
  transition: width var(--t-slow) var(--e-out);
}
.meter--iris > i { background: var(--iris); }
.meter--warn > i { background: var(--warn); }
.meter--danger > i { background: var(--danger); }

/* ——— Code ————————————————————————————————————————————————— */
.code {
  font-family: var(--font-mono); font-size: var(--fs-xs); line-height: 1.72;
  background: var(--bg-0); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: var(--s-6); overflow: auto; color: var(--ink-1); tab-size: 2;
}
.code .k { color: var(--iris); }
.code .s { color: var(--acc-text); }
.code .n { color: var(--amber-400); }
.code .c { color: var(--ink-3); font-style: italic; }
.code .p { color: var(--ink-3); }

/* ——— Toasts ——————————————————————————————————————————————— */
.toasts {
  position: fixed; right: var(--s-7); bottom: var(--s-7); z-index: 90;
  display: grid; gap: var(--s-4); width: min(400px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  display: flex; align-items: flex-start; gap: var(--s-5); padding: var(--s-5) var(--s-6);
  border-radius: var(--r-md); background: var(--glass-strong); backdrop-filter: blur(24px);
  border: 1px solid var(--line-2); box-shadow: var(--shadow-lg);
  pointer-events: auto; animation: toast-in var(--t-slow) var(--e-spring) both;
}
.toast--out { animation: toast-out var(--t-base) var(--e-in-out) both; }
.toast__ico { flex: none; margin-top: 1px; color: var(--acc-text); }
.toast--warn .toast__ico { color: var(--warn); }
.toast--danger .toast__ico { color: var(--danger); }
.toast--iris .toast__ico { color: var(--iris); }
.toast__b { min-width: 0; flex: 1; }
.toast__b b { display: block; font-size: var(--fs-sm); font-weight: 600; }
.toast__b span { display: block; font-size: var(--fs-xs); color: var(--ink-2); margin-top: 2px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(24px) scale(.97); } }

/* ——— Overlay / Modal / Palette ————————————————————————————— */
.overlay {
  position: fixed; inset: 0; z-index: 80; display: grid;
  background: rgba(3,4,8,.62); backdrop-filter: blur(8px);
  animation: fade var(--t-base) var(--e-out) both;
}
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.overlay--top { align-content: start; justify-items: center; padding-top: 12vh; }
.overlay--center { place-content: center; justify-items: center; padding: var(--s-7); }

.palette {
  width: min(660px, calc(100vw - 32px)); border-radius: var(--r-lg); overflow: hidden;
  background: var(--glass-strong); backdrop-filter: blur(30px) saturate(var(--glass-saturate));
  border: 1px solid var(--line-2); box-shadow: var(--shadow-lg);
  animation: pop var(--t-slow) var(--e-spring) both;
}
@keyframes pop { from { opacity: 0; transform: translateY(-14px) scale(.97) } to { opacity: 1; transform: none } }
.palette__in {
  display: flex; align-items: center; gap: var(--s-5); padding: var(--s-6) var(--s-7);
  border-bottom: 1px solid var(--line);
}
.palette__in input { flex: 1; background: none; border: 0; outline: none; font-size: 1.02rem; }
.palette__list { max-height: 52vh; overflow-y: auto; padding: var(--s-4); }
.palette__group { padding: var(--s-4) var(--s-5) var(--s-2); }
.palette__item {
  display: flex; align-items: center; gap: var(--s-5); width: 100%;
  padding: var(--s-4) var(--s-5); border-radius: var(--r-sm); text-align: left;
  color: var(--ink-1); transition: background var(--t-fast), color var(--t-fast);
}
.palette__item[data-active="true"], .palette__item:hover { background: var(--surface-3); color: var(--ink-0); }
.palette__item .ico { color: var(--ink-3); flex: none; }
.palette__item[data-active="true"] .ico { color: var(--acc-text); }
.palette__item b { font-weight: 550; font-size: var(--fs-sm); }
.palette__item span { font-size: var(--fs-xs); color: var(--ink-3); }
.palette__foot {
  padding: var(--s-4) var(--s-7); border-top: 1px solid var(--line);
  display: flex; gap: var(--s-6); font-size: var(--fs-2xs); color: var(--ink-3);
}

.modal {
  width: min(620px, calc(100vw - 32px)); max-height: 86vh; overflow: auto;
  border-radius: var(--r-lg); background: var(--bg-2); border: 1px solid var(--line-2);
  box-shadow: var(--shadow-lg); animation: pop var(--t-slow) var(--e-spring) both;
}
.modal--wide { width: min(920px, calc(100vw - 32px)); }
.modal__head {
  display: flex; align-items: center; gap: var(--s-5); padding: var(--s-7);
  border-bottom: 1px solid var(--line); position: sticky; top: 0;
  background: var(--bg-2); z-index: 2;
}
.modal__head h2 { font-size: var(--fs-h3); flex: 1; }
.modal__head > .btn:last-child { margin-left: auto; }
.modal__body { padding: var(--s-7); display: grid; gap: var(--s-6); }
.modal__foot {
  padding: var(--s-6) var(--s-7); border-top: 1px solid var(--line);
  display: flex; gap: var(--s-4); justify-content: flex-end;
  position: sticky; bottom: 0; background: var(--bg-2);
}

/* ——— Tabs ————————————————————————————————————————————————— */
.tabs { display: flex; gap: var(--s-6); border-bottom: 1px solid var(--line); margin-bottom: var(--s-7); }
.tabs button {
  position: relative; padding: 0 0 var(--s-5); font-size: var(--fs-sm); font-weight: 550;
  color: var(--ink-2); transition: color var(--t-fast);
}
.tabs button:hover { color: var(--ink-0); }
.tabs button[aria-selected="true"] { color: var(--ink-0); }
.tabs button[aria-selected="true"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--acc); border-radius: 99px;
  animation: tab-in var(--t-base) var(--e-out) both;
}
@keyframes tab-in { from { transform: scaleX(.3); opacity: 0 } to { transform: none; opacity: 1 } }
/* Wenn die Leiste rollt: an der Kante ausblenden, damit man es sieht. */
.tabs[data-mehr="rechts"] { mask-image: linear-gradient(90deg, #000 86%, transparent); }
.tabs[data-mehr="links"]  { mask-image: linear-gradient(90deg, transparent, #000 14%); }
.tabs[data-mehr="beide"]  { mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); }

/* ——— Avatar ——————————————————————————————————————————————— */
.avatar {
  width: 34px; height: 34px; border-radius: var(--r-sm); flex: none;
  display: grid; place-items: center; font-size: var(--fs-xs); font-weight: 650;
  letter-spacing: -.02em; color: var(--ink-0);
  background: var(--surface-3); box-shadow: var(--hairline);
}
.avatar--lg { width: 46px; height: 46px; border-radius: var(--r-md); font-size: var(--fs-body); }
.avatar--sm { width: 26px; height: 26px; border-radius: var(--r-xs); font-size: 10px; }

/* ——— Empty ———————————————————————————————————————————————— */
.empty {
  display: grid; place-items: center; gap: var(--s-5); padding: var(--s-11) var(--s-7);
  text-align: center; color: var(--ink-2);
}
.empty svg { color: var(--ink-3); }
.empty b { color: var(--ink-0); font-size: var(--fs-h3); font-weight: 600; }
.empty p { max-width: 44ch; font-size: var(--fs-sm); }

/* ——— Tooltip (generisch) —————————————————————————————————— */
[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%;
  /* `max-content` hält kurze Sprechblasen einzeilig; lange brechen bei
     36ch um, statt als 500-px-Balken aus der Tafel zu ragen. */
  translate: -50% 4px; padding: 5px 9px; border-radius: var(--r-xs);
  width: max-content; max-width: 36ch; white-space: normal; text-align: left;
  line-height: 1.45;
  background: var(--glass-strong); backdrop-filter: blur(14px); border: 1px solid var(--line-2);
  font-size: var(--fs-2xs); color: var(--ink-0); opacity: 0; pointer-events: none;
  box-shadow: var(--shadow-md); z-index: 60;
  transition: opacity var(--t-fast), translate var(--t-fast) var(--e-out);
}
[data-tip]:hover::after { opacity: 1; translate: -50% 0; }
/* Am rechten Rand nach innen ausrichten — sonst schiebt die Sprechblase
   die Seite um ihre eigene Breite nach rechts. */
.topbar > :nth-last-child(-n+4)[data-tip]::after { left: auto; right: 0; translate: 0 4px; }
.topbar > :nth-last-child(-n+4)[data-tip]:hover::after { translate: 0 0; }

/* ——— Skeleton / Shimmer —————————————————————————————————— */
.shimmer {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-3) 37%, var(--surface) 63%);
  background-size: 400% 100%; animation: shimmer 1.4s linear infinite; border-radius: var(--r-xs);
}
@keyframes shimmer { from { background-position: 100% 0 } to { background-position: 0 0 } }

/* ——— Ticker ——————————————————————————————————————————————— */
.ticker { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.ticker__track { display: flex; gap: var(--s-8); width: max-content; animation: ticker 46s linear infinite; }
.ticker:hover .ticker__track { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ——— Diktat ————————————————————————————————————————————————— */
.diktat.is-live { border-color: var(--danger); color: var(--danger); }
.diktat__puls {
  width: 10px; height: 10px; border-radius: 50%; background: var(--danger); flex: none;
  animation: diktat-puls 1.1s var(--e-in-out) infinite;
}
@keyframes diktat-puls {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,128,152,.6); opacity: 1; }
  70% { box-shadow: 0 0 0 8px rgba(255,128,152,0); opacity: .65; }
}

/* ——— Zweispalter ————————————————————————————————————————————
   Hauptsache links, Erklärung rechts. Wird auf schmalen Geräten
   zu einer Spalte — sonst quetscht sich die linke Spalte auf 30 px.  */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, .75fr);
  gap: var(--s-7);
  align-items: start;
}
.split--schmal { grid-template-columns: minmax(0, 1fr) minmax(260px, .7fr); }
.split--breit  { grid-template-columns: minmax(0, 1.25fr) minmax(280px, .8fr); }

/* ——— Etiketten auf Objektgrafiken ———————————————————————————
   Sie liegen auf einem Bild, nicht auf der Fläche der Seite. Deshalb
   eigene, themenunabhängige Werte statt der Flächenfarben.              */
.chip--auf-bild,
.card__art-badges .chip,
.detail__art-tools .chip {
  background: rgba(6, 7, 11, .62);
  backdrop-filter: blur(10px) saturate(1.2);
  border-color: rgba(255, 255, 255, .16);
  color: var(--jade-100);
  font-weight: 550;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .5);
}
.card__art-badges .chip svg, .detail__art-tools .chip svg { color: var(--jade-300); }
/* Eine Ersparnis darf hervorstechen — aber nicht in Bernstein, das ist
   für „das braucht Aufmerksamkeit“ reserviert. */
.chip--ersparnis { background: var(--acc-soft); border-color: var(--acc-line); color: var(--acc-text); }
.card__art-badges .chip--ersparnis {
  color: var(--jade-300); border-color: rgba(100, 240, 192, .38);
  background: rgba(6, 30, 24, .66);
}

/* ——— Tabellen ————————————————————————————————————————————
   Eine Tabelle wird nie schmaler als ihr Inhalt — sie rollt lieber.
   Bedingungslos, nicht erst unterhalb einer Bildschirmbreite.           */
.panel__body:has(> .table) { overflow-x: auto; }
.table { min-width: 620px; }
.table td, .table th { font-variant-numeric: tabular-nums; }

/* Der Rundgang: acht Einträge passen nebeneinander in zwei Spalten,
   statt untereinander hinter die Fussleiste zu laufen. */
.tourgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: var(--s-5); }
.tourgrid > button > div .dimmer { max-width: 40ch; }

/* Betrag mit fester Währungsspalte. */
.geld { display: inline-grid; grid-template-columns: auto auto; gap: 5px; align-items: baseline; }
.geld > i { font-style: normal; color: var(--ink-2); font-size: .82em; font-weight: 500; }
.geld > b { font-variant-numeric: tabular-nums; font-weight: inherit; color: inherit; }

/* ——— Objektbild ————————————————————————————————————————————
   Zwei Ebenen: unten die aus der Kennung abgeleitete Grafik, oben das
   Foto. Die Grafik ist nie umsonst — sie füllt die Fläche mit der Farbe
   des Bereichs, solange das Foto noch aus der Ablage kommt.             */
.objektbild { position: absolute; inset: 0; display: block; }
.objektbild__foto {
  position: absolute; inset: 0; z-index: 2;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity var(--t-base) var(--e-out);
}
.objektbild__foto.is-da { opacity: 1; }

/* ═══ BILDWAHL ═════════════════════════════════════════════════════
   Grosse Ziele, sichtbare Reihenfolge, Beratung statt Bewertung.    */
.bildwahl { display: grid; gap: var(--s-6); }

.bildwahl__feld {
  display: grid; place-items: center; gap: var(--s-3);
  padding: var(--s-9) var(--s-6); width: 100%;
  border: 2px dashed var(--line-2); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink-1); cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast);
}
.bildwahl__feld:hover, .bildwahl__feld:focus-visible { border-color: var(--acc-line); background: var(--surface-2); }
.bildwahl__feld.is-ueber { border-color: var(--acc); background: var(--acc-soft); transform: scale(1.005); }
.bildwahl__feld b { font-size: var(--fs-body); font-weight: 600; }
.bildwahl__feld .dimmer { font-size: var(--fs-xs); }
.bildwahl__ico { color: var(--acc-text); }

.bildwahl__liste {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: var(--s-5);
}
.bildwahl__liste:empty { display: none; }

.bildwahl__kachel { display: grid; gap: var(--s-4); margin: 0; }
.bildwahl__kachel:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; border-radius: var(--r-md); }
.bildwahl__kachel[draggable="true"] { cursor: grab; }

.bildwahl__rahmen {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--r-sm);
  overflow: hidden; background: var(--surface-2); border: 1px solid var(--line);
}
.bildwahl__bild { width: 100%; height: 100%; object-fit: cover; display: block; }

.bildwahl__titel {
  position: absolute; top: var(--s-3); left: var(--s-3); z-index: 2;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: var(--r-full);
  background: rgba(6, 30, 24, .72); backdrop-filter: blur(8px);
  color: var(--jade-300); font-size: var(--fs-2xs); font-weight: 600;
}

.bildwahl__werkzeuge {
  position: absolute; inset: auto 0 0 0; z-index: 2;
  display: flex; gap: 4px; padding: var(--s-3);
  background: linear-gradient(transparent, rgba(6, 7, 11, .74));
  opacity: 0; transition: opacity var(--t-fast);
}
/* Auf Zeigegeräten ohne Hover bleiben die Werkzeuge sichtbar. */
.bildwahl__kachel:hover .bildwahl__werkzeuge,
.bildwahl__kachel:focus-within .bildwahl__werkzeuge { opacity: 1; }
@media (hover: none) { .bildwahl__werkzeuge { opacity: 1; } }

.bildwahl__wz {
  width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: var(--r-xs); background: rgba(255, 255, 255, .14);
  color: #fff; backdrop-filter: blur(6px);
}
.bildwahl__wz:hover:not(:disabled) { background: rgba(255, 255, 255, .28); }
.bildwahl__wz:disabled { opacity: .3; pointer-events: none; }
.bildwahl__wz--weg:hover { background: var(--rose-500); }

.bildwahl__kachel figcaption { display: grid; gap: 3px; }
.bildwahl__masse { font-family: var(--font-mono); font-size: var(--fs-2xs); color: var(--ink-3); }

.bildwahl__kachel--wartet .bildwahl__rahmen { display: grid; place-items: center; }
.bildwahl__lade { display: flex; gap: 5px; }
.bildwahl__lade i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--acc);
  animation: bw-puls 1s var(--e-in-out) infinite;
}
.bildwahl__lade i:nth-child(2) { animation-delay: .15s; }
.bildwahl__lade i:nth-child(3) { animation-delay: .3s; }
@keyframes bw-puls { 0%, 100% { opacity: .25; transform: scale(.8) } 50% { opacity: 1; transform: none } }

/* ——— Beratung ————————————————————————————————————————————— */
.bildwahl__rat { display: grid; gap: var(--s-4); }
.bildwahl__rat:empty { display: none; }

.bildwahl__balken { display: flex; align-items: center; gap: var(--s-5); font-size: var(--fs-2xs); color: var(--ink-2); }
.bildwahl__balkenspur { flex: 1; height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.bildwahl__balkenspur i {
  display: block; height: 100%; border-radius: 99px; background: var(--acc);
  transition: width var(--t-slow) var(--e-out);
}

.bildwahl__hinweis {
  display: grid; grid-template-columns: 18px 1fr; gap: var(--s-4);
  padding: var(--s-5); border-radius: var(--r-sm);
  background: var(--surface); border: 1px solid var(--line);
  font-size: var(--fs-xs); color: var(--ink-2);
}
.bildwahl__hinweis svg { color: var(--ink-3); margin-top: 1px; }
.bildwahl__hinweis.is-wichtig { background: var(--warn-soft); border-color: transparent; }
.bildwahl__hinweis.is-wichtig svg { color: var(--warn-text); }
.bildwahl__hinweis b { display: block; color: var(--ink-0); font-weight: 600; margin-bottom: 2px; }

@media (max-width: 760px) {
  .bildwahl__liste { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .bildwahl__feld { padding: var(--s-8) var(--s-5); }
}

/* ——— Feineinstellungen (Aufklapper) —————————————————————————
   Was Profis lieben, überfordert Neulinge — also liegt es hinter einer
   ruhigen Kante, die nichts versteckt, nur aufschiebt.                  */
details.fein {
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface); padding: 0;
}
details.fein > summary {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  padding: var(--s-5) var(--s-6); font-size: var(--fs-sm); font-weight: 550;
  list-style: none; color: var(--ink-1);
}
details.fein > summary::-webkit-details-marker { display: none; }
details.fein > summary::after {
  content: ""; margin-left: auto; width: 8px; height: 8px;
  border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3);
  transform: rotate(45deg); transition: transform var(--t-fast);
}
details.fein[open] > summary::after { transform: rotate(-135deg); }
details.fein > *:not(summary) { padding: 0 var(--s-6) var(--s-6); }
details.fein .dimmer { font-weight: 400; font-size: var(--fs-xs); }
/* Structured listing details */
.attribute-fields { display: grid; gap: var(--s-6); min-width: 0; }
.attribute-fields__rows, .attribute-fields__list { display: grid; gap: var(--s-6); }
.attribute-fields__row { min-width: 0; margin: 0; padding: var(--s-6); border: 1px solid var(--line); border-radius: var(--r-md); }
.attribute-fields__row legend { padding: 0 var(--s-3); color: var(--ink-2); font-size: var(--fs-xs); }
.attribute-fields__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, .6fr) auto; gap: var(--s-5); align-items: end; }
.attribute-fields__field { display: grid; gap: var(--s-3); min-width: 0; color: var(--ink-2); font-size: var(--fs-xs); }
.attribute-fields__field .input, .attribute-fields__field .select { width: 100%; min-width: 0; }
.attribute-fields__head > .btn, .attribute-fields__list-row > .btn { min-height: 44px; }
.attribute-fields__value, .attribute-fields__list { margin-top: var(--s-6); }
.attribute-fields__list-row { display: grid; grid-template-columns: minmax(100px, .55fr) minmax(0, 1fr) auto; gap: var(--s-5); align-items: end; }
.attribute-fields__list > .btn, .attribute-fields__actions > .btn { justify-self: start; }
@media (max-width: 520px) {
  .attribute-fields__head { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .attribute-fields__head > .btn { grid-column: 1 / -1; justify-self: end; min-height: 36px; }
  .attribute-fields__list-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .attribute-fields__list-row > .btn { grid-column: 1 / -1; justify-self: end; min-height: 36px; }
}

/* ===========================================================================
   Views
   =========================================================================== */

/* ═══ HERO / INTENT COMPOSER ═══════════════════════════════════════ */
.hero { padding: var(--s-10) 0 var(--s-11); position: relative; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: var(--s-4); margin-bottom: var(--s-7);
  padding: 5px 5px 5px var(--s-3); border-radius: var(--r-full);
  background: var(--surface); border: 1px solid var(--line); font-size: var(--fs-xs);
  color: var(--ink-1); animation: view-in var(--t-slow) var(--e-out) both;
}
.hero__eyebrow .chip { height: 22px; }
.hero h1 {
  font-size: var(--fs-display); letter-spacing: var(--tr-display); line-height: var(--lh-tight);
  font-weight: 600; max-width: 19ch; animation: view-in var(--t-slow) 60ms var(--e-out) both;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(96deg, var(--acc) 8%, var(--iris) 62%, var(--sky-400));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__sub {
  margin-top: var(--s-6); max-width: var(--measure); font-size: 1.05rem; color: var(--ink-1);
  animation: view-in var(--t-slow) 120ms var(--e-out) both;
}

.composer {
  margin-top: var(--s-9); position: relative; border-radius: var(--r-xl);
  background: var(--glass); backdrop-filter: blur(26px) saturate(var(--glass-saturate));
  border: 1px solid var(--line-2); box-shadow: var(--shadow-lg);
  animation: view-in var(--t-slow) 180ms var(--e-out) both; overflow: hidden;
}
.composer::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
  background: linear-gradient(120deg, var(--acc-line), transparent 40%, transparent 60%, var(--iris-line));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; opacity: .8;
}
.composer__top { display: flex; align-items: flex-start; gap: var(--s-5); padding: var(--s-7) var(--s-7) var(--s-5); }
.composer__ico {
  width: 34px; height: 34px; border-radius: var(--r-sm); flex: none; display: grid;
  place-items: center; color: var(--acc-text); background: var(--acc-soft);
  box-shadow: inset 0 0 0 1px var(--acc-line);
}
.composer textarea {
  flex: 1; background: none; border: 0; outline: none; resize: none;
  font-size: 1.14rem; line-height: 1.5; letter-spacing: -.015em; color: var(--ink-0);
  min-height: 60px; font-family: var(--font-text);
}
.composer textarea::placeholder { color: var(--ink-3); }
.composer__constraints {
  display: flex; flex-wrap: wrap; gap: var(--s-3); padding: 0 var(--s-7) var(--s-5);
}
.composer__foot {
  display: flex; align-items: center; gap: var(--s-5); padding: var(--s-5) var(--s-7);
  border-top: 1px solid var(--line); background: var(--surface);
}
.composer__hints { display: flex; gap: var(--s-4); flex-wrap: wrap; flex: 1; min-width: 0; }

.examples { margin-top: var(--s-7); display: flex; flex-wrap: wrap; gap: var(--s-4);
  animation: view-in var(--t-slow) 240ms var(--e-out) both; }
.examples button {
  padding: var(--s-4) var(--s-5); border-radius: var(--r-md); text-align: left;
  background: var(--surface); border: 1px solid var(--line); max-width: 340px;
  font-size: var(--fs-xs); color: var(--ink-1); line-height: 1.45;
  transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-base) var(--e-out);
}
.examples button:hover { background: var(--surface-2); border-color: var(--acc-line); transform: translateY(-2px); color: var(--ink-0); }
.examples button b { display: block; color: var(--acc-text); font-size: var(--fs-2xs); font-weight: 600;
  letter-spacing: var(--tr-caps); text-transform: uppercase; margin-bottom: 3px; }

/* ═══ MARKTPULS ════════════════════════════════════════════════════ */
.pulsebar {
  display: flex; align-items: center; gap: var(--s-8); padding: var(--s-5) var(--s-7);
  border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line);
  font-size: var(--fs-xs); color: var(--ink-2); overflow: hidden;
}
.pulse-item { display: flex; align-items: center; gap: var(--s-4); white-space: nowrap; }
.pulse-item b { color: var(--ink-0); font-family: var(--font-mono); font-weight: 600; }

/* ═══ PRODUKT-KARTE ════════════════════════════════════════════════ */
.card__art {
  position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--bg-3);
  display: grid; place-items: center;
}
.card__art i {
  position: absolute; inset: 0; display: block;
  transition: transform var(--t-lazy) var(--e-out);
}
.card__art svg { position: relative; z-index: 1; }
.card__link { display: block; height: 100%; }
.card__art-badges {
  position: absolute; top: var(--s-4); left: var(--s-4); right: 52px; z-index: 3;
  display: flex; gap: var(--s-3); flex-wrap: wrap;
}
.card__art-fav {
  position: absolute; top: var(--s-4); right: var(--s-4); z-index: 4;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--glass-strong); backdrop-filter: blur(10px); border: 1px solid var(--line-2);
  color: var(--ink-1); opacity: 1; transform: none;
  transition: opacity var(--t-base), transform var(--t-base) var(--e-spring), color var(--t-fast);
}
.card:hover .card__art-fav, .card__art-fav[aria-pressed="true"] { opacity: 1; transform: none; }
.card__art-fav[aria-pressed="true"] { color: var(--rose-400); }
.card__b { padding: var(--s-5) var(--s-6) var(--s-6); display: grid; gap: var(--s-4); }
.card__title { font-size: var(--fs-sm); font-weight: 600; letter-spacing: -.012em; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__seller { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-2xs); color: var(--ink-3); }
.card__price { display: flex; align-items: baseline; gap: var(--s-4); }
.card__price b { font-family: var(--font-sans); font-size: 1.22rem; font-weight: 600;
  letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.card__price s { color: var(--ink-3); font-size: var(--fs-xs); }
.card__why {
  display: grid; gap: var(--s-2); padding-top: var(--s-4); border-top: 1px solid var(--line);
  font-size: var(--fs-2xs); color: var(--ink-2);
}
.card__why li { display: flex; gap: var(--s-3); align-items: flex-start; }
.card__why li svg { flex: none; margin-top: 2px; color: var(--acc-text); }
.card__match {
  position: absolute; bottom: var(--s-4); right: var(--s-4); z-index: 3;
  display: flex; align-items: center; gap: var(--s-3); padding: 4px 9px 4px 5px;
  border-radius: var(--r-full); background: var(--glass-strong); backdrop-filter: blur(12px);
  border: 1px solid var(--line-2); font-size: var(--fs-2xs); font-weight: 600;
  font-family: var(--font-mono); color: var(--ink-0);
}

/* ═══ FILTER-RAIL ══════════════════════════════════════════════════ */
.results { display: grid; grid-template-columns: 228px minmax(0,1fr); gap: 24px; align-items: start; }
@media (max-width: 1000px) { .results { grid-template-columns: 1fr; } .filters { position: static !important; } }
.filters { position: sticky; top: calc(var(--topbar-h) + var(--s-7)); display: grid; gap: 24px; padding: 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-1); }
.filters__grp { display: grid; gap: var(--s-4); }
.filters__grp > .caps { display: flex; justify-content: space-between; align-items: center; font-size: var(--fs-xs); letter-spacing: 0; text-transform: none; color: var(--ink-1); }
.filter-option { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 4px 0; color: var(--ink-2); font-size: var(--fs-xs); text-align: left; }
.filter-option::before { content: ""; width: 16px; height: 16px; border: 1px solid var(--line-3); border-radius: 5px; flex: none; }
.filter-option > span:first-of-type { flex: 1; }
.filter-option:hover { color: var(--ink-0); }
.filter-option[aria-pressed="true"] { color: var(--ink-0); }
.filter-option[aria-pressed="true"]::before { background: var(--acc-fill); border-color: var(--acc-fill); box-shadow: inset 0 0 0 3px var(--bg-1); }
.listing-placeholder { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; background: var(--bg-3); color: var(--ink-2); font-size: var(--fs-xs); }
.listing-placeholder > svg { color: var(--ink-3); opacity: .65; }

/* ═══ OBJEKT / DETAIL ══════════════════════════════════════════════ */
.detail { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(340px, .9fr); gap: var(--s-9); align-items: start; }
@media (max-width: 1060px) { .detail { grid-template-columns: 1fr; } }
.detail__art {
  position: relative; border-radius: var(--r-xl); overflow: hidden; aspect-ratio: 16/10;
  background: var(--bg-3); border: 1px solid var(--line); display: grid; place-items: center;
}
.detail__art > i { position: absolute; inset: 0; }
.detail__art-tools { position: absolute; bottom: var(--s-5); left: var(--s-5); display: flex; gap: var(--s-3); z-index: 3; }
.detail__buy { position: sticky; top: calc(var(--topbar-h) + var(--s-7)); display: grid; gap: var(--s-6); min-width: 0; }
.detail > * { min-width: 0; }
.pricebox { display: grid; gap: var(--s-5); min-width: 0; }
.pricebox > .row { flex-wrap: wrap; }
.pricebox__main { display: flex; align-items: baseline; gap: var(--s-4); flex-wrap: wrap; }
.pricebox__main b { font-family: var(--font-sans); font-size: 2.15rem; font-weight: 600;
  letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.pricebox__row { display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--s-4); font-size: var(--fs-sm); color: var(--ink-2); }
.pricebox__row > span:first-child { min-width: 0; }
.pricebox__row b { color: var(--ink-0); font-weight: 550; font-variant-numeric: tabular-nums; }

.specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.spec { padding: var(--s-5) var(--s-6); background: var(--bg-2); display: grid; gap: 3px; }
.spec dt { font-size: var(--fs-2xs); color: var(--ink-3); letter-spacing: .06em; text-transform: uppercase;
  overflow-wrap: anywhere; hyphens: auto; }
.spec dd { font-size: var(--fs-sm); font-weight: 550; overflow-wrap: anywhere; hyphens: auto; }

/* ═══ PROVENIENZ-PASS ══════════════════════════════════════════════ */
.passport { position: relative; }
.passport__hdr {
  display: flex; align-items: center; gap: var(--s-5); padding: var(--s-6) var(--s-7);
  flex-wrap: wrap;
  background: linear-gradient(100deg, var(--iris-soft), transparent 70%);
  border-bottom: 1px solid var(--line);
}
.passport__seal {
  width: 40px; height: 40px; border-radius: var(--r-sm); display: grid; place-items: center;
  color: var(--iris); background: var(--iris-soft); box-shadow: inset 0 0 0 1px var(--iris-line);
}
.timeline { display: grid; gap: 0; padding: var(--s-6) var(--s-7) var(--s-7); }
.tl {
  position: relative; display: grid; grid-template-columns: 26px 1fr; gap: var(--s-5);
  padding-bottom: var(--s-6);
}
.tl:last-child { padding-bottom: 0; }
.tl::before {
  content: ""; position: absolute; left: 12px; top: 22px; bottom: 0; width: 1px;
  background: linear-gradient(var(--line-2), var(--line));
}
.tl:last-child::before { display: none; }
.tl__dot {
  width: 25px; height: 25px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg-2); border: 1px solid var(--line-2); color: var(--ink-2); z-index: 1;
}
.tl--ok .tl__dot { color: var(--acc-text); border-color: var(--acc-line); background: var(--acc-soft); }
.tl--iris .tl__dot { color: var(--iris); border-color: var(--iris-line); background: var(--iris-soft); }
.tl__b { min-width: 0; padding-top: 2px; }
.tl__b b { font-size: var(--fs-sm); font-weight: 600; display: block; }
.tl__b p { font-size: var(--fs-xs); color: var(--ink-2); margin-top: 2px; }
.tl__b .mono { font-size: 10px; color: var(--ink-3); margin-top: var(--s-3); display: block;
  word-break: break-all; }

/* ═══ TRUST-SCORE ══════════════════════════════════════════════════ */
.trustgrid { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: var(--s-7); align-items: center; }
/* In schmalen Tafeln untereinander statt nebeneinander gequetscht. */
@container (max-width: 380px) { .trustgrid { grid-template-columns: 1fr; justify-items: start; } }
.trustring { position: relative; width: 96px; height: 96px; }
.trustring__v {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
}
.trustring__v b {
  display: block; font-family: var(--font-sans); font-size: 1.6rem; font-weight: 600;
  letter-spacing: -.04em; line-height: 1; white-space: nowrap;
}
.trustring__v span {
  display: block; margin-top: 3px; font-size: var(--fs-2xs); letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-2); line-height: 1;
}
.trustbars { display: grid; gap: var(--s-4); }
.trustbar { display: grid; grid-template-columns: minmax(0, 108px) minmax(0, 1fr) 34px; gap: var(--s-4); align-items: center;
  hyphens: auto;
  font-size: var(--fs-2xs); color: var(--ink-2); }
.trustbar b { text-align: right; font-family: var(--font-mono); color: var(--ink-1); }

/* ═══ VERHANDLUNGSRAUM ═════════════════════════════════════════════ */
.nego { display: grid; grid-template-columns: minmax(0,1fr) 380px; gap: var(--s-8); align-items: start; }
@media (max-width: 1180px) { .nego { grid-template-columns: 1fr; } }

.nego__hdr {
  display: flex; align-items: center; gap: var(--s-6); padding: var(--s-6) var(--s-7);
  border-radius: var(--r-lg); background: var(--bg-2); border: 1px solid var(--line);
  margin-bottom: var(--s-6);
}
.nego__vs { display: flex; align-items: center; gap: var(--s-5); flex: 1; min-width: 0; }
.nego__party { display: flex; align-items: center; gap: var(--s-4); min-width: 0; }
.nego__party b { font-size: var(--fs-sm); font-weight: 600; display: block; }
.nego__party span { font-size: var(--fs-2xs); color: var(--ink-3); font-family: var(--font-mono); }
.nego__bolt { color: var(--ink-3); animation: bolt 2.4s var(--e-in-out) infinite; }
@keyframes bolt { 0%,100% { opacity: .35 } 50% { opacity: 1; color: var(--acc) } }

.nego__stream {
  height: 452px; overflow-y: auto; padding: var(--s-7); display: grid; gap: var(--s-5);
  align-content: start; scroll-behavior: smooth;
}
.msg { display: grid; gap: var(--s-3); max-width: 76%; animation: msg-in var(--t-slow) var(--e-out) both; }
.msg--buyer { justify-self: start; }
.msg--seller { justify-self: end; }
.msg--sys { justify-self: center; max-width: 90%; text-align: center; }
@keyframes msg-in { from { opacity: 0; transform: translateY(10px) scale(.98) } to { opacity: 1; transform: none } }
.msg__meta { display: flex; align-items: center; gap: var(--s-3); font-size: 10px;
  font-family: var(--font-mono); color: var(--ink-3); }
.msg--seller .msg__meta { justify-content: flex-end; }
.msg__bub {
  padding: var(--s-5) var(--s-6); border-radius: var(--r-md); font-size: var(--fs-sm);
  line-height: 1.5; border: 1px solid var(--line);
}
.msg--buyer .msg__bub { background: var(--surface-2); border-bottom-left-radius: var(--s-2); }
.msg--seller .msg__bub { background: var(--iris-soft); border-color: var(--iris-line);
  border-bottom-right-radius: var(--s-2); }
.msg--sys .msg__bub {
  background: transparent; border: 1px dashed var(--line-2); color: var(--ink-2);
  font-size: var(--fs-xs); font-family: var(--font-mono);
}
.msg--deal .msg__bub { background: var(--acc-soft); border-color: var(--acc-line); color: var(--ink-0); }
.msg__offer {
  margin-top: var(--s-4); padding-top: var(--s-4); border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: var(--s-3);
}
.typing { display: inline-flex; gap: 3px; align-items: center; height: 14px; }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--ink-3);
  animation: typing 1.1s var(--e-in-out) infinite; }
.typing i:nth-child(2) { animation-delay: .16s } .typing i:nth-child(3) { animation-delay: .32s }
@keyframes typing { 0%,60%,100% { opacity: .25; transform: translateY(0) } 30% { opacity: 1; transform: translateY(-3px) } }

.guard { display: grid; gap: var(--s-5); }
.guard__row { display: grid; gap: var(--s-3); }
.guard__row header { display: flex; justify-content: space-between; align-items: center;
  font-size: var(--fs-xs); }
.guard__row header b { font-family: var(--font-mono); font-size: var(--fs-xs); }

.termdiff { display: grid; gap: 1px; background: var(--line); border-radius: var(--r-md);
  overflow: hidden; border: 1px solid var(--line); }
.termdiff__r { display: grid; grid-template-columns: 1fr auto auto; gap: var(--s-5);
  align-items: center; padding: var(--s-4) var(--s-6); background: var(--bg-2); font-size: var(--fs-xs); }
.termdiff__r > span:first-child { color: var(--ink-2); }
.termdiff__r s { color: var(--ink-3); font-family: var(--font-mono); }
.termdiff__r b { font-family: var(--font-mono); color: var(--acc-text); font-weight: 600; }
.termdiff__r.is-worse b { color: var(--warn); }

/* ═══ CHECKOUT / TREUHAND ══════════════════════════════════════════ */
.escrow { display: grid; gap: 0; }
.escrow__step { display: grid; grid-template-columns: 28px 1fr auto; gap: var(--s-5);
  padding: var(--s-5) 0; position: relative; align-items: start; }
.escrow__step::before { content: ""; position: absolute; left: 13px; top: 32px; bottom: -8px;
  width: 2px; background: var(--line); border-radius: 2px; }
.escrow__step:last-child::before { display: none; }
.escrow__step.is-done::before { background: var(--acc); }
.escrow__dot { width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg-2); border: 2px solid var(--line-2); color: var(--ink-3); z-index: 1; }
.escrow__step.is-done .escrow__dot { background: var(--acc-fill); border-color: var(--acc-fill); color: var(--acc-ink); }
.escrow__step.is-active .escrow__dot { border-color: var(--acc-text); color: var(--acc-text);
  box-shadow: 0 0 0 4px var(--acc-soft); }
.escrow__b b { font-size: var(--fs-sm); font-weight: 600; display: block; }
.escrow__b p { font-size: var(--fs-xs); color: var(--ink-2); margin-top: 2px; }

/* ═══ VERKÄUFER-COCKPIT ════════════════════════════════════════════ */
.cockpit { display: grid; gap: var(--s-8); }
/* Flex statt Raster: so wächst die letzte Zeile auf die volle Breite und
   es bleiben nie leere Felder am Ende stehen. */
.kpirow { display: flex; flex-wrap: wrap; gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.kpi { flex: 1 1 190px; min-width: 0;
  padding: var(--s-6) var(--s-7); background: var(--bg-2); display: grid; gap: var(--s-4); }
.kpi__spark { height: 30px; }
.delta { display: inline-flex; align-items: center; gap: 3px; font-size: var(--fs-2xs);
  font-weight: 600; font-family: var(--font-mono); }
.delta--up { color: var(--acc-text); } .delta--down { color: var(--danger); }

.radar__item {
  display: grid; grid-template-columns: 38px 1fr auto; gap: var(--s-5); align-items: center;
  padding: var(--s-5) var(--s-6); border-radius: var(--r-md); border: 1px solid var(--line);
  background: var(--surface); transition: border-color var(--t-fast), transform var(--t-base) var(--e-out);
}
.radar__item:hover { border-color: var(--acc-line); transform: translateX(3px); }
.radar__hot { width: 38px; height: 38px; border-radius: var(--r-sm); display: grid; place-items: center;
  font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 700; }
.radar__b b { font-size: var(--fs-sm); font-weight: 550; display: block; line-height: 1.35; }
.radar__b span { font-size: var(--fs-2xs); color: var(--ink-3); }

.policy { display: grid; gap: var(--s-5); }
.policy__rule {
  display: grid; grid-template-columns: auto 1fr auto; gap: var(--s-5); align-items: center;
  padding: var(--s-5) var(--s-6); border-radius: var(--r-md); background: var(--surface);
  border: 1px solid var(--line); font-size: var(--fs-sm);
}
.policy__rule .mono { color: var(--acc-text); }

.studio { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: var(--s-7); align-items: start; }
@media (max-width: 980px) { .studio { grid-template-columns: 1fr; } }

/* ═══ AGENTEN-KONSOLE ══════════════════════════════════════════════ */
.console { display: grid; grid-template-columns: 250px minmax(0,1fr); gap: var(--s-7); align-items: start; }
@media (max-width: 960px) { .console { grid-template-columns: 1fr; } }
.toollist { display: grid; gap: var(--s-2); }
.toollist button {
  display: grid; gap: 2px; padding: var(--s-4) var(--s-5); border-radius: var(--r-sm);
  text-align: left; border: 1px solid transparent; transition: background var(--t-fast), border-color var(--t-fast);
}
.toollist button:hover { background: var(--surface); }
.toollist button[aria-pressed="true"] { background: var(--surface-2); border-color: var(--line-2); }
.toollist b { font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 600; color: var(--ink-0); }
.toollist span { font-size: 10px; color: var(--ink-3); }

.reqres { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: var(--s-6); }
@media (max-width: 1300px) { .reqres { grid-template-columns: 1fr; } }

.eventline {
  display: grid; grid-template-columns: 70px 92px 1fr auto; gap: var(--s-5); align-items: center;
  padding: var(--s-4) var(--s-5); border-radius: var(--r-xs); font-family: var(--font-mono);
  font-size: var(--fs-2xs); border-bottom: 1px solid var(--line);
}
.eventline:hover { background: var(--surface); }
.eventline .m { font-weight: 700; }
.eventline .m--in { color: var(--acc-text); } .eventline .m--out { color: var(--iris); }
.eventline .m--err { color: var(--danger); }

/* ═══ NETZ / GRAPH ═════════════════════════════════════════════════ */
.graphwrap { position: relative; border-radius: var(--r-lg); overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, var(--bg-3), var(--bg-0));
  border: 1px solid var(--line); height: 420px; }
.graphwrap canvas { width: 100%; height: 100%; }
.graph__legend {
  display: flex; flex-wrap: wrap; gap: var(--s-4) var(--s-7);
  margin-top: var(--s-5); padding-top: var(--s-5); border-top: 1px solid var(--line);
}
.graph__legend div { display: flex; align-items: center; gap: var(--s-3); font-size: var(--fs-2xs); color: var(--ink-2); }
.graph__legend i { width: 8px; height: 8px; border-radius: 50%; }

.moat { display: grid; gap: var(--s-5); }
.moat__item {
  display: grid; grid-template-columns: 34px 1fr; gap: var(--s-5); padding: var(--s-6);
  border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line);
  transition: border-color var(--t-base), transform var(--t-base) var(--e-out);
}
.moat__item:hover { border-color: var(--iris-line); transform: translateY(-2px); }
.moat__n { width: 34px; height: 34px; border-radius: var(--r-sm); display: grid; place-items: center;
  font-family: var(--font-mono); font-weight: 700; font-size: var(--fs-xs);
  background: var(--iris-soft); color: var(--iris); box-shadow: inset 0 0 0 1px var(--iris-line); }
.moat__item b { font-size: var(--fs-sm); font-weight: 600; display: block; margin-bottom: 3px; }
.moat__item p { font-size: var(--fs-xs); color: var(--ink-2); }
.moat__item .caps { margin-top: var(--s-4); color: var(--acc-text); display: block; }

/* ═══ CHARTS ═══════════════════════════════════════════════════════ */
.chart { position: relative; width: 100%; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart__grid line { stroke: var(--chart-grid); stroke-width: 1; }
.chart__axis text { fill: var(--ink-3); font-size: 9px; font-family: var(--font-mono); }
.chart__area { opacity: .16; }
.chart__line { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chart__dot { r: 3; }
.chart__band { fill: var(--acc); opacity: .1; }

/* ═══ ORDERS ═══════════════════════════════════════════════════════ */
.orderline {
  display: grid; grid-template-columns: 46px minmax(0,1fr) auto; gap: var(--s-5);
  padding: var(--s-5) var(--s-6); border-radius: var(--r-md); border: 1px solid var(--line);
  background: var(--surface); align-items: center;
}
/* Der Titel kürzt sich, statt aus der Zeile zu laufen. */
.orderline > :nth-child(2) { min-width: 0; }
.orderline > :nth-child(2) > * { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.orderline > :last-child { min-width: 0; }
.orderline__art { width: 46px; height: 46px; border-radius: var(--r-xs); overflow: hidden; position: relative; }


/* ═══ FESTE AKTIONSLEISTE (nur klein) ══════════════════════════════ */
.buybar { display: none; }

/* Schmale Spalten dürfen ihren Inhalt zusammenschieben — sonst sprengen
   nicht umbrechende Marken (Chips) die Kaufbox. */
.detail__buy > *, .detail__buy .panel, .detail__buy .panel__body,
.detail__buy .pricebox, .detail__buy .pricebox > * { min-width: 0; }
.detail__buy .row, .detail__buy .pricebox__main { flex-wrap: wrap; }
.detail__buy .chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

/* ═══ BEREICHSVERZEICHNIS ══════════════════════════════════════════
   Ein aufklappbares Verzeichnis. Grosse Ziele, wenig Text, keine
   Tastatur nötig — der Weg für alle, die lieber schauen als tippen.  */
.bereich {
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); margin-bottom: var(--s-4);
  transition: border-color var(--t-base), background var(--t-base);
}
.bereich:hover { border-color: var(--line-2); }
.bereich--auf { border-color: var(--acc-line); background: var(--bg-2); }

.bereich__kopf {
  width: 100%; display: grid; grid-template-columns: 44px minmax(0,1fr) 20px;
  gap: var(--s-5); align-items: center; text-align: left;
  padding: var(--s-5) var(--s-6); cursor: pointer;
}
.bereich__ico { width: 44px; height: 44px; border-radius: var(--r-sm); display: grid; place-items: center; }
.bereich__t { display: grid; gap: 2px; min-width: 0; }
.bereich__t b { font-size: var(--fs-body); font-weight: 600; letter-spacing: var(--tr-head); }
.bereich__t .dimmer { font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.bereich__pfeil { color: var(--ink-2); display: grid; place-items: center;
  transition: transform var(--t-base) var(--e-out); }
.bereich--auf .bereich__pfeil { transform: rotate(180deg); color: var(--acc-text); }

.bereich__subs {
  display: flex; flex-wrap: wrap; gap: var(--s-4);
  padding: 0 var(--s-6) var(--s-6) calc(44px + var(--s-6) + var(--s-5));
  animation: subs-in var(--t-base) var(--e-out) both;
}
.bereich__subs .chip { height: 30px; }
.bereich__n {
  font-family: var(--font-mono); font-size: var(--fs-2xs); color: var(--ink-3);
  margin-left: 6px; font-variant-numeric: tabular-nums;
}
@keyframes subs-in { from { opacity: 0; transform: translateY(-4px) } to { opacity: 1; transform: none } }

@media (max-width: 760px) {
  .bereich__subs { padding-left: var(--s-6); }
  .bereich__kopf { grid-template-columns: 40px minmax(0,1fr) 18px; gap: var(--s-4); }
  .bereich__ico { width: 40px; height: 40px; }
}

/* Die Kennung im Objektpass ist eine Zeichenkette ohne Trennstellen —
   sie kürzt sich, statt die Tafel zu sprengen. */
.passport__hdr .mono, .passport__hdr code {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ═══ NACHRICHTEN ══════════════════════════════════════════════════
   Links die Gespräche, rechts der Verlauf. Auf dem Telefon nur eines
   von beiden — dort ist geteilte Aufmerksamkeit keine Hilfe.        */
.msg {
  display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: var(--s-6); align-items: start;
}

.msg__liste {
  display: grid; gap: var(--s-3); align-content: start;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); padding: var(--s-4);
  max-height: 72vh; overflow-y: auto;
}
.msg__listenkopf { padding: var(--s-4) var(--s-5) var(--s-3); font-size: var(--fs-xs); color: var(--ink-2); }

.msg__eintrag {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: var(--s-5); align-items: center; text-align: left;
  padding: var(--s-5); border-radius: var(--r-sm);
  transition: background var(--t-fast);
}
.msg__eintrag:hover { background: var(--surface-2); }
.msg__eintrag[aria-current="true"] { background: var(--acc-soft); }
.msg__zeile { display: flex; justify-content: space-between; gap: var(--s-4); align-items: baseline; }
.msg__zeile b { font-size: var(--fs-sm); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg__zeile .dimmer { font-size: var(--fs-2xs); flex: none; }
.msg__vorschau {
  font-size: var(--fs-xs); color: var(--ink-2); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.msg__neu {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px;
  display: grid; place-items: center; background: var(--acc-fill); color: var(--acc-ink);
  font-size: var(--fs-2xs); font-weight: 700;
}

.msg__raum {
  display: grid; grid-template-rows: auto 1fr auto;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--bg-2); min-height: 62vh; max-height: 78vh; overflow: hidden;
}
.msg__leer { display: grid; place-items: center; gap: var(--s-5); padding: var(--s-12); color: var(--ink-3); }

.msg__objekt {
  display: grid; grid-template-columns: 46px minmax(0, 1fr) auto 16px;
  gap: var(--s-5); align-items: center;
  padding: var(--s-5) var(--s-6); border-bottom: 1px solid var(--line);
  background: var(--surface); color: inherit;
}
.msg__objekt:hover { background: var(--surface-2); }
.msg__objekt b { font-size: var(--fs-sm); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg__objekt .dimmer { font-size: var(--fs-2xs); }
.msg__preis { text-align: right; display: grid; gap: 3px; justify-items: end; }
.msg__preis b { font-family: var(--font-mono); font-size: var(--fs-sm); }
.msg__preis .dimmer { font-size: var(--fs-2xs); white-space: nowrap; }

.msg__strom {
  padding: var(--s-6); overflow-y: auto; display: grid; gap: var(--s-5);
  align-content: start;
}
.msg__blase { max-width: min(78%, 46ch); display: grid; gap: 3px; }
.msg__blase p {
  padding: var(--s-5) var(--s-6); border-radius: var(--r-md);
  font-size: var(--fs-sm); line-height: 1.55; margin: 0;
}
.msg__blase time { font-size: var(--fs-2xs); color: var(--ink-3); }
.msg__wer { font-size: var(--fs-2xs); color: var(--ink-3); }

.msg__blase--ich { justify-self: end; }
.msg__blase--ich p { background: var(--acc-soft); border: 1px solid var(--acc-line); }
.msg__blase--ich time { text-align: right; }
.msg__blase--gegenseite p { background: var(--surface-2); border: 1px solid var(--line); }
.msg__blase--system { justify-self: center; max-width: 40ch; }
.msg__blase--system p {
  background: transparent; border: 1px dashed var(--line-2);
  color: var(--ink-2); font-size: var(--fs-xs); text-align: center;
}

.msg__eingabe {
  border-top: 1px solid var(--line); padding: var(--s-5) var(--s-6);
  display: grid; gap: var(--s-5); background: var(--surface);
}
.msg__schnell { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.msg__schnell .chip { cursor: pointer; }
.msg__schnell .chip:hover { background: var(--acc-soft); border-color: var(--acc-line); color: var(--acc-text); }
.msg__senden { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-5); align-items: end; }
.msg__senden textarea { resize: vertical; }

.msg__warnung {
  display: grid; grid-template-columns: 18px 1fr; gap: var(--s-4);
  padding: var(--s-5); border-radius: var(--r-sm);
  background: var(--warn-soft); font-size: var(--fs-xs); color: var(--ink-1);
}
.msg__warnung svg { color: var(--warn-text); margin-top: 1px; }
.msg__warnung b { display: block; margin-bottom: 2px; }
.msg__warnung span { color: var(--ink-2); }

@media (max-width: 900px) {
  .msg { grid-template-columns: minmax(0, 1fr); }
  .msg__liste { max-height: none; }
  .msg__raum { min-height: 56vh; }
  .msg__blase { max-width: 88%; }
}

/* ═══ INSERIER-SCHRITTE ════════════════════════════════════════════
   Drei Stationen, immer sichtbar. Ruhig, gross genug für jeden Daumen. */
.schritte {
  display: flex; align-items: center; gap: var(--s-4);
  list-style: none; padding: 0; margin: 0 0 var(--s-7);
}
.schritte__s {
  display: inline-flex; align-items: center; gap: var(--s-4);
  padding: var(--s-4) var(--s-6); border-radius: var(--r-full);
  font-size: var(--fs-sm); font-weight: 550; color: var(--ink-3);
  background: var(--surface); border: 1px solid var(--line);
  transition: background var(--t-base), color var(--t-base), border-color var(--t-base);
}
.schritte__s + .schritte__s { position: relative; margin-left: var(--s-5); }
.schritte__s + .schritte__s::before {
  content: ""; position: absolute; left: calc(-1 * var(--s-5) - 2px); top: 50%;
  width: var(--s-5); height: 1px; background: var(--line-2);
}
.schritte__n {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: var(--fs-2xs); font-weight: 700;
  background: var(--surface-3); color: var(--ink-2);
}
.schritte__s.is-aktiv {
  color: var(--ink-0); background: var(--acc-soft); border-color: var(--acc-line);
}
.schritte__s.is-aktiv .schritte__n { background: var(--acc-fill); color: var(--acc-ink); }
.schritte__s.is-fertig { color: var(--acc-text); }
.schritte__s.is-fertig .schritte__n { background: var(--acc-soft); color: var(--acc-text); }

.studio__erkannt { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; min-height: 20px; }
.studio__erkannt:empty { display: none; }

/* ——— Der Erfolgszustand ————————————————————————————————————— */
.studio__fertig {
  display: grid; justify-items: center; gap: var(--s-5); text-align: center;
  padding: var(--s-10) var(--s-7); margin-top: var(--s-7);
  border-radius: var(--r-lg); background: var(--bg-2);
  border: 1px solid var(--acc-line);
  animation: fertig-auf var(--t-slow) var(--e-spring) both;
}
.studio__fertigIco {
  width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center;
  background: var(--acc-fill); color: var(--acc-ink);
  box-shadow: 0 0 0 8px var(--acc-soft);
}
.studio__fertig h2 { font-size: var(--fs-h2); letter-spacing: var(--tr-head); }
.studio__fertig p { max-width: var(--measure); color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.6; }
@keyframes fertig-auf { from { opacity: 0; transform: translateY(10px) scale(.98) } to { opacity: 1; transform: none } }

@media (max-width: 760px) {
  .schritte { flex-wrap: wrap; }
  .schritte__s { padding: var(--s-3) var(--s-5); font-size: var(--fs-xs); }
}

/* Das Schutz-Badge im Gespräch: erlischt sichtbar bei Abwerbeversuchen. */
.msg__schutz { transition: background var(--t-base), color var(--t-base); }
.msg__schutz--erloschen {
  background: var(--warn-soft); border-color: transparent; color: var(--warn-text);
  animation: schutz-weg .3s var(--e-out);
}
@keyframes schutz-weg { 0% { transform: scale(1) } 40% { transform: scale(.94) } 100% { transform: scale(1) } }

/* ═══ FESTPREIS-PAKETE ═════════════════════════════════════════════
   Drei Karten, der Umfang lesbar, das empfohlene ruhig markiert.     */
.pakete { display: grid; gap: var(--s-4); }
.paket {
  display: grid; gap: var(--s-3); text-align: left;
  padding: var(--s-5) var(--s-6); border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--surface);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.paket:hover { border-color: var(--line-2); background: var(--surface-2); }
.paket[aria-pressed="true"] { border-color: var(--acc-line); background: var(--acc-soft); }
.paket__kopf { display: flex; align-items: center; gap: var(--s-4); }
.paket__kopf b { font-size: var(--fs-sm); font-weight: 650; }
.paket__preis { font-family: var(--font-mono); font-size: 1.15rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.paket__umfang { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.paket__umfang li {
  display: grid; grid-template-columns: 14px 1fr; gap: 7px; align-items: start;
  font-size: var(--fs-xs); color: var(--ink-2);
}
.paket__umfang svg { color: var(--acc-text); margin-top: 3px; }
.paket__dauer { font-size: var(--fs-2xs); color: var(--ink-3); }

/* Rätsel des Tages */
.raetsel__wahl {
  display: grid; grid-template-columns: 40px minmax(0,1fr); gap: var(--s-4);
  align-items: center; width: 100%; padding: var(--s-4) var(--s-5);
  border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.raetsel__wahl:hover:not(:disabled) { border-color: var(--acc-line); background: var(--surface-2); }
.raetsel__wahl:disabled { opacity: .85; cursor: default; }
.raetsel__wahl b { display: block; font-size: var(--fs-xs); font-weight: 600; }
.raetsel__wahl .dimmer { font-size: var(--fs-2xs); }

/* Marketplace journeys share the existing jade identity and surface tokens. */
/* Search and catalogue share a quiet, compact first screen. */
.home-hero { display: grid; gap: 20px; max-width: 720px; margin: 0 auto 32px; padding: 12px 0 8px; }
.home-hero h1 { max-width: none; font-size: clamp(1.9rem, 2.4vw, 2.3rem); line-height: 1.15; text-align: center; letter-spacing: -.04em; animation: none; }
.home-search { display: flex; gap: 10px; align-items: center; padding: 6px 6px 6px 18px; min-height: 54px; border: 1px solid var(--line-3); border-radius: var(--r-lg);
  background: linear-gradient(125deg, color-mix(in srgb, var(--acc) 4%, var(--bg-2)), var(--bg-2) 55%, color-mix(in srgb, var(--iris) 4%, var(--bg-2)));
  box-shadow: var(--hairline), 0 12px 40px color-mix(in srgb, var(--bg-0) 25%, transparent); }
.home-search:focus-within { border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
.home-search > svg { flex: none; color: var(--ink-2); }
.home-search__input { width: 100%; min-width: 0; border: 0; background: transparent; color: var(--ink-0); font-size: 1rem; outline: none; }
.home-search .btn { flex: none; min-height: 40px; }
.home-search .diktat { width: 40px; min-height: 40px; padding: 0; background: transparent; border-color: transparent; color: var(--ink-2); }
.home-search .diktat__label { display: none; }
.home-search .diktat::after { left: auto; right: 0; translate: 0 4px; max-width: min(36ch, calc(100vw - 48px)); }
.home-search .diktat:hover::after { translate: 0 0; }
.search-filter-done { display: none; }
.home-text-link { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-xs); font-weight: 550; color: var(--ink-2); min-height: 36px; white-space: nowrap; }
.home-text-link:hover { color: var(--acc-text); }
.home-browse { margin-bottom: 28px; }
.home-browse .sect { margin-bottom: 12px; }
.home-categories { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
.home-category { display: flex; flex-direction: column; gap: 8px; align-items: center; justify-content: center; min-width: 0; padding: 10px 4px; border-radius: var(--r-md); font-size: var(--fs-xs); font-weight: 500; color: var(--ink-1); transition: background var(--t-fast), color var(--t-fast); }
.home-category:hover { background: var(--surface-2); color: var(--acc-text); }
.home-category__icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: var(--r-md);
  background: linear-gradient(145deg, var(--surface-3), var(--surface)); box-shadow: var(--hairline); color: var(--ink-1); }
.home-category:hover .home-category__icon { color: var(--acc-text); background: var(--acc-soft); }
.home-category > span:last-child { min-width: 0; text-align: center; }
.home-sell { margin-top: 40px; display: flex; align-items: center; gap: 16px; padding: 24px 0; border-top: 1px solid var(--line); }
.home-sell h2 { flex: 1; font-size: var(--fs-h3); }
.home-sell__icon { display: grid; place-items: center; flex: none; color: var(--ink-2); }
.market-grid { gap: 16px; }
.market-grid, .search-results > .grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.results-search { display: flex; gap: 10px; margin-bottom: 20px; max-width: 760px; }
.results-search .input { flex: 1; min-width: 0; font-size: 1rem; }
.results-search .btn { min-height: 46px; }
.results-heading { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-bottom: 14px; }
.results-heading > div { min-width: 0; }
.results-heading h1 { font-size: var(--fs-h2); overflow-wrap: anywhere; }
.results-heading .caps { margin-bottom: 8px; color: var(--ink-3); }
.results-heading > a { flex: none; }
.results-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.results-count { color: var(--ink-2); font-size: var(--fs-xs); }
.results-sort { display: flex; align-items: center; gap: 10px; font-size: var(--fs-xs); }
.results-sort .select { width: auto; max-width: 220px; }
.results-active-filters, .results-facets { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; align-items: center; font-size: var(--fs-xs); }
.search-filter-chip { gap: 8px; }
.search-filter-toggle { display: none; }
.results-context { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-1); }
.results-context .filters__grp { gap: 5px; }
.results-context .select { min-height: 36px; padding: 7px 10px; font-size: 12px; }
.results-context .caps { font-size: 10px; font-weight: 500; color: var(--ink-3); }

/* Fachsuche: ruhige Eingaben, kurze Wege und zusätzliche Merkmale auf Wunsch. */
.market-search .filters { gap: 18px; padding: 16px; border-radius: 18px; background: var(--bg-1); }
.market-search .filters__grp { min-width: 0; gap: 8px; }
.market-search .filters > .filters__grp + .filters__grp { padding-top: 14px; border-top: 1px solid var(--line); }
.market-search .filters input, .market-search .filters select { min-width: 0; font-size: 12px; }
.market-search .filters input:not([type="checkbox"]), .market-search .filters select { min-height: 38px; padding: 8px 10px; }
.market-search .filters label.field { min-width: 0; gap: 5px; }
.market-search .filters label.field > span { font-size: 11px; color: var(--ink-2); }
.search-detail-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 8px; }
.search-detail-form > p, .search-detail-form > button, .search-field-wide { grid-column: 1 / -1; }
.search-section-apply { justify-self: start; min-height: 30px; height: auto; margin: 4px 0 -4px; padding: 4px 0; font-size: 11px; color: var(--acc-text); }
.search-attribute-form, .search-attribute-fields, .search-more__fields { display: grid; gap: 12px; min-width: 0; }
.search-attribute { min-width: 0; display: grid; gap: 6px; }
.search-attribute[hidden], .search-choice__option[hidden] { display: none; }
.search-attribute__label { font-size: 11px; line-height: 1.35; color: var(--ink-2); }
.search-range { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.search-range input[type="date"] { font-size: 10px; padding-inline: 4px !important; min-width: 0; }
.search-choice { border: 1px solid var(--line-2); background: var(--bg-0); border-radius: var(--r-sm); min-width: 0; }
.search-choice > summary { display: flex; align-items: center; gap: 8px; justify-content: space-between; min-height: 38px; padding: 8px 10px; font-size: 12px; cursor: pointer; list-style: none; }
.search-choice > summary::-webkit-details-marker, .search-more > summary::-webkit-details-marker { display: none; }
.search-choice > summary > svg, .search-more > summary > svg { flex: none; color: var(--ink-3); transition: transform 160ms ease; }
.search-choice[open] > summary > svg, .search-more[open] > summary > svg { transform: rotate(180deg); }
.search-choice__value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-choice[open] { border-color: var(--acc); }
.search-choice__options { padding: 6px; border-top: 1px solid var(--line); max-height: 240px; overflow: auto; overscroll-behavior: contain; }
.search-choice__option { display: flex; align-items: center; gap: 9px; padding: 8px 5px; min-height: 36px; font-size: 12px; cursor: pointer; border-radius: 6px; line-height: 1.35; }
.search-choice__option:hover { background: var(--bg-2); }
.search-choice__option input { accent-color: var(--acc-fill); width: 16px; height: 16px; flex: none; margin: 0; }
.search-choice__option:has(input:checked) { background: var(--acc-soft); color: var(--ink-0); }
.search-more { border-top: 1px solid var(--line); padding-top: 4px; }
.search-more > summary { display: flex; align-items: center; gap: 6px; padding-block: 9px; cursor: pointer; font-size: 12px; font-weight: 550; list-style: none; }
.search-more > summary > svg { margin-left: auto; }
.search-more__fields { padding-top: 9px; }
.search-exact-values { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.search-exact-values:empty { display: none; }
.search-schema-status, .search-filter-feedback { font-size: 12px; line-height: 1.5; color: var(--ink-2); }
.search-filter-feedback { color: var(--danger); }
.market-search .search-filter-done { display: flex; width: 100%; justify-content: center; min-height: 42px; position: sticky; bottom: 8px; z-index: 2; box-shadow: 0 0 0 8px var(--bg-1), 0 -10px 20px var(--bg-1); font-size: 12px; }
.card__highlights { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 9px; font-size: 11px; line-height: 1.5; color: var(--ink-2); }
.card__highlights > span + span::before { content: "·"; margin-right: 9px; color: var(--ink-3); }
.card__highlights:empty { display: none; }
.card__b .card__highlights { margin: 7px 0 2px; }
.listing-row { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 16px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-1); align-items: center; transition: border-color 160ms ease, background 160ms ease; }
.listing-row:hover { background: var(--bg-2); border-color: var(--line-3); }
.listing-row__art { position: relative; width: 112px; height: 84px; border-radius: 9px; overflow: hidden; }
.listing-row__body { min-width: 0; display: grid; gap: 7px; }
.listing-row__title { font-size: 14px; line-height: 1.4; font-weight: 550; }
.listing-row__seller { font-size: 11px; color: var(--ink-3); }
.listing-row__price { min-width: 0; max-width: 240px; font-size: 15px; text-align: right; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.listing-row__amount { white-space: nowrap; }
.listing-row__price small { display: block; margin-top: 3px; color: var(--ink-3); font-size: 11px; font-weight: 400; }
.listing-row--job { grid-template-columns: 52px minmax(0, 1fr) auto; }
.listing-row--job .listing-row__art { width: 52px; height: 52px; }
.card--job .card__art { height: 88px; aspect-ratio: auto; }
@media (prefers-reduced-motion: reduce) { .search-choice > summary > svg, .search-more > summary > svg { transition: none; } }
.search-results { min-width: 0; }
.seller-next-step { display: flex; gap: 20px; align-items: center; padding: 24px; margin-bottom: 24px; border: 1px solid var(--acc-line); border-radius: var(--r-md); background: var(--acc-soft); }
.seller-next-step > div { flex: 1; min-width: 0; }
.seller-next-step p { margin: 6px 0 0; color: var(--ink-2); }
.studio-steps { display: flex; gap: 20px; padding: 0; list-style: none; margin: 0 0 24px; counter-reset: studio-step; }
.studio-steps li { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: var(--fs-xs); }
.studio-steps li::before { counter-increment: studio-step; content: counter(studio-step); display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--line-2); border-radius: 50%; }
.studio-steps li[aria-current="step"] { color: var(--acc-text); font-weight: 600; }
.studio-steps li[aria-current="step"]::before { border-color: var(--acc-line); background: var(--acc-soft); }
.studio-reference { margin-top: 20px; }
.studio-reference > summary { cursor: pointer; padding: 16px 0; color: var(--ink-1); font-weight: 600; }

/* Kategorienverzeichnis — dieselben Flächen und Farben, ohne Bestandskennzahlen. */
.taxonomy-directory { display: grid; gap: 20px; }
.taxonomy-directory [hidden] { display: none !important; }
.taxonomy-directory__header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.taxonomy-directory__browse { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; color: var(--ink-1); font-size: var(--fs-sm); }
.taxonomy-directory__browse:hover { color: var(--acc-text); }

.taxonomy-directory__featured { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.taxonomy-directory__featured-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; min-height: 54px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--acc-soft); font-size: var(--fs-sm); font-weight: 600; }
.taxonomy-directory__featured-link svg { flex: none; color: var(--acc-text); }
.taxonomy-directory__featured-link:hover { border-color: var(--acc); }

.taxonomy-directory__search { position: relative; display: flex; align-items: center; min-width: 0; }
.taxonomy-directory__search > svg { position: absolute; left: 14px; pointer-events: none; color: var(--ink-2); }
.taxonomy-directory__search .input { width: 100%; min-width: 0; min-height: 46px; padding: 11px 48px 11px 42px; }
:root[data-simple="true"] .taxonomy-directory__search .input { padding-inline: 42px 48px; }
.taxonomy-directory__search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.taxonomy-directory__clear { position: absolute; right: 4px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: var(--r-xs); color: var(--ink-2); }
.taxonomy-directory__clear:hover { color: var(--ink-0); background: var(--bg-2); }
.taxonomy-directory__status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.taxonomy-directory__categories { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-items: start; }
.taxonomy-directory .bereich { min-width: 0; margin: 0; }
.taxonomy-directory .bereich--auf { grid-column: 1 / -1; }
.taxonomy-directory__heading { min-width: 0; font-size: var(--fs-body); }
.taxonomy-directory .bereich__kopf { min-height: 62px; grid-template-columns: 34px minmax(0, 1fr) 18px; gap: 10px; padding: 10px 14px; border-radius: var(--r-md); }
.taxonomy-directory .bereich__ico { width: 34px; height: 34px; color: var(--acc-text); background: var(--acc-soft); }
.taxonomy-directory .bereich__t b { font-size: var(--fs-sm); line-height: 1.4; }
.taxonomy-directory__children { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; padding: 0 14px 14px; }
.taxonomy-directory__link, .taxonomy-directory__all { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; min-height: 42px; padding: 9px 10px; border-radius: var(--r-xs); font-size: var(--fs-sm); line-height: 1.4; }
.taxonomy-directory__link { color: var(--ink-1); }
.taxonomy-directory__link svg, .taxonomy-directory__all svg { flex: none; color: var(--ink-2); }
.taxonomy-directory__link:hover, .taxonomy-directory__all:hover { background: var(--bg-2); color: var(--ink-0); }
.taxonomy-directory__all { grid-column: 1 / -1; justify-content: flex-start; color: var(--acc-text); }
.taxonomy-directory__all svg { color: inherit; }

.taxonomy-directory__categories--search { grid-template-columns: minmax(0, 1fr); gap: 12px; }
.taxonomy-directory__group { min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-1); }
.taxonomy-directory__category { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 7px 10px; font-size: var(--fs-sm); }
.taxonomy-directory__category > svg { flex: none; color: var(--acc-text); }
.taxonomy-directory__category > svg:last-child { margin-left: auto; }
.taxonomy-directory__category:hover { color: var(--acc-text); }
.taxonomy-directory__matches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; }
.taxonomy-directory__empty { grid-column: 1 / -1; display: grid; justify-items: start; gap: 12px; padding: 18px 0; color: var(--ink-1); }

@media (max-width: 760px) {
  .taxonomy-directory { gap: 16px; }
  .taxonomy-directory__featured { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .taxonomy-directory__categories, .taxonomy-directory__children, .taxonomy-directory__matches { grid-template-columns: minmax(0, 1fr); }
  .taxonomy-directory .bereich__kopf { min-height: 58px; }
  .taxonomy-directory__featured-link { min-height: 48px; }
  .taxonomy-directory__link, .taxonomy-directory__all { min-height: 44px; }
}

/* Public comparison and the browser-local selection. */
.card__compare {
  position: absolute; top: 54px; right: var(--s-4); z-index: 4;
  display: grid; place-items: center; width: 36px; height: 36px;
  border: 1px solid var(--line-2); border-radius: 50%; color: var(--ink-1);
  background: var(--glass-strong); backdrop-filter: blur(12px);
  opacity: 0; transition: opacity 140ms ease, border-color 140ms ease;
}
.card:hover .card__compare, .card:focus-within .card__compare,
.card__compare[aria-pressed="true"] { opacity: 1; }
.comparison-toggle[aria-pressed="true"], .comparison-controls .btn[aria-pressed="true"] { color: var(--acc-text); border-color: var(--acc-line); background: var(--acc-soft); }
.card--job .card__compare { top: auto; bottom: 12px; }
.card--job .card__b { padding-right: 54px; }
.listing-row-wrap { position: relative; min-width: 0; }
.listing-row-wrap .listing-row { padding-bottom: 50px; }
.listing-row-compare { position: absolute; bottom: 8px; right: 10px; }
.comparison-tray {
  position: fixed; bottom: 20px; left: calc(var(--rail-w) + 24px); right: 24px;
  z-index: 38; max-width: 620px; margin-inline: auto; display: flex; align-items: center; gap: 14px;
  padding: 10px 12px 10px 18px; border: 1px solid var(--acc-line); border-radius: 16px;
  background: var(--glass-strong); backdrop-filter: blur(24px); box-shadow: var(--shadow-lg);
}
.comparison-tray[hidden] { display: none; }
.comparison-tray__selection { display: flex; gap: 10px; align-items: center; flex: 1; font-size: 12px; }
.comparison-tray__selection > svg { color: var(--acc-text); flex: none; }
.comparison-tray__hint { color: var(--ink-2); font-size: 11px; }
.has-comparison .canvas { padding-bottom: 120px; }
.has-comparison .toasts { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
.comparison-view__heading { display: flex; gap: 20px; justify-content: space-between; align-items: end; margin-bottom: 28px; }
.comparison-view__heading h1 { font-size: var(--fs-h1); }
.comparison-back { display: inline-flex; gap: 8px; align-items: center; margin-bottom: 12px; font-size: 12px; color: var(--ink-2); }
.comparison-view__actions, .comparison-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.comparison-controls { margin-bottom: 16px; }
.comparison-controls__time { margin-left: auto; color: var(--ink-3); font-size: 11px; }
.comparison-scroll { width: 100%; max-width: 100%; overflow-x: auto; border: 1px solid var(--line-2); border-radius: 16px; scrollbar-width: thin; }
.comparison-scroll:focus-visible { outline: 2px solid var(--acc-text); outline-offset: 4px; }
.comparison-table { width: 100%; border-spacing: 0; table-layout: fixed; font-size: 12px; }
.comparison-table caption { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.comparison-table__label { width: 160px; }
.comparison-table th, .comparison-table td { padding: 15px 18px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; background: var(--bg-1); }
.comparison-table tr > :last-child { border-right: 0; }
.comparison-table tbody tr:last-child > * { border-bottom: 0; }
.comparison-table th { font-weight: 500; }
.comparison-table tr > :first-child { position: sticky; left: 0; z-index: 2; background: var(--bg-2); color: var(--ink-2); }
.comparison-table thead th { padding: 16px; }
.comparison-table thead tr > :first-child { vertical-align: bottom; font-size: 11px; }
.comparison-table .is-different td { background: var(--acc-soft); }
.comparison-table .is-missing { color: var(--ink-2); font-size: 11px; }
.comparison-item { position: relative; min-width: 0; }
.comparison-item__link { display: grid; gap: 14px; }
.comparison-item__link b { font-size: 14px; line-height: 1.4; }
.comparison-item__art { display: grid; place-items: center; height: 132px; background: var(--bg-3); border-radius: 10px; overflow: hidden; color: var(--ink-3); }
.comparison-item__art img { width: 100%; height: 100%; object-fit: cover; }
.comparison-item__price { margin-top: 12px; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.comparison-item__price small { display: block; color: var(--ink-3); font-weight: 400; font-size: 11px; margin-top: 4px; }
.comparison-item__remove { position: absolute; top: 6px; right: 6px; z-index: 1; width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 50%; background: var(--glass-strong); color: var(--ink-1); }
.comparison-notices { display: grid; gap: 8px; margin-bottom: 20px; }
.comparison-notice { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line-2); border-radius: 10px; padding: 12px; font-size: 12px; }
.comparison-notice > div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.comparison-notice b, .comparison-notice span { display: block; }
.comparison-notice span { font-size: 11px; color: var(--ink-3); margin-top: 4px; }
.comparison-hint { font-size: 12px; color: var(--ink-2); margin: 16px 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; }
.comparison-hint[hidden] { display: none; }
.comparison-footnote { font-size: 11px; line-height: 1.6; color: var(--ink-3); margin-top: 18px; }
.comparison-footnote a { text-decoration: underline; text-underline-offset: 3px; }
@media (hover: none), (max-width: 760px) {
  .card__compare { opacity: 1; width: 44px; height: 44px; top: 62px; }
  .comparison-item__remove { width: 44px; height: 44px; }
}
@media (max-width: 760px) {
  .comparison-view__heading { align-items: start; flex-direction: column; gap: 16px; margin-bottom: 22px; }
  .comparison-view__actions { gap: 6px; }
  .comparison-controls { gap: 6px; }
  .comparison-controls__time { display: none; }
  .comparison-table__label { width: 110px; }
  .comparison-table th, .comparison-table td { padding: 12px; }
  .comparison-table thead th { padding: 12px; }
  .comparison-item__link b { font-size: 13px; }
  .comparison-tray { left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); gap: 6px; padding: 8px 8px 8px 12px; border-radius: 14px; }
  .comparison-tray__selection { gap: 6px; font-size: 11px; }
  .comparison-tray__hint { max-width: 94px; font-size: 10px; }
  .comparison-notice { flex-wrap: wrap; }
}

/* ===========================================================================
   Einfach-Ansicht

   Kein eigenes Design, sondern dasselbe — nur ruhiger: grössere Schrift,
   grössere Flächen, mehr Kontrast, weniger Beiwerk. Erklärtexte und
   technische Kennungen treten zurück, damit das Wesentliche bleibt.
   =========================================================================== */

:root[data-simple="true"] {
  --fs-body: 1.06rem;
  --fs-sm: 1rem;
  --fs-xs: .94rem;
  --fs-2xs: .86rem;
  --fs-h3: 1.3rem;
  --lh-body: 1.62;
  --r-sm: 12px; --r-md: 16px; --r-lg: 22px;
  --grain-opacity: 0;
  --aurora-opacity: .1;
}

/* Mehr Kontrast, weniger Grauabstufungen */
:root[data-simple="true"] { --ink-1: #DDE3EE; --ink-2: #A9B2C2; --ink-3: #808A9C; }
:root[data-simple="true"][data-theme="light"] { --ink-1: #1B2331; --ink-2: #3C4658; --ink-3: #5E6879; }

/* Grössere Ziele: alles ist mit dem Finger bedienbar */
:root[data-simple="true"] .btn { height: 46px; padding: 0 var(--s-7); font-size: 1rem; }
:root[data-simple="true"] .btn--sm { height: 38px; font-size: .94rem; }
:root[data-simple="true"] .btn--lg { height: 56px; font-size: 1.1rem; }
:root[data-simple="true"] .btn--icon { width: 44px; height: 44px; }
:root[data-simple="true"] .chip { height: 32px; font-size: .9rem; padding: 0 var(--s-5); }
:root[data-simple="true"] .chip--xs { height: 27px; font-size: .82rem; }
:root[data-simple="true"] .input,
:root[data-simple="true"] .select,
:root[data-simple="true"] .textarea { padding: 13px var(--s-6); font-size: 1rem; }
:root[data-simple="true"] .switch { width: 50px; height: 30px; }
:root[data-simple="true"] .switch::after { width: 24px; height: 24px; }
:root[data-simple="true"] .switch[aria-checked="true"]::after { transform: translateX(20px); }
:root[data-simple="true"] .rail__item { width: 100%; min-height: 46px; }
:root[data-simple="true"] .composer textarea { font-size: 1.2rem; min-height: 76px; }

/* Weniger Text: Erklärungen und Fachdetails treten zurück */
:root[data-simple="true"] .expl,
:root[data-simple="true"] .tl__b .mono,
:root[data-simple="true"] .eventline,
:root[data-simple="true"] .code,
:root[data-simple="true"] [data-pro-only] { display: none !important; }

/* Karten ruhiger */
:root[data-simple="true"] .card__why { display: none; }
:root[data-simple="true"] .card__title { -webkit-line-clamp: 3; font-size: 1.02rem; }
:root[data-simple="true"] .card__price b { font-size: 1.4rem; }
:root[data-simple="true"] .card__match { font-size: .82rem; padding: 6px 11px 6px 7px; }

/* Fokus deutlicher sichtbar */
:root[data-simple="true"] :focus-visible { outline-width: 3px; outline-offset: 3px; }

/* Bewegung reduzieren */
:root[data-simple="true"] .aurora__blob { animation: none; }
:root[data-simple="true"] .ticker__track { animation-duration: 90s; }

/* ——— Grössere Schrift braucht mehr Platz ————————————————————
   In der Einfach-Ansicht wächst jedes Wort. Was sich vorher zu zweit
   eine Zeile geteilt hat, bekommt hier seine eigene.                    */
@media (max-width: 900px) {
  :root[data-simple="true"] .filters { grid-template-columns: minmax(0, 1fr); }
}
:root[data-simple="true"] .passport__hdr { flex-wrap: wrap; }
:root[data-simple="true"] .passport__hdr > * { min-width: 0; }
/* Namen und Orte kürzen sich, statt aus ihrer Kachel zu laufen. */
:root[data-simple="true"] .card__seller,
:root[data-simple="true"] .sellerbox b,
:root[data-simple="true"] .sellerbox span {
  min-width: 0; overflow: hidden; text-overflow: ellipsis;
}

/* ===========================================================================
   Kleine Bildschirme

   Unter 760 Pixeln öffnet die vollständige Navigation als Menü von links.
   Der Inhalt bekommt die volle Breite.
   =========================================================================== */

@media (max-width: 760px) {
  .results-context { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 10px; gap: 10px; }
  .results-context .filters__grp:last-child:nth-child(3) { grid-column: 1 / -1; }
  .results-context .select { font-size: 13px; min-height: 40px; }
  .split, .split--schmal, .split--breit { grid-template-columns: minmax(0, 1fr); }
  /* Mehrspaltige Raster werden einspaltig — auf 375 px passt nichts daneben. */
  .grid--2, .grid--3, .grid--4, .grid--auto, .grid--wide { grid-template-columns: minmax(0, 1fr); }
  :root { --topbar-h: 56px; }

  .app { grid-template-columns: 1fr; }

  /* ——— Kopfzeile schlank ————————————————————————————————— */
  .topbar { padding: 0 var(--s-5); gap: var(--s-4); }
  .topbar__crumbs { display: none; }
  .omni { max-width: none; height: 36px; }
  .omni kbd { display: none; }
  .topbar .btn span { display: inline; }
  .topbar .btn { padding: 0 9px; flex: none; }
  .composer kbd, .btn kbd { display: none; }

  /* Bestellzeilen stapeln: 55 px für einen Titel sind keine Zeile. */
  .orderline { grid-template-columns: 46px minmax(0,1fr); }
  .orderline > :last-child { grid-column: 1 / -1; justify-self: start; }

  /* ——— Inhalt ————————————————————————————————————————————— */
  .canvas { padding: var(--s-6) var(--s-5) 110px; }
  .hero { padding: var(--s-6) 0 var(--s-8); }
  .hero h1 { font-size: clamp(2rem, 8vw, 2.6rem); }
  .hero__sub { font-size: .98rem; }
  .composer__top { padding: var(--s-5) var(--s-5) var(--s-4); }
  .composer__foot { flex-wrap: wrap; gap: var(--s-4); }
  .composer__foot .btn { flex: 1; justify-content: center; }
  .composer__hints { flex-basis: 100%; }
  .examples { flex-direction: column; }
  .examples button { max-width: none; width: 100%; }

  /* ——— Bedienelemente, die nicht passen, scrollen ————————— */
  .segmented {
    max-width: 100%; overflow-x: auto; scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .segmented::-webkit-scrollbar { display: none; }
  .segmented button { flex: none; }
  .tabs { overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button { flex: none; white-space: nowrap; }

  /* Kopfzeilen der Ansichten dürfen umbrechen statt zu überlaufen */
  .canvas__inner > div:first-child > div,
  .sect { flex-wrap: wrap; }
  .sect__t { flex: 1 1 100%; }

  /* Bildflächen etwas flacher, damit mehr auf den Schirm passt */
  .card__art { aspect-ratio: 16 / 10; }
  .detail__art { aspect-ratio: 4 / 3; }

  /* ——— Raster ————————————————————————————————————————————— */
  .grid--auto, .grid--wide { grid-template-columns: 1fr; }
  .results { grid-template-columns: 1fr; }
  .detail, .nego, .console, .studio, .cockpit > div[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  .detail__buy, .filters { position: static !important; }
  .kpirow { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .specs { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .reqres { grid-template-columns: 1fr; }

  /* ——— Filter als aufklappbarer Block ————————————————————— */
  .filters {
    order: 2; margin-top: var(--s-7);
    display: grid; grid-template-columns: repeat(2, minmax(0,1fr));
    gap: var(--s-6) var(--s-6);
  }
  .filters > .filters__grp:first-child { grid-column: 1 / -1; }

  /* ——— Verhandlung ————————————————————————————————————— */
  .nego__hdr { flex-wrap: wrap; gap: var(--s-5); }
  .nego__stream { height: 380px; }
  .msg { max-width: 92%; }

  /* ——— Tabellen scrollen statt zu quetschen ————————————— */
  .panel__body { overflow-x: auto; }
  .table { min-width: 560px; }

  /* ——— Dock nur auf Anforderung ————————————————————————— */
  .toasts { right: var(--s-5); left: var(--s-5); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: auto; }

  /* Der Erstrundgang bleibt innerhalb des schmalen Dialogs. */
  .tour {
    width: 100%; max-width: 100%; min-width: 0;
    grid-template-columns: minmax(0, 1fr);
  }
  .tourgrid { width: 100%; max-width: 100%; min-width: 0; grid-template-columns: minmax(0, 1fr); }
  .tourgrid > button {
    width: 100%; min-width: 0;
    grid-template-columns: 32px minmax(0, 1fr) !important;
  }
  .tourgrid > button > div { min-width: 0; overflow-wrap: anywhere; }
  .tourgrid > button > svg:last-child { display: none; }
  .tour > .btn {
    height: auto; min-height: 38px; padding-block: 10px;
    white-space: normal; line-height: 1.4;
  }

  /* ——— Feste Aktionsleiste am unteren Rand ————————————— */
  .buybar {
    position: fixed; left: 0; right: 0;
    bottom: env(safe-area-inset-bottom, 0px);
    z-index: 35; display: flex; align-items: center; gap: var(--s-5);
    padding: var(--s-5) var(--s-6);
    background: var(--glass-strong); backdrop-filter: blur(24px) saturate(var(--glass-saturate));
    border-top: 1px solid var(--line-2);
    box-shadow: 0 -8px 30px rgba(0,0,0,.35);
  }
  .buybar__p { display: grid; gap: 1px; min-width: 0; }
  .buybar__p b { font-size: 1.22rem; font-weight: 600; letter-spacing: -.03em; }
  .buybar__p span { font-size: var(--fs-2xs); color: var(--ink-3); }
  /* Der Kaufknopf schrumpft mit, statt die Leiste breiter zu machen
     als das Gerät — in der Einfach-Ansicht ist jede Beschriftung länger. */
  .buybar .btn { flex: 1 1 0; min-width: 0; height: 46px; }
  .buybar .btn span, .buybar .btn { overflow: hidden; text-overflow: ellipsis; }
  .canvas { padding-bottom: 100px; }

  /* ——— Grosse Zahlen umbrechen lassen ————————————————— */
  .stat__v { font-size: 1.4rem; }
  .pricebox__main b { font-size: 1.7rem; }
}



/* Zwischenbreite: die Beschriftungen der Kopfzeile weichen den Symbolen,
   bevor sie abgeschnitten werden. */
@media (min-width: 761px) and (max-width: 1400px) {
  .topbar__crumbs { display: none; }
}
@media (min-width: 761px) and (max-width: 1240px) {
  .topbar .btn span, .topbar .btn kbd { display: none; }
  .topbar .btn { padding: 0 10px; }
}

/* Zwischenbreite: zwei Spalten statt vier */
@media (min-width: 761px) and (max-width: 1150px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .detail { grid-template-columns: 1fr; }
  .split, .split--schmal, .split--breit { grid-template-columns: minmax(0, 1fr); }
  .detail__buy { position: static; }
  .nego { grid-template-columns: 1fr; }
}

/* Zeigegeräte ohne Hover: Aktionen dauerhaft sichtbar */
@media (hover: none) {
  .card__art-fav { opacity: 1; transform: none; }
  [data-tip]::after { display: none; }
}

/* Search filters stay beside results on desktop and directly above them on mobile. */
@media (max-width: 1000px) {
  .market-search .search-filter-toggle { display: inline-flex; }
  .market-search .filters { display: none; order: 0; margin: 0 0 16px; padding: 20px; border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--bg-2); }
  .market-search .filters[data-open="true"] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .market-search .filters > .filters__grp:first-child { grid-column: 1 / -1; }
  .market-search .search-filter-done { display: inline-flex; grid-column: 1 / -1; justify-content: center; min-height: 44px; }
  .market-search > div { scroll-margin-top: calc(var(--topbar-h) + 16px); }
}
@media (max-width: 760px) {
  .rail__item { width: auto; min-width: 0; min-height: 50px; padding: 5px 2px; }
  .rail__nav > .rail__item { flex: 1; }
  .rail__label { font-size: 11px; }
  .rail__item[aria-current="page"]::before { left: 50%; }
  :root[data-simple="true"] .rail__item { width: auto; }
  .topbar a[href^="#/agenten?tab="] { display: none; }
  .topbar > .spacer { display: none; }
  .results-heading { flex-wrap: wrap; gap: 14px; }
  .results-heading > a { flex: 0 1 auto; }
  .results-toolbar { gap: 10px; }
  .results-sort { flex: 1 1 65%; }
  .results-sort .select { flex: 1; min-width: 0; }
  .results-toolbar > .spacer { display: none; }
  .results-count { flex: 1; text-align: right; }
  .results-sort > span { display: none; }
  .market-search .filters[data-open="true"] { grid-template-columns: minmax(0, 1fr); }
  .seller-next-step { flex-wrap: wrap; padding: 20px; }
  .seller-next-step > .btn { width: 100%; }
  .studio-steps { gap: 12px; flex-wrap: wrap; }
  .card__art-fav { opacity: 1; transform: none; }
}
@media (pointer: coarse) {
  .card__art-fav { opacity: 1; transform: none; min-width: 44px; min-height: 44px; }
  .chip, .segmented button { min-height: 40px; }
}

@media (max-width: 760px) {
  .market-search .filters { padding: 16px; }
  .market-search .filters input:not([type="checkbox"]), .market-search .filters select { font-size: 16px; min-height: 44px; }
  .market-search .filters input[type="date"] { font-size: 13px; }
  .search-choice > summary { min-height: 44px; font-size: 14px; }
  .search-choice__option { min-height: 44px; font-size: 14px; }
  .search-attribute__label, .market-search .filters label.field > span { font-size: 12px; }
  .market-search .search-filter-done { bottom: 10px; min-height: 44px; box-shadow: 0 0 0 8px var(--bg-2), 0 -10px 20px var(--bg-2); }
  .listing-row { grid-template-columns: 88px minmax(0, 1fr); gap: 10px 12px; padding: 10px; }
  .listing-row__art { width: 88px; height: 78px; grid-row: 1 / span 2; }
  .listing-row__title { font-size: 13px; }
  .listing-row__seller, .listing-row .card__highlights { font-size: 11px; }
  .listing-row__price { grid-column: 2; max-width: none; font-size: 14px; text-align: left; }
  .listing-row--job { grid-template-columns: 40px minmax(0, 1fr); }
  .listing-row--job .listing-row__art { width: 40px; height: 40px; }
  .card__highlights { font-size: 10px; gap: 3px 6px; }
  .card__highlights > span + span::before { margin-right: 6px; }
}
.card:focus-within .card__art-fav { opacity: 1; transform: none; }

/* Catalogue layouts keep offers within the first screen on small devices. */
@media (max-width: 1100px) {
  .home-categories { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .home-hero { padding: 8px 0 0; margin-bottom: 24px; gap: 16px; }
  .home-hero h1 { text-align: left; font-size: clamp(1.85rem, 7vw, 2.4rem); }
  .home-search { gap: 6px; padding: 6px 6px 6px 12px; min-height: 56px; }
  .home-search > svg { display: none; }
  .home-search__input { flex: 1; width: 0; min-height: 42px; font-size: 16px; }
  .home-search .diktat { width: 36px; }
  .home-search > .btn--primary { padding: 0 13px; min-height: 42px; font-size: 14px; }
  .home-search > .btn--primary > svg { display: none; }
  .home-browse { margin-bottom: 20px; }
  .home-categories { gap: 4px; }
  .home-category { gap: 8px; padding: 4px 2px; font-size: 12px; }
  .home-category__icon { width: 42px; height: 42px; }
  .home-browse .sect, .home-offers .sect { flex-wrap: nowrap; gap: 10px; align-items: center; }
  .home-browse .sect__t, .home-offers .sect__t { flex: 1; }
  .home-text-link { font-size: 12px; gap: 5px; }
  .home-offers .market-grid, .search-results > .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .market-grid .card__art, .search-results > .grid .card__art { aspect-ratio: 1; }
  .market-grid .card__b, .search-results > .grid .card__b { padding: 12px; gap: 8px; }
  .market-grid .card__title, .search-results > .grid .card__title { font-size: 14px; min-height: 2.7em; }
  .market-grid .card__seller, .search-results > .grid .card__seller { font-size: 12px; }
  .market-grid .card__price b, .search-results > .grid .card__price b { font-size: 17px; }
  .home-sell { flex-wrap: wrap; gap: 12px; margin-top: 28px; padding: 20px 0; }
  .home-sell h2 { font-size: 16px; }
  .home-sell > .btn { font-size: 13px; padding: 0 12px; }
  .home-sell__icon { display: none; }
  .topbar { padding: 0 12px; }
  .topbar__menu, .topbar__sell { min-width: 36px; }
  .results-search { gap: 8px; margin-bottom: 22px; }
  .results-heading { align-items: center; gap: 8px; margin-bottom: 12px; }
  .results-heading h1 { font-size: 20px; }
  .results-heading > a { font-size: 12px; padding: 0 4px; }
  .results-toolbar { padding: 10px 0; gap: 10px; }
  .results-active-filters, .results-facets { margin-bottom: 16px; }
  .market-search .filters[data-open="true"] { gap: 20px; }
  .filter-option { min-height: 40px; }
  .listing-placeholder { gap: 8px; font-size: 12px; }
  .listing-placeholder > svg { width: 32px; height: 32px; }
  :root[data-simple="true"] .home-offers .market-grid,
  :root[data-simple="true"] .search-results > .grid { grid-template-columns: 1fr; }
}

