:root {
  --navy: #182044;
  --navy-2: #222c5a;
  --red: #d12229;
  --white: #ffffff;
  --text: #1b1f33;
  --muted: #5b6178;
  --bg: #f4f5f9;
  --card: #ffffff;
  --border: #dde0ea;
}
@media (prefers-color-scheme: dark) {
  :root {
    --text: #eef0f7;
    --muted: #a8aec4;
    --bg: #0f1430;
    --card: #182044;
    --border: #2c3666;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.site-header {
  background: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 4px solid var(--red);
}
.logo { border-radius: 8px; flex: none; }
.site-header h1 { font-size: 1.25rem; margin: 0; }
.site-header .sub { margin: 0; font-size: .9rem; opacity: .8; }
main { width: 100%; max-width: 960px; margin: 0 auto; padding: 20px 16px 32px; flex: 1; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}
.card h2 { margin-top: 0; font-size: 1.2rem; }
.error { border-left: 5px solid var(--red); }
form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
label { width: 100%; font-weight: 600; font-size: .9rem; }
input {
  flex: 1 1 240px;
  font: inherit;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  letter-spacing: .05em;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
}
button {
  font: inherit;
  font-weight: 600;
  padding: 10px 20px;
  border: 0;
  border-radius: 8px;
  background: var(--red);
  color: var(--white);
  cursor: pointer;
}
button.secondary { background: var(--navy-2); }
button:focus-visible, input:focus-visible { outline: 3px solid #7aa2ff; outline-offset: 2px; }
.welcome { color: var(--muted); margin-top: 0; }
.player-wrap {
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  margin-bottom: 16px;
  position: relative;
}
.unmute {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  padding: 10px 22px;
  font-size: 1.05rem;
  border-radius: 999px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .45);
}
.unmute[hidden] { display: none; }
mux-player { width: 100%; height: 100%; display: block; --media-accent-color: var(--red); }
.waiting { text-align: center; padding: 36px 20px; }
.countdown { font-size: 1.6rem; font-weight: 700; margin: 8px 0 0; font-variant-numeric: tabular-nums; }
.list-heading { font-size: 1rem; margin: 24px 0 8px; }
.sessions { list-style: none; padding: 0; margin: 0; }
.sessions li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  background: var(--card);
}
.sessions .when { color: var(--muted); font-size: .9rem; }
.badge { font-size: .8rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; align-self: center; }
.badge.open { background: var(--red); color: var(--white); }
.badge.upcoming { background: var(--navy-2); color: var(--white); }
.badge.ended { background: var(--border); color: var(--muted); }
.note { color: var(--muted); font-size: .85rem; margin-top: 20px; }
footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 16px; }
