:root {
  --ink: #1f1e1c;
  --ink-soft: #615d59;
  --ink-faint: #99948e;
  --paper: #fff;
  --canvas: #f6f5f4;
  --canvas-deep: #eeece9;
  --line: rgba(31, 30, 28, 0.11);
  --line-strong: rgba(31, 30, 28, 0.18);
  --blue: #0075de;
  --blue-dark: #005bab;
  --blue-pale: #f1f8fe;
  --coral: #e45a3d;
  --focus: #097fe8;
  --shadow-soft:
    0 1px 2px rgba(25, 23, 20, 0.025), 0 7px 24px rgba(25, 23, 20, 0.045);
  --font:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI',
    'Microsoft YaHei', sans-serif;
  --serif:
    Iowan Old Style, Palatino Linotype, 'Noto Serif SC', Source Han Serif SC,
    serif;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}
html {
  color-scheme: light;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  min-width: 320px;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button,
select {
  font: inherit;
}
button {
  color: inherit;
}
[v-cloak] {
  display: none;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.topbar {
  height: 58px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  width: min(1240px, calc(100% - 40px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}
.brand-mark {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--paper);
  border-radius: 6px;
}
.brand-mark svg {
  width: 16px;
  height: 16px;
}
.brand-name {
  font-size: 15px;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.collection-count {
  display: none;
  color: var(--ink-soft);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.library-trigger {
  display: none;
  min-height: 34px;
  padding: 0 10px;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--paper);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.library-trigger:hover {
  background: var(--canvas);
}
.library-trigger svg {
  width: 15px;
  height: 15px;
}

.workspace {
  width: min(1240px, calc(100% - 40px));
  height: calc(100dvh - 58px);
  margin: 0 auto;
  padding: 34px 0 46px;
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  gap: 32px;
  align-items: stretch;
}

.library {
  position: sticky;
  top: 24px;
  min-width: 0;
  max-height: calc(100dvh - 58px - 34px - 46px - 24px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.library-heading {
  flex-shrink: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 8px 12px;
  border-bottom: 1px solid var(--line);
}
.library-heading h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 650;
}
.library-heading span {
  color: var(--ink-faint);
  font-size: 12px;
}
.episode-list {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  padding-top: 8px;
}
.episode-item {
  width: 100%;
  min-height: 72px;
  margin-bottom: 4px;
  padding: 10px 9px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 16px;
  gap: 11px;
  align-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.18s ease;
}
.episode-item:hover {
  background: rgba(255, 255, 255, 0.72);
}
.episode-item.is-active {
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line);
}
.episode-date-tile {
  width: 42px;
  height: 42px;
  display: grid;
  place-content: center;
  gap: 0;
  background: var(--canvas-deep);
  border-radius: 5px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.episode-item.is-active .episode-date-tile {
  background: var(--ink);
  color: var(--paper);
}
.date-day {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.05;
}
.date-month {
  font-size: 9px;
  font-weight: 650;
  opacity: 0.7;
  text-transform: uppercase;
}
.episode-copy {
  min-width: 0;
}
.episode-copy strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}
.episode-copy small {
  display: block;
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 11px;
}
.episode-item > svg {
  width: 15px;
  height: 15px;
  color: var(--ink-faint);
}
.episode-item.is-active > svg {
  color: var(--blue);
}

.main-column {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.episode-overview {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 24px;
}
.cover-art {
  position: relative;
  width: 128px;
  aspect-ratio: 1;
  padding: 15px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  user-select: none;
}
.cover-ribbon {
  position: absolute;
  top: 10px;
  right: -24px;
  width: 80px;
  padding: 3px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--coral);
  color: var(--paper);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-align: center;
  text-transform: uppercase;
  transform: rotate(45deg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 1;
}
.cover-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  opacity: 0.68;
}
.cover-bars {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.cover-bars span {
  width: 5px;
  height: var(--bar-height);
  min-height: 5px;
  background: var(--coral);
  border-radius: 1px;
}
.cover-number {
  display: flex;
  align-items: end;
  justify-content: space-between;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.cover-number b {
  font-size: 24px;
  line-height: 0.9;
}

.episode-title {
  /* max-width: 760px; */
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(29px, 4vw, 43px);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: 0;
  text-wrap: pretty;
}
.episode-meta-row {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  color: var(--ink-soft);
  font-size: 13px;
}
.meta-separator {
  color: var(--ink-faint);
}
.icon-button {
  flex: 0 0 auto;
  width: 25px;
  height: 25px;
  margin-left: 5px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--paper);
  cursor: pointer;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease;
}
.icon-button:hover {
  background: var(--canvas);
  border-color: rgba(31, 30, 28, 0.28);
}
.icon-button svg {
  width: 12px;
  height: 12px;
}

.player-surface {
  margin-bottom: 18px;
  padding: 17px 20px 13px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.player-status {
  margin-bottom: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.now-playing {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}
.playing-indicator {
  width: 25px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: var(--blue-pale);
  border-radius: 5px;
}
.playing-indicator i {
  width: 2px;
  height: 8px;
  background: var(--blue);
  border-radius: 1px;
  animation: meter 1s ease-in-out infinite alternate;
  animation-play-state: paused;
}
.is-playing .playing-indicator i {
  animation-play-state: running;
}
.playing-indicator i:nth-child(2) {
  height: 13px;
  animation-delay: -0.4s;
}
.playing-indicator i:nth-child(3) {
  height: 6px;
  animation-delay: -0.7s;
}
@keyframes meter {
  to {
    transform: scaleY(0.42);
  }
}
.now-playing-copy {
  min-width: 0;
}
.now-playing-copy span {
  display: block;
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.55px;
}
.now-playing-copy strong {
  display: block;
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.audio-error {
  color: #b42318;
  font-size: 12px;
}

.player-surface .plyr {
  --plyr-color-main: var(--blue);
  --plyr-audio-controls-background: transparent;
  --plyr-audio-control-color: var(--ink);
  z-index: 3;
}
.plyr--audio .plyr__controls {
  padding: 0;
  gap: 3px;
}
.plyr__control {
  border-radius: 5px;
}
.plyr__control:hover {
  background: var(--blue-pale) !important;
  color: var(--blue) !important;
}
.plyr__control[data-plyr='speed'] {
  padding-top: 2px;
  padding-bottom: 2px;
}
.plyr__control--overlaid,
.plyr__control.plyr__tab-focus {
  box-shadow: none;
}
.plyr__progress input[type='range'],
.plyr__volume input[type='range'] {
  color: var(--blue);
}
.plyr__progress__buffer {
  color: #ddd9d4;
}
.plyr__time {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.plyr__menu__container {
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow-soft);
}

.transcript-panel {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.transcript-toolbar {
  min-height: 57px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
}
.transcript-heading {
  display: flex;
  align-items: baseline;
  gap: 9px;
}
.transcript-heading h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}
.transcript-heading span {
  color: var(--ink-faint);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.follow-button {
  min-height: 32px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.01);
}
.follow-button:hover {
  background: var(--canvas);
}
.follow-button.is-paused {
  border-color: #b9d8f3;
  background: var(--blue-pale);
  color: var(--blue-dark);
}
.follow-button svg {
  width: 14px;
  height: 14px;
}

.transcript-shell {
  position: relative;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}
.transcript-shell::before,
.transcript-shell::after {
  content: '';
  position: absolute;
  z-index: 2;
  right: 8px;
  left: 0;
  height: 38px;
  pointer-events: none;
}
.transcript-shell::before {
  top: 0;
  background: linear-gradient(var(--paper), rgba(255, 255, 255, 0));
}
.transcript-shell::after {
  bottom: 0;
  background: linear-gradient(rgba(255, 255, 255, 0), var(--paper));
}
.transcript-viewport {
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #cbc7c1 transparent;
}
.transcript-viewport::-webkit-scrollbar {
  width: 8px;
}
.transcript-viewport::-webkit-scrollbar-thumb {
  background: #cbc7c1;
  border: 2px solid var(--paper);
  border-radius: 8px;
}
.transcript-list {
  padding: 16px 22px 92px;
}
.subtitle-row {
  width: 100%;
  min-height: 62px;
  padding: 12px 12px 12px 14px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 18px;
  gap: 13px;
  align-items: start;
  border: 0;
  border-left: 2px solid transparent;
  border-radius: 0 5px 5px 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  opacity: 0.27;
  transition:
    opacity 0.28s ease,
    background-color 0.28s ease,
    border-color 0.28s ease;
}
.subtitle-row:hover {
  opacity: 0.85;
  background: var(--canvas);
}
.subtitle-row.is-near {
  opacity: 0.56;
}
.subtitle-row.is-adjacent {
  opacity: 0.76;
}
.subtitle-row.is-current {
  border-left-color: var(--blue);
  background: var(--blue-pale);
  opacity: 1;
}
.subtitle-row.is-preview {
  opacity: 0.7;
}
.subtitle-time {
  padding-top: 6px;
  color: var(--ink-faint);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.subtitle-text {
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.72;
}
.subtitle-row.is-current .subtitle-text {
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
}
.subtitle-play {
  padding-top: 6px;
  color: var(--ink-faint);
  opacity: 0;
}
.subtitle-play svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}
.subtitle-row:hover .subtitle-play,
.subtitle-row:focus-visible .subtitle-play,
.subtitle-row.is-current .subtitle-play {
  opacity: 1;
}
.subtitle-row.is-current .subtitle-play {
  color: var(--blue);
}

.panel-state {
  height: 390px;
  padding: 42px 24px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  color: var(--ink-soft);
  text-align: center;
}
.panel-state svg {
  width: 24px;
  height: 24px;
  color: var(--ink-faint);
}
.panel-state strong {
  color: var(--ink);
  font-size: 14px;
}
.panel-state p {
  max-width: 330px;
  margin: 0;
  font-size: 13px;
}
.spinner {
  width: 22px;
  height: 22px;
  border: 2px solid var(--canvas-deep);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.podcast-modal {
  padding: 0 0 20px !important;
  border: 1px solid var(--line) !important;
  border-radius: 8px !important;
  box-shadow: 0 22px 56px rgba(28, 26, 23, 0.14) !important;
}
.podcast-modal .swal2-title {
  padding: 26px 58px 12px 30px;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.25;
  text-align: left;
}
.podcast-modal .swal2-close {
  top: 13px;
  right: 14px;
  width: 30px;
  height: 30px;
  color: var(--ink-faint);
  font-size: 24px;
  line-height: 1;
}
.podcast-modal .swal2-close:hover {
  color: var(--ink);
  background: var(--canvas);
}
.podcast-modal .swal2-html-container {
  margin: 0;
  padding: 0 30px;
  color: var(--ink-soft);
  font-size: 14px;
  text-align: left;
}
.podcast-modal .swal2-actions {
  margin: 20px 30px 0 auto;
}
.podcast-modal .swal2-confirm {
  padding: 8px 16px;
  border-radius: 5px;
  background: var(--ink) !important;
  box-shadow: none !important;
  font-weight: 600;
}
.meta-document {
  max-height: min(60vh, 560px);
  overflow-y: auto;
  padding-right: 8px;
}
.meta-document h1 {
  display: none;
}
.meta-document h2 {
  margin: 24px 0 8px;
  color: var(--ink);
  font-size: 17px;
}
.meta-document h3 {
  margin: 20px 0 7px;
  color: var(--ink);
  font-size: 15px;
}
.meta-document p,
.meta-document ul,
.meta-document ol {
  margin: 7px 0;
  font-size: 15px;
  line-height: 1.6;
}
.meta-document ul,
.meta-document ol {
  padding-left: 21px;
}
.meta-document li {
  margin: 6px 0;
  line-height: 1.6;
}
.meta-document code {
  padding: 2px 4px;
  background: var(--canvas);
  border-radius: 3px;
  color: var(--ink);
  font-size: 12px;
}

.library-drawer-layer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(31, 30, 28, 0.42);
}
.library-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(360px, calc(100vw - 50px));
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--paper);
  border-left: 1px solid var(--line);
  box-shadow: -12px 0 32px rgba(31, 30, 28, 0.12);
  outline: none;
}
.library-drawer-header {
  min-height: 62px;
  padding: 0 14px 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}
.library-drawer-header h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}
.library-drawer-close {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--paper);
  cursor: pointer;
}
.library-drawer-close:hover {
  background: var(--canvas);
}
.library-drawer-close svg {
  width: 17px;
  height: 17px;
}
.library-drawer-content {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
}
.library-drawer-content .library-heading {
  padding: 18px 18px 12px;
}
.library-drawer-content .episode-list {
  padding: 8px 10px 24px;
}
.library-drawer-content .episode-item {
  min-height: 76px;
}
.library-drawer-enter-active,
.library-drawer-leave-active {
  transition: opacity 0.2s ease;
}
.library-drawer-enter-active .library-drawer,
.library-drawer-leave-active .library-drawer {
  transition: transform 0.2s ease;
}
.library-drawer-enter-from,
.library-drawer-leave-to {
  opacity: 0;
}
.library-drawer-enter-from .library-drawer,
.library-drawer-leave-to .library-drawer {
  transform: translateX(100%);
}

@media (max-width: 900px) {
  .topbar {
    position: sticky;
    top: 0;
    z-index: 2;
  }
  .workspace {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 26px;
    padding-top: 22px;
  }
  .library {
    display: none;
  }
  .collection-count {
    display: inline-block;
  }
  .library-trigger {
    display: inline-flex;
  }
  .main-column {
    min-height: 0;
  }
  .transcript-viewport {
    height: 100%;
    min-height: 0;
  }
}

@media (max-width: 620px) {
  .topbar-inner,
  .workspace {
    width: min(100% - 24px, 1240px);
  }
  .topbar {
    height: 52px;
  }
  .collection-count {
    font-size: 12px;
  }
  .workspace {
    height: calc(100dvh - 52px);
    padding: 12px 0 12px;
    gap: 22px;
  }
  .episode-overview {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 15px;
    align-items: start;
    margin-bottom: 8px;
  }
  .cover-art {
    position: relative;
    width: 76px;
    padding: 9px;
    border-radius: 6px;
  }
  .cover-ribbon {
    top: 7px;
    right: -26px;
    width: 70px;
    padding: 2px 0;
    line-height: 1.4;
    font-size: 7px;
    letter-spacing: 0.5px;
  }
  .cover-label {
    font-size: 6px;
    letter-spacing: 0.5px;
  }
  .cover-bars {
    height: 24px;
    gap: 2px;
  }
  .cover-bars span {
    width: 3px;
  }
  .cover-number b {
    font-size: 16px;
  }
  .cover-number {
    font-size: 8px;
  }
  .episode-title {
    font-size: clamp(23px, 7.1vw, 31px);
    line-height: 1.16;
  }
  .episode-title-long {
    font-size: clamp(18px, 6vw, 25px);
  }
  .episode-meta-row {
    margin-top: 4px;
    gap: 7px;
    font-size: 12px;
  }
  .player-surface {
    padding: 14px 5px 7px 13px;
    margin-bottom: 8px;
  }
  .player-status {
    margin-bottom: 10px;
  }
  .plyr--audio .plyr__controls {
    flex-wrap: wrap;
  }
  .plyr__progress__container {
    min-width: calc(100% - 125px);
  }
  .plyr__volume {
    display: none;
  }
  .transcript-toolbar {
    min-height: 53px;
    padding-inline: 13px;
  }
  .transcript-viewport {
    height: min(58vh, 510px);
  }
  .transcript-list {
    padding: 8px 8px 76px;
  }
  .subtitle-row {
    min-height: 64px;
    grid-template-columns: 43px minmax(0, 1fr) 16px;
    gap: 8px;
    padding: 11px 8px 11px 10px;
  }
  .subtitle-text {
    font-size: 15px;
    line-height: 1.68;
  }
  .subtitle-row.is-current .subtitle-text {
    font-size: 16px;
  }
  .subtitle-time {
    font-size: 10px;
  }
  .subtitle-play {
    padding-top: 3px;
  }
  .podcast-modal .swal2-title {
    padding: 23px 20px 10px;
    font-size: 22px;
  }
  .podcast-modal .swal2-html-container {
    padding-inline: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
