:root {
  color-scheme: dark;
  --bg: #090909;
  --fg: #f4f1ea;
  --muted: #a39e94;
  --line: rgba(244, 241, 234, 0.14);
  --card: #141414;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.5 "Avenir Next", "PingFang SC", "Noto Sans SC", "Segoe UI", sans-serif;
}

a { color: inherit; }

.nav, .foot, .home, .message {
  width: min(880px, calc(100% - 40px));
  margin-left: auto;
  margin-right: auto;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.brand img { width: 28px; height: 28px; }

.now {
  margin: 0;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.home { padding: 28px 0 64px; }

.kicker {
  margin: 0 0 10px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
}

h1 {
  margin: 0;
  max-width: 16em;
  font-family: "Iowan Old Style", Palatino, "Songti SC", serif;
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.list-title {
  margin: 48px 0 12px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.list { list-style: none; margin: 0; padding: 0; }

.list li {
  display: flex;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--line);
}

.list li:last-child { border-bottom: 1px solid var(--line); }

.list a {
  flex: 1;
  padding: 16px 0;
  text-decoration: none;
}

.remove {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}

.config { margin-top: 36px; }

.lead-note {
  margin: 8px 0 0;
  max-width: 36em;
  color: var(--muted);
}

.fields {
  display: grid;
  gap: 12px;
  max-width: 560px;
  margin-top: 16px;
}

.fields label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.fields input {
  width: 100%;
  background: var(--card);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
}

.preview {
  min-height: 1.4em;
  margin: 0;
  color: var(--fg);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.fields button, .form-actions button {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  background: var(--fg);
  color: #111;
  font: inherit;
  cursor: pointer;
}

.ghost {
  background: transparent !important;
  color: var(--fg) !important;
  border: 1px solid var(--line) !important;
}

.form-error, .form-ok { margin: 0; }

.form-error { color: #e7b4a8; }

.form-ok { color: #c9e7c2; }

.stage {
  display: none;
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto 28px;
}

.stage.on { display: block; }

.frame {
  position: relative;
  background: #000;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
}

video {
  display: block;
  width: 100%;
  max-height: calc(100vh - 140px);
  background: #000;
}

.start {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 84px;
  height: 84px;
  border: 0;
  border-radius: 50%;
  background: rgba(244, 241, 234, 0.94);
  color: #111;
  cursor: pointer;
}

.start[hidden] { display: none; }

.start svg { width: 28px; height: 28px; margin-left: 4px; }

.message { display: none; padding: 48px 0 72px; }

.message.on { display: block; }

.message p { color: var(--muted); max-width: 36em; }

.path {
  display: inline-block;
  margin: 8px 0 18px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--card);
  color: var(--fg);
}

.back {
  display: inline-block;
  margin-top: 8px;
  color: var(--fg);
}

.foot {
  padding: 8px 0 36px;
  color: var(--muted);
  font-size: 13px;
}

.foot p { margin: 0 0 8px; }

.foot a { color: var(--fg); }

body.watching .foot { display: none; }

@media (max-width: 640px) {
  .nav, .foot, .home, .message { width: min(880px, calc(100% - 28px)); }
  .stage { width: calc(100% - 16px); }
  .frame, video { border-radius: 12px; }
  video { max-height: calc(100vh - 108px); }
}
