:root {
  --bg: #0b0d12; --card: #151924; --line: #252b3a; --text: #eef1f7; --muted: #8a93a8;
  --green: #22c55e; --red: #ef4444; --accent: #6d8bff;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif; }
body { display: flex; flex-direction: column; min-height: 100dvh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
main { flex: 1; width: 100%; max-width: 440px; margin: 0 auto; padding: 24px 16px; display: flex; flex-direction: column; }
.center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px; }
.avatar { width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center; font-size: 44px; font-weight: 600;
  background: linear-gradient(135deg, #6d8bff, #a855f7); box-shadow: 0 10px 40px #6d8bff44; }
.pulse { animation: pulse 1.6s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 #22c55e88; } 100% { box-shadow: 0 0 0 28px #22c55e00; } }
h1 { margin: 6px 0 0; font-size: 28px; font-weight: 650; letter-spacing: -0.02em; }
h2 { margin: 0; font-size: 18px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.dot.on { background: var(--green); }
form, .stack { width: 100%; display: flex; flex-direction: column; gap: 10px; }
input, textarea { width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--card);
  color: var(--text); font: inherit; font-size: 16px; outline: none; }
input:focus, textarea:focus { border-color: var(--accent); }
textarea { resize: none; height: 70px; }
.row { display: flex; gap: 10px; width: 100%; }
button { font: inherit; border: 0; cursor: pointer; border-radius: 14px; padding: 15px 18px; font-weight: 600; color: white; background: var(--card);
  border: 1px solid var(--line); flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
button:disabled { opacity: .5; }
button.green { background: var(--green); border-color: var(--green); }
button.red { background: var(--red); border-color: var(--red); }
button.accent { background: var(--accent); border-color: var(--accent); }
.round { width: 68px; height: 68px; flex: none; border-radius: 50%; padding: 0; font-size: 26px; }
.round.on { background: white; color: black; }
.controls { display: flex; justify-content: center; gap: 22px; align-items: center; flex-wrap: wrap; }
.controls label { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.hidden { display: none !important; }
.videos { position: fixed; inset: 0; background: #000; z-index: 0; }
.videos video { width: 100%; height: 100%; object-fit: cover; }
#localVideo { position: absolute; width: 110px; height: 160px; right: 16px; top: calc(16px + env(safe-area-inset-top)); border-radius: 14px;
  object-fit: cover; border: 2px solid #ffffff33; transform: scaleX(-1); }
.overlay { position: relative; z-index: 1; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.tag { font-size: 12px; padding: 3px 8px; border-radius: 99px; background: var(--line); color: var(--muted); white-space: nowrap; }
.tag.missed { background: #ef444422; color: #fca5a5; }
.tag.answered { background: #22c55e22; color: #86efac; }
.top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.link { background: none; border: 0; color: var(--accent); padding: 4px; flex: none; font-weight: 500; }
.banner { background: #6d8bff1f; border: 1px solid #6d8bff55; border-radius: 14px; padding: 14px; font-size: 14px; }
.error { color: #fca5a5; font-size: 14px; min-height: 20px; }
footer { text-align: center; font-size: 12px; color: var(--muted); padding: 12px; }
