:root {
  color-scheme: dark;
  --bg: #101114;
  --card: #1b1d22;
  --text: #f4f4f5;
  --muted: #b4b8c2;
  --accent: #5ee1a6;
  --warn: #ffb020;
  --danger: #ff6b6b;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
}

body {
  padding: 16px;
}

body.wechat-blocked main {
  display: none;
}

.wrap {
  max-width: 520px;
  margin: 0 auto;
}

h1 {
  font-size: 1.6rem;
  margin: 8px 0 4px;
}

.lead,
.note,
#status,
#log p {
  line-height: 1.45;
}

.lead,
.note {
  color: var(--muted);
  font-size: 0.95rem;
}

.note {
  background: var(--card);
  border-radius: 14px;
  padding: 12px 14px;
  margin: 12px 0;
}

#status {
  font-weight: 600;
  margin: 12px 0;
}

#status[data-kind="live"] {
  color: var(--accent);
}

#status[data-kind="warn"] {
  color: var(--warn);
}

.actions {
  display: grid;
  gap: 12px;
  margin: 16px 0;
}

button {
  min-height: 56px;
  border: 0;
  border-radius: 16px;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 12px 16px;
}

#start-screen {
  background: var(--accent);
  color: #102018;
}

#start-camera {
  background: #2a2f3a;
  color: var(--text);
}

#stop {
  background: var(--danger);
  color: white;
}

button:disabled {
  opacity: 0.45;
}

video {
  width: 100%;
  max-height: 42vh;
  border-radius: 16px;
  background: #000;
  object-fit: contain;
}

#log {
  margin-top: 16px;
}

#log p {
  margin: 0 0 8px;
  color: var(--muted);
}

#wechat-gate {
  position: fixed;
  inset: 0;
  background: #0b0c10;
  z-index: 20;
  padding: 28px 20px;
}

#wechat-gate[hidden],
#ios-note[hidden] {
  display: none;
}

#wechat-gate h2 {
  font-size: 1.5rem;
}
