:root {
  color-scheme: dark;
  --bg: #0f1115;
  --panel: #161a21;
  --line: #232833;
  --fg: #e7ebf0;
  --dim: #97a1b0;
  --accent: #4c8dff;
  --ok: #35c46b;
  --warn: #f0b429;
  --bad: #ef5350;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg); color: var(--fg);
  /* Sagt dem Browser, dass seine EIGENEN Bauteile dunkel sein sollen. */
  color-scheme: dark;
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.hidden { display: none !important; }
.screen { height: 100%; display: flex; flex-direction: column; }

/* Beitreten */
#join { align-items: center; justify-content: center; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 28px; width: min(420px, 92vw); display: flex; flex-direction: column; gap: 12px;
}
.card h1 { margin: 0; font-size: 28px; letter-spacing: -.5px; }
.card .sub { margin: 0 0 8px; color: var(--dim); font-size: 14px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--dim); }
input:not([type=checkbox]):not([type=radio]):not([type=range]) {
  background: #0c0e12; border: 1px solid var(--line); color: var(--fg);
  border-radius: 8px; padding: 10px 12px; font-size: 15px;
  font-family: inherit;
}
input:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px;
}
input::placeholder { color: var(--dim); opacity: .8; }
/* Das Kalendersymbol im Terminfeld ist ein Browser-Bauteil - ohne diesen
   Hinweis zeichnet es der Browser hell und es verschwindet im dunklen Feld. */
input[type=datetime-local]::-webkit-calendar-picker-indicator { filter: invert(1); opacity: .7; }
input[type=datetime-local]::-webkit-calendar-picker-indicator:hover { opacity: 1; }
.row { display: flex; gap: 16px; }
.check { flex-direction: row; align-items: center; gap: 8px; color: var(--fg); }
button {
  background: #202634; color: var(--fg); border: 1px solid var(--line);
  border-radius: 8px; padding: 10px 14px; font-size: 14px; cursor: pointer;
}
button:hover { background: #2a3244; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
button.danger { background: #3a1d1f; border-color: #55282b; color: #ffb4b4; }
button.on { background: #1f3a2a; border-color: #2c5c3f; color: #a8ecc1; }
.err { color: var(--bad); min-height: 18px; margin: 0; font-size: 13px; }

/* Konferenz */
header, footer {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  background: var(--panel); border-bottom: 1px solid var(--line);
}
footer { border-bottom: none; border-top: 1px solid var(--line); flex-wrap: wrap; }
.brand { font-weight: 700; letter-spacing: -.3px; }
.spacer { flex: 1; }
.tag {
  font-size: 12px; color: var(--dim); background: #0c0e12;
  border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px;
}
.tag.ok { color: var(--ok); border-color: #23482f; }
.tag.warn { color: var(--warn); border-color: #4a3b16; }
.tag.bad { color: var(--bad); border-color: #52282a; }
main { flex: 1; display: flex; min-height: 0; }
.grid {
  flex: 1; display: grid; gap: 8px; padding: 8px; align-content: center;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.tile {
  position: relative; background: #000; border-radius: 10px; overflow: hidden;
  aspect-ratio: 16/9; border: 2px solid transparent;
}
.tile.speaking { border-color: var(--ok); }
.tile video { width: 100%; height: 100%; object-fit: cover; background: #000; }
.tile .nameplate {
  position: absolute; left: 8px; bottom: 8px; display: flex; gap: 6px; align-items: center;
  background: rgba(0,0,0,.55); padding: 3px 8px; border-radius: 6px; font-size: 12px;
}
.tile .quality {
  position: absolute; right: 8px; top: 8px; font-size: 11px; color: var(--dim);
  background: rgba(0,0,0,.55); padding: 2px 7px; border-radius: 6px;
}
.tile .placeholder {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--dim); font-size: 13px; text-align: center; padding: 12px;
}
aside {
  width: 320px; border-left: 1px solid var(--line); background: var(--panel);
  display: flex; flex-direction: column; min-height: 0;
}
.tabs { display: flex; border-bottom: 1px solid var(--line); }
.tabs button { border: none; border-radius: 0; background: transparent; flex: 1; color: var(--dim); }
.tabs button.active { color: var(--fg); box-shadow: inset 0 -2px 0 var(--accent); }
.tab { flex: 1; display: flex; flex-direction: column; min-height: 0; }
#chatLog, #infoLog { flex: 1; overflow: auto; padding: 10px; font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
#infoLog { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; color: var(--dim); }
#chatForm { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--line); }
#chatForm input { flex: 1; }
.msg .who { color: var(--accent); font-weight: 600; }
.msg.priv .who { color: var(--warn); }
@media (max-width: 720px) {
  aside { position: fixed; inset: 48px 0 56px 0; width: auto; z-index: 5; }
  footer { justify-content: center; }
}

/* --- Meetings, Gastgeber, Teilnehmerliste (Zoom-artiger Ablauf) --- */
.gross { font-size: 1.05rem; padding: .8rem 1rem; width: 100%; }
.trenner { display: flex; align-items: center; gap: .6rem; margin: 1rem 0 .6rem; opacity: .6; }
.trenner::before, .trenner::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: .3; }
.trenner span { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
details#planBox { margin-top: 1rem; }
details#planBox summary { cursor: pointer; opacity: .8; padding: .3rem 0; }
details#planBox[open] { display: flex; flex-direction: column; gap: 12px; }
details#planBox > label, details#planBox > button { width: 100%; }
.liste { margin-top: 1rem; display: flex; flex-direction: column; gap: .4rem; }
.liste .eintrag { display: flex; align-items: center; gap: .6rem; padding: .5rem .6rem;
  border: 1px solid rgba(127,127,127,.3); border-radius: 8px; }
.liste .eintrag .wann { opacity: .7; font-size: .85rem; }
.liste .eintrag .spacer { flex: 1; }
.liste .eintrag button { padding: .3rem .6rem; font-size: .85rem; }
dl.daten { display: grid; grid-template-columns: auto 1fr; gap: .3rem .8rem; margin: .8rem 0; }
dl.daten dt { opacity: .7; }
dl.daten dd { margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.1rem; }
.tag.knopf { cursor: pointer; border: 1px solid rgba(127,127,127,.4); background: transparent;
  color: inherit; font: inherit; }
.tag.knopf:hover { border-color: currentColor; }
#peopleList { display: flex; flex-direction: column; gap: .3rem; padding: .5rem; }
#peopleList .person { display: flex; align-items: center; gap: .5rem; padding: .35rem .5rem;
  border-radius: 6px; background: rgba(127,127,127,.08); }
#peopleList .person .spacer { flex: 1; }
#peopleList .person .rolle { font-size: .75rem; opacity: .7; }
#peopleList .person button { padding: .2rem .45rem; font-size: .78rem; }
