/*
  Castcore show pages — single stylesheet, no framework.
  Palette + spacing tokens lifted from internal/service/ui/Podcore.html
  so the operator UI and the public show pages feel like the same
  product. Mobile-first; the only breakpoint is 720px (one column ->
  two-column header + wider container).
*/

:root {
  color-scheme: light dark;

  --pc-bg: #ffffff;
  --pc-bg-sunken: #f5f5f7;
  --pc-fg: #1d1d1f;
  --pc-fg-2: #424245;
  --pc-fg-muted: #6e6e73;
  --pc-rule: #d2d2d7;
  --pc-rule-soft: #ebebef;
  --pc-accent: #006edb;
  --pc-accent-hover: #1f7ee0;
  --pc-accent-soft: rgba(0, 110, 219, 0.10);

  --pc-font: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI",
    Roboto, sans-serif;

  --pc-r-input: 6px;
  --pc-r-panel: 10px;
  --pc-r-pill: 980px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --pc-bg: #000000;
    --pc-bg-sunken: #161618;
    --pc-fg: #f5f5f7;
    --pc-fg-2: #d6d6d9;
    --pc-fg-muted: #a1a1a6;
    --pc-rule: #2a2a2c;
    --pc-rule-soft: #1f1f21;
    --pc-accent: #4ca5fe;
    --pc-accent-hover: #6cb5fe;
    --pc-accent-soft: rgba(76, 165, 254, 0.16);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
html {
  background: var(--pc-bg);
  color: var(--pc-fg);
  font-family: var(--pc-font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--pc-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; height: auto; }

.show {
  max-width: 880px;
  margin: 0 auto;
  padding: 24px 16px 96px; /* bottom pad reserves space for the player bar */
}

/* ── Header ──────────────────────────────────────────── */
.show__header {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
  margin-bottom: 28px;
}
.show__cover {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  background: var(--pc-bg-sunken);
  object-fit: cover;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.show__title {
  margin: 0 0 4px;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.show__author {
  margin: 0 0 8px;
  color: var(--pc-fg-2);
  font-size: 15px;
}
.show__category {
  margin: 0 0 16px;
  color: var(--pc-fg-muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.show__listen {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.show__btn {
  display: inline-block;
  padding: 8px 14px;
  border-radius: var(--pc-r-pill);
  background: var(--pc-accent-soft);
  color: var(--pc-accent);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
}
.show__btn:hover {
  text-decoration: none;
  background: var(--pc-accent);
  color: #ffffff;
}

@media (min-width: 720px) {
  .show {
    padding: 40px 24px 120px;
  }
  .show__header {
    grid-template-columns: 240px 1fr;
    gap: 28px;
  }
  .show__title { font-size: 34px; }
}

/* ── Description ─────────────────────────────────────── */
.show__description {
  margin: 0 0 32px;
  color: var(--pc-fg-2);
  font-size: 15.5px;
}
.show__description p { margin: 0 0 12px; }
.show__description p:last-child { margin-bottom: 0; }

/* ── Episodes ────────────────────────────────────────── */
.episodes__heading {
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--pc-rule);
  font-size: 18px;
}
.episodes__empty {
  color: var(--pc-fg-muted);
  font-style: italic;
}
.episodes__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.episode {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--pc-rule-soft);
}
.episode:last-child { border-bottom: none; }

.episode__art {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  background: var(--pc-bg-sunken);
  object-fit: cover;
}
.episode__title {
  margin: 0 0 4px;
  font-size: 16px;
  line-height: 1.3;
}
.episode__meta {
  margin: 0 0 8px;
  color: var(--pc-fg-muted);
  font-size: 13px;
}
.episode__dot { margin: 0 6px; }
.episode__desc {
  margin: 0 0 10px;
  color: var(--pc-fg-2);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.episode__play {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--pc-accent);
  border-radius: var(--pc-r-pill);
  background: transparent;
  color: var(--pc-accent);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}
.episode__play:hover {
  background: var(--pc-accent);
  color: #ffffff;
}

@media (min-width: 720px) {
  .episode {
    grid-template-columns: 96px 1fr;
    gap: 20px;
  }
  .episode__art { width: 96px; height: 96px; }
}

/* ── Footer ──────────────────────────────────────────── */
.show__footer {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid var(--pc-rule-soft);
  color: var(--pc-fg-muted);
  font-size: 13px;
  text-align: center;
}
.show__footer a { color: var(--pc-fg-muted); }

/* ── Homepage ────────────────────────────────────────── */
.home {
  max-width: 640px;
  margin: 80px auto;
  padding: 0 24px;
  text-align: center;
}
.home h1 {
  font-size: 40px;
  margin: 0 0 8px;
}
.home code {
  background: var(--pc-bg-sunken);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}
