/* Fahrschul-Inbox · iOS / Liquid-Glass-Stil */

:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", system-ui, sans-serif;
  --bg: #FFFFFF;
  --bg-grouped: #F2F2F7;
  --shell: #EDEDF2;
  --card: #FFFFFF;
  --fill: rgba(118, 118, 128, 0.12);
  --fill-2: rgba(118, 118, 128, 0.2);
  --label: #000000;
  --label-2: #6C6C70;
  --label-3: #48484C;
  --sep: rgba(60, 60, 67, 0.22);
  --accent: #0066DB;
  --accent-text: #0058BD;
  --accent-tint: rgba(0, 102, 219, 0.12);
  --on-accent: #FFFFFF;
  --green: #248A3D;
  --green-text: #1B6E31;
  --green-tint: rgba(52, 199, 89, 0.16);
  --orange: #C25E00;
  --orange-text: #9A4A00;
  --orange-tint: rgba(255, 149, 0, 0.15);
  --red: #C4001A;
  --red-tint: rgba(255, 59, 48, 0.12);
  --bubble-in: #E9E9EB;
  --bubble-in-text: #000000;
  --glass-bg: rgba(255, 255, 255, 0.62);
  --glass-border: rgba(255, 255, 255, 0.75);
  --glass-hi: rgba(255, 255, 255, 0.9);
  --glass-shadow: 0 10px 30px rgba(0, 0, 0, 0.10), 0 1px 3px rgba(0, 0, 0, 0.06);
  --field: rgba(255, 255, 255, 0.85);
  --avatar: linear-gradient(180deg, #A5ABB8 0%, #858A96 100%);
  --seg-on: #FFFFFF;
  --r-card: 22px;
  --spring: cubic-bezier(0.32, 0.72, 0, 1);
  --spring-bounce: cubic-bezier(0.34, 1.4, 0.64, 1);
  --ease-ios: cubic-bezier(0.32, 0.72, 0, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-grouped: #000000;
    --shell: #0B0B0D;
    --card: #1C1C1E;
    --fill: rgba(118, 118, 128, 0.24);
    --fill-2: rgba(118, 118, 128, 0.32);
    --label: #FFFFFF;
    --label-2: #A1A1A8;
    --label-3: #C7C7CC;
    --sep: rgba(84, 84, 88, 0.6);
    --accent: #0A84FF;
    --accent-text: #5AA9FF;
    --accent-tint: rgba(10, 132, 255, 0.2);
    --on-accent: #FFFFFF;
    --green: #30D158;
    --green-text: #4ADE76;
    --green-tint: rgba(48, 209, 88, 0.18);
    --orange: #FF9F0A;
    --orange-text: #FFB340;
    --orange-tint: rgba(255, 159, 10, 0.18);
    --red: #FF6961;
    --red-tint: rgba(255, 69, 58, 0.2);
    --bubble-in: #26252A;
    --bubble-in-text: #FFFFFF;
    --glass-bg: rgba(44, 44, 48, 0.58);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-hi: rgba(255, 255, 255, 0.14);
    --glass-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 1px 3px rgba(0, 0, 0, 0.3);
    --field: rgba(0, 0, 0, 0.35);
    --avatar: linear-gradient(180deg, #6E7380 0%, #50545E 100%);
    --seg-on: #636366;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.3;
  color: var(--label);
  background: var(--shell);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-text); }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.88em; background: var(--fill); padding: 1px 6px; border-radius: 6px; }
h1, h2, h3 { margin: 0; }
svg { flex-shrink: 0; }

/* ------------------------------------------------------------ Glas */
.glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--glass-shadow);
}

/* ------------------------------------------------------------ Grundgerüst (Mac) */
.shell { display: flex; height: 100vh; height: 100dvh; }
.sidebar {
  width: 240px; margin: 10px; border-radius: 22px; padding: 18px 10px 12px;
  display: flex; flex-direction: column; gap: 4px; flex-shrink: 0;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 16px; }
.logo { width: 34px; height: 34px; border-radius: 10px; background: var(--accent); display: grid; place-items: center; }
.logo svg { width: 19px; height: 19px; }
.brand-title { font-size: 15px; font-weight: 700; }
.brand-sub { font-size: 12px; color: var(--label-2); }

.tabs { display: flex; flex-direction: column; gap: 2px; position: relative; }
.tabs a {
  height: 38px; border-radius: 11px; padding: 0 10px; display: flex; align-items: center; gap: 10px;
  color: var(--label); text-decoration: none; font-size: 15px; font-weight: 500;
  transition: background 0.15s;
}
.tabs a:hover { background: var(--fill); }
.tabs a.active { color: var(--accent-text); font-weight: 600; }
.tabs svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tabs .count { margin-left: auto; font-size: 13px; font-weight: 600; }
.tabs .count:empty { display: none; }
.lbl-short { display: none; }

.pills {
  margin-top: auto; padding: 10px; border-radius: 14px; background: var(--fill);
  display: flex; flex-direction: column; gap: 6px;
}
.pill { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--label-3); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--label-2); }
.pill.ok { color: var(--green-text); } .pill.ok::before { background: var(--green); }
.pill.warn { color: var(--orange-text); } .pill.warn::before { background: var(--orange); }
.pill.bad { color: var(--red); } .pill.bad::before { background: var(--red); }

#app { flex: 1; min-width: 0; height: 100%; overflow: hidden; }

/* ------------------------------------------------------------ Chats */
.chats-layout { display: flex; height: 100%; }
.chatlist { width: 370px; flex-shrink: 0; display: flex; flex-direction: column; min-height: 0; }
.chatlist-head { padding: 24px 16px 10px; display: flex; flex-direction: column; gap: 12px; }
.large-title { font-size: 34px; line-height: 41px; font-weight: 700; letter-spacing: 0.37px; }
.subtitle { font-size: 15px; color: var(--label-2); margin-top: 2px; }
.mobile-pills { display: none; gap: 6px; flex-wrap: wrap; }
.mobile-pills .pill { height: 28px; padding: 0 11px; border-radius: 14px; background: var(--fill); }

.searchbox { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border-radius: 11px; background: var(--fill); }
.searchbox svg { width: 16px; height: 16px; fill: none; stroke: var(--label-2); stroke-width: 2.2; stroke-linecap: round; }
.search { border: 0; outline: 0; background: transparent; font-size: 17px; flex: 1; min-width: 0; }
.search::placeholder { color: var(--label-2); }

.segmented {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 2px; border-radius: 10px;
  background: var(--fill); height: 32px;
}
.chip { border: 0; background: transparent; border-radius: 8px; font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; transition: background 0.2s, box-shadow 0.2s; }
.chip.active { background: var(--seg-on); font-weight: 600; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 0 1px rgba(0, 0, 0, 0.04); }
.chip .n { margin-left: 4px; color: var(--label-2); font-weight: 500; }

.chatitems { flex: 1; overflow-y: auto; padding: 4px 8px 16px; -webkit-overflow-scrolling: touch; }
.chatitem {
  display: flex; gap: 10px; padding: 10px; border-radius: 16px; color: inherit; text-decoration: none;
  align-items: flex-start; transition: background 0.15s;
}
.chatitem:hover { background: var(--fill); }
.chatitem.active { background: var(--accent); color: var(--on-accent); }
.chatitem.active .ci-last, .chatitem.active .ci-time { color: rgba(255, 255, 255, 0.85); }
.chatitem.active .avatar { background: rgba(255, 255, 255, 0.25); }
.chatitem.active .badge { background: rgba(255, 255, 255, 0.22); color: #fff; }
.chatitem.active .dot { background: #fff; }
.dot-col { width: 10px; padding-top: 18px; display: flex; justify-content: center; flex-shrink: 0; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.avatar {
  width: 46px; height: 46px; border-radius: 50%; background: var(--avatar); color: #fff;
  display: grid; place-items: center; font-size: 18px; font-weight: 600; flex-shrink: 0; letter-spacing: 0.3px;
}
.ci-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ci-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ci-name { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-time { font-size: 14px; color: var(--label-2); flex-shrink: 0; }
.ci-last { font-size: 14px; line-height: 19px; color: var(--label-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.badge {
  align-self: flex-start; margin-top: 4px; display: inline-flex; align-items: center; gap: 5px;
  height: 24px; padding: 0 10px; border-radius: 12px; font-size: 12px; font-weight: 600;
}
.badge svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.badge.ready { background: var(--accent-tint); color: var(--accent-text); }
.badge.human { background: var(--orange-tint); color: var(--orange-text); }
.badge.err { background: var(--red-tint); color: var(--red); }
.badge.busy { background: var(--fill); color: var(--label-3); }

/* ------------------------------------------------------------ Chat */
.chatpane {
  flex: 1; min-width: 0; margin: 10px 10px 10px 0; border-radius: 22px; background: var(--bg);
  position: relative; overflow: hidden; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.chathead {
  position: absolute; top: 12px; left: 12px; right: 12px; z-index: 3;
  display: flex; align-items: center; gap: 10px;
}
.chathead .who { flex: 1; min-width: 0; height: 52px; border-radius: 26px; display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.chathead .who .avatar { width: 36px; height: 36px; font-size: 14px; }
.chathead .name { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chathead .meta { font-size: 12px; color: var(--label-2); }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; padding: 0; cursor: pointer;
  border: 0; background: var(--fill); color: var(--label); flex-shrink: 0;
}
.icon-btn.glass { border: 1px solid var(--glass-border); background: var(--glass-bg); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.danger { color: var(--red); }
.back { display: none; color: var(--accent-text); }
.back svg { stroke-width: 2.6; }

.messages {
  position: absolute; inset: 0; overflow-y: auto; padding: 84px 22px 260px;
  display: flex; flex-direction: column; gap: 4px; -webkit-overflow-scrolling: touch;
}
.messages::before { content: ""; flex: 1; }
.day { align-self: center; font-size: 12px; font-weight: 600; color: var(--label-2); margin: 14px 0 6px; }
.msg {
  max-width: min(75%, 560px); padding: 8px 13px 6px; border-radius: 19px; font-size: 16px; line-height: 21px;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.msg.in { align-self: flex-start; background: var(--bubble-in); color: var(--bubble-in-text); }
.msg.out { align-self: flex-end; background: var(--accent); color: var(--on-accent); }
.msg .t { font-size: 11px; opacity: 0.6; text-align: right; margin-top: 2px; }
.msg .media-hinweis { font-size: 13px; opacity: 0.7; font-style: italic; }
.msg .media-bild { display: block; margin: -2px -4px 4px; }
.msg .media-bild img { display: block; max-width: min(260px, 100%); max-height: 320px; border-radius: 12px; object-fit: cover; background: rgba(127,127,127,.15); min-height: 60px; }
.msg .media-audio { display: block; width: min(260px, 62vw); height: 40px; margin: 2px 0 4px; }
.msg .media-video { display: block; max-width: min(260px, 100%); border-radius: 12px; margin: 2px 0 4px; background: #000; }
.msg .media-datei { display: inline-block; padding: 6px 10px; margin: 2px 0 4px; border-radius: 10px; background: rgba(127,127,127,.14); color: inherit; text-decoration: none; word-break: break-word; }

.composer {
  position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 3;
  border-radius: 28px; padding: 16px; display: flex; flex-direction: column; gap: 12px;
  max-height: 70%; overflow-y: auto;
}
.composer-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.composer-head .title { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; flex: 1; }
.composer-head .title svg { width: 16px; height: 16px; fill: none; stroke: var(--accent-text); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.conf { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px; border-radius: 13px; font-size: 13px; font-weight: 600; }
.conf::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.conf.hoch { background: var(--green-tint); color: var(--green-text); }
.conf.mittel { background: var(--orange-tint); color: var(--orange-text); }
.conf.niedrig { background: var(--red-tint); color: var(--red); }
.reason { font-size: 13px; line-height: 18px; color: var(--label-3); }
.sources { display: flex; gap: 6px; flex-wrap: wrap; }
.source { height: 26px; display: inline-flex; align-items: center; padding: 0 10px; border-radius: 13px; background: var(--fill); font-size: 12px; font-weight: 600; color: var(--label-3); }
.source.unchecked { background: transparent; border: 1px dashed var(--label-2); }
.draft {
  width: 100%; border: 0; outline: 0; resize: none; min-height: 64px; overflow-y: auto; border-radius: 18px; background: var(--field);
  box-shadow: inset 0 0 0 0.5px var(--sep); padding: 12px 14px; font-size: 16px; line-height: 21px;
}
.draft:focus { box-shadow: inset 0 0 0 2px var(--accent); }
.composer .actions { display: flex; align-items: center; gap: 8px; }
.composer .actions .btn { flex: 1; min-width: 0; padding: 0 14px; }
.hint { font-size: 12px; color: var(--label-2); text-align: center; }
.btn.wa { background: #1DA851; color: #fff; box-shadow: 0 6px 16px rgba(29, 168, 81, 0.28); }
.composer .actions .icon-btn { flex: none; }
.srcs summary { font-size: 13px; color: var(--label-2); cursor: pointer; list-style: none; padding: 2px 4px; }
.srcs summary::-webkit-details-marker { display: none; }
.srcs summary::before { content: "›"; display: inline-block; margin-right: 6px; transition: transform 0.2s; }
.srcs[open] summary::before { transform: rotate(90deg); }
.srcs .sources { margin-top: 8px; }

.human-note {
  display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 14px;
  background: var(--orange-tint); color: var(--orange-text); font-size: 13px; line-height: 18px; font-weight: 500;
}
.human-note svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; margin-top: 1px; }
.done-note { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--label-3); }
.done-note svg { width: 20px; height: 20px; fill: none; stroke: var(--green); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.skeleton { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--label-2); padding: 6px 0; }
.demo-box { display: flex; gap: 8px; padding-top: 12px; border-top: 0.5px solid var(--sep); }
.demo-box input { flex: 1; min-width: 0; height: 40px; border: 0; outline: 0; border-radius: 20px; padding: 0 14px; background: var(--field); box-shadow: inset 0 0 0 0.5px var(--sep); font-size: 15px; }

.spinner {
  width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--fill-2); border-top-color: var(--accent);
  animation: spin 0.8s linear infinite; display: inline-block; vertical-align: middle; flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------ Buttons */
.btn {
  height: 44px; padding: 0 18px; border-radius: 22px; border: 0; cursor: pointer;
  background: var(--fill); color: var(--label); font-size: 16px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap;
  transition: transform 0.12s, background 0.15s;
}
.btn:active { transform: scale(0.97); }
.btn:hover { filter: brightness(0.97); }
.btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn.primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 16px rgba(0, 102, 219, 0.28); }
.btn.tinted { background: var(--accent-tint); color: var(--accent-text); }
.btn.danger { color: var(--red); }
.btn.small { height: 34px; padding: 0 14px; border-radius: 17px; font-size: 14px; }
.btn:disabled { opacity: 0.45; cursor: default; transform: none; filter: none; }
.btn.lg { height: 50px; border-radius: 25px; font-size: 17px; }

/* ------------------------------------------------------------ Seiten */
.page { height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.page-inner { max-width: 820px; margin: 0 auto; padding: 32px 24px 60px; display: flex; flex-direction: column; gap: 18px; }
.page-inner h1 { font-size: 34px; line-height: 41px; font-weight: 700; letter-spacing: 0.37px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.lead { margin: 4px 0 0; font-size: 15px; color: var(--label-2); max-width: 560px; line-height: 20px; }
.section-label { font-size: 13px; color: var(--label-2); text-transform: uppercase; letter-spacing: 0.4px; padding: 0 16px; margin-bottom: -10px; }

.card { background: var(--card); border-radius: var(--r-card); padding: 18px; }
.card-title { font-size: 17px; font-weight: 600; }
.notice { padding: 14px 16px; border-radius: 18px; background: var(--accent-tint); color: var(--label); font-size: 14px; line-height: 20px; }
.notice.warn { background: var(--orange-tint); }
.notice ol { margin: 8px 0 0 18px; padding: 0; }

.group { background: var(--card); border-radius: var(--r-card); overflow: hidden; }
.kitem { display: flex; gap: 14px; padding: 14px 16px; align-items: flex-start; justify-content: space-between; }
.kitem + .kitem { box-shadow: inset 0 0.5px 0 var(--sep); }
.ktitle { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ktext { font-size: 15px; line-height: 20px; color: var(--label-3); margin-top: 3px; }
.ksrc { font-size: 12px; color: var(--label-2); font-weight: 500; margin-top: 4px; }
.kactions { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.tag { height: 22px; display: inline-flex; align-items: center; padding: 0 8px; border-radius: 11px; font-size: 12px; font-weight: 600; }
.tag.geprueft { background: var(--green-tint); color: var(--green-text); }
.tag.vorschlag { background: var(--orange-tint); color: var(--orange-text); }

.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--label-2); padding-left: 4px; }
.field input, .field select, .field textarea {
  border: 0; outline: 0; border-radius: 12px; background: var(--fill); padding: 11px 14px; font-size: 16px; width: 100%;
}
.field textarea { min-height: 96px; resize: vertical; line-height: 21px; }
.field input:focus, .field select:focus, .field textarea:focus { box-shadow: inset 0 0 0 2px var(--accent); }
.help { font-size: 13px; color: var(--label-2); padding-left: 4px; line-height: 18px; }

.toggle { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 16px; cursor: pointer; }
.toggle input {
  appearance: none; -webkit-appearance: none; width: 51px; height: 31px; border-radius: 16px; background: var(--fill-2);
  position: relative; flex-shrink: 0; cursor: pointer; transition: background 0.2s; margin: 0;
}
.toggle input::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 1px 1px rgba(0, 0, 0, 0.16); transition: transform 0.2s;
}
.toggle input:checked { background: #34C759; }
.toggle input:checked::after { transform: translateX(20px); }

.hero { display: flex; flex-direction: column; gap: 12px; padding: 22px; }
.hero .over { font-size: 13px; font-weight: 600; color: var(--label-2); text-transform: uppercase; letter-spacing: 0.4px; }
.hero .big { font-size: 56px; line-height: 60px; font-weight: 700; letter-spacing: -1px; }
.bar { height: 8px; border-radius: 4px; background: var(--fill-2); position: relative; overflow: hidden; }
.bar > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--accent); }
.bar > b { position: absolute; left: 90%; top: 0; bottom: 0; width: 2px; background: var(--label); }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.kpi { background: var(--card); border-radius: 20px; padding: 14px 16px; }
.kpi .v { font-size: 28px; line-height: 34px; font-weight: 700; }
.kpi .l { font-size: 13px; color: var(--label-2); }
.corr { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.corr + .corr { box-shadow: inset 0 0.5px 0 var(--sep); }
.corr .who { font-size: 13px; font-weight: 600; color: var(--label-2); }
.corr .was { font-size: 15px; line-height: 20px; color: var(--label-2); text-decoration: line-through; }
.corr .ist { font-size: 15px; line-height: 20px; }

.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 40px 24px; color: var(--label-2); font-size: 15px; line-height: 20px; height: 100%; }
.empty h2 { font-size: 20px; color: var(--label); font-weight: 600; }
.empty .icon { width: 56px; height: 56px; border-radius: 50%; background: var(--fill); display: grid; place-items: center; margin-bottom: 4px; }
.empty .icon svg { width: 26px; height: 26px; fill: none; stroke: var(--label-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chatitems .empty { height: auto; }

.toast {
  position: fixed; left: 50%; top: calc(12px + var(--safe-t)); z-index: 60; pointer-events: none;
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 20px 0 14px; border-radius: 24px;
  font-size: 15px; font-weight: 600; max-width: calc(100vw - 32px);
  background: rgba(22, 22, 24, 0.88); color: #fff; -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transform: translate(-50%, calc(-100% - 30px)) scale(0.8); opacity: 0;
  transition: transform 0.6s var(--spring-bounce), opacity 0.3s ease;
}
.toast svg { width: 22px; height: 22px; fill: none; stroke: #30D158; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.toast.bad svg { stroke: #FF6961; }
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }

/* ------------------------------------------------------------ iPhone */
@media (max-width: 820px) {
  body { background: var(--bg-grouped); }
  .shell { display: block; height: auto; }
  .sidebar { display: contents; }
  .brand, .sidebar > .pills { display: none; }
  #app { height: 100vh; height: 100dvh; }

  .tabs {
    position: fixed; z-index: 20; left: 14px; right: 14px; bottom: calc(10px + var(--safe-b));
    height: 64px; border-radius: 32px; padding: 0 4px;
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center; gap: 0;
    background: var(--glass-bg); -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(22px) saturate(180%);
    border: 1px solid var(--glass-border); box-shadow: inset 0 1px 0 var(--glass-hi), var(--glass-shadow);
  }
  .tabs a { height: 56px; border-radius: 28px; flex-direction: column; justify-content: center; gap: 2px; padding: 0; font-size: 10px; position: relative; }
  .tabs a:hover { background: transparent; }
  .tabs svg { width: 24px; height: 24px; }
  .tabs .count { position: absolute; top: 5px; left: 50%; margin-left: 6px; min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px; background: #FF3B30; color: #fff; font-size: 11px; display: grid; place-items: center; }
  .lbl-long { display: none; } .lbl-short { display: inline; }
  body.in-chat .tabs { transform: translateY(calc(100% + 40px)); opacity: 0; pointer-events: none; }

  .chats-layout { background: var(--bg); }
  .chatlist { width: 100%; }
  .chatlist-head { padding: calc(14px + var(--safe-t)) 16px 8px; }
  .mobile-pills { display: flex; }
  .chatlist { height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; display: block; }
  .chatitems { padding: 0 0 110px; overflow: visible; }
  .chatitem { border-radius: 0; padding: 10px 16px 0 6px; gap: 10px; }
  .chatitem:hover { background: transparent; }
  .chatitem.active { background: transparent; color: inherit; }
  .chatitem.active .ci-last, .chatitem.active .ci-time { color: var(--label-2); }
  .chatitem.active .avatar { background: var(--avatar); }
  .chatitem.active .dot { background: var(--accent); }
  .chatitem.active .badge.ready { background: var(--accent-tint); color: var(--accent-text); }
  .chatitem.active .badge.human { background: var(--orange-tint); color: var(--orange-text); }
  .chatitem.active .badge.busy { background: var(--fill); color: var(--label-3); }
  .chatitem.active .badge.err { background: var(--red-tint); color: var(--red); }
  .chatitem:active { background: var(--fill); transform: none; transition-duration: 0s; }
  .chatitem .ci-main { border-bottom: 0.5px solid var(--sep); padding-bottom: 12px; }
  .avatar { width: 52px; height: 52px; font-size: 20px; }
  .ci-name { font-size: 17px; } .ci-time { font-size: 15px; } .ci-last { font-size: 15px; line-height: 20px; }
  .dot-col { padding-top: 21px; }

  .chats-layout .chatpane {
    display: block; position: fixed; inset: 0; margin: 0; border-radius: 0; z-index: 30;
    box-shadow: -12px 0 30px rgba(0, 0, 0, 0.10);
    transform: translateX(100%); visibility: hidden;
    transition: transform 0.5s var(--ease-ios), visibility 0s linear 0.5s;
  }
  .chats-layout.has-chat .chatpane { transform: none; visibility: visible; transition: transform 0.5s var(--ease-ios), visibility 0s; }
  .chats-layout .chatlist { transition: transform 0.5s var(--ease-ios); }
  .chats-layout.has-chat .chatlist { transform: translateX(-28%); }
  .chat-dim {
    display: block; position: fixed; inset: 0; z-index: 29; pointer-events: none;
    background: rgba(0, 0, 0, 0.14); opacity: 0; transition: opacity 0.5s var(--ease-ios);
  }
  .chats-layout.has-chat .chat-dim { opacity: 1; }
  .chats-layout.dragging .chatpane, .chats-layout.dragging .chatlist, .chats-layout.dragging .chat-dim { transition: none; }
  .chathead { top: calc(8px + var(--safe-t)); left: 10px; right: 10px; }
  .chathead .who { height: 44px; border-radius: 22px; padding: 0 6px; }
  .chathead .who .avatar { width: 32px; height: 32px; font-size: 13px; }
  .back { display: grid; }
  .messages { padding: calc(70px + var(--safe-t)) 14px 260px; }
  .msg { font-size: 17px; line-height: 22px; max-width: 80%; }
  .composer { left: 8px; right: 8px; bottom: calc(8px + var(--safe-b)); border-radius: 30px; padding: 14px; gap: 10px; }
  .draft { font-size: 17px; line-height: 22px; }

  .page-inner { padding: calc(20px + var(--safe-t)) 16px 120px; }
  .page-head { align-items: flex-start; }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .kpis { gap: 10px; }
  .kpi { padding: 12px 14px; border-radius: 18px; }
  .kpi .v { font-size: 24px; line-height: 30px; }
  .kitem { flex-direction: column; }
  .kactions { justify-content: flex-start; }
  .empty { height: auto; padding-top: 60px; }
}


/* ============================================================ Bewegung (Apple-Federn) */
@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --spring: linear(0, 0.0417, 0.1403, 0.2651, 0.3961, 0.5206, 0.6318, 0.7264, 0.8038, 0.8651, 0.9121, 0.9468, 0.9716, 0.9886, 0.9996, 1.0062, 1.0097, 1.011, 1.0109, 1.0101, 1.0088, 1.0073, 1.0059, 1.0046, 1.0035, 1.0025, 1.0018, 1.0012, 1.0007, 1.0004, 1.0002, 1);
    --spring-bounce: linear(0, 0.0493, 0.1694, 0.325, 0.4897, 0.645, 0.78, 0.8891, 0.9711, 1.0278, 1.0625, 1.0795, 1.0834, 1.0783, 1.0677, 1.0545, 1.0408, 1.028, 1.017, 1.0082, 1.0016, 0.9972, 0.9945, 0.9933, 0.9931, 0.9936, 0.9945, 0.9956, 0.9967, 0.9978, 0.9987, 0.9994, 0.9999, 1.0003, 1.0005, 1.0006, 1.0005, 1.0004, 1);
  }
}

/* Tab-Leiste: gleitende Glas-Linse */
.tabs a { position: relative; z-index: 1; }
.tab-lens {
  position: absolute; left: 0; top: 0; z-index: 0; pointer-events: none;
  width: var(--w, 0); height: var(--h, 0); translate: var(--x, 0) var(--y, 0);
  border-radius: 11px; background: var(--accent-tint);
  transition: translate 0.6s var(--spring-bounce), width 0.5s var(--spring), height 0.5s var(--spring), scale 0.45s var(--spring-bounce), opacity 0.2s;
}
.tab-lens.instant { transition: none; }
.tabs a svg { transition: scale 0.45s var(--spring-bounce); }
.tabs a:active svg { scale: 0.82; transition-duration: 0.1s; }
.tabs a.bounce svg { animation: iconBounce 0.55s var(--spring-bounce); }
@keyframes iconBounce { 0% { scale: 0.75; } 100% { scale: 1; } }

@media (max-width: 820px) {
  .tabs { transition: transform 0.55s var(--spring), opacity 0.3s ease; }
  .tab-lens {
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.15)), var(--accent-tint);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), inset 0 -1px 0 rgba(0, 0, 0, 0.04), 0 4px 14px rgba(0, 0, 0, 0.08);
  }
  .tab-lens.moving { scale: 1.14 1.1; }
}
@media (max-width: 820px) and (prefers-color-scheme: dark) {
  .tab-lens { background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04)), var(--accent-tint); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 4px 14px rgba(0, 0, 0, 0.3); }
}

/* Segment-Umschalter mit gleitendem Daumen */
.segmented { position: relative; }
.seg-thumb {
  position: absolute; top: 2px; bottom: 2px; left: 2px; width: calc((100% - 4px) / 3);
  border-radius: 8px; background: var(--seg-on);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 0 1px rgba(0, 0, 0, 0.04);
  translate: calc(var(--i, 0) * 100%) 0; transition: translate 0.5s var(--spring);
}
.chip { position: relative; z-index: 1; transition: scale 0.3s var(--spring); }
.chip.active { background: transparent; box-shadow: none; }
.chip:active { scale: 0.95; }

/* Drücken fühlt sich an wie iOS */
.btn, .icon-btn { transition: transform 0.45s var(--spring-bounce), background 0.2s, opacity 0.2s; }
.btn:active, .icon-btn:active { transform: scale(0.94); transition-duration: 0.12s; }
.chatitem { transition: background 0.25s, transform 0.4s var(--spring); }
.chatitem:active { transform: scale(0.985); }
.toggle input { transition: background 0.3s ease; }
.toggle input::after { transition: transform 0.45s var(--spring-bounce), width 0.3s var(--spring); }
.toggle input:active::after { width: 33px; }
.toggle input:checked:active::after { transform: translateX(14px); }

/* Seitenwechsel */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes swapIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

#app[data-anim="tab"] .page-inner > * { animation: rise 0.6s var(--spring) both; }
#app[data-anim="tab"] .page-inner > *:nth-child(2) { animation-delay: 0.04s; }
#app[data-anim="tab"] .page-inner > *:nth-child(3) { animation-delay: 0.08s; }
#app[data-anim="tab"] .page-inner > *:nth-child(4) { animation-delay: 0.12s; }
#app[data-anim="tab"] .page-inner > *:nth-child(5) { animation-delay: 0.16s; }
#app[data-anim="tab"] .page-inner > *:nth-child(n+6) { animation-delay: 0.2s; }
#app[data-anim="tab"] .chatlist-head { animation: rise 0.55s var(--spring) both; }


.chatitems.stagger .chatitem { animation: rise 0.55s var(--spring) both; animation-delay: calc(var(--d, 0) * 35ms + 60ms); }
.chatitems.fade { animation: fadeIn 0.3s ease both; }
.badge.pop { animation: badgePop 0.6s var(--spring-bounce) both; }
@keyframes badgePop { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: none; } }
.tabs .count { transition: scale 0.4s var(--spring-bounce); }

/* Neue Nachrichten ploppen wie bei iMessage */
.msg.new { animation: bubbleIn 0.55s var(--spring-bounce) both; }
.msg.in.new { transform-origin: 0% 100%; }
.msg.out.new { transform-origin: 100% 100%; }
@keyframes bubbleIn { from { opacity: 0; transform: scale(0.6) translateY(14px); } to { opacity: 1; transform: none; } }

/* Entwurfs-Karte fährt hoch wie ein iOS-Sheet */
.composer.enter { animation: sheetUp 0.6s var(--spring) both; }
@keyframes sheetUp { from { opacity: 0; transform: translateY(40px) scale(0.97); } to { opacity: 1; transform: none; } }

/* KI schreibt: Apple-Intelligence-Leuchten */
.ai-glow {
  position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 2; border-radius: 28px; pointer-events: none;
  background: conic-gradient(from 0deg, #0A84FF, #BF5AF2, #FF375F, #FF9F0A, #30D158, #0A84FF);
  filter: blur(22px); opacity: 0; transform: scale(0.96);
  transition: opacity 0.5s ease, transform 0.6s var(--spring);
}
.chatpane.thinking .ai-glow { opacity: 0.75; transform: scale(1.02); animation: glowHue 4s linear infinite; }
@keyframes glowHue { to { filter: blur(22px) hue-rotate(360deg); } }
@property --ring { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.composer.thinking { overflow: visible; }
.composer.thinking::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 2px; pointer-events: none;
  background: conic-gradient(from var(--ring), #0A84FF, #BF5AF2, #FF375F, #FF9F0A, #30D158, #0A84FF);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: ringSpin 3s linear infinite;
}
@keyframes ringSpin { to { --ring: 360deg; } }
.shimmer {
  background: linear-gradient(90deg, var(--label-2) 0%, var(--label-2) 35%, var(--label) 50%, var(--label-2) 65%, var(--label-2) 100%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 1.8s linear infinite; font-weight: 600;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.sparkle-spin svg { animation: sparkle 2.4s var(--spring) infinite; }
@keyframes sparkle { 0%, 100% { transform: rotate(0) scale(1); } 50% { transform: rotate(90deg) scale(1.2); } }

@media (max-width: 820px) {
  .ai-glow { left: 8px; right: 8px; bottom: calc(8px + var(--safe-b)); border-radius: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}


/* ============================================================ Stabil & flüssig */
.chat-dim { display: none; }
@media (max-width: 820px) { .chat-dim { display: block; } }
.no-trans, .no-trans * { transition: none !important; }
.chatpane, .tab-lens { will-change: transform; }
.spinner.sm { width: 11px; height: 11px; border-width: 1.5px; }

/* Desktop: Chat-Wechsel blendet weich über */
.swap { animation: swapIn 0.4s var(--spring) both; }
.empty.swap { animation: fadeIn 0.3s ease both; }

/* KI-Leuchten neu: nur Deckkraft und Bewegung, nichts muss neu gezeichnet werden */
.ai-glow { background: none; filter: none; opacity: 0; transform: none; transition: opacity 0.6s ease; animation: none !important; }
.ai-glow i { position: absolute; inset: -4px; border-radius: 34px; filter: blur(20px); will-change: transform, opacity; }
.ai-glow i:nth-child(1) { background: linear-gradient(100deg, #0A84FF, #BF5AF2 45%, #FF375F); }
.ai-glow i:nth-child(2) { background: linear-gradient(100deg, #FF9F0A, #30D158 50%, #0A84FF); opacity: 0; }
.chatpane.thinking .ai-glow { opacity: 0.8; transform: none; }
.chatpane.thinking .ai-glow i:nth-child(1) { animation: glowA 2.6s ease-in-out infinite alternate; }
.chatpane.thinking .ai-glow i:nth-child(2) { animation: glowB 2.6s ease-in-out infinite alternate; }
@keyframes glowA { from { transform: translateX(-3%) scale(1); opacity: 1; } to { transform: translateX(3%) scale(1.04, 1.08); opacity: 0.25; } }
@keyframes glowB { from { transform: translateX(3%) scale(1.04, 1.08); opacity: 0.2; } to { transform: translateX(-3%) scale(1); opacity: 1; } }
.composer.thinking::before {
  background: linear-gradient(100deg, #0A84FF, #BF5AF2, #FF375F, #FF9F0A, #30D158);
  animation: ringPulse 1.6s ease-in-out infinite alternate;
}
@keyframes ringPulse { from { opacity: 0.45; } to { opacity: 1; } }
.pulse-text { font-weight: 600; animation: textPulse 1.3s ease-in-out infinite alternate; }
@keyframes textPulse { from { opacity: 0.45; } to { opacity: 1; } }
.sparkle-spin svg { will-change: transform; }
.bar > i { width: 100%; transform-origin: left center; }

/* Startbildschirm */
#splash {
  position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: var(--bg-grouped);
}
#splash[hidden] { display: none; }
.splash-icon {
  width: 96px; height: 96px; border-radius: 26px; display: grid; place-items: center; position: relative;
  background: linear-gradient(160deg, #2F8BFF 0%, #0066DB 55%, #0052B4 100%);
  box-shadow: 0 18px 40px rgba(0, 102, 219, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  animation: splashIcon 0.8s var(--spring-bounce) both;
}
.splash-icon svg { width: 50px; height: 50px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.splash-icon::after {
  content: ""; position: absolute; inset: -18px; border-radius: 40px; z-index: -1; filter: blur(22px); opacity: 0.55;
  background: linear-gradient(100deg, #0A84FF, #BF5AF2, #FF375F, #FF9F0A, #30D158);
  animation: splashGlow 1.4s ease-in-out infinite alternate;
}
.splash-name { font-size: 22px; font-weight: 700; letter-spacing: 0.2px; animation: splashName 0.7s var(--spring) 0.18s both; }
.splash-sub { font-size: 15px; color: var(--label-2); margin-top: -12px; animation: splashName 0.7s var(--spring) 0.28s both; }
@keyframes splashIcon { from { opacity: 0; transform: scale(0.55); } to { opacity: 1; transform: none; } }
@keyframes splashGlow { from { opacity: 0.3; transform: scale(0.92); } to { opacity: 0.7; transform: scale(1.05); } }
@keyframes splashName { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
#splash.out { animation: splashOut 0.5s var(--ease-ios) both; pointer-events: none; }
#splash.out .splash-icon { animation: splashZoom 0.5s var(--ease-ios) both; }
@keyframes splashOut { to { opacity: 0; } }
@keyframes splashZoom { from { transform: none; } to { transform: scale(1.6); opacity: 0; } }


/* ============================================================ Runde 3: ruhiger, glasiger, FahrOS */
/* Scrollbalken wie in iOS-Apps ausblenden */
@media (max-width: 820px) {
  .chatlist, .page, .messages, .composer { scrollbar-width: none; }
  .chatlist::-webkit-scrollbar, .page::-webkit-scrollbar, .messages::-webkit-scrollbar, .composer::-webkit-scrollbar { display: none; }
}

/* Liquid Glass: durchsichtiger, mit Lichtkante und innerem Glanz */
:root {
  --glass-bg: rgba(255, 255, 255, 0.52);
  --glass-filter: blur(26px) saturate(190%) brightness(1.04);
  --rim: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.25) 30%, rgba(255, 255, 255, 0) 55%, rgba(255, 255, 255, 0.45) 100%);
  --glass-inner: inset 0 1px 1px rgba(255, 255, 255, 0.7), inset 0 -1px 1px rgba(255, 255, 255, 0.2);
}
@media (prefers-color-scheme: dark) {
  :root {
    --glass-bg: rgba(38, 38, 42, 0.46);
    --glass-filter: blur(26px) saturate(180%) brightness(0.92);
    --rim: linear-gradient(135deg, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0.08) 30%, rgba(255, 255, 255, 0) 55%, rgba(255, 255, 255, 0.18) 100%);
    --glass-inner: inset 0 1px 1px rgba(255, 255, 255, 0.14), inset 0 -1px 1px rgba(255, 255, 255, 0.04);
  }
}
.glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter);
  border: 0; box-shadow: var(--glass-inner), var(--glass-shadow);
  position: relative;
}
.composer.glass { position: absolute; }
.glass::after { content: none; }
.icon-btn.glass { background: var(--glass-bg); border: 0; }

@media (max-width: 820px) {
  .tabs {
    background: var(--glass-bg); -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter);
    border: 0; box-shadow: var(--glass-inner), var(--glass-shadow);
  }
  .tabs::after { content: none; }
}

/* Tab-Linse: Position nur per transform (läuft auf der Grafikkarte), Wackeln im Inneren */
.tab-lens {
  translate: none; transform: translate3d(var(--x, 0), var(--y, 0), 0);
  background: none; box-shadow: none; scale: none;
  transition: transform 0.55s var(--spring), opacity 0.2s;
}
.tab-lens.moving { scale: none; }
.tab-lens .lens-body { position: absolute; inset: 0; border-radius: inherit; background: var(--accent-tint); }
.tab-lens.jelly .lens-body { animation: jelly 0.6s var(--spring) both; }
@keyframes jelly {
  0% { transform: scale(1, 1); }
  30% { transform: scale(1.22, 0.86); }
  60% { transform: scale(0.96, 1.05); }
  100% { transform: scale(1, 1); }
}
.tabs a svg { transition: transform 0.45s var(--spring-bounce); scale: none; }
.tabs a:active svg { scale: none; transform: scale(0.82); transition-duration: 0.1s; }
.tabs a.bounce svg { animation: iconBounce2 0.55s var(--spring-bounce); }
@keyframes iconBounce2 { 0% { transform: scale(0.72); } 100% { transform: scale(1); } }
@media (max-width: 820px) {
  .tab-lens .lens-body {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.18)), var(--accent-tint);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.85), inset 0 -1px 2px rgba(0, 0, 0, 0.05), 0 4px 14px rgba(0, 0, 0, 0.10);
  }
}
@media (max-width: 820px) and (prefers-color-scheme: dark) {
  .tab-lens .lens-body {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05)), var(--accent-tint);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3), 0 4px 14px rgba(0, 0, 0, 0.35);
  }
}

/* Segment-Daumen ebenfalls nur per transform */
.seg-thumb { translate: none; transform: translate3d(calc(var(--i, 0) * 100%), 0, 0); transition: transform 0.5s var(--spring); }
.chip:active { scale: none; transform: scale(0.95); }

/* Startbild mit echtem Icon */
.splash-icon { background: none; box-shadow: 0 18px 40px rgba(0, 70, 168, 0.35); overflow: visible; }
.splash-icon img { width: 100%; height: 100%; border-radius: 26px; display: block; }
.logo { background: none; overflow: hidden; }
.logo img { width: 100%; height: 100%; display: block; }

/* Verbinden-Seite */
.verbinden { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 24px; }
.verbinden .qr { width: min(280px, 100%); aspect-ratio: 1; background: #fff; border-radius: 20px; padding: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08); }
.verbinden .qr svg { width: 100%; height: 100%; display: block; }
.verbinden .steps { margin: 0; padding-left: 22px; font-size: 15px; line-height: 24px; align-self: stretch; }
.ok-state { display: flex; gap: 12px; align-items: center; align-self: stretch; }
.ok-state svg { width: 40px; height: 40px; fill: none; stroke: var(--green); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.wissen-filter { display: grid; gap: 10px; margin: 4px 0 14px; }
.wissen-tabs { display: flex; gap: 8px; flex-wrap: wrap; }

/* Sprachnachrichten als Text */
.msg .transkript { font-size: 15px; line-height: 20px; font-style: italic; opacity: 0.85; margin: 2px 0 4px; }
.transk-btn { display: block; margin: 2px 0 4px; border: 0; background: rgba(127,127,127,.18); color: inherit; font: inherit; font-size: 13px; font-weight: 600; padding: 5px 10px; border-radius: 10px; cursor: pointer; }
.transk-btn:disabled { opacity: 0.6; }
a.pill { text-decoration: none; }
.help svg { width: 16px; height: 16px; vertical-align: -3px; fill: none; stroke: var(--green); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
