.watch {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 402px;
  column-gap: 24px;
  align-items: start;
  max-width: 1754px;
  margin: 0 auto;
  padding: 24px;
  overflow-x: clip;
}

.watch-main {
  position: relative;
  isolation: isolate;
  grid-column: 1;
  min-width: 0;
}

/* Cinema ambient light: the poster blurred and bled around the player */
.watch-main::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -32px;
  right: -24px;
  left: -24px;
  aspect-ratio: 16 / 9;
  border-radius: 36px;
  background-image: var(--ambient-img, none);
  background-position: center;
  background-size: cover;
  filter: blur(52px) saturate(1.6);
  opacity: var(--ambient-opacity);
  pointer-events: none;
  transform: scale(1.04);
}

.comments {
  grid-column: 1;
  min-width: 0;
  margin-top: 28px;
}

.related {
  grid-column: 2;
  grid-row: 1 / span 3;
  min-width: 0;
}

.related.is-stream-active {
  position: sticky;
  top: calc(var(--header-h) + 16px);
}

.player {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: #000;
}

.player img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.92;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.25s var(--ease);
}

.player:hover img {
  opacity: 0.98;
  transform: scale(1.02);
}

.player iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.play-btn {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(
    circle at center,
    rgba(0, 0, 0, 0.22) 0%,
    rgba(0, 0, 0, 0.05) 60%,
    transparent 100%
  );
}

.play-btn span {
  display: grid;
  place-items: center;
  width: 72px;
  height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  background: rgba(15, 15, 15, 0.72);
  -webkit-backdrop-filter: blur(10px) saturate(1.4);
  backdrop-filter: blur(10px) saturate(1.4);
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.38);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.2s var(--ease), border-color 0.2s var(--ease),
    box-shadow 0.22s var(--ease);
}

.play-btn span::before {
  content: "";
  margin-left: 4px;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-left: 19px solid currentColor;
}

.play-btn:hover span,
.play-btn:focus-visible span {
  border-color: rgba(255, 255, 255, 0.38);
  background: var(--brand-mark);
  box-shadow: 0 10px 28px rgba(255, 102, 0, 0.45),
    0 0 0 6px rgba(255, 102, 0, 0.18);
  transform: scale(1.07);
}

.player-resume {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: var(--pill);
  background: rgba(15, 15, 15, 0.82);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.resume-restart {
  padding: 2px 8px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--pill);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 11.5px;
  font-weight: 500;
}

.resume-restart:hover {
  background: rgba(255, 255, 255, 0.24);
}

/* Auto-advance card shown when a video ends with 连播 on. */
.player-next {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: min(380px, calc(100% - 28px));
  padding: 10px 12px;
  border-radius: var(--radius);
  background: rgba(15, 15, 15, 0.88);
  backdrop-filter: blur(6px);
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.next-info {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.next-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.65;
}

.next-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.next-count {
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  opacity: 0.8;
}

.next-actions {
  display: flex;
  flex: none;
  flex-direction: column;
  gap: 6px;
}

.next-play {
  padding: 5px 12px;
  border: none;
  border-radius: var(--pill);
  background: #fff;
  color: #101010;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

.next-play:hover {
  background: rgba(255, 255, 255, 0.86);
}

.next-cancel {
  padding: 3px 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--pill);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 11px;
  cursor: pointer;
}

.next-cancel:hover {
  background: rgba(255, 255, 255, 0.24);
}

.watch-title {
  margin: 16px 0 6px;
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
  letter-spacing: -0.01em;
}

.watch-sub {
  margin-bottom: 12px;
  color: var(--text-2);
  font-size: 13px;
}

.channel-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 12px;
}

.avatar.lg {
  width: 40px;
  height: 40px;
  font-size: 16px;
}

.channel-name {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
}

.channel-link:hover {
  color: var(--brand);
}

.channel-meta {
  color: var(--text-2);
  font-size: 12px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

.description {
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--bg-chip);
  font-size: 14px;
  line-height: 1.65;
  transition: background 0.15s var(--ease);
}

.description.is-collapsed {
  cursor: pointer;
}

.description.is-collapsed:hover {
  background: var(--bg-chip-hover);
}

.description.is-collapsed .desc-body {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.desc-body p + p {
  margin-top: 10px;
}

.desc-why {
  padding-left: 10px;
  border-left: 3px solid var(--brand);
}

.desc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.mini-chip {
  padding: 2px 10px;
  border: 1px solid var(--border);
  border-radius: var(--pill);
  background: var(--bg-card);
  color: var(--text-2);
  font-size: 12px;
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease);
}

.mini-chip:hover {
  border-color: var(--text-2);
  color: var(--text);
}

.mini-chip.is-sub {
  border-color: rgba(234, 88, 12, 0.35);
  background: rgba(234, 88, 12, 0.12);
  color: var(--brand);
  font-weight: 500;
}

.mini-chip.is-intro {
  border-color: rgba(22, 163, 74, 0.3);
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}

.mini-chip.is-intermediate {
  border-color: rgba(37, 99, 235, 0.3);
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.mini-chip.is-advanced {
  border-color: rgba(234, 88, 12, 0.3);
  background: rgba(234, 88, 12, 0.12);
  color: var(--brand);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .mini-chip.is-intro {
    color: #4ade80;
  }

  :root:not([data-theme="light"]) .mini-chip.is-intermediate {
    color: #60a5fa;
  }
}

:root[data-theme="dark"] .mini-chip.is-intro {
  color: #4ade80;
}

:root[data-theme="dark"] .mini-chip.is-intermediate {
  color: #60a5fa;
}

.desc-toggle {
  margin-top: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.comments-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.comments-head h2 {
  font-size: 18px;
  font-weight: 600;
}

.comments-sub {
  color: var(--text-3);
  font-size: 12px;
}

.comment-sort {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  margin-left: auto;
}

.sort-pill {
  height: 26px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 500;
}

.sort-pill[aria-pressed="true"] {
  background: var(--bg-card);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.comment-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.comment {
  position: relative;
  display: flex;
  gap: 12px;
  margin: 0 -12px 8px;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
}

.comment:hover {
  border-color: var(--border-subtle);
  background: var(--bg-subtle);
}

/* 力荐 comment gets a warm spine so the standout review reads at a glance */
.comment:has(.s-strong) {
  border-color: rgba(234, 88, 12, 0.16);
  background: linear-gradient(
    100deg,
    rgba(234, 88, 12, 0.07),
    rgba(234, 88, 12, 0.015) 55%,
    transparent
  );
}

.comment:has(.s-strong)::before {
  content: "";
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 0;
  width: 2px;
  border-radius: var(--pill);
  background: var(--brand-mark);
}

.comment:has(.s-strong):hover {
  border-color: rgba(234, 88, 12, 0.3);
  background: linear-gradient(
    100deg,
    rgba(234, 88, 12, 0.11),
    rgba(234, 88, 12, 0.03) 55%,
    transparent
  );
}

.comment .avatar {
  width: 40px;
  height: 40px;
}

.comment-body {
  flex: 1;
  min-width: 0;
}

.comment-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
}

.comment-author {
  font-weight: 600;
}

.comment-date {
  color: var(--text-2);
  font-size: 12px;
}

.stance {
  padding: 1px 7px;
  border-radius: var(--pill);
  font-size: 11px;
  font-weight: 500;
}

.s-strong {
  background: rgba(234, 88, 12, 0.14);
  color: var(--brand);
}

.s-rec {
  background: rgba(22, 163, 74, 0.14);
  color: #15803d;
}

.s-ref {
  background: var(--bg-chip);
  color: var(--text-2);
}

.s-joke {
  background: rgba(234, 179, 8, 0.16);
  color: #a16207;
}

.s-crit {
  background: rgba(220, 38, 38, 0.14);
  color: #b91c1c;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .s-rec {
    color: #4ade80;
  }

  :root:not([data-theme="light"]) .s-joke {
    color: #facc15;
  }

  :root:not([data-theme="light"]) .s-crit {
    color: #f87171;
  }
}

:root[data-theme="dark"] .s-rec {
  color: #4ade80;
}

:root[data-theme="dark"] .s-joke {
  color: #facc15;
}

:root[data-theme="dark"] .s-crit {
  color: #f87171;
}

.comment-text {
  margin-top: 4px;
  font-size: 14px;
  line-height: 20px;
  white-space: pre-wrap;
  word-break: break-word;
}

.comment-text.clamped {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}

.comment-ts {
  display: inline-block;
  margin: 0 1px;
  padding: 0 5px;
  border: 0;
  border-radius: 4px;
  background: rgba(234, 88, 12, 0.12);
  color: var(--brand);
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}

.comment-ts:hover {
  background: rgba(234, 88, 12, 0.22);
  text-decoration: underline;
}

.comment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
  color: var(--text-2);
  font-size: 12px;
}

.comment-actions button,
.comment-actions a {
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-2);
  font-size: 12px;
}

.comment-actions button:hover,
.comment-actions a:hover {
  color: var(--text);
}

.comment-story {
  margin-top: 6px;
  color: var(--text-3);
  font-size: 12px;
}

/* Right rail: Tab switcher & related list */
.rail-heading {
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 600;
}

.rail-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 10px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-subtle);
}

.rail-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}

.rail-tab:hover {
  color: var(--text);
}

.rail-tab[aria-selected="true"] {
  background: var(--bg-card);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.rail-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-mark);
}

.rail-tab[aria-selected="true"] .rail-live-dot {
  box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.22);
}

@keyframes live-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 102, 0, 0.38);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(255, 102, 0, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 102, 0, 0);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .rail-tab[aria-selected="true"] .rail-live-dot {
    animation: live-pulse 2.4s var(--ease) infinite;
  }
}

.rail-tab-count {
  padding: 0 6px;
  border-radius: var(--pill);
  background: var(--bg-chip);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 18px;
}

.rail-tab[aria-selected="true"] .rail-tab-count {
  background: rgba(234, 88, 12, 0.14);
  color: var(--brand);
}

.related-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.related-item {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 8px;
  margin: -4px;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: background 0.18s var(--ease);
}

.related-item:hover {
  background: var(--bg-hover);
}

.related-thumb {
  position: relative;
  isolation: isolate;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--bg-chip);
}

.related-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.42) 0%,
    rgba(0, 0, 0, 0) 42%
  );
  opacity: 0.65;
  pointer-events: none;
  transition: opacity 0.22s var(--ease);
}

.related-item:hover .related-thumb::after {
  opacity: 1;
}

.related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.28s var(--ease);
}

.related-thumb img.is-loading {
  opacity: 0;
}

.related-item:hover .related-thumb img {
  transform: scale(1.05);
}

.related-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  word-break: break-word;
}

.related-meta {
  margin-top: 4px;
  color: var(--text-2);
  font-size: 12px;
}

.player-host {
  position: absolute;
  inset: 0;
}

.player-host iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.sub-layer {
  position: absolute;
  inset: auto 0 max(9%, 52px) 0;
  z-index: 3;
  display: flex;
  justify-content: center;
  padding: 0 6%;
  pointer-events: none;
}

.sub-line {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  max-width: 92%;
  padding: 5px 14px 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(12, 12, 12, 0.68);
  -webkit-backdrop-filter: blur(10px) saturate(1.4);
  backdrop-filter: blur(10px) saturate(1.4);
  color: #fafafa;
  font-size: clamp(15px, 1.6vw, 26px);
  line-height: 1.42;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
  white-space: pre-wrap;
}

.sub-en {
  font-size: 0.72em;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.78);
}

.sub-zh {
  display: block;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.player:fullscreen {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border-radius: 0;
}

.player:fullscreen .sub-layer {
  bottom: 9%;
}

.player:fullscreen .sub-line {
  font-size: min(3.4vh, 2.6vw);
}

/* Continuous Subtitle Stream Panel */
.stream-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--card-highlight);
  overflow: hidden;
}

.transcript-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
}

.transcript-search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
}

.transcript-search:focus-within {
  border-color: var(--brand);
}

.transcript-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 8px;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 12.5px;
}

.transcript-input::-webkit-search-cancel-button {
  display: none;
}

.transcript-match {
  flex: none;
  margin-right: 4px;
  color: var(--text-3);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.transcript-clear {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 2px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1;
}

.transcript-clear:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.transcript-follow,
.transcript-copy {
  flex: none;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.transcript-follow:hover,
.transcript-copy:hover {
  background: var(--bg-chip-hover);
  color: var(--text);
}

.transcript-follow[aria-pressed="true"] {
  border-color: rgba(234, 88, 12, 0.35);
  background: rgba(234, 88, 12, 0.14);
  color: var(--brand);
}

.transcript-list {
  position: relative;
  height: clamp(440px, calc(100vh - var(--header-h) - 132px), 680px);
  overflow-y: auto;
  padding: 12px 8px 40px;
  scroll-behavior: smooth;
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0,
    #000 28px,
    #000 calc(100% - 40px),
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0,
    #000 28px,
    #000 calc(100% - 40px),
    transparent 100%
  );
}

.transcript-list.hide-en .transcript-en {
  display: none;
}

.transcript-line {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 8px;
  width: 100%;
  margin-bottom: 2px;
  padding: 7px 10px;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 8px;
  background: none;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  text-align: left;
  transition: opacity 0.2s var(--ease), background 0.15s var(--ease),
    border-color 0.15s var(--ease), transform 0.15s var(--ease);
}

.transcript-line.is-past {
  opacity: 0.48;
}

.transcript-line:hover {
  opacity: 1;
  background: var(--bg-hover);
}

.transcript-line.is-active {
  opacity: 1;
  border-left-color: var(--brand-mark);
  background: rgba(234, 88, 12, 0.12);
}

.transcript-line.is-active .transcript-ts {
  color: var(--brand-mark);
  font-weight: 700;
}

.transcript-line.is-active .transcript-zh {
  font-size: 15px;
  font-weight: 600;
}

.transcript-ts {
  padding-top: 2px;
  color: var(--text-3);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.transcript-line:hover .transcript-ts {
  color: var(--brand);
}

.transcript-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.transcript-zh {
  display: block;
  color: var(--text);
  word-break: break-word;
  transition: font-size 0.15s var(--ease);
}

.transcript-en {
  display: block;
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1.45;
  word-break: break-word;
}

.sub-mark {
  padding: 0 2px;
  border-radius: 3px;
  background: rgba(250, 204, 21, 0.35);
  color: inherit;
}

.stream-resume-btn {
  position: absolute;
  left: 50%;
  bottom: 12px;
  z-index: 4;
  padding: 5px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--pill);
  background: rgba(15, 15, 15, 0.86);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  transform: translateX(-50%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
}

.stream-resume-btn:hover {
  background: var(--brand-mark);
}

.transcript-empty {
  padding: 28px 8px;
  font-size: 13px;
  text-align: center;
}

@media (max-width: 1100px) {
  .watch {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .watch-main,
  .related,
  .comments {
    grid-column: 1;
    grid-row: auto;
  }

  .related,
  .related.is-stream-active {
    position: static;
    margin-top: 16px;
  }

  .transcript-list {
    height: 340px;
  }
}

@media (max-width: 640px) {
  .watch {
    padding: 0 12px 32px;
  }

  .watch-main::before {
    right: 0;
    left: 0;
    filter: blur(36px) saturate(1.5);
  }

  .player {
    margin: 0 -12px;
    border-radius: 0;
  }

  .watch-title {
    margin-top: 12px;
    font-size: 18px;
    line-height: 24px;
  }

  .actions {
    width: 100%;
    margin-left: 0;
  }

  .comment {
    margin: 0 -6px 8px;
    padding: 10px;
  }

  .related-item {
    grid-template-columns: 140px 1fr;
  }
}

/* Subtitle export dropdown (SRT / VTT / TXT / Markdown) */
.export-wrap {
  position: relative;
  flex: none;
}

.export-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 8;
  min-width: 196px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  box-shadow: var(--card-highlight), 0 12px 32px rgba(0, 0, 0, 0.22);
}

.export-item {
  display: block;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--text);
  font-size: 12.5px;
  text-align: left;
  white-space: nowrap;
}

.export-item:hover {
  background: var(--bg-hover);
}

/* Chapter dividers interleaved with the live subtitle stream */
.transcript-chapter {
  display: flex;
  align-items: baseline;
  gap: 8px;
  width: 100%;
  margin: 10px 0 4px;
  padding: 6px 10px 6px 9px;
  border: 0;
  border-left: 3px solid var(--border);
  border-radius: 0 8px 8px 0;
  background: var(--bg-subtle);
  color: var(--text);
  text-align: left;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}

.transcript-chapter:hover {
  border-left-color: var(--brand);
  background: var(--bg-hover);
}

.transcript-chapter-ts {
  flex: none;
  color: var(--brand);
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.transcript-chapter-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
}

.transcript-chapter:hover .transcript-chapter-title {
  color: var(--text);
}

/* Chapter strip right under the player */
.chapter-bar {
  display: flex;
  gap: 3px;
  margin-top: 10px;
}

.chapter-seg {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-width: 0;
  padding: 5px 8px 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-subtle);
  text-align: left;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
}

.chapter-seg:hover {
  background: var(--bg-hover);
  border-color: var(--text-3);
}

.chapter-seg.is-active {
  border-color: rgba(234, 88, 12, 0.45);
  background: rgba(234, 88, 12, 0.1);
}

.chapter-seg-time {
  color: var(--text-3);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.chapter-seg.is-active .chapter-seg-time {
  color: var(--brand);
  font-weight: 700;
}

.chapter-seg-title {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 500;
}

.chapter-seg.is-active .chapter-seg-title {
  color: var(--text);
}

/* AI outline card (TL;DR + chapter chips) */
.watch-outline {
  margin: 12px 0;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--card-highlight);
}

.outline-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.outline-title {
  font-size: 15px;
  font-weight: 600;
}

.outline-badge {
  padding: 1px 8px;
  border: 1px solid rgba(234, 88, 12, 0.35);
  border-radius: var(--pill);
  background: rgba(234, 88, 12, 0.1);
  color: var(--brand);
  font-size: 10.5px;
  font-weight: 600;
}

.outline-tldr {
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.65;
}

.outline-chapters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.outline-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: var(--pill);
  background: var(--bg);
  color: var(--text-2);
  font-size: 12px;
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease),
    background 0.15s var(--ease);
}

.outline-chip:hover {
  border-color: rgba(234, 88, 12, 0.4);
  background: rgba(234, 88, 12, 0.06);
  color: var(--text);
}

.outline-chip-ts {
  color: var(--brand);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 900px) {
  .chapter-bar {
    flex-wrap: wrap;
  }

  .chapter-seg-title {
    display: none;
  }

  .chapter-seg {
    padding: 4px 7px;
  }
}

/* 合集导航：当前视频属于某个系列时，显示在简介上方 */
.watch-series {
  margin: 12px 0;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--card-highlight);
}

.series-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.series-title {
  font-size: 15px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.series-pos {
  flex: 0 0 auto;
  padding: 1px 8px;
  border: 1px solid var(--border);
  border-radius: var(--pill);
  background: var(--bg);
  color: var(--text-2);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.series-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}

.series-ep {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  flex: 0 0 auto;
  max-width: 250px;
  padding: 5px 11px;
  border: 1px solid var(--border);
  border-radius: var(--pill);
  background: var(--bg);
  color: var(--text-2);
  font-size: 12px;
  scroll-snap-align: start;
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease),
    background 0.15s var(--ease);
}

.series-ep:hover {
  border-color: rgba(234, 88, 12, 0.4);
  background: rgba(234, 88, 12, 0.06);
  color: var(--text);
}

.series-ep.is-current {
  border-color: rgba(234, 88, 12, 0.45);
  background: rgba(234, 88, 12, 0.1);
  color: var(--text);
}

.series-ep-no {
  color: var(--brand);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.series-ep-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


/* ── Theater / wide mode (W) ─────────────────────────────────────────────
   Collapses the two-column layout at wide viewports: the player stretches to
   the full container and the rail drops below the main column. */
@media (min-width: 1101px) {
  .watch.is-theater {
    grid-template-columns: minmax(0, 1fr);
    max-width: 1440px;
  }

  .watch.is-theater .watch-main,
  .watch.is-theater .comments {
    grid-column: 1;
  }

  .watch.is-theater .related,
  .watch.is-theater .related.is-stream-active {
    position: static;
    grid-column: 1;
    grid-row: auto;
    margin-top: 24px;
  }

  .watch.is-theater .related-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 12px 16px;
  }

  .watch.is-theater .player {
    max-height: calc(100vh - var(--header-h) - 88px);
  }

  .watch.is-theater .watch-main::before {
    top: -40px;
    right: -40px;
    left: -40px;
    max-height: calc(100vh - var(--header-h) - 88px);
  }
}

@media (max-width: 1100px) {
  .theater-btn {
    display: none;
  }
}

/* Geek mono readouts: timestamps and counters */
.comment-ts,
.comment-date,
.transcript-ts,
.chapter-seg-time,
.transcript-chapter-ts,
.outline-chip-ts,
.player-resume,
.player-next .next-count,
.rail-tab-count {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}


