/* MAO Meet — the whole look in one small sheet. Dark, quiet, brandable via
   the header text (server-injected org name). No emoji anywhere — controls
   are inline SVG (app.js). */
:root {
  --bg: #0f1115;
  --panel: #1a1e26;
  --line: #2a2f3a;
  --text: #e8eaf0;
  --muted: #9aa3b2;
  --accent: #4f7cff;
  --danger: #e0455a;
}
* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  display: flex; flex-direction: column;
}
#brand {
  padding: 12px 18px; font-weight: 600; letter-spacing: 0.02em;
  color: var(--muted); border-bottom: 1px solid var(--line);
  flex: none; user-select: none;
  display: flex; align-items: center; gap: 10px;
}
.brand-logo {
  height: 26px; width: auto; border-radius: 5px; display: block;
}
main { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; }
[hidden] { display: none !important; }
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 32px; width: min(92vw, 380px); text-align: center;
}
.panel h1 { font-size: 19px; margin-bottom: 6px; overflow-wrap: anywhere; }
.hint { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
#join-form { display: flex; flex-direction: column; gap: 10px; }
input[type="text"] {
  background: var(--bg); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 11px 12px; font-size: 15px; outline: none;
}
input[type="text"]:focus { border-color: var(--accent); }
button {
  border: 0; border-radius: 8px; padding: 11px 16px; font-size: 15px;
  font-weight: 600; cursor: pointer; background: var(--accent); color: #fff;
}
button:hover { filter: brightness(1.1); }
.error { color: var(--danger); font-size: 13px; margin-top: 12px; }
.left-actions { display: flex; flex-direction: column; gap: 10px; }
button.secondary { background: var(--panel); border: 1px solid var(--line); color: var(--text); }

/* call */
#call { flex-direction: column; align-items: stretch; padding: 12px; gap: 12px; }
#grid {
  flex: 1; min-height: 0; display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  align-content: center;
}
.tile {
  position: relative; background: var(--panel); border-radius: 10px;
  overflow: hidden; aspect-ratio: 16 / 9;
}
.tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile.screen video { object-fit: contain; background: #000; }
.tile .tag {
  position: absolute; left: 8px; bottom: 8px; padding: 2px 8px;
  background: rgba(0,0,0,0.55); border-radius: 6px; font-size: 12px;
}
.tile.novideo::after {
  content: attr(data-initial); position: absolute; inset: 0;
  display: grid; place-items: center; font-size: 40px; font-weight: 600;
  color: var(--muted);
}
#rec-banner {
  flex: none; text-align: center; font-size: 13px; color: var(--text);
  background: #1f2c4a; border: 1px solid var(--accent); border-radius: 8px;
  padding: 6px 12px;
}
#captions {
  flex: none; max-height: 96px; overflow: hidden; font-size: 13px;
  color: var(--muted); padding: 0 6px;
}
.caption-line b { color: var(--text); font-weight: 600; }
.caption-line.interim { opacity: 0.55; }
#controls {
  flex: none; display: flex; justify-content: center; gap: 12px; padding: 6px 0;
}
.ctl {
  width: 52px; height: 52px; border-radius: 50%; background: var(--panel);
  border: 1px solid var(--line); display: grid; place-items: center; padding: 0;
}
.ctl svg { width: 22px; height: 22px; fill: var(--text); }
.ctl.off { background: #3a2126; border-color: var(--danger); }
.ctl.off svg { fill: var(--danger); }
.ctl.on { background: #1f2c4a; border-color: var(--accent); }
.ctl.danger { background: var(--danger); border-color: var(--danger); }
.ctl.danger svg { fill: #fff; }
