.podcast-page,
.podcast-dock {
  --podcast-ink: #182d30;
  --podcast-accent: #286b61;
  --podcast-muted: #4f6868;
  --podcast-edge: #d8e6e2;
  --podcast-paper: #f7faf7;
  --podcast-heading-font: "Kids Reader Round", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--podcast-ink);
}

.podcast-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px clamp(14px, 4vw, 40px) 56px;
}

.podcast-page [hidden],
.podcast-dock[hidden],
.podcast-dock [hidden] { display: none; }

.podcast-page button,
.podcast-dock button,
.podcast-dock select {
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.podcast-page button:focus-visible,
.podcast-dock :is(button, select, input):focus-visible {
  outline: 2px solid var(--podcast-accent);
  outline-offset: 3px;
}

.podcast-page h1,
.podcast-page h2,
.podcast-page h3 {
  margin: 0;
  font: 760 1.5rem / 1.25 var(--podcast-heading-font);
  color: var(--podcast-ink);
}

.podcast-page-header {
  display: grid;
  justify-items: start;
  gap: 4px;
  margin-bottom: 18px;
}

.podcast-page-header .podcast-back {
  min-height: 34px;
  margin: 0 0 3px;
  padding: 3px 0;
  border: 0;
  background: transparent;
  color: var(--podcast-accent);
  font-size: .85rem;
}

.podcast-page-header h1 {
  font-size: clamp(29px, 5.5vw, 46px);
  letter-spacing: -.04em;
}

.podcast-page-header p,
.podcast-level-info,
.podcast-empty,
.podcast-credit {
  margin: 0;
  color: var(--podcast-muted);
  font-size: .87rem;
  line-height: 1.55;
}

.podcast-browser-note {
  margin: 0 0 14px;
  padding: 8px 10px;
  border-inline-start: 2px solid var(--podcast-accent);
  background: #ecf4f0;
}

.podcast-feature-slot:empty { display: none; }

.podcast-feature {
  display: grid;
  grid-template-columns: minmax(0, .93fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(13px, 4vw, 34px);
  min-width: 0;
  padding: clamp(12px, 2.8vw, 24px);
  overflow: hidden;
  border: 1px solid #d9e7df;
  border-radius: clamp(16px, 5vw, 28px);
  background: linear-gradient(125deg, #f2f6ee 3%, #e5f1e9 92%);
  box-shadow: 0 16px 26px -26px #163f3b80;
}

.podcast-cover {
  --cover-background: #c8e6db;
  --cover-ink: #367569;
  position: relative;
  display: grid;
  flex: none;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 22%;
  background: var(--cover-background);
  color: var(--cover-ink);
}

.podcast-cover[data-cover-level="foundation"] {
  --cover-background: #f2d6b8;
  --cover-ink: #865736;
}

.podcast-cover[data-cover-level="advanced"] {
  --cover-background: #d9d5ef;
  --cover-ink: #514a82;
}

.podcast-cover > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.podcast-cover-placeholder {
  font-family: system-ui, sans-serif;
  font-weight: 800;
  line-height: 1;
}

.podcast-feature-cover {
  width: 100%;
  border-radius: clamp(12px, 4vw, 22px);
  box-shadow: 0 9px 22px -14px #19382eb0;
}

.podcast-feature-cover .podcast-cover-placeholder { font-size: clamp(32px, 9vw, 74px); }

.podcast-feature-copy {
  display: grid;
  justify-items: start;
  gap: 5px;
  min-width: 0;
}

.podcast-feature-kicker {
  color: var(--podcast-accent);
  font-size: clamp(.72rem, 3vw, .87rem);
  font-weight: 730;
}

.podcast-feature-copy h2 {
  font-size: clamp(19px, 5.2vw, 43px);
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.podcast-feature-copy p {
  margin: 0;
  color: var(--podcast-muted);
  font-size: clamp(.76rem, 3.2vw, 1rem);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.podcast-feature-copy .podcast-feature-description {
  display: -webkit-box;
  max-width: 28em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.45;
}

.podcast-feature-meta,
.podcast-episode-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  color: var(--podcast-muted);
  font-size: .76rem;
  font-variant-numeric: tabular-nums;
}

.podcast-feature-meta { margin: 4px 0; }

.podcast-tier {
  padding: 2px 6px;
  border-radius: 6px;
  background: #e3efe8;
  color: #27624f;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.25;
}

.podcast-tier[data-tier="foundation"] { background: #faeedc; color: #77502e; }
.podcast-tier[data-tier="advanced"] { background: #efedf8; color: #55467e; }

.podcast-page .podcast-play-feature {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 6px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--podcast-accent);
  color: #fff;
  font-size: .9rem;
}

.podcast-play-feature::before,
.podcast-episode-play::before {
  width: 0;
  height: 0;
  border-block: 5px solid transparent;
  border-inline-start: 7px solid currentColor;
  content: "";
}

.podcast-play-feature.is-playing::before,
.podcast-episode-play.is-playing::before {
  width: 3px;
  height: 10px;
  border: 0;
  border-inline: 3px solid currentColor;
}

.podcast-collection {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: 12px 0 0;
  padding: 9px 12px;
  border: 1px solid var(--podcast-edge);
  border-radius: 14px;
  background: var(--podcast-paper);
}

.podcast-collection-icon {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 10px;
  background: #e2ede6;
  color: var(--podcast-accent);
  font-size: 20px;
  font-weight: 760;
}

.podcast-collection h2 { font-size: .9rem; }

.podcast-collection p {
  display: -webkit-box;
  margin: 2px 0 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--podcast-muted);
  font-size: .74rem;
  line-height: 1.35;
}

.podcast-collection button,
.podcast-filters button,
.podcast-episode-actions button {
  min-height: 44px;
  padding: 6px 11px;
  border: 1px solid var(--podcast-edge);
  border-radius: 9px;
  background: #fff;
  color: var(--podcast-accent);
  font-size: .82rem;
  white-space: nowrap;
}

.podcast-collection button { border-radius: 999px; }
.podcast-library { margin-top: 27px; }

.podcast-library-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 5px;
  margin-bottom: 12px;
}

.podcast-library-heading h2 { font-size: clamp(20px, 4.2vw, 28px); }
.podcast-library-heading p { margin: 0; color: var(--podcast-muted); font-size: .8rem; }

.podcast-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}

.podcast-filters button {
  min-height: 42px;
  min-width: 55px;
  padding-inline: 13px;
  border-color: transparent;
  border-radius: 999px;
  background: #edf3ee;
  color: var(--podcast-ink);
}

.podcast-filters button[aria-pressed="true"] {
  border-color: var(--podcast-accent);
  background: var(--podcast-accent);
  color: #fff;
}

.podcast-level-info,
.podcast-empty { margin-bottom: 12px; }

.podcast-episodes { border-top: 1px solid var(--podcast-edge); }
.podcast-episodes:empty { display: none; }

.podcast-episode {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 11px 0;
  border-bottom: 1px solid var(--podcast-edge);
}

.podcast-episode-cover { font-size: 27px; }

.podcast-episode-details h3 {
  display: -webkit-box;
  overflow: hidden;
  font-size: clamp(16px, 4vw, 19px);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow-wrap: anywhere;
}

.podcast-episode-details p {
  margin: 1px 0 4px;
  overflow: hidden;
  color: var(--podcast-muted);
  font-size: clamp(.68rem, 3vw, .82rem);
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.podcast-episode-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 5px;
}

.podcast-episode-actions .podcast-episode-transcript { border-color: transparent; }
.podcast-episode-actions .podcast-episode-play {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 46px;
  padding-inline: 7px;
  background: #e7f1eb;
}

.podcast-episode-actions .podcast-episode-play.is-playing {
  border-color: var(--podcast-accent);
  background: var(--podcast-accent);
  color: #fff;
}

.podcast-transcript {
  grid-column: 1 / -1;
  min-width: 0;
  margin-top: 2px;
  padding: 12px;
  border-radius: 13px;
  background: var(--podcast-paper);
}

.podcast-vocabulary { display: flex; flex-wrap: wrap; gap: 7px 12px; margin-bottom: 10px; font-size: .85rem; }
.podcast-vocabulary strong { color: var(--podcast-accent); }
.podcast-credit { margin-top: 16px; font-size: .73rem; }

.podcast-page .podcast-line {
  display: grid;
  width: 100%;
  gap: 3px;
  padding: 10px 0;
  border: 0;
  border-top: 1px solid var(--podcast-edge);
  background: transparent;
  color: var(--podcast-ink);
  text-align: left;
  font-weight: 500;
  line-height: 1.45;
}

.podcast-line small { color: var(--podcast-accent); font-weight: 690; }

.podcast-dock {
  position: fixed;
  z-index: 34;
  right: 18px;
  bottom: max(14px, env(safe-area-inset-bottom));
  width: min(408px, calc(100vw - 36px));
  padding: 8px 10px;
  border: 1px solid #d7e9e2;
  border-radius: 17px;
  background: #f4faf6;
  box-shadow: 0 9px 24px #163b3126;
}

.podcast-dock-current,
.podcast-dock-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.podcast-dock-current strong {
  flex: 1;
  overflow: hidden;
  font-size: .9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.podcast-dock-current [data-podcast-progress] {
  flex-shrink: 0;
  color: var(--podcast-muted);
  font-size: .72rem;
  font-variant-numeric: tabular-nums;
}

.podcast-dock-artwork {
  display: block;
  flex: none;
  width: 34px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--podcast-accent);
  font-size: 15px;
}

.podcast-dock-cover { border-radius: 7px; }

.podcast-current-artwork { margin-bottom: 9px; text-align: center; }
.podcast-current-artwork p { margin: 2px 0 8px; color: var(--podcast-muted); font-size: .8rem; font-weight: 700; }
.podcast-now-cover { width: min(54vw, 26vh, 200px); margin: 0 auto; border-radius: 12px; font-size: 45px; }

.podcast-dock-current [data-podcast-close] {
  width: 34px;
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: #e4eee8;
  color: var(--podcast-ink);
  font-size: 18px;
  line-height: 1;
}

.podcast-dock input[type="range"] {
  display: block;
  width: 100%;
  height: 21px;
  margin: 1px 0;
  accent-color: var(--podcast-accent);
  cursor: pointer;
}

.podcast-dock-actions :is(button, select) {
  min-height: 39px;
  min-width: 0;
  padding: 4px 7px;
  border: 1px solid var(--podcast-edge);
  border-radius: 9px;
  background: #fff;
  color: var(--podcast-ink);
  font-size: .77rem;
  white-space: nowrap;
}

.podcast-dock-actions > button { flex: 1 1 0; }
.podcast-dock-actions .podcast-primary { border-color: var(--podcast-accent); background: var(--podcast-accent); color: #fff; }
.podcast-speed-field { display: flex; flex: none; align-items: center; gap: 4px; }
.podcast-speed-field > span { color: var(--podcast-muted); font-size: .72rem; font-weight: 700; }
.podcast-dock [role="status"] { margin: 5px 0 0; color: #9b351e; font-size: .78rem; }
.podcast-dock [role="status"]:empty { display: none; }

.podcast-dock-open .podcast-page { padding-bottom: 152px; }
body:has(.library-reader) .podcast-dock { bottom: max(14px, env(safe-area-inset-bottom)); }
body:has(.library-reader [data-audio-dock]) .podcast-dock { display: none; }

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .podcast-dock {
    -webkit-backdrop-filter: blur(18px) saturate(123%);
    backdrop-filter: blur(18px) saturate(123%);
    background: #f4faf2de;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .podcast-dock { -webkit-backdrop-filter: none; backdrop-filter: none; background: #f4faf6; }
}

@media (hover: hover) {
  .podcast-page button:hover { box-shadow: inset 0 0 0 1px #286b615c; }
  .podcast-page .podcast-line:hover { background: #ebf3ee; }
}

@media (min-width: 660px) {
  .podcast-feature { grid-template-columns: clamp(210px, 29vw, 264px) minmax(0, 1fr); }
}

@media (max-width: 820px) {
  .podcast-page { padding-top: 11px; }
  .podcast-dock {
    inset-inline: 8px;
    width: auto;
    bottom: calc(58px + env(safe-area-inset-bottom, 0px));
  }
  .podcast-dock-open .app-shell.has-library-nav { padding-bottom: calc(136px + 61px + env(safe-area-inset-bottom, 0px)); }
  .podcast-dock-open .podcast-page { padding-bottom: 28px; }
}

@media (max-width: 450px) {
  .podcast-episode { grid-template-columns: 52px minmax(0, 1fr) auto; gap: 7px; }
  .podcast-episode-actions { gap: 1px; }
  .podcast-episode-actions button { padding-inline: 5px; font-size: .72rem; }
  .podcast-episode-actions .podcast-episode-play::before { display: none; }
}

@media (max-width: 360px) {
  .podcast-feature { grid-template-columns: minmax(0, .84fr) minmax(0, 1fr); }
  .podcast-feature-copy h2 { font-size: 19px; }
  .podcast-feature-copy p { font-size: .7rem; }
  .podcast-episode { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .podcast-episode-meta { gap: 3px 5px; }
  .podcast-episode-topic { display: none; }
}
