/* 分集播放页（/series/<标识>）。独立页面，不依赖 styles.css。主色跟站点配置 [brand] accent 走。
   .sh-vertical 竖屏短剧（全屏连播）；.sh-wide 电视剧（上面播放器、下面简介和选集）。 */
:root { --sh-accent: var(--accent, #ff8a65); }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; background: #000; color: #fff;
  font: 15px/1.5 "Plus Jakarta Sans", "Sukhumvit Set", "Noto Sans Thai", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; }
.sh-vertical { position: relative; height: 100vh; height: 100dvh; max-width: 520px; margin: 0 auto; background: #000; overflow: hidden; }
body:has(.sh-vertical) { overflow: hidden; }
.sh-vertical .sh-stage { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
.sh-stage video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.sh-stage canvas { width: 100%; height: 100%; background: #000; display: block; }  /* 画布播放器（canvas-video.js） */
.sh-top, .sh-side, .sh-bottom { transition: opacity .25s; z-index: 3; }
.sh-top { display: flex; align-items: center; gap: 10px; }
.sh-vertical .sh-top { position: absolute; top: 0; left: 0; right: 0;
  padding: calc(10px + env(safe-area-inset-top)) 12px 28px; background: linear-gradient(rgba(0,0,0,.62), rgba(0,0,0,0)); }
.sh-round { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  text-decoration: none; font-size: 26px; line-height: 1; padding-bottom: 3px; background: rgba(0,0,0,.36); }
.sh-title { min-width: 0; }
.sh-title h1 { margin: 0; font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-title p { margin: 0; font-size: 12px; color: #d8d3e2; }
.sh-side { position: absolute; right: 10px; bottom: calc(100px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 16px; }
.sh-side button { border: 0; background: none; color: #fff; font: inherit; font-size: 11px; font-weight: 600; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px; text-shadow: 0 1px 3px #000; }
.sh-side i { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 20px;
  background: rgba(22,18,30,.58); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.sh-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 14px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,.72)); }
.sh-prog { height: 22px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.sh-prog div { position: relative; flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.28); }
.sh-prog i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 3px; background: var(--sh-accent); }
.sh-row { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: #ddd7ea; }
.sh-next { display: inline-block; font: inherit; font-size: 13px; font-weight: 800; color: #14101c; text-decoration: none; cursor: pointer;
  border: 0; border-radius: 99px; padding: 8px 16px; background: var(--sh-accent); }
.sh.idle .sh-top, .sh.idle .sh-side, .sh.idle .sh-bottom { opacity: 0; pointer-events: none; }
.sh-big { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 2; display: grid; place-items: center; pointer-events: none; }
.sh-big i { width: 78px; height: 78px; border-radius: 50%; background: rgba(0,0,0,.5); position: relative;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sh-big i::after { content: ""; position: absolute; left: 31px; top: 24px; border: 15px solid transparent; border-left: 24px solid #fff; border-right: 0; }
.sh.playing .sh-big, .sh.blocked .sh-big { display: none; }
.sh-unmute { display: none; position: absolute; z-index: 3; left: 50%; top: 50%; transform: translate(-50%, -50%);
  align-items: center; gap: 8px; border: 0; border-radius: 99px; padding: 12px 20px; font: inherit; font-weight: 600;
  color: #fff; background: rgba(0,0,0,.62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sh-unmute::before { content: "🔇"; font-size: 18px; }
.sh.muted.playing .sh-unmute { display: inline-flex; }
.sh-stage { position: relative; }
.sh-msg { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 4; display: grid; place-items: center; text-align: center; padding: 28px; background: rgba(0,0,0,.8); }
.sh-msg[hidden] { display: none; }
.sh-msg h2 { margin: 0 0 6px; font-size: 20px; }
.sh-msg p { margin: 0 0 18px; color: #d2ccde; }
.sh-shade { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 5; background: rgba(0,0,0,.5); opacity: 0; pointer-events: none; transition: opacity .28s; }
.sh-sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; max-height: 66vh; max-height: 66dvh; overflow: auto; background: #17131f;
  border-radius: 20px 20px 0 0; padding: 18px 16px calc(20px + env(safe-area-inset-bottom)); transform: translateY(105%); transition: transform .28s; }
.sh.sheet .sh-shade { opacity: 1; pointer-events: auto; }
.sh.sheet .sh-sheet { transform: none; }
.sh-sheet h2 { margin: 0 0 8px; font-size: 17px; }
.sh-sheet h2 small { font-size: 13px; font-weight: 500; color: #9d95ad; margin-left: 6px; }
.sh-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.sh-tags span, .sh-tags b { font-size: 11.5px; padding: 3px 9px; border-radius: 99px; background: rgba(255,255,255,.1); color: #e2dcec; font-weight: 500; }
.sh-tags b { background: var(--sh-accent); color: #14101c; font-weight: 800; }
.sh-syn { margin: 0 0 14px; color: #cfc8dc; font-size: 13.5px; white-space: pre-line; }
.sh-eps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.sh-eps a { display: flex; align-items: center; justify-content: center; height: 46px; border-radius: 10px; color: #fff; text-decoration: none;
  font-weight: 700; font-size: 15px; background: #221c2e; border: 1px solid #322a42; }
.sh-eps a.seen { color: #8f879f; }
.sh-eps a.cur { color: var(--sh-accent); border-color: var(--sh-accent); }

/* ---------- 横屏（电视剧）：播放器在上，简介和选集在下，页面可以滚动 ---------- */
.sh-wide { max-width: 980px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; background: #0c0a12; }
.sh-wide .sh-top { padding: calc(10px + env(safe-area-inset-top)) 12px 10px; }
.sh-wide .sh-round { background: rgba(255,255,255,.1); }
.sh-wide .sh-stage { position: sticky; top: 0; z-index: 3; aspect-ratio: 16 / 9; background: #000; max-height: 72vh; max-height: 72dvh; width: 100%; }
.sh-info { padding: 14px 16px calc(28px + env(safe-area-inset-bottom)); }
.sh-info .sh-row { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 16px; }
.sh-info h2 { margin: 0 0 8px; font-size: 19px; }
.sh-info h2 small { font-size: 13px; font-weight: 500; color: #9d95ad; margin-left: 6px; }
.sh-info h3 { margin: 18px 0 10px; font-size: 15px; }
.sh-wide .sh-eps { grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); }

/* ---------- 短剧 App 版式（[home] style = "feed"）：右侧按钮、左下信息、选集条、分段选集、片尾倒数。共用部件在 app.css ---------- */
.sh-app .sh-side { display: none; }
.sh-app .ap-side { bottom: calc(150px + env(safe-area-inset-bottom)); transition: opacity .25s; }
.sh-app .ap-info { bottom: calc(108px + env(safe-area-inset-bottom)); transition: opacity .25s; }
.sh-app .ap-info h2 span { font-weight: 700; }
.sh-app .sh-bottom { padding: 0 0 calc(10px + env(safe-area-inset-bottom)); background: none; }
.sh-app .sh-prog { margin: 0 14px; height: 18px; }
.sh-app .sh-prog div { height: 2px; background: rgba(255,255,255,.22); }
.sh-app .sh-prog i { background: #fff; }
.sh-app .sh-row { position: absolute; right: 14px; bottom: calc(66px + env(safe-area-inset-bottom)); font-size: 11px; color: rgba(255,255,255,.7); }
.sh-app .ap-bar { position: relative; left: auto; right: auto; width: calc(100% - 20px); margin: 4px 10px 0; }
.sh.idle .ap-side, .sh.idle .ap-info { opacity: 0; pointer-events: none; }
.sh-app .sh-top { padding-bottom: 40px; }
.sh-app .sh-round { background: none; font-size: 32px; }
.sh-app .sh-sheet { max-height: 76vh; max-height: 76dvh; background: #141414; border-radius: 14px 14px 0 0; }
.sh-sheet-head { display: flex; gap: 12px; margin-bottom: 10px; }
.sh-sheet-head .ap-cover { width: 54px; height: 76px; border: 0; border-radius: 6px; flex: none; }
.sh-sheet-head h2 { margin: 0; font-size: 16px; }
.sh-sheet-head p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted, #a3a3a3); }
.sh-app .sh-syn { margin: 0; font-size: 13px; color: var(--muted, #a3a3a3); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sh-app .sh-syn.open { display: block; -webkit-line-clamp: unset; }
/* 选集面板兼做详情：追剧按钮、题材 / 标签、简介展开、“继续看 / 从第 1 集开始” */
.sh-sheet-head { align-items: flex-start; }
.sh-follow { margin-left: auto; flex: none; align-self: center; display: flex; align-items: center; gap: 4px; padding: 7px 13px; border: 0;
  border-radius: 99px; background: var(--sh-accent); color: #fff; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.sh-follow.on { background: var(--surface-3, #262626); color: var(--muted, #a3a3a3); }
.sh-dtags { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 10px; }
.sh-dtags i { font-style: normal; font-size: 12px; padding: 2px 9px; border-radius: 4px; background: var(--surface-2, #1a1a1a); color: var(--ink, #f2f2f2); }
.sh-synbox { margin-bottom: 14px; }
.sh-synbox button { margin-top: 2px; padding: 0; border: 0; background: none; color: var(--ink, #f2f2f2); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.sh-synbox button[hidden] { display: none; }
.sh-go { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 46px; margin: 0 0 16px; border: 0;
  border-radius: 8px; background: #fff; color: #000; font: inherit; font-size: 15px; font-weight: 800; cursor: pointer; }
.sh-segs { display: flex; gap: 22px; margin: 4px 0 14px; border-bottom: 1px solid rgba(255,255,255,.08); overflow-x: auto; scrollbar-width: none; }
.sh-segs button { flex: none; padding: 0 0 9px; border: 0; background: none; color: var(--faint, #6e6e6e); font: inherit; font-size: 14px; cursor: pointer; }
.sh-segs button.on { color: var(--ink, #f2f2f2); font-weight: 700; box-shadow: inset 0 -2px 0 var(--ink, #f2f2f2); }
.sh-app .sh-eps { grid-template-columns: repeat(6, 1fr); }
.sh-app .sh-eps a { position: relative; height: 46px; border: 0; border-radius: 6px; background: var(--surface-2, #1a1a1a); font-weight: 500; }
.sh-app .sh-eps a[hidden] { display: none; }
.sh-app .sh-eps a.seen { color: var(--faint, #6e6e6e); }
.sh-app .sh-eps a.cur { color: var(--sh-accent); font-weight: 700; outline: 1.5px solid var(--sh-accent); outline-offset: -1.5px;
  background: transparent;
  background: color-mix(in srgb, var(--sh-accent) 14%, transparent); }
.sh-eps a i { position: absolute; bottom: 5px; left: 50%; display: flex; gap: 2px; align-items: flex-end; height: 8px; transform: translateX(-50%); }
.sh-eps a i b { width: 2px; background: var(--sh-accent); animation: sh-eq .9s ease-in-out infinite alternate; }
.sh-eps a i b:nth-child(2) { animation-delay: -.3s; }
.sh-eps a i b:nth-child(3) { animation-delay: -.6s; }
@keyframes sh-eq { from { height: 2px; } to { height: 8px; } }
.sh-count { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 7; display: grid; place-items: center; background: rgba(0,0,0,.5); }
.sh-count[hidden] { display: none; }
.sh-count > div { position: relative; width: 260px; padding: 20px 18px 16px; border-radius: 12px; background: rgba(20,20,20,.94); text-align: center; }
.sh-count svg { width: 64px; height: 64px; transform: rotate(-90deg); fill: none; stroke-width: 4; }
.sh-count circle:first-child { stroke: #333; }
.sh-count #sh-ring { stroke: #fff; stroke-linecap: round; stroke-dasharray: 176; transition: stroke-dashoffset 1s linear; }
.sh-count b { position: absolute; left: 0; right: 0; top: 20px; height: 64px; display: grid; place-items: center; font-size: 24px; }
.sh-count h3 { margin: 10px 0 0; font-size: 15px; }
.sh-count p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted, #a3a3a3); }
.sh-count-btns { display: flex; gap: 8px; margin-top: 16px; }
.sh-count-btns button { flex: 1; padding: 9px 0; border: 0; border-radius: 6px; font: inherit; font-size: 14px; font-weight: 700; color: #fff;
  background: var(--surface-3, #262626); cursor: pointer; }
.sh-count-btns .go { background: #fff; color: #000; }

/* App 版式：预加载的下一集藏在后面；整部剧看完时的相似推荐 */
.sh-ahead { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.sh-more { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0 4px; text-align: left; }
.sh-more a { position: relative; display: block; color: #fff; text-decoration: none; font-size: 12.5px; }
.sh-more img { display: block; width: 100%; aspect-ratio: var(--poster-ar, 2 / 3); object-fit: cover; border-radius: 6px; margin-bottom: 6px; background: #222; }
.sh-more span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sh-more b { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%;
  background: var(--sh-accent); font-size: 13px; }
.sh-app .sh-msg .sh-count-btns { display: flex; gap: 8px; margin-top: 14px; }
.sh-app .sh-msg .sh-count-btns a { flex: 1; padding: 10px 0; border-radius: 6px; background: var(--surface-3, #262626); color: #fff; font-weight: 700;
  text-decoration: none; text-align: center; }
.sh-app .sh-msg .sh-count-btns a.go { background: #fff; color: #000; }
.sh-app .sh-msg { z-index: 8; background: rgba(0,0,0,.88); }

/* 剧集页：其他叫法（又名）、单集页的这一集介绍（片方给了单集简介时） */
.sh-aka { margin: 3px 0 0; font-size: 12px; color: var(--faint, #6e6e6e); line-height: 1.4; }
.sh-aka span { color: var(--muted, #a3a3a3); }
.sh-epabout { margin: 0 0 12px; padding: 10px 12px; border-radius: 8px; background: var(--surface-2, #1a1a1a); }
.sh-epabout h2 { margin: 0 0 4px; font-size: 14px; }
.sh-epabout p { margin: 0; font-size: 13px; color: var(--muted, #a3a3a3); white-space: pre-line; }
