:root {
  --bg: #f6f4ef;
  --card: #ffffff;
  --text: #1d1d1f;
  --muted: #6b6b70;
  --line: #e4e1da;
  --accent: #1f7a4d;
  --accent-text: #ffffff;
  --danger: #c0392b;
  --warn: #b7791f;
  --ok: #1f7a4d;
  --radius: 16px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141414;
    --card: #1f1f21;
    --text: #f2f2f2;
    --muted: #a0a0a6;
    --line: #333336;
    --accent: #3fae78;
    --accent-text: #0d0d0d;
    --danger: #ff6b5b;
    --warn: #f0b44c;
    --ok: #3fae78;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 18px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
main { max-width: 640px; margin: 0 auto; padding: 20px 16px 48px; }
h1 { font-size: 28px; margin: 8px 0 4px; }
h2 { font-size: 20px; margin: 24px 0 8px; }
p { margin: 8px 0; }
.muted { color: var(--muted); font-size: 15px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin: 14px 0;
}
label { display: block; font-size: 15px; color: var(--muted); margin: 12px 0 6px; }
input[type=text], select {
  width: 100%;
  font: inherit;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
}
.choices { display: flex; gap: 10px; flex-wrap: wrap; }
.choices label {
  flex: 1 1 140px;
  margin: 0;
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  font-size: 17px;
  cursor: pointer;
}
.choices input { width: 20px; height: 20px; }
button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  min-height: 64px;
  margin-top: 16px;
  font: 600 22px/1.2 inherit;
  font-family: inherit;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-text);
  cursor: pointer;
  text-decoration: none;
}
button.secondary { background: var(--line); color: var(--text); }
button.danger { background: var(--danger); color: #fff; }
button:disabled { opacity: .5; cursor: default; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.tests { list-style: none; padding: 0; margin: 0; }
.tests li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
}
.tests li:last-child { border-bottom: 0; }
.tests .st { white-space: nowrap; font-weight: 600; }
.st.ok { color: var(--ok); }
.st.slow, .st.frozen { color: var(--warn); }
.st.fail { color: var(--danger); }
.big-status { font-size: 22px; font-weight: 600; text-align: center; margin: 12px 0; }
.videos { position: relative; background: #000; border-radius: var(--radius); overflow: hidden; aspect-ratio: 3 / 4; }
.videos video#remote { width: 100%; height: 100%; object-fit: cover; }
.videos video#local {
  position: absolute; right: 10px; bottom: 10px;
  width: 28%; border-radius: 10px; border: 2px solid #fff; background: #222;
}
.stats { font: 13px/1.5 ui-monospace, Consolas, monospace; color: var(--muted); white-space: pre-wrap; }
.linkbox { word-break: break-all; font-size: 15px; background: var(--bg); padding: 10px; border-radius: 10px; border: 1px dashed var(--line); }
.banner { padding: 12px 14px; border-radius: 12px; background: var(--warn); color: #000; font-weight: 600; margin: 10px 0; }
.hidden { display: none !important; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
