/* Heart of the Homily - page styles. Cream / deep green / gold, Cormorant Garamond + Jost. */
:root:not([data-theme="green"]) {
  --bg: #f6f1e7;
  --bg-soft: #efe8d8;
  --surface: #fffdf7;
  --surface-glass: rgba(255, 253, 247, 0.86);
  --ink: #1e3327;
  --ink-soft: #3a4d42;
  --muted: #5f5d52;
  --green: #1c4633;
  --green-deep: #143325;
  --green-bright: #2a5c43;
  --gold: #b08a3c;          /* decorative (lines, rings, thumbs) */
  --gold-text: #7a5c14;     /* gold used as TEXT on cream: >= 4.5:1 */
  --gold-soft: #cbb27a;
  --gold-faint: rgba(176, 138, 60, 0.32);
  --line: rgba(28, 70, 51, 0.16);
  --shadow-lg: 0 30px 60px -18px rgba(20, 51, 37, 0.28), 0 12px 24px -12px rgba(20, 51, 37, 0.16);
  --shadow-md: 0 18px 38px -16px rgba(20, 51, 37, 0.24), 0 6px 14px -8px rgba(20, 51, 37, 0.12);
  --shadow-sm: 0 8px 20px -10px rgba(20, 51, 37, 0.22);
}
:root {
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Jost", "Avenir Next", "Segoe UI", system-ui, sans-serif;
}
:root[data-theme="green"] {
    --bg: #0d2016;
    --bg-soft: #0a1a11;
    --surface: #14301f;
    --surface-glass: rgba(20, 48, 31, 0.88);
    --ink: #ece5d3;
    --ink-soft: #c3cdbd;
    --muted: #a3b09e;
    --green: #dce8d8;
    --green-deep: #08170e;
    --green-bright: #9dc3a5;
    --gold: #cfa856;
    --gold-text: #d9b562;
    --gold-soft: #a8894e;
    --gold-faint: rgba(207, 168, 86, 0.32);
    --line: rgba(236, 229, 211, 0.16);
    --shadow-lg: 0 30px 60px -18px rgba(0, 0, 0, 0.6), 0 12px 24px -12px rgba(0, 0, 0, 0.45);
    --shadow-md: 0 18px 38px -16px rgba(0, 0, 0, 0.55), 0 6px 14px -8px rgba(0, 0, 0, 0.4);
    --shadow-sm: 0 8px 20px -10px rgba(0, 0, 0, 0.5);
  }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: radial-gradient(120% 60% at 50% -10%, var(--bg-soft) 0%, var(--bg) 55%) fixed, var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--gold-faint); }
img { max-width: 100%; }

button, a { -webkit-tap-highlight-color: transparent; }
button, [role="button"], a.btn, a.row-play { min-height: 44px; }
button { font-family: var(--sans); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 680px; margin: 0 auto; padding: 0 22px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--green); color: #f4ecd9; padding: 10px 16px; border-radius: 8px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- reveal motion: content is visible unless JS is running ---------- */
html.js .reveal:not(.in) { opacity: 0; transform: translateY(18px); }
.reveal { transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal:not(.in) { opacity: 1; transform: none; }
  .reveal { transition: none; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ---------- hero (mobile first: the play button must sit above the fold) ---------- */
.hero { text-align: center; padding: 14px 0 6px; }
.hero-photo-wrap { margin: 0; }
.hero-photo {
  width: 100%; height: auto; aspect-ratio: 1672 / 941; max-height: 34vh; object-fit: cover; object-position: 50% 30%;
  border-radius: 18px; display: block;
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--gold-faint);
}
.hero-title {
  font-family: var(--serif); font-weight: 600; font-size: clamp(2rem, 9vw, 2.9rem);
  line-height: 1.05; margin: 14px 0 0; letter-spacing: 0.005em;
}
.byline {
  margin: 6px 0 0; font-size: 0.8rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--muted); font-weight: 400;
}

.hero-play-zone { margin-top: 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.play-hero {
  position: relative;
  width: 104px; height: 104px; min-height: 104px; border-radius: 50%;
  border: none; cursor: pointer;
  background: radial-gradient(120% 120% at 30% 25%, var(--green-bright), var(--green) 55%, var(--green-deep));
  color: #f4ecd9;
  display: grid; place-items: center;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 0 0 1px var(--gold-faint);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}
[data-theme="green"] .play-hero { background: radial-gradient(120% 120% at 30% 25%, #2a5c43, #1c4633 55%, #0f2a1c); }
.play-hero:hover { transform: translateY(-2px) scale(1.03); }
.play-hero:active { transform: scale(0.97); }
.play-hero::before, .play-hero::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid var(--gold-soft); opacity: 0; pointer-events: none;
}
.play-hero.idle::before { animation: ring 3.2s ease-out infinite; }
.play-hero.idle::after { animation: ring 3.2s ease-out 1.6s infinite; }
@keyframes ring {
  0% { transform: scale(1); opacity: 0.55; }
  70% { transform: scale(1.45); opacity: 0; }
  100% { transform: scale(1.45); opacity: 0; }
}
.play-hero svg { width: 38px; height: 38px; margin-left: 5px; }
.play-hero .icon-pause { margin-left: 0; display: none; }
.play-hero.playing .icon-play { display: none; }
.play-hero.playing .icon-pause { display: block; }
html:not(.js) .play-hero, html:not(.js) #heroLabel, html:not(.js) .player-card, html:not(.js) #mini { display: none; }

.hero-play-label { margin: 0; line-height: 1.3; max-width: 30ch; }
.hp-prefix {
  display: block; font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold-text); font-weight: 500;
}
.hp-title { display: block; font-family: var(--serif); font-weight: 600; font-size: 1.28rem; color: var(--ink); line-height: 1.2; margin-top: 3px; }
.hp-dur { display: block; font-size: 0.86rem; color: var(--muted); letter-spacing: 0.04em; margin-top: 2px; font-weight: 400; }

.hero .rule {
  display: flex; align-items: center; gap: 14px;
  max-width: 300px; margin: 22px auto 0; color: var(--gold);
}
.hero .rule::before, .hero .rule::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-soft), transparent);
}
.hero .rule svg { flex: none; }
.tagline {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(1.3rem, 5.4vw, 1.6rem);
  line-height: 1.45; color: var(--ink-soft);
  max-width: 30ch; margin: 16px auto 0;
}

/* follow row */
.follow-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 22px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 22px; min-height: 48px; border-radius: 999px;
  font-family: var(--sans); font-size: 0.95rem; font-weight: 400; letter-spacing: 0.03em;
  text-decoration: none; cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, background 0.3s ease;
}
.btn svg { width: 19px; height: 19px; flex: none; }
.btn-spotify { background: var(--green); color: #f2ecdc; box-shadow: var(--shadow-sm); border: 1px solid transparent; }
[data-theme="green"] .btn-spotify { background: #dce8d8; color: #14301f; }
.btn-spotify:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-apple {
  background: var(--surface-glass); color: var(--ink);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
}
.btn-apple:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--gold-faint); }
.btn:active { transform: scale(0.98); }

/* ---------- sections ---------- */
section { padding: 52px 0 0; }
.sec-head { text-align: center; margin-bottom: 24px; }
.sec-head h2 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.7rem, 6vw, 2.1rem); margin: 0; line-height: 1.15;
}
.sec-head .sec-rule { width: 44px; height: 1px; background: var(--gold); margin: 14px auto 0; opacity: 0.8; }
.sec-sub {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: 1.1rem; line-height: 1.55; color: var(--ink-soft);
  max-width: 44ch; margin: 14px auto 0;
}

/* ---------- player card ---------- */
.player-card {
  background: var(--surface-glass);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 26px 22px 22px;
  box-shadow: var(--shadow-lg);
  position: relative; overflow: hidden;
}
.player-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-soft), transparent);
  opacity: 0.9;
}
.player-top { display: flex; gap: 16px; align-items: center; }
.player-art { width: 74px; height: 74px; border-radius: 14px; flex: none; box-shadow: var(--shadow-sm), 0 0 0 1px var(--gold-faint); }
.player-meta { min-width: 0; }
.player-kicker { font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-text); font-weight: 500; margin: 0 0 4px; }
.player-title { font-family: var(--serif); font-weight: 600; font-size: 1.55rem; line-height: 1.15; margin: 0; overflow-wrap: anywhere; }
.player-sub { margin: 5px 0 0; font-size: 0.9rem; color: var(--muted); letter-spacing: 0.02em; }
.desc-label { font-size: 0.7rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold-text); font-weight: 500; margin: 20px 0 0; }
.player-desc { margin: 6px 0 0; font-size: 0.98rem; color: var(--ink-soft); line-height: 1.65; }
.player-noscript { margin: 16px 0 0; color: var(--ink-soft); font-size: 0.95rem; }
.player-noscript a { color: var(--gold-text); }
.player-status { margin: 12px 0 0; min-height: 1.4em; font-size: 0.88rem; color: var(--muted); text-align: center; }
.player-status.err { color: #8a2b1d; font-weight: 400; }
[data-theme="green"] .player-status.err { color: #ffb4a3; }

.scrub { margin-top: 18px; }
input[type="range"].seek {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 44px; background: transparent; cursor: pointer; margin: 0;
  --fill: 0%;
}
input[type="range"].seek::-webkit-slider-runnable-track {
  height: 4px; border-radius: 999px;
  background: linear-gradient(90deg, var(--gold) var(--fill), var(--line) var(--fill));
}
input[type="range"].seek::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--gold);
  margin-top: -7px; box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease;
}
input[type="range"].seek:active::-webkit-slider-thumb { transform: scale(1.25); }
input[type="range"].seek::-moz-range-track { height: 4px; border-radius: 999px; background: var(--line); }
input[type="range"].seek::-moz-range-progress { height: 4px; border-radius: 999px; background: var(--gold); }
input[type="range"].seek::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--gold); box-shadow: var(--shadow-sm);
}
.times { display: flex; justify-content: space-between; font-size: 0.82rem; color: var(--muted); letter-spacing: 0.08em; margin-top: -4px; font-variant-numeric: tabular-nums; }

.controls { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.ctl {
  border: none; cursor: pointer; display: grid; place-items: center; border-radius: 50%;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), background 0.25s ease, box-shadow 0.25s ease;
}
.ctl:active { transform: scale(0.94); }
.ctl-skip {
  width: 48px; height: 48px; background: transparent; color: var(--ink-soft);
  border: 1px solid var(--line); font-size: 0.68rem; font-weight: 500; letter-spacing: 0.02em;
  position: relative;
}
.ctl-skip:hover { border-color: var(--gold-faint); color: var(--ink); }
.ctl-skip svg { width: 22px; height: 22px; position: absolute; }
.ctl-skip span { position: relative; margin-top: 1px; }
.ctl-main {
  width: 64px; height: 64px; color: #f4ecd9;
  background: radial-gradient(120% 120% at 30% 25%, var(--green-bright), var(--green) 55%, var(--green-deep));
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
[data-theme="green"] .ctl-main { background: radial-gradient(120% 120% at 30% 25%, #2a5c43, #1c4633 55%, #0f2a1c); }
.ctl-main:hover { transform: translateY(-1px) scale(1.04); }
.ctl-main svg { width: 24px; height: 24px; margin-left: 3px; }
.ctl-main .icon-pause { margin-left: 0; display: none; }
.ctl-main.playing .icon-play { display: none; }
.ctl-main.playing .icon-pause { display: block; }
.speed-btn {
  background: transparent; border: 1px solid var(--line); color: var(--ink-soft);
  border-radius: 999px; padding: 8px 16px; font-size: 0.86rem; letter-spacing: 0.05em;
  cursor: pointer; min-width: 64px; min-height: 44px;
  transition: border-color 0.25s ease, color 0.25s ease;
}
.speed-btn:hover { border-color: var(--gold-faint); color: var(--ink); }

/* extras mount points stay out of the way when empty */
#x-share-slot:empty, #x-lang-slot:empty, #x-consent-slot:empty { display: none; }
#x-share-slot { margin-top: 14px; text-align: center; }
#x-lang-slot { position: absolute; top: 10px; right: 12px; z-index: 20; }

/* ---------- episode lists ---------- */
.ep-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ep-row {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--surface-glass);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 16px;
  padding: 14px 14px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}
.ep-row:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--gold-faint); }
.ep-row.current { border-color: var(--gold); }
.row-play {
  flex: none; width: 48px; height: 48px; border-radius: 50%; margin-top: 1px;
  border: 1px solid var(--gold-faint); background: var(--surface);
  color: var(--green); cursor: pointer; display: grid; place-items: center;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
[data-theme="green"] .row-play { color: var(--gold); }
.row-play:hover { transform: scale(1.07); }
.row-play svg { width: 17px; height: 17px; margin-left: 2px; }
.row-play .icon-pause { margin-left: 0; display: none; }
.ep-row.playing .row-play { background: var(--green); color: #f4ecd9; border-color: transparent; }
[data-theme="green"] .ep-row.playing .row-play { background: var(--gold); color: #14301f; }
.ep-row.playing .row-play .icon-play { display: none; }
.ep-row.playing .row-play .icon-pause { display: block; }
.ep-info { flex: 1; min-width: 0; }
.ep-title { font-family: var(--serif); font-weight: 600; font-size: 1.14rem; line-height: 1.25; margin: 0; overflow-wrap: anywhere; }
.ep-meta { margin: 2px 0 0; font-size: 0.82rem; color: var(--muted); letter-spacing: 0.04em; }
.ep-desc {
  margin: 6px 0 0; font-size: 0.9rem; color: var(--ink-soft); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.ep-desc.expanded { display: block; -webkit-line-clamp: unset; overflow: visible; }
.read-more {
  margin: 2px 0 0; padding: 0 2px; background: none; border: none; cursor: pointer;
  font-size: 0.84rem; font-weight: 500; letter-spacing: 0.05em;
  color: var(--gold-text); min-height: 44px; text-align: left;
}
.read-more:hover { color: var(--ink); }

.ep-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; }
.kind-badge {
  font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500;
  padding: 3px 9px; border-radius: 999px; line-height: 1.5; white-space: nowrap;
}
.kind-badge.daily { background: var(--green); color: #f2ecdc; }
[data-theme="green"] .kind-badge.daily { background: #dce8d8; color: #14301f; }
.kind-badge.weekly { background: #7a5c14; color: #fffdf7; }
[data-theme="green"] .kind-badge.weekly { background: var(--gold); color: #14301f; }
.kind-badge.meta-badge { background: transparent; color: var(--muted); border: 1px solid var(--line); letter-spacing: 0.08em; }

.feed-status {
  display: none; text-align: center; margin: 0 auto 18px; max-width: 52ch;
  font-size: 0.84rem; line-height: 1.55; color: var(--ink-soft);
  background: var(--surface-glass); border: 1px dashed var(--gold-faint);
  border-radius: 12px; padding: 10px 16px;
}
.feed-status.show { display: block; }
.feed-status strong { font-weight: 500; color: var(--ink); }
.ep-side { flex: none; display: flex; align-items: center; padding-top: 6px; }
.ep-dur { font-size: 0.82rem; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: 0.04em; white-space: nowrap; }
.eq { display: none; align-items: flex-end; gap: 2.5px; height: 14px; }
.ep-row.playing .eq { display: flex; }
.ep-row.playing .ep-dur { display: none; }
.eq i { width: 3px; background: var(--gold); border-radius: 2px; animation: eq 0.9s ease-in-out infinite; }
.eq i:nth-child(1) { height: 60%; animation-delay: 0s; }
.eq i:nth-child(2) { height: 100%; animation-delay: 0.25s; }
.eq i:nth-child(3) { height: 45%; animation-delay: 0.5s; }
@keyframes eq { 0%, 100% { transform: scaleY(0.5); } 50% { transform: scaleY(1); } }

/* ---------- intro ---------- */
.intro-card { text-align: center; padding: 14px 8px 0; }
.intro-quote {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.35rem, 5.6vw, 1.7rem);
  line-height: 1.5; margin: 0 auto; max-width: 34ch;
}
.intro-quote .drop { color: var(--gold-text); }
.intro-sign { margin: 20px 0 0; font-size: 0.82rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.intro-follow { margin-top: 28px; }
.intro-follow p { margin: 0 0 16px; font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--ink-soft); }
.intro-follow .follow-row { margin-top: 0; }

/* ---------- footer ---------- */
footer { padding: 60px 0 60px; text-align: center; }
.foot-rule { display: flex; align-items: center; gap: 14px; max-width: 300px; margin: 0 auto 26px; color: var(--gold); }
.foot-rule::before, .foot-rule::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-soft), transparent); }
.foot-name { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; margin: 0; }
.foot-sub { margin: 6px 0 0; font-size: 0.9rem; color: var(--muted); }
.foot-links { margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 0 22px; justify-content: center; }
.foot-links a {
  color: var(--ink-soft); text-decoration: none; font-size: 0.94rem; letter-spacing: 0.03em;
  padding: 10px 4px; min-height: 44px; display: inline-flex; align-items: center;
  border-bottom: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.foot-links a:hover { color: var(--gold-text); border-color: var(--gold-faint); }
.foot-privacy { margin: 18px auto 0; max-width: 52ch; font-size: 0.82rem; line-height: 1.6; color: var(--muted); }
.foot-privacy a { color: var(--ink-soft); }
.foot-copy { margin: 14px 0 0; font-size: 0.82rem; color: var(--muted); letter-spacing: 0.05em; }
/* podcast production credit: quiet text line in the footer */
.foot-produced { margin: 6px 0 0; font-size: 0.78rem; letter-spacing: 0.02em; color: var(--muted); }

section { scroll-margin-bottom: 120px; }
body.mini-on footer { padding-bottom: 150px; }

/* ---------- sticky mini player ---------- */
.mini {
  position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom));
  transform: translate(-50%, 160%);
  width: min(680px, calc(100% - 28px));
  background: var(--surface-glass);
  backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid var(--gold-faint); border-radius: 18px;
  box-shadow: var(--shadow-lg);
  padding: 10px 14px 10px;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0.55s;
  visibility: hidden;
  z-index: 50;
}
.mini.show { transform: translate(-50%, 0); visibility: visible; transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s; }
.mini-row { display: flex; align-items: center; gap: 12px; }
.mini-art { width: 42px; height: 42px; border-radius: 9px; flex: none; }
.mini-info { flex: 1; min-width: 0; }
.mini-title { font-family: var(--serif); font-weight: 600; font-size: 1.02rem; line-height: 1.2; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-sub { margin: 1px 0 0; font-size: 0.78rem; color: var(--muted); letter-spacing: 0.05em; font-variant-numeric: tabular-nums; }
.mini-btn {
  flex: none; width: 48px; height: 48px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--green); color: #f4ecd9; display: grid; place-items: center;
  box-shadow: var(--shadow-sm); transition: transform 0.25s ease;
}
[data-theme="green"] .mini-btn { background: var(--gold); color: #14301f; }
.mini-btn:active { transform: scale(0.93); }
.mini-btn svg { width: 18px; height: 18px; margin-left: 2px; }
.mini-btn .icon-pause { margin-left: 0; display: none; }
.mini-btn.playing .icon-play { display: none; }
.mini-btn.playing .icon-pause { display: block; }
.mini-progress { height: 3px; border-radius: 999px; background: var(--line); margin-top: 8px; overflow: hidden; }
.mini-progress i { display: block; height: 100%; width: 0%; background: var(--gold); border-radius: 999px; transition: width 0.3s linear; }

/* expanded preview ribbon (index-expanded.html only) */
.preview-ribbon {
  position: relative; z-index: 30; text-align: center; padding: 6px 12px;
  font-size: 0.78rem; letter-spacing: 0.08em; color: #fffdf7; background: #7a5c14;
}

@media (min-width: 720px) {
  .hero { padding-top: 40px; }
  .hero-photo { max-height: none; }
  .hero-title { margin-top: 22px; }
  .hero-play-zone { margin-top: 24px; }
  .player-card { padding: 34px 34px 28px; }
  section { padding-top: 64px; }
}

/* ---------- v4: follow icons in the mini player ---------- */
.mini-follow { display: flex; gap: 6px; flex: none; }
.mini-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 999px; color: var(--green);
  border: 1px solid var(--line); text-decoration: none;
}
.mini-link svg { width: 20px; height: 20px; }
.mini-link:hover { background: var(--gold-faint); }
.mini-link:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- v5: previous / next episode buttons ---------- */
.ctl-nav {
  width: 44px; height: 44px; background: transparent; color: var(--ink-soft);
}
.ctl-nav svg { width: 20px; height: 20px; }
.ctl-nav:hover:not(:disabled) { color: var(--ink); background: var(--gold-faint); }
.ctl-nav:disabled, .mini-nav:disabled { opacity: 0.3; cursor: default; }
.ctl-nav:focus-visible, .mini-nav:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.mini-nav {
  flex: none; width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer;
  background: transparent; color: var(--green); display: grid; place-items: center; padding: 0;
}
.mini-nav svg { width: 18px; height: 18px; }
.mini-nav:hover:not(:disabled) { background: var(--gold-faint); }
[data-theme="green"] .mini-nav { color: var(--gold); }
.mini.show { transition-duration: 0.4s, 0s; }
/* Phones: art + Spotify/Apple icons are dropped so title + prev/play/next + share all keep 44px targets (follow links stay in the hero, intro, end card and guide). */
@media (max-width: 640px) {
  .mini { padding: 8px 8px 8px 12px; }
  .mini-row { gap: 2px; }
  .mini-art, .mini-follow { display: none; }
  .mini-info { margin-right: 4px; }
  .mini-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 0.98rem; line-height: 1.15; }
  .mini-btn { width: 44px; height: 44px; }
  .controls { gap: 8px; }
}
@media (max-width: 400px) { .controls { gap: 4px; } }

/* ---------- v11: ±15 s in the mini player ---------- */
.mini-skip {
  flex: none; position: relative; width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer; padding: 0;
  background: transparent; color: var(--green); display: grid; place-items: center;
  font-size: 0.62rem; font-weight: 600; letter-spacing: 0.01em; line-height: 1;
}
.mini-skip svg { width: 24px; height: 24px; position: absolute; left: 10px; top: 10px; }
.mini-skip span { position: relative; margin-top: 1px; }
.mini-skip:hover { background: var(--gold-faint); }
.mini-skip:active { transform: scale(0.93); }
.mini-skip:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
[data-theme="green"] .mini-skip { color: var(--gold); }
/* follow icons only where there is room for them next to prev / -15 / play / +15 / next / share */
@media (max-width: 760px) { .mini-follow { display: none; } }
/* phones: [title/time] [-15] [play] [+15] [share] */
@media (max-width: 479px) { .mini-nav { display: none; } }

/* ---------- v4: end-of-episode follow card (non-modal) ---------- */
.endcard {
  position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom));
  transform: translate(-50%, 12px); opacity: 0;
  width: min(480px, calc(100% - 28px)); box-sizing: border-box;
  background: var(--surface-glass, var(--bg)); color: var(--ink);
  backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid var(--gold-faint); border-radius: 18px; box-shadow: var(--shadow-lg, 0 12px 40px rgba(0,0,0,.18));
  padding: 16px 18px 14px; z-index: 55; text-align: center;
  transition: transform 0.35s ease, opacity 0.35s ease;
}
.endcard.show { transform: translate(-50%, 0); opacity: 1; }
.endcard[hidden] { display: none; }

.endcard-title { font-family: var(--serif); font-weight: 600; font-size: 1.3rem; line-height: 1.2; margin: 0 28px 4px; color: var(--green); }
.endcard-sub { margin: 0 0 12px; font-size: 0.9rem; color: var(--ink-soft); }
.endcard-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.endcard-actions .btn { flex: 1 1 180px; }
.endcard-draft { margin: 8px 0 0; font-size: 0.72rem; font-style: italic; color: var(--muted); }
.endcard-draft[hidden] { display: none; }
.endcard-close {
  position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; border: 0; border-radius: 999px;
  background: transparent; color: var(--ink-soft); font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.endcard-close:hover { background: var(--gold-faint); }
.endcard-close:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.sr-only-x { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (prefers-reduced-motion: reduce) {
  .endcard { transition: none; transform: translate(-50%, 0); }
}

/* ---------- v4: subtle Spanish draft note under the hero play label ---------- */
.x-draft-note { margin: 6px 0 0; font-size: 0.72rem; font-style: italic; letter-spacing: 0.02em; color: var(--muted); text-align: center; }
.x-draft-note[hidden] { display: none; }

/* ---------- v6: share (player-card button, mini-player icon, end-card button, share sheet) ---------- */
.hs-row { margin-top: 10px; display: flex; justify-content: center; align-items: center; gap: 10px; }
.hs-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: 999px; cursor: pointer;
  font-family: var(--sans); font-size: 1rem; font-weight: 400; letter-spacing: 0.02em;
  color: var(--green); background: transparent; border: 1px solid var(--gold-faint);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.hs-btn svg { width: 20px; height: 20px; flex: none; }
.hs-btn:hover { background: var(--gold-faint); border-color: var(--gold); }
.hs-btn:focus-visible, .hs-opt:focus-visible, .hs-x:focus-visible, .mini-share:focus-visible, .hs-url:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.mini-share {
  flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); cursor: pointer; padding: 0;
  background: transparent; color: var(--green); display: grid; place-items: center;
}
.mini-share svg { width: 20px; height: 20px; }
.mini-share:hover { background: var(--gold-faint); }
.endcard-share { margin-top: 8px; display: flex; justify-content: center; }
.hs-btn--end { width: 100%; }
.hs-lock { overflow: hidden; }
.hs-overlay {
  position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center;
  background: rgba(12, 28, 19, 0.5); padding: 16px;
  animation: hs-fade 0.2s ease;
}
.hs-sheet {
  position: relative; width: min(440px, 100%); max-height: calc(100dvh - 32px); overflow: auto;
  background: var(--surface); color: var(--ink); border: 1px solid var(--gold-faint); border-radius: 20px;
  box-shadow: var(--shadow-lg); padding: 22px 20px 20px;
  animation: hs-rise 0.25s ease;
}
.hs-sheet:focus { outline: none; }
.hs-title { font-family: var(--serif); font-weight: 600; font-size: 1.55rem; line-height: 1.15; margin: 0 48px 4px 0; color: var(--green); }
.hs-ep { margin: 0 0 4px; font-size: 1rem; line-height: 1.4; color: var(--ink-soft); }
.hs-draft { margin: 0 0 4px; font-size: 0.8rem; font-style: italic; color: var(--muted); }
.hs-draft[hidden] { display: none; }
.hs-x {
  position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border: 0; border-radius: 50%; cursor: pointer;
  background: transparent; color: var(--ink-soft); display: grid; place-items: center; padding: 0;
}
.hs-x svg { width: 20px; height: 20px; }
.hs-x:hover { background: var(--gold-faint); }
.hs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0 12px; }
.hs-opt {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; border-radius: 14px;
  border: 1px solid var(--line); background: transparent; color: var(--ink); text-decoration: none; cursor: pointer;
  font-family: var(--sans); font-size: 1rem; font-weight: 400; text-align: left;
}
.hs-opt svg { width: 22px; height: 22px; flex: none; color: var(--green); }
.hs-opt:hover { background: var(--gold-faint); border-color: var(--gold); }
.hs-opt--copy { grid-column: 1 / -1; background: var(--green); color: #f4ecd9; border-color: transparent; justify-content: center; }
.hs-opt--copy svg { color: inherit; }
.hs-opt--copy:hover { background: var(--green-bright); border-color: transparent; }
.hs-opt--copy.is-done { background: #2f6b47; }
[data-theme="green"] .hs-opt--copy { background: var(--gold); color: #14301f; }
[data-theme="green"] .hs-opt--copy:hover { background: var(--gold-soft); }
[data-theme="green"] .hs-opt--copy.is-done { background: #9dc3a5; }
[data-theme="green"] .hs-overlay { background: rgba(0, 0, 0, 0.62); }
.hs-url {
  width: 100%; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg-soft); color: var(--ink-soft); font-family: var(--sans); font-size: 1rem; text-overflow: ellipsis;
}
.hs-status { min-height: 1.4em; margin: 8px 0 0; font-size: 0.95rem; font-weight: 500; color: var(--gold-text); }
@keyframes hs-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes hs-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (max-width: 560px) {
  .hs-overlay { align-items: flex-end; padding: 0; }
  .hs-sheet {
    width: 100%; border-radius: 20px 20px 0 0; border-bottom: 0;
    padding-bottom: calc(20px + env(safe-area-inset-bottom)); max-height: 90dvh;
    animation: hs-up 0.25s ease;
  }
}
@keyframes hs-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .hs-overlay, .hs-sheet { animation: none; }
  .hs-btn { transition: none; }
}


/* ===== R4 polish ===== (Apple-Music-meets-landing-page refinement; theme switch is <html data-theme="green">) */
:root { --spring: cubic-bezier(0.34, 1.56, 0.64, 1); }
:root:not([data-theme="green"]) {
  --glass-bg: rgba(255, 253, 247, 0.74);
  --glass-border: rgba(28, 70, 51, 0.16);
  --glass-hi: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  --glass-solid: rgba(255, 253, 247, 0.98);
  --glow-a: rgba(176, 138, 60, 0.35);
  --glow-b: rgba(42, 92, 67, 0.3);
}
:root[data-theme="green"] {
  --glass-bg: rgba(14, 38, 25, 0.72);
  --glass-border: rgba(236, 229, 211, 0.16);
  --glass-hi: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  --glass-solid: rgba(13, 32, 22, 0.98);
  --glow-a: rgba(207, 168, 86, 0.34);
  --glow-b: rgba(61, 128, 90, 0.34);
}

/* frosted glass: small / fixed surfaces only */
.mini, .endcard, .hs-sheet {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg), var(--glass-hi);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .mini, .endcard, .hs-sheet { background: var(--glass-solid); }
}

/* player card: now-playing feel */
.player-card { isolation: isolate; }
.player-card::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  left: -10%; top: -30%; width: 120%; height: 90%;
  background: radial-gradient(50% 50% at 28% 40%, var(--glow-a), transparent 70%), radial-gradient(45% 55% at 75% 45%, var(--glow-b), transparent 70%);
  filter: blur(26px); opacity: 0.35; transition: opacity 0.9s ease;
}
.player-card.is-playing::after { opacity: 0.85; }
.player-art {
  transition: transform 0.6s var(--spring); transform-origin: 50% 50%;
  box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--gold-faint);
}
.player-card.is-playing .player-art { transform: scale(1.04); }

/* pill seek bar: thickens on hover / drag / keyboard focus */
input[type="range"].seek::-webkit-slider-runnable-track { height: 4px; transition: height 0.2s ease; }
input[type="range"].seek:hover::-webkit-slider-runnable-track,
input[type="range"].seek:active::-webkit-slider-runnable-track,
input[type="range"].seek:focus-visible::-webkit-slider-runnable-track { height: 8px; }
input[type="range"].seek::-webkit-slider-thumb { margin-top: -7px; transition: transform 0.25s var(--spring), margin-top 0.2s ease; }
input[type="range"].seek:hover::-webkit-slider-thumb,
input[type="range"].seek:active::-webkit-slider-thumb,
input[type="range"].seek:focus-visible::-webkit-slider-thumb { margin-top: -5px; }
input[type="range"].seek::-moz-range-track, input[type="range"].seek::-moz-range-progress { transition: height 0.2s ease; }
input[type="range"].seek:hover::-moz-range-track, input[type="range"].seek:hover::-moz-range-progress,
input[type="range"].seek:active::-moz-range-track, input[type="range"].seek:active::-moz-range-progress { height: 8px; }
input[type="range"].seek:focus-visible { outline-offset: -2px; border-radius: 999px; }

/* spring-y press states */
.btn, .ctl, .mini-btn, .mini-nav, .mini-share, .speed-btn, .hs-btn, .hs-opt, .row-play, .play-hero {
  transition-property: transform, box-shadow, background-color, border-color, color, filter;
  transition-duration: 0.28s; transition-timing-function: var(--spring);
}
.btn:active, .ctl:active, .ctl-main:active, .mini-btn:active, .mini-nav:active, .mini-share:active,
.speed-btn:active, .hs-btn:active, .hs-opt:active, .row-play:active, .play-hero:active { transform: scale(0.96); }

/* glossy primary play buttons */
:root:not([data-theme="green"]) .play-hero, :root:not([data-theme="green"]) .ctl-main {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0) 48%), radial-gradient(120% 120% at 30% 25%, var(--green-bright), var(--green) 55%, var(--green-deep));
}
[data-theme="green"] .play-hero, [data-theme="green"] .ctl-main {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0) 48%), radial-gradient(120% 120% at 30% 25%, #2a5c43, #1c4633 55%, #0f2a1c);
}
.play-hero { box-shadow: 0 22px 40px -14px rgba(0, 0, 0, 0.6), 0 8px 26px -8px rgba(207, 168, 86, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.32), 0 0 0 1px var(--gold-faint); }
.ctl-main { box-shadow: 0 14px 26px -10px rgba(0, 0, 0, 0.55), 0 4px 16px -6px rgba(207, 168, 86, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 0 0 1px var(--gold-faint); }

/* refined pills */
.btn:hover { filter: brightness(1.05); }
.mini-btn { box-shadow: 0 6px 14px -6px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.35); }

/* now-playing equalizer (rows): bars grow from the baseline; hidden (static) when paused */
.eq i { transform-origin: 50% 100%; }

@media (prefers-reduced-motion: reduce) {
  .player-art, .player-card::after, .btn, .ctl, .mini-btn, .mini-nav, .mini-share, .speed-btn, .hs-btn, .hs-opt, .row-play, .play-hero,
  input[type="range"].seek::-webkit-slider-thumb, input[type="range"].seek::-webkit-slider-runnable-track { transition: none; }
  .player-card.is-playing .player-art { transform: none; }
  .btn:active, .ctl:active, .ctl-main:active, .mini-btn:active, .mini-nav:active, .mini-share:active,
  .speed-btn:active, .hs-btn:active, .hs-opt:active, .row-play:active, .play-hero:active, .play-hero:hover, .ep-row:hover { transform: none; }
  .eq i { animation: none; transform: scaleY(0.8); }
  .play-hero.idle::before, .play-hero.idle::after { animation: none; }
}

/* ---------- builder credit (footer) ---------- */
.foot-credit { margin: 14px 0 0; }
.foot-credit a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px;
  font-size: 0.78rem; letter-spacing: 0.04em; color: var(--muted); text-decoration: none;
  border-radius: 999px; transition: color 0.2s ease, background-color 0.2s ease;
}
.foot-credit a:hover { color: var(--ink-soft); background: var(--gold-faint); }
.foot-credit a:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.foot-credit img { width: 34px; height: 24px; object-fit: contain; }
.foot-credit strong { font-weight: 500; color: var(--ink-soft); }
.foot-credit img {
  width: 30px; height: 30px; padding: 5px 4px; box-sizing: border-box; object-fit: contain;
  background: radial-gradient(120% 120% at 30% 25%, #2a5c43, #1c4633 60%, #12301f);
  border-radius: 8px; box-shadow: 0 0 0 1px rgba(176, 138, 60, 0.45), 0 4px 10px -6px rgba(16, 40, 26, 0.6);
}
/* leave room under the credit so the floating chat button and sticky player never sit on it */
footer { padding-bottom: 240px; } /* the sticky player is always showing by the time the footer is reached */
body.mini-on footer { padding-bottom: 240px; }


/* ===== R5 fixes (cream theme only) ===== */
:root:not([data-theme="green"]) {
  --glass-bg: rgba(255, 253, 247, 0.9);
  --glow-a: rgba(201, 160, 72, 0.26);
  --glow-b: rgba(224, 190, 110, 0.14);
}
/* hero play: lighter shadow, label above it on clean cream */
:root:not([data-theme="green"]) .play-hero {
  box-shadow: 0 14px 26px -14px rgba(20, 51, 37, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 0 0 1px var(--gold-faint);
}
.hero-play-label, #heroLabel { position: relative; z-index: 1; }
:root:not([data-theme="green"]) .hero-play-zone { gap: 14px; }
/* player card glow: clean warm gold only */
:root:not([data-theme="green"]) .player-card::after {
  background: radial-gradient(55% 60% at 30% 40%, var(--glow-a), transparent 72%), radial-gradient(40% 50% at 78% 40%, var(--glow-b), transparent 72%);
  opacity: 0.3;
}
:root:not([data-theme="green"]) .player-card.is-playing::after { opacity: 0.5; }
:root:not([data-theme="green"]) .player-kicker { color: #6d520f; }
:root:not([data-theme="green"]) .mini-sub { color: #4a483f; }
/* share sheet: light warm scrim, clean cream sheet */
:root:not([data-theme="green"]) .hs-overlay {
  background: rgba(30, 40, 30, 0.28);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
:root:not([data-theme="green"]) .hs-sheet { background: rgba(255, 253, 247, 0.97); }
:root:not([data-theme="green"]) .endcard { background: rgba(255, 253, 247, 0.95); }
:root:not([data-theme="green"]) .mini { background: rgba(255, 253, 247, 0.94); }

/* R5: read-more sits over the gold card glow; darker gold keeps AA */
:root:not([data-theme="green"]) .read-more { color: #5e460c; }

/* ===== episode descriptions: full show notes, clamped with "Read all" ===== */
.player-desc, .ep-desc, .x-row-desc { white-space: pre-line; overflow-wrap: anywhere; }
.player-desc.clamp:not(.expanded) {
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden;
}
.x-row-desc { margin: 4px 0 0; font-size: 0.88rem; line-height: 1.5; color: var(--ink-soft); }
.x-row-desc.clamp:not(.expanded) {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.player-desc + .read-more { margin-top: 4px; }
.x-row-desc + .read-more { min-height: 40px; margin: 0; font-size: 0.8rem; }
.read-more:focus-visible { outline: 2px solid var(--gold-text); outline-offset: 2px; border-radius: 6px; }
