:root {
  --bg: #0c0e12;
  --bg-elevated: #14171e;
  --bg-muted: #1a1e28;
  --text: #e8eaef;
  --text-muted: #8b92a3;
  --accent: #00d4aa;
  --accent-dim: #00a884;
  --accent-glow: rgba(0, 212, 170, 0.25);
  --border: #2a2f3d;
  --radius: 8px;
  --font-sans: "DM Sans", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 60% 55% at 50% 38%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%),
    radial-gradient(ellipse 55% 50% at 50% 70%, color-mix(in srgb, var(--accent) 5%, transparent), transparent 70%);
  color: var(--text);
  line-height: 1.5;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

.site-header {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  padding: calc(0.85rem + env(safe-area-inset-top, 0px)) 1rem 0.85rem;
}

.site-header-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.brand:hover {
  color: var(--accent);
  text-decoration: none;
}

.brand-sub {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
}

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1rem calc(2rem + env(safe-area-inset-bottom, 0px));
}

.page-title {
  margin: 0 0 0.25rem;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.page-sub {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.podcast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.card-link {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  color: inherit;
  text-decoration: none;
  min-width: 0;
  flex: 1;
}

.card-link:hover {
  text-decoration: none;
}

.card-art,
.show-art,
.episode-art {
  flex-shrink: 0;
  object-fit: cover;
  background: var(--bg-muted);
  border-radius: 10px;
}

.card-art {
  width: 72px;
  height: 72px;
}

.card-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.card-link:hover .card-title {
  color: var(--accent);
}

.card-author,
.muted {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.card-actions {
  display: flex;
  gap: 0.5rem;
  padding: 0 1rem 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
  text-decoration: none;
}

.btn-solid {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
}

.btn-solid:hover {
  background: var(--accent-dim);
  color: var(--bg);
}

.show-hero,
.episode-hero,
.episodes-card {
  background: rgba(20, 23, 30, 0.8);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.show-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
}

.show-art {
  width: 180px;
  height: 180px;
  border-radius: var(--radius);
}

.show-title,
.episode-title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.show-author {
  margin: 0;
  color: var(--text-muted);
}

.prose {
  color: var(--text);
  line-height: 1.6;
  text-align: left;
  width: 100%;
  overflow-wrap: anywhere;
}

.prose p {
  margin: 0 0 0.85rem;
}

.prose a {
  text-decoration: underline;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.episode-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.episode-row {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
}

.episode-row:hover {
  border-color: var(--accent);
}

.episode-row-art {
  width: 64px;
  height: 64px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.episode-row a {
  color: var(--text);
  font-weight: 600;
}

.episode-row a:hover {
  color: var(--accent);
}

.pubdate {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.crumb {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.episode-hero {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.episode-art {
  width: 140px;
  height: 140px;
  border-radius: var(--radius);
}

.player {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.player audio {
  display: none;
}

.player-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.player-play {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  font-size: 0.75rem;
  cursor: pointer;
}

.player-play:hover {
  background: var(--accent-dim);
}

.player-seek {
  flex: 1;
  min-width: 0;
  accent-color: var(--accent);
  height: 24px;
}

.player-time {
  font-size: 0.8125rem;
  color: var(--text-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.player-volume {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.player-volume input {
  flex: 1;
  accent-color: var(--accent);
  max-width: 220px;
}

.site-footer {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1rem 2.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .page-title,
  .show-title,
  .episode-title {
    font-size: 1.4rem;
  }

  .show-art {
    width: 140px;
    height: 140px;
  }

  .card-art {
    width: 64px;
    height: 64px;
  }

  .player-row {
    flex-wrap: wrap;
  }

  .player-time {
    width: 100%;
  }
}
