/* ==========================================================================
   阅界影视 · RealmRead Web
   设计令牌与基础样式，与设计稿（浅/深、1240 栅格）一一对应
   ========================================================================== */

:root{
  --bg:#ffffff;
  --bg-alt:#f5f5f7;
  --bg-sunken:#fafafc;
  --card:#ffffff;
  --card-strong:#1c1c1e;
  --text:#1d1d1f;
  --text-2:#6e6e73;
  --text-3:#86868b;
  --line:#ebebef;
  --line-strong:#d2d2d7;
  --accent:#0071e3;
  --accent-text:#ffffff;
  --danger:#d70015;
  --shadow-1:0 1px 2px rgba(0,0,0,.04),0 8px 24px rgba(0,0,0,.06);
  --shadow-2:0 12px 48px rgba(0,0,0,.16);
  --r-sm:9px; --r-md:12px; --r-lg:16px; --r-xl:20px; --r-pill:999px;
  --head-h:64px;
  --content-max:1440px;
  --pad:100px;
  --scrim:rgba(0,0,0,.52);
  color-scheme:light;
}
@media (max-width:1240px){ :root{ --pad:32px; } }
@media (max-width:720px){ :root{ --pad:18px; --head-h:52px; } }

html[data-theme="dark"]{
  --bg:#000000;
  --bg-alt:#1c1c1e;
  --bg-sunken:#0a0a0b;
  --card:#1c1c1e;
  --card-strong:#2c2c2e;
  --text:#f5f5f7;
  --text-2:#a1a1a6;
  --text-3:#86868b;
  --line:#242426;
  --line-strong:#3a3a3c;
  --accent:#0a84ff;
  --danger:#ff453a;
  --shadow-1:0 1px 2px rgba(0,0,0,.5),0 8px 24px rgba(0,0,0,.4);
  --shadow-2:0 16px 56px rgba(0,0,0,.7);
  color-scheme:dark;
}
@media (prefers-color-scheme:dark){
  html[data-theme="auto"]{
    --bg:#000000; --bg-alt:#1c1c1e; --bg-sunken:#0a0a0b; --card:#1c1c1e; --card-strong:#2c2c2e;
    --text:#f5f5f7; --text-2:#a1a1a6; --text-3:#86868b; --line:#242426; --line-strong:#3a3a3c;
    --accent:#0a84ff; --danger:#ff453a;
    --shadow-1:0 1px 2px rgba(0,0,0,.5),0 8px 24px rgba(0,0,0,.4);
    --shadow-2:0 16px 56px rgba(0,0,0,.7);
    color-scheme:dark;
  }
}

*,*::before,*::after{ box-sizing:border-box; }
html,body{ margin:0; padding:0; }
html{ -webkit-text-size-adjust:100%; }
body{
  background:var(--bg);
  color:var(--text);
  font-family:"SF Pro Text",-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Noto Sans SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  font-size:14px; line-height:1.5;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  min-height:100vh;
  /* 用 flex 把 footer 顶到底。
     原来靠 .outlet 的 min-height:calc(100vh - 顶栏 - 200px) 硬算，那个 200 是估的页脚高度，
     实际一不符（报错页、空状态页内容极少）页脚就浮到屏幕中间，看着像布局坏了。 */
  display:flex;
  flex-direction:column;
}
img{ display:block; max-width:100%; }
a{ color:inherit; text-decoration:none; }
button{ font:inherit; color:inherit; border:0; background:none; cursor:pointer; }
input,select{ font:inherit; color:inherit; }
h1,h2,h3,h4{ margin:0; font-weight:600; letter-spacing:-.3px; }
p{ margin:0; }
::selection{ background:color-mix(in srgb,var(--accent) 26%,transparent); }
:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; border-radius:6px; }

.skip{ position:absolute; left:-9999px; }
.skip:focus{ left:12px; top:12px; z-index:99; background:var(--card); padding:8px 14px; border-radius:10px; }

/* ---------- 布局骨架 ---------- */
.container{ width:100%; max-width:var(--content-max); margin:0 auto; padding-left:var(--pad); padding-right:var(--pad); }
.outlet{ flex:1 0 auto; min-height:0; padding-bottom:72px; }
.section{ padding-top:44px; }
/* 广告下线后 adSlot() 返回空串，外面那句 <section class="section"> 就空了 ——
   .section 自带 44px 上边距，不收掉会在版面里留一条看不见的缝。 */
section.section:empty{ display:none; }
.section-head{ display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:18px; }
.section-title{ font-size:20px; font-weight:600; letter-spacing:-.4px; display:flex; align-items:baseline; gap:10px; }
.section-title small{ font-size:13px; font-weight:400; color:var(--text-3); letter-spacing:0; }
.section-more{ font-size:13px; color:var(--accent); white-space:nowrap; }
.muted{ color:var(--text-2); }
.tiny{ font-size:12px; color:var(--text-3); }

/* ---------- 顶栏 ---------- */
.site-head{
  position:sticky; top:0; z-index:40; height:var(--head-h);
  background:color-mix(in srgb,var(--bg) 86%,transparent);
  -webkit-backdrop-filter:saturate(180%) blur(20px);
  backdrop-filter:saturate(180%) blur(20px);
  border-bottom:1px solid var(--line);
}
.head-inner{ height:100%; display:flex; align-items:center; gap:28px; }
.brand{ display:flex; align-items:center; gap:10px; font-weight:600; font-size:15px; letter-spacing:-.2px; flex:0 0 auto; }
.brand-mark{ width:24px; height:24px; border-radius:7px; object-fit:cover; display:block; border:1px solid var(--line); }
.nav{ display:flex; align-items:center; gap:26px; flex:0 0 auto; }
.nav a{ font-size:13px; color:var(--text-2); padding:6px 0; transition:color .18s; }
.nav a:hover{ color:var(--text); }
.nav a.on{ color:var(--text); font-weight:600; }
.head-right{ margin-left:auto; display:flex; align-items:center; gap:14px; }
.search-mini{ display:flex; align-items:center; gap:8px; height:36px; padding:0 14px; border-radius:var(--r-pill); background:var(--bg-alt); min-width:210px; }
.search-mini input{ border:0; background:none; outline:none; width:100%; font-size:13px; }
.search-mini svg{ flex:0 0 auto; color:var(--text-3); }
.icon-btn{ width:36px; height:36px; border-radius:50%; display:grid; place-items:center; color:var(--text); transition:background .18s; }
.icon-btn:hover{ background:var(--bg-alt); }
.pill{ display:inline-flex; align-items:center; justify-content:center; gap:8px; height:36px; padding:0 18px; border-radius:var(--r-pill); font-size:13px; font-weight:500; transition:transform .12s,background .18s,opacity .18s; white-space:nowrap; }
.pill:active{ transform:scale(.97); }
.pill-primary{ background:var(--accent); color:#fff; }
.pill-primary:hover{ filter:brightness(1.06); }
.pill-ghost{ background:var(--bg-alt); color:var(--text); }
.pill-ghost:hover{ background:color-mix(in srgb,var(--bg-alt) 80%,var(--text) 6%); }
.pill-line{ border:1px solid var(--line-strong); color:var(--text); }
.pill-line:hover{ background:var(--bg-alt); }
.pill-sm{ height:32px; padding:0 14px; font-size:12.5px; }

/* ---------- 页脚 ---------- */
/* margin-top:auto —— 内容少时把页脚压到视口底部；内容多时它退化成 0，
   由 .outlet 的 padding-bottom:72px 提供间距，所以两种情况下距离都正常。 */
.site-foot{ border-top:1px solid var(--line); margin-top:auto; padding:36px 0 64px; color:var(--text-3); font-size:12px; }
.foot-inner{ display:flex; flex-wrap:wrap; gap:18px 40px; align-items:center; justify-content:space-between; }
.foot-links{ display:flex; flex-wrap:wrap; gap:20px; }
.foot-links a:hover{ color:var(--text); }

/* ---------- 海报卡 ---------- */
.grid{ display:grid; gap:22px 20px; grid-template-columns:repeat(6,minmax(0,1fr)); }
@media (max-width:1100px){ .grid{ grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media (max-width:720px){ .grid{ grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px 12px; } }

.card{ display:block; min-width:0; }
.card-cover{
  position:relative; width:100%; aspect-ratio:2/3; border-radius:var(--r-md); overflow:hidden;
  background-color:var(--bg-alt);
  /* 加载中/加载失败的占位：直接铺影视默认封面，而不是一块灰色空白。
     .card-cover img 是 opacity:0 → is-loaded 才淡入，所以真封面没到之前，
     用户看到的就是这张默认图，不会出现「一屏卡片全是空框」。 */
  background-image:url(img/cover-video.png);
  background-size:cover; background-position:center;
  box-shadow:var(--shadow-1); transition:transform .22s cubic-bezier(.2,.7,.3,1),box-shadow .22s;
}
.card:hover .card-cover{ transform:translateY(-3px) scale(1.012); box-shadow:0 14px 32px rgba(0,0,0,.18); }
.card-cover img{ width:100%; height:100%; object-fit:cover; }
.card-cover .ph{ width:100%; height:100%; background:linear-gradient(140deg,#2a3b52,#0d1520 70%); }
/* 角标一律单行：源站的 remarks 可能是「更新至20261031期荣耀首播」这种长句，
   不限宽就会自己换行、往封面外顶。文案本身在 ui.js 的 shortBadge() 里已经压过一轮，
   这里只是兜底 —— 卡片更窄（手机 3 列）时靠省略号收尾。 */
.card-badge{
  position:absolute; left:8px; top:8px; z-index:2; padding:3px 8px; border-radius:7px;
  font-size:11px; font-weight:600; color:#fff; background:rgba(0,0,0,.62); backdrop-filter:blur(6px);
  max-width:calc(100% - 16px); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.card-badge.ep{ left:auto; right:8px; top:auto; bottom:8px; background:rgba(0,0,0,.55); font-weight:500; }
.card-score{ position:absolute; right:8px; top:8px; z-index:2; font-size:12px; font-weight:700; color:#ffd60a; text-shadow:0 1px 4px rgba(0,0,0,.6); }
.card-title{ margin-top:10px; font-size:14px; font-weight:500; line-height:1.35; display:-webkit-box; -webkit-line-clamp:1; -webkit-box-orient:vertical; overflow:hidden; }
.card-meta{ margin-top:4px; font-size:12px; color:var(--text-3); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.card-progress{ position:absolute; left:0; right:0; bottom:0; height:3px; background:rgba(0,0,0,.45); }
.card-progress i{ display:block; height:100%; background:var(--accent); }
.card-play{
  position:absolute; inset:0; display:grid; place-items:center; opacity:0; transition:opacity .2s;
  background:rgba(0,0,0,.28);
}
.card:hover .card-play{ opacity:1; }
/* 触屏没有真正的 hover：点一下之后 :hover 会一直「粘」在海报上，卡片永远浮着、
   遮一层播放按钮。用 html[data-touch] 关掉这些只对鼠标有意义的效果。 */
html[data-touch="1"] .card:hover .card-cover{ transform:none; box-shadow:var(--shadow-1); }
html[data-touch="1"] .card-play{ display:none; }
html[data-touch="1"] .guide-links a:hover{ transform:none; }
/* 白色圆盘上的三角必须显式给深色 —— 不能继承 color，
   否则深色模式下 --text 是近白色，白圆盘里画白三角，等于什么都没有。 */
.card-play span{ width:48px; height:48px; border-radius:50%; background:rgba(255,255,255,.92); color:#0b0f16; display:grid; place-items:center; }

/* ---------- 横向滚动行 ---------- */
.hrow{ display:flex; gap:20px; overflow-x:auto; scroll-snap-type:x proximity; padding-bottom:6px; scrollbar-width:none; }
.hrow::-webkit-scrollbar{ display:none; }
.hrow > *{ flex:0 0 clamp(140px,14.5vw,190px); scroll-snap-align:start; }

/* ---------- 首页 Hero ---------- */
.hero{
  position:relative; margin-top:20px; border-radius:var(--r-xl); overflow:hidden; min-height:420px;
  display:flex; align-items:flex-end; color:#fff; isolation:isolate;
  background:linear-gradient(140deg,#123049,#07121d 70%);
}
.hero-bg{ position:absolute; inset:0; z-index:-2; }
.hero-bg img{ width:100%; height:100%; object-fit:cover; opacity:.9; }
.hero-scrim{ position:absolute; inset:0; z-index:-1; background:linear-gradient(90deg,rgba(0,0,0,.82) 0%,rgba(0,0,0,.5) 45%,rgba(0,0,0,.15) 100%); }
.hero-inner{ padding:44px 48px; max-width:760px; }
.hero-tags{ display:flex; gap:8px; margin-bottom:14px; flex-wrap:wrap; }
.tag{ font-size:11.5px; padding:4px 10px; border-radius:var(--r-pill); background:rgba(255,255,255,.16); backdrop-filter:blur(8px); }
.hero h1{ font-size:44px; line-height:1.1; letter-spacing:-1.2px; margin-bottom:14px; }
.hero p{ color:rgba(255,255,255,.78); font-size:14px; line-height:1.65; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; margin-bottom:22px; }
.hero-actions{ display:flex; gap:12px; flex-wrap:wrap; }
.hero .pill-ghost{ background:rgba(255,255,255,.16); color:#fff; backdrop-filter:blur(10px); }
@media (max-width:720px){
  .hero{ min-height:360px; margin-top:14px; }
  .hero-inner{ padding:22px 20px; }
  .hero h1{ font-size:28px; letter-spacing:-.6px; }
  .hero p{ -webkit-line-clamp:3; font-size:13px; }
}

/* ---------- 首页主推轮播（MovieBannerView + SnapCarousel） ---------- */
.mhero{
  position:relative; margin-top:20px; border-radius:var(--r-xl); overflow:hidden;
  background:#080b11; color:#fff; isolation:isolate;
  display:flex; flex-direction:column; justify-content:flex-end; min-height:540px;
}
.mhero-bgs{ position:absolute; inset:0; z-index:0; }
.mhero-bgs img{
  position:absolute; inset:0; width:100%; height:100%; object-fit:cover;
  opacity:0; transform:scale(1.05); transition:opacity .7s ease, transform 8s linear;
}
.mhero-bgs img.on{ opacity:.56; transform:scale(1); }
.mhero-scrim{
  position:absolute; inset:0; z-index:1;
  background:
    linear-gradient(90deg,rgba(8,11,17,.88) 0%,rgba(8,11,17,.52) 44%,rgba(8,11,17,.08) 72%,rgba(8,11,17,0) 100%),
    linear-gradient(180deg,rgba(8,11,17,.3) 0%,rgba(8,11,17,.5) 38%,rgba(8,11,17,.88) 70%,#080b11 100%);
}
.mhero-body{ position:relative; z-index:2; padding-top:96px; }
.mhero-info{
  padding:0 clamp(20px, 3vw, 44px); max-width:720px;
  transition:opacity .18s ease;
}
.mhero-info h1{
  font-size:clamp(26px, 3.4vw, 44px); line-height:1.1; letter-spacing:-1.1px;
  margin-bottom:12px; color:#fff;
}
.mhero-info p{
  color:rgba(255,255,255,.76); font-size:14px; line-height:1.65; margin-bottom:20px;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.mhero .pill-ghost{ background:rgba(255,255,255,.16); color:#fff; backdrop-filter:blur(10px); }

/* 用 grid 的 grid-auto-columns 定死轨道宽，而不是 flex-basis：
   flex 的宽度一旦因为 var() 解析失败/被覆盖就会退化成「按内容撑开」，
   首张海报会突然变成图片原始宽度，看起来就是「第一张比别人大好几倍」。 */
.mhero-rail{
  display:grid; grid-auto-flow:column; grid-auto-columns:172px; align-items:start;
  column-gap:16px; overflow-x:auto; scroll-snap-type:x mandatory;
  padding:16px calc(50% - 86px);
  scrollbar-width:none; overscroll-behavior-x:contain; -webkit-overflow-scrolling:touch;
}
.mhero-rail::-webkit-scrollbar{ display:none; }
/* 尺寸一律不动：不做 scale、不做下沉、不加描边。
   当前卡只靠「更亮 + 投影稍重」区分，其余卡不位移、不缩放 ——
   任何几何差异（哪怕只有 2px 描边或 14px 下沉）都会让人读成「第一张比别人大」。 */
.mcard{
  width:172px; min-width:172px; max-width:172px;
  scroll-snap-align:center;
  display:flex; flex-direction:column; gap:8px; text-decoration:none;
  opacity:calc(1 - var(--d,0) * .3);
  transition:opacity .3s ease;
}
.mhero-rail.is-dragging .mcard{ transition:none; }
/* 程序化滚动期间关掉吸附，避免 mandatory snap 把光滑滚动拽回中途的吸附点 */
.mhero-rail.is-gliding{ scroll-snap-type:none; }
.mcard-poster{
  display:block; flex:0 0 auto; width:100%; aspect-ratio:3/4; border-radius:14px; overflow:hidden; background:#131a24;
  box-shadow:0 10px 24px rgba(0,0,0,.38);
  transition:box-shadow .3s ease;
}
.mcard.on .mcard-poster{ box-shadow:0 14px 32px rgba(0,0,0,.55); }
.mcard-poster img{ width:100%; height:100%; object-fit:cover; display:block; }
.mcard-t{
  font-size:12.5px; color:rgba(255,255,255,.78); text-align:center;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.mcard.on .mcard-t{ color:#fff; font-weight:600; }
.mhero-dots{ display:flex; gap:6px; justify-content:center; padding:2px 0 18px; }
.mhero-dots i{
  width:6px; height:6px; border-radius:50%; background:rgba(255,255,255,.26);
  transition:width .28s ease, background .28s ease; cursor:pointer;
}
.mhero-dots i.on{ width:20px; border-radius:3px; background:rgba(255,255,255,.92); }

/* ---- 桌面端左右切换箭头 ----
   只做「透明箭头」：默认不画底、不画框，只有一条带投影的白线，
   保证压在任何海报上都看得清，又不会在图上开两个洞。
   默认 .42 常显 —— 完全藏到悬停才出现，用户会以为「又没有箭头」；
   移到轮播上或箭头本身时提到 1，给出可点的反馈。 */
.mhero-stage{ position:relative; }
.mhero-nav{
  position:absolute; top:50%; z-index:3;
  width:44px; height:44px; margin-top:-22px;
  display:grid; place-items:center; color:#fff;
  border-radius:50%; border:0; background:transparent;
  /* 双层阴影：内层贴边压实，外层散开一圈暗雾。
     单靠 drop-shadow 在浅色海报（比如白色封面）上完全看不出白箭头，
     加一圈暗雾才能在亮底上也有对比，同时又不用给箭头加一块底色。 */
  filter:drop-shadow(0 1px 2px rgba(0,0,0,.85)) drop-shadow(0 0 10px rgba(0,0,0,.6));
  opacity:.5; transition:opacity .22s ease, background .18s ease, transform .18s ease;
  cursor:pointer;
}
.mhero:hover .mhero-nav,
.mhero-nav:hover,
.mhero-nav:focus-visible{ opacity:1; }
.mhero-nav:hover{ background:rgba(255,255,255,.14); }
.mhero-nav:active{ transform:scale(.94); }
.mhero-nav-prev{ left:6px; }
.mhero-nav-next{ right:6px; }
.mhero-nav[hidden]{ display:none; }
/* 键盘可达性：箭头是纯图标，焦点环不能省 */
.mhero-nav:focus-visible{ outline:2px solid rgba(255,255,255,.72); outline-offset:2px; }

@media (max-width:720px){
  .mhero{ min-height:432px; margin-top:14px; border-radius:18px; }
  .mhero-body{ padding-top:64px; }
  .mhero-rail{
    grid-auto-columns:124px; column-gap:12px;
    padding-top:12px;
    padding-left:calc(50% - 62px); padding-right:calc(50% - 62px);
  }
  .mcard{ width:124px; min-width:124px; max-width:124px; }
  .mhero-info p{ -webkit-line-clamp:3; font-size:13px; margin-bottom:16px; }
  .mhero-dots{ padding-bottom:14px; }
  /* 手机上直接手滑，箭头只会挡住海报 */
  .mhero-nav{ display:none; }
}
/* 触屏设备（含横屏 iPad）同样不需要：有 hover 才是「拖不动的桌面」 */
@media (hover:none){
  .mhero-nav{ display:none; }
}

/* ---------- 加载 / 空态 ---------- */
.skeleton{ background:var(--bg-alt); border-radius:var(--r-md); position:relative; overflow:hidden; }
.skeleton::after{ content:""; position:absolute; inset:0; transform:translateX(-100%); background:linear-gradient(90deg,transparent,rgba(255,255,255,.14),transparent); animation:sk 1.4s infinite; }
@keyframes sk{ to{ transform:translateX(100%); } }
.sk-card{ aspect-ratio:2/3; }
.empty{ display:flex; flex-direction:column; align-items:center; text-align:center; padding:64px 20px; gap:16px; }
.empty-ico{ width:64px; height:64px; border-radius:50%; background:var(--bg-alt); display:grid; place-items:center; color:var(--text-3); }
.empty h3{ font-size:22px; letter-spacing:-.4px; }
.empty p{ font-size:14px; color:var(--text-2); max-width:420px; }
.error-box{ display:flex; flex-direction:column; align-items:center; gap:14px; padding:56px 20px; text-align:center; }
.error-box h3{ font-size:20px; }
.error-box p{ color:var(--text-2); font-size:13.5px; max-width:420px; }

/* ---------- 影视库 ---------- */
.lib-wrap{ display:grid; grid-template-columns:200px minmax(0,1fr); gap:44px; padding-top:32px; }
/* 1fr 的隐含最小值是 min-content，源/分类一旦排成横向长条就会把整列顶爆，
   窄屏必须写成 minmax(0,1fr) 才真的能收到容器宽 */
.lib-wrap > div{ min-width:0; }
.lib-side{ position:sticky; top:calc(var(--head-h) + 20px); align-self:start; max-height:calc(100vh - var(--head-h) - 40px); min-width:0; }
.lib-side h4{ font-size:12px; color:var(--text-3); font-weight:600; letter-spacing:.06em; margin:0 0 10px; text-transform:uppercase; }
.lib-side ul{ list-style:none; margin:0 0 24px; padding:0; display:flex; flex-direction:column; gap:2px; }
/* 源/分类都是几十项，固定高度内部滚动，别把整页拉长 */
#lib-sources{ max-height:min(46vh,520px); overflow-y:auto; overscroll-behavior:contain; padding-right:4px; margin-bottom:20px; }
#lib-cats{ max-height:min(32vh,360px); overflow-y:auto; overscroll-behavior:contain; padding-right:4px; }
#lib-sources::-webkit-scrollbar,#lib-cats::-webkit-scrollbar{ width:6px; }
#lib-sources::-webkit-scrollbar-thumb,#lib-cats::-webkit-scrollbar-thumb{ background:var(--line); border-radius:3px; }
#lib-sources::-webkit-scrollbar-thumb:hover,#lib-cats::-webkit-scrollbar-thumb:hover{ background:var(--text-3); }
/* 堆叠档：手机 + 窄窗口 + 触屏平板（含 iPad 横屏 1024~1180）。
   平板主指针是 coarse，所以用媒体查询列表就能覆盖，不必去猜机型：
   1024 宽的笔记本仍是左右两栏（放得下），1024 宽的 iPad 走堆叠（手指点不了 200px 的窄栏）。
   注意别在下面写 overflow:visible —— #lib-sources 是 ID 选择器，优先级高于
   `.lib-side ul{overflow-x:auto}`，写 visible 会让 30 多个源横向撑爆整页
   （实测 390px 屏被撑到 3841px，海报卡跟着变成 1266px 宽）。 */
@media (max-width:900px), (max-width:1180px) and (pointer:coarse){
  .lib-wrap{ grid-template-columns:minmax(0,1fr); gap:0; }

  /* 搜索框排到源条前面。内容列的包裹层用 display:contents 拆开，它的子块
     就都成了 .lib-wrap 的网格项，靠 order 重排：
     标题 → 搜索 → 源/分类 → 筛选 → 海报。手机上先看见搜索框，不用滚过两排源。 */
  .lib-wrap > div{ display:contents; }
  .lib-wrap .section-head{ order:1; }
  .lib-wrap .lib-searchwrap{ order:2; }
  .lib-wrap .lib-side{ order:3; }
  .lib-wrap .filter-row{ order:4; }
  .lib-wrap #lib-grid{ order:5; }
  .lib-wrap #lib-ad{ order:6; }
  .lib-wrap #lib-pager{ order:7; }

  .lib-side{
    max-height:none;
    /* 堆叠档这块是「悬浮筛选条」：必须自己给实底。
       背景透明的话，下面滚动的海报会从字缝里透上来，看起来就是元素互相压在一起。 */
    top:var(--head-h);
    z-index:5;
    padding:10px 0 4px;
    margin:0 0 14px;
    background:var(--bg);
    border-bottom:1px solid var(--line);
    box-shadow:0 12px 20px -16px rgba(0,0,0,.55);
  }
  #lib-sources,#lib-cats{ max-height:none; overflow-x:auto; overflow-y:hidden; }
  /* 小标题去掉：悬浮条要占掉视口高度，两行标签白白吃掉 44px，而 chip 本身已能区分源和分类 */
  .lib-side h4{ display:none; }
  #lib-sources{ margin-bottom:4px; }
  .lib-side ul{ flex-direction:row; overflow-x:auto; gap:8px; margin-bottom:6px; padding-bottom:6px; scrollbar-width:none; }
  .lib-side ul::-webkit-scrollbar{ display:none; }
  .lib-wrap .filter-row{ margin-bottom:16px; }
}
.lib-side li button{ display:block; width:100%; text-align:left; padding:7px 12px; border-radius:9px; font-size:13.5px; color:var(--text-2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.lib-side li button:hover{ background:var(--bg-alt); color:var(--text); }
.lib-side li button.on{ background:var(--bg-alt); color:var(--text); font-weight:600; }
.filter-row{ display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin-bottom:22px; }
.chip{ height:32px; padding:0 14px; border-radius:var(--r-pill); background:var(--bg-alt); font-size:12.5px; display:inline-flex; align-items:center; gap:8px; }
.chip.on{ background:var(--text); color:var(--bg); }
.chip-x{ opacity:.6; }
/* ---------- 分页 ---------- */
.pager{ display:flex; justify-content:center; align-items:center; gap:10px; margin-top:36px; flex-wrap:wrap; }
.pager span{ font-size:13px; color:var(--text-3); }
/* 页码输入：影视库片单动辄两三千页（线上 2477 页），只有上一页/下一页等于没法翻。
   框做得窄、数字居中、和两边的胶囊同高，看起来是「一个整体」而不是表单。 */
.pg-jump{ display:inline-flex; align-items:center; gap:6px; font-size:13px; color:var(--text-3); white-space:nowrap; }
.pg-in{
  width:54px; height:32px; padding:0 4px; text-align:center;
  border-radius:9px; border:1px solid transparent; background:var(--bg-alt); color:var(--text);
  font-size:13px; font-weight:600; font-variant-numeric:tabular-nums;
  transition:border-color .16s, background .16s;
}
.pg-in:hover{ border-color:var(--line-strong); }
.pg-in:focus{ outline:none; border-color:var(--accent); background:transparent; }
.pg-in::selection{ background:color-mix(in srgb,var(--accent) 30%,transparent); }
/* 明确禁用的按钮不要还能点：原来只靠 inline style 压了个透明度，照样能点 */
.pager .pill[disabled]{ opacity:.4; pointer-events:none; }
@media (max-width:720px){
  .pager{ gap:8px; margin-top:28px; }
  .pg-in{ width:46px; height:30px; }
  .pg-all{ display:none; }   /* 手机上「共 N 页」让位给输入框，页数在筛选行已经有了 */
}
/* 广告位与相邻区块的间距；被关闭后留空壳也不占高度 */
#lib-ad{ margin-top:26px; }
#lib-ad:empty{ display:none; }
#pl-ad{ margin-top:22px; }
#pl-ad:empty{ display:none; }

/* ---------- 详情 ---------- */
.detail-hero{ position:relative; padding:40px 0 8px; }
/* 封面占住两行（1/3），这样按钮那一行不会因为「封面比正文高」被顶到很低的位置 */
.detail-grid{ display:grid; grid-template-columns:240px minmax(0,1fr); gap:18px 40px; align-items:start; }
.detail-cover-col{ grid-row:1 / 3; }
.detail-cover{ width:100%; aspect-ratio:2/3; border-radius:var(--r-lg); overflow:hidden; background-color:var(--bg-alt);
  background-image:url(img/cover-video.png); background-size:cover; background-position:center; box-shadow:var(--shadow-2); }
.detail-cover img{ width:100%; height:100%; object-fit:cover; }
.detail-info h1{ font-size:38px; letter-spacing:-1px; line-height:1.12; margin-bottom:14px; }
@media (max-width:820px){ .detail-info h1{ font-size:24px; letter-spacing:-.5px; } }
.detail-meta{ display:flex; flex-wrap:wrap; gap:8px 16px; font-size:13px; color:var(--text-2); margin-bottom:16px; }
.detail-meta b{ color:var(--text); font-weight:600; }
.detail-intro{ font-size:14px; line-height:1.7; color:var(--text-2); max-width:720px; margin-bottom:0; }
.detail-actions{ display:flex; gap:12px; flex-wrap:wrap; align-items:center; }
/* 按钮归到正文那一列（不跟封面列重叠）；窄屏改成整行，四个键排一行 */
.detail-hero .detail-actions{ grid-column:2; }
.detail-hero .detail-actions .btn-lg{ white-space:nowrap; }
@media (max-width:820px){
  .detail-grid{ grid-template-columns:132px minmax(0,1fr); gap:12px 18px; }
  .detail-cover-col{ grid-row:1; }
  .detail-hero .detail-actions{ grid-column:1 / -1; grid-row:2; gap:8px; flex-wrap:nowrap; }
  .detail-hero .detail-actions .btn-lg{
    flex:1 1 0; min-width:0; height:42px; padding:0 8px; font-size:13px;
    justify-content:center; overflow:hidden;
  }
  .detail-hero .detail-actions .btn-lg.primary{ flex:1.3 1 0; }
}
/* 再窄就先把图标舍掉，保住「一行放得下」这件事优先于图标 */
@media (max-width:400px){
  .detail-hero .detail-actions .btn-lg{ font-size:12.5px; padding:0 4px; gap:4px; }
  .detail-hero .detail-actions .btn-lg svg{ display:none; }
}
.btn-lg{ height:44px; padding:0 26px; border-radius:var(--r-pill); font-size:14px; font-weight:600; display:inline-flex; align-items:center; gap:8px; }
.btn-lg.primary{ background:var(--accent); color:#fff; }
.btn-lg.ghost{ background:var(--bg-alt); color:var(--text); }
.btn-lg.on{ background:var(--accent); color:#fff; }
.ep-section{ margin-top:44px; }
.ep-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; gap:16px; }
.ep-tabs{ display:flex; gap:8px; flex-wrap:wrap; }
.ep-item{
  padding:11px 8px; border-radius:10px; background:var(--bg-alt); font-size:13px; text-align:center;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; transition:background .16s,color .16s;
}
.ep-item:hover{ background:color-mix(in srgb,var(--bg-alt) 82%,var(--text) 8%); }
.ep-item.on{ background:var(--accent); color:#fff; font-weight:600; }

/* ---------- 选集：分组条 + 集号网格（epg.js 生成） ---------- */
.epg{ display:flex; flex-direction:column; gap:12px; }
.epg-bar{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
/* 组多到放不下时横向滚动，不要换行 —— 换行会把下面的集号网格顶下去一大截 */
.epg-groups{ display:flex; gap:6px; overflow-x:auto; flex:1 1 auto; min-width:0; padding-bottom:2px; scrollbar-width:none; }
.epg-groups::-webkit-scrollbar{ display:none; }
.epg-groups .chip{ flex:0 0 auto; height:30px; padding:0 13px; font-size:12.5px; }
.epg-sort{
  flex:0 0 auto; display:inline-flex; align-items:center; gap:5px; height:30px; padding:0 13px;
  border-radius:var(--r-pill); background:var(--bg-alt); color:var(--text-2); font-size:12.5px;
  transition:background .16s,color .16s;
}
.epg-sort:hover{ color:var(--text); background:color-mix(in srgb,var(--bg-alt) 82%,var(--text) 8%); }
.epg-total{ flex:1 1 auto; }
.epg-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(54px,1fr)); gap:8px; }
.epg-grid .ep-item{ padding:0; height:36px; display:flex; align-items:center; justify-content:center; font-variant-numeric:tabular-nums; }
.epg-empty{ color:var(--text-3); }

/* 播放页侧栏空间窄，格子小一点，并限制高度让右栏别无限长 */
.play-side .epg-grid{ grid-template-columns:repeat(auto-fill,minmax(46px,1fr)); gap:7px; max-height:360px; overflow:auto; }
.play-side .epg-groups{ flex-wrap:nowrap; }

@media (max-width:720px){
  .epg-grid{ grid-template-columns:repeat(auto-fill,minmax(48px,1fr)); }
}
.side-note{ margin-top:40px; border-top:1px solid var(--line); padding-top:22px; }

/* ---------- 播放页 ---------- */
.play-wrap{ background:#000; color:#fff; min-height:100vh; display:flex; flex-direction:column; }
/* 播放页自己的标题栏。
   沉浸模式下站点头整条是 display:none（见文件末尾 immersive 那条），播放页顶上就
   只剩一块黑，既不知道自己在哪，也没有返回入口 —— 播放器里的浮层放片时还会淡出。
   所以这里补一条**常驻**的：返回 / 片名·集名 / 显示模式。
   高度复用 --head-h，和其他页面顶上那条对齐；配色写死深色，因为播放页永远是黑底，
   跟着主题变反而会在浅色模式下出现一条白栏压在视频上边。
   sticky：往下看选集时它停在顶上，随时能回去。 */
.play-topbar{
  position:sticky; top:0; z-index:40; flex:none;
  height:var(--head-h); display:flex; align-items:center; gap:12px; padding:0 14px 0 12px;
  background:rgba(10,10,12,.92);
  -webkit-backdrop-filter:saturate(160%) blur(18px);
  backdrop-filter:saturate(160%) blur(18px);
  border-bottom:1px solid rgba(255,255,255,.08);
}
.ptb-back{ width:34px; height:34px; border-radius:50%; display:grid; place-items:center; color:#fff; flex:none; transition:background .16s; }
.ptb-back:hover{ background:rgba(255,255,255,.14); }
/* 片名是唯一可伸缩的一块：长片名吃满剩余宽度再用省略号收，
   而不是把右边的按钮挤出去（按钮一律 flex:none） */
.ptb-t{ font-size:14px; font-weight:600; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ptb-sp{ margin-left:auto; display:flex; align-items:center; gap:8px; flex:none; }
.ptb-theme{
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  height:32px; padding:0 12px; border-radius:var(--r-pill);
  color:#fff; font-size:12.5px; background:rgba(255,255,255,.10); transition:background .16s;
}
.ptb-theme:hover{ background:rgba(255,255,255,.20); }
.ptb-theme-ico{ display:grid; place-items:center; flex:none; }
@media (max-width:720px){
  /* 手机上把文字收掉，只留图标 —— 一行里片名要留够宽度 */
  .ptb-theme{ width:34px; height:34px; padding:0; background:none; }
  .ptb-theme-lbl{ display:none; }
  .ptb-theme:hover{ background:rgba(255,255,255,.16); }
}
/* 全屏（挂在 #outlet 上）和伪横屏时这条要收掉：画面必须顶满，不差这几十像素 */
#outlet:fullscreen .play-topbar,
#outlet:-webkit-full-screen .play-topbar,
body.pl-cinema .play-topbar{ display:none; }
/* 播放器按 16:9 等比，但高度最多占 76vh —— 否则宽屏上它会吃掉整屏，标题和选集全在折叠线以下 */
.player-shell{ position:relative; width:min(100%,calc(76vh * 16 / 9)); margin:0 auto; background:#000; aspect-ratio:16/9; flex:none;
  /* pan-y：竖向滑动交给页面滚动，横向滑动留给我们做拖动进度。
     不写的话手机上横滑会被浏览器当成滚动手势，进度条永远拖不动。 */
  touch-action:pan-y; user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; }
@media (max-width:720px){ .player-shell{ width:100%; aspect-ratio:auto; height:56vw; min-height:210px; } }
.player-shell video{ width:100%; height:100%; display:block; background:#000; }
.pl-top{ position:absolute; inset:0 0 auto 0; height:72px; display:flex; align-items:center; gap:14px; padding:0 18px;
  background:linear-gradient(180deg,rgba(0,0,0,.72),transparent); transition:opacity .25s; z-index:3; }
.pl-top .t{ font-size:14px; font-weight:500; }
.pl-top .sp{ margin-left:auto; display:flex; gap:10px; align-items:center; }
/* 浮层里的返回键和片名只在全屏/伪横屏时出现。
   非全屏时上面那条标题栏已经把「这是哪部片、怎么回去」说完了，
   浮层再来一份就是两个返回箭头、两个片名叠在画面左上角。
   全屏时标题栏整条收掉（见 .play-topbar 那段），浮层这份必须留着 —— 那是唯一的退出入口。
   「换源」两边都留：它不受导航影响，看片途中随时可能要点。 */
.pl-top > [data-act="back"], .pl-top .t{ display:none; }
#outlet:fullscreen .pl-top > [data-act="back"],
#outlet:-webkit-full-screen .pl-top > [data-act="back"],
.player-shell.pl-rot .pl-top > [data-act="back"]{ display:grid; }
#outlet:fullscreen .pl-top .t,
#outlet:-webkit-full-screen .pl-top .t,
.player-shell.pl-rot .pl-top .t{ display:inline; }
.pl-bottom{ position:absolute; inset:auto 0 0 0; padding:38px 18px 12px; z-index:3;
  background:linear-gradient(0deg,rgba(0,0,0,.9),rgba(0,0,0,.45) 60%,transparent); transition:opacity .25s; }
.pl-bar{ position:relative; height:18px; display:flex; align-items:center; cursor:pointer; }
.pl-bar .track{ position:relative; width:100%; height:4px; border-radius:2px; background:rgba(255,255,255,.24); }
/* 提前缓存段：预取进内存、还没喂给 MSE 的分片。
   比普通缓冲深一档，但**不用 accent 蓝** —— 蓝色已经代表「已播」，
   混用会让人以为这段放过了。宽度每秒才走一步，给个短过渡抹平台阶。 */
.pl-bar .pre{ position:absolute; left:0; top:0; bottom:0; width:0; border-radius:2px;
  background:rgba(255,255,255,.6); opacity:0; transition:width .4s linear,left .4s linear,opacity .3s; }
.pl-bar .buf{ position:absolute; left:0; top:0; bottom:0; background:rgba(255,255,255,.34); border-radius:2px; }
.pl-bar .fill{ position:absolute; left:0; top:0; bottom:0; background:var(--accent); border-radius:2px; }
.pl-bar .knob{ position:absolute; width:13px; height:13px; border-radius:50%; background:#fff; transform:translate(-50%,-50%); top:50%; box-shadow:0 1px 4px rgba(0,0,0,.4); }
.pl-ctl{ display:flex; align-items:center; gap:16px; margin-top:8px; }
.pl-ctl .sp{ margin-left:auto; display:flex; gap:8px; align-items:center; }
.pl-time{ font-size:12.5px; font-variant-numeric:tabular-nums; color:rgba(255,255,255,.86); }
.pl-btn{ width:34px; height:34px; border-radius:50%; display:grid; place-items:center; color:#fff; transition:background .16s; }
.pl-btn:hover{ background:rgba(255,255,255,.16); }
/* 文字按钮：换源 / 重新加载。图标认不出「换源」，文字一步到位；
   胶囊底比图标按钮浅一档，免得在控制栏里抢过播放键。 */
.pl-btn.pl-txt{
  width:auto; min-width:0; height:30px; padding:0 12px; border-radius:9px;
  font-size:12.5px; font-weight:500; letter-spacing:.2px; white-space:nowrap;
  background:rgba(255,255,255,.10);
}
.pl-btn.pl-txt:hover{ background:rgba(255,255,255,.22); }
/* ---- 弹层（倍速 / 选集）----
   弹层统一挂在按钮的 .pl-pop-wrap 上，往上弹；控件自动隐藏时要靠 popOpen 拦住，
   否则鼠标还在选倍速，整条控制栏就淡出了。 */
.pl-pop-wrap{ position:relative; display:flex; align-items:center; }
/* 往上让开进度条：控制条距进度条只有 8px，弹层离按钮太近会把进度条压掉一截 */
.pl-pop{
  position:absolute; bottom:calc(100% + 30px); z-index:6;
  opacity:0; visibility:hidden; transform:translateY(6px);
  transition:opacity .16s ease, transform .16s ease, visibility .16s;
  background:rgba(22,22,24,.96); backdrop-filter:blur(16px);
  border-radius:14px; box-shadow:0 16px 36px rgba(0,0,0,.55);
}
.pl-pop.is-open{ opacity:1; visibility:visible; transform:translateY(0); }

/* ---- 音量：静音键 + 滑杆，两个独立组件，都常驻控制栏 ----
   原来做成「点按钮弹面板，面板里再放静音键和滑杆」：调个音量要点两次，
   面板一收就调不了，手机上弹层还挡住半个画面。现在直接摆在条上，随时可拖。
   两者联动：拖到 0 自动进静音，静音时拖回来自动解除，图标跟着音量大小换。 */
.pl-vol{ display:flex; align-items:center; gap:4px; }
.pl-vol-range{
  -webkit-appearance:none; appearance:none; width:92px; height:4px; border-radius:2px; outline:none; cursor:pointer;
  background:linear-gradient(90deg,var(--accent) 0 var(--v,100%),rgba(255,255,255,.28) var(--v,100%) 100%);
}
.pl-vol-range::-webkit-slider-thumb{
  -webkit-appearance:none; width:13px; height:13px; border-radius:50%; background:#fff; box-shadow:0 1px 4px rgba(0,0,0,.5);
}
.pl-vol-range::-moz-range-thumb{ width:13px; height:13px; border:0; border-radius:50%; background:#fff; }
/* iOS 上 video.volume 只读，滑杆拖不动 —— 直接收起来，只留静音键 */
.pl-vol.is-muteonly .pl-vol-range{ display:none; }
/* 静音状态靠「叉号」表达就够，不要染红 —— 播放器里唯一的强调色是品牌蓝 */
.pl-mute.is-off{ color:#fff; }

.pl-rate{ width:auto; min-width:40px; padding:0 8px; border-radius:9px; font-size:12px; font-weight:600; font-variant-numeric:tabular-nums; }
.pl-menu{ right:0; width:236px; padding:12px; }
.pl-menu-t{ font-size:11.5px; color:rgba(255,255,255,.55); margin:0 0 8px 2px; }
.pl-rates{ display:grid; grid-template-columns:repeat(3,1fr); gap:6px; }
.pl-rates button{ padding:7px 0; border-radius:9px; font-size:13px; color:rgba(255,255,255,.86); background:rgba(255,255,255,.08); }
.pl-rates button:hover{ background:rgba(255,255,255,.16); }
.pl-rates button.on{ background:var(--accent); color:#fff; font-weight:600; }
.pl-menu-item{
  display:block; width:100%; margin-top:10px; padding-top:10px; text-align:left;
  border-top:1px solid rgba(255,255,255,.14); font-size:12.5px; color:rgba(255,255,255,.8);
}
.pl-menu-item:hover{ color:#fff; }

/* 选集弹层：全屏时页面下方的选集列表在 player-shell 之外，根本看不到，
   所以播放器里必须有自己的一份。这里做成可滚动的集号网格，集多也不溢出。 */
.pl-eps-pop{ right:0; width:min(360px,86vw); padding:10px; display:flex; flex-direction:column; }
.pl-eps-pop .pl-menu-t{ display:flex; align-items:baseline; justify-content:space-between; gap:8px; }
/* 弹层里现在装的是 epg（组标签 + 集号网格），所以这一层只负责滚动，布局交给 .epg */
.pl-eps-grid{ display:block; overflow:auto; max-height:min(46vh,320px); padding-right:2px; }
.pl-eps-grid .epg{ gap:8px; }
/* 深色浮层里重新着色：默认的 .chip/.ep-item 是浅底深字，直接放上来会看不见 */
.pl-eps-grid .epg-groups .chip,
.pl-eps-grid .epg-sort{
  height:25px; padding:0 10px; font-size:11.5px; border-radius:var(--r-pill);
  color:rgba(255,255,255,.82); background:rgba(255,255,255,.1);
}
.pl-eps-grid .epg-groups .chip.on{ background:var(--accent); color:#fff; font-weight:600; }
.pl-eps-grid .epg-total{ font-size:11.5px; color:rgba(255,255,255,.6); }
.pl-eps-grid .epg-grid{ grid-template-columns:repeat(auto-fill,minmax(40px,1fr)); gap:5px; }
.pl-eps-grid .epg-grid .ep-item{
  height:30px; border-radius:8px; font-size:12px; color:rgba(255,255,255,.86);
  background:rgba(255,255,255,.08); font-variant-numeric:tabular-nums;
}
.pl-eps-grid .epg-grid .ep-item:hover{ background:rgba(255,255,255,.16); }
.pl-eps-grid .epg-grid .ep-item.on{ background:var(--accent); color:#fff; font-weight:600; }
.pl-eps-empty, .pl-eps-grid .epg-empty{ font-size:12.5px; color:rgba(255,255,255,.6); padding:4px 2px 6px; }

/* 播放页侧栏的「选集 / 换源」标题行 */
.ps-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.ps-src{
  height:28px; padding:0 12px; border-radius:var(--r-pill); background:var(--bg-alt);
  color:var(--text-2); font-size:12.5px; transition:background .16s,color .16s;
}
.ps-src:hover{ color:var(--text); background:color-mix(in srgb,var(--bg-alt) 82%,var(--text) 8%); }

/* 窄屏放不下这么多键：只留播放/音量/倍速/选集/全屏，其余靠选集面板和键盘 */
@media (max-width:560px){
  .pl-wide{ display:none; }
  .pl-ctl{ gap:6px; margin-top:6px; }
  .pl-btn{ width:32px; height:32px; }
  .pl-time{ font-size:12px; }
  /* 滑动条缩到 46px：再宽就把时间文字挤到换行了 */
  .pl-vol-range{ width:46px; }
  /* 文字按钮在窄屏收窄，但不隐藏 —— 卡顿时它是唯一第一时间能点的出口 */
  .pl-btn.pl-txt{ height:28px; padding:0 9px; font-size:12px; }
}
.pl-big{ position:absolute; inset:0; display:grid; place-items:center; z-index:2; pointer-events:none; }
.pl-big button{ pointer-events:auto; width:72px; height:72px; border-radius:50%; background:rgba(255,255,255,.92); color:#111; display:grid; place-items:center; transition:transform .16s; }
.pl-big button:hover{ transform:scale(1.05); }
/* 中央加载圈：只在真的缓冲/跳转/挂流的时候出现，和大播放键严格互斥
   （play.js 的 setLoading() 会顺手把 .pl-big 藏掉）。
   pointer-events:none 不能省 —— 它盖满整个画面，auto 会把单击显隐、双击全屏全吃掉。 */
.pl-loading{ position:absolute; inset:0; display:grid; place-items:center; z-index:3; pointer-events:none; opacity:0; transition:opacity .18s ease; }
.pl-loading[aria-hidden="false"]{ opacity:1; }
.pl-loading .ring{ width:44px; height:44px; border-radius:50%; border:3px solid rgba(255,255,255,.22); border-top-color:#fff; animation:rs-spin .8s linear infinite; }
@media (max-width:560px){ .pl-loading .ring{ width:36px; height:36px; border-width:2.5px; } }
.pl-hidden .pl-top,.pl-hidden .pl-bottom{ opacity:0; pointer-events:none; }
.pl-hidden{ cursor:none; }
/* 顶栏（含返回键）跟着控件一起显隐 —— 单击画面就能唤出来，所以不需要常驻。
   早先为了「全屏时点了没反应」把返回键钉死在右上角，反而在全屏时一直挡着画面。 */
/* 居中提示条：「已接着上次播放」「已静音」这类。
   pointer-events 必须是 none —— 它正好压在画面正中，auto 的话
   用户的点击全被这一层吃掉，点画面播放/暂停看起来就是「点了没反应」。 */
.pl-center-tip{ position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); background:rgba(0,0,0,.62); padding:7px 14px; border-radius:10px; font-size:13px; opacity:0; transition:opacity .2s; z-index:4; pointer-events:none; }
.pl-center-tip.show{ opacity:1; }
.play-under{ background:var(--bg); color:var(--text); padding:28px 0 40px; flex:1; }
.play-head{ display:flex; align-items:center; gap:14px; flex-wrap:wrap; margin-bottom:8px; }
.play-head h1{ font-size:26px; letter-spacing:-.6px; }
.play-body{ display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:40px; padding-top:22px; }
@media (max-width:1000px){ .play-body{ grid-template-columns:1fr; gap:24px; } }
.play-note{ font-size:13.5px; color:var(--text-2); line-height:1.7; }
/* ---------- 全屏 ----------
   全屏挂在 #outlet 上，而不是 .player-shell：
   切集时播放页会整块重建，挂在 shell 上就「元素一销毁 → 浏览器自动退出全屏」。
   #outlet 只换内容不换自己，全屏能一直挂着，切集不再掉出来。 */
#outlet:fullscreen,
#outlet:-webkit-full-screen{
  width:100vw; height:100vh; padding:0; margin:0; overflow:hidden; background:#000;
}
#outlet:fullscreen .play-wrap,
#outlet:-webkit-full-screen .play-wrap{ min-height:0; height:100%; }
#outlet:fullscreen .play-under,
#outlet:-webkit-full-screen .play-under{ display:none; }
/* 注意 :not(.pl-rot)：伪横屏（下面那条）是要把宽高交换后旋转的，
   这里如果无条件盖成 100vw × 100vh，旋转出来就是「四个角被切掉的竖屏」。
   ID 选择器优先级高于 .player-shell.pl-rot，所以只能在这里排掉。 */
#outlet:fullscreen .player-shell:not(.pl-rot),
#outlet:-webkit-full-screen .player-shell:not(.pl-rot){
  width:100vw; height:100vh; max-width:none; max-height:none; aspect-ratio:auto; margin:0;
}
#outlet:fullscreen .player-shell video,
#outlet:-webkit-full-screen .player-shell video{ width:100%; height:100%; object-fit:contain; }

/* iOS Safari 没有 screen.orientation.lock，退化成把播放器转 90° 顶满屏幕：
   宽高按「交换后的视口」算，再以屏幕中心为原点旋转，视觉上就是横屏全屏。 */
.player-shell.pl-rot{
  position:fixed; top:50%; left:50%; z-index:9999;
  width:100vh; height:100vw; max-width:none; max-height:none;
  aspect-ratio:auto; margin:0;
  transform:translate(-50%,-50%) rotate(90deg);
}
.player-shell.pl-rot video{ width:100%; height:100%; object-fit:contain; }
/* 伪横屏是靠把整个播放器转 90° 拼出来的：手指「横向滑」在元素本地坐标里是纵向，
   pan-y 会把这一下让给浏览器滚动。此时 body 已经 overflow:hidden 没得滚，
   所以直接关掉默认手势，横滑只归我们做拖动进度。 */
.player-shell.pl-rot{ touch-action:none; }
body.pl-cinema{ overflow:hidden; }

/* 全屏 / 伪横屏时把完整控制栏放回来 —— 宽度够了，和电脑端保持一致 */
#outlet:fullscreen .pl-wide,
#outlet:-webkit-full-screen .pl-wide,
.player-shell.pl-rot .pl-wide{ display:grid; }

/* 触屏上进度条太细按不准，给它一条更厚的可点带（轨道本身还是 4px） */
@media (pointer:coarse){ .pl-bar{ height:26px; } }

.play-side h4{ font-size:13px; color:var(--text-3); margin:0 0 12px; font-weight:600; }
.pl-ep-list{ display:grid; grid-template-columns:repeat(auto-fill,minmax(80px,1fr)); gap:8px; max-height:340px; overflow:auto; }
.pl-src{ display:flex; flex-wrap:wrap; gap:8px; margin-bottom:16px; }

/* ---------- 搜索 ---------- */
.search-hero{ padding:36px 0 8px; }
.search-big{ display:flex; align-items:center; gap:12px; height:56px; padding:0 22px; border-radius:var(--r-pill); background:var(--bg-alt); }
.search-big input{ flex:1; min-width:0; border:0; background:none; outline:none; font-size:16px; }
.search-big .clr{ width:20px; height:20px; border-radius:50%; background:var(--text-3); color:var(--bg); display:grid; place-items:center; font-size:12px; }
/* 搜索结果增量动画（library.js 的 FLIP）：
   新卡片淡入上浮（card-enter）；已有卡片换位由 JS 写 inline transform + card-flip 过渡，
   两者都用 transform/opacity，走合成层，不触发重排、不闪屏。 */
#s-grid .card-enter{ animation:card-in .34s cubic-bezier(.22,.72,.28,1) both; }
@keyframes card-in{ from{ opacity:0; transform:translateY(12px) scale(.98); } }
#s-grid .card-flip{ transition:transform .3s cubic-bezier(.22,.72,.28,1); }
@media (prefers-reduced-motion:reduce){
  #s-grid .card-enter{ animation:none; }
  #s-grid .card-flip{ transition:none; }
}
/* 「大家都在搜 / 最近搜索」：标签文字独占一行，chips 一行放不下自己折行
   （手机 375px 下 label 和 5 个标签横排会溢出） */
.hot-words{ margin-top:14px; }
.hw-label{ display:block; margin-bottom:10px; }
.hw-chips{ display:flex; gap:8px; flex-wrap:wrap; }
.search-hist{ padding:26px 0 10px; }
.search-hist .hw-label{ display:flex; align-items:center; justify-content:space-between; }

/* ---------- 账号 / 登录 ---------- */
.auth-wrap{ max-width:440px; margin:0 auto; padding:64px 0; }
.auth-card{ background:var(--card); border:1px solid var(--line); border-radius:var(--r-xl); padding:34px; box-shadow:var(--shadow-1); }
html[data-theme="dark"] .auth-card{ background:var(--bg-alt); border-color:var(--line); }
.auth-card h1{ font-size:26px; letter-spacing:-.6px; margin-bottom:8px; }
.auth-card .sub{ font-size:13.5px; color:var(--text-2); margin-bottom:26px; }
.field{ margin-bottom:14px; }
.field label{ display:block; font-size:12.5px; color:var(--text-2); margin-bottom:7px; }
/* 标签行：左边标题、右边小链接/小提示（「忘记密码？」「选填」「3/20 字」都用它） */
.field-label{ display:flex; align-items:baseline; justify-content:space-between; gap:10px; margin-bottom:7px; }
.field-label label{ display:inline; margin-bottom:0; }
.field-label .opt{ margin-left:6px; font-size:11px; font-weight:400; color:var(--text-3); }
.field-aside{ font-size:12px; color:var(--accent); white-space:nowrap; }
.field-hint{ font-size:11.5px; color:var(--text-3); white-space:nowrap; }
.field-hint.bad{ color:var(--danger); }
.input{ width:100%; height:46px; padding:0 16px; border-radius:12px; border:1px solid var(--line-strong); background:var(--bg); color:var(--text); outline:none; font-size:14px; }
.input:focus{ border-color:var(--accent); box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 16%,transparent); }
.form-err{ font-size:12.5px; color:var(--danger); margin:10px 0 0; min-height:18px; }
.btn-block{ width:100%; height:46px; border-radius:12px; background:var(--accent); color:#fff; font-size:14.5px; font-weight:600; margin-top:6px; }
.btn-block:disabled{ opacity:.55; cursor:default; }
.auth-alt{ margin-top:18px; font-size:12.5px; color:var(--text-3); text-align:center; }
.auth-alt a{ color:var(--accent); }

/* ---------- 我的 / 设置 ----------
   电脑端原来是「放大版手机」：一条竖排、每行 58px 高、字号 14px，内容区被拉到
   1440 之后右侧整片空白。现在的骨架是一条左右分栏：
     左栏 360px：账号卡（我是谁）+ 账号安全（改密码 / 邮箱状态）
     右栏自适应：外观与播放 + 本机与关于
   两栏高度接近，1152 的内容宽也用满了。窄屏（<960）折成单列，
   说明文字收掉，回到手机上「一屏看完」的密度。 */
.set-wrap{ max-width:1152px; padding-top:34px; }
.set-head{ margin-bottom:20px; }
.set-head h1{ font-size:24px; letter-spacing:-.5px; margin-bottom:6px; }
.set-lead{ font-size:12.5px; color:var(--text-3); line-height:1.6; max-width:62ch; }

.set-cols{ display:grid; gap:14px; }
.set-col{ display:flex; flex-direction:column; gap:14px; min-width:0; }
@media (min-width:960px){
  .set-cols{ grid-template-columns:minmax(0,360px) minmax(0,1fr); align-items:start; }
}

/* ---- 账号卡 ---- */
.acc-card{
  padding:16px; background:var(--card);
  border:1px solid var(--line); border-radius:var(--r-lg);
  box-shadow:var(--shadow-1);
}
.acc-top{ display:flex; align-items:center; gap:14px; }
.acc-avatar{
  width:54px; height:54px; flex:0 0 auto; border-radius:50%;
  display:grid; place-items:center;
  font-size:20px; font-weight:600; color:#fff; line-height:1;
  background:linear-gradient(140deg,#4a9bff,#0058d0 70%);
  box-shadow:0 6px 16px rgba(0,90,200,.26), inset 0 1px 0 rgba(255,255,255,.35);
}
.acc-avatar.ghost{ background:var(--bg-alt); color:var(--text-3); box-shadow:none; }
.acc-avatar.ghost svg{ width:24px; height:24px; }
.acc-id{ min-width:0; }
.acc-title{ display:flex; align-items:center; gap:4px; }
.acc-name{
  font-size:18px; font-weight:600; letter-spacing:-.3px; line-height:1.3;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:200px;
}
.acc-edit{
  width:24px; height:24px; flex:0 0 auto; border-radius:7px;
  display:grid; place-items:center; color:var(--text-3);
  transition:background .15s, color .15s;
}
.acc-edit:hover{ background:var(--bg-alt); color:var(--text); }
.acc-at{ margin-top:2px; font-size:12px; color:var(--text-3); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* 资料三行：dt 固定 34px，值在右 —— 比原来堆在一起的一串小字好扫 */
.acc-facts{ margin:16px 0 0; padding:12px 0 0; border-top:1px solid var(--line); }
.fact{ display:flex; align-items:center; gap:10px; min-height:26px; }
.fact dt{ flex:0 0 auto; width:30px; font-size:11.5px; color:var(--text-3); }
.fact dd{
  margin:0; min-width:0; flex:1 1 auto;
  display:flex; align-items:center; gap:6px;
  font-size:12.5px; color:var(--text-2);
}
.fact dd > span:first-child{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

.acc-badge{
  flex:0 0 auto; font-style:normal; font-size:10.5px; font-weight:500;
  padding:1.5px 6px; border-radius:5px; white-space:nowrap;
}
.acc-badge.ok{ color:#1a7f43; background:color-mix(in srgb,#30d158 18%,transparent); }
.acc-badge.warn{ color:#96590a; background:color-mix(in srgb,#ff9f0a 20%,transparent); }
html[data-theme="dark"] .acc-badge.ok{ color:#5ce08a; }
html[data-theme="dark"] .acc-badge.warn{ color:#ffc061; }

.acc-sync{ display:inline-flex; align-items:center; gap:5px; }
.acc-sync i{ width:5px; height:5px; flex:0 0 auto; border-radius:50%; background:#30d158; box-shadow:0 0 0 2px color-mix(in srgb,#30d158 22%,transparent); }

.acc-guest-acts{ display:flex; gap:8px; margin-top:16px; }
.acc-guest-acts > *{ flex:1 1 0; }

/* 次要按钮：改密码、清空、查看 —— 有边界但不抢眼 */
.btn-quiet{
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  height:30px; padding:0 12px; border-radius:9px;
  font-size:12.5px; color:var(--text-2);
  background:var(--bg-alt); border:1px solid transparent;
  transition:background .15s, color .15s, border-color .15s, transform .1s;
}
.btn-quiet:hover{ color:var(--text); border-color:var(--line-strong); }
.btn-quiet:active{ transform:translateY(1px); }
.btn-quiet svg{ opacity:.75; }

/* 退出：要「立体」但不刺眼。
   两层来造体积：上方 1px 内高光 + 下方柔和投影；按下时整体下沉 1px 且换成内阴影，
   手感上就真的是「按进去」了。颜色全部靠 color-mix 混进 var(--card)，
   深色模式下不会出现一块死白。 */
.btn-quit{
  display:flex; align-items:center; justify-content:center; gap:7px;
  width:100%; height:38px; margin-top:16px; border-radius:10px;
  font-size:13px; font-weight:600; color:var(--danger);
  background:linear-gradient(180deg,
    color-mix(in srgb,var(--danger) 9%,var(--card)),
    color-mix(in srgb,var(--danger) 4%,var(--card)));
  border:1px solid color-mix(in srgb,var(--danger) 30%,transparent);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.75), 0 1px 1px color-mix(in srgb,var(--danger) 14%,transparent),
             0 3px 8px color-mix(in srgb,var(--danger) 16%,transparent);
  transition:transform .1s, box-shadow .16s, background .16s;
}
.btn-quit:hover{
  background:linear-gradient(180deg,
    color-mix(in srgb,var(--danger) 14%,var(--card)),
    color-mix(in srgb,var(--danger) 7%,var(--card)));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.8), 0 5px 14px color-mix(in srgb,var(--danger) 26%,transparent);
}
.btn-quit:active{
  transform:translateY(1px);
  background:color-mix(in srgb,var(--danger) 16%,var(--card));
  box-shadow:inset 0 2px 5px color-mix(in srgb,var(--danger) 34%,transparent);
}
.btn-quit svg{ opacity:.85; }

/* ---- 下挂面板（改昵称 / 改密码） ---- */
.acc-panel{
  padding:14px 16px 12px;
  background:var(--bg-sunken); border:1px solid var(--line); border-radius:var(--r-lg);
  animation:panelIn .18s ease-out;
}
.acc-panel[hidden]{ display:none; }
@keyframes panelIn{ from{ opacity:0; transform:translateY(-4px); } to{ opacity:1; transform:none; } }
.panel-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.panel-t{ font-size:13.5px; font-weight:600; letter-spacing:-.2px; }
.panel-x{ width:26px; height:26px; border-radius:7px; display:grid; place-items:center; color:var(--text-3); }
.panel-x:hover{ background:var(--bg-alt); color:var(--text); }
.panel-x svg{ width:17px; height:17px; }
.inp{
  width:100%; height:36px; padding:0 11px; border-radius:9px;
  border:1px solid var(--line-strong); background:var(--bg); color:var(--text);
  font-size:13px; outline:none;
  transition:border-color .15s, box-shadow .15s;
}
.inp:focus{ border-color:var(--accent); box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 15%,transparent); }
.inp.invalid{ border-color:var(--danger); }
.panel-tip{ margin-top:7px; font-size:11.5px; color:var(--text-3); line-height:1.5; }
.panel-tip.bad{ color:var(--danger); }
.panel-acts{ display:flex; justify-content:flex-end; align-items:center; gap:8px; margin-top:12px; }
.panel-acts .pill[disabled]{ opacity:.45; pointer-events:none; }
.pwd-grid{ display:grid; gap:10px; }
.pwd-f span{ display:block; font-size:11.5px; color:var(--text-3); margin-bottom:5px; }

/* ---- 设置卡 ---- */
.card{ background:var(--card); border:1px solid var(--line); border-radius:var(--r-lg); }
.card-t{ padding:13px 16px 2px; font-size:11.5px; font-weight:600; letter-spacing:.05em; color:var(--text-3); }
.rows{ padding:2px 0 4px; }
.row{ display:flex; align-items:center; gap:16px; min-height:52px; padding:10px 16px; }
.row + .row{ border-top:1px solid var(--line); }
.row-k{ flex:1 1 auto; min-width:0; }
.row-k .k{ display:block; font-size:13px; }
.row-k .d{ display:block; margin-top:2px; font-size:11.5px; color:var(--text-3); line-height:1.45; }
.row-v{ flex:0 0 auto; display:flex; align-items:center; gap:8px; }
.set-ver{ font-size:12.5px; font-variant-numeric:tabular-nums; color:var(--text-3); }

.seg{ display:inline-flex; background:var(--bg-alt); border-radius:var(--r-pill); padding:3px; gap:2px; }
.seg button{ padding:5px 11px; border-radius:var(--r-pill); font-size:12px; color:var(--text-2); transition:background .15s, color .15s; }
.seg button.on{ background:var(--text); color:var(--bg); font-weight:600; }
.seg button:not(.on):hover{ color:var(--text); }

/* 默认影视源下拉：和分段控件同一个视觉重量（原来自定义了一堆内联样式，跟 seg 对不上） */
.set-select{
  height:30px; padding:0 28px 0 11px; border-radius:var(--r-pill);
  border:1px solid var(--line-strong); background:var(--bg); color:var(--text);
  font-size:12px; max-width:190px; outline:none; appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' stroke='%2386868b' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 10px center;
}
.set-select:focus{ border-color:var(--accent); }

.set-note{
  margin-top:20px; padding-top:14px; border-top:1px solid var(--line);
  font-size:11.5px; color:var(--text-3); line-height:1.8;
}

@media (max-width:959px){
  .set-wrap{ padding-top:24px; }
  .set-head h1{ font-size:21px; }
  /* 单列时账号卡横向铺开：头像 → 资料 → 退出 一行放得下，比竖着堆省一半高度 */
  .acc-card{ display:grid; grid-template-columns:1fr auto; gap:0 20px; align-items:start; }
  .acc-top{ grid-column:1; }
  .acc-facts{ grid-column:1; }
  .btn-quit{ grid-column:2; grid-row:1 / span 2; width:auto; align-self:center; margin-top:0; padding:0 18px; }
  .acc-guest-acts{ grid-column:2; grid-row:1 / span 2; align-self:center; margin-top:0; }
}
@media (max-width:640px){
  .set-wrap{ padding-top:20px; }
  .acc-card{ display:block; padding:16px; }
  .acc-avatar{ width:48px; height:48px; font-size:18px; }
  .acc-name{ font-size:17px; max-width:170px; }
  /* 手机上主操作回到整行铺满：热区大、和桌面观感一致（要盖掉 959 那条 width:auto） */
  .btn-quit{ width:100%; margin-top:14px; }
  .acc-guest-acts{ margin-top:14px; }
  .row{ gap:12px; padding:10px 14px; }
  /* 窄屏没空间就藏说明，否则标签和控件互相挤 */
  .row-k .d{ display:none; }
  .panel-acts > *{ flex:1 1 0; }
}

/* ---------- 影视库：站内搜索（只搜当前选中的源） ---------- */
/* 桌面端不跟着内容列拉满（996px 的长条配上十几个字很像没做完），收到 720 停住 */
.lib-searchwrap{ margin-bottom:14px; max-width:720px; }
.lib-search{
  display:flex; align-items:center; gap:10px; height:44px; padding:0 6px 0 14px;
  border-radius:var(--r-pill); background:var(--bg-alt);
  border:1px solid transparent; transition:border-color .18s,background .18s;
}
.lib-search:focus-within{ border-color:var(--accent); background:var(--bg); }
.lib-search .ls-ico{ color:var(--text-3); display:grid; place-items:center; flex:0 0 auto; }
.lib-search input{
  flex:1 1 auto; min-width:0; border:0; background:none; outline:none;
  font-size:13.5px; color:var(--text);
}
.lib-search input::placeholder{ color:var(--text-3); }
.lib-search .ls-btn{
  height:32px; padding:0 16px; border-radius:var(--r-pill);
  background:var(--accent); color:#fff; font-size:12.5px; font-weight:500; flex:0 0 auto;
}
.lib-search .ls-btn:hover{ filter:brightness(1.06); }
.lib-search .ls-reset{
  height:32px; padding:0 12px; border-radius:var(--r-pill); flex:0 0 auto;
  background:var(--bg); color:var(--text-2); font-size:12.5px;
}
.lib-search .ls-reset:hover{ color:var(--text); }
/* 手机上「退出搜索」四个字要吃掉 78px，输入框被挤到只剩 170px。
   窄屏换成 ✕ 图标，输入框立刻宽松一截。 */
.ls-reset-x{ display:none; }

.lib-qhist{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-top:9px; }
.lib-qhist:empty{ display:none; }
.qh-title{ font-size:11.5px; color:var(--text-3); }
.qh-tip{ font-size:11.5px; color:var(--text-3); }
.qchip{ display:inline-flex; align-items:center; background:var(--bg-alt); border-radius:var(--r-pill); overflow:hidden; }
.qchip-go{
  height:26px; padding:0 6px 0 11px; font-size:12px; color:var(--text-2);
  max-width:150px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.qchip-go:hover{ color:var(--text); }
.qchip-del{ width:22px; height:26px; display:grid; place-items:center; font-size:10px; color:var(--text-3); }
.qchip-del:hover{ color:var(--danger); }
.qh-clear{ height:26px; padding:0 10px; border-radius:var(--r-pill); font-size:11.5px; color:var(--text-3); }
.qh-clear:hover{ color:var(--text-2); }

@media (max-width:720px){
  .lib-search{ height:40px; padding:0 5px 0 12px; gap:8px; }
  /* 输入框字号必须 ≥16px：iOS Safari 对小于 16px 的 input 聚焦时会自动放大整页 */
  .lib-search input{ font-size:16px; }
  .lib-search .ls-btn{ padding:0 13px; }
  .lib-search .ls-reset{ width:32px; padding:0; display:grid; place-items:center; font-size:13px; }
  /* 作者样式里的 display 会盖掉 UA 的 [hidden]{display:none}，必须显式补回来，
     否则没在搜索时这个 ✕ 也会一直显示 */
  .lib-search .ls-reset[hidden]{ display:none; }
  .ls-reset-t{ display:none; }
  .ls-reset-x{ display:inline; }
  .qchip-go{ max-width:110px; }
}

/* ---------- Toast / Sheet ---------- */
.toast-root{ position:fixed; left:50%; bottom:calc(24px + env(safe-area-inset-bottom)); transform:translateX(-50%); z-index:100; display:flex; flex-direction:column; gap:10px; align-items:center; pointer-events:none; }
.toast{
  display:flex; align-items:center; gap:10px; max-width:min(300px,86vw); padding:11px 16px; border-radius:18px;
  background:color-mix(in srgb,var(--text) 92%,transparent); color:var(--bg); font-size:13px;
  box-shadow:0 10px 30px rgba(0,0,0,.24); animation:tin .22s cubic-bezier(.2,.8,.3,1);
  border:.5px solid rgba(128,128,128,.24);
}
.toast.ok{ color:#fff; background:color-mix(in srgb,#1c1c1e 92%,transparent); }
.toast.err{ color:#fff; background:color-mix(in srgb,#b3261e 92%,transparent); }
.toast.out{ animation:tout .18s ease forwards; }
@keyframes tin{ from{ opacity:0; transform:translateY(10px) scale(.96); } }
@keyframes tout{ to{ opacity:0; transform:translateY(6px) scale(.98); } }
.sheet-mask{ position:fixed; inset:0; background:var(--scrim); z-index:90; display:grid; place-items:center; padding:20px; animation:fin .18s; }
@keyframes fin{ from{ opacity:0; } }
.sheet{
  background:var(--bg); border-radius:var(--r-xl); padding:26px; max-width:520px; width:100%;
  box-shadow:var(--shadow-2); max-height:calc(100vh - 40px); overflow:auto;
}
@media (max-width:600px){
  /* 手机上贴着底边弹，留满宽度，比居中的小卡片好点 */
  .sheet-mask{ padding:0; align-items:flex-end; }
  .sheet{ max-width:none; border-radius:var(--r-xl) var(--r-xl) 0 0; padding:20px 18px calc(20px + env(safe-area-inset-bottom)); max-height:82vh; }
}

/* ---------- 换源面板 ---------- */
.rs-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:6px; }
.rs-head h3{ font-size:17px; }
.rs-sub{ margin-bottom:14px; color:var(--text-2); }
.rs-body{ min-height:90px; }
.rs-loading{ display:grid; place-items:center; padding:26px 0; }
.spinner{ width:22px; height:22px; border-radius:50%; border:2px solid var(--line-strong); border-top-color:var(--accent); animation:rs-spin .8s linear infinite; }
@keyframes rs-spin{ to{ transform:rotate(360deg); } }
.rs-list{ display:flex; flex-direction:column; gap:8px; }
.rs-item{
  display:flex; align-items:center; gap:12px; padding:12px 14px; border-radius:var(--r-md);
  background:var(--bg-alt); transition:background .16s;
}
.rs-item:hover{ background:color-mix(in srgb,var(--bg-alt) 82%,var(--text) 8%); }
.rs-item.is-cur{ opacity:.62; }
.rs-name{ font-size:13.5px; font-weight:500; flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rs-meta{ flex:0 0 auto; }
.rs-go{ flex:0 0 auto; font-size:12.5px; color:var(--accent); }
.rs-item.is-cur .rs-go{ color:var(--text-3); }
.rs-none{ color:var(--text-2); padding:6px 0; }
.rs-tip{ margin-top:14px; color:var(--text-3); line-height:1.6; }

/* ---------- 手机底部 tab ---------- */
.tabbar{ display:none; }
@media (max-width:720px){
  .site-head .nav{ display:none; }
  .head-right .search-mini{ min-width:0; width:36px; padding:0; justify-content:center; background:none; }
  .head-right .search-mini input{ display:none; }
  .head-right .dl-pill{ display:none; }
  .site-foot{ display:none; }
  .outlet{ padding-bottom:96px; }
  .tabbar{
    display:flex; position:fixed; left:0; right:0; bottom:0; z-index:45; height:calc(58px + env(safe-area-inset-bottom));
    padding-bottom:env(safe-area-inset-bottom);
    background:color-mix(in srgb,var(--bg) 92%,transparent); backdrop-filter:blur(20px);
    border-top:1px solid var(--line);
  }
  .tabbar a{ flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; font-size:10.5px; color:var(--text-3); }
  .tabbar a.on{ color:var(--accent); }
}
@media (min-width:721px){ .tabbar{ display:none; } }

/* 播放页铺满时隐藏站点头/底 */
body.immersive .site-head,body.immersive .site-foot,body.immersive .tabbar{ display:none; }
body.immersive{ background:var(--bg); }

/* 封面淡入：图片是渐进解码的，慢网下浏览器会先把上半截画出来（看起来像「只加载了一半」）。
   解码完成前先隐藏，加载好了再淡入，就不会看到半截画面。 */
img.rr-img{ opacity:0; transition:opacity .3s ease; }
img.rr-img.is-loaded{ opacity:1; }
@media (prefers-reduced-motion:reduce){ img.rr-img{ transition:none; } }

/* ---------- 宽屏两侧留白广告 ----------
   内容区最宽 1440（--content-max），所以只有视口 ≥1800 时两边才各空出 180px 放得下 160 宽的竖幅。
   窄一点就整块不显示 —— 也**不发请求**，因为挂载逻辑在 app.js 里，不满足宽度直接 return。 */
.side-rail{ display:none; }
@media (min-width:1800px){
  .side-rail{
    display:block; position:fixed; z-index:8; width:160px;
    top:calc(var(--head-h) + 28px);
  }
  #rail-left{ left:20px; }
  #rail-right{ right:20px; }
  .side-rail .ad-slot{ width:100%; }
  /* 播放页是全屏沉浸式，两侧留白本来就没有，别硬塞广告打断看片 */
  body.immersive .side-rail{ display:none; }
}

/* ---------- 广告位 ---------- */
.ad-slot{ position:relative; display:flex; align-items:center; justify-content:center; gap:10px; border-radius:var(--r-md); background:var(--bg-alt); color:var(--text-3); font-size:12px; min-height:76px; padding:14px 18px; }
.ad-slot.banner{ min-height:88px; }
.ad-slot.inline{ min-height:110px; }
.ad-slot .ad-tag{ position:absolute; top:6px; left:10px; font-size:10px; opacity:.7; }
.ad-slot .ad-close{ position:absolute; top:6px; right:8px; width:20px; height:20px; border-radius:50%; display:grid; place-items:center; opacity:.55; }
.ad-slot .ad-close:hover{ opacity:1; background:var(--bg); }
/* 还没填广告位 ID 时显示的占位：虚线框，一眼能看出「这里是广告位」，也不会被误认成内容 */
.ad-slot.is-ph{ border:1px dashed var(--line-strong); background:transparent; }
.ad-slot.is-ph .ad-ph{ display:flex; flex-direction:column; align-items:center; gap:4px; text-align:center; }
.ad-slot.is-ph .ad-ph b{ font-size:12px; font-weight:600; color:var(--text-2); }
.ad-slot.is-ph .ad-ph code{ font-size:11px; color:var(--text-3); background:var(--bg-alt); padding:1px 6px; border-radius:5px; }
/* 真广告：容器只负责定位，高度完全由 AdSense 填充
   min-height 必须归零 —— 基础规则里的 76/88/110px 在「脚本还没注入 iframe」的
   头 0.8 秒会白露一条空白带，而它又挡不住后面 280px 那次跳变，纯亏。 */
.ad-slot.is-live{ display:block; padding:0; min-height:0; background:transparent; }

/* 未确认填充前把整块裁成 0 高。
   AdSense 对「没有广告可出」的处理是注入一个 280px 高的空 iframe（白底），
   以前它会在文档流里实打实地撑开 1~2 秒再被 settleAds 收起 ——
   用户看到的就是「闪一下白屏，然后什么都没有」。
   这里让它始终不超过 0 高（ins 自身仍有宽度，AdSense 照常测量和填充），
   确认 filled 才展开，中间不存在任何可见的空白。 */
.ad-slot.is-live:not(.is-filled):not(.is-empty){ height:0; overflow:hidden; }
.ad-slot.is-live:not(.is-filled):not(.is-empty) .ad-tag,
.ad-slot.is-live:not(.is-filled):not(.is-empty) .ad-close{ display:none; }
/* 展开时淡入，而不是「啪」一下冒出来 */
.ad-slot.is-live.is-filled{ animation:adfade .32s ease; }
@keyframes adfade{ from{ opacity:0; } }
.ad-slot.is-live .ad-tag{ top:2px; }
.ad-slot ins{ display:block; width:100%; }

/* ---------- 标题栏返回键 ---------- */
.head-back{ width:32px; height:32px; border-radius:50%; display:grid; place-items:center; color:var(--text-2);
  margin-left:-6px; flex:0 0 auto; transition:background .18s,color .18s; }
.head-back:hover{ background:var(--bg-alt); color:var(--text); }
.head-back:active{ transform:scale(.94); }

/* ---------- 主题切换过渡：只在切换瞬间开全局 transition，避免影响日常交互 ---------- */
html.theming,html.theming *,html.theming *::before,html.theming *::after{
  transition:background-color .32s ease,color .32s ease,border-color .32s ease,fill .32s ease,box-shadow .32s ease !important;
}
/* 主题图标切换的小动画 */
#theme-btn svg{ transition:transform .28s cubic-bezier(.34,1.4,.64,1),opacity .2s; }
#theme-btn.spin svg{ transform:rotate(180deg) scale(.86); }

/* ---------- 主题切换：从按钮扩散的圆形揭示（对齐 SwiftUI_Demos/DarkModeAnimation） ---------- */
/* 旧皮肤不动，新皮肤用一个从按钮圆心长到最远角的圆去裁切，观感和那边的 Circle mask 一致 */
::view-transition-old(root),
::view-transition-new(root){ animation:none; mix-blend-mode:normal; }
::view-transition-new(root){ animation:rr-theme-reveal .58s cubic-bezier(.4,0,.2,1) both; }
@keyframes rr-theme-reveal{
  from{ clip-path:circle(0 at var(--rr-tx,50%) var(--rr-ty,0)); }
  to{ clip-path:circle(var(--rr-tr,150vmax) at var(--rr-tx,50%) var(--rr-ty,0)); }
}
/* 按钮单独拎出来：切换过程中它不会被快照覆盖，图标原地翻，和示例里那颗太阳/月亮一样 */
#theme-btn{ view-transition-name:theme-icon; }
::view-transition-group(theme-icon){ animation-duration:.58s; }
::view-transition-old(theme-icon),
::view-transition-new(theme-icon){ animation:none; }
@media (prefers-reduced-motion:reduce){
  ::view-transition-new(root){ animation:none !important; }
}

/* ---------- 登录/注册切换 ---------- */
.auth-tabs{ display:flex; gap:22px; margin-bottom:22px; border-bottom:1px solid var(--line); }
.auth-tabs button{ position:relative; padding:0 0 12px; font-size:15px; font-weight:600; color:var(--text-3); transition:color .2s; }
.auth-tabs button.on{ color:var(--text); }
.auth-tabs button.on::after{ content:''; position:absolute; left:0; right:0; bottom:-1px; height:2px; border-radius:2px; background:var(--accent); }
.auth-tabs button:hover{ color:var(--text-2); }
.auth-hint{ font-size:12px; color:var(--text-3); line-height:1.6; margin-top:10px; }

/* 播放器内的错误/空态：必须是绝对定位覆盖在播放器上，否则会溢出到下面的白色内容区并与选集重叠 */
#pl-err{ position:absolute; inset:0; z-index:6; display:grid; place-items:center; padding:28px; overflow:auto;
  background:rgba(0,0,0,.94); }
#pl-err:empty{ display:none; }
#pl-err .empty,#pl-err .error-box{ background:transparent; border:0; box-shadow:none; padding:0; max-width:460px; }
#pl-err h3{ color:#fff; }
#pl-err p{ color:rgba(255,255,255,.72); }
#pl-err .empty-ico{ color:rgba(255,255,255,.9); background:rgba(255,255,255,.12); }

/* ==========================================================================
   隐私政策等长文文档页（#/privacy）
   —— 目标是「能读完」：行宽压到 72ch、行高 1.78、段间距大于行距，
   标题只靠字号和留白分层，不加装饰线，避免像法务模板。
   ========================================================================== */
.doc{ max-width:720px; margin:0 auto; padding:44px 0 88px; }
.doc h1{ font-size:32px; line-height:1.2; letter-spacing:-.7px; margin-bottom:10px; }
.doc-meta{ font-size:12.5px; color:var(--text-3); margin-bottom:28px; }
.doc-lead{ font-size:15.5px; color:var(--text-2); line-height:1.78; margin-bottom:8px; }
.doc h2{ font-size:16.5px; letter-spacing:-.2px; margin:34px 0 12px; }
.doc p{ font-size:14.5px; line-height:1.78; color:var(--text-2); margin-bottom:14px; }
.doc ul{ margin:0 0 16px; padding-left:20px; }
.doc li{ font-size:14.5px; line-height:1.78; color:var(--text-2); margin-bottom:9px; }
.doc li::marker{ color:var(--text-3); }
.doc b{ color:var(--text); font-weight:600; }
.doc a{ color:var(--accent); text-decoration:none; }
.doc a:hover{ text-decoration:underline; }
.doc-k{ font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:12.5px;
  padding:1px 5px; border-radius:5px; background:var(--bg-alt); color:var(--text); }
.doc-hr{ border:0; border-top:1px solid var(--line); margin:32px 0 20px; }
.doc-note{ font-size:13px; color:var(--text-3); line-height:1.7; }
@media (max-width:720px){
  .doc{ padding:28px 0 64px; }
  .doc h1{ font-size:26px; }
  .doc p,.doc li,.doc-lead{ font-size:14px; line-height:1.75; }
}

/* ==========================================================================
   指南 / 影单（/tv/guide/）—— 静态 HTML 页，不依赖 JS
   ---------------------------------------------------------------------------
   为什么要有这批页面：整站是 hash 路由的 SPA，任何 URL 首次返回的都是同一个空壳，
   正文全靠 JS 渲染。Google 能跑 JS，但 AdSense 的「内容质量」判断看到的是空容器。
   这些页面是真文本，抓得到、读得懂，也是站点唯一的「原创内容」载体。
   样式复用 .doc（720px 行宽 / 1.78 行高），这里只补栏目层。
   ========================================================================== */
.gd-top{ position:sticky; top:0; z-index:40; height:var(--head-h);
  background:color-mix(in srgb,var(--bg) 86%,transparent); backdrop-filter:saturate(180%) blur(20px);
  border-bottom:1px solid var(--line); }
.gd-top-in{ height:100%; display:flex; align-items:center; gap:12px; max-width:864px; margin:0 auto; padding:0 24px; }
.gd-top .brand{ font-size:15px; }
/* 静态页顶栏也要有返回键 —— 指南/关于是从首页点进来的，没有它就只能靠浏览器按钮，
   手机上尤其别扭（PWA / 微信内置浏览器里连按钮都没有）。
   注意别用 .gd-back 这个名字：文章页底部那条「← 返回指南」文字链已经占了它。 */
.gd-nav-back{ width:32px; height:32px; border-radius:50%; display:grid; place-items:center;
  color:var(--text-2); flex:0 0 auto; margin-left:-6px; transition:background .18s,color .18s; }
.gd-nav-back:hover{ background:var(--bg-alt); color:var(--text); }
/* SVG 是 inline 元素，默认按 baseline 对齐，会在按钮里偏下 —— 必须 block 掉 */
.gd-nav-back svg{ display:block; }
.gd-top .gd-home{ margin-left:auto; font-size:13px; color:var(--accent); text-decoration:none; }
.gd-top .gd-home:hover{ text-decoration:underline; }

.gd-page{ max-width:864px; margin:0 auto; padding:0 24px; }
.gd-article{ max-width:720px; margin:0 auto; padding:40px 0 72px; }
.gd-article h1{ font-size:31px; line-height:1.26; letter-spacing:-.6px; margin-bottom:12px; }
.gd-meta{ display:flex; flex-wrap:wrap; align-items:center; gap:10px;
  font-size:12.5px; color:var(--text-3); margin-bottom:26px; }
.gd-meta .dot{ width:3px; height:3px; border-radius:50%; background:var(--line-strong); }

.gd-article h2{ font-size:17px; letter-spacing:-.2px; margin:34px 0 12px; }
.gd-article h3{ font-size:15px; margin:24px 0 8px; }
.gd-article p{ font-size:14.5px; line-height:1.82; color:var(--text-2); margin-bottom:15px; }
.gd-article ul,.gd-article ol{ margin:0 0 16px; padding-left:22px; }
.gd-article li{ font-size:14.5px; line-height:1.8; color:var(--text-2); margin-bottom:8px; }
.gd-article b,.gd-article strong{ color:var(--text); font-weight:600; }
.gd-article a{ color:var(--accent); text-decoration:none; }
.gd-article a:hover{ text-decoration:underline; }
.gd-article blockquote{ margin:20px 0; padding:2px 0 2px 16px; border-left:2px solid var(--accent);
  font-size:14px; line-height:1.8; color:var(--text-2); }
.gd-article hr{ border:0; border-top:1px solid var(--line); margin:34px 0 22px; }
.gd-title-card{ margin:24px 0 0; padding:14px 16px; border-radius:12px; background:var(--bg-alt); }
.gd-title-card .t{ font-size:14px; font-weight:600; color:var(--text); margin-bottom:4px; }
.gd-title-card .s{ font-size:12.5px; line-height:1.7; color:var(--text-3); }

/* 栏目索引 */
.gd-idx{ padding:40px 0 80px; }
.gd-idx h1{ font-size:32px; letter-spacing:-.7px; margin-bottom:10px; }
.gd-idx .sub{ font-size:14.5px; color:var(--text-2); line-height:1.75; max-width:600px; margin-bottom:32px; }
.gd-cards{ display:grid; gap:2px; }
.gd-card{ display:block; padding:20px 0; border-top:1px solid var(--line); text-decoration:none; }
.gd-card:last-child{ border-bottom:1px solid var(--line); }
.gd-card .k{ font-size:11.5px; font-weight:600; letter-spacing:.4px; color:var(--accent); text-transform:uppercase; }
.gd-card .t{ font-size:17px; font-weight:600; letter-spacing:-.2px; color:var(--text); margin:5px 0 6px; }
.gd-card .d{ font-size:13.5px; line-height:1.7; color:var(--text-2); }
.gd-card:hover .t{ color:var(--accent); }
.gd-back{ display:inline-block; margin-top:38px; font-size:13.5px; color:var(--accent); text-decoration:none; }
.gd-back:hover{ text-decoration:underline; }
@media (max-width:720px){
  .gd-top-in{ padding:0 18px; }
  .gd-page{ padding:0 18px; }
  .gd-article{ padding:26px 0 56px; }
  .gd-article h1,.gd-idx h1{ font-size:25px; }
  .gd-article p,.gd-article li{ font-size:14px; line-height:1.78; }
}

/* 首页「编辑推荐」—— 指向 /tv/guide/ 的三个静态页 */
.guide-links{ display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }
.guide-links a{ display:flex; flex-direction:column; gap:5px; padding:16px 18px;
  border-radius:var(--r-lg); background:var(--bg-alt); text-decoration:none;
  font-size:14.5px; font-weight:600; color:var(--text); letter-spacing:-.2px;
  transition:background .18s ease, transform .18s ease; }
.guide-links a span{ font-size:12.5px; font-weight:400; color:var(--text-3); }
.guide-links a:hover{ background:var(--line); transform:translateY(-1px); }
@media (max-width:900px){ .guide-links{ grid-template-columns:1fr; gap:10px; } }

/* 未填充的广告位整块收起来。
   AdSense 对「无广告可出」会往 ins 里塞一个 1116×280 的空 iframe（不是留白），
   审核通过前 / 无库存 / 装了拦截扩展时，每个位都会变成一条 280px 空白带。
   ads.js 的 settleAds() 读 data-ad-status 后加 .is-empty。 */
.ad-slot.is-empty{ display:none; }
.section.is-empty{ display:none; }

/* 指南页 / 首页里的广告位：和正文同宽，且和上面内容拉开距离 */
.gd-article .ad-slot,.gd-idx .ad-slot{ margin-top:30px; }

/* ==========================================================================
   认证流程：注册表单 / 查收邮件 / 邮箱验证落地
   —— 与 .auth-card 同一套令牌，这里只补流程特有的零件
   ========================================================================== */

/* ---------- 步骤条 ---------- */
.steps{ display:flex; align-items:center; gap:0; list-style:none; margin:0 0 26px; padding:0; }
.steps li{ display:flex; align-items:center; gap:6px; font-size:12px; color:var(--text-3); white-space:nowrap; }
.steps li:not(:last-child){ flex:1; }
/* 连线用 flex:1 撑开，别用 width:100% —— 在 flex 行里它会和兄弟项抢宽度，窄屏直接溢出 */
.steps li:not(:last-child)::after{ content:''; flex:1 1 auto; min-width:12px; height:1px; margin:0 8px;
  background:var(--line-strong); }
.steps-n{ display:grid; place-items:center; width:18px; height:18px; flex:0 0 18px;
  border-radius:50%; border:1px solid var(--line-strong); font-size:10.5px; font-weight:600; line-height:1; }
.steps em{ font-style:normal; }
.steps li.on{ color:var(--text); }
.steps li.on .steps-n{ background:var(--accent); border-color:var(--accent); color:#fff; }
.steps li.done{ color:var(--text-2); }
.steps li.done .steps-n{ background:color-mix(in srgb,var(--accent) 16%,transparent);
  border-color:transparent; color:var(--accent); }

/* ---------- 输入框：右侧眼睛按钮 ---------- */
.input-wrap{ position:relative; }
.input-wrap .input{ padding-right:46px; }
.input-eye{ position:absolute; right:4px; top:50%; transform:translateY(-50%);
  width:38px; height:38px; display:grid; place-items:center; border-radius:9px; color:var(--text-3);
  transition:color .16s ease, background .16s ease; }
.input-eye:hover{ color:var(--text); background:var(--bg-alt); }
.input.invalid{ border-color:var(--danger); }

/* ---------- 密码强度 ---------- */
.pw-meter{ display:flex; gap:4px; margin-top:9px; height:3px; }
.pw-meter i{ flex:1; border-radius:2px; background:var(--line); transition:background .22s ease; }
.pw-meter[data-lv="1"] i:nth-child(-n+1),
.pw-meter[data-lv="2"] i:nth-child(-n+2),
.pw-meter[data-lv="3"] i:nth-child(-n+3),
.pw-meter[data-lv="4"] i:nth-child(-n+4){ background:var(--pw-c,var(--text-3)); }
.pw-meter[data-lv="1"]{ --pw-c:#ff453a; }
.pw-meter[data-lv="2"]{ --pw-c:#ff9f0a; }
.pw-meter[data-lv="3"]{ --pw-c:#30d158; }
.pw-meter[data-lv="4"]{ --pw-c:#28c76f; }
.pw-tip{ font-size:11.5px; color:var(--text-3); margin:7px 0 0; line-height:1.5; min-height:0; }
.pw-tip[data-lv="1"]{ color:#ff453a; }
.pw-tip[data-lv="2"]{ color:#c97a06; }
html[data-theme="dark"] .pw-tip[data-lv="2"]{ color:#ffb340; }

/* ---------- 图形验证码 ---------- */
.captcha-row{ display:grid; grid-template-columns:1fr 108px 34px; gap:8px; align-items:center; }
.captcha-canvas{ width:108px; height:46px; border-radius:11px; border:1px solid var(--line-strong);
  cursor:pointer; background:var(--bg-alt); transition:border-color .16s ease; }
.captcha-canvas:hover{ border-color:var(--accent); }
.captcha-canvas:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }
.captcha-refresh{ width:34px; height:34px; display:grid; place-items:center; border-radius:9px;
  color:var(--text-3); transition:color .16s ease, background .16s ease, transform .3s ease; }
.captcha-refresh:hover{ color:var(--accent); background:var(--bg-alt); }
.captcha-refresh:active{ transform:rotate(180deg); }

/* ---------- 验证结果 / 查收邮件 卡片 ---------- */
.verify-card{ text-align:center; }
.verify-card .steps{ text-align:left; }
.verify-ico{ display:grid; place-items:center; width:56px; height:56px; margin:2px auto 18px;
  border-radius:50%; background:var(--bg-alt); color:var(--text-2); }
.verify-ico.ok{ background:color-mix(in srgb,#30d158 14%,transparent); color:#28a745; }
.verify-ico.warn{ background:color-mix(in srgb,#ff9f0a 15%,transparent); color:#c97a06; }
.verify-ico.err{ background:color-mix(in srgb,var(--danger) 12%,transparent); color:var(--danger); }
.verify-ico.info{ background:color-mix(in srgb,var(--accent) 12%,transparent); color:var(--accent); }
html[data-theme="dark"] .verify-ico.ok{ color:#30d158; }
html[data-theme="dark"] .verify-ico.warn{ color:#ffb340; }
.verify-title{ font-size:21px; letter-spacing:-.4px; margin-bottom:10px; }
.verify-desc{ font-size:13.5px; line-height:1.65; color:var(--text-2); max-width:34em; margin:0 auto; }
.verify-desc b{ color:var(--text); font-weight:600; }

/* 邮箱地址条：把用户名和域名分开配色，用户一眼能确认「是不是我那个邮箱」 */
.verify-mail{ display:inline-block; margin:18px 0 4px; padding:9px 16px; border-radius:var(--r-pill);
  background:var(--bg-alt); font-size:14px; font-weight:600; letter-spacing:-.1px;
  max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.verify-mail-domain{ color:var(--text-2); font-weight:500; }

.verify-acts{ display:flex; flex-wrap:wrap; gap:10px; justify-content:center; margin-top:22px; }
.verify-acts .pill{ min-height:40px; padding:0 20px; }
.verify-card .btn-block{ margin-top:14px; }
.verify-field{ text-align:left; margin-top:22px; }
.verify-card .auth-alt{ margin-top:14px; }

/* 重发按钮 + 说明 */
.resend-row{ margin-top:14px; display:flex; flex-direction:column; align-items:center; gap:8px; }
.resend-row .pill{ display:inline-flex; align-items:center; gap:7px; min-height:40px; padding:0 20px; }
.resend-row .pill:disabled{ opacity:.55; cursor:default; }
.resend-hint{ font-size:11.5px; color:var(--text-3); margin:0; min-height:16px; }

/* 收不到邮件时的排查清单：折叠感很弱，但只在需要时才占视线 */
.verify-tips{ margin-top:26px; padding-top:20px; border-top:1px solid var(--line); text-align:left; }
.verify-tips b{ display:block; font-size:12.5px; font-weight:600; margin-bottom:9px; }
.verify-tips ul{ margin:0; padding-left:17px; }
.verify-tips li{ font-size:12.5px; line-height:1.75; color:var(--text-2); }
.verify-tips li + li{ margin-top:3px; }
.verify-tips a{ color:var(--accent); }

/* ---------- 加载转圈 ---------- */
.spinner{ width:24px; height:24px; border-radius:50%;
  border:2px solid color-mix(in srgb,var(--text-3) 32%,transparent);
  border-top-color:var(--accent); animation:rr-spin .7s linear infinite; }
@keyframes rr-spin{ to{ transform:rotate(360deg); } }

@media (max-width:480px){
  .auth-card{ padding:24px 20px; }
  .verify-title{ font-size:19px; }
  .verify-ico{ margin-bottom:14px; }
  .steps{ margin-bottom:20px; }
  .captcha-row{ grid-template-columns:1fr 96px 32px; gap:6px; }
  .captcha-canvas{ width:96px; }
  .verify-acts .pill{ flex:1 1 auto; justify-content:center; }
}
@media (prefers-reduced-motion:reduce){
  .spinner{ animation-duration:2.4s; }
}

/* ---------- 错误块：可操作的那一个按钮 ---------- */
.error-acts{ display:flex; flex-wrap:wrap; gap:10px; justify-content:center; margin-top:2px; }
.error-acts .pill{ min-height:40px; padding:0 20px; }
.error-hint{ font-size:12.5px !important; color:var(--text-3) !important; margin-top:-4px; }

/* 本次会话里超时过的源：加个小黄点，不隐藏。
   隐藏是 badSources 的权限 —— 一次抖动就永久藏源，用户再也没法切回来。 */
#lib-sources button.is-shaky{ color:var(--text-3); }
.src-shaky{ display:inline-block; width:6px; height:6px; margin-left:6px; border-radius:50%;
  background:#ff9f0a; vertical-align:middle; }
#pl-err .error-acts{ margin-top:6px; }
