/* LifeChat – Oberfläche */
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 300 900; font-display: swap; src: url(../fonts/figtree-latin-wght-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 300 900; font-display: swap; src: url(../fonts/figtree-latin-ext-wght-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1E9F,U+20A0-20C0,U+A720-A7FF; }
@font-face { font-family: 'Figtree'; font-style: italic; font-weight: 300 900; font-display: swap; src: url(../fonts/figtree-latin-wght-italic.woff2) format('woff2'); }
@font-face { font-family: 'Bricolage'; font-style: normal; font-weight: 200 800; font-display: swap; src: url(../fonts/bricolage-grotesque-latin-wght-normal.woff2) format('woff2'); }

:root {
  --bg-0: #16121f;
  --bg-1: #1d1828;
  --bg-2: #241e31;
  --bg-3: #2e2740;
  --bg-4: #3a3150;
  --line: #3b3350;
  --line-soft: #2f2842;
  --text: #efeaf7;
  --text-2: #b6aecb;
  --text-3: #847b9c;
  --accent: #ff5d73;
  --accent-hi: #ff7a8c;
  --accent-ink: #2a0a12;
  --amber: #ffb454;
  --ok: #3ddc97;
  --idle: #f2b84b;
  --dnd: #ff5d73;
  --offline: #6f6788;
  --danger: #ff4d5e;
  --link: #8cc8ff;
  --font: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Bricolage', 'Figtree', system-ui, sans-serif;
  --mono: ui-monospace, 'Cascadia Code', Consolas, 'SFMono-Regular', monospace;
  --rail: 72px;
  --side: 248px;
  --members: 248px;
  --shadow: 0 12px 32px rgba(6, 3, 14, .55);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg-2); color: var(--text); font: 15px/1.45 var(--font);
  -webkit-font-smoothing: antialiased; overflow: hidden; overscroll-behavior: none;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--bg-4); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }
.thin::-webkit-scrollbar { width: 6px; }
.thin::-webkit-scrollbar-thumb { border-width: 1px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---------- Icons ---------- */
.i { width: 20px; height: 20px; display: inline-block; flex: none; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.i.sm { width: 16px; height: 16px; }
.i.lg { width: 24px; height: 24px; }

/* ---------- Buttons & Formulare ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 8px; border: 0; background: var(--bg-4); color: var(--text); font-weight: 600; white-space: nowrap; }
.btn:hover { filter: brightness(1.12); }
.btn:disabled { opacity: .5; cursor: not-allowed; filter: none; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.ghost { background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--bg-3); color: var(--text); }
.btn.sm { height: 30px; padding: 0 12px; font-size: 13px; }
.btn.block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 0; background: transparent; color: var(--text-2); }
.icon-btn:hover { background: var(--bg-3); color: var(--text); }
.icon-btn.on { color: var(--text); }
.icon-btn.danger-on { color: var(--danger); }
.icon-btn.active { background: var(--bg-4); color: var(--text); }

.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field > span, .label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field small, .hint { color: var(--text-3); font-size: 13px; }
.input, textarea.input, select.input {
  width: 100%; min-height: 40px; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg-0); color: var(--text); outline: none;
}
.input:focus { border-color: var(--accent); }
textarea.input { resize: vertical; min-height: 80px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.spacer { flex: 1; }
.error-text { color: var(--danger); font-size: 14px; min-height: 20px; }

.switch { position: relative; width: 42px; height: 24px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 24px; background: var(--bg-4); transition: background .15s; }
.switch span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.toggle-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.toggle-row:last-child { border-bottom: 0; }
.toggle-row .grow { flex: 1; min-width: 0; }
.toggle-row b { display: block; font-weight: 600; }
.toggle-row small { color: var(--text-3); }

/* ---------- Avatare & Status ---------- */
.av { position: relative; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--bg-4); display: grid; place-items: center; font-weight: 700; color: #fff; overflow: visible; user-select: none; }
.av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.av { font-size: 15px; }
.av .letter { font-family: var(--display); font-size: 1em; letter-spacing: -.02em; }
.av.s24 { width: 24px; height: 24px; font-size: 9px; }
.av.s32 { width: 32px; height: 32px; font-size: 12px; }
.av.s80 { width: 80px; height: 80px; font-size: 28px; }
.av .dot { position: absolute; right: -2px; bottom: -2px; width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--bg-1); background: var(--offline); }
.av.s24 .dot { width: 10px; height: 10px; border-width: 2px; right: -2px; bottom: -2px; }
.av.s80 .dot { width: 22px; height: 22px; border-width: 4px; }
.dot.online { background: var(--ok); }
.dot.idle { background: var(--idle); }
.dot.dnd { background: var(--dnd); }
.dot.offline { background: var(--offline); }
.av.speaking { box-shadow: 0 0 0 2px var(--bg-1), 0 0 0 4px var(--ok); }

/* ---------- Grundlayout ---------- */
#app { height: 100%; }
.layout { display: grid; grid-template-columns: var(--rail) var(--side) minmax(0, 1fr) auto; height: 100%; }
.rail { background: var(--bg-0); display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 0; overflow-y: auto; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.side { background: var(--bg-1); display: flex; flex-direction: column; min-width: 0; }
.main { background: var(--bg-2); display: flex; flex-direction: column; min-width: 0; position: relative; }
.members { width: var(--members); background: var(--bg-1); overflow-y: auto; padding: 16px 8px; }
.members[hidden] { display: none; }

/* Server-Leiste */
.rail-item { position: relative; width: 48px; height: 48px; flex: none; border-radius: 16px; background: var(--bg-2); display: grid; place-items: center; color: var(--text); border: 0; padding: 0; transition: border-radius .15s, background .15s; }
.rail-item img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.rail-item .abbr { font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: -.01em; }
.rail-item:hover, .rail-item.active { border-radius: 12px; background: var(--accent); color: var(--accent-ink); }
.rail-item:has(img):hover, .rail-item:has(img).active { background: var(--bg-2); }
.rail-item.home .i { width: 26px; height: 26px; }
.rail-item.add { color: var(--ok); }
.rail-item.add:hover { background: var(--ok); color: #062a1a; }
.rail-pill { position: absolute; left: -12px; top: 50%; width: 4px; height: 8px; margin-top: -4px; border-radius: 0 4px 4px 0; background: var(--text); transition: height .15s, margin .15s; }
.rail-item:hover .rail-pill { height: 20px; margin-top: -10px; }
.rail-item.active .rail-pill { height: 36px; margin-top: -18px; }
.rail-sep { width: 32px; height: 2px; border-radius: 2px; background: var(--line); flex: none; }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; display: inline-grid; place-items: center; line-height: 1; }
.rail-item .badge { position: absolute; right: -4px; bottom: -4px; border: 3px solid var(--bg-0); height: 22px; min-width: 22px; border-radius: 11px; }
.rail-item.has-voice::after { content: ''; position: absolute; right: -3px; top: -3px; width: 14px; height: 14px; border-radius: 50%; background: var(--ok); border: 3px solid var(--bg-0); }

/* Seitenleiste */
.side-head { height: 52px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 12px 0 16px; border-bottom: 1px solid var(--bg-0); font-family: var(--display); font-weight: 700; font-size: 16px; }
.side-head.clickable { cursor: pointer; }
.side-head.clickable:hover { background: var(--bg-3); }
.side-head .title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-scroll { flex: 1; overflow-y: auto; padding: 8px 8px 16px; }
.group-head { display: flex; align-items: center; justify-content: space-between; margin: 16px 6px 4px; color: var(--text-3); font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.group-head:first-child { margin-top: 6px; }
.group-head button { border: 0; background: transparent; color: inherit; padding: 2px; border-radius: 4px; display: grid; }
.group-head button:hover { color: var(--text); }
.ch { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; margin: 1px 0; border: 0; border-radius: 6px; background: transparent; color: var(--text-3); text-align: left; font-weight: 500; }
.ch:hover { background: var(--bg-3); color: var(--text-2); }
.ch.active { background: var(--bg-4); color: var(--text); }
.ch.unread { color: var(--text); font-weight: 700; }
.ch.unread::before { content: ''; position: absolute; left: 0; width: 4px; height: 8px; border-radius: 0 4px 4px 0; background: var(--text); margin-left: -8px; }
.ch { position: relative; }
.ch .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch .tools { display: none; gap: 2px; }
.ch:hover .tools, .ch.active .tools { display: flex; }
.ch .tools span { display: grid; padding: 2px; border-radius: 4px; color: var(--text-3); }
.ch .tools span:hover { color: var(--text); }
.ch .lock { color: var(--text-3); }
.voice-users { margin: 0 0 4px 30px; }
.voice-user { display: flex; align-items: center; gap: 8px; padding: 3px 6px; border-radius: 6px; color: var(--text-2); font-size: 14px; }
.voice-user:hover { background: var(--bg-3); }
.voice-user .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.voice-user .flags { display: flex; gap: 4px; color: var(--text-3); }
.voice-user .live { background: var(--accent); color: #fff; font-size: 10px; font-weight: 800; padding: 1px 5px; border-radius: 4px; letter-spacing: .03em; }

.dm-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border: 0; border-radius: 6px; background: transparent; color: var(--text-2); text-align: left; position: relative; }
.dm-item:hover { background: var(--bg-3); color: var(--text); }
.dm-item.active { background: var(--bg-4); color: var(--text); }
.dm-item .meta { flex: 1; min-width: 0; }
.dm-item .meta b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-item .meta small { display: block; color: var(--text-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-item .x { opacity: 0; }
.dm-item:hover .x { opacity: 1; }

/* Dock unten (Sprachverbindung + eigener Nutzer) */
.dock { background: #1a1524; flex: none; }
.voice-panel { padding: 10px 10px 8px; border-bottom: 1px solid var(--line-soft); }
.voice-panel .vp-top { display: flex; align-items: center; gap: 8px; }
.voice-panel .vp-status { flex: 1; min-width: 0; }
.voice-panel .vp-status b { display: flex; align-items: center; gap: 6px; color: var(--ok); font-size: 14px; }
.voice-panel .vp-status b.connecting { color: var(--idle); }
.voice-panel .vp-status small { display: block; color: var(--text-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.voice-panel .vp-status small:hover { color: var(--text-2); text-decoration: underline; }
.voice-panel .vp-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.voice-panel .vp-actions .btn { height: 32px; background: var(--bg-3); font-size: 13px; font-weight: 600; }
.voice-panel .vp-actions .btn.on { background: var(--ok); color: #062a1a; }
.voice-panel .vp-actions .btn.live { background: var(--accent); color: var(--accent-ink); }
.signal { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.signal i { display: block; width: 3px; background: currentColor; border-radius: 1px; }
.signal i:nth-child(1) { height: 5px; } .signal i:nth-child(2) { height: 8px; } .signal i:nth-child(3) { height: 12px; }
.user-panel { display: flex; align-items: center; gap: 8px; padding: 8px; }
.user-panel .me { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; padding: 4px; margin: -4px; border-radius: 8px; border: 0; background: transparent; text-align: left; }
.user-panel .me:hover { background: var(--bg-3); }
.user-panel .me .av .dot { border-color: #1a1524; }
.user-panel .meta { min-width: 0; }
.user-panel .meta b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-panel .meta small { display: block; font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-panel .icon-btn { width: 32px; height: 32px; }

/* Kopfzeile Hauptbereich */
.main-head { height: 52px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 12px 0 16px; border-bottom: 1px solid var(--bg-0); min-width: 0; }
.main-head .ch-icon { color: var(--text-3); }
.main-head .title { font-family: var(--display); font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.main-head .topic { color: var(--text-3); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 12px; margin-left: 2px; border-left: 1px solid var(--line); flex: 1; min-width: 0; cursor: pointer; }
.main-head .actions { display: flex; gap: 4px; margin-left: auto; }
.main-head .menu-btn { display: none; }

/* ---------- Nachrichten ---------- */
.chat { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.messages { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 0 0 12px; overflow-anchor: none; }
.chat-start { padding: 32px 16px 16px; }
.chat-start .big-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--bg-4); display: grid; place-items: center; margin-bottom: 12px; color: var(--text); }
.chat-start .big-icon .i { width: 34px; height: 34px; }
.chat-start h2 { font-family: var(--display); font-size: 30px; line-height: 1.15; margin: 0 0 6px; letter-spacing: -.015em; }
.chat-start p { color: var(--text-2); margin: 0; }
.load-more { display: flex; justify-content: center; padding: 16px; color: var(--text-3); font-size: 14px; }
.day-sep { display: flex; align-items: center; gap: 10px; margin: 18px 16px 6px; color: var(--text-3); font-size: 12px; font-weight: 600; }
.day-sep::before, .day-sep::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.new-sep { display: flex; align-items: center; gap: 10px; margin: 8px 16px; color: var(--accent); font-size: 12px; font-weight: 700; }
.new-sep::before { content: ''; flex: 1; height: 1px; background: var(--accent); }

.msg { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 14px; padding: 4px 48px 4px 16px; margin-top: 14px; }
.msg.cont { margin-top: 0; padding-top: 1px; padding-bottom: 1px; }
.msg:hover { background: rgba(255, 255, 255, .025); }
.msg.mentioned { background: rgba(255, 180, 84, .08); box-shadow: inset 3px 0 0 var(--amber); }
.msg.mentioned:hover { background: rgba(255, 180, 84, .11); }
.msg.highlight { animation: flash 1.6s ease-out; }
@keyframes flash { 0%, 30% { background: rgba(255, 93, 115, .18); } 100% { background: transparent; } }
.msg .av { cursor: pointer; margin-top: 2px; }
.msg .gutter-time { visibility: hidden; color: var(--text-3); font-size: 11px; text-align: right; padding-top: 4px; white-space: nowrap; }
.msg.cont:hover .gutter-time { visibility: visible; }
.msg-head { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.msg-head .author { font-weight: 700; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-head .author:hover { text-decoration: underline; }
.msg-head time { color: var(--text-3); font-size: 12px; white-space: nowrap; }
.msg-body { overflow-wrap: anywhere; white-space: normal; color: #e6e0f0; }
.msg-body .edited { color: var(--text-3); font-size: 11px; margin-left: 4px; }
.msg-body.jumbo { font-size: 42px; line-height: 1.2; }
.msg-body.jumbo .emoji { width: 48px; height: 48px; vertical-align: -8px; }
.msg-body.jumbo .edited { font-size: 11px; }
.msg.pending .msg-body { opacity: .55; }
.msg.failed .msg-body { color: var(--danger); }
.reply-ref { grid-column: 2; display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-3); margin-bottom: 2px; min-width: 0; cursor: pointer; position: relative; }
.reply-ref::before { content: ''; position: absolute; left: -36px; top: 9px; width: 30px; height: 10px; border-left: 2px solid var(--line); border-top: 2px solid var(--line); border-top-left-radius: 6px; }
.reply-ref b { color: var(--text-2); font-weight: 600; white-space: nowrap; }
.reply-ref span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reply-ref:hover span { color: var(--text-2); }
.msg-tools { position: absolute; right: 16px; top: -16px; display: none; background: var(--bg-1); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); padding: 2px; z-index: 5; }
.msg:hover .msg-tools, .msg.tools-open .msg-tools { display: flex; }
.msg-tools button { width: 32px; height: 32px; border: 0; background: transparent; color: var(--text-2); border-radius: 6px; display: grid; place-items: center; }
.msg-tools button:hover { background: var(--bg-3); color: var(--text); }
.msg-tools button.danger:hover { color: var(--danger); }
.pin-flag { color: var(--amber); font-size: 12px; display: inline-flex; align-items: center; gap: 3px; }

/* Markdown */
.msg-body strong { font-weight: 700; }
.msg-body code { font-family: var(--mono); font-size: 13px; background: var(--bg-0); padding: 1px 5px; border-radius: 4px; }
.msg-body pre { background: var(--bg-0); border: 1px solid var(--line-soft); border-radius: 8px; padding: 10px 12px; margin: 6px 0; overflow-x: auto; max-width: 100%; }
.msg-body pre code { background: none; padding: 0; font-size: 13px; white-space: pre; }
.msg-body blockquote { margin: 2px 0; padding: 0 0 0 12px; border-left: 4px solid var(--bg-4); }
.msg-body h1, .msg-body h2, .msg-body h3 { font-family: var(--display); margin: 6px 0 2px; line-height: 1.2; }
.msg-body h1 { font-size: 24px; } .msg-body h2 { font-size: 20px; } .msg-body h3 { font-size: 17px; }
.msg-body ul { margin: 2px 0; padding-left: 22px; }
.spoiler { background: var(--bg-4); color: transparent; border-radius: 4px; padding: 0 2px; cursor: pointer; user-select: none; }
.spoiler.shown { color: inherit; background: rgba(255, 255, 255, .08); cursor: auto; user-select: auto; }
.spoiler.shown * { visibility: visible; }
.spoiler:not(.shown) * { visibility: hidden; }
.mention { background: rgba(255, 93, 115, .16); color: #ffc3cc; border-radius: 4px; padding: 0 3px; font-weight: 600; cursor: pointer; }
.mention:hover { background: var(--accent); color: var(--accent-ink); }
.emoji { width: 22px; height: 22px; vertical-align: -5px; object-fit: contain; margin: 0 1px; }
.uemoji { font-size: 1.15em; }

/* Anhänge */
.attachments { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; align-items: flex-start; }
.att-img { display: block; max-width: min(420px, 100%); max-height: 340px; border-radius: 8px; cursor: zoom-in; background: var(--bg-3); object-fit: contain; }
.att-video { max-width: min(520px, 100%); max-height: 360px; border-radius: 8px; background: #000; }
.att-audio { width: min(420px, 100%); }
.att-file { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; background: var(--bg-1); border: 1px solid var(--line-soft); max-width: 420px; width: 100%; }
.att-file .i { width: 30px; height: 30px; color: var(--accent); }
.att-file .meta { flex: 1; min-width: 0; }
.att-file .meta a { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-file .meta small { color: var(--text-3); }

/* Reaktionen */
.reacts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.react { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 8px; border-radius: 8px; border: 1px solid transparent; background: var(--bg-3); color: var(--text-2); font-size: 14px; font-weight: 700; }
.react:hover { border-color: var(--line); }
.react.mine { background: rgba(255, 93, 115, .14); border-color: rgba(255, 93, 115, .55); color: #ffd0d6; }
.react .emoji { width: 18px; height: 18px; vertical-align: -4px; margin: 0; }
.react.add { padding: 0 6px; color: var(--text-3); opacity: 0; }
.msg:hover .react.add { opacity: 1; }

/* Eingabe */
.composer-wrap { padding: 0 16px 20px; flex: none; position: relative; }
.composer-bar { display: flex; align-items: center; gap: 8px; background: var(--bg-3); border-radius: 10px 10px 0 0; padding: 8px 12px; font-size: 13px; color: var(--text-2); }
.composer-bar b { color: var(--text); }
.composer-bar + .composer { border-top-left-radius: 0; border-top-right-radius: 0; }
.composer { display: flex; align-items: flex-end; gap: 4px; background: var(--bg-3); border-radius: 10px; padding: 4px 6px; }
.composer textarea { flex: 1; resize: none; border: 0; outline: none; background: transparent; padding: 10px 6px; max-height: 40vh; min-height: 44px; line-height: 1.4; color: var(--text); }
.composer textarea::placeholder { color: var(--text-3); }
.composer .icon-btn { width: 38px; height: 38px; margin-bottom: 3px; }
.composer.disabled { opacity: .6; }
.pending-files { display: flex; gap: 8px; overflow-x: auto; padding: 10px; background: var(--bg-3); border-radius: 10px 10px 0 0; border-bottom: 1px solid var(--line-soft); }
.pending-files + .composer { border-top-left-radius: 0; border-top-right-radius: 0; }
.pfile { position: relative; flex: none; width: 140px; height: 120px; border-radius: 8px; background: var(--bg-1); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 8px; font-size: 12px; color: var(--text-2); }
.pfile img { width: 100%; height: 76px; object-fit: cover; border-radius: 6px; }
.pfile .n { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
.pfile button { position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--danger); color: #fff; display: grid; place-items: center; }
.upload-progress { height: 4px; background: var(--bg-4); border-radius: 2px; overflow: hidden; margin: 0 0 8px; }
.upload-progress div { height: 100%; background: var(--accent); width: 0; transition: width .2s; }
.typing { position: absolute; left: 16px; bottom: 2px; height: 18px; font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.typing b { color: var(--text); }
.typing .dots { display: inline-flex; gap: 3px; }
.typing .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--text-2); animation: blink 1.2s infinite; }
.typing .dots i:nth-child(2) { animation-delay: .2s; } .typing .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }
.read-only-note { padding: 12px; text-align: center; color: var(--text-3); background: var(--bg-3); border-radius: 10px; font-size: 14px; }

/* Autovervollständigung */
.autocomplete { position: absolute; left: 16px; right: 16px; bottom: calc(100% - 14px); background: var(--bg-1); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 6px; max-height: 300px; overflow-y: auto; z-index: 20; }
.autocomplete .ac-title { font-size: 12px; font-weight: 700; color: var(--text-3); padding: 4px 8px 6px; }
.ac-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.ac-item.sel, .ac-item:hover { background: var(--bg-3); }
.ac-item small { color: var(--text-3); margin-left: auto; }
.ac-item .emoji { width: 24px; height: 24px; }

/* ---------- Mitgliederliste ---------- */
.members h4 { margin: 16px 8px 6px; color: var(--text-3); font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.members h4:first-child { margin-top: 0; }
.member { display: flex; align-items: center; gap: 10px; width: 100%; padding: 5px 8px; border: 0; border-radius: 6px; background: transparent; text-align: left; color: var(--text-2); }
.member:hover { background: var(--bg-3); color: var(--text); }
.member.offline { opacity: .45; }
.member .meta { min-width: 0; flex: 1; }
.member .meta b { display: flex; align-items: center; gap: 4px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member .meta small { display: block; font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crown { color: var(--amber); }

/* ---------- Freunde / Startseite ---------- */
.home-tabs { display: flex; align-items: center; gap: 6px; }
.home-tabs .tab { height: 30px; padding: 0 10px; border-radius: 6px; border: 0; background: transparent; color: var(--text-2); font-weight: 600; }
.home-tabs .tab:hover { background: var(--bg-3); color: var(--text); }
.home-tabs .tab.active { background: var(--bg-4); color: var(--text); }
.home-tabs .tab.add { background: var(--ok); color: #062a1a; }
.home-tabs .tab.add.active { background: transparent; color: var(--ok); }
.friends { flex: 1; overflow-y: auto; padding: 16px 24px; }
.friends h3 { font-size: 12px; color: var(--text-3); font-weight: 700; margin: 4px 0 12px; letter-spacing: .02em; }
.friend { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-top: 1px solid var(--line-soft); border-radius: 8px; }
.friend:hover { background: var(--bg-3); border-top-color: transparent; }
.friend .meta { flex: 1; min-width: 0; }
.friend .meta b { display: block; }
.friend .meta small { color: var(--text-3); }
.friend .acts { display: flex; gap: 8px; }
.friend .acts .icon-btn { background: var(--bg-1); border-radius: 50%; }
.add-friend { max-width: 720px; }
.add-friend h2 { font-family: var(--display); font-size: 22px; margin: 4px 0 6px; }
.add-friend p { color: var(--text-2); margin: 0 0 16px; }
.add-friend form { display: flex; gap: 10px; background: var(--bg-0); border: 1px solid var(--line); border-radius: 10px; padding: 8px 8px 8px 14px; }
.add-friend form:focus-within { border-color: var(--accent); }
.add-friend input { flex: 1; border: 0; background: transparent; outline: none; min-width: 0; }
.add-friend .msg-ok { color: var(--ok); margin-top: 10px; }
.add-friend .msg-err { color: var(--danger); margin-top: 10px; }

/* Leere Zustände */
.empty { flex: 1; display: grid; place-items: center; text-align: center; padding: 40px 24px; color: var(--text-2); }
.empty h3 { font-family: var(--display); color: var(--text); font-size: 22px; margin: 0 0 8px; }
.empty p { margin: 0 0 16px; max-width: 420px; }
.empty .glyph { width: 88px; height: 88px; margin: 0 auto 18px; border-radius: 28px; background: var(--bg-3); display: grid; place-items: center; color: var(--accent); }
.empty .glyph .i { width: 44px; height: 44px; stroke-width: 1.6; }

/* ---------- Sprachkanal / Bühne ---------- */
.stage { flex: 1; display: flex; flex-direction: column; min-height: 0; background: #120f19; }
.stage-grid { flex: 1; display: grid; gap: 10px; padding: 16px; min-height: 0; overflow: auto; align-content: center; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.stage-grid.focus { grid-template-columns: 1fr; grid-template-rows: 1fr auto; align-content: stretch; }
.focus-strip { display: flex; gap: 10px; overflow-x: auto; }
.focus-strip .tile { width: 200px; flex: none; }
.tile { position: relative; aspect-ratio: 16 / 9; background: var(--bg-3); border-radius: 12px; overflow: hidden; display: grid; place-items: center; cursor: pointer; min-height: 0; }
.stage-grid.focus > .tile { aspect-ratio: auto; height: 100%; min-height: 240px; }
.tile video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.tile.cam video { object-fit: cover; }
.tile.mirror video { transform: scaleX(-1); }
.tile .av { width: 30%; height: auto; aspect-ratio: 1; max-width: 96px; font-size: 30px; }
.tile.speaking { box-shadow: inset 0 0 0 3px var(--ok); }
.tile .tag { position: absolute; left: 8px; bottom: 8px; display: flex; align-items: center; gap: 6px; max-width: calc(100% - 16px); background: rgba(10, 6, 18, .72); padding: 3px 8px; border-radius: 6px; font-size: 13px; font-weight: 600; }
.tile .tag span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .live-tag { position: absolute; left: 8px; top: 8px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; padding: 2px 6px; border-radius: 4px; letter-spacing: .03em; }
.tile .tile-tools { position: absolute; right: 8px; top: 8px; display: none; gap: 4px; }
.tile:hover .tile-tools { display: flex; }
.tile .tile-tools button { width: 32px; height: 32px; border-radius: 8px; border: 0; background: rgba(10, 6, 18, .72); color: #fff; display: grid; place-items: center; }
.tile:fullscreen { border-radius: 0; }
.stage-controls { flex: none; display: flex; justify-content: center; gap: 12px; padding: 14px; }
.ctl { width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--bg-3); color: var(--text); display: grid; place-items: center; position: relative; }
.ctl:hover { background: var(--bg-4); }
.ctl.off { background: #fff; color: #1d1828; }
.ctl.on { background: var(--ok); color: #062a1a; }
.ctl.live { background: var(--accent); color: var(--accent-ink); }
.ctl.leave { background: var(--danger); color: #fff; width: 64px; border-radius: 26px; }
.ctl .i { width: 24px; height: 24px; }
.stage-join { flex: 1; display: grid; place-items: center; text-align: center; padding: 24px; }
.stage-join h2 { font-family: var(--display); font-size: 28px; margin: 0 0 6px; }
.stage-join p { color: var(--text-2); margin: 0 0 20px; }
.stage-join .faces { display: flex; justify-content: center; gap: -8px; margin-bottom: 18px; }
.stage-join .faces .av { margin: 0 -6px; border: 3px solid #120f19; box-sizing: content-box; }
.call-strip { flex: none; background: #120f19; border-bottom: 1px solid var(--bg-0); }
.call-strip .stage-grid { max-height: 46vh; grid-template-columns: repeat(auto-fit, minmax(180px, 260px)); justify-content: center; }
.call-strip .stage-controls { padding-top: 0; }

/* ---------- Overlays ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(8, 5, 14, .72); display: grid; place-items: center; z-index: 100; padding: 16px; animation: fade .12s ease-out; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(460px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--bg-2); border-radius: 14px; box-shadow: var(--shadow); animation: pop .14s ease-out; }
.modal.wide { width: min(640px, 100%); }
@keyframes pop { from { transform: scale(.97); opacity: 0; } }
.modal-head { padding: 22px 22px 6px; }
.modal-head h2 { font-family: var(--display); font-size: 22px; margin: 0; letter-spacing: -.01em; }
.modal-head p { color: var(--text-2); margin: 6px 0 0; }
.modal-body { padding: 14px 22px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; background: var(--bg-1); border-radius: 0 0 14px 14px; }
.choice { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px; margin-bottom: 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-1); text-align: left; }
.choice:hover { background: var(--bg-3); }
.choice .i { width: 28px; height: 28px; color: var(--accent); }
.choice b { display: block; }
.choice small { color: var(--text-3); }
.radio-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 8px; background: var(--bg-1); margin-bottom: 8px; cursor: pointer; border: 1px solid transparent; }
.radio-row:has(input:checked) { border-color: var(--accent); background: var(--bg-3); }
.radio-row input { accent-color: var(--accent); }
.invite-box { display: flex; gap: 8px; background: var(--bg-0); border: 1px solid var(--line); border-radius: 8px; padding: 6px 6px 6px 12px; align-items: center; }
.invite-box input { flex: 1; border: 0; background: transparent; outline: none; min-width: 0; color: var(--text); }

.toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast { background: var(--bg-1); border: 1px solid var(--line); border-left: 4px solid var(--ok); border-radius: 10px; padding: 10px 14px; box-shadow: var(--shadow); max-width: 360px; animation: pop .15s ease-out; }
.toast.error { border-left-color: var(--danger); }

.ctx { position: fixed; z-index: 150; min-width: 200px; background: var(--bg-0); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 6px; animation: fade .08s; }
.ctx button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--text-2); text-align: left; font-size: 14px; font-weight: 500; }
.ctx button:hover { background: var(--accent); color: var(--accent-ink); }
.ctx button.danger { color: var(--danger); }
.ctx button.danger:hover { background: var(--danger); color: #fff; }
.ctx hr { border: 0; height: 1px; background: var(--line); margin: 4px 6px; }
.ctx .ctx-label { padding: 6px 10px 2px; font-size: 12px; color: var(--text-3); font-weight: 700; }
.ctx .vol { padding: 6px 10px 10px; }
.ctx .vol input { width: 100%; accent-color: var(--accent); }

.popover { position: fixed; z-index: 140; width: 320px; background: var(--bg-0); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; animation: pop .12s ease-out; }
.profile-banner { height: 72px; }
.profile-card .av { margin: -40px 0 0 16px; border: 6px solid var(--bg-0); box-sizing: content-box; }
.profile-card .av .dot { border-color: var(--bg-0); }
.profile-card .body { padding: 10px 16px 16px; }
.profile-card h3 { font-family: var(--display); margin: 0; font-size: 20px; }
.profile-card .uname { color: var(--text-2); font-size: 14px; }
.profile-card .status-line { margin-top: 8px; color: var(--text-2); font-size: 14px; }
.profile-card .section { background: var(--bg-2); border-radius: 8px; padding: 10px 12px; margin-top: 12px; }
.profile-card .section h5 { margin: 0 0 6px; font-size: 12px; color: var(--text-3); font-weight: 700; }
.profile-card .section p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.role-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.role-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 6px; background: var(--bg-3); font-size: 12px; font-weight: 600; }
.role-chip i { width: 10px; height: 10px; border-radius: 50%; background: var(--text-3); }

.emoji-picker { position: fixed; z-index: 160; width: 360px; height: 400px; background: var(--bg-0); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; }
.emoji-picker .ep-search { padding: 10px; border-bottom: 1px solid var(--line-soft); }
.emoji-picker .ep-tabs { display: flex; gap: 2px; padding: 4px 8px; border-bottom: 1px solid var(--line-soft); overflow-x: auto; scrollbar-width: none; }
.emoji-picker .ep-tabs button { border: 0; background: transparent; font-size: 18px; padding: 4px 6px; border-radius: 6px; flex: none; }
.emoji-picker .ep-tabs button:hover { background: var(--bg-3); }
.emoji-picker .ep-tabs img { width: 20px; height: 20px; border-radius: 6px; object-fit: cover; display: block; }
.emoji-picker .ep-body { flex: 1; overflow-y: auto; padding: 4px 8px 10px; }
.emoji-picker h6 { margin: 10px 4px 4px; font-size: 12px; color: var(--text-3); font-weight: 700; }
.emoji-picker .grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.emoji-picker .grid button { aspect-ratio: 1; border: 0; background: transparent; border-radius: 6px; font-size: 24px; display: grid; place-items: center; padding: 0; }
.emoji-picker .grid button:hover { background: var(--bg-3); }
.emoji-picker .grid img { width: 30px; height: 30px; object-fit: contain; }

.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(5, 3, 10, .92); display: grid; place-items: center; padding: 24px; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 80px); border-radius: 6px; }
.lightbox a { display: block; text-align: center; margin-top: 10px; color: var(--text-2); }

/* Eingehender Anruf */
.ring { position: fixed; left: 50%; top: 20px; transform: translateX(-50%); z-index: 250; background: var(--bg-0); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 16px 18px; display: flex; align-items: center; gap: 14px; width: min(380px, calc(100vw - 32px)); animation: pop .2s ease-out; }
.ring .meta { flex: 1; min-width: 0; }
.ring .meta b { display: block; font-size: 16px; }
.ring .meta small { color: var(--text-2); }
.ring .av { animation: pulse 1.4s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(61, 220, 151, .6); } 50% { box-shadow: 0 0 0 10px rgba(61, 220, 151, 0); } }
.ring .round { width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; }
.ring .round.yes { background: var(--ok); color: #062a1a; }
.ring .round.no { background: var(--danger); color: #fff; }

/* ---------- Einstellungen (Vollbild) ---------- */
.settings { position: fixed; inset: 0; z-index: 90; display: grid; grid-template-columns: minmax(200px, 1fr) minmax(0, 760px) minmax(60px, 1fr); background: var(--bg-2); animation: fade .12s; }
.settings-nav { background: var(--bg-1); display: flex; justify-content: flex-end; overflow-y: auto; }
.settings-nav nav { width: 220px; padding: 56px 8px 24px; }
.settings-nav h6 { margin: 12px 10px 6px; font-size: 12px; color: var(--text-3); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-nav button { display: block; width: 100%; text-align: left; padding: 7px 10px; margin: 1px 0; border: 0; border-radius: 6px; background: transparent; color: var(--text-2); font-weight: 500; }
.settings-nav button:hover { background: var(--bg-3); color: var(--text); }
.settings-nav button.active { background: var(--bg-4); color: var(--text); }
.settings-nav button.danger { color: var(--danger); }
.settings-nav hr { border: 0; height: 1px; background: var(--line); margin: 8px 10px; }
.settings-body { padding: 56px 40px 80px; overflow-y: auto; }
.settings-body h1 { font-family: var(--display); font-size: 24px; margin: 0 0 20px; letter-spacing: -.01em; }
.settings-body h3 { font-size: 13px; color: var(--text-2); margin: 28px 0 10px; }
.settings-close { padding-top: 56px; }
.settings-close button { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--text-3); background: transparent; color: var(--text-2); display: grid; place-items: center; }
.settings-close button:hover { border-color: var(--text); color: var(--text); }
.settings-close small { display: block; text-align: center; width: 40px; margin-top: 6px; color: var(--text-3); font-size: 12px; font-weight: 700; }
.card { background: var(--bg-1); border-radius: 12px; padding: 16px; }
.card + .card { margin-top: 12px; }
.kv { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.kv + .kv { border-top: 1px solid var(--line-soft); }
.kv .grow { flex: 1; min-width: 0; }
.kv .grow small { display: block; color: var(--text-3); font-size: 12px; font-weight: 700; }
.kv .grow div { overflow: hidden; text-overflow: ellipsis; }
.profile-preview { width: 300px; border-radius: 12px; overflow: hidden; background: var(--bg-0); flex: none; }
.profile-edit { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.profile-edit .form { flex: 1; min-width: 260px; }
.color-row { display: flex; gap: 8px; flex-wrap: wrap; }
.color-row button { width: 32px; height: 32px; border-radius: 8px; border: 2px solid transparent; }
.color-row button.sel { border-color: #fff; }
.color-row input[type=color] { width: 32px; height: 32px; border: 0; padding: 0; background: none; border-radius: 8px; cursor: pointer; }
.meter { height: 8px; background: var(--bg-4); border-radius: 4px; overflow: hidden; }
.meter div { height: 100%; width: 0; background: var(--ok); transition: width .08s; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; }
.list-item:hover { background: var(--bg-1); }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .grow small { display: block; color: var(--text-3); font-size: 12px; }
.roles-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; }
.role-list button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--text-2); text-align: left; font-weight: 600; }
.role-list button:hover { background: var(--bg-1); }
.role-list button.active { background: var(--bg-4); color: var(--text); }
.role-list button i { width: 12px; height: 12px; border-radius: 50%; flex: none; background: var(--text-3); }
.perm-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.perm-row .grow { flex: 1; }
.perm-row b { display: block; font-weight: 600; }
.perm-row small { color: var(--text-3); }
.emoji-table .list-item img { width: 32px; height: 32px; object-fit: contain; }
.check-list { display: grid; gap: 4px; max-height: 220px; overflow-y: auto; padding: 4px; background: var(--bg-0); border-radius: 8px; border: 1px solid var(--line); }
.check-list label { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.check-list label:hover { background: var(--bg-3); }
.check-list input { accent-color: var(--accent); width: 16px; height: 16px; }
.check-list i { width: 10px; height: 10px; border-radius: 50%; background: var(--text-3); }

/* ---------- Anmeldung ---------- */
.auth { min-height: 100%; height: 100%; overflow-y: auto; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(360px, 480px); background: var(--bg-0); }
.auth-art { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: 48px; background:
  radial-gradient(120% 90% at 0% 100%, #4a1f3c 0%, transparent 60%),
  radial-gradient(90% 70% at 100% 0%, #2a2150 0%, transparent 65%), var(--bg-0); }
.wordmark { font-family: var(--display); font-weight: 800; font-size: clamp(64px, 11vw, 168px); line-height: .86; letter-spacing: -.045em; margin: 0; color: var(--text); }
.wordmark .dot { color: var(--accent); }
.auth-art p { font-size: 18px; color: var(--text-2); max-width: 30ch; margin: 18px 0 0; }
.auth-art .bubbles { position: absolute; top: 48px; left: 48px; right: 48px; display: grid; gap: 10px; max-width: 360px; }
.auth-art .bubble { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); padding: 10px 14px; border-radius: 16px 16px 16px 4px; color: var(--text-2); font-size: 14px; width: fit-content; }
.auth-art .bubble b { color: var(--text); margin-right: 6px; }
.auth-art .bubble:nth-child(2) { margin-left: 40px; }
.auth-art .bubble:nth-child(3) { margin-left: 12px; }
.auth-form { background: var(--bg-2); display: flex; flex-direction: column; justify-content: center; padding: 48px 40px; }
.auth-form h1 { font-family: var(--display); font-size: 28px; margin: 0 0 6px; letter-spacing: -.015em; }
.auth-form > p { color: var(--text-2); margin: 0 0 24px; }
.auth-form .switch-link { margin-top: 16px; color: var(--text-3); font-size: 14px; }
.auth-form .switch-link button { border: 0; background: none; color: var(--link); padding: 0; }
.boot { height: 100%; display: grid; place-items: center; background: var(--bg-0); }
.boot .wordmark { font-size: 56px; animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .55; } }
.conn-banner { position: absolute; left: 50%; top: 60px; transform: translateX(-50%); z-index: 30; background: var(--idle); color: #2a1a00; padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 700; box-shadow: var(--shadow); }

/* ---------- Mobil ---------- */
.drawer-shade { display: none; }
@media (max-width: 1100px) {
  .members:not(.overlay-open) { display: none; }
  .members.overlay-open { position: fixed; right: 0; top: 0; bottom: 0; z-index: 60; box-shadow: var(--shadow); }
}
@media (max-width: 760px) {
  body { font-size: 15px; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .layout .rail, .layout .side { position: fixed; top: 0; bottom: 0; z-index: 70; transform: translateX(calc(-100% - var(--rail) - 24px)); transition: transform .2s ease-out; visibility: hidden; }
  .layout.drawer-open .rail, .layout.drawer-open .side { visibility: visible; }
  .layout .rail { left: 0; width: var(--rail); }
  .layout .side { left: var(--rail); width: min(calc(100vw - var(--rail) - 48px), 300px); }
  .layout.drawer-open .rail, .layout.drawer-open .side { transform: none; }
  .layout.drawer-open .drawer-shade { display: block; position: fixed; inset: 0; z-index: 65; background: rgba(8, 5, 14, .6); }
  .main-head .menu-btn { display: inline-grid; margin-left: -8px; }
  .main-head .topic { display: none; }
  .msg { padding-right: 12px; grid-template-columns: 36px minmax(0, 1fr); column-gap: 10px; padding-left: 12px; }
  .msg .av { width: 36px; height: 36px; }
  .msg-tools { right: 8px; }
  .composer-wrap { padding: 0 8px 10px; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  .settings { grid-template-columns: 1fr; }
  .settings-nav { position: static; justify-content: stretch; }
  .settings-nav nav { width: 100%; padding: 16px 8px; display: flex; flex-wrap: wrap; gap: 4px; }
  .settings-nav nav h6, .settings-nav nav hr { display: none; }
  .settings-nav button { width: auto; }
  .settings { grid-template-rows: auto 1fr; overflow-y: auto; }
  .settings-body { padding: 20px 16px 80px; }
  .settings-close { position: fixed; top: 10px; right: 12px; padding: 0; z-index: 2; }
  .settings-close small { display: none; }
  .auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .auth-art { min-height: 200px; padding: 28px 24px; }
  .auth-art .bubbles { display: none; }
  .auth-art p { font-size: 15px; }
  .auth-form { padding: 28px 20px 40px; justify-content: flex-start; }
  .roles-layout { grid-template-columns: 1fr; }
  .emoji-picker { left: 8px !important; right: 8px; width: auto; bottom: 70px; top: auto !important; }
  .popover { left: 8px !important; right: 8px; width: auto; }
  .stage-grid { grid-template-columns: 1fr; padding: 8px; }
  .ctl { width: 48px; height: 48px; }
  .friends { padding: 12px; }
  .home-tabs .tab:not(.active):not(.add) { padding: 0 8px; }
}

/* ---------- Ergänzungen ---------- */
.rail-item:not(.unread):not(.active):not(:hover) .rail-pill { height: 0; }
.rail-item.add .rail-pill { display: none; }
.av.s16 { width: 16px; height: 16px; font-size: 8px; }
.av.s16 .dot { display: none; }
.msg-main { min-width: 0; }
.msg.editing .msg-tools { display: none !important; }
.ctx .row button { border-radius: 8px; }
.ctx .row button:hover { background: var(--bg-3); color: inherit; }
