:root {
  color-scheme: dark;
  --ink: #020202;
  --deep: #0a0907;
  --panel: rgba(17, 14, 11, 0.82);
  --panel-strong: rgba(28, 22, 16, 0.94);
  --line: rgba(205, 169, 104, 0.18);
  --text: #f1e6cd;
  --muted: #b9ad98;
  --quiet: #837969;
  --amber: #b8894d;
  --amber-strong: #e8c47f;
  --seafoam: #637c6f;
  --shadow: 0 38px 130px rgba(0, 0, 0, 0.68);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-family: var(--sans);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--ink);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 28% 18%, rgba(180, 128, 70, 0.2), transparent 15rem),
    radial-gradient(ellipse at 72% 6%, rgba(69, 83, 59, 0.16), transparent 24rem),
    linear-gradient(118deg, rgba(232, 196, 127, 0.06) 0 1px, transparent 1px 36px),
    linear-gradient(180deg, #020202 0%, #090806 46%, #15110d 100%);
  font-size: 16px;
  line-height: 1.65;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse at 45% -8%, rgba(232, 196, 127, 0.2), transparent 24rem),
    radial-gradient(ellipse at 20% 62%, rgba(85, 62, 36, 0.18), transparent 28rem),
    linear-gradient(180deg, rgba(8, 8, 6, 0) 0%, rgba(2, 2, 2, 0.9) 74%);
  content: "";
  pointer-events: none;
}

body::after {
  position: fixed;
  inset: auto 0 0;
  z-index: -1;
  height: 34vh;
  background:
    repeating-linear-gradient(180deg, rgba(99, 124, 111, 0.09) 0 1px, transparent 1px 24px),
    linear-gradient(180deg, rgba(11, 10, 8, 0), rgba(2, 2, 2, 0.96));
  content: "";
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.site-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 0 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  font-family: var(--serif);
  font-size: clamp(1.34rem, 3vw, 1.82rem);
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(244, 199, 120, 0.5);
  border-radius: 50%;
  color: var(--amber-strong);
  background:
    linear-gradient(145deg, rgba(232, 196, 127, 0.18), rgba(99, 124, 111, 0.06)),
    rgba(16, 13, 10, 0.9);
  box-shadow: 0 0 40px rgba(184, 137, 77, 0.2), inset 0 0 28px rgba(238, 214, 172, 0.07);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  padding: 5px;
  border: 1px solid rgba(205, 169, 104, 0.13);
  border-radius: 999px;
  background: rgba(4, 4, 3, 0.56);
  backdrop-filter: blur(18px);
}

.nav a,
.pill-link,
.button {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.2;
}

.nav a {
  padding: 10px 14px;
}

.nav a:hover,
.pill-link:hover,
.button:hover,
.text-link:hover {
  color: var(--text);
}

.nav a:hover,
.pill-link:hover,
.button:hover {
  border-color: rgba(184, 137, 77, 0.42);
  background: rgba(255, 255, 255, 0.05);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 0.74fr);
  gap: clamp(30px, 6vw, 82px);
  align-items: center;
  min-height: min(820px, calc(100vh - 112px));
  padding: clamp(24px, 4vw, 56px) 0 clamp(36px, 6vw, 70px);
}

.hero::before {
  position: absolute;
  right: 34%;
  bottom: 8%;
  left: -8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(184, 137, 77, 0.56), rgba(99, 124, 111, 0.22), transparent);
  content: "";
  opacity: 0.7;
}

.hero-copy {
  position: relative;
  display: grid;
  gap: 22px;
  max-width: 720px;
}

.hero h1 {
  max-width: 10ch;
  text-wrap: balance;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

.hero-feature {
  position: relative;
  display: grid;
  gap: 18px;
}

.hero-feature::before {
  position: absolute;
  inset: 28px -22px 18px 36px;
  z-index: -1;
  border: 1px solid rgba(99, 124, 111, 0.16);
  border-radius: 36px;
  background: rgba(99, 124, 111, 0.04);
  content: "";
}

.cover-large,
.cover-frame {
  overflow: hidden;
  border: 1px solid rgba(184, 137, 77, 0.32);
  border-radius: 26px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.cover-large {
  aspect-ratio: 1;
  transform: rotate(1.4deg);
}

.cover-large img,
.cover-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.now-playing,
.player-card,
.episode-card,
.archive-item,
.support-panel,
.about-copy,
.debug-panel {
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(238, 214, 172, 0.07), rgba(255, 255, 255, 0.014)),
    var(--panel);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(22px);
}

.now-playing {
  display: grid;
  gap: 12px;
  padding: 20px;
  border-radius: 24px;
}

.now-playing h2 {
  max-width: 17ch;
  font-size: clamp(1.65rem, 3vw, 2.55rem);
}

.eyebrow {
  margin: 0;
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.04;
}

h1 {
  font-size: clamp(3.8rem, 8vw, 7.8rem);
}

.page-title {
  max-width: 11ch;
  padding: 54px 0 18px;
  font-size: clamp(3rem, 7vw, 6rem);
  text-wrap: balance;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.35rem);
}

h3 {
  font-size: 1.36rem;
}

.summary {
  max-width: 56ch;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.28rem);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: var(--quiet);
  font-size: 0.95rem;
}

.dot {
  color: rgba(244, 199, 120, 0.72);
}

.player-card {
  display: grid;
  gap: 14px;
  margin-top: 4px;
  padding: 16px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(184, 137, 77, 0.12), rgba(99, 124, 111, 0.035)),
    rgba(5, 5, 4, 0.66);
}

audio {
  width: 100%;
  min-height: 48px;
  accent-color: var(--amber);
}

.player-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.control-group {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid rgba(205, 169, 104, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
}

.control-group label {
  color: var(--quiet);
  font-size: 0.88rem;
}

select,
button {
  font: inherit;
}

select {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
}

.button,
.pill-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  background: rgba(255, 255, 255, 0.045);
}

.button {
  cursor: pointer;
}

.button.primary {
  border-color: rgba(255, 225, 163, 0.62);
  background: linear-gradient(180deg, #e8c47f, #9c6a36);
  color: #100d08;
  font-weight: 850;
  box-shadow: 0 14px 42px rgba(156, 106, 54, 0.3);
}

.quiet-button {
  color: var(--amber-strong);
}

.text-link {
  color: var(--amber-strong);
  font-size: 0.95rem;
  font-weight: 800;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 22px 0 18px;
}

.episode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding-bottom: 58px;
}

.episode-card {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 18px;
  padding: 14px;
  border-radius: 24px;
}

.episode-card-art,
.archive-art {
  display: block;
  overflow: hidden;
  width: 100%;
  height: 100%;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.episode-card img {
  aspect-ratio: 1;
  width: 100%;
  object-fit: cover;
  transition: transform 420ms ease;
}

.episode-card:hover img,
.archive-item:hover img {
  transform: scale(1.035);
}

.card-copy {
  display: grid;
  align-content: center;
  gap: 9px;
  min-width: 0;
  padding-right: 4px;
}

.card-copy p,
.archive-item p {
  margin: 0;
  color: var(--muted);
}

.archive-list {
  display: grid;
  gap: 16px;
  padding: 18px 0 62px;
}

.archive-item {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 24px;
}

.archive-item img {
  aspect-ratio: 1;
  width: 126px;
  height: 126px;
  object-fit: cover;
  transition: transform 420ms ease;
}

.episode-layout {
  display: grid;
  grid-template-columns: minmax(280px, 430px) minmax(0, 1fr);
  gap: clamp(30px, 6vw, 72px);
  align-items: start;
  padding: 54px 0 52px;
}

.episode-body {
  display: grid;
  gap: 22px;
}

.episode-body h1 {
  max-width: 12ch;
}

.full-summary {
  max-width: 66ch;
  color: var(--muted);
  font-size: 1.12rem;
}

.source-credit {
  max-width: 72ch;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--quiet);
  font-size: 0.96rem;
}

.episode-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  padding-top: 18px;
}

.about-copy,
.support-panel {
  max-width: 780px;
  padding: clamp(24px, 5vw, 40px);
  margin: 16px 0 64px;
  border-radius: 24px;
}

.about-copy p,
.support-panel p {
  margin-top: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.debug-shell {
  display: grid;
  gap: 22px;
  padding: 42px 0 64px;
}

.debug-head {
  display: flex;
  gap: 18px;
  align-items: flex-end;
  justify-content: space-between;
}

.debug-title {
  max-width: none;
  margin-bottom: 10px;
}

.debug-panel {
  display: grid;
  gap: 16px;
  padding: clamp(18px, 4vw, 28px);
  border-radius: 24px;
}

.debug-panel audio {
  width: 100%;
}

.waveform {
  width: 100%;
  height: 260px;
  border: 1px solid rgba(250, 231, 183, 0.18);
  border-radius: 18px;
  background: #101d34;
  cursor: pointer;
}

.debug-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.selection-readout {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(250, 231, 183, 0.16);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(12, 22, 39, 0.62);
}

.marker-list {
  display: grid;
  gap: 10px;
}

.marker-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(126, 211, 194, 0.24);
  border-radius: 14px;
  color: var(--text);
  background: rgba(126, 211, 194, 0.08);
  text-align: left;
  cursor: pointer;
}

.marker-row:hover {
  border-color: rgba(126, 211, 194, 0.52);
}

.marker-row span:first-child {
  color: var(--seafoam);
  font-weight: 700;
}

.empty-state {
  margin: 0;
  color: var(--quiet);
}

.site-footer {
  padding: 32px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--quiet);
}

.site-footer .site-shell {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
}

@media (max-width: 900px) {
  .site-shell {
    width: min(100% - 28px, 680px);
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    justify-content: flex-start;
    border-radius: 20px;
  }

  .hero,
  .episode-layout {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 28px;
  }

  .hero::before {
    right: 0;
    bottom: auto;
    left: 0;
    top: 0;
    height: 1px;
  }

  .hero h1,
  h1,
  .episode-body h1 {
    max-width: none;
  }

  .hero-feature::before {
    inset: 22px -8px 8px 24px;
    border-radius: 28px;
  }

  .cover-large {
    transform: none;
  }

  .episode-grid {
    grid-template-columns: 1fr;
  }

  .episode-card,
  .archive-item {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .episode-card img,
  .archive-item img {
    width: 96px;
    height: 96px;
  }

  .archive-item .pill-link {
    grid-column: 1 / -1;
    width: 100%;
  }

  .player-tools,
  .control-group,
  .button {
    width: 100%;
  }

  .button {
    text-align: center;
  }

  .control-group {
    justify-content: space-between;
  }

  .debug-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .debug-controls .button {
    width: calc(50% - 5px);
  }

  .debug-controls .button.primary {
    width: 100%;
  }

  .marker-row {
    grid-template-columns: 64px minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .site-shell {
    width: min(100% - 22px, 430px);
  }

  .site-header {
    padding-top: 18px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .nav a {
    flex: 1 1 auto;
    justify-content: center;
    text-align: center;
  }

  h1 {
    font-size: clamp(3.05rem, 16vw, 4.7rem);
  }

  .page-title {
    padding-top: 34px;
    font-size: clamp(2.55rem, 14vw, 4.3rem);
  }

  .hero {
    gap: 28px;
  }

  .hero-actions {
    display: grid;
  }

  .now-playing {
    padding: 16px;
  }

  .episode-card,
  .archive-item {
    grid-template-columns: 1fr;
  }

  .episode-card img,
  .archive-item img {
    width: 100%;
    height: auto;
  }
}
