/* Couchkino: Aussehen wie die anderen italf-Seiten (schlank, hell/dunkel nach System). Farben und Maße als Variablen ganz oben. */
:root {
  --bg: #f6f7f9; --surface: #ffffff; --surface-2: #f1f3f6; --surface-3: #e8ebf0;
  --border: #e3e6ec; --border-strong: #d3d8e0;
  --text: #0f1729; --text-2: #4b5567; --text-3: #8a94a6;
  --accent: #e5533d; --accent-soft: #fdeeea; --accent-text: #c23a24; --btn: #e0523b;
  --danger: #e5484d; --danger-soft: #fdecec; --warn: #f08c00; --ok: #18a058; --ok-soft: #e4f6ec;
  --radius: 0.875rem; --radius-sm: 0.625rem;
  --shadow-sm: 0 1px 0.125rem rgb(15 23 41 / 0.05);
  --shadow: 0 1px 0.125rem rgb(15 23 41 / 0.04), 0 0.25rem 1rem rgb(15 23 41 / 0.06);
  --shadow-lg: 0 0.5rem 2.5rem rgb(15 23 41 / 0.16), 0 0.125rem 0.5rem rgb(15 23 41 / 0.06);
  --overlay: rgb(15 23 41 / 0.32); --blur-bg: rgb(246 247 249 / 0.82);
  --font: ui-sans-serif, system-ui, -apple-system, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --sidebar: 15rem; --nav-h: 4rem;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0e13; --surface: #14171e; --surface-2: #1a1e27; --surface-3: #232835;
    --border: #252a36; --border-strong: #323849;
    --text: #e8eaf0; --text-2: #a4abbb; --text-3: #6c7487;
    --accent: #ff7a5c; --accent-soft: #3a1c16; --accent-text: #ff9b82; --btn: #e0523b;
    --danger: #ff6369; --danger-soft: #3a1618; --ok: #3dd68c; --ok-soft: #12301f;
    --shadow-sm: none; --shadow: 0 0 0 1px rgb(255 255 255 / 0.03); --shadow-lg: 0 0.75rem 3rem rgb(0 0 0 / 0.6);
    --overlay: rgb(0 0 0 / 0.55); --blur-bg: rgb(12 14 19 / 0.8);
    color-scheme: dark;
  }
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 1rem; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; -webkit-tap-highlight-color: transparent; }
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--accent-text); }
:focus-visible { outline: 0.125rem solid var(--accent); outline-offset: 0.125rem; border-radius: 0.375rem; }
h1, h2, h3 { margin: 0 0 .6rem; line-height: 1.2; }
h1 { font-size: 1.875rem; font-weight: 750; letter-spacing: -0.025em; }
h2 { font-size: 1.0938rem; font-weight: 650; letter-spacing: -0.01em; }
h3 { font-size: 0.875rem; font-weight: 650; color: var(--text-2); }
.mu { color: var(--text-3); } .tx2 { color: var(--text-2); } .small { font-size: 0.8438rem; } .ctr { text-align: center; } .right { text-align: right; }
.nowrap { white-space: nowrap; } .num { font-variant-numeric: tabular-nums; }
svg.i { width: 1.25rem; height: 1.25rem; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Seitenkopf, Karten, Kacheln ---------- */
.topline { display: flex; align-items: flex-end; gap: 0.75rem; flex-wrap: wrap; padding: 0 0 1rem; }
.topline h1 { margin: 0; } .topline .sp { flex: 1; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem; margin-bottom: 1rem; }
.panel.flat { padding: 0; overflow: hidden; }
.panel > .hd { display: flex; align-items: center; gap: 0.625rem; flex-wrap: wrap; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); font-weight: 650; }
.panel > .hd .sp { flex: 1; }
.grid2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1rem; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.grid2 > *, .grid3 > *, .an > * { min-width: 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.125rem, 1fr)); gap: 0.625rem; margin-bottom: 1rem; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 0.75rem 0.875rem; display: flex; flex-direction: column; gap: 0.125rem; }
.tile b { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.tile span { color: var(--text-3); font-size: 0.8438rem; font-weight: 500; }
.empty { padding: 2.5rem 1.25rem; text-align: center; color: var(--text-2); }
.empty h2 { color: var(--text); }

/* ---------- Knöpfe und Formulare ---------- */
button, input, select, textarea { font: inherit; color: inherit; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; height: 2.5rem; padding: 0 1rem; border-radius: 0.6875rem; border: 0;
  background: var(--surface-2); color: var(--text); font-weight: 600; font-size: 0.9688rem; cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background .15s, transform .1s, opacity .15s; }
.btn:hover { background: var(--surface-3); color: var(--text); }
.btn:active { transform: scale(0.98); }
.btn.pri, .btn.on { background: var(--btn); color: #fff; box-shadow: 0 1px 0.125rem rgb(0 0 0 / .12), inset 0 1px 0 rgb(255 255 255 / .12); }
.btn.pri:hover, .btn.on:hover { background: color-mix(in srgb, var(--btn) 88%, #000); color: #fff; }
.btn.ghost { background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.danger { background: var(--danger-soft); color: var(--danger); }
.btn.big { height: 3.125rem; font-size: 1.0938rem; border-radius: 0.875rem; padding: 0 1.375rem; }
.btn.sm { height: 2rem; padding: 0 0.6875rem; font-size: 0.875rem; border-radius: 0.5625rem; }
.btn.block { display: flex; width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.row { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; } .row.c { justify-content: center; }
input, select, textarea { background: var(--surface); border: 1px solid var(--border-strong); border-radius: 0.6875rem; height: 2.625rem; padding: 0 0.75rem; font-size: 1rem; outline: none;
  transition: border-color .15s, box-shadow .15s; color: var(--text); }
input[type=checkbox] { height: auto; }
textarea { height: auto; padding: 0.625rem 0.75rem; width: 100%; font: 0.8125rem/1.45 ui-monospace, "SF Mono", Menlo, Consolas, monospace; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 0.1875rem color-mix(in srgb, var(--accent) 22%, transparent); }
.field { display: flex; flex-direction: column; gap: 0.375rem; margin-bottom: 0.875rem; }
.field > span { font-size: 0.8438rem; font-weight: 600; color: var(--text-2); }
.frow { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; padding: 0.6875rem 0; border-bottom: 1px solid var(--border); }
.frow:last-child { border-bottom: 0; }
.frow > span:first-child { font-weight: 550; }
.frow select, .frow input { min-width: 9rem; }
.seg { display: inline-grid; grid-auto-flow: column; padding: 0.1875rem; gap: 0.125rem; border-radius: 0.75rem; background: var(--surface-3); }
.seg button { border: 0; background: transparent; padding: 0.375rem 0.75rem; border-radius: 0.5625rem; font-size: 0.9062rem; font-weight: 600; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), 0 1px 0.1875rem rgb(0 0 0 / .08); }
.tabs { display: inline-flex; gap: 0.125rem; padding: 0.1875rem; border-radius: 0.75rem; background: var(--surface-3); margin-bottom: 1.125rem; max-width: 100%; overflow-x: auto; }
.tabs a { padding: 0.4375rem 0.875rem; border-radius: 0.5625rem; font-size: 0.9375rem; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.tabs a.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), 0 1px 0.1875rem rgb(0 0 0 / .08); }
.msg { padding: 0.6875rem 0.875rem; border-radius: 0.75rem; background: var(--accent-soft); color: var(--accent-text); margin: 0.625rem 0; font-size: 0.9375rem; }
.msg.err { background: var(--danger-soft); color: var(--danger); } .msg.ok { background: var(--ok-soft); color: var(--ok); }
.badge-n { display: inline-block; font-size: 0.75rem; font-weight: 650; padding: 0.125rem 0.4375rem; border-radius: 0.375rem; background: var(--surface-2); color: var(--text-2); }
.live { color: var(--danger); font-weight: 700; font-size: 0.8125rem; letter-spacing: .03em; white-space: nowrap; display: inline-flex; align-items: center; }
/* ---------- Anmeldung ---------- */
.login { max-width: 26.25rem; margin: 4vh auto; }
.login .panel { padding: 2rem 1.625rem 1.625rem; border-radius: 1.5rem; box-shadow: var(--shadow-lg); }
.login h1 { text-align: center; font-size: 1.625rem; }
.or { display: flex; align-items: center; gap: 0.625rem; color: var(--text-3); margin: 1rem 0; font-size: 0.8438rem; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.code { font: 600 1.4rem/1.2 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .04em; background: var(--surface-2); border-radius: 0.75rem; padding: 0.875rem; text-align: center; margin: 0.75rem 0; user-select: all; }
.steps { padding-left: 1.2em; margin: 0.5rem 0; line-height: 1.6; color: var(--text-2); }

/* ---------- Dialog, Meldung ---------- */
dialog { background: var(--surface); color: var(--text); border: 0; border-radius: 1.25rem; padding: 1.375rem; max-width: 31.25rem; width: calc(100% - 1.5rem); box-shadow: var(--shadow-lg); }
dialog::backdrop { background: var(--overlay); }
dialog h2 { font-size: 1.1562rem; font-weight: 700; }
#toast { position: fixed; left: 50%; bottom: calc(1.5rem + var(--safe-b)); transform: translateX(-50%); z-index: 2000; padding: 0.6875rem 1rem; border-radius: 0.8125rem;
  background: #1b1f2a; color: #fff; box-shadow: var(--shadow-lg); font-size: 0.9375rem; font-weight: 500; max-width: calc(100vw - 2rem); }
#toast:empty { display: none; }

/* ---------- Großer Bildschirm: alles etwas größer ---------- */
.live::before { content: ""; width: 0.4375rem; height: 0.4375rem; border-radius: 50%; background: var(--danger); margin-right: 0.3125rem; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.off { color: var(--text-3); font-weight: 700; font-size: 0.8125rem; letter-spacing: .03em; white-space: nowrap; }
details summary { cursor: pointer; }
.av { width: 2rem; height: 2rem; border-radius: 0.625rem; display: inline-grid; place-items: center; font-weight: 700; color: #fff; flex: none; font-size: 0.875rem; }

/* Player */
.stage { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); color: #fff; user-select: none; }
.stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.stage:fullscreen { border-radius: 0; }
.stage .cover { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 1rem; background: radial-gradient(ellipse at center, #1a1e27 0%, #000 75%); z-index: 2; }
.stage .cover h2 { color: #fff; margin: 0.5rem 0 0.25rem; font-size: 1.25rem; }
.stage .cover p { margin: 0; color: #a4abbb; font-size: 0.9375rem; }
.stage .cover .big-i { width: 3rem; height: 3rem; opacity: .6; }
.spin { width: 2.25rem; height: 2.25rem; border: 0.1875rem solid rgb(255 255 255 / .2); border-top-color: #fff; border-radius: 50%; animation: rot .9s linear infinite; margin: 0 auto; }
@keyframes rot { to { transform: rotate(360deg); } }
.stage .unmute { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 4; }
.stage .bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 0.25rem; padding: 2.5rem 0.625rem 0.5rem;
  background: linear-gradient(transparent, rgb(0 0 0 / .65)); opacity: 0; transition: opacity .2s; }
.stage:hover .bar, .stage.show-bar .bar, .stage:focus-within .bar { opacity: 1; }
.stage .bar .sp { flex: 1; }
.stage .pbtn { width: 2.375rem; height: 2.375rem; border: 0; background: transparent; color: #fff; border-radius: 0.625rem; display: inline-grid; place-items: center; cursor: pointer; }
.stage .pbtn:hover { background: rgb(255 255 255 / .15); }
.stage .pbtn svg.i { width: 1.375rem; height: 1.375rem; }
.stage input[type=range] { width: 6rem; height: auto; padding: 0; border: 0; background: transparent; accent-color: #fff; box-shadow: none; }
.stage .mode { font-size: 0.75rem; font-weight: 600; color: rgb(255 255 255 / .75); padding: 0 0.375rem; }
.stage .bar .live { color: #fff; } .stage .bar .live::before { background: #ff4d55; }
.floaters { position: absolute; inset: 0; pointer-events: none; z-index: 3; overflow: hidden; }
.floater { position: absolute; bottom: -2.5rem; font-size: 2rem; line-height: 1; animation: floatup 3.2s ease-out forwards; filter: drop-shadow(0 2px 4px rgb(0 0 0 / .4)); }
.floater small { display: block; font-size: 0.6875rem; font-weight: 700; color: #fff; text-align: center; text-shadow: 0 1px 2px rgb(0 0 0 / .8); white-space: nowrap; }
@keyframes floatup {
  0% { transform: translate(0, 0) scale(.6); opacity: 0; }
  10% { opacity: 1; transform: translate(0, -2rem) scale(1.1); }
  100% { transform: translate(var(--dx, 0), -22rem) scale(1); opacity: 0; }
}
.reacts { display: flex; gap: 0.375rem; flex-wrap: wrap; margin: 0.625rem 0 0; }
.reacts button { border: 1px solid var(--border); background: var(--surface); border-radius: 0.75rem; height: 2.5rem; min-width: 2.75rem; font-size: 1.25rem; cursor: pointer;
  transition: transform .1s, background .15s; }
.reacts button:hover { background: var(--surface-2); }
.reacts button:active { transform: scale(0.88); }


/* ---------- Rahmen: schmale Kopfzeile oben ---------- */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 0.75rem; height: 3.5rem; padding: var(--safe-t) 1.25rem 0;
  background: var(--blur-bg); backdrop-filter: saturate(1.6) blur(0.875rem); -webkit-backdrop-filter: saturate(1.6) blur(0.875rem); border-bottom: 1px solid var(--border); }
.top .logo { display: flex; align-items: center; gap: 0.5rem; font-weight: 800; font-size: 1.0625rem; letter-spacing: -0.02em; color: var(--text); }
.top .logo img { width: 1.875rem; height: 1.875rem; }
.top .sp { flex: 1; }
#nav { display: flex; align-items: center; gap: 0.25rem; }
#nav a { display: inline-flex; align-items: center; gap: 0.5rem; height: 2.375rem; padding: 0 0.75rem; border-radius: 0.625rem; color: var(--text-2); font-weight: 550; font-size: 0.9375rem; }
#nav a:hover { background: var(--surface-2); color: var(--text); }
#nav a.on { background: var(--accent-soft); color: var(--accent-text); }
#nav .av { width: 1.625rem; height: 1.625rem; border-radius: 0.5rem; font-size: 0.75rem; }
#app { max-width: 70rem; margin: 0 auto; padding: 1.5rem 1.25rem 5rem; }
body.in-room #app { max-width: 112rem; padding: 0.875rem 1rem 1.5rem; }
.narrow { max-width: 36rem; }
.spin.dark { border-color: var(--border); border-top-color: var(--accent); }
.av { width: 2rem; height: 2rem; border-radius: 0.625rem; display: inline-grid; place-items: center; font-weight: 700; color: #fff; flex: none; font-size: 0.875rem; }
.live::before { content: ""; width: 0.4375rem; height: 0.4375rem; border-radius: 50%; background: var(--danger); margin-right: 0.3125rem; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.off { color: var(--text-3); font-weight: 700; font-size: 0.8125rem; letter-spacing: .03em; white-space: nowrap; }
.check { display: flex; align-items: center; gap: 0.625rem; cursor: pointer; font-weight: 550; margin: 0.875rem 0 0.25rem; }
.check input { width: 1.125rem; height: 1.125rem; accent-color: var(--accent); }
.frow.check { margin: 0; }
.copy { display: flex; gap: 0.375rem; align-items: center; min-width: 0; }
.copy code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: var(--surface-2); border-radius: 0.5rem; padding: 0.4375rem 0.625rem;
  font: 0.8438rem/1.3 ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.ulist .who small { display: block; color: var(--text-3); font-size: 0.8125rem; }
.ulist .frow > .row { flex-wrap: nowrap; flex: none; }
.rolesel { height: 2rem; padding: 0 0.5rem; font-size: 0.875rem; border-radius: 0.5625rem; min-width: 0 !important; }

/* ---------- Startseite ---------- */
.welcome { max-width: 34rem; margin: 6vh auto 0; text-align: center; }
.welcome h1 { font-size: 2rem; }
.welcome > p { font-size: 1.0625rem; margin: 0 0 1.5rem; }
.hero-logo { width: 5.5rem; height: 5.5rem; margin-bottom: 1rem; filter: drop-shadow(0 0.5rem 1.25rem rgb(224 82 59 / .35)); }
.join-logo { display: block; width: 3.5rem; height: 3.5rem; margin: 0 auto 0.75rem; }
.home h1 { margin-bottom: 1rem; }
.rooms { display: grid; gap: 0.5rem; }
.room-card { display: flex; align-items: center; gap: 0.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 0.375rem 0.5rem 0.375rem 0; }
.rc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 0.5rem 1rem; }
.rc-main b { font-size: 1.0625rem; }
.rc-main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Sitzung: Bühne links, Chat rechts ---------- */
.room { display: grid; grid-template-columns: minmax(0, 1fr) 22rem; gap: 1rem; align-items: start; }
.rmain { min-width: 0; }
.rhead { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; min-height: 2.25rem; }
.rhead h1 { margin: 0; font-size: 1.25rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.rhead .sp { flex: 1; }
.faces { gap: 0; padding: 0 0.5rem; }
.faces .av { width: 1.625rem; height: 1.625rem; font-size: 0.75rem; border-radius: 50%; border: 2px solid var(--bg); margin-left: -0.375rem; }
.faces .av:first-child { margin-left: 0; }
.faces > span:last-child { margin-left: 0.375rem; }
.stage .embed { position: absolute; inset: 0; }
.stage .embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.stage .cover { z-index: 2; }
.stage .cover-logo { width: 4rem; height: 4rem; opacity: .9; }
.stage .cover p { max-width: 32rem; }
.stage .tap { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 6; box-shadow: 0 0.5rem 2rem rgb(0 0 0 / .5); }
.stage .unmute { z-index: 6; }
/* Eingebettete Player bekommen die Maus (eigene Steuerung), Reaktionen fliegen darüber */
.stage .floaters { z-index: 3; }
.shareinfo { position: absolute; left: 0.75rem; top: 0.75rem; z-index: 4; background: rgb(0 0 0 / .6); color: #fff; padding: 0.375rem 0.625rem; border-radius: 0.5rem; font-size: 0.8125rem; font-weight: 550; max-width: calc(100% - 1.5rem); }
.shareinfo .live { color: #fff; } .shareinfo .live::before { background: #ff4d55; }
.shareinfo .off { color: #ddd; }
.shareinfo .warn { color: #ffd27a; margin-top: 0.25rem; }
.nowp { display: flex; align-items: center; gap: 0.625rem; min-height: 3rem; padding: 0.625rem 0.125rem 0.25rem; }
.nowp .nt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.nowp .nt a, .nowp .nt > span { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nowp .nt small { color: var(--text-3); font-size: 0.8125rem; }
.src { flex: none; font-size: 0.6875rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 0.1875rem 0.4375rem; border-radius: 0.375rem; background: var(--surface-3); color: var(--text-2); }
.src.youtube { background: #ff000018; color: #e01e1e; }
.src.twitch { background: #9146ff1c; color: #7c3aed; }
.src.screen { background: var(--accent-soft); color: var(--accent-text); }
.tools { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; margin-top: 0.25rem; }
.addbar { display: flex; gap: 0.5rem; flex: 1; min-width: min(100%, 22rem); }
.addin { flex: 1; min-width: 0; display: flex; align-items: center; gap: 0.5rem; padding: 0 0.75rem; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 0.6875rem; transition: border-color .15s, box-shadow .15s; }
.addin:focus-within { border-color: var(--accent); box-shadow: 0 0 0 0.1875rem color-mix(in srgb, var(--accent) 22%, transparent); }
.addin svg.i { color: var(--text-3); width: 1.125rem; height: 1.125rem; }
.addin input { border: 0; box-shadow: none !important; padding: 0; flex: 1; min-width: 0; background: transparent; }
.btn.share.danger { background: var(--danger-soft); color: var(--danger); }
.reacts { margin-top: 0.75rem; }
.qopts { display: grid; gap: 0.5rem; margin: 0.75rem 0 0.25rem; }
.qopts button { text-align: left; border: 1px solid var(--border-strong); background: var(--surface); border-radius: 0.75rem; padding: 0.625rem 0.875rem; cursor: pointer; display: flex; flex-direction: column; }
.qopts button.on { border-color: var(--accent); background: var(--accent-soft); }
.qopts small { color: var(--text-3); font-size: 0.8125rem; }

/* Seitenleiste */
.rside { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column;
  height: calc(100dvh - 3.5rem - 1.75rem); position: sticky; top: 4.375rem; overflow: hidden; }
.stabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.125rem; padding: 0.3125rem; border-bottom: 1px solid var(--border); }
.stabs button { display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem; border: 0; background: transparent; color: var(--text-2); font-weight: 600; font-size: 0.875rem; height: 2.25rem; border-radius: 0.5625rem; cursor: pointer; position: relative; }
.stabs button svg.i { width: 1.0625rem; height: 1.0625rem; }
.stabs button.on { background: var(--surface-2); color: var(--text); }
.stabs .n { font-size: 0.75rem; color: var(--text-3); font-weight: 700; }
.stabs .cnt { min-width: 1.125rem; height: 1.125rem; padding: 0 0.3125rem; border-radius: 0.5625rem; background: var(--accent); color: #fff; font-size: 0.6875rem; font-weight: 700; display: grid; place-items: center; }
.pane { flex: 1; min-height: 0; overflow-y: auto; }
.chatpane { display: flex; flex-direction: column; overflow: hidden; }
.msgs { flex: 1; overflow-y: auto; padding: 0.5rem 0; overscroll-behavior: contain; }
.cm { padding: 0.25rem 0.875rem; font-size: 0.9375rem; line-height: 1.45; overflow-wrap: anywhere; }
.cm .n { font-weight: 700; }
.cm a { color: var(--accent-text); text-decoration: underline; }
.cm.sys { color: var(--text-3); font-size: 0.8125rem; font-style: italic; }
.rb { display: inline-block; font-size: 0.625rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 0.0625rem 0.3125rem; border-radius: 0.3125rem;
  background: var(--accent-soft); color: var(--accent-text); margin-right: 0.3125rem; vertical-align: 0.125rem; }
.rb.share { background: var(--ok-soft); color: var(--ok); }
.cform { display: flex; gap: 0.5rem; padding: 0.625rem; border-top: 1px solid var(--border); }
.cform input { flex: 1; min-width: 0; }
.cform .btn { padding: 0 0.875rem; }
.qpane, .ppane { padding: 0.5rem; }
.qi { display: flex; align-items: center; gap: 0.625rem; padding: 0.375rem; border-radius: 0.625rem; }
.qi:hover { background: var(--surface-2); }
.qi img, .qph { width: 4.5rem; height: 2.5rem; border-radius: 0.375rem; object-fit: cover; flex: none; background: var(--surface-3); display: grid; place-items: center; color: var(--text-3); }
.qt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.qt b { font-size: 0.875rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.qt small { color: var(--text-3); font-size: 0.75rem; }
.qa { display: flex; flex: none; }
.qa .btn { width: 2rem; padding: 0; }
.person { display: flex; align-items: center; gap: 0.625rem; padding: 0.4375rem 0.5rem; border-radius: 0.625rem; }
.person:hover { background: var(--surface-2); }
.person .pn { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person .pn small { color: var(--text-3); font-weight: 500; }
.person .rb { margin: 0; }
.empty.small { padding: 1.5rem 1rem; font-size: 0.9375rem; }
.empty.small p { margin: 0 0 0.5rem; }

/* ---------- Große Bildschirme ---------- */
@media (min-width: 1500px) { .room { grid-template-columns: minmax(0, 1fr) 25rem; } }
/* Bühne nie höher als der Bildschirm (Laptop): dann schmaler statt abgeschnitten */
@media (min-width: 1101px) { .rmain .stage { max-height: calc(100dvh - 15rem); } }

/* ---------- Tablet / Handy ---------- */
@media (max-width: 1100px) {
  .room { grid-template-columns: 1fr; }
  .rside { position: static; height: min(32rem, 65dvh); }
  .grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  #app { padding: 1rem 1rem 4rem; }
  body.in-room #app { padding: 0 0 1rem; }
  .room > *, .rmain > :not(.stage) { margin-left: 0.75rem; margin-right: 0.75rem; }
  .rmain { margin: 0 !important; }
  .rmain > .rhead { margin-top: 0.625rem; }
  .stage { border-radius: 0; }
  .hide-s { display: none; }
  .rhead .btn:not(.faces) span { display: none; }
  .reacts { flex-wrap: nowrap; gap: 0.25rem; }
  .reacts button { flex: 1; min-width: 0; padding: 0; font-size: 1.125rem; }
  .tools .btn.share { flex: 1; }
  .frow { flex-direction: column; align-items: stretch; }
  .ulist .frow { flex-direction: row; flex-wrap: wrap; }
  .stage input[type=range] { display: none; }
  .top { padding-left: 1rem; padding-right: 0.75rem; }
  .welcome h1 { font-size: 1.625rem; }
  dialog { margin: auto auto 0; max-width: none; width: 100%; border-radius: 1.375rem 1.375rem 0 0; padding: 1.125rem 1.125rem calc(1.125rem + var(--safe-b)); }
  .stage .bar { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .floater { display: none; }
}
