/* SharedCue – Design-Tokens aus dem Stitch-Entwurf (DESIGN.md) */
/* Schriften lokal eingebunden (keine Verbindung zu Google Fonts, DSGVO-freundlich) */
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-display: swap; font-weight: 200 800; src: url(fonts/plus-jakarta-sans-latin-wght-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-display: swap; font-weight: 200 800; src: url(fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, 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: "Space Grotesk"; font-style: normal; font-display: swap; font-weight: 500; src: url(fonts/space-grotesk-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-display: swap; font-weight: 600; src: url(fonts/space-grotesk-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-display: swap; font-weight: 700; src: url(fonts/space-grotesk-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Material Symbols Outlined"; font-style: normal; font-display: block; font-weight: 100 700; src: url(fonts/material-symbols-subset.woff2?v=19) format("woff2"); }
:root {
  --bg: #0b0f19;
  --surface: #0f131d;
  --c-lowest: #0a0e18;
  --c-low: #171b26;
  --c: #1c1f2a;
  --c-high: #262a35;
  --c-highest: #313540;
  --c-bright: #353944;
  --text: #f9fafb;
  --text-2: #dfe2f1;
  --muted: #94a3b8;
  --muted-2: #bcc9cd;
  --outline: #869397;
  --primary: #4cd7f6;
  --primary-c: #06b6d4;
  --on-primary: #003640;
  --secondary: #6366f1;
  --secondary-c: #3131c0;
  --tertiary: #8b5cf6;
  --tertiary-l: #d0bcff;
  --error: #ffb4ab;
  --error-c: #93000a;
  --twitch: #9146ff;
  --youtube: #ff3b3b;
  --glass: rgba(17, 24, 39, 0.7);
  --hair: rgba(255, 255, 255, 0.08);
  --r-sm: 0.5rem;
  --r-md: 0.75rem;
  --r-lg: 1rem;
  --r-xl: 1.5rem;
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
  --mono: "Space Grotesk", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text-2);
  font: 400 14px/20px var(--font);
  min-height: 100vh;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: var(--primary); }
::selection { background: var(--primary-c); color: var(--on-primary); }
[hidden] { display: none !important; }

.ms {
  font-family: "Material Symbols Outlined";
  font-weight: normal; font-style: normal;
  font-size: 20px; line-height: 1;
  letter-spacing: normal; text-transform: none;
  display: inline-block; white-space: nowrap; direction: ltr;
  -webkit-font-feature-settings: "liga"; font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  user-select: none;
}
.ms.fill { font-variation-settings: "FILL" 1; }

.label { font: 600 12px/16px var(--mono); letter-spacing: 0.05em; }
.label-sm { font: 600 10px/14px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.muted { color: var(--muted); }

.glow-bg {
  position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background:
    radial-gradient(52rem 34rem at 30% 15%, rgba(6, 182, 212, 0.13), transparent 60%),
    radial-gradient(40rem 30rem at 80% 80%, rgba(99, 102, 241, 0.1), transparent 60%);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 0 16px; border-radius: 9999px;
  font: 600 13px/1 var(--mono); letter-spacing: 0.04em;
  transition: transform .15s, background .15s, opacity .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn:hover { transform: scale(1.02); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn-primary {
  background: linear-gradient(135deg, var(--primary-c), var(--secondary));
  color: #fff; box-shadow: 0 0 16px rgba(6, 182, 212, 0.25);
}
.btn-primary:hover { box-shadow: 0 0 24px rgba(6, 182, 212, 0.4); }
.btn-ghost { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); color: var(--text-2); }
.btn-ghost:hover { background: rgba(255,255,255,0.1); color: var(--primary); }
.icon-btn {
  width: 40px; height: 40px; border-radius: 9999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-2); transition: background .15s, color .15s;
  flex: none;
}
.icon-btn:hover { background: rgba(255,255,255,0.12); color: var(--primary); }

.input {
  width: 100%; min-height: 44px; padding: 0 14px;
  background: rgba(17, 24, 39, 0.8); border: 1px solid var(--hair);
  border-radius: var(--r-md); color: var(--text); outline: none;
  transition: box-shadow .15s, border-color .15s;
}
.input::placeholder { color: #64748b; }
.input:focus { box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.6); border-color: transparent; }

.panel {
  background: rgba(23, 27, 38, 0.85);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--hair);
  border-radius: var(--r-lg);
}

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 9999px;
  background: var(--c-high); font: 600 11px/14px var(--mono); letter-spacing: 0.05em;
}

/* ---------- Lobby ---------- */
.lobby {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 32px 16px;
}
.lobby-card { width: 100%; max-width: 460px; padding: 32px; display: flex; flex-direction: column; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 36px; height: 36px; }
.brand-name { font: 800 22px/1 var(--font); letter-spacing: -0.03em; color: var(--text); }
.brand-name span { color: var(--primary); }
.lobby h1 { margin: 0; font: 800 30px/38px var(--font); letter-spacing: -0.02em; color: var(--text); }
.lobby p.lead { margin: 6px 0 0; color: var(--muted); font-size: 15px; line-height: 22px; }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--c-lowest); border-radius: 9999px; }
.tab {
  flex: 1; min-height: 40px; border-radius: 9999px;
  font: 600 13px/1 var(--mono); letter-spacing: 0.04em; color: var(--muted);
}
.tab[aria-selected="true"] { background: var(--primary-c); color: var(--on-primary); }
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font: 600 12px/16px var(--mono); letter-spacing: 0.05em; color: var(--muted-2); }
.field .hint { font-size: 12px; color: var(--muted); }
.form .btn { min-height: 48px; margin-top: 4px; }
.mode-note {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 10px 12px; border-radius: var(--r-md);
  background: rgba(139, 92, 246, 0.12); color: var(--tertiary-l); font-size: 12px; line-height: 18px;
}

/* ---------- Room shell ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  height: 64px; display: flex; align-items: center; gap: 16px;
  padding: 0 24px;
  background: rgba(10, 14, 24, 0.82); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 8px rgba(0,0,0,0.25);
}
.topbar .brand-name { font-size: 18px; }
.topbar .brand img { width: 32px; height: 32px; }
.room-chip { display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 9999px; background: var(--c-high); }
.room-code { white-space: nowrap; display: flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 9999px; background: var(--c-highest); font: 700 11px/14px var(--mono); letter-spacing: 0.06em; color: var(--text); }
.room-code .ms { font-size: 14px; color: var(--primary); }
.sync-live { display: flex; align-items: center; gap: 6px; padding: 0 10px; font: 600 11px/14px var(--mono); color: var(--primary); }
.dot { position: relative; width: 8px; height: 8px; flex: none; }
.dot::before, .dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--primary); }
.dot::before { animation: ping 1.6s cubic-bezier(0,0,.2,1) infinite; opacity: .7; }
.dot.off::before, .dot.off::after { background: var(--outline); animation: none; }
@keyframes ping { 75%, 100% { transform: scale(2.2); opacity: 0; } }
.add-bar { flex: 1; max-width: 560px; position: relative; display: flex; align-items: center; }
.add-bar .ms { position: absolute; left: 12px; font-size: 18px; color: var(--muted); }
.add-bar .input { border-radius: 9999px; padding-left: 38px; padding-right: 120px; min-height: 40px; background: rgba(38, 42, 53, 0.7); }
.add-bar .btn { position: absolute; right: 4px; min-height: 32px; padding: 0 12px; }
.topbar .spacer { flex: 1; }
.me-avatar { width: 34px; height: 34px; }

.layout {
  display: grid; gap: 24px; padding: 24px;
  grid-template-columns: 240px minmax(0, 1fr) 380px;
  max-width: 1720px; margin: 0 auto; align-items: start;
}
.sidebar { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 16px; }
.side-card { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.person { display: flex; align-items: center; gap: 10px; min-height: 36px; }
.person .who { min-width: 0; flex: 1; }
.person .nm { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person .st { font: 500 11px/14px var(--mono); color: var(--muted); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  font: 700 12px/1 var(--mono); color: #fff;
  box-shadow: 0 0 0 2px var(--bg);
}
.avatar.me { box-shadow: 0 0 0 2px var(--primary); }
.stack { display: flex; }
.stack .avatar { margin-left: -8px; width: 30px; height: 30px; font-size: 11px; }
.stack .avatar:first-child { margin-left: 0; }

.main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.room-head { padding: 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.room-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.room-title h2 { margin: 0; font: 700 18px/24px var(--font); color: var(--text); letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge-sync { background: rgba(76, 215, 246, 0.18); color: var(--primary); }
.badge-warn { background: rgba(255, 180, 171, 0.15); color: var(--error); }
.share-pill { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 12px; border-radius: 9999px; background: var(--c-high); min-width: 0; }
.share-pill .url { font: 600 12px/16px var(--mono); color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.share-pill .btn { min-height: 30px; padding: 0 12px; background: var(--c-highest); }

/* ---------- Player ---------- */
.stage {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  background: var(--c-lowest); box-shadow: 0 12px 48px rgba(0,0,0,0.6);
}
.screen { position: relative; aspect-ratio: 16 / 9; width: 100%; background: #000; }
.screen iframe, .screen #playerHost, .screen #playerHost > div { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.click-shield { position: absolute; inset: 0; z-index: 10; cursor: pointer; }
.stage-badges { position: absolute; top: 12px; left: 12px; z-index: 20; display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none; }
.sbadge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 6px; font: 700 10px/14px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; background: rgba(10,14,24,0.8); backdrop-filter: blur(8px); color: var(--text-2); }
.sbadge.yt { background: var(--youtube); color: #fff; }
.sbadge.tw { background: var(--twitch); color: #fff; }
.sbadge.sync { color: var(--primary); }
.sbadge .ms { font-size: 13px; }
.empty-stage {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 24px; text-align: center;
  background: radial-gradient(circle at 50% 40%, rgba(79, 70, 229, 0.25), transparent 60%), var(--c-lowest);
}
.empty-stage img { width: 84px; height: 84px; }
.empty-stage h3 { margin: 0; font: 700 22px/28px var(--font); color: var(--text); }
.empty-stage p { margin: 0; color: var(--muted); max-width: 420px; }
.gesture {
  position: absolute; inset: 0; z-index: 30;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10,14,24,0.6); backdrop-filter: blur(4px);
}
.center-flash {
  position: absolute; left: 50%; top: 50%; z-index: 25; transform: translate(-50%,-50%) scale(.9);
  width: 72px; height: 72px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10,14,24,0.8); color: var(--primary);
  opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none;
}
.center-flash.show { opacity: 1; transform: translate(-50%,-50%) scale(1); }
.center-flash .ms { font-size: 40px; }
.toast-actor {
  position: absolute; left: 50%; bottom: 14px; z-index: 26; transform: translateX(-50%);
  padding: 6px 12px; border-radius: 9999px; background: rgba(10,14,24,0.85);
  font: 600 12px/16px var(--mono); color: var(--text); pointer-events: none;
  opacity: 0; transition: opacity .25s;
}
.toast-actor.show { opacity: 1; }

.reactions-layer { position: absolute; inset: 0; z-index: 22; pointer-events: none; overflow: hidden; }
.float-emoji {
  position: absolute; bottom: 10px; font-size: 34px;
  animation: floatUp 2.6s ease-out forwards;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.5));
}
.float-emoji small { display: block; text-align: center; font: 600 10px/12px var(--mono); color: #fff; }
@keyframes floatUp {
  0% { transform: translateY(0) scale(.6); opacity: 0; }
  12% { transform: translateY(-20px) scale(1.1); opacity: 1; }
  100% { transform: translateY(-260px) scale(1); opacity: 0; }
}

.controls { padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 10px; background: var(--c-low); }
.scrub { position: relative; height: 18px; display: flex; align-items: center; }
.scrub input[type=range] { width: 100%; }
input[type=range] {
  -webkit-appearance: none; appearance: none; height: 6px; border-radius: 9999px; outline: none; cursor: pointer;
  background: linear-gradient(to right, var(--primary-c) 0%, var(--primary-c) var(--p, 0%), #1e293b var(--p, 0%), #1e293b 100%);
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 4px rgba(6,182,212,.35), 0 0 12px rgba(6,182,212,.6);
}
input[type=range]::-moz-range-thumb {
  width: 16px; height: 16px; border: 0; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 4px rgba(6,182,212,.35);
}
input[type=range]:disabled { cursor: default; opacity: .5; }
.ctrl-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.play-btn {
  width: 48px; height: 48px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary-c), var(--secondary)); color: #fff;
  box-shadow: 0 0 24px -4px rgba(6, 182, 212, 0.55);
}
.play-btn .ms { font-size: 28px; }
.time { font: 600 12px/16px var(--mono); color: var(--text-2); white-space: nowrap; }
.vol { display: flex; align-items: center; gap: 6px; }
.vol input { width: 90px; }
.ctrl-row .grow { flex: 1; }

.react-bar { display: flex; gap: 4px; padding: 6px; border-radius: 9999px; background: var(--c); align-self: flex-start; flex-wrap: wrap; }
.react-bar button { width: 40px; height: 40px; border-radius: 50%; font-size: 20px; line-height: 1; transition: transform .12s, background .12s; }
.react-bar button:hover { background: rgba(255,255,255,0.08); transform: scale(1.15); }

.now-card { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.now-card h3 { margin: 0; font: 800 24px/30px var(--font); letter-spacing: -0.02em; color: var(--text); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 4px 10px; border-radius: 9999px; background: rgba(139,92,246,.18); color: var(--tertiary-l); font: 600 11px/14px var(--mono); letter-spacing: .05em; }
.chip.c2 { background: var(--c-high); color: var(--muted-2); }
.info-line { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: var(--r-md); background: var(--c); color: var(--muted-2); font-size: 13px; }
.info-line .ms { color: var(--primary); }

/* ---------- Right panel ---------- */
.side-right { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 88px; max-height: calc(100vh - 112px); min-height: 0; }
.rtabs { display: flex; gap: 6px; }
.rtab {
  flex: 1; min-height: 44px; border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 13px/1 var(--mono); color: var(--muted-2); background: var(--c-low);
}
.rtab[aria-selected="true"] { background: var(--primary-c); color: var(--on-primary); }
.rtab .count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 9999px; background: rgba(0,0,0,.2); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; }
.rtab .unread { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.rpanel { padding: 14px; display: flex; flex-direction: column; gap: 12px; min-height: 0; flex: 1; overflow: hidden; }
.rpanel .scroll { overflow-y: auto; min-height: 0; flex: 1; display: flex; flex-direction: column; gap: 10px; padding-right: 2px; }
.add-row { display: flex; gap: 6px; }
.add-row .input { min-height: 42px; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.fchip { padding: 6px 12px; border-radius: 9999px; border: 1px solid var(--hair); font: 600 11px/14px var(--mono); color: var(--muted-2); min-height: 32px; }
.fchip[aria-pressed="true"] { background: rgba(6,182,212,.15); border-color: rgba(6,182,212,.5); color: var(--primary); }
.q-item {
  display: flex; align-items: center; gap: 10px; padding: 8px;
  border-radius: var(--r-md); background: var(--c); border: 1px solid transparent;
  transition: border-color .15s, background .15s;
}
.q-item:hover { border-color: rgba(6, 182, 212, 0.35); background: var(--c-high); }
.thumb { position: relative; width: 96px; aspect-ratio: 16/9; border-radius: var(--r-sm); overflow: hidden; flex: none; background: var(--c-highest); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .src { position: absolute; left: 4px; top: 4px; width: 18px; height: 18px; border-radius: 4px; display: flex; align-items: center; justify-content: center; color: #fff; }
.thumb .src .ms { font-size: 13px; }
.thumb .src.yt { background: var(--youtube); }
.thumb .src.tw { background: var(--twitch); }
.thumb .tw-fill { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #2b1a57, #9146ff); color: #fff; }
.q-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.q-title { color: var(--text); font-weight: 700; font-size: 13px; line-height: 18px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.q-meta { font-size: 12px; color: var(--muted); }
.q-meta b { color: var(--text-2); font-weight: 600; }
.q-actions { display: flex; gap: 4px; margin-top: 4px; }
.q-actions button { min-height: 28px; padding: 0 8px; border-radius: 9999px; font: 600 11px/1 var(--mono); color: var(--muted-2); background: rgba(255,255,255,.05); display: inline-flex; align-items: center; gap: 4px; }
.q-actions button:hover { color: var(--primary); background: rgba(255,255,255,.1); }
.q-actions .ms { font-size: 15px; }
.votes { display: flex; flex-direction: column; align-items: center; flex: none; }
.votes button { width: 36px; height: 30px; display: flex; align-items: center; justify-content: center; color: var(--muted); border-radius: 8px; }
.votes button:hover { color: var(--primary); background: rgba(255,255,255,.06); }
.votes button.on { color: var(--primary); }
.votes button.on.down { color: var(--error); }
.votes .score { font: 700 13px/16px var(--mono); color: var(--text); }
.q-empty { padding: 28px 12px; text-align: center; color: var(--muted); display: flex; flex-direction: column; gap: 8px; align-items: center; }
.q-empty .ms { font-size: 32px; color: var(--outline); }
.notice { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: var(--r-md); background: rgba(49, 49, 192, .35); color: var(--text-2); font-size: 13px; }
.notice .ms { color: var(--tertiary-l); }

.chat-msg { display: flex; gap: 8px; align-items: flex-start; }
.chat-msg .avatar { width: 28px; height: 28px; font-size: 10px; }
.chat-msg .bubble { min-width: 0; }
.chat-msg .nm { font-weight: 700; color: var(--text); font-size: 13px; }
.chat-msg .ts { font: 500 10px/14px var(--mono); color: var(--muted); margin-left: 6px; }
.chat-msg .tx { color: var(--text-2); word-wrap: break-word; overflow-wrap: anywhere; }
.chat-sys { text-align: center; font: 500 11px/16px var(--mono); color: var(--muted); padding: 2px 0; }
.chat-form { display: flex; gap: 6px; }

/* ---------- Modal / Toast ---------- */
.modal-bg { position: fixed; inset: 0; z-index: 100; background: rgba(5, 8, 15, 0.7); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { width: 100%; max-width: 440px; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.modal h3 { margin: 0; font: 700 20px/26px var(--font); color: var(--text); }
.modal .row { display: flex; gap: 8px; }
.switch { display: flex; align-items: center; gap: 10px; color: var(--text-2); cursor: pointer; }
.switch input { width: 18px; height: 18px; accent-color: var(--primary-c); }
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { padding: 10px 16px; border-radius: 9999px; background: var(--c-highest); color: var(--text); box-shadow: 0 8px 24px rgba(0,0,0,.4); font-weight: 600; animation: toastIn .2s ease-out; }
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .layout { grid-template-columns: minmax(0, 1fr) 360px; }
  .sidebar { display: none; }
}
@media (min-width: 1281px) { .head-people { display: none !important; } }
@media (max-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr); padding: 16px; gap: 16px; }
  .side-right { position: static; max-height: none; }
  .rpanel { min-height: 420px; max-height: 70vh; }
  .add-bar { display: none; }
  .topbar { padding: 0 16px; gap: 10px; }
}
@media (max-width: 600px) {
  .sync-live .txt, .invite-txt, .topbar .brand-name { display: none; }
  .topbar .btn-primary { padding: 0 12px; }
  .now-card h3 { font-size: 20px; line-height: 26px; }
  .vol input { width: 64px; }
  .lobby-card { padding: 24px 20px; }
  .share-pill .url { max-width: 150px; }
  .react-bar button { width: 36px; height: 36px; }
}

/* ---------- TikTok / Instagram ---------- */
.sbadge.tt { background: #000; color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.sbadge.ig { background: linear-gradient(135deg, #f58529, #dd2a7b 55%, #8134af); color: #fff; }
.thumb .src.tt { background: #000; }
.thumb .src.ig { background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af); }
.thumb .tw-fill.tt { background: linear-gradient(135deg, #111, #25f4ee 160%); }
.thumb .tw-fill.ig { background: linear-gradient(135deg, #f58529, #dd2a7b 55%, #8134af); }
.countdown {
  position: absolute; inset: 0; z-index: 28; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: rgba(10,14,24,.45);
}
.cd-num { font: 800 120px/1 var(--font); color: #fff; text-shadow: 0 0 40px rgba(6,182,212,.8); animation: cdPop .9s ease-out; }
.cd-num.go { font-size: 88px; color: var(--primary); }
.cd-txt { font: 600 14px/18px var(--mono); color: var(--text); background: rgba(10,14,24,.8); padding: 6px 12px; border-radius: 9999px; }
@keyframes cdPop { from { transform: scale(1.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- Qualität ---------- */
/* Loch im Klick-Schutz oben rechts: dort liegen YouTubes Zahnrad (Qualität), Untertitel und Ton */
.click-shield.yt-hole { clip-path: polygon(0 0, calc(100% - 140px) 0, calc(100% - 140px) 60px, 100% 60px, 100% 100%, 0 100%); }
.stage.show-gear .screen::after {
  content: ""; position: absolute; right: 6px; top: 6px; width: 128px; height: 48px; z-index: 27; pointer-events: none;
  border: 2px solid var(--primary); border-radius: 10px; box-shadow: 0 0 18px rgba(6,182,212,.7); animation: gearPulse 1s ease-in-out infinite alternate;
}
@keyframes gearPulse { from { opacity: .35; } to { opacity: 1; } }
.stage { overflow: visible; }
.screen { border-radius: var(--r-lg) var(--r-lg) 0 0; overflow: hidden; }
.controls { border-radius: 0 0 var(--r-lg) var(--r-lg); }
.qual-menu { position: absolute; right: 16px; bottom: 76px; z-index: 40; padding: 6px; display: flex; flex-direction: column; min-width: 180px; background: rgba(28,31,42,.97); }
.qual-menu button { text-align: left; padding: 10px 12px; border-radius: 8px; color: var(--text-2); font-weight: 600; min-height: 40px; }
.qual-menu button:hover { background: rgba(255,255,255,.08); color: var(--primary); }
.qual-menu button[aria-pressed="true"] { color: var(--primary); }

/* ---------- Sprachchat ---------- */
.voice-ctl { display: flex; align-items: center; gap: 8px; }
.voice-ctl .btn { min-height: 36px; }
.icon-btn.live { background: rgba(6,182,212,.2); color: var(--primary); border-color: rgba(6,182,212,.5); }
.icon-btn.danger { background: rgba(255,180,171,.14); color: var(--error); border-color: rgba(255,180,171,.35); }
.avatar.speaking { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--primary), 0 0 14px rgba(76,215,246,.8); }
.vmic { font-size: 18px; color: var(--primary); }
.vmic.off { color: var(--error); }

/* ---------- Als Nächstes ---------- */
.upnext {
  position: absolute; right: 14px; bottom: 14px; z-index: 29; width: min(380px, calc(100% - 28px));
  display: flex; gap: 12px; padding: 12px; align-items: center; background: rgba(23,27,38,.95);
  animation: toastIn .25s ease-out;
}
.upnext .thumb { width: 112px; }
.un-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.un-title { color: var(--text); font-weight: 700; font-size: 13px; line-height: 18px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.un-actions { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.un-actions .btn { min-height: 34px; padding: 0 12px; }

/* ---------- Geschwindigkeit & Zeitstempel ---------- */
.rate-btn { min-height: 40px; padding: 0 12px; min-width: 54px; }
.ts-link { display: inline; padding: 0 4px; border-radius: 6px; background: rgba(6,182,212,.16); color: var(--primary); font: 600 12px/18px var(--mono); }
.ts-link:hover { background: rgba(6,182,212,.3); }
@media (max-width: 600px) { .upnext .thumb { display: none; } }

/* ---------- Hochformat (TikTok / Reels) ---------- */
.screen.portrait { aspect-ratio: auto; height: min(78vh, 820px); }
@media (max-width: 600px) { .screen.portrait { height: min(72vh, 680px); } }

/* ---------- Warteschlange verschieben ---------- */
.drag { width: 28px; align-self: stretch; display: flex; align-items: center; justify-content: center; color: var(--outline); cursor: grab; touch-action: none; border-radius: 6px; flex: none; }
.drag:hover { color: var(--primary); background: rgba(255,255,255,.05); }
.q-item.dragging { position: relative; z-index: 5; opacity: .9; box-shadow: 0 12px 32px rgba(0,0,0,.5); border-color: rgba(6,182,212,.6); cursor: grabbing; transition: none; }
.q-item.drop-before { box-shadow: inset 0 3px 0 var(--primary); }
.q-item.drop-after { box-shadow: inset 0 -3px 0 var(--primary); }

/* ---------- Werbung abwarten / Startprobleme ---------- */
.adhold { position: absolute; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; background: rgba(10,14,24,.72); backdrop-filter: blur(3px); }
.gesture-box { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; max-width: 420px; padding: 16px; }
.gesture-box p { margin: 0; font-size: 13px; }
.gesture-box .row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.gesture-box a.btn { text-decoration: none; }

/* ---------- Sprachchat-Lautstärke ---------- */
.voice-wrap { position: relative; }
.vbtn { min-height: 36px; padding: 0 12px; color: var(--primary); }
.voice-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; width: 280px; padding: 12px; display: flex; flex-direction: column; gap: 10px; background: rgba(28,31,42,.98); }
.vrow { display: flex; flex-direction: column; gap: 6px; }
.vrow .nm { color: var(--text); font-weight: 600; font-size: 13px; }
.vrow input { width: 100%; }

/* Wortmarke: SharedCue + TV-Plakette */
.brand-name .tv { margin-left: 5px; padding: 2px 6px; border-radius: 6px; font: 700 0.55em/1 var(--mono); letter-spacing: .06em; vertical-align: 0.35em; color: #fff; background: linear-gradient(135deg, var(--primary-c), var(--secondary)); }

/* ---------- Raum-Optionen ---------- */
.opts { border: 1px solid var(--hair); border-radius: var(--r-md); padding: 10px 14px 12px; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.opts legend { padding: 0 6px; font: 600 12px/16px var(--mono); letter-spacing: .05em; color: var(--muted-2); }
.switch input:disabled + * , .switch:has(input:disabled) { opacity: .5; }

/* ---------- Webcams ---------- */
.cam-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.cam-tile { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-md); overflow: hidden; background: #000; border: 1px solid var(--hair); }
.cam-tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam-tile.self video { transform: scaleX(-1); }
.cam-tile .nm { position: absolute; left: 8px; bottom: 6px; padding: 2px 8px; border-radius: 9999px; background: rgba(10,14,24,.75); font: 600 11px/16px var(--mono); color: var(--text); }
@media (max-width: 600px) { .cam-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Abstimmung ---------- */
.poll-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.poll-bar .btn { min-height: 34px; padding: 0 12px; }
.pick { width: 32px; align-self: stretch; display: flex; align-items: center; justify-content: center; color: var(--muted); border-radius: 6px; flex: none; }
.pick.on { color: var(--primary); }
.poll-card { padding: 16px; display: flex; flex-direction: column; gap: 12px; border-color: rgba(6,182,212,.45); box-shadow: 0 0 24px -6px rgba(6,182,212,.4); }
.poll-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.poll-head b { color: var(--text); font-size: 16px; }
.poll-head .ms { color: var(--primary); }
.poll-head .btn { min-height: 32px; padding: 0 12px; margin-left: auto; }
.poll-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.poll-opt { display: flex; gap: 10px; align-items: center; text-align: left; padding: 8px; border-radius: var(--r-md); background: var(--c); border: 1px solid transparent; }
.poll-opt:hover { border-color: rgba(6,182,212,.4); }
.poll-opt.mine { border-color: var(--primary); background: rgba(6,182,212,.12); }
.poll-opt .thumb { width: 84px; }
.po-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.po-title { color: var(--text); font-weight: 700; font-size: 13px; line-height: 17px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.po-bar, .st-bar { display: block; height: 6px; border-radius: 9999px; background: #1e293b; overflow: hidden; }
.po-bar span, .st-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary-c), var(--secondary)); transition: width .3s; }
.po-n { font: 600 11px/14px var(--mono); color: var(--muted-2); }

/* ---------- Statistik ---------- */
.st-big { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.st-big > div { padding: 14px; border-radius: var(--r-md); background: var(--c); display: flex; flex-direction: column; gap: 4px; }
.st-big b { font: 800 22px/26px var(--font); color: var(--text); }
.st-big span { font-size: 12px; color: var(--muted); }
#statsBody h4 { margin: 10px 0 2px; font: 600 12px/16px var(--mono); letter-spacing: .05em; color: var(--muted-2); text-transform: uppercase; }
.st-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) 80px 44px; align-items: center; gap: 8px; min-height: 28px; }
.st-rank { font: 700 12px/1 var(--mono); color: var(--muted); text-align: center; }
.st-name { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-val { font: 700 12px/1 var(--mono); color: var(--text-2); text-align: right; }
@media (max-width: 1400px) { .rt-txt { display: none; } .rtab#rtStats { flex: 0 0 52px; } }

/* ---------- Erweiterung ---------- */
.ext-link { display: flex; gap: 12px; align-items: center; text-align: left; padding: 12px 14px; border-radius: var(--r-md); background: var(--c); border: 1px solid var(--hair); color: var(--text-2); font-size: 13px; line-height: 18px; }
.ext-link:hover { border-color: rgba(6,182,212,.45); }
.ext-link > .ms { color: var(--primary); font-size: 26px; }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; color: var(--text-2); }
.steps .btn { text-decoration: none; min-height: 36px; margin: 2px 0 4px; }
.steps code { font-family: var(--mono); background: var(--c-high); padding: 1px 6px; border-radius: 6px; }

/* ---------- Zufallsname ---------- */
.name-row { display: flex; gap: 8px; }
.name-row .input { flex: 1; min-width: 0; }
.dice { width: 44px; height: 44px; border-radius: var(--r-md); }
.dice.roll .ms { animation: diceRoll .5s ease-out; }
@keyframes diceRoll { 0% { transform: rotate(0) scale(1); } 50% { transform: rotate(200deg) scale(1.25); } 100% { transform: rotate(360deg) scale(1); } }

/* ---------- Kopfzeile: Code-Chip als Knopf ---------- */
button.room-chip { cursor: pointer; border: 0; color: inherit; transition: background .15s; }
button.room-chip:hover { background: var(--c-highest); }

/* ---------- Quellen: Datei / Bildschirm ---------- */
.src-row { display: flex; gap: 6px; flex-wrap: wrap; }
.src-row .btn { min-height: 34px; padding: 0 12px; }
.danger-btn { background: rgba(255,180,171,.14) !important; color: var(--error) !important; border-color: rgba(255,180,171,.35) !important; }
.sbadge.fl { background: #0e7490; color: #fff; }
.sbadge.lv { background: #be123c; color: #fff; }
.thumb .src.fl, .thumb .tw-fill.fl { background: linear-gradient(135deg, #0e7490, #22d3ee); }
.thumb .src.lv, .thumb .tw-fill.lv { background: linear-gradient(135deg, #9f1239, #fb7185); }

/* ---------- Eigene Medien / Live ---------- */
.media-wrap { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; }
.media-wrap video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.media-wrap.audio video { position: absolute; width: 1px; height: 1px; opacity: 0; }
.audio-art { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 24px; text-align: center; color: var(--text); }
.audio-art .ms { font-size: 64px; color: var(--primary); }
.audio-art b { font: 700 20px/26px var(--font); max-width: 520px; }
.eq { display: flex; gap: 5px; align-items: flex-end; height: 34px; }
.eq i { width: 6px; height: 8px; border-radius: 3px; background: linear-gradient(var(--primary), var(--secondary)); }
.media-wrap.playing .eq i { animation: eq 1s ease-in-out infinite alternate; }
.eq i:nth-child(2) { animation-delay: .2s !important; } .eq i:nth-child(3) { animation-delay: .4s !important; } .eq i:nth-child(4) { animation-delay: .1s !important; } .eq i:nth-child(5) { animation-delay: .3s !important; }
@keyframes eq { from { height: 6px; } to { height: 34px; } }
.live-note { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: none; align-items: center; gap: 10px; color: var(--text-2); font-weight: 600; }
.media-wrap.live-wait .live-note { display: flex; }

/* ---------- Einstiegs-Animation ---------- */
.enter-fx { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.fx-curtain { position: absolute; top: 0; bottom: 0; width: 50.5%; background:
  repeating-linear-gradient(90deg, rgba(255,255,255,.025) 0 2px, transparent 2px 46px),
  radial-gradient(120% 80% at 50% 50%, #151a35, #0a0e18 70%); transition: transform .85s cubic-bezier(.77,0,.18,1); }
.fx-curtain.l { left: 0; box-shadow: inset -20px 0 40px rgba(6,182,212,.12); }
.fx-curtain.r { right: 0; box-shadow: inset 20px 0 40px rgba(99,102,241,.12); }
.enter-fx.open .fx-curtain.l { transform: translateX(-102%); }
.enter-fx.open .fx-curtain.r { transform: translateX(102%); }
.fx-core { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 18px; transition: transform .7s ease, opacity .5s ease; }
.enter-fx.open .fx-core { transform: scale(1.35); opacity: 0; }
.fx-logo { width: 120px; height: 120px; animation: fxLogo 1s cubic-bezier(.2,.9,.3,1.3) both; filter: drop-shadow(0 0 30px rgba(76,215,246,.55)); }
@keyframes fxLogo { from { transform: scale(.3) rotate(-25deg); opacity: 0; } to { transform: none; opacity: 1; } }
.fx-rings { position: absolute; top: 60px; left: 50%; width: 0; height: 0; }
.fx-rings i { position: absolute; left: -60px; top: -60px; width: 120px; height: 120px; border-radius: 50%; border: 2px solid var(--primary); opacity: 0; animation: fxRing 1.8s ease-out infinite; }
.fx-rings i:nth-child(2) { animation-delay: .6s; border-color: var(--secondary); }
.fx-rings i:nth-child(3) { animation-delay: 1.2s; border-color: var(--tertiary); }
@keyframes fxRing { 0% { transform: scale(.8); opacity: .8; } 100% { transform: scale(3.2); opacity: 0; } }
.fx-code { display: flex; gap: 6px; font: 700 34px/1 var(--mono); letter-spacing: .08em; color: var(--text); }
.fx-code span { display: inline-block; opacity: 0; animation: fxChar .45s cubic-bezier(.2,.9,.3,1.4) forwards; text-shadow: 0 0 18px rgba(76,215,246,.6); }
@keyframes fxChar { from { transform: translateY(18px) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.fx-txt { font: 600 14px/18px var(--mono); letter-spacing: .06em; color: var(--muted-2); text-transform: uppercase; }
@media (prefers-reduced-motion: reduce) {
  .fx-curtain, .fx-core { transition: opacity .2s; } .enter-fx.open .fx-curtain { transform: none; opacity: 0; }
  .fx-logo, .fx-rings i, .fx-code span { animation: none; opacity: 1; }
}

/* =====================================================================
   REDESIGN v16 – Glas-Karten, Kino-Player, Header mit Link-Eingabe
   ===================================================================== */
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900; src: url(fonts/inter-latin-wght-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900; src: url(fonts/inter-latin-ext-wght-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
:root {
  --bg: #070b13;
  --card: rgba(17, 24, 39, 0.65);
  --card-solid: #111827;
  --line: rgba(255, 255, 255, 0.07);
  --slate9: #0f172a;
  --slate8: #1e293b;
  --slate7: #334155;
  --slate4: #94a3b8;
  --teal: #00f2fe;
  --grad: linear-gradient(135deg, #06b6d4, #6366f1);
  --glow: 0 0 25px -5px rgba(0, 242, 254, 0.35);
  --body: "Inter", system-ui, sans-serif;
}
body { background: var(--bg); font-family: var(--body); color: #e2e8f0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.btn-primary { background: var(--grad); box-shadow: var(--glow); border-radius: 12px; }
.btn, .btn-ghost { border-radius: 12px; }
.glow-bg { background: radial-gradient(60rem 30rem at 50% -10%, rgba(6,182,212,.10), transparent 60%), radial-gradient(40rem 30rem at 90% 90%, rgba(99,102,241,.08), transparent 60%); }

/* ---------- Karten ---------- */
.card, .panel { background: var(--card); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 10px 30px -12px rgba(0,0,0,.6); }
.card { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid rgba(30,41,59,.8); }
.ch-left { display: flex; align-items: center; gap: 8px; }
.ch-title { margin: 0; font: 600 12px/16px var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--slate4); }
.ch-hint { font: 500 12px/16px var(--body); color: #818cf8; }
.count-pill { padding: 1px 8px; border-radius: 9999px; font: 700 12px/18px var(--body); color: #22d3ee; background: rgba(6,182,212,.1); border: 1px solid rgba(6,182,212,.2); }
.link-btn { font: 500 12px/16px var(--body); color: #64748b; }
.link-btn:hover { color: #cbd5e1; }

/* ---------- Header ---------- */
.topbar { height: 64px; gap: 16px; padding: 0 24px; background: rgba(10, 15, 29, 0.9); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255,255,255,.08); box-shadow: none; }
.topbar .brand-name { font-size: 20px; }
.topbar .brand img { width: 36px; height: 36px; }
.brand-name .tv { background: rgba(99,102,241,.2); color: #818cf8; border: 1px solid rgba(99,102,241,.3); }
button.room-chip { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 12px; border-radius: 12px; background: rgba(15,23,42,.9); border: 1px solid rgba(51,65,85,.8); max-width: 300px; min-width: 0; }
button.room-chip:hover { border-color: rgba(34,211,238,.5); background: rgba(15,23,42,1); }
.rc-name { font: 600 13px/16px var(--body); color: #f1f5f9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.room-chip .room-code { background: var(--slate8); padding: 3px 8px; border-radius: 8px; }
.add-bar { display: flex !important; flex: 1; max-width: 640px; margin: 0 auto; position: relative; align-items: center; }
.add-bar .ab-ico { position: absolute; left: 12px; font-size: 18px; color: #22d3ee; pointer-events: none; }
.add-bar .input { min-height: 40px; border-radius: 12px; padding-left: 38px; padding-right: 170px; background: rgba(15,23,42,.9); border: 1px solid rgba(51,65,85,.8); font-size: 13px; }
.add-bar .input:focus { border-color: #22d3ee; box-shadow: 0 0 0 1px #22d3ee; }
.ab-actions { position: absolute; right: 5px; display: flex; align-items: center; gap: 4px; }
.ab-icon { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--slate4); background: var(--slate8); border: 1px solid var(--slate7); }
.ab-icon:hover { color: #fff; border-color: #22d3ee; }
.ab-icon .ms { font-size: 17px; }
.ab-go { height: 30px; padding: 0 10px; border-radius: 8px; display: flex; align-items: center; gap: 4px; background: #06b6d4; color: #020617; font: 700 12px/1 var(--body); box-shadow: var(--glow); }
.ab-go:hover { background: #22d3ee; }
.ab-go .ms { font-size: 16px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn.sq { border-radius: 12px; background: rgba(30,41,59,.7); border-color: var(--slate7); }
.me-wrap { position: relative; padding-left: 8px; border-left: 1px solid var(--slate8); }
.me-btn { display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 12px; }
.me-btn:hover { background: var(--slate8); }
.avatar.sqav { width: 32px; height: 32px; border-radius: 9px; box-shadow: 0 0 0 2px rgba(251,191,36,.3); }
.me-btn .caret { font-size: 18px; color: var(--slate4); }
.menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 80; min-width: 210px; padding: 6px; display: flex; flex-direction: column; background: rgba(17,24,39,.98); }
.menu-head { display: flex; flex-direction: column; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu-head b { color: #fff; }
.menu button { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 8px; color: #e2e8f0; text-align: left; }
.menu button:hover { background: var(--slate8); color: var(--error); }

/* ---------- Layout ---------- */
.layout { max-width: 1920px; padding: 20px; gap: 20px; grid-template-columns: 300px minmax(0, 1fr) 340px; grid-template-areas: "side main right"; }
.sidebar { grid-area: side; display: flex !important; position: sticky; top: 84px; gap: 16px; }
.main { grid-area: main; }
.side-right { grid-area: right; }
@media (max-width: 1280px) {
  .layout { grid-template-columns: minmax(0, 1fr) 320px; grid-template-areas: "main right" "side right"; }
  .sidebar { position: static; display: grid !important; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; }
}
@media (max-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "side" "right"; padding: 12px; gap: 14px; }
  .sidebar { grid-template-columns: minmax(0, 1fr); }
  .topbar { height: auto; flex-wrap: wrap; padding: 10px 12px; gap: 10px; }
  .add-bar { order: 5; flex-basis: 100%; max-width: none; }
  .top-actions { margin-left: auto; }
  .rc-name { display: none; }
}
@media (max-width: 600px) { .ab-go-txt, .invite-txt { display: none; } .add-bar .input { padding-right: 116px; } }

/* ---------- Personen & Webcams ---------- */
.cams-card { position: relative; }
.cam-strip { display: flex; flex-direction: column; gap: 10px; }
.cam-tile { aspect-ratio: 16 / 9; border-radius: 12px; border: 1px solid rgba(51,65,85,.8); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.cam-tile.speaking { border: 2px solid rgba(34,211,238,.8); box-shadow: var(--glow); }
.cam-tile .tshade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.8), transparent 45%, rgba(0,0,0,.3)); pointer-events: none; }
.cam-tile .nm { left: 10px; bottom: 8px; background: none; padding: 0; font: 600 12px/16px var(--body); color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.8); }
.tmic { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 6px; display: flex; align-items: center; justify-content: center; background: rgba(16,185,129,.2); color: #34d399; border: 1px solid rgba(16,185,129,.3); }
.tmic.off { background: rgba(30,41,59,.8); color: var(--slate4); border-color: transparent; }
.tmic .ms { font-size: 14px; }
.roster { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.roster:empty { display: none; }
.rchip { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 58px; padding: 4px 0; border-radius: 10px; }
.rchip:hover { background: rgba(30,41,59,.6); }
.rchip .avatar { width: 40px; height: 40px; font-size: 13px; box-shadow: 0 0 0 2px var(--card-solid); }
.rchip .avatar.me { box-shadow: 0 0 0 2px #22d3ee; }
.rchip .avatar.speaking { box-shadow: 0 0 0 2px var(--card-solid), 0 0 0 4px #22d3ee, 0 0 16px rgba(34,211,238,.8); }
.rmic { position: absolute; top: 30px; left: 34px; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #10b981; color: #022c22; box-shadow: 0 0 0 2px var(--card-solid); }
.rmic.off { background: #475569; color: #e2e8f0; }
.rmic .ms { font-size: 12px; }
.rname { max-width: 58px; font: 500 11px/14px var(--body); color: #cbd5e1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.voice-wrap { position: static; }
.voice-menu { position: absolute; z-index: 60; width: 250px; padding: 12px; }
.vp-head { display: flex; align-items: center; gap: 8px; }
.vp-head .avatar { width: 28px; height: 28px; font-size: 10px; }
.vp-head b { color: #fff; }

/* ---------- Sprachchat-Karte ---------- */
.audio-card { gap: 10px; }
.vgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vbig { min-height: 44px; padding: 0 10px; border-radius: 12px; display: flex; align-items: center; justify-content: center; gap: 6px; font: 600 12px/1.2 var(--body); color: #cbd5e1; background: rgba(30,41,59,.7); border: 1px solid var(--slate7); transition: background .15s; width: 100%; }
.vbig:hover { background: var(--slate7); color: #fff; }
.vbig .ms { font-size: 18px; }
.vbig.on { background: rgba(16,185,129,.1); border-color: rgba(16,185,129,.3); color: #6ee7b7; }
.vbig.off { background: rgba(244,63,94,.1); border-color: rgba(244,63,94,.3); color: #fda4af; }
.vbig.leave { color: #fda4af; }
.vbig.join { background: var(--grad); border: 0; color: #fff; box-shadow: var(--glow); }

/* ---------- Player ---------- */
.stage { border-radius: 24px; border: 1px solid rgba(255,255,255,.1); background: #000; box-shadow: 0 25px 50px -12px rgba(0,0,0,.7); }
.screen { border-radius: 24px 24px 0 0; }
.controls { padding: 14px 16px 16px; background: linear-gradient(to top, #020617, rgba(2,6,23,.95) 50%, rgba(2,6,23,.8)); border-top: 1px solid rgba(255,255,255,.08); border-radius: 0 0 24px 24px; }
.scrub input[type=range] { height: 6px; background: linear-gradient(to right, #22d3ee 0%, #6366f1 var(--p, 0%), var(--slate8) var(--p, 0%), var(--slate8) 100%); }
.scrub input[type=range]::-webkit-slider-thumb { background: #22d3ee; border: 2px solid #fff; box-shadow: var(--glow); }
.play-btn { width: 40px; height: 40px; border-radius: 12px; box-shadow: var(--glow); }
.play-btn .ms { font-size: 24px; }
.ctl { width: 36px; height: 36px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; color: var(--slate4); flex: none; }
.ctl:hover { color: #fff; background: var(--slate8); }
.ctl:disabled { opacity: .35; }
.ctl.live { color: #22d3ee; }
.ctl .ms { font-size: 20px; }
.rate-btn { width: auto; padding: 0 8px; font: 700 12px/1 var(--mono); color: #cbd5e1; }
.resync { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 9px; background: rgba(99,102,241,.15); border: 1px solid rgba(99,102,241,.3); color: #a5b4fc; font: 600 12px/1 var(--body); }
.resync:hover { background: rgba(99,102,241,.25); }
.resync .ms { font-size: 16px; color: #22d3ee; }
.time { color: #cbd5e1; font-family: var(--mono); }
.vol input { width: 70px; }
.sbadge { border-radius: 8px; padding: 5px 10px; font-size: 11px; }
.sbadge.sync { background: rgba(8,51,68,.8); color: #67e8f9; border: 1px solid rgba(6,182,212,.3); }
.stage-title { position: absolute; left: 24px; bottom: 18px; z-index: 21; pointer-events: none; opacity: 0; transition: opacity .3s; max-width: 55%; }
.stage:hover .stage-title { opacity: 1; }
.stage-title span { display: block; font: 600 11px/14px var(--body); letter-spacing: .08em; text-transform: uppercase; color: #22d3ee; text-shadow: 0 1px 6px rgba(0,0,0,.8); }
.stage-title b { display: block; font: 700 22px/28px var(--font); color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.8); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-chat { position: absolute; right: 16px; bottom: 16px; z-index: 21; max-width: 260px; padding: 10px 12px; border-radius: 16px; background: rgba(2,6,23,.75); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.1); pointer-events: none; display: flex; flex-direction: column; gap: 6px; font-size: 11px; line-height: 15px; }
.mini-chat[hidden] { display: none; }
.mc-head { display: flex; align-items: center; gap: 6px; padding-bottom: 5px; border-bottom: 1px solid rgba(255,255,255,.1); font: 700 10px/12px var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--slate4); }
.mc-head i { width: 6px; height: 6px; border-radius: 50%; background: #f43f5e; }
.mc-body p { margin: 0; color: #e2e8f0; overflow-wrap: anywhere; }
.upnext { bottom: 16px; right: 16px; }
@media (max-width: 700px) { .mini-chat { display: none !important; } .stage-title { display: none; } }

/* ---------- Reaktionen & Infos ---------- */
.react-card { flex-direction: row; align-items: center; gap: 4px; padding: 8px; }
.rc-label { font: 600 12px/16px var(--body); color: var(--slate4); padding: 0 12px; white-space: nowrap; }
.react-card .react-bar { flex: 1; justify-content: space-around; background: none; padding: 0; align-self: auto; }
.react-bar button { border-radius: 12px; }
.react-bar button:hover { box-shadow: var(--glow); }
@media (max-width: 600px) { .rc-label { display: none; } }
.now-card { padding: 20px; }
.chip { background: rgba(99,102,241,.2); color: #a5b4fc; border: 1px solid rgba(99,102,241,.3); }
.chip.c2 { background: none; border: 0; color: var(--slate4); padding-left: 0; }
.info-line { background: rgba(15,23,42,.9); border: 1px solid var(--slate8); border-radius: 12px; }

/* ---------- Rechte Spalte ---------- */
.side-right { top: 84px; max-height: calc(100vh - 104px); }
.rtabs { flex-direction: row; padding: 6px; gap: 4px; }
.rtab { min-height: 38px; border-radius: 12px; background: none; color: var(--slate4); font: 500 12px/1 var(--body); gap: 6px; }
.rtab:hover { background: var(--slate8); color: #e2e8f0; }
.rtab[aria-selected="true"] { background: linear-gradient(90deg, rgba(6,182,212,.2), rgba(99,102,241,.2)); border: 1px solid rgba(6,182,212,.3); color: #fff; font-weight: 600; }
.rtab .count { background: rgba(6,182,212,.3); color: #67e8f9; font: 700 10px/1 var(--body); }
.rtab .count.c2 { background: var(--slate8); color: var(--slate4); }
.rtab[aria-selected="true"] .ms { color: #22d3ee; }
.rtab#rtStats { flex: 0 0 auto; padding: 0 12px; }
.rpanel { padding: 16px; }
.q-item { background: rgba(15,23,42,.6); border: 1px solid var(--slate8); border-radius: 12px; padding: 10px; }
.q-item:hover { border-color: var(--slate7); background: rgba(15,23,42,.8); }
.thumb { width: 64px; height: 40px; aspect-ratio: auto; border-radius: 8px; border: 1px solid rgba(6,182,212,.2); }
.q-title { font: 600 12px/16px var(--body); }
.q-meta { font-size: 10px; }
.q-actions { opacity: 0; transition: opacity .15s; }
.q-item:hover .q-actions, .q-item:focus-within .q-actions { opacity: 1; }
@media (hover: none) { .q-actions { opacity: 1; } }
.votes { background: var(--slate8); border-radius: 8px; padding: 2px 0; }
.votes button { width: 30px; height: 22px; }
.votes .score { font-size: 10px; line-height: 12px; }
.drag { color: #475569; }
.chat-form .send { width: 44px; height: 44px; border-radius: 12px; background: var(--grad); color: #fff; border: 0; }
@media (max-width: 1400px) { .rt-txt { display: inline; } .rtab#rtStats .rt-txt { display: none; } }

/* ---------- Kinomodus ---------- */
body.theater .sidebar, body.theater .side-right, body.theater .now-card, body.theater .poll-bar { display: none !important; }
body.theater .layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main"; max-width: 1500px; }
body.theater .glow-bg { background: #000; }

.ctrl-row { gap: 6px; flex-wrap: nowrap; }
.ctrl-row .time { margin-left: 4px; }
.vol input { width: 64px; }
@media (max-width: 760px) { .ctrl-row { flex-wrap: wrap; } .vol input { width: 56px; } }
.ab-icon.danger-btn { color: var(--error) !important; }
.add-bar .ab-actions .ms { position: static; left: auto; color: inherit; }
.add-bar .ab-go .ms { font-size: 16px; }
.add-bar .ab-icon .ms { font-size: 17px; }
body.theater .main { width: 100%; max-width: calc((100vh - 240px) * 1.7778); margin: 0 auto; }
.rc-invite { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 10px; border-radius: 8px; background: var(--grad); color: #fff; font: 600 12px/1 var(--body); box-shadow: var(--glow); }
.rc-invite .ms { font-size: 15px; }
button.room-chip { max-width: 380px; }
@media (max-width: 600px) { .rc-inv-txt { display: none; } .rc-invite { padding: 0 7px; } }

button.room-chip.copied { border-color: #34d399; box-shadow: 0 0 0 1px #34d399; }

/* ---------- Größere Kameras + Kinomodus mit Kameras ---------- */
:root { --side-w: 300px; }
body.has-cams { --side-w: clamp(340px, 27vw, 520px); }
.layout { grid-template-columns: var(--side-w) minmax(0, 1fr) 340px; }
.cam-tile .nm { font-size: 13px; }
@media (max-width: 1280px) {
  .layout { grid-template-columns: minmax(0, 1fr) 320px; }
  body.has-cams .sidebar { grid-template-columns: minmax(0, 1fr); }
  body.has-cams .cam-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}
/* Kinomodus: Warteschlange/Chat weg, Kameras rechts neben dem Player */
body.theater .layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main"; max-width: none; }
body.theater.has-cams .layout { grid-template-columns: minmax(0, 1fr) clamp(300px, 24vw, 460px); grid-template-areas: "main side"; }
body.theater.has-cams .sidebar { display: flex !important; position: sticky; top: 84px; max-height: calc(100vh - 104px); overflow-y: auto; }
body.theater.has-cams .sidebar .roster, body.theater.has-cams .audio-card .ch-title { display: none; }
body.theater .main { max-width: calc((100vh - 240px) * 1.7778); }
@media (max-width: 960px) { body.theater.has-cams .layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "side"; } body.theater.has-cams .sidebar { position: static; max-height: none; } }
.audio-card .voice-ctl { display: block; }

/* ---- Kameras im Vollbild (v20) ---- */
.fs-cams { display: none; }
.stage:fullscreen .fs-cams:not([hidden]) { display: block; position: absolute; inset: 0; pointer-events: none; z-index: 30; }
.fs-tile { position: absolute; overflow: hidden; border-radius: 14px; background: #000; border: 2px solid rgba(255,255,255,.12); box-shadow: 0 8px 30px rgba(0,0,0,.5); pointer-events: auto; transition: opacity .4s, border-color .2s, box-shadow .2s; }
.fs-tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.fs-tile.self video { transform: scaleX(-1); }
.fs-tile .nm { position: absolute; left: 8px; bottom: 6px; font: 600 12px/1.2 Inter, sans-serif; color: #fff; text-shadow: 0 1px 3px #000; }
.fs-tile.speaking { border-color: #4cd7f6; box-shadow: 0 0 0 3px rgba(76,215,246,.35), 0 8px 30px rgba(0,0,0,.5); opacity: 1 !important; }
/* A) Leiste */
.mode-rail .fs-tile { position: relative; width: 240px; aspect-ratio: 4/3; margin: 0 0 10px auto; }
.stage:fullscreen .mode-rail:not([hidden]) { left: auto; right: 16px; top: 16px; bottom: 90px; width: 240px; overflow-y: auto; scrollbar-width: none; }
.stage.idle .mode-rail .fs-tile { opacity: .45; }
.mode-rail.closed .fs-tile { display: none; }
.fs-toggle { pointer-events: auto; display: block; margin: 0 0 10px auto; width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer; color: #fff; background: rgba(15,20,32,.75); }
.mode-rail.closed .fs-toggle { background: linear-gradient(135deg,#06b6d4,#6366f1); }
.stage.idle .fs-toggle { opacity: .4; }
/* B) Bild-im-Bild */
.mode-pip .fs-tile { width: 220px; aspect-ratio: 4/3; cursor: grab; touch-action: none; }
.mode-pip .fs-tile.dragging { cursor: grabbing; opacity: .9; }
/* C) Nur wer spricht */
.mode-speaker .fs-tile { right: 24px; bottom: 90px; width: 160px; height: 160px; border-radius: 50%; opacity: 0; transform: scale(.85); transition: opacity .35s, transform .35s; pointer-events: none; }
.mode-speaker .fs-tile.show { opacity: 1; transform: none; }
.mode-speaker .fs-tile .nm { left: 0; right: 0; text-align: center; bottom: 14px; }
.hk-btn { text-align: left; cursor: pointer; font-family: ui-monospace, monospace; }
.hk-btn.capturing { box-shadow: 0 0 0 2px rgba(6,182,212,.7); color: #4cd7f6; }
select.input { appearance: auto; }
.mode-speaker .fs-tile:nth-of-type(2) { right: 200px; } .mode-speaker .fs-tile:nth-of-type(3) { right: 376px; } .mode-speaker .fs-tile:nth-of-type(4) { right: 552px; }

/* Link-Leiste exakt mittig (v21) */
.top-left { display: flex; align-items: center; gap: 16px; min-width: 0; }
@media (min-width: 961px) {
  .topbar { display: grid; grid-template-columns: var(--tb-side, 1fr) minmax(0, 640px) var(--tb-side, 1fr); justify-content: space-between; }
  .top-left .room-chip { flex-shrink: 0; }
  .topbar .add-bar { width: 100%; max-width: none; margin: 0; }
  .topbar .top-actions { justify-self: end; }
  .topbar.tb-tight { grid-template-columns: max-content minmax(0, 1fr) max-content; }
}
