/* §PROFILE-2026-09-24 / §COVER-2026-09-24 — Profil bearbeiten: kreisrunder
 * Avatar, Titelbild-Banner, aufgeraeumtes Formular.
 *
 * WARUM DIESE DATEI: sie wird ALS LETZTE geladen. Revert = ein <link> weg.
 * Regeln fuer die Mobile-Shell tragen #ec-mobile-shell vierfach, weil
 * mobile-overrides.css mit dreifacher ID eskaliert (sonst verlieren sie).
 *
 * URSACHE DER ELLIPSE (behoben): .ec-settings-avatar.ec-av-has setzt
 * `overflow: visible !important` und das Bild liegt `position:absolute;inset:0`.
 * War der Container nicht exakt quadratisch (Flex-Stretch, Hoehe aus dem
 * Inhalt), fuellte das Bild eine rechteckige Box — `border-radius:50%` ergibt
 * darauf ein Oval, kein Kreis. Gegenmittel: feste Kantenlaenge + aspect-ratio
 * + flex-shrink:0 am Container, damit die Box gar nicht rechteckig werden kann.
 */

/* ── Runde Avatar-Container (alle Profil-/Einstellungsflaechen) ───────────── */
.ec-profile-avatar,
.ec-settings-avatar,
.ec-avatar-wrapper,
.ec-tg-avatar,
#profile-avatar-display {
  width: 96px;
  height: 96px;
  min-width: 96px;
  min-height: 96px;
  max-width: 96px;
  max-height: 96px;
  aspect-ratio: 1 / 1;
  flex: 0 0 96px;          /* kein Stretch im Flex-Container = keine Ellipse */
  border-radius: 50% !important;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  position: relative;
  /* Cyber-Glow-Ring */
  border: 2px solid rgba(129, 129, 129, 0.4);
  box-shadow: 0 0 15px rgba(100, 100, 100, 0.35);
  background: var(--bg3, rgba(255, 255, 255, 0.04));
  font-size: 40px;         /* Fallback-Emoji/Initialen mittig und passend gross */
  line-height: 1;
  cursor: pointer;
}

/* Das Bild selbst: fuellt den Kreis, ohne zu verzerren. */
.ec-profile-avatar > img.ec-av-img,
.ec-settings-avatar > img.ec-av-img,
.ec-avatar-wrapper > img.ec-av-img,
.ec-tg-avatar > img.ec-av-img,
#profile-avatar-display > img.ec-av-img {
  width: 100%;
  height: 100%;
  object-fit: cover !important;
  display: block;
  border-radius: 50%;
}

/* ec-settings-tg.css setzt bei vorhandenem Bild `overflow: visible !important`
 * (damit das Kamera-Badge ueberstehen darf). Das Badge liegt hier ausserhalb
 * des Kreises in einem eigenen Wrapper, also darf der Kreis clippen. */
.ec-profile-avatar.ec-av-has,
.ec-settings-avatar.ec-av-has,
.ec-avatar-wrapper.ec-av-has {
  overflow: hidden !important;
}

/* Gleiche Regeln innerhalb der Mobile-Shell (vierfache ID gegen die
 * Spezifitaetseskalation in mobile-overrides.css). */
html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ec-profile-avatar,
html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ec-settings-avatar,
html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ec-avatar-wrapper {
  width: 96px; height: 96px; min-width: 96px; min-height: 96px; max-width: 96px; max-height: 96px;
  aspect-ratio: 1 / 1; flex: 0 0 96px; border-radius: 50% !important; overflow: hidden !important;
  display: flex; align-items: center; justify-content: center; box-sizing: border-box;
  border: 2px solid rgba(129, 129, 129, 0.4); box-shadow: 0 0 15px rgba(100, 100, 100, 0.35);
}
html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ec-profile-avatar > img.ec-av-img,
html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ec-settings-avatar > img.ec-av-img,
html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ec-avatar-wrapper > img.ec-av-img {
  width: 100%; height: 100%; object-fit: cover !important; border-radius: 50%; display: block;
}

/* ── Titelbild (Banner) + Avatar davor ───────────────────────────────────── */
.ec-cover-head {
  position: relative;
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  isolation: isolate;          /* eigener Stacking-Context, kein z-index-Krieg */
}
/* Randlos NUR im Profil-Untermenue: dessen Container traegt inline
 * `padding:20px` (index.html:4242), der Wert ist also bekannt und stabil.
 * Absichtlich an diese eine ID gebunden statt global negative Margins zu
 * setzen — auf einer Flaeche mit anderem Innenabstand waere das sonst
 * horizontaler Ueberlauf (in diesem Projekt eine wiederkehrende Fehlerklasse). */
#profile-sub-content > .ec-cover-head {
  margin: -20px -20px 0;
  border-radius: 0;
}
.ec-cover-band {
  position: relative;
  /* §GROUP-HERO-2026-09-25: 170px — dieselbe Hoehe wie .ec-ci-banner in der
   * Kontakt- und Gruppenansicht. Vorher 160px: das eigene Profil war um 10px
   * flacher als jedes fremde, obwohl es dasselbe Bauteil zeigen soll.
   * Das gespeicherte Bild ist 1200x450 (8:3); background-size:cover schneidet
   * mittig zu. */
  height: 170px;
  border-radius: 16px 16px 0 0;          /* obere Ecken wie im Hero */
  overflow: hidden;
  background-color: var(--bg3, #14141c);
  background-image: linear-gradient(135deg, rgba(120, 120, 120, 0.35), rgba(175, 175, 175, 0.18));
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  cursor: pointer;
}
/* Mit Bild: den Farbverlauf abschalten, sonst liegt er ueber dem Foto. */
.ec-cover-band.ec-cover-has { background-image: none; }
.ec-cover-band.ec-cover-has::after {
  /* Leseschutz fuer das Kamera-Badge auf hellen Bildern. */
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.45));
}
.ec-cover-band.ec-av-busy { opacity: .6; }

/* Kamera-Badge des Titelbilds, oben rechts. */
.ec-cover-edit {
  position: absolute;
  top: 10px; right: 10px;
  z-index: 2;
  min-height: 36px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(10, 10, 16, 0.55);
  backdrop-filter: blur(6px);
  color: #fff; font-size: 12px; font-weight: 600; line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

/* Avatar sitzt halb ueber der Bandunterkante (Telegram/Twitter-Muster). */
.ec-cover-avatar-slot {
  display: flex;
  justify-content: center;
  margin-top: -48px;           /* halbe Avatarhoehe */
  position: relative;
  z-index: 3;
}
/* §HERO-UNIVERSAL-2026-09-24: Rahmen auf #12141f — IDENTISCH zum Hero in
 * .ec-ci-avatar (Einstiege B/C/D). Vorher war hier ein violetter Cyber-Ring
 * (rgba(110,86,207,.8)) aus einem frueheren Sprint: das eigene Profil sah damit
 * anders aus als jedes fremde, obwohl beide dasselbe Bauteil zeigen sollen.
 * Der dunkle Rahmen schneidet den Avatar aus dem Banner aus, statt einen
 * zweiten Farbton einzufuehren. Die vierfache #ec-mobile-shell-ID ist noetig,
 * weil die Mobile-Shell sonst spezifischer ist (bekannte Kaskadenfalle). */
.ec-avatar-wrapper {
  border: 3px solid #141414 !important;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}
html body #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ec-avatar-wrapper {
  border: 3px solid #141414 !important;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}
.ec-avatar-badge {
  position: absolute;
  right: calc(50% - 48px);
  bottom: 0;
  z-index: 4;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--accent, #717171);
  border: 2px solid var(--bg, #0a0a10);
  color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* ── Formular ────────────────────────────────────────────────────────────── */
.ec-profile-form { display: flex; flex-direction: column; gap: 16px; margin-top: 18px; }
.ec-profile-field > label {
  display: block; font-size: 12px; font-weight: 600; letter-spacing: .02em;
  color: var(--text2, #a0a0a0); margin-bottom: 6px;
}
.ec-profile-input,
.ec-profile-textarea {
  width: 100%; box-sizing: border-box;
  background: var(--bg2, #12121a);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  border-radius: 12px;
  padding: 13px 14px;
  color: var(--text, #f2f3f8);
  font-size: 15px;             /* >= 16px waere iOS-zoomfrei; 15px + touch-Regel unten */
  font-family: inherit;
  outline: none;
}
.ec-profile-textarea { resize: vertical; min-height: 84px; line-height: 1.5; }
.ec-profile-input:focus,
.ec-profile-textarea:focus { border-color: var(--accent, #717171); }
@media (pointer: coarse) {
  /* iOS zoomt bei < 16px in das Feld hinein. */
  .ec-profile-input, .ec-profile-textarea { font-size: 16px; }
}
.ec-profile-hint { font-size: 11px; color: var(--text2, #a0a0a0); margin-top: 5px; line-height: 1.45; }
.ec-profile-hint.is-locked { color: #c1c1c1; }
.ec-profile-counter { font-size: 11px; color: var(--text2, #a0a0a0); margin-top: 5px; text-align: right; }

/* Gesperrtes @Name-Feld: sichtbar inaktiv, aber lesbar (nicht ausgegraut bis
 * zur Unleserlichkeit — die Kennung muss man abtippen koennen). */
.ec-profile-locked {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg2, #12121a);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  border-radius: 12px;
  padding: 0 10px 0 14px;
}
.ec-profile-locked > input {
  flex: 1; min-width: 0;
  background: transparent; border: 0; outline: none;
  color: var(--text, #f2f3f8);
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 15px; padding: 13px 0;
  cursor: not-allowed;
}
.ec-profile-lock-pill {
  flex-shrink: 0;
  font-size: 11px; font-weight: 700; white-space: nowrap;
  color: #afafaf;
  background: rgba(175, 175, 175, 0.1);
  border: 1px solid rgba(175, 175, 175, 0.3);
  border-radius: 8px; padding: 4px 8px;
}
.ec-profile-copy {
  flex-shrink: 0;
  min-width: 40px; min-height: 40px;
  display: grid; place-items: center;
  border-radius: 10px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  background: var(--bg3, rgba(255, 255, 255, 0.04));
  color: var(--text, #f2f3f8); font-size: 15px; cursor: pointer;
}
.ec-profile-save {
  width: 100%; min-height: 50px;
  border: 0; border-radius: 14px;
  background: var(--accent, #717171);
  color: #fff; font-size: 15px; font-weight: 700;
  cursor: pointer; margin-top: 2px;
}
.ec-profile-save[disabled] { opacity: .55; cursor: default; }
.ec-profile-e2ee {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 11px; color: #a4a4a4;
  background: rgba(164, 164, 164, 0.07);
  border: 1px solid rgba(164, 164, 164, 0.22);
  border-radius: 10px; padding: 8px 10px; margin-top: 6px;
}

/* Aktionsmenue (Avatar/Titelbild): Hochladen / Entfernen / Abbrechen. */
.ec-img-sheet { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.ec-img-sheet > button {
  width: 100%; min-height: 50px;
  display: flex; align-items: center; gap: 10px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  background: var(--bg2, #12121a);
  color: var(--text, #f2f3f8);
  font-size: 15px; font-weight: 600; text-align: left; cursor: pointer;
}
.ec-img-sheet > button.is-danger {
  color: #ff2d55; border-color: rgba(255, 45, 85, 0.45); background: rgba(255, 45, 85, 0.08);
}
.ec-img-sheet > button[disabled] { opacity: .45; cursor: default; }

/* ══ §PROFILE-2026-09-24 (Sprint 2): Profil als ruhige Telegram-Seite ════════
 * Ursachen der "verschachtelten Kästen" (gemessen, nicht geraten):
 *  1. claude-loggedin.css und app.css rahmen JEDES direkte Kind von
 *     #profile-sub-content als Karte (Radius, Rand, Verlauf, Hover-Lift) —
 *     Banner, Formular und Sicherheitsliste wurden so Kasten-in-Kasten.
 *  2. #profile-sub-content ist eine scrollende Flex-Spalte. .ec-cover-head hat
 *     overflow:hidden → min-height:auto entfällt → das Banner schrumpfte auf
 *     0 px und war unsichtbar. Gegenmittel: flex-shrink:0 für alle Kinder.
 * Alles hängt an der Klasse .ec-profile-page, die openProfileSub() nur für
 * die Kategorie "account" setzt; die übrigen Unterseiten bleiben unverändert.
 * Doppelte ID schlägt die !important-Regeln mit einfacher ID. */
html body #profile-sub-modal#profile-sub-modal.ec-profile-page #profile-sub-content {
  padding: 0 0 calc(24px + env(safe-area-inset-bottom, 0px)) !important;
  gap: 0 !important;
}
html body #profile-sub-modal#profile-sub-modal.ec-profile-page #profile-sub-content > * {
  flex-shrink: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: none !important;
  box-shadow: none !important;
  transform: none !important;
}
html body #profile-sub-modal#profile-sub-modal.ec-profile-page #profile-sub-content > .ec-cover-head { margin: 0 !important; }
html body #profile-sub-modal#profile-sub-modal.ec-profile-page .ec-profile-form,
html body #profile-sub-modal#profile-sub-modal.ec-profile-page .ec-pf-group { padding: 0 16px; }
html body #profile-sub-modal#profile-sub-modal.ec-profile-page .ec-profile-form { margin-top: 14px; }

/* Die Modal-Regeln setzen auf alle input/textarea Radius 16 + eigenen Rand;
 * im gesperrten @Name-Feld ergab das einen Kasten IM Kasten. */
html body #profile-sub-modal#profile-sub-modal .ec-profile-locked > input {
  border: 0 !important; background: transparent !important; box-shadow: none !important;
  border-radius: 0 !important; padding: 13px 0 !important; min-width: 0 !important;
  color: var(--text, #f2f3f8) !important; opacity: 1 !important; -webkit-text-fill-color: currentColor;
}
html body #profile-sub-modal#profile-sub-modal .ec-profile-input,
html body #profile-sub-modal#profile-sub-modal .ec-profile-textarea {
  border-radius: 12px !important;
  background: var(--bg2, #12121a) !important;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1)) !important;
}
html body #profile-sub-modal#profile-sub-modal .ec-profile-input:focus,
html body #profile-sub-modal#profile-sub-modal .ec-profile-textarea:focus { border-color: var(--accent, #717171) !important; }
html body #profile-sub-modal#profile-sub-modal .ec-profile-field > label {
  text-transform: none !important; letter-spacing: .02em !important; font-size: 12px !important;
}

/* Handy: Vollbild-Seite statt schwebender Karte (Telegram). 899px = dieselbe
 * Grenze wie die Mobile-Shell (siehe Tablet-Split). */
@media (max-width: 899px) {
  html body #profile-sub-modal#profile-sub-modal.ec-profile-page.active {
    padding: 0 !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    background: var(--bg, #0a0a10) !important;
  }
  html body #profile-sub-modal#profile-sub-modal.ec-profile-page > .modal {
    width: 100% !important; max-width: 100% !important;
    height: 100% !important; max-height: 100% !important; min-height: 100% !important;
    margin: 0 !important;
    border-radius: 0 !important; border: 0 !important; box-shadow: none !important;
    background: var(--bg, #0a0a10) !important;
    padding: env(safe-area-inset-top, 0px) 0 0 !important;   /* Banner randlos */
    transform: none !important;
  }
}

/* Knopf-Beschriftung im Banner: dezent, oben rechts. */
.ec-cover-edit > span:last-child { letter-spacing: .01em; }

/* ── Technische Sicherheit: EINE Listengruppe ─────────────────────────────── */
.ec-pf-group { margin-top: 26px; }
.ec-pf-group-title {
  margin: 0 0 8px 4px;
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text2, #a0a0a0);
}
.ec-pf-card {
  border-radius: 14px; overflow: hidden;
  background: var(--bg2, #12121a);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
}
.ec-pf-row {
  position: relative;
  width: 100%; min-height: 58px; box-sizing: border-box;
  display: flex; align-items: center; gap: 12px;
  padding: 9px 14px;
  background: transparent; border: 0; border-radius: 0;
  color: var(--text, #f2f3f8); font: inherit; text-align: left;
}
button.ec-pf-row { cursor: pointer; }
button.ec-pf-row:active { background: rgba(255, 255, 255, 0.05); }
button.ec-pf-row:focus-visible { outline: 2px solid var(--accent, #717171); outline-offset: -2px; }
/* Eingerückte Trennlinie: beginnt hinter der Icon-Kachel (14 + 32 + 12). */
.ec-pf-row + .ec-pf-row::before {
  content: ''; position: absolute; top: 0; left: 58px; right: 0;
  height: 1px; background: var(--border, rgba(255, 255, 255, 0.08));
}
.ec-pf-ico {
  flex: 0 0 32px; width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: var(--pf, #6f6f6f);
  font-size: 16px; line-height: 1;
}
.ec-pf-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ec-pf-txt > strong { font-size: 15px; font-weight: 600; color: var(--text, #f2f3f8); }
.ec-pf-txt > small { font-size: 12px; line-height: 1.35; color: var(--text2, #a0a0a0); overflow-wrap: anywhere; }
.ec-pf-mono { font-family: var(--font-mono, ui-monospace, monospace); color: var(--accent, #717171) !important; }
.ec-pf-chev { flex: 0 0 18px; width: 18px; height: 18px; color: var(--text2, #a0a0a0); opacity: .7; }
.ec-pf-val { flex-shrink: 0; font-size: 14px; opacity: .8; }

/* 2FA-Schalter: updateTwoFaStatus() setzt Knopf-Transform/-Farbe inline. */
.ec-pf-switch { position: relative; flex: 0 0 48px; width: 48px; height: 26px; cursor: pointer; }
.ec-pf-switch > input { position: absolute; opacity: 0; width: 0; height: 0; }
.ec-pf-switch > #twofa-slider {
  position: absolute; inset: 0; border-radius: 13px;
  background: var(--bg3, rgba(255, 255, 255, 0.06));
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  display: flex; align-items: center; padding: 0 3px; transition: background .25s;
}
.ec-pf-switch #twofa-knob {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--text2, #a0a0a0); transition: transform .25s, background .25s;
}
.ec-pf-switch > input:focus-visible + #twofa-slider { outline: 2px solid var(--accent, #717171); outline-offset: 2px; }

/* ══ §POLL-EVENT-E2EE-2026-09-24 — Abstimmungs- und Ereignis-Kacheln ═══════
 * Die Kacheln erscheinen in DREI Flaechen (versteckte Legacy-Liste #messages,
 * Mobile-Spiegel .ecm-msg, Desktop-Spiegel .ecf-live-message) — deshalb rein
 * klassenbasiert und ohne Annahmen ueber den Elternknoten. */
.ec-poll-card, .ec-event-card {
  width: 100%;
  max-width: 320px;
  box-sizing: border-box;
  background: var(--bg2, #12121a);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  border-radius: 14px;
  padding: 12px 13px;
  text-align: left;
}
.ec-poll-head { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 10px; }
.ec-poll-ico { font-size: 16px; line-height: 1.3; flex-shrink: 0; }
.ec-poll-q { font-size: 14px; font-weight: 700; color: var(--text, #f2f3f8); line-height: 1.35; word-break: break-word; }
.ec-poll-opts { display: flex; flex-direction: column; gap: 7px; }
.ec-poll-opt {
  width: 100%; box-sizing: border-box;
  display: block; position: relative;
  background: var(--bg3, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  border-radius: 10px;
  padding: 9px 11px;
  color: var(--text, #f2f3f8);
  font-family: inherit; font-size: 13px; text-align: left;
  cursor: pointer;
}
.ec-poll-opt.is-picked { border-color: var(--accent, #717171); background: rgba(113, 113, 113, 0.12); }
.ec-poll-opt-row { display: flex; align-items: center; gap: 8px; }
.ec-poll-mark { flex-shrink: 0; color: var(--accent, #717171); font-size: 13px; }
.ec-poll-label { flex: 1; min-width: 0; word-break: break-word; }
.ec-poll-pct { flex-shrink: 0; font-size: 12px; font-weight: 700; color: var(--text2, #a0a0a0); font-variant-numeric: tabular-nums; }
.ec-poll-bar {
  display: block; margin-top: 7px; height: 4px; border-radius: 3px;
  background: rgba(255, 255, 255, 0.08); overflow: hidden;
}
.ec-poll-bar-fill {
  display: block; height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--accent, #717171), #afafaf);
  transition: width .25s ease;
}
.ec-poll-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 10px; font-size: 11px; color: var(--text2, #a0a0a0);
}
.ec-poll-e2ee { color: #a4a4a4; white-space: nowrap; }

/* Ereignis */
.ec-event-head { display: flex; align-items: center; gap: 11px; }
.ec-event-cal {
  flex-shrink: 0; width: 46px; height: 46px; border-radius: 11px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(113, 113, 113, 0.14); border: 1px solid rgba(113, 113, 113, 0.35);
  line-height: 1.05;
}
.ec-event-cal b { font-size: 17px; color: var(--text, #f2f3f8); }
.ec-event-cal small { font-size: 10px; text-transform: uppercase; color: var(--text2, #a0a0a0); }
.ec-event-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ec-event-title { font-size: 14px; font-weight: 700; color: var(--text, #f2f3f8); word-break: break-word; }
.ec-event-when { font-size: 12px; color: var(--text2, #a0a0a0); }
.ec-event-desc {
  margin: 9px 0 0; font-size: 12px; line-height: 1.45;
  color: var(--text2, #a0a0a0); word-break: break-word;
}
.ec-event-actions { display: flex; gap: 8px; margin-top: 11px; }
.ec-event-btn {
  flex: 1; min-height: 38px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 10px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  background: var(--bg3, rgba(255, 255, 255, 0.04));
  color: var(--text, #f2f3f8);
  font-family: inherit; font-size: 12px; font-weight: 600;
  cursor: pointer;
}
.ec-event-btn.is-yes { border-color: #a4a4a4; background: rgba(164, 164, 164, 0.14); }
.ec-event-btn.is-no { border-color: #ff2d55; background: rgba(255, 45, 85, 0.12); }
.ec-event-count {
  min-width: 20px; padding: 1px 5px; border-radius: 7px;
  background: rgba(255, 255, 255, 0.1); font-variant-numeric: tabular-nums;
}

/* ══ §CHAT-TYPE-2026-09-24 — Kontaktinfo (1:1) + Chat-Löschen-Dialog ═══════
 * Einheitliche dunkle Telegram-Karten. Bewusst KEINE farbigen Flächenblöcke:
 * die bunten Streifen im alten Menü entstanden dort, wo Emoji und Text in
 * derselben Zeile unterschiedliche Hintergründe erbten. Hier trägt nur die
 * 36x36-Icon-Kachel einen (neutralen) Hintergrund, die Zeile selbst genau einen. */
.ec-ci-hero { text-align: center; padding: 6px 0 18px; }
/* §HERO-UNIVERSAL-2026-09-24: Rahmenfarbe auf #12141f (Owner-Vorgabe) — der
   Avatar schneidet damit sauber aus dem Banner aus, statt einen zweiten
   Farbring einzufuehren. aspect-ratio haelt den Kreis auch dann rund, wenn eine
   uebergeordnete Flexbox die Hoehe stauchen wuerde; die !important sind noetig,
   weil die Mobile-Shell mit wiederholten #ec-mobile-shell-IDs spezifischer ist. */
.ec-ci-avatar {
  width: 96px !important; height: 96px !important; aspect-ratio: 1 / 1;
  margin: 0 auto 12px;
  border-radius: 50% !important; overflow: hidden !important;
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; line-height: 1; flex: 0 0 96px;
  background: var(--bg3, rgba(255, 255, 255, 0.05));
  border: 3px solid #141414;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}
.ec-ci-avatar-img { width: 100%; height: 100%; object-fit: cover !important; display: block; border-radius: 50%; }
.ec-ci-name { font-size: 19px; font-weight: 700; color: var(--text, #f2f3f8); word-break: break-word; }
.ec-ci-handle { font-size: 13px; color: var(--accent, #717171); font-family: var(--font-mono, monospace); margin-top: 3px; }
.ec-ci-badge {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 10px;
  font-size: 11px; color: #a4a4a4;
  background: rgba(164, 164, 164, 0.08); border: 1px solid rgba(164, 164, 164, 0.22);
  border-radius: 999px; padding: 5px 11px;
}
.ec-ci-dot { width: 6px; height: 6px; border-radius: 50%; background: #a4a4a4; }

.ec-ci-section {
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text2, #a0a0a0); font-weight: 700;
  margin: 18px 0 8px 4px;
}
.ec-ci-section--danger { color: #ff2d55; }

/* Eine Zeile = EINE Karte. Gleiche Maße für Zeilen und Buttons, damit kein
 * Höhensprung entsteht (der ließ die alten Blöcke versetzt wirken). */
.ec-ci-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; box-sizing: border-box;
  padding: 14px 16px; margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  color: var(--text, #f2f3f8);
  font-family: inherit; font-size: 14px; text-align: left;
}
.ec-ci-card--btn { cursor: pointer; }
.ec-ci-card--btn:hover { background: rgba(255, 255, 255, 0.05); }
.ec-ci-card--stack { display: block; }
.ec-ci-stackhead { display: flex; align-items: center; gap: 12px; }

/* Standardisierte Icon-Kachel: fester Platz, damit der Text nie umfließt. */
.ec-ci-ico {
  flex: 0 0 36px; width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; font-size: 18px; line-height: 1;
  background: rgba(255, 255, 255, 0.05);
}
.ec-ci-label { flex: 1; min-width: 0; font-weight: 600; }
.ec-ci-value { flex-shrink: 0; color: var(--text2, #a0a0a0); font-variant-numeric: tabular-nums; }
.ec-ci-chev { flex-shrink: 0; color: var(--text2, #a0a0a0); }
.ec-ci-select {
  flex-shrink: 0; max-width: 58%;
  background: var(--bg2, #12121a); color: var(--text, #f2f3f8);
  border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 10px;
  padding: 8px 10px; font: inherit; font-size: 13px;
}
.ec-ci-fp {
  margin-top: 10px; padding: 12px;
  background: rgba(0, 0, 0, 0.25); border-radius: 10px;
  font-family: var(--font-mono, monospace); font-size: 15px; letter-spacing: .08em;
  text-align: center; color: var(--text, #f2f3f8); word-break: break-word;
}
.ec-ci-note { margin: 8px 0 0; font-size: 11px; line-height: 1.5; color: var(--text2, #a0a0a0); }
.ec-ci-danger { color: #ff2d55; border-color: rgba(255, 45, 85, 0.3); background: rgba(255, 45, 85, 0.06); }
.ec-ci-danger .ec-ci-ico { background: rgba(255, 45, 85, 0.12); }
.ec-ci-danger:hover { background: rgba(255, 45, 85, 0.1); }

/* Chat-Löschen-Dialog */
.ec-del-modal { max-width: 400px; text-align: center; }
.ec-del-avatar {
  width: 76px; height: 76px; margin: 4px auto 14px;
  border-radius: 50%; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 700;
  background: var(--bg3, rgba(255, 255, 255, 0.05));
  border: 2px solid rgba(255, 45, 85, 0.5);
}
.ec-del-title { margin: 0 0 8px; font-size: 18px; font-weight: 700; color: var(--text, #f2f3f8); }
.ec-del-text { margin: 0 0 18px; font-size: 14px; line-height: 1.5; color: var(--text2, #a0a0a0); }
.ec-del-actions { display: flex; flex-direction: column; gap: 8px; }
.ec-del-btn {
  width: 100%; min-height: 48px;
  border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text, #f2f3f8); font-family: inherit; font-size: 15px; font-weight: 600;
  cursor: pointer;
}
.ec-del-btn--danger { color: #ff2d55; border-color: rgba(255, 45, 85, 0.45); background: rgba(255, 45, 85, 0.1); }
.ec-del-btn--ghost { background: none; border-color: transparent; color: var(--text2, #a0a0a0); }
.ec-del-btn[disabled] { opacity: .5; cursor: default; }

/* Sanftes Ausblenden der gelöschten Chat-Kachel. */
.ec-fade-out { animation: ecFadeOut .25s ease forwards; pointer-events: none; }
@keyframes ecFadeOut {
  to { opacity: 0; transform: translateX(-12px); max-height: 0; margin: 0; padding-top: 0; padding-bottom: 0; }
}

/* ══ §PEER-HERO-2026-09-24 — Kontaktinfo mit Banner, Avatar, Bio ═══════════ */
.ec-ci-hero2 { margin: -20px -20px 0; text-align: center; }
.ec-ci-banner {
  height: 170px;                         /* Vorgabe 170–190 px */
  /* §GROUP-HERO-2026-09-25: abgerundete OBERE Ecken laut Vorgabe. Unten bleibt
     eckig, weil direkt darunter die Karten anschliessen — dort wuerde eine
     Rundung eine sichtbare Lücke zum Inhalt reissen. */
  border-radius: 16px 16px 0 0;
  overflow: hidden;                      /* sonst stehen die Bildecken über */
  background-color: var(--bg3, #14141c);
  background-image: linear-gradient(135deg, rgba(120, 120, 120, .38), rgba(175, 175, 175, .2));
  background-size: cover; background-position: center; background-repeat: no-repeat;
  cursor: pointer;
}
.ec-ci-banner.ec-cover-has { background-image: none; }
.ec-ci-avatar-wrap { display: flex; justify-content: center; margin-top: -48px; position: relative; z-index: 2; }
.ec-ci-hero2 .ec-ci-avatar {
  width: 96px; height: 96px; min-width: 96px; min-height: 96px;
  aspect-ratio: 1 / 1; border-radius: 50% !important; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 38px; line-height: 1; margin: 0;
  background: var(--bg3, rgba(255, 255, 255, .05));
  border: 3px solid #141414;
  box-shadow: 0 0 20px rgba(0, 0, 0, .8);
  cursor: pointer;
}
.ec-ci-hero2 .ec-ci-name { font-size: 20px; font-weight: 700; margin-top: 10px; }
.ec-ci-hero2 .ec-ci-handle { font-size: 14px; color: var(--text2, #a0a0a0); margin-bottom: 16px; }

/* Quick-Actions */
.ec-ci-quick { display: flex; gap: 10px; justify-content: center; margin: 0 0 18px; }
.ec-ci-qbtn {
  flex: 1; max-width: 108px; min-height: 62px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border-radius: 14px; cursor: pointer;
  background: rgba(120, 120, 120, .1);
  border: 1px solid rgba(120, 120, 120, .28);
  color: var(--text, #f2f3f8); font-family: inherit;
}
.ec-ci-qbtn span { font-size: 19px; line-height: 1; }
.ec-ci-qbtn small { font-size: 11px; color: var(--text2, #a0a0a0); }
.ec-ci-qbtn:hover { background: rgba(120, 120, 120, .16); }

/* Bio-Kachel */
.ec-ci-bio {
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(113, 113, 113, .35);
  border-radius: 14px; padding: 14px 16px; margin-bottom: 8px;
}
.ec-ci-biotext { margin: 0; font-size: 14px; line-height: 1.55; color: var(--text, #f2f3f8); word-break: break-word; }
.ec-ci-biotext--muted { color: var(--text2, #a0a0a0); font-size: 13px; }
.ec-ci-biobadge {
  display: inline-block; margin-top: 10px; font-size: 11px; color: #a4a4a4;
  background: rgba(164, 164, 164, .08); border: 1px solid rgba(164, 164, 164, .22);
  border-radius: 999px; padding: 4px 10px;
}
.ec-ci-biobadge--plain { color: #c1c1c1; background: rgba(193, 193, 193, .08); border-color: rgba(193, 193, 193, .22); }

/* Verfalls-Schieberegler mit violett-blauem Balken */
.ec-ci-slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 6px; margin: 14px 0 6px;
  border-radius: 999px; outline: none; cursor: pointer;
  background: linear-gradient(90deg, #787878, #afafaf);
}
.ec-ci-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; border: 3px solid #787878; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .5);
}
.ec-ci-slider::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; border: 3px solid #787878; cursor: pointer;
}
.ec-ci-scale { display: flex; justify-content: space-between; font-size: 10px; color: var(--text2, #a0a0a0); }


/* ══════════════════════════════════════════════════════════════════════════════
   §HERO-UNIVERSAL-2026-09-24 — Identitaets-, Krypto- und Meldekomponenten
   ══════════════════════════════════════════════════════════════════════════════ */

/* Identitaetskarten: gleiche dunkle Karte wie die uebrigen Zeilen, damit im
   Menue kein zweiter Farbton entsteht. */
.ec-ci-card--id,
.ec-ci-card--crypto {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
}
.ec-ci-idcol { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.ec-ci-idcol small { font-size: 11px; color: var(--text2, #a0a0a0); letter-spacing: .02em; }
.ec-ci-idcol strong {
  font-size: 15px; font-weight: 700; color: var(--text, #f2f3f8);
  /* Lange Namen duerfen die Karte nicht sprengen — aber auch nicht mitten im
     Zeichen abschneiden. */
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ec-ci-copy {
  flex: 0 0 auto; min-height: 36px; padding: 0 12px;
  border-radius: 10px; cursor: pointer;
  font: inherit; font-size: 12px; font-weight: 700;
  color: var(--accent, #717171);
  background: rgba(113, 113, 113, 0.12);
  border: 1px solid rgba(113, 113, 113, 0.28);
}
.ec-ci-copy:active { transform: scale(.97); }

/* Krypto-Badge: gruenes Haekchen, aber in derselben Karte wie alles andere. */
.ec-ci-card--crypto { border-color: rgba(164, 164, 164, 0.22); background: rgba(164, 164, 164, 0.05); }
.ec-ci-card--crypto .ec-ci-idcol strong { color: #a4a4a4; letter-spacing: .04em; text-transform: uppercase; font-size: 13px; }
.ec-ci-card--crypto .ec-ci-idcol small { white-space: normal; }

/* ── Melde-Dialog ─────────────────────────────────────────────────────────── */
.ec-report-overlay {
  position: fixed; inset: 0; z-index: 2147483000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px calc(16px + env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) calc(16px + env(safe-area-inset-left, 0px));
  background: rgba(6, 6, 6, 0.74);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.ec-report-box {
  width: min(420px, 100%); max-height: min(86vh, 720px); overflow-y: auto;
  background: var(--bg2, #141414);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px; padding: 18px 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
}
.ec-report-box h3 { margin: 0 0 10px; font-size: 17px; color: var(--text, #f2f3f8); }
.ec-report-target { font-size: 13px; color: var(--text2, #a0a0a0); margin: 0 0 14px; word-break: break-word; }
.ec-report-target--none { color: #a9a9a9; }
.ec-report-reasons { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.ec-report-reason {
  display: flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 12px;        /* 48 px = Touch-Mindestmass */
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px; cursor: pointer;
  font-size: 14px; color: var(--text, #f2f3f8);
}
.ec-report-reason input { accent-color: var(--accent, #717171); width: 18px; height: 18px; flex: 0 0 auto; }
.ec-report-block {
  display: flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 12px; margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px; cursor: pointer;
  font-size: 14px; color: var(--text, #f2f3f8);
}
.ec-report-block input { accent-color: var(--accent, #717171); width: 18px; height: 18px; flex: 0 0 auto; }
.ec-report-note { font-size: 11.5px; line-height: 1.55; color: var(--text2, #a0a0a0); margin: 0 0 16px; }
.ec-report-actions { display: flex; gap: 10px; }
.ec-report-actions button {
  flex: 1; min-height: 48px; border-radius: 12px; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 700;
}
.ec-report-cancel {
  background: rgba(255, 255, 255, 0.05); color: var(--text, #f2f3f8);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.ec-report-send {
  background: linear-gradient(135deg, #e74c3c, #c0392b); color: #fff; border: 0;
}
.ec-report-send[disabled] { opacity: .5; cursor: not-allowed; }

/* ══════════════════════════════════════════════════════════════════════════════
   §UI-POLISH-2026-09-24 — Basis-Stile für das Gruppen-Menü (.gs-*)
   ══════════════════════════════════════════════════════════════════════════════
   GEFUNDENER ZUSTAND (am Gerät gemessen, 390 px):
   Sämtliche .gs-*-Regeln existierten NUR in desktop-overrides.css und dort
   vollständig innerhalb von @media (min-width: 769px). Auf dem Handy gab es
   also KEINE Regel: .gs-item-icon war ein Div ohne Maße und wurde als Flex-Kind
   auf die volle Zeilenbreite gestreckt. Da die Icons ihre Farbe per Inline-Style
   tragen (rgba(255,165,0,…), rgba(124,106,247,…), rgba(34,211,238,…) …),
   entstanden daraus genau die gelben, lila und blauen Querstreifen — gemessen
   269×23 px statt 36×36.
   Die Farben selbst sind KEIN Fehler und bleiben: sie unterscheiden die
   Menüpunkte. Fehlerhaft war nur die fehlende Größe.
   Diese Regeln stehen bewusst ohne Media-Gate (mobile-first) und werden auf
   Desktop von den bestehenden !important-Regeln überschrieben.
   ══════════════════════════════════════════════════════════════════════════════ */
#group-settings-modal .gs-item,
#group-admin-modal .gs-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;                     /* Touch-Ziel */
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  margin-bottom: 8px;
  cursor: pointer;
  box-sizing: border-box;
}
/* DER eigentliche Fix: feste Kachel statt gestreckter Streifen. */
#group-settings-modal .gs-item-icon,
#group-admin-modal .gs-item-icon {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  box-sizing: border-box;
}
#group-settings-modal .gs-item-text,
#group-admin-modal .gs-item-text { flex: 1; min-width: 0; }
#group-settings-modal .gs-item-title,
#group-admin-modal .gs-item-title {
  font-size: 14px; font-weight: 700; color: var(--text, #f2f3f8);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#group-settings-modal .gs-item-sub,
#group-admin-modal .gs-item-sub {
  font-size: 11.5px; color: var(--text2, #a0a0a0); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#group-settings-modal .gs-item-arrow,
#group-admin-modal .gs-item-arrow { flex: 0 0 auto; color: var(--text2, #a0a0a0); font-size: 18px; }
#group-settings-modal .gs-item-right,
#group-admin-modal .gs-item-right { flex: 0 0 auto; font-size: 12px; color: var(--text2, #a0a0a0); }
#group-settings-modal .gs-section-title,
#group-admin-modal .gs-section-title {
  font-size: 11px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--text2, #a0a0a0); padding: 14px 4px 6px;
  font-family: var(--font-mono, monospace);
}
/* Mitgliederzeile: gleiche Kartenform, Avatar nicht streckbar. */
#group-settings-modal .gs-member-row,
#group-admin-modal .gs-member-row { min-height: 56px; box-sizing: border-box; }
#group-settings-modal .gs-member-avatar,
#group-admin-modal .gs-member-avatar {
  flex: 0 0 38px; width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
#group-settings-modal .gs-member-name,
#group-admin-modal .gs-member-name {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════════════════════════
   §GROUP-HERO-2026-09-25 — Gruppen-Hero (dasselbe Bauteil wie die Kontaktansicht)
   ══════════════════════════════════════════════════════════════════════════════
   Der Hero nutzt bewusst .ec-ci-hero2 / .ec-ci-banner / .ec-ci-avatar aus dem
   Kontakt-Hero — ein Bauteil, drei Einsatzorte. Hier stehen nur die Ergänzungen,
   die es NUR bei Gruppen (und im eigenen Profil) gibt: die Bearbeiten-Knöpfe.
   Reguläre Mitglieder bekommen sie nicht gerendert; die Serverroute weist eine
   Änderung ohnehin mit 403 ab — das Ausblenden ist Höflichkeit, nicht die
   Sicherheitsmaßnahme.
   ══════════════════════════════════════════════════════════════════════════════ */
.ec-ci-hero2--group { position: relative; }

/* Aktionen oben rechts im Banner, halbtransparent über dem Bild. */
.ec-gh-coveractions {
  position: absolute;
  top: calc(10px + env(safe-area-inset-top, 0px));
  right: 10px;
  display: flex;
  gap: 8px;
  z-index: 4;
}
.ec-gh-coverbtn {
  min-height: 36px;                       /* Touch-Ziel, ohne den Banner zu füllen */
  padding: 0 12px;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  /* Halbtransparent + Blur: bleibt auf hellen UND dunklen Titelbildern lesbar.
     Ein voll deckender Knopf würde das Bild zerschneiden. */
  background: rgba(12, 12, 12, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  white-space: nowrap;
}
.ec-gh-coverbtn:active { transform: scale(.97); }
.ec-gh-coverbtn--del { padding: 0 10px; color: #ff8a9c; border-color: rgba(255, 45, 85, 0.35); }

/* Kamera-Badge unten rechts am Avatar — gleiche Position wie im eigenen Profil
   (.ec-avatar-badge), damit die drei Ansichten sich gleich anfühlen. */
.ec-gh-avbadge {
  position: absolute;
  right: calc(50% - 48px);
  bottom: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  color: #fff;
  background: var(--accent, #717171);
  border: 2px solid #141414;              /* schneidet sauber aus dem Avatar aus */
  box-shadow: 0 2px 10px rgba(0, 0, 0, .55);
  z-index: 5;
}
.ec-gh-avbadge:active { transform: scale(.94); }

/* Sehr schmale Geräte: der Text im Titelbild-Knopf würde umbrechen. */
@media (max-width: 360px) {
  .ec-gh-coverbtn { font-size: 11px; padding: 0 9px; }
}

/* ══════════════════════════════════════════════════════════════════════════════
   §MEDIA-BUBBLE-2026-09-25 — Bildnachrichten randlos einbetten
   ══════════════════════════════════════════════════════════════════════════════
   GEMESSENER ZUSTAND (390 px, Mobile-Shell):
     .ecm-msg.mine    padding 10px 13px · background linear-gradient(135deg,
                      #7c5cff, #6366f1, #22d3ee) · box-shadow rgba(99,102,241,.5)
     .ecm-msg.theirs  padding 10px 13px · background rgb(16,19,31) · border
                      1px rgba(99,102,241,.18)
   Um TEXT ist das richtig. Um ein Foto ergibt dieselbe Verkleidung einen dicken,
   leuchtend blau-violetten Rahmen mit Glow — das war die Meldung.
   Die Blasen-Regeln stehen in mobile-overrides.css mit vierfacher
   #ec-mobile-shell-ID und !important; diese Datei lädt danach, also wird die
   Spezifität hier gespiegelt. Betroffen ist NUR .ecm-msg--media, also eine
   Blase, die ausschließlich ein Bild enthält.
   ══════════════════════════════════════════════════════════════════════════════ */
html body.ec-mobile-shell-active #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell .ecm-msg--media,
html body #ec-final-chat-stream .ecf-live-message--media,
.ecm-msg--media,
.ecf-live-message--media {
  position: relative;
  padding: 0 !important;                 /* kein Rahmenband um das Foto */
  background: none !important;           /* kein Markenverlauf */
  background-color: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;   /* nur eine Andeutung */
  border-radius: 16px !important;
  box-shadow: none !important;           /* kein Indigo-Glow */
  overflow: hidden !important;            /* das Bild bündig beschneiden */
  /* §MEDIA-SHRINK-2026-10-01: Die Streams sind Flex-Spalten. overflow:hidden setzt
     min-height:auto außer Kraft — sobald der Chat länger als der Bildschirm war,
     drückte Flexbox die Bild-Blase auf 2 px zusammen; das Bild ragte heraus, zählte
     nicht zur Scrollhöhe und blieb am Chatende abgeschnitten und untappbar. */
  flex-shrink: 0 !important;
  max-width: 280px;
  width: -moz-fit-content;
  width: fit-content;
  line-height: 0;                        /* sonst bleibt unter dem Bild ein Spalt */
}

/* Das Bild füllt die Blase bündig. object-fit: cover, damit ein Hochformat die
   Blase nicht verzerrt — vorher stand im Mobile-Stream object-fit: fill. */
.ecm-msg--media > img.ecm-msg-img,
.ecf-live-message--media > img.ecm-msg-img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-width: 280px;
  max-height: 320px;
  object-fit: cover !important;
  border-radius: 16px !important;
  cursor: pointer;
  margin: 0 !important;
}

/* Zeit + Häkchen unten rechts ÜBER dem Bild. */
.ecm-msg--media .ecm-media-stamp,
.ecf-live-message--media .ecm-media-stamp {
  position: absolute;
  right: 6px;
  bottom: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  font-size: 10.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
  pointer-events: none;                  /* nie den Lightbox-Klick abfangen */
}
.ecm-msg--media .ecm-media-enc,
.ecf-live-message--media .ecm-media-enc { font-size: 9.5px; opacity: .85; }

/* Der Absendername stand im Final-Stream ÜBER dem Bild und hätte die Blase
   wieder aufgespannt — im Bild-Fall entfällt er, der Stempel trägt die Info. */
.ecf-live-message--media > small { display: none !important; }

/* ── Desktop-Pfad (#chat-screen) ────────────────────────────────────────────
   Dort lag der Rahmen NICHT an der Blase, sondern an .ec-image-message selbst:
   padding 8px + border 1px rgba(120,100,255,.12) + background rgba(10,14,26,.72).
   Gleiche Behandlung: randlos, bündig, dezent. */
#chat-screen .ec-image-message {
  padding: 0 !important;
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  max-width: min(280px, 78vw) !important;
  width: -moz-fit-content;
  width: fit-content;
  line-height: 0;
}
#chat-screen .ec-image-message .msg-media {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-height: 320px !important;
  object-fit: cover !important;
  border-radius: 16px !important;
}
/* Die Bildunterschrift lag im Rahmen und begründete dessen Polsterung. Jetzt
   sitzt sie UNTER der Blase, mit eigenem Abstand statt Innenpolsterung. */
#chat-screen .ec-image-caption,
#chat-screen .ec-image-fallback {
  line-height: 1.35;
  padding: 6px 10px 2px;
  margin-top: 0;
}

/* ══════════════════════════════════════════════════════════════════════════════
   §GROUP-UI-V2-2026-11-01 — „Gruppe verwalten“ (Owner-Go G1–G7)
   • Monoline-SVG (#gl-* Sprite) in farbigen Glas-Kacheln statt System-Emojis
   • Titel duerfen 2 Zeilen umbrechen (vorher „Nachrichte…“ bei 390 px)
   • runder Gruppenbild-Kopf (vorher <img> 269x0 px im ungestylten .gs-avatar)
   • Kopfzeile des Dialogs deckend + sticky: nichts scheint beim Scrollen durch
   Spezifitaet (1,2,0)+ und !important, weil desktop-overrides.css .gs-* ab 769 px
   mit !important setzt (Grid 38px|1fr|auto — hier 4 Spalten fuer Wert + Pfeil).
   ══════════════════════════════════════════════════════════════════════════════ */
#group-settings-modal .gs2-modal-head,
#group-admin-modal .gs2-modal-head {
  position: sticky !important; top: 0 !important; z-index: 6 !important;
  background: #0e0e0e !important; border-radius: 0 !important;
  isolation: isolate;
}
#group-settings-modal .gs2-modal-head > div:first-child,
#group-admin-modal .gs2-modal-head > div:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
#group-settings-modal .modal,
#group-admin-modal .modal { background-color: #0e0e0e !important; }
#group-settings-modal #group-settings-body,
#group-admin-modal #group-admin-body { position: relative; z-index: 1; overscroll-behavior: contain; }

/* Glas-Kachel + Farbtoene */
.gs2-ico {
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
  width: 38px; height: 38px; border-radius: 12px !important; flex: 0 0 38px;
  border: 1px solid var(--gs2-b, rgba(120, 120, 120, .32)) !important;
  background: linear-gradient(160deg, var(--gs2-a, rgba(120, 120, 120, .22)), rgba(255,255,255,.03)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 6px 16px -10px var(--gs2-a, rgba(120, 120, 120, .6)) !important;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: var(--gs2-c, #b5b5b5) !important; font-size: 0 !important; box-sizing: border-box;
}
.gs2-ico svg, .ec-ci-ico.gs2-ico svg { width: 20px; height: 20px; display: block; }
.gs2-ico--violet { --gs2-a: rgba(120, 120, 120, .26); --gs2-b: rgba(120, 120, 120, .38); --gs2-c: #c0c0c0; }
.gs2-ico--green  { --gs2-a: rgba(164, 164, 164, .22);  --gs2-b: rgba(164, 164, 164, .36);  --gs2-c: #c9c9c9; }
.gs2-ico--amber  { --gs2-a: rgba(193, 193, 193, .20);  --gs2-b: rgba(193, 193, 193, .34);  --gs2-c: #d2d2d2; }
.gs2-ico--pink   { --gs2-a: rgba(154, 154, 154, .20); --gs2-b: rgba(154, 154, 154, .34); --gs2-c: #c0c0c0; }
.gs2-ico--cyan   { --gs2-a: rgba(175, 175, 175, .20);  --gs2-b: rgba(175, 175, 175, .34);  --gs2-c: #cecece; }
.gs2-ico--red    { --gs2-a: rgba(239,68,68,.20);   --gs2-b: rgba(239,68,68,.36);   --gs2-c: #fca5a5; }

/* Zeilen: Titel 2 Zeilen, Untertitel 2 Zeilen, Wert + Pfeil rechts */
#group-settings-modal .gs-item.gs2-row {
  display: grid !important; grid-template-columns: 38px minmax(0, 1fr) auto auto !important;
  align-items: center !important; column-gap: 12px !important; min-height: 60px;
}
#group-settings-modal .gs2-row .gs-item-title,
#group-settings-modal .gs2-row .gs-item-sub {
  white-space: normal !important; overflow: hidden !important; text-overflow: clip !important;
  display: -webkit-box !important; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
  overflow-wrap: break-word; -webkit-hyphens: manual; hyphens: manual; line-height: 1.25 !important;
}
/* Schalter statt nacktem Kontrollkaestchen (gs-toggle hatte auf dem Handy keine Regel) */
#group-settings-modal .gs-toggle { position: relative; display: inline-block; width: 46px; height: 28px; flex: 0 0 46px; cursor: pointer; }
#group-settings-modal .gs-toggle input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 2; }
#group-settings-modal .gs-toggle-track { position: absolute; inset: 0; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14); transition: background .18s, border-color .18s; }
#group-settings-modal .gs-toggle-knob { position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; border-radius: 50%; background: #cccccc; transition: transform .18s, background .18s; }
#group-settings-modal .gs-toggle input:checked ~ .gs-toggle-track { background: rgba(164, 164, 164, .28); border-color: rgba(164, 164, 164, .5); }
#group-settings-modal .gs-toggle input:checked ~ .gs-toggle-knob { transform: translateX(18px); background: #b8b8b8; }
#group-settings-modal .gs-toggle input:focus-visible ~ .gs-toggle-track { outline: 2px solid #979797; outline-offset: 2px; }
#group-settings-modal .gs2-row .gs-item-right { display: flex; align-items: center; gap: 6px; max-width: 42vw; }
#group-settings-modal .gs2-val { color: var(--accent, #979797); font-size: 12px; font-weight: 700; white-space: nowrap; }
#group-settings-modal .gs2-val--ok { color: #b8b8b8; }
#group-settings-modal .gs2-row .gs-item-arrow { display: inline-flex; color: var(--text2, #a0a0a0); }
#group-settings-modal .gs2-row .gs-item-arrow svg { width: 18px; height: 18px; }
#group-settings-modal .gs-danger-item .gs-item-title { color: #fca5a5 !important; }

/* Kopf: rundes Gruppenbild, Name, Zaehler */
#group-settings-modal .gs-header.gs2-head {
  display: flex !important; flex-direction: column !important; align-items: center !important;
  text-align: center !important; gap: 6px; padding: 6px 4px 14px !important;
}
#group-settings-modal .gs2-av {
  position: relative; width: 84px; height: 84px; border-radius: 50% !important; overflow: hidden;
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
  background: radial-gradient(circle at 30% 25%, rgba(120, 120, 120, .45), rgba(175, 175, 175, .18) 70%), #171717;
  border: 1px solid rgba(120, 120, 120, .4); color: #d5d5d5;
  box-shadow: 0 10px 30px -14px rgba(120, 120, 120, .8);
}
#group-settings-modal .gs2-av > svg { width: 36px; height: 36px; }
#group-settings-modal .gs2-av.ec-av-has > svg { visibility: hidden; }
#group-settings-modal .gs2-av > img.ec-av-img {
  position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important;
  object-fit: cover !important; border-radius: 50% !important; display: block !important;
}
#group-settings-modal .gs2-name { font-size: 18px; font-weight: 800; color: var(--text, #f2f3f8); overflow-wrap: anywhere; max-width: 100%; }
#group-settings-modal .gs2-meta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; font-size: 12px; color: var(--text2, #a0a0a0); }
#group-settings-modal .gs2-meta .gs-enc-badge { display: inline-flex; align-items: center; gap: 4px; color: #b8b8b8; }
#group-settings-modal .gs2-meta .gs-enc-badge svg { width: 14px; height: 14px; }
#group-settings-modal .gs2-desc { font-size: 12px; color: var(--text2); line-height: 1.5; max-width: 34ch; }
#group-settings-modal .gs2-actions .gs-meta-btn { display: inline-flex; align-items: center; gap: 6px; }
#group-settings-modal .gs2-actions .gs-meta-btn svg { width: 16px; height: 16px; }
#group-settings-modal .gs-mrow-menu button { display: inline-flex; align-items: center; gap: 8px; }
#group-settings-modal .gs-mrow-menu button svg { width: 16px; height: 16px; flex: 0 0 16px; }

/* Admin-Ansicht: SVG statt Emoji in Hero-Knoepfen und ID-Karten */
#group-admin-modal .ec-ci-ico.gs2-ico { width: 38px; height: 38px; }
#group-admin-modal .ec-gh-coverbtn { display: inline-flex; align-items: center; gap: 6px; }
#group-admin-modal .ec-gh-coverbtn svg, #group-admin-modal .ec-gh-avbadge svg { width: 16px; height: 16px; }
#group-admin-modal .ec-gh-avbadge { display: inline-flex; align-items: center; justify-content: center; color: #fff; }
#group-admin-modal .ec-gh-coverbtn--locked { opacity: .9; }
#group-admin-modal .ec-gh-gold {
  margin-left: 2px; padding: 1px 7px; border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .04em;
  color: #131313; background: linear-gradient(135deg, #e4e4e4, #a6a6a6);
}
#group-admin-modal .ec-grp-note svg { width: 14px; height: 14px; vertical-align: -2px; }

/* ── Aura (G3): deckender Hintergrund + abgedunkelte, unscharfe Kulisse; Chips scrollen quer ── */
#aura-chat-window.aura-active {
  background: linear-gradient(180deg, #0a0a0a, #0c0c0c 42%, #060910) !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
}
#aura-chat-window .aura-header { background: linear-gradient(180deg, #0e0e0e, #0d0d0d) !important; position: relative; z-index: 3; }
html body:has(#aura-chat-window.aura-active)::after {
  content: ''; position: fixed; inset: 0; z-index: 9997; pointer-events: none;
  background: rgba(3, 4, 10, .74); -webkit-backdrop-filter: blur(10px) saturate(.9); backdrop-filter: blur(10px) saturate(.9);
}
html body.ec-mobile-shell-active.auth-ready:has(#aura-chat-window.aura-active)::after { z-index: 2147482700; }
@media (max-width: 480px) {
  #aura-quick-replies {
    flex-wrap: nowrap !important; overflow-x: auto !important; overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch; scrollbar-width: none; overscroll-behavior-x: contain;
    scroll-snap-type: x proximity; padding-bottom: 4px !important; mask-image: linear-gradient(90deg, #000 88%, transparent);
  }
  #aura-quick-replies::-webkit-scrollbar { display: none; }
  #aura-quick-replies .aura-quick { flex: 0 0 auto !important; white-space: nowrap !important; scroll-snap-align: start; }
  #aura-chat-window .aura-safety-hints {
    flex-wrap: nowrap !important; overflow-x: auto !important; scrollbar-width: none;
  }
  #aura-chat-window .aura-safety-hints::-webkit-scrollbar { display: none; }
  #aura-chat-window .aura-safety-hints .hint { flex: 0 0 auto !important; white-space: nowrap !important; }
}
/* §END GROUP-UI-V2-2026-11-01 */
/* §GROUP-UI-V2-2026-11-01: Hero-Platzhalter als SVG; mit Bild verdeckt. */
#group-admin-modal .gs2-hero-av > svg { width: 44px; height: 44px; color: #d5d5d5; }
#group-admin-modal .gs2-hero-av.ec-av-has > svg { visibility: hidden; }
#group-admin-modal .ga-promote svg { width: 14px; height: 14px; }
