:root {
  color-scheme: dark;
  --bg: #0f0d12;
  --bg-2: #16131b;
  --card: #1b1721;
  --card-2: #221d29;
  --line: #2c2634;
  --text: #f3eff6;
  --text-2: #a99fb3;
  --text-3: #756b80;
  --accent: #e8a0bf;
  --accent-ink: #2a0f1c;
  --accent-soft: rgba(232, 160, 191, .12);
  --gold: #e2c290;
  --series-1: #338ced;
  --good: #3ccf7a;
  --warn: #f2b33d;
  --bad: #f06a6a;
  --radius: 18px;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 10px 30px rgba(0,0,0,.25);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  font-synthesis: none;
}
@media (prefers-color-scheme: light) {
  :root:where(:not([data-theme="dark"])) {
    color-scheme: light;
    --bg: #f6f3f7; --bg-2: #efeaf1; --card: #ffffff; --card-2: #f8f5f9; --line: #e7e0ea;
    --text: #1d1622; --text-2: #6b6074; --text-3: #9a90a2;
    --accent: #b8487a; --accent-ink: #fff; --accent-soft: rgba(184,72,122,.09); --gold: #9a6b22;
    --series-1: #257de0; --good: #1c9a52; --warn: #b07800; --bad: #d03b3b;
    --shadow: 0 1px 2px rgba(30,10,40,.05), 0 8px 24px rgba(30,10,40,.06);
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f3f7; --bg-2: #efeaf1; --card: #ffffff; --card-2: #f8f5f9; --line: #e7e0ea;
  --text: #1d1622; --text-2: #6b6074; --text-3: #9a90a2;
  --accent: #b8487a; --accent-ink: #fff; --accent-soft: rgba(184,72,122,.09); --gold: #9a6b22;
  --series-1: #257de0; --good: #1c9a52; --warn: #b07800; --bad: #d03b3b;
  --shadow: 0 1px 2px rgba(30,10,40,.05), 0 8px 24px rgba(30,10,40,.06);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; min-height: 100vh;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Splash / Login ---------- */
.splash { min-height: 100vh; display: grid; place-items: center; }
.logo-mark {
  width: 44px; height: 44px; border-radius: 14px;
  background: #0f0d12 url(/logo-192.png) center/cover no-repeat;
  box-shadow: 0 8px 30px rgba(232,160,191,.35);
}
.loading .logo-mark { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.92); opacity: .7; } }

.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(80% 60% at 50% 0%, rgba(232,160,191,.14), transparent 70%), var(--bg); }
.auth-card { width: 100%; max-width: 380px; background: var(--card); border: 1px solid var(--line);
  border-radius: 24px; padding: 32px 26px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 24px; letter-spacing: -.02em; margin: 18px 0 4px; }
.auth-card p { color: var(--text-2); margin: 0 0 22px; }
.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.field input, .field select {
  width: 100%; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg-2); outline: none; transition: border-color .15s, box-shadow .15s; font-size: 16px;
}
.field input:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer;
  padding: 12px 18px; border-radius: 12px; font-weight: 600; background: var(--card-2); border: 1px solid var(--line); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; width: 100%; padding: 14px; }
.btn.small { padding: 8px 12px; font-size: 13px; border-radius: 10px; }
.btn.good { background: rgba(60,207,122,.14); color: var(--good); border-color: transparent; }
.btn.bad { background: rgba(240,106,106,.12); color: var(--bad); border-color: transparent; }
.btn:disabled { opacity: .5; }
.error { color: var(--bad); font-size: 14px; min-height: 20px; margin: 4px 0 10px; }

/* ---------- Layout ---------- */
.shell { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100vh; }
.shell > div { min-width: 0; }
body { overflow-x: hidden; }
.sidebar { display: none; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: calc(12px + var(--safe-t)) 18px 12px; background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.topbar .logo-mark { width: 30px; height: 30px; border-radius: 10px; }
.topbar h1 { font-size: 18px; margin: 0; letter-spacing: -.01em; flex: 1; }
.model-switch { appearance: none; background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 30px 7px 14px; font-size: 14px; font-weight: 600;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%);
  background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.main { padding: 18px 16px calc(96px + var(--safe-b)); max-width: 1180px; width: 100%; margin: 0 auto; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 8px 6px calc(8px + var(--safe-b)); background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(160%) blur(20px); -webkit-backdrop-filter: saturate(160%) blur(20px);
  border-top: 1px solid var(--line);
}
.tab { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; border: 0;
  background: none; color: var(--text-3); font-size: 11px; font-weight: 600; cursor: pointer; text-decoration: none; position: relative; }
.tab svg { width: 23px; height: 23px; }
.tab.active { color: var(--accent); }
.tab .dot { position: absolute; top: 2px; right: calc(50% - 18px); min-width: 16px; height: 16px; border-radius: 8px;
  background: var(--bad); color: #fff; font-size: 10px; display: grid; place-items: center; padding: 0 4px; }

@media (min-width: 960px) {
  .shell { grid-template-columns: 248px minmax(0, 1fr); }
  .sidebar { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh;
    padding: 22px 14px; border-right: 1px solid var(--line); background: var(--bg-2); }
  .sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; font-weight: 700; font-size: 17px; }
  .sidebar .brand .logo-mark { width: 32px; height: 32px; border-radius: 10px; }
  .sidebar .tab { flex-direction: row; gap: 12px; padding: 11px 12px; border-radius: 12px; font-size: 14px; justify-content: flex-start; }
  .sidebar .tab.active { background: var(--accent-soft); }
  .sidebar .tab .dot { position: static; margin-left: auto; }
  .sidebar .foot { margin-top: auto; color: var(--text-3); font-size: 12px; padding: 10px 12px; }
  .tabbar { display: none; }
  .topbar .logo-mark { display: none; }
  .main { padding: 26px 32px 48px; }
}

/* ---------- Cards / KPIs ---------- */
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 2px 12px; }
.section-title h2 { font-size: 17px; margin: 0; letter-spacing: -.01em; }
.section-title a, .section-title button { font-size: 13px; color: var(--accent); text-decoration: none; background: none; border: 0; cursor: pointer; font-weight: 600; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: 18px; }

.hero { position: relative; overflow: hidden; padding: 22px 20px;
  background: radial-gradient(120% 140% at 100% 0%, rgba(232,160,191,.22), transparent 55%), var(--card); }
.hero .label { color: var(--text-2); font-size: 13px; font-weight: 600; }
.hero .value { font-size: 42px; font-weight: 750; letter-spacing: -.03em; margin: 2px 0 6px; line-height: 1.1; }
.hero .sub { color: var(--text-2); font-size: 14px; }
.hero .sub b { color: var(--text); }
.seg { display: inline-flex; background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; margin-bottom: 14px; }
.seg button { border: 0; background: none; padding: 6px 13px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.seg button.on { background: var(--card-2); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.2); }

.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 12px; }
@media (min-width: 720px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { padding: 15px 16px; }
.kpi .k { color: var(--text-2); font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.kpi .k svg { width: 15px; height: 15px; opacity: .8; }
.kpi .v { font-size: 26px; font-weight: 720; letter-spacing: -.02em; margin-top: 4px; }
.kpi .s { color: var(--text-3); font-size: 12px; }

.grid-2 { display: grid; gap: 12px; }
@media (min-width: 960px) { .grid-2 { grid-template-columns: 1.4fr 1fr; } }

/* ---------- Chart ---------- */
.chart-wrap { position: relative; padding: 16px 14px 10px; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 4px 8px; }
.chart-head h3 { margin: 0; font-size: 15px; }
.chart-head .legend { color: var(--text-3); font-size: 12px; display: flex; gap: 12px; }
.chart-head .legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.chart svg { width: 100%; height: 190px; display: block; overflow: visible; }
.chart .grid line { stroke: var(--line); stroke-width: 1; }
.chart .axis text { fill: var(--text-3); font-size: 10.5px; }
.chart .bar { fill: var(--series-1); }
.chart .bar.future { fill: url(#hatch); }
.chart .bar.today { fill: var(--accent); }
.chart .hit { fill: transparent; cursor: pointer; }
.chart .hit:hover + .bar, .chart .bar.hover { opacity: .8; }
.tooltip { position: absolute; pointer-events: none; background: var(--card-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 10px; font-size: 12.5px; box-shadow: var(--shadow); white-space: nowrap; transform: translate(-50%, -100%); opacity: 0; transition: opacity .1s; }
.tooltip b { display: block; font-size: 14px; }

/* ---------- Lists ---------- */
.list { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 13px; padding: 13px 16px; border-bottom: 1px solid var(--line); cursor: pointer; text-decoration: none; }
.row:last-child { border-bottom: 0; }
.row:active { background: var(--card-2); }
@media (hover: hover) { .row:hover { background: var(--card-2); } }
.time-pill { min-width: 58px; text-align: center; padding: 8px 6px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.time-pill b { display: block; font-size: 16px; letter-spacing: -.01em; }
.time-pill span { font-size: 11px; color: var(--text-3); }
.avatar svg { width: 20px; height: 20px; opacity: .8; }
.avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; flex: none;
  background: linear-gradient(140deg, var(--accent-soft), var(--card-2)); color: var(--accent); border: 1px solid var(--line); }
.row .body { flex: 1; min-width: 0; }
.row .title { font-weight: 650; display: flex; align-items: center; gap: 6px; }
.row .title .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .meta { color: var(--text-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .right { text-align: right; flex: none; }
.row .right .amt { font-weight: 700; }
.row .right .when { color: var(--text-3); font-size: 12px; }
.empty { padding: 28px 18px; text-align: center; color: var(--text-3); }

.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 650; padding: 3px 8px; border-radius: 999px;
  background: var(--bg-2); color: var(--text-2); border: 1px solid var(--line); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.b-confirmed { color: var(--series-1); }
.b-done { color: var(--good); }
.b-noshow, .b-cancelled_no_confirm, .b-cancelled_by_customer, .b-cancelled { color: var(--bad); }
.b-expired, .b-replaced { color: var(--text-3); }
.b-open { color: var(--warn); }
.ch { font-size: 10.5px; font-weight: 700; padding: 2px 6px; border-radius: 6px; letter-spacing: .02em; }
.ch.wa { background: rgba(60,207,122,.13); color: var(--good); }
.ch.tg { background: rgba(51,140,237,.14); color: var(--series-1); }

.status-line { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.live { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 rgba(60,207,122,.6); animation: live 2s infinite; }
.live.off { background: var(--bad); animation: none; }
@keyframes live { 70% { box-shadow: 0 0 0 7px rgba(60,207,122,0); } 100% { box-shadow: 0 0 0 0 rgba(60,207,122,0); } }

/* ---------- Filters ---------- */
.toolbar { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; scrollbar-width: none; }
.toolbar::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--line); background: var(--card); padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.search { width: 100%; padding: 12px 14px 12px 40px; border-radius: 14px; border: 1px solid var(--line); background: var(--card) no-repeat 14px 50%; outline: none; margin-bottom: 12px; font-size: 16px; }
.search-wrap { position: relative; }
.search-wrap svg { position: absolute; left: 13px; top: 13px; width: 18px; height: 18px; color: var(--text-3); }
.day-head { font-size: 12.5px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; margin: 18px 4px 8px; }

/* ---------- Sheet (Detail) ---------- */
.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 50; opacity: 0; transition: opacity .2s; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 51; background: var(--card); border-radius: 24px 24px 0 0;
  max-height: 92vh; overflow: auto; transform: translateY(100%); transition: transform .28s cubic-bezier(.2,.8,.2,1);
  padding: 8px 18px calc(24px + var(--safe-b)); border-top: 1px solid var(--line); }
.sheet.open { transform: none; }
.sheet-bg.open { opacity: 1; }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 6px auto 14px; }
.sheet h2 { margin: 0 0 4px; font-size: 21px; letter-spacing: -.02em; }
.sheet .close { position: absolute; right: 14px; top: 14px; border: 0; background: var(--bg-2); width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 18px; color: var(--text-2); }
@media (min-width: 960px) {
  .sheet { left: auto; top: 0; bottom: 0; width: 460px; max-height: none; border-radius: 0; transform: translateX(100%); border-left: 1px solid var(--line); padding-top: 20px; }
  .sheet .grab { display: none; }
}
.dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 18px 0; font-size: 14px; }
.dl dt { color: var(--text-2); }
.dl dd { margin: 0; text-align: right; font-weight: 600; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.price-edit { display: flex; gap: 8px; margin-top: 10px; }
.price-edit input { flex: 1; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); font-size: 16px; }

.toggle { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--line); margin-top: 14px; font-weight: 600; }
.switch { width: 48px; height: 28px; border-radius: 14px; background: var(--line); position: relative; border: 0; cursor: pointer; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .18s; }
.switch.on { background: var(--good); }
.switch.on::after { transform: translateX(20px); }

/* ---------- Chat ---------- */
.bubbles { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.bub { max-width: 82%; padding: 8px 12px; border-radius: 16px; font-size: 14.5px; white-space: pre-wrap; word-wrap: break-word; }
.bub .t { display: block; font-size: 10.5px; color: var(--text-3); margin-top: 3px; text-align: right; }
.bub.in { align-self: flex-start; background: var(--bg-2); border-bottom-left-radius: 5px; }
.bub.out { align-self: flex-end; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); border-bottom-right-radius: 5px; }
.bub.owner { align-self: flex-end; background: rgba(226,194,144,.15); }
.bub-day { align-self: center; font-size: 11.5px; color: var(--text-3); margin: 10px 0 4px; font-weight: 600; }
.summary { background: var(--bg-2); border-radius: 14px; padding: 12px 14px; font-size: 13.5px; color: var(--text-2); margin-top: 12px; }

/* ---------- Models ---------- */
.model-card { padding: 16px; display: flex; align-items: center; gap: 14px; }
.model-card .avatar { width: 50px; height: 50px; font-size: 19px; }
.model-stats { display: flex; gap: 18px; margin-top: 4px; font-size: 13px; color: var(--text-2); }
.model-stats b { color: var(--text); }
.models-grid { display: grid; gap: 12px; }
@media (min-width: 720px) { .models-grid { grid-template-columns: 1fr 1fr; } }

.alert { display: flex; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.alert:last-child { border-bottom: 0; }
.alert .ic { width: 30px; height: 30px; border-radius: 10px; background: rgba(242,179,61,.14); color: var(--warn); display: grid; place-items: center; flex: none; }
.alert .ic svg { width: 16px; height: 16px; }
.alert .meta { color: var(--text-3); font-size: 12px; }

.settings .row { cursor: default; }
.muted { color: var(--text-2); }
.small { font-size: 12.5px; }
.toast { position: fixed; left: 50%; bottom: calc(92px + var(--safe-b)); transform: translateX(-50%) translateY(20px); background: var(--text); color: var(--bg);
  padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; opacity: 0; transition: all .2s; z-index: 60; }
.toast.show { opacity: 1; transform: translateX(-50%); }
.fade-in { animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }
.skeleton { background: linear-gradient(90deg, var(--card) 0%, var(--card-2) 50%, var(--card) 100%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--radius); }
@keyframes sk { to { background-position: -200% 0; } }

/* mobile overflow guard */
.grid-2, .kpis, .models-grid { grid-template-columns: repeat(var(--cols, 1), minmax(0, 1fr)); }
.tabbar { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpis { --cols: 2; }
@media (min-width: 720px) { .kpis { --cols: 4; } .models-grid { --cols: 2; } }
@media (min-width: 960px) { .grid-2 { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.grid-2 > *, .kpis > *, .models-grid > * { min-width: 0; }
.chart-wrap svg { max-width: 100%; display: block; }
.chart-head { flex-wrap: wrap; gap: 6px 12px; }
.chart-head h3 { white-space: nowrap; }
.chart-head .legend span { white-space: nowrap; }

/* Assistent: schwebendes Fenster unten rechts */
.a-fab { position: fixed; right: 18px; bottom: calc(88px + var(--safe-b)); z-index: 40; width: 56px; height: 56px; border-radius: 50%;
  border: 0; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.06); transition: transform .2s; }
.a-fab:hover { transform: scale(1.05); }
.a-fab svg, .a-fab .a-x { grid-area: 1 / 1; transition: opacity .2s, transform .2s; }
.a-fab svg { width: 26px; height: 26px; }
.a-fab .a-x { font-size: 30px; line-height: 1; opacity: 0; transform: rotate(-90deg); }
.a-open .a-fab svg { opacity: 0; transform: rotate(90deg); }
.a-open .a-fab .a-x { opacity: 1; transform: none; }
.a-panel { position: fixed; right: 18px; bottom: calc(156px + var(--safe-b)); z-index: 41; width: min(400px, calc(100vw - 24px));
  height: min(580px, calc(100dvh - 190px)); display: flex; flex-direction: column; background: var(--card);
  border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 24px 60px rgba(0,0,0,.45); overflow: hidden;
  opacity: 0; transform: translateY(16px) scale(.97); transform-origin: bottom right; pointer-events: none;
  transition: opacity .2s, transform .2s; }
.a-open .a-panel { opacity: 1; transform: none; pointer-events: auto; }
.a-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; border-bottom: 1px solid var(--line); }
.a-icon { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.a-icon svg { width: 19px; height: 19px; }
.a-title { flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.a-title span { font-size: 12px; color: var(--text-3); }
.a-clear, .a-min { background: none; border: 0; color: var(--text-3); cursor: pointer; font-size: 13px; padding: 6px 8px; border-radius: 8px; }
.a-min { font-size: 20px; line-height: 1; }
.a-clear:hover, .a-min:hover { background: var(--bg-2); color: var(--text); }
.a-clear[hidden] { display: none; }
.a-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 14px; overscroll-behavior: contain; }
.a-log .bub { max-width: 88%; font-size: 14.5px; line-height: 1.45; }
.a-empty { margin: auto 0; text-align: center; }
.a-empty p { font-size: 13.5px; margin: 0 4px 14px; }
.a-ideas { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.a-ideas .chip { white-space: normal; text-align: left; }
.a-compose { display: flex; gap: 8px; align-items: flex-end; padding: 10px; border-top: 1px solid var(--line); }
.a-compose textarea { flex: 1; resize: none; border: 1px solid var(--line); border-radius: 18px; outline: none; background: var(--bg-2);
  color: var(--text); font: inherit; font-size: 16px; padding: 9px 14px; max-height: 120px; }
.a-compose textarea:focus { border-color: var(--accent); }
.a-send { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; cursor: pointer; }
.a-send svg { width: 20px; height: 20px; }
.a-compose[data-busy] .a-send { opacity: .5; }
.typing { display: flex; gap: 4px; padding: 12px 14px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@media (min-width: 960px) { .a-fab { right: 24px; bottom: 24px; } .a-panel { right: 24px; bottom: 92px; height: min(620px, calc(100dvh - 120px)); } }
@media (max-width: 720px) {
  .a-panel { left: 8px; right: 8px; width: auto; top: calc(8px + var(--safe-t)); bottom: calc(80px + var(--safe-b)); height: auto; }
  .a-fab { right: 14px; bottom: calc(84px + var(--safe-b)); width: 52px; height: 52px; }
  .a-open .a-fab { display: none; }
  .a-open { overflow: hidden; }
}

.ho-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* Chat: selbst schreiben oder KI überlassen */
.ctl { position: sticky; bottom: calc(-24px - var(--safe-b)); margin: 16px -18px calc(-24px - var(--safe-b)); padding: 12px 18px calc(14px + var(--safe-b)); background: var(--card); border-top: 1px solid var(--line); z-index: 2; }
.ctl-state { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); margin-bottom: 10px; }
.ctl-state > span:nth-child(2) { flex: 1; }
.ctl-state .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.ctl-state .dot.on { background: #34c759; box-shadow: 0 0 0 3px rgba(52,199,89,.18); }
.ctl-state .dot.off { background: #ff9f0a; box-shadow: 0 0 0 3px rgba(255,159,10,.18); }
.ctl-compose { display: flex; gap: 8px; align-items: flex-end; }
.ctl-compose textarea { flex: 1; resize: none; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); border-radius: 18px; padding: 10px 14px; font: inherit; font-size: 15px; max-height: 140px; outline: none; }
.ctl-compose textarea:focus { border-color: var(--accent); }
.ctl-hint { margin-top: 6px; }
.ctl-seg { display: flex; gap: 4px; padding: 4px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; }
.ctl-seg button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; background: transparent; color: var(--text-2); font: inherit; font-size: 14px; font-weight: 600; padding: 9px 10px; border-radius: 10px; cursor: pointer; }
.ctl-seg button.on { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.ctl-seg button:not(.on) .dot { opacity: .35; box-shadow: none; }
.ctl-seg .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.ctl-seg .dot.on { background: #34c759; box-shadow: 0 0 0 3px rgba(52,199,89,.18); }
.ctl-seg .dot.off { background: #ff9f0a; box-shadow: 0 0 0 3px rgba(255,159,10,.18); }
