:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --text: #1d1f23;
  --sub: #8a8f99;
  --line: #ecedf0;
  --primary: #3b6cf6;
  --primary-soft: rgba(59, 108, 246, 0.1);
  --input: #ffffff;
  --side: #f7f8fa;
  --shadow: 0 2px 8px rgba(20, 30, 60, 0.05);
  --danger: #f04438;
  --radius: 16px;
  --tabbar-h: 56px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111214; --card: #1c1d21; --text: #e8e9ec; --sub: #8b8f98; --line: #2a2c31;
    --primary: #6b8eff; --primary-soft: rgba(107, 142, 255, 0.14); --input: #1c1d21; --side: #17181b;
    --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111214; --card: #1c1d21; --text: #e8e9ec; --sub: #8b8f98; --line: #2a2c31;
  --primary: #6b8eff; --primary-soft: rgba(107, 142, 255, 0.14); --input: #1c1d21; --side: #17181b;
  --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { background: var(--bg); }
body {
  color: var(--text);
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
  max-width: 640px;
  margin: 0 auto;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.page { padding-bottom: calc(var(--tabbar-h) + 20px + env(safe-area-inset-bottom)); }

/* ---------- 首页头部 ---------- */
.home-header {
  padding: calc(16px + env(safe-area-inset-top)) 16px 12px;
  background: linear-gradient(180deg, var(--primary-soft), transparent);
}
.hello { display: flex; justify-content: space-between; align-items: flex-start; }
.greet { font-size: 24px; font-weight: 700; }
.date { color: var(--sub); font-size: 13px; margin-top: 2px; }
.quote { color: var(--sub); font-size: 12px; margin-top: 8px; }
.pill-btn {
  padding: 5px 14px; border-radius: 16px; font-size: 13px;
  background: var(--card); color: var(--primary); box-shadow: var(--shadow);
}
.editing .pill-btn { background: var(--primary); color: #fff; }

.search {
  position: sticky; top: 0;
  margin-top: 14px;
  display: flex; align-items: center;
  height: 44px;
  background: var(--input);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 0 4px 0 6px;
  border: 1px solid var(--line);
}
.engine {
  display: flex; align-items: center; gap: 2px;
  padding: 0 8px 0 10px; height: 28px;
  font-size: 14px; font-weight: 600; color: var(--primary);
  border-right: 1px solid var(--line);
  white-space: nowrap;
}
.engine svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.search input {
  flex: 1; min-width: 0; height: 100%;
  border: 0; outline: 0; background: transparent;
  color: var(--text); font-size: 15px; padding: 0 10px;
  -webkit-appearance: none;
}
.search input::-webkit-search-cancel-button { display: none; }
.search input::placeholder { color: var(--sub); }
.search .clear {
  width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0;
  background: var(--sub); color: var(--card); font-size: 13px; line-height: 18px; margin-right: 6px;
}
.search .go {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: var(--primary); display: flex; align-items: center; justify-content: center;
}
.search .go svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; }

/* ---------- 卡片 / 分区 ---------- */
.home-main, .mine-main { padding: 0 16px; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 8px 6px;
  margin-bottom: 12px;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 8px 10px;
}
.card-title { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.card-title .emoji { font-size: 16px; }
.card-extra { font-size: 13px; color: var(--sub); display: flex; align-items: center; }
.card-extra.link { color: var(--primary); }
.card-extra svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }

/* ---------- 宫格图标 ---------- */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); row-gap: 4px; }
@media (min-width: 520px) { .grid { grid-template-columns: repeat(5, 1fr); } }

.app {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  padding: 6px 2px 10px; border-radius: 12px;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  transition: transform .12s;
}
.app:active { transform: scale(.92); }
.app-name {
  margin-top: 6px; max-width: 100%; font-size: 12px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.icon {
  width: 48px; height: 48px; flex-shrink: 0;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 19px; font-weight: 600; letter-spacing: -0.5px;
  overflow: hidden;
  box-shadow: inset 0 0 0 .5px rgba(0,0,0,.06);
  text-shadow: 0 1px 1px rgba(0,0,0,.12);
}
.icon.sm { width: 40px; height: 40px; border-radius: 12px; font-size: 16px; }
.icon img { width: 100%; height: 100%; object-fit: cover; }
.icon.add { background: var(--side) !important; color: var(--sub); font-size: 26px; font-weight: 300; text-shadow: none; border: 1px dashed var(--line); }

.badge {
  position: absolute; top: 0; left: 50%; margin-left: 14px;
  width: 20px; height: 20px; border-radius: 50%;
  font-size: 14px; line-height: 20px; text-align: center; color: #fff;
  display: none; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.editing .badge { display: block; }
.badge.add { background: var(--primary); }
.badge.remove { background: var(--danger); }
.editing .app .icon { animation: shake .28s ease-in-out infinite alternate; }
@keyframes shake { from { transform: rotate(-2.5deg); } to { transform: rotate(2.5deg); } }

/* ---------- 今日推荐 ---------- */
/* 与卡片同宽，不再用负边距外扩（之前在居中容器里会比卡片宽出 16px） */
.featured {
  display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 0 0 12px; padding: 0; scrollbar-width: none;
  border-radius: var(--radius);
}
.featured::-webkit-scrollbar { display: none; }
.feat {
  flex: 0 0 78%; max-width: 320px; scroll-snap-align: start;
  height: 120px; border-radius: var(--radius); padding: 16px;
  color: #fff; position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
}
.feat::after {
  content: ""; position: absolute; right: -30px; bottom: -40px;
  width: 140px; height: 140px; border-radius: 50%; background: rgba(255,255,255,.14);
}
.feat-tag { font-size: 11px; background: rgba(255,255,255,.22); padding: 2px 8px; border-radius: 10px; align-self: flex-start; }
.feat-title { font-size: 20px; font-weight: 700; }
.feat-sub { font-size: 13px; opacity: .9; }
.feat-go {
  position: absolute; right: 16px; bottom: 16px; z-index: 1;
  font-size: 12px; background: #fff; color: #333; padding: 4px 12px; border-radius: 14px; font-weight: 600;
}

/* ---------- 列表行 ---------- */
.list { padding: 0 8px; }
.row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; position: relative;
}
.row + .row { border-top: 1px solid var(--line); }
.row-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; }
.row-text { flex: 1; min-width: 0; }
.row-name { font-size: 15px; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.row-name span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-desc { font-size: 12px; color: var(--sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.rank { width: 22px; text-align: center; font-size: 16px; font-weight: 700; color: var(--sub); font-style: italic; flex-shrink: 0; }
.rank.r1 { color: #f04438; } .rank.r2 { color: #f97316; } .rank.r3 { color: #f5a524; }
.tag {
  flex-shrink: 0; font-size: 10px; line-height: 16px; padding: 0 5px; border-radius: 4px;
  color: #f04438; background: rgba(240, 68, 56, .1); font-weight: 500;
}
.tag.ai { color: #7a5af8; background: rgba(122, 90, 248, .12); }
.tag.mine { color: var(--primary); background: var(--primary-soft); }
.star, .del {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: var(--sub);
}
.star svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.star.on { color: #f5a524; }
.star.on svg { fill: currentColor; }
.del svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

mark { background: none; color: var(--primary); font-weight: 600; }

.web-search {
  display: flex; align-items: center; gap: 12px; padding: 12px 8px;
  color: var(--primary); font-size: 15px;
}
.web-search .icon { background: var(--primary-soft); color: var(--primary); text-shadow: none; }
.web-search svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* 横向最近使用 */
.hscroll { display: flex; overflow-x: auto; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll .app { flex: 0 0 25%; }
@media (min-width: 520px) { .hscroll .app { flex-basis: 20%; } }

.empty { text-align: center; color: var(--sub); padding: 16px 0 14px; font-size: 13px; }
.empty-page { padding: 72px 0; }
.empty .em { font-size: 40px; display: block; margin-bottom: 8px; }

.footer { text-align: center; color: var(--sub); font-size: 12px; padding: 8px 0 4px; }

/* ---------- 分类页 ---------- */
.page-header {
  display: flex; align-items: baseline; gap: 8px;
  padding: calc(14px + env(safe-area-inset-top)) 16px 12px;
  background: var(--card); border-bottom: 1px solid var(--line);
}
.page-header h1 { font-size: 20px; }
.page-header .sub { color: var(--sub); font-size: 13px; }

#page-category { padding-bottom: 0; }
.cat-layout {
  display: flex;
  height: calc(100vh - 54px - env(safe-area-inset-top) - var(--tabbar-h) - env(safe-area-inset-bottom));
  height: calc(100dvh - 54px - env(safe-area-inset-top) - var(--tabbar-h) - env(safe-area-inset-bottom));
}
.cat-side {
  width: 88px; flex-shrink: 0; overflow-y: auto; background: var(--side);
  scrollbar-width: none;
}
.cat-side::-webkit-scrollbar { display: none; }
.cat-side button {
  display: block; width: 100%; padding: 14px 6px; font-size: 13px; color: var(--sub);
  position: relative; text-align: center;
}
.cat-side button .emoji { display: block; font-size: 18px; margin-bottom: 2px; }
.cat-side button.active { background: var(--card); color: var(--text); font-weight: 600; }
.cat-side button.active::before {
  content: ""; position: absolute; left: 0; top: 50%; margin-top: -10px;
  width: 3px; height: 20px; border-radius: 0 2px 2px 0; background: var(--primary);
}
.cat-main { flex: 1; overflow-y: auto; background: var(--card); padding: 4px 12px 16px; -webkit-overflow-scrolling: touch; }
.cat-main .list { padding: 0; }
.cat-banner {
  margin: 10px 0 4px; padding: 14px; border-radius: 12px;
  background: var(--primary-soft); display: flex; align-items: center; gap: 10px;
}
.cat-banner .emoji { font-size: 28px; }
.cat-banner b { font-size: 16px; display: block; }
.cat-banner small { color: var(--sub); }

/* ---------- 我的 ---------- */
.profile {
  display: flex; align-items: center; gap: 14px;
  margin: 12px 0; padding: 18px 16px; border-radius: var(--radius);
  background: linear-gradient(135deg, #3b6cf6, #7a5af8); color: #fff;
}
.avatar { width: 54px; height: 54px; border-radius: 50%; background: rgba(255,255,255,.22); display: flex; align-items: center; justify-content: center; font-size: 28px; }
.profile b { font-size: 18px; display: block; }
.profile small { opacity: .85; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; padding: 2px 0 8px; }
.stats b { display: block; font-size: 20px; }
.stats span { color: var(--sub); font-size: 12px; }

.settings { padding: 0 8px; }
.set-row { display: flex; align-items: center; justify-content: space-between; min-height: 48px; font-size: 15px; width: 100%; text-align: left; }
.set-row + .set-row { border-top: 1px solid var(--line); }
.set-row .hint { color: var(--sub); font-size: 13px; }
.set-row.danger { color: var(--danger); }
.seg { display: flex; background: var(--side); border-radius: 8px; padding: 2px; }
.seg button { padding: 4px 10px; font-size: 13px; border-radius: 6px; color: var(--sub); }
.seg button.on { background: var(--card); color: var(--text); box-shadow: var(--shadow); font-weight: 500; }
.switch { width: 46px; height: 28px; border-radius: 14px; background: var(--line); position: relative; transition: background .2s; flex-shrink: 0; }
.switch::after { content: ""; position: absolute; left: 2px; top: 2px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.switch.on { background: var(--primary); }
.switch.on::after { transform: translateX(18px); }

/* ---------- 底部导航 ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  max-width: 640px; margin: 0 auto;
  display: flex; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--card) 88%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px);
  border-top: 1px solid var(--line);
}
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--sub); font-size: 11px; }
.tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.tabbar a.active { color: var(--primary); }
.tabbar a.active svg { fill: var(--primary-soft); }

/* ---------- 弹层 ---------- */
.mask { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 40; animation: fade .2s; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41;
  max-width: 640px; margin: 0 auto;
  background: var(--card); border-radius: 18px 18px 0 0;
  padding: 18px 16px calc(16px + env(safe-area-inset-bottom));
  animation: up .24s cubic-bezier(.2,.8,.2,1);
}
.sheet-title { font-size: 16px; font-weight: 600; text-align: center; margin-bottom: 14px; }
.engine-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.engine-list button { height: 44px; border-radius: 10px; background: var(--side); font-size: 14px; border: 1.5px solid transparent; }
.engine-list button.on { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); font-weight: 600; }
.sheet-cancel { display: block; width: 100%; height: 44px; margin-top: 14px; border-radius: 10px; background: var(--side); color: var(--sub); }

.field { display: flex; align-items: center; gap: 12px; height: 48px; border-bottom: 1px solid var(--line); }
.field span { width: 40px; color: var(--sub); flex-shrink: 0; }
.field input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 15px; }
.sheet-actions { display: flex; gap: 10px; margin-top: 18px; }
.btn { flex: 1; height: 44px; border-radius: 10px; font-size: 15px; }
.btn.ghost { background: var(--side); color: var(--sub); }
.btn.primary { background: var(--primary); color: #fff; font-weight: 600; }

@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(100%); } }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 24px + env(safe-area-inset-bottom));
  transform: translate(-50%, 10px);
  background: rgba(0,0,0,.8); color: #fff; padding: 8px 16px; border-radius: 20px;
  font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  z-index: 100; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  .editing .app .icon { animation: none; }
  .sheet, .mask { animation: none; }
}

/* ---------- 首页分栏（移动端单列，按 order 排序） ---------- */
.home-cols { display: flex; flex-direction: column; }
.col-main, .col-side { display: contents; }
.o-fav { order: 1; } .o-feat { order: 2; } .o-recent { order: 3; } .o-hot { order: 4; } .o-cat { order: 5; }
.tabbar .brand, .tabbar .kbd { display: none; }

/* ---------- 桌面端 ---------- */
@media (min-width: 960px) {
  body { max-width: none; padding-left: 220px; }
  .page { max-width: 1240px; margin: 0 auto; padding-bottom: 40px; }

  /* 底部 Tab → 左侧边栏 */
  .tabbar {
    top: 0; bottom: 0; left: 0; right: auto; width: 220px; height: auto; max-width: none; margin: 0;
    flex-direction: column; gap: 4px; padding: 24px 14px;
    border-top: 0; border-right: 1px solid var(--line); background: var(--card);
  }
  .tabbar .brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 20px; font-size: 18px; font-weight: 700; }
  .tabbar .brand i { font-style: normal; font-size: 24px; }
  .tabbar a { flex: none; flex-direction: row; justify-content: flex-start; gap: 12px; height: 44px; padding: 0 14px; border-radius: 10px; font-size: 15px; color: var(--text); }
  .tabbar a:hover { background: var(--side); }
  .tabbar a.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
  .tabbar .kbd { margin-top: auto; padding: 0 10px; color: var(--sub); font-size: 12px; display: block; }
  .tabbar .kbd b { display: inline-block; min-width: 18px; padding: 0 4px; border: 1px solid var(--line); border-radius: 4px; text-align: center; font-weight: 500; }

  .home-header { padding: 40px 32px 24px; background: none; }
  .greet { font-size: 30px; }
  .search { max-width: 720px; height: 52px; border-radius: 26px; margin-top: 20px; }
  .search .go { width: 42px; height: 42px; }
  .search input { font-size: 16px; }
  .home-main, .mine-main { padding: 0 32px; }

  .home-cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
  .col-main, .col-side { display: block; min-width: 0; }
  .col-side { position: sticky; top: 16px; }

  .grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .app:hover { background: var(--side); }
  .row-main:hover .row-name { color: var(--primary); }
  .star:hover, .del:hover { background: var(--side); }
  .card { padding: 18px 12px 10px; }

  .feat { flex: 0 0 calc((100% - 20px) / 3); max-width: none; height: 132px; transition: transform .15s, box-shadow .15s; }
  .feat:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.12); }

  /* 分类页 */
  .page-header { padding: 28px 32px 16px; background: none; border: 0; }
  .page-header h1 { font-size: 26px; }
  #page-category { padding-bottom: 0; }
  .cat-layout { height: calc(100vh - 80px); margin: 0 32px 24px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
  .cat-side { width: 168px; padding: 8px 0; }
  .cat-side button { display: flex; align-items: center; gap: 8px; padding: 12px 20px; text-align: left; font-size: 14px; }
  .cat-side button .emoji { display: inline; margin: 0; font-size: 16px; }
  .cat-side button:hover { color: var(--text); }
  .cat-main { padding: 8px 24px 24px; }
  .cat-main .list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); column-gap: 24px; }
  .cat-main .row + .row { border-top: 0; }
  .cat-main .row { border-bottom: 1px solid var(--line); }

  /* 我的 */
  .mine-main { max-width: 880px; }

  /* 弹层居中 */
  .sheet {
    top: 50%; left: 50%; right: auto; bottom: auto; width: 440px; margin: 0;
    transform: translate(-50%, -50%); border-radius: 16px; padding: 24px;
    animation: pop .2s ease-out;
  }
  .toast { bottom: 40px; margin-left: 110px; }
}
@keyframes pop { from { opacity: 0; transform: translate(-50%, -47%) scale(.97); } }

/* 图标图片加载失败时回退为文字 */
.icon b { display: none; font-weight: 600; }
.icon.broken { background: var(--fb) !important; }
.icon.broken img { display: none; }
.icon.broken b { display: inline; }

/* 热力图展示模式（后台嵌入） */
.hm-doc { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 999; }
.hm-fix { position: fixed; left: 0; top: 0; pointer-events: none; z-index: 1000; }
html.hm .feat:hover, html.hm .app:active { transform: none; }
html.hm .nt-track { animation: none; }

/* ================================================================ 首页模块（后台可配置布局） */
.card.no-head { padding-top: 10px; }
/* 模块包一层后成为 flex 子项，默认 min-width:auto 会被横滑内容撑宽 */
.blk, .tabpane { min-width: 0; max-width: 100%; }
#page-home.no-greet .hello, #page-home.no-greet .quote { display: none; }
#page-home.no-search .home-header > .search { display: none; }
#page-home.no-greet.no-search:not(.has-brand) .home-header { padding-bottom: 4px; }
#page-home.no-greet .home-header > .search { margin-top: 4px; }

/* ---- 品牌栏：左品牌 / 中搜索 / 右下载 ---- */
.brandbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; min-height: 40px; }
#page-home.no-greet .brandbar { margin-bottom: 4px; }
.br-left { display: flex; align-items: center; gap: 8px; flex-shrink: 0; min-width: 0; }
.br-logo { width: 34px; height: 34px; border-radius: 10px; overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--primary); color: #fff; font-weight: 700; font-size: 16px; }
.br-logo img { width: 100%; height: 100%; object-fit: cover; }
.br-logo b { display: none; }
.br-logo.broken img { display: none; }
.br-logo.broken b { display: inline; }
.br-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.br-text b { font-size: 15px; font-weight: 700; white-space: nowrap; }
.br-text small { font-size: 11px; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px; }
.br-mid { flex: 1; min-width: 0; }
.br-mid .search { margin-top: 0; height: 36px; position: static; padding: 0 3px 0 4px; }
.br-mid .search .go { width: 30px; height: 30px; }
.br-mid .search .go svg { width: 15px; height: 15px; }
.br-mid .search input { font-size: 14px; padding: 0 8px; }
.br-mid .engine { display: none; }
.br-right { position: relative; flex-shrink: 0; }
.br-dl { display: flex; align-items: center; gap: 4px; height: 32px; padding: 0 12px; border-radius: 16px; background: var(--primary); color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; }
.br-dl svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.br-qr { display: none; }
/* 手机上下载按钮只留文字，给搜索框多留点位置；很窄的屏幕再隐藏域名 */
@media (max-width: 959px) { .br-dl svg { display: none; } .br-dl { padding: 0 11px; } }
@media (max-width: 374px) { .br-text small { display: none; } .br-dl { padding: 0 10px; } }

/* ---- 公告 ---- */
.notice { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; margin-bottom: 12px; border-radius: 19px; background: var(--card); box-shadow: var(--shadow); font-size: 13px; overflow: hidden; }
.nt-icon { width: 18px; height: 18px; flex-shrink: 0; fill: var(--primary-soft); stroke: var(--primary); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nt-m, .nt-v { flex: 1; min-width: 0; overflow: hidden; height: 20px; line-height: 20px; }
.nt-track { display: inline-flex; white-space: nowrap; animation: nt-run 16s linear infinite; }
.nt-m.static .nt-track { animation: none; }
.nt-m.static .nt-run + .nt-run { display: none; }
.nt-run { display: inline-flex; align-items: center; flex-shrink: 0; }
.nt-m.static .nt-run { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; display: block; }
.nt-m.static .nt-track { display: block; }
.nt-m:hover .nt-track { animation-play-state: paused; }
@keyframes nt-run { to { transform: translateX(-50%); } }
.nt-sep { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--sub); opacity: .5; margin: 0 14px; }
.nt-m.static .nt-run > .nt-sep:last-child { display: none; }
.nt-list { transition: transform .45s ease; }
.nt-i { height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notice a:hover { color: var(--primary); }

/* ---- 轮播（整屏一张，自动播放） ---- */
.banner { position: relative; margin-bottom: 12px; border-radius: var(--radius); overflow: hidden; }
.bn-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.bn-track::-webkit-scrollbar { display: none; }
.banner .feat { flex: 0 0 100%; max-width: none; height: auto; aspect-ratio: var(--ratio); scroll-snap-align: start; border-radius: 0; }
.feat.has-img { padding: 0; justify-content: flex-end; background: var(--side); }
.feat.has-img::after { display: none; }
.sl-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feat.has-img .feat-tag { position: absolute; left: 12px; top: 12px; z-index: 1; background: rgba(0,0,0,.35); }
.feat.has-img .sl-text { position: relative; z-index: 1; padding: 28px 16px 14px; background: linear-gradient(transparent, rgba(0,0,0,.55)); }
.feat.has-img .feat-title { font-size: 17px; }
.featured .feat.has-img { padding: 0; }
.bn-dots { position: absolute; left: 0; right: 0; bottom: 8px; display: flex; justify-content: center; gap: 5px; pointer-events: none; }
.bn-dots button { width: 6px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.55); pointer-events: auto; transition: width .2s, background .2s; padding: 0; }
.bn-dots button.on { width: 16px; background: #fff; }

/* ---- 导航 Tab ---- */
.navtabs { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; padding: 6px 4px 10px; margin-bottom: 4px; background: var(--bg); }
.navtabs::-webkit-scrollbar { display: none; }
.navtabs.sticky { position: sticky; top: 0; z-index: 5; }
.navtabs button { position: relative; flex-shrink: 0; font-size: 16px; color: var(--sub); padding: 4px 0 8px; transition: color .15s, font-size .15s; }
.navtabs button.on { color: var(--text); font-size: 18px; font-weight: 700; }
.navtabs button.on::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 20px; height: 7px; margin-left: -10px; border: 3px solid var(--primary); border-top: 0; border-radius: 0 0 12px 12px; box-sizing: border-box; }

/* ---- App 列表样式 ---- */
.grid.g4 { grid-template-columns: repeat(4, 1fr); }
.grid.g5 { grid-template-columns: repeat(5, 1fr); }
.rankgrid .rk { position: absolute; top: 2px; left: 50%; margin-left: -30px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--sub); color: #fff; font-size: 11px; font-weight: 700; font-style: italic; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--card); }
.rankgrid .rk.r1 { background: #f04438; } .rankgrid .rk.r2 { background: #f97316; } .rankgrid .rk.r3 { background: #f5a524; }
.editing .rankgrid .rk { display: none; }
.grid.g5 .icon { width: 44px; height: 44px; border-radius: 13px; font-size: 17px; }

@media (min-width: 960px) {
  .home-cols.no-side { grid-template-columns: minmax(0, 1fr); }
  .grid.g4, .grid.g5 { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .grid.g5 .icon { width: 48px; height: 48px; border-radius: 14px; font-size: 19px; }
  .brandbar { margin-bottom: 20px; gap: 24px; }
  .br-logo { width: 40px; height: 40px; border-radius: 12px; font-size: 18px; }
  .br-text b { font-size: 18px; }
  .br-text small { font-size: 12px; max-width: 200px; }
  .br-mid { display: flex; justify-content: center; }
  .br-mid .search { width: 100%; max-width: 640px; height: 44px; }
  .br-mid .search .go { width: 36px; height: 36px; }
  .br-mid .engine { display: flex; }
  .br-dl { height: 38px; padding: 0 18px; border-radius: 19px; font-size: 14px; }
  .br-qr { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; padding: 10px; background: var(--card); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.14); text-align: center; }
  .br-qr img { width: 132px; height: 132px; display: block; }
  .br-qr small { display: block; margin-top: 6px; font-size: 12px; color: var(--sub); }
  .br-right:hover .br-qr { display: block; }
  .banner .feat { transition: none; max-height: 260px; }
  .banner { max-width: 100%; }
  .banner .feat:hover { transform: none; box-shadow: none; }
  .navtabs { padding-top: 10px; }
}

/* 后台预览：选中的模块描边 */
html.pv [data-b], html.pv .brandbar { cursor: pointer; }
html.pv .pv-sel { outline: 2px solid #3b6cf6; outline-offset: 3px; border-radius: 12px; }
html.pv .blk-nav.pv-sel { outline-offset: 0; }

/* ================================================================ 短视频 / 短剧 */
/* ---------- 竖屏滑动播放（短视频页、短剧播放器共用） ---------- */
.feed {
  position: relative; height: 100%; overflow-y: auto; overscroll-behavior: contain;
  scroll-snap-type: y mandatory; scrollbar-width: none; background: #000;
}
.feed::-webkit-scrollbar { display: none; }
.fd-slide {
  position: relative; height: 100%; overflow: hidden; color: #fff;
  scroll-snap-align: start; scroll-snap-stop: always; background: #000;
}
.fd-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fd-poster.blur { filter: blur(24px) brightness(.55); transform: scale(1.15); }
.fd-poster.fit { object-fit: contain; }
.fd-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .2s; background: transparent; }
.fd-video.show { opacity: 1; }
.fd-hit { position: absolute; inset: 0; z-index: 1; cursor: pointer; }
.fd-slide::after { /* 底部渐暗，文字更清楚 */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 45%; z-index: 1; pointer-events: none;
  background: linear-gradient(transparent, rgba(0,0,0,.6));
}
.fd-bigplay {
  position: absolute; left: 50%; top: 50%; z-index: 2; width: 72px; height: 72px; margin: -36px 0 0 -36px;
  display: none; align-items: center; justify-content: center; border-radius: 50%; background: rgba(0,0,0,.35); pointer-events: none;
}
.fd-bigplay svg { width: 38px; height: 38px; fill: rgba(255,255,255,.92); margin-left: 4px; }
.fd-slide.paused .fd-bigplay { display: flex; animation: fade .15s; }
.fd-spin {
  position: absolute; left: 50%; top: 50%; z-index: 2; width: 34px; height: 34px; margin: -17px 0 0 -17px; display: none;
  border: 3px solid rgba(255,255,255,.25); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; pointer-events: none;
}
.fd-slide.loading .fd-spin { display: block; animation-delay: .3s; }
.fd-errmsg { position: absolute; left: 0; right: 0; top: 50%; z-index: 2; display: none; text-align: center; font-size: 14px; color: rgba(255,255,255,.8); }
.fd-slide.err .fd-errmsg { display: block; }
.fd-slide.err .fd-spin { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.fd-side {
  position: absolute; right: 8px; bottom: 96px; z-index: 3; width: 60px;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
}
.fd-ava { width: 46px; height: 46px; border-radius: 50%; border: 2px solid #fff; overflow: hidden; background: #fe2c55; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; }
.fd-ava img { width: 100%; height: 100%; object-fit: cover; }
.fd-act { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 12px; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.4); }
.fd-act svg { width: 34px; height: 34px; fill: rgba(255,255,255,.95); filter: drop-shadow(0 1px 3px rgba(0,0,0,.35)); transition: transform .15s; }
.fd-act:active svg { transform: scale(.85); }
.fd-act.on svg { fill: #fe2c55; }
.fd-act[data-follow].on svg { fill: #ffc53d; }
.fd-info {
  position: absolute; left: 14px; right: 80px; bottom: 26px; z-index: 3;
  text-shadow: 0 1px 3px rgba(0,0,0,.45); pointer-events: none;
}
.fd-info a { pointer-events: auto; }
.fd-author { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.fd-title { font-size: 15px; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fd-desc { margin-top: 4px; font-size: 13px; opacity: .88; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fd-cta {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%; margin-top: 10px; padding: 6px 10px 6px 6px;
  border-radius: 8px; background: rgba(255,255,255,.18); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-size: 13px; font-weight: 600; text-shadow: none;
}
.fd-cta:not(:has(.icon)) { padding-left: 12px; }
.fd-cta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-cta svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; flex-shrink: 0; }
.fd-cta .icon { width: 24px; height: 24px; border-radius: 6px; font-size: 11px; flex-shrink: 0; }
.fd-cta .icon img { width: 100%; height: 100%; }
.fd-prog { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; height: 14px; display: flex; align-items: flex-end; cursor: pointer; touch-action: none; }
.fd-prog::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255,255,255,.2); }
.fd-prog i { position: relative; display: block; height: 2px; width: 0; background: rgba(255,255,255,.85); }
.fd-prog.drag::before, .fd-prog.drag i, .fd-prog:hover::before, .fd-prog:hover i { height: 4px; }
.fd-slide:not(.on) .fd-prog { display: none; }
.fd-burst { position: absolute; z-index: 5; width: 96px; height: 96px; margin: -48px 0 0 -48px; pointer-events: none; animation: burst .8s ease-out forwards; }
.fd-burst svg { width: 100%; height: 100%; fill: #fe2c55; filter: drop-shadow(0 4px 10px rgba(254,44,85,.5)); }
@keyframes burst { 0% { transform: scale(.4) rotate(-12deg); opacity: 0; } 20% { transform: scale(1.1) rotate(-12deg); opacity: 1; } 100% { transform: scale(1.5) translateY(-60px) rotate(-12deg); opacity: 0; } }
.fd-empty { height: 100%; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.6); }
.fd-mute {
  position: absolute; left: 50%; top: calc(16px + env(safe-area-inset-top)); z-index: 6; transform: translateX(-50%);
  display: none; padding: 7px 14px; border-radius: 18px; background: rgba(0,0,0,.55); color: #fff; font-size: 13px; white-space: nowrap;
}
html.v-muted .fd-mute { display: block; }
.vd-steps { display: none; }

/* ---------- 短视频页 ---------- */
.page-video { padding-bottom: 0; }
.vd-wrap {
  position: fixed; left: 0; right: 0; top: 0; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  max-width: 640px; margin: 0 auto; background: #000;
}
html[data-page="video"], html[data-page="video"] body { background: #000; }
html[data-page="video"] .tabbar { background: #000; border-top-color: #1a1a1a; -webkit-backdrop-filter: none; backdrop-filter: none; }
html[data-page="video"] .tabbar a { color: rgba(255,255,255,.55); }
html[data-page="video"] .tabbar a.active { color: #fff; }
html[data-page="video"] .tabbar a.active svg { fill: rgba(255,255,255,.15); }
html[data-page="video"] .toast { bottom: calc(var(--tabbar-h) + 90px + env(safe-area-inset-bottom)); }

/* ---------- 短剧播放器 ---------- */
.player { position: fixed; inset: 0; z-index: 30; background: #000; display: flex; justify-content: center; }
html.pl-open, html.pl-open body { overflow: hidden; }
.pl-stage { position: relative; flex: 1; max-width: 640px; height: 100%; }
.pl-top {
  position: absolute; left: 0; right: 0; top: 0; z-index: 6; display: flex; align-items: center; gap: 4px;
  padding: calc(8px + env(safe-area-inset-top)) 12px 18px 4px; color: #fff;
  background: linear-gradient(rgba(0,0,0,.45), transparent); pointer-events: none;
}
.pl-back { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; pointer-events: auto; }
.pl-back svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pl-title { min-width: 0; display: flex; flex-direction: column; }
.pl-title b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-title small { font-size: 12px; opacity: .75; }
.player .fd-mute { top: calc(60px + env(safe-area-inset-top)); }
.player .fd-side { bottom: 120px; }
.player .fd-info { bottom: 66px; }
.pl-epbar {
  position: absolute; left: 12px; right: 12px; bottom: 16px; z-index: 3; height: 40px; padding: 0 12px;
  display: flex; align-items: center; justify-content: space-between; border-radius: 10px;
  background: rgba(255,255,255,.14); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: #fff; font-size: 14px;
}
.pl-epbar span { display: flex; align-items: center; gap: 8px; }
.pl-epbar svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.pl-lock {
  position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(0,0,0,.35);
}
.pl-lock-in { width: 100%; max-width: 300px; padding: 26px 20px; border-radius: 18px; text-align: center; background: rgba(20,20,24,.82); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.pl-lock-in b { display: block; font-size: 20px; }
.pl-lock-in b::before { content: "🔒 "; }
.pl-lock-in p { margin-top: 8px; font-size: 14px; color: rgba(255,255,255,.7); }
.pl-unlock {
  display: block; margin-top: 18px; height: 44px; line-height: 44px; border-radius: 22px; font-size: 15px; font-weight: 600;
  background: linear-gradient(90deg, #ff5a5f, #ff8a3d); color: #fff;
}
.pl-side { display: none; }
.ep-mask { position: absolute; inset: 0; z-index: 10; background: rgba(0,0,0,.45); animation: fade .2s; }
.ep-sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 11; max-width: 640px; margin: 0 auto; max-height: 62%;
  display: flex; flex-direction: column; background: #1c1c20; color: #fff; border-radius: 18px 18px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); animation: up .24s cubic-bezier(.2,.8,.2,1);
}
.ep-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.ep-head b { display: block; font-size: 16px; }
.ep-head small { font-size: 12px; color: rgba(255,255,255,.6); }
.ep-head button { width: 32px; height: 32px; color: rgba(255,255,255,.7); font-size: 16px; }
.ep-body { overflow-y: auto; }
.ep-ranges { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 12px; scrollbar-width: none; }
.ep-ranges button { flex-shrink: 0; padding: 4px 12px; border-radius: 14px; font-size: 13px; background: rgba(255,255,255,.08); color: rgba(255,255,255,.7); }
.ep-ranges button.on { background: rgba(255,90,95,.18); color: #ff6b6f; }
.ep-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.ep { position: relative; height: 44px; border-radius: 8px; background: rgba(255,255,255,.08); color: #fff; font-size: 15px; }
.ep:hover { background: rgba(255,255,255,.14); }
.ep.on { background: rgba(255,90,95,.2); color: #ff6b6f; font-weight: 700; box-shadow: inset 0 0 0 1.5px #ff5a5f; }
.ep.lock { color: rgba(255,255,255,.45); }
.ep i { position: absolute; right: 3px; top: 1px; font-style: normal; font-size: 9px; }

/* ---------- 短剧列表页 ---------- */
.drama-main { padding: 12px 16px 0; }
.dr-sec h2 { font-size: 16px; margin: 4px 0 10px; }
.dr-sec { margin-bottom: 16px; }
.dr-chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 14px; padding: 0 16px; scrollbar-width: none; }
.dr-chips::-webkit-scrollbar { display: none; }
.dr-chips button { flex-shrink: 0; height: 30px; padding: 0 14px; border-radius: 15px; background: var(--card); color: var(--sub); font-size: 13px; box-shadow: var(--shadow); }
.dr-chips button.on { background: var(--text); color: var(--bg); font-weight: 600; }
.dr-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 10px; }
.dr-card { display: flex; flex-direction: column; min-width: 0; }
.dr-poster { position: relative; display: block; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; background: linear-gradient(160deg, #3b3f58, #1d1f2b); }
.dr-poster img, .vc-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dr-poster .ph, .vc-cover .ph { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 10px; color: #fff; font-weight: 700; font-size: 14px; line-height: 1.3; }
.dr-eps {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 6px; font-size: 11px; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.65));
}
.dr-tag { position: absolute; right: 0; top: 0; padding: 2px 7px; border-radius: 0 0 0 8px; font-size: 11px; color: #fff; background: linear-gradient(90deg, #ff5a5f, #ff8a3d); }
.dr-name { margin-top: 6px; font-size: 14px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dr-sub { margin-top: 2px; font-size: 12px; color: var(--sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dr-scroll { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.dr-scroll::-webkit-scrollbar { display: none; }
.dr-scroll .dr-card { flex: 0 0 28%; }
.card .dr-scroll { margin: 0 -14px; padding: 0 14px; }
.card .dr-grid { gap: 12px 8px; padding-top: 2px; }
.dr-list { display: flex; flex-direction: column; gap: 12px; }
.dr-row { display: flex; align-items: center; gap: 12px; }
.dr-row .dr-poster { width: 72px; flex-shrink: 0; border-radius: 8px; }
.dr-rt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.dr-rt b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dr-rt small { font-size: 12px; color: var(--sub); }
.dr-desc { font-size: 12px; color: var(--sub); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dr-go { flex-shrink: 0; display: flex; align-items: center; gap: 2px; height: 30px; padding: 0 12px 0 8px; border-radius: 15px; font-size: 13px; font-weight: 600; color: #fff; background: linear-gradient(90deg, #ff5a5f, #ff8a3d); }
.dr-go svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- 首页：短视频模块 ---------- */
.vscroll { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px; }
.vscroll::-webkit-scrollbar { display: none; }
.vscroll .vcard { flex: 0 0 30%; }
.vgrid { display: grid; gap: 10px 8px; }
.vgrid.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.vgrid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.vcard { display: flex; flex-direction: column; min-width: 0; }
.vc-cover { position: relative; display: block; aspect-ratio: 9 / 16; border-radius: 10px; overflow: hidden; background: linear-gradient(160deg, #444a63, #1f2230); }
.vgrid.g2 .vc-cover { aspect-ratio: 3 / 4; }
.vc-likes { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 3px; padding: 16px 7px 5px; font-size: 11px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.55)); }
.vc-likes svg { width: 12px; height: 12px; fill: currentColor; }
.vc-title { margin-top: 5px; font-size: 13px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

@media (min-width: 520px) {
  .dr-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .card .dr-grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .vscroll .vcard { flex-basis: 23%; }
}

@media (min-width: 960px) {
  /* 短视频：居中一列 9:16，右边上下切换按钮 */
  .page-video { max-width: none; }
  .vd-wrap { position: relative; inset: auto; max-width: none; height: 100vh; padding: 16px 0; display: flex; justify-content: center; background: #000; }
  .vd-wrap .feed { width: calc((100vh - 32px) * 9 / 16); max-width: 100%; border-radius: 14px; }
  .vd-wrap .fd-mute { top: 32px; }
  .vd-steps { display: flex; flex-direction: column; gap: 12px; position: absolute; right: 40px; top: 50%; transform: translateY(-50%); }
  .vd-steps button { width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,.12); display: flex; align-items: center; justify-content: center; }
  .vd-steps button:hover { background: rgba(255,255,255,.22); }
  .vd-steps svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
  html[data-page="video"] .tabbar { background: #111; border-right-color: #222; }
  html[data-page="video"] .tabbar .brand, html[data-page="video"] .tabbar .kbd { color: rgba(255,255,255,.8); }
  html[data-page="video"] .tabbar a { color: rgba(255,255,255,.7); }
  html[data-page="video"] .tabbar a:hover { background: rgba(255,255,255,.08); }
  html[data-page="video"] .tabbar a.active { background: rgba(255,255,255,.12); color: #fff; }
  html[data-page="video"] .toast { bottom: 40px; }
  .fd-side { right: 10px; }
  .fd-act:hover svg { transform: scale(1.08); }

  /* 短剧播放器：左边播放、右边剧集信息和选集 */
  .player { background: #0b0b0d; padding: 16px; gap: 20px; }
  .pl-stage { flex: none; width: calc((100vh - 32px) * 9 / 16); border-radius: 14px; overflow: hidden; }
  .pl-stage .vd-steps { right: -72px; }
  .pl-stage { overflow: visible; }
  .pl-stage .feed { border-radius: 14px; }
  .pl-top { border-radius: 14px 14px 0 0; }
  .pl-epbar, .player .fd-side [data-eps] { display: none; }
  .player .fd-info { bottom: 26px; }
  .player .fd-side { bottom: 80px; }
  .pl-side { display: flex; flex-direction: column; width: 360px; margin-left: 60px; padding: 24px; border-radius: 14px; background: #17171b; color: #fff; overflow: hidden; }
  .pl-side-head { display: flex; gap: 14px; }
  .pl-side-cover { width: 84px; height: 112px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
  .pl-side-head h2 { font-size: 18px; line-height: 1.35; }
  .pl-side-head small { display: block; margin-top: 4px; font-size: 13px; color: rgba(255,255,255,.6); }
  .pl-side-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
  .pl-side-tags span { padding: 1px 8px; border-radius: 10px; font-size: 12px; background: rgba(255,255,255,.1); color: rgba(255,255,255,.75); }
  .pl-side-desc { margin-top: 14px; font-size: 13px; line-height: 1.6; color: rgba(255,255,255,.7); }
  .pl-follow { display: flex; align-items: center; justify-content: center; gap: 6px; height: 38px; margin-top: 16px; border-radius: 19px; background: rgba(255,255,255,.1); font-size: 14px; }
  .pl-follow svg { width: 18px; height: 18px; fill: currentColor; }
  .pl-follow.on { color: #ffc53d; }
  .pl-side-title { margin: 22px 0 10px; font-weight: 600; }
  .pl-side-eps { flex: 1; overflow-y: auto; margin-right: -8px; padding-right: 8px; }
  .pl-side .ep-grid { grid-template-columns: repeat(5, 1fr); }

  .drama-main { padding: 0 32px; }
  .dr-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 20px 16px; }
  .card .dr-grid.g3 { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .dr-scroll { margin: 0; padding: 0; }
  .dr-scroll .dr-card { flex: 0 0 150px; }
  .dr-card:hover .dr-name, .dr-row:hover b, .vcard:hover .vc-title { color: var(--primary); }
  .dr-poster img, .vc-cover img { transition: transform .25s; }
  .dr-card:hover .dr-poster img, .vcard:hover .vc-cover img { transform: scale(1.04); }
  .vscroll .vcard { flex-basis: 150px; }
  .vgrid.g2, .vgrid.g3 { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .fd-burst, .ep-sheet { animation: none; } }
.fd-slide:has(.pl-lock) .fd-poster.fit { display: none; }

/* ---------- 付费解锁 ---------- */
.pl-lock-in.pay em { font-style: normal; color: #ffb547; font-weight: 700; }
.pl-lock-in.pay .pl-unlock { width: 100%; border: 0; cursor: pointer; }
.pl-unlock2, .pl-vip {
  display: block; width: 100%; height: 40px; margin-top: 10px; border-radius: 20px; font-size: 14px; color: #fff;
  background: rgba(255,255,255,.12);
}
.pl-vip { background: linear-gradient(90deg, rgba(255,197,61,.22), rgba(255,138,61,.22)); color: #ffd27a; }
.pl-auto { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 12px; color: rgba(255,255,255,.6); cursor: pointer; }
.pl-auto input { accent-color: #ff5a5f; }

/* ---------- 钱包 ---------- */
.wl-mask { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.5); animation: fade .2s; }
.wl-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; max-width: 520px; margin: 0 auto; max-height: 88vh; overflow-y: auto;
  background: var(--card); color: var(--text); border-radius: 18px 18px 0 0;
  padding: 16px 16px calc(18px + env(safe-area-inset-bottom)); animation: up .24s cubic-bezier(.2,.8,.2,1);
}
.wl-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.wl-head b { font-size: 17px; }
.wl-head button { width: 32px; height: 32px; color: var(--sub); font-size: 16px; }
.wl-bal { display: flex; gap: 10px; }
.wl-bal > div { flex: 1; padding: 12px 14px; border-radius: 14px; background: linear-gradient(135deg, #fff4e0, #ffe3c2); color: #7a4100; }
.wl-bal small { display: block; font-size: 12px; opacity: .75; }
.wl-bal b { font-size: 26px; line-height: 1.3; }
.wl-bal .wl-vip { background: linear-gradient(135deg, #2d2a3e, #4a3f6b); color: #f6d58e; }
.wl-bal .wl-vip span { display: block; margin-top: 6px; font-size: 14px; font-weight: 600; }
.wl-tabs { display: flex; gap: 20px; margin: 16px 0 10px; border-bottom: 1px solid var(--line); }
.wl-tabs button { position: relative; padding: 8px 0; font-size: 15px; color: var(--sub); }
.wl-tabs button.on { color: var(--text); font-weight: 700; }
.wl-tabs button.on::after { content: ""; position: absolute; left: 20%; right: 20%; bottom: -1px; height: 3px; border-radius: 2px; background: #ff5a5f; }
.wl-items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.wl-item {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 4px 10px;
  border-radius: 12px; background: var(--side); border: 1.5px solid transparent;
}
.wl-item.on { border-color: #ff5a5f; background: rgba(255,90,95,.08); }
.wl-item b { font-size: 18px; }
.wl-item b small { font-size: 11px; font-weight: 400; margin-left: 2px; }
.wl-item span { font-size: 11px; color: #ff6b3d; }
.wl-item em { margin-top: 4px; font-style: normal; font-size: 13px; color: var(--sub); }
.wl-item i { position: absolute; left: -1px; top: -8px; padding: 1px 7px; border-radius: 8px 8px 8px 0; font-size: 10px; font-style: normal; color: #fff; background: linear-gradient(90deg, #ff5a5f, #ff8a3d); }
.wl-note { margin-top: 10px; font-size: 12px; color: var(--sub); text-align: center; }
.wl-chs { display: flex; gap: 8px; margin-top: 14px; }
.wl-chs button { flex: 1; height: 38px; border-radius: 10px; background: var(--side); font-size: 13px; border: 1.5px solid transparent; }
.wl-chs button.on { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); font-weight: 600; }
.wl-pay { display: block; width: 100%; height: 46px; margin-top: 12px; border-radius: 23px; font-size: 16px; font-weight: 700; color: #fff; background: linear-gradient(90deg, #ff5a5f, #ff8a3d); }
.wl-pay:disabled { opacity: .6; }
.wl-sec { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.wl-label { display: flex; align-items: baseline; gap: 8px; font-weight: 600; margin-bottom: 8px; }
.wl-label small { font-weight: 400; font-size: 12px; color: var(--sub); }
.wl-label a { margin-left: auto; font-weight: 400; font-size: 13px; color: var(--primary); }
.wl-row { display: flex; gap: 8px; }
.wl-row input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--input); color: var(--text); font-size: 14px; text-transform: uppercase; }
.wl-row button { padding: 0 16px; border-radius: 10px; background: var(--primary); color: #fff; font-size: 14px; }
.wl-code { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; padding: 8px 12px; border-radius: 10px; background: var(--side); }
.wl-code b { font-family: ui-monospace, Menlo, monospace; font-size: 18px; letter-spacing: 2px; }
.wl-code button { font-size: 13px; color: var(--primary); }
.wl-entry { padding: 0 !important; }
.wl-entry button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; text-align: left; }
.wl-ico { font-size: 28px; }
.wl-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wl-t b { font-size: 15px; }
.wl-t small { font-size: 12px; color: var(--sub); }
.wl-go { display: flex; align-items: center; padding: 5px 8px 5px 12px; border-radius: 14px; font-size: 13px; font-weight: 600; color: #fff; background: linear-gradient(90deg, #ff5a5f, #ff8a3d); }
.wl-go svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; }
@media (min-width: 960px) {
  .wl-sheet { top: 50%; bottom: auto; transform: translateY(-50%); border-radius: 18px; animation: fade .2s; }
}
