#routeView {
  min-height: calc(100vh - 72px);
  background: #fff;
}

.route-loading,
.route-empty {
  width: min(1120px, calc(100vw - 48px));
  margin: 48px auto;
  color: var(--muted);
}

.route-empty {
  max-width: 540px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.route-empty h1 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 24px;
}

.program-page,
.reader-page {
  width: min(1120px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 34px 0 56px;
}

.back-link {
  margin: 0 0 24px;
  border: 0;
  background: transparent;
  color: var(--violet);
  font-weight: 750;
}

.program-hero {
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(0, 1.22fr);
  gap: 40px;
  align-items: start;
  padding-bottom: 36px;
}

.program-hero > img {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  background: #eeedf4;
  box-shadow: 0 12px 30px rgba(30, 30, 65, 0.1);
  object-fit: cover;
}

.program-hero h1,
.reader-header h1 {
  margin: 7px 0 12px;
  color: #101b3a;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.16;
}

.program-meta,
.program-author,
.reader-header > div > p:last-child {
  margin: 8px 0;
  color: #65708a;
  font-size: 17px;
}

.program-description {
  max-width: 720px;
  margin: 20px 0 24px;
  color: #58627a;
  font-size: 16px;
}

.program-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  color: var(--muted);
}

.program-search {
  display: flex;
  width: min(520px, 100%);
  align-items: center;
  gap: 10px;
  border: 1px solid #e3e5ec;
  border-radius: 8px;
  background: #fafbfc;
  padding: 12px 16px;
  color: #8b94a8;
}

.program-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

.program-episodes {
  padding-bottom: 12px;
}

.program-episode {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}

.program-episode > img {
  width: 128px;
  height: 80px;
  border-radius: 6px;
  background: #efeff4;
  object-fit: cover;
}

.episode-copy h2 {
  margin: 0;
  color: #101b3a;
  font-size: 19px;
  line-height: 1.32;
}

.episode-copy p {
  margin: 8px 0 0;
  color: #8b94a8;
}

.episode-play {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: #f2f3f7;
  color: #574cf0;
  font-size: 20px;
}

.episode-play:hover {
  background: #e5e2ff;
}

.reader-page {
  width: min(1260px, calc(100vw - 48px));
}

.reader-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 13px;
}

.reader-topbar .back-link {
  margin-bottom: 18px;
}

.reader-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
}

.reader-header h1 {
  max-width: 820px;
  font-size: clamp(26px, 2.5vw, 36px);
}

.reader-actions,
.reader-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.reader-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.24fr) minmax(340px, 0.76fr);
  gap: 20px;
  padding-top: 24px;
}

.reader-workspace .media-mount {
  align-self: start;
}

.reader-subtitles {
  min-height: 454px;
  max-height: min(64vh, 640px);
}

.reader-controls {
  justify-content: flex-start;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  color: #59637d;
  font-size: 13px;
}

.reader-tool {
  display: grid;
  width: 44px;
  height: 40px;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #344058;
  font-size: 22px;
  line-height: 1;
}

.reader-tool:first-child {
  width: auto;
  min-width: 52px;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.reader-tool:hover,
.reader-tool.active {
  background: #ecebff;
  color: #5146d8;
}

.reader-tool.translate {
  color: #5146d8;
  font-size: 17px;
  font-weight: 800;
}

.subtitle-panel .cue {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0;
  padding: 0;
}

.subtitle-panel .cue-jump {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  border: 0;
  background: transparent;
  padding: 11px 9px;
  color: var(--ink);
  text-align: left;
}

.subtitle-panel .cue-explain {
  align-self: center;
  margin-right: 8px;
  border: 0;
  border-radius: 5px;
  background: #ecebff;
  padding: 5px 7px;
  color: #5146d8;
  font-size: 12px;
  font-weight: 700;
}

.reader-ai-panel {
  margin-top: 18px;
  border: 1px solid #dedcf9;
  border-radius: 8px;
  background: #faf9ff;
  padding: 16px;
}

.reader-ai-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #3930b2;
}

.reader-ai-panel .icon-button {
  width: 30px;
  height: 30px;
  font-size: 22px;
}

.reader-ai-content {
  white-space: pre-wrap;
  color: #444c63;
  line-height: 1.65;
}

@media (max-width: 780px) {
  #routeView {
    min-height: calc(100vh - 60px);
  }

  .program-page,
  .reader-page,
  .route-loading,
  .route-empty {
    width: min(100% - 32px, 1120px);
  }

  .program-page,
  .reader-page {
    padding-top: 22px;
  }

  .program-hero,
  .reader-workspace {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .program-hero > img {
    max-width: 520px;
  }

  .program-toolbar,
  .reader-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .program-search {
    width: 100%;
  }

  .program-episode {
    grid-template-columns: 92px minmax(0, 1fr) 42px;
    gap: 12px;
  }

  .program-episode > img {
    width: 92px;
    height: 58px;
  }

  .episode-copy h2 {
    font-size: 15px;
  }

  .episode-copy p {
    font-size: 13px;
  }

  .episode-play {
    width: 42px;
    height: 42px;
    font-size: 17px;
  }

  .reader-actions {
    width: 100%;
  }

  .reader-subtitles {
    min-height: 0;
    max-height: 360px;
  }
}
