/* §CALLS-2026-09-18 — Anruf-Overlay, Auswahl-Sheets, Anrufe-Panel.
 *
 * z-Leiter (mobile-overrides.css ~12308): Shell 2147482000 < Sicherheit-Sheet
 * 2147482400 < Modals 2147482600 < Call-Sheets 2147482700 < Call-Overlay
 * 2147482800 < Media 2147483000 < Toast 2147483200. Die PIN-Sperre ist ein
 * .screen — lockAppNow() beendet deshalb einen laufenden Anruf aktiv.
 * Panel-Regeln tragen #ec-mobile-shell vierfach (siehe mobile-audit-fixes.css):
 * mobile-overrides.css eskaliert mit dreifacher ID. */

:root {
  --ec-call-bg: #05070d;
  --ec-call-panel: #0d1220;
  --ec-call-line: rgba(148, 163, 184, .18);
  --ec-call-text: #e6edf7;
  --ec-call-muted: #8b98ad;
  --ec-call-accent: #22d3ee;
  --ec-call-ok: #16a34a;
  --ec-call-danger: #dc2626;
}

/* ── Overlay ─────────────────────────────────────────────────────────────── */
.ec-call-overlay[hidden], .ec-call-sheet[hidden] { display: none !important; }
.ec-call-overlay {
  position: fixed; inset: 0; z-index: 2147482800;
  background: radial-gradient(120% 80% at 50% 0%, #1e1e1e 0%, var(--ec-call-bg) 60%);
  color: var(--ec-call-text); display: flex; align-items: stretch; justify-content: center;
  font-family: inherit;
}
.ec-call-stage {
  position: relative; flex: 1 1 auto; display: flex; flex-direction: column;
  align-items: center; justify-content: space-between; overflow: hidden;
  padding: calc(28px + env(safe-area-inset-top, 0px)) 20px calc(28px + env(safe-area-inset-bottom, 0px));
}
.ec-call-remote {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  background: #000; display: none;
}
.ec-call-remote-audio { display: none; }
/* Partner ohne Bild: Avatar statt Schwarz (eigene Avatar-Klasse, weil
   .ec-call-avatar im aktiven Videoanruf ausgeblendet ist). Das Video-Element bleibt im Layout
   (unsichtbar), weil der Ton eines Videoanrufs darüber läuft. */
.ec-call-remote-off {
  position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: radial-gradient(circle at 50% 42%, #212121, #05080f 70%); pointer-events: none;
}
.ec-call-remote-off-text { color: var(--ec-call-text); opacity: .8; font-size: 15px; max-width: 80vw; text-align: center; }
.ec-call-overlay[data-media="video"][data-phase="active"][data-remote-off]:not([data-swapped]) .ec-call-remote-off { display: flex; }
.ec-call-overlay[data-media="video"][data-phase="active"][data-remote-off]:not([data-swapped]) .ec-call-stage > .ec-call-remote { opacity: 0; }
.ec-call-overlay[data-media="video"][data-phase="active"] .ec-call-remote-off .ec-call-remote-off-avatar { display: grid; }
.ec-call-pip {
  position: absolute; width: 28vw; max-width: 150px; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--ec-call-line); box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
  background: #111; display: none; z-index: 3; touch-action: none; user-select: none; -webkit-user-select: none;
  cursor: grab; -webkit-tap-highlight-color: transparent;
  transition: transform .28s cubic-bezier(.2, .8, .2, 1);
  --ec-mirror: -1;
}
/* Ecken: Safe-Areas beachten; unten über der Steuerleiste (--ec-pip-bottom misst JS). */
.ec-call-pip[data-corner="tr"] { top: calc(16px + env(safe-area-inset-top, 0px)); right: calc(16px + env(safe-area-inset-right, 0px)); }
.ec-call-pip[data-corner="tl"] { top: calc(16px + env(safe-area-inset-top, 0px)); left: calc(16px + env(safe-area-inset-left, 0px)); }
.ec-call-pip[data-corner="br"] { bottom: var(--ec-pip-bottom, calc(150px + env(safe-area-inset-bottom, 0px))); right: calc(16px + env(safe-area-inset-right, 0px)); }
.ec-call-pip[data-corner="bl"] { bottom: var(--ec-pip-bottom, calc(150px + env(safe-area-inset-bottom, 0px))); left: calc(16px + env(safe-area-inset-left, 0px)); }
/* Beim Ziehen setzt JS left/top inline — die Ecken-Anker dürfen dann nicht mitziehen. */
.ec-call-pip.is-dragging { right: auto !important; bottom: auto !important; transition: none; cursor: grabbing; box-shadow: 0 16px 40px rgba(0, 0, 0, .6); }
.ec-call-local {
  display: block; width: 100%; height: 100%; object-fit: cover; background: #111;
  transform: scaleX(var(--ec-mirror)); pointer-events: none;
}
.ec-call-overlay[data-media="video"] .ec-call-pip { display: block; }
.ec-call-pip.is-flipping .ec-call-local { animation: ec-pip-flip .2s ease-in-out; }
@keyframes ec-pip-flip {
  0% { transform: scaleX(var(--ec-mirror)) perspective(400px) rotateY(0); }
  50% { transform: scaleX(var(--ec-mirror)) perspective(400px) rotateY(90deg); opacity: .4; }
  100% { transform: scaleX(var(--ec-mirror)) perspective(400px) rotateY(0); }
}
/* Ohne Bild (keine Kamera / Kamera aus): Cyber-Avatar mit Mute-Status. */
.ec-call-pip-avatar {
  position: absolute; inset: 0; display: none; place-items: center; pointer-events: none;
  background:
    linear-gradient(rgba(175, 175, 175, .07) 1px, transparent 1px) 0 0 / 100% 12px,
    radial-gradient(90% 70% at 50% 35%, #2e2e2e 0%, #0c0c0c 75%);
}
.ec-call-pip.is-avatar .ec-call-pip-avatar { display: grid; }
.ec-call-pip.is-avatar .ec-call-local { visibility: hidden; }
.ec-call-pip-initials {
  width: 56%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  font-size: clamp(18px, 6vw, 30px); font-weight: 700; letter-spacing: .04em; color: var(--ec-call-accent);
  border: 1px solid rgba(175, 175, 175, .55); box-shadow: 0 0 18px rgba(175, 175, 175, .35), inset 0 0 14px rgba(175, 175, 175, .18);
  background: rgba(11, 11, 11, .7);
}
.ec-call-pip-mute {
  position: absolute; right: 8px; bottom: 8px; width: 26px; height: 26px; border-radius: 50%;
  display: none; place-items: center; background: var(--ec-call-danger); color: #fff;
}
.ec-call-pip-mute svg { width: 15px; height: 15px; }
.ec-call-pip-mute::after { content: ''; position: absolute; width: 2px; height: 20px; background: #fff; transform: rotate(45deg); border-radius: 1px; }
.ec-call-pip.is-muted .ec-call-pip-mute { display: grid; }
.ec-call-overlay[data-nocam] .ec-call-cam-only { display: none; }
.ec-call-btn[hidden] { display: none !important; }

/* SAS-Sicherheitscode (MITM-Abgleich) — diskret unter dem Siegel. */
.ec-call-sas {
  font-size: 12px; color: var(--ec-call-muted); letter-spacing: .03em; cursor: help;
  border-bottom: 1px dotted rgba(151, 151, 151, .6); outline: none;
}
.ec-call-sas[hidden] { display: none; }
.ec-call-sas:focus-visible { color: var(--ec-call-text); }
.ec-call-overlay[data-media="video"][data-phase="active"] .ec-call-remote { display: block; }
.ec-call-overlay[data-media="video"][data-phase="active"] .ec-call-info {
  position: absolute; left: 0; right: 0; top: calc(16px + env(safe-area-inset-top, 0px)); margin: 0;
  background: none; text-shadow: 0 1px 6px rgba(0, 0, 0, .8);
}
.ec-call-overlay[data-media="video"][data-phase="active"] .ec-call-avatar { display: none; }
/* Name/Status links, rechts Platz für das eigene PiP (28vw ≤ 150px + Rand). */
.ec-call-overlay[data-media="video"][data-phase="active"] .ec-call-info {
  align-items: flex-start; text-align: left; padding: 0 calc(var(--ec-pip-w, min(28vw, 150px)) + 28px) 0 18px;
}
/* PiP oben links: Name rechtsbündig; PiP unten: volle Breite. */
.ec-call-overlay[data-media="video"][data-phase="active"][data-pip="tl"] .ec-call-info {
  align-items: flex-end; text-align: right; padding: 0 18px 0 calc(var(--ec-pip-w, min(28vw, 150px)) + 28px);
}
.ec-call-overlay[data-media="video"][data-phase="active"][data-pip^="b"] .ec-call-info { padding: 0 18px; }
.ec-call-overlay[data-media="video"][data-phase="active"] .ec-call-name { max-width: 100%; font-size: 20px; }

.ec-call-info {
  position: relative; z-index: 1; margin-top: 8vh;
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
}
.ec-call-avatar {
  width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center;
  font-size: 36px; font-weight: 700; letter-spacing: .02em;
  background: linear-gradient(145deg, #373737, #131313); border: 1px solid var(--ec-call-line);
  box-shadow: 0 0 0 10px rgba(175, 175, 175, .05), 0 0 0 22px rgba(175, 175, 175, .03);
}
.ec-call-overlay[data-phase="ringing"] .ec-call-avatar,
.ec-call-overlay[data-phase="calling"] .ec-call-avatar { animation: ec-call-pulse 1.6s ease-in-out infinite; }
@keyframes ec-call-pulse {
  0%, 100% { box-shadow: 0 0 0 10px rgba(175, 175, 175, .06), 0 0 0 22px rgba(175, 175, 175, .03); }
  50% { box-shadow: 0 0 0 16px rgba(175, 175, 175, .12), 0 0 0 34px rgba(175, 175, 175, .04); }
}
.ec-call-name { font-size: 24px; font-weight: 700; max-width: 86vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ec-call-status { font-size: 15px; color: var(--ec-call-muted); font-variant-numeric: tabular-nums; }
.ec-call-badge {
  margin-top: 4px; font-size: 12px; letter-spacing: .04em; color: var(--ec-call-accent);
  border: 1px solid rgba(175, 175, 175, .35); border-radius: 999px; padding: 4px 10px;
}

.ec-call-controls { position: relative; z-index: 2; display: none; gap: 18px; justify-content: center; flex-wrap: wrap; margin-top: auto; }
/* Im aktiven Video ist .ec-call-info absolut positioniert — ohne margin-top:auto
   rutschten die Bedienelemente als einziges Flex-Kind nach OBEN über den Namen. */
.ec-call-overlay[data-media="video"][data-phase="active"] .ec-call-controls-active {
  padding: 14px 10px 4px; border-radius: 22px; background: rgba(6, 6, 6, .45); backdrop-filter: blur(6px);
}
/* Eingehend: eigene Kamera läuft erst nach dem Annehmen — kein leeres PiP. */
.ec-call-overlay[data-dir="in"][data-phase="ringing"] .ec-call-pip { display: none; }
.ec-call-overlay[data-dir="in"][data-phase="ringing"] .ec-call-controls-in { display: flex; }
.ec-call-overlay:not([data-phase="ringing"]) .ec-call-controls-active,
.ec-call-overlay[data-dir="out"] .ec-call-controls-active { display: flex; }
.ec-call-overlay[data-dir="out"] .ec-call-controls-in { display: none; }
.ec-call-overlay[data-media="audio"] .ec-call-video-only { display: none; }
/* !important: die Pillen-Leiste im aktiven Video setzt .ec-call-btn spezifischer auf flex. */
.ec-call-overlay:not([data-media="audio"]) .ec-call-audio-only { display: none !important; }
.ec-call-controls-active { max-width: 100%; }
@media (max-width: 420px) {
  .ec-call-controls { gap: 8px; }
  .ec-call-btn { min-width: 58px; }
  .ec-call-btn svg { width: 52px; height: 52px; padding: 14px; }
}

.ec-call-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 72px;
  background: none; border: 0; color: var(--ec-call-text); font: inherit; font-size: 12px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ec-call-btn svg {
  width: 60px; height: 60px; padding: 17px; border-radius: 50%; box-sizing: border-box;
  background: rgba(255, 255, 255, .1); border: 1px solid var(--ec-call-line);
}
.ec-call-btn.is-on svg { background: var(--ec-call-text); color: #101010; }
.ec-call-btn.is-ok svg { background: var(--ec-call-ok); border-color: transparent; width: 70px; height: 70px; padding: 20px; }
.ec-call-btn.is-danger svg { background: var(--ec-call-danger); border-color: transparent; width: 70px; height: 70px; padding: 20px; }
.ec-call-btn.is-danger svg { transform: rotate(135deg); }
.ec-call-btn:focus-visible svg { outline: 2px solid var(--ec-call-accent); outline-offset: 3px; }

/* Desktop: modales Overlay statt Vollbild. */
@media (min-width: 900px) {
  .ec-call-overlay { background: rgba(6, 6, 6, .72); backdrop-filter: blur(6px); align-items: center; }
  .ec-call-stage {
    flex: 0 1 auto; width: 440px; min-height: 560px; border-radius: 20px;
    background: radial-gradient(120% 80% at 50% 0%, #1e1e1e 0%, var(--ec-call-panel) 70%);
    border: 1px solid var(--ec-call-line); box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
    padding: 28px 24px;
  }
  .ec-call-overlay[data-media="video"] .ec-call-stage { width: min(880px, 90vw); min-height: min(560px, 80vh); }
  .ec-call-pip { width: 180px; max-width: 180px; }
}
@media (prefers-reduced-motion: reduce) {
  .ec-call-overlay .ec-call-avatar { animation: none !important; }
}

/* ── Auswahl-Sheets (Sprach-/Videoanruf, Kontakt-Auswahl) ─────────────────── */
.ec-call-sheet {
  position: fixed; inset: 0; z-index: 2147482700; background: rgba(6, 6, 6, .55);
  display: flex; align-items: flex-end; justify-content: center;
}
.ec-call-sheet-card {
  width: 100%; max-width: 480px; background: var(--ec-call-panel); color: var(--ec-call-text);
  border: 1px solid var(--ec-call-line); border-bottom: 0; border-radius: 18px 18px 0 0;
  padding: 18px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 10px; box-shadow: 0 -18px 48px rgba(0, 0, 0, .5);
}
@media (min-width: 900px) {
  .ec-call-sheet { align-items: center; }
  .ec-call-sheet-card { border-radius: 18px; border-bottom: 1px solid var(--ec-call-line); }
}
.ec-call-sheet-title { font-size: 15px; color: var(--ec-call-muted); text-align: center; padding: 2px 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ec-call-choice {
  min-height: 52px; border-radius: 12px; border: 1px solid var(--ec-call-line);
  background: rgba(255, 255, 255, .04); color: var(--ec-call-text); font: inherit; font-size: 16px;
  text-align: left; padding: 0 16px; cursor: pointer;
}
.ec-call-choice:hover, .ec-call-choice:focus-visible { border-color: rgba(175, 175, 175, .5); outline: none; }
.ec-call-choice.is-cancel { text-align: center; color: var(--ec-call-muted); background: none; }
.ec-call-picker-card { max-height: 78vh; }
.ec-call-pick-list { overflow-y: auto; display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.ec-call-pick {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) 22px; align-items: center; gap: 12px;
  min-height: 56px; padding: 6px 12px; border-radius: 12px; border: 1px solid var(--ec-call-line);
  background: rgba(255, 255, 255, .03); color: var(--ec-call-text); font: inherit; text-align: left; cursor: pointer;
}
.ec-call-pick strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ec-call-pick svg { width: 22px; height: 22px; color: var(--ec-call-ok); }
.ec-call-pick-av {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700;
  background: linear-gradient(145deg, #373737, #131313);
}
.ec-call-empty { color: var(--ec-call-muted); text-align: center; padding: 18px 8px; margin: 0; }

/* ── Anrufe-Panel in der Mobile-Shell ─────────────────────────────────────── */
html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ec-calls-scroll {
  grid-template-columns: minmax(0, 1fr); display: flex; flex-direction: column; gap: 12px;
}
html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ec-calls-new {
  display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; width: 100%;
  border: 0; border-radius: 14px; font: inherit; font-size: 16px; font-weight: 600; cursor: pointer;
  color: #fff; background: linear-gradient(135deg, #606060, #555555); box-shadow: 0 10px 28px rgba(83, 83, 83, .35);
}
html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ec-calls-new svg { width: 22px; height: 22px; fill: none; stroke: currentColor; }
html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ec-calls-relay-note {
  margin: 0; font-size: 13px; line-height: 1.45; color: #c1c1c1;
  border: 1px solid rgba(193, 193, 193, .35); background: rgba(193, 193, 193, .06); border-radius: 12px; padding: 10px 12px;
}
html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ec-calls-section {
  margin: 8px 2px 0; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ec-call-muted); font-weight: 600;
}
html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ec-calls-list { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ec-calls-row {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) 22px; align-items: center; gap: 12px;
  min-height: 60px; width: 100%; padding: 8px 12px; border-radius: 14px; font: inherit; text-align: left;
  color: var(--ec-call-text); background: rgba(255, 255, 255, .03); border: 1px solid var(--ec-call-line); cursor: pointer;
}
html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ec-calls-row > svg { width: 22px; height: 22px; color: var(--ec-call-ok); fill: none; }
html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ec-calls-row.is-missed strong { color: #f87171; }
html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ec-calls-copy { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ec-calls-copy strong,
html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ec-calls-copy small {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ec-calls-copy small { color: var(--ec-call-muted); font-size: 12.5px; }
html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ec-calls-ico {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .05);
}
html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ec-calls-ico svg { width: 20px; height: 20px; fill: none; }
html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ec-calls-ico.is-in { color: #adadad; }
html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ec-calls-ico.is-out { color: #9c9c9c; }
html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ec-calls-ico.is-missed { color: #f87171; }
html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ec-calls-empty {
  color: var(--ec-call-muted); font-size: 14px; text-align: center; padding: 28px 12px;
  border: 1px dashed var(--ec-call-line); border-radius: 14px;
}
html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ec-call-head-btn[hidden] { display: none !important; }

/* Offener Raum (kein Passwort): ehrlich abgeschwächtes Siegel. */
.ec-call-badge.is-open-room { color: #c1c1c1; border-color: rgba(193, 193, 193, .45); }
.ec-call-sheet-note { font-size: 12.5px; line-height: 1.4; color: #c1c1c1; text-align: center; padding: 0 6px 4px; }
.ec-call-sheet-note[hidden] { display: none; }

/* §CALLS-DESKTOP-2026-09-18: Hörer im Desktop-Chat-Header (#ec-claude-shell-final).
   desktop-overrides.css blendet Buttons in .ecf-chat-actions mit !important ein —
   der hidden-Zustand (Gruppen/kein Chat) braucht deshalb eine stärkere Regel. */
html body.auth-ready #ec-claude-shell-final#ec-claude-shell-final .ecf-chat-actions .ecf-call-btn {
  display: inline-grid !important; place-items: center !important; width: 40px !important; min-width: 40px !important; height: 40px !important;
  padding: 0 !important; border-radius: 12px !important; color: #b8b8b8 !important;
}
html body.auth-ready #ec-claude-shell-final#ec-claude-shell-final .ecf-chat-actions .ecf-call-btn svg { width: 19px; height: 19px; stroke: currentColor; }
html body.auth-ready #ec-claude-shell-final#ec-claude-shell-final .ecf-chat-actions .ecf-call-btn[hidden] { display: none !important; }
html body.auth-ready #ec-claude-shell-final#ec-claude-shell-final .ecf-chat-actions .ecf-call-btn:hover { background: rgba(184, 184, 184, .1) !important; }

/* §CALLS-ASYNC-2026-09-18: Schluss-Screen ("Nicht erreichbar", "Besetzt") —
   Medien sind schon gestoppt, also keine Bedienelemente mehr. */
.ec-call-overlay[data-phase="ended"] .ec-call-controls-active,
.ec-call-overlay[data-phase="ended"] .ec-call-controls-in,
.ec-call-overlay[data-phase="ended"] .ec-call-pip,
.ec-call-overlay[data-phase="ended"] .ec-call-remote { display: none; }
.ec-call-overlay[data-phase="ended"] .ec-call-status { color: #ff8a80; font-weight: 600; }

/* §CALLS-FS-2026-09-18: Vollbild auf der Bühne (Desktop-Karte → ganzer Schirm).
   Getrennte Regeln: ein unbekannter Selektor würde die ganze Liste verwerfen. */
.ec-call-stage:fullscreen { width: 100vw; height: 100vh; max-width: none; min-height: 0; border-radius: 0; border: 0; background: #000; }
.ec-call-stage:-webkit-full-screen { width: 100vw; height: 100vh; max-width: none; min-height: 0; border-radius: 0; border: 0; background: #000; }
@media (prefers-reduced-motion: reduce) {
  .ec-call-pip { transition: none; }
  .ec-call-pip.is-flipping .ec-call-local { animation: none; }
}

/* §PIP-RESIZE-2026-09-22: Größe ändern (Griff an der freien Ecke, Zwei-Finger-
   Geste, Strg+Mausrad) und Vollansicht tauschen. Breite setzt JS inline
   (min. 120 px, max. 50 % der Bühne); das Seitenverhältnis bleibt 3:4. */
.ec-call-pip.is-resizing { transition: none; box-shadow: 0 16px 40px rgba(0, 0, 0, .6); }
.ec-call-pip-resize {
  position: absolute; width: 28px; height: 28px; z-index: 2; touch-action: none;
  opacity: .5; transition: opacity .15s ease;
}
.ec-call-pip-resize::before {
  content: ''; position: absolute; inset: 6px; border: 0 solid rgba(255, 255, 255, .9);
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, .8));
}
.ec-call-pip[data-corner="tr"] .ec-call-pip-resize { left: 0; bottom: 0; cursor: nesw-resize; }
.ec-call-pip[data-corner="tr"] .ec-call-pip-resize::before { border-left-width: 3px; border-bottom-width: 3px; border-bottom-left-radius: 6px; }
.ec-call-pip[data-corner="tl"] .ec-call-pip-resize { right: 0; bottom: 0; cursor: nwse-resize; }
.ec-call-pip[data-corner="tl"] .ec-call-pip-resize::before { border-right-width: 3px; border-bottom-width: 3px; border-bottom-right-radius: 6px; }
.ec-call-pip[data-corner="br"] .ec-call-pip-resize { left: 0; top: 0; cursor: nwse-resize; }
.ec-call-pip[data-corner="br"] .ec-call-pip-resize::before { border-left-width: 3px; border-top-width: 3px; border-top-left-radius: 6px; }
.ec-call-pip[data-corner="bl"] .ec-call-pip-resize { right: 0; top: 0; cursor: nesw-resize; }
.ec-call-pip[data-corner="bl"] .ec-call-pip-resize::before { border-right-width: 3px; border-top-width: 3px; border-top-right-radius: 6px; }
.ec-call-pip-swap {
  position: absolute; top: 6px; left: 6px; z-index: 2; width: 30px; height: 30px; padding: 0;
  display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(6, 6, 6, .55); color: #fff; opacity: 0; transition: opacity .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.ec-call-pip[data-corner="br"] .ec-call-pip-swap { left: auto; right: 6px; }
.ec-call-pip-swap svg { width: 16px; height: 16px; }
.ec-call-pip-swap[hidden] { display: none; }
.ec-call-pip:hover .ec-call-pip-resize, .ec-call-pip:hover .ec-call-pip-swap,
.ec-call-pip.is-resizing .ec-call-pip-resize,
.ec-call-pip-swap:focus-visible { opacity: 1; }
/* Touch: Griff und Knopf immer leicht sichtbar (kein Hover). */
@media (hover: none) {
  .ec-call-pip-resize { opacity: .7; }
  .ec-call-pip-swap { opacity: .9; }
}
/* Getauscht: Partner im PiP, eigenes Bild füllt die Bühne. */
.ec-call-stage > .ec-call-local { position: absolute; inset: 0; z-index: 0; }
.ec-call-overlay[data-swapped] .ec-call-pip-avatar { display: none !important; }
.ec-call-overlay[data-swapped] .ec-call-pip .ec-call-remote { display: block; }

/* §GROUP-CALLS-2026-09-22 — Gruppenanruf: Kachel-Raster je Teilnehmer.
   2 Teilnehmer: Partner groß + eigenes PiP (Video). Ab §CALL-GRID-2026-10-18
   setzt ec-calls.js (layoutGrid) Position und Größe jeder Kachel absolut. */
.ec-call-grid { display: none; }
.ec-call-overlay[data-kind="group"] .ec-call-remote { display: none !important; }
.ec-call-overlay[data-kind="group"]:not([data-self-pip]) .ec-call-pip { display: none !important; }
.ec-call-overlay[data-kind="group"][data-phase="active"]:not([data-peers="0"]) .ec-call-grid {
  position: absolute; z-index: 0; display: block;
  top: calc(108px + env(safe-area-inset-top, 0px)); left: 10px; right: 10px;
  bottom: var(--ec-pip-bottom, calc(130px + env(safe-area-inset-bottom, 0px)));
}
/* Aktiv mit Gegenstellen: Name/Status oben links, wie im 1:1-Video. */
.ec-call-overlay[data-kind="group"][data-phase="active"]:not([data-peers="0"]) .ec-call-info {
  position: absolute; left: 0; right: 0; top: calc(16px + env(safe-area-inset-top, 0px)); margin: 0;
  align-items: flex-start; text-align: left; padding: 0 18px; text-shadow: 0 1px 6px rgba(0, 0, 0, .8);
}
.ec-call-overlay[data-kind="group"][data-phase="active"][data-self-pip]:not([data-peers="0"]) .ec-call-info {
  padding: 0 calc(var(--ec-pip-w, min(28vw, 150px)) + 28px) 0 18px;
}
.ec-call-overlay[data-kind="group"][data-phase="active"]:not([data-peers="0"]) .ec-call-avatar { display: none; }
.ec-call-overlay[data-kind="group"][data-phase="active"]:not([data-peers="0"]) .ec-call-name { font-size: 18px; }
.ec-call-overlay[data-kind="group"][data-phase="active"] .ec-call-controls-active {
  padding: 14px 10px 4px; border-radius: 22px; background: rgba(6, 6, 6, .45); backdrop-filter: blur(6px);
}
.ec-call-tile {
  position: absolute; left: 0; top: 0; width: 0; height: 0; box-sizing: border-box; overflow: hidden; border-radius: 14px;
  border: 1px solid var(--ec-call-line); background: radial-gradient(90% 70% at 50% 35%, #2e2e2e 0%, #0c0c0c 75%);
  transition: left .25s cubic-bezier(.4, 0, .2, 1), top .25s cubic-bezier(.4, 0, .2, 1), width .25s cubic-bezier(.4, 0, .2, 1),
    height .25s cubic-bezier(.4, 0, .2, 1), box-shadow .15s ease, border-color .15s ease;
  touch-action: manipulation; user-select: none; -webkit-user-select: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.ec-call-tile-video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000;
  visibility: hidden; pointer-events: none;
}
.ec-call-tile.has-video .ec-call-tile-video { visibility: visible; }
.ec-call-tile.is-self .ec-call-tile-video { transform: scaleX(var(--ec-mirror, -1)); }
.ec-call-tile-avatar { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.ec-call-tile.has-video .ec-call-tile-avatar { display: none; }
.ec-call-tile-initials {
  width: clamp(44px, 32%, 104px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  font-size: clamp(16px, 4vw, 30px); font-weight: 700; letter-spacing: .04em; color: var(--ec-call-accent);
  border: 1px solid rgba(175, 175, 175, .55); background: rgba(11, 11, 11, .7);
  box-shadow: 0 0 18px rgba(175, 175, 175, .3), inset 0 0 14px rgba(175, 175, 175, .15);
}
.ec-call-tile-label {
  position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; align-items: center; gap: 6px;
  min-width: 0; font-size: 13px; pointer-events: none;
}
.ec-call-tile-name {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 3px 9px; border-radius: 999px; background: rgba(6, 6, 6, .6); color: var(--ec-call-text);
}
.ec-call-tile-state { flex: none; font-size: 12px; color: var(--ec-call-muted); text-shadow: 0 1px 4px rgba(0, 0, 0, .9); }
.ec-call-tile-mute {
  position: relative; flex: none; width: 22px; height: 22px; border-radius: 50%;
  display: none; place-items: center; background: var(--ec-call-danger); color: #fff;
}
.ec-call-tile-mute svg { width: 13px; height: 13px; }
.ec-call-tile-mute::after { content: ''; position: absolute; width: 2px; height: 16px; background: #fff; transform: rotate(45deg); border-radius: 1px; }
.ec-call-tile.is-muted .ec-call-tile-mute { display: grid; }
/* Aktiver Sprecher: Leuchtrahmen (Web-Audio-Pegel, ec-calls.js); Farbe s. §CALL-GRID. */
.ec-call-tile.is-speaking, .ec-call-pip.is-speaking {
  border-color: #727272; box-shadow: 0 0 0 1px #727272, 0 0 16px rgba(85, 85, 85, .5);
}
@media (min-width: 900px) {
  .ec-call-overlay[data-kind="group"] .ec-call-stage { width: min(1100px, 94vw); min-height: min(720px, 86vh); }
  .ec-call-overlay[data-kind="group"][data-phase="active"]:not([data-peers="0"]) .ec-call-grid { left: 16px; right: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .ec-call-tile, .ec-call-pip-resize, .ec-call-pip-swap { transition: none; }
  .ec-call-tile.is-speaking .ec-call-tile-face::after { animation: none; }
}
.ec-call-overlay[data-kind="group"][data-phase="active"][data-self-pip][data-pip="tl"]:not([data-peers="0"]) .ec-call-info {
  align-items: flex-end; text-align: right; padding: 0 18px 0 calc(var(--ec-pip-w, min(28vw, 150px)) + 28px);
}
/* Siegel im aktiven Gruppenanruf einzeilig — sonst ragt es ins Raster. */
.ec-call-overlay[data-kind="group"][data-phase="active"]:not([data-peers="0"]) .ec-call-badge {
  max-width: 100%; box-sizing: border-box; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px;
}

/* ── §CALL-HISTORY-2026-09-23: Verlauf leeren, Wischen zum Löschen, Menü ──── */
html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ec-calls-section-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 2px 0; min-width: 0;
}
html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ec-calls-section-row .ec-calls-section { margin: 0; }
html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ec-calls-clear {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 10px; margin: -6px -6px -6px 0;
  border: 0; border-radius: 10px; background: none; color: var(--ec-call-muted); font: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ec-calls-clear[hidden] { display: none !important; }
html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ec-calls-clear svg { width: 16px; height: 16px; }
html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ec-calls-clear:hover,
html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ec-calls-clear:focus-visible { color: #f87171; background: rgba(248, 113, 113, .08); outline: none; }

/* Abstand über margin statt gap — nur so schrumpft ein Eintrag beim Löschen auf 0. */
html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ec-calls-list { gap: 0; }
html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ec-calls-item {
  position: relative; overflow: hidden; border-radius: 14px; margin-bottom: 6px; min-width: 0;
  transition: all .25s ease;
}
html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ec-calls-item.is-removing {
  height: 0 !important; margin-bottom: 0; opacity: 0; transform: translateX(-24px); pointer-events: none;
}
html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ec-calls-item .ec-calls-row {
  /* pan-y: Senkrecht scrollt der Browser, waagerecht wischt ec-calls.js. !important —
     eine Shell-Regel setzt sonst manipulation (Browser bricht mit pointercancel ab). */
  position: relative; z-index: 1; touch-action: pan-y !important; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  transition: transform .25s ease;
}
html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ec-calls-item.is-dragging .ec-calls-row { transition: none; }
/* Roter Knopf wächst mit der Wischstrecke (width per JS) — nichts liegt HINTER
   der halbtransparenten Zeile. */
html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ec-calls-del {
  position: absolute; top: 0; right: 0; bottom: 0; width: 0; min-width: 0 !important; min-height: 0 !important; z-index: 0; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 0; border-radius: 0 14px 14px 0; padding: 0; background: #ef4444; color: #fff;
  font: inherit; font-size: 12px; font-weight: 600; white-space: nowrap; cursor: pointer;
  transition: width .25s ease;
}
html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ec-calls-item.is-dragging .ec-calls-del { transition: none; }
html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ec-calls-del svg { width: 20px; height: 20px; flex: 0 0 auto; }

.ec-call-choice.is-danger { text-align: center; color: #fff; background: #dc2626; border-color: transparent; font-weight: 600; }
.ec-call-choice.is-danger:hover, .ec-call-choice.is-danger:focus-visible { background: #ef4444; border-color: rgba(255, 255, 255, .35); }
.ec-calls-hist-text { margin: 0 4px 6px; font-size: 15px; line-height: 1.45; text-align: center; color: var(--ec-call-text); }
.ec-calls-hist-text[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ec-calls-item,
  html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ec-calls-item .ec-calls-row,
  html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ec-calls-del { transition: none; }
}

/* ═══ §CALL-UI-2026-10-17: immersiver Videoanruf (Handy → iPad → Desktop) ═══
   Im Videoanruf ist die Bühne auf JEDER Breite randlos schwarz (vorher Karte ab
   900 px bzw. im Tablet-Split). Partnerbild füllt alles, Kopfzeile oben mit
   Verlauf, schlanke Glas-Leiste unten, PiP oben rechts. Im aktiven Anruf blendet
   ec-calls.js Kopf und Leiste nach 4 s ohne Eingabe aus ([data-chrome-hidden]).
   `html body` vorn: ec-tablet-split.css lädt später und setzt body.ec-split-Regeln. */
html body .ec-call-overlay[data-media="video"] { background: #000; backdrop-filter: none; -webkit-backdrop-filter: none; align-items: stretch; --ec-pip-w: 100px; }
html body .ec-call-overlay[data-media="video"] .ec-call-stage {
  flex: 1 1 auto; width: 100%; max-width: none; min-height: 0; margin: 0;
  border: 0; border-radius: 0; box-shadow: none; background: #000;
  padding: max(16px, env(safe-area-inset-top, 0px)) 16px max(20px, env(safe-area-inset-bottom, 0px));
}
.ec-call-overlay[data-media="video"] .ec-call-stage > video,
.ec-call-overlay[data-media="video"] .ec-call-remote-off { z-index: 1; }
.ec-call-overlay[data-media="video"] .ec-call-grid { z-index: 1; }
/* Doppelklick auf das große Bild (ec-calls.js) schaltet cover ↔ contain; ohne
   Wahl zeigt der Desktop das ganze Bild (Hochkant-Handykamera auf 16:9). */
.ec-call-overlay[data-fit="cover"] .ec-call-stage > video { object-fit: cover; }
.ec-call-overlay[data-fit="contain"] .ec-call-stage > video { object-fit: contain; }
@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
  .ec-call-overlay:not([data-fit]) .ec-call-stage > video { object-fit: contain; }
}

/* Verläufe oben/unten: weiße Schrift bleibt vor jedem Bild lesbar. */
.ec-call-overlay[data-media="video"][data-phase="active"] .ec-call-stage::before,
.ec-call-overlay[data-media="video"][data-phase="active"] .ec-call-stage::after {
  content: ''; position: absolute; left: 0; right: 0; z-index: 2; pointer-events: none;
  transition: opacity .3s ease;
}
.ec-call-overlay[data-media="video"][data-phase="active"] .ec-call-stage::before {
  top: 0; height: calc(140px + env(safe-area-inset-top, 0px));
  background: linear-gradient(180deg, rgba(0, 0, 0, .7) 0%, rgba(0, 0, 0, 0) 100%);
}
.ec-call-overlay[data-media="video"][data-phase="active"] .ec-call-stage::after {
  bottom: 0; height: calc(150px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(0deg, rgba(0, 0, 0, .7) 0%, rgba(0, 0, 0, 0) 100%);
}

/* Kopfzeile: Name + Dauer links oben, Siegel und Code als EINE Pille darunter. */
html body .ec-call-overlay[data-media="video"][data-phase="active"] .ec-call-info {
  z-index: 5; top: max(16px, env(safe-area-inset-top, 0px)); gap: 4px;
  padding-left: calc(16px + env(safe-area-inset-left, 0px));
  text-shadow: 0 1px 3px rgba(0, 0, 0, .6); transition: opacity .3s ease;
}
html body .ec-call-overlay[data-media="video"][data-phase="active"] .ec-call-name { font-size: 17px; font-weight: 600; line-height: 1.25; color: #fff; }
html body .ec-call-overlay[data-media="video"][data-phase="active"] .ec-call-status { font-size: 13px; color: rgba(255, 255, 255, .85); }
.ec-call-secure { display: contents; }
.ec-call-overlay[data-media="video"][data-phase="active"] .ec-call-secure {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-width: 0; box-sizing: border-box; margin-top: 4px;
  font-size: 11px; line-height: 1.3; padding: 4px 10px; border-radius: 20px; color: rgba(255, 255, 255, .9);
  background: rgba(0, 0, 0, .45); border: 1px solid rgba(255, 255, 255, .1); text-shadow: none;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
html body .ec-call-overlay[data-media="video"][data-phase="active"] .ec-call-secure .ec-call-badge {
  margin: 0; padding: 0; border: 0; border-radius: 0; font-size: inherit; letter-spacing: 0; color: inherit;
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
html body .ec-call-overlay[data-media="video"][data-phase="active"] .ec-call-secure .ec-call-badge.is-open-room { color: #c1c1c1; }
html body .ec-call-overlay[data-media="video"][data-phase="active"] .ec-call-secure .ec-call-sas {
  flex: none; font-size: inherit; color: inherit; border: 0; padding-left: 8px; white-space: nowrap;
  border-left: 1px solid rgba(255, 255, 255, .2);
}

@media (max-width: 480px) {
  html body .ec-call-overlay[data-media="video"][data-phase="active"] .ec-call-secure .ec-call-sas-label { display: none; }
}

/* Steuerleiste: schlanke Glas-Pille ganz unten, Mitte bleibt frei. */
html body .ec-call-overlay[data-media="video"][data-phase="active"] .ec-call-controls-active {
  position: absolute; z-index: 5; left: 50%; bottom: max(20px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  margin: 0; gap: 12px; flex-wrap: nowrap; max-width: calc(100% - 32px); box-sizing: border-box;
  padding: 8px 10px; border-radius: 999px;
  background: rgba(27, 27, 27, .65); border: 1px solid rgba(255, 255, 255, .15);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35); transition: opacity .3s ease;
}
html body .ec-call-overlay[data-media="video"][data-phase="active"] .ec-call-controls-active .ec-call-btn {
  width: 48px; height: 48px; min-width: 48px; min-height: 48px; max-width: 48px; padding: 0; flex: none;
  border-radius: 50%; display: flex; align-items: center; justify-content: center; gap: 0;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .15); color: #fff;
  transition: background .15s ease, transform .1s ease;
}
html body .ec-call-overlay[data-media="video"][data-phase="active"] .ec-call-controls-active .ec-call-btn[hidden] { display: none; }
html body .ec-call-overlay[data-media="video"][data-phase="active"] .ec-call-controls-active .ec-call-btn svg {
  width: 22px; height: 22px; padding: 0; border: 0; border-radius: 0; background: none; color: inherit; flex: none;
}
/* Beschriftung nur für Screenreader (aria-label trägt sie ohnehin). */
html body .ec-call-overlay[data-media="video"][data-phase="active"] .ec-call-controls-active .ec-call-btn > span {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
html body .ec-call-overlay[data-media="video"][data-phase="active"] .ec-call-controls-active .ec-call-btn.is-on { background: #fff; color: #101010; }
html body .ec-call-overlay[data-media="video"][data-phase="active"] .ec-call-controls-active .ec-call-btn.is-danger { background: #ef4444; border-color: transparent; }
html body .ec-call-overlay[data-media="video"][data-phase="active"] .ec-call-controls-active .ec-call-btn.is-danger svg { transform: rotate(135deg); }
html body .ec-call-overlay[data-media="video"][data-phase="active"] .ec-call-controls-active .ec-call-btn:active { transform: scale(.94); }
html body .ec-call-overlay[data-media="video"][data-phase="active"] .ec-call-controls-active .ec-call-btn:focus-visible { outline: 2px solid var(--ec-call-accent); outline-offset: 2px; }
html body .ec-call-overlay[data-media="video"][data-phase="active"] .ec-call-controls-active .ec-call-btn:focus-visible svg { outline: 0; }
@media (hover: hover) {
  html body .ec-call-overlay[data-media="video"][data-phase="active"] .ec-call-controls-active .ec-call-btn:not(.is-on):not(.is-danger):hover { background: rgba(255, 255, 255, .22); }
  html body .ec-call-overlay[data-media="video"][data-phase="active"] .ec-call-controls-active .ec-call-btn.is-danger:hover { background: #dc2626; }
}

/* Auto-Ausblenden (ec-calls.js setzt das Attribut; ein Tipp holt alles zurück). */
.ec-call-overlay[data-chrome-hidden] .ec-call-stage::before,
.ec-call-overlay[data-chrome-hidden] .ec-call-stage::after { opacity: 0; }
html body .ec-call-overlay[data-chrome-hidden] .ec-call-info,
html body .ec-call-overlay[data-chrome-hidden] .ec-call-controls-active { opacity: 0; pointer-events: none; }
.ec-call-overlay[data-chrome-hidden] .ec-call-stage { cursor: none; }

/* Eigenes PiP: 100×140 (Handy), 140×190 ab 768 px; Ziehen/Größe bleiben (JS). */
html body .ec-call-overlay[data-media="video"] .ec-call-pip {
  width: 100px; height: 140px; max-width: none; aspect-ratio: auto; z-index: 20;
  border-radius: 14px; border: 1.5px solid rgba(255, 255, 255, .25); box-shadow: 0 10px 25px rgba(0, 0, 0, .5);
}
html body .ec-call-overlay[data-media="video"] .ec-call-pip[data-corner="tr"] { top: max(20px, env(safe-area-inset-top, 0px)); right: calc(16px + env(safe-area-inset-right, 0px)); }
html body .ec-call-overlay[data-media="video"] .ec-call-pip[data-corner="tl"] { top: max(20px, env(safe-area-inset-top, 0px)); left: calc(16px + env(safe-area-inset-left, 0px)); }
html body .ec-call-overlay[data-media="video"] .ec-call-pip.is-speaking { border-color: #727272; }
.ec-call-overlay[data-media="video"] .ec-call-pip-initials { font-size: 22px; }
@media (min-width: 769px) {
  html body .ec-call-overlay[data-media="video"] { --ec-pip-w: 140px; }
  html body .ec-call-overlay[data-media="video"] .ec-call-pip { width: 140px; height: 190px; }
  html body .ec-call-overlay[data-media="video"] .ec-call-stage { padding-left: 24px; padding-right: 24px; }
  html body .ec-call-overlay[data-media="video"][data-phase="active"] .ec-call-name { font-size: 19px; }
  html body .ec-call-overlay[data-media="video"][data-phase="active"] .ec-call-secure { font-size: 12px; }
}
/* Gruppen-Raster: Safe-Areas seitlich (Querformat mit Notch). */
html body .ec-call-overlay[data-kind="group"][data-media="video"][data-phase="active"]:not([data-peers="0"]) .ec-call-grid {
  left: calc(10px + env(safe-area-inset-left, 0px)); right: calc(10px + env(safe-area-inset-right, 0px));
}
@media (prefers-reduced-motion: reduce) {
  .ec-call-overlay[data-media="video"] .ec-call-stage::before, .ec-call-overlay[data-media="video"] .ec-call-stage::after,
  html body .ec-call-overlay[data-media="video"] .ec-call-info, html body .ec-call-overlay[data-media="video"] .ec-call-controls-active { transition: none; }
}

/* §CALL-AVATAR-2026-10-18 — Profilbild des Gegenübers (ec-calls.js paintAvatar).
   Ohne Bild: Farbverlauf aus dem Namen (--ec-av-hue) mit zwei Buchstaben.
   Klingeln/Wählen 110 px mit Puls (Regel oben), aktiver Sprachanruf und
   Video-Bühne ohne Bild 120 px mit weichem Schatten. */
.ec-call-avatar {
  position: relative; overflow: hidden; width: 110px; height: 110px; flex: 0 0 auto; aspect-ratio: 1 / 1;
  background: linear-gradient(145deg, hsl(var(--ec-av-hue, 205) 62% 46%), hsl(calc(var(--ec-av-hue, 205) + 48) 68% 24%));
  color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .35);
}
.ec-call-avatar > .ec-call-initials { position: relative; z-index: 0; }
.ec-call-avatar > img.caller-avatar {
  position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%;
  object-fit: cover; border-radius: 50%; display: block;
  -webkit-user-drag: none; user-select: none; pointer-events: none;
}
.ec-call-avatar.has-img > .ec-call-initials { visibility: hidden; }
.ec-call-overlay[data-phase="active"][data-media="audio"] .ec-call-info > .ec-call-avatar,
.ec-call-overlay[data-phase="connecting"] .ec-call-info > .ec-call-avatar,
.ec-call-remote-off-avatar {
  width: 120px; height: 120px; font-size: 40px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .45), 0 0 0 10px rgba(175, 175, 175, .05);
}

/* §CALL-CONTROLS-2026-10-18 — Steuerleiste im WhatsApp-/FaceTime-Stil, für
   Sprach- und Videoanruf gleich: schwebende Glas-Pille, Knöpfe 50 px,
   Auflegen 56 px. Zustände: an = Glas + weißes Icon; Kamera aus /
   Mikrofon stumm (.is-off / .is-muted) = weißer Knopf, rotes
   durchgestrichenes Icon (ec-calls.js tauscht das SVG). Spezifität wie die
   Video-Regeln oben (html body … [data-…][data-…]), Reihenfolge entscheidet.
   Positionierung im Video (absolut, unten mittig) bleibt aus dem Block oben. */
html body .ec-call-overlay[data-phase][data-media] .ec-call-controls-active {
  align-self: center; width: max-content; max-width: calc(100% - 32px); box-sizing: border-box;
  flex-wrap: nowrap; gap: 14px; padding: 10px 18px; border-radius: 36px;
  background: rgba(22, 22, 22, .75); border: 1px solid rgba(255, 255, 255, .1);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35); transition: opacity .3s ease;
}
html body .ec-call-overlay[data-media="video"][data-phase="active"] .ec-call-controls-active {
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
}
html body .ec-call-overlay[data-phase][data-media] .ec-call-controls-active .ec-call-btn {
  position: relative; width: 50px; height: 50px; min-width: 50px; max-width: 50px; min-height: 50px; padding: 0; flex: none;
  display: flex; align-items: center; justify-content: center; gap: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .15); border: 1px solid rgba(255, 255, 255, .12); color: #fff;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: transform .15s ease, background .15s ease, color .15s ease; -webkit-tap-highlight-color: transparent;
}
html body .ec-call-overlay[data-phase][data-media] .ec-call-controls-active .ec-call-btn svg {
  width: 22px; height: 22px; padding: 0; margin: 0; border: 0; border-radius: 0; background: none; color: inherit; flex: none; transform: none;
}
html body .ec-call-overlay[data-phase][data-media] .ec-call-controls-active .ec-call-btn > span {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
html body .ec-call-overlay[data-phase][data-media] .ec-call-controls-active .ec-call-btn:active { transform: scale(.92); }
/* Lautsprecher / Vollbild aktiv */
html body .ec-call-overlay[data-phase][data-media] .ec-call-controls-active .ec-call-btn.is-on { background: #fff; color: #101010; border-color: #fff; }
/* Kamera aus / Mikrofon stumm: unübersehbar */
html body .ec-call-overlay[data-phase][data-media] .ec-call-controls-active .ec-call-btn.is-off,
html body .ec-call-overlay[data-phase][data-media] .ec-call-controls-active .ec-call-btn.is-muted { background: #fff; color: #dc2626; border-color: #fff; }
/* Auflegen: Signalrot, Hörer 135° nach unten, etwas größer */
html body .ec-call-overlay[data-phase][data-media] .ec-call-controls-active .ec-call-btn.is-danger {
  width: 56px; height: 56px; min-width: 56px; max-width: 56px; min-height: 56px;
  background: #ef4444; border-color: transparent; color: #fff; box-shadow: 0 6px 18px rgba(239, 68, 68, .35);
}
html body .ec-call-overlay[data-phase][data-media] .ec-call-controls-active .ec-call-btn.is-danger svg { width: 24px; height: 24px; transform: rotate(135deg); }
html body .ec-call-overlay[data-phase][data-media] .ec-call-controls-active .ec-call-btn:focus-visible { outline: 2px solid var(--ec-call-accent); outline-offset: 2px; }
html body .ec-call-overlay[data-phase][data-media] .ec-call-controls-active .ec-call-btn:focus-visible svg { outline: 0; }
/* Die Knopf-Regel oben setzt display:flex mit hoher Spezifität — die
   Ausblend-Regeln weiter oben (.ec-call-video-only im Sprachanruf,
   .ec-call-cam-only ohne Kamera) deshalb hier gleich stark wiederholen. */
html body .ec-call-overlay[data-media="audio"][data-phase] .ec-call-controls-active .ec-call-btn.ec-call-video-only,
html body .ec-call-overlay[data-nocam][data-media] .ec-call-controls-active .ec-call-btn.ec-call-cam-only { display: none; }
@media (hover: hover) {
  html body .ec-call-overlay[data-phase][data-media] .ec-call-controls-active .ec-call-btn:not(.is-on):not(.is-off):not(.is-muted):not(.is-danger):hover { background: rgba(255, 255, 255, .25); }
  html body .ec-call-overlay[data-phase][data-media] .ec-call-controls-active .ec-call-btn.is-danger:hover { background: #dc2626; }
}
@media (max-width: 360px) {
  html body .ec-call-overlay[data-phase][data-media] .ec-call-controls-active { gap: 8px; padding: 8px 12px; }
  html body .ec-call-overlay[data-phase][data-media] .ec-call-controls-active .ec-call-btn { width: 46px; height: 46px; min-width: 46px; max-width: 46px; min-height: 46px; }
  html body .ec-call-overlay[data-phase][data-media] .ec-call-controls-active .ec-call-btn.is-danger { width: 52px; height: 52px; min-width: 52px; max-width: 52px; min-height: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  html body .ec-call-overlay[data-phase][data-media] .ec-call-controls-active .ec-call-btn { transition: none; }
}

/* §CALL-GRID-2026-10-18 — Raster/Spotlight wie Meet/FaceTime. Geometrie aus
   ec-calls.js (layoutGrid): .grid-mode = gleichmäßiges Raster (4:3–16:9, letzte
   Reihe mittig, ≤ 1400 px bei zwei Kacheln), .spotlight-mode = .active-stage
   groß + .is-thumb als Filmstreifen ([data-strip] right|bottom). Kacheln
   gleiten über left/top/width/height (Regel oben); .is-resizing friert das
   beim Drehen/Ziehen des Fensters ein. */
.ec-call-grid.is-resizing .ec-call-tile { transition: box-shadow .15s ease, border-color .15s ease; }
.ec-call-tile:focus-visible { outline: 2px solid var(--ec-call-accent); outline-offset: 2px; }
.ec-call-tile.is-speaking { border-width: 2px; }
.ec-call-tile.is-thumb { border-radius: 10px; }
.ec-call-tile.is-thumb .ec-call-tile-label { left: 6px; right: 6px; bottom: 6px; }
.ec-call-tile.is-thumb .ec-call-tile-name { font-size: 11px; padding: 2px 7px; }
.ec-call-tile.is-thumb .ec-call-tile-state { display: none; }
/* Fit: cover randlos (Standard im Raster), contain = ganzes Bild (Bühne,
   Doppeltipp) mit weichgezeichneter Kopie statt schwarzer Balken. */
.ec-call-tile-video { border-radius: inherit; }
.ec-call-tile[data-fit="contain"] .ec-call-tile-video { object-fit: contain; background: transparent; }
.ec-call-tile-backdrop {
  position: absolute; inset: -8%; width: 116%; height: 116%; object-fit: cover; pointer-events: none;
  filter: blur(28px) saturate(1.2) brightness(.55); display: none;
}
.ec-call-tile.is-self .ec-call-tile-backdrop { transform: scaleX(var(--ec-mirror, -1)); }
.ec-call-tile.has-video[data-fit="contain"] .ec-call-tile-backdrop { display: block; }
/* Namensschild: Milchglas-Pille unten links, Mikrofon klein davor
   (weiß; stumm = rot durchgestrichen). */
.ec-call-tile-label { left: 10px; right: 10px; bottom: 10px; }
.ec-call-overlay .ec-call-tile-name {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%; box-sizing: border-box;
  padding: 4px 10px; border-radius: 8px; font-size: 13px; line-height: 1.3; color: #fff;
  background: rgba(0, 0, 0, .55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.ec-call-tile-name-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ec-call-overlay .ec-call-tile-mute { display: grid; width: 14px; height: 14px; background: none; color: rgba(255, 255, 255, .9); }
.ec-call-overlay .ec-call-tile-mute svg { width: 13px; height: 13px; }
.ec-call-overlay .ec-call-tile-mute::after { display: none; height: 15px; background: #ef4444; box-shadow: 0 0 0 1px rgba(0, 0, 0, .55); }
.ec-call-overlay .ec-call-tile.is-muted .ec-call-tile-mute { color: #ef4444; }
.ec-call-overlay .ec-call-tile.is-muted .ec-call-tile-mute::after { display: block; }
/* Nur Ton: Glas-Kachel mit Profilbild bzw. Monogramm im Farbverlauf
   (paintAvatar, --ec-av-hue); beim Sprechen pulsiert ein Ring. */
.ec-call-tile:not(.has-video) {
  background: radial-gradient(120% 90% at 50% 30%, rgba(85, 85, 85, .16) 0%, rgba(12, 12, 12, .92) 70%), #0c0c0c;
  border-color: rgba(255, 255, 255, .1);
}
.ec-call-tile-face {
  position: relative; width: clamp(40px, 34%, 120px); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; letter-spacing: .04em; color: #fff;
  font-size: clamp(16px, 3.2vmin, 34px); text-shadow: 0 1px 4px rgba(0, 0, 0, .35);
  background: linear-gradient(145deg, hsl(var(--ec-av-hue, 265) 62% 50%), hsl(calc(var(--ec-av-hue, 265) + 48) 68% 26%));
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .12);
}
.ec-call-tile { container-type: size; }
@supports (width: 1cqmin) { .ec-call-tile-face { width: clamp(36px, min(34cqw, 52cqh), 120px); font-size: clamp(14px, min(9cqw, 14cqh), 34px); } }
.ec-call-tile-face > .ec-call-initials { position: relative; z-index: 0; }
.ec-call-tile-face > img.caller-avatar {
  position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
  display: block; pointer-events: none; -webkit-user-drag: none;
}
.ec-call-tile-face.has-img > .ec-call-initials { visibility: hidden; }
.ec-call-tile-face::after {
  content: ''; position: absolute; inset: -6px; border-radius: 50%; pointer-events: none;
  border: 2px solid rgba(114, 114, 114, .75); opacity: 0;
}
.ec-call-tile.is-speaking .ec-call-tile-face::after { animation: ec-call-wave 1.4s ease-out infinite; }
@keyframes ec-call-wave {
  0% { transform: scale(1); opacity: .9; }
  100% { transform: scale(1.35); opacity: 0; }
}
/* Zurück zum Raster: dezente Glas-Taste oben rechts auf der Bühne. */
.ec-call-grid-restore {
  position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .16); cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 600; line-height: 1.2; color: #fff; background: rgba(22, 22, 22, .6);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
  transition: opacity .3s ease, background .15s ease;
}
.ec-call-grid-restore[hidden] { display: none; }
.ec-call-grid-restore-ico { font-size: 15px; line-height: 1; }
.ec-call-grid-restore:focus-visible { outline: 2px solid var(--ec-call-accent); outline-offset: 2px; }
@media (hover: hover) { .ec-call-grid-restore:hover { background: rgba(43, 43, 43, .8); } }
.ec-call-overlay[data-chrome-hidden] .ec-call-grid-restore { opacity: 0; pointer-events: none; }

/* §IP-SHIELD-2026-10-18 — grünes Schild „IP-Schutz aktiv (Relay)“ im Anruf. */
.ec-call-ipshield {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: .02em; color: #b8b8b8;
  background: rgba(155, 155, 155, .12); border: 1px solid rgba(184, 184, 184, .45); box-shadow: 0 0 12px rgba(155, 155, 155, .18);
  cursor: help; white-space: nowrap;
}
.ec-call-ipshield[hidden] { display: none !important; }
.ec-call-ipshield svg { flex: none; }
html body .ec-call-overlay[data-media="video"][data-phase="active"] .ec-call-secure .ec-call-ipshield { margin-top: 0; padding: 2px 8px; font-size: 11px; box-shadow: none; }
@media (max-width: 420px) {
  html body .ec-call-overlay[data-media="video"][data-phase="active"] .ec-call-secure .ec-call-ipshield-label { display: none; }
}
