#desktop-site-header { display: none; }
/* 青果短剧 · 播放器原型 v1 */
:root {
  --accent: #d6b36a;
  --accent-bright: #e8cd92;
  --accent-ink: #191204;
  --accent-soft: rgba(214, 179, 106, 0.16);
  --ui-fade: 240ms cubic-bezier(0.22, 0.61, 0.36, 1);
  --swap: 280ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; background: #000; overflow: hidden; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: #fff; font-size: 14px; user-select: none; -webkit-user-select: none;
}
.num { font-variant-numeric: tabular-nums; }
button { font-family: inherit; color: inherit; background: none; border: none; cursor: pointer; }

/* —— 舞台：移动端全屏，宽屏居中 9:16 —— */
#stage {
  position: fixed; inset: 0; margin: 0 auto;
  width: 100%; height: 100%;
  max-width: calc(100vh * 9 / 16);
  overflow: hidden; background: #000;
}

/* —— 三元素滑动窗口 —— */
#deck { position: absolute; inset: 0; }
.cell {
  position: absolute; inset: 0;
  will-change: transform;
}
.cell.anim { transition: transform var(--swap); }
.cell video { width: 100%; height: 100%; object-fit: cover; background: #000; }
/* 横屏片源：完整显示、上下留黑边。
   竖屏容器里用 cover 会裁掉左右 68%(9:16) ~ 75%(20:9) —— 实拍是对手戏变独角戏、
   人脸切一半、字幕缺字。方向由 player.js 的 syncOrient() 按 videoWidth/videoHeight 判定。 */
.cell video.landscape { object-fit: contain; }
/* 全屏时容器变成横向，横屏片用 contain 正好铺满，不再有上下黑边 */
#stage:fullscreen .cell video.landscape,
#stage:-webkit-full-screen .cell video.landscape { object-fit: contain; }
/* 横屏按钮：与倍速 chip 同款，图标+文字 */
#btn-fs { display: inline-flex; align-items: center; gap: 4px; }
#btn-fs[hidden] { display: none; }

#gesture { position: absolute; inset: 0; z-index: 5; touch-action: none; }

/* —— 控件层 —— */
#ui { position: absolute; inset: 0; z-index: 10; pointer-events: none; opacity: 0; transition: opacity var(--ui-fade); }
#ui.visible { opacity: 1; }
#ui > * { pointer-events: auto; }
/* Transparent text/spacing must not swallow swipes; controls retain their hit targets. */
@media (max-width:1023px) {
  #ui > #topbar, #ui > #bottom { pointer-events:none; }
  #topbar a, #bottom button, #bottom #pbar-hit { pointer-events:auto; }
}

#topbar {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: center; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 12px 20px;
  background: linear-gradient(rgba(0,0,0,0.4), transparent);
}
.back-btn { width: 38px; height: 38px; border-radius: 50%; background: rgba(20,20,24,0.5); }
.icon-btn { width: 34px; height: 34px; display: grid; place-items: center; }
.icon-btn svg { width: 22px; height: 22px; }
#top-title { display: flex; flex-direction: column; line-height: 1.3; }
#drama-name { font-weight: 600; font-size: 15px; }
#ep-indicator { font-size: 12px; color: rgba(255,255,255,0.72); }
#pc-hints { margin-left: auto; font-size: 11px; color: rgba(255,255,255,0.45); display: none; }
@media (min-width: 900px) { #pc-hints { display: block; } }

/* —— 右侧操作栏 —— */
#rail {
  position: absolute; right: 8px; bottom: 170px;
  display: flex; flex-direction: column; gap: 22px; align-items: center;
}
.rail-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 56px; }
.rail-btn svg { width: 38px; height: 38px; filter: drop-shadow(0 2px 5px rgba(0,0,0,0.55)); }
.rail-btn i { font-style: normal; font-size: 12px; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,0.7); }
.rail-btn.active svg { color: var(--accent); }
#btn-like.active svg { color: #ff5060; }
.rail-btn.pop svg { animation: pop 320ms ease; }
@keyframes pop { 40% { transform: scale(1.35); } }

/* —— 底部：字幕条 + 进度条 —— */
#bottom {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 20px 14px calc(12px + env(safe-area-inset-bottom));
  /* 不加任何底色：竖版海报底部是品牌信息（网址），任何渐变都会把它压没。
     文字可读性全部改由 text-shadow 承担（见下面各元素）。 */
  background: none;
}
#ep-title { display: block; font-size: 16px; font-weight: 700; text-shadow: 0 1px 3px rgba(0,0,0,0.95), 0 0 10px rgba(0,0,0,0.7); padding-right: 64px; }
#cap-desc { display: block; font-size: 12px; color: rgba(255,255,255,0.85); text-shadow: 0 1px 3px rgba(0,0,0,0.95), 0 0 10px rgba(0,0,0,0.7); margin: 4px 0 10px; padding-right: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#ep-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.ep-bar-main {
  flex: 1; display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 10px;
  /* 只有按钮这一小块保留淡底：#bottom 的大面积渐变已去掉、海报品牌信息照常露出，
     但亮封面上纯描边白字仍偏弱（实测最亮封面底部平均亮度 131），给按钮补一点底 */
  background: rgba(20,20,24,0.35);
  font-size: 13px; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,0.95), 0 0 10px rgba(0,0,0,0.7);
}
.ep-bar-main svg { width: 17px; height: 17px; }
.ep-bar-main em { font-style: normal; font-weight: 400; font-size: 12px; color: rgba(255,255,255,0.65); }

#pbar-hit { position: relative; padding: 10px 0; cursor: pointer; touch-action: none; }
#pbar { position: relative; height: 3px; border-radius: 99px; background: rgba(255,255,255,0.28); transition: height 120ms; }
#pbar-hit.scrubbing #pbar { height: 6px; }
#pbar-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 99px; background: var(--accent); }
#pbar-knob {
  position: absolute; top: 50%; left: 0; width: 12px; height: 12px;
  border-radius: 50%; background: #fff; transform: translate(-50%, -50%) scale(0);
  transition: transform 120ms; box-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
#pbar-hit.scrubbing #pbar-knob, #stage.paused #pbar-knob { transform: translate(-50%, -50%) scale(1); }
#scrub-time {
  position: absolute; top: 38%; left: 50%; transform: translate(-50%, -50%);
  z-index: 14; font-size: 15px; color: rgba(255,255,255,0.8);
  opacity: 0; pointer-events: none; transition: opacity 120ms;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6); text-align: center;
}
#scrub-time b { font-size: 34px; font-weight: 700; color: #fff; margin-right: 6px; }
#stage.scrubbing #scrub-time { opacity: 1; }
#time-row { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; font-size: 11px; color: rgba(255,255,255,0.65); }

.chip {
  padding: 4px 10px; border-radius: 99px; font-size: 12px;
  background: rgba(255,255,255,0.14); color: #fff;
}
.chip--primary { background: linear-gradient(160deg, var(--accent-bright), var(--accent)); color: var(--accent-ink); font-weight: 700; }

/* —— 中央播放按钮 —— */
#center-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 74px; height: 74px; display: grid; place-items: center;
  opacity: 0; pointer-events: none; transition: opacity 160ms, transform 160ms;
}
#center-play svg { width: 74px; height: 74px; color: rgba(255,255,255,0.85); filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5)); }
#stage.paused #center-play { opacity: 1; }

/* —— 3x 徽标 —— */
#boost-badge {
  position: absolute; top: 16%; left: 50%; transform: translateX(-50%);
  z-index: 12; padding: 7px 16px; border-radius: 99px;
  background: rgba(20,20,24,0.8); font-size: 14px; font-weight: 600;
  opacity: 0; transition: opacity 140ms; pointer-events: none;
}
#boost-badge .num { color: var(--accent-bright); }
#stage.boosting #boost-badge { opacity: 1; }

/* —— 双击快进指示 —— */
.seek-hint {
  position: absolute; top: 0; bottom: 0; width: 34%;
  display: grid; place-items: center; z-index: 11;
  opacity: 0; pointer-events: none; font-size: 22px; font-weight: 700;
}
.seek-hint span { padding: 10px 16px; border-radius: 12px; background: rgba(20,20,24,0.7); }
#seek-hint-l { left: 0; }
#seek-hint-r { right: 0; }
.seek-hint.flash { animation: flash 500ms ease; }
@keyframes flash { 15% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; } }

/* —— 声音提示 —— */
#unmute-pill {
  position: absolute; top: calc(64px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%);
  z-index: 12; padding: 7px 14px; border-radius: 99px;
  background: rgba(20,20,24,0.85); border: 1px solid rgba(255,255,255,0.2);
  font-size: 12px; display: none;
}
#stage.muted-hint #unmute-pill { display: block; }

/* —— Toast —— */
#toast {
  position: absolute; bottom: 34%; left: 50%; transform: translateX(-50%);
  z-index: 30; padding: 9px 18px; border-radius: 99px;
  background: rgba(20,20,24,0.88); font-size: 13px; white-space: nowrap;
  opacity: 0; transition: opacity 180ms; pointer-events: none;
}
#toast.show { opacity: 1; }

/* —— 会员/金币锁态：只在服务端判定未授权时出现 —— */
#paywall-mask {
  position:absolute; inset:0; z-index:27; opacity:0; pointer-events:none;
  background:rgba(3,2,6,.7); backdrop-filter:blur(5px); transition:opacity 200ms;
}
#paywall-sheet {
  position:absolute; z-index:28; left:50%; bottom:24px; width:min(420px,calc(100% - 24px));
  padding:27px 24px calc(23px + env(safe-area-inset-bottom)); border:1px solid rgba(191,103,235,.58); border-radius:22px;
  background:linear-gradient(150deg,rgba(29,17,39,.98),rgba(14,10,20,.99)); color:#f5eff9; text-align:center;
  box-shadow:0 0 46px rgba(115,35,166,.28),inset 0 1px 0 rgba(255,255,255,.04);
  transform:translate(-50%,calc(100% + 48px)); opacity:0; pointer-events:none;
  transition:transform 260ms cubic-bezier(.22,.61,.36,1),opacity 180ms;
}
#stage.paywall-open #paywall-mask { opacity:1; pointer-events:auto; }
#stage.paywall-open #paywall-sheet { transform:translate(-50%,0); opacity:1; pointer-events:auto; }
#paywall-close { position:absolute; right:10px; top:10px; color:rgba(255,255,255,.55); }
.paywall-lock { display:grid; place-items:center; width:64px; height:64px; margin:0 auto 13px; border:1px solid #a65dcc; border-radius:50%; background:rgba(143,61,191,.15); color:#dca8f4; box-shadow:0 0 20px rgba(159,68,209,.18); }
.paywall-lock svg { width:29px; height:29px; }
.paywall-kicker { color:#c98ee8; font-size:11px; font-weight:700; letter-spacing:2px; }
#paywall-title { margin:5px 0 5px; font-size:22px; }
#paywall-desc { color:rgba(255,255,255,.62); font-size:13px; }
#paywall-cost { margin:16px 0; padding:11px 12px; border:1px solid rgba(232,198,125,.18); border-radius:11px; background:rgba(232,198,125,.06); color:#efd18e; font-size:13px; }
.paywall-primary,.paywall-secondary { display:flex; align-items:center; justify-content:center; width:100%; min-height:48px; border-radius:10px; font-size:14px; font-weight:750; }
.paywall-primary { border:1px solid #ad68d2; background:linear-gradient(150deg,#67358b,#3c1f51); color:#fff; box-shadow:0 0 16px rgba(139,51,194,.18); }
.paywall-primary:disabled { opacity:.58; cursor:wait; }
.paywall-secondary { margin-top:9px; border:1px solid rgba(231,197,125,.33); background:rgba(231,197,125,.075); color:#f0d18c; }
.paywall-textlink { display:inline-block; margin-top:14px; color:#c494de; font-size:12px; }
.paywall-note { min-height:17px; margin-top:10px; color:rgba(255,255,255,.38); font-size:10px; line-height:1.6; }
#stage.access-locked #center-play,#stage.access-locked #unmute-pill { display:none; }
.ep-item.locked { color:#d2a7e7; background:rgba(116,50,153,.13); box-shadow:inset 0 0 0 1px rgba(171,92,213,.22); }
.ep-item.locked::before { content:""; position:absolute; right:5px; top:5px; width:8px; height:7px; border:1px solid currentColor; border-radius:2px; opacity:.82; }
.ep-item.locked::after { content:""; position:absolute; right:7px; top:2px; width:4px; height:5px; border:1px solid currentColor; border-bottom:0; border-radius:4px 4px 0 0; opacity:.82; }
.ep-item.owned { color:#ecd08c; }
.ep-item.current.locked { color:#e7bdf8; }

@media (max-width:520px) {
  #paywall-sheet { bottom:0; width:100%; border-radius:24px 24px 0 0; border-left:0; border-right:0; padding-left:20px; padding-right:20px; }
}

/* —— 选集抽屉 —— */
#drawer-mask, #rate-mask {
  position: absolute; inset: 0; z-index: 18; background: rgba(0,0,0,0.5);
  opacity: 0; pointer-events: none; transition: opacity 220ms;
}
#drawer {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 20;
  height: 68%; border-radius: 16px 16px 0 0; background: #16171d;
  transform: translateY(105%); transition: transform 260ms cubic-bezier(0.22, 0.61, 0.36, 1);
  display: flex; flex-direction: column;
}
#stage.drawer-open #drawer { transform: translateY(0); }
#stage.drawer-open #drawer-mask { opacity: 1; pointer-events: auto; }
#drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 16px 10px;
}
#drawer-head b { font-size: 15px; display: block; }
#drawer-head .text-dim { font-size: 12px; color: rgba(255,255,255,0.45); }
#drawer-tabs { display: flex; gap: 8px; padding: 0 16px 10px; }
.tab {
  padding: 5px 14px; border-radius: 8px; font-size: 13px;
  background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.75);
}
.tab.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
#drawer-grid {
  flex: 1; overflow-y: auto; padding: 4px 16px calc(16px + env(safe-area-inset-bottom));
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; align-content: start;
}
.ep-item {
  aspect-ratio: 1; border-radius: 8px; display: grid; place-items: center;
  background: rgba(255,255,255,0.07); font-size: 14px; position: relative;
}
.ep-item.watched { color: rgba(255,255,255,0.38); }
.ep-item.current { background: var(--accent-soft); color: var(--accent); font-weight: 700; box-shadow: inset 0 0 0 1.5px var(--accent); }
.ep-item.current::after {
  content: ""; position: absolute; right: 5px; bottom: 5px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
}

/* —— 倍速面板 —— */
#rate-sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 20;
  border-radius: 16px 16px 0 0; background: #16171d;
  padding: 18px 16px calc(20px + env(safe-area-inset-bottom));
  transform: translateY(105%); transition: transform 240ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
#stage.rate-open #rate-sheet { transform: translateY(0); }
#stage.rate-open #rate-mask { opacity: 1; pointer-events: auto; }
#rate-sheet b { display: block; margin-bottom: 14px; font-size: 15px; }
#rate-list { display: flex; gap: 8px; flex-wrap: wrap; }
.rate-opt {
  flex: 1; min-width: 52px; padding: 9px 0; border-radius: 8px; text-align: center;
  background: rgba(255,255,255,0.08); font-size: 13px;
}
.rate-opt.active { background: var(--accent-soft); color: var(--accent); font-weight: 700; }

/* —— 完结卡 —— */
#end-card {
  position: absolute; inset: 0; z-index: 25; display: none;
  flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: rgba(0,0,0,0.82); text-align: center;
}
#stage.ended #end-card { display: flex; }
#end-card b { font-size: 22px; }
#end-card p { font-size: 13px; color: rgba(255,255,255,0.6); }
#end-count { font-size: 13px; color: rgba(255,255,255,0.75); margin-top: 6px; }
.end-actions { display: flex; gap: 12px; margin-top: 14px; }
.end-actions .chip { padding: 9px 20px; font-size: 14px; }

/* —— 站内版补充：链接形态的控件 —— */
a { color: inherit; text-decoration: none; }
a.icon-btn { display: grid; }
a#drama-name { color: inherit; }
a.ep-item { display: grid; place-items: center; }
a.chip { display: inline-flex; align-items: center; }
#end-card .chip--primary { color: var(--accent-ink); }


/* —— 双击点赞飘心 —— */
#hearts { position: absolute; inset: 0; z-index: 9; pointer-events: none; overflow: hidden; }
.heart-pop {
  position: absolute; width: 68px; height: 68px; margin: -34px 0 0 -34px;
  color: #ff5060; filter: drop-shadow(0 2px 10px rgba(0,0,0,0.4));
  animation: heartpop 900ms ease-out forwards;
}
@keyframes heartpop {
  0% { transform: scale(0) rotate(-12deg); opacity: 0; }
  18% { transform: scale(1.15) rotate(-8deg); opacity: 1; }
  40% { transform: scale(1) rotate(-8deg) translateY(-6px); opacity: 1; }
  100% { transform: scale(1.1) rotate(-4deg) translateY(-110px); opacity: 0; }
}

/* —— 播放器评论面板 —— */
#cmt-mask { position: absolute; inset: 0; z-index: 18; background: rgba(0,0,0,0.5); opacity: 0; pointer-events: none; transition: opacity 220ms; }
#cmt-sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 21;
  height: 72%; border-radius: 16px 16px 0 0; background: #131318;
  transform: translateY(105%); transition: transform 260ms cubic-bezier(0.22, 0.61, 0.36, 1);
  display: flex; flex-direction: column;
}
#stage.cmt-open #cmt-sheet { transform: translateY(0); }
#stage.cmt-open #cmt-mask { opacity: 1; pointer-events: auto; }
#cmt-list { flex: 1; overflow-y: auto; padding: 4px 16px 12px; display: flex; flex-direction: column; gap: 16px; }
.pcmt { display: flex; gap: 10px; }
.pcmt-avatar { width: 34px; height: 34px; border-radius: 50%; background: #23232b; display: grid; place-items: center; font-size: 14px; color: var(--accent-bright); flex-shrink: 0; }
.pcmt-body { flex: 1; min-width: 0; }
.pcmt-head { font-size: 12px; color: rgba(255,255,255,0.5); display: flex; gap: 8px; align-items: baseline; }
.pcmt-head b { color: rgba(255,255,255,0.75); font-weight: 600; }
.pcmt-content { font-size: 14px; margin: 3px 0 5px; word-break: break-word; }
.pcmt-actions { display: flex; gap: 16px; }
.pcmt-actions button { font-size: 12px; color: rgba(255,255,255,0.5); }
.pcmt-actions .liked, .pcmt-actions button:active { color: var(--accent); }
.pcmt-replies { margin-top: 6px; background: rgba(255,255,255,0.05); border-radius: 8px; padding: 8px 12px; display: flex; flex-direction: column; gap: 5px; }
.pcmt-replies div { font-size: 13px; color: rgba(255,255,255,0.75); word-break: break-word; }
.pcmt-replies b { color: rgba(255,255,255,0.5); font-weight: 500; }
.pcmt-empty { color: rgba(255,255,255,0.35); text-align: center; padding: 40px 0 20px; font-size: 14px; }
#cmt-inputbar { border-top: 1px solid rgba(255,255,255,0.08); padding: 10px 14px calc(12px + env(safe-area-inset-bottom)); }
.cmt-reply-chip { display: inline-block; font-size: 12px; color: var(--accent-bright); background: var(--accent-soft); padding: 3px 10px; border-radius: 99px; margin-bottom: 8px; }
.cmt-inputrow { display: flex; gap: 10px; }
#cmt-input {
  flex: 1; min-width: 0; padding: 9px 14px; border-radius: 99px;
  border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.06);
  color: #fff; font: inherit; font-size: 14px; outline: none;
}
#cmt-input:focus { border-color: var(--accent); }

#cmt-nick {
  width: 88px; flex-shrink: 0; padding: 9px 12px; border-radius: 99px;
  border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.06);
  color: #fff; font: inherit; font-size: 13px; outline: none;
}
#cmt-nick:focus { border-color: var(--accent); }
.cmt-pending { font-style: normal; font-size: 11px; color: #d0a355; background: rgba(208,163,85,.14); padding: 2px 8px; border-radius: 99px; }

/* UI-05C: presentation only. Existing player state/gestures remain unchanged. */
@media (max-width: 700px) {
  body.theme-deep-purple-v2 #stage {
    --accent: #ff8068; --accent-bright: #ffab99; --accent-ink: #202a39;
    --accent-soft: rgba(255,128,104,.16);
    --mobile-safe-bottom: env(safe-area-inset-bottom, 0px);
    --mobile-safe-top: env(safe-area-inset-top, 0px);
    height: 100dvh; max-width: none; background: #141c29; box-shadow: none;
  }
  body.theme-deep-purple-v2 #stage .cell video {
    height: calc(100% - 112px - var(--mobile-safe-bottom));
    object-fit: contain; background: #141c29;
  }
  body.theme-deep-purple-v2 #stage #topbar {
    padding: calc(10px + var(--mobile-safe-top)) 12px 20px;
    background: linear-gradient(#141c29b8,transparent);
  }
  body.theme-deep-purple-v2 #stage .icon-btn { min-width: 44px; min-height: 44px; flex-shrink: 0; }
  body.theme-deep-purple-v2 #stage .back-btn { border-radius: 14px; background: #202a39e8; border: 1px solid #647083; }
  body.theme-deep-purple-v2 #stage #rail { right: 8px; bottom: calc(226px + var(--mobile-safe-bottom)); gap: 10px; }
  body.theme-deep-purple-v2 #stage .rail-btn { width: 48px; min-height: 52px; padding: 6px 2px; gap: 4px; border-radius: 13px; background: #202a39d9; }
  body.theme-deep-purple-v2 #stage .rail-btn svg { width: 27px; height: 27px; filter: none; }
  body.theme-deep-purple-v2 #stage .rail-btn i { font-size: 12px; line-height: 16px; font-weight: 500; text-shadow: none; }
  body.theme-deep-purple-v2 #stage #bottom { padding: 22px 12px var(--mobile-safe-bottom); background: linear-gradient(transparent,#141c29ed 25%,#141c29 58%); }
  body.theme-deep-purple-v2 #stage #ep-title { font-size: 16px; line-height: 1.45; padding-right: 0; max-height: 70px; overflow-y: auto; overflow-wrap: anywhere; text-shadow: 0 1px 4px #000; scrollbar-width: thin; }
  body.theme-deep-purple-v2 #stage #cap-desc { font-size: 12px; line-height: 18px; color: #d3dbe5; padding-right: 0; margin: 5px 0 12px; text-shadow: none; }
  body.theme-deep-purple-v2 #stage #ep-bar { gap: 8px; margin: 0; }
  body.theme-deep-purple-v2 #stage .ep-bar-main { min-height: 48px; min-width: 0; padding: 10px; gap: 7px; border-radius: 12px; background: #2b374a; border: 1px solid #65738a; text-shadow: none; }
  body.theme-deep-purple-v2 #stage .ep-bar-main em { color: #d3dbe5; font-size: 12px; }
  body.theme-deep-purple-v2 #stage .chip { min-width: 44px; min-height: 48px; border-radius: 12px; padding: 8px; background: #263247; }
  body.theme-deep-purple-v2 #stage #pbar-hit { min-height: 44px; padding: 20px 0; }
  body.theme-deep-purple-v2 #stage #pbar { height: 4px; background: #647083; }
  body.theme-deep-purple-v2 #stage #pbar-fill { background: #ff8068; box-shadow: none; }
  body.theme-deep-purple-v2 #stage #pbar-knob { width: 10px; height: 10px; transform: translate(-50%,-50%) scale(1); }
  body.theme-deep-purple-v2 #stage #unmute-pill { top: calc(64px + var(--mobile-safe-top)); left: 50%; right: auto; transform: translateX(-50%); max-width: calc(100% - 82px); min-height: 44px; padding: 10px 14px; border-radius: 14px; background: #202a39f2; border-color: #77879b; font-size: 13px; }
  body.theme-deep-purple-v2 #stage :is(#drawer,#rate-sheet,#cmt-sheet) { background: #202a39; border-color: #647083; border-radius: 18px 18px 0 0; box-shadow: none; }
  body.theme-deep-purple-v2 #stage #drawer { height: min(72%,620px); }
  body.theme-deep-purple-v2 #stage #drawer-head { gap: 10px; padding: 14px 12px 10px; }
  body.theme-deep-purple-v2 #stage #drawer-head>div { min-width: 0; }
  body.theme-deep-purple-v2 #stage #drawer-head b { max-height: 70px; overflow-y: auto; overflow-wrap: anywhere; line-height: 1.45; }
  body.theme-deep-purple-v2 #stage #drawer-head .text-dim { color: #c5d0dd; }
  body.theme-deep-purple-v2 #stage #drawer-tabs { padding: 0 12px 10px; overflow-x: auto; flex-shrink: 0; }
  body.theme-deep-purple-v2 #stage .tab { min-height: 44px; white-space: nowrap; flex-shrink: 0; padding: 10px 12px; }
  body.theme-deep-purple-v2 #stage #drawer-grid { padding: 4px 12px calc(16px + var(--mobile-safe-bottom)); grid-template-columns: repeat(5,minmax(0,1fr)); overscroll-behavior: contain; }
  body.theme-deep-purple-v2 #stage :is(.ep-item,.tab,.rate-opt) { background: #2b374a; border-color: #647083; color: #eef2f6; box-shadow: none; }
  body.theme-deep-purple-v2 #stage .ep-item { min-height: 48px; font-size: 13px; }
  body.theme-deep-purple-v2 #stage :is(.ep-item.current,.tab.active,.rate-opt.active) { background: #ff8068; color: #202a39; border-color: #ffab99; box-shadow: none; font-weight: 700; }
  body.theme-deep-purple-v2 #stage .ep-item.current::after { background: #202a39; box-shadow: none; }
  body.theme-deep-purple-v2 #stage :is(button,a,input):focus-visible { outline: 3px solid #ffab99; outline-offset: 2px; }
  body.theme-deep-purple-v2 #stage #toast { white-space: normal; max-width: 90%; text-align: center; }
}
@media (max-width: 700px) and (max-height: 600px) {
  body.theme-deep-purple-v2 #stage #rail { gap: 4px; bottom: calc(188px + var(--mobile-safe-bottom)); }
  body.theme-deep-purple-v2 #stage .rail-btn { min-height: 44px; padding: 3px 2px; }
  body.theme-deep-purple-v2 #stage .rail-btn svg { width: 22px; height: 22px; }
  body.theme-deep-purple-v2 #stage #ep-title { max-height: 47px; }
}
@media (max-width: 700px) and (prefers-reduced-motion: reduce) {
  body.theme-deep-purple-v2 #stage .rail-btn.pop svg { animation: none; }
}

/* UI-05D.2B: desktop presentation; UI-05C rules above remain unchanged. */
#desktop-player-info { display: none; }
@media (min-width: 1024px) {
  html:has(#desktop-player-info), body:has(#desktop-player-info) { height: auto; min-height: 100%; overflow: auto; background: #202a39; scroll-padding-block: 24px; }
  body:has(#desktop-player-info) { color: #f0f2f5; }
  body.theme-deep-purple-v2 #stage {
    position: relative; inset: auto; margin: 24px auto 0;
    width: min(calc(100% - 48px),106.666667dvh,1066.666667px);
    max-width: none; height: auto; aspect-ratio: 4/3;
    background: #141c29; border-radius: 10px; box-shadow: none;
    --accent: #ff8068; --accent-bright: #ffab99; --accent-ink: #202a39; --accent-soft: rgba(255,128,104,.16);
  }
  body.theme-deep-purple-v2 #stage .cell video { object-fit: contain; background: #141c29; }
  body.theme-deep-purple-v2 #stage #ui { opacity: 1; }
  body.theme-deep-purple-v2 #stage #bottom { padding: 18px 20px 8px; background: linear-gradient(transparent,#141c29e8); }
  body.theme-deep-purple-v2 #stage :is(#ep-title,#cap-desc) { display: none; }
  body.theme-deep-purple-v2 #stage .icon-btn { min-width: 44px; min-height: 44px; }
  body.theme-deep-purple-v2 #stage :is(.chip,.ep-bar-main) { min-height: 44px; }
  body.theme-deep-purple-v2 #stage #pbar-hit { min-height: 44px; padding: 20px 0; }
  body.theme-deep-purple-v2 #stage #pbar-fill { background: #ff8068; box-shadow: none; }
  body.theme-deep-purple-v2 #stage #pbar-knob { transform: translate(-50%,-50%) scale(1); }
  body.theme-deep-purple-v2 #stage:fullscreen { width: 100vw; height: 100dvh; max-width: none; aspect-ratio: auto; margin: 0; border-radius: 0; }
  body.theme-deep-purple-v2 #stage:fullscreen #drawer { height: min(68%,640px); max-width: 1000px; margin-inline: auto; }
  #desktop-player-info { display: block; width: min(1000px,calc(100% - 48px)); margin: 28px auto 48px; user-select: text; -webkit-user-select: text; }
  #desktop-player-info h1 { font-size: 26px; line-height: 1.45; overflow-wrap: anywhere; margin: 0 0 12px; }
  #desktop-player-info h2 { font-size: 20px; margin: 24px 0 12px; }
  #desktop-player-info .desktop-meta { color: #bac6d6; font-size: 14px; line-height: 1.7; }
  #desktop-player-info summary { min-height: 44px; padding: 10px 0; cursor: pointer; }
  #desktop-player-info .desktop-intro p { max-width: 72ch; line-height: 1.85; font-size: 15px; color: #bac6d6; overflow-wrap: anywhere; margin-bottom: 16px; }
  #desktop-current { margin: 12px 0 16px; font-size: 15px; font-variant-numeric: tabular-nums; }
  #desktop-player-info #rail { position: static; display: flex; flex-direction: row; gap: 12px; align-items: stretch; }
  #desktop-player-info .rail-btn { width: 100px; min-height: 44px; flex-direction: row; justify-content: center; border-radius: 8px; background: #263346; }
  #desktop-player-info .rail-btn svg { width: 20px; height: 20px; filter: none; }
  #desktop-player-info .rail-btn i { text-shadow: none; font-size: 13px; }
  body.theme-deep-purple-v2 #desktop-player-info #drawer { position: static; height: auto; transform: none; transition: none; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
  #desktop-player-info #drawer-head { display: none; }
  #desktop-player-info #drawer-tabs { padding: 0 0 16px; gap: 10px; flex-wrap: wrap; }
  #desktop-player-info #drawer-grid { display: grid; grid-template-columns: repeat(10,minmax(0,1fr)); padding: 0; gap: 10px; overflow: visible; }
  #desktop-player-info #drawer-grid:has(.ep-item[data-label-range]) { grid-template-columns: repeat(5,minmax(0,1fr)); }
  body.theme-deep-purple-v2 #desktop-player-info :is(.ep-item,.tab) { min-height: 48px; min-width: 44px; padding: 10px; background: #263346; color: #f0f2f5; border: 1px solid #64738a; border-radius: 8px; box-shadow: none; font-size: 14px; }
  body.theme-deep-purple-v2 #desktop-player-info :is(.ep-item.current,.tab.active) { background: #ff8068; color: #202a39; border-color: #ff8068; font-weight: 700; }
  #desktop-player-info .ep-item.current::after { background: #202a39; box-shadow: none; }
  #desktop-player-info .ep-item { aspect-ratio: auto; height: 48px; }
  #desktop-player-info .desktop-detail-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 20px; color: #bac6d6; }
  #desktop-player-info :is(a,button,summary) { scroll-margin-block: 24px; }
  #desktop-player-info :is(a,button,summary):focus-visible, #stage :is(a,button):focus-visible { outline: 3px solid #ffab99; outline-offset: 3px; }
  #desktop-player-info :is(a,button,summary):hover { color: #ffab99; }
  #desktop-player-info :is(.ep-item.current,.tab.active):hover { color: #202a39; }
  body.theme-deep-purple-v2 #stage.cmt-open #cmt-sheet { position: fixed; width: min(640px,calc(100vw - 48px)); left: 50%; right: auto; bottom: 0; height: min(75dvh,680px); transform: translateX(-50%); background: #202a39; }
  body.theme-deep-purple-v2 #stage.cmt-open #cmt-mask { position: fixed; }
}
@media (min-width: 1280px) {
  body.theme-deep-purple-v2 #stage:not(:fullscreen) { width: min(calc(100% - 48px),142.222222dvh,1422.222222px); aspect-ratio: 16/9; }
}

/* UI-05E: compact site navigation only; player geometry is unchanged. */
.player-site-nav { display: flex; align-items: center; gap: 8px; }
.player-site-nav a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 12px; border-radius: 10px; font-size: 13px; background: #202a39e8; color: #f0f2f5; }
.player-site-nav :is(.player-brand,.player-browse,.player-home-desktop) { display: none; }
.player-site-nav a:focus-visible { outline: 3px solid #ffab99; outline-offset: 2px; }
.player-site-nav a:hover { color: #ffab99; }
@media (min-width: 1024px) {
  .player-site-nav :is(.player-brand,.player-browse) { display: inline-flex; }
  .player-site-nav .player-brand { font-size: 16px; font-weight: 700; background: transparent; }
  .player-site-nav .player-home-desktop { display: inline; }
  .player-site-nav .player-home-mobile { display: none; }
  #topbar #pc-hints { display: none; }
}

/* Mobile playback experience V1: contain the complete frame above real controls. */
@media (max-width: 1023px) {
  body.theme-deep-purple-v2 #stage {
    --player-video-footer-height: var(--player-footer-height, 210px);
    top: var(--player-viewport-top, 0px); bottom: auto;
    height: 100vh; height: var(--player-viewport-height, 100dvh);
    max-width: none;
  }
  body.theme-deep-purple-v2 #stage .cell video {
    display: block; width: 100%;
    height: calc(100% - var(--player-video-footer-height) - env(safe-area-inset-top, 0px));
    margin-top: env(safe-area-inset-top, 0px); object-fit: contain;
  }
  #bottom a { pointer-events: auto; }
  #ep-title::after { content: ' ›'; color: #ffab99; }
  #ep-bar { flex-wrap: wrap; }
  #ep-bar .ep-bar-main { flex-basis: 100%; }
  body.theme-deep-purple-v2 #stage #bottom { padding-top: 8px; background: #141c29; }
  body.theme-deep-purple-v2 #stage #ep-title { max-height: 47px; }
  body.theme-deep-purple-v2 #stage #rail { bottom: calc(var(--player-footer-height, 210px) + 12px); }
  #ui:not(.visible) > *, #ui:not(.visible) :is(a,button,#pbar-hit) { pointer-events: none; }
  #ui.visible #center-play { pointer-events: none; }
  #stage:fullscreen, #stage:-webkit-full-screen { top: 0; height: 100%; width: 100%; }
}
@media (max-width: 1023px) and (max-height: 500px) and (orientation: landscape) {
  body.theme-deep-purple-v2 #stage #rail {
    top: calc(10px + env(safe-area-inset-top, 0px)); bottom: auto;
    right: calc(12px + env(safe-area-inset-right, 0px));
    flex-direction: row; gap: 6px;
  }
  body.theme-deep-purple-v2 #stage .rail-btn { width: 44px; min-height: 44px; gap: 2px; padding: 3px 2px; }
  body.theme-deep-purple-v2 #stage .rail-btn svg { width: 24px; height: 24px; }
}

/* Mobile player V1.1: persistent progress, relocated existing controls. */
#mobile-video-controls { display: none; }
@media (max-width: 1023px) {
  body.theme-deep-purple-v2 #stage {
    --player-progress-height: calc(44px + env(safe-area-inset-bottom, 0px));
    --player-video-footer-height: calc(var(--player-footer-height, 140px) + var(--player-progress-height));
  }
  body.theme-deep-purple-v2 #stage #bottom {
    bottom: var(--player-progress-height); padding-bottom: 0;
  }
  #ep-bar .ep-bar-main { flex-basis: 0; }
  body.theme-deep-purple-v2 #stage #rail {
    bottom: calc(var(--player-footer-height, 140px) + var(--player-progress-height) + 68px);
  }
  #stage > #pbar-hit {
    position: absolute; left: calc(12px + env(safe-area-inset-left, 0px));
    right: calc(12px + env(safe-area-inset-right, 0px));
    bottom: env(safe-area-inset-bottom, 0px); z-index: 11;
    height: 44px; min-height: 44px; padding: 20px 0; pointer-events: auto;
  }
  #ui > #mobile-video-controls { display: block; position: absolute; inset: 0; pointer-events: none; }
  #ui.visible #mobile-video-controls button { pointer-events: auto; }
  body.theme-deep-purple-v2 #stage #mobile-video-controls .chip {
    position: absolute; min-height: 44px; min-width: 52px;
    border-radius: 12px; padding: 8px 12px; background: #263247e8;
  }
  #mobile-video-controls #btn-rate {
    top: calc(12px + env(safe-area-inset-top, 0px));
    right: calc(12px + env(safe-area-inset-right, 0px));
  }
  #mobile-video-controls #btn-fs {
    left: 50%; transform: translate(-50%, -50%);
    top: calc(env(safe-area-inset-top, 0px) + (100% - var(--player-video-footer-height) - env(safe-area-inset-top, 0px)) * .72);
  }
}
@media (max-width: 1023px) and (max-height: 500px) and (orientation: landscape) {
  body.theme-deep-purple-v2 #stage #rail { bottom: auto; }
  #mobile-video-controls #btn-rate { right: calc(218px + env(safe-area-inset-right, 0px)); }
}

/* V1.1 visual finish: upright fullscreen label; retain parent positioning. */
#stage #fs-label { font-style: normal; transform: none; }

/* Mobile player V1.2: permanent bottom stack; opacity never changes frame geometry. */
@media (max-width: 1023px) {
  body.theme-deep-purple-v2 #stage {
    --player-video-footer-height: var(--player-footer-height, 158px);
  }
  body.theme-deep-purple-v2 #stage > #bottom {
    bottom: 0; z-index: 10;
    padding: 8px 12px env(safe-area-inset-bottom, 0px);
  }
  #stage > #bottom #ep-bar { height: 48px; margin: 44px 0 0; }
  #stage > #bottom #btn-eps { min-height: 48px; }
  #stage > #pbar-hit { bottom: calc(48px + env(safe-area-inset-bottom, 0px)); }
  body.theme-deep-purple-v2 #stage #rail { bottom: calc(var(--player-footer-height, 158px) + 68px); }
  #ui > #mobile-video-controls { bottom: var(--player-footer-height, 158px); }
  #mobile-video-controls #btn-fs {
    top: calc(env(safe-area-inset-top, 0px) + (100% - env(safe-area-inset-top, 0px)) * .82);
  }
  body.theme-deep-purple-v2 #stage #center-play {
    top: calc(env(safe-area-inset-top, 0px) + (100% - var(--player-footer-height, 158px) - env(safe-area-inset-top, 0px)) * .5);
  }
}
@media (max-width: 1023px) and (max-height: 500px) and (orientation: landscape) {
  body.theme-deep-purple-v2 #stage #rail { bottom: auto; }
  body.theme-deep-purple-v2 #stage #center-play { width: 44px; height: 44px; }
  body.theme-deep-purple-v2 #stage #center-play svg { width: 44px; height: 44px; }
}

/* Mobile player V1.3: reclaim bottom spacing without shrinking touch targets. */
@media (max-width: 1023px) {
  body.theme-deep-purple-v2 #stage > #bottom { padding-top: 0; }
  body.theme-deep-purple-v2 #stage #ep-title { line-height: 18px; max-height: 36px; }
  body.theme-deep-purple-v2 #stage #cap-desc { line-height: 14px; margin: 0; }
  #stage > #bottom #ep-bar { height: 44px; }
  #stage > #bottom #btn-eps { min-height: 44px; }
  #stage > #pbar-hit { bottom: calc(44px + env(safe-area-inset-bottom, 0px)); }

  /* Standard/WebKit element fullscreen. Native iPhone video fullscreen is OS-owned. */
  body.theme-deep-purple-v2 #stage:is(:fullscreen, :-webkit-full-screen) {
    top: 0; width: 100%; height: 100%; max-width: none; margin: 0;
  }
  body.theme-deep-purple-v2 #stage:is(:fullscreen, :-webkit-full-screen) > #bottom { display: none; }
  body.theme-deep-purple-v2 #stage:is(:fullscreen, :-webkit-full-screen) .cell video {
    width: 100%; height: 100%; max-width: none; max-height: none;
    margin: 0; padding: 0; object-fit: contain;
  }
  #stage:is(:fullscreen, :-webkit-full-screen) > #pbar-hit { bottom: env(safe-area-inset-bottom, 0px); }
  #stage:is(:fullscreen, :-webkit-full-screen) #ui > #mobile-video-controls { inset: 0; }
  body.theme-deep-purple-v2 #stage:is(:fullscreen, :-webkit-full-screen) #center-play { top: 50%; }
  body.theme-deep-purple-v2 #stage:is(:fullscreen, :-webkit-full-screen) #rail {
    bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  }
}
@media (max-width: 1023px) and (max-height: 500px) and (orientation: landscape) {
  body.theme-deep-purple-v2 #stage:is(:fullscreen, :-webkit-full-screen) #rail { bottom: auto; }
}

/* Player V2: keep the existing transport above the transparent gesture surface. */
#playback-clock { display:none; }
#player-retry { position:absolute; z-index:16; left:50%; top:calc(50% + 54px); transform:translateX(-50%); padding:10px 14px; background:#202a39; border:1px solid #ff8068; white-space:nowrap; }
#player-retry[hidden] { display:none; }
#gesture { touch-action:pan-x pinch-zoom; }
#pbar-hit:focus-visible { outline:2px solid #ffab99; outline-offset:-2px; }
button[aria-busy="true"] { opacity:.65; cursor:wait; }
/* Web immersive fullscreen keeps all three videos and the shared gesture layer in the DOM. */
body.theme-deep-purple-v2 #desktop-watch-layout #stage.immersive {
  position:fixed!important; inset:0!important; top:var(--player-viewport-top,0px)!important;
  margin:0!important; width:100vw!important; max-width:none!important;
  height:var(--player-viewport-height,100dvh)!important; aspect-ratio:auto!important; border-radius:0!important; z-index:10000;
}
body.player-immersive { overflow:hidden!important; overscroll-behavior:none; }
body.theme-deep-purple-v2 #stage.immersive > #bottom { display:none; }
body.theme-deep-purple-v2 #stage.immersive .cell video { width:100%; height:100%; max-height:none; max-width:none; margin:0; padding:0; object-fit:contain; }
#stage.immersive > #pbar-hit { bottom:env(safe-area-inset-bottom,0px); z-index:12; }
#stage.immersive #ui > #mobile-video-controls { display:block; position:absolute; inset:0; pointer-events:none; }
#stage.immersive #mobile-video-controls button { pointer-events:auto; }
#stage.immersive #mobile-video-controls #btn-fs { top:calc(12px + env(safe-area-inset-top,0px)); right:calc(12px + env(safe-area-inset-right,0px)); left:auto; bottom:auto; transform:none; }
#stage.immersive #mobile-video-controls #btn-rate { top:calc(12px + env(safe-area-inset-top,0px)); right:calc(100px + env(safe-area-inset-right,0px)); bottom:auto; }
body.theme-deep-purple-v2 #stage.immersive #center-play { top:50%; }
body.theme-deep-purple-v2 #stage.immersive #rail { position:absolute; right:calc(8px + env(safe-area-inset-right,0px)); top:auto; bottom:calc(64px + env(safe-area-inset-bottom,0px)); }
#stage.immersive #topbar { padding-top:calc(12px + env(safe-area-inset-top,0px)); padding-right:190px; }
#stage.immersive #cmt-sheet { position:absolute; width:100%; max-width:640px; left:50%; right:auto; bottom:0; transform:translate(-50%,105%); }
#stage.immersive.cmt-open #cmt-sheet { transform:translateX(-50%); }

#btn-immersive-eps { display:none; }
#stage.immersive #btn-immersive-eps { display:block; position:absolute; top:calc(12px + env(safe-area-inset-top,0px)); right:calc(180px + env(safe-area-inset-right,0px)); min-height:44px; padding:8px; }
#stage.immersive .player-site-nav { display:none; }
