/* 短剧 App 版式（站点配置 [home] style = "feed"）共用的部件：底部四格导航、右侧按钮列、左下剧情信息、“看全集 / 选集”条。
   推荐流首页、剧场、追剧、分集播放页都加载这个文件。主色跟 [brand] accent 走；配色变量同皮肤（--ink --muted --faint …）。 */
:root { --ap-accent: var(--accent, #ff3b6b); --ap-ink: var(--ink, #f2f2f2); --ap-mute: var(--muted, #a3a3a3);
  --ap-faint: var(--faint, #6e6e6e); --ap-line: rgba(255, 255, 255, .08); --ap-s2: var(--surface-2, #1a1a1a); --ap-s3: var(--surface-3, #262626); }

/* 底部导航：首页 / 剧场 / 追剧 / 我的 */
.ap-nav { position: fixed; left: 50%; bottom: 0; z-index: 20; transform: translateX(-50%); width: 100%; max-width: 520px;
  display: grid; grid-template-columns: repeat(4, 1fr); padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  background: #000; border-top: 1px solid var(--ap-line); }
.ap-nav.is-clear { background: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,.85) 45%); border-top: 0; }
.ap-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--ap-faint); font-size: 10.5px;
  font-weight: 500; text-decoration: none; }
.ap-nav a.on { color: var(--ap-ink); }
.ap-h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* 右侧按钮列：封面、追剧、点赞、分享、选集 */
.ap-side { position: absolute; right: 8px; z-index: 5; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.ap-side > button, .ap-side > a { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 48px; padding: 0;
  border: 0; background: none; color: #fff; font: inherit; font-size: 11.5px; font-weight: 500; text-decoration: none; cursor: pointer;
  text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.ap-side > button span, .ap-side > a span { max-width: 62px; text-align: center; line-height: 1.2; overflow-wrap: anywhere; }
.ap-side svg { filter: drop-shadow(0 1px 4px rgba(0,0,0,.45)); transition: transform .15s; }
.ap-side button:active svg { transform: scale(.88); }
.ap-side [data-act="follow"].on svg, .ap-side [data-act="like"].on svg, .ap-side [data-speed].on svg { color: var(--ap-accent); }
@media (max-height: 720px) { .ap-side { gap: 10px; } .ap-side svg { width: 28px; height: 28px; } }
.ap-cover { display: block; width: 42px; height: 42px; border-radius: 8px; overflow: hidden; border: 1.5px solid #fff; background: #222; }
.ap-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 左下：剧名、简介、标签 */
.ap-info { position: absolute; left: 14px; right: 78px; z-index: 5; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.ap-info h2 { margin: 0 0 4px; font-size: 17px; font-weight: 700; line-height: 1.3; }
.ap-info h2 a { color: inherit; text-decoration: none; }
.ap-info h2 svg { vertical-align: -2px; opacity: .75; }
.ap-info p { margin: 0; font-size: 13.5px; line-height: 1.5; color: rgba(255,255,255,.86);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ap-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ap-tags i { display: inline-flex; align-items: center; gap: 3px; font-style: normal; font-size: 11.5px; padding: 1px 7px; border-radius: 4px;
  background: rgba(255,255,255,.14); text-shadow: none; }
.ap-tags i.hot { color: #fff; background: rgba(255,59,107,.28); }

/* 进度条（按住能拖：变粗、出现圆点和时间）+ “看全集 / 选集”条。.ap-prog 推荐流，.sh-prog 分集播放页 */
.ap-prog { position: absolute; left: 8px; right: 8px; z-index: 6; height: 24px; display: flex; align-items: center; padding: 0 6px;
  cursor: pointer; touch-action: none; }
.ap-prog > div { position: relative; flex: 1; height: 2px; border-radius: 3px; background: rgba(255,255,255,.22); transition: height .15s; }
.ap-prog i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: inherit; background: #fff; }
.sh-app .sh-prog { position: relative; }
.sh-app .sh-prog div { transition: height .15s; }
.ap-prog i::after, .sh-app .sh-prog i::after { content: ""; position: absolute; right: -7px; top: 50%; width: 14px; height: 14px; margin-top: -7px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); opacity: 0; transform: scale(.4); transition: opacity .15s, transform .15s; }
.ap-prog.dragging > div, .sh-app .sh-prog.dragging div { height: 6px; }
.ap-prog.dragging i::after, .sh-app .sh-prog.dragging i::after { opacity: 1; transform: none; }
.ap-scrub-tip { position: absolute; left: 50%; bottom: 46px; transform: translateX(-50%); padding: 6px 14px; border-radius: 8px;
  background: rgba(0,0,0,.55); color: #fff; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .15s; }
.dragging .ap-scrub-tip { opacity: 1; }
/* 拖进度时把剧情信息和右侧按钮淡出，看清画面 */
.fd-item:has(.dragging) .ap-info, .fd-item:has(.dragging) .ap-side,
.sh-app:has(.sh-prog.dragging) .ap-info, .sh-app:has(.sh-prog.dragging) .ap-side { opacity: 0; transition: opacity .2s; }
.ap-bar { position: absolute; left: 10px; right: 10px; z-index: 5; display: flex; align-items: center; gap: 7px; height: 42px;
  padding: 0 12px; border: 0; border-radius: 8px; background: rgba(38,38,38,.92); color: #fff; font: inherit; font-size: 13.5px;
  text-decoration: none; cursor: pointer; }
.ap-bar b { font-weight: 700; }
.ap-bar span { color: var(--ap-mute); }
.ap-bar em { margin-left: auto; display: flex; align-items: center; font-style: normal; color: var(--ap-mute); }

.ap-unmute { position: fixed; left: 50%; top: 42%; z-index: 9; transform: translateX(-50%); border: 0; border-radius: 99px;
  padding: 10px 18px; font: inherit; font-size: 14px; font-weight: 600; color: #fff; background: rgba(0,0,0,.62); cursor: pointer; }
.ap-unmute[hidden] { display: none; }
.ap-toast { position: fixed; left: 50%; bottom: 120px; z-index: 30; transform: translate(-50%, 10px); padding: 9px 16px; border-radius: 8px;
  background: rgba(30,30,30,.95); color: #fff; font-size: 13.5px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.ap-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* 会员：选集里的小锁、付费面板（分集播放页）、会员页 /membership */
.sh-eps a.lock::after { content: ""; position: absolute; top: 4px; right: 4px; width: 11px; height: 11px; background: currentColor; opacity: .55;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10V7a5 5 0 0 1 10 0v3h1a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V11a1 1 0 0 1 1-1h1zm2 0h6V7a3 3 0 0 0-6 0v3z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10V7a5 5 0 0 1 10 0v3h1a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V11a1 1 0 0 1 1-1h1zm2 0h6V7a3 3 0 0 0-6 0v3z'/%3E%3C/svg%3E") center / contain no-repeat; }
.ap-payshade { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 8; background: rgba(0,0,0,.5); opacity: 0; pointer-events: none; transition: opacity .25s; }
.ap-pay { position: absolute; left: 0; right: 0; bottom: 0; z-index: 9; padding: 20px 16px calc(24px + env(safe-area-inset-bottom));
  border-radius: 14px 14px 0 0; background: #141414; color: var(--ap-ink); transform: translateY(105%); transition: transform .28s; }
.sh.pay .ap-payshade { opacity: 1; pointer-events: auto; }
.sh.pay .ap-pay { transform: none; }
.ap-pay h2, .mb h2 { margin: 0; font-size: 18px; font-weight: 700; }
.ap-pay > p { margin: 4px 0 0; font-size: 13px; color: var(--ap-mute); }
.ap-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-top: 16px; }
.ap-plans button { padding: 14px 12px; border: 0; border-radius: 10px; background: var(--ap-s2); color: var(--ap-ink); font: inherit; text-align: left; cursor: pointer; }
.ap-plans button.on { outline: 1.5px solid var(--ap-accent); outline-offset: -1.5px;
  background: var(--ap-s2);
  background: color-mix(in srgb, var(--ap-accent) 9%, var(--ap-s2)); }
.ap-plans small { display: block; font-size: 12px; color: var(--ap-mute); }
.ap-plans b { display: block; margin-top: 4px; font-size: 22px; font-weight: 900; }
.ap-plans em { margin-left: 3px; font-style: normal; font-size: 12px; font-weight: 700; color: var(--ap-mute); }
.ap-perks { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 9px; font-size: 13.5px; }
.ap-perks li { display: flex; gap: 8px; align-items: center; }
.ap-perks li::before { content: ""; flex: none; width: 12px; height: 7px; margin: 0 2px 4px; border: solid var(--ap-accent); border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.ap-paygo { display: block; margin-top: 20px; padding: 13px 0; border: 0; border-radius: 8px; background: var(--ap-accent); color: #fff; text-align: center;
  font: inherit; font-size: 16px; font-weight: 700; text-decoration: none; cursor: pointer; width: 100%; }
.ap-paygo[disabled] { opacity: .5; }
.ap-payhint { margin: 10px 0 0; text-align: center; font-size: 11.5px; color: var(--ap-faint); }
.ap-paygo[hidden], .mb-buy[hidden], .mb-login[hidden], .mb-code[hidden] { display: none; }

/* 手势：双击冒出的爱心、按住 2 倍速的提示、跳过片头的提示 */
.ap-heart { position: absolute; z-index: 9; width: 96px; height: 96px; margin: -48px 0 0 -48px; pointer-events: none; color: var(--ap-accent);
  transform: rotate(var(--tilt, 0deg)); animation: ap-heart .9s ease-out forwards; }
.ap-heart::before { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7.5-4.6-9.5-9.3C1.2 8.4 3.3 5 6.8 5c2 0 3.6 1.1 5.2 3 1.6-1.9 3.2-3 5.2-3 3.5 0 5.6 3.4 4.3 6.7C19.5 16.4 12 21 12 21z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7.5-4.6-9.5-9.3C1.2 8.4 3.3 5 6.8 5c2 0 3.6 1.1 5.2 3 1.6-1.9 3.2-3 5.2-3 3.5 0 5.6 3.4 4.3 6.7C19.5 16.4 12 21 12 21z'/%3E%3C/svg%3E") center / contain no-repeat;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.35)); }
@keyframes ap-heart { 0% { opacity: 0; transform: rotate(var(--tilt)) scale(.4); } 15% { opacity: 1; transform: rotate(var(--tilt)) scale(1.15); }
  30% { transform: rotate(var(--tilt)) scale(1); } 100% { opacity: 0; transform: rotate(var(--tilt)) translateY(-90px) scale(1.25); } }
.ap-badge { position: absolute; left: 50%; top: calc(70px + env(safe-area-inset-top)); z-index: 9; transform: translateX(-50%); padding: 6px 14px; border-radius: 99px;
  background: rgba(0,0,0,.6); color: #fff; font-size: 13px; font-weight: 600; pointer-events: none; white-space: nowrap; }
.ap-badge[hidden] { display: none; }
.ap-side .fd-nope svg { width: 28px; height: 28px; opacity: .85; }

/* 倍速面板（底部弹出，选一次全站记住） */
.ap-speed-shade { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 40; background: rgba(0,0,0,.5); opacity: 0; pointer-events: none; transition: opacity .2s; }
.ap-speed-shade.on { opacity: 1; pointer-events: auto; }
.ap-speed { position: absolute; left: 50%; bottom: 0; width: 100%; max-width: 520px; transform: translate(-50%, 105%); transition: transform .25s;
  padding: 18px 16px calc(22px + env(safe-area-inset-bottom)); border-radius: 14px 14px 0 0; background: #141414; color: var(--ap-ink); }
.ap-speed-shade.on .ap-speed { transform: translate(-50%, 0); }
.ap-speed h3 { margin: 0 0 14px; font-size: 16px; font-weight: 700; }
.ap-speed div { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.ap-speed button { height: 44px; border: 0; border-radius: 8px; background: var(--ap-s2); color: var(--ap-ink); font: inherit; font-size: 15px;
  font-weight: 600; cursor: pointer; }
.ap-speed button.on { outline: 1.5px solid var(--ap-accent); outline-offset: -1.5px; color: var(--ap-accent);
  background: var(--ap-s2);
  background: color-mix(in srgb, var(--ap-accent) 12%, var(--ap-s2)); }

/* 推荐流：一集看完倒数 3 秒接下一集（和分集播放页的倒数一样） */
.ap-count { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 22; display: grid; place-items: center; background: rgba(0,0,0,.5); }
.ap-count[hidden] { display: none; }
.ap-count > div { position: relative; width: 260px; padding: 20px 18px 16px; border-radius: 12px; background: rgba(20,20,20,.94); text-align: center; }
.ap-count svg { width: 64px; height: 64px; transform: rotate(-90deg); fill: none; stroke-width: 4; }
.ap-count circle:first-child { stroke: #333; }
.ap-count circle + circle { stroke: #fff; stroke-linecap: round; stroke-dasharray: 176; transition: stroke-dashoffset 1s linear; }
.ap-count b { position: absolute; left: 0; right: 0; top: 20px; height: 64px; display: grid; place-items: center; font-size: 24px; }
.ap-count h3 { margin: 10px 0 0; font-size: 15px; }
.ap-count p { margin: 2px 0 0; font-size: 12.5px; color: var(--ap-mute); }
.ap-count-btns { display: flex; gap: 8px; margin-top: 16px; }
.ap-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(--ap-s3); cursor: pointer; }
.ap-count-btns .go { background: #fff; color: #000; }

/* 语言切换（右上角）：<details> 展开一列语言，链接到这一页的其他语言版本 */
.ap-lang { position: relative; z-index: 15; flex: none; }
.ap-lang summary { list-style: none; display: flex; align-items: center; gap: 4px; height: 30px; padding: 0 10px; border-radius: 99px;
  background: rgba(255,255,255,.12); color: #fff; font-size: 12.5px; font-weight: 700; cursor: pointer; user-select: none; }
.ap-lang summary::-webkit-details-marker { display: none; }
.ap-lang > div { position: absolute; top: calc(100% + 6px); right: 0; display: grid; min-width: 160px; padding: 6px; border-radius: 10px;
  background: #1c1c1c; box-shadow: 0 8px 28px rgba(0,0,0,.5); }
.ap-lang a { padding: 10px 12px; border-radius: 6px; color: #fff; font-size: 14px; text-decoration: none; white-space: nowrap; }
.ap-lang a:hover { background: rgba(255,255,255,.07); }
.ap-lang a[aria-current] { color: var(--accent, #ff3b6b); font-weight: 700; }
