:root {
  --bg: #07080d;
  --surface: #11141f;
  --surface-2: #1a1e2e;
  --line: #2a2f45;
  --text: #f5f6fb;
  --muted: #a3a9c2;
  --accent: #6c5cff;
  --accent-2: #2ef2c2;
  --radius: 16px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }

body {
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding: 32px clamp(16px, 4vw, 48px) 48px;
}

h1 { margin: 0 0 4px; font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.02em; }
h2 { margin: 0 0 16px; font-size: 18px; }
.lede { margin: 0 0 28px; color: var(--muted); max-width: 60ch; }

.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: start;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.join { text-align: center; }
.qr { display: block; width: 200px; height: 200px; margin: 0 auto 12px; background: #fff; border-radius: 12px; padding: 8px; }
.code { margin: 0 0 8px; color: var(--muted); }
.code strong { color: var(--text); letter-spacing: 0.12em; font-variant-numeric: tabular-nums; }
.status { margin: 0; color: var(--muted); min-height: 1.5em; }

.players { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; text-align: start; }
.players li { display: flex; align-items: center; gap: 8px; }
.dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }

.row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }

.btn {
  font: inherit;
  font-weight: 600;
  color: var(--text);
  background: var(--accent);
  border: 0;
  border-radius: 999px;
  padding: 12px 20px;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}
.btn-quiet { background: var(--surface-2); border: 1px solid var(--line); }
.btn:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent-2);
  outline-offset: 2px;
}
/* A phone cursor hovering an element (set by the SDK's DOM cursor). */
.btn[data-cursor-hover] { transform: translateY(-1px); box-shadow: 0 0 0 3px rgb(108 92 255 / 0.45); }
a[data-cursor-hover], summary[data-cursor-hover], .check[data-cursor-hover] { color: var(--accent-2); }
input[data-cursor-hover], textarea[data-cursor-hover] { border-color: var(--accent); }

.check { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.more { margin-bottom: 12px; }
.more summary { cursor: pointer; }
a { color: #9d93ff; }

.form { display: grid; gap: 6px; }
.form label { color: var(--muted); font-size: 14px; margin-top: 6px; }
.form input, .form textarea {
  font: inherit;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}
.form .btn { margin-top: 12px; justify-self: start; }

.log { margin: 0; padding-inline-start: 20px; color: var(--muted); min-height: 6em; }

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}
