:root {
  color-scheme: dark;
  --bg: #12110e;
  --bg-raise: #1c1914;
  --line: #3a342b;
  --ink: #f3efe6;
  --muted: #a39888;
  --accent: #e2a15c;
  --accent-ink: #2a1c0c;
  --rec: #e23d32;
  --ok: #8fbf7a;
  --danger: #e07a68;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  font-family: "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(226, 161, 92, 0.08), transparent 50%),
    var(--bg);
  color: var(--ink);
}

body {
  min-height: 100vh;
}

button, input {
  font: inherit;
  color: inherit;
}

a { color: var(--accent); }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
}

.mark {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
  color: inherit;
}

.mark b {
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 14px;
}

.mark span, .who { color: var(--muted); font-size: 13px; }

.who { display: flex; align-items: center; gap: 12px; }

button.ghost, button.solid, button.rec, button.warn {
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  padding: 8px 14px;
  cursor: pointer;
}

button.solid {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: transparent;
  font-weight: 650;
}

button.rec.on {
  background: var(--rec);
  border-color: transparent;
  color: white;
}

button.warn { color: var(--danger); }

button:disabled { opacity: 0.45; cursor: default; }

.desk {
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: 28px;
  padding: 32px 28px 64px;
  max-width: 1100px;
}

.panel {
  background: var(--bg-raise);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--shadow);
}

h1 {
  font-size: 32px;
  line-height: 1.15;
  font-weight: 620;
  margin: 0 0 8px;
}

.lede { color: var(--muted); margin: 0 0 18px; line-height: 1.45; }

form.stack, .stack { display: flex; flex-direction: column; gap: 10px; }

input[type="email"], input[type="text"] {
  background: #100e0b;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
}

input:focus { border-color: var(--accent); }

.err { color: var(--danger); min-height: 1.2em; font-size: 14px; }

.room-list { display: flex; flex-direction: column; gap: 8px; }

.room-list a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: #14120f;
}

.room-list a:hover { border-color: var(--accent); }

.room-list small { color: var(--muted); }

.call {
  display: grid;
  grid-template-columns: 1fr 320px;
  min-height: calc(100vh - 69px);
}

.stage {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.videos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  align-content: start;
}

.tile {
  position: relative;
  background: #0c0b09;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  min-height: 180px;
}

.tile video {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  background: #0c0b09;
}

.tile.audio-only video { opacity: 0; }

.tile .letter {
  position: absolute;
  inset: 0 0 36px;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: var(--accent);
}

.tile.audio-only .letter { display: flex; }

.tile .label {
  position: absolute;
  left: 10px;
  bottom: 8px;
  font-size: 13px;
  background: rgba(0, 0, 0, 0.45);
  padding: 3px 8px;
  border-radius: 999px;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.side {
  border-left: 1px solid var(--line);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(0, 0, 0, 0.15);
}

.side h2 {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.transcript {
  flex: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 160px;
}

.line { font-size: 14px; line-height: 1.4; }

.line b { color: var(--accent); font-weight: 600; }

.line time { color: var(--muted); font-size: 12px; margin-right: 6px; }

.summary {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.takes audio, .takes video {
  width: 100%;
  margin-top: 6px;
}

.take {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  margin-bottom: 8px;
}

.note { color: var(--muted); font-size: 13px; line-height: 1.4; }

.lobby {
  max-width: 520px;
  margin: 48px auto;
  padding: 0 16px;
}

@media (max-width: 860px) {
  .desk, .call { grid-template-columns: 1fr; }
  .side { border-left: 0; border-top: 1px solid var(--line); }
  .top { padding: 14px 16px; }
}
