/* ═══ Anruf-/Voice-Bühne ══════════════════════════════════════════════════ */
.stage { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; background: color-mix(in srgb, #000 40%, var(--bg)); overflow: hidden; }
.stage.compact { flex: none; height: 38%; min-height: 220px; border-bottom: 1px solid var(--border); }
.stage-grid { flex: 1; min-height: 0; display: grid; gap: .6rem; padding: .75rem; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); align-content: center; }
.stage-grid.spotlight { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) 120px; }
.stage-strip { display: flex; gap: .5rem; overflow-x: auto; }
.stage-strip .tile { flex: none; width: 190px; }
.tile { position: relative; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; display: grid; place-items: center; min-height: 0; transition: box-shadow var(--t), border-color var(--t); isolation: isolate; }
.tile.speaking { border-color: var(--success); box-shadow: 0 0 0 2px color-mix(in srgb, var(--success) 70%, transparent), 0 0 24px -2px color-mix(in srgb, var(--success) 45%, transparent); }
.tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; z-index: 0; }
.tile.screen video { object-fit: contain; }
.tile.mirror video { transform: scaleX(-1); }
.tile .center { position: relative; z-index: 1; display: grid; justify-items: center; gap: .5rem; }
.tile .center .avatar { --s: clamp(56px, 16%, 96px); }
.tile.has-video .center { display: none; }
.tile .label { position: absolute; left: .6rem; bottom: .55rem; z-index: 2; display: flex; align-items: center; gap: .4rem; padding: .22rem .55rem; border-radius: 99px; background: rgba(8, 9, 12, .62); backdrop-filter: blur(8px); color: #fff; font-size: .78rem; font-weight: 550; max-width: calc(100% - 1.2rem); }
.tile .label .icon { width: 13px; height: 13px; }
.tile .label .bad { color: var(--danger); }
.tile .tools { position: absolute; right: .5rem; top: .5rem; z-index: 3; display: flex; gap: .25rem; opacity: 0; transition: opacity var(--t); }
.tile:hover .tools, .tile:focus-within .tools { opacity: 1; }
@media (hover: none) { .tile .tools { opacity: 1; } }
.tile .tools .icon-btn { background: rgba(8, 9, 12, .62); color: #fff; width: 30px; height: 30px; backdrop-filter: blur(8px); }
.tile .conn { position: absolute; left: .6rem; top: .55rem; z-index: 2; font-size: .72rem; padding: .15rem .5rem; border-radius: 99px; background: rgba(8, 9, 12, .62); color: var(--warning); display: flex; align-items: center; gap: .35rem; }
.tile .conn.bad { color: var(--danger); }
.tile .conn .spinner { width: 10px; height: 10px; border-width: 2px; }
.tile .live { position: absolute; left: .6rem; top: .55rem; z-index: 2; background: var(--danger); color: #fff; font-size: .66rem; font-weight: 700; letter-spacing: .06em; padding: .12rem .45rem; border-radius: 6px; }
.stage-controls { flex: none; display: flex; justify-content: center; align-items: center; gap: .6rem; padding: .75rem .75rem calc(.9rem + var(--safe-bottom)); flex-wrap: wrap; }
.ctl-btn { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); border: 1px solid var(--border-strong); color: var(--text); transition: background var(--t-fast), transform var(--t-fast), color var(--t-fast); position: relative; }
.ctl-btn:hover { background: var(--surface-4); }
.ctl-btn:active { transform: scale(.92); }
.ctl-btn.off { background: color-mix(in srgb, var(--danger) 20%, var(--surface-3)); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.ctl-btn.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.ctl-btn.leave { background: var(--danger); color: #fff; border-color: transparent; width: 64px; border-radius: 26px; }
.ctl-btn.leave:hover { background: color-mix(in srgb, var(--danger) 85%, white); }
.ctl-btn .icon { width: 22px; height: 22px; }
.ctl-btn[disabled] { opacity: .4; pointer-events: none; }
.stage-top { position: absolute; z-index: 5; top: .7rem; left: .8rem; right: .8rem; display: flex; gap: .5rem; align-items: center; pointer-events: none; }
.stage-top > * { pointer-events: auto; }
.pill { display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .65rem; border-radius: 99px; background: rgba(8, 9, 12, .6); backdrop-filter: blur(8px); color: #fff; font-size: .78rem; font-weight: 550; }

/* Voice-Kanal Beitritts-Ansicht */
.voice-lobby { flex: 1; display: grid; place-items: center; text-align: center; padding: 2rem; }
.voice-lobby .inner { display: grid; gap: 1rem; justify-items: center; max-width: 460px; }
.voice-lobby .faces { display: flex; }
.voice-lobby .faces .avatar { --s: 48px; margin-left: -10px; border: 3px solid var(--surface-2); }
.voice-lobby .faces .avatar:first-child { margin-left: 0; }
.voice-lobby h2 { font-size: 1.5rem; }

/* Teilnehmerliste (Seitenpanel) */
.participants { width: 260px; flex: none; border-left: 1px solid var(--border); overflow-y: auto; padding: .6rem; background: color-mix(in srgb, var(--surface-1) 70%, transparent); }
@media (max-width: 1000px) { .participants { display: none; } }

/* Eingehender Anruf */
.ring-card { position: fixed; z-index: 350; right: 1rem; top: calc(1rem + var(--safe-top)); width: min(340px, calc(100vw - 2rem)); padding: 1rem; display: grid; gap: .8rem; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow); animation: slide-up var(--t) var(--ease); }
.ring-card .who { display: flex; align-items: center; gap: .8rem; }
.ring-card .who .avatar { --s: 52px; animation: ring-pulse 1.4s infinite; }
.ring-card .who .t { font-weight: 650; }
.ring-card .who .s { font-size: .82rem; color: var(--muted); }
.ring-card .acts { display: flex; gap: .5rem; }
.ring-card .acts .btn { flex: 1; }
.btn.accept { background: var(--success); color: #04120b; border-color: transparent; }

/* Geräte-Einstellungen */
.meter { height: 8px; border-radius: 8px; background: var(--surface-4); overflow: hidden; }
.meter > i { display: block; height: 100%; width: var(--lvl, 0%); background: linear-gradient(90deg, var(--success), var(--warning) 80%, var(--danger)); transition: width 60ms linear; }

@media (max-width: 820px) {
  .stage-grid { padding: .5rem; gap: .4rem; grid-template-columns: repeat(var(--cols-m, 1), minmax(0, 1fr)); }
  .ctl-btn { width: 48px; height: 48px; }
  .stage.compact { height: 45%; }
}

/* Gemeinsam schauen */
.watch-panel { margin: .5rem; padding: .6rem; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border-strong); display: grid; gap: .5rem; }
.watch-head { display: flex; align-items: center; gap: .5rem; font-size: .85rem; }
.watch-video { width: 100%; max-height: 46vh; background: #000; border-radius: 8px; }
.watch-audio { width: 100%; }
