:root { --bg: #080F1A; --card: #0f1a2b; --line: rgba(255,255,255,.12); --text: #eef3fb; --muted: #9fb0c8;
  --accent: #3d8bfd; --ok: #2fb67c; --bad: #e5484d; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font: 16px/1.45 Manrope, system-ui, -apple-system, Segoe UI, sans-serif; }
.hidden { display: none !important; }
.app { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 16px; }
.card { width: 100%; max-width: 440px; background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  padding: 24px; }
h1 { font-size: 22px; margin: 0 0 6px; }
.eyebrow { margin: 0 0 4px; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); margin: 0 0 12px; }
.small { font-size: 13px; margin: 12px 0 0; }
.hint { color: #ffd38a; font-size: 14px; }
.preview { position: relative; aspect-ratio: 4/3; border-radius: 14px; overflow: hidden; background: #050a12;
  margin: 12px 0; }
.preview video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.preview-off, .remote-off { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--muted); }
.toggles { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.tgl, .ctl { min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: #17243a;
  color: var(--text); font: inherit; cursor: pointer; }
.tgl.off, .ctl.off { background: #3a1d22; border-color: #6b2a31; color: #ffc9cc; }
.tgl.active, .ctl.active { background: #1b3760; border-color: var(--accent); color: #eaf2ff; }
.tgl:disabled, .ctl:disabled { opacity: .6; cursor: default; }
.field { display: block; font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.field input { display: block; width: 100%; margin-top: 6px; min-height: 44px; padding: 0 12px; border-radius: 12px;
  border: 1px solid var(--line); background: #0a1322; color: var(--text); font: inherit; font-size: 16px; }
.primary { width: 100%; min-height: 48px; border: 0; border-radius: 12px; background: var(--accent); color: #fff;
  font: inherit; font-weight: 700; cursor: pointer; }
.primary:disabled { opacity: .6; cursor: default; }
.call { position: fixed; inset: 0; display: flex; flex-direction: column; background: var(--bg); }
.stage { position: relative; flex: 1; overflow: hidden; }
#remote { width: 100%; height: 100%; object-fit: contain; background: #050a12; }
.remote-off span { width: 120px; height: 120px; border-radius: 50%; background: #1b2b45; display: flex;
  align-items: center; justify-content: center; font-size: 40px; font-weight: 700; color: var(--text); }
.remote-name { position: absolute; left: 16px; bottom: 16px; padding: 4px 10px; border-radius: 8px;
  background: rgba(0,0,0,.45); font-size: 14px; }
#local { position: absolute; right: 16px; top: 16px; width: 28%; max-width: 220px; aspect-ratio: 3/4; object-fit: cover;
  border-radius: 12px; border: 1px solid var(--line); transform: scaleX(-1); background: #050a12; }
.waiting { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted);
  font-size: 18px; text-align: center; padding: 24px; }
.status { padding: 8px 16px; text-align: center; background: #3a2a10; color: #ffd38a; font-size: 14px; }
.controls { display: flex; flex-wrap: wrap; gap: 8px 10px; justify-content: center; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: #0b1424; border-top: 1px solid var(--line); }
.ctl.leave { background: var(--bad); border-color: var(--bad); color: #fff; }
@media (min-width: 900px) { #local { width: 220px; } }
/* 24.10: actions under a message, the client picks another time, the hidden observer (ADR-021) */
.actions { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.ghost { width: 100%; min-height: 44px; margin-top: 8px; border: 1px solid var(--line); border-radius: 12px;
  background: transparent; color: var(--text); font: inherit; cursor: pointer; }
.actions .ghost, .actions .primary { margin-top: 0; }
.linkbox { word-break: break-all; font-size: 14px; padding: 10px 12px; border-radius: 12px; background: #0a1322;
  border: 1px solid var(--line); margin: 0 0 4px; user-select: all; }
.rs-days { display: flex; flex-direction: column; gap: 12px; margin: 8px 0 12px; max-height: 52vh; overflow-y: auto; }
.rs-day-t { margin: 0 0 6px; font-weight: 700; }
.rs-day-t::first-letter { text-transform: uppercase; }
.rs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.slot { min-height: 44px; border-radius: 12px; border: 1px solid var(--line); background: #17243a; color: var(--text);
  font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.slot small { font-size: 12px; color: var(--muted); }
.slot.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.slot.is-on small { color: #eaf2ff; }
.observer { padding: 8px 16px; text-align: center; background: #1d2a44; color: #cfe0ff; font-size: 14px;
  border-bottom: 1px solid var(--line); }
.side { position: absolute; right: 16px; top: 16px; width: 28%; max-width: 220px; aspect-ratio: 3/4; border-radius: 12px;
  overflow: hidden; border: 1px solid var(--line); background: #050a12; }
.side video { width: 100%; height: 100%; object-fit: cover; }
.side span { position: absolute; left: 6px; bottom: 6px; padding: 2px 8px; border-radius: 8px; background: rgba(0,0,0,.45);
  font-size: 12px; }
@media (min-width: 900px) { .side { width: 220px; } }
/* 02.12: meeting recording indicator and toggle (host + observer) */
.rec-banner { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 6px 16px;
  background: #3d1419; color: #ffd9dc; font-size: 14px; font-weight: 600;
  border-bottom: 1px solid rgba(229,72,77,.35); }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #ff4d57;
  animation: rec-pulse 1.4s ease-in-out infinite; flex: 0 0 auto; }
.rec-time { font-variant-numeric: tabular-nums; opacity: .9; }
@keyframes rec-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .28; } }
.ctl.rec.recording { background: #b92831; border-color: #e5484d; color: #fff; }
.ctl.rec:disabled { opacity: .6; cursor: default; }
/* 02.12: virtual background & blur selector (pre-join + in-call) */
.bg-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 10px;
  margin-bottom: 12px; border-radius: 14px; background: #0a1322; border: 1px solid var(--line); }
.bg-panel-call { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(76px + env(safe-area-inset-bottom));
  z-index: 20; width: min(440px, calc(100% - 24px)); margin-bottom: 0; background: rgba(11,20,36,.96);
  box-shadow: 0 14px 36px rgba(0,0,0,.55); backdrop-filter: blur(10px); }
.bg-opt { display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 6px; border-radius: 11px;
  border: 1px solid var(--line); background: #142034; color: var(--text); font: inherit; font-size: 13px;
  cursor: pointer; text-align: center; transition: border-color .15s, background .15s; }
.bg-opt:hover { border-color: rgba(255,255,255,.32); background: #1a2a44; }
.bg-opt.is-on { border-color: var(--accent); background: #1b355c; box-shadow: 0 0 0 1px var(--accent); }
.bg-opt:disabled { opacity: .6; cursor: default; }
.bg-thumb { width: 100%; aspect-ratio: 16/9; border-radius: 7px; overflow: hidden; display: flex;
  align-items: center; justify-content: center; background: #0c1525; color: var(--muted); font-size: 12px;
  position: relative; background-size: cover; background-position: center; }
.bg-thumb-none { background: linear-gradient(135deg, #101b2e 0%, #17253d 100%); }
.bg-thumb-blur { background: radial-gradient(circle at 32% 38%, rgba(94,181,247,.52), rgba(29,48,80,.7) 58%, #0f1a2c 100%); }
.bg-thumb-blur::after { content: ''; position: absolute; inset: 0; backdrop-filter: blur(6px); background: rgba(255,255,255,.06); }
.bg-opt-label { line-height: 1.2; padding: 0 2px 2px; font-weight: 500; }
@media (min-width: 520px) {
  .bg-panel-call { grid-template-columns: repeat(4, minmax(0, 1fr)); width: min(560px, calc(100% - 24px)); }
}
