/* ============================================================
   player.css — 详情页 / 全屏播放器 / 直播页（player-module）
   主题沿用 base.css：深松墨绿 + 铜金 + 米纸白，标题宋体。
   本文件所有类统一 pl- 前缀，避免和 pages.css / base.css 串味。
   ============================================================ */

/* ============================================================
   一、详情页
   ============================================================ */

.pl-detail {
  position: relative;
  isolation: isolate;
}

/* 海报氛围层：全出血、模糊、沉到内容下，只做气氛不抢戏 */
.pl-atmos {
  position: absolute;
  top: calc(-1 * clamp(22px, 3vw, 40px));
  left: calc(50% - 50vw);
  right: calc(50% - 50vw);
  height: clamp(360px, 46vh, 560px);
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}
.pl-atmos-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(42px) saturate(0.72) brightness(0.72);
  transform: scale(1.18);
  opacity: 0.5;
}
.pl-atmos-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(12, 19, 16, 0.18) 0%, rgba(12, 19, 16, 0.72) 52%, var(--ink-900) 96%),
    radial-gradient(60% 80% at 22% 0%, rgba(201, 164, 91, 0.1), transparent 60%);
}

.pl-detail-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: clamp(28px, 3.6vw, 56px);
  align-items: start;
}

/* ---- 左列 ---- */
.pl-detail-side {
  position: sticky;
  top: calc(var(--topbar-h) + 22px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.pl-poster {
  position: relative;
  margin: 0;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--ink-750);
  border: 1px solid var(--brass-a24);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.48);
}
.pl-poster::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(244, 233, 200, 0.14);
  pointer-events: none;
}
.pl-poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.45s ease;
}
.pl-poster-img.is-loaded { opacity: 1; }
.pl-poster-score {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 2;
}
.pl-poster-flag {
  position: absolute;
  left: 9px;
  bottom: 9px;
  z-index: 2;
  max-width: calc(100% - 18px);
  padding: 3px 7px;
  font-size: 11px;
  line-height: 1.3;
  color: var(--screen);
  background: rgba(10, 16, 13, 0.82);
  border: 1px solid rgba(244, 233, 200, 0.22);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pl-fav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--paper-2);
  border: 1px solid var(--brass-a24);
  background: rgba(18, 28, 23, 0.55);
  border-radius: 2px;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}
.pl-fav:hover { color: var(--paper); border-color: var(--brass-dim); background: var(--brass-a08); }
.pl-fav.is-on {
  color: var(--brass-bright);
  border-color: var(--brass-a40);
  background: var(--brass-a08);
}
.pl-resume {
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}
.pl-resume-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 11.5px;
  color: var(--muted);
}
.pl-resume-label em {
  font-style: normal;
  font-family: var(--font-num);
  color: var(--brass);
  white-space: nowrap;
}
.pl-resume-bar { margin-top: 7px; }
.pl-facts {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  font-size: 12px;
}
.pl-facts > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.pl-facts dt { color: var(--muted); flex: 0 0 auto; }
.pl-facts dd {
  margin: 0;
  min-width: 0;
  font-family: var(--font-num);
  color: var(--paper-2);
  text-align: right;
}

/* ---- 右列 ---- */
.pl-detail-main {
  min-width: 0;
  padding-top: 2px;
}
.pl-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--brass);
}
.pl-kicker-line {
  width: 28px;
  height: 1px;
  background: var(--brass);
  flex: 0 0 auto;
}
.pl-kicker-no {
  margin-left: auto;
  font-family: var(--font-num);
  letter-spacing: 0.1em;
  color: var(--muted);
}
.pl-title {
  margin: 10px 0 14px;
  font-family: var(--font-display);
  font-size: clamp(32px, 4.2vw, 52px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: 0.03em;
  color: var(--paper);
  overflow-wrap: anywhere;
}
.pl-meta { margin-bottom: 18px; }
.pl-meta .pl-dot { color: var(--brass-dim); }
.pl-meta-v { color: var(--paper-2); }
.pl-meta-badge { color: var(--brass); }

.pl-intro-wrap { max-width: 74ch; margin-bottom: 6px; }
.pl-intro {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.95;
  color: var(--paper-2);
}
.pl-intro.is-clamped {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pl-intro.is-empty { color: var(--muted); }
.pl-more {
  margin-top: 6px;
  padding: 2px 0;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--brass);
  border-bottom: 1px solid transparent;
  transition: border-color 0.18s, color 0.18s;
}
.pl-more:hover { color: var(--brass-bright); border-bottom-color: var(--brass-a40); }

.pl-credits {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 18px 0 24px;
}
.pl-credit { display: flex; align-items: flex-start; gap: 12px; }
.pl-credit-label {
  flex: 0 0 auto;
  width: 34px;
  padding-top: 2px;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.pl-credit-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.pl-credit-tag { height: 22px; font-size: 11.5px; }
.pl-credit-more { color: var(--muted); }

.pl-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.pl-play-link {
  height: 56px;
  padding: 0 26px;
  gap: 10px;
  border-radius: 2px;
}
.pl-play-link svg { flex: 0 0 auto; }
.pl-play-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  line-height: 1.2;
}
.pl-play-text b { font-size: 15px; font-weight: 600; letter-spacing: 0.08em; }
.pl-play-text em {
  font-style: normal;
  max-width: 46vw;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: rgba(23, 18, 8, 0.74);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pl-match-btn { height: 56px; padding: 0 22px; }

/* ---- 放映排期 ---- */
.pl-sheet {
  position: relative;
  z-index: 1;
  margin-top: clamp(36px, 4.4vw, 58px);
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.pl-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px 20px;
  margin-bottom: 20px;
}
.pl-sheet-title { margin: 0; }
.pl-src-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.pl-src-tab {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-width: 104px;
  padding: 7px 14px 8px;
  text-align: left;
  border: 1px solid var(--ink-600);
  background: rgba(18, 28, 23, 0.5);
  border-radius: 2px;
  transition: border-color 0.18s, background 0.18s;
}
.pl-src-tab:hover { border-color: var(--brass-dim); background: var(--ink-750); }
.pl-src-tab.on { border-color: var(--brass-a40); background: var(--brass-a08); }
.pl-src-name {
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--paper-2);
}
.pl-src-tab.on .pl-src-name { color: var(--brass-bright); }
.pl-src-raw {
  font-style: normal;
  font-size: 10.5px;
  letter-spacing: 0.02em;
  color: var(--muted);
  white-space: nowrap;
}

.pl-sheet-body { min-height: 72px; }

.pl-ep-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
}
.pl-ep {
  display: grid;
  place-items: center;
  min-height: 38px;
  padding: 4px 6px;
  font-family: var(--font-num);
  font-size: 13px;
  line-height: 1.2;
  color: var(--paper-2);
  text-align: center;
  background: rgba(18, 28, 23, 0.42);
  border: 1px solid var(--ink-600);
  border-radius: 2px;
  overflow: hidden;
  transition: color 0.16s, border-color 0.16s, background 0.16s;
}
.pl-ep:hover { color: var(--paper); border-color: var(--brass-dim); background: var(--ink-750); }
.pl-ep.is-focus { border-color: var(--brass-a40); color: var(--brass-bright); }
.pl-ep.is-current {
  color: #171208;
  font-weight: 600;
  border-color: var(--brass);
  background: linear-gradient(180deg, var(--brass-bright), var(--brass));
}
.pl-ep span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pl-ep-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}
.pl-ep-range {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.pl-ep-pager { display: flex; align-items: center; gap: 8px; }
.pl-pager-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  font-size: 12px;
  color: var(--paper-2);
  border: 1px solid var(--ink-600);
  border-radius: 2px;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}
.pl-pager-btn:hover { color: var(--paper); border-color: var(--brass-dim); background: var(--ink-750); }
.pl-pager-btn[disabled] { opacity: 0.35; pointer-events: none; }
.pl-pager-now {
  font-family: var(--font-num);
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.pl-pager-jump { padding: 0 10px; color: var(--brass); }

.pl-single {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 24px;
  padding: 20px 22px;
  border: 1px solid var(--brass-a14);
  background: linear-gradient(180deg, rgba(201, 164, 91, 0.05), rgba(18, 28, 23, 0.5));
}
.pl-single-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pl-single-info b {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--paper);
}
.pl-single-info em {
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
}
.pl-single-btn { height: 46px; padding: 0 28px; }

/* ---- 换源弹窗 ---- */
.pl-match-tip { margin-bottom: 14px; font-size: 13px; color: var(--muted); line-height: 1.7; }
.pl-match-list { display: flex; flex-direction: column; gap: 8px; }
.pl-match-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--ink-600);
  background: rgba(18, 28, 23, 0.5);
  border-radius: 2px;
  transition: border-color 0.18s, background 0.18s;
}
.pl-match-item:hover { border-color: var(--brass-dim); background: var(--ink-750); }
.pl-match-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pl-match-main b {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--paper);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pl-match-main em {
  font-style: normal;
  font-size: 11.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pl-match-go {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--brass);
  white-space: nowrap;
}
.pl-match-err { margin-bottom: 12px; font-size: 13px; color: #e2b3a7; }
.pl-match-retry { display: flex; gap: 10px; }

/* ---- 骨架 / 错误 ---- */
.pl-sk-poster { width: 100%; aspect-ratio: 2 / 3; }
.pl-sk-title { width: 56%; height: 46px; margin: 12px 0 16px; }
.pl-sk-kicker { width: 180px; height: 13px; }
.pl-sk-line { height: 13px; margin: 12px 0; }
.pl-sk-block { width: 100%; height: 118px; margin: 20px 0; }
.pl-detail-error { padding-top: 32px; }

/* ============================================================
   二、全屏播放器
   ============================================================ */

body.is-playing { background: #000; }

.pl-player {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: #000;
  color: var(--paper);
  overflow: hidden;
  isolation: isolate;
  outline: none;
}
.pl-player:fullscreen { background: #000; }
.pl-player.is-idle { cursor: none; }

.pl-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
.pl-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(4, 7, 5, 0.5) 0%,
    transparent 16%,
    transparent 74%,
    rgba(4, 7, 5, 0.66) 100%
  );
  transition: opacity 0.3s ease;
}
.pl-player.is-idle .pl-vignette { opacity: 0.45; }

/* ---- 顶栏 ---- */
.pl-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: calc(env(safe-area-inset-top, 0px) + 14px) clamp(16px, 2.4vw, 32px) 30px;
  background: linear-gradient(to bottom, rgba(4, 7, 5, 0.82), transparent);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.pl-player.is-idle .pl-top { opacity: 0; pointer-events: none; transform: translateY(-8px); }
.pl-top-btn {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--paper);
  background: rgba(12, 19, 16, 0.55);
  border: 1px solid transparent;
  border-radius: 2px;
  transition: color 0.18s, background 0.18s, border-color 0.18s;
}
.pl-top-btn:hover { border-color: var(--brass-a24); background: var(--ink-700); }
.pl-top-btn[disabled] { opacity: 0.35; pointer-events: none; }
.pl-top-titles { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pl-top-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--paper);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pl-top-sub {
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--paper-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pl-top-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* ---- 中央暂停标记 / 音频提示 / 加载 ---- */
.pl-center-mark {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.pl-center-mark svg {
  width: 86px;
  height: 86px;
  padding: 20px;
  color: rgba(244, 233, 200, 0.92);
  background: rgba(8, 13, 10, 0.45);
  border: 1px solid rgba(244, 233, 200, 0.24);
  border-radius: 50%;
  backdrop-filter: blur(2px);
}
.pl-player.is-paused .pl-center-mark { opacity: 1; }
.pl-player.is-error .pl-center-mark,
.pl-player.is-ended .pl-center-mark { opacity: 0; }

.pl-audio-hint {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 74px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 22;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  font-size: 12.5px;
  letter-spacing: 0.03em;
  color: var(--paper);
  background: rgba(12, 19, 16, 0.9);
  border: 1px solid var(--brass-a24);
  border-radius: 2px;
  backdrop-filter: blur(6px);
  transition: border-color 0.18s;
}
.pl-audio-hint:hover { border-color: var(--brass); }

.pl-loading,
.pl-buffering {
  position: absolute;
  z-index: 12;
  pointer-events: none;
}
/* 2026-12-05：起播提示也移到底部（画面中央不留任何元素——用户反馈卡顿时中间有黑点/竖条） */
.pl-loading {
  inset: auto;
  top: auto;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 88px);
  transform: translateX(-50%);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 14px;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(244, 233, 200, 0.86);
  background: rgba(8, 13, 10, 0.62);
  border: 1px solid rgba(244, 233, 200, 0.16);
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.pl-loading .spinner {
  width: 16px;
  height: 16px;
  border-width: 2px;
  border-color: rgba(244, 233, 200, 0.22);
  border-top-color: var(--brass-bright);
}
/* 2026-12-05：缓冲指示器不再放画面中央（用户反馈那里有个黑点/竖条），
   改成底部的小胶囊「缓冲中…」，不挡画面、也不会在中央出现任何元素 */
.pl-buffering {
  top: auto;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 88px);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(8, 13, 10, 0.62);
  border: 1px solid rgba(244, 233, 200, 0.16);
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.pl-buffering .spinner {
  width: 16px;
  height: 16px;
  border-width: 2px;
  border-color: rgba(244, 233, 200, 0.22);
  border-top-color: var(--brass-bright);
}
.pl-buffering-text {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(244, 233, 200, 0.86);
}
.pl-live-buffering {
  top: auto;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 88px);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(8, 13, 10, 0.62);
  border: 1px solid rgba(244, 233, 200, 0.16);
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.pl-live-buffering .spinner {
  width: 16px;
  height: 16px;
  border-width: 2px;
  border-color: rgba(244, 233, 200, 0.22);
  border-top-color: var(--brass-bright);
}

/* ---- 控制条 ---- */
.pl-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  padding: 48px clamp(16px, 2.6vw, 36px) calc(env(safe-area-inset-bottom, 0px) + 14px);
  background: linear-gradient(to top, rgba(4, 7, 5, 0.94), rgba(4, 7, 5, 0.5) 46%, transparent);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.pl-player.is-idle .pl-controls { opacity: 0; pointer-events: none; transform: translateY(10px); }
.pl-player.is-error .pl-controls,
.pl-player.is-ended .pl-controls { opacity: 0; pointer-events: none; }

.pl-prog-row { padding-bottom: 6px; }
.pl-progress {
  position: relative;
  display: flex;
  align-items: center;
  height: 24px;
  cursor: pointer;
  touch-action: none;
}
.pl-prog-track {
  position: relative;
  width: 100%;
  height: 4px;
  overflow: hidden;
  background: rgba(239, 231, 214, 0.2);
  border-radius: 2px;
  transition: height 0.15s ease;
}
.pl-progress:hover .pl-prog-track,
.pl-progress.is-drag .pl-prog-track { height: 6px; }
.pl-prog-buf { position: absolute; inset: 0; }
.pl-prog-buf i {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(239, 231, 214, 0.3);
}
.pl-prog-played {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: var(--brass);
}
.pl-prog-thumb {
  position: absolute;
  top: 50%;
  left: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--brass-bright);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 3px rgba(6, 10, 8, 0.55);
  transition: transform 0.15s ease;
  pointer-events: none;
}
.pl-progress:hover .pl-prog-thumb,
.pl-progress.is-drag .pl-prog-thumb { transform: translate(-50%, -50%) scale(1.25); }
.pl-prog-tip {
  position: absolute;
  bottom: 26px;
  transform: translateX(-50%);
  padding: 2px 8px;
  font-family: var(--font-num);
  font-size: 11.5px;
  color: var(--paper);
  white-space: nowrap;
  background: rgba(12, 19, 16, 0.94);
  border: 1px solid var(--brass-a24);
  border-radius: 2px;
  pointer-events: none;
}

.pl-ctrl-row {
  display: flex;
  align-items: center;
  gap: 4px;
}
.pl-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--paper);
  border: 1px solid transparent;
  border-radius: 2px;
  transition: color 0.16s, background 0.16s, border-color 0.16s;
}
.pl-btn:hover { background: rgba(239, 231, 214, 0.1); }
.pl-btn[disabled] { opacity: 0.32; pointer-events: none; }
.pl-btn-play { width: 46px; height: 46px; color: var(--brass-bright); }
.pl-btn-play:hover { background: rgba(201, 164, 91, 0.16); }
.pl-btn-textual {
  width: auto;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--paper-2);
}
.pl-btn-textual:hover { color: var(--paper); }
.pl-btn-text {
  font-family: var(--font-num);
  font-size: 12px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.pl-time {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  font-family: var(--font-num);
  font-size: 12.5px;
  color: var(--paper-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.pl-time-sep { color: var(--muted-2); }
.pl-ctrl-spacer { flex: 1 1 auto; min-width: 8px; }

/* ---- 音量 ---- */
.pl-vol { position: relative; display: flex; align-items: center; }
.pl-vol-pop {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 10px 8px;
  background: rgba(12, 19, 16, 0.96);
  border: 1px solid var(--line);
  border-radius: 2px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.pl-vol:hover .pl-vol-pop,
.pl-vol:focus-within .pl-vol-pop {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.pl-vol-bar {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  width: 26px;
  height: 92px;
  padding: 2px 0;
  cursor: pointer;
  touch-action: none;
}
.pl-vol-track {
  position: relative;
  display: block;
  width: 4px;
  height: 100%;
  overflow: hidden;
  background: rgba(239, 231, 214, 0.22);
  border-radius: 2px;
}
.pl-vol-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100%;
  background: var(--brass);
}

/* ---- 弹出菜单 ---- */
.pl-menu-wrap { position: relative; display: inline-flex; }
.pl-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 136px;
  padding: 6px;
  background: rgba(12, 19, 16, 0.97);
  border: 1px solid var(--line);
  border-radius: 2px;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.55);
}
.pl-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  font-size: 13px;
  color: var(--paper-2);
  text-align: left;
  border-radius: 2px;
  transition: background 0.16s, color 0.16s;
}
.pl-menu-item:hover { background: var(--brass-a08); color: var(--paper); }
.pl-menu-item.on { color: var(--brass-bright); }
.pl-menu-label { display: flex; flex-direction: column; gap: 1px; }
.pl-menu-label em {
  font-style: normal;
  font-size: 10.5px;
  color: var(--muted);
}

/* ---- 错误面板 ---- */
.pl-error {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(4, 7, 5, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fade-in 0.2s ease both;
}
.pl-error-card {
  width: min(560px, 100%);
  padding: clamp(24px, 3.4vw, 38px) clamp(22px, 3vw, 34px);
  text-align: center;
  background: var(--ink-800);
  border: 1px solid var(--line);
  border-top: 2px solid var(--brass-dim);
  border-radius: 2px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.pl-error-mark {
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  color: var(--brass);
  border: 1px solid var(--brass-a24);
  border-radius: 50%;
}
.pl-error-title {
  font-family: var(--font-display);
  font-size: clamp(21px, 2.5vw, 25px);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--paper);
}
.pl-error-msg {
  margin: 12px 0 22px;
  font-size: 13px;
  line-height: 1.85;
  color: var(--paper-2);
}
.pl-error-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* ---- 片尾 / 倒计时 ---- */
.pl-ended {
  position: absolute;
  inset: 0;
  z-index: 34;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(4, 7, 5, 0.64);
  animation: fade-in 0.2s ease both;
}
.pl-ended-card {
  min-width: min(430px, 92vw);
  padding: clamp(22px, 3vw, 32px);
  text-align: center;
  background: var(--ink-800);
  border: 1px solid var(--line);
  border-top: 2px solid var(--brass);
  border-radius: 2px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}
.pl-ended-title {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--paper);
}
.pl-ended-sub { margin: 8px 0 20px; font-size: 12.5px; color: var(--muted); }
.pl-ended-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

.pl-countdown {
  position: absolute;
  left: 50%;
  bottom: clamp(110px, 17vh, 180px);
  transform: translateX(-50%);
  z-index: 32;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--paper);
  white-space: nowrap;
  background: rgba(12, 19, 16, 0.95);
  border: 1px solid var(--brass-a24);
  border-radius: 2px;
}
.pl-countdown-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brass);
  animation: live-pulse 1.4s ease-in-out infinite;
  flex: 0 0 auto;
}

/* ---- 选集抽屉 ---- */
.pl-drawer-scrim {
  position: absolute;
  inset: 0;
  z-index: 24;
  background: rgba(4, 7, 5, 0.52);
  animation: fade-in 0.2s ease both;
}
.pl-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 26;
  width: min(400px, 94vw);
  display: flex;
  flex-direction: column;
  background: var(--ink-850);
  border-left: 1px solid var(--line);
  box-shadow: -24px 0 70px rgba(0, 0, 0, 0.5);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.28s;
}
.pl-drawer.is-open { transform: none; visibility: visible; }
.pl-drawer-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: calc(env(safe-area-inset-top, 0px) + 16px) 18px 14px;
  border-bottom: 1px solid var(--line);
}
.pl-drawer-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--paper);
}
.pl-drawer-sub { margin-top: 2px; font-size: 11px; color: var(--muted); }
.pl-drawer-head > .pl-top-btn { margin-left: auto; width: 36px; height: 36px; }
.pl-drawer-srcs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
}
.pl-drawer-src {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding: 6px 11px;
  font-size: 12.5px;
  color: var(--paper-2);
  border: 1px solid var(--ink-600);
  border-radius: 2px;
  transition: border-color 0.18s, background 0.18s, color 0.18s;
}
.pl-drawer-src:hover { border-color: var(--brass-dim); }
.pl-drawer-src.on {
  color: var(--brass-bright);
  border-color: var(--brass-a40);
  background: var(--brass-a08);
}
.pl-drawer-src em { font-style: normal; font-size: 10.5px; color: var(--muted); }
.pl-drawer-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 16px 18px; }
.pl-drawer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
}
.pl-drawer-grid .pl-ep { min-height: 40px; cursor: pointer; }
.pl-drawer-foot {
  padding: 10px 18px calc(env(safe-area-inset-bottom, 0px) + 10px);
  border-top: 1px solid var(--line-soft);
}
.pl-drawer-pager { display: flex; align-items: center; justify-content: center; gap: 10px; }
.pl-drawer-single { font-size: 12.5px; line-height: 1.9; color: var(--muted); }

.pl-player-fallback {
  padding: 80px 20px;
  text-align: center;
  color: var(--paper-2);
}
.pl-player-fallback h2 {
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 0.08em;
  color: var(--paper);
}
.pl-player-fallback p { margin-bottom: 20px; font-size: 13px; color: var(--muted); }

/* ============================================================
   三、直播页
   ============================================================ */

.pl-live { display: flex; flex-direction: column; gap: clamp(16px, 2vw, 24px); }
.pl-live-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.pl-live-page-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.15;
  color: var(--paper);
}
.pl-live-page-sub {
  margin-top: 5px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.03em;
}
.pl-live-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: clamp(18px, 2.4vw, 30px);
  align-items: start;
}
.pl-live-main { min-width: 0; }

.pl-live-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--brass-a14);
}
.pl-live-stage .pl-video { position: absolute; }

.pl-live-top {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}
.pl-live-now {
  font-size: 12.5px;
  letter-spacing: 0.03em;
  color: var(--paper);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* 播放区不在画面上常挂“代理/直连”状态角标：线路信息放在下方 meta 行 */

.pl-live-ctrl {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 34px 14px 12px;
  background: linear-gradient(to top, rgba(4, 7, 5, 0.92), transparent);
}
.pl-live-lines { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.pl-live-line {
  height: 28px;
  padding: 0 11px;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--paper-2);
  background: rgba(12, 19, 16, 0.62);
  border: 1px solid rgba(239, 231, 214, 0.22);
  border-radius: 2px;
  transition: color 0.16s, border-color 0.16s, background 0.16s;
}
.pl-live-line:hover { color: var(--paper); border-color: var(--brass-dim); }
.pl-live-line.on {
  color: #171208;
  font-weight: 600;
  background: var(--brass);
  border-color: var(--brass);
}
.pl-live-ctrl-spacer { flex: 1 1 auto; min-width: 8px; }
.pl-live-btn {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--paper);
  background: rgba(12, 19, 16, 0.6);
  border: 1px solid transparent;
  border-radius: 2px;
  transition: color 0.16s, background 0.16s, border-color 0.16s;
}
.pl-live-btn:hover { border-color: var(--brass-a24); background: var(--ink-700); }
.pl-live-vol .pl-vol-pop { bottom: calc(100% + 2px); }

.pl-live-audio-hint,
.pl-live-playhint {
  position: absolute;
  z-index: 12;
  color: var(--paper);
}
.pl-live-audio-hint {
  top: 52px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  font-size: 12px;
  white-space: nowrap;
  background: rgba(12, 19, 16, 0.9);
  border: 1px solid var(--brass-a24);
  border-radius: 2px;
}
.pl-live-audio-hint:hover { border-color: var(--brass); }
.pl-live-playhint {
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 13px;
  letter-spacing: 0.05em;
  background: rgba(4, 7, 5, 0.55);
  backdrop-filter: blur(2px);
}
.pl-live-playhint-ico {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  color: var(--brass-bright);
  border: 1px solid var(--brass-a40);
  border-radius: 50%;
  background: rgba(12, 19, 16, 0.6);
}
.pl-live-loading {
  position: absolute;
  inset: 0;
  z-index: 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 12.5px;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: rgba(4, 7, 5, 0.32);
  pointer-events: none;
}
.pl-live-loading .spinner { width: 30px; height: 30px; border-width: 3px; }
.pl-live-buffering {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 7;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.pl-live-buffering .spinner { width: 34px; height: 34px; border-width: 3px; }
.pl-live-error { z-index: 14; }
.pl-live-error .pl-error-card { width: min(520px, 100%); }

.pl-live-info { padding: 16px 2px 0; }
.pl-live-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 600;
  letter-spacing: 0.07em;
  line-height: 1.2;
  color: var(--paper);
}
.pl-live-meta-line {
  margin-top: 7px;
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.pl-live-note {
  max-width: 72ch;
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.85;
  color: var(--muted-2);
}

/* ---- 频道栏 ---- */
.pl-live-side {
  position: sticky;
  top: calc(var(--topbar-h) + 18px);
  display: flex;
  flex-direction: column;
  height: min(72vh, 700px);
  min-height: 380px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 2px;
}
.pl-live-side-head { padding: 14px 16px 0; border-bottom: 1px solid var(--line); }
.pl-live-side-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--paper);
}
.pl-live-groups { display: flex; gap: 2px; margin-top: 8px; }
.pl-live-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px 8px;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  transition: color 0.16s, border-color 0.16s;
}
.pl-live-group:hover { color: var(--paper); }
.pl-live-group.on { color: var(--paper); border-bottom-color: var(--brass); }
.pl-live-group em {
  font-style: normal;
  font-family: var(--font-num);
  font-size: 10.5px;
  color: var(--muted-2);
}
.pl-live-group.on em { color: var(--brass); }

.pl-live-channels {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
  scrollbar-width: thin;
}
.pl-live-ch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 40px;
  padding: 8px 10px;
  font-size: 13px;
  text-align: left;
  color: var(--paper-2);
  border: 1px solid transparent;
  border-radius: 2px;
  transition: color 0.16s, background 0.16s, border-color 0.16s;
}
.pl-live-ch:hover { color: var(--paper); background: var(--ink-750); }
.pl-live-ch.on {
  color: var(--paper);
  background: var(--brass-a08);
  border-color: var(--brass-a24);
}
.pl-live-ch.on .pl-live-ch-name { color: var(--brass-bright); }
.pl-live-ch-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-live-ch-lines {
  flex: 0 0 auto;
  font-family: var(--font-num);
  font-size: 10.5px;
  color: var(--muted-2);
  letter-spacing: 0.02em;
}
.pl-live-ch.on .pl-live-ch-lines { color: var(--brass); }
.pl-live-side-foot {
  padding: 10px 16px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted-2);
  border-top: 1px solid var(--line-soft);
}
.pl-live-error-wrap { padding-top: 40px; }

/* ============================================================
   四、响应式
   ============================================================ */

@media (max-width: 1180px) {
  .pl-detail-inner { grid-template-columns: 214px minmax(0, 1fr); }
  .pl-live-grid { grid-template-columns: minmax(0, 1fr) 306px; }
}

@media (max-width: 960px) {
  .pl-detail-side { position: static; }
  .pl-detail-inner { gap: 26px; }
  .pl-live-grid { grid-template-columns: minmax(0, 1fr); }
  .pl-live-side { position: static; height: auto; max-height: 440px; }
  .pl-live-side .pl-live-channels { max-height: 330px; }
}

@media (max-width: 720px) {
  /* 详情页：单列 */
  .pl-detail-inner { grid-template-columns: 1fr; gap: 20px; }
  .pl-detail-side {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    grid-template-areas:
      "poster fav"
      "poster resume"
      "poster facts";
    gap: 10px 14px;
    align-items: start;
  }
  .pl-detail-side > .pl-poster { grid-area: poster; width: 132px; }
  .pl-detail-side > .pl-fav { grid-area: fav; }
  .pl-detail-side > .pl-resume { grid-area: resume; border-top: 0; padding-top: 0; }
  .pl-detail-side > .pl-facts { grid-area: facts; border-top: 0; padding-top: 0; }
  .pl-title { font-size: clamp(27px, 7.2vw, 36px); margin: 8px 0 12px; }
  .pl-kicker-no { display: none; }
  .pl-intro { font-size: 13px; line-height: 1.9; }
  .pl-credit { flex-direction: column; gap: 6px; }
  .pl-credit-label { width: auto; }
  .pl-actions { width: 100%; }
  .pl-play-link { flex: 1 1 auto; }
  .pl-match-btn { height: 56px; }
  .pl-play-text em { max-width: 62vw; }
  .pl-sheet { margin-top: 30px; padding-top: 18px; }
  .pl-sheet-head { align-items: flex-start; }
  .pl-src-tab { min-width: 92px; padding: 6px 11px 7px; }
  .pl-ep-grid { grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 7px; }
  .pl-ep { min-height: 40px; font-size: 13px; }
  .pl-ep-foot { flex-direction: column; align-items: flex-start; }
  .pl-single { padding: 16px; }
  .pl-single-btn { width: 100%; }
  .pl-match-item { padding: 11px 12px; }
  .pl-match-go svg { display: none; }

  /* 播放页：触控友好 */
  .pl-controls { padding: 40px 12px calc(env(safe-area-inset-bottom, 0px) + 10px); }
  .pl-ctrl-row { gap: 2px; }
  .pl-btn { width: 40px; height: 40px; }
  .pl-btn-play { width: 44px; height: 44px; }
  .pl-btn-textual { width: 40px; padding: 0; justify-content: center; }
  .pl-btn-text { display: none; }
  .pl-time { padding: 0 6px; font-size: 12px; gap: 4px; }
  .pl-vol-pop { display: none; }
  .pl-top { padding: calc(env(safe-area-inset-top, 0px) + 10px) 12px 26px; gap: 10px; }
  .pl-top-name { font-size: 15px; }
  .pl-top-sub { font-size: 11px; }
  .pl-top-btn { width: 40px; height: 40px; }
  .pl-progress { height: 28px; }
  .pl-prog-thumb { width: 14px; height: 14px; }
  .pl-drawer { width: 100%; }
  .pl-drawer-grid { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
  .pl-ended-card { min-width: 0; width: 100%; }
  .pl-countdown { bottom: 96px; font-size: 12px; padding: 9px 12px; }

  /* 直播页 */
  .pl-live-head { align-items: flex-start; flex-direction: column; gap: 8px; }
  .pl-live-ctrl { padding: 26px 8px 8px; gap: 5px; flex-wrap: wrap; }
  .pl-live-btn { width: 40px; height: 40px; }
  .pl-live-line { height: 32px; padding: 0 10px; }
  .pl-live-vol .pl-vol-pop { display: none; }
  .pl-live-top { top: 8px; left: 8px; right: 8px; }
  .pl-live-now { font-size: 11.5px; }
  .pl-live-info { padding-top: 12px; }
  .pl-live-note { font-size: 11.5px; }
}

@media (max-width: 420px) {
  /* 保持 40px 触控区：把顶部栏已有的「选集」入口从底部收起，时间只留当前进度 */
  .pl-btn { width: 40px; height: 40px; }
  .pl-btn-play { width: 44px; height: 44px; }
  .pl-btn-textual { width: 40px; padding: 0; justify-content: center; }
  .pl-btn-ep { display: none; }
  .pl-time { font-size: 11.5px; padding: 0 5px; }
  .pl-time-dur,
  .pl-time-sep { display: none; }
  .pl-ctrl-row { gap: 2px; }
  .pl-ep-grid { grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); }
}

@media (max-width: 380px) {
  .pl-btn-pip { display: none; }
  .pl-vol { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .pl-drawer { transition: none; }
  .pl-top,
  .pl-controls,
  .pl-vignette { transition: none; }
  .pl-countdown-dot { animation: none; }
}

/* ---------------- 网页伪全屏（iPhone Safari 等不支持系统全屏时兜底） ---------------- */
.pl-player.is-pseudo-fs,
.pl-live-stage.is-pseudo-fs {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
  max-width: none !important;
  max-height: none !important;
  border-radius: 0 !important;
  z-index: 600 !important;
  background: #000;
  margin: 0 !important;
  border: 0 !important;
}
.pl-player.is-pseudo-fs .pl-video,
.pl-live-stage.is-pseudo-fs .pl-video {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
}
body.is-pseudo-fs-lock { overflow: hidden !important; }

/* 直播页头部右侧操作（HTTP 直连模式入口等） */
.pl-live-head-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.pl-live-http-hint { color: var(--brass-bright); }
.pl-live-http-hint:hover { color: var(--brass); }
