:root {
  color-scheme: light;
  --paper: #ffffff;
  --ink: #121212;
  --muted: #5d5d5d;
  --line: #d8d8d8;
  --accent: #b3402f;
  --ink-soft: #303030;
  --soft: #f1f1f1;
  --max: 760px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #121212;
  --ink: #f2efe9;
  --muted: #a49e95;
  --line: #35312c;
  --accent: #e0715d;
  --ink-soft: #d8d2c8;
  --soft: #232323;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #121212;
    --ink: #f2efe9;
    --muted: #a49e95;
    --line: #35312c;
    --accent: #e0715d;
    --ink-soft: #d8d2c8;
    --soft: #232323;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 18px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }

h1, h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-weight: 400; }

.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
  padding: 20px 0;
}

.wordmark { font-size: 15px; font-weight: 600; text-decoration: none; letter-spacing: 0.01em; }
.wordmark:hover { color: var(--ink); }

.site-header .tabs { justify-self: center; margin-top: 0; }
.site-header > nav:last-child { justify-self: end; }
.site-header nav,
.site-footer nav { display: flex; justify-content: center; gap: 20px; }
.site-header nav a,
.site-header nav button,
.site-footer nav a { font-size: 14px; color: var(--muted); text-decoration: none; }

.theme-toggle {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
}
.theme-toggle:hover { color: var(--accent); }
.site-header nav a:hover,
.site-footer nav a:hover { color: var(--accent); }

main { width: min(var(--max), calc(100% - 48px)); margin: 0 auto; }

.hero { padding: 84px 0 96px; text-align: center; }

.status {
  margin: 0 0 22px;
  color: var(--accent);
  font-size: 15px;
  font-weight: 600;
}

h1 {
  font-size: clamp(40px, 7.5vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin-inline: auto;
}


.lede {
  max-width: 56ch;
  margin: 30px auto 0;
  color: var(--ink-soft);
}

.prose {
  max-width: 56ch;
  margin: 0 auto;
  text-align: center;
}
.prose p { margin: 0; }
.prose p + p { margin-top: 16px; }

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px 24px;
  margin-top: 34px;
}

.button {
  display: inline-block;
  padding: 13px 20px;
  background: var(--ink);
  color: var(--paper);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}
.button:hover { background: var(--accent); color: var(--paper); }

.text-link { font-size: 16px; }

.note { margin-top: 18px; color: var(--muted); font-size: 14px; text-align: center; }

.section {
  padding: 52px 0 58px;
  border-top: 1px solid var(--line);
  text-align: center;
}

h2 {
  font-size: clamp(30px, 4.2vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin-bottom: 28px;
}

.plain-list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 560px;
  text-align: center;
}

.plain-list li + li { margin-top: 20px; }

.plain-list strong { font-weight: 650; }

.steps {
  margin: 0 auto;
  padding: 0;
  max-width: 560px;
  text-align: center;
  list-style-position: inside;
}

.steps li { padding-left: 0.35em; }
.steps li + li { margin-top: 18px; }

.steps strong { font-weight: 650; }

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: min(var(--max), calc(100% - 48px));
  margin: 40px auto 0;
  padding: 26px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.section-note {
  margin: -14px auto 26px;
  max-width: 58ch;
  color: var(--muted);
  font-size: 14px;
}

.live-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 280px));
  justify-content: center;
  gap: 22px;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.stream {
  display: block;
  border-top: 2px solid var(--ink);
  padding-top: 10px;
  color: inherit;
  text-decoration: none;
}
.stream:hover { color: inherit; }
.stream img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--soft);
}
.stream-name { display: block; margin-top: 10px; font-weight: 650; }
.stream-meta { display: block; color: var(--muted); font-size: 13px; }
.stream-title { display: block; margin-top: 4px; font-size: 14px; }

.roster {
  list-style: none;
  max-width: 560px;
  margin: 0 auto;
  padding: 0;
  text-align: center;
}
.roster li {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.roster-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.roster-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--soft);
  flex: none;
}
.roster-avatar.fallback {
  display: grid;
  place-items: center;
  font-weight: 650;
  color: var(--muted);
}
.roster li:last-child { border-bottom: 0; }
.roster a { text-decoration: none; }
.roster a:hover { color: var(--accent); text-decoration: underline; }
.roster-status { color: var(--muted); font-size: 13px; white-space: nowrap; }
.roster-status.live { color: var(--accent); font-weight: 600; }

.subhead { margin-top: 56px; }

.clips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 280px));
  justify-content: center;
  gap: 22px;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.clip {
  display: block;
  border-top: 2px solid var(--ink);
  padding-top: 10px;
  color: inherit;
  text-decoration: none;
}
.clip:hover { color: inherit; }
.clip img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--soft);
}
.clip-title { display: block; margin-top: 10px; font-weight: 650; }
.clip-meta { display: block; color: var(--muted); font-size: 13px; }

.weekly-table {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  border-collapse: collapse;
  text-align: center;
  font-size: 14px;
}
.weekly-table th,
.weekly-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
}
.weekly-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.weekly-table td.num,
.weekly-table th.num { text-align: center; font-variant-numeric: tabular-nums; }
.weekly-empty { color: var(--muted); font-size: 14px; }

@media (max-width: 700px) {
  .site-header {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 10px;
    text-align: center;
  }
  .site-header .wordmark,
  .site-header .tabs,
  .site-header > nav:last-child { justify-self: center; }
}

@media (max-width: 620px) {
  body { font-size: 17px; }
  .site-header, main, .site-footer { width: min(var(--max), calc(100% - 32px)); }
  .site-header { padding: 22px 0; }
  .hero { padding: 54px 0 64px; }
  h1 { font-size: clamp(52px, 18vw, 78px); }
  .site-header nav { gap: 14px; }
  .site-header nav a { font-size: 13px; }
  .site-footer { gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tab {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  padding: 10px 18px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.tab:hover { border-color: var(--accent); color: var(--accent); }
.tab.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.tab-panel[hidden] { display: none; }

/* Streamer cards and profile dialog */

.streamer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 180px));
  gap: 18px;
  max-width: 760px;
  margin: 0 auto;
  justify-content: center;
}

.streamer-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  text-align: center;
  cursor: pointer;
}
.streamer-card:hover,
.streamer-card:focus-visible {
  border-color: var(--accent);
  color: var(--ink);
}
.streamer-card.live { border-color: var(--accent); }

.streamer-card-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--soft);
}
.streamer-card-avatar.fallback {
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 650;
  color: var(--muted);
}
.streamer-card-name { font-weight: 650; font-size: 14px; line-height: 1.25; overflow-wrap: anywhere; max-width: 100%; }
.streamer-card-status { color: var(--muted); font-size: 13px; }
.streamer-card-status.live { color: var(--accent); font-weight: 600; }

body.modal-open { overflow: hidden; }

.profile {
  position: fixed;
  width: min(900px, calc(100% - 32px));
  max-height: calc(100% - 48px);
  padding: 0;
  border: 0;
  background: var(--paper);
  color: var(--ink);
}
.profile::backdrop { background: rgba(18, 18, 18, 0.55); }

.profile-inner {
  padding: 28px;
  overflow: auto;
  max-height: calc(100vh - 48px);
}

.profile-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  padding: 8px 12px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.profile-close:hover { border-color: var(--accent); color: var(--accent); }

.profile-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 10px 56px 0;
  text-align: left;
  flex-wrap: wrap;
}
.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--soft);
  flex: none;
}
.profile-avatar.fallback {
  display: grid;
  place-items: center;
  font-size: 32px;
  font-weight: 650;
  color: var(--muted);
}
.profile-name {
  margin: 0;
  overflow-wrap: anywhere;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 400;
  line-height: 1.1;
}
.profile-status { margin: 2px 0 6px; color: var(--muted); font-size: 14px; }
.profile-status.live { color: var(--accent); font-weight: 600; }
.profile-link { font-size: 14px; }

.profile-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 12px;
  max-width: 620px;
  margin: 26px auto;
  text-align: center;
}
.profile-stat b {
  display: block;
  font-size: 26px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.profile-stat span { color: var(--muted); font-size: 13px; }

.profile-subhead {
  margin: 30px 0 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  font-weight: 400;
  text-align: center;
}

.profile-clips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.clip {
  appearance: none;
  display: block;
  width: 100%;
  border: 0;
  border-top: 2px solid var(--ink);
  padding: 10px 0 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: center;
  cursor: pointer;
}
.clip:hover { color: inherit; }
.clip-frame {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #111;
}
.clip.playing { padding-top: 0; border-top: 0; }
