:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #fbfbfd;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --separator: rgba(0, 0, 0, 0.09);
  --accent: #007aff;
  --accent-soft: #eaf3ff;
  --green: #34c759;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.05);
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #1c1c1e;
    --surface-2: #2c2c2e;
    --text: #f5f5f7;
    --text-secondary: #98989d;
    --separator: rgba(255, 255, 255, 0.11);
    --accent: #0a84ff;
    --accent-soft: #0a2540;
    --green: #30d158;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-bottom: 1px solid var(--separator);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  position: sticky; top: 0; z-index: 10;
}
.nav .brand { font-weight: 600; letter-spacing: -0.01em; color: var(--text); }
.nav .brand:hover { text-decoration: none; }
.nav .right { display: flex; align-items: center; gap: 16px; font-size: 15px; }
.container { max-width: 820px; margin: 0 auto; padding: 30px 22px 80px; }
.narrow { max-width: 560px; }

/* Typography */
h1 { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 4px; }
h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; margin: 28px 0 12px; }
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-secondary); margin: 0 0 3px;
}
.muted { color: var(--text-secondary); }
.subtitle { color: var(--text-secondary); margin: 0 0 22px; }

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--separator);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  margin-bottom: 14px;
}
.card.link { display: block; color: inherit; transition: transform .08s ease; }
.card.link:hover { text-decoration: none; transform: translateY(-1px); }
.card .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card h3 { margin: 0; font-size: 18px; font-weight: 600; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font: inherit; font-size: 16px; font-weight: 500;
  padding: 9px 18px; border-radius: 980px; border: 1px solid transparent;
  cursor: pointer; background: var(--accent); color: #fff;
  transition: opacity .15s ease, transform .08s ease;
}
.btn:hover { text-decoration: none; opacity: .92; }
.btn:active { transform: scale(.98); }
.btn.secondary { background: var(--surface); color: var(--accent); border-color: var(--separator); box-shadow: var(--shadow); }
.btn.ghost { background: transparent; color: var(--accent); padding: 9px 12px; }
.btn.small { font-size: 14px; padding: 6px 13px; }
.btn:disabled { opacity: .4; cursor: default; }

/* Forms */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field .hint { font-size: 13px; color: var(--text-secondary); margin: -2px 0 8px; }
input[type=text], input[type=email], input[type=password], textarea, select {
  width: 100%; font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--separator);
  border-radius: 10px; padding: 11px 13px; outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { resize: vertical; line-height: 1.5; }
textarea.tall { min-height: 220px; }
textarea.mid { min-height: 120px; }
.actions { display: flex; gap: 10px; align-items: center; margin-top: 8px; }

/* Badges */
.badge {
  font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 980px;
  background: var(--surface-2); color: var(--text-secondary); border: 1px solid var(--separator);
}
.badge.live { color: #fff; background: var(--green); border-color: transparent; }

/* Code / join code */
.code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 18px; font-weight: 600; letter-spacing: 0.12em;
  background: var(--surface-2); border: 1px solid var(--separator);
  border-radius: 8px; padding: 4px 10px;
}

/* Notice */
.notice {
  background: var(--accent-soft); border: 1px solid var(--separator);
  border-radius: 12px; padding: 14px 16px; font-size: 15px; margin-bottom: 20px;
}

/* Transcript (review) */
.turn { margin-bottom: 14px; }
.turn .who { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-secondary); margin-bottom: 3px; }
.turn.user .who { color: var(--accent); }
.turn .body { white-space: pre-wrap; }
