/* =====================================================================
   Velox – Oberfläche (LostPlayerz-Design: tiefes Violett, Neon-Akzente)
   ===================================================================== */
@font-face { font-family: 'Outfit'; src: url('fonts/Outfit-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Outfit'; src: url('fonts/Outfit-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Big Shoulders'; src: url('fonts/BigShoulders-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('fonts/JetBrainsMono-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }

:root {
  --bg: #060311;
  --bg-2: #0b0720;
  --panel: #0f0a26;
  --panel-2: #140e30;
  --panel-3: #1b1440;
  --hover: rgba(255, 255, 255, .055);
  --active: rgba(168, 85, 247, .16);
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .12);
  --text: #ece8ff;
  --text-2: #b8b0d8;
  --muted: #8a82ad;
  --faint: #5f587f;
  --accent: #a855f7;
  --accent-2: #ec4899;
  --accent-soft: rgba(168, 85, 247, .18);
  --grad: linear-gradient(135deg, #a855f7 0%, #8b5cf6 50%, #ec4899 100%);
  --green: #00ff88;
  --online: #23d18b;
  --idle: #ffb627;
  --dnd: #ff4d6d;
  --offline: #6b6590;
  --danger: #ff4d6d;
  --warn: #ffb627;
  --mention-bg: rgba(255, 182, 39, .08);
  --mention-line: #ffb627;
  --radius: 14px;
  --radius-s: 9px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .05);
  --rail: 76px;
  --side: 260px;
  --members: 248px;
  --font: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Big Shoulders', 'Outfit', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; -webkit-font-smoothing: antialiased; }
body { overflow: hidden; overscroll-behavior: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: #c4a5ff; text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: rgba(168, 85, 247, .45); }
: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); }

/* Scrollbalken */
.scroll { overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.14) transparent; }
.scroll::-webkit-scrollbar { width: 10px; }
.scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
.scroll::-webkit-scrollbar-thumb:hover { background-color: rgba(255,255,255,.22); }

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

/* ---------- Knöpfe & Felder ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 11px; font-weight: 700; letter-spacing: .01em; background: var(--grad); color: #fff; box-shadow: 0 6px 22px rgba(168, 85, 247, .32); transition: transform .12s, filter .15s, box-shadow .15s; white-space: nowrap; }
.btn:hover { filter: brightness(1.08); box-shadow: 0 8px 28px rgba(168, 85, 247, .45); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .5; cursor: default; filter: none; }
.btn.ghost { background: rgba(255,255,255,.06); box-shadow: none; color: var(--text); }
.btn.ghost:hover { background: rgba(255,255,255,.1); }
.btn.danger { background: linear-gradient(135deg, #ff4d6d, #d6336c); box-shadow: 0 6px 22px rgba(255, 77, 109, .3); }
.btn.green { background: linear-gradient(135deg, #00d97a, #00b36b); box-shadow: 0 6px 22px rgba(0, 217, 122, .28); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn.block { width: 100%; }
.link-btn { color: #c4a5ff; font-weight: 600; }
.link-btn:hover { text-decoration: underline; }
.icon-btn { width: 34px; height: 34px; border-radius: 9px; display: inline-grid; place-items: center; color: var(--text-2); transition: background .12s, color .12s; position: relative; }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn.on { color: var(--text); background: var(--active); }
.icon-btn.red { color: var(--danger); }

.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 7px; }
.field small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 6px; }
.input, textarea.input, select.input { width: 100%; background: rgba(0,0,0,.32); border: 1px solid var(--line-2); border-radius: 10px; padding: 11px 13px; outline: none; transition: border-color .15s, box-shadow .15s; }
.input:focus { border-color: rgba(168, 85, 247, .7); box-shadow: 0 0 0 3px rgba(168, 85, 247, .18); }
textarea.input { resize: vertical; min-height: 80px; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-2); margin: 10px 0; cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; }
.switch { position: relative; width: 42px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; position: absolute; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 30px; background: #3a3360; transition: background .15s; }
.switch i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .18s cubic-bezier(.3,1.4,.6,1); }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(18px); }
.row-set { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.row-set:last-child { border-bottom: 0; }
.row-set b { display: block; font-weight: 700; }
.row-set small { color: var(--muted); font-size: 13px; }
input[type=range] { accent-color: var(--accent); width: 100%; }
.err { color: #ff8fa3; font-size: 13.5px; margin: 8px 0 0; min-height: 1em; }

/* ---------- Avatare ---------- */
.av { width: 40px; height: 40px; border-radius: 50%; flex: none; position: relative; display: grid; place-items: center; font-weight: 700; color: #fff; background: var(--c, #6d4bd8); font-size: 15px; user-select: none; }
.av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.av.s { width: 24px; height: 24px; font-size: 10px; }
.av.m { width: 32px; height: 32px; font-size: 12px; }
.av.l { width: 80px; height: 80px; font-size: 28px; }
.av.xl { width: 96px; height: 96px; font-size: 34px; }
.av .st { position: absolute; right: -2px; bottom: -2px; width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--panel); background: var(--offline); }
.av.s .st { width: 10px; height: 10px; border-width: 2px; right: -2px; bottom: -2px; }
.av.l .st, .av.xl .st { width: 22px; height: 22px; border-width: 4px; right: 2px; bottom: 2px; }
.st.online { background: var(--online) !important; }
.st.idle { background: var(--idle) !important; }
.st.dnd { background: var(--dnd) !important; }
.av.speaking { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--green); }

/* =====================================================================
   Anmeldung
   ===================================================================== */
.auth { position: fixed; inset: 0; display: grid; place-items: center; padding: 20px; overflow-y: auto;
  background: radial-gradient(900px 600px at 15% 10%, rgba(168,85,247,.25), transparent 60%), radial-gradient(800px 600px at 90% 90%, rgba(236,72,153,.18), transparent 60%), var(--bg); }
.auth::before { content: ''; position: fixed; inset: 0; background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px); background-size: 26px 26px; mask-image: radial-gradient(circle at center, #000 30%, transparent 75%); pointer-events: none; }
.auth-card { position: relative; width: 100%; max-width: 440px; background: rgba(15, 10, 38, .82); backdrop-filter: blur(20px); border: 1px solid var(--line-2); border-radius: 22px; padding: 34px 32px 28px; box-shadow: var(--shadow); animation: pop .35s cubic-bezier(.2,1.2,.4,1); }
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.brand-logo { width: 46px; height: 46px; border-radius: 14px; background: var(--grad); display: grid; place-items: center; box-shadow: 0 8px 26px rgba(168,85,247,.45); }
.brand-logo svg { width: 26px; height: 26px; }
.brand h1 { font-family: var(--display); font-size: 34px; margin: 0; letter-spacing: .02em; line-height: 1; }
.brand small { color: var(--muted); font-size: 13px; }
.auth h2 { font-size: 22px; margin: 0 0 4px; }
.auth p.sub { color: var(--muted); margin: 0 0 22px; }
.auth .switch-mode { margin-top: 16px; color: var(--muted); font-size: 14px; text-align: center; }
.invite-preview { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--line); margin-bottom: 20px; }
.invite-preview .gi { width: 52px; height: 52px; border-radius: 16px; }
.invite-preview b { display: block; font-size: 17px; }
.invite-preview small { color: var(--muted); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--offline); margin: 0 4px 1px 0; vertical-align: middle; }
.dot.on { background: var(--online); }

/* =====================================================================
   Grundlayout
   ===================================================================== */
.app { position: fixed; inset: 0; display: grid; grid-template-columns: var(--rail) var(--side) 1fr; background: var(--bg); }
.app.with-members { grid-template-columns: var(--rail) var(--side) 1fr var(--members); }
.conn-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 90; text-align: center; font-size: 13px; font-weight: 700; padding: 5px; background: var(--warn); color: #1a1000; transform: translateY(-100%); transition: transform .25s; }
.conn-banner.show { transform: none; }

/* --- Server-Leiste --- */
.rail { background: var(--bg); padding: 12px 0; display: flex; flex-direction: column; align-items: center; gap: 8px; overflow-y: auto; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail-sep { width: 32px; height: 2px; border-radius: 2px; background: var(--line-2); margin: 2px 0; flex: none; }
.gi { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; position: relative; flex: none; background: var(--panel-2); color: var(--text); font-weight: 700; font-size: 16px; transition: border-radius .2s, background .2s, transform .15s; overflow: visible; }
.gi img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.gi .gi-in { width: 100%; height: 100%; border-radius: inherit; display: grid; place-items: center; overflow: hidden; background: var(--c, var(--panel-2)); }
.rail .gi:hover, .rail .gi.active { border-radius: 16px; }
.rail .gi:active { transform: translateY(1px); }
.rail .gi::before { content: ''; position: absolute; left: -13px; top: 50%; width: 5px; height: 0; border-radius: 0 4px 4px 0; background: #fff; transform: translateY(-50%); transition: height .2s; }
.rail .gi.unread::before { height: 8px; }
.rail .gi:hover::before { height: 20px; }
.rail .gi.active::before { height: 38px; }
.gi .badge { position: absolute; right: -4px; bottom: -4px; }
.gi.home .gi-in { background: var(--grad); }
.gi.add .gi-in { background: var(--panel-2); color: var(--online); }
.gi.add:hover .gi-in { background: var(--online); color: #00140a; }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; box-shadow: 0 0 0 3px var(--bg); line-height: 1; }
.tip { position: fixed; z-index: 200; background: #000; color: #fff; padding: 7px 11px; border-radius: 8px; font-size: 13.5px; font-weight: 700; pointer-events: none; box-shadow: var(--shadow); white-space: nowrap; animation: fade .1s; max-width: 280px; overflow: hidden; text-overflow: ellipsis; }

/* --- Seitenleiste --- */
.side { background: var(--panel); display: flex; flex-direction: column; min-width: 0; border-radius: 18px 0 0 0; }
.side-head { height: 54px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 14px 0 16px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 16px; cursor: pointer; transition: background .12s; border-radius: 18px 0 0 0; }
.side-head:hover { background: var(--hover); }
.side-head span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-body { flex: 1; padding: 10px 8px 16px; }
.cat { display: flex; align-items: center; gap: 2px; padding: 16px 6px 5px 2px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); cursor: pointer; user-select: none; }
.cat:hover { color: var(--text-2); }
.cat .i { width: 13px; height: 13px; transition: transform .15s; }
.cat.closed .chev { transform: rotate(-90deg); }
.cat .grow { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat .add { opacity: 0; }
.cat:hover .add { opacity: 1; }
.ch { display: flex; align-items: center; gap: 8px; padding: 0 8px; height: 36px; border-radius: 9px; color: var(--muted); cursor: pointer; position: relative; margin: 1px 0; transition: background .1s, color .1s; }
.ch:hover { background: var(--hover); color: var(--text-2); }
.ch.active { background: var(--active); color: #fff; }
.ch.unread { color: var(--text); font-weight: 700; }
.ch.unread::before { content: ''; position: absolute; left: -8px; top: 50%; width: 4px; height: 8px; border-radius: 0 4px 4px 0; background: #fff; transform: translateY(-50%); }
.ch .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch .tools { display: none; gap: 2px; }
.ch:hover .tools, .ch.active .tools { display: flex; }
.ch .tools .icon-btn { width: 24px; height: 24px; }
.ch .tools .i { width: 15px; height: 15px; }
.ch .badge { box-shadow: none; }
.ch .lim { font-size: 11px; color: var(--faint); background: rgba(255,255,255,.05); border-radius: 6px; padding: 1px 6px; }
.vusers { padding: 2px 0 6px 30px; }
.vu { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px; border-radius: 8px; color: var(--text-2); font-size: 14px; cursor: pointer; }
.vu:hover { background: var(--hover); color: var(--text); }
.vu .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vu .flags { display: flex; gap: 4px; color: var(--muted); align-items: center; }
.vu .flags .i { width: 14px; height: 14px; }
.vu .flags .i.red { color: var(--danger); }
.live { background: #ff3355; color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .05em; border-radius: 5px; padding: 2px 5px; }

/* Sprach-Panel + Nutzer-Panel unten */
.voice-panel { flex: none; margin: 0 8px; padding: 10px 10px 8px; border-radius: 14px 14px 0 0; background: var(--panel-2); border: 1px solid var(--line); border-bottom: 0; }
.vp-top { display: flex; align-items: center; gap: 8px; }
.vp-status { flex: 1; min-width: 0; }
.vp-status b { display: flex; align-items: center; gap: 6px; color: var(--online); font-size: 14px; }
.vp-status b.wait { color: var(--warn); }
.vp-status b.bad { color: var(--danger); }
.vp-status small { color: var(--muted); font-size: 12.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.vp-status small:hover { color: var(--text); text-decoration: underline; }
.vp-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.vp-actions .icon-btn { width: 100%; height: 34px; background: rgba(255,255,255,.05); }
.vp-actions .icon-btn.on { background: var(--accent); color: #fff; }
.bars { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; }
.bars i { width: 3px; background: currentColor; border-radius: 1px; opacity: .3; }
.bars i:nth-child(1) { height: 4px; } .bars i:nth-child(2) { height: 8px; } .bars i:nth-child(3) { height: 12px; }
.bars.q1 i:nth-child(1), .bars.q2 i:nth-child(-n+2), .bars.q3 i { opacity: 1; }
.me-panel { flex: none; display: flex; align-items: center; gap: 4px; padding: 8px; background: var(--bg-2); border-top: 1px solid var(--line); }
.me-panel .me { flex: 1; display: flex; align-items: center; gap: 9px; min-width: 0; padding: 4px 6px; border-radius: 10px; cursor: pointer; }
.me-panel .me:hover { background: var(--hover); }
.me-panel .me .av .st { border-color: var(--bg-2); }
.me-panel .who { min-width: 0; line-height: 1.2; }
.me-panel .who b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-panel .who small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-panel .icon-btn.red .i { color: var(--danger); }

/* --- Hauptbereich --- */
.main { background: var(--panel-2); display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; }
.app.with-members .main { border-right: 1px solid var(--line); }
.top { height: 54px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 12px 0 18px; border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 rgba(0,0,0,.2); position: relative; z-index: 3; }
.top .title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; min-width: 0; flex: none; }
.top .title .i { color: var(--muted); }
.top .topic { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; padding-left: 12px; border-left: 1px solid var(--line-2); cursor: pointer; }
.top .spacer { flex: 1; }
.top .tools { display: flex; align-items: center; gap: 4px; flex: none; }
.search { position: relative; }
.search input { width: 170px; height: 32px; border-radius: 9px; border: 1px solid transparent; background: rgba(0,0,0,.3); padding: 0 30px 0 10px; font-size: 13.5px; outline: none; transition: width .2s, border-color .15s; }
.search input:focus { width: 240px; border-color: rgba(168,85,247,.6); }
.search .i { position: absolute; right: 8px; top: 8px; color: var(--muted); width: 16px; height: 16px; }
.mob-only { display: none !important; }

/* Nachrichten */
.msgs { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 0 0 18px; position: relative; overflow-anchor: none; }
.msgs-inner { min-height: 100%; display: flex; flex-direction: column; justify-content: flex-end; }
.chan-start { padding: 34px 18px 18px; }
.chan-start .big { width: 68px; height: 68px; border-radius: 50%; background: var(--panel-3); display: grid; place-items: center; margin-bottom: 14px; }
.chan-start .big .i { width: 34px; height: 34px; }
.chan-start h2 { font-family: var(--display); font-size: 34px; margin: 0 0 6px; letter-spacing: .01em; }
.chan-start p { margin: 0; color: var(--muted); }
.loading-more { text-align: center; padding: 14px; color: var(--muted); font-size: 13px; }
.day { display: flex; align-items: center; gap: 12px; margin: 18px 18px 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
.day::before, .day::after { content: ''; flex: 1; height: 1px; background: var(--line-2); }
.new-div { display: flex; align-items: center; gap: 8px; margin: 10px 18px 2px; color: var(--danger); font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.new-div::before { content: ''; flex: 1; height: 1px; background: var(--danger); }
.msg { position: relative; padding: 2px 64px 2px 76px; min-height: 26px; transition: background .08s; }
.msg.head { margin-top: 14px; padding-top: 4px; }
.msg:hover { background: rgba(0,0,0,.14); }
.msg.mentioned { background: var(--mention-bg); }
.msg.mentioned::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--mention-line); }
.msg.flash { animation: flash 1.8s; }
.msg.pending { opacity: .55; }
.msg.failed .content { color: #ff8fa3; }
.msg .av { position: absolute; left: 18px; top: 6px; cursor: pointer; }
.msg .hdr { display: flex; align-items: baseline; gap: 8px; line-height: 1.35; }
.msg .author { font-weight: 700; cursor: pointer; color: var(--name, #fff); }
.msg .author:hover { text-decoration: underline; }
.msg .time { color: var(--faint); font-size: 12px; }
.msg .side-time { position: absolute; left: 18px; width: 46px; top: 5px; text-align: right; font-size: 11px; color: var(--faint); opacity: 0; }
.msg:hover .side-time { opacity: 1; }
.msg .content { line-height: 1.5; color: #e2ddf7; word-wrap: break-word; overflow-wrap: anywhere; white-space: pre-wrap; }
.msg .content.jumbo { font-size: 44px; line-height: 1.2; }
.msg .edited { font-size: 11px; color: var(--faint); margin-left: 4px; }
.msg .content code { font-family: var(--mono); font-size: 13px; background: rgba(0,0,0,.35); border-radius: 5px; padding: 2px 5px; }
.msg .content pre { font-family: var(--mono); font-size: 13px; background: rgba(0,0,0,.4); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 6px 0; overflow-x: auto; white-space: pre; max-width: 100%; }
.msg .content pre code { background: none; padding: 0; }
.msg .content blockquote { margin: 2px 0; padding-left: 12px; border-left: 4px solid var(--line-2); color: var(--text-2); }
.msg .content .spoiler { background: #1d1638; color: transparent; border-radius: 4px; padding: 0 3px; cursor: pointer; transition: color .15s, background .15s; }
.msg .content .spoiler.open { background: rgba(255,255,255,.08); color: inherit; }
.mention { background: rgba(168, 85, 247, .22); color: #dcc4ff; border-radius: 5px; padding: 0 3px; font-weight: 600; cursor: pointer; }
.mention:hover { background: var(--accent); color: #fff; }
.reply-ref { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin: 0 0 2px; position: relative; cursor: pointer; min-width: 0; }
.reply-ref::before { content: ''; position: absolute; left: -38px; top: 9px; width: 30px; height: 12px; border-left: 2px solid var(--line-2); border-top: 2px solid var(--line-2); border-top-left-radius: 7px; }
.reply-ref .av { position: static; }
.reply-ref b { color: var(--text-2); flex: none; }
.reply-ref span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reply-ref:hover span { color: var(--text); }
.sys { display: flex; align-items: center; gap: 12px; padding: 6px 18px 6px 28px; color: var(--muted); font-size: 14px; margin-top: 8px; }
.sys .i { color: var(--online); }
.sys b { color: var(--text); cursor: pointer; }
.sys .time { font-size: 12px; color: var(--faint); }
.msg-tools { position: absolute; right: 16px; top: -16px; display: none; background: var(--panel-3); border: 1px solid var(--line-2); border-radius: 10px; padding: 2px; box-shadow: 0 6px 18px rgba(0,0,0,.4); z-index: 2; }
.msg:hover .msg-tools, .msg-tools.keep { display: flex; }
.msg-tools .icon-btn { width: 32px; height: 30px; }
.msg-tools .i { width: 18px; height: 18px; }
.reacts { display: flex; flex-wrap: wrap; gap: 5px; margin: 5px 0 2px; }
.react { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 9px; border-radius: 9px; background: rgba(255,255,255,.05); border: 1px solid transparent; font-size: 14px; transition: background .1s, border-color .1s, transform .1s; }
.react:hover { border-color: var(--line-2); }
.react:active { transform: scale(.94); }
.react.mine { background: var(--accent-soft); border-color: rgba(168,85,247,.6); }
.react b { font-size: 12.5px; color: var(--text-2); }
.react.add { opacity: 0; color: var(--muted); }
.msg:hover .react.add { opacity: 1; }
.atts { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 2px; align-items: flex-start; max-width: 100%; }
.att-grid { display: grid; gap: 4px; grid-template-columns: repeat(var(--n, 1), minmax(0, 1fr)); max-width: 520px; width: 100%; }
.att-img { border-radius: 10px; overflow: hidden; background: rgba(0,0,0,.25); cursor: zoom-in; display: block; max-height: 360px; position: relative; }
.att-img img { display: block; max-width: 100%; max-height: 360px; object-fit: cover; width: 100%; }
.att-grid.one .att-img img { width: auto; max-width: min(100%, 520px); object-fit: contain; }
.att-video { max-width: min(100%, 520px); max-height: 360px; border-radius: 10px; background: #000; display: block; }
.att-audio { width: min(100%, 420px); }
.att-file { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: rgba(0,0,0,.25); border: 1px solid var(--line); max-width: 420px; width: 100%; }
.att-file .i { width: 30px; height: 30px; color: #c4a5ff; }
.att-file div { flex: 1; min-width: 0; }
.att-file a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.att-file small { color: var(--muted); font-size: 12px; }
.edit-box textarea { width: 100%; background: rgba(0,0,0,.35); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 12px; resize: none; outline: none; line-height: 1.45; }
.edit-box small { color: var(--muted); font-size: 12px; }
.jump-latest { position: absolute; left: 50%; bottom: 100%; transform: translate(-50%, -12px); background: var(--accent); color: #fff; font-weight: 700; font-size: 13px; padding: 6px 14px; border-radius: 20px; box-shadow: 0 6px 18px rgba(168,85,247,.45); z-index: 4; }

/* Eingabe */
.composer { flex: none; padding: 0 16px 18px; position: relative; }
.typing { height: 20px; font-size: 12.5px; color: var(--text-2); padding: 2px 4px 0; display: flex; align-items: center; gap: 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.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; }
.cbox { background: var(--panel-3); border: 1px solid var(--line); border-radius: 14px; transition: border-color .15s; }
.cbox:focus-within { border-color: rgba(168,85,247,.45); }
.cbox.drag { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(168,85,247,.25); }
.cbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); }
.cbar b { color: var(--text); }
.crow { display: flex; align-items: flex-end; gap: 4px; padding: 6px 6px 6px 8px; }
.crow textarea { flex: 1; background: none; border: 0; outline: none; resize: none; max-height: 40vh; min-height: 24px; line-height: 1.45; padding: 8px 6px; font-size: 15px; }
.crow textarea::placeholder { color: var(--faint); }
.crow .icon-btn { width: 38px; height: 38px; }
.crow .icon-btn.sendb { color: var(--accent); }
.uploads { display: flex; gap: 10px; padding: 12px 12px 4px; overflow-x: auto; }
.up { position: relative; width: 140px; flex: none; background: rgba(0,0,0,.25); border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.up .thumb { height: 90px; border-radius: 8px; background: rgba(255,255,255,.04) center/cover no-repeat; display: grid; place-items: center; color: var(--muted); }
.up .nm { font-size: 12px; margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up .prog { height: 4px; border-radius: 4px; background: rgba(255,255,255,.08); margin-top: 6px; overflow: hidden; }
.up .prog i { display: block; height: 100%; background: var(--grad); width: 0; transition: width .15s; }
.up .rm { position: absolute; top: -8px; right: -8px; width: 26px; height: 26px; border-radius: 50%; background: var(--danger); color: #fff; display: grid; place-items: center; }
.up .rm .i { width: 14px; height: 14px; }
.no-send { margin: 0 16px 18px; padding: 14px; border-radius: 12px; background: rgba(255,255,255,.04); color: var(--muted); text-align: center; font-size: 14px; }
.ac { position: absolute; left: 16px; right: 16px; bottom: calc(100% - 14px); background: var(--panel-3); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; z-index: 20; max-height: 300px; overflow-y: auto; }
.ac h6 { margin: 4px 8px 6px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ac-item { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; cursor: pointer; }
.ac-item.sel, .ac-item:hover { background: var(--active); }
.ac-item small { color: var(--muted); margin-left: auto; }
.ac-item .em { font-size: 20px; width: 24px; text-align: center; }

/* Mitgliederliste */
.members { background: var(--panel); padding: 8px 8px 20px; min-width: 0; }
.mgroup { padding: 18px 8px 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.mem { display: flex; align-items: center; gap: 11px; padding: 6px 8px; border-radius: 10px; cursor: pointer; }
.mem:hover { background: var(--hover); }
.mem.off { opacity: .45; }
.mem .who { min-width: 0; line-height: 1.25; }
.mem .who b { display: flex; align-items: center; gap: 5px; font-weight: 600; color: var(--name, var(--text)); overflow: hidden; white-space: nowrap; }
.mem .who b span { overflow: hidden; text-overflow: ellipsis; }
.mem .who small { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crown { color: var(--warn); width: 14px; height: 14px; flex: none; }

/* Startseite */
.homepage { flex: 1; overflow-y: auto; padding: 40px clamp(18px, 4vw, 56px); }
.home-hero { border-radius: 22px; padding: 34px; background: radial-gradient(600px 300px at 0% 0%, rgba(168,85,247,.35), transparent 70%), radial-gradient(500px 300px at 100% 100%, rgba(236,72,153,.25), transparent 70%), var(--panel-3); border: 1px solid var(--line-2); margin-bottom: 26px; position: relative; overflow: hidden; }
.home-hero h1 { font-family: var(--display); font-size: clamp(32px, 5vw, 52px); margin: 0 0 8px; line-height: 1; }
.home-hero p { color: var(--text-2); margin: 0 0 22px; max-width: 560px; font-size: 16px; }
.home-hero .acts { display: flex; gap: 10px; flex-wrap: wrap; }
.home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-bottom: 30px; }
.gcard { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: flex; gap: 14px; align-items: center; cursor: pointer; transition: transform .15s, border-color .15s, background .15s; text-align: left; }
.gcard:hover { transform: translateY(-2px); border-color: rgba(168,85,247,.45); background: var(--panel-3); }
.gcard b { display: block; font-size: 16px; }
.gcard small { color: var(--muted); }
.homepage h3 { font-family: var(--display); font-size: 24px; margin: 0 0 14px; letter-spacing: .02em; }
.changelog { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; margin-bottom: 14px; }
.changelog b { font-size: 16px; }
.changelog .ver { display: inline-block; font-size: 12px; font-weight: 800; color: #d8b4fe; background: var(--accent-soft); border-radius: 20px; padding: 2px 10px; margin-right: 8px; }
.changelog ul { margin: 10px 0 0; padding-left: 20px; color: var(--text-2); line-height: 1.7; }

/* =====================================================================
   Sprach-Ansicht
   ===================================================================== */
.stage { flex: 1; min-height: 0; display: flex; flex-direction: column; background: #07041a; position: relative; }
.stage-grid { flex: 1; min-height: 0; padding: 16px; display: grid; gap: 12px; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); align-content: center; }
.stage.focus .stage-grid { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.stage-strip { display: none; gap: 10px; padding: 0 16px 12px; overflow-x: auto; flex: none; }
.stage.focus .stage-strip { display: flex; }
.stage-strip .tile { width: 180px; height: 102px; flex: none; }
.tile { position: relative; border-radius: 16px; overflow: hidden; background: radial-gradient(circle at 50% 40%, var(--tc, #2a1f55), #120c2a 70%); display: grid; place-items: center; min-height: 0; aspect-ratio: 16 / 9; max-height: 100%; width: 100%; cursor: pointer; border: 2px solid transparent; transition: border-color .12s, box-shadow .12s; }
.stage-grid .tile { aspect-ratio: auto; height: 100%; }
.tile.speaking { border-color: var(--green); box-shadow: 0 0 0 1px var(--green), 0 0 24px rgba(0,255,136,.25); }
.tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.tile.screen video { object-fit: contain; }
.tile .av { width: 84px; height: 84px; font-size: 30px; }
.tile .label { position: absolute; left: 10px; bottom: 10px; display: flex; align-items: center; gap: 6px; max-width: calc(100% - 20px); background: rgba(0,0,0,.55); backdrop-filter: blur(8px); border-radius: 8px; padding: 4px 9px; font-size: 13px; font-weight: 600; }
.tile .label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .label .i { width: 15px; height: 15px; }
.tile .label .i.red { color: var(--danger); }
.tile .corner { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; opacity: 0; transition: opacity .15s; }
.tile:hover .corner { opacity: 1; }
.tile .corner button { width: 32px; height: 32px; border-radius: 8px; background: rgba(0,0,0,.6); display: grid; place-items: center; }
.tile .quality { position: absolute; top: 10px; left: 10px; font-size: 11px; font-weight: 700; background: rgba(0,0,0,.55); border-radius: 6px; padding: 2px 6px; color: var(--text-2); }
.stage-bar { flex: none; display: flex; justify-content: center; gap: 10px; padding: 12px 16px 18px; flex-wrap: wrap; }
.sbtn { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: #231a48; color: #fff; transition: background .12s, transform .1s; position: relative; }
.sbtn:hover { background: #2f2460; }
.sbtn:active { transform: scale(.95); }
.sbtn.on { background: #fff; color: #111; }
.sbtn.off { background: #3a1830; color: #ff8fa3; }
.sbtn.leave { background: var(--danger); width: 70px; border-radius: 28px; }
.sbtn.leave:hover { background: #ff6680; }
.sbtn .i { width: 22px; height: 22px; }
.sbtn .caret { position: absolute; right: -2px; bottom: -2px; width: 20px; height: 20px; border-radius: 50%; background: var(--panel-3); border: 2px solid #07041a; display: grid; place-items: center; }
.sbtn .caret .i { width: 11px; height: 11px; }
.stage-empty { flex: 1; display: grid; place-items: center; text-align: center; padding: 24px; }
.stage-empty h2 { font-family: var(--display); font-size: 40px; margin: 12px 0 6px; }
.stage-empty p { color: var(--muted); margin: 0 0 20px; }
.stage-empty .who-in { display: flex; justify-content: center; gap: -6px; margin-bottom: 20px; }
.stage-empty .who-in .av { margin: 0 -5px; box-shadow: 0 0 0 3px #07041a; }
.stage-bg { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(700px 400px at 50% 0%, rgba(168,85,247,.16), transparent 70%); }
.stage-chat-hint { color: var(--muted); font-size: 13px; text-align: center; padding-bottom: 8px; }

/* =====================================================================
   Overlays: Menüs, Modals, Profile, Toasts
   ===================================================================== */
.layer { position: fixed; inset: 0; z-index: 100; }
.menu { position: fixed; z-index: 150; min-width: 210px; max-width: 280px; background: #0d0822; border: 1px solid var(--line-2); border-radius: 12px; padding: 6px; box-shadow: var(--shadow); animation: pop .12s ease-out; }
.menu button, .menu label.mi { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--text-2); text-align: left; }
.menu button:hover, .menu label.mi:hover { background: var(--accent); color: #fff; }
.menu button.red { color: var(--danger); }
.menu button.red:hover { background: var(--danger); color: #fff; }
.menu hr { border: 0; height: 1px; background: var(--line-2); margin: 5px 4px; }
.menu .i { width: 18px; height: 18px; }
.menu .vol { padding: 6px 10px 8px; font-size: 13px; color: var(--text-2); }
.menu .vol div { display: flex; justify-content: space-between; margin-bottom: 4px; }
.menu .emo-quick { display: flex; gap: 2px; padding: 2px 2px 6px; }
.menu .emo-quick button { justify-content: center; font-size: 20px; padding: 6px 0; }
.menu .emo-quick button:hover { background: var(--hover); }
.backdrop { position: fixed; inset: 0; background: rgba(3, 1, 12, .72); backdrop-filter: blur(4px); z-index: 120; display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.modal { width: 100%; max-width: 480px; max-height: calc(100vh - 32px); overflow-y: auto; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 20px; box-shadow: var(--shadow); animation: pop .22s cubic-bezier(.2,1.2,.4,1); }
.modal.wide { max-width: 760px; }
.modal-head { padding: 24px 24px 6px; text-align: center; position: relative; }
.modal-head h2 { margin: 0 0 6px; font-size: 22px; }
.modal-head p { margin: 0; color: var(--muted); }
.modal-head .x { position: absolute; top: 14px; right: 14px; }
.modal-body { padding: 18px 24px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px 22px; background: rgba(0,0,0,.18); border-radius: 0 0 20px 20px; }
.choice { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px; border: 1px solid var(--line-2); border-radius: 14px; margin-bottom: 10px; text-align: left; transition: background .12s, border-color .12s; }
.choice:hover { background: var(--hover); border-color: rgba(168,85,247,.5); }
.choice .ic { width: 48px; height: 48px; border-radius: 14px; background: var(--grad); display: grid; place-items: center; flex: none; }
.choice b { display: block; font-size: 16px; }
.choice small { color: var(--muted); }
.icon-pick { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.icon-pick .gi { width: 80px; height: 80px; cursor: pointer; border: 2px dashed var(--line-2); border-radius: 50%; }
.icon-pick .gi:hover { border-color: var(--accent); }
.copy-row { display: flex; gap: 8px; }
.copy-row .input { font-family: var(--mono); font-size: 14px; }
.lightbox { position: fixed; inset: 0; z-index: 160; background: rgba(0,0,0,.88); display: grid; place-items: center; padding: 40px; animation: fade .15s; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 100px); border-radius: 10px; box-shadow: var(--shadow); }
.lightbox a { position: absolute; bottom: 20px; color: #fff; opacity: .8; font-size: 14px; }
.toasts { position: fixed; z-index: 300; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: #0d0822; border: 1px solid var(--line-2); color: var(--text); padding: 11px 18px; border-radius: 12px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow); animation: up .2s ease-out; max-width: min(92vw, 520px); }
.toast.err { border-color: rgba(255,77,109,.6); }
.toast.ok { border-color: rgba(0,255,136,.45); }

/* Profil-Popout */
.profile { position: fixed; z-index: 150; width: 320px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; animation: pop .14s ease-out; }
.profile .banner { height: 76px; background: var(--b, var(--accent)); }
.profile .av.xl { position: absolute; top: 28px; left: 16px; box-shadow: 0 0 0 6px var(--panel-2); }
.profile .av.xl .st { border-color: var(--panel-2); }
.profile .p-body { padding: 56px 16px 16px; }
.profile h3 { margin: 0; font-size: 20px; }
.profile .un { color: var(--muted); font-size: 14px; }
.profile .stat { margin-top: 8px; font-size: 14px; color: var(--text-2); }
.profile .box { background: rgba(0,0,0,.25); border-radius: 12px; padding: 12px; margin-top: 12px; }
.profile .box h6 { margin: 0 0 6px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.profile .box p { margin: 0; font-size: 14px; color: var(--text-2); white-space: pre-wrap; word-wrap: break-word; }
.rchips { display: flex; flex-wrap: wrap; gap: 5px; }
.rchip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 3px 9px; border-radius: 7px; background: rgba(255,255,255,.06); }
.rchip i { width: 10px; height: 10px; border-radius: 50%; background: var(--rc, #99aab5); }
.rchip.add { cursor: pointer; }
.rchip.add:hover { background: rgba(255,255,255,.12); }

/* Einstellungen (Vollbild) */
.settings { position: fixed; inset: 0; z-index: 110; display: grid; grid-template-columns: minmax(200px, 1fr) minmax(0, 760px) minmax(60px, 1fr); background: var(--panel-2); animation: fade .15s; }
.settings nav { background: var(--panel); display: flex; justify-content: flex-end; padding: 50px 10px 30px 20px; overflow-y: auto; }
.settings nav > div { width: 220px; }
.settings nav h6 { margin: 14px 10px 6px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.settings nav button { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 8px; color: var(--text-2); font-weight: 600; margin-bottom: 2px; }
.settings nav button:hover { background: var(--hover); color: var(--text); }
.settings nav button.active { background: var(--active); color: #fff; }
.settings nav button.red { color: var(--danger); }
.settings nav hr { border: 0; height: 1px; background: var(--line); margin: 10px; }
.settings .pane { padding: 54px 40px 80px; overflow-y: auto; }
.settings .pane h2 { font-family: var(--display); font-size: 30px; margin: 0 0 20px; letter-spacing: .02em; }
.settings .pane h4 { margin: 28px 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.settings .closer { padding: 54px 0 0 20px; }
.settings .closer button { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; color: var(--text-2); }
.settings .closer button:hover { background: var(--hover); color: #fff; }
.settings .closer small { display: block; color: var(--muted); font-size: 12px; text-align: center; width: 40px; margin-top: 6px; font-weight: 700; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin-bottom: 14px; }
.acc-head { border-radius: 16px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); margin-bottom: 20px; }
.acc-head .banner { height: 90px; background: var(--b, var(--accent)); }
.acc-head .in { display: flex; align-items: flex-end; gap: 16px; padding: 0 18px 18px; margin-top: -40px; }
.acc-head .av { box-shadow: 0 0 0 6px var(--panel); cursor: pointer; }
.acc-head .av:hover::after { content: 'Ändern'; position: absolute; inset: 0; border-radius: 50%; background: rgba(0,0,0,.55); display: grid; place-items: center; font-size: 12px; }
.acc-head b { font-size: 20px; display: block; }
.acc-head small { color: var(--muted); }
.list-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; }
.list-row:hover { background: var(--hover); }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .grow b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .grow small { color: var(--muted); font-size: 12.5px; }
.roles-wrap { display: grid; grid-template-columns: 210px 1fr; gap: 18px; }
.role-list button { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border-radius: 8px; color: var(--text-2); font-weight: 600; text-align: left; }
.role-list button:hover { background: var(--hover); }
.role-list button.active { background: var(--active); color: #fff; }
.role-list button i { width: 12px; height: 12px; border-radius: 50%; background: var(--rc, #99aab5); flex: none; }
.role-list button .grip { margin-left: auto; color: var(--faint); cursor: grab; }
.perm { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.perm b { display: block; font-size: 14.5px; }
.perm small { color: var(--muted); font-size: 12.5px; }
.colors { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.colors button { width: 30px; height: 30px; border-radius: 8px; background: var(--c); border: 2px solid transparent; }
.colors button.sel { border-color: #fff; }
.colors input[type=color] { width: 40px; height: 32px; border: 0; background: none; padding: 0; cursor: pointer; }
.meter { height: 10px; border-radius: 10px; background: rgba(255,255,255,.07); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #00d97a, #ffb627, #ff4d6d); transition: width .06s; }
.kbd { font-family: var(--mono); background: rgba(255,255,255,.08); border: 1px solid var(--line-2); border-bottom-width: 3px; border-radius: 7px; padding: 4px 10px; font-size: 13px; min-width: 40px; display: inline-block; text-align: center; }
.empty { color: var(--muted); text-align: center; padding: 30px 10px; }
.notice { padding: 12px 14px; border-radius: 12px; background: rgba(255,182,39,.08); border: 1px solid rgba(255,182,39,.3); color: #ffd98a; font-size: 14px; margin-bottom: 14px; }
.notice.info { background: rgba(168,85,247,.08); border-color: rgba(168,85,247,.3); color: #dcc4ff; }

/* Emoji-Auswahl */
.emoji-pick { position: fixed; z-index: 155; width: 352px; height: 400px; background: #0d0822; border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; animation: pop .12s ease-out; }
.emoji-pick .ep-search { padding: 10px; border-bottom: 1px solid var(--line); }
.emoji-pick .ep-search input { width: 100%; height: 34px; border-radius: 9px; border: 1px solid var(--line-2); background: rgba(0,0,0,.3); padding: 0 10px; outline: none; }
.emoji-pick .ep-cats { display: flex; gap: 2px; padding: 4px 8px; border-bottom: 1px solid var(--line); }
.emoji-pick .ep-cats button { flex: 1; height: 30px; border-radius: 7px; font-size: 17px; opacity: .6; }
.emoji-pick .ep-cats button:hover, .emoji-pick .ep-cats button.on { opacity: 1; background: var(--hover); }
.emoji-pick .ep-body { flex: 1; padding: 6px 8px; }
.emoji-pick h6 { margin: 10px 4px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.emoji-pick .ep-grid { display: grid; grid-template-columns: repeat(9, 1fr); }
.emoji-pick .ep-grid button { height: 36px; font-size: 22px; border-radius: 8px; transition: transform .08s; }
.emoji-pick .ep-grid button:hover { background: var(--hover); transform: scale(1.15); }

/* Animationen */
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes blink { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-2px); } }
@keyframes flash { 0%, 40% { background: rgba(168,85,247,.25); } 100% { background: transparent; } }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255,255,255,.12); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.boot { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); z-index: 400; transition: opacity .3s; }
.boot .brand-logo { width: 64px; height: 64px; border-radius: 20px; animation: pulse 1.4s ease-in-out infinite; }
.boot .brand-logo svg { width: 36px; height: 36px; }
@keyframes pulse { 50% { transform: scale(1.08); box-shadow: 0 0 40px rgba(168,85,247,.6); } }

/* =====================================================================
   Handy & Tablet
   ===================================================================== */
@media (max-width: 1100px) {
  .app.with-members { grid-template-columns: var(--rail) var(--side) 1fr; }
  .members { position: fixed; right: 0; top: 0; bottom: 0; width: min(86vw, 300px); z-index: 60; box-shadow: var(--shadow); transform: translateX(105%); transition: transform .22s; }
  .app.members-open .members { transform: none; }
  .app.members-open .main { filter: brightness(.6); }
}
@media (max-width: 760px) {
  :root { --rail: 68px; --side: calc(100vw - 68px); }
  body { font-size: 15px; }
  .app, .app.with-members { grid-template-columns: 1fr; }
  .rail { position: fixed; left: 0; top: 0; bottom: 0; width: var(--rail); z-index: 50; transform: translateX(-100%); transition: transform .22s; }
  .side { position: fixed; left: var(--rail); top: 0; bottom: 0; width: var(--side); z-index: 50; border-radius: 0; transform: translateX(calc(-100% - var(--rail))); transition: transform .22s; }
  .app.nav-open .rail, .app.nav-open .side { transform: none; }
  .app.nav-open .main { filter: brightness(.5); }
  .side-head { border-radius: 0; }
  .main { grid-column: 1; }
  .mob-only { display: inline-grid !important; }
  .desk-only { display: none !important; }
  .top { padding: 0 8px; }
  .top .topic { display: none; }
  .search input { width: 110px; }
  .search input:focus { width: 150px; }
  .msg { padding: 2px 14px 2px 64px; }
  .msg .av { left: 12px; }
  .msg .side-time { display: none; }
  .msg-tools { right: 8px; }
  .composer { padding: 0 8px 10px; }
  .settings { grid-template-columns: 1fr; }
  .settings nav { position: fixed; inset: 0; z-index: 2; justify-content: flex-start; padding: 60px 16px 30px; }
  .settings nav > div { width: 100%; }
  .settings.pane-open nav { display: none; }
  .settings .pane { padding: 70px 16px 60px; }
  .settings .closer { position: fixed; top: 10px; right: 12px; padding: 0; z-index: 3; }
  .settings .closer small { display: none; }
  .settings .back-mob { position: fixed; top: 10px; left: 10px; z-index: 3; }
  .roles-wrap { grid-template-columns: 1fr; }
  .stage-grid { --cols: 1 !important; padding: 10px; }
  .sbtn { width: 48px; height: 48px; }
  .emoji-pick { width: calc(100vw - 16px); left: 8px !important; }
  .profile { width: calc(100vw - 24px); left: 12px !important; }
}
@media (min-width: 761px) { .settings .back-mob { display: none; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.gi-in > svg:not(.i) { width: 26px; height: 26px; }
.stage-strip .tile .av { width: 46px; height: 46px; font-size: 17px; }
