/* v1.7.4 */
/* Live-Übersetzer — Oberfläche
   Ein Blickfang: das Band. Alles andere tritt bewusst zurück.
   Dunkel ist der Standard, hell über [data-theme="light"].
   Markenfarbe Orange #F26422 (The Web Designer). */

:root {
  --accent: #F26422;
  --accent-2: #FF9356;
  --violet: #6B5CE7;

  --bg: #080B12;
  --bg-2: #0C111B;
  --line: rgba(255, 255, 255, .14);
  --panel: rgba(255, 255, 255, .05);
  /* Kontraste bewusst kräftig: gegen #080B12 liegt --text bei ~17:1 und --muted
     bei ~9:1 — die Nebentexte (Original, Fußzeile, Hinweise) waren vorher zu blass. */
  --text: #F4F7FB;
  --muted: #AEBCD0;
  --accent-grafik: #F26422;      /* Grafikfarbe je Schema, siehe [data-theme="light"] */
  --line-stark: rgba(255, 255, 255, .34);   /* Umriss von Bedienelementen (~3:1) */
  --warn: #FB7185;
  --accent-hell: #FF9356;   /* helles Ende des Knopf-Verlaufs, in BEIDEN Schemata gleich */
  --radius: 16px;
  --ff: "Segoe UI Variable Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --band-h: clamp(92px, 17vh, 150px);
  --band-scale: 1;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #F2F4F9;
  --bg-2: #FFFFFF;
  --line: rgba(16, 24, 40, .18);
  --panel: rgba(255, 255, 255, .85);
  --text: #0B111C;
  --muted: #3F4C63;
  /* Das helle Orange ist auf hellem Grund nicht lesbar (~2:1). Als TEXTFARBE
     deshalb ein dunkleres Orange (~4,8:1) — die Markenfarbe --accent bleibt für
     Flächen mit weißer Schrift unverändert. */
  --accent-2: #B03E0C;
  /* Grafik (Pegelring, Rahmen) braucht im Hellmodus dieselbe Abdunklung wie Schrift —
     das helle Orange lag auf der fast weißen Mikrofonfläche bei rund 2:1, und der
     Pegelring ist das einzige sichtbare „ich höre dich". */
  --accent-grafik: #C2410C;
  --line-stark: rgba(16, 24, 40, .45);
  --warn: #B4142F;
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* Autor-Regeln wie `.sheet { display: flex }` schlagen sonst die Browser-Vorgabe
   `[hidden] { display: none }` — die Dialoge stünden dauerhaft offen. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--ff);
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- Hintergrund (dezent) ---------- */
.aurora { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background: radial-gradient(120% 80% at 50% -20%, var(--bg-2), var(--bg) 60%); }
.blob { position: absolute; border-radius: 50%; filter: blur(110px); will-change: transform; }
.b1 { width: 46vmax; height: 46vmax; left: -16vmax; top: -14vmax; opacity: .28;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%); animation: drift1 34s ease-in-out infinite alternate; }
.b2 { width: 42vmax; height: 42vmax; right: -18vmax; bottom: -16vmax; opacity: .22;
  background: radial-gradient(circle, var(--violet) 0%, transparent 70%); animation: drift2 42s ease-in-out infinite alternate; }
[data-theme="light"] .blob { opacity: .16; }
@keyframes drift1 { to { transform: translate3d(7vmax, 6vmax, 0); } }
@keyframes drift2 { to { transform: translate3d(-6vmax, -7vmax, 0); } }

/* ---------- Kopfleiste ---------- */
.topbar {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: max(10px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
  max-width: 1000px; margin: 0 auto; width: 100%;
}
.brand { display: inline-flex; align-items: center; flex: 0 0 auto; }
/* Zwei Fassungen des Logos, je Farbschema eine. Die Auswahlregeln müssen mindestens
   so stark sein wie `.brand img` — sonst gewinnt dort das display:block und BEIDE
   Fassungen stehen nebeneinander. */
.brand img { height: 22px; width: auto; display: block; }
.brand .logo-light { display: none; }
[data-theme="light"] .brand .logo-light { display: block; }
[data-theme="light"] .brand .logo-dark { display: none; }

/* min-width: 0 muss auf JEDER Ebene der Flex-Kette stehen (.topbar-actions → .pill →
   #statusText), sonst bleibt das inhaltsbasierte Mindestmaß des nowrap-Textes stehen
   und die Leiste läuft über, statt zu kürzen. Am 2026-08-07 nachgemessen: ohne diese
   Zeile 495 px Bedarf in einem 431 px breiten Kasten — die Auslassungspunkte griffen nicht. */
.topbar-actions { display: flex; align-items: center; gap: 6px; min-width: 0; }

.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 11px; border-radius: 999px; font-size: .73rem; font-weight: 600;
  background: var(--panel); border: 1px solid var(--line); color: var(--muted); white-space: nowrap;
  min-width: 0;   /* darf schrumpfen, statt die Leiste über den Rand zu schieben */
}
/* Reißleine oberhalb des Bruchpunkts: Ein ungewöhnlich langer Zustandstext kürzt
   sich mit Auslassungspunkten, statt waagerechten Bildlauf zu erzwingen.
   min-width am Text SELBST — an .pill allein bliebe white-space: nowrap stärker. */
#statusText { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.pill[data-state="live"]  { color: #34D399; border-color: rgba(52, 211, 153, .32); }
[data-theme="light"] .pill[data-state="live"]  { color: #046C4E; border-color: rgba(4, 108, 78, .4); }
.pill[data-state="live"] .dot { animation: blink 1.6s ease-in-out infinite; }
.pill[data-state="work"]  { color: var(--accent-2); border-color: rgba(242, 100, 34, .32); }
.pill[data-state="error"] { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
@keyframes blink { 50% { opacity: .3; } }

.icon-btn {
  /* flex: 0 0 auto ist Pflicht — sonst würden die Knöpfe auf schmalen Handys
     zusammengestaucht, statt die Zustandsanzeige weichen zu lassen. */
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; flex: 0 0 auto;
  background: var(--panel); border: 1px solid var(--line); color: var(--muted);
  cursor: pointer; transition: color .18s, border-color .18s;
}
.icon-btn:hover { color: var(--accent-2); border-color: rgba(242, 100, 34, .38); }
.icon-btn.small { width: 28px; height: 28px; border-radius: 8px; }
.icon-btn .ico-sun { display: none; }
[data-theme="light"] .icon-btn .ico-sun { display: block; }
[data-theme="light"] .icon-btn .ico-moon { display: none; }

:where(button, select, input, a):focus-visible {
  outline: 2px solid var(--accent-2); outline-offset: 2px; border-radius: 8px;
}

/* ---------- Das Band ---------- */
.band {
  position: sticky; top: 0; z-index: 3;
  display: flex; align-items: stretch;
  height: var(--band-h); overflow: hidden;
  background: linear-gradient(180deg, #0A0E17, #0E1521);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  box-shadow: 0 14px 34px -26px rgba(0, 0, 0, .9);
}
[data-theme="light"] .band { background: linear-gradient(180deg, #FFFFFF, #EEF1F7); }

/* Kein Kennzeichen am linken Rand: Der durchlaufende Text setzte dort an und begann
   optisch mitten im Wort „LIVE" (Thomas 2026-08-06). Stattdessen an beiden Seiten eine
   weiche Blende, damit der Text sauber ein- und ausläuft. */
.band-view { position: relative; flex: 1 1 auto; overflow: hidden; display: flex; align-items: center; }
.band-view::before,
.band-view::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 60px; pointer-events: none; z-index: 1;
}
.band-view::before { left: 0; background: linear-gradient(270deg, transparent, #0A0E17); }
.band-view::after { right: 0; background: linear-gradient(90deg, transparent, #0E1521); }
[data-theme="light"] .band-view::before { background: linear-gradient(270deg, transparent, #FFFFFF); }
[data-theme="light"] .band-view::after { background: linear-gradient(90deg, transparent, #EEF1F7); }

.band-track { display: flex; align-items: center; white-space: nowrap; will-change: transform; }
.band-item {
  display: inline-flex; align-items: center; flex: 0 0 auto;
  font-size: calc(clamp(1.15rem, 3.1vw, 2rem) * var(--band-scale));
  font-weight: 600; letter-spacing: -.01em;
}
.band-item::after { content: "◆"; color: var(--accent); font-size: .42em; margin: 0 1.1em; opacity: .7; }

.band-hint {
  position: absolute; z-index: 2; left: 22px; right: 70px;
  color: var(--muted); font-size: .88rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.band-static { display: none; }

/* ---------- Inhalt ---------- */
.shell {
  position: relative; z-index: 1;
  max-width: 1000px; margin: 0 auto; width: 100%;
  padding: 22px max(16px, env(safe-area-inset-right)) 40px max(16px, env(safe-area-inset-left));
  display: flex; flex-direction: column; gap: 22px;
}

.control { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.mic {
  position: relative; width: 92px; height: 92px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel); color: var(--text);
  display: grid; place-items: center; transition: transform .18s, box-shadow .3s, background .3s;
}
.mic:active { transform: scale(.96); }
.mic-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); pointer-events: none; }
.ring-bg { fill: none; stroke: var(--line-stark); stroke-width: 4; }
.ring-lv {
  fill: none; stroke: var(--accent-grafik); stroke-width: 4; stroke-linecap: round;
  stroke-dasharray: 339.3; stroke-dashoffset: 339.3; transition: stroke-dashoffset .09s linear;
}
.mic-glyph { display: grid; place-items: center; color: var(--muted); }
.mic-stop { display: none; width: 24px; height: 24px; border-radius: 6px; background: #fff; }
body.is-live .mic { background: linear-gradient(140deg, var(--accent), #C0341A); border-color: transparent; box-shadow: 0 12px 34px -14px var(--accent); }
body.is-live .mic-glyph { display: none; }
body.is-live .mic-stop { display: block; }
.mic-hint { font-size: .8rem; color: var(--muted); }
.meta { display: flex; align-items: center; gap: 12px; font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
/* Sprachrichtung umdrehen — im Gespräch der meistgebrauchte Handgriff, deshalb
   direkt unter dem Mikrofon statt versteckt im Einstellungsblatt. */
.swap {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  padding: 5px 11px; border-radius: 999px; font: inherit; color: var(--muted);
  background: var(--panel); border: 1px solid var(--line);
  transition: color .18s, border-color .18s;
}
.swap:hover { color: var(--accent-2); border-color: rgba(242, 100, 34, .38); }
.swap svg { flex: 0 0 auto; opacity: .8; }
body.swapped .swap { color: var(--accent-2); border-color: rgba(242, 100, 34, .45); }

/* Installations-Hinweis — bewusst ruhig, kein zweiter Blickfang */
.install-card {
  border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius);
  padding: 12px 14px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.install-text { display: flex; flex-direction: column; gap: 2px; flex: 1 1 220px; min-width: 0; }
.install-text strong { font-size: .88rem; font-weight: 600; }
.install-text span { font-size: .76rem; color: var(--muted); line-height: 1.4; }
.install-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }

.ghost-btn {
  padding: 7px 13px; border-radius: 999px; font-size: .76rem; font-weight: 600; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line); color: var(--text);
  transition: color .18s, border-color .18s;
}
.ghost-btn:hover { border-color: rgba(242, 100, 34, .4); color: var(--accent-2); }
.ghost-btn.danger:hover { border-color: color-mix(in srgb, var(--warn) 45%, transparent); color: var(--warn); }
/* Verlauf bewusst gegen --accent-hell statt --accent-2: Im Hellmodus ist --accent-2
   dunkel, und der dunkle Text darauf käme nur auf 3:1. So tragen beide Enden in
   beiden Farbschemata (5,7:1 und 8,2:1, nachgerechnet). */
.ghost-btn.accent { background: linear-gradient(135deg, var(--accent), var(--accent-hell)); border-color: transparent; color: #2A0E03; font-weight: 700; }
.ghost-btn.accent:hover { filter: brightness(1.06); color: #2A0E03; }
.ghost-btn.wide { width: 100%; padding: 11px; font-size: .85rem; }

/* ---------- Verlauf ---------- */
.history-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.history-head h2 { font-size: .68rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.history-tools { display: flex; gap: 6px; }
.history { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.history:empty::after {
  content: "Noch nichts abgeschlossen. Sobald Sie eine Sprechpause machen, sammeln sich hier die fertigen Sätze.";
  display: block; padding: 22px; text-align: center; color: var(--muted); font-size: .84rem;
  border: 1px dashed var(--line); border-radius: var(--radius);
}
.history li {
  border-radius: 14px; padding: 12px 15px; background: var(--panel); border: 1px solid var(--line);
  animation: pop .35s cubic-bezier(.2,.9,.3,1.1);
}
.history .t { font-size: 1rem; line-height: 1.5; font-weight: 500; }
.history .s { font-size: .82rem; color: var(--muted); margin-top: 5px; line-height: 1.45; }
body.hide-src .history .s { display: none; }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } }

/* ---------- Fuß ---------- */
.site-foot {
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  font-size: .74rem; color: var(--muted); padding-top: 8px; border-top: 1px solid var(--line);
}
.site-foot a { color: var(--muted); text-decoration: none; border-bottom: 1px solid transparent; }
.site-foot a:hover { color: var(--accent-2); border-bottom-color: currentColor; }
.site-foot .budget { flex-basis: 100%; text-align: center; }

/* ---------- Blätter und Dialoge ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(4, 7, 13, .62); animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
/* Aufbau bewusst schlicht: Kopfzeile steht fest, nur der Inhalt darunter rollt.
   Eine „klebende" Kopfzeile mit negativen Rändern hatte auf dem iPhone eine große
   Lücke erzeugt und die erste Einstellung darunter geschoben (Thomas 2026-08-06). */
.sheet {
  position: fixed; z-index: 41; right: 0; top: 0; bottom: 0; width: min(380px, 94vw);
  padding: 0; overflow: hidden;
  display: flex; flex-direction: column; border-radius: 20px 0 0 20px;
  background: var(--bg-2); border-left: 1px solid var(--line);
  box-shadow: -20px 0 50px -30px rgba(0, 0, 0, .8);
  animation: slide .26s cubic-bezier(.2,.9,.3,1);
}
@keyframes slide { from { transform: translateX(20px); opacity: 0; } }

.sheet-head {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  /* Der Geräterand oben MUSS mitgerechnet werden, sonst liegt das Schließkreuz
     auf dem iPhone hinter der Statusleiste. */
  padding: max(16px, calc(env(safe-area-inset-top) + 12px)) 16px 14px 20px;
  border-bottom: 1px solid var(--line);
}
.sheet-head h2 { font-size: 1.06rem; font-weight: 700; letter-spacing: -.01em; }
.sheet-head .icon-btn { width: 40px; height: 40px; flex: 0 0 auto; }

.sheet-body {
  flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: 18px 20px calc(20px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 18px;
}

/* Einstellungen in Gruppen — das gliedert die Liste, statt sie durchlaufen zu lassen. */
.opt-group {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: 14px; background: var(--panel);
  overflow: hidden;
}
.opt-group .field { padding: 13px 14px; }
.opt-group .field + .field { border-top: 1px solid var(--line); }

.field { display: flex; flex-direction: column; gap: 9px; font-size: .8rem; color: var(--muted); font-weight: 600; }
.field.row { flex-direction: row; align-items: center; justify-content: space-between; gap: 14px; }
.field > span { line-height: 1.3; }

.field select {
  width: 100%; padding: 11px 38px 11px 12px; border-radius: 10px; font-size: .95rem;
  font-family: inherit; font-weight: 500; color: var(--text);
  background: var(--bg-2); border: 1px solid var(--line-stark);
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238A97AB' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; background-size: 17px;
}
.field input[type="range"] {
  width: 100%; padding: 0; accent-color: var(--accent); height: 26px; background: none; border: none;
}

/* Eigener Schalter statt des Systemkästchens — das sah auf dem iPhone wie ein
   fremdes Bauteil aus und passte zu nichts anderem in der Oberfläche. */
.switch { position: relative; width: 48px; height: 29px; flex: 0 0 auto; display: block; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.switch i {
  position: absolute; inset: 0; border-radius: 999px; pointer-events: none;
  background: var(--panel); border: 1px solid var(--line-stark); transition: background .2s, border-color .2s;
}
[data-theme="light"] .switch i { background: rgba(16, 24, 40, .1); }
.switch i::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%;
  background: var(--muted); transition: transform .2s cubic-bezier(.2,.9,.3,1.1), background .2s;
}
.switch input:checked + i { background: var(--accent); border-color: transparent; }
.switch input:checked + i::after { transform: translateX(19px); background: #fff; }
.switch input:focus-visible + i { outline: 2px solid var(--accent-2); outline-offset: 2px; }

.sheet-foot { margin-top: auto; padding-top: 6px; display: flex; flex-direction: column; gap: 12px; }
.ver { font-size: .74rem; color: var(--muted); text-align: center; }
.ver a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line); }
.ver a:hover { color: var(--accent-2); }

.helpbox {
  position: fixed; z-index: 42; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(430px, 92vw); max-height: 80dvh; overflow-y: auto; overscroll-behavior: contain; border-radius: 18px; padding: 20px;
  display: flex; flex-direction: column; gap: 12px;
  background: var(--bg-2); border: 1px solid var(--line);
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .9);
}
/* ---------- Rundgang ----------
   Der „Scheinwerfer" entsteht über einen riesigen Schlagschatten am Ring: Alles außerhalb
   liegt im Dunkeln, das hervorgehobene Element bleibt frei. Das kommt ohne Eingriff in die
   Stapelreihenfolge der Seite aus — ein hochgezogenes z-index am Zielelement würde in den
   verschachtelten Bereichen (Band, Verlauf) sonst nicht durchgreifen. */
.tour-ring {
  position: fixed; z-index: 60; pointer-events: none; border-radius: 14px;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 9999px rgba(4, 7, 13, .74), 0 0 0 5px rgba(242, 100, 34, .22);
  /* BEWUSST ohne Übergang auf Position und Größe: Wird der Ring zwischendurch
     ausgeblendet (Willkommens-Karte), bleibt ein laufender Übergang hängen und der
     Scheinwerfer wird an der ALTEN Stelle gezeichnet, obwohl der Stil längst die neue
     trägt — am 2026-08-06 im Browser nachgestellt. Nur die Deckkraft blendet weich ein. */
  animation: ringAuf .2s ease-out;
}
@keyframes ringAuf { from { opacity: 0; } }
.tour-blase {
  position: fixed; z-index: 61; width: min(360px, calc(100vw - 32px));
  /* Ohne Hoehendeckel liefe die Karte auf einem kleinen Bildschirm ueber und die
     Knoepfe waeren nicht erreichbar — Sackgasse beim allerersten Oeffnen. */
  max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain;
  border-radius: 16px; padding: 16px 18px 14px;
  display: flex; flex-direction: column; gap: 8px;
  background: var(--bg-2); border: 1px solid var(--line);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .9);
  animation: blaseAuf .26s cubic-bezier(.2,.9,.3,1.05);
}
@keyframes blaseAuf { from { opacity: 0; transform: translateY(8px); } }
/* Die mittig verankerte Willkommens-Karte darf NICHT ueber transform animiert werden —
   der Keyframe ueberschreibt sonst das translate(-50%,-50%) und sie springt beim
   Erscheinen aus dem Bild. */
@keyframes blaseAufMitte { from { opacity: 0; } }
.tour-blase.willkommen { animation-name: blaseAufMitte; }
.tour-punkte { display: flex; gap: 5px; }
.tour-punkte i { width: 20px; height: 3px; border-radius: 2px; background: var(--line); transition: background .25s; }
.tour-punkte i.an { background: var(--accent); }
.tour-blase h2 { font-size: 1.02rem; font-weight: 700; letter-spacing: -.01em; }
.tour-blase p { font-size: .89rem; line-height: 1.55; color: var(--text); }
.tour-fuss { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 6px; }
.tour-fuss .ghost-btn { padding: 9px 18px; font-size: .84rem; min-height: 44px; }

/* Erste Karte: Vorstellung statt Scheinwerfer — hier gibt es noch kein Element zu zeigen.
   Die Abdunklung kommt deshalb über denselben Riesenschatten wie sonst am Ring. */
.tour-blase.willkommen {
  width: min(420px, calc(100vw - 32px)); padding: 22px 22px 16px; max-height: 88dvh; overflow-y: auto;
  box-shadow: 0 0 0 9999px rgba(4, 7, 13, .74), 0 24px 60px -24px rgba(0, 0, 0, .9);
}
.tour-blase.willkommen h2 { font-size: 1.3rem; }
.tour-logo { display: block; margin-bottom: 4px; }
.tour-logo img { height: 24px; width: auto; display: block; }
.tour-logo .logo-light { display: none; }
[data-theme="light"] .tour-logo .logo-light { display: block; }
[data-theme="light"] .tour-logo .logo-dark { display: none; }
.tour-koennen { list-style: none; display: flex; flex-direction: column; gap: 8px; margin: 4px 0 2px; }
.tour-koennen li {
  position: relative; padding-left: 24px; font-size: .89rem; line-height: 1.5; color: var(--text);
}
.tour-koennen li::before {
  content: ""; position: absolute; left: 4px; top: .52em; width: 8px; height: 8px;
  border-radius: 50%; background: var(--accent);
}
.tour-koennen strong { color: var(--accent-2); font-weight: 700; }
.tour-koennen a { color: var(--accent-2); text-decoration: none; border-bottom: 1px solid currentColor; }
.tour-werbung {
  margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line);
  font-size: .82rem; line-height: 1.5; color: var(--muted);
}
.tour-werbung a { color: var(--accent-2); font-weight: 600; text-decoration: none; border-bottom: 1px solid currentColor; }
@media (prefers-reduced-motion: reduce) {
  .tour-blase { animation: none; }
}

.helpbox h2 { font-size: 1.02rem; }
.helpbox p { font-size: .9rem; line-height: 1.6; color: var(--text); }
.helpbox ol { font-size: .88rem; line-height: 1.7; padding-left: 20px; }
.helpbox strong { color: var(--accent-2); }

/* ---------- Weitergeben ---------- */
.sharebox {
  position: fixed; z-index: 42; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(430px, 92vw); max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain;
  border-radius: 18px; padding: 18px 20px 20px;
  display: flex; flex-direction: column; gap: 14px;
  background: var(--bg-2); border: 1px solid var(--line);
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .9);
  /* NUR die Deckkraft aufblenden (blaseAufMitte), nicht blaseAuf: Dessen Keyframe
     setzt `transform` und überschreibt damit das translate(-50%,-50%) — die Karte
     rutscht dann während des Einblendens aus der Mitte und unten aus dem Bild.
     Am 2026-08-07 im Browser nachgemessen: top 414 statt 165 bei 812 px Höhe. */
  animation: blaseAufMitte .24s ease-out;
}
.share-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.share-head h2 { font-size: 1.06rem; font-weight: 700; letter-spacing: -.01em; }
.share-head .icon-btn { width: 40px; height: 40px; flex: 0 0 auto; }
.share-sub { font-size: .86rem; line-height: 1.55; color: var(--muted); margin-top: -6px; }

.share-link { display: flex; gap: 8px; }
.share-link input {
  flex: 1 1 auto; min-width: 0; padding: 10px 12px; border-radius: 10px;
  background: var(--panel); border: 1px solid var(--line); color: var(--text);
  font-size: .82rem; font-family: inherit; text-overflow: ellipsis;
}
.share-link .ghost-btn { flex: 0 0 auto; min-height: 44px; }

.share-net { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kanal {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 12px 4px 10px; border-radius: 12px; text-decoration: none;
  background: var(--panel); border: 1px solid var(--line);
  color: var(--text); font-size: .74rem; font-weight: 600; text-align: center;
  transition: border-color .18s, transform .12s;
}
.kanal:hover { border-color: rgba(242, 100, 34, .4); transform: translateY(-1px); }
.kanal-kreis {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--kanal); color: #fff;
}
.kanal.wa   { --kanal: #1FA855; }
.kanal.tg   { --kanal: #229ED9; }
.kanal.mail { --kanal: #B4530F; }
.kanal.li   { --kanal: #0A66C2; }
.kanal.fb   { --kanal: #1877F2; }
/* X hat kein farbiges Zeichen — der Kreis dreht sich mit dem Farbschema um,
   sonst steht Schwarz auf Dunkel bzw. Weiß auf Hell und man sieht nichts. */
.kanal.x { --kanal: #E7E9EA; }
.kanal.x .kanal-kreis { color: #0F1419; }
[data-theme="light"] .kanal.x { --kanal: #0F1419; }
[data-theme="light"] .kanal.x .kanal-kreis { color: #fff; }

@media (max-width: 380px) {
  .share-net { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Kurzvorstellung unter dem Verlauf ---------- */
.info { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }
.info h2 { font-size: .95rem; font-weight: 700; color: var(--accent-2); margin-bottom: 12px; }
.info-liste { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.info-liste li { position: relative; padding-left: 22px; font-size: .88rem; line-height: 1.55; color: var(--text); }
.info-liste li::before {
  content: ""; position: absolute; left: 3px; top: .55em; width: 7px; height: 7px;
  border-radius: 50%; background: var(--accent);
}
.info-liste strong { color: var(--accent-2); font-weight: 700; }
.info-liste a, .info-werbung a { color: var(--accent-2); text-decoration: none; border-bottom: 1px solid currentColor; }
.info-werbung { margin-top: 14px; font-size: .84rem; line-height: 1.6; color: var(--muted); }

/* ---------- Rechtstexte ---------- */
.legal { max-width: 780px; margin: 0 auto; padding: 26px max(18px, env(safe-area-inset-left)) 60px; position: relative; z-index: 1; }
.legal h1 { font-size: 1.6rem; margin-bottom: 18px; letter-spacing: -.02em; }
.legal h2 { font-size: 1rem; margin: 26px 0 8px; color: var(--accent-2); }
.legal p, .legal li { font-size: .95rem; line-height: 1.7; color: var(--text); }
.legal ul { padding-left: 20px; margin: 8px 0; }
.legal strong { color: var(--text); }
.legal .zurueck { display: inline-block; margin-bottom: 20px; font-size: .8rem; color: var(--muted); text-decoration: none; }
.legal .zurueck:hover { color: var(--accent-2); }
.legal address { font-style: normal; color: var(--text); line-height: 1.7; font-size: .92rem; }

/* ---------- Klein / bewegungsarm ---------- */
/* Logo (107) + Polster (32) + Lücke (12) + drei Knöpfe (114) = 265 px, dazu die
   Zustandsanzeige. Deren Text kann lang werden („Tageskontingent aufgebraucht", rund
   206 px) — deshalb liegt die Grenze bei 500 px und nicht bei den 390 px, die für
   „Bereit" gereicht hätten. (Solange der Vollbild-Knopf noch da war, waren es vier
   Knöpfe und entsprechend 540 px.) Die Anzeige wird nur OPTISCH entfernt, nicht ausgeblendet:
   `display:none` würde auch die Ansage per aria-live verstummen lassen. Den Zustand
   zeigt ohnehin der Mikrofonknopf mit seinem Ring und dem Text darunter. */
@media (max-width: 500px) {
  .pill {
    position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
  }
}

@media (max-width: 560px) {
  .band-view::before, .band-view::after { width: 34px; }
  .band-hint { left: 16px; right: 40px; font-size: .8rem; }
  /* Wird im Gespräch blind getroffen — Fingerkuppe braucht 44 px. */
  .swap { min-height: 44px; padding: 5px 16px; }
  .install-actions { margin-left: 0; width: 100%; justify-content: flex-end; }
  .history-head h2 { flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .blob { animation: none; }
  .band-track { display: none; }
  /* z-index 2, sonst läge der Text unter der Blende — derselbe Fehler wie beim
     entfernten LIVE-Kennzeichen. Umbruch statt Ellipse, damit bei großer Schrift
     nichts abgeschnitten wird. */
  .band-static { display: block; position: relative; z-index: 2; width: 100%; padding: 0 22px;
    font-size: calc(1.05rem * var(--band-scale)); font-weight: 600; line-height: 1.3;
    max-height: 100%; overflow: hidden; }
  .history li, .sheet, .helpbox, .sharebox { animation: none; }
  .pill[data-state="live"] .dot { animation: none; }
  html { scroll-behavior: auto; }
}
