/* Kozlar H5 — ref UI fix v39 */
@font-face {
  font-family: "UKIJEKRAN";
  src: url("../fonts/UKIJEKRAN.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root,
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #070709;
  --bg-elevated: #0f0f14;
  --surface: #14141c;
  --surface-hover: #1c1c28;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.12);
  --text: #f4f4f6;
  --text-muted: #8b8b98;
  --text-dim: #5c5c6a;
  --accent: #c8a45c;
  --accent-soft: rgba(200, 164, 92, 0.14);
  --accent-glow: rgba(200, 164, 92, 0.35);
  --radius: 14px;
  --radius-sm: 10px;
  --header-h: 64px;
  --max-w: 1280px;
  --shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  --font-zh: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-ug: "UKIJEKRAN", "UKIJ Tuz Tom", "Noto Naskh Arabic", "Noto Sans Arabic", "Segoe UI", sans-serif;
  --font: var(--font-zh);
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --chrome-bg: rgba(10, 10, 14, 0.94);
  --chrome-solid: #0a0a0e;
  --bg-glow-1: rgba(200, 164, 92, 0.08);
  --bg-glow-2: rgba(40, 40, 60, 0.4);
  --glass-bg: rgba(22, 22, 32, 0.55);
  --glass-bg-soft: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-highlight: rgba(255, 255, 255, 0.16);
  --glass-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --tab-h: 64px;
  --top-bar-h: 52px;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f3f7;
  --bg-elevated: #fff;
  --surface: #fff;
  --surface-hover: #ececf2;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);
  --text: #121218;
  --text-muted: #5c5c6a;
  --text-dim: #7a7a88;
  --accent: #9a7828;
  --accent-soft: rgba(154, 120, 40, 0.12);
  --accent-glow: rgba(154, 120, 40, 0.28);
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
  --chrome-bg: rgba(255, 255, 255, 0.96);
  --chrome-solid: #fff;
  --bg-glow-1: rgba(154, 120, 40, 0.07);
  --bg-glow-2: rgba(0, 0, 0, 0.04);
  --glass-bg: rgba(255, 255, 255, 0.58);
  --glass-bg-soft: rgba(255, 255, 255, 0.48);
  --glass-border: rgba(40, 40, 55, 0.12);
  --glass-highlight: rgba(255, 255, 255, 0.85);
  --glass-shadow: 0 14px 36px rgba(0, 0, 0, 0.12);
}

*, *::before, *::after { box-sizing: border-box; }

/* 维语：UKIJ Ekran，与后台/H5 一致 */
html[lang="ug"],
html[data-lang="ug"],
html.locale-ug {
  --font: var(--font-ug);
}
html[lang="zh-CN"],
html[data-lang="zh"],
html.locale-zh {
  --font: var(--font-zh);
}

html, body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, var(--bg-glow-1), transparent),
    radial-gradient(circle at 100% 100%, var(--bg-glow-2), transparent 40%);
  -webkit-font-smoothing: antialiased;
}
html[lang="ug"] body,
html[data-lang="ug"] body,
html.locale-ug body {
  letter-spacing: 0.01em;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

.app-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.app-shell--tabs {
  padding-bottom: calc(64px + 22px + env(safe-area-inset-bottom, 0px));
}
html[data-tab-style="2"] .app-shell--tabs {
  padding-bottom: calc(64px + 40px + env(safe-area-inset-bottom, 0px));
}
html[data-tab-style="3"] .app-shell--tabs {
  padding-bottom: calc(64px + 28px + env(safe-area-inset-bottom, 0px));
}
.tab-liquid-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}
.tab-bar__sheen,
.tab-bar__refract { display: none; }
.app-shell.hidden-tab { padding-bottom: env(safe-area-inset-bottom, 0px); }
.app-shell.hidden-tab .tab-bar { display: none; }
.app-shell--subpage .top-bar { display: none; }

.main-content {
  flex: 1;
  width: min(100%, 1100px);
  margin: 0 auto;
  padding: 12px 14px 24px;
}
.view { display: none; }
.view.active { display: block; }

.top-bar {
  position: sticky;
  top: 0;
  z-index: 110;
  box-sizing: border-box;
  min-height: var(--top-bar-h);
  border-bottom: 1px solid var(--glass-border, var(--border));
  background: var(--glass-bg, var(--chrome-bg));
  backdrop-filter: blur(20px) saturate(1.35);
  -webkit-backdrop-filter: blur(20px) saturate(1.35);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.04);
  display: none;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: env(safe-area-inset-top, 0px) 10px 0;
  direction: ltr;
}
.app-shell--home-header .top-bar,
.app-shell--tabs:not(.hidden-tab) .top-bar { display: grid; }
/* 个人 / 链接页：只留标题，左右路线与搜索占位隐藏 */
.app-shell--title-only .top-bar__menu,
.app-shell--title-only .top-bar__actions {
  visibility: hidden;
  pointer-events: none;
}
.top-bar__menu, .top-bar__icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center;
  color: var(--text);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
}
.top-bar__menu svg, .top-bar__icon svg { width: 20px; height: 20px; }
.top-bar__title {
  margin: 0; text-align: center; font-size: 16px; font-weight: 700;
  direction: rtl;
}

.btn-primary, .btn-outline, .btn-glass, .btn-glass-primary {
  min-height: 42px; padding: 0 14px; border-radius: 12px; font-size: 13px; font-weight: 600;
}
.btn-primary, .btn-primary--compact {
  background: linear-gradient(135deg, rgba(226, 192, 120, 0.95), rgba(139, 107, 46, 0.95));
  color: #14110a; border: 1px solid rgba(226, 192, 120, 0.45);
}
.btn-outline {
  border: 1px solid var(--glass-border); background: rgba(255,255,255,0.04); color: var(--text);
}

.filters-panel {
  border-radius: 18px; padding: 12px;
  border: 1px solid var(--glass-border, var(--border));
  background: var(--glass-bg-soft, rgba(255, 255, 255, 0.04));
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: inset 0 1px 0 var(--glass-highlight, rgba(255, 255, 255, 0.1));
  margin-bottom: 14px;
}
.filter-group + .filter-group { margin-top: 10px; }
.filter-chips {
  display: flex; flex-wrap: nowrap; gap: 8px;
  overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.filter-chips::-webkit-scrollbar { display: none; }
.filter-group { min-width: 0; }
.chip { flex: 0 0 auto; }
.chip {
  min-height: 32px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--glass-border); background: rgba(255,255,255,0.04);
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.chip.active {
  color: var(--accent); border-color: rgba(200,164,92,0.55); background: var(--accent-soft);
}

.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  margin: 8px 0 12px;
}
.section-title { margin: 0; font-size: 16px; font-weight: 700; }
.section-meta { font-size: 12px; color: var(--text-dim); }

.movie-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
@media (min-width: 768px) { .movie-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; } }
@media (min-width: 1100px) { .movie-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

.movie-card {
  border-radius: 16px; overflow: hidden;
  border: 1px solid var(--glass-border, var(--border));
  background: rgba(20, 20, 28, 0.55);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  text-align: start;
}
html[data-theme="light"] .movie-card { background: rgba(255, 255, 255, 0.7); }
.movie-card__poster {
  aspect-ratio: 2/3; background: #121218 center/cover no-repeat; position: relative;
}
.movie-card__badge {
  position: absolute; inset-inline-start: 8px; top: 8px;
  min-height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700; background: rgba(0,0,0,0.55); color: #fff;
}
.card-body { padding: 10px 10px 12px; }
.card-title {
  font-size: 13px; font-weight: 700; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-sub { margin-top: 4px; font-size: 11px; color: var(--text-dim); }

.hero-carousel { margin-bottom: 14px; border-radius: 20px; overflow: hidden; position: relative; }
.hero-carousel__viewport { overflow: hidden; }
.hero-carousel__track { display: flex; transition: transform .4s ease; }
.hero-slide {
  min-width: 100%; aspect-ratio: 16/9; position: relative;
  background: #111 center/cover no-repeat;
}
.hero-slide__shade {
  position: absolute; inset: 0;
  background: linear-gradient(transparent 35%, rgba(0,0,0,.75));
}
.hero-slide__meta {
  position: absolute; inset-inline: 14px; bottom: 14px; color: #fff;
}
.hero-slide__title { margin: 0; font-size: 18px; font-weight: 800; }
.hero-carousel__dots {
  position: absolute; inset-inline: 0; bottom: 8px;
  display: flex; justify-content: center; gap: 6px; pointer-events: none;
}
.hero-dot {
  width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.35);
}
.hero-dot.active { background: var(--accent); }

/* Tab bar liquid glass */
.tab-bar {
  position: fixed;
  left: 12px; right: 12px;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  z-index: 120; height: 64px; padding: 0; border: 0; background: transparent;
  display: block; pointer-events: none; overflow: visible;
}
.tab-bar__glass {
  position: absolute; inset: 0; border-radius: 22px;
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.12));
  background: var(--glass-bg, rgba(22, 22, 32, 0.62));
  box-shadow: var(--glass-shadow, 0 12px 40px rgba(0, 0, 0, 0.35)), inset 0 1px 0 var(--glass-highlight, rgba(255, 255, 255, 0.16));
  backdrop-filter: blur(24px) saturate(1.45);
  -webkit-backdrop-filter: blur(24px) saturate(1.45);
  pointer-events: none; overflow: hidden;
}
.tab-bar__glass::before {
  content: ""; position: absolute; inset: -40% 20% auto; height: 70%;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.18), transparent 70%);
  pointer-events: none; animation: glassSheen 6s ease-in-out infinite;
}
@keyframes glassSheen {
  0%, 100% { opacity: 0.35; transform: translateX(-8%); }
  50% { opacity: 0.7; transform: translateX(8%); }
}
.tab-bar__track {
  position: relative; z-index: 1; height: 100%;
  /* 5 Tab：首页 / 短剧 / 检查 / 网盘 / 我的 —— 必须均分，否则会掉行叠图标 */
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  pointer-events: auto; padding: 5px; box-sizing: border-box; align-items: stretch; gap: 0;
}
.tab-bar__pill {
  position: absolute; top: 0; left: 0; width: 40%; height: 40px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(200, 164, 92, 0.28), rgba(200, 164, 92, 0.1));
  border: 1px solid rgba(200, 164, 92, 0.35);
  box-shadow: 0 8px 20px rgba(200, 164, 92, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), width 0.38s cubic-bezier(0.22, 1, 0.36, 1), height 0.38s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
  pointer-events: none; will-change: transform, width, height;
}
.tab-bar__btn {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; height: 100%; min-height: 0; min-width: 0; padding: 3px 1px; box-sizing: border-box;
  font-size: 9px; line-height: 1.05; font-weight: 600; color: var(--text-dim);
  border-radius: 14px; overflow: hidden;
  transition: color 0.25s ease, transform 0.2s ease;
}
.tab-bar__bubble {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; width: 100%; height: 100%; min-width: 0;
  border-radius: inherit;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), background 0.35s ease, color 0.25s ease, box-shadow 0.35s ease;
}
.tab-bar__btn > .tab-bar__bubble > span:not(.tab-bar__icon) {
  max-width: 100%; padding: 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tab-bar__icon { display: grid; place-items: center; flex-shrink: 0; transition: transform 0.3s cubic-bezier(0.34, 1.45, 0.64, 1); }
.tab-bar__btn svg { width: 18px; height: 18px; }
.tab-bar__btn.active { color: var(--accent); }
.tab-bar__btn.active .tab-bar__icon { transform: scale(1.05); }
.tab-bar__btn:active { transform: scale(0.96); }
.tab-bar__indicator {
  display: none;
  position: absolute;
  top: -34px;
  left: 0;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--bg, #0c0c10);
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
}
.tab-bar__indicator::before,
.tab-bar__indicator::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 20px;
  height: 20px;
  background: transparent;
}
.tab-bar__indicator::before {
  left: -18px;
  border-top-right-radius: 20px;
  box-shadow: 1px -10px 0 0 var(--bg, #0c0c10);
}
.tab-bar__indicator::after {
  right: -18px;
  border-top-left-radius: 20px;
  box-shadow: -1px -10px 0 0 var(--bg, #0c0c10);
}

/* 风格 2：凸起气泡导航（参考丝滑 tabbar） */
.tab-bar[data-tab-style="2"] {
  height: 62px;
  left: 16px; right: 16px;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  overflow: visible;
}
.tab-bar[data-tab-style="2"] .tab-bar__glass {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}
.tab-bar[data-tab-style="2"] .tab-bar__glass::before { display: none; }
.tab-bar[data-tab-style="2"] .tab-bar__pill { display: none !important; }
.tab-bar[data-tab-style="2"] .tab-bar__indicator { display: block; }
.tab-bar[data-tab-style="2"] .tab-bar__track {
  padding: 0;
  overflow: visible;
}
.tab-bar[data-tab-style="2"] .tab-bar__btn {
  overflow: visible;
  color: #2a2a30;
  border-radius: 0;
}
.tab-bar[data-tab-style="2"] .tab-bar__bubble {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  gap: 1px;
  font-size: 9px;
  font-weight: 700;
  color: #2a2a30;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0s, background 0.35s ease 0s, color 0.25s ease, box-shadow 0.35s ease;
}
.tab-bar[data-tab-style="2"] .tab-bar__btn .tab-bar__icon {
  transform: none;
  color: inherit;
}
.tab-bar[data-tab-style="2"] .tab-bar__btn.active {
  color: #fff;
}
.tab-bar[data-tab-style="2"] .tab-bar__btn.active .tab-bar__bubble {
  background: var(--tab-clr, #e2c078);
  color: #fff;
  transform: translateY(-26px);
  transition-delay: 0.12s;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--tab-clr, #e2c078) 45%, transparent);
}
.tab-bar[data-tab-style="2"] .tab-bar__btn.active .tab-bar__bubble::before {
  content: '';
  position: absolute;
  inset: 8px 0 auto;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--tab-clr, #e2c078);
  filter: blur(28px);
  opacity: 0.45;
  z-index: -1;
  pointer-events: none;
}
.tab-bar[data-tab-style="2"] .tab-bar__btn.active .tab-bar__icon {
  transform: none;
  color: #fff;
}
.tab-bar[data-tab-style="2"] .tab-bar__btn:active { transform: none; }

html[data-theme="light"] .tab-bar[data-tab-style="2"] .tab-bar__glass {
  background: rgba(255, 255, 255, 0.96);
}
html[data-theme="light"] .tab-bar[data-tab-style="2"] .tab-bar__indicator,
html[data-theme="light"] .tab-bar[data-tab-style="2"] .tab-bar__indicator::before,
html[data-theme="light"] .tab-bar[data-tab-style="2"] .tab-bar__indicator::after {
  /* light page bg */
}
html[data-theme="light"] .tab-bar[data-tab-style="2"] .tab-bar__indicator {
  background: var(--bg, #f4f1ea);
}
html[data-theme="light"] .tab-bar[data-tab-style="2"] .tab-bar__indicator::before {
  box-shadow: 1px -10px 0 0 var(--bg, #f4f1ea);
}
html[data-theme="light"] .tab-bar[data-tab-style="2"] .tab-bar__indicator::after {
  box-shadow: -1px -10px 0 0 var(--bg, #f4f1ea);
}

@media (min-width: 768px) {
  .tab-bar {
    left: 50%; right: auto; width: min(420px, calc(100% - 48px));
    transform: translateX(-50%);
  }
  /* 桌面顶栏布局下强制回风格 1 表现 */
  .tab-bar[data-tab-style="2"] .tab-bar__indicator { display: none !important; }
  .tab-bar[data-tab-style="2"] .tab-bar__btn.active .tab-bar__bubble {
    transform: none;
    background: transparent;
    box-shadow: none;
    color: inherit;
  }
  .tab-bar[data-tab-style="2"] .tab-bar__btn.active .tab-bar__bubble::before { display: none; }
  .tab-bar[data-tab-style="3"] .tab-bar__sheen,
  .tab-bar[data-tab-style="3"] .tab-bar__refract { display: none !important; }
}

/* ========== 风格 3：液态玻璃（参考 AndroidLiquidGlass 气质） ========== */
.tab-bar[data-tab-style="3"] {
  left: 14px; right: 14px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  height: 66px;
  overflow: visible;
}
.tab-bar[data-tab-style="3"] .tab-bar__glass {
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.04) 42%, rgba(255, 255, 255, 0.08)),
    rgba(18, 18, 28, 0.38);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(28px) saturate(1.85) brightness(1.08);
  -webkit-backdrop-filter: blur(28px) saturate(1.85) brightness(1.08);
  overflow: hidden;
  isolation: isolate;
}
.tab-bar[data-tab-style="3"] .tab-bar__glass::before {
  content: "";
  inset: -30% -10% auto;
  height: 70%;
  background: linear-gradient(105deg, transparent 20%, rgba(255, 255, 255, 0.35) 48%, transparent 72%);
  opacity: 0.55;
  animation: liquidSheen 5.5s ease-in-out infinite;
  filter: none;
}
@keyframes liquidSheen {
  0%, 100% { transform: translateX(-18%) rotate(-2deg); opacity: 0.35; }
  50% { transform: translateX(18%) rotate(2deg); opacity: 0.7; }
}
.tab-bar[data-tab-style="3"] .tab-bar__sheen,
.tab-bar[data-tab-style="3"] .tab-bar__refract {
  display: block;
  position: absolute;
  pointer-events: none;
}
.tab-bar[data-tab-style="3"] .tab-bar__sheen {
  inset: 1px;
  border-radius: inherit;
  background:
    radial-gradient(120% 80% at 20% 0%, rgba(255, 255, 255, 0.35), transparent 55%),
    radial-gradient(90% 60% at 90% 100%, rgba(200, 164, 92, 0.12), transparent 50%);
  mix-blend-mode: soft-light;
  opacity: 0.9;
}
.tab-bar[data-tab-style="3"] .tab-bar__refract {
  inset: 0;
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.18),
    inset 12px 0 24px rgba(255, 255, 255, 0.05),
    inset -12px 0 24px rgba(120, 160, 255, 0.06);
  /* 轻折射：移动端性能敏感，强度压低 */
  filter: url(#kozlarLiquidGlass);
  opacity: 0.55;
  mix-blend-mode: overlay;
}
.tab-bar[data-tab-style="3"] .tab-bar__indicator { display: none !important; }
.tab-bar[data-tab-style="3"] .tab-bar__track {
  padding: 7px;
  overflow: visible;
}
.tab-bar[data-tab-style="3"] .tab-bar__pill {
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.08) 45%, rgba(200, 164, 92, 0.22)),
    rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.42);
  box-shadow:
    0 10px 24px rgba(200, 164, 92, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -8px 16px rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  transition:
    transform 0.55s cubic-bezier(0.22, 1.2, 0.36, 1),
    width 0.55s cubic-bezier(0.22, 1.2, 0.36, 1),
    height 0.45s cubic-bezier(0.34, 1.4, 0.64, 1),
    border-radius 0.45s ease,
    opacity 0.2s ease;
}
.tab-bar[data-tab-style="3"] .tab-bar__pill.is-morph {
  border-radius: 28px 16px 28px 16px;
  filter: saturate(1.15);
}
.tab-bar[data-tab-style="3"] .tab-bar__btn {
  overflow: visible;
  color: rgba(255, 255, 255, 0.62);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.tab-bar[data-tab-style="3"] .tab-bar__btn.active {
  color: #fff;
}
.tab-bar[data-tab-style="3"] .tab-bar__btn.active .tab-bar__icon {
  transform: translateY(-1px) scale(1.08);
  filter: drop-shadow(0 4px 10px rgba(200, 164, 92, 0.35));
}

html[data-theme="light"] .tab-bar[data-tab-style="3"] .tab-bar__glass {
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.35) 50%, rgba(255, 255, 255, 0.55)),
    rgba(255, 255, 255, 0.45);
  border-color: rgba(255, 255, 255, 0.65);
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}
html[data-theme="light"] .tab-bar[data-tab-style="3"] .tab-bar__btn {
  color: rgba(30, 30, 40, 0.55);
  text-shadow: none;
}
html[data-theme="light"] .tab-bar[data-tab-style="3"] .tab-bar__btn.active {
  color: #1a1408;
}
html[data-ui="2"] .tab-bar[data-tab-style="3"] .tab-bar__pill {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.55), rgba(58, 123, 253, 0.18)),
    rgba(58, 123, 253, 0.12);
  border-color: rgba(58, 123, 253, 0.35);
}
html[data-ui="3"] .tab-bar[data-tab-style="3"] .tab-bar__pill {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.28), rgba(254, 234, 0, 0.2)),
    rgba(254, 234, 0, 0.1);
  border-color: rgba(254, 234, 0, 0.35);
}

/* Search */
.page-search .search-top {
  position: sticky; top: 0; z-index: 50;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 0 10px;
  background: var(--glass-bg, var(--chrome-bg));
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
  border-bottom: 1px solid var(--glass-border, var(--border));
  margin: -12px -14px 12px; padding-inline: 14px;
}
.search-top-row { display: flex; gap: 10px; align-items: center; direction: ltr; }
.search-back {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(255,255,255,0.06); border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.search-back svg { width: 18px; height: 18px; transform: none; }
.search-wrap, .search-wrap--grow {
  flex: 1; display: flex; align-items: center; gap: 6px;
  min-height: 42px; border-radius: 14px; padding: 0 10px;
  border: 1px solid var(--glass-border, var(--border));
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  direction: rtl;
}
.search-input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; min-height: 40px;
}
.search-icon { width: 36px; height: 36px; display: grid; place-items: center; }
.search-icon svg { width: 18px; height: 18px; }
.search-layout { display: grid; grid-template-columns: 1fr 76px; gap: 10px; align-items: start; direction: ltr; }
.search-results-wrap { direction: rtl; min-width: 0; }
.search-route-rail { direction: rtl; }
.search-route-rail {
  position: sticky; top: 72px; max-height: calc(100dvh - 120px); overflow: auto;
  border-radius: 16px; padding: 8px 6px;
  background: var(--glass-bg, rgba(15, 15, 20, 0.72));
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid var(--glass-border, var(--border));
}
.search-route-vitem {
  width: 100%; min-height: 44px; border-radius: 12px; padding: 6px 4px;
  font-size: 11px; font-weight: 600; color: var(--text-muted); text-align: center;
}
.search-route-vitem.active {
  color: var(--accent);
  background: linear-gradient(180deg, rgba(200, 164, 92, 0.28), rgba(200, 164, 92, 0.08));
  box-shadow: inset 0 0 0 1px rgba(200, 164, 92, 0.25);
}
.search-route-vitem--all .search-route-vitem__icon--all {
  display: grid; place-items: center;
  font-size: 14px; font-weight: 800; color: var(--accent);
  background: rgba(200, 164, 92, 0.14);
  border-color: rgba(200, 164, 92, 0.35);
}

/* Auth */
.auth-page { display: grid; place-items: center; min-height: 60dvh; }
.auth-card {
  width: min(100%, 420px); border-radius: 20px; padding: 22px;
  background: var(--glass-bg, var(--bg-elevated)) !important;
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  border: 1px solid var(--glass-border, var(--border));
  box-shadow: var(--glass-shadow, var(--shadow)), inset 0 1px 0 var(--glass-highlight, rgba(255, 255, 255, 0.12));
}
.auth-card h2 { margin: 0 0 16px; font-size: 20px; }
.field { margin-bottom: 12px; }
.field-label { display: block; margin-bottom: 6px; font-size: 12px; color: var(--text-muted); }
.field-input {
  width: 100%; min-height: 44px; border-radius: 12px; padding: 0 14px;
  border: 1px solid var(--glass-border); background: rgba(255,255,255,0.05); outline: none;
}
.modal-tip { min-height: 18px; font-size: 12px; color: #ff8f8f; }
.auth-switch { margin-top: 14px; font-size: 13px; color: var(--text-muted); text-align: center; }
.auth-switch button { color: var(--accent); font-weight: 700; }

/* Drawer + VIP gate */
.drawer-overlay {
  position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.45);
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.drawer-overlay.is-open { opacity: 1; pointer-events: auto; }
.drawer-panel {
  position: absolute; top: 0; bottom: 0; left: 0; width: min(86vw, 340px);
  transform: translateX(-105%); transition: transform .28s ease;
  background: var(--chrome-solid);
  border-right: 1px solid var(--border);
  padding: calc(14px + env(safe-area-inset-top,0px)) 14px 18px;
  display: flex; flex-direction: column; gap: 10px;
  box-shadow: 8px 0 32px rgba(0,0,0,0.35);
}


.drawer-head { font-size: 15px; font-weight: 700; flex-shrink: 0; }
.drawer-list {
  overflow-x: hidden;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-content: flex-start;
  -webkit-overflow-scrolling: touch;
}
.drawer-item {
  text-align: start; padding: 12px; border-radius: 12px;
  border: 1px solid var(--glass-border); background: rgba(255,255,255,0.04);
  flex: 0 0 auto;
  min-height: 58px;
  box-sizing: border-box;
}
.drawer-item.active { border-color: rgba(200,164,92,.5); color: var(--accent); }
.vip-gate-overlay { display: grid; place-items: center; padding: 20px; }
.vip-gate-overlay[hidden] { display: none !important; }
.vip-gate-overlay.is-open { opacity: 1; pointer-events: auto; }
.vip-gate-card {
  width: min(100%, 380px); border-radius: 20px; padding: 20px;
  background: var(--glass-bg) !important;
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}
.vip-gate-title { margin: 0 0 10px; font-size: 18px; }
.vip-gate-msg { margin: 0 0 10px; color: var(--text-muted); font-size: 13px; line-height: 1.5; }
.vip-gate-close { width: 100%; margin-top: 8px; }
.contact-box { padding: 12px; border-radius: 14px; margin: 10px 0; }
.contact-box__text { margin: 0 0 10px; font-size: 13px; color: var(--text-muted); }
.contact-box__qq { margin: 8px 0 0; direction: ltr; font-size: 12px; color: var(--text-dim); }

/* Detail + player */
#viewDetail, #viewPlayer { position: relative; }
#viewDetail .view-topbar,
#viewPlayer .view-topbar,
.app-shell--subpage #viewDetail .view-topbar,
.app-shell--subpage #viewPlayer .view-topbar {
  position: sticky; top: 0; z-index: 140;
  display: flex; justify-content: flex-start; align-items: center;
  width: auto; max-width: 100%; margin: 0 0 10px;
  padding: calc(4px + env(safe-area-inset-top, 0px)) 0 4px;
  background: transparent !important; border: 0 !important; box-shadow: none !important;
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
}
#viewDetail .back-link, #viewPlayer .back-link {
  height: 38px; padding: 0 14px 0 12px; border-radius: 999px;
  border: 1px solid var(--glass-border); background: var(--glass-bg);
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
  backdrop-filter: blur(20px) saturate(1.35);
  -webkit-backdrop-filter: blur(20px) saturate(1.35);
  color: var(--text); font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
}
.back-link__icon { display: grid; place-items: center; }
.back-link__icon svg { width: 16px; height: 16px; transform: scaleX(-1); }
.detail-hero {
  position: relative; border-radius: 22px; overflow: hidden;
  border: 1px solid var(--glass-border);
  background: rgba(12, 12, 18, 0.35);
  box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  margin-bottom: 14px;
}
.detail-backdrop {
  position: absolute; inset: 0; background: center/cover no-repeat;
  filter: blur(28px) brightness(0.38) saturate(1.15); transform: scale(1.1);
}
html[data-theme="light"] .detail-backdrop { filter: blur(30px) brightness(0.42) saturate(1.2); }
.detail-hero-inner {
  position: relative; z-index: 1; display: grid; gap: 14px;
  grid-template-columns: 120px 1fr; padding: 18px;
}
.detail-poster {
  width: 120px; aspect-ratio: 2/3; border-radius: 16px; object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35); background: #111;
}
.detail-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.detail-info h1,
.detail-title {
  margin: 0; font-size: 20px; color: #fff; line-height: 1.3;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
}
.detail-desc {
  margin: 0; font-size: 13px; line-height: 1.5;
  color: rgba(255, 255, 255, 0.82); text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.detail-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 0;
}
.detail-tag {
  min-height: 24px; padding: 0 10px; border-radius: 999px; font-size: 11px; font-weight: 600;
  display: inline-flex; align-items: center;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
}
.detail-actions {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 8px;
  margin: 2px 0 0;
}
/* RTL: 播放/下载 | 全部剧集/稳定地址 → 稳定地址落在下载正下方 */
.play-primary,
.detail-actions .btn-copy {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.play-primary {
  background: linear-gradient(135deg, #e2c078, #8b6b2e); color: #14110a;
  box-shadow: 0 10px 28px rgba(200, 164, 92, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-copy {
  min-height: 40px; padding: 0 12px; border-radius: 12px; font-size: 12px; font-weight: 600;
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}

/* 稳定地址弹窗：从按钮位置放大 */
.stable-addr-mask {
  position: fixed; inset: 0; z-index: 1350;
  display: grid; place-items: center;
  padding: 20px 16px;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.stable-addr-mask.is-open {
  opacity: 1;
  pointer-events: auto;
}
.stable-addr-card {
  width: min(420px, 100%);
  max-height: min(82vh, 640px);
  overflow: auto;
  padding: 18px 16px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(165deg, rgba(34, 30, 28, 0.98), rgba(16, 14, 18, 0.98));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.4);
  transform-origin: 50% 50%;
  transform: scale(0.72);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.stable-addr-mask.is-open .stable-addr-card {
  transform: scale(1);
  opacity: 1;
}
.stable-addr-card__title {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
}
.stable-addr-card__body {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.78);
  white-space: pre-wrap;
}
.ep-link-mask {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.ep-link-mask.is-open {
  opacity: 1;
  pointer-events: auto;
}
.ep-link-sheet {
  width: min(420px, 100%);
  margin: 0;
  padding: 10px 12px calc(12px + env(safe-area-inset-bottom, 0px));
  border-radius: 18px 18px 0 0;
  background: rgba(28, 30, 36, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transform: translateY(18px);
  transition: transform 0.22s ease;
}
.ep-link-mask.is-open .ep-link-sheet {
  transform: translateY(0);
}
.ep-link-sheet__title {
  margin: 4px 8px 10px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
}
.ep-link-sheet__btn {
  display: block;
  width: 100%;
  min-height: 46px;
  margin: 0 0 8px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #f3e2b0;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.ep-link-sheet__btn--stable {
  background: rgba(226, 192, 120, 0.18);
  border: 1px solid rgba(226, 192, 120, 0.35);
}
.ep-link-sheet__btn--cancel {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.72);
  font-weight: 600;
}
.stable-addr-card__actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.stable-addr-card__ext {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
}
.stable-addr-card__ext label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: rgba(243, 226, 176, 0.95);
}
.stable-addr-card__batch {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid rgba(226, 192, 120, 0.55);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(226, 192, 120, 0.28), rgba(226, 192, 120, 0.12));
  color: #f8efd0;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.stable-addr-card__batch:disabled {
  opacity: 0.55;
  cursor: wait;
}
.stable-addr-card__cs {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(226, 192, 120, 0.4);
  border-radius: 12px;
  background: rgba(226, 192, 120, 0.14);
  color: #f3e2b0;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.stable-addr-card__qr {
  margin: 0 0 12px;
  text-align: center;
  transform: scale(0.78);
  opacity: 0;
  transform-origin: center top;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
}
.stable-addr-card__qr.is-open {
  transform: scale(1);
  opacity: 1;
  pointer-events: auto;
}
.stable-addr-card__qr[hidden] { display: none !important; }
.stable-addr-card__qr-hint {
  margin: 0 0 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}
.stable-addr-card__qr-frame {
  width: min(168px, 52vw);
  margin: 0 auto;
  padding: 8px;
  border-radius: 14px;
  background: #fff;
}
.stable-addr-card__qr-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}
.detail-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 2px;
}
.detail-tool {
  min-height: 28px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 600;
}
.detail-tool:active { color: #e2c078; }
.detail-tools__dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}
.episodes-block {
  border-radius: 20px; padding: 14px; margin-bottom: 14px;
  border: 1px solid var(--glass-border); background: var(--glass-bg);
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
}
.ep-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 8px; }
@media (min-width: 900px) { .ep-grid { grid-template-columns: repeat(8, minmax(0,1fr)); } }
.ep-btn {
  min-height: 36px; border-radius: 12px; font-size: 10px; font-weight: 700;
  padding: 6px 4px; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: var(--glass-bg-soft); border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 var(--glass-highlight); color: var(--text);
}
.ep-btn.active {
  background: linear-gradient(145deg, rgba(200, 164, 92, 0.28), rgba(200, 164, 92, 0.1));
  border-color: rgba(200, 164, 92, 0.55); color: var(--accent);
}
.player-layout { display: grid; gap: 12px; }
@media (min-width: 900px) {
  .player-layout { grid-template-columns: 1fr 280px; align-items: start; }
  .player-episodes { grid-column: 1 / -1; }
}
/* 播放器通栏：左右贴边，不放在圆角卡片里 */
#viewPlayer {
  margin-inline: -14px;
  width: calc(100% + 28px);
  max-width: none;
}
#viewPlayer .view-topbar {
  padding-inline: 14px;
  margin-bottom: 8px;
}
#viewPlayer .player-layout {
  gap: 10px;
}
#viewPlayer .player-box {
  border-radius: 0;
  border: 0;
  box-shadow: none;
  width: 100%;
  max-width: none;
  margin: 0;
  background: #000;
  aspect-ratio: 16/9;
  overflow: hidden;
}
#viewPlayer .player-side,
#viewPlayer .player-episodes {
  margin-inline: 14px;
}
.player-side__actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.player-box {
  border-radius: 18px; border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow); overflow: hidden; background: #000;
  aspect-ratio: 16/9;
}
#artplayerContainer, #artplayerContainer .art-video-player { width: 100%; height: 100%; }
.filters-loading-tip {
  padding: 8px 4px 2px;
  font-size: 12px;
  color: var(--text-muted);
}
.lang-pick-overlay {
  position: fixed; inset: 0; z-index: 4000;
  display: grid; place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
}
.lang-pick-overlay[hidden] { display: none !important; }
.lang-pick-card {
  width: min(100%, 360px);
  border-radius: 20px;
  padding: 22px 18px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg, rgba(18, 18, 24, 0.92));
  box-shadow: var(--glass-shadow);
  text-align: center;
}
.lang-pick-card h2 {
  margin: 0 0 8px;
  font-size: 18px;
}
.lang-pick-hint {
  margin: 0 0 18px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}
.lang-pick-actions {
  display: grid;
  gap: 10px;
}
.lang-pick-btn { width: 100%; }
body.lang-pick-open { overflow: hidden; }
.player-side, .player-episodes {
  border-radius: 18px; padding: 14px;
  border: 1px solid var(--glass-border); background: var(--glass-bg);
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
}
.player-side h2 { margin: 0 0 6px; font-size: 16px; }
.player-side p { margin: 0; color: var(--text-muted); font-size: 13px; }
.player-episodes__title { margin: 0 0 10px; font-size: 14px; }
html[data-theme="light"] .episodes-block,
html[data-theme="light"] .player-side,
html[data-theme="light"] .player-episodes {
  background: rgba(255, 255, 255, 0.62); border-color: rgba(40, 40, 55, 0.1);
}
html[data-theme="light"] .ep-btn {
  background: rgba(255, 255, 255, 0.72); color: #2a2a35; border-color: rgba(40, 40, 55, 0.1);
}
html[data-theme="light"] .ep-btn.active {
  background: linear-gradient(145deg, rgba(200, 164, 92, 0.32), rgba(255, 255, 255, 0.55));
  color: #8a6a22; border-color: rgba(180, 140, 60, 0.55);
}
html[data-theme="light"] #viewDetail .back-link,
html[data-theme="light"] #viewPlayer .back-link {
  background: rgba(255, 255, 255, 0.92); color: #1c1c24;
  border-color: rgba(40, 40, 55, 0.12);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
html[data-theme="light"] .detail-info h1 { color: #121218; text-shadow: none; }
html[data-theme="light"] .detail-desc { color: rgba(20,20,30,0.78); text-shadow: none; }
html[data-theme="light"] .detail-tag {
  background: rgba(30,30,40,0.55); color: #fff; border-color: transparent;
}
html[data-theme="light"] .btn-copy {
  background: rgba(255,255,255,0.92); color: #1c1c24; border-color: rgba(40,40,55,0.12);
}
html[data-theme="light"] body,
html[data-theme="light"] .app-shell { background: #f2f2f7; }

/* Modal / toast */
.modal-overlay {
  position: fixed; inset: 0; z-index: 220; background: rgba(0,0,0,.55);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 12px;
  padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  overflow: hidden;
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.modal-overlay.is-open { opacity: 1; pointer-events: auto; }
.modal-card {
  width: min(100%, 520px);
  max-width: 100%;
  max-height: min(88dvh, 640px);
  border-radius: 20px 20px 16px 16px;
  padding: 14px 14px 12px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  background: var(--glass-bg) !important;
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  flex-shrink: 0;
}
.modal-head h3 { margin: 0; font-size: 15px; line-height: 1.3; }
.modal-close { width: 36px; height: 36px; display: grid; place-items: center; flex-shrink: 0; }
.modal-sub { font-size: 12px; color: var(--text-muted); margin: 0; flex-shrink: 0; }
.copy-mode { display: flex; gap: 10px; margin: 0; flex-wrap: wrap; flex-shrink: 0; }
.copy-mode__item { font-size: 12px; }
.copy-links-log {
  flex: 1 1 auto;
  min-height: 72px;
  max-height: none;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  padding: 10px;
  background: rgba(0,0,0,.2);
  font-size: 11px;
  line-height: 1.45;
  direction: ltr;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  width: 100%;
  box-sizing: border-box;
}
.modal-actions {
  display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px;
  flex-shrink: 0; flex-wrap: wrap;
}
@media (min-width: 768px) {
  .modal-overlay {
    align-items: center;
    padding: 24px;
  }
  .modal-card {
    max-height: min(80vh, 680px);
    border-radius: 20px;
  }
  .copy-links-log { font-size: 12px; }
}
.copy-toast {
  position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom,0px));
  transform: translateX(-50%); z-index: 300;
  min-height: 40px; padding: 0 16px; border-radius: 999px;
  background: rgba(20,20,28,.92); color: #fff; display: grid; place-items: center;
  font-size: 13px; font-weight: 600; border: 1px solid var(--glass-border);
}

.loading-box, .error-box, .empty-box {
  padding: 28px 12px; text-align: center; color: var(--text-muted); font-size: 13px;
}
.home-scroll-status { padding: 12px; text-align: center; }

@media (max-width: 767px) {
  .detail-hero-inner { grid-template-columns: 96px 1fr; padding: 16px 14px 18px; }
  .detail-poster { width: 96px; }
}


/* ===== Profile: liquid glass layout (mobile + desktop) ===== */
:root,
html[data-theme="dark"] {
  --glass-bg: rgba(22, 22, 32, 0.55);
  --glass-bg-soft: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-highlight: rgba(255, 255, 255, 0.16);
  --glass-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

html[data-theme="light"] {
  --glass-bg: rgba(255, 255, 255, 0.62);
  --glass-bg-soft: rgba(255, 255, 255, 0.45);
  --glass-border: rgba(0, 0, 0, 0.08);
  --glass-highlight: rgba(255, 255, 255, 0.7);
  --glass-shadow: 0 12px 36px rgba(0, 0, 0, 0.1);
}

.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
}

.glass-soft {
  background: var(--glass-bg-soft);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
}

#viewProfile {
  width: 100%;
}

.profile-card {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 0;
}

.profile-page {
  width: min(100%, 920px);
  margin: 0 auto;
  padding: 12px 14px calc(24px + env(safe-area-inset-bottom, 0px));
  display: grid;
  gap: 14px;
}

.profile-hero {
  border-radius: 22px;
  padding: 18px;
  display: grid;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.profile-hero::before {
  content: "";
  position: absolute;
  inset: -40% auto auto -20%;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 164, 92, 0.28), transparent 70%);
  pointer-events: none;
}

.profile-hero--guest {
  place-items: center;
  text-align: center;
  min-height: 180px;
}

.profile-guest-text {
  margin: 0;
  color: var(--text-muted);
}

.profile-hero__main {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.profile-hero__text {
  min-width: 0;
  flex: 1;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: linear-gradient(145deg, #e2c078, #8b6b2e);
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 700;
  color: #14110a;
  box-shadow: 0 8px 24px rgba(200, 164, 92, 0.35);
  flex-shrink: 0;
}

.profile-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.profile-vip {
  margin-top: 4px;
  font-size: 13px;
  color: var(--accent);
}

.profile-id {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-dim);
  direction: ltr;
  unicode-bidi: isolate;
}

.profile-hero__actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  position: relative;
  z-index: 1;
}

.profile-panel {
  border-radius: 20px;
  padding: 16px;
}

.profile-panel__head {
  margin-bottom: 12px;
}

.profile-panel__title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.btn-glass,
.btn-glass-primary {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn-glass:active,
.btn-glass-primary:active {
  transform: scale(0.98);
}

.btn-glass-primary {
  background: linear-gradient(135deg, rgba(226, 192, 120, 0.95), rgba(139, 107, 46, 0.95));
  color: #14110a;
  border-color: rgba(226, 192, 120, 0.45);
  box-shadow: 0 8px 22px rgba(200, 164, 92, 0.28);
}

.btn-glass--danger {
  color: #ff8f8f;
  border-color: rgba(255, 120, 120, 0.28);
}

.glass-input,
.profile-page .field-input {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  padding: 0 14px;
  outline: none;
}

.glass-input:focus,
.profile-page .field-input:focus {
  border-color: rgba(200, 164, 92, 0.55);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.redeem-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

/* tiers */
.tier-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.tier-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 14px 14px 12px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  gap: 6px;
}

.tier-card__glow {
  position: absolute;
  inset: auto -20% -40% auto;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  opacity: 0.35;
  pointer-events: none;
}

.tier-card--vip .tier-card__glow { background: radial-gradient(circle, #c8a45c, transparent 70%); }
.tier-card--diamond .tier-card__glow { background: radial-gradient(circle, #78b4ff, transparent 70%); }
.tier-card--hidden .tier-card__glow { background: radial-gradient(circle, #a078ff, transparent 70%); }

.tier-card.is-on {
  border-color: rgba(200, 164, 92, 0.4);
}
.tier-card--diamond.is-on { border-color: rgba(120, 180, 255, 0.45); }
.tier-card--hidden.is-on { border-color: rgba(160, 120, 255, 0.45); }
.tier-card.is-current {
  background: linear-gradient(145deg, rgba(200, 164, 92, 0.16), rgba(255, 255, 255, 0.03));
}

.tier-card__name {
  font-size: 14px;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

.tier-card__exp {
  font-size: 12px;
  color: var(--text-muted);
  direction: ltr;
  unicode-bidi: isolate;
  position: relative;
  z-index: 1;
}

/* shop */
.shop-grid {
  display: grid;
  gap: 12px;
}

.shop-card {
  border-radius: 16px;
  padding: 14px;
  display: grid;
  gap: 12px;
}

.shop-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.shop-card__name {
  font-size: 15px;
  font-weight: 700;
}

.shop-card__meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--accent);
}

.shop-card__desc {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.shop-card__price {
  font-size: 20px;
  font-weight: 800;
  direction: ltr;
  white-space: nowrap;
  color: var(--text);
}

.shop-card__pays {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.pay-chip {
  min-height: 40px;
  border: 0;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.pay-chip--ali { background: linear-gradient(180deg, #3d8dff, #1677ff); }
.pay-chip--wx { background: linear-gradient(180deg, #2ad27a, #07c160); }
.pay-chip--qq { background: linear-gradient(180deg, #4ec8ff, #12b7f5); }
.pay-chip:active { filter: brightness(0.94); }

.shop-empty {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}

/* settings */
.settings-grid {
  display: grid;
  gap: 14px;
}

.setting-block__label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.setting-current-route {
  font-size: 14px;
  font-weight: 600;
}

.setting-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.45;
}

.setting-options--seg {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.setting-chip {
  position: relative;
  cursor: pointer;
}

.setting-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.setting-chip span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
  font-weight: 600;
}

.setting-chip input:checked + span {
  border-color: rgba(200, 164, 92, 0.55);
  background: var(--accent-soft);
  color: var(--accent);
}

.profile-page .contact-box {
  border-radius: 18px;
  border: 1px solid rgba(200, 164, 92, 0.28);
  background: rgba(200, 164, 92, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* Desktop / tablet */
@media (min-width: 768px) {
  .profile-page {
    padding: 24px 24px 40px;
    gap: 18px;
  }

  .profile-hero {
    padding: 22px 24px;
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .profile-hero__actions {
    grid-template-columns: 1fr;
    min-width: 150px;
  }

  .tier-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .shop-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shop-card {
    min-height: 150px;
  }

  .settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-grid .setting-block:first-child {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1024px) {
  .profile-page {
    width: min(100%, 980px);
  }

  .profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 22px;
    font-size: 28px;
  }

  .profile-name {
    font-size: 24px;
  }
}

/* Mobile touch targets */
@media (max-width: 767px) {
  .profile-hero__actions {
    grid-template-columns: 1fr 1fr;
  }

  .profile-hero__actions #btnLogout {
    grid-column: 1 / -1;
  }

  .redeem-row {
    grid-template-columns: 1fr;
  }

  .redeem-row .btn-glass-primary {
    width: 100%;
  }
}


/* shop — select then pay */
.shop-hint {
  margin: -4px 0 12px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
}

.shop-grid {
  display: grid;
  gap: 10px;
}

.shop-pick {
  position: relative;
  width: 100%;
  text-align: start;
  border-radius: 16px;
  padding: 14px;
  padding-inline-end: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.shop-pick:active { transform: scale(0.985); }

.shop-pick.is-selected {
  border-color: rgba(200, 164, 92, 0.55);
  background: linear-gradient(145deg, rgba(200, 164, 92, 0.18), rgba(255, 255, 255, 0.04));
  box-shadow: 0 0 0 1px rgba(200, 164, 92, 0.2), 0 10px 28px rgba(0, 0, 0, 0.22);
}

.shop-pick__body { min-width: 0; flex: 1; }

.shop-pick__name {
  font-size: 15px;
  font-weight: 700;
}

.shop-pick__meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--accent);
}

.shop-pick__desc {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.shop-pick__price-wrap {
  text-align: end;
  flex-shrink: 0;
  padding-inline-end: 28px;
}
.shop-pick__price {
  font-size: 20px;
  font-weight: 800;
  direction: ltr;
  white-space: nowrap;
}
.shop-pick__price-note {
  margin-top: 2px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.45);
  white-space: nowrap;
}

.shop-pick__check {
  position: absolute;
  inset-inline-end: 14px;
  top: 50%;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  border-radius: 50%;
  border: 1.5px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.04);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.25s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.shop-pick.is-selected .shop-pick__check {
  border-color: rgba(200, 164, 92, 0.7);
  background: radial-gradient(circle at 50% 50%, #e2c078 0 38%, transparent 40%),
    linear-gradient(135deg, #e2c078, #8b6b2e);
  transform: scale(1.08);
}

.shop-pay {
  margin-top: 14px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px) saturate(1.25);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.28s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.shop-pay.is-in {
  opacity: 1;
  transform: none;
}

.shop-pay[hidden] { display: none !important; }

.shop-pay__head { margin-bottom: 12px; }

.shop-pay__title {
  font-size: 13px;
  font-weight: 700;
}

.shop-pay__selected {
  margin-top: 4px;
  font-size: 12px;
  color: var(--accent);
  direction: ltr;
  unicode-bidi: isolate;
}

.shop-pay__ways {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.pay-chip {
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.pay-chip--ali { background: linear-gradient(180deg, #3d8dff, #1677ff); }
.pay-chip--wx { background: linear-gradient(180deg, #2ad27a, #07c160); }
.pay-chip--qq { background: linear-gradient(180deg, #4ec8ff, #12b7f5); }
.pay-chip:active { transform: scale(0.97); filter: brightness(0.94); }

.shop-empty {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}

/* tiers — current only + upgrade recommend */
.tier-status {
  display: grid;
  gap: 12px;
}

.tier-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 14px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  gap: 4px;
}

.tier-card__glow {
  position: absolute;
  inset: auto -20% -40% auto;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  opacity: 0.35;
  pointer-events: none;
}

.tier-card--none .tier-card__glow { background: radial-gradient(circle, #8890a0, transparent 70%); }
.tier-card--vip .tier-card__glow { background: radial-gradient(circle, #c8a45c, transparent 70%); }
.tier-card--diamond .tier-card__glow { background: radial-gradient(circle, #78b4ff, transparent 70%); }
.tier-card--hidden .tier-card__glow { background: radial-gradient(circle, #a078ff, transparent 70%); }

.tier-card.is-on { border-color: rgba(200, 164, 92, 0.4); }
.tier-card--diamond.is-on { border-color: rgba(120, 180, 255, 0.45); }
.tier-card--hidden.is-on { border-color: rgba(160, 120, 255, 0.45); }
.tier-card--none.is-on { border-color: rgba(140, 148, 168, 0.35); }
.tier-card.is-current {
  background: linear-gradient(145deg, rgba(200, 164, 92, 0.16), rgba(255, 255, 255, 0.03));
}
.tier-card--diamond.is-current {
  background: linear-gradient(145deg, rgba(120, 180, 255, 0.16), rgba(255, 255, 255, 0.03));
}
.tier-card--hidden.is-current {
  background: linear-gradient(145deg, rgba(160, 120, 255, 0.16), rgba(255, 255, 255, 0.03));
}
.tier-card--none.is-current {
  background: linear-gradient(145deg, rgba(140, 148, 168, 0.14), rgba(255, 255, 255, 0.03));
}

.tier-card__tag,
.tier-upgrade__tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}

.tier-card__name {
  font-size: 16px;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

.tier-card__exp {
  font-size: 12px;
  color: var(--text-muted);
  direction: ltr;
  unicode-bidi: isolate;
  position: relative;
  z-index: 1;
}

.tier-upgrade {
  border-radius: 16px;
  padding: 14px;
  display: grid;
  gap: 6px;
  border-color: rgba(200, 164, 92, 0.35);
  background: linear-gradient(145deg, rgba(200, 164, 92, 0.12), rgba(255, 255, 255, 0.04));
}

.tier-upgrade__name {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
}

.tier-upgrade__hint {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 4px;
}

.tier-upgrade__btn {
  margin-top: 4px;
  width: 100%;
}

.tier-top-hint {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

/* keep old grid unused */
.tier-grid { display: grid; gap: 10px; }



.profile-vip { margin-top: 8px; font-size: 13px; color: var(--accent); }
.profile-vip__pill {
  display: inline-flex; align-items: center; max-width: 100%; min-height: 28px;
  padding: 0 12px; border-radius: 999px; border: 1px solid rgba(200, 164, 92, 0.4);
  background: linear-gradient(145deg, rgba(200, 164, 92, 0.22), rgba(200, 164, 92, 0.08));
  color: var(--accent); font-size: 12px; font-weight: 700; line-height: 1.2;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.profile-vip--none .profile-vip__pill {
  border-color: rgba(140, 148, 168, 0.35);
  background: linear-gradient(145deg, rgba(140, 148, 168, 0.2), rgba(255, 255, 255, 0.04));
  color: var(--text-muted);
}
.profile-vip--diamond .profile-vip__pill {
  border-color: rgba(120, 180, 255, 0.45);
  background: linear-gradient(145deg, rgba(120, 180, 255, 0.22), rgba(120, 180, 255, 0.06));
  color: #9cc8ff;
}
.profile-vip--hidden .profile-vip__pill {
  border-color: rgba(160, 120, 255, 0.45);
  background: linear-gradient(145deg, rgba(160, 120, 255, 0.22), rgba(160, 120, 255, 0.06));
  color: #c2a8ff;
}



/* ===== Profile clean v27 ===== */
.profile-hero__tools {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.profile-tool {
  min-height: 40px;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  transition: transform 0.15s ease, background 0.15s ease;
}

.profile-tool:active { transform: scale(0.97); }

.profile-tool--danger {
  color: #ff8f8f;
  border-color: rgba(255, 120, 120, 0.28);
}

.shop-panel__intro {
  margin-bottom: 14px;
}

.shop-panel__badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  margin-bottom: 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(200, 164, 92, 0.4);
  background: rgba(200, 164, 92, 0.16);
  color: var(--accent);
}

.shop-panel__badge--diamond {
  border-color: rgba(120, 180, 255, 0.45);
  background: rgba(120, 180, 255, 0.16);
  color: #9cc8ff;
}

.shop-panel__badge--hidden {
  border-color: rgba(160, 120, 255, 0.45);
  background: rgba(160, 120, 255, 0.16);
  color: #c2a8ff;
}

.shop-panel__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.shop-panel__hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.55;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.shop-panel__intro--all { margin-bottom: 10px; }
.shop-tier {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.shop-tier:first-of-type { margin-top: 4px; padding-top: 0; border-top: 0; }
.shop-tier__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  direction: rtl;
}
.shop-tier__head .shop-panel__badge { margin-bottom: 0; }
.shop-tier__name {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.shop-tier .shop-grid { margin-top: 2px; }
.shop-tier-detail {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}
.shop-tier-detail[hidden] { display: none !important; }
.shop-tier-detail__text { margin: 0; }

.shop-panel--done {
  text-align: center;
  padding: 18px;
}

.profile-panel--compact {
  padding: 14px;
}

.profile-details {
  padding: 0;
  overflow: hidden;
}

.profile-details__sum {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.profile-details__sum::-webkit-details-marker { display: none; }

.profile-details__sum::after {
  content: "";
  width: 8px;
  height: 8px;
  border-inline-end: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.profile-details[open] .profile-details__sum::after {
  transform: rotate(-135deg);
}

.profile-details .settings-grid {
  padding: 0 16px 16px;
}

.profile-disclaimer {
  margin: 14px 4px 8px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 12px;
  line-height: 1.65;
  color: var(--text-muted, #8b8b98);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
  direction: rtl;
  text-align: start;
}
.profile-panel--link { padding: 0; overflow: hidden; }
.profile-link-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: start;
}
.profile-link-row__chev {
  width: 8px;
  height: 8px;
  border-inline-end: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  flex-shrink: 0;
}
.btn-copy.is-fav {
  border-color: rgba(200, 164, 92, 0.55);
  color: var(--accent);
}
.wangpan-page { padding: 6px 6px 88px; }
.wp-ico { width: 18px; height: 18px; display: block; }
.wp-ico-wrap {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; flex-shrink: 0;
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
}
.wp-ico-wrap .wp-ico { width: 17px; height: 17px; }
.wp-ico-wrap--folder { background: rgba(245, 186, 72, 0.16); color: #d4a017; }
.wp-ico-wrap--video { background: rgba(90, 150, 255, 0.16); color: #5a96ff; }
.wp-ico-wrap--image { background: rgba(80, 200, 140, 0.16); color: #3cb878; }
.wp-ico-wrap--audio { background: rgba(180, 120, 255, 0.16); color: #a078ff; }
.wp-ico-wrap--file { background: rgba(255,255,255,0.06); color: var(--text-muted); }
.wangpan-loading,
.wangpan-empty {
  padding: 40px 16px;
  text-align: center;
  color: var(--text-muted);
  display: grid;
  justify-items: center;
  gap: 10px;
}
.wangpan-loading .wp-ico { width: 28px; height: 28px; opacity: 0.7; }
.wangpan-top { margin-bottom: 12px; }
.wangpan-top__row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px;
}
.wangpan-owner-tip {
  font-size: 12px; font-weight: 700; color: var(--text-muted);
  padding: 6px 10px; border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.04);
}
.wangpan-vip-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 10px; padding: 10px 12px; border-radius: 14px;
  border: 1px solid rgba(200,164,92,0.35);
  background: rgba(200,164,92,0.12);
  color: var(--accent); font-size: 12px; font-weight: 600; line-height: 1.4;
}
.wangpan-vip-banner__btn {
  flex-shrink: 0; border: 0; border-radius: 999px;
  min-height: 30px; padding: 0 12px;
  background: rgba(200,164,92,0.28); color: var(--accent);
  font: inherit; font-size: 12px; font-weight: 800; cursor: pointer;
}
.wangpan-add-btn,
.wangpan-action-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid rgba(200,164,92,0.4);
  background: rgba(200,164,92,0.14);
  color: var(--accent);
  border-radius: 999px;
  min-height: 34px;
  padding: 0 12px;
  font: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
}
.wangpan-add-btn .wp-ico,
.wangpan-action-btn .wp-ico { width: 15px; height: 15px; }
.wangpan-account-row { margin-bottom: 2px; }
.wangpan-aid {
  width: 100%;
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 0 12px;
}
.wangpan-pathbar {
  display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; margin: 10px 0;
  min-width: 0;
}
.wangpan-chip {
  display: inline-flex; align-items: center; gap: 4px;
  flex: 0 0 auto;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  border-radius: 999px;
  min-height: 32px;
  padding: 0 10px;
  font: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
}
.wangpan-chip .wp-ico { width: 14px; height: 14px; }
.wangpan-path {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wangpan-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 12px;
}
.wangpan-filter {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 52px;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.04);
  color: var(--text-muted);
  font: inherit; font-size: 11px; font-weight: 700; cursor: pointer;
}
.wangpan-filter .wp-ico { width: 16px; height: 16px; }
.wangpan-filter.active {
  color: var(--accent);
  border-color: rgba(200,164,92,0.45);
  background: rgba(200,164,92,0.12);
}
.wangpan-selbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
  margin: 0 0 8px; padding: 6px 8px; border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.04);
}
.wangpan-selbar__all {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; color: var(--text-muted); cursor: pointer;
}
.wangpan-selbar__count {
  flex: 1 1 auto; font-size: 12px; font-weight: 700; color: var(--accent);
}
.wangpan-selbar__btn {
  border: 1px solid rgba(200,164,92,0.4);
  background: rgba(200,164,92,0.14);
  color: var(--accent);
  border-radius: 999px;
  min-height: 30px; padding: 0 10px;
  font: inherit; font-size: 12px; font-weight: 800; cursor: pointer;
}
.wangpan-selbar__btn:disabled { opacity: 0.4; cursor: not-allowed; }
.wangpan-list { display: grid; gap: 6px; }
.wangpan-item {
  display: grid;
  align-items: center;
  gap: 8px;
  padding: 8px 8px;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  box-shadow: none;
  cursor: pointer;
}
.wangpan-item--folder {
  grid-template-columns: 34px minmax(0, 1fr) 22px;
}
.wangpan-item--file {
  grid-template-columns: 34px minmax(0, 1fr) auto;
}
.wangpan-item.is-checked {
  border-color: rgba(200,164,92,0.45);
  background: rgba(200,164,92,0.08);
}
.wangpan-item__main { min-width: 0; }
.wangpan-item__acts {
  display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0;
}
.wangpan-check {
  display: grid; place-items: center; margin: 0; width: 28px; height: 28px; cursor: pointer;
}
.wangpan-check input { width: 15px; height: 15px; accent-color: #c8a45c; cursor: pointer; }
.wangpan-item__name {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wangpan-item__meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.wangpan-item__play,
.wangpan-item__copy,
.wangpan-icon-btn {
  width: 32px; height: 32px; border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
  display: grid; place-items: center;
  cursor: pointer; padding: 0;
}
.wangpan-item__play {
  color: #5a96ff;
  background: rgba(90, 150, 255, 0.14);
  border-color: rgba(90, 150, 255, 0.28);
}
.wangpan-item__play .wp-ico,
.wangpan-item__copy .wp-ico { width: 15px; height: 15px; }
.wangpan-item__copy:active,
.wangpan-item__play:active { transform: scale(0.96); }
.wangpan-item__chev { color: var(--text-muted); opacity: 0.55; display: grid; place-items: center; }
.wangpan-item__chev .wp-ico { width: 16px; height: 16px; }
.wangpan-hub-tabs { margin-bottom: 8px; }
.wangpan-filters { margin-bottom: 8px; gap: 4px; }
.wangpan-filter { min-height: 44px; border-radius: 12px; }
.wangpan-tools {
  display: grid;
  gap: 8px;
  margin: 6px 0 8px;
}
.wangpan-search {
  display: flex;
  align-items: center;
  gap: 6px;
}
.wangpan-search__input {
  flex: 1;
  min-width: 0;
  margin: 0;
}
.wangpan-tools__acts { display: none; }
.wangpan-current-acc {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0 0 8px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-align: start;
}
.wangpan-current-acc .wp-ico { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.7; }
.wangpan-current-acc span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-theme="light"] .wangpan-current-acc { background: #fff; }

/* 固定右下角：维汉切换只换文案，不随页面 RTL 翻转（字左、图标右） */
.wangpan-fab {
  position: fixed;
  right: 16px;
  left: auto;
  bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  z-index: 160;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
  direction: ltr;
  unicode-bidi: isolate;
}
.wangpan-fab__main,
.wangpan-fab__act {
  pointer-events: auto;
}
.wangpan-fab__main {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: #1a1408;
  background: linear-gradient(145deg, #e8c57a 0%, #c8a45c 55%, #b08a3e 100%);
  box-shadow: 0 10px 28px rgba(200, 164, 92, 0.38), 0 2px 8px rgba(0,0,0,0.12);
  display: grid;
  place-items: center;
  position: relative;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.wangpan-fab__main .wp-ico { width: 22px; height: 22px; }
.wangpan-fab__main-ico { display: grid; place-items: center; transition: opacity 0.18s ease, transform 0.22s ease; }
.wangpan-fab__main-ico--close {
  position: absolute;
  opacity: 0;
  transform: rotate(-90deg) scale(0.6);
}
.wangpan-fab.is-open .wangpan-fab__main-ico--plus {
  opacity: 0;
  transform: rotate(90deg) scale(0.6);
}
.wangpan-fab.is-open .wangpan-fab__main-ico--close {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}
.wangpan-fab.is-open .wangpan-fab__main {
  transform: scale(1.04);
  box-shadow: 0 12px 30px rgba(200, 164, 92, 0.48);
}
.wangpan-fab__menu {
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.18s ease, transform 0.22s ease;
}
.wangpan-fab.is-open .wangpan-fab__menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.wangpan-fab__act {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  color: var(--text);
  font: inherit;
  direction: ltr;
}
.wangpan-fab__label {
  max-width: 140px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(20, 18, 14, 0.82);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(0,0,0,0.18);
  /* 文案可仍按维文书写，但整块标签在图标左侧 */
  unicode-bidi: plaintext;
}
html[data-theme="light"] .wangpan-fab__label {
  background: rgba(255,255,255,0.96);
  color: #2a2418;
  border: 1px solid rgba(0,0,0,0.06);
}
.wangpan-fab__ico {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: #fff;
  color: #8a6a2e;
  border: 1px solid rgba(200,164,92,0.28);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}
.wangpan-fab__ico .wp-ico { width: 18px; height: 18px; }
.wangpan-fab__act[data-fab="add"] .wangpan-fab__ico { color: #5a96ff; }
.wangpan-fab__act[data-fab="upload"] .wangpan-fab__ico { color: #2f9e6b; }
.wangpan-fab__act[data-fab="share"] .wangpan-fab__ico { color: #c45c3a; }

.wangpan-bottom-sheet {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  max-height: min(78vh, 640px);
  overflow: auto;
  padding: 10px 14px calc(16px + env(safe-area-inset-bottom, 0px));
  border-radius: 22px 22px 0 0;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: wpSheetIn 0.24s ease;
}
@keyframes wpSheetIn {
  from { transform: translateY(24px); opacity: 0.6; }
  to { transform: translateY(0); opacity: 1; }
}
.wangpan-bottom-sheet__grab {
  width: 42px; height: 4px; border-radius: 999px;
  margin: 2px auto 10px;
  background: rgba(127,127,127,0.35);
}
.wangpan-acc-list { display: grid; gap: 8px; margin-bottom: 12px; }
.wangpan-acc-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 18px;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.04);
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.wangpan-acc-item.is-active {
  border-color: rgba(200,164,92,0.5);
  background: rgba(200,164,92,0.12);
}
.wangpan-acc-item__ico {
  width: 36px; height: 36px; border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(200,164,92,0.14); color: var(--accent);
}
.wangpan-acc-item__main { min-width: 0; display: grid; gap: 2px; }
.wangpan-acc-item__name {
  font-size: 13px; font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wangpan-acc-item__meta { font-size: 11px; color: var(--text-muted); }
.wangpan-acc-item__check { color: var(--accent); opacity: 0.8; }
.wangpan-sheet-empty {
  padding: 24px 12px; text-align: center; color: var(--text-muted); font-size: 13px;
}
.wangpan-upload-drop {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 22px 14px;
  margin-bottom: 12px;
  border-radius: 16px;
  border: 1.5px dashed rgba(200,164,92,0.45);
  background: rgba(200,164,92,0.08);
  cursor: pointer;
}
.wangpan-upload-drop__ico {
  width: 48px; height: 48px; border-radius: 14px;
  display: grid; place-items: center;
  background: rgba(200,164,92,0.16); color: var(--accent);
}
.wangpan-upload-drop__ico .wp-ico { width: 22px; height: 22px; }
.wangpan-upload-drop__name { font-size: 13px; font-weight: 700; text-align: center; word-break: break-all; }
.wangpan-upload-drop__meta { font-size: 11px; color: var(--text-muted); }
.wangpan-upload-progress { margin-bottom: 12px; }
.wangpan-upload-progress__bar {
  height: 8px; border-radius: 999px;
  background: rgba(127,127,127,0.18); overflow: hidden;
}
.wangpan-upload-progress__bar > i {
  display: block; height: 100%; width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #c8a45c, #e2c47a);
  transition: width 0.12s linear;
}
.wangpan-upload-progress__txt {
  margin-top: 6px; font-size: 12px; color: var(--text-muted); text-align: center;
}
.wx-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.wx-grid-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  min-width: 0;
  position: relative;
}
.wx-grid-item.is-checked {
  border-color: rgba(200,164,92,0.55);
  background: rgba(200,164,92,0.08);
}
.wx-grid-item__check {
  position: absolute;
  top: 10px;
  inset-inline-start: 10px;
  z-index: 2;
  background: rgba(0,0,0,0.35);
  border-radius: 8px;
  padding: 2px 4px;
}
.wx-grid-item__thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border: 0;
  padding: 0;
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(126, 200, 255, 0.1);
  color: inherit;
  cursor: pointer;
  position: relative;
}
.wx-grid-item__thumb.is-sk::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  animation: wxSk 1.1s linear infinite;
}
@keyframes wxSk {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.wx-grid-item__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  vertical-align: top;
}
.wx-grid-item__name {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wx-grid-item__meta {
  font-size: 11px;
  color: var(--text-muted);
}
.wx-grid-item__copy {
  width: 100% !important;
  height: 34px !important;
  border-radius: 10px;
  margin-top: 2px;
}
.wx-more-sentinel {
  grid-column: 1 / -1;
  padding: 14px 8px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  min-height: 28px;
}
html[data-theme="light"] .wx-grid-item {
  background: #fff;
}
.wangpan-pathbar { margin: 6px 0; gap: 6px; flex-wrap: nowrap; }
.wangpan-empty-card {
  margin-top: 24px; padding: 28px 18px; text-align: center;
  border-radius: 18px; border: 1px dashed rgba(255,255,255,0.14);
  color: var(--text-muted);
  display: grid; justify-items: center; gap: 12px;
}
.wangpan-empty-card__ico {
  width: 56px; height: 56px; border-radius: 16px;
  display: grid; place-items: center;
  background: rgba(126,200,255,0.12); color: #7ec8ff;
}
.wangpan-empty-card__ico .wp-ico { width: 28px; height: 28px; }
.wangpan-player-mask {
  position: fixed; inset: 0; z-index: 240;
  background: rgba(0,0,0,0.55);
  display: grid; place-items: end center;
  padding: 12px;
}
.wangpan-player-sheet,
.wangpan-bind-sheet {
  width: min(640px, 100%);
  max-height: min(88vh, 760px);
  overflow: auto;
  border-radius: 18px 18px 14px 14px;
  padding: 14px;
}
.wangpan-player-sheet__head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px;
}
.wangpan-player-sheet__title {
  font-weight: 800; font-size: 15px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wangpan-player__video,
.wangpan-player__img {
  width: 100%; max-height: 56vh; border-radius: 12px; background: #000; object-fit: contain;
}
.wangpan-player__audio { width: 100%; }
.wangpan-player-sheet__actions { margin-top: 12px; }
.wangpan-field-label {
  display: block; font-size: 12px; color: var(--text-muted); margin: 10px 0 6px;
}
.wangpan-plugin-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.wangpan-plugin {
  min-height: 40px; border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.04);
  color: var(--text-muted);
  font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.wangpan-plugin.active {
  color: var(--accent);
  border-color: rgba(200,164,92,0.45);
  background: rgba(200,164,92,0.12);
}
.wangpan-method-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.wangpan-method {
  min-height: 38px; border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.04);
  color: var(--text-muted);
  font: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
}
.wangpan-method.active {
  color: var(--accent);
  border-color: rgba(200,164,92,0.45);
  background: rgba(200,164,92,0.12);
}
.wangpan-hint { margin: 8px 0 0; font-size: 12px; color: var(--text-muted); line-height: 1.55; }
.wangpan-status {
  margin: 10px 0 0; font-size: 12px; color: var(--text-muted); line-height: 1.45;
}
.wangpan-status.is-err { color: #e57373; }
.wangpan-inline {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center;
}
.wangpan-side-btn {
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border-radius: 12px;
  min-height: 42px; padding: 0 12px;
  font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.wangpan-link-btn {
  display: inline-flex; margin: 4px 0 2px;
  border: 0; background: transparent; color: var(--accent);
  font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; padding: 0;
  text-decoration: underline;
}
.wangpan-qr-box {
  margin: 8px 0 12px; min-height: 160px;
  display: grid; place-items: center;
  border-radius: 14px; border: 1px dashed rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.03); padding: 12px;
}
.wangpan-qr-img {
  width: min(220px, 70vw); height: auto;
  background: #fff; border-radius: 10px; padding: 8px;
}
.wangpan-captcha {
  height: 42px; border-radius: 8px; border: 1px solid var(--glass-border);
  background: #fff; cursor: pointer;
}
.wangpan-input,
.wangpan-textarea {
  width: 100%; box-sizing: border-box;
  border-radius: 12px; border: 1px solid var(--glass-border);
  background: rgba(0,0,0,0.18); color: var(--text);
  font: inherit; font-size: 13px; padding: 10px 12px;
}
.wangpan-textarea { resize: vertical; min-height: 110px; line-height: 1.45; }
.wangpan-bind-submit { width: 100%; margin-top: 14px; min-height: 44px; }
html[data-theme="light"] .wangpan-item,
html[data-theme="light"] .wangpan-aid,
html[data-theme="light"] .wangpan-input,
html[data-theme="light"] .wangpan-textarea {
  background: rgba(255,255,255,0.86);
}

.history-page { padding: 0 12px 24px; }
#viewHistory .view-topbar,
.app-shell--subpage #viewHistory .view-topbar,
#viewHistory .history-topbar {
  position: sticky;
  top: 0;
  z-index: 140;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  margin: 0 0 10px;
  padding: calc(4px + env(safe-area-inset-top, 0px)) 12px 8px;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
#viewHistory .back-link {
  height: 38px;
  padding: 0 14px 0 12px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
  backdrop-filter: blur(20px) saturate(1.35);
  -webkit-backdrop-filter: blur(20px) saturate(1.35);
  color: var(--text);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  max-width: max-content;
  flex: 0 0 auto;
  text-decoration: none;
  white-space: nowrap;
}
#viewHistory .back-link:hover {
  border-color: rgba(200, 164, 92, 0.45);
  color: var(--accent);
  background: var(--accent-soft);
}
.history-topbar__title {
  margin: 0;
  min-width: 0;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#viewHistory .history-clear {
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text-muted);
  border-radius: 999px;
  min-height: 34px;
  padding: 0 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
}
#viewHistory .history-clear[hidden] {
  visibility: hidden;
  pointer-events: none;
}
html[data-theme="light"] #viewHistory .back-link,
html[data-theme="light"] #viewHistory .history-clear {
  background: rgba(255, 255, 255, 0.72);
  color: #1c1c24;
  border-color: rgba(40, 40, 55, 0.12);
}
.history-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.history-tabs--sub { margin-bottom: 14px; }
.history-tab {
  flex: 1;
  min-height: 38px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.04);
  color: var(--text-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.history-tab.active {
  color: var(--accent);
  border-color: rgba(200,164,92,0.45);
  background: rgba(200,164,92,0.12);
}
.history-empty {
  padding: 36px 16px;
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed rgba(255,255,255,0.12);
  border-radius: 16px;
}
.history-card { position: relative; }
.history-card__ph {
  width: 100%;
  aspect-ratio: 2/3;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.35);
  font-size: 28px;
}
.history-card__del {
  position: absolute;
  top: 6px;
  inset-inline-start: 6px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 0;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}
html[data-lang="zh"] .profile-disclaimer,
html.locale-zh .profile-disclaimer {
  direction: ltr;
}

@media (max-width: 767px) {
  .profile-hero__actions {
    display: none;
  }
}

@media (min-width: 768px) {
  .profile-hero {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
  .profile-hero__tools {
    grid-template-columns: 1fr;
    min-width: 140px;
  }
}



/* ===== Detail + Player liquid glass v28 ===== */
#viewDetail,
#viewPlayer {
  position: relative;
}

/* Floating glass back — no solid white bar */
#viewDetail .view-topbar,
#viewPlayer .view-topbar,
.app-shell--subpage #viewDetail .view-topbar,
.app-shell--subpage #viewPlayer .view-topbar {
  position: sticky;
  top: 0;
  z-index: 140;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  width: auto;
  max-width: 100%;
  margin: 0 0 10px;
  padding: calc(4px + env(safe-area-inset-top, 0px)) 0 4px;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

#viewDetail .back-link,
#viewPlayer .back-link {
  height: 38px;
  padding: 0 14px 0 12px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
  backdrop-filter: blur(20px) saturate(1.35);
  -webkit-backdrop-filter: blur(20px) saturate(1.35);
  color: var(--text);
  font-weight: 600;
}

#viewDetail .back-link:hover,
#viewPlayer .back-link:hover {
  border-color: rgba(200, 164, 92, 0.45);
  color: var(--accent);
  background: var(--accent-soft);
}

/* Detail hero glass shell */
.detail-hero {
  border-radius: 22px;
  border: 1px solid var(--glass-border);
  background: rgba(12, 12, 18, 0.35);
  box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.detail-backdrop {
  filter: blur(28px) brightness(0.38) saturate(1.15);
  transform: scale(1.1);
}

html[data-theme="light"] .detail-backdrop {
  filter: blur(30px) brightness(0.42) saturate(1.2);
}

/* Always readable on poster blur (both themes) */
.detail-hero .detail-info h1 {
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
}

.detail-hero .detail-desc {
  color: rgba(255, 255, 255, 0.82);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
}

.detail-hero .detail-tag {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.detail-hero .btn-copy {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.detail-hero .btn-copy:hover {
  background: rgba(200, 164, 92, 0.28);
  border-color: rgba(200, 164, 92, 0.55);
  color: #f3e2b0;
}

.detail-hero .play-primary {
  box-shadow: 0 10px 28px rgba(200, 164, 92, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.detail-poster {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.episodes-block {
  border-radius: 20px;
  padding: 14px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
}

.episodes-block .section-head {
  margin-bottom: 10px;
}

.episodes-block .detail-copy-hint {
  color: var(--text-muted);
}

/* Episode chips glass */
.ep-btn {
  background: var(--glass-bg-soft);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 var(--glass-highlight);
  color: var(--text);
}

.ep-btn:hover {
  border-color: rgba(200, 164, 92, 0.45);
  color: var(--accent);
  background: var(--accent-soft);
}

.ep-btn.active {
  background: linear-gradient(145deg, rgba(200, 164, 92, 0.28), rgba(200, 164, 92, 0.1));
  border-color: rgba(200, 164, 92, 0.55);
  color: var(--accent);
  box-shadow: 0 6px 16px rgba(200, 164, 92, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* Player */
.player-box {
  border-radius: 18px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  overflow: hidden;
}
#viewPlayer .player-box {
  border-radius: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}

.player-side {
  border-radius: 18px;
  padding: 16px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
}

.player-side h2 {
  color: var(--text);
}

.player-side p {
  color: var(--text-muted);
}

.player-episodes {
  border-radius: 18px;
  padding: 14px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
}

.player-episodes__title {
  color: var(--text);
}

html[data-theme="light"] #viewDetail,
html[data-theme="light"] #viewPlayer {
  color: var(--text);
}

html[data-theme="light"] .episodes-block,
html[data-theme="light"] .player-side,
html[data-theme="light"] .player-episodes {
  background: rgba(255, 255, 255, 0.62);
  border-color: rgba(40, 40, 55, 0.1);
}

html[data-theme="light"] .ep-btn {
  background: rgba(255, 255, 255, 0.72);
  color: #2a2a35;
  border-color: rgba(40, 40, 55, 0.1);
}

html[data-theme="light"] .ep-btn.active {
  background: linear-gradient(145deg, rgba(200, 164, 92, 0.32), rgba(255, 255, 255, 0.55));
  color: #8a6a22;
  border-color: rgba(180, 140, 60, 0.55);
}

html[data-theme="light"] #viewDetail .back-link,
html[data-theme="light"] #viewPlayer .back-link {
  background: rgba(255, 255, 255, 0.72);
  color: #1c1c24;
  border-color: rgba(40, 40, 55, 0.12);
}

@media (max-width: 767px) {
  .detail-hero {
    margin-inline: 0;
    border-radius: 18px;
  }

  .detail-hero-inner {
    padding: 16px 14px 18px;
  }

  #viewDetail .view-topbar,
  #viewPlayer .view-topbar,
  #viewHistory .view-topbar,
  .app-shell--subpage #viewDetail .view-topbar,
  .app-shell--subpage #viewPlayer .view-topbar,
  .app-shell--subpage #viewHistory .view-topbar {
    margin-bottom: 8px;
    padding-top: calc(2px + env(safe-area-inset-top, 0px));
  }

  .player-side {
    max-height: none;
  }
}

.movie-card__poster { overflow: hidden; }
.movie-card__poster img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  background: #121218;
}
.movie-card__type {
  position: absolute; left: 6px; right: auto; top: 6px; z-index: 2;
  max-width: calc(100% - 56px);
  min-height: 22px; padding: 0 8px; border-radius: 8px;
  font-size: 10px; font-weight: 700; line-height: 22px;
  background: rgba(180, 140, 60, 0.92); color: #1a1408;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.movie-card__score {
  position: absolute; right: 6px; left: auto; top: 6px; z-index: 2;
  min-height: 22px; padding: 0 7px; border-radius: 8px;
  font-size: 10px; font-weight: 700; line-height: 22px;
  background: rgba(0,0,0,0.55); color: #f5d78e;
  display: inline-flex; align-items: center; gap: 3px;
}
.movie-card__badge { z-index: 2; }

.drawer-overlay.is-open .drawer-panel { transform: translateX(0); }
.drawer-item {
  display: flex; align-items: center; gap: 10px; text-align: start;
  padding: 12px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface);
}
.drawer-item__icon {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  background: center/cover no-repeat, var(--bg-elevated);
  border: 1px solid var(--border);
}
.drawer-item__text { min-width: 0; flex: 1; }
.drawer-item__title { font-weight: 700; font-size: 13px; }
.drawer-item__sub { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.drawer-item.active { border-color: rgba(200,164,92,.55); color: var(--accent); }

.search-route-vitem {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.search-route-vitem__icon {
  width: 28px; height: 28px; border-radius: 8px;
  background: #222 center/cover no-repeat; border: 1px solid var(--border);
}
.search-route-vitem__name {
  max-width: 100%; font-size: 10px; line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.hero-slide { position: relative; overflow: hidden; }
.hero-slide__img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block; background: #111;
}
.hero-slide__shade, .hero-slide__meta { position: absolute; z-index: 1; }
.filter-group[hidden] { display: none !important; }

/* ===== chrome/list simplify v41 ===== */
.top-bar__menu,
.top-bar__icon {
  width: 40px;
  height: 40px;
  border-radius: 0;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: var(--text);
}
.top-bar__menu:hover,
.top-bar__icon:hover,
.top-bar__menu:active,
.top-bar__icon:active {
  background: transparent !important;
}

/* hide active capsule on bottom tab */
.tab-bar__pill {
  display: none !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
}
.tab-bar__btn.active .tab-bar__icon {
  transform: none;
}

/* normal cinema list — less AI glass, smaller radius */
.movie-grid {
  gap: 10px 8px;
}
.movie-card {
  border-radius: 6px !important;
  border: 0 !important;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
  overflow: hidden;
}
html[data-theme="light"] .movie-card {
  background: transparent !important;
}
.movie-card__poster {
  border-radius: 6px;
  overflow: hidden;
  background: #1a1a1a center/cover no-repeat;
}
.movie-card__poster img {
  border-radius: 6px;
}
.movie-card__type {
  left: 4px;
  top: 4px;
  min-height: 18px;
  padding: 0 6px;
  border-radius: 3px;
  font-size: 10px;
  line-height: 18px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-weight: 600;
}
.movie-card__score {
  right: 4px;
  top: 4px;
  min-height: 18px;
  padding: 0 5px;
  border-radius: 3px;
  font-size: 10px;
  line-height: 18px;
  background: rgba(0, 0, 0, 0.65);
  color: #ffd56a;
  font-weight: 600;
}
.movie-card__badge {
  border-radius: 3px;
  min-height: 18px;
  padding: 0 6px;
  font-size: 10px;
}
.card-body {
  padding: 6px 2px 4px;
}
.card-title {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  -webkit-line-clamp: 1;
}
.card-sub {
  margin-top: 2px;
  font-size: 10px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== drawer routes v42 ===== */
.drawer-item {
  display: flex !important;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  text-align: start;
}
.drawer-item__icon {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  max-height: 42px !important;
  border-radius: 10px !important;
  flex-shrink: 0 !important;
  overflow: hidden;
  background: #1a1a22 !important;
  border: 1px solid var(--border) !important;
  display: block;
  align-self: center !important;
}
.drawer-item__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  background: #1a1a22;
}
.drawer-item__icon.is-empty {
  background:
    linear-gradient(145deg, rgba(200,164,92,0.25), rgba(255,255,255,0.06)),
    #1a1a22 !important;
}
.drawer-item__text {
  min-width: 0;
  flex: 1;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch;
  gap: 4px;
}
.drawer-item__title {
  display: block !important;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
  color: var(--text);
}
.drawer-item__sub {
  display: block !important;
  font-size: 11px;
  line-height: 1.35;
  color: var(--text-dim);
  font-weight: 400;
  white-space: normal;
  word-break: break-word;
}

/* ===== search route icons v45 ===== */
.search-route-vitem__icon {
  width: 36px !important;
  height: 36px !important;
  border-radius: 10px !important;
  overflow: hidden;
  background: #1a1a22 !important;
  border: 1px solid var(--border) !important;
  display: block;
  padding: 0;
  flex-shrink: 0;
}
.search-route-vitem__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #1a1a22;
}
.search-route-vitem__icon.is-empty {
  background: linear-gradient(145deg, rgba(200,164,92,0.25), rgba(255,255,255,0.06)), #1a1a22 !important;
}
.search-route-vitem__icon.is-empty img { display: none; }

/* ===== ep btn single-line v47 ===== */
.ep-btn {
  font-size: 10px !important;
  font-weight: 600 !important;
  min-height: 34px !important;
  padding: 6px 3px !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* ===== copy modal fit viewport v48 ===== */
#copyLinksModal.modal-overlay {
  align-items: flex-end !important;
  justify-content: center !important;
  padding: 10px !important;
  padding-bottom: max(10px, env(safe-area-inset-bottom, 0px)) !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}
#copyLinksModal .modal-card,
#copyLinksModal .modal-card--list {
  width: min(100%, 520px) !important;
  max-width: calc(100vw - 20px) !important;
  max-height: min(88dvh, 640px) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  margin: 0 auto !important;
}
#copyLinksModal .copy-links-log {
  flex: 1 1 auto !important;
  min-height: 64px !important;
  max-height: none !important;
  overflow: auto !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
  white-space: pre-wrap !important;
}
@media (min-width: 768px) {
  #copyLinksModal.modal-overlay {
    align-items: center !important;
    padding: 24px !important;
  }
  #copyLinksModal .modal-card,
  #copyLinksModal .modal-card--list {
    max-height: min(80vh, 680px) !important;
  }
}

/* =========================================================
   Desktop cinema layout (>=1024px) — mobile UI unchanged
   ========================================================= */
@media (min-width: 1024px) {
  body {
    background:
      radial-gradient(1200px 500px at 80% -10%, rgba(200, 164, 92, 0.08), transparent 55%),
      radial-gradient(900px 400px at 10% 0%, rgba(80, 100, 180, 0.06), transparent 50%),
      #070709;
  }

  .app-shell--tabs {
    padding-bottom: 32px;
  }

  .top-bar {
    min-height: 64px;
    padding: 0 max(28px, calc((100vw - 1360px) / 2 + 28px));
    grid-template-columns: auto 1fr auto;
    gap: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(10, 10, 14, 0.88) !important;
  }

  .top-bar__title {
    text-align: start;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.01em;
  }

  .top-bar__menu,
  .top-bar__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  /* Bottom floating glass → top secondary nav (cinema site) */
  .tab-bar {
    position: sticky !important;
    top: 64px;
    left: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    width: 100% !important;
    height: 52px;
    transform: none !important;
    margin: 0;
    padding: 0 max(28px, calc((100vw - 1360px) / 2 + 28px));
    z-index: 105;
    pointer-events: none;
    background: rgba(10, 10, 14, 0.72);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .tab-bar__glass {
    display: none !important;
  }

  .tab-bar__track {
    max-width: 360px;
    margin-inline-start: 0;
    height: 100%;
    padding: 6px 0;
    gap: 8px;
    display: flex !important;
    grid-template-columns: none !important;
  }

  .tab-bar__btn {
    flex: 0 0 auto;
    min-width: 120px;
    flex-direction: row !important;
    gap: 8px;
    padding: 0 16px;
    border-radius: 999px;
    font-size: 13px;
  }

  .tab-bar__btn svg {
    width: 18px;
    height: 18px;
  }

  .tab-bar__pill {
    border-radius: 999px !important;
  }

  .main-content {
    width: min(100%, 1360px);
    margin: 0 auto;
    padding: 24px 28px 56px;
  }

  /* Hero: wide cinema banner */
  .hero-carousel {
    border-radius: 18px;
    margin-bottom: 22px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  }

  .hero-slide {
    aspect-ratio: 2.35 / 1;
    min-height: 280px;
    max-height: 420px;
  }

  .hero-slide__title {
    font-size: 28px;
    font-weight: 800;
  }

  .hero-slide__meta {
    padding: 28px 32px;
    max-width: 60%;
  }

  .hero-carousel__dots {
    bottom: 16px;
  }

  /* Filters: wrap toolbar, not tiny mobile scroller feel */
  .filters-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 18px;
    margin-bottom: 20px;
    border-radius: 16px;
  }

  .filter-group + .filter-group {
    margin-top: 0;
  }

  .filter-chips {
    flex-wrap: wrap;
    overflow: visible;
    gap: 8px;
  }

  .chip {
    min-height: 34px;
    padding: 0 14px;
    font-size: 13px;
  }

  .section-head {
    margin: 6px 0 16px;
  }

  .section-title {
    font-size: 20px;
  }

  /* Poster wall */
  .movie-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 22px 16px !important;
  }

  .movie-card__title {
    font-size: 13px;
  }

  .movie-card__poster {
    border-radius: 8px;
  }

  .movie-card__poster img {
    border-radius: 8px;
  }

  /* Detail page */
  .detail-hero {
    border-radius: 20px;
    margin-bottom: 22px;
  }

  .detail-hero-inner {
    grid-template-columns: 220px 1fr !important;
    gap: 28px;
    padding: 28px 32px !important;
  }

  .detail-poster {
    width: 220px !important;
    border-radius: 14px;
  }

  .detail-info h1 {
    font-size: 28px !important;
  }

  .detail-desc {
    font-size: 14px;
    -webkit-line-clamp: 6;
    max-width: 720px;
  }

  .detail-actions {
    gap: 12px;
    margin-top: 8px;
  }

  .play-primary,
  .btn-copy {
    min-height: 46px;
    padding: 0 22px;
    font-size: 14px;
  }

  .episodes-block {
    padding: 18px 20px;
  }

  .ep-grid {
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 10px;
  }

  /* Search page */
  .search-layout {
    grid-template-columns: 1fr 100px;
    gap: 18px;
  }

  .search-route-rail {
    top: 88px;
    max-height: calc(100dvh - 120px);
  }

  .search-route-vitem__icon {
    width: 44px !important;
    height: 44px !important;
  }

  /* Drawer wider */
  .drawer-panel {
    width: min(420px, 34vw) !important;
  }

  /* Player */
  .player-layout {
    grid-template-columns: 1fr 300px;
    gap: 18px;
  }

  #artplayerContainer,
  .player-box {
    min-height: 480px;
    border-radius: 16px;
  }

  /* Profile */
  .profile-page,
  #viewProfile .profile-card {
    width: min(100%, 1080px);
    margin-inline: auto;
  }
}

@media (min-width: 1400px) {
  .main-content {
    width: min(100%, 1480px);
  }

  .movie-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
  }

  .hero-slide {
    min-height: 320px;
    max-height: 460px;
  }

  .top-bar,
  .tab-bar {
    padding-left: max(32px, calc((100vw - 1480px) / 2 + 32px));
    padding-right: max(32px, calc((100vw - 1480px) / 2 + 32px));
  }
}

/* ===== detail layout tidy ===== */
.detail-poster-wrap {
  position: relative;
  width: fit-content;
}
html[data-theme="light"] .detail-tool { color: rgba(255,255,255,0.78); }
html[data-theme="light"] .detail-tools__dot { background: rgba(255,255,255,0.4); }

/* ===== clear cache setting v54 ===== */
.setting-block--cache { margin-top: 4px; }
.setting-cache-btn {
  margin-top: 8px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  width: 100%;
}


/* Short drama vertical player — immersive fullscreen */
html.kozlar-drama-fs,
body.kozlar-drama-fs {
  overflow: hidden !important;
  height: 100% !important;
  background: #000 !important;
}
.app-shell--drama-fs {
  padding: 0 !important;
  overflow: hidden !important;
  height: 100vh;
  height: 100dvh;
}
.app-shell--drama-fs .top-bar,
.app-shell--drama-fs .tab-bar,
.app-shell--drama-fs .main-content > .view:not(.view--drama-player) {
  display: none !important;
}
.app-shell--drama-fs .main-content {
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  max-width: none !important;
  height: 100vh;
  height: 100dvh;
}
.view--drama-player {
  position: fixed !important;
  inset: 0 !important;
  z-index: 300;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  background: #000;
  padding: 0 !important;
  margin: 0 !important;
  max-width: none !important;
  overflow: hidden;
}
.view--drama-player.active { display: block !important; }
.drama-player__back {
  position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; z-index: 20;
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(0,0,0,0.5); color: #fff; border: 1px solid rgba(255,255,255,0.22);
  backdrop-filter: blur(8px);
}
.drama-player__back svg { width: 20px; height: 20px; transform: scaleX(-1); }
.drama-player__hint {
  position: absolute; top: calc(18px + env(safe-area-inset-top, 0px)); left: 14px; right: 60px; z-index: 18;
  font-size: 12px; color: rgba(255,255,255,0.78); pointer-events: none; text-align: start;
  text-shadow: 0 1px 4px rgba(0,0,0,0.7);
}
.drama-feed {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  background: #000;
}
.drama-ep {
  position: relative;
  width: 100%;
  height: 100%;
  height: 100dvh;
  min-height: 100%;
  min-height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: #000;
  overflow: hidden;
}
.drama-ep__player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000;
}
.drama-ep__video {
  width: 100%; height: 100%;
  object-fit: cover; background: #000;
}
.drama-ep__art {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
}
.drama-ep__art .art-video-player,
.drama-ep__art .artplayer-app,
.view--drama-player .artplayer-app {
  width: 100% !important;
  height: 100% !important;
}
.drama-ep__art video,
.view--drama-player .art-video-player video {
  object-fit: cover !important;
}
.drama-ep__meta {
  position: absolute;
  left: 14px;
  right: 78px;
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  z-index: 12;
  pointer-events: none;
  text-align: left;
  direction: rtl;
  text-shadow: 0 2px 10px rgba(0,0,0,0.75);
}
.drama-ep__title { font-size: 16px; font-weight: 700; color: #fff; margin: 0 0 4px; }
.drama-ep__ep { font-size: 13px; color: rgba(255,255,255,0.88); margin: 0; }
.drama-ep__loading {
  position: absolute; inset: 0; z-index: 8; display: grid; place-items: center;
  color: rgba(255,255,255,0.75); font-size: 13px; background: rgba(0,0,0,0.35);
}

/* 右侧液态玻璃选集按钮 */
.drama-ep-pick {
  position: absolute;
  right: 12px;
  top: auto;
  bottom: calc(118px + env(safe-area-inset-bottom, 0px));
  transform: none;
  z-index: 22;
  width: 56px;
  min-height: 64px;
  padding: 10px 6px 8px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(22, 22, 32, 0.42);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
}
.drama-ep-pick svg { width: 22px; height: 22px; flex-shrink: 0; }
.drama-ep-pick span {
  font-size: 10px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.drama-ep-pick:active { transform: scale(0.96); }

/* 底部选集弹窗 */
.drama-ep-sheet {
  position: absolute;
  inset: 0;
  z-index: 40;
}
.drama-ep-sheet[hidden] { display: none !important; }
.drama-ep-sheet__mask {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.55);
  padding: 0;
}
.drama-ep-sheet__panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: min(62vh, 520px);
  padding: 8px 14px calc(14px + env(safe-area-inset-bottom, 0px));
  border-radius: 22px 22px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: 0;
  background: rgba(18, 18, 26, 0.78);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(22px) saturate(1.45);
  -webkit-backdrop-filter: blur(22px) saturate(1.45);
  animation: dramaSheetUp 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes dramaSheetUp {
  from { transform: translateY(110%); opacity: 0.6; }
  to { transform: translateY(0); opacity: 1; }
}
.drama-ep-sheet__handle {
  width: 40px;
  height: 4px;
  margin: 2px auto 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}
.drama-ep-sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  direction: rtl;
}
.drama-ep-sheet__head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}
.drama-ep-sheet__close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.drama-ep-sheet__close svg { width: 16px; height: 16px; }
.drama-ep-sheet__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  max-height: min(44vh, 380px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}
.drama-ep-sheet__btn {
  min-height: 40px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.drama-ep-sheet__btn.active {
  color: #1a1408;
  background: linear-gradient(145deg, rgba(226, 192, 120, 0.95), rgba(200, 164, 92, 0.88));
  border-color: rgba(226, 192, 120, 0.7);
}
.drama-ep-sheet__btn:active { transform: scale(0.96); }

/* ===== Skeleton screens (shimmer) ===== */
.sk { width: 100%; }
/* 骨架包在 movie-grid 内时必须通栏，否则只挤在第一列几乎看不见 */
.movie-grid > .sk {
  grid-column: 1 / -1;
}
.sk-block {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background:
    linear-gradient(
      110deg,
      rgba(255, 255, 255, 0.06) 0%,
      rgba(255, 255, 255, 0.06) 36%,
      rgba(255, 255, 255, 0.28) 50%,
      rgba(255, 255, 255, 0.06) 64%,
      rgba(255, 255, 255, 0.06) 100%
    );
  background-color: rgba(255, 255, 255, 0.1);
  background-size: 220% 100%;
  animation: sk-sweep 1.05s linear infinite;
}
html[data-theme="light"] .sk-block {
  background-color: rgba(0, 0, 0, 0.08);
  background-image: linear-gradient(
    110deg,
    rgba(255, 255, 255, 0.15) 0%,
    rgba(255, 255, 255, 0.15) 36%,
    rgba(255, 255, 255, 0.85) 50%,
    rgba(255, 255, 255, 0.15) 64%,
    rgba(255, 255, 255, 0.15) 100%
  );
}
/* 兼容旧 span；真正扫光改由 background 动画承担 */
.sk-shine {
  display: none;
}
@keyframes sk-sweep {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
/* 海报未出图时也扫光 */
.movie-card__poster.is-sk::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(
      110deg,
      rgba(255, 255, 255, 0.04) 0%,
      rgba(255, 255, 255, 0.04) 36%,
      rgba(255, 255, 255, 0.26) 50%,
      rgba(255, 255, 255, 0.04) 64%,
      rgba(255, 255, 255, 0.04) 100%
    );
  background-color: rgba(18, 18, 24, 0.55);
  background-size: 220% 100%;
  animation: sk-sweep 1.05s linear infinite;
}
.movie-card__poster.is-sk img {
  opacity: 0;
  transition: opacity 0.2s ease;
}
.movie-card__poster:not(.is-sk) img { opacity: 1; }
.sk--grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 2px 0 8px;
}
@media (min-width: 768px) {
  .sk--grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
}
@media (min-width: 1100px) {
  .sk--grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
.sk-movie { min-width: 0; }
.sk-poster {
  aspect-ratio: 2/3;
  border-radius: 14px;
}
.sk-line {
  height: 12px;
  margin-top: 10px;
  width: 78%;
  margin-inline-start: auto;
  border-radius: 8px;
}
.sk-line--sm { height: 10px; width: 52%; margin-top: 8px; }
.sk--more {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 4px 0 8px;
  max-width: 420px;
  margin: 0 auto;
}
.sk--more .sk-poster { aspect-ratio: 2/3; border-radius: 12px; }
.sk--detail { display: grid; gap: 14px; }
.sk-detail-hero {
  height: 210px;
  border-radius: 22px;
}
.sk-detail-rows { display: grid; gap: 10px; }
.sk-detail-rows .sk-block { height: 44px; border-radius: 12px; }
.sk-detail-rows .sk-block:nth-child(2) { width: 72%; margin-inline-start: auto; }
.sk-detail-rows .sk-block:nth-child(3) { width: 88%; margin-inline-start: auto; }
.sk--drawer { display: grid; gap: 10px; padding: 4px 0; }
.sk-drawer-item {
  height: 64px;
  border-radius: 12px;
}
.sk--shop { display: grid; gap: 12px; }
.sk-shop-title { height: 22px; width: 46%; margin-inline-start: auto; border-radius: 8px; }
.sk-shop-item { height: 78px; border-radius: 16px; }
.sk--profile { display: grid; gap: 14px; }
.sk-profile-hero { height: 168px; border-radius: 22px; }
.sk-profile-panel { height: 120px; border-radius: 18px; }
.sk--player {
  min-height: 70vh;
  border-radius: 0;
  background: rgba(255,255,255,0.06);
}
.sk--player .sk-shine { width: 36%; }
.sk--hero,
.sk-hero-fill {
  aspect-ratio: 16/9;
  border-radius: 20px;
  width: 100%;
  height: 100%;
  min-height: 140px;
}
.sk--hero-wrap { margin-bottom: 14px; }
.sk-hero-slide {
  background: transparent !important;
  padding: 0;
  border: 0;
}
.sk-hero-slide .sk-block {
  width: 100%;
  height: 100%;
  min-height: 160px;
  border-radius: 0;
}
/* ===== route tier styles v76 ===== */
.drawer-item__title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.drawer-item__title-row .drawer-item__title {
  flex: 1;
  min-width: 0;
}
.drawer-item__badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  padding: 4px 7px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.drawer-item--free {
  border-color: rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
}
.drawer-item--vip {
  border-color: rgba(200,164,92,0.42);
  background:
    linear-gradient(135deg, rgba(200,164,92,0.16), rgba(200,164,92,0.03) 55%, transparent),
    rgba(255,255,255,0.03);
  box-shadow: inset 0 0 0 1px rgba(200,164,92,0.12);
}
.drawer-item--vip .drawer-item__title { color: #e8d09a; }
.drawer-item--vip .drawer-item__badge {
  color: #1a1408;
  background: linear-gradient(135deg, #e2c078, #c8a45c);
}
.drawer-item--vip .drawer-item__icon {
  border-color: rgba(200,164,92,0.45) !important;
  box-shadow: 0 0 0 1px rgba(200,164,92,0.18);
}
.drawer-item--vip.active {
  border-color: rgba(226,192,120,0.75);
  color: #e2c078;
}
.drawer-item--diamond {
  border-color: rgba(120,180,255,0.42);
  background:
    linear-gradient(135deg, rgba(120,180,255,0.16), rgba(120,180,255,0.03) 55%, transparent),
    rgba(255,255,255,0.03);
  box-shadow: inset 0 0 0 1px rgba(120,180,255,0.12);
}
.drawer-item--diamond .drawer-item__title { color: #b7d7ff; }
.drawer-item--diamond .drawer-item__badge {
  color: #071018;
  background: linear-gradient(135deg, #9ec8ff, #78b4ff);
}
.drawer-item--diamond .drawer-item__icon {
  border-color: rgba(120,180,255,0.45) !important;
  box-shadow: 0 0 0 1px rgba(120,180,255,0.18);
}
.drawer-item--diamond.active {
  border-color: rgba(158,200,255,0.75);
  color: #9ec8ff;
}
.drawer-item--hidden {
  border-color: rgba(160,120,255,0.45);
  background:
    linear-gradient(135deg, rgba(160,120,255,0.18), rgba(160,120,255,0.04) 55%, transparent),
    rgba(255,255,255,0.03);
  box-shadow: inset 0 0 0 1px rgba(160,120,255,0.14);
}
.drawer-item--hidden .drawer-item__title { color: #d0b8ff; }
.drawer-item--hidden .drawer-item__badge {
  color: #12081c;
  background: linear-gradient(135deg, #c4a4ff, #a078ff);
}
.drawer-item--hidden .drawer-item__icon {
  border-color: rgba(160,120,255,0.5) !important;
  box-shadow: 0 0 0 1px rgba(160,120,255,0.2);
}
.drawer-item--hidden.active {
  border-color: rgba(196,164,255,0.8);
  color: #c4a4ff;
}
.search-route-vitem--vip {
  border-color: rgba(200,164,92,0.4);
  box-shadow: inset 0 0 0 1px rgba(200,164,92,0.12);
}
.search-route-vitem--vip .search-route-vitem__name { color: #e2c078; }
.search-route-vitem--diamond {
  border-color: rgba(120,180,255,0.4);
  box-shadow: inset 0 0 0 1px rgba(120,180,255,0.12);
}
.search-route-vitem--diamond .search-route-vitem__name { color: #9ec8ff; }
.search-route-vitem--hidden {
  border-color: rgba(160,120,255,0.45);
  box-shadow: inset 0 0 0 1px rgba(160,120,255,0.14);
}
.search-route-vitem--hidden .search-route-vitem__name { color: #c4a4ff; }

/* locked routes: 可看见真实名称（勿整项 grayscale，维语会被糊成 xxxx） */
.drawer-item.is-locked,
.search-route-vitem.is-locked {
  cursor: not-allowed;
  opacity: 1;
  filter: none;
  background: rgba(255, 255, 255, 0.03) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: none !important;
}
.drawer-item.is-locked .drawer-item__scan {
  display: none;
}
.drawer-item.is-locked:hover,
.drawer-item.is-locked:active,
.search-route-vitem.is-locked:hover,
.search-route-vitem.is-locked:active {
  transform: none;
}
/* 名称保持清晰可读；只弱化图标 */
.drawer-item.is-locked .drawer-item__title {
  color: rgba(220, 224, 232, 0.92) !important;
  opacity: 1 !important;
  filter: none !important;
}
.drawer-item.is-locked .drawer-item__sub {
  color: rgba(170, 178, 192, 0.95) !important;
}
.search-route-vitem.is-locked .search-route-vitem__name {
  color: rgba(210, 216, 228, 0.92) !important;
}
.drawer-item.is-locked .drawer-item__icon,
.search-route-vitem.is-locked .search-route-vitem__icon {
  opacity: 0.42;
  filter: grayscale(0.55);
}
/* 锁定时徽章仍显示等级，方便知道要升什么 */
.drawer-item.is-locked .drawer-item__badge {
  opacity: 0.85;
  filter: none;
}

/* ===== notice liquid glass + scan v77 ===== */
body.notice-open { overflow: hidden; }
.notice-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 6, 12, 0.52);
  backdrop-filter: blur(10px) saturate(1.2);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s ease;
}
.notice-overlay[hidden] { display: none !important; }
.notice-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}
.notice-glass {
  position: relative;
  width: min(420px, 100%);
  max-height: min(78vh, 640px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 16px 14px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.22);
  background:
    linear-gradient(145deg, rgba(255,255,255,0.18), rgba(255,255,255,0.05) 42%, rgba(255,255,255,0.02)),
    rgba(18, 20, 30, 0.42);
  box-shadow:
    0 24px 60px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.35),
    inset 0 -1px 0 rgba(255,255,255,0.06);
  backdrop-filter: blur(28px) saturate(1.55);
  -webkit-backdrop-filter: blur(28px) saturate(1.55);
  transform: translateY(14px) scale(0.98);
  transition: transform .32s cubic-bezier(.2,.8,.2,1);
}
.notice-overlay.is-open .notice-glass {
  transform: translateY(0) scale(1);
}
.notice-glass__glow {
  position: absolute;
  inset: -40% -20% auto;
  height: 70%;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(226,192,120,0.22), transparent 55%),
    radial-gradient(ellipse at 80% 0%, rgba(120,180,255,0.16), transparent 50%);
  pointer-events: none;
  z-index: 0;
}
.notice-glass__scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
  border-radius: inherit;
}
.notice-glass__scan::before {
  content: "";
  position: absolute;
  top: -20%;
  bottom: -20%;
  width: 42%;
  left: -50%;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(255,255,255,0.02) 35%,
    rgba(255,255,255,0.28) 50%,
    rgba(255,255,255,0.05) 65%,
    transparent 100%
  );
  transform: skewX(-18deg);
  animation: kozlarScanSweep 3s linear infinite;
}
.notice-head,
.notice-list,
.notice-actions {
  position: relative;
  z-index: 2;
}
.notice-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.notice-head__text { flex: 1; min-width: 0; }
.notice-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.notice-head__sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text-muted, rgba(255,255,255,0.62));
}
.notice-close {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.08);
  color: var(--text);
}
.notice-close svg { width: 18px; height: 18px; }
.notice-list {
  display: grid;
  gap: 10px;
  overflow: auto;
  max-height: min(48vh, 380px);
  padding: 2px;
  -webkit-overflow-scrolling: touch;
}
.notice-item {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 12px 12px 11px;
  border: 1px solid rgba(255,255,255,0.14);
  background:
    linear-gradient(160deg, rgba(255,255,255,0.14), rgba(255,255,255,0.04)),
    rgba(255,255,255,0.04);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18);
  animation: noticeItemIn .45s ease both;
  animation-delay: calc(var(--i, 0) * 60ms);
}
.notice-item__scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: inherit;
}
.notice-item__scan::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 48%;
  left: -55%;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255,255,255,0.03) 40%,
    rgba(255,255,255,0.34) 50%,
    rgba(255,255,255,0.05) 60%,
    transparent 100%
  );
  animation: kozlarScanSweep 3s linear infinite;
  animation-delay: calc(var(--i, 0) * 0.25s);
}
.notice-item__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.notice-item__title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #e8d09a;
}
.notice-item__date {
  font-size: 11px;
  color: var(--text-dim, rgba(255,255,255,0.45));
  white-space: nowrap;
}
.notice-item__body {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text, #f2f2f6);
  white-space: pre-wrap;
  word-break: break-word;
}
.notice-item--empty {
  text-align: center;
  color: var(--text-muted);
}
.notice-item--empty p { margin: 0; position: relative; z-index: 1; }
.notice-actions { display: grid; gap: 10px; }
.notice-mute {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0 2px;
  font-size: 12px;
  color: var(--text-dim, rgba(255,255,255,0.55));
  cursor: pointer;
  user-select: none;
}
.notice-mute input {
  width: 16px;
  height: 16px;
  accent-color: #c8a45c;
  flex-shrink: 0;
}
.notice-ok {
  width: 100%;
  min-height: 44px;
  border-radius: 14px;
}
@keyframes kozlarScanSweep {
  0% { transform: translateX(0) skewX(-16deg); }
  100% { transform: translateX(320%) skewX(-16deg); }
}

/* ===== route drawer scan light ===== */
.drawer-item {
  position: relative !important;
  /* overflow 不可 hidden：否则 grid/flex 会把行高压扁 */
  overflow: visible !important;
  flex: 0 0 auto !important;
  min-height: 58px !important;
  height: auto !important;
  align-items: center !important;
}
.drawer-item__scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
  border-radius: inherit;
}
.drawer-item__scan::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 46%;
  left: -55%;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255,255,255,0.02) 38%,
    rgba(255,255,255,0.32) 50%,
    rgba(255,255,255,0.04) 62%,
    transparent 100%
  );
  animation: kozlarScanSweep 3s linear infinite;
  animation-delay: calc(var(--i, 0) * 0.22s);
}
.drawer-item__icon,
.drawer-item__text {
  position: relative;
  z-index: 3;
}
@keyframes noticeItemIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
html[data-theme="light"] .notice-glass {
  background:
    linear-gradient(145deg, rgba(255,255,255,0.72), rgba(255,255,255,0.42)),
    rgba(255,255,255,0.5);
  border-color: rgba(40,40,55,0.12);
  color: #16161f;
}
html[data-theme="light"] .notice-item {
  background:
    linear-gradient(160deg, rgba(255,255,255,0.8), rgba(255,255,255,0.45)),
    rgba(255,255,255,0.55);
  border-color: rgba(40,40,55,0.1);
}
html[data-theme="light"] .notice-item__body { color: #222230; }
html[data-theme="light"] .notice-overlay { background: rgba(20, 22, 30, 0.28); }

/* ===== VIP need inline card ===== */
.movie-grid .vip-need-card,
.drawer-list .vip-need-card,
#detailContent .vip-need-card,
#searchGrid .vip-need-card {
  grid-column: 1 / -1;
}
.vip-need-card {
  position: relative;
  overflow: hidden;
  margin: 8px 0 18px;
  padding: 22px 18px 18px;
  border-radius: 20px;
  border: 1px solid rgba(200, 164, 92, 0.28);
  background:
    linear-gradient(160deg, rgba(200, 164, 92, 0.14), rgba(255, 255, 255, 0.03) 42%, rgba(12, 12, 18, 0.55)),
    rgba(18, 18, 26, 0.72);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  text-align: center;
}
.vip-need-card__glow {
  position: absolute;
  inset: -40% auto auto 20%;
  width: 60%;
  height: 70%;
  background: radial-gradient(circle, rgba(226, 192, 120, 0.22), transparent 68%);
  pointer-events: none;
}
.vip-need-card__badge {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 12px;
  margin-bottom: 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #1a1408;
  background: linear-gradient(135deg, #e2c078, #c8a45c);
}
.vip-need-card__title {
  position: relative;
  z-index: 1;
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 800;
  color: #f3e2b0;
}
.vip-need-card__text {
  position: relative;
  z-index: 1;
  margin: 0 auto 16px;
  max-width: 28em;
  font-size: 13px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.78);
}
.vip-need-card__actions {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 10px;
}
.vip-need-card__buy,
.vip-need-card__contact {
  min-height: 44px;
  border-radius: 14px;
  font-weight: 700;
}
.vip-need-card__buy {
  background: linear-gradient(135deg, #e2c078, #8b6b2e);
  color: #14110a;
  border: 0;
  box-shadow: 0 10px 24px rgba(200, 164, 92, 0.3);
}
html[data-theme="light"] .vip-need-card {
  background:
    linear-gradient(160deg, rgba(200, 164, 92, 0.18), rgba(255, 255, 255, 0.7)),
    rgba(255, 255, 255, 0.82);
  border-color: rgba(200, 164, 92, 0.35);
}
html[data-theme="light"] .vip-need-card__text { color: rgba(30, 30, 40, 0.75); }
html[data-theme="light"] .vip-need-card__title { color: #7a5a18; }

/* ===== kami mall page ===== */
.mall-shell { padding: 8px 0 28px; max-width: 720px; margin: 0 auto; }
.mall-hero {
  position: relative; overflow: hidden;
  padding: 22px 18px 20px; margin: 10px 0 16px; border-radius: 22px;
  border: 1px solid rgba(200,164,92,0.28);
  text-align: center;
}
.mall-hero__glow {
  position: absolute; inset: -30% 10% auto; height: 70%;
  background: radial-gradient(circle, rgba(226,192,120,0.28), transparent 70%);
  pointer-events: none;
}
.mall-hero__badge {
  position: relative; z-index: 1; display: inline-flex;
  min-height: 24px; padding: 0 12px; border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: .06em;
  color: #1a1408; background: linear-gradient(135deg,#e2c078,#c8a45c);
}
.mall-hero__title {
  position: relative; z-index: 1; margin: 12px 0 6px;
  font-size: 22px; font-weight: 800; color: #f3e2b0;
}
.mall-hero__sub {
  position: relative; z-index: 1; margin: 0;
  font-size: 13px; color: rgba(255,255,255,.72);
}
.mall-hero__cta { margin-top: 14px; min-height: 44px; border-radius: 14px; padding: 0 22px; }
.mall-tabs {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px;
  -webkit-overflow-scrolling: touch;
}
.mall-tab {
  flex: 0 0 auto; min-height: 34px; padding: 0 14px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.72); font-size: 12px; font-weight: 700;
}
.mall-tab.is-active {
  color: #1a1408; border-color: transparent;
  background: linear-gradient(135deg,#e2c078,#c8a45c);
}
.mall-panel { display: none; grid-template-columns: 1fr; gap: 12px; }
.mall-panel.is-active { display: grid; }
.mall-card {
  position: relative; overflow: hidden;
  padding: 16px; border-radius: 18px;
  border: 1px solid rgba(255,255,255,.12);
  background:
    linear-gradient(145deg, rgba(255,255,255,.06), rgba(255,255,255,.02)),
    rgba(16,16,22,.72);
  box-shadow: 0 12px 28px rgba(0,0,0,.22);
}
.mall-card--vip { border-color: rgba(200,164,92,.4); }
.mall-card--diamond { border-color: rgba(120,180,255,.4); }
.mall-card--hidden { border-color: rgba(160,120,255,.42); }
.mall-card__ribbon {
  position: absolute; top: 12px; inset-inline-start: 12px;
  min-height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 10px; font-weight: 800; color: #1a1408;
  background: linear-gradient(135deg,#ffd98a,#e2c078);
}
.mall-card__tier {
  font-size: 11px; font-weight: 700; color: rgba(255,255,255,.55); margin-bottom: 4px;
}
.mall-card__name { margin: 0 0 4px; font-size: 17px; font-weight: 800; color: #fff; }
.mall-card__meta { margin: 0 0 6px; font-size: 12px; color: #e2c078; }
.mall-card--diamond .mall-card__meta { color: #9ec8ff; }
.mall-card--hidden .mall-card__meta { color: #c4a4ff; }
.mall-card__desc { margin: 0 0 12px; font-size: 12px; line-height: 1.5; color: rgba(255,255,255,.62); }
.mall-card__foot {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px;
}
.mall-card__price-wrap { min-width: 0; }
.mall-card__price { font-size: 26px; font-weight: 800; color: #f3e2b0; line-height: 1; }
.mall-card__price span { font-size: 14px; margin-inline-end: 2px; }
.mall-card__price-note {
  margin-top: 4px; font-size: 11px; line-height: 1.35;
  color: rgba(255, 255, 255, 0.48);
}
.mall-card__stock { font-size: 11px; color: rgba(255,255,255,.45); }
.mall-card__pay { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.mall-card__buy {
  width: 100%; min-height: 44px; margin-top: 2px;
  border-radius: 12px; font-size: 14px; font-weight: 800;
}
.mall-empty { padding: 28px 16px; text-align: center; border-radius: 18px; color: rgba(255,255,255,.65); }
.mall-redeem { margin-top: 16px; padding: 16px; border-radius: 18px; }
.mall-redeem h3 { margin: 0 0 10px; font-size: 15px; }
.mall-card.is-soldout { opacity: .72; }
.mall-card__soldout {
  margin-top: 4px; text-align: center; padding: 10px 12px; border-radius: 12px;
  background: rgba(255,255,255,.06); color: rgba(255,255,255,.55); font-size: 13px; font-weight: 600;
}

/* 支付底部弹窗 */
.pay-sheet-mask {
  position: fixed; inset: 0; z-index: 1300;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}
.pay-sheet-mask.is-open {
  opacity: 1;
  pointer-events: auto;
}
.pay-sheet {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(520px, 100%);
  /* 按内容高度，不强制撑满屏幕，避免中间大片空白 */
  height: auto;
  max-height: min(92vh, 820px);
  overflow: hidden;
  margin: 0;
  padding: 6px 0 0;
  border-radius: 22px 22px 0 0;
  border: 1px solid rgba(243, 226, 176, 0.18);
  border-bottom: 0;
  background:
    linear-gradient(180deg, rgba(36, 32, 28, 0.98), rgba(18, 16, 20, 0.98));
  box-shadow: 0 -18px 48px rgba(0, 0, 0, 0.45);
  transform: translateY(108%);
  transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}
.pay-sheet-mask.is-open .pay-sheet { transform: none; }
.pay-sheet__grab {
  flex-shrink: 0;
  width: 42px; height: 4px; margin: 2px auto 6px;
  border-radius: 999px; background: rgba(255, 255, 255, 0.22);
}
.pay-sheet__close {
  position: absolute; top: 8px; inset-inline-end: 10px; z-index: 2;
  width: 32px; height: 32px; border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.8);
  font-size: 20px; line-height: 1; cursor: pointer;
}
.pay-sheet__body {
  flex: 0 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 14px 8px;
}
.pay-sheet__foot {
  flex-shrink: 0;
  margin-top: 0;
  padding: 8px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(28, 24, 22, 0.96), rgba(16, 14, 18, 0.98));
  box-shadow: 0 -8px 20px rgba(0, 0, 0, 0.25);
}
.pay-sheet__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  padding-inline-end: 28px;
}
.pay-sheet__head-text {
  min-width: 0;
  flex: 1;
}
.pay-sheet__tier {
  display: inline-flex; align-items: center; flex-shrink: 0;
  min-height: 22px; padding: 0 8px; margin: 2px 0 0;
  border-radius: 999px; font-size: 10px; font-weight: 800;
  color: #1a1408;
  background: linear-gradient(135deg, #e2c078, #c8a45c);
}
.pay-sheet__tier--diamond {
  color: #0d1a2a;
  background: linear-gradient(135deg, #9ec8ff, #6a9fd8);
}
.pay-sheet__tier--hidden {
  color: #1a1028;
  background: linear-gradient(135deg, #c4a4ff, #8f6ad4);
}
.pay-sheet__title {
  margin: 0;
  font-size: 16px; font-weight: 800; color: #fff; line-height: 1.25;
}
.pay-sheet__meta {
  display: inline-block;
  margin-top: 3px;
  font-size: 12px; font-weight: 700; color: #e2c078;
}
.pay-sheet__desc {
  margin: 0 0 8px; font-size: 12px; line-height: 1.4;
  color: rgba(255, 255, 255, 0.58);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pay-sheet__budget {
  padding: 10px 12px; margin-bottom: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}
.pay-sheet__budget-title {
  margin-bottom: 6px; font-size: 12px; font-weight: 800;
  letter-spacing: 0.04em; color: rgba(255, 255, 255, 0.55);
}
.pay-sheet__how {
  margin-bottom: 8px; font-size: 12px; font-weight: 700;
  color: rgba(255, 255, 255, 0.78);
}
.pay-sheet__arrow {
  text-align: center; margin: 2px 0 8px;
  color: rgba(226, 192, 120, 0.7); font-size: 14px; line-height: 1;
}
.pay-sheet__row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; margin-bottom: 6px;
  font-size: 12px; color: rgba(255, 255, 255, 0.72);
}
.pay-sheet__row b {
  font-size: 14px; font-weight: 800; color: #f3e2b0;
  font-variant-numeric: tabular-nums;
  direction: ltr; unicode-bidi: isolate;
}
.pay-sheet__row b.is-fee { color: #ffb4a2; }
.pay-sheet__row--pay {
  padding-top: 6px; margin-top: 2px; margin-bottom: 0;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
}
.pay-sheet__row--pay span { font-weight: 700; color: #fff; }
.pay-sheet__row--pay b { font-size: 20px; color: #ffe7a8; }
.pay-sheet__row--net b { color: rgba(180, 220, 170, 0.95); font-size: 14px; }
.pay-sheet__tip {
  margin: 8px 0 0; font-size: 11px; line-height: 1.45;
  color: rgba(255, 255, 255, 0.55);
}
.pay-sheet__rule {
  margin: 4px 0 0; font-size: 10px; line-height: 1.4;
  color: rgba(255, 255, 255, 0.38);
}
.pay-sheet__ways-title {
  margin: 0 0 8px; font-size: 12px; font-weight: 800; color: rgba(255, 255, 255, 0.78);
}
.pay-sheet__ways {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
}
.pay-sheet__ways .pay-chip { min-height: 42px; font-weight: 700; font-size: 13px; }

.pay-sheet__cs {
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
}
.pay-sheet__cs-tip {
  margin: 0 0 8px;
  font-size: 11px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.62);
}
.pay-sheet__cs-btn {
  width: 100%;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(226, 192, 120, 0.35);
  border-radius: 12px;
  background: rgba(226, 192, 120, 0.1);
  color: #f3e2b0;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.pay-sheet__cs-btn:active { transform: scale(0.98); }
.pay-sheet__cs-btn.is-open {
  border-color: rgba(226, 192, 120, 0.55);
  background: rgba(226, 192, 120, 0.18);
}
.pay-sheet__cs-ico {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(7, 193, 96, 0.18);
  color: #07c160;
}
.pay-sheet__cs-qr {
  margin-top: 12px;
  text-align: center;
  transform: scale(0.72);
  opacity: 0;
  transform-origin: top center;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
}
.pay-sheet__cs-qr.is-open {
  transform: scale(1);
  opacity: 1;
  pointer-events: auto;
}
.pay-sheet__cs-qr[hidden] { display: none !important; }
.pay-sheet__cs-qr-hint {
  margin: 0 0 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}
.pay-sheet__cs-qr-frame {
  width: min(168px, 52vw);
  margin: 0 auto;
  padding: 8px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}
.pay-sheet__cs-qr-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}
.pay-sheet__cs-price {
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: #e2c078;
}
.kami-deliver-mask {
  position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center;
  padding: 20px; background: rgba(0,0,0,.62); backdrop-filter: blur(6px);
}
.kami-deliver {
  position: relative; width: min(420px, 100%); padding: 22px 18px 16px; border-radius: 20px;
  border: 1px solid rgba(243,226,176,.22);
}
.kami-deliver__title { margin: 0 0 8px; font-size: 18px; font-weight: 800; }
.kami-deliver__meta { margin: 0 0 10px; font-size: 12px; color: rgba(255,255,255,.55); }
.kami-deliver__hint { margin: 0 0 12px; font-size: 13px; color: rgba(255,255,255,.7); line-height: 1.5; }
.kami-deliver__code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 16px; font-weight: 700; letter-spacing: .04em; word-break: break-all;
  padding: 14px 12px; border-radius: 14px; background: rgba(0,0,0,.35);
  border: 1px dashed rgba(243,226,176,.35); color: #f3e2b0; text-align: center; margin-bottom: 14px;
}
.kami-deliver__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kami-deliver__actions .btn-primary,
.kami-deliver__actions .btn-outline { min-height: 44px; border-radius: 12px; }
.kami-deliver__close {
  position: absolute; top: 10px; inset-inline-start: 10px; width: 34px; height: 34px;
  border: 0; border-radius: 10px; background: rgba(255,255,255,.08); color: #fff; font-size: 20px; cursor: pointer;
}
.profile-mall-entry,
.profile-mall-btn { display: none !important; }

.setting-options--wrap { flex-wrap: wrap; }

/* ========== UI Pack 2：蓝白清爽（参考 SinbarTv） ========== */
html[data-ui="2"] {
  --bg: #ffffff;
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --surface-hover: #f5f6f8;
  --border: #000000;
  --border-strong: #000000;
  --text: #000000;
  --text-muted: #8a8f99;
  --text-dim: #3c4048;
  --accent: #3a7bfd;
  --accent-soft: rgba(58, 123, 253, 0.12);
  --accent-glow: rgba(58, 123, 253, 0.28);
  --chrome-bg: rgba(255, 255, 255, 0.96);
  --chrome-solid: #ffffff;
  --bg-glow-1: transparent;
  --bg-glow-2: transparent;
  --glass-bg: #ffffff;
  --glass-bg-soft: #f5f6f8;
  --glass-border: rgba(0, 0, 0, 0.12);
  --glass-highlight: rgba(255, 255, 255, 0.9);
  --glass-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  --radius: 12px;
  --radius-sm: 10px;
}
html[data-ui="2"][data-theme="dark"] {
  --bg: #000000;
  --bg-elevated: #111111;
  --surface: #111111;
  --surface-hover: #1a1a1a;
  --border: #ffffff;
  --border-strong: #ffffff;
  --text: #ffffff;
  --text-muted: #9aa0a8;
  --text-dim: #c0c4cc;
  --accent: #3a7bfd;
  --accent-soft: rgba(58, 123, 253, 0.2);
  --chrome-bg: rgba(17, 17, 17, 0.96);
  --chrome-solid: #000000;
  --glass-bg: #111111;
  --glass-bg-soft: #1a1a1a;
  --glass-border: rgba(255, 255, 255, 0.2);
}
html[data-ui="2"] body {
  background: var(--bg);
  background-image: none;
}
html[data-ui="2"] .top-bar,
html[data-ui="2"] .glass,
html[data-ui="2"] .profile-panel,
html[data-ui="2"] .profile-hero,
html[data-ui="2"] .auth-card,
html[data-ui="2"] .mall-hero,
html[data-ui="2"] .mall-card {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
}
html[data-ui="2"] .filter-chips .chip,
html[data-ui="2"] .chip {
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--text-dim);
  padding: 6px 2px 8px;
  font-size: 14.5px;
  position: relative;
}
html[data-ui="2"] .chip.active {
  color: var(--accent);
  font-weight: 700;
  background: transparent;
  box-shadow: none;
}
html[data-ui="2"] .chip.active::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 20px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--accent);
}
html[data-ui="2"] .movie-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
html[data-ui="2"] .movie-card {
  border-radius: 10px;
  overflow: hidden;
  background: #ebedf0;
  border: 0;
  box-shadow: none;
  position: relative;
}
html[data-ui="2"][data-theme="dark"] .movie-card { background: #1a1a1a; }
html[data-ui="2"] .movie-card .card-body {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 22px 8px 7px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
  z-index: 2;
}
html[data-ui="2"] .movie-card .card-title {
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  -webkit-line-clamp: 2;
}
html[data-ui="2"] .movie-card .card-sub { color: rgba(255, 255, 255, 0.85); font-size: 11px; }
html[data-ui="2"] .tab-bar[data-tab-style="1"] {
  left: 0; right: 0; bottom: 0;
  height: 58px;
  border-radius: 0;
}
html[data-ui="2"] .tab-bar[data-tab-style="1"] .tab-bar__glass {
  border-radius: 0;
  border: 0;
  border-top: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
html[data-ui="2"][data-theme="dark"] .tab-bar[data-tab-style="1"] .tab-bar__glass {
  background: rgba(17, 17, 17, 0.96);
}
html[data-ui="2"] .tab-bar[data-tab-style="1"] .tab-bar__pill {
  background: transparent;
  border: 0;
  box-shadow: none;
  opacity: 0 !important;
}
html[data-ui="2"] .tab-bar[data-tab-style="1"] .tab-bar__btn.active {
  color: var(--accent);
}
html[data-ui="2"] .btn-primary,
html[data-ui="2"] .play-primary,
html[data-ui="2"] .btn-glass-primary {
  background: var(--accent) !important;
  color: #fff !important;
  border: 0 !important;
  box-shadow: none !important;
}
html[data-ui="2"] .field-input,
html[data-ui="2"] .glass-input {
  background: #f5f6f8;
  border: 1px solid #000;
  border-radius: 10px;
}
html[data-ui="2"][data-theme="dark"] .field-input,
html[data-ui="2"][data-theme="dark"] .glass-input {
  background: #1a1a1a;
  border-color: #fff;
}

/* ========== UI Pack 3：紫黑 + 亮黄（参考 asar） ========== */
html[data-ui="3"] {
  --bg: #10030d;
  --bg-elevated: #1b0f1b;
  --surface: #1b0f1b;
  --surface-hover: #2a1828;
  --border: rgba(254, 234, 0, 0.12);
  --border-strong: rgba(254, 234, 0, 0.28);
  --text: #f7f7f7;
  --text-muted: #b8aebb;
  --text-dim: #8a7e90;
  --accent: #feea00;
  --accent-soft: rgba(254, 234, 0, 0.14);
  --accent-glow: rgba(254, 234, 0, 0.35);
  --chrome-bg: rgba(16, 3, 13, 0.94);
  --chrome-solid: #10030d;
  --bg-glow-1: rgba(200, 240, 245, 0.08);
  --bg-glow-2: rgba(234, 250, 238, 0.06);
  --glass-bg: rgba(27, 15, 27, 0.88);
  --glass-bg-soft: rgba(254, 234, 0, 0.06);
  --glass-border: rgba(254, 234, 0, 0.16);
  --glass-highlight: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
  --radius: 16px;
  --radius-sm: 12px;
}
html[data-ui="3"] body {
  background:
    radial-gradient(ellipse at 50% 10%, rgba(234, 250, 238, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 15%, rgba(200, 240, 245, 0.1) 0%, transparent 50%),
    var(--bg);
}
html[data-ui="3"] .btn-primary,
html[data-ui="3"] .play-primary,
html[data-ui="3"] .btn-glass-primary {
  background: linear-gradient(135deg, #feea00, #e6d200) !important;
  color: #1a1020 !important;
  border: 0 !important;
  box-shadow: 0 8px 22px rgba(254, 234, 0, 0.25) !important;
  font-weight: 800;
}
html[data-ui="3"] .chip.active,
html[data-ui="3"] .tab-bar__btn.active,
html[data-ui="3"] .setting-chip input:checked + span {
  color: #1a1020;
}
html[data-ui="3"] .chip.active {
  background: var(--accent);
  border-color: transparent;
}
html[data-ui="3"] .tab-bar[data-tab-style="1"] .tab-bar__glass {
  background: rgba(27, 15, 27, 0.92);
  border-color: rgba(254, 234, 0, 0.18);
}
html[data-ui="3"] .tab-bar[data-tab-style="1"] .tab-bar__pill {
  background: linear-gradient(145deg, rgba(254, 234, 0, 0.35), rgba(254, 234, 0, 0.12));
  border-color: rgba(254, 234, 0, 0.45);
}
html[data-ui="3"] .tab-bar[data-tab-style="1"] .tab-bar__btn.active {
  color: #feea00;
}
html[data-ui="3"] .movie-card {
  border-color: rgba(254, 234, 0, 0.12);
  background: rgba(27, 15, 27, 0.9);
}
html[data-ui="3"] .profile-hero,
html[data-ui="3"] .mall-hero {
  background:
    linear-gradient(135deg, rgba(254, 234, 0, 0.12), transparent 50%),
    var(--glass-bg);
}
html[data-ui="3"] .auth-card {
  border-color: rgba(254, 234, 0, 0.22);
}

/* ===== 我的稳定链接（应用内） ===== */
.stable-page { padding: 12px 14px 28px; }
.stable-kind-tabs,
.wangpan-hub-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px;
}
.wangpan-hub-tabs--3 {
  grid-template-columns: 1fr 1fr 1fr;
}
.wangpan-transfer-hero {
  margin-top: 28px;
  padding: 28px 18px;
  text-align: center;
  border-radius: 18px;
  border: 1px dashed rgba(200,164,92,0.35);
  background: rgba(200,164,92,0.06);
  display: grid;
  justify-items: center;
  gap: 10px;
}
.wangpan-transfer-hero__ico {
  width: 56px; height: 56px; border-radius: 16px;
  display: grid; place-items: center;
  background: rgba(200,164,92,0.16); color: var(--accent);
}
.wangpan-transfer-hero__ico .wp-ico { width: 26px; height: 26px; }
.wangpan-transfer-hero__title {
  margin: 0; font-size: 1.05rem; font-weight: 800;
}
.wangpan-transfer-hero__desc {
  margin: 0; max-width: 28em; color: var(--text-muted);
  font-size: 12px; line-height: 1.55; font-weight: 600;
}
.stable-kind-tab,
.wangpan-hub-tab {
  min-height: 40px; border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.04);
  color: var(--text-muted);
  font: inherit; font-size: 13px; font-weight: 800; cursor: pointer;
}
.stable-kind-tab.active,
.wangpan-hub-tab.active {
  color: var(--accent);
  border-color: rgba(200,164,92,0.45);
  background: rgba(200,164,92,0.12);
}
.stable-tip {
  margin: 0 0 12px; padding: 10px 12px; border-radius: 14px;
  border: 1px solid rgba(200,164,92,0.28);
  background: rgba(200,164,92,0.08);
  color: var(--text-muted); font-size: 12px; line-height: 1.55; font-weight: 600;
}
.stable-head { margin-bottom: 14px; }
.stable-head__title { margin: 0 0 6px; font-size: 1.2rem; font-weight: 700; }
.stable-head__hint { margin: 0; color: var(--muted, #9aa3b5); font-size: 13px; }
.stable-back {
  display: inline-flex; align-items: center; gap: 6px;
  margin-bottom: 12px; padding: 8px 12px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04);
  color: inherit; cursor: pointer; font: inherit;
}
.stable-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px;
}
@media (min-width: 520px) {
  .stable-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.stable-card {
  border: 0; padding: 0; background: transparent; color: inherit; text-align: start; cursor: pointer;
}
.stable-card__poster {
  position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 2/3;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08);
}
.stable-card__poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stable-card__poster-ph {
  display: grid; place-items: center; width: 100%; height: 100%;
  font-size: 28px; color: rgba(255,255,255,.35);
}
.stable-card__badge {
  position: absolute; left: 6px; bottom: 6px; padding: 2px 7px; border-radius: 999px;
  font-size: 11px; background: rgba(0,0,0,.55); color: #dff7ea;
}
.stable-card__name {
  margin-top: 6px; font-size: 12px; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.stable-card__meta { margin-top: 2px; font-size: 11px; color: var(--muted, #9aa3b5); }
.stable-route {
  display: block; width: 100%; text-align: start; margin: 0 0 10px; padding: 14px;
  border-radius: 16px; border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04); color: inherit; cursor: pointer; font: inherit;
}
.stable-route__name { font-weight: 650; margin-bottom: 4px; }
.stable-route__meta { font-size: 12px; color: var(--muted, #9aa3b5); }
.stable-tools {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px;
}
.stable-tools .stable-preview {
  flex: 1 1 160px; padding: 10px 12px; border-radius: 12px; border: 0;
  background: linear-gradient(135deg, #3d7cff, #5b8cff); color: #fff;
  font: inherit; font-weight: 650; cursor: pointer;
}
.stable-tools .stable-idchip {
  flex: 1 1 120px; padding: 10px 12px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04);
  font-size: 12px; color: var(--muted, #9aa3b5); word-break: break-all;
}
.stable-route-chips {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px;
}
.stable-route-chips button {
  padding: 8px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04); color: inherit; font: inherit; font-size: 12px; cursor: pointer;
}
.stable-route-chips button.is-on {
  background: rgba(61, 124, 255, 0.22); border-color: rgba(61, 124, 255, 0.55); color: #cfe0ff;
}
.stable-ep {
  border: 1px solid rgba(255,255,255,.1); border-radius: 16px;
  background: rgba(255,255,255,.035); padding: 12px; margin-bottom: 10px;
}
.stable-ep--on {
  border-color: rgba(94, 180, 255, 0.35);
  background: linear-gradient(180deg, rgba(61,124,255,.12), rgba(255,255,255,.04));
  box-shadow: 0 8px 20px rgba(0,0,0,.12);
}
.stable-ep--off {
  opacity: 0.48; filter: grayscale(0.35);
  border-color: rgba(255,255,255,.06);
  background: rgba(255,255,255,.02);
}
.stable-ep--off .stable-ep__actions { display: none; }
.stable-ep__url {
  margin-top: 8px; padding: 8px 10px; border-radius: 10px;
  background: rgba(0,0,0,.22); border: 1px solid rgba(255,255,255,.08);
  font-family: ui-monospace, Consolas, monospace; font-size: 11px;
  word-break: break-all; color: #b8c6e0; max-height: 64px; overflow: auto;
}
.stable-ep__top { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; }
.stable-ep__name { font-weight: 650; }
.stable-ep__meta { margin-top: 4px; font-size: 12px; color: var(--muted, #9aa3b5); line-height: 1.45; }
.stable-ep__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.stable-ep__actions button {
  flex: 1 1 auto; min-width: 72px; padding: 8px 10px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.06);
  color: inherit; cursor: pointer; font: inherit; font-size: 13px;
}
.stable-ep__actions button.primary { background: #3d7cff; border-color: transparent; color: #fff; }
.stable-ep__actions button.danger { background: rgba(255,107,107,.16); border-color: rgba(255,107,107,.35); color: #ffb4b4; }
.stable-tag {
  display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; white-space: nowrap;
}
.stable-tag--ok { background: rgba(62,207,142,.16); color: #6eebb3; }
.stable-tag--bad { background: rgba(255,107,107,.16); color: #ff9b9b; }
.stable-tag--off { background: rgba(255,255,255,.08); color: #aab3c5; }
.stable-empty {
  padding: 28px 16px; text-align: center; border-radius: 16px;
  border: 1px dashed rgba(255,255,255,.14); color: var(--muted, #9aa3b5);
}
.stable-update-mask {
  position: fixed; inset: 0; z-index: 220; display: grid; place-items: end center;
  background: rgba(0,0,0,.55);
  /* 避开底部导航栏 */
  padding: 16px 16px calc(88px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
}
.stable-update-sheet {
  width: min(520px, 100%); border-radius: 20px;
  background: #141822; border: 1px solid rgba(255,255,255,.12); padding: 16px;
  margin-bottom: 8px;
}
.stable-update-sheet h3 { margin: 0 0 8px; font-size: 1.05rem; }
.stable-update-sheet p { margin: 0 0 10px; color: #9aa3b5; font-size: 13px; line-height: 1.5; }
.stable-update-url {
  word-break: break-all; font-family: ui-monospace, Consolas, monospace;
  font-size: 12px; padding: 12px; border-radius: 12px; background: #0d1220;
  border: 1px solid rgba(255,255,255,.1); color: #c7d2ea; margin-bottom: 12px; max-height: 140px; overflow: auto;
}
.stable-update-actions { display: flex; gap: 8px; }
.stable-update-actions button {
  flex: 1; padding: 11px 12px; border-radius: 12px; border: 0; font: inherit; cursor: pointer;
}
.stable-update-actions .copy { background: #3d7cff; color: #fff; }
.stable-update-actions .cancel { background: rgba(255,255,255,.08); color: #e8ecf4; }
