/* ToLobby – Aussehen der ganzen App */
@font-face { font-family: 'Cairo'; src: url('/fonts/cairo-latin-wght-normal.woff2') format('woff2'); font-weight: 200 1000; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Cairo'; src: url('/fonts/cairo-latin-ext-wght-normal.woff2') format('woff2'); font-weight: 200 1000; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Cairo'; src: url('/fonts/cairo-arabic-wght-normal.woff2') format('woff2'); font-weight: 200 1000; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }

:root {
  --bg0: #0a0a11; --bg1: #10101a; --bg2: #161622; --bg3: #1e1e2d; --bg4: #272739; --bg5: #303046;
  --line: #262638; --text: #ececf4; --text2: #c5c5d6; --muted: #8d8da6; --faint: #5f5f78;
  --accent: #7c5cff; --accent-2: #ff5c8a; --accent-soft: rgba(124, 92, 255, .16);
  --ok: #3ddc97; --warn: #ffb02e; --danger: #ff4d5e; --info: #2ec5ff;
  --mention: rgba(255, 176, 46, .09); --mention-line: #ffb02e;
  --radius: 12px; --shadow: 0 12px 40px rgba(0, 0, 0, .45);
  --rail: 72px; --side: 260px; --members: 248px; --header: 52px;
  --font: 'Cairo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg0: #e4e5ef; --bg1: #eff0f6; --bg2: #ffffff; --bg3: #f1f2f8; --bg4: #e5e6f0; --bg5: #d6d8e6;
  --line: #e1e2ec; --text: #15151f; --text2: #33334a; --muted: #686882; --faint: #9a9ab0;
  --accent-soft: rgba(124, 92, 255, .12); --mention: rgba(255, 176, 46, .14);
  --shadow: 0 12px 40px rgba(20, 20, 50, .16);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg0); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; overflow: hidden; }
body { overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: var(--info); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }
::selection { background: var(--accent); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; }
.col { display: flex; flex-direction: column; gap: 8px; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon.sm { width: 16px; height: 16px; }
.icon.lg { width: 24px; height: 24px; }

/* ---------- Grundlayout ---------- */
#app { position: fixed; inset: 0; display: flex; background: var(--bg0); padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left); }
.rail { width: var(--rail); flex: none; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 0; overflow-y: auto; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail-sep { width: 32px; height: 2px; border-radius: 2px; background: var(--bg4); margin: 2px 0; flex: none; }
.rail-item { position: relative; width: 48px; height: 48px; flex: none; }
.rail-btn { width: 48px; height: 48px; border-radius: 24px; display: grid; place-items: center; background: var(--bg2); color: var(--text2); transition: border-radius .18s, background .18s, color .18s; overflow: hidden; font-weight: 700; font-size: 16px; }
.rail-btn img { width: 100%; height: 100%; object-fit: cover; }
.rail-btn:hover, .rail-item.active .rail-btn { border-radius: 16px; background: var(--accent); color: #fff; }
.rail-btn.green { color: var(--ok); }
.rail-btn.green:hover { background: var(--ok); color: #fff; }
.rail-item::before { content: ''; position: absolute; left: -12px; top: 50%; width: 8px; height: 0; border-radius: 0 4px 4px 0; background: var(--text); transform: translateY(-50%); transition: height .18s; }
.rail-item.unread::before { height: 8px; }
.rail-item:hover::before { height: 20px; }
.rail-item.active::before { height: 40px; }
[dir="rtl"] .rail-item::before { left: auto; right: -12px; border-radius: 4px 0 0 4px; }
.rail-badge, .badge { position: absolute; right: -4px; bottom: -4px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--danger); color: #fff; font-size: 11.5px; font-weight: 800; display: grid; place-items: center; border: 3px solid var(--bg0); }
.rail-voice { position: absolute; right: -2px; bottom: -2px; width: 18px; height: 18px; border-radius: 50%; background: var(--ok); border: 3px solid var(--bg0); display: grid; place-items: center; }
.rail-voice .icon { width: 9px; height: 9px; color: #fff; stroke-width: 3; }
.logo-mark { width: 28px; height: 28px; }

.side { width: var(--side); flex: none; display: flex; flex-direction: column; background: var(--bg1); border-radius: 14px 0 0 0; overflow: hidden; }
[dir="rtl"] .side { border-radius: 0 14px 0 0; }
.side-head { height: var(--header); flex: none; display: flex; align-items: center; gap: 8px; padding: 0 14px; border-bottom: 1px solid var(--line); font-weight: 800; }
.side-head.clickable { cursor: pointer; }
.side-head.clickable:hover { background: var(--bg3); }
.side-banner { height: 110px; flex: none; background-size: cover; background-position: center; position: relative; }
.side-banner .side-head { position: absolute; inset: auto 0 0 0; border: 0; background: linear-gradient(transparent, rgba(0, 0, 0, .65)); color: #fff; }
.side-scroll { flex: 1; overflow-y: auto; padding: 8px 8px 16px; }
.side-section { display: flex; align-items: center; justify-content: space-between; padding: 14px 6px 4px; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.side-section button { color: var(--muted); }
.side-section button:hover { color: var(--text); }
.ch { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; color: var(--muted); cursor: pointer; position: relative; min-height: 34px; }
.ch:hover { background: var(--bg3); color: var(--text2); }
.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; border-radius: 0 4px 4px 0; background: var(--text); }
.ch .ch-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch .ch-tools { display: none; gap: 4px; }
.ch.active .ch-tools { display: flex; }
@media (hover: hover) { .ch:hover .ch-tools { display: flex; } }
.ch .ch-tools button { color: var(--muted); display: grid; place-items: center; }
.ch .ch-tools button:hover { color: var(--text); }
.ch .badge { position: static; border: 0; height: 18px; min-width: 18px; font-size: 11px; }
.voice-users { padding: 2px 0 4px 30px; display: flex; flex-direction: column; gap: 2px; }
[dir="rtl"] .voice-users { padding: 2px 30px 4px 0; }
.voice-user { display: flex; align-items: center; gap: 8px; padding: 3px 6px; border-radius: 6px; color: var(--text2); font-size: 13.5px; cursor: pointer; }
.voice-user:hover { background: var(--bg3); }
.voice-user .icon { width: 14px; height: 14px; color: var(--muted); }
.voice-user .live { background: var(--danger); color: #fff; font-size: 10px; font-weight: 800; padding: 0 5px; border-radius: 4px; }

.dm-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; cursor: pointer; color: var(--muted); }
.dm-item:hover { background: var(--bg3); color: var(--text2); }
.dm-item.active { background: var(--bg4); color: var(--text); }
.dm-item.unread { color: var(--text); font-weight: 700; }
.dm-item .x { display: none; color: var(--muted); }
@media (hover: hover) { .dm-item:hover .x { display: grid; } }

/* Nutzerleiste unten links */
.me-bar { flex: none; background: var(--bg0); padding: 8px; display: flex; flex-direction: column; gap: 8px; }
:root[data-theme="light"] .me-bar { background: var(--bg4); }
.me-row { display: flex; align-items: center; gap: 4px; }
.me-who { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; padding: 4px; border-radius: 8px; cursor: pointer; }
.me-who:hover { background: var(--bg3); }
.me-who .t1 { font-weight: 700; font-size: 14px; line-height: 1.2; }
.me-who .t2 { font-size: 12px; color: var(--muted); line-height: 1.2; }
.ibtn { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; color: var(--text2); flex: none; position: relative; }
.ibtn:hover { background: var(--bg3); color: var(--text); }
.ibtn.on { color: var(--danger); }
.ibtn.active { color: var(--accent); }
.ibtn .badge { right: -2px; bottom: auto; top: -2px; border-width: 2px; height: 18px; min-width: 18px; font-size: 10.5px; }
.voice-panel { border-bottom: 1px solid var(--line); padding: 4px 4px 8px; display: flex; flex-direction: column; gap: 6px; }
.voice-panel .vp-status { color: var(--ok); font-weight: 800; font-size: 13.5px; display: flex; align-items: center; gap: 6px; }
.voice-panel .vp-status.bad { color: var(--warn); }
.voice-panel .vp-room { color: var(--muted); font-size: 12.5px; cursor: pointer; }
.voice-panel .vp-room:hover { text-decoration: underline; color: var(--text2); }
.vp-buttons { display: flex; gap: 6px; }
.vp-buttons .btn { flex: 1; padding: 6px 0; }

/* Hauptbereich */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--bg2); position: relative; }
.main-head { height: var(--header); flex: none; display: flex; align-items: center; gap: 10px; padding: 0 12px 0 16px; border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 rgba(0, 0, 0, .15); }
.main-head .title { font-weight: 800; display: flex; align-items: center; gap: 6px; min-width: 0; }
.main-head .topic { color: var(--muted); font-size: 13.5px; border-left: 1px solid var(--line); padding-left: 10px; margin-left: 4px; }
[dir="rtl"] .main-head .topic { border-left: 0; border-right: 1px solid var(--line); padding: 0 10px 0 0; margin: 0 4px 0 0; }
.main-body { flex: 1; min-height: 0; display: flex; }
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.members { width: var(--members); flex: none; background: var(--bg1); overflow-y: auto; padding: 8px 8px 20px; }
.member { display: flex; align-items: center; gap: 10px; padding: 5px 8px; border-radius: 8px; cursor: pointer; }
.member:hover { background: var(--bg3); }
.member.offline { opacity: .45; }
.member .sub { font-size: 12px; color: var(--muted); }

.back-btn { display: none; }

/* ---------- Avatare, Status, Dekorationen ---------- */
.av { position: relative; flex: none; border-radius: 50%; display: inline-grid; place-items: center; }
.av-img { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; display: grid; place-items: center; color: #fff; font-weight: 800; background: var(--accent); user-select: none; }
.av-img img { width: 100%; height: 100%; object-fit: cover; }
.av-dot { position: absolute; right: -2px; bottom: -2px; width: 34%; height: 34%; min-width: 10px; min-height: 10px; max-width: 18px; max-height: 18px; border-radius: 50%; border: 3px solid var(--bg1); background: var(--faint); z-index: 3; }
.av-dot.online { background: var(--ok); }
.av-dot.idle { background: var(--warn); }
.av-dot.dnd { background: var(--danger); }
.av-dot.offline { background: var(--faint); }
.av.speaking .av-img { box-shadow: 0 0 0 3px var(--ok); }
/* Deko */
.av[class*="deco-"]::before, .av[class*="deco-"]::after { content: ''; position: absolute; pointer-events: none; z-index: 2; }
.deco-glow .av-img { box-shadow: 0 0 0 2px var(--deco-c, var(--accent)), 0 0 14px 2px var(--deco-c, var(--accent)); animation: glow 2.4s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 0 2px var(--deco-c, var(--accent)), 0 0 22px 6px var(--deco-c, var(--accent)); } }
.deco-ring::before { inset: -4px; border-radius: 50%; background: conic-gradient(from 0deg, #7c5cff, #ff5c8a, #ffb02e, #3ddc97, #2ec5ff, #7c5cff); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px)); mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px)); animation: spin 4s linear infinite; }
.deco-neon::before { inset: -4px; border-radius: 50%; border: 2px solid #2ec5ff; box-shadow: 0 0 8px #2ec5ff, inset 0 0 8px #ff5c8a; animation: glow2 1.6s ease-in-out infinite alternate; }
@keyframes glow2 { to { border-color: #ff5c8a; box-shadow: 0 0 12px #ff5c8a, inset 0 0 8px #2ec5ff; } }
.deco-orbit::before { inset: -6px; border-radius: 50%; border: 1px dashed rgba(255, 255, 255, .35); }
.deco-orbit::after { width: 9px; height: 9px; border-radius: 50%; background: #ffb02e; box-shadow: 0 0 8px #ffb02e; top: 50%; left: 50%; margin: -4.5px; animation: orbit 3s linear infinite; }
@keyframes orbit { from { transform: rotate(0) translateX(calc(var(--s, 40px) / 2 + 6px)); } to { transform: rotate(360deg) translateX(calc(var(--s, 40px) / 2 + 6px)); } }
@keyframes spin { to { transform: rotate(360deg); } }
.deco-crown::after { content: '👑'; top: -38%; left: 50%; transform: translateX(-50%) rotate(-12deg); font-size: calc(var(--s, 40px) * .42); line-height: 1; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .5)); }
.deco-halo::after { top: -16%; left: 15%; right: 15%; height: 18%; border-radius: 50%; border: 3px solid #ffe27a; box-shadow: 0 0 10px #ffe27a; animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-3px); } }
.deco-flames::before { inset: -5px; border-radius: 50%; background: conic-gradient(#ff3d00, #ffb02e, #ff3d00, #ff7a00, #ff3d00); filter: blur(2px); animation: spin 1.8s linear infinite; -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 5px)); mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 5px)); }
.deco-hearts::after, .deco-stars::after, .deco-leaves::after { inset: -22%; font-size: calc(var(--s, 40px) * .26); line-height: 1; animation: spin 7s linear infinite; background: none; display: block; }
.deco-hearts::after { content: '💖'; text-align: center; }
.deco-stars::after { content: '✨'; text-align: center; }
.deco-leaves::after { content: '🍃'; text-align: center; }
.deco-wings::before, .deco-wings::after { top: 8%; width: 70%; height: 80%; background: url('/img/wing.svg') center/contain no-repeat; z-index: 0; animation: flap 1.6s ease-in-out infinite; }
.deco-wings::before { right: 72%; transform-origin: right center; }
.deco-wings::after { left: 72%; transform: scaleX(-1); transform-origin: left center; animation-name: flap2; }
.deco-wings .av-img { z-index: 1; }
@keyframes flap { 50% { transform: rotate(-12deg); } }
@keyframes flap2 { 50% { transform: scaleX(-1) rotate(-12deg); } }
@media (prefers-reduced-motion: reduce) { .av::before, .av::after, .av-img { animation: none !important; } }

/* Namens-Stile */
.uname { font-weight: 700; }
.ns-sunset, .ns-ocean, .ns-neon, .ns-gold, .ns-candy, .ns-toxic, .ns-fire, .ns-ice, .ns-galaxy, .ns-rainbow { -webkit-background-clip: text; background-clip: text; color: transparent !important; }
.ns-sunset { background-image: linear-gradient(90deg, #ff7a45, #ff3d77); }
.ns-ocean { background-image: linear-gradient(90deg, #2ec5ff, #3d6bff); }
.ns-neon { background-image: linear-gradient(90deg, #39ff14, #00e5ff); text-shadow: 0 0 12px rgba(57, 255, 20, .25); }
.ns-gold { background-image: linear-gradient(90deg, #ffd86b, #ffae00, #ffe9a8); }
.ns-candy { background-image: linear-gradient(90deg, #ff8ad8, #b98bff); }
.ns-toxic { background-image: linear-gradient(90deg, #b6ff00, #00ff9d); }
.ns-fire { background-image: linear-gradient(90deg, #ffdd00, #ff6a00, #ff0040); }
.ns-ice { background-image: linear-gradient(90deg, #e0f7ff, #8fd3ff); }
.ns-galaxy { background-image: linear-gradient(90deg, #7c5cff, #ff5c8a, #2ec5ff); }
.ns-rainbow { background-image: linear-gradient(90deg, #ff4d5e, #ffb02e, #ffe14d, #3ddc97, #2ec5ff, #7c5cff, #ff4d5e); background-size: 200% 100%; animation: rainbow 3s linear infinite; }
.ns-mono { color: var(--text) !important; font-family: ui-monospace, Consolas, monospace; letter-spacing: -.02em; }
@keyframes rainbow { to { background-position: 200% 0; } }
/* Namens-Stile seit Version 74 – Metall (Gold, Chrom, Roségold, Smaragd): heller Verlauf von oben nach unten wie poliertes
   Metall, darüber wandert ein Lichtstreifen. Fließende Verläufe (Königlich, Holo, Polarlicht, Lava …) laufen langsam durch. */
.ns-gold, .ns-chrome, .ns-rosegold, .ns-emerald, .ns-royal, .ns-holo, .ns-aurora, .ns-lava, .ns-blood, .ns-mint, .ns-cotton { -webkit-background-clip: text; background-clip: text; color: transparent !important; }
.ns-gold, .ns-chrome, .ns-rosegold, .ns-emerald { background-image: linear-gradient(110deg, transparent 42%, rgba(255, 255, 255, .95) 50%, transparent 58%), var(--metal); background-size: 260% 100%, 100% 100%; background-position: 160% 0, 0 0; animation: ns-sheen 4.8s ease-in-out infinite; }
.ns-gold { --metal: linear-gradient(180deg, #fff6c2 0%, #f6cf55 34%, #b07c1c 53%, #f8dd80 70%, #d19a2c 100%); }
.ns-chrome { --metal: linear-gradient(180deg, #ffffff 0%, #c9d2df 34%, #6d7889 53%, #e6ecf5 70%, #9aa6b8 100%); }
.ns-rosegold { --metal: linear-gradient(180deg, #ffe9df 0%, #f2a995 34%, #a8614f 53%, #f7c4b2 70%, #c98470 100%); }
.ns-emerald { --metal: linear-gradient(180deg, #d6ffe9 0%, #3fd68f 34%, #0f7a47 53%, #7df0b7 70%, #1f9a5c 100%); }
@keyframes ns-sheen { 0%, 55% { background-position: 160% 0, 0 0; } 100% { background-position: -60% 0, 0 0; } }
.ns-royal, .ns-holo, .ns-aurora, .ns-lava, .ns-blood { background-size: 220% 100%; animation: rainbow 6s linear infinite; }
.ns-royal { background-image: linear-gradient(90deg, #8a4dff, #c86bff, #ffd86b, #fff3c2, #ffd86b, #c86bff, #8a4dff); }
.ns-holo { background-image: linear-gradient(90deg, #a8fff0, #a8c8ff, #e0a8ff, #ffa8d8, #fff0a8, #a8fff0); }
.ns-aurora { background-image: linear-gradient(90deg, #3dffb0, #2ec5ff, #8f6bff, #5ef0c8, #3dffb0); }
.ns-lava { background-image: linear-gradient(90deg, #ffdd55, #ff7a1a, #d91a1a, #7a0f0f, #d91a1a, #ff7a1a, #ffdd55); filter: drop-shadow(0 0 5px rgba(255, 90, 20, .45)); }
.ns-blood { background-image: linear-gradient(90deg, #ff5a6a, #c9102a, #6b0010, #c9102a, #ff5a6a); filter: drop-shadow(0 0 5px rgba(217, 16, 42, .5)); }
.ns-mint { background-image: linear-gradient(90deg, #c8ffe8, #5ee6b5, #2ec5a0); }
.ns-cotton { background-image: linear-gradient(90deg, #ffc2e2, #c9b8ff, #a8e0ff); }
.ns-glow { color: #fff !important; text-shadow: 0 0 6px var(--accent), 0 0 14px var(--accent), 0 0 26px rgba(132, 104, 255, .55); animation: ns-glow 3s ease-in-out infinite; }
@keyframes ns-glow { 50% { text-shadow: 0 0 3px var(--accent), 0 0 8px var(--accent), 0 0 14px rgba(132, 104, 255, .35); } }
.ns-glitch { color: #fff !important; text-shadow: 1.5px 0 #ff2fa0, -1.5px 0 #20d6ff; animation: ns-glitch 3s steps(1) infinite; }
@keyframes ns-glitch { 0%, 86%, 100% { text-shadow: 1.5px 0 #ff2fa0, -1.5px 0 #20d6ff; transform: none; } 88% { text-shadow: -2.5px 0 #ff2fa0, 2.5px 0 #20d6ff; transform: translateX(1px) skewX(-6deg); } 92% { text-shadow: 2.5px 1px #ff2fa0, -2.5px -1px #20d6ff; transform: translateX(-1px); } 96% { text-shadow: 1.5px 0 #ff2fa0, -1.5px 0 #20d6ff; transform: skewX(4deg); } }
.ns-glitch { display: inline-block; }
@media (prefers-reduced-motion: reduce) { .uname { animation: none !important; } }
/* Auswahl in den Einstellungen: Überschrift über einer Gruppe (Premium / Leuchtringe), „Eigene Farbe“ bei den Farben */
.opt-grid .opt-head { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; margin: 10px 2px 0; font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.opt-grid .opt-head .icon { width: 14px; height: 14px; color: #ffd86b; }
.colors label.own { position: relative; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; overflow: hidden; color: var(--muted); border: 1.5px dashed rgba(255, 255, 255, .34); }
.colors label.own.sel { border: 3px solid var(--text); }
.colors label.own .icon { width: 15px; height: 15px; }
.colors label.own input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.badges { display: inline-flex; gap: 3px; vertical-align: middle; }
.bdg { font-size: 13px; line-height: 1; cursor: default; }
.role-tag { font-size: 10.5px; font-weight: 800; padding: 1px 6px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); text-transform: uppercase; letter-spacing: .03em; }
.role-tag.owner { background: rgba(255, 176, 46, .15); color: var(--warn); }
.role-tag.admin { background: rgba(255, 77, 94, .14); color: var(--danger); }
.role-tag.mod { background: rgba(61, 220, 151, .14); color: var(--ok); }
.role-tag.bot { background: var(--accent); color: #fff; }

/* ---------- Nachrichten ---------- */
.msgs { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 12px 0 8px; display: flex; flex-direction: column; }
.msgs-inner { margin-top: auto; }
.msg { position: relative; padding: 2px 64px 2px 72px; min-height: 26px; }
[dir="rtl"] .msg { padding: 2px 72px 2px 64px; }
.msg:hover { background: rgba(0, 0, 0, .12); }
:root[data-theme="light"] .msg:hover { background: rgba(0, 0, 0, .03); }
.msg.head { margin-top: 14px; }
.msg.mentioned { background: var(--mention); }
.msg.mentioned::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--mention-line); }
.msg.highlight { animation: hl 2.2s ease-out; }
@keyframes hl { from { background: var(--accent-soft); } }
.msg .m-av { position: absolute; left: 16px; top: 4px; cursor: pointer; }
[dir="rtl"] .msg .m-av { left: auto; right: 16px; }
.msg .m-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.msg .m-head .uname { cursor: pointer; }
.msg .m-head .uname:hover { text-decoration: underline; }
.msg .m-time { color: var(--faint); font-size: 12px; }
.msg .m-side-time { position: absolute; left: 16px; width: 44px; text-align: center; top: 5px; font-size: 10.5px; color: var(--faint); display: none; }
[dir="rtl"] .msg .m-side-time { left: auto; right: 16px; }
.msg:not(.head):hover .m-side-time { display: block; }
.msg .m-body { color: var(--text2); word-wrap: break-word; overflow-wrap: anywhere; white-space: pre-wrap; }
.msg .m-body.jumbo { font-size: 42px; line-height: 1.2; }
.msg .m-edited { color: var(--faint); font-size: 11px; margin-left: 4px; }
.msg.pending { opacity: .55; }
.msg.failed .m-body { color: var(--danger); }
.msg .m-reply { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin: 0 0 2px; cursor: pointer; position: relative; }
.msg .m-reply::before { content: ''; position: absolute; left: -36px; top: 50%; width: 30px; height: 10px; border-left: 2px solid var(--bg5); border-top: 2px solid var(--bg5); border-top-left-radius: 6px; }
[dir="rtl"] .msg .m-reply::before { left: auto; right: -36px; border-left: 0; border-right: 2px solid var(--bg5); border-top-left-radius: 0; border-top-right-radius: 6px; }
.msg .m-reply .ellipsis { max-width: 520px; }
.msg .m-reply:hover .ellipsis { color: var(--text2); }
.msg.system { color: var(--muted); padding-top: 6px; padding-bottom: 6px; }
.msg.system .sys-ic { position: absolute; left: 30px; top: 8px; color: var(--ok); }
[dir="rtl"] .msg.system .sys-ic { left: auto; right: 30px; }
.m-body code { background: var(--bg0); border-radius: 4px; padding: 1px 5px; font-family: ui-monospace, Consolas, monospace; font-size: 13.5px; }
.m-body pre { background: var(--bg0); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; overflow-x: auto; margin: 4px 0; max-width: 100%; }
.m-body pre code { background: none; padding: 0; }
.m-body blockquote { margin: 2px 0; padding-left: 10px; border-left: 4px solid var(--bg5); }
.m-body .mention { background: var(--accent-soft); color: var(--accent); border-radius: 4px; padding: 0 3px; font-weight: 600; cursor: pointer; }
.m-body .spoiler { background: var(--bg5); color: transparent; border-radius: 4px; cursor: pointer; padding: 0 2px; }
.m-body .spoiler.open { background: var(--bg3); color: inherit; }
.m-atts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.m-att { position: relative; border-radius: 10px; overflow: hidden; cursor: zoom-in; background: var(--bg3); max-width: min(400px, 100%); }
.m-att img { max-height: 340px; width: auto; object-fit: contain; }
.m-att.spoiler img { filter: blur(40px); }
.m-att.spoiler::after { content: 'SPOILER'; position: absolute; inset: 0; display: grid; place-items: center; font-weight: 900; color: #fff; letter-spacing: .1em; background: rgba(0, 0, 0, .35); }
.reactions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.react { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 8px; background: var(--bg3); border: 1px solid transparent; font-size: 14px; }
.react:hover { border-color: var(--bg5); }
.react.me { background: var(--accent-soft); border-color: var(--accent); }
.react b { font-size: 12.5px; color: var(--text2); }
.m-tools { position: absolute; right: 16px; top: -16px; display: none; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); z-index: 5; }
[dir="rtl"] .m-tools { right: auto; left: 16px; }
.msg:hover .m-tools, .m-tools.open { display: flex; }
.m-tools button { width: 32px; height: 32px; display: grid; place-items: center; color: var(--text2); }
.m-tools button:hover { background: var(--bg3); color: var(--text); }
.day-sep { display: flex; align-items: center; gap: 10px; margin: 18px 16px 4px; color: var(--muted); font-size: 12px; font-weight: 700; }
.day-sep::before, .day-sep::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.new-sep { display: flex; align-items: center; margin: 6px 16px; color: var(--danger); font-size: 11px; font-weight: 800; }
.new-sep::before { content: ''; flex: 1; height: 1px; background: var(--danger); margin-right: 8px; }
.chan-start { padding: 16px 16px 8px; }
.chan-start .big-ic { width: 68px; height: 68px; border-radius: 50%; background: var(--bg4); display: grid; place-items: center; margin-bottom: 8px; }
.chan-start .big-ic .icon { width: 36px; height: 36px; }
.chan-start h2 { margin: 0 0 4px; font-size: 28px; }
.load-more { text-align: center; padding: 8px; color: var(--muted); font-size: 13px; }
.jump-new { position: absolute; left: 50%; transform: translateX(-50%); bottom: 88px; z-index: 6; }

/* Eingabefeld */
.composer { padding: 0 16px 20px; flex: none; position: relative; }
.composer-box { background: var(--bg3); border-radius: 12px; display: flex; flex-direction: column; }
.composer-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; background: var(--bg4); border-radius: 12px 12px 0 0; font-size: 13px; color: var(--muted); }
.composer-row { display: flex; align-items: flex-end; gap: 4px; padding: 4px 6px; }
.composer textarea { flex: 1; resize: none; border: 0; outline: 0; background: transparent; color: var(--text); padding: 9px 6px; max-height: 40vh; min-height: 40px; line-height: 1.4; }
.composer textarea::placeholder { color: var(--faint); }
.composer .ibtn { width: 38px; height: 38px; }
.composer .send { color: var(--accent); }
.att-preview { display: flex; gap: 8px; padding: 10px 12px 0; overflow-x: auto; }
.att-preview .ap { position: relative; width: 96px; height: 96px; flex: none; border-radius: 10px; overflow: hidden; background: var(--bg4); }
.att-preview .ap img { width: 100%; height: 100%; object-fit: cover; }
.att-preview .ap button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0, 0, 0, .7); color: #fff; display: grid; place-items: center; }
.att-preview .ap .prog { position: absolute; inset: auto 0 0 0; height: 4px; background: var(--accent); }
.typing { height: 22px; padding: 0 18px; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; position: absolute; bottom: -1px; left: 0; right: 0; }
.typing .dots { display: inline-flex; gap: 3px; }
.typing .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); animation: tdot 1.2s infinite; }
.typing .dots i:nth-child(2) { animation-delay: .15s; }
.typing .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes tdot { 30% { transform: translateY(-3px); opacity: 1; } 0%, 60%, 100% { opacity: .4; } }
.composer-locked { padding: 14px; text-align: center; color: var(--muted); background: var(--bg3); border-radius: 12px; }
.autocomplete { position: absolute; bottom: calc(100% - 12px); left: 16px; right: 16px; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 6px; z-index: 20; max-height: 260px; overflow-y: auto; }
.autocomplete .ac { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.autocomplete .ac.sel, .autocomplete .ac:hover { background: var(--bg4); }

/* ---------- Bedienelemente ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 700; transition: filter .15s, transform .05s; white-space: nowrap; }
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.secondary { background: var(--bg4); color: var(--text); }
.btn.ghost { background: transparent; color: var(--text2); }
.btn.ghost:hover { background: var(--bg3); }
.btn.danger { background: var(--danger); }
.btn.ok { background: var(--ok); color: #062b1b; }
.btn.small { padding: 6px 12px; font-size: 13.5px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn.round { width: 48px; height: 48px; padding: 0; border-radius: 50%; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label, .label { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.input, .field input, .field textarea, .field select { width: 100%; background: var(--bg0); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; outline: 0; color: var(--text); }
:root[data-theme="light"] .input, :root[data-theme="light"] .field input, :root[data-theme="light"] .field textarea, :root[data-theme="light"] .field select { background: var(--bg3); }
.input:focus, .field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 80px; }
.field .hint { font-size: 12.5px; color: var(--muted); }
.field .err { font-size: 13px; color: var(--danger); }
.check { display: flex; align-items: flex-start; gap: 10px; margin: 10px 0; font-size: 14px; color: var(--text2); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.switch { position: relative; width: 42px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 12px; background: var(--bg5); transition: .2s; cursor: pointer; }
.switch span::before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: .2s; }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::before { transform: translateX(18px); }
.search { display: flex; align-items: center; gap: 6px; background: var(--bg0); border-radius: 8px; padding: 0 8px; height: 32px; color: var(--muted); }
.search input { flex: 1; border: 0; outline: 0; background: transparent; min-width: 0; color: var(--text); font-size: 13.5px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tab { padding: 6px 12px; border-radius: 8px; color: var(--muted); font-weight: 700; font-size: 14px; }
.tab:hover { background: var(--bg3); color: var(--text2); }
.tab.active { background: var(--bg4); color: var(--text); }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: var(--bg4); font-size: 12px; color: var(--text2); }
.empty { text-align: center; color: var(--muted); padding: 48px 20px; }
.empty .big { font-size: 56px; margin-bottom: 8px; }
.card { background: var(--bg3); border-radius: var(--radius); padding: 16px; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--bg5); border-top-color: var(--accent); animation: spin .8s linear infinite; margin: 30px auto; }

/* Popups */
.layer { position: fixed; inset: 0; z-index: 100; }
.backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); z-index: 100; display: grid; place-items: center; padding: 16px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--bg2); border-radius: 16px; width: min(480px, 100%); max-height: calc(100dvh - 32px); overflow: auto; box-shadow: var(--shadow); animation: pop .18s cubic-bezier(.2, 1.3, .5, 1); }
.modal.wide { width: min(760px, 100%); }
.modal.full { width: min(1100px, 100%); height: min(860px, calc(100dvh - 32px)); display: flex; flex-direction: column; }
@keyframes pop { from { transform: scale(.94); opacity: 0; } }
.modal-head { padding: 20px 20px 6px; display: flex; align-items: flex-start; gap: 12px; }
.modal-head h2 { margin: 0; font-size: 21px; flex: 1; }
.modal-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.modal-body { padding: 12px 20px; }
.modal-foot { padding: 14px 20px; background: var(--bg1); display: flex; justify-content: flex-end; gap: 8px; border-radius: 0 0 16px 16px; flex-wrap: wrap; }
.menu { position: fixed; z-index: 120; background: var(--bg1); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 6px; min-width: 200px; max-width: 280px; animation: fade .1s; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 6px; color: var(--text2); font-size: 14px; text-align: start; }
.menu-item:hover { background: var(--accent); color: #fff; }
.menu-item.danger { color: var(--danger); }
.menu-item.danger:hover { background: var(--danger); color: #fff; }
.menu-sep { height: 1px; background: var(--line); margin: 4px 6px; }
.menu-label { padding: 6px 10px 2px; font-size: 11px; color: var(--muted); font-weight: 800; text-transform: uppercase; }
.toasts { position: fixed; bottom: calc(20px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--bg5); color: var(--text); padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); font-weight: 600; animation: pop .2s; max-width: 90vw; }
.toast.err { background: var(--danger); color: #fff; }
.toast.ok { background: var(--ok); color: #062b1b; }
.tip { position: fixed; z-index: 150; background: #000; color: #fff; padding: 5px 10px; border-radius: 6px; font-size: 13px; font-weight: 600; pointer-events: none; white-space: nowrap; }
.lightbox { position: fixed; inset: 0; background: rgba(0, 0, 0, .9); z-index: 160; display: grid; place-items: center; padding: 20px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; }
.lightbox a { position: absolute; bottom: 20px; color: #fff; }

/* Emoji-Auswahl */
.emoji-pick { width: 340px; max-width: calc(100vw - 20px); height: 380px; display: flex; flex-direction: column; padding: 0; }
.emoji-pick .ep-tabs { display: flex; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.emoji-pick .ep-tabs button { font-size: 18px; padding: 4px 6px; border-radius: 6px; }
.emoji-pick .ep-tabs button.active, .emoji-pick .ep-tabs button:hover { background: var(--bg4); }
.emoji-pick .ep-grid { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(8, 1fr); padding: 6px; align-content: start; }
.emoji-pick .ep-grid button { font-size: 24px; padding: 4px; border-radius: 6px; line-height: 1.2; }
.emoji-pick .ep-grid button:hover { background: var(--bg4); }

/* Profilkarte */
.pcard { width: 340px; max-width: calc(100vw - 20px); padding: 0; overflow: hidden; border-radius: 14px; }
.pcard-banner { height: 104px; background: var(--accent); background-size: cover; background-position: center; }
.pcard-top { position: relative; padding: 0 16px; height: 46px; }
.pcard-top .av { position: absolute; top: -44px; border: 6px solid var(--bg1); border-radius: 50%; background: var(--bg1); }
.pcard-top .badges { position: absolute; right: 16px; top: 10px; background: var(--bg0); border-radius: 8px; padding: 4px 6px; gap: 6px; }
[dir="rtl"] .pcard-top .badges { right: auto; left: 16px; }
.pcard-body { margin: 0 12px 12px; background: var(--bg0); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
:root[data-theme="light"] .pcard-body { background: var(--bg3); }
.pcard-body .name { font-size: 20px; font-weight: 800; line-height: 1.2; }
.pcard-body .handle { color: var(--muted); font-size: 13.5px; }
.pcard-body .sec { border-top: 1px solid var(--line); padding-top: 10px; }
.pcard-body .sec h4 { margin: 0 0 4px; font-size: 11.5px; text-transform: uppercase; color: var(--muted); letter-spacing: .04em; }
.pcard-body .bio { white-space: pre-wrap; font-size: 14px; color: var(--text2); overflow-wrap: anywhere; }
.status-bubble { font-size: 13.5px; color: var(--text2); }

/* ---------- Sprachraum ---------- */
.stage { flex: 1; min-height: 0; background: #000; display: flex; flex-direction: column; position: relative; }
:root[data-theme="light"] .stage { background: #111118; }
.stage-grid { flex: 1; min-height: 0; display: grid; gap: 10px; padding: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); grid-auto-rows: minmax(150px, 1fr); align-content: center; overflow: auto; }
.stage-grid.focus { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
.tile { position: relative; border-radius: 14px; background: #1a1a26; overflow: hidden; display: grid; place-items: center; min-height: 150px; border: 2px solid transparent; transition: border-color .12s; }
.tile.speaking { border-color: var(--ok); }
.tile video { width: 100%; height: 100%; object-fit: cover; background: #000; position: absolute; inset: 0; }
.tile video.contain { object-fit: contain; }
.tile .t-name { position: absolute; left: 10px; bottom: 10px; background: rgba(0, 0, 0, .6); color: #fff; border-radius: 8px; padding: 3px 10px; font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 6px; z-index: 2; max-width: calc(100% - 20px); }
.tile .t-name .icon { width: 14px; height: 14px; color: var(--danger); }
.tile .t-bg { position: absolute; inset: 0; opacity: .35; filter: blur(40px); background-size: cover; background-position: center; }
.tile .t-tools { position: absolute; right: 8px; top: 8px; z-index: 2; display: flex; align-items: center; gap: 6px; }
.tile .t-expand { background: rgba(0, 0, 0, .55); color: #fff; border-radius: 8px; width: 32px; height: 32px; display: none; place-items: center; }
@media (hover: hover) { .tile:hover .t-expand { display: grid; } }
@media (hover: none) { .tile .t-expand { display: grid; } }
.tile .t-full { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 8px; background: rgba(0, 0, 0, .7); color: #fff; font-size: 13px; font-weight: 700; }
.tile .t-full:hover { background: var(--accent); }
.stage-strip .tile .t-full { width: 32px; padding: 0; justify-content: center; }
.stage-strip .tile .t-full span { display: none; }
.screen-full { position: fixed; inset: 0; z-index: 100000; background: #000; color: #fff; overflow: hidden; }
.screen-full:fullscreen { width: 100%; height: 100%; }
.screen-full:-webkit-full-screen { width: 100%; height: 100%; }
.screen-full.idle { cursor: none; }
.screen-full video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.sf-wait { position: absolute; inset: 0; display: grid; place-items: center; color: #ccc; }
.sf-bar { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: max(12px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 28px max(14px, env(safe-area-inset-left)); background: linear-gradient(rgba(0, 0, 0, .75), transparent); transition: opacity .2s; }
.screen-full.idle .sf-bar { opacity: 0; pointer-events: none; }
.sf-name { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 700; }
.sf-exit { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: 10px; background: rgba(255, 255, 255, .16); color: #fff; font-weight: 700; }
.sf-exit:hover { background: rgba(255, 255, 255, .28); }
.stage-strip { display: flex; gap: 8px; overflow-x: auto; padding: 0 12px 4px; }
.stage-strip .tile { width: 180px; min-height: 100px; height: 100px; flex: none; }
.stage-bar { flex: none; display: flex; justify-content: center; align-items: center; gap: 12px; padding: 14px; flex-wrap: wrap; }
.stage-bar .cbtn { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: #2a2a3a; color: #fff; }
.stage-bar .cbtn:hover { background: #3a3a50; }
.stage-bar .cbtn.off { background: #fff; color: #111; }
.stage-bar .cbtn.on { background: var(--ok); color: #062b1b; }
.stage-bar .cbtn.hang { background: var(--danger); color: #fff; width: 64px; border-radius: 26px; }
.stage-empty { flex: 1; display: grid; place-items: center; color: #ccc; text-align: center; padding: 20px; }
.stage-empty h2 { color: #fff; margin: 8px 0; }
.call-banner { background: #000; padding: 12px; display: flex; flex-direction: column; gap: 8px; max-height: 50%; }
.call-banner .stage-grid { padding: 0; grid-auto-rows: 140px; }
.side-chat { width: 360px; flex: none; border-left: 1px solid var(--line); display: flex; flex-direction: column; background: var(--bg2); }
[dir="rtl"] .side-chat { border-left: 0; border-right: 1px solid var(--line); }

/* 3D-Raum */
.room3d { position: relative; flex: 1; min-height: 0; background: #07070d; overflow: hidden; touch-action: none; }
.room3d canvas { display: block; width: 100%; height: 100%; outline: none; }
.room3d .hud { position: absolute; left: 12px; top: 12px; display: flex; gap: 8px; z-index: 3; flex-wrap: wrap; }
.room3d .hud .pill { background: rgba(0, 0, 0, .55); color: #fff; }
.room3d .help { position: absolute; right: 12px; top: 12px; background: rgba(0, 0, 0, .55); color: #ddd; border-radius: 10px; padding: 8px 12px; font-size: 12.5px; z-index: 3; max-width: 260px; }
.room3d .joy { position: absolute; left: 24px; bottom: 24px; width: 120px; height: 120px; border-radius: 50%; background: rgba(255, 255, 255, .08); border: 2px solid rgba(255, 255, 255, .18); z-index: 3; display: none; }
.room3d .joy i { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px; border-radius: 50%; background: rgba(255, 255, 255, .35); }
.room3d .emotes { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; gap: 6px; z-index: 3; background: rgba(0, 0, 0, .5); padding: 6px; border-radius: 14px; }
.room3d .emotes button { font-size: 22px; width: 40px; height: 40px; border-radius: 10px; }
.room3d .emotes button:hover { background: rgba(255, 255, 255, .12); }
.room3d .labels { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.room3d .lbl { position: absolute; left: 0; top: 0; will-change: transform; color: #fff; font-weight: 800; font-size: 13px; text-shadow: 0 1px 3px #000; white-space: nowrap; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.room3d .lbl .bubble { background: #fff; color: #111; border-radius: 12px; padding: 4px 10px; font-weight: 600; max-width: 220px; white-space: normal; text-align: center; text-shadow: none; font-size: 13px; }
.room3d .lbl .emo { font-size: 30px; animation: pop .25s; }
.room3d .lbl.speaking span:first-child { color: var(--ok); }
@media (hover: none) { .room3d .joy { display: block; } .room3d .help { display: none; } }

/* ---------- Feed, Profil, Entdecken, Einstellungen ---------- */
.page { flex: 1; overflow-y: auto; }
.page-inner { max-width: 760px; margin: 0 auto; padding: 20px 16px 60px; }
.page-inner.wide { max-width: 1100px; }
.post { background: var(--bg3); border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; }
.post-head { display: flex; align-items: center; gap: 10px; }
.post-body { margin: 10px 0 4px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text2); }
.post-img { border-radius: 12px; overflow: hidden; margin-top: 10px; cursor: zoom-in; background: var(--bg4); }
.post-img img { width: 100%; max-height: 560px; object-fit: contain; }
.post-actions { display: flex; gap: 6px; margin-top: 8px; }
.post-actions button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; color: var(--muted); font-weight: 700; font-size: 13.5px; }
.post-actions button:hover { background: var(--bg4); color: var(--text); }
.post-actions button.liked { color: var(--accent-2); }
.post-actions button.liked .icon { fill: var(--accent-2); }
.comments { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.comment { display: flex; gap: 8px; }
.comment .cb { background: var(--bg4); border-radius: 12px; padding: 6px 10px; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.composer-card { background: var(--bg3); border-radius: 14px; padding: 12px; margin-bottom: 16px; display: flex; gap: 10px; }
.composer-card textarea { flex: 1; background: transparent; border: 0; outline: 0; resize: none; min-height: 60px; color: var(--text); }
.profile-hero { border-radius: 16px; overflow: hidden; background: var(--bg3); margin-bottom: 16px; }
.profile-hero .ph-banner { height: 190px; background: var(--accent); background-size: cover; background-position: center; }
.profile-hero .ph-row { display: flex; align-items: flex-end; gap: 16px; padding: 0 20px 16px; margin-top: -54px; flex-wrap: wrap; }
.profile-hero .ph-row .av { border: 6px solid var(--bg3); border-radius: 50%; background: var(--bg3); }
.profile-hero .ph-name { font-size: 26px; font-weight: 900; line-height: 1.15; }
.profile-hero .ph-stats { display: flex; gap: 18px; padding: 0 20px 16px; color: var(--muted); font-size: 14px; }
.profile-hero .ph-stats b { color: var(--text); }
.profile-hero .ph-bio { padding: 0 20px 18px; white-space: pre-wrap; color: var(--text2); }
.disc-hero { border-radius: 18px; padding: 40px 28px; background: linear-gradient(135deg, #7c5cff, #ff5c8a); color: #fff; margin-bottom: 20px; }
.disc-hero h1 { margin: 0 0 6px; font-size: 30px; }
.disc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.disc-card { background: var(--bg3); border-radius: 14px; overflow: hidden; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.disc-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.disc-card .dc-banner { height: 110px; background: var(--accent); background-size: cover; background-position: center; }
.disc-card .dc-body { padding: 0 14px 14px; }
.disc-card .dc-icon { width: 56px; height: 56px; border-radius: 16px; margin-top: -28px; border: 4px solid var(--bg3); background: var(--bg4); display: grid; place-items: center; overflow: hidden; font-size: 24px; font-weight: 800; color: #fff; }
.disc-card .dc-icon img { width: 100%; height: 100%; object-fit: cover; }
.disc-card h3 { margin: 8px 0 4px; }
.disc-card p { margin: 0 0 8px; color: var(--muted); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.settings { display: flex; height: 100%; }
.settings-nav { width: 230px; flex: none; background: var(--bg1); padding: 20px 8px; overflow-y: auto; }
.settings-nav .tab { display: block; width: 100%; text-align: start; margin-bottom: 2px; }
.settings-main { flex: 1; overflow-y: auto; padding: 24px 28px 60px; }
.settings-main h1 { margin: 0 0 18px; font-size: 22px; }
.settings-main section { max-width: 680px; margin-bottom: 28px; }
.settings-main h3 { margin: 0 0 10px; font-size: 15px; }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.opt { background: var(--bg3); border: 2px solid transparent; border-radius: 12px; padding: 14px 6px 8px; display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 12.5px; color: var(--text2); }
.opt:hover { border-color: var(--bg5); }
.opt.sel { border-color: var(--accent); background: var(--accent-soft); }
.colors { display: flex; gap: 8px; flex-wrap: wrap; }
.colors button { width: 34px; height: 34px; border-radius: 50%; border: 3px solid transparent; }
.colors button.sel { border-color: var(--text); }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.set-row .t { font-weight: 700; }
.set-row .d { color: var(--muted); font-size: 13.5px; }
.preview-card { background: var(--bg1); border-radius: 14px; overflow: hidden; width: 300px; max-width: 100%; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: start; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 20px; }
.stat { background: var(--bg3); border-radius: 12px; padding: 14px; }
.stat b { display: block; font-size: 26px; }
.stat span { color: var(--muted); font-size: 13px; }
.notif { display: flex; gap: 10px; padding: 10px; border-radius: 10px; cursor: pointer; align-items: flex-start; }
.notif:hover { background: var(--bg3); }
.notif.unread { background: var(--accent-soft); }
.home-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.person { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: var(--bg3); cursor: pointer; }
.person:hover { background: var(--bg4); }

/* ---------- Anmeldung ---------- */
.auth { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px; overflow-y: auto; background: radial-gradient(1200px 600px at 20% 10%, rgba(124, 92, 255, .35), transparent 60%), radial-gradient(900px 600px at 90% 90%, rgba(255, 92, 138, .28), transparent 60%), var(--bg0); }
.auth-card { width: min(440px, 100%); background: var(--bg2); border-radius: 20px; padding: 28px; box-shadow: var(--shadow); }
.auth-card h1 { margin: 0 0 4px; font-size: 26px; text-align: center; }
.auth-card .sub { text-align: center; color: var(--muted); margin-bottom: 20px; }
.auth-logo { display: flex; justify-content: center; margin-bottom: 12px; }
.auth-logo img { width: 64px; height: 64px; }
.auth-switch { text-align: center; margin-top: 14px; color: var(--muted); font-size: 14px; }
.auth-switch button { color: var(--info); font-weight: 700; }
.auth-langs { display: flex; justify-content: center; gap: 6px; margin-top: 16px; }
.auth-foot { text-align: center; margin-top: 16px; font-size: 12.5px; color: var(--faint); }
.auth-foot a { color: var(--muted); }
.invite-card { text-align: center; }
.invite-card .dc-icon { width: 80px; height: 80px; border-radius: 22px; margin: 0 auto 10px; display: grid; place-items: center; font-size: 34px; font-weight: 800; color: #fff; overflow: hidden; }
.invite-card .dc-icon img { width: 100%; height: 100%; object-fit: cover; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.banner-msg { padding: 8px 14px; background: var(--warn); color: #1b1200; font-weight: 700; font-size: 13.5px; display: flex; align-items: center; gap: 10px; justify-content: center; flex-wrap: wrap; }
.banner-msg.err { background: var(--danger); color: #fff; }
.banner-msg button { text-decoration: underline; font-weight: 800; }
.boot { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg0); }
.boot img { width: 72px; height: 72px; animation: bob 1.4s ease-in-out infinite; }

/* Untere Navigation (nur Handy) */
.mnav { display: none; }

/* ---------- Handy / schmale Fenster ---------- */
@media (max-width: 1100px) { .members { display: none; } .members.force { display: block; position: absolute; right: 0; top: var(--header); bottom: 0; z-index: 30; box-shadow: var(--shadow); } [dir="rtl"] .members.force { right: auto; left: 0; } .side-chat { width: 300px; } }
@media (max-width: 820px), (pointer: coarse) and (max-height: 520px) {
  :root { --side: calc(100vw - var(--rail)); }
  #app { flex-direction: row; }
  #app.view-main .rail, #app.view-main .side { display: none; }
  #app.view-nav .main { display: none; }
  #app.view-page .rail, #app.view-page .side { display: none; }
  #app.view-page { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }
  #app.view-nav { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }
  .side { border-radius: 14px 0 0 0; }
  .back-btn { display: grid; }
  .mnav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; height: calc(58px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--bg1); border-top: 1px solid var(--line); z-index: 40; }
  #app.view-main .mnav { display: none; }
  .mnav button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); font-size: 11px; font-weight: 700; position: relative; }
  .mnav button.active { color: var(--text); }
  .mnav .badge { position: absolute; top: 4px; left: 54%; right: auto; bottom: auto; border-width: 2px; }
  .msg { padding: 2px 12px 2px 60px; }
  [dir="rtl"] .msg { padding: 2px 60px 2px 12px; }
  .msg .m-av { left: 10px; }
  [dir="rtl"] .msg .m-av { right: 10px; }
  .msg .m-side-time { display: none !important; }
  .msg:hover .m-tools { display: none; }
  .msg .m-tools.open { display: flex; }
  .msg .m-reply::before { display: none; }
  .composer { padding: 0 8px calc(10px + env(safe-area-inset-bottom)); }
  .main-head .topic { display: none; }
  .side-chat { display: none; }
  .side-chat.force { display: flex; position: absolute; inset: var(--header) 0 0 0; width: auto; z-index: 25; }
  .settings { flex-direction: column; }
  .settings-nav { width: auto; display: flex; overflow-x: auto; padding: 8px; gap: 4px; flex: none; }
  .settings-nav .tab { width: auto; white-space: nowrap; }
  .settings-nav .menu-label, .settings-nav .menu-sep { display: none; }
  .settings-main { padding: 16px 16px 80px; }
  .stage-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); grid-auto-rows: minmax(120px, 1fr); }
  .modal { border-radius: 16px; }
  .members.force { width: 85vw; }
  .profile-hero .ph-banner { height: 130px; }
}

/* ---------- 3D-Avatar-Editor ---------- */
.av-editor { display: grid; grid-template-columns: minmax(280px, 440px) minmax(0, 1fr); gap: 28px; align-items: start; }
.av-left { position: sticky; top: 0; display: flex; flex-direction: column; gap: 12px; }
.av-stage { position: relative; height: min(56vh, 520px); min-height: 340px; border-radius: 20px; overflow: hidden; cursor: grab; touch-action: none;
  background: radial-gradient(120% 90% at 50% 18%, #4a3d8f 0%, #251f4d 46%, #0d0c1c 100%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07), 0 18px 40px -18px rgba(0, 0, 0, .7); }
.av-stage.grabbing { cursor: grabbing; }
.av-stage canvas { display: block; width: 100%; height: 100%; }
.av-status { position: absolute; left: 14px; top: 12px; font-size: 12.5px; color: rgba(255, 255, 255, .75); pointer-events: none; }
.av-bar { display: flex; flex-direction: column; gap: 8px; }
.av-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 7px 13px; border-radius: 999px; background: var(--bg3); color: var(--text); font-weight: 700; font-size: 13.5px; border: 1px solid transparent; transition: background .15s, border-color .15s, transform .05s; }
.chip:hover { background: var(--bg4); }
.chip:active { transform: scale(.97); }
.chip.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.chip.emoji { padding: 5px 9px; font-size: 18px; line-height: 1.2; }
.av-actions { display: grid; grid-template-columns: auto 1fr; gap: 8px; }
.av-controls { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.av-group h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 10px; }
.av-models { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.av-model { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px 6px 8px; border-radius: 14px; background: var(--bg3); border: 2px solid transparent; font-weight: 700; font-size: 13px; color: var(--text); transition: border-color .15s, transform .12s, background .15s; }
.av-model img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: linear-gradient(160deg, #453a86, #1b1838); }
.av-model:hover { background: var(--bg4); transform: translateY(-2px); }
.av-model.sel { border-color: var(--accent); background: var(--accent-soft); }
.swatches { display: flex; gap: 9px; flex-wrap: wrap; }
.swatch { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18), inset 0 -6px 10px rgba(0, 0, 0, .18); transition: transform .12s; outline-offset: 3px; }
.swatch:hover { transform: scale(1.1); }
.swatch.sel { outline: 2px solid var(--accent); }
.swatch.orig { background: conic-gradient(from 210deg, #ff5c8a, #ffb347, #3ddc97, #2ec5ff, #7c5cff, #ff5c8a); color: #fff; }
.swatch.orig .icon { width: 16px; height: 16px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .5)); }
/* „Eigene Farbe“: gestrichelter Kreis mit Plus; darunter liegt unsichtbar der Farbwähler des Browsers */
.swatch.custom { position: relative; cursor: pointer; overflow: hidden; color: var(--muted); background: var(--bg3); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .28); }
.swatch.custom:not(.sel) { box-shadow: none; border: 1.5px dashed rgba(255, 255, 255, .34); }
.swatch.custom .icon { width: 15px; height: 15px; }
.swatch.custom input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
/* Gesicht: Regler für die Grundstimmung (Augen zu, Lächeln, Traurig, Verärgert) */
.av-face-hint { margin: -4px 0 12px; }
.av-faces { display: grid; gap: 8px; max-width: 520px; }
.av-face { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; column-gap: 10px; cursor: pointer; }
.av-face-name { grid-area: 1 / 1; font-weight: 700; font-size: 14px; color: var(--text); overflow-wrap: anywhere; }
.av-face-val { grid-area: 1 / 2; font-size: 13px; font-weight: 700; color: var(--muted); text-align: end; font-variant-numeric: tabular-nums; }
.av-slider { grid-area: 2 / 1 / 3 / 3; --p: 0%; appearance: none; -webkit-appearance: none; width: 100%; height: 28px; margin: 0; background: transparent; cursor: pointer; touch-action: pan-y; }
.av-slider::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--accent) var(--p), var(--bg4) var(--p)); }
.av-slider::-moz-range-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--accent) var(--p), var(--bg4) var(--p)); }
[dir="rtl"] .av-slider::-webkit-slider-runnable-track { background: linear-gradient(270deg, var(--accent) var(--p), var(--bg4) var(--p)); }
[dir="rtl"] .av-slider::-moz-range-track { background: linear-gradient(270deg, var(--accent) var(--p), var(--bg4) var(--p)); }
.av-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -7px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .45); transition: transform .12s; }
.av-slider::-moz-range-thumb { width: 20px; height: 20px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .45); }
.av-slider:hover::-webkit-slider-thumb, .av-slider:active::-webkit-slider-thumb { transform: scale(1.12); }
.av-slider:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.av-face-foot { margin-top: 10px; }
.av-face-foot .btn { display: inline-flex; align-items: center; gap: 6px; }
.av-face-foot .btn:disabled { opacity: .45; cursor: default; }
/* Schmale Fenster und Handy: Die Vorschau bleibt oben stehen, während man darunter Figur, Gesicht und Farben einstellt –
   sonst sähe man beim Einstellen nicht, was sich ändert. (.av-left löst sich dafür auf: seine Teile stehen direkt im Raster.) */
@media (max-width: 860px) {
  .av-editor { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .av-left { display: contents; }
  /* der Schatten nach oben (in der Farbe des Hintergrunds) deckt den Streifen über der Vorschau ab, in dem sonst Durchgescrolltes zu sehen wäre */
  .av-stage { position: sticky; top: 0; z-index: 4; height: 40vh; min-height: 180px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07), 0 -30px 0 0 var(--bg2), 0 14px 24px -14px rgba(0, 0, 0, .8); }
  .av-controls { margin-top: 10px; }
}

/* ---------- 3D-Raum: Bedienung ---------- */
.room3d { --glass: rgba(14, 14, 24, .62); --glass-line: rgba(255, 255, 255, .1); user-select: none; -webkit-user-select: none; }
.room3d:focus { outline: none; }
.r3-top { position: absolute; left: 12px; top: 12px; display: flex; gap: 8px; z-index: 3; flex-wrap: wrap; max-width: calc(100% - 76px); pointer-events: none; }
.r3-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); color: #fff; font-weight: 700; font-size: 13px; }
.r3-pill .icon { width: 15px; height: 15px; }
.r3-pill.credit { pointer-events: auto; font-weight: 600; font-size: 11.5px; color: rgba(255, 255, 255, .72); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r3-btn { width: 42px; height: 42px; flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 13px; font-size: 21px; line-height: 1; color: #fff; transition: background .15s, transform .08s; }
.r3-btn:hover { background: rgba(255, 255, 255, .13); }
.r3-btn:active { transform: scale(.92); }
.r3-btn.wide { width: auto; padding: 0 12px; }
.r3-btn-label { font-size: 13.5px; font-weight: 800; }
.r3-btn.active { background: var(--accent); }
.r3-btn.off { opacity: .4; }
.r3-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.r3-helpbtn, .r3-jump { position: absolute; z-index: 3; background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); font-weight: 800; font-size: 17px; }
.r3-helpbtn { right: 12px; top: 12px; }
.r3-jump { right: 28px; bottom: 96px; width: 60px; height: 60px; border-radius: 50%; font-size: 24px; display: none; }
.r3-crouch { position: absolute; z-index: 3; right: 98px; bottom: 96px; width: 48px; height: 48px; border-radius: 50%; font-size: 20px; font-weight: 800; display: none; background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
@media (hover: none), (pointer: coarse) { .r3-crouch { display: inline-flex; } }
.r3-help { position: absolute; right: 12px; top: 62px; z-index: 4; width: 250px; padding: 14px; border-radius: 16px; background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); color: #e8e8f2; font-size: 12.5px; display: flex; flex-direction: column; gap: 7px; box-shadow: 0 16px 40px rgba(0, 0, 0, .4); }
.r3-help b { font-size: 13.5px; color: #fff; }
.r3-help > div { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.r3-help p { margin: 4px 0 0; color: rgba(255, 255, 255, .6); }
.room3d kbd { font: 700 11px/1 var(--font); padding: 4px 6px; border-radius: 6px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .16); color: #fff; white-space: nowrap; }
.r3-dock { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 3; display: flex; align-items: center; gap: 4px; padding: 6px; max-width: calc(100% - 20px); border-radius: 19px; background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5); box-shadow: 0 14px 36px rgba(0, 0, 0, .45); }
.r3-emotes { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.r3-emotes::-webkit-scrollbar { display: none; }
.r3-sep { width: 1px; height: 26px; background: rgba(255, 255, 255, .14); margin: 0 4px; flex: none; }
.r3-pop { position: absolute; left: 50%; bottom: 76px; transform: translateX(-50%); z-index: 5; display: flex; flex-direction: column; gap: 2px; padding: 6px; min-width: 200px; border-radius: 16px; background: rgba(18, 18, 30, .86); border: 1px solid var(--glass-line); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 16px 40px rgba(0, 0, 0, .5); animation: r3-up .16s ease-out; }
.r3-pop button { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 11px; color: #fff; font-size: 14px; text-align: start; }
.r3-pop button b { flex: 1; font-weight: 700; }
.r3-pop button:hover { background: rgba(255, 255, 255, .1); }
.r3-pop button.active { background: var(--accent); }
.r3-hint { position: absolute; left: 50%; bottom: 82px; transform: translateX(-50%); z-index: 3; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); color: #fff; font-weight: 700; font-size: 13.5px; animation: r3-up .18s ease-out; }
@keyframes r3-up { from { opacity: 0; transform: translate(-50%, 8px); } }
.r3-loading { position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #fff; background: radial-gradient(90% 70% at 50% 40%, #2a2260, #0a0a14 75%); transition: opacity .5s; }
.r3-loading b { font-size: 20px; }
.r3-loading span { color: rgba(255, 255, 255, .65); font-size: 13.5px; }
.r3-loading.done { opacity: 0; pointer-events: none; }
.r3-loading.error .r3-spinner { display: none; }
.r3-spinner { width: 38px; height: 38px; margin-bottom: 8px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .16); border-top-color: #fff; animation: r3-spin .8s linear infinite; }
@keyframes r3-spin { to { transform: rotate(360deg); } }
.r3-labels { position: absolute; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; }
.r3-label { position: absolute; left: 0; top: 0; will-change: transform; transform-origin: 50% 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; white-space: nowrap; }
.r3-label .name { padding: 2px 9px; border-radius: 999px; background: rgba(10, 10, 18, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); color: #fff; font-weight: 700; font-size: 12.5px; border: 1px solid transparent; transition: border-color .15s, box-shadow .15s; }
.r3-label.me .name { opacity: .7; }
/* meldet sich seit einigen Sekunden nicht (Seite im Hintergrund eingefroren, Verbindung weg) */
.r3-label.away .name { opacity: .55; }
.r3-label.away .name::after { content: ' 💤'; }
.r3-label .r3-cam { display: block; width: 148px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; background: #000; border: 2px solid rgba(255, 255, 255, .28); box-shadow: 0 10px 26px rgba(0, 0, 0, .5); }
.r3-label .r3-cam.mine { transform: scaleX(-1); }
.r3-label.speaking .r3-cam { border-color: var(--ok); }
.r3-label.speaking .name { border-color: var(--ok); box-shadow: 0 0 12px rgba(61, 220, 151, .55); opacity: 1; }
.r3-label .bubble { background: #fff; color: #14141d; border-radius: 14px 14px 14px 4px; padding: 6px 11px; font-weight: 600; max-width: 230px; white-space: normal; text-align: start; font-size: 13px; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.r3-label .emo { font-size: 34px; line-height: 1; animation: r3-emo 2.6s ease-out forwards; }
@keyframes r3-emo { 0% { transform: translateY(14px) scale(.3); opacity: 0; } 12% { transform: translateY(0) scale(1.15); opacity: 1; } 20% { transform: scale(1); } 80% { opacity: 1; } 100% { transform: translateY(-22px); opacity: 0; } }
.r3-joy { position: absolute; left: 22px; bottom: 88px; width: 124px; height: 124px; border-radius: 50%; background: rgba(255, 255, 255, .07); border: 1.5px solid rgba(255, 255, 255, .2); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); z-index: 3; display: none; touch-action: none; }
.r3-joy i { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px; border-radius: 50%; background: rgba(255, 255, 255, .4); box-shadow: 0 4px 14px rgba(0, 0, 0, .35); }
@media (hover: none), (pointer: coarse) { .r3-joy { display: block; } .r3-jump { display: inline-flex; } .r3-btn-label { display: none; } .r3-hint kbd, .r3-pop kbd { display: none; } }
@media (max-width: 560px) { .r3-btn { width: 38px; height: 38px; font-size: 19px; } .r3-help { width: auto; left: 12px; } }
@media (prefers-reduced-motion: reduce) { .r3-pop, .r3-hint { animation: none; } }
.r3-gfx { display: grid !important; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.r3-gfx button { padding: 6px 2px; border-radius: 9px; background: rgba(255, 255, 255, .09); color: #fff; font-weight: 700; font-size: 12px; }
.r3-gfx button:hover { background: rgba(255, 255, 255, .16); }
.r3-gfx button.active { background: var(--accent); }

/* ==================================================================================
   ToLobby – modernes Erscheinungsbild (überschreibt die Grundstile weiter oben)
   Schwebende, abgerundete Flächen · Farbverlauf-Akzente · klarere Kontraste · Fokus-Rahmen
   ================================================================================== */
:root {
  --bg0: #07070d; --bg1: #0e0f18; --bg2: #131420; --bg3: #1b1c2b; --bg4: #24263a; --bg5: #2f3149;
  --line: rgba(255, 255, 255, .075); --text: #f3f3f9; --text2: #d0d1e2; --muted: #9c9db6; --faint: #73748f;
  --accent: #8468ff; --accent-2: #ff5c9a; --accent-soft: rgba(132, 104, 255, .17);
  --grad: linear-gradient(135deg, #8468ff 0%, #b260ff 52%, #ff5c9a 100%);
  --radius: 14px; --shadow: 0 20px 56px rgba(0, 0, 0, .55); --header: 56px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
:root[data-theme="light"] {
  --bg0: #e6e7f2; --bg1: #f3f4fa; --bg2: #ffffff; --bg3: #f0f1f8; --bg4: #e4e6f1; --bg5: #d4d7e7;
  --line: rgba(20, 20, 60, .1); --text: #14141f; --text2: #32334b; --muted: #62637d; --faint: #8c8da6;
  --accent: #6f52f5; --accent-soft: rgba(111, 82, 245, .12);
  --shadow: 0 18px 46px rgba(30, 30, 80, .16);
}
html, body { font-size: 15px; letter-spacing: -.003em; }
::selection { background: var(--accent); color: #fff; }
* { scrollbar-width: thin; scrollbar-color: var(--bg5) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--bg5); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--faint); background-clip: padding-box; border: 3px solid transparent; }
/* Tastatur-Fokus überall gut sichtbar */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: none; }

/* ---------- Hintergrund und Flächen ---------- */
#app { background:
    radial-gradient(900px 520px at -6% -8%, rgba(132, 104, 255, .2), transparent 62%),
    radial-gradient(760px 520px at 106% 108%, rgba(255, 92, 154, .11), transparent 60%),
    var(--bg0); }
:root[data-theme="light"] #app { background: radial-gradient(900px 520px at -6% -8%, rgba(111, 82, 245, .16), transparent 62%), radial-gradient(760px 520px at 106% 108%, rgba(255, 92, 154, .1), transparent 60%), var(--bg0); }
@media (min-width: 821px) {
  .side { margin: 8px 0; border-radius: 18px; border: 1px solid var(--line); box-shadow: 0 10px 30px -14px rgba(0, 0, 0, .6); }
  [dir="rtl"] .side { border-radius: 18px; }
  .main { margin: 8px; border-radius: 18px; border: 1px solid var(--line); overflow: hidden; box-shadow: 0 10px 30px -14px rgba(0, 0, 0, .6); }
  .rail { padding: 16px 0; }
}
.side { background: color-mix(in srgb, var(--bg1) 88%, transparent); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.main-head { border-bottom: 1px solid var(--line); box-shadow: none; background: color-mix(in srgb, var(--bg2) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); position: relative; z-index: 2; }
.main-head .title { font-size: 15.5px; letter-spacing: -.01em; }
.side-head { border-bottom: 1px solid var(--line); font-size: 15.5px; letter-spacing: -.01em; }
.members { background: transparent; border-left: 1px solid var(--line); }
[dir="rtl"] .members { border-left: 0; border-right: 1px solid var(--line); }
.me-bar { background: transparent; border-top: 1px solid var(--line); }
:root[data-theme="light"] .me-bar { background: transparent; }

/* ---------- Leiste links ---------- */
.rail-btn { border-radius: 16px; background: color-mix(in srgb, var(--bg3) 80%, transparent); border: 1px solid var(--line); transition: transform .18s var(--ease), background .18s, color .18s, box-shadow .18s; }
.rail-btn:hover { border-radius: 16px; transform: translateY(-2px); background: var(--bg4); color: var(--text); }
.rail-item.active .rail-btn { border-radius: 16px; background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 8px 22px -8px rgba(132, 104, 255, .9); }
.rail-btn.green:hover { background: var(--ok); color: #06140d; }
.rail-item::before { width: 4px; left: -12px; background: var(--accent); border-radius: 0 4px 4px 0; }
.rail-item.unread::before { background: var(--text); }
.rail-sep { height: 1px; background: var(--line); width: 28px; }
.rail-badge, .badge { border-color: var(--bg0); background: var(--accent-2); }

/* ---------- Kanäle und Listen ---------- */
.side-section { font-size: 11px; letter-spacing: .09em; color: var(--faint); padding: 16px 8px 6px; }
.ch { min-height: 36px; padding: 7px 10px; border-radius: 10px; transition: background .12s, color .12s; }
.ch:hover { background: color-mix(in srgb, var(--bg4) 70%, transparent); color: var(--text); }
.ch.active { background: var(--accent-soft); color: var(--text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 34%, transparent); font-weight: 600; }
.ch.active .icon { color: var(--accent); }
.dm-item, .member { border-radius: 10px; }
.dm-item.active { background: var(--accent-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 34%, transparent); }
.voice-user { border-radius: 8px; }
.ibtn { border-radius: 10px; transition: background .12s, color .12s, transform .08s; }
.ibtn:active { transform: scale(.92); }

/* ---------- Knöpfe und Eingaben ---------- */
.btn { border-radius: 12px; padding: 10px 18px; background: var(--grad); box-shadow: 0 8px 22px -10px rgba(132, 104, 255, .95), inset 0 1px 0 rgba(255, 255, 255, .22); transition: filter .15s, transform .12s var(--ease), box-shadow .15s; letter-spacing: -.005em; }
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn:disabled { transform: none; filter: saturate(.4) brightness(.8); box-shadow: none; }
.btn.secondary { background: var(--bg4); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); }
.btn.secondary:hover { background: var(--bg5); }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.danger { background: var(--danger); box-shadow: 0 8px 22px -12px var(--danger); }
.btn.ok { background: var(--ok); color: #06140d; box-shadow: none; }
.btn.small { padding: 7px 12px; border-radius: 10px; }
.input, .field input, .field textarea, .field select { border-radius: 12px; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg0) 70%, var(--bg3)); transition: border-color .15s, box-shadow .15s; }
:root[data-theme="light"] .input, :root[data-theme="light"] .field input, :root[data-theme="light"] .field textarea, :root[data-theme="light"] .field select { background: var(--bg3); }
.input:focus, .field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field > label, .label { letter-spacing: .07em; font-size: 11px; color: var(--muted); }
.tabs { gap: 6px; }
.tab { border-radius: 10px; }
.tab.active { background: var(--accent-soft); color: var(--text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 34%, transparent); }
.switch input:checked + span { background: var(--accent); }
.search { border-radius: 12px; border: 1px solid var(--line); }
.card { border-radius: 16px; border: 1px solid var(--line); }
.pill { border-radius: 999px; }

/* ---------- Nachrichten ---------- */
.msg:hover { background: color-mix(in srgb, var(--bg3) 55%, transparent); }
.m-tools { border-radius: 12px; border: 1px solid var(--line); box-shadow: 0 8px 22px rgba(0, 0, 0, .35); overflow: hidden; }
.react { border-radius: 999px; }
.m-body code { border-radius: 6px; }
.m-body pre { border-radius: 12px; border: 1px solid var(--line); }
.m-att { border-radius: 14px; }
.composer-box { border-radius: 16px; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg3) 80%, transparent); transition: border-color .15s, box-shadow .15s; }
.composer-box:focus-within { border-color: color-mix(in srgb, var(--accent) 60%, transparent); box-shadow: 0 0 0 3px var(--accent-soft); }
.composer .send { color: #fff; background: var(--grad); border-radius: 10px; width: 32px; height: 32px; }
.composer .send:hover { filter: brightness(1.1); background: var(--grad); color: #fff; }
.chan-start .big-ic { background: var(--grad); color: #fff; box-shadow: 0 12px 30px -12px rgba(132, 104, 255, .9); }
.day-sep { letter-spacing: .04em; }
.jump-new { border-radius: 999px; background: var(--grad); }

/* ---------- Fenster, Menüs, Hinweise ---------- */
.backdrop { backdrop-filter: blur(8px) saturate(1.2); -webkit-backdrop-filter: blur(8px) saturate(1.2); background: rgba(4, 4, 10, .6); }
.modal { border-radius: 22px; border: 1px solid var(--line); box-shadow: var(--shadow); animation: z-pop .22s var(--ease); }
.modal-head h2 { letter-spacing: -.02em; }
@keyframes z-pop { from { opacity: 0; transform: translateY(10px) scale(.97); } }
.menu { border-radius: 14px; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg3) 86%, transparent); backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4); box-shadow: var(--shadow); padding: 6px; animation: z-pop .14s var(--ease); }
.menu-item { border-radius: 9px; }
.menu-item:hover { background: var(--accent); color: #fff; }
.menu-item.danger:hover { background: var(--danger); color: #fff; }
.toast { border-radius: 14px; border: 1px solid var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: var(--shadow); }
.tip { border-radius: 9px; font-weight: 700; border: 1px solid var(--line); }
.pcard { border-radius: 20px; border: 1px solid var(--line); overflow: hidden; }
.emoji-pick { border-radius: 18px; border: 1px solid var(--line); }
.opt { border-radius: 14px; }
.opt.sel { border-color: var(--accent); background: var(--accent-soft); }

/* ---------- Anmeldung ---------- */
.auth-card { border-radius: 26px; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg2) 84%, transparent); backdrop-filter: blur(24px) saturate(1.3); -webkit-backdrop-filter: blur(24px) saturate(1.3); padding: 32px; }
.auth-card h1 { letter-spacing: -.03em; }
.auth-logo img { filter: drop-shadow(0 12px 26px rgba(132, 104, 255, .55)); }

/* ---------- Sprachraum / 3D-Raum: Vorraum ---------- */
.stage-empty h2 { font-size: 26px; letter-spacing: -.02em; }
.stage-bar .cbtn { border-radius: 16px; transition: transform .12s var(--ease), background .15s; }
.stage-bar .cbtn:hover { transform: translateY(-2px); }
.tile { border-radius: 18px; }
.lobby3d { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; padding: 20px; overflow: hidden; background: #07070d; }
.lobby3d-bg { position: absolute; inset: -4%; background-size: cover; background-position: center; filter: saturate(1.1); transform: scale(1.04); animation: lobby-drift 26s ease-in-out infinite alternate; }
.lobby3d::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 7, 13, .35) 0%, rgba(7, 7, 13, .2) 40%, rgba(7, 7, 13, .86) 100%); }
@keyframes lobby-drift { to { transform: scale(1.1) translate(-1.2%, -1%); } }
.lobby3d-card { position: relative; z-index: 1; width: min(460px, 100%); display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 28px 26px 26px; text-align: center; border-radius: 26px; color: #fff; background: rgba(14, 14, 24, .58); border: 1px solid rgba(255, 255, 255, .12); backdrop-filter: blur(22px) saturate(1.4); -webkit-backdrop-filter: blur(22px) saturate(1.4); box-shadow: 0 30px 80px rgba(0, 0, 0, .55); align-self: end; margin-bottom: 4vh; }
.lobby3d-card .tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .12); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.lobby3d-card h2 { margin: 0; font-size: 28px; letter-spacing: -.02em; line-height: 1.15; }
.lobby3d-card p { margin: 0; color: rgba(255, 255, 255, .72); }
.lobby3d-card .btn { padding: 13px 26px; font-size: 16px; border-radius: 14px; margin-top: 6px; }
.lobby3d-who { display: flex; align-items: center; justify-content: center; }
.lobby3d-who .av { margin: 0 -5px; box-shadow: 0 0 0 3px rgba(14, 14, 24, .9); border-radius: 50%; }
@media (prefers-reduced-motion: reduce) { .lobby3d-bg, .modal, .menu { animation: none; } .btn:hover, .rail-btn:hover, .stage-bar .cbtn:hover { transform: none; } }

/* ---------- Handy ---------- */
@media (max-width: 820px), (pointer: coarse) and (max-height: 520px) {
  .side { margin: 0; border-radius: 18px 0 0 0; }
  .main { margin: 0; border-radius: 0; border: 0; }
  .mnav { background: color-mix(in srgb, var(--bg1) 86%, transparent); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
  .mnav button.active { color: var(--accent); }
  .auth-card { padding: 24px 20px; border-radius: 22px; }
  .lobby3d-card { margin-bottom: 2vh; padding: 22px 18px; }
}
.av-editor { grid-template-columns: minmax(250px, 400px) minmax(210px, 1fr); gap: 22px; }
.av-models { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.av-model { font-size: 12.5px; padding: 5px 5px 7px; }
@media (max-width: 860px) { .av-editor { grid-template-columns: 1fr; } }

/* 3D-Raum: Die Zeichenfläche darf die Breite nicht festhalten – sonst wird der eingeblendete Chat aus dem Bild geschoben. */
.stage, .room3d { min-width: 0; }
.room3d canvas { width: 100% !important; height: 100% !important; }
/* Leiste im Raum: bei wenig Platz umbrechen statt Emotes abzuschneiden */
.r3-dock { flex-wrap: wrap; justify-content: center; row-gap: 4px; }
.r3-emotes { flex-wrap: wrap; justify-content: center; overflow: visible; }
@media (max-width: 560px) { .r3-dock .r3-sep { display: none; } }
/* Leiste nutzt die ganze Raumbreite, bevor sie umbricht (mit left: 50% stand ihr nur die halbe Breite zu) */
.r3-dock { left: 10px; right: 10px; transform: none; width: fit-content; max-width: calc(100% - 20px); margin-inline: auto; }

/* ---------- Freunde & Einladungen ---------- */
.count-pill { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent-2, var(--danger)); color: #fff; font-size: 11.5px; font-weight: 800; vertical-align: middle; }
.person .btn.small { flex: none; white-space: nowrap; }
.person { flex-wrap: wrap; }
.person > .grow { flex: 1 1 110px; }
.pill.ok { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
/* Hinweis über dem Eingabefeld einer Unterhaltung ohne Freundschaft */
.dm-note { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 12px 0; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg3); font-size: 13.5px; color: var(--text2); }
.dm-note.hidden { display: none; }
/* Einladen-Dialog: Freundesliste */
.invite-friends { display: flex; flex-direction: column; gap: 4px; max-height: 240px; overflow-y: auto; margin-top: 6px; padding-right: 2px; }
.invite-friend { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 12px; }
.invite-friend:hover { background: var(--bg3); }
.invite-friend .btn.small, .invite-friend .pill { flex: none; white-space: nowrap; }
/* Einladungskarte im Chat */
.m-invites { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.invite-chip { display: flex; align-items: center; gap: 12px; width: min(420px, 100%); min-height: 68px; padding: 10px 12px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg3); box-sizing: border-box; }
.invite-chip .spinner { margin: 0 auto; }
.invite-chip .ic-icon { flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; overflow: hidden; background: var(--bg4); color: #fff; font-size: 20px; font-weight: 800; }
.invite-chip .ic-icon img { width: 100%; height: 100%; object-fit: cover; }
.invite-chip .ic-name { font-weight: 700; color: var(--text); }
.invite-chip .btn { flex: none; }
.invite-chip.dead { opacity: .75; }
@media (max-width: 480px) { .invite-chip { flex-wrap: wrap; } .invite-chip .btn { width: 100%; } }
.person-actions { display: flex; align-items: center; gap: 4px; flex: none; margin-left: auto; }

/* ---------- Anmeldeseite: Räume als Hintergrund, Begrüßung links, Karte rechts ---------- */
.auth.login { padding: 0; display: block; background: #07070d; }
.auth-bg { position: fixed; inset: 0; overflow: hidden; }
.auth-slide { position: absolute; inset: -4%; background-size: cover; background-position: center; opacity: 0; transition: opacity 1.8s ease; }
.auth-slide.on { opacity: 1; animation: auth-zoom 15s ease-out forwards; }
@keyframes auth-zoom { from { transform: scale(1.02); } to { transform: scale(1.12) translateX(-1.5%); } }
.auth-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(8, 7, 18, .9) 0%, rgba(8, 7, 18, .56) 46%, rgba(8, 7, 18, .74) 100%), radial-gradient(900px 520px at 14% 18%, rgba(124, 92, 255, .38), transparent 65%), radial-gradient(800px 520px at 92% 92%, rgba(255, 92, 138, .24), transparent 60%); }
.auth-wrap { position: relative; min-height: 100%; box-sizing: border-box; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(330px, 440px); gap: clamp(24px, 6vw, 90px); align-items: center; max-width: 1180px; margin: 0 auto; padding: clamp(20px, 5vh, 56px) clamp(18px, 4vw, 48px); }
.auth-hero { color: #fff; min-width: 0; }
.auth-brand { display: flex; align-items: center; gap: 12px; font-size: 26px; letter-spacing: -.02em; }
.auth-brand img { width: 46px; height: 46px; filter: drop-shadow(0 10px 24px rgba(132, 104, 255, .6)); }
.auth-hero h2 { font-size: clamp(32px, 5vw, 60px); line-height: 1.05; letter-spacing: -.035em; margin: 26px 0 14px; background: linear-gradient(92deg, #fff 20%, #cfc2ff 60%, #ffa3bf); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-hero p { font-size: clamp(15px, 1.5vw, 18px); line-height: 1.55; color: rgba(255, 255, 255, .8); max-width: 520px; margin: 0 0 22px; }
.auth-feats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.auth-feats span { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 999px; background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .15); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-weight: 600; font-size: 13.5px; }
.auth-people { display: flex; align-items: center; gap: 12px; color: rgba(255, 255, 255, .82); font-size: 14px; font-weight: 600; margin-bottom: 30px; }
.auth-faces { display: flex; }
.auth-faces img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: linear-gradient(135deg, #2f2859, #40254c); border: 2px solid rgba(255, 255, 255, .88); margin-inline-start: -12px; box-shadow: 0 6px 16px rgba(0, 0, 0, .4); }
.auth-faces img:first-child { margin-inline-start: 0; }
.auth-now { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; color: rgba(255, 255, 255, .72); }
.auth-dots { display: flex; gap: 5px; margin-inline-start: 6px; }
.auth-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .3); transition: width .4s, background .4s; }
.auth-dots i.on { width: 18px; background: #fff; }
.auth.login .auth-card { width: 100%; box-sizing: border-box; background: color-mix(in srgb, var(--bg2) 74%, transparent); box-shadow: 0 30px 80px rgba(0, 0, 0, .55); }
.auth-wrap.first .auth-card { animation: auth-in .55s cubic-bezier(.2, .8, .2, 1) .12s both; }
.auth-wrap.first .auth-hero > * { animation: auth-in .6s cubic-bezier(.2, .8, .2, 1) both; }
.auth-wrap.first .auth-hero > :nth-child(2) { animation-delay: .06s; } .auth-wrap.first .auth-hero > :nth-child(3) { animation-delay: .12s; }
.auth-wrap.first .auth-hero > :nth-child(4) { animation-delay: .18s; } .auth-wrap.first .auth-hero > :nth-child(5) { animation-delay: .24s; } .auth-wrap.first .auth-hero > :nth-child(6) { animation-delay: .3s; }
@keyframes auth-in { from { opacity: 0; transform: translateY(14px); } }
@media (max-width: 860px) {
  .auth-wrap { grid-template-columns: 1fr; gap: 16px; align-content: start; }
  .auth-hero h2 { margin: 14px 0 8px; }
  .auth-hero p { margin-bottom: 2px; }
  .auth-feats, .auth-people, .auth-now { display: none; }
}
@media (prefers-reduced-motion: reduce) { .auth-slide.on, .auth-wrap.first .auth-card, .auth-wrap.first .auth-hero > * { animation: none; } }

/* ---------- Fernseher im 3D-Raum (room-tv.js): Rahmen liegt per CSS-3D auf der Leinwand ---------- */
/* Reihenfolge von hinten nach vorne: Video-Ebene (0) · 3D-Bild (1, mit durchsichtigem Fenster am Fernseher) · Namensschilder und Bedientafel (2) · Leisten (3+) */
.r3-tv-layer { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.room3d canvas { position: relative; z-index: 1; }
.room3d.tvctl canvas { pointer-events: none; } /* beim Bedienen gehen Klicks durch das 3D-Bild zum Fernseher dahinter */
/* Die Tafel liegt wie das Video hinter dem 3D-Bild (Figuren davor verdecken sie). Das 3D-Bild nimmt selbst keine Klicks
   an – sie gehen an die Tafel bzw. an den Raum (Umschauen), der seine Zeiger-Ereignisse am Rahmen .room3d abhört. */
.r3-tvp-layer { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.room3d canvas { pointer-events: none; }
.r3-tv { position: relative; background: #000; pointer-events: none; box-shadow: 0 0 0 2px rgba(0, 0, 0, .9); backface-visibility: hidden; color: #fff; user-select: none; -webkit-user-select: none; }
.r3-tv-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.r3-tv-card { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 40px; text-align: center; background: radial-gradient(80% 90% at 50% 40%, #241d4a, #0b0a16); font-size: 30px; }
.r3-tv-card b { font-size: 46px; line-height: 1.15; max-width: 90%; overflow-wrap: anywhere; }
.r3-tv-card p { margin: 0; color: rgba(255, 255, 255, .7); }
.r3-tv-icon { font-size: 84px; line-height: 1; }
.r3-tv-actions { display: flex; align-items: center; gap: 28px; margin-top: 12px; }
.r3-tv-actions .btn { font-size: 30px; padding: 18px 38px; border-radius: 20px; }
.r3-tv-link { color: #cfc2ff; font-size: 26px; font-weight: 700; text-decoration: underline; }
.r3-tv-foot { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 22px; padding: 10px 20px; background: rgba(10, 9, 20, .82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-size: 22px; font-weight: 700; }
.r3-tv-foot .r3-tv-note { flex: 1; min-width: 0; font-weight: 500; color: rgba(255, 255, 255, .62); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r3-tv-foot .r3-tv-link { font-size: 22px; white-space: nowrap; }
.r3-tv.full, .r3-tv:fullscreen { border-radius: 0; box-shadow: none; }
.r3-tv-now { margin-bottom: 12px; padding: 9px 12px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 14%, transparent); border: 1px solid var(--line); font-size: 14px; }

/* Fernseher bedienen (Klick auf die Leinwand) und Ich-Ansicht */
.r3-tv-card, .r3-tv-foot, .r3-tv.ctl, .r3-tv.full, .r3-tv:fullscreen { pointer-events: auto; }
.r3-tv.ctl { box-shadow: 0 0 0 5px var(--accent), 0 0 60px color-mix(in srgb, var(--accent) 60%, transparent); }
.r3-cross { position: absolute; z-index: 2; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: rgba(255, 255, 255, .85); box-shadow: 0 0 0 1.5px rgba(0, 0, 0, .45); pointer-events: none; display: none; }
.room3d.fp .r3-cross { display: block; }
.room3d.mouselook { cursor: none; }

/* ---------- Handy ---------- */
/* iPhone: Safari zoomt hinein, sobald ein angetipptes Eingabefeld kleiner als 16 px schreibt – und bleibt gezoomt. */
@media (hover: none) and (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]), textarea, select { font-size: 16px !important; }
}
/* Zeilen mit Menü per langem Drücken: kein Text-Markieren und keine System-Vorschau dabei */
@media (hover: none) {
  .ch, .dm-item, .member, .voice-user, .rail-btn, .person, .tile, .react { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
}
/* 3D-Raum auf schmalen Bildschirmen (Handy hochkant): Die Leiste bleibt einzeilig, die Emotes klappen über den Knopf 😊
   nach oben auf. Vorher wuchs die Leiste auf drei Zeilen und verdeckte Springen, Ducken, „Hinsetzen“ und das Steuerkreuz. */
.r3-emo-toggle { display: none; }
@media (max-width: 820px), (pointer: coarse) and (max-height: 520px) {
  .r3-emo-toggle { display: inline-flex; }
  .r3-dock { flex-wrap: nowrap; }
  .r3-dock .r3-sep { display: none; }
  .r3-emotes { display: none; position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); margin-inline: auto; width: fit-content; max-width: 100%; padding: 6px; border-radius: 19px; background: rgba(18, 18, 30, .9); border: 1px solid var(--glass-line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); flex-wrap: wrap; justify-content: center; gap: 2px; }
  .room3d.emo-open .r3-emotes { display: flex; }
}

/* 3D-Kanal im Sprachraum: Hinweis und Knopf zum Eintreten in den 3D-Raum */
.lobby3d-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.enter3d { position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px; margin: 12px 14px 0; padding: 14px 16px; border-radius: 18px; border: 1px solid var(--glass-line, rgba(255, 255, 255, .12)); color: #fff; flex: none; }
.enter3d-bg { position: absolute; inset: 0; background-size: cover; background-position: center; filter: brightness(.5) saturate(1.1); z-index: 0; }
.enter3d > :not(.enter3d-bg) { position: relative; z-index: 1; }
.enter3d .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.enter3d .grow b { font-size: 16px; }
.enter3d .grow span { font-size: 13px; color: rgba(255, 255, 255, .8); }
@media (max-width: 560px) { .enter3d { flex-direction: column; align-items: stretch; text-align: center; } }

/* Eigene Symbole im 3D-Raum (room-icons.js): Linien in Strichfarbe, eine farbige Fläche je Symbol */
.r3i { width: 26px; height: 26px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; overflow: visible; pointer-events: none; }
.r3i .a { fill: var(--i, #9a6bff); fill-opacity: .62; }
.r3i .d { fill: currentColor; stroke: none; }
.r3-btn.off .r3i .a { fill-opacity: .15; }

/* Bedientafel neben dem Fernseher im 3D-Raum (steht im Raum, Maße in Bildpunkten der Tafel: 460 breit) */
/* WICHTIG: In dieser Tafel (und im Fernseher) kein „overflow: hidden/auto“ an Flächen, die Knöpfe enthalten – der Browser
   leitet Klicks an abgeschnittene Bereiche nicht weiter, sobald sie schräg im Raum stehen. */

/* Beitreten: Knopf mit „Verbinde …“, Hinweis bei langem Warten */
.btn.busy { opacity: .9; cursor: progress; }
.btn:disabled:not(.busy) { opacity: .45; cursor: default; }
.btn-spin { width: 15px; height: 15px; flex: none; display: inline-block; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: r3-spin .7s linear infinite; }
.lobby3d-wait { margin: 0; padding: 8px 12px; border-radius: 12px; background: rgba(255, 200, 87, .16); color: #ffe2a6 !important; }
/* Ladebild des Raums: Vorschau im Hintergrund, Fortschrittsbalken */
.r3-loading { overflow: hidden; }
.r3-loading-bg { position: absolute; inset: -6%; background-size: cover; background-position: center; filter: blur(14px) brightness(.42) saturate(1.15); transform: scale(1.06); z-index: 0; }
.r3-loading > :not(.r3-loading-bg) { position: relative; z-index: 1; }
.r3-bar { width: min(260px, 60%); height: 6px; margin-top: 10px; border-radius: 999px; background: rgba(255, 255, 255, .16); overflow: hidden; }
.r3-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #35c9ff); transition: width .45s ease; }
.r3-loading.done { transition: opacity .6s ease; }

/* Leiste im 3D-Raum richtet sich nach der Breite des Raums, nicht des Fensters: Mit offenen Seitenleisten ist der Raum
   oft schmal, obwohl das Fenster breit ist – auch dann bleiben die Emotes eingeklappt und die Leiste einzeilig. */
.room3d { container: r3room / inline-size; }
@container r3room (max-width: 820px) {
  .r3-emo-toggle { display: inline-flex; }
  .r3-dock { flex-wrap: nowrap; }
  .r3-dock .r3-sep { display: none; }
  .r3-emotes { display: none; position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); margin-inline: auto; width: fit-content; max-width: 100%; padding: 6px; border-radius: 19px; background: rgba(18, 18, 30, .9); border: 1px solid var(--glass-line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); flex-wrap: wrap; justify-content: center; gap: 2px; }
  .room3d.emo-open .r3-emotes { display: flex; }
}

/* Fernseher im Vollbild: Das Video löst sich aus dem Raum und füllt die ganze Raumansicht (liegt dann über allem). */
.r3-tv-layer.big { z-index: 7; pointer-events: auto; background: #000; }
.r3-tv-layer.big > div, .r3-tv-layer.big > div > div { transform: none !important; perspective: none !important; transform-style: flat !important; width: 100% !important; height: 100% !important; }
.r3-tv-layer.big .r3-tv { position: absolute !important; left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; transform: none !important; display: block !important; pointer-events: auto !important; box-shadow: none; }
.room3d:fullscreen { width: 100vw; height: 100vh; }

/* ---------- Start: Übersicht nach dem Anmelden ---------- */
.start-wrap { container: start / inline-size; }
.start { display: flex; flex-direction: column; gap: 26px; }
.start-top { display: flex; flex-direction: column; gap: 26px; }
.start section { min-width: 0; }
.start-hero { position: relative; overflow: hidden; border-radius: 22px; padding: 26px 28px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; color: #fff; background: linear-gradient(120deg, #6d4df2 0%, #8f55f0 46%, #e2559b 100%); box-shadow: 0 26px 60px -34px rgba(132, 104, 255, .95); isolation: isolate; }
.start-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: url(/img/rooms/lounge.webp) center 40% / cover; opacity: .2; mix-blend-mode: luminosity; }
.start-hero::after { content: ''; position: absolute; z-index: -1; width: 420px; height: 420px; inset-inline-end: -120px; top: -220px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .28), transparent 62%); }
.start-hero > .av { flex: none; border-radius: 50%; box-shadow: 0 0 0 3px rgba(255, 255, 255, .32), 0 12px 26px -10px rgba(0, 0, 0, .5); }
.start-hero .sh-text { min-width: 200px; }
.start-hero h1 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; overflow-wrap: anywhere; }
.start-hero p { margin: 4px 0 0; opacity: .92; }
.start-stats { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.start-stats span { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px; background: rgba(12, 10, 30, .3); font-size: 13px; font-weight: 700; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.start-stats i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .45); }
.start-stats .on i { background: var(--ok); box-shadow: 0 0 0 3px rgba(61, 220, 151, .25); }
.start-stats .new i { background: #ffd166; box-shadow: 0 0 0 3px rgba(255, 209, 102, .25); }
.btn.start-go { flex: none; background: #fff; color: #2b1d70; padding: 12px 20px; box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .65); }
.btn.start-go:hover { filter: none; background: #f3f0ff; }

.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.quick button { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: var(--bg3); border: 1px solid var(--line); text-align: start; min-width: 0; transition: transform .18s var(--ease), border-color .18s, background .18s; }
.quick button:hover { transform: translateY(-2px); background: var(--bg4); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.quick button:focus-visible, .room-card:focus-visible, .sec-head .more:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.quick .q-ic { width: 42px; height: 42px; flex: none; border-radius: 13px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.quick b { display: block; font-size: 14.5px; line-height: 1.25; }
.quick small { display: block; color: var(--muted); font-size: 12.5px; }

.sec-head { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; min-height: 24px; }
.sec-head h2 { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.sec-head .more { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 2px; color: var(--muted); font-size: 13px; font-weight: 700; border-radius: 8px; padding: 2px 4px; }
.sec-head .more:hover { color: var(--text); }
.sec-head .more .icon { transform: rotate(-90deg); }
[dir="rtl"] .sec-head .more .icon { transform: rotate(90deg); }

.room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.room-card { position: relative; display: flex; flex-direction: column; text-align: start; min-width: 0; border-radius: 16px; overflow: hidden; background: var(--bg3); border: 1px solid var(--line); transition: transform .18s var(--ease), box-shadow .18s, border-color .18s; }
.room-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.room-card.live { border-color: color-mix(in srgb, var(--ok) 55%, var(--line)); }
.rc-img { display: grid; place-items: center; height: 116px; background: linear-gradient(135deg, #2b2b47, #1a1a2b) center / cover; color: #8d8da6; }
.rc-img .icon { width: 30px; height: 30px; }
.rc-tag, .rc-live { position: absolute; top: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 800; }
.rc-tag { inset-inline-start: 10px; background: rgba(8, 8, 16, .66); color: #fff; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.rc-tag .icon { width: 13px; height: 13px; }
.rc-live { inset-inline-end: 10px; background: var(--ok); color: #06140d; }
.rc-live i { width: 6px; height: 6px; border-radius: 50%; background: #06140d; animation: rc-pulse 1.6s ease-in-out infinite; }
@keyframes rc-pulse { 50% { opacity: .25; } }
.rc-body { display: flex; flex-direction: column; gap: 1px; padding: 11px 13px 13px; min-width: 0; }
.rc-body b { font-size: 14.5px; }
.rc-people { display: flex; margin-top: 9px; padding-inline-start: 2px; }
.rc-people .av { margin-inline-end: -7px; border-radius: 50%; box-shadow: 0 0 0 2px var(--bg3); }

.start-cols { min-width: 0; }
.start-mid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
.panel { background: var(--bg2); border: 1px solid var(--line); border-radius: 18px; padding: 16px; min-width: 0; }
.panel-list { display: flex; flex-direction: column; gap: 2px; margin: 0 -6px; }
.panel-list .person { background: transparent; flex-wrap: nowrap; }
.panel-list .person:hover { background: var(--bg3); }
.panel-list .person > .icon { color: var(--faint); transform: rotate(-90deg); flex: none; }
[dir="rtl"] .panel-list .person > .icon { transform: rotate(90deg); }
.panel-empty { color: var(--muted); font-size: 14px; padding: 6px 0 4px; }
.start-empty { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.start-empty .se-pic { width: 150px; height: 104px; flex: none; border-radius: 14px; background: url(/img/rooms/hangout.webp) center / cover; }
.start-empty p { margin: 4px 0 12px; }
.start-empty > .grow { min-width: 220px; }

.add-form { display: flex; gap: 8px; }
.add-form .input { flex: 1; min-width: 0; }
.add-form .btn { flex: none; }
.add-hint { margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.add-found { margin-top: 12px; }
.add-found:empty { display: none; }
.add-none { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.add-none .icon { flex: none; }

@container start (max-width: 900px) { .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container start (max-width: 720px) {
  .start-mid { grid-template-columns: minmax(0, 1fr); }
  .start-hero { padding: 20px; border-radius: 18px; gap: 14px; }
  .start-hero h1 { font-size: 23px; }
  .start-hero > .av { width: 54px !important; height: 54px !important; }
  .btn.start-go { width: 100%; }
  .room-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .rc-img { height: 92px; }
  .start, .start-top { gap: 20px; }
}
@container start (max-width: 520px) {
  .quick { gap: 10px; }
  .quick button { flex-direction: column; align-items: flex-start; gap: 10px; padding: 13px; }
  .quick small { display: none; }
  .quick b { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) { .rc-live i { animation: none; } .quick button, .room-card { transition: none; } }

@media (max-width: 480px) { .add-form .btn span { display: none; } .add-form .btn { padding: 10px 14px; } }

/* Leerseiten: ruhiges Symbol statt Emoji */
.empty-ic { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 20px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.empty-ic .icon { width: 28px; height: 28px; }
.disc-grid > .empty, .disc-grid > .spinner { grid-column: 1 / -1; }
.empty { max-width: 420px; margin-inline: auto; }

/* Fernseher-Tafel: einklappen */
/* Fernseher in Full HD: Karten und Fußzeile im Bild behalten ihre sichtbare Größe */
.r3-tv-card, .r3-tv-foot { zoom: var(--tvk, 1); }

/* Sprachwahl in den Einstellungen */
.opt-grid.langs { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }

/* ---------- Windows-App: eigene Titelleiste ---------- */
.titlebar { display: none; }
.desktop .titlebar { display: flex; align-items: center; gap: 8px; position: fixed; top: 0; left: 0; right: 0; height: 32px; padding: 0 150px 0 12px; z-index: 2000; background: var(--bg0); color: var(--muted); font-size: 12.5px; font-weight: 800; letter-spacing: .02em; user-select: none; -webkit-user-select: none; -webkit-app-region: drag; }
.desktop .titlebar img { width: 16px; height: 16px; }
.desktop #app, .desktop .auth { top: 32px; }
.desktop .banner-msg { margin-top: 32px; }
.desktop a.btn { text-decoration: none; }
a.btn:hover { text-decoration: none; }

/* ---------- Profilrahmen (gezeichnet in frames.js) ---------- */
.av-frame { position: absolute; left: -22%; top: -22%; width: 144%; height: 144%; overflow: visible; pointer-events: none; z-index: 2; }
/* In Listen ruhen die Rahmen; sie laufen auf dem Profil (live) und beim Zeigen mit der Maus */
.av-frame * { animation-play-state: paused; }
.av.live .av-frame *, .av:hover .av-frame *, :is(.msg, .person, .member, .dm-item, .me-who, .opt, .voice-user):hover .av-frame * { animation-play-state: running; }
.fr-spin { animation: fr-spin var(--t, 6s) linear infinite; }
.fr-spin.fr-rev { animation-direction: reverse; }
@keyframes fr-spin { to { transform: rotate(360deg); } }
.fr-twinkle { animation: fr-twinkle 2.4s ease-in-out var(--d, 0s) infinite; }
@keyframes fr-twinkle { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .15; transform: scale(.45); } }
.fr-flick { animation: fr-flick .85s ease-in-out var(--d, 0s) infinite alternate; }
@keyframes fr-flick { from { transform: scale(1, 1); } to { transform: scale(.8, .58); } }
.fr-fall { opacity: 0; animation: fr-fall var(--t, 6s) linear var(--d, 0s) infinite; }
@keyframes fr-fall { 0% { opacity: 0; transform: translate(0, 0) rotate(0); } 12% { opacity: 1; } 82% { opacity: .9; } 100% { opacity: 0; transform: translate(-24px, 138px) rotate(330deg); } }
.fr-rise { opacity: 0; animation: fr-rise var(--t, 3.6s) ease-out var(--d, 0s) infinite; }
@keyframes fr-rise { 0% { opacity: 0; transform: translateY(6px) scale(.5); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-32px) scale(1.05); } }
.fr-bob { animation: fr-bob 2.6s ease-in-out infinite; }
@keyframes fr-bob { 50% { transform: translateY(-3px); } }
.fr-flap { animation: fr-flap 1.8s ease-in-out infinite; }
@keyframes fr-flap { 50% { transform: rotate(-11deg) scale(1.03, .95); } }
.fr-beat { animation: fr-beat 1.15s ease-in-out infinite; }
@keyframes fr-beat { 0%, 100% { transform: scale(1); } 18% { transform: scale(1.22); } 36% { transform: scale(1); } 54% { transform: scale(1.13); } }
.fr-zap { animation: fr-zap 1.5s steps(1) var(--d, 0s) infinite; }
@keyframes fr-zap { 0% { opacity: 1; } 55% { opacity: .15; } 62% { opacity: 1; } 70% { opacity: .3; } 78% { opacity: 1; } }
.fr-wiggle { animation: fr-wiggle 3.2s ease-in-out var(--d, 0s) infinite; }
@keyframes fr-wiggle { 0%, 70%, 100% { transform: rotate(0); } 78% { transform: rotate(-9deg); } 86% { transform: rotate(6deg); } 93% { transform: rotate(-3deg); } }
.fr-shine { animation: fr-shine 2.4s ease-in-out var(--d, 0s) infinite; }
@keyframes fr-shine { 0%, 60%, 100% { filter: none; } 30% { filter: brightness(1.5) saturate(1.1); } }
.pcard-top .av { left: 24px; }
.opt-grid.frames { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.opt-grid.frames .opt { padding-top: 20px; gap: 16px; }

/* ---------- Profil-Effekte (Teilchen über Profilkarte und Profilseite) ---------- */
.pcard, .preview-card, .profile-hero { position: relative; }
/* Profil-Effekte (seit Version 74): Ebenen aus gerenderten Teilchen-Bildern (public/fx), bewegt von frames.js nach der
   Beschreibung in fx-data.js. i = Bahn, b = Pendeln, u = das Bild (Drehung, Funkeln). .screen = reines Licht. */
.pfx { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 4; border-radius: inherit; contain: strict; }
.pfx.screen { mix-blend-mode: screen; }
.pfx i, .pfx b, .pfx u { position: absolute; left: 0; top: 0; display: block; font-style: normal; text-decoration: none; will-change: transform, opacity; }
.pfx u { background-position: center; background-repeat: no-repeat; background-size: 100% 100%; -webkit-mask-position: center; mask-position: center; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-size: 100% 100%; mask-size: 100% 100%; backface-visibility: visible; }
.pfx .strip { width: 200%; background-repeat: repeat-x; background-size: 50% 100%; -webkit-mask-repeat: repeat-x; mask-repeat: repeat-x; -webkit-mask-size: 50% 100%; mask-size: 50% 100%; }
.pfx .amb { position: absolute; left: 0; right: 0; }
.opt-grid.fx { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.fx-demo { position: relative; display: block; width: 100%; height: 64px; border-radius: 10px; overflow: hidden; background: linear-gradient(135deg, #2a2350, #141322); }
@media (prefers-reduced-motion: reduce) { .av-frame *, .pfx i { animation: none !important; } .fr-fall, .fr-rise { opacity: 0; } }

/* Fernseher: Inhalt, Knopfleiste auf der Leinwand und Player, wenn man davor steht */
.r3-tv-c, .r3-tv-live { position: absolute; inset: 0; }
.r3-tv-live { background: #000; }
.r3-tv-live video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.r3-tv.has-live .r3-tv-c { visibility: hidden; }
.r3-tvd { box-sizing: border-box; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 10px; border-radius: 24px; background: rgba(10, 10, 18, .78); pointer-events: auto; backface-visibility: hidden; }
.r3-tvd button { width: 68px; height: 68px; display: grid; place-items: center; border: 0; border-radius: 18px; background: #f4f4f8; cursor: pointer; transition: transform .12s; }
.r3-tvd button:hover { transform: scale(1.08); }
.r3-tvd .r3i { width: 42px; height: 42px; }
.room3d.tvnear .r3-dock, .room3d.tvnear .r3-joy, .room3d.tvnear .r3-jump, .room3d.tvnear .r3-crouch, .room3d.tvnear .r3-hint, .room3d.tvnear .r3-labels, .room3d.tvnear .r3-cross, .room3d.tvnear .r3-top, .room3d.tvnear .r3-helpbtn, .room3d.tvnear .r3-help { display: none !important; }
.r3-player { position: absolute; z-index: 9; left: 50%; bottom: 14px; transform: translateX(-50%); box-sizing: border-box; width: min(980px, calc(100% - 24px)); display: flex; flex-direction: column; gap: 6px; padding: 8px 10px 10px; border-radius: 16px; background: rgba(16, 16, 26, .9); border: 1px solid rgba(255, 255, 255, .1); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); color: #fff; font-size: 13px; transition: opacity .2s; }
.r3-player.hidden, .r3-tvpop.hidden, .r3-tv-tap.hidden { display: none; }
.room3d.tvbig .r3-player.idle { opacity: 0; }
.r3-prow { display: flex; align-items: center; gap: 10px; min-width: 0; }
.r3-pgroup { display: flex; align-items: center; gap: 4px; flex: none; }
.r3-pgroup.end { margin-inline-start: auto; }
.r3-pgroup.hidden, .r3-time.hidden, .r3-seek.hidden, .r3-pb.hidden, .r3-pstop.hidden { display: none; }
.r3-pb { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 9px; background: transparent; color: #fff; cursor: pointer; }
.r3-pb:hover { background: rgba(255, 255, 255, .13); }
.r3-pb .r3i { width: 20px; height: 20px; }
.r3-pb.src { background: #f4f4f8; }
.r3-pb.src:hover { background: #fff; }
.r3-pb.src.on { box-shadow: 0 0 0 2px var(--accent); }
.r3-pb.main { background: var(--accent); }
.r3-pb.off { opacity: .5; }
.r3-time { flex: none; font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, .78); }
.r3-now { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 600; color: rgba(255, 255, 255, .86); }
.r3-now.live::before { content: 'LIVE'; margin-inline-end: 7px; padding: 1px 6px; border-radius: 5px; background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 800; }
.r3-pstop { height: 30px; padding: 0 12px; border: 0; border-radius: 8px; background: #f4f4f8; color: #15151f; font: inherit; font-weight: 700; white-space: nowrap; cursor: pointer; }
.r3-seek, .r3-vol { --p: 0%; appearance: none; -webkit-appearance: none; height: 16px; margin: 0; background: transparent; cursor: pointer; }
.r3-seek { width: 100%; }
.r3-vol { width: 84px; }
.r3-seek::-webkit-slider-runnable-track, .r3-vol::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--accent) var(--p), rgba(255, 255, 255, .22) var(--p)); }
.r3-seek::-moz-range-track, .r3-vol::-moz-range-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--accent) var(--p), rgba(255, 255, 255, .22) var(--p)); }
.r3-seek::-webkit-slider-thumb, .r3-vol::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -4px; border-radius: 50%; background: #fff; }
.r3-seek::-moz-range-thumb, .r3-vol::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; }
.r3-tvpop { position: absolute; z-index: 9; left: max(12px, calc(50% - 490px)); bottom: 106px; box-sizing: border-box; width: min(380px, calc(100% - 24px)); max-height: calc(100% - 130px); overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 16px; background: rgba(22, 22, 32, .96); border: 1px solid rgba(255, 255, 255, .1); color: #fff; font-size: 13.5px; }
.r3-tvpop * { box-sizing: border-box; }
.r3-tvpop-h { font-size: 14.5px; }
.r3-tvpop form { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.r3-tvpop input { width: 100%; height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .22); background: rgba(0, 0, 0, .3); color: #fff; font: inherit; user-select: text; -webkit-user-select: text; }
.r3-tvpop input:focus { outline: none; border-color: var(--accent); }
.r3-tvpop-go { align-self: flex-start; min-height: 36px; padding: 0 14px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.r3-tvpop-alt { align-self: flex-start; padding: 0; border: 0; background: none; color: #cfc2ff; font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.r3-tvpop-note, .r3-tvpop-step p { margin: 0; color: rgba(255, 255, 255, .66); line-height: 1.4; }
.r3-tvpop-step { display: flex; flex-direction: column; gap: 8px; }
.r3-tvpop-msg { color: #ffe2a6; line-height: 1.4; }
.r3-tvpop-ext { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 700; }
.r3-tvpop-ext .r3i { width: 20px; height: 20px; }
.r3-tvpop-list { display: flex; flex-direction: column; gap: 6px; }
.r3-tvpop-res { display: flex; gap: 10px; align-items: center; padding: 5px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .06); color: #fff; font: inherit; text-align: start; cursor: pointer; }
.r3-tvpop-res:hover { background: rgba(255, 255, 255, .14); }
.r3-tvpop-res img { width: 88px; height: 50px; flex: none; object-fit: cover; border-radius: 6px; background: #000; }
.r3-tvpop-res div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.r3-tvpop-res b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.25; }
.r3-tvpop-res span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; color: rgba(255, 255, 255, .6); }
.r3-tv-tap { position: absolute; z-index: 9; top: 14px; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border: 0; border-radius: 999px; background: var(--accent); color: #fff; font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; }
.r3-tv-tap .r3i { width: 18px; height: 18px; }
@container r3room (max-width: 620px) {
  .r3-player { bottom: 8px; }
  .r3-prow { flex-wrap: wrap; row-gap: 4px; }
  .r3-now { order: 5; flex: 1 0 100%; }
  .r3-vol { width: 56px; }
  .r3-tvpop { bottom: 132px; left: 12px; max-height: calc(100% - 150px); }
}

/* ---------- Handy: Scrollen, Tastatur, Finger ---------- */
/* Spalten dürfen schrumpfen. Sonst schiebt alles, was oben dazukommt (Hinweis zur Freundschaftsanfrage, Banner), das
   Eingabefeld unten aus dem Bild – auf kleinen Handys war der Chat dann nicht mehr bedienbar. */
.main-body, .main-col, .msgs, .page, .side-scroll, .settings-main { min-height: 0; }
/* Scrollen bleibt im jeweiligen Bereich und zieht nicht die ganze Seite mit (Gummiband-Effekt beim iPhone) */
.msgs, .page, .side-scroll, .settings-main, .members, .modal, .menu, .settings-nav { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.dm-note > .grow { flex: 1 1 190px; min-width: 0; }
.dm-note .row { flex-wrap: wrap; }
@media (pointer: coarse) {
  /* Die App folgt der sichtbaren Fläche (Tastatur, Adressleiste) – siehe setupViewport() in app.js */
  #app { top: var(--vvt, 0px); bottom: auto; height: var(--vvh, 100%); }
  .backdrop { top: var(--vvt, 0px); bottom: auto; height: var(--vvh, 100%); }
  .modal { max-height: calc(var(--vvh, 100dvh) - 32px); }
  .modal.full { height: calc(var(--vvh, 100dvh) - 32px); }
  .kb-open .mnav { display: none !important; }
  .kb-open #app.view-page, .kb-open #app.view-nav { padding-bottom: 0; }
  .kb-open .composer { padding-bottom: 8px; }
  /* Finger-gerechte Knöpfe (mindestens 32 Bildpunkte) */
  .side-section button, .ch .ch-tools button { min-width: 32px; min-height: 32px; display: grid; place-items: center; }
  .ch .ch-tools { margin-block: -6px; }
  .auth-switch button { padding: 8px 4px; }
  /* Tippen markiert keinen Text und zeigt keinen grauen Kasten */
  button, .btn, .ch, .dm-item, .person, .rail-btn { -webkit-tap-highlight-color: transparent; }
}

/* Handy quer im 3D-Raum: Der Raum bekommt die ganze Höhe – flachere Kopfzeile, Anruf-Knöpfe als schmale Spalte rechts
   (vorher blieb für den Raum nur ein Streifen zwischen Kopfzeile und Knopfleiste) */
@media (pointer: coarse) and (max-height: 520px) and (orientation: landscape) {
  .main-head { height: 46px; }
  .stage:has(> .room3d) { flex-direction: row; }
  .stage:has(> .room3d) > .room3d { flex: 1; min-width: 0; }
  .stage:has(> .room3d) > .stage-barwrap { flex: none; display: flex; }
  .stage:has(> .room3d) .stage-bar { flex-direction: column; flex-wrap: nowrap; justify-content: center; gap: 8px; padding: 6px max(8px, env(safe-area-inset-right)) 6px 8px; }
  .stage:has(> .room3d) .stage-bar .cbtn, .stage:has(> .room3d) .stage-bar .cbtn.hang { width: 44px; height: 44px; border-radius: 14px; }
  .r3-joy { width: 104px; height: 104px; left: max(14px, env(safe-area-inset-left)); bottom: 64px; }
  .r3-joy i { width: 46px; height: 46px; margin: -23px; }
}

/* Aufklapp-Fenster nie höher als der sichtbare Bereich; Profilkarte am Handy als Blatt von unten */
.menu { max-height: calc(var(--vvh, 100vh) - 16px); overflow-y: auto; }
.menu.sheet { left: 0 !important; right: 0; top: auto !important; bottom: 0; width: 100%; max-width: none; max-height: 86%; border-radius: 22px 22px 0 0; overflow-y: auto; padding-bottom: env(safe-area-inset-bottom); animation: sheet-up .22s cubic-bezier(.2, .9, .3, 1); }
@supports (bottom: calc(100% - var(--vvh))) { @media (pointer: coarse) { .menu.sheet { bottom: calc(100% - var(--vvh, 100%) - var(--vvt, 0px)); } } }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }
.menu.sheet::before { content: ''; display: block; position: absolute; top: 7px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: rgba(255, 255, 255, .35); z-index: 5; }
/* Profilkarte als Aufklapp-Fenster bleibt fest an ihrer Stelle (die Effekt-Ebene braucht sonst „relative“) */
.menu.pcard { position: fixed; }
/* Platzhalter im Eingabefeld bleibt einzeilig (bricht sonst auf schmalen Handys um und macht das Feld doppelt hoch) */
.composer textarea::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Chat im Sprach- und 3D-Raum ---------- */
.side-chat-head { display: flex; align-items: center; gap: 8px; flex: none; padding: 8px 8px 8px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.side-chat-head .ibtn { width: 36px; height: 36px; }
.main-head .ibtn.new { position: relative; }
.main-head .ibtn.new::after { content: ''; position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); }
.r3-chat-btn { position: relative; }
.r3-chat-btn .r3-dot { display: none; position: absolute; top: 6px; right: 6px; width: 10px; height: 10px; border-radius: 50%; background: #ff5c8a; box-shadow: 0 0 0 2px rgba(18, 18, 30, .9); }
.r3-chat-btn.new .r3-dot { display: block; animation: rc-pulse 1.6s ease-in-out infinite; }
.r3-chat-btn.active { background: color-mix(in srgb, var(--accent) 35%, transparent); }
/* Handy: Der Chat legt sich als halbhohes Fenster über den Raum – oben sieht man den Raum weiter */
@media (max-width: 820px), (pointer: coarse) and (max-height: 520px) {
  .side-chat.in3d.force { top: auto; height: min(50%, 460px); border-radius: 20px 20px 0 0; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--bg2) 95%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 -14px 34px rgba(0, 0, 0, .45); }
  .side-chat.in3d.force .msgs { background: transparent; }
  .kb-open .side-chat.in3d.force { height: min(62%, 460px); }
  .room3d.chat-open .r3-joy, .room3d.chat-open .r3-jump, .room3d.chat-open .r3-crouch { visibility: hidden; }
}
/* Handy quer: Chat als Spalte rechts über dem Raum */
@media (pointer: coarse) and (max-height: 520px) and (orientation: landscape) {
  .side-chat.in3d.force { top: 46px; left: auto; height: auto; width: min(44%, 380px); border-radius: 18px 0 0 0; border-top: 0; border-left: 1px solid var(--line); }
  .kb-open .side-chat.in3d.force { height: auto; }
}

/* ---------- Profilrahmen (Lottie, frames.js) ---------- */
/* Lage aus den Maßen des Rahmens (in Lochdurchmessern) und der Bildgröße --s des Profilbilds */
.av-frame.lf { position: absolute; left: calc(var(--s) * (.5 - var(--fx))); top: calc(var(--s) * (.5 - var(--fy))); width: calc(var(--s) * var(--fw)); height: calc(var(--s) * var(--fh)); pointer-events: none; z-index: 2; overflow: visible; }
.av-frame.lf > img, .av-frame.lf > .lf-anim { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: contain; }
.av-frame.lf > .lf-anim svg { width: 100% !important; height: 100% !important; }
.av-frame.lf.playing > img { visibility: hidden; }
.opt-grid.frames { grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); }
.opt-grid.frames .opt { padding: 34px 6px 12px; gap: 30px; overflow: hidden; }
/* Profilbilder mit Rand (Profilkarte, Profilseite): Rahmen am äußeren Rand ausrichten, nicht innerhalb des Rands */
.pcard-top .av, .profile-hero .ph-row .av { --b: 6px; }
.av-frame.lf { left: calc(var(--s) * (.5 - var(--fx)) - var(--b, 0px)); top: calc(var(--s) * (.5 - var(--fy)) - var(--b, 0px)); }

/* Rahmen-Auswahl: jede Kachel gleich hoch, der Rahmen passt ganz hinein */
.opt-grid.frames .opt { padding: 12px 6px 10px; gap: 8px; min-height: 172px; justify-content: space-between; }
.opt-grid.frames .opt > .av { margin: auto; }

/* ---------- Vorlagen: Server erstellen ---------- */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tpl-card { display: flex; flex-direction: column; text-align: start; border-radius: 16px; overflow: hidden; background: var(--bg3); border: 2px solid transparent; transition: transform .18s var(--ease), border-color .18s, box-shadow .18s; }
.tpl-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.tpl-card.sel { border-color: var(--tpl-c, var(--accent)); box-shadow: 0 10px 30px -12px var(--tpl-c, var(--accent)); }
.tpl-img { position: relative; display: block; height: 92px; background: var(--bg4); }
.tpl-img > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tpl-img::after { content: ''; position: absolute; inset: 0; z-index: 0; background: linear-gradient(180deg, transparent 30%, color-mix(in srgb, var(--bg3) 92%, transparent)); }
.tpl-emoji { position: absolute; left: 12px; bottom: -14px; z-index: 2; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; font-size: 24px; background: var(--tpl-c, var(--accent)); box-shadow: 0 6px 16px -6px var(--tpl-c, var(--accent)), 0 0 0 3px var(--bg3); }
.tpl-body { display: flex; flex-direction: column; gap: 4px; padding: 20px 12px 12px; }
.tpl-body b { font-size: 15px; }
.tpl-text { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.tpl-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.tpl-chips i { font-style: normal; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--bg4); color: var(--text2); white-space: nowrap; }
.tpl-own { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; padding-top: 14px; border-top: 1px solid var(--line); }
.tpl-own .field { margin: 0; }
@media (max-width: 560px) { .tpl-grid { grid-template-columns: 1fr 1fr; gap: 8px; } .tpl-img { height: 70px; } .tpl-text { display: none; } .tpl-own { grid-template-columns: 1fr; } }
/* ---------- Vorlagen: Kanal erstellen ---------- */
.ctpl-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin: 6px 0 4px; }
.ctpl { position: relative; height: 78px; border-radius: 14px; overflow: hidden; display: flex; align-items: flex-end; padding: 8px 10px; text-align: start; color: #fff; background: center / cover, linear-gradient(135deg, var(--ctpl-c, #7c5cff), color-mix(in srgb, var(--ctpl-c, #7c5cff) 45%, #0a0a11)); border: 2px solid transparent; transition: transform .15s var(--ease), border-color .15s; }
.ctpl:not([style*="background-image"]) { background: linear-gradient(135deg, var(--ctpl-c, #7c5cff), color-mix(in srgb, var(--ctpl-c, #7c5cff) 40%, #0a0a11)); }
.ctpl::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 25%, rgba(0, 0, 0, .7)); }
.ctpl > * { position: relative; }
.ctpl b { font-size: 13px; line-height: 1.15; text-shadow: 0 1px 6px rgba(0, 0, 0, .6); }
.ctpl:hover { transform: translateY(-2px); }
.ctpl.sel { border-color: #fff; box-shadow: 0 0 0 3px var(--accent); }
.ctpl-tag { position: absolute; top: 7px; left: 8px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; background: rgba(0, 0, 0, .45); }
.ctpl-emoji { position: absolute; top: 6px; right: 8px; font-size: 26px; }
/* „Server erstellen“: großes Namensfeld oben, darunter Symbole/Farben in einer Zeile, Vorlagen als kleine Kacheln */
.modal.srv-new { width: min(640px, 100%); }
.srv-new-head { display: grid; grid-template-columns: 76px 1fr; gap: 14px; align-items: end; }
.srv-new-head .field { margin: 0; }
.srv-new-icon { position: relative; width: 76px; height: 76px; border-radius: 24px; display: grid; place-items: center; font-size: 36px; color: #fff; overflow: visible; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); transition: transform .15s var(--ease); }
.srv-new-icon:hover { transform: scale(1.04); }
.srv-new-icon > img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.srv-new-cam { position: absolute; right: -4px; bottom: -4px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--bg4); color: var(--text); box-shadow: 0 0 0 3px var(--bg2); font-style: normal; }
.srv-name-in { width: 100%; height: 54px; padding: 0 16px; font-size: 18px; font-weight: 600; border-radius: 14px; }
.srv-new-style { display: flex; align-items: center; gap: 14px; margin: 14px 0 6px; min-width: 0; }
.srv-new-emojis { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1 1 auto; min-width: 0; padding: 2px; }
.srv-new-emojis::-webkit-scrollbar { display: none; }
.srv-new-emojis button { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px; font-size: 19px; background: var(--bg3); display: grid; place-items: center; }
.srv-new-emojis button.sel { background: var(--bg4); box-shadow: 0 0 0 2px var(--text); }
.srv-new-colors { display: flex; gap: 6px; flex: 0 0 auto; }
.srv-new-colors button { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); }
.srv-new-colors button.sel { box-shadow: 0 0 0 2px var(--bg2), 0 0 0 4px var(--text); }
.srv-new-label { margin: 10px 0 8px; }
.tpl-grid.tpl-compact { grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 8px; margin-bottom: 4px; }
.tpl-compact .tpl-card { border-radius: 14px; border-width: 2px; }
.tpl-compact .tpl-card:hover { transform: translateY(-2px); }
.tpl-compact .tpl-img { height: 78px; }
.tpl-compact .tpl-img::after { background: linear-gradient(180deg, rgba(0, 0, 0, .05) 20%, rgba(0, 0, 0, .78)); }
.tpl-compact .tpl-emoji { left: 8px; bottom: 8px; width: 30px; height: 30px; border-radius: 9px; font-size: 16px; box-shadow: none; }
.tpl-compact .tpl-img > b { position: absolute; left: 46px; right: 8px; bottom: 13px; z-index: 2; font-size: 14px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.tpl-check { position: absolute; top: 7px; right: 7px; z-index: 2; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--tpl-c, var(--accent)); color: #fff; }
.tpl-line { display: block; padding: 7px 10px 8px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 560px) {
  .tpl-grid.tpl-compact { grid-template-columns: 1fr 1fr; }
  .tpl-compact .tpl-img { height: 64px; }
  .srv-new-head { grid-template-columns: 64px 1fr; gap: 12px; }
  .srv-new-icon { width: 64px; height: 64px; border-radius: 20px; font-size: 30px; }
  .srv-new-style { flex-direction: column; align-items: stretch; gap: 10px; }
  .srv-new-colors { justify-content: space-between; }
  .srv-new-colors button { width: 26px; height: 26px; }
}
/* Windows-App: Hinweis auf ein neues Programm (Installer) */
.desk-upd { position: fixed; right: 18px; bottom: 18px; z-index: 150; width: min(420px, calc(100vw - 36px)); display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--bg3); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); animation: pop .25s; }
.desk-upd > img { width: 36px; height: 36px; flex: none; }
.desk-upd b { display: block; margin-bottom: 2px; }
.desk-upd-btns { display: flex; flex-direction: column; gap: 6px; flex: none; }
.desk-upd-inline { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--bg4); }
.desk-upd-inline > span { flex: 1; }
.tpl-card { align-items: stretch; }
.tpl-card > .tpl-img, .tpl-card > .tpl-body { align-self: stretch; width: 100%; }

/* ---------- Kategorien und private Kanäle (wie bei Discord) ---------- */
.icon.xs { width: 11px; height: 11px; }
.side-section.cat { cursor: pointer; user-select: none; -webkit-user-select: none; }
.side-section.cat:hover { color: var(--text2); }
.side-section.cat .cat-name { display: flex; align-items: center; gap: 3px; min-width: 0; flex: 1; }
.side-section.cat .cat-name .icon { flex: none; transition: transform .15s; }
.side-section.cat.shut .cat-name .icon { transform: rotate(-90deg); }
[dir=rtl] .side-section.cat.shut .cat-name .icon { transform: rotate(90deg); }
.side-section.cat.unread { color: var(--text); }
.side-section.cat.drop-into { background: color-mix(in srgb, var(--accent, #7c5cff) 22%, transparent); border-radius: 8px; color: var(--text); }
.ch .ch-ic { position: relative; display: inline-grid; place-items: center; flex: none; }
.ch .ch-ic.priv > .icon.xs { position: absolute; right: -5px; bottom: -4px; background: var(--bg2); border-radius: 50%; padding: 1px; width: 12px; height: 12px; }
.ch.dragging { opacity: .4; }
.ch.drop-before { box-shadow: inset 0 2px 0 var(--accent, #7c5cff); }
/* Einstellungen: Kanäle nach Kategorie */
.set-cat { display: flex; align-items: center; gap: 8px; margin: 18px 0 6px; padding: 8px 10px; border-radius: 10px; background: var(--bg3); }
.set-cat b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: uppercase; font-size: 12px; letter-spacing: .06em; }
.set-cat .btn { flex: none; }
.priv-box { border: 1px solid var(--line, rgba(255,255,255,.08)); border-radius: 12px; padding: 12px; margin: 10px 0; }
.priv-box .check { margin: 0 0 8px; }
.acc-list { max-height: 220px; overflow: auto; display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.acc-list .check { align-items: center; margin: 0; padding: 4px 6px; border-radius: 8px; }
.acc-list .check:hover { background: var(--bg3); }
.acc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
@media (max-width: 560px) {
  .set-cat { flex-wrap: wrap; }
  .set-cat b { flex: 1 1 calc(100% - 30px); }
  .set-cat .btn:last-child { margin-inline-start: auto; }
}

/* ---------- Personenlimit und Server-Stummschaltung ---------- */
.ch .ch-limit { flex: none; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 6px; background: var(--bg4); color: var(--muted); font-variant-numeric: tabular-nums; }
.ch .ch-limit.full { background: color-mix(in srgb, var(--danger) 22%, transparent); color: var(--danger); }
.forced, .icon.forced, .forced .icon { color: var(--danger) !important; }
.ibtn.forced { background: color-mix(in srgb, var(--danger) 18%, transparent); }

/* ---------- Eigene Rollen ---------- */
.role-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.role-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 3px 9px; border-radius: 8px; background: var(--bg4); font-size: 12px; font-weight: 600; color: var(--text2); line-height: 1.4; }
.role-chip.add { padding: 3px 6px; color: var(--muted); cursor: pointer; border: 0; }
.role-chip.add:hover { color: var(--text); background: var(--bg3); }
.role-chip.pick { cursor: pointer; border: 1px solid transparent; }
.role-chip.pick input { display: none; }
.role-chip.pick.on { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.role-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.role-dot.big { width: 14px; height: 14px; }
.role-card summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.role-card summary::-webkit-details-marker { display: none; }
.role-card summary .pill { flex: none; }
.role-card summary > .small { display: inline-flex; align-items: center; gap: 2px; flex: none; }
.role-pick { align-items: center; margin: 0; padding: 6px 8px; border-radius: 8px; }
.role-pick:hover { background: var(--bg3); }
.role-pick.off { opacity: .5; }
.colors .nocolor { display: grid; place-items: center; color: var(--muted); background: var(--bg4); font-size: 14px; }
.colors input[type=color] { width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.acc-roles { margin: 4px 0 8px; }
/* Profilkarte: breite Knöpfe („Anfrage annehmen“) brechen in die nächste Zeile um, statt sich zu überlappen */
.btn.grow { flex: 1 1 auto; min-width: max-content; }

/* ---------- @Rollen ---------- */
.mention.role { color: var(--rc, var(--accent)); background: color-mix(in srgb, var(--rc, var(--accent)) 18%, transparent); cursor: default; }
.ac.ac-role b { flex: none; }
.m-body .mention.all { color: var(--warn); background: color-mix(in srgb, var(--warn) 18%, transparent); cursor: default; }

/* Avatar-Editor: Kategorien der Figuren */
.av-cats { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.av-cats .chip { display: inline-flex; align-items: center; gap: 6px; }
.av-cat-n { font-size: 11px; opacity: .65; }

/* 3D-Grafik verloren: Hinweis mit „Neu starten“ */
.r3-lost { position: absolute; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px; background: color-mix(in srgb, var(--bg1) 96%, transparent); text-align: center; }
.r3-lost > div { max-width: 360px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.r3-lost p { margin: 0; color: var(--muted); }

/* Eingebettet in die iPhone-App (html.embed, app.js): keine eigenen Leisten, die App hat ihre eigenen */
.embed .rail, .embed .side, .embed .mnav, .embed-solo .settings-nav { display: none !important; }
.embed-do #app { visibility: hidden; }
.embed #app .main { display: flex; }


/* ---------- iPhone-App (html.embed): kompakt, damit vom 3D-Raum möglichst viel zu sehen ist ---------- */
.embed .main-head { height: 46px; padding: 0 6px 0 2px; gap: 2px; }
.embed .main-head .title { font-size: 15px; }
.embed .main-head .ibtn { width: 38px; height: 38px; }
.embed .back-btn.embed-back { width: auto; display: inline-flex; align-items: center; gap: 2px; padding: 0 10px 0 4px; color: var(--accent); font-weight: 800; font-size: 15px; border-radius: 12px; }
.embed .back-btn.embed-back .icon { color: var(--accent); }
.embed .back-btn.embed-back:active { background: var(--accent-soft, rgba(124, 92, 255, .14)); }
/* Raumname steht schon oben im Kopf */
.embed .room3d .r3-top { display: none; }
.embed .r3-helpbtn { top: 8px; right: 8px; width: 36px; height: 36px; font-size: 15px; border-radius: 12px; }
.embed .stage:has(> .room3d) .stage-bar { padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); gap: 8px; }
.embed .stage:has(> .room3d) .stage-bar .cbtn { width: 46px; height: 46px; border-radius: 15px; }
.embed .stage:has(> .room3d) .stage-bar .cbtn.hang { width: 58px; }
.embed .r3-joy { width: 104px; height: 104px; left: 14px; bottom: 68px; }
.embed .r3-joy i { width: 46px; height: 46px; margin: -23px; }
.embed .r3-jump { width: 52px; height: 52px; right: 16px; bottom: 72px; }
.embed .r3-crouch { width: 42px; height: 42px; right: 78px; bottom: 77px; }
.embed .r3-dock { bottom: 8px; padding: 4px; gap: 2px; border-radius: 16px; }
.embed .r3-dock .r3-btn { width: 40px; height: 40px; font-size: 19px; border-radius: 12px; }
.embed .r3-hint { bottom: 62px; }
.embed .r3-pop { bottom: 60px; }

/* Hilfe „?“: nie größer als der Raum, scrollt selbst, mit Schließen-Knopf */
.r3-help { max-height: calc(100% - 80px); overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.r3-help-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.r3-help-x { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: rgba(255, 255, 255, .1); }
@media (max-width: 820px) {
  .r3-help { left: 8px; right: 8px; top: 52px; width: auto; max-height: calc(100% - 140px); padding: 12px 14px; }
  .r3-help.touch kbd { white-space: nowrap; }
}

/* Chat im 3D-Raum (Handy): durchsichtig mit Unschärfe, damit der Raum durchscheint */
@media (max-width: 820px), (pointer: coarse) and (max-height: 520px) {
  .side-chat.in3d.force { height: min(42%, 400px); background: rgba(14, 14, 24, .46); -webkit-backdrop-filter: blur(22px) saturate(1.4); backdrop-filter: blur(22px) saturate(1.4); border-top: 1px solid rgba(255, 255, 255, .12); }
  .side-chat.in3d.force .side-chat-head { background: transparent; border-bottom-color: rgba(255, 255, 255, .08); }
  .side-chat.in3d.force .composer, .side-chat.in3d.force .composer-wrap { background: transparent; }
  .side-chat.in3d.force .chan-start { display: none; }
  .side-chat.in3d.force .composer-box { background: rgba(255, 255, 255, .08); }
}

/* Chat im 3D-Raum offen: Leiste des Raums ausblenden, Chat endet über der Anruf-Leiste (die bleibt bedienbar) */
@media (max-width: 820px) and (orientation: portrait) {
  .room3d.chat-open .r3-dock, .room3d.chat-open .r3-hint, .room3d.chat-open .r3-help { visibility: hidden; }
  .side-chat.in3d.force { background: linear-gradient(rgba(14, 14, 24, .38), rgba(14, 14, 24, .78)); }
  .embed .side-chat.in3d.force { bottom: 58px; border-radius: 20px; left: 6px; right: 6px; border: 1px solid rgba(255, 255, 255, .12); }
}

/* iPhone-App: Server-Einstellungen und andere große Dialoge füllen den Bildschirm (kein Web-Fenster mit Rand) */
.embed .backdrop:has(> .modal.full) { padding: 0; }
.embed .modal.full { width: 100%; height: 100% !important; max-height: none; border-radius: 0; border: 0; }
.embed .modal.full .modal-head { padding-top: 10px; }
/* iPhone-App, Anruf aus einer Direktnachricht: nur der Anruf, den Chat hat die App selbst */
.embed .embed-call .main-col > :not(.call-banner) { display: none !important; }
.embed .embed-call .main-col { justify-content: center; }
.embed .embed-call .call-banner { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.embed .embed-call .call-start { flex-direction: column; gap: 14px; font-size: 17px; font-weight: 700; }
.embed .embed-call .call-start .btn { min-width: 220px; justify-content: center; }
.embed .embed-call .members { display: none !important; }

.embed .embed-call .main-col { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.embed .embed-call .call-banner { flex: 1; min-height: 0; max-height: none !important; height: auto !important; border-radius: 0; background: radial-gradient(90% 60% at 50% 40%, #2a2260, #0b0b14 78%) !important; }

/* ---------- iPhone-App, Runde 3 ---------- */
/* 3D-Chat beim Tippen: Die Tastatur macht die sichtbare Fläche niedrig – dann griff die Regel für „Handy quer“ und der Chat
   wurde zum schmalen Streifen in der Ecke. Mit offener Tastatur füllt der Chat einfach die ganze sichtbare Fläche. */
@media (pointer: coarse) {
  .kb-open .side-chat.in3d.force { top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important; width: auto !important; height: auto !important; border-radius: 0 !important; border: 0 !important; background: rgba(12, 12, 22, .9) !important; }
  .kb-open .room3d.chat-open .r3-joy, .kb-open .room3d.chat-open .r3-jump, .kb-open .room3d.chat-open .r3-crouch, .kb-open .room3d.chat-open .r3-dock { visibility: hidden; }
}

/* Anruf-Ansicht (Direktnachricht): Kopf-Knöpfe wie die Knöpfe der App (runde Flächen, Akzentfarbe statt Weiß) */
.embed .embed-call .main-head .ibtn:not(.back-btn) { width: 36px; height: 36px; border-radius: 18px; background: rgba(255, 255, 255, .07); color: var(--accent); }
.embed .embed-call .main-head .ibtn:not(.back-btn):active { background: var(--accent-soft); }
/* angehefteten Nachrichten gibt es in der App selbst */
.embed .embed-call .main-head .pin-btn { display: none; }
/* Im Anruf: Kacheln füllen die Fläche, Kamerabilder ganz */
.embed .embed-call .call-banner .stage-grid { flex: 1; min-height: 0; }
.embed .embed-call .call-banner .tile video { object-fit: cover; }
.embed .embed-call .call-banner .tile { cursor: pointer; }
.embed .embed-call .call-banner .stage-bar { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }

/* Vollbild in der App (Kamera oder Bildschirm): Zoomen per Finger, kein System-Vollbild */
.screen-full.sf-app { touch-action: none; }
.screen-full.sf-app video { transition: transform .08s linear; will-change: transform; }

@media (pointer: coarse) { .kb-open .main-body:has(.side-chat.in3d.force) .stage-bar { visibility: hidden; } }

/* ---------- Profil-Design wie Discord Nitro (.pt = Profilfarben der Person: --p1 Akzent, --p2 Banner-Farbe) ---------- */
.pt { --pt-base: #0c0b15; --pt-top: color-mix(in srgb, var(--p1) 38%, var(--pt-base)); --pt-bot: color-mix(in srgb, var(--p2) 26%, var(--pt-base));
  background: linear-gradient(175deg, var(--pt-top), var(--pt-bot)) padding-box, linear-gradient(140deg, var(--p1), var(--p2)) border-box !important;
  border: 2px solid transparent !important; color: #f2f2f8; }
:root[data-theme="light"] .pt { --pt-base: #ffffff; color: var(--text); }
.pt .muted, .pt .handle, .pt .ph-handle, .pt .acc-handle { color: color-mix(in srgb, currentColor 62%, transparent) !important; }
.pt-panel, .pt .pcard-body, .acc-panel { background: color-mix(in srgb, var(--pt-base) 58%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, .07); border-radius: 14px; }
:root[data-theme="light"] .pt-panel, :root[data-theme="light"] .pt .pcard-body, :root[data-theme="light"] .acc-panel { border-color: rgba(0, 0, 0, .06); }
.pt-panel { padding: 12px 14px; }
.pt-panel h4, .pt .pcard-body .sec h4 { margin: 0 0 6px; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .7; }
.pt .bio { white-space: pre-wrap; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.pt-since { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.pt-since img { width: 18px; height: 18px; }
.pt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pt-chips > * { font-size: 12.5px; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--pt-base) 50%, transparent); border: 1px solid rgba(255, 255, 255, .08); color: inherit; }
.pt-chips b { font-weight: 800; }
.pt-chips button:hover { background: color-mix(in srgb, var(--p1) 30%, transparent); }
/* Status-Sprechblase neben dem Bild */
.pcard-status { position: absolute; left: 124px; top: 10px; max-width: calc(100% - 140px); padding: 7px 12px; border-radius: 14px; font-size: 13px; line-height: 1.3; background: color-mix(in srgb, var(--pt-base) 70%, transparent); border: 1px solid rgba(255, 255, 255, .1); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pcard-status::before { content: ''; position: absolute; left: -6px; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: inherit; border: inherit; }
.pcard-status.hidden { display: none; }
/* Profilkarte */
.pcard.pt { width: 360px; border-radius: 20px; overflow: hidden; padding-bottom: 2px; }
.pcard.pt .pcard-banner { height: 124px; border-radius: 18px 18px 0 0; }
.pcard.pt .pcard-top { height: 58px; }
.pcard.pt .pcard-top .av { left: 16px; top: -50px; border: 6px solid var(--pt-top); background: var(--pt-top); --b: 6px; }
.pcard.pt .pcard-top .badges { top: auto; bottom: 4px; right: 14px; background: color-mix(in srgb, var(--pt-base) 60%, transparent); border: 1px solid rgba(255, 255, 255, .08); padding: 4px 8px; border-radius: 10px; }
.pcard.pt .pcard-top .badges:empty { display: none; }
.pcard.pt .pcard-body { margin: 6px 12px 12px; padding: 14px; gap: 12px; }
.pcard.pt .pcard-body .name { font-size: 22px; font-weight: 800; }
.pcard.pt .pcard-body .sec { border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 10px; }
.pcard-actions .btn.secondary { background: rgba(255, 255, 255, .08); }
.pcard-msg { width: 100%; height: 40px; padding: 0 12px; border-radius: 10px; font-size: 14px; background: color-mix(in srgb, var(--pt-base) 70%, transparent); border: 1px solid rgba(255, 255, 255, .1); color: inherit; }
.pcard-msg:focus { outline: none; border-color: var(--p1); box-shadow: 0 0 0 3px color-mix(in srgb, var(--p1) 30%, transparent); }
/* Profilseite */
.profile-hero.pt { border-radius: 22px; overflow: hidden; padding-bottom: 18px; }
.profile-hero.pt .ph-banner { height: 220px; }
.profile-hero.pt .ph-row { position: relative; margin-top: -70px; padding: 0 22px; align-items: flex-end; flex-wrap: nowrap; min-height: 76px; }
.profile-hero.pt .ph-row .av { border: 7px solid var(--pt-top); background: var(--pt-top); --b: 7px; flex: none; }
.profile-hero.pt .ph-status { position: relative; left: auto; top: auto; align-self: flex-end; margin: 0 0 14px 6px; max-width: 280px; }
.profile-hero.pt .ph-actions { flex-wrap: wrap; justify-content: flex-end; padding-bottom: 4px; }
.profile-hero.pt .ph-actions .btn.secondary { background: rgba(255, 255, 255, .1); }
.ph-who { padding: 12px 24px 0; }
.profile-hero.pt .ph-name { font-size: 30px; font-weight: 900; line-height: 1.1; }
.ph-handle { margin-top: 3px; font-size: 15px; }
.ph-chips { padding: 12px 24px 0; }
.ph-panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; padding: 14px 20px 0; }
.ph-servers { display: flex; flex-wrap: wrap; gap: 6px; }
.pt-chip-srv { font-size: 12.5px; padding: 3px 9px; border-radius: 8px; background: rgba(255, 255, 255, .08); }
@media (max-width: 640px) {
  .profile-hero.pt .ph-banner { height: 150px; }
  .profile-hero.pt .ph-row { margin-top: -54px; padding: 0 14px; flex-wrap: wrap; }
  .profile-hero.pt .ph-row .av { --s: 104px !important; width: 104px !important; height: 104px !important; }
  .profile-hero.pt .ph-status { display: none; }
  .profile-hero.pt .ph-actions { width: 100%; justify-content: flex-start; padding-top: 10px; }
  .ph-who, .ph-chips { padding-left: 16px; padding-right: 16px; }
  .profile-hero.pt .ph-name { font-size: 25px; }
  .ph-panels { padding: 12px 12px 0; }
}
/* Mein Konto */
.acc-card { border-radius: 20px; overflow: hidden; padding-bottom: 14px; }
.acc-banner { height: 104px; background-size: cover; background-position: center; }
.acc-head { display: flex; align-items: flex-end; gap: 14px; padding: 0 18px; margin-top: -44px; flex-wrap: wrap; }
.acc-head .av { border: 6px solid var(--pt-top); background: var(--pt-top); --b: 6px; flex: none; }
.acc-who { min-width: 140px; padding-bottom: 6px; }
.acc-name { font-size: 22px; font-weight: 800; line-height: 1.15; }
.acc-head .btn { margin-bottom: 8px; }
.acc-card .acc-panel { margin: 16px 14px 0; }
.acc-panel { padding: 4px 16px; }
.acc-panel.solo { background: var(--bg3); -webkit-backdrop-filter: none; backdrop-filter: none; border-color: var(--line); }
.acc-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.acc-row + .acc-row { border-top: 1px solid rgba(255, 255, 255, .07); }
.acc-label { font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .65; margin-bottom: 2px; }
.acc-val { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-lock { opacity: .55; padding: 6px; }
.acc-card .btn.secondary { background: rgba(255, 255, 255, .1); }
.pcard-actions { flex-wrap: nowrap !important; gap: 6px; }
.pcard-actions > .btn { flex: 1 1 auto; min-width: 0; }
.pcard-actions > .ibtn { flex: none; }
.acc-head { margin-top: -38px; }
.acc-who { padding-bottom: 2px; align-self: flex-end; }
@media (max-width: 560px) { .pcard.pt { width: 100%; } .pcard.pt .pcard-banner { border-radius: 16px 16px 0 0; } }
/* Bildschirm teilen: Qualität wählen */
.q-modal { width: min(440px, 100%); }
.q-seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px; margin-top: 6px; }
.q-opt { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: 12px; background: var(--bg3); border: 2px solid transparent; transition: border-color .15s, background .15s; }
.q-opt b { font-size: 16px; }
.q-opt span { font-size: 11.5px; color: var(--muted); }
.q-opt:hover { background: var(--bg4); }
.q-opt.sel { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--bg3)); }
.q-note { margin: 12px 0 0; }
/* E-Mail: Anmeldung mit Code, Passwort vergessen */
.mail-row { gap: 8px; }
.mail-row input { flex: 1; min-width: 0; }
.mail-row .btn { flex: none; }
.code-in { letter-spacing: 6px; font-size: 20px; font-weight: 700; text-align: center; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font-size: 13px; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.link-btn.forgot { display: block; margin: 8px 0 0 auto; }

/* Anruf in Direktnachrichten: Mit Kamera oder geteiltem Bildschirm bekommt der Anruf den größten Teil der Spalte,
   die Kacheln wachsen mit; „Groß anzeigen“ blendet den Chat ganz aus. Ein geteilter Bildschirm steht groß in der Mitte. */
.call-banner { flex: none; }
.call-banner.has-video { height: 70%; min-height: 340px; max-height: none; }
.call-banner.big { flex: 1 1 auto; height: auto; min-height: 0; }
.main-col:has(> .call-banner.big) > :not(.call-banner) { display: none !important; }
.call-banner.has-video .stage-grid { flex: 1; min-height: 0; grid-auto-rows: minmax(0, 1fr); align-content: stretch; }
.call-banner.has-video .stage-grid.focus { grid-template-rows: minmax(0, 1fr) auto; }
.call-banner.has-video .stage-grid .tile { min-height: 0; }
.call-banner .stage-strip { padding: 0 0 2px; }
.call-banner .stage-strip .tile { width: 132px; min-height: 74px; height: 74px; }
.call-banner .stage-bar { padding: 8px 14px 4px; }
.call-banner:not(.has-video) .call-size { display: none; }
.embed .embed-call .call-size { display: none; }
@media (max-width: 700px) { .call-banner.has-video { height: 58%; min-height: 260px; } }
.stage-strip .tile .av { transform: scale(.48); }

/* Eigener geteilter Bildschirm groß: Hinweis statt Bild (sonst zeigt er sich selbst endlos) */
.tile .own-share { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; color: #ddd; padding: 16px; }
.tile .own-share b { font-size: 16px; color: #fff; }
.tile .own-share span { font-size: 13px; color: #aaa; }
.tile .own-share .btn { margin-top: 6px; }

/* „Zurück zum Raum“: grüne Leiste oben, solange man im Sprachraum/Anruf ist, aber gerade etwas anderes anschaut */
.main > .call-back { flex: none; display: flex; align-items: center; gap: 8px; width: 100%; min-height: 36px; padding: 6px 14px; background: var(--ok); color: #04140a; font-size: 13.5px; text-align: left; border: 0; cursor: pointer; }
.main > .call-back:hover { filter: brightness(1.08); }
.main > .call-back > .ellipsis { flex: 1; min-width: 0; }
.main > .call-back .cb-go { display: inline-flex; align-items: center; gap: 2px; font-weight: 800; white-space: nowrap; }
.main > .call-back .cb-go svg { transform: rotate(-90deg); }

/* iPhone-App: Anruf wird verbunden (statt „Sprachanruf starten / Videoanruf starten“) */
.call-banner .call-connecting { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 240px; color: var(--muted); font-size: 15px; }
.call-banner .call-connecting .btn-spin { width: 28px; height: 28px; border-width: 3px; }

/* Leiste unten: Mikrofon/Kopfhörer + kleiner Pfeil für die Geräte-Auswahl (wie bei Discord) */
.me-row .dev-pair { display: inline-flex; align-items: center; border-radius: 8px; }
.me-row .dev-pair:hover { background: var(--hover, rgba(255, 255, 255, .06)); }
.me-row .dev-pair .ibtn { width: 30px; }
.me-row .dev-more { width: 16px; height: 32px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); border-radius: 6px; }
.me-row .dev-more:hover { color: var(--text); }
.me-row .dev-more svg { width: 12px; height: 12px; }

/* ---------- iPhone-App: Anruf wie bei Discord (im ToLobby-Stil) ---------- */
.embed .embed-call .main-head.call-head { border: 0; box-shadow: none; background: transparent; padding: 6px 12px; gap: 8px; height: auto; min-height: 56px; }
.embed .embed-call .call-head .ch-min, .embed .embed-call .call-head .ch-chat { width: 42px; height: 42px; border-radius: 13px; background: rgba(255, 255, 255, .08); color: #fff; }
.embed .embed-call .call-head .ch-mid { display: flex; min-width: 0; }
.embed .embed-call .call-head .ch-name { display: inline-flex; align-items: center; gap: 4px; height: 42px; max-width: 100%; padding: 0 12px 0 16px; border-radius: 13px; background: rgba(255, 255, 255, .08); color: #fff; font-weight: 800; font-size: 16px; }
.embed .embed-call .call-head .ch-name svg { transform: rotate(-90deg); width: 16px; height: 16px; opacity: .8; }
/* Kacheln groß untereinander, Name unten in der Mitte, Rand wenn jemand spricht */
.embed .embed-call .call-banner .stage-grid:not(.focus) { grid-template-columns: 1fr !important; grid-auto-rows: minmax(0, 1fr); gap: 12px; padding: 6px 12px; align-content: stretch; }
.embed .embed-call .call-banner .tile { border-radius: 22px; min-height: 0; border-width: 3px; }
.embed .embed-call .call-banner .tile.speaking { border-color: var(--ok); }
.embed .embed-call .call-banner .tile .t-name { left: 50%; transform: translateX(-50%); bottom: 14px; border-radius: 11px; padding: 6px 14px; font-size: 15px; background: rgba(0, 0, 0, .55); }
.embed .embed-call .call-banner .tile .av { transform: scale(1.25); }
/* Knöpfe unten in einer runden Fläche, Auflegen breit und rot */
.embed .embed-call .call-banner .stage-bar { position: relative; flex-wrap: nowrap; justify-content: space-around; gap: 4px; margin: 8px 12px calc(10px + env(safe-area-inset-bottom)); padding: 18px 10px 12px; border-radius: 24px; background: var(--bg1, #11121b); border: 1px solid var(--line); }
.embed .embed-call .call-banner .stage-bar::before { content: ''; position: absolute; top: 7px; left: 50%; width: 38px; height: 4px; margin-left: -19px; border-radius: 2px; background: rgba(255, 255, 255, .2); }
.embed .embed-call .call-banner .stage-bar .cbtn { width: 54px; height: 54px; border-radius: 17px; background: transparent; }
.embed .embed-call .call-banner .stage-bar .cbtn.on { background: rgba(255, 255, 255, .1); }
.embed .embed-call .call-banner .stage-bar .cbtn.hang { width: 78px; background: var(--danger); color: #fff; }

/* ---------- Umfragen, Sprachnachrichten, Dateien (wie bei Discord) ---------- */
.poll { margin-top: 4px; max-width: 440px; padding: 12px; border-radius: 14px; background: var(--bg3, #1b1c2b); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.poll-q { font-weight: 800; font-size: 16px; }
.poll-opts { display: flex; flex-direction: column; gap: 6px; }
.poll-opt { position: relative; display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 12px; border-radius: 10px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); text-align: left; overflow: hidden; color: var(--text); }
.poll-opt:hover { border-color: var(--accent-line, rgba(132, 104, 255, .5)); }
.poll-opt.on { border-color: var(--accent); }
.poll-bar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent-soft, rgba(132, 104, 255, .2)); transition: width .3s; }
.poll-mark { position: relative; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--faint, #5c5f7a); display: grid; place-items: center; flex: none; }
.poll-opt.on .poll-mark { background: var(--accent); border-color: var(--accent); color: #fff; }
.poll-t, .poll-n { position: relative; }
.poll-n { font-weight: 700; color: var(--text2); font-size: 13px; }
.poll-edit { display: flex; flex-direction: column; gap: 6px; }
.vm { display: flex; align-items: center; gap: 10px; width: min(300px, 100%); padding: 8px 12px 8px 8px; border-radius: 22px; background: var(--bg3, #1b1c2b); border: 1px solid var(--line); margin-top: 4px; }
.vm-play { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.vm-track { flex: 1; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .14); position: relative; cursor: pointer; overflow: hidden; }
.vm-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent); }
.vm-time { font-size: 12.5px; color: var(--text2); font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }
.m-file { display: flex; align-items: center; gap: 10px; width: min(360px, 100%); padding: 10px 12px; border-radius: 12px; background: var(--bg3, #1b1c2b); border: 1px solid var(--line); color: var(--text); text-decoration: none; margin-top: 4px; }
.m-file:hover { border-color: var(--accent-line, rgba(132, 104, 255, .5)); }
.m-file .mf-ic { color: var(--accent); flex: none; }
.m-file .mf-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.m-file .mf-name { font-weight: 700; color: var(--info, #6cb6ff); }
.m-file .mf-dl { color: var(--muted); }
.m-file.m-audio { flex-direction: column; align-items: stretch; }
.m-file.m-audio audio { width: 100%; }
.m-video video { max-width: min(420px, 100%); max-height: 360px; border-radius: 12px; background: #000; margin-top: 4px; }
.ap.ap-file { width: 150px; }
.ap .ap-doc { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 100%; height: 100%; padding: 8px; color: var(--text2); font-size: 12px; text-align: center; }
.ap .ap-doc span { max-width: 100%; }
.rec-row { align-items: center; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: rec-blink 1s infinite; flex: none; }
@keyframes rec-blink { 50% { opacity: .3; } }
.rec-time { font-variant-numeric: tabular-nums; }

/* Sprache & Video: Empfindlichkeit (Balken = eigene Lautstärke, Regler = Schwelle) und Kamera-Test */
.sens-box { position: relative; height: 28px; display: flex; align-items: center; }
.sens-box input[type=range] { position: relative; width: 100%; z-index: 1; background: transparent; }
.sens-box .sens-lvl { position: absolute; left: 0; top: 9px; height: 10px; width: 0; border-radius: 5px; background: var(--warn); opacity: .55; transition: width .06s; }
.sens-box .sens-lvl.loud { background: var(--ok); }
.sens-box.off { opacity: .45; }
.cam-test { width: 100%; max-width: 420px; border-radius: 14px; background: #000; margin-top: 10px; transform: scaleX(-1); }

/* GIF-Auswahl und GIFs im Chat */
.gif-btn .gif-txt { font-size: 11px; font-weight: 900; letter-spacing: .5px; border: 2px solid currentColor; border-radius: 6px; padding: 1px 4px; line-height: 1.1; }
.gif-pop { width: min(420px, 92vw); padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.gif-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: max-content; gap: 6px; height: min(360px, 50vh); overflow-y: auto; align-content: start; }
.gif-item { border-radius: 10px; overflow: hidden; background: var(--bg3, #1b1c2b); aspect-ratio: 1; padding: 0; }
.gif-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gif-empty { grid-column: 1 / -1; text-align: center; padding: 30px 10px; }
.m-gif { display: block; max-width: min(300px, 100%); max-height: 300px; border-radius: 12px; margin-top: 4px; cursor: zoom-in; }

/* ---------- Spiel „Schattenduell“ (Spiel-Kanäle) ---------- */
.duel { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #07080f; touch-action: none; user-select: none; -webkit-user-select: none; outline: none; color: #fff; }
.duel > canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; }
.duel-top { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; pointer-events: none; z-index: 2; }
.duel-title { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 18px; border-radius: 16px; background: rgba(10, 12, 22, .66); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, .1); text-align: center; max-width: min(560px, 62vw); }
.duel-title b { font-size: 18px; letter-spacing: .02em; }
.duel-title span { font-size: 13px; color: rgba(255, 255, 255, .78); }
.duel-title.hot { border-color: rgba(255, 61, 90, .65); box-shadow: 0 0 26px rgba(255, 61, 90, .35); }
.duel-count { min-width: 62px; height: 62px; display: grid; place-items: center; font-size: 36px; font-weight: 900; border-radius: 50%; background: rgba(10, 12, 22, .72); border: 2px solid rgba(70, 200, 255, .75); font-variant-numeric: tabular-nums; }
.duel-count.last { border-color: #ff3d5a; color: #ff9aab; animation: duelPulse .5s ease-in-out infinite alternate; }
@keyframes duelPulse { to { transform: scale(1.12); } }
.duel-list { position: absolute; top: 12px; left: 12px; display: flex; flex-direction: column; gap: 5px; z-index: 2; pointer-events: none; max-width: 30%; }
.duel-pl { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px; background: rgba(10, 12, 22, .62); font-size: 13px; font-weight: 700; min-width: 0; }
.duel-pl i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 900; color: #0b0c14; background: rgba(255, 255, 255, .45); flex: none; }
.duel-pl span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.duel-pl em { font-style: normal; font-size: 11px; color: #ff8a96; margin-inline-start: auto; }
.duel-pl.me span { color: #9be3ff; }
.duel-pl.out { opacity: .55; }
.duel-pl.out span { text-decoration: line-through; }
.duel-pl.win { background: rgba(255, 190, 40, .35); }
.duel-bottom { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 2; width: min(520px, calc(100% - 24px)); display: flex; justify-content: center; }
.duel-card { width: 100%; padding: 16px 18px; border-radius: 20px; background: rgba(12, 14, 26, .8); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(255, 255, 255, .12); display: flex; flex-direction: column; gap: 8px; }
.duel-card ol { margin: 0; padding-inline-start: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; color: rgba(255, 255, 255, .86); }
.duel-card p { margin: 0; }
.duel-card .btn { align-self: stretch; justify-content: center; }
.duel-hint { padding: 6px 14px; border-radius: 999px; background: rgba(10, 12, 22, .62); font-size: 13px; color: rgba(255, 255, 255, .82); pointer-events: none; }
.duel-stick { position: absolute; width: 110px; height: 110px; margin: -55px 0 0 -55px; border-radius: 50%; background: rgba(255, 255, 255, .08); border: 2px solid rgba(255, 255, 255, .25); z-index: 2; pointer-events: none; }
.duel-stick i { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; border-radius: 50%; background: rgba(70, 200, 255, .55); transform: translate(-50%, -50%); }
.duel-bg { background: radial-gradient(circle at 50% 62%, rgba(255, 61, 90, .28) 0, rgba(70, 200, 255, .12) 28%, transparent 55%), radial-gradient(circle at 50% 50%, #161a33 0%, #07080f 70%); }
@media (max-width: 640px) {
  .duel-top { top: 8px; gap: 8px; }
  .duel-title { padding: 6px 12px; max-width: 70vw; }
  .duel-title b { font-size: 15px; }
  .duel-title span { font-size: 12px; }
  .duel-count { min-width: 46px; height: 46px; font-size: 26px; }
  .duel-list { top: auto; bottom: 10px; left: 8px; max-width: 46%; }
  .duel-bottom { bottom: 10px; }
  .duel-card ol { font-size: 12.5px; }
}
.duel-rules summary { cursor: pointer; font-weight: 800; list-style: none; display: flex; align-items: center; gap: 6px; }
.duel-rules summary::-webkit-details-marker { display: none; }
.duel-rules summary::after { content: '▾'; opacity: .6; transition: transform .15s; }
.duel-rules:not([open]) summary::after { transform: rotate(-90deg); }
.duel-rules ol { margin-top: 8px; }
.duel-rules p { margin-top: 8px; }
@media (max-width: 640px) {
  .duel-list { top: 70px; bottom: auto; left: 8px; right: 8px; max-width: none; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 4px; }
  .duel-pl { font-size: 12px; padding: 2px 8px 2px 2px; gap: 5px; }
  .duel-pl span { max-width: 80px; }
  .duel-pl i { width: 19px; height: 19px; font-size: 11px; }
  .duel-hint { font-size: 12px; }
}
@media (max-width: 640px) {
  .duel-list { top: 8px; }
  .duel-top { top: 40px; }
}
.call-ringing { text-align: center; color: #bbb; font-size: 13px; padding: 2px 8px; }
.call-ringing.on::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; margin-inline-end: 7px; vertical-align: 1px; animation: callRing 1s ease-in-out infinite alternate; }
@keyframes callRing { from { opacity: .25; transform: scale(.8); } to { opacity: 1; transform: scale(1.15); } }
/* iPhone-App: Doppeltippen zoomt nicht (verzögert auch keine Klicks) */
html.embed, html.embed body { touch-action: manipulation; }
html.embed .room3d, html.embed .duel { touch-action: none; }

/* 3D-Raum: Auswahl „Wen?“ für Emotes zu zweit (Ohrfeige, Kuss, Umarmung) */
.r3-pick { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 30; width: min(320px, calc(100% - 24px)); padding: 10px; border-radius: 18px; background: var(--glass, rgba(14, 14, 24, .82)); border: 1px solid var(--glass-line, rgba(255, 255, 255, .12)); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 18px 50px rgba(0, 0, 0, .45); color: #fff; display: flex; flex-direction: column; gap: 4px; animation: r3PickIn .16s ease-out; }
@keyframes r3PickIn { from { opacity: 0; transform: translate(-50%, 8px); } }
.r3-pick-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 6px; }
.r3-pick-head b { flex: 1; font-size: 14px; }
.r3-pick-emo { font-size: 20px; }
.r3-pick-x { width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .1); color: #fff; display: grid; place-items: center; cursor: pointer; }
.r3-pick-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 12px; border: 0; background: transparent; color: #fff; font: inherit; font-weight: 700; text-align: start; cursor: pointer; }
.r3-pick-row:hover, .r3-pick-row:focus-visible { background: rgba(255, 255, 255, .1); }
.r3-pick-row small { color: rgba(255, 255, 255, .6); font-weight: 600; font-size: 12px; }

/* ==================================================================================
   Mitspieler finden (public/js/match.js): Gamer-Profil, anonyme Karten, Likes, Matches
   ================================================================================== */
.mt-scroll { scroll-behavior: smooth; }
.mt-tabs { margin-bottom: 18px; position: sticky; top: 0; z-index: 6; padding: 8px; border-radius: 16px; background: color-mix(in srgb, var(--bg2) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); }
.mt-tabs .tab { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; }
.mt-tabs .count-pill { min-width: 18px; height: 18px; font-size: 10.5px; }
.mt-bolt { font-size: 15px; line-height: 1; filter: drop-shadow(0 0 6px rgba(255, 196, 46, .7)); }
.danger-text { color: var(--danger) !important; }

/* Begrüßung */
.mt-intro { max-width: 620px; margin: 4vh auto 0; text-align: center; padding: 34px 26px; border-radius: 26px; border: 1px solid var(--line); background:
  radial-gradient(520px 260px at 50% -10%, rgba(132, 104, 255, .28), transparent 70%), var(--bg2); box-shadow: var(--shadow); }
.mt-intro h1 { margin: 16px 0 6px; font-size: 28px; font-weight: 900; letter-spacing: -.02em; }
.mt-intro > p { margin: 0 auto 22px; max-width: 460px; font-size: 15.5px; }
.mt-intro-art { width: 86px; height: 86px; margin: 0 auto; border-radius: 28px; display: grid; place-items: center; color: #fff; background: var(--grad); box-shadow: 0 18px 40px -14px rgba(132, 104, 255, .95), inset 0 1px 0 rgba(255, 255, 255, .3); transform: rotate(-6deg); }
.mt-intro-art .icon { width: 44px; height: 44px; }
.mt-intro-art.small { width: 64px; height: 64px; border-radius: 22px; }
.mt-intro-art.small .icon { width: 32px; height: 32px; }
.mt-points { display: grid; gap: 10px; text-align: start; margin-bottom: 24px; }
.mt-point { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; background: var(--bg3); border: 1px solid var(--line); }
.mt-point-ic { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.mt-point b { font-weight: 800; }
.mt-point .muted { font-size: 13.5px; }
.mt-cta { padding: 13px 26px; font-size: 16px; border-radius: 14px; }

/* Stapel */
.mt-deck { display: grid; grid-template-columns: minmax(0, 440px) minmax(220px, 300px); gap: 26px; justify-content: center; align-items: start; }
.mt-col { min-width: 0; }
.mt-filters { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.mt-filter { width: 100%; height: 42px; border-radius: 12px; background: var(--bg3); border: 1px solid var(--line); padding: 0 12px; font-weight: 700; }
.mt-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.mt-stage { position: relative; min-height: 360px; touch-action: pan-y; }
.mt-top { position: relative; z-index: 2; cursor: grab; user-select: none; -webkit-user-select: none; will-change: transform; }
.mt-top:active { cursor: grabbing; }
.mt-under { position: absolute; inset: 0; z-index: 1; transform: translateY(12px) scale(.95); transform-origin: 50% 100%; opacity: .6; pointer-events: none; }
.mt-under .mt-card { height: 100%; }
.mt-under .mt-card > * { visibility: hidden; }
.mt-stamp { position: absolute; top: 26px; z-index: 6; padding: 6px 16px; border-radius: 12px; font-weight: 900; font-size: 22px; letter-spacing: .04em; text-transform: uppercase; border: 3px solid; opacity: 0; transition: opacity .12s; pointer-events: none; background: rgba(10, 10, 18, .55); backdrop-filter: blur(6px); }
.mt-stamp.yes { left: 22px; color: var(--ok); transform: rotate(-12deg); }
.mt-stamp.no { right: 22px; color: var(--danger); transform: rotate(12deg); }
.mt-top.yes .mt-stamp.yes, .mt-top.no .mt-stamp.no { opacity: 1; }
.mt-actions { display: flex; align-items: center; justify-content: center; gap: 16px; width: fit-content; margin: 18px auto 0; padding: 10px 18px; border-radius: 999px; position: relative; z-index: 7; background: color-mix(in srgb, var(--bg1) 78%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--line); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .9); }
.mt-actions:empty { display: none; }
.mt-btn { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--bg3); border: 1px solid var(--line); color: var(--text2); transition: transform .14s var(--ease), box-shadow .2s, background .2s, color .2s; box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .7); }
.mt-btn:hover:not(:disabled) { transform: translateY(-2px) scale(1.05); }
.mt-btn:active:not(:disabled) { transform: scale(.94); }
.mt-btn:disabled { opacity: .35; cursor: default; }
.mt-btn.small { width: 46px; height: 46px; }
.mt-btn.no { color: var(--danger); }
.mt-btn.no:hover { background: var(--danger); color: #fff; box-shadow: 0 14px 30px -12px rgba(255, 77, 94, .9); }
.mt-btn.yes { width: 72px; height: 72px; background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 16px 34px -12px rgba(132, 104, 255, .95), inset 0 1px 0 rgba(255, 255, 255, .28); }
.mt-btn.yes .icon { fill: rgba(255, 255, 255, .22); }
.mt-side { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 76px; }
.mt-side-card { padding: 14px; border-radius: 18px; background: var(--bg2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.mt-side-card.boost { background: linear-gradient(160deg, rgba(255, 196, 46, .12), transparent 60%), var(--bg2); }
.mt-side-card.boost.on { border-color: rgba(255, 196, 46, .5); box-shadow: 0 0 0 1px rgba(255, 196, 46, .2), 0 14px 34px -18px rgba(255, 196, 46, .7); }
.mt-side-card.warn { border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.mt-side-head { display: flex; align-items: center; gap: 8px; }
.mt-side-head b { font-weight: 800; }

/* Karte */
.mt-card-in { min-height: 0; overflow-y: auto; scrollbar-width: none; overscroll-behavior: contain; }
.mt-card-in::-webkit-scrollbar { display: none; }
.mt-top .mt-card { max-height: max(320px, calc(100dvh - 424px)); }
.mt-peek .mt-card { max-height: none; }
.mt-card { position: relative; display: flex; flex-direction: column; border-radius: 26px; overflow: hidden; background: var(--bg2); border: 1px solid var(--line); box-shadow: 0 26px 60px -26px rgba(0, 0, 0, .85), 0 0 0 1px color-mix(in srgb, var(--p1) 16%, transparent); }
.mt-banner { height: 150px; background-size: cover; background-position: center; position: relative; }
.mt-banner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .28) 0%, transparent 38%, transparent 62%, color-mix(in srgb, var(--bg2) 92%, transparent) 100%); pointer-events: none; }
.mt-badges { position: absolute; left: 12px; top: 12px; z-index: 5; display: flex; gap: 6px; flex-wrap: wrap; max-width: 62%; }
.mt-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; color: #fff; background: rgba(10, 10, 18, .58); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .14); }
.mt-pill.boost { background: linear-gradient(135deg, #ffb02e, #ff7a3d); border-color: transparent; color: #2a1500; }
.mt-pill.boost .mt-bolt { filter: none; font-size: 12px; }
.mt-pill.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(61, 220, 151, .25); }
.mt-pill.new { background: var(--grad); border-color: transparent; }
.mt-score { position: absolute; right: 54px; top: 12px; z-index: 5; display: inline-flex; align-items: baseline; gap: 5px; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; background: rgba(10, 10, 18, .58); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .14); }
.mt-score b { font-size: 14px; font-weight: 900; background: linear-gradient(135deg, #b9a8ff, #ff9cc2); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mt-score.sm { right: 8px; top: 8px; padding: 2px 8px; }
.mt-more { position: absolute; right: 12px; top: 10px; z-index: 6; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(10, 10, 18, .58); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .14); }
.mt-more:hover { background: rgba(10, 10, 18, .85); }
.mt-body { position: relative; z-index: 5; padding: 0 18px 20px; }
.mt-who { display: flex; align-items: flex-end; gap: 14px; margin-top: -40px; margin-bottom: 12px; }
.mt-who .av { border: 5px solid var(--bg2); border-radius: 50%; background: var(--bg2); }
.mt-who .av-img .icon { width: 38px; height: 38px; }
.mt-who h3 { margin: 0 0 6px; font-size: 20px; font-weight: 900; letter-spacing: -.01em; }
.mt-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.mt-tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--bg4); color: var(--text2); }
.mt-tag.soft { background: var(--accent-soft); color: color-mix(in srgb, var(--accent) 70%, var(--text)); }
.mt-about { margin: 0 0 4px; color: var(--text2); line-height: 1.5; overflow-wrap: anywhere; }
.mt-sec { display: flex; align-items: center; gap: 10px; margin: 16px 0 8px; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; color: var(--faint); }
.mt-legend { display: inline-flex; align-items: center; gap: 5px; text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--ok); margin-inline-start: auto; }
.mt-legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--ok); }
.mt-games { display: flex; flex-wrap: wrap; gap: 7px; }
.mt-games.tight { gap: 5px; margin: 6px 0 10px; }
.mt-game { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 4px; border-radius: 12px; background: var(--bg3); border: 1px solid var(--line); font-weight: 700; font-size: 13.5px; color: var(--text); max-width: 100%; }
.mt-game i { width: 26px; height: 26px; flex: none; border-radius: 8px; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 900; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.mt-game span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-game .icon { color: var(--ok); }
.mt-game.common { border-color: color-mix(in srgb, var(--ok) 55%, transparent); background: color-mix(in srgb, var(--ok) 12%, var(--bg3)); }
.mt-game.on { border-color: var(--accent); background: var(--accent-soft); }
.mt-game.on .icon { color: var(--muted); }
button.mt-game { cursor: pointer; transition: transform .12s, background .15s, border-color .15s; }
button.mt-game:hover { border-color: var(--accent); transform: translateY(-1px); }
.mt-games.tight .mt-game { font-size: 12.5px; padding: 3px 9px 3px 3px; }
.mt-games.tight .mt-game i { width: 22px; height: 22px; font-size: 10px; border-radius: 7px; }
.mt-catalog { max-height: 190px; overflow-y: auto; padding: 2px; }
.mt-row2 { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.mt-mini { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 8px; font-size: 12.5px; font-weight: 700; color: var(--text2); background: var(--bg3); }
.mt-mini.lang { color: var(--muted); }
.mt-mini .icon { width: 13px; height: 13px; }

/* Wochenraster */
.mt-grid { display: grid; grid-template-columns: auto repeat(7, minmax(0, 1fr)); gap: 5px; align-items: center; }
.mt-grid b { text-align: center; font-size: 11.5px; font-weight: 800; color: var(--muted); }
.mt-grid em { font-style: normal; font-size: 12.5px; font-weight: 700; color: var(--muted); padding-inline-end: 6px; white-space: nowrap; }
.mt-cell { display: block; height: 30px; border-radius: 9px; background: var(--bg3); border: 1px solid var(--line); }
.mt-cell.on { background: color-mix(in srgb, var(--accent) 62%, var(--bg3)); border-color: transparent; }
.mt-cell.both { background: var(--ok); box-shadow: 0 0 0 2px rgba(61, 220, 151, .22); }
.mt-grid.compact { gap: 4px; }
.mt-grid.compact .mt-cell { height: 16px; border-radius: 5px; }
.mt-grid.compact em { font-size: 11.5px; }
.mt-grid.edit .mt-cell { height: 38px; cursor: pointer; transition: transform .1s, background .15s; }
.mt-grid.edit .mt-cell:hover { border-color: var(--accent); }
.mt-grid.edit .mt-cell:active { transform: scale(.92); }
.mt-grid.edit .mt-cell.on { background: var(--grad); box-shadow: 0 6px 14px -8px rgba(132, 104, 255, .9); }

/* leere Seiten, Listen */
.mt-empty { text-align: center; padding: 38px 22px; border-radius: 26px; border: 1px dashed color-mix(in srgb, var(--accent) 35%, var(--line)); background: var(--bg2); }
.mt-empty.wide { max-width: 560px; margin: 4vh auto 0; }
.mt-empty h3 { margin: 14px 0 4px; font-size: 20px; font-weight: 900; }
.mt-empty p { margin: 0 auto 18px; max-width: 420px; }
.mt-lead { margin: 0 0 14px; }
.mt-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.mt-item { border-radius: 20px; overflow: hidden; background: var(--bg2); border: 1px solid var(--line); display: flex; flex-direction: column; }
.mt-item.fresh { border-color: color-mix(in srgb, var(--accent) 60%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent), 0 16px 34px -20px rgba(132, 104, 255, .8); }
.mt-item-top { position: relative; display: block; width: 100%; text-align: start; }
.mt-item-banner { height: 76px; background-size: cover; background-position: center; position: relative; }
.mt-item-top .av { position: absolute; left: 14px; bottom: -26px; border: 4px solid var(--bg2); border-radius: 50%; background: var(--bg2); }
.mt-item-body { padding: 32px 14px 14px; display: flex; flex-direction: column; flex: 1; }
.mt-item-body .row { margin-top: auto; }
.mt-item-body .btn { padding: 8px 10px; font-size: 13.5px; }
.mt-matches { display: flex; flex-direction: column; gap: 10px; max-width: 760px; margin: 0 auto; }
.mt-match { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 18px; background: var(--bg2); border: 1px solid var(--line); }
.mt-match.fresh { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.mt-match .mt-games.tight { margin: 6px 0 0; }
.mt-match-av { border-radius: 50%; flex: none; }

/* Profil bearbeiten */
.mt-edit { display: grid; grid-template-columns: minmax(0, 640px) minmax(260px, 380px); gap: 26px; justify-content: center; align-items: start; }
.mt-form { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.mt-form-hello h2 { margin: 0 0 2px; font-size: 24px; font-weight: 900; }
.mt-form-hello p { margin: 0; }
.mt-form-sec { padding: 18px; border-radius: 20px; background: var(--bg2); border: 1px solid var(--line); }
.mt-form-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.mt-form-head h3 { margin: 0; font-size: 17px; font-weight: 800; }
.mt-step { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 900; font-size: 13.5px; }
.mt-label { margin: 16px 0 8px; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; color: var(--faint); }
.mt-form-head + .mt-label { margin-top: 0; }
.mt-switch-row { display: flex; align-items: center; gap: 14px; padding: 12px 0 0; margin-top: 14px; border-top: 1px solid var(--line); cursor: pointer; }
.mt-form-sec > .mt-switch-row:first-of-type:nth-child(2) { border-top: 0; margin-top: 0; padding-top: 0; }
.mt-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; position: sticky; bottom: 0; padding: 12px; border-radius: 18px; background: color-mix(in srgb, var(--bg2) 90%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); z-index: 4; }
.mt-form textarea { width: 100%; resize: vertical; min-height: 84px; }
.mt-preview { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 10px; }

/* Match-Feier und Karten-Vorschau */
.modal.mt-party { text-align: center; overflow: hidden; max-width: 440px; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.mt-party .modal-body { position: relative; padding: 34px 26px 26px; }
.mt-party-glow { position: absolute; inset: -40% -20% auto; height: 300px; background: radial-gradient(closest-side, rgba(132, 104, 255, .5), rgba(255, 92, 154, .22) 55%, transparent); pointer-events: none; animation: mtGlow 3s ease-in-out infinite alternate; }
@keyframes mtGlow { from { transform: scale(.92); opacity: .7; } to { transform: scale(1.08); opacity: 1; } }
.mt-party-avs { position: relative; display: flex; align-items: center; justify-content: center; gap: 0; margin-bottom: 16px; }
.mt-party-avs .av { border: 5px solid var(--bg2); border-radius: 50%; background: var(--bg2); animation: mtPop .5s var(--ease) both; }
.mt-party-avs .av:first-child { transform-origin: 100% 50%; margin-inline-end: -14px; }
.mt-party-avs .av:last-child { margin-inline-start: -14px; animation-delay: .08s; }
.mt-party-pad { position: relative; z-index: 3; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: 0 12px 28px -8px rgba(132, 104, 255, .95), 0 0 0 5px var(--bg2); animation: mtPop .5s .16s var(--ease) both; }
@keyframes mtPop { from { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.1); } to { transform: scale(1); opacity: 1; } }
.mt-party h2 { position: relative; margin: 0 0 6px; font-size: 34px; font-weight: 900; letter-spacing: -.02em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mt-party p { position: relative; margin: 0 0 22px; color: var(--text2); }
.mt-party-btns { position: relative; display: flex; flex-direction: column; gap: 10px; }
.mt-party-btns .btn { padding: 13px; font-size: 15.5px; }
.modal.mt-peek { max-width: 460px; padding: 0; background: transparent; box-shadow: none; border: 0; }
.mt-peek .modal-body { padding: 0; max-height: min(74vh, 720px); overflow-y: auto; border-radius: 26px; }
.mt-peek .modal-foot { background: var(--bg2); border: 1px solid var(--line); border-radius: 18px; margin-top: 10px; padding: 10px 12px; align-items: center; }

@media (max-width: 980px) {
  .mt-deck, .mt-edit { grid-template-columns: minmax(0, 520px); }
  .mt-side, .mt-preview { position: static; }
  .mt-side { flex-direction: row; flex-wrap: wrap; }
  .mt-side-card { flex: 1 1 220px; }
  .mt-preview { order: -1; display: none; }
}
@media (max-width: 820px) {
  .mt-scroll .page-inner { padding: 10px 10px 90px; }
  .mt-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-bottom: 12px; padding: 6px; }
  .mt-tabs::-webkit-scrollbar { display: none; }
  .mt-tabs .tab { flex: none; padding: 7px 11px; font-size: 13.5px; }
  .mt-intro { margin-top: 8px; padding: 26px 16px; }
  .mt-intro h1 { font-size: 24px; }
  .mt-banner { height: 128px; }
  .mt-filters .mt-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -10px; padding: 0 10px; }
  .mt-filters .mt-chips::-webkit-scrollbar { display: none; }
  .mt-filters .chip { flex: none; }
  .mt-actions { gap: 12px; padding: 8px 14px; margin-top: 18px; }
  .mt-top .mt-card { max-height: max(300px, calc(100dvh - 448px)); }
  .mt-btn { width: 58px; height: 58px; }
  .mt-btn.yes { width: 66px; height: 66px; }
  .mt-btn.small { width: 42px; height: 42px; }
  .mt-list { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
  .mt-item-body .row { flex-direction: column; align-items: stretch; }
  .mt-match { flex-wrap: wrap; }
  .mt-grid.edit .mt-cell { height: 34px; }
  .mt-grid em { font-size: 11px; padding-inline-end: 2px; }
  .mt-form-sec { padding: 14px; }
  .mt-form-foot { bottom: 6px; }
}
@media (prefers-reduced-motion: reduce) { .mt-party-glow, .mt-party-avs .av, .mt-party-pad { animation: none; } .mt-top { transition: none !important; } }
/* ===== Ende Mitspieler finden ===== */
