/* Videoruf mit Gast-Link: Seite für den Disponenten (index.html) und fürs Handy (gast.html). Dunkel als Vorgabe. */
:root {
  color-scheme: dark;
  --grund: #0d131a; --karte: #151d27; --karte-2: #1b2531; --rand: #26313f; --text: #e6edf5; --leise: #8b9bb0;
  --akzent: #2fbf71; --akzent-dunkel: #1f8a51; --blau: #4b8bdc; --warn: #e5484d; --gelb: #f5a524;
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--grund); color: var(--text); }
h1 { font-size: 1.3rem; margin: 0; }
h2 { font-size: .78rem; margin: 0 0 .6rem; text-transform: uppercase; letter-spacing: .06em; color: var(--leise); }
a { color: var(--blau); }
button, input { font: inherit; }
button { font-weight: 600; padding: .55rem 1rem; border-radius: .65rem; border: 1px solid var(--rand); cursor: pointer;
  background: var(--karte-2); color: inherit; }
button:disabled { cursor: default; opacity: .5; }
button.haupt { background: var(--akzent); border-color: var(--akzent); color: #fff; }
button.haupt:hover:not(:disabled) { background: var(--akzent-dunkel); }
button.rot { background: var(--warn); border-color: var(--warn); color: #fff; }
button.aus { background: #3a2226; border-color: var(--warn); }
input { padding: .55rem .75rem; border-radius: .65rem; border: 1px solid var(--rand); background: var(--grund); color: inherit;
  min-width: 0; }
.hinweis { color: var(--leise); font-size: .9rem; }
.fehler { color: var(--warn); }
.gut { color: var(--akzent); }

/* ---------- Disponent ---------- */
.kopf { display: flex; align-items: center; gap: 1rem; padding: .8rem 1.2rem; border-bottom: 1px solid var(--rand);
  background: var(--karte); }
.kopf .wer { margin-left: auto; color: var(--leise); }
.inhalt { display: grid; grid-template-columns: minmax(300px, 380px) 1fr; gap: 1rem; padding: 1rem 1.2rem;
  height: calc(100% - 58px); }
@media (max-width: 800px) { .inhalt { grid-template-columns: 1fr; height: auto; } }
.karte { background: var(--karte); border: 1px solid var(--rand); border-radius: .9rem; padding: 1rem; }
.spalte { display: flex; flex-direction: column; gap: 1rem; }
.zeile { display: flex; gap: .5rem; flex-wrap: wrap; }
.zeile input { flex: 1 1 12rem; }
.link { font-family: ui-monospace, Menlo, monospace; font-size: .8rem; word-break: break-all; background: var(--grund);
  border: 1px solid var(--rand); border-radius: .5rem; padding: .5rem; }
.bild { position: relative; background: #000; border-radius: .9rem; overflow: hidden; min-height: 360px;
  display: flex; align-items: center; justify-content: center; }
.bild .gegenueber { width: 100%; height: 100%; display: flex; }
.bild .gegenueber video { width: 100%; height: 100%; object-fit: contain; }
.bild .warten { position: absolute; color: var(--leise); text-align: center; padding: 1rem; }
.bild .selbst { position: absolute; right: .8rem; bottom: .8rem; width: 22%; min-width: 120px; border-radius: .6rem;
  overflow: hidden; border: 2px solid rgba(255, 255, 255, .5); background: #111; }
.bild .selbst video { display: block; width: 100%; transform: scaleX(-1); }
.bild .name { position: absolute; left: .8rem; top: .8rem; background: rgba(0, 0, 0, .55); padding: .2rem .6rem;
  border-radius: .4rem; font-size: .85rem; }
.knoepfe { display: flex; gap: .5rem; flex-wrap: wrap; }
ol.protokoll { margin: 0; padding-left: 1.2rem; font-size: .82rem; color: var(--leise); max-height: 12rem; overflow: auto; }

/* ---------- Gast (Handy, Vollbild) ---------- */
body.gast { overflow: hidden; }
.gast .vollbild { position: fixed; inset: 0; background: #000; }
.gast .gegenueber, .gast .gegenueber video { width: 100%; height: 100%; }
.gast .gegenueber video { object-fit: cover; }
.gast .selbst { position: fixed; right: 12px; top: calc(env(safe-area-inset-top) + 12px); width: 28vw; max-width: 160px;
  border-radius: 12px; overflow: hidden; border: 2px solid rgba(255, 255, 255, .6); background: #111; z-index: 2; }
.gast .selbst video { display: block; width: 100%; }
.gast .selbst.vorne video { transform: scaleX(-1); }
.gast .oben { position: fixed; left: 12px; top: calc(env(safe-area-inset-top) + 12px); z-index: 2;
  background: rgba(0, 0, 0, .55); padding: .3rem .7rem; border-radius: .5rem; font-size: .9rem; max-width: 60vw; }
.gast .unten { position: fixed; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; justify-content: center; gap: 18px;
  padding: 16px 16px calc(env(safe-area-inset-bottom) + 20px); background: linear-gradient(transparent, rgba(0, 0, 0, .6)); }
.gast .unten button { width: 64px; height: 64px; border-radius: 50%; padding: 0; font-size: 1.6rem;
  background: rgba(40, 48, 60, .85); border-color: rgba(255, 255, 255, .25); }
.gast .unten button.rot { background: var(--warn); }
.gast .unten button.aus { background: #5a2a30; }
.gast .start { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1.2rem; padding: 2rem; text-align: center; background: var(--grund); z-index: 3; }
.gast .start button { font-size: 1.15rem; padding: 1rem 2rem; border-radius: 1rem; }
.gast .warten { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--leise);
  text-align: center; padding: 2rem; }
