:root {
  --bg0: #111214; --bg1: #1a1b1f; --bg2: #222328; --bg3: #2b2d33; --bg4: #34363d;
  --line: #2f3137; --text: #e9eaee; --muted: #9a9ca5; --faint: #6c6f78;
  --accent: #7c5cff; --accent2: #6a4cf0; --green: #23c55e; --red: #f04747; --amber: #f5a524;
  --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg0); color: var(--text);
  font: 15px/1.45 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--text); }
.hidden { display: none !important; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #1c1d21; border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
.main ::-webkit-scrollbar-thumb { background-color: #3a3c43; }
a { color: #8ab4ff; }

/* ---------- Buttons & Inputs ---------- */
.btn { border: 0; border-radius: 8px; padding: 9px 16px; font-weight: 600; background: var(--bg4); transition: background .15s, filter .15s; }
.btn:hover { filter: brightness(1.12); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.danger { background: var(--red); color: #fff; }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--bg3); }
.btn.green { background: var(--green); color: #fff; }
.btn.big { width: 100%; padding: 12px; font-size: 16px; }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }
.input, label input, .modal input, .modal select { width: 100%; background: var(--bg0); border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; outline: none; margin-top: 6px; }
.input:focus, label input:focus, .modal input:focus { border-color: var(--accent); }
label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 14px; }
label .opt { text-transform: none; font-weight: 500; color: var(--faint); }
.err { color: #ff7b7b; font-size: 14px; min-height: 20px; margin-bottom: 8px; }
.icon-btn { width: 32px; height: 32px; border: 0; border-radius: 6px; background: transparent; color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: var(--bg4); color: var(--text); }
.icon-btn.active-red { color: var(--red); }
.icon-btn svg { width: 20px; height: 20px; }

/* ---------- Anmeldung ---------- */
.auth { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(1200px 600px at 20% 10%, #2a1f5c 0%, transparent 60%), radial-gradient(900px 600px at 90% 90%, #12304a 0%, transparent 60%), var(--bg0); }
.auth-card { width: 400px; max-width: calc(100vw - 32px); background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; padding: 28px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.auth-logo { display: flex; align-items: center; gap: 10px; font-size: 26px; font-weight: 800; justify-content: center; margin-bottom: 18px; }
.auth-logo img { width: 40px; height: 40px; border-radius: 12px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg0); border-radius: 10px; padding: 4px; margin-bottom: 20px; }
.auth-tab { border: 0; background: transparent; padding: 8px; border-radius: 8px; font-weight: 600; color: var(--muted); }
.auth-tab.active { background: var(--bg4); color: var(--text); }
.or { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 13px; margin: 16px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.btn.google { background: #fff; color: #1f1f1f; display: flex; align-items: center; justify-content: center; gap: 10px; }
.auth-foot { margin-top: 14px; text-align: center; font-size: 13px; color: var(--faint); }
.auth-foot button { background: none; border: 0; color: var(--muted); text-decoration: underline; padding: 0; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: 72px 240px 1fr 240px; height: 100vh; }
.app.no-members { grid-template-columns: 72px 240px 1fr 0; }
.rail { background: var(--bg0); padding: 12px 0; display: flex; flex-direction: column; align-items: center; gap: 8px; overflow-y: auto; }
.rail::-webkit-scrollbar { display: none; }
.rail-sep { width: 32px; height: 2px; background: var(--bg3); border-radius: 2px; margin: 2px 0; }
.rail-item { position: relative; width: 48px; height: 48px; flex-shrink: 0; }
.rail-btn { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--bg3); color: var(--text); font-weight: 700; font-size: 16px;
  display: flex; align-items: center; justify-content: center; transition: border-radius .2s, background .2s; overflow: hidden; }
.rail-btn:hover, .rail-item.active .rail-btn { border-radius: 16px; background: var(--accent); color: #fff; }
.rail-btn.add { color: var(--green); background: var(--bg3); font-size: 26px; font-weight: 400; }
.rail-btn.add:hover { background: var(--green); color: #fff; }
.rail-btn img { width: 30px; height: 30px; }
.rail-pill { position: absolute; left: -12px; top: 50%; width: 8px; height: 0; background: #fff; border-radius: 0 4px 4px 0; transform: translateY(-50%); transition: height .2s; }
.rail-item.unread .rail-pill { height: 8px; }
.rail-item:hover .rail-pill { height: 20px; }
.rail-item.active .rail-pill { height: 40px; }
.rail-badge { position: absolute; right: -4px; bottom: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff;
  font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; border: 3px solid var(--bg0); box-sizing: content-box; }
.tooltip { position: fixed; background: #0b0c0e; color: var(--text); padding: 6px 10px; border-radius: 6px; font-size: 14px; font-weight: 600; pointer-events: none; z-index: 50; white-space: nowrap; box-shadow: 0 6px 20px rgba(0,0,0,.4); }

.sidebar { background: var(--bg1); display: flex; flex-direction: column; min-width: 0; }
.sidebar-scroll { flex: 1; overflow-y: auto; }
.side-head { height: 48px; padding: 0 14px; display: flex; align-items: center; justify-content: space-between; font-weight: 700;
  border-bottom: 1px solid var(--bg0); box-shadow: 0 1px 2px rgba(0,0,0,.2); cursor: pointer; }
.side-head:hover { background: var(--bg2); }
.side-head span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-head.static { cursor: default; } .side-head.static:hover { background: transparent; }
.cat { display: flex; align-items: center; justify-content: space-between; padding: 16px 8px 4px 14px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.cat button { background: none; border: 0; color: var(--muted); font-size: 18px; line-height: 1; padding: 0 4px; }
.cat button:hover { color: var(--text); }
.ch { margin: 1px 8px; padding: 6px 8px; border-radius: 6px; display: flex; align-items: center; gap: 8px; color: var(--muted); cursor: pointer; position: relative; }
.ch:hover { background: var(--bg3); color: var(--text); }
.ch.active { background: var(--bg4); color: var(--text); }
.ch.unread { color: var(--text); font-weight: 700; }
.ch.unread::before { content: ""; position: absolute; left: -8px; width: 4px; height: 8px; background: #fff; border-radius: 0 4px 4px 0; }
.ch .hash { width: 20px; text-align: center; color: var(--faint); font-size: 18px; flex-shrink: 0; }
.ch svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--faint); }
.ch .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch .del { display: none; background: none; border: 0; color: var(--faint); padding: 0 2px; }
.ch:hover .del { display: block; } .ch .del:hover { color: var(--red); }
.voice-users { margin: 0 8px 4px 36px; }
.vu { display: flex; align-items: center; gap: 8px; padding: 3px 6px; border-radius: 6px; color: var(--muted); font-size: 14px; }
.vu .icons { margin-left: auto; display: flex; gap: 3px; color: var(--faint); }
.vu .icons svg { width: 14px; height: 14px; }
.dm-row { margin: 1px 8px; padding: 6px 8px; border-radius: 6px; display: flex; align-items: center; gap: 10px; color: var(--muted); cursor: pointer; }
.dm-row:hover { background: var(--bg3); color: var(--text); }
.dm-row.active { background: var(--bg4); color: var(--text); }
.dm-row.unread { color: var(--text); font-weight: 700; }
.dm-row .badge { margin-left: auto; background: var(--red); color: #fff; border-radius: 9px; font-size: 11px; font-weight: 800; padding: 1px 6px; }

/* Avatare */
.av { position: relative; flex-shrink: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; user-select: none; }
.av.s24 { width: 24px; height: 24px; font-size: 11px; }
.av.s32 { width: 32px; height: 32px; font-size: 13px; }
.av.s40 { width: 40px; height: 40px; font-size: 16px; }
.av.s80 { width: 80px; height: 80px; font-size: 32px; }
.av .st { position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%; border: 3px solid var(--bg1); background: var(--faint); box-sizing: content-box; }
.av.s32 .st { width: 10px; height: 10px; }
.av .st.on { background: var(--green); }
.av.speaking { box-shadow: 0 0 0 2px var(--bg1), 0 0 0 4px var(--green); }

/* Nutzer-Panel unten links */
.user-panel { height: 56px; background: #16171a; display: flex; align-items: center; padding: 0 8px; gap: 8px; }
.user-panel .who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 4px; border-radius: 6px; cursor: pointer; }
.user-panel .who:hover { background: var(--bg3); }
.user-panel .names { min-width: 0; line-height: 1.2; }
.user-panel .dn { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-panel .un { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.voice-panel { background: #16171a; border-bottom: 1px solid var(--line); padding: 10px; }
.voice-panel .vp-top { display: flex; align-items: center; justify-content: space-between; }
.voice-panel .vp-status { color: var(--green); font-weight: 700; font-size: 14px; }
.voice-panel .vp-where { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; cursor: pointer; }
.voice-panel .vp-where:hover { text-decoration: underline; }
.voice-panel .vp-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.voice-panel .vp-btns button { border: 0; background: var(--bg3); border-radius: 6px; padding: 6px; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text); }
.voice-panel .vp-btns button:hover { background: var(--bg4); }
.voice-panel .vp-btns button.on { background: var(--text); color: #111; }
.voice-panel .vp-btns svg { width: 18px; height: 18px; }

/* ---------- Hauptbereich ---------- */
.main { background: var(--bg2); display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.main-head { height: 48px; flex-shrink: 0; padding: 0 16px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--bg0); box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.main-head .title { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.main-head .title .hash { color: var(--faint); font-size: 22px; font-weight: 400; }
.main-head .spacer { flex: 1; }
.main-head .tabs { display: flex; gap: 6px; margin-left: 10px; padding-left: 14px; border-left: 1px solid var(--line); }
.main-head .tab { border: 0; background: transparent; padding: 3px 10px; border-radius: 6px; color: var(--muted); font-weight: 600; }
.main-head .tab:hover { background: var(--bg3); color: var(--text); }
.main-head .tab.active { background: var(--bg4); color: var(--text); }
.main-head .tab.add { background: var(--green); color: #fff; }
.main-head .tab.add.active { background: transparent; color: var(--green); }
.main-head .tab .n { background: var(--red); color: #fff; border-radius: 9px; font-size: 11px; padding: 0 6px; margin-left: 4px; }

.messages { flex: 1; overflow-y: auto; padding: 16px 0 8px; min-height: 0; }
.welcome { padding: 16px 16px 24px; }
.welcome .big-icon { width: 68px; height: 68px; border-radius: 50%; background: var(--bg4); display: flex; align-items: center; justify-content: center; font-size: 36px; color: var(--text); margin-bottom: 8px; }
.welcome h2 { margin: 4px 0; font-size: 28px; }
.welcome p { margin: 0; color: var(--muted); }
.load-more { display: block; margin: 0 auto 10px; }
.day { display: flex; align-items: center; gap: 8px; margin: 16px 16px 8px; color: var(--faint); font-size: 12px; font-weight: 700; }
.day::before, .day::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.msg { position: relative; padding: 2px 48px 2px 72px; min-height: 22px; }
.msg.first { margin-top: 14px; padding-top: 4px; }
.msg:hover { background: rgba(0,0,0,.08); }
.msg .av { position: absolute; left: 16px; top: 6px; cursor: pointer; }
.msg .head { display: flex; align-items: baseline; gap: 8px; }
.msg .author { font-weight: 700; cursor: pointer; }
.msg .author:hover { text-decoration: underline; }
.msg .time { font-size: 12px; color: var(--faint); }
.msg .side-time { position: absolute; left: 0; width: 64px; text-align: right; font-size: 11px; color: var(--faint); top: 5px; display: none; }
.msg:not(.first):hover .side-time { display: block; }
.msg .content { white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; }
.msg .content code { background: var(--bg0); padding: 1px 5px; border-radius: 4px; font-family: Consolas, ui-monospace, monospace; font-size: 13px; }
.msg .content pre { background: var(--bg0); border: 1px solid var(--line); padding: 10px; border-radius: 6px; overflow-x: auto; margin: 4px 0; }
.msg .content pre code { background: none; padding: 0; }
.msg .content .mention { background: rgba(124,92,255,.25); color: #c9bcff; padding: 0 3px; border-radius: 4px; font-weight: 600; }
.msg.mentioned { background: rgba(245,165,36,.08); box-shadow: inset 2px 0 0 var(--amber); }
.msg .edited { font-size: 11px; color: var(--faint); margin-left: 4px; }
.msg .tools { position: absolute; right: 16px; top: -14px; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; display: none; padding: 2px; z-index: 2; }
.msg:hover .tools { display: flex; }
.msg .tools button { border: 0; background: transparent; color: var(--muted); padding: 4px 6px; border-radius: 5px; }
.msg .tools button:hover { background: var(--bg4); color: var(--text); }
.msg .tools svg { width: 18px; height: 18px; display: block; }
.msg textarea.edit { width: 100%; background: var(--bg0); border: 1px solid var(--accent); border-radius: 8px; padding: 8px; resize: none; outline: none; }
.msg .edit-hint { font-size: 12px; color: var(--muted); }

.composer { padding: 0 16px 6px; flex-shrink: 0; }
.composer-box { background: var(--bg3); border-radius: var(--radius); display: flex; align-items: flex-end; padding: 0 6px 0 14px; }
.composer textarea { flex: 1; background: transparent; border: 0; outline: none; resize: none; padding: 12px 0; max-height: 220px; line-height: 1.4; }
.composer .emoji { font-size: 20px; padding: 8px; background: none; border: 0; filter: grayscale(1); opacity: .7; }
.composer .emoji:hover { filter: none; opacity: 1; }
.typing { height: 22px; padding: 0 18px; font-size: 13px; color: var(--muted); flex-shrink: 0; }
.typing b { color: var(--text); }
.emoji-pop { position: fixed; background: var(--bg1); border: 1px solid var(--line); border-radius: 10px; padding: 8px; display: grid; grid-template-columns: repeat(8, 32px); gap: 2px; z-index: 40; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.emoji-pop button { border: 0; background: transparent; font-size: 20px; border-radius: 6px; height: 32px; }
.emoji-pop button:hover { background: var(--bg4); }

/* Freunde */
.friends { flex: 1; overflow-y: auto; padding: 16px 20px; }
.friends h4 { font-size: 12px; text-transform: uppercase; color: var(--muted); letter-spacing: .04em; margin: 8px 0 8px; }
.friend { display: flex; align-items: center; gap: 12px; padding: 10px 10px; border-top: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.friend:hover { background: var(--bg3); border-top-color: transparent; }
.friend .names { flex: 1; min-width: 0; }
.friend .dn { font-weight: 700; } .friend .sub { font-size: 13px; color: var(--muted); }
.friend .acts { display: flex; gap: 8px; }
.round-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--bg1); color: var(--muted); display: flex; align-items: center; justify-content: center; }
.round-btn:hover { color: var(--text); }
.round-btn.ok:hover { color: var(--green); } .round-btn.no:hover { color: var(--red); }
.round-btn svg { width: 18px; height: 18px; }
.add-friend { padding: 8px 0 20px; border-bottom: 1px solid var(--line); }
.add-friend h3 { margin: 0 0 4px; }
.add-friend p { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.add-friend .row { display: flex; gap: 10px; background: var(--bg0); border: 1px solid var(--line); border-radius: 10px; padding: 6px 6px 6px 14px; }
.add-friend .row input { flex: 1; background: transparent; border: 0; outline: none; padding: 6px 0; }
.add-friend .ok-msg { color: var(--green); font-size: 14px; margin-top: 8px; }
.add-friend .err { margin-top: 8px; }
.empty { text-align: center; color: var(--muted); padding: 60px 20px; }
.empty .big { font-size: 48px; margin-bottom: 8px; }

/* Sprachkanal-Ansicht */
.voice-view { flex: 1; display: flex; flex-direction: column; background: #0c0d0f; min-height: 0; }
.voice-grid { flex: 1; display: grid; gap: 10px; padding: 16px; align-content: center; justify-content: center; min-height: 0; overflow: auto;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.tile { position: relative; background: var(--bg3); border-radius: 12px; aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center; overflow: hidden; min-height: 140px; }
.tile.speaking { box-shadow: inset 0 0 0 3px var(--green); }
.tile video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.tile video.mirror { transform: scaleX(-1); }
.tile .label { position: absolute; left: 10px; bottom: 10px; background: rgba(0,0,0,.6); padding: 3px 9px; border-radius: 6px; font-size: 13px; font-weight: 600; display: flex; gap: 6px; align-items: center; }
.tile .label svg { width: 14px; height: 14px; color: var(--red); }
.tile .fs { position: absolute; right: 8px; top: 8px; display: none; }
.tile:hover .fs { display: flex; }
.voice-bar { display: flex; justify-content: center; gap: 12px; padding: 16px; }
.voice-bar .vbtn { width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--bg3); color: var(--text); display: flex; align-items: center; justify-content: center; }
.voice-bar .vbtn:hover { background: var(--bg4); }
.voice-bar .vbtn.on { background: var(--text); color: #111; }
.voice-bar .vbtn.off { background: #3a1e21; color: var(--red); }
.voice-bar .vbtn.hang { background: var(--red); color: #fff; }
.voice-bar .vbtn svg { width: 24px; height: 24px; }
.voice-join { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--muted); }
.voice-join h2 { color: var(--text); margin: 0; }
.voice-join .who { display: flex; gap: 8px; }
.dm-call { background: #0c0d0f; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.dm-call .voice-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 320px)); padding: 16px 16px 0; }
.dm-call .voice-bar { padding: 12px; }

/* Mitgliederliste */
.members { background: var(--bg1); overflow-y: auto; padding: 8px 8px 16px; }
.members h4 { font-size: 12px; text-transform: uppercase; color: var(--muted); letter-spacing: .04em; margin: 16px 8px 6px; }
.member { display: flex; align-items: center; gap: 10px; padding: 5px 8px; border-radius: 6px; cursor: pointer; color: var(--muted); }
.member:hover { background: var(--bg3); color: var(--text); }
.member.on { color: var(--text); }
.member.off { opacity: .45; }
.member .crown { color: var(--amber); font-size: 13px; }
.member .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }

/* Modals, Menüs, Toasts */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: flex; align-items: center; justify-content: center; z-index: 30; animation: fade .12s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: 460px; max-width: calc(100vw - 32px); max-height: calc(100vh - 40px); overflow-y: auto; background: var(--bg2); border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.6); animation: pop .15s; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } }
.modal .m-body { padding: 22px 22px 8px; }
.modal h2 { margin: 0 0 6px; font-size: 22px; text-align: center; }
.modal .m-sub { color: var(--muted); text-align: center; margin: 0 0 18px; font-size: 14px; }
.modal .m-foot { background: var(--bg1); padding: 14px 22px; display: flex; justify-content: flex-end; gap: 10px; border-radius: 0 0 14px 14px; }
.choice { display: flex; align-items: center; gap: 12px; width: 100%; border: 1px solid var(--line); background: var(--bg3); border-radius: 10px; padding: 14px; margin-bottom: 10px; text-align: left; font-weight: 700; }
.choice:hover { background: var(--bg4); }
.choice .ic { font-size: 26px; }
.radio-row { display: flex; gap: 10px; margin-bottom: 14px; }
.radio-row button { flex: 1; border: 1px solid var(--line); background: var(--bg3); border-radius: 10px; padding: 12px; text-align: left; }
.radio-row button.sel { border-color: var(--accent); background: rgba(124,92,255,.15); }
.radio-row b { display: block; } .radio-row small { color: var(--muted); }
.invite-box { display: flex; gap: 8px; background: var(--bg0); border: 1px solid var(--line); border-radius: 8px; padding: 6px 6px 6px 12px; align-items: center; }
.invite-box code { flex: 1; font-size: 18px; letter-spacing: .08em; }
.settings { width: 640px; }
.settings .sec { padding: 0 22px 18px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.settings .sec:last-child { border-bottom: 0; }
.settings h3 { margin: 18px 0 12px; font-size: 13px; text-transform: uppercase; color: var(--muted); letter-spacing: .05em; }
.settings .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.colors { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.colors button { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; }
.colors button.sel { border-color: #fff; }
.kb-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; background: var(--bg1); border-radius: 8px; margin-bottom: 8px; }
.kb-row .kb { min-width: 170px; text-align: center; background: var(--bg0); border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; font-family: Consolas, monospace; font-size: 13px; }
.kb-row .kb.rec { border-color: var(--accent); color: var(--accent); }
.kb-hint { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.meter { height: 8px; background: var(--bg0); border-radius: 4px; overflow: hidden; margin-top: 8px; }
.meter div { height: 100%; width: 0; background: var(--green); transition: width .08s; }
.menu { position: fixed; background: #0f1012; border: 1px solid var(--line); border-radius: 8px; padding: 6px; min-width: 200px; z-index: 40; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.menu button { display: flex; width: 100%; border: 0; background: none; text-align: left; padding: 8px 10px; border-radius: 5px; font-size: 14px; font-weight: 500; color: var(--text); justify-content: space-between; }
.menu button:hover { background: var(--accent); color: #fff; }
.menu button.red { color: #ff7b7b; } .menu button.red:hover { background: var(--red); color: #fff; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 6px; }
.profile-pop { position: fixed; width: 280px; background: var(--bg1); border-radius: 12px; overflow: hidden; z-index: 40; box-shadow: 0 10px 40px rgba(0,0,0,.6); border: 1px solid var(--line); }
.profile-pop .banner { height: 60px; }
.profile-pop .pp-body { padding: 0 16px 16px; }
.profile-pop .av { margin-top: -40px; border: 6px solid var(--bg1); box-sizing: content-box; }
.profile-pop .dn { font-size: 20px; font-weight: 800; margin-top: 8px; }
.profile-pop .un { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.profile-pop .acts { display: flex; flex-direction: column; gap: 8px; }
#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: #f2f3f5; color: #111; padding: 10px 18px; border-radius: 10px; font-weight: 600; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.4); animation: pop .15s; }
.toast.err { background: var(--red); color: #fff; }
.conn { position: fixed; top: 0; left: 0; right: 0; background: var(--amber); color: #1a1200; text-align: center; padding: 6px; font-weight: 700; font-size: 14px; z-index: 70; }
.ring { width: 320px; text-align: center; padding: 28px 20px 22px; }
.ring .av { margin: 0 auto 12px; animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(35,197,94,.6); } 50% { box-shadow: 0 0 0 14px rgba(35,197,94,0); } }
.ring .acts { display: flex; justify-content: center; gap: 24px; margin-top: 20px; }
.ring .acts button { width: 56px; height: 56px; border-radius: 50%; border: 0; display: flex; align-items: center; justify-content: center; }
.ring .acts svg { width: 26px; height: 26px; }
