/* MILI-App, Design-Variante C (Neo-Brutalismus) - Tokens und Basiskomponenten.
   Quelle: docs/design/MILI_App_Design_Variante_C.pdf + Prompt Abschnitt 4.
   Farblogik strikt: Gelb = Aktion/Auswahl, Violett = MILI aktiv, Tuerkis = ein/OK,
   Koralle = Stopp/Fehler. Kein Dunkelmodus (Prompt 7). */

:root {
  --ink: #141414;
  --cream: #FBF3E6;
  --surface: #FFFFFF;
  --surface-tint: #FFF1D6;
  --line: #E9DDC8;
  --text-muted: #5E5A52;
  --text-faint: #9A9488;
  --yellow: #FFD43B;
  --violet: #8B6CF6;
  --teal: #3EC1B4;
  --coral: #FF6B5B;
  --teal-soft: #C9F0EA;
  --violet-soft: #E7DEFF;
  --coral-soft: #FFD9D3;

  --st-normal: #22B07D;
  --st-info: #5B7CFA;
  --st-warn: #F08A00;
  --st-warn-text: #B35C00;
  --st-warn-banner: #FFE08A;
  --st-error: #FF6B5B;
  --st-critical: #E63946;
  --live: #E63946;

  --b: 2.5px solid var(--ink);
  --b2: 2px solid var(--ink);
  --sh-card: 4px 4px 0 var(--ink);
  --sh-stage: 5px 5px 0 var(--ink);
  --sh-tile: 3px 3px 0 var(--ink);
  --sh-chip: 2px 2px 0 var(--ink);

  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", "DejaVu Sans Mono", ui-monospace, Menlo, Consolas, monospace;
  --rand: 20px;
  --tabbar-h: 66px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
a { color: inherit; }

/* ---------- Typografie ---------------------------------------------------- */
.t-hello { font-size: 34px; font-weight: 700; line-height: 1.12; margin: 0; letter-spacing: -0.5px; }
.t-title { font-size: 26px; font-weight: 700; line-height: 1.2; margin: 0; }
.t-section { font-size: 19px; font-weight: 700; margin: 0; }
.t-body { font-size: 15px; font-weight: 400; }
.t-sec { font-size: 13.5px; color: var(--text-muted); }
.t-meta { font-size: 12px; color: var(--text-muted); }
.t-faint { color: var(--text-faint); }
.t-label { font-size: 13px; font-weight: 600; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.accent-name { color: var(--coral); }

/* ---------- Seitenrahmen ---------------------------------------------------- */
.app { max-width: 430px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; position: relative; }
.screen { padding: calc(env(safe-area-inset-top) + 14px) var(--rand) calc(var(--tabbar-h) + 48px + env(safe-area-inset-bottom)); }
.screen.no-tabs { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
.stack > * + * { margin-top: 12px; }
.stack-16 > * + * { margin-top: 16px; }
.stack-20 > * + * { margin-top: 20px; }
.row-flex { display: flex; align-items: center; gap: 8px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Kopfzeile mit Zurueck (Unterseiten) */
.topbar { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; min-height: 48px; margin-bottom: 12px; }
.topbar h1 { font-size: 17px; font-weight: 700; text-align: center; margin: 0; }
.topbar .right { justify-self: end; }

/* ---------- Karten, Buehne, Kacheln -------------------------------------- */
.card { background: var(--surface); border: var(--b); border-radius: 16px; box-shadow: var(--sh-card); padding: 16px; }
.card.flat { box-shadow: none; }
.card.pad-0 { padding: 0; }
.stage { background: var(--yellow); border: var(--b); border-radius: 20px; box-shadow: var(--sh-stage); position: relative; overflow: hidden; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tile { border: var(--b); border-radius: 16px; box-shadow: var(--sh-tile); padding: 12px; min-height: 104px; display: flex; flex-direction: column; justify-content: flex-end; position: relative; text-align: left; }
.tile .val { font-size: 18px; font-weight: 700; line-height: 1.2; }
.tile .lab { font-size: 12px; color: var(--ink); }
.tile .ico { position: absolute; top: 12px; left: 12px; }
.bg-teal { background: var(--teal-soft); } .bg-violet { background: var(--violet-soft); } .bg-coral { background: var(--coral-soft); }
.bg-tint { background: var(--surface-tint); }

/* ---------- Buttons ------------------------------------------------------- */
.btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 56px; padding: 0 18px;
  border: var(--b); border-radius: 14px; box-shadow: var(--sh-card); font-size: 16px; font-weight: 600; background: var(--surface);
  transition: transform .06s, box-shadow .06s; text-decoration: none; }
.btn:active:not(:disabled) { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--yellow); }
.btn.accent { background: var(--violet); }
.btn.secondary { background: var(--surface); }
.btn.stop { background: var(--coral); }
.btn.ghost { background: none; border: none; box-shadow: none; text-decoration: underline; text-underline-offset: 4px; min-height: 44px; }
.btn.sm { min-height: 44px; border-radius: 12px; box-shadow: var(--sh-tile); font-size: 14px; padding: 0 12px; }
.btn.sm:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.btn-row > * { min-width: 0; }
.btn-row.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

.iconbtn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface);
  border: var(--b2); border-radius: 12px; box-shadow: var(--sh-chip); position: relative; flex: none; }
.iconbtn:active { transform: translate(2px, 2px); box-shadow: none; }
.iconbtn.round { border-radius: 999px; }
.iconbtn .badge-dot { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; border-radius: 999px; background: var(--coral);
  border: var(--b2); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 4px; }

/* ---------- Chips, Badges ------------------------------------------------- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; background: var(--surface); border: var(--b2); border-radius: 999px;
  box-shadow: var(--sh-chip); font-size: 13px; font-weight: 600; white-space: nowrap; }
.chip.lg { border-radius: 14px; box-shadow: var(--sh-tile); padding: 9px 8px; justify-content: center; min-width: 0; overflow: hidden; }
.chip.flat { box-shadow: none; }
.chip.on { background: var(--yellow); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 999px; border: 1.5px solid var(--ink); flex: none; display: inline-block; }
.dot.live { background: var(--live); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700;
  background: var(--ink); color: var(--cream); letter-spacing: .3px; }
.badge.demo { background: var(--ink); color: var(--yellow); }
.badge.warn { background: var(--st-warn-banner); color: var(--st-warn-text); border: var(--b2); border-radius: 8px; padding: 3px 8px; }
.pill-warn { color: var(--st-warn-text); font-weight: 600; }

/* ---------- Listen -------------------------------------------------------- */
.list { background: var(--surface); border: var(--b); border-radius: 16px; box-shadow: var(--sh-card); overflow: hidden; }
.list > .row + .row { border-top: 2px solid var(--ink); }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 56px; width: 100%; background: none; border: none; text-align: left; }
button.row:active { background: var(--surface-tint); }
.row .ico { flex: none; width: 24px; display: flex; justify-content: center; }
.row .main { flex: 1; min-width: 0; }
.row .main .sub { font-size: 12px; color: var(--text-muted); }
.row .val { font-size: 14px; font-weight: 500; text-align: right; }
.group-title { font-size: 13px; font-weight: 700; margin: 18px 0 8px; }

/* ---------- Toggle, Segmented, Fortschritt, Regler ---------------------- */
.toggle { width: 54px; height: 32px; border: var(--b2); border-radius: 999px; background: var(--surface); position: relative; padding: 0; flex: none; }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 999px; background: var(--surface);
  border: var(--b2); transition: left .15s; }
.toggle.on { background: var(--teal); }
.toggle.on::after { left: 24px; }
.toggle:disabled { opacity: .45; }
.seg { display: flex; background: var(--surface); border: var(--b2); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { flex: 1; min-height: 40px; border: 2px solid transparent; border-radius: 8px; background: none; font-size: 14px; font-weight: 500; }
.seg button.on { background: var(--yellow); border-color: var(--ink); font-weight: 700; }
.progress { height: 12px; background: var(--surface); border: var(--b2); border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; background: var(--violet); border-right: var(--b2); transition: width .4s; }
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; }
.range::-webkit-slider-runnable-track { height: 4px; background: var(--ink); border-radius: 4px; }
.range::-moz-range-track { height: 4px; background: var(--ink); border-radius: 4px; }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 999px; background: var(--surface); border: var(--b2); margin-top: -11px; box-shadow: var(--sh-chip); }
.range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 999px; background: var(--surface); border: var(--b2); }

/* ---------- Statussymbole ------------------------------------------------- */
.status-ico { display: inline-flex; flex: none; }

/* ---------- Tab-Leiste ---------------------------------------------------- */
.tabbar { position: fixed; left: 50%; transform: translateX(-50%); width: min(402px, calc(100% - 28px));
  bottom: calc(22px + env(safe-area-inset-bottom)); height: var(--tabbar-h); background: var(--surface); border: var(--b); border-radius: 20px;
  box-shadow: var(--sh-card); display: grid; grid-template-columns: repeat(3, 1fr); z-index: 20; }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; font-size: 11px; color: var(--text-muted); }
.tabbar a .lab { padding: 1px 9px; border-radius: 999px; border: 1.5px solid transparent; }
.tabbar a.on { color: var(--ink); }
.tabbar a.on .lab { background: var(--yellow); border-color: var(--ink); font-weight: 700; }

/* ---------- Gespraech ----------------------------------------------------- */
.chat { display: flex; flex-direction: column; gap: 14px; }
/* Sprechblasen (Wunsch Cihan 05.10.): MILI gelb, wir tuerkis - jeweils mit Namen oben */
.msg-du, .msg-mili { max-width: 82%; border: var(--b2); box-shadow: var(--sh-chip); padding: 7px 14px 10px; font-size: 15px; }
.msg-du { align-self: flex-end; background: var(--teal); border-radius: 16px 16px 4px 16px; }
.msg-mili { align-self: flex-start; background: var(--yellow); border-radius: 16px 16px 16px 4px; }
.msg-du::before, .msg-mili::before { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .3px; margin-bottom: 2px; }
.msg-du::before { content: "Du"; }
.msg-mili::before { content: "MILI"; }
.msg-aktion { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-muted);
  border: 1.5px solid var(--line); border-radius: 10px; padding: 4px 10px; background: var(--surface-tint); }
.msg-system { align-self: center; font-size: 12px; color: var(--text-muted); }
.msg-zeit { align-self: center; font-size: 12px; color: var(--text-muted); }
.cursor { display: inline-block; width: 8px; height: 17px; background: var(--ink); vertical-align: -3px; margin-left: 2px; animation: blink 1s steps(2) infinite; }
.typing { color: var(--text-faint); }
.msg-mili.typing { color: var(--text-muted); }
.composer { position: fixed; left: 50%; transform: translateX(-50%); width: min(402px, calc(100% - 28px)); bottom: calc(22px + var(--tabbar-h) + 12px + env(safe-area-inset-bottom));
  display: flex; gap: 10px; align-items: center; z-index: 19; }
.composer input { flex: 1; min-height: 48px; border: var(--b2); border-radius: 14px; background: var(--surface); padding: 0 14px; font-size: 15px; outline: none; }
.composer input:focus { box-shadow: var(--sh-chip); }
.roundbtn { width: 48px; height: 48px; border-radius: 999px; border: var(--b2); display: flex; align-items: center; justify-content: center; flex: none; box-shadow: var(--sh-chip); }
.roundbtn.violet { background: var(--violet); }
.roundbtn.yellow { background: var(--yellow); }
.roundbtn:active { transform: translate(2px, 2px); box-shadow: none; }
.chat-head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1.5px solid var(--line); margin-bottom: 14px; }

/* ---------- Zuhoeren / Sprechen ------------------------------------------ */
.listen-ring { position: relative; width: 260px; height: 260px; margin: 8px auto 0; }
.listen-ring .dash { position: absolute; inset: 0; border: 2px dashed var(--ink); border-radius: 999px; }
.listen-ring .violet { position: absolute; inset: 22px; border-radius: 999px; background: var(--violet); border: var(--b); box-shadow: var(--sh-card); }
.listen-ring .white { position: absolute; inset: 44px; border-radius: 999px; background: var(--surface); border: var(--b); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.listen-ring.aktiv .violet { animation: puls 1.6s ease-in-out infinite; }
.wave { display: flex; align-items: center; justify-content: center; gap: 3px; height: 48px; }
.wave i { width: 3px; border-radius: 3px; background: var(--violet); height: 6px; }
.wave.aktiv i { animation: welle 1s ease-in-out infinite; }
.steps { display: flex; gap: 8px; }
.steps .chip { box-shadow: none; border-color: transparent; background: var(--surface-tint); font-weight: 500; }
.steps .chip.on { background: var(--violet); border-color: var(--ink); font-weight: 700; }
.player { display: flex; align-items: center; gap: 12px; }

/* ---------- Sehen, Diagnose ---------------------------------------------- */
.cam { position: relative; border-radius: 20px; overflow: hidden; background: #D8D2C6; aspect-ratio: 4 / 3.3; border: 1.5px solid var(--line); }
.cam img { width: 100%; height: 100%; object-fit: cover; }
.cam .over-bl { position: absolute; left: 10px; bottom: 10px; } .cam .over-br { position: absolute; right: 10px; bottom: 10px; }
.cam .over-tl { position: absolute; left: 10px; top: 10px; } .cam .over-tr { position: absolute; right: 10px; top: 10px; }
.cam .box { position: absolute; border: 2px solid #fff; border-radius: 6px; }
.cam .box span { position: absolute; top: -14px; left: 6px; background: #fff; border-radius: 8px; padding: 1px 8px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.cam .leer { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--text-muted); text-align: center; padding: 20px; }
.hotspots { position: relative; }
.hotspot { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 4px; }
.hotspot .pt { width: 18px; height: 18px; border-radius: 999px; border: 2px solid #fff; box-shadow: 0 0 0 1.5px var(--ink); }
.hotspot .nm { background: #fff; border-radius: 8px; padding: 1px 7px; font-size: 11.5px; font-weight: 600; box-shadow: 0 0 0 1.5px var(--line); white-space: nowrap; }
.dgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.dcard { background: var(--surface); border: var(--b); border-radius: 16px; box-shadow: var(--sh-tile); padding: 10px; min-height: 100px; position: relative; text-align: left; }
.dcard .st { position: absolute; top: 10px; right: 10px; }
.dcard .nm { font-weight: 600; font-size: 14px; margin-top: 8px; }
.dcard .vl { font-size: 12px; color: var(--text-muted); }
.banner-warn { display: flex; align-items: center; gap: 10px; background: var(--st-warn-banner); border-radius: 14px; padding: 12px 14px; width: 100%; border: none; text-align: left; }
.banner-err { display: flex; align-items: center; gap: 10px; background: var(--coral-soft); border-radius: 14px; padding: 12px 14px; width: 100%; border: none; text-align: left; }
.banner-info { display: flex; align-items: center; gap: 10px; background: var(--violet-soft); border-radius: 14px; padding: 12px 14px; width: 100%; border: none; text-align: left; }
.chart { width: 100%; height: 64px; display: block; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; }
.kv > :nth-child(odd) { color: var(--text-muted); }
.kv > :nth-child(even) { text-align: right; }
.techtable > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1.5px solid var(--line); }
.techtable > div > :first-child { color: var(--text-muted); }

/* Service-Modus */
.svc-head { background: var(--ink); color: var(--cream); margin: calc(-14px - env(safe-area-inset-top)) calc(-1 * var(--rand)) 14px; padding: calc(env(safe-area-inset-top) + 14px) var(--rand) 14px; display: flex; align-items: center; justify-content: space-between; }
.svc-head button { background: none; color: var(--cream); border: 1.5px solid var(--cream); border-radius: 999px; padding: 4px 12px; font-size: 13px; }
.pre { font-family: var(--mono); font-size: 12px; white-space: pre-wrap; word-break: break-word; line-height: 1.55; margin: 0; }
.log-warn { color: var(--st-warn-text); } .log-err { color: var(--st-critical); }

/* Fernsteuerung */
.joy { position: relative; width: 210px; height: 210px; margin: 0 auto; touch-action: none; }
.joy .base { position: absolute; inset: 14px; border-radius: 999px; background: var(--surface); border: var(--b); box-shadow: var(--sh-card); }
.joy .cross-h, .joy .cross-v { position: absolute; background: var(--line); }
.joy .cross-h { left: 30px; right: 30px; top: 50%; height: 1.5px; } .joy .cross-v { top: 30px; bottom: 30px; left: 50%; width: 1.5px; }
.joy .inner { position: absolute; inset: 62px; border-radius: 999px; border: 1.5px solid var(--line); }
.joy .knob { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 999px; background: var(--violet); border: var(--b); box-shadow: var(--sh-chip); }
.joy .knob::after { content: ""; position: absolute; inset: 10px; border-radius: 999px; border: 2px solid var(--ink); }
.joy svg { position: absolute; inset: 0; }
.vslider { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 64px; }
.vslider .track { position: relative; width: 16px; height: 120px; border: var(--b2); border-radius: 999px; background: var(--surface); touch-action: none; }
.vslider .fill { position: absolute; left: 0; right: 0; bottom: 0; background: var(--violet); border-radius: 999px; }
.vslider .grip { position: absolute; left: 50%; width: 34px; height: 30px; margin-left: -17px; background: var(--yellow); border: var(--b2); border-radius: 10px; box-shadow: var(--sh-chip); }
.hslider { position: relative; height: 34px; touch-action: none; }
.hslider .track { position: absolute; left: 0; right: 0; top: 50%; height: 12px; margin-top: -6px; border: var(--b2); border-radius: 999px; background: var(--surface); }
.hslider .fill { position: absolute; top: 50%; height: 12px; margin-top: -6px; background: var(--violet); }
.hslider .grip { position: absolute; top: 50%; width: 36px; height: 30px; margin: -15px 0 0 -18px; background: var(--yellow); border: var(--b2); border-radius: 10px; box-shadow: var(--sh-chip); }

/* Deko */
.deko { position: absolute; pointer-events: none; }

/* Toast */
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(110px + env(safe-area-inset-bottom)); background: var(--ink); color: var(--cream);
  border-radius: 12px; padding: 10px 16px; font-size: 13.5px; z-index: 50; max-width: calc(100% - 40px); box-shadow: 3px 3px 0 var(--yellow); }

/* DEMO-Kennzeichen (Prompt 2: Mock-Daten sichtbar markiert) */
.demo-flag { position: fixed; top: calc(env(safe-area-inset-top) + 6px); right: 8px; z-index: 40; }

/* Bottom-Sheet */
.sheet-bg { position: fixed; inset: 0; background: rgba(20, 20, 20, .35); z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--cream); border: var(--b); border-bottom: none; border-radius: 20px 20px 0 0; width: min(430px, 100%); padding: 20px var(--rand) calc(24px + env(safe-area-inset-bottom)); max-height: 85vh; overflow: auto; }

@keyframes blink { 50% { opacity: 0; } }
@keyframes leuchten { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
.mili-leuchten { animation: leuchten 2.4s ease-in-out infinite; }
@keyframes zzz { 0%, 100% { opacity: .35; transform: translateY(6px); } 50% { opacity: 1; transform: translateY(-4px); } }
.mili-zzz text { animation: zzz 2.6s ease-in-out infinite; transform-box: fill-box; }
@keyframes puls { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes welle { 0%, 100% { transform: scaleY(.5); } 50% { transform: scaleY(1.6); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Entwurf 4: Home mit Steuern | Messen, Sprechen ---------------------------- */
.buehne { position: relative; border: var(--b); border-radius: 20px; box-shadow: var(--sh-stage); padding: 12px; transition: height .25s, background-color .25s; overflow: hidden; }
.buehne.steuern { background: var(--yellow); }
.buehne.messen { background: var(--teal-soft); }
.buehne.sprechen { background: var(--violet); }
.buehne .seg { max-width: 300px; margin: 0 auto; position: relative; z-index: 3; }
.buehne .hinweis-unten { text-align: center; font-size: 13px; font-weight: 700; margin-top: 10px; }
.figurbox { position: relative; margin: 8px auto 0; }
.marke { position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; background: #fff; border: var(--b2);
  border-radius: 999px; box-shadow: var(--sh-chip); font-size: 12.5px; font-weight: 700; white-space: nowrap; transform: translate(-50%, -50%); }
.marke.warn { background: var(--st-warn-banner); }
.marke.an { background: var(--violet); }
.marke-linie { position: absolute; height: 2px; background: var(--ink); z-index: 2; transform-origin: 0 50%; pointer-events: none; }
.marke-punkt { position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 999px; border: 2px solid var(--ink); z-index: 3; pointer-events: none; }
.marke-ring { position: absolute; border: 2.5px dashed var(--violet); border-radius: 999px; z-index: 2; pointer-events: none; }
.statusleiste { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: #fff; border: var(--b); border-radius: 14px; box-shadow: var(--sh-tile); overflow: hidden; }
.statusleiste button { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; background: none; border: none; font-weight: 700; font-size: 14px; padding: 0 6px; }
.statusleiste button + button { border-left: 2px solid var(--ink); }
.sprechtaste { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 18px auto 0; padding: 0 30px; min-height: 54px;
  border: var(--b); border-radius: 999px; box-shadow: var(--sh-card); font-size: 16px; font-weight: 700; background: var(--violet); }
.sprechtaste.beenden { background: var(--coral); }
.sprechtaste:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.wave.dunkel i { background: var(--ink); }
.usheet-bg { position: fixed; inset: 0; z-index: 30; background: rgba(20, 20, 20, .08); }
.usheet { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: min(430px, 100%); max-height: 58vh; overflow: auto; background: #fff;
  border: var(--b); border-bottom: none; border-radius: 22px 22px 0 0; padding: 8px var(--rand) calc(24px + env(safe-area-inset-bottom)); box-shadow: 0 -3px 0 var(--ink); }
.usheet-griff { width: 44px; height: 5px; border-radius: 9px; background: var(--ink); margin: 2px auto 12px; }
.badge-gelb { display: inline-flex; align-items: center; gap: 5px; background: var(--yellow); border: var(--b2); border-radius: 8px; padding: 2px 9px; font-size: 12px; font-weight: 700; }
.wertgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.wertkarte { border: var(--b2); border-radius: 14px; padding: 10px 12px; background: #fff; }
.wertkarte .l { font-size: 12px; font-weight: 600; }
.wertkarte .w { font-size: 20px; font-weight: 700; line-height: 1.25; }
.wertkarte .s { font-size: 12px; color: var(--text-muted); }
.wertkarte.warn .w { color: var(--st-warn-text); }

.statusleiste button { white-space: nowrap; }
@media (max-width: 380px) {
  .statusleiste button { font-size: 13px; gap: 4px; }
  .statusleiste .badge { display: none; }
  .marke { font-size: 11.5px; padding: 3px 9px; }
}
