/* ==== 00-tokens.css ==== */
/* 00-tokens.css — 设计令牌。组件只引用这里的变量,不写裸色值。
   播放器始终深色(视频内容的最佳背景),故只定义一套深色值。 */
:root {
  color-scheme: dark;

  /* 表面:由暗到亮逐级抬升 */
  --bg: #07070a;
  --surface-1: #0e0e13;
  --surface-2: #16161d;
  --surface-3: #1e1e27;
  --line: rgba(236, 236, 255, 0.08);
  --line-strong: rgba(236, 236, 255, 0.14);
  --scrim: rgba(4, 4, 8, 0.72);
  --glass: rgba(18, 18, 24, 0.86);

  /* 文字 */
  --fg: #f2f2f6;
  --fg-muted: #9b9bab;
  --fg-faint: #6b6b7b;
  --on-media: #ffffff;
  --on-media-muted: rgba(255, 255, 255, 0.72);

  /* 强调与语义 */
  --accent: #8e95ff;
  --accent-strong: #6d74f6;
  --accent-soft: rgba(142, 149, 255, 0.16);
  --accent-ink: #0b0b1a;
  --like: #ff4d6d;
  --ok: #3ad29f;
  --warn: #f5b942;
  --danger: #fb7185;

  /* 字体与字号 */
  --font-ui: "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-display: "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --fs-xs: 11px;
  --fs-sm: 12px;
  --fs-md: 14px;
  --fs-lg: 16px;
  --fs-xl: 20px;
  --fs-2xl: 26px;

  /* 间距 */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;

  /* 圆角 */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-pill: 999px;

  /* 阴影 */
  --shadow-pop: 0 16px 48px rgba(0, 0, 0, 0.5);
  --shadow-media: 0 1px 10px rgba(0, 0, 0, 0.6);

  /* 动效 */
  --dur-fast: 140ms;
  --dur: 220ms;
  --dur-slow: 360ms;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  /* 布局 */
  --side-w: 220px;
  --side-w-mini: 72px;
  --info-w: 300px;
  --tabbar-h: 56px;
  --hit: 44px;

  /* 旧变量名(过渡期兼容,新代码勿用) */
  --bg-elevated: var(--surface-1);
  --bg-card: var(--surface-2);
  --border: var(--line);
  --border-strong: var(--line-strong);
  --text: var(--fg);
  --text-muted: var(--fg-muted);
  --accent-rgb: 142, 149, 255;
  --accent-strong-rgb: 109, 116, 246;
  --accent-hover: #b4b8ff;
  --cyan: #67e8f9;
  --danger-rgb: 251, 113, 133;
  --ok-rgb: 58, 210, 159;
  --radius: 14px;
  --font: var(--font-ui);
}

/* ==== 10-base.css ==== */
/* 10-base.css — 重置、页面切换、通用控件(按钮/表单/分段/开关/徽章)、弹窗、表格基础 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  height: 100dvh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-ui);
  font-size: var(--fs-md);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  touch-action: manipulation;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: var(--r-pill); }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.22); }
.hidden { display: none !important; }
svg { flex-shrink: 0; }

/* 静态内联图标统一描边风格(HTML 里写死的导航图标) */
.nav-item svg, .tabbar svg, .icon-btn svg, .search-input-wrap svg, .g-ic svg, .nav-arrow svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- 页面 ---------- */
.page {
  position: fixed;
  inset: 0;
  display: none;
  flex-direction: column;
  z-index: 1;
}
.page.active { display: flex; animation: fade-in var(--dur) ease-out; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* 仅桌面 / 仅手机可见 */
.mobile-flex { display: none !important; }
@media (max-width: 640px) {
  .desktop-flex { display: none !important; }
  .mobile-flex:not(.hidden) { display: inline-flex !important; }
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 42px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font-size: var(--fs-md);
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform var(--dur-fast), background var(--dur), border-color var(--dur), opacity var(--dur);
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--fg); color: var(--accent-ink); }
.btn-primary:hover:not(:disabled) { background: #ffffff; }
.btn-ghost { background: var(--surface-2); color: var(--fg); border-color: var(--line); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-3); border-color: var(--line-strong); }
.btn-danger { background: var(--danger); color: #1a0509; }
.btn-danger-ghost { background: transparent; color: var(--danger); border-color: rgba(251, 113, 133, 0.4); }
.btn-danger-ghost:hover { background: rgba(251, 113, 133, 0.12); border-color: rgba(251, 113, 133, 0.6); }
.btn-sm { height: 32px; padding: 0 12px; font-size: var(--fs-sm); border-radius: var(--r-sm); }
.btn-block { width: 100%; }
.btn svg { width: 16px; height: 16px; }

/* 透明图标按钮(控制条、顶栏) */
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  transition: background var(--dur), color var(--dur), transform var(--dur-fast);
}
.icon-btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.08); }
.icon-btn:active:not(:disabled) { transform: scale(0.94); }
.icon-btn:disabled { opacity: 0.35; cursor: default; }
.icon-btn svg { width: 20px; height: 20px; }
.text-btn {
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--fg-muted);
  font-size: var(--fs-sm);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.text-btn:hover { color: var(--fg); border-color: var(--line-strong); }

/* 胶囊按钮(退出搜索等) */
.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.1);
  color: var(--fg);
  font-size: var(--fs-sm);
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background var(--dur);
}
.chip-btn:hover { background: rgba(255, 255, 255, 0.18); }
.chip-btn svg { width: 16px; height: 16px; }

/* 分段选择 */
.seg {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: rgba(22, 22, 29, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.seg button {
  height: 30px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--fg-muted);
  font-size: var(--fs-sm);
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--dur), color var(--dur);
}
.seg button:hover { color: var(--fg); }
.seg button[aria-pressed="true"] { background: var(--fg); color: var(--accent-ink); }
.seg-sm button { height: 28px; padding: 0 10px; }

/* 开关 */
.switch { position: relative; flex: none; width: 46px; height: 28px; }
.switch input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.switch span {
  position: absolute;
  inset: 0;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.16);
  transition: background var(--dur);
  pointer-events: none;
}
.switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  transition: transform var(--dur) var(--ease);
}
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 标签片 */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: #c9ccff;
  font-size: var(--fs-sm);
  font-weight: 600;
}
.chip-add {
  background: transparent;
  border: 1px dashed var(--line-strong);
  color: var(--fg-muted);
  cursor: pointer;
}
.chip-add:hover { color: var(--fg); border-color: var(--fg-faint); }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: 700;
}
.badge-admin { background: var(--accent-soft); color: #c9ccff; }
.badge-user { background: rgba(103, 232, 249, 0.1); color: var(--cyan); }
.badge-on { background: rgba(58, 210, 159, 0.14); color: var(--ok); }
.badge-off { background: rgba(251, 113, 133, 0.14); color: var(--danger); }
.badge-warn { background: rgba(245, 185, 66, 0.14); color: var(--warn); }

.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #c084fc);
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
}
.avatar-lg { width: 52px; height: 52px; font-size: var(--fs-xl); }

/* ---------- 表单 ---------- */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; margin-bottom: 6px; font-size: var(--fs-sm); color: var(--fg-muted); }
.form-group input,
.form-group select {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.04);
  font-size: var(--fs-lg);
  outline: none;
  transition: border-color var(--dur), box-shadow var(--dur), background var(--dur);
}
.form-group select {
  height: auto;
  min-height: 44px;
  padding: 10px 14px;
  line-height: 1.3;
  background: var(--surface-3);
}
.form-group input:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-group select:focus {
  border-color: var(--accent);
  background-color: var(--surface-3);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.password-wrap { position: relative; }
.password-wrap input { padding-right: 44px; }
.toggle-eye {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--fg-muted);
  cursor: pointer;
}
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 18px;
  font-size: var(--fs-md);
  color: var(--fg-muted);
  user-select: none;
}
.checkbox-row input { width: 16px; height: 16px; accent-color: var(--accent); }
.form-error {
  min-height: 1.2em;
  margin-bottom: 10px;
  color: var(--danger);
  font-size: var(--fs-sm);
  text-align: center;
}
select {
  padding: 7px 10px;
  line-height: 1.3;
  background-color: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
}

/* ---------- 加载 / 空态 ---------- */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.14);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty-sub { max-width: 320px; font-size: var(--fs-sm); line-height: 1.55; color: var(--fg-muted); }
.modal-sub { max-width: none; margin: -6px 0 14px; overflow-wrap: anywhere; }

/* ---------- 弹窗(手机端为底部抽屉) ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--scrim);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.modal-backdrop.open { display: flex; animation: fade-in var(--dur) ease-out; }
.modal {
  width: min(440px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 22px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--surface-2);
  box-shadow: var(--shadow-pop);
}
.modal-backdrop.open .modal { animation: modal-in var(--dur-slow) var(--ease); }
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(0.97); } to { opacity: 1; transform: none; } }
.modal h3 { margin-bottom: 14px; font-size: var(--fs-lg); font-weight: 700; }
.modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.modal-actions .btn { min-width: 88px; }
@media (max-width: 640px) {
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal {
    width: 100%;
    max-height: 86vh;
    border-width: 1px 0 0;
    border-radius: 22px 22px 0 0;
    padding: 12px 18px calc(18px + env(safe-area-inset-bottom));
  }
  .modal::before {
    content: "";
    display: block;
    width: 40px;
    height: 4px;
    margin: 0 auto 14px;
    border-radius: 2px;
    background: var(--line-strong);
  }
  .modal-backdrop.open .modal { animation: sheet-in var(--dur-slow) var(--ease); }
  .modal-actions .btn { flex: 1; }
}
@keyframes sheet-in { from { transform: translateY(100%); } to { transform: none; } }

/* 媒体信息弹窗 */
.info-rows { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 6px; }
.info-row { display: flex; gap: 12px; padding: 9px 10px; border-radius: 10px; font-size: var(--fs-md); line-height: 1.45; }
.info-row:nth-child(odd) { background: rgba(255, 255, 255, 0.03); }
.info-row > span { flex: none; width: 64px; color: var(--fg-muted); font-weight: 650; }
.info-row > b { flex: 1; min-width: 0; font-weight: 500; overflow-wrap: anywhere; word-break: normal; }
.info-share-link { color: var(--accent); overflow-wrap: anywhere; word-break: normal; }

/* 标记弹窗 */
.tag-modal-path { margin-bottom: 12px; font-size: var(--fs-sm); color: var(--fg-muted); overflow-wrap: anywhere; word-break: normal; }
.tag-create-row { display: flex; gap: 8px; margin-bottom: 12px; }
.tag-create-row input {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  outline: none;
}
.tag-create-row input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tag-list { display: flex; flex-direction: column; gap: 6px; max-height: 40vh; overflow-y: auto; margin-bottom: 4px; }
.tag-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: background var(--dur-fast);
}
.tag-item:hover { background: rgba(255, 255, 255, 0.08); }
.tag-item input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.tag-name { flex: 1; font-size: var(--fs-md); }
.tag-rename-btn, .tag-del-btn { opacity: 0.6; }
.tag-rename-btn:hover, .tag-del-btn:hover { opacity: 1; }
.tag-filter-list { display: flex; flex-direction: column; gap: 4px; }
.tag-filter-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 46px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.tag-filter-list button:hover { background: rgba(255, 255, 255, 0.06); }
.tag-filter-list button[aria-current="true"] { background: var(--accent-soft); }
.tag-filter-list small { color: var(--fg-faint); font-weight: 500; }

/* 用户存储库分配 */
.user-libs-checks { display: grid; gap: 8px; max-height: 42vh; overflow: auto; margin-top: 12px; padding: 4px 2px; }
.user-lib-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  font-size: var(--fs-md);
  line-height: 1.35;
  cursor: pointer;
}
.user-lib-check:hover { background: rgba(255, 255, 255, 0.06); border-color: var(--line-strong); }
.user-lib-check input { margin-top: 2px; }

/* 目录浏览弹窗 */
.modal-browser { width: min(560px, 100%); }
.browser-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.browser-head h3 { margin: 0; }
.browser-path { font-size: var(--fs-sm); color: var(--cyan); overflow-wrap: anywhere; word-break: normal; }
.browser-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.browser-list { max-height: min(420px, 55vh); overflow: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: rgba(0, 0, 0, 0.35); }
.browser-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-md);
}
.browser-row:last-child { border-bottom: 0; }
.browser-row .name { font-weight: 650; cursor: pointer; }
.browser-row .name:hover { color: var(--cyan); }
.browser-row .meta { font-size: var(--fs-sm); color: var(--fg-muted); }
.browser-empty { padding: 18px; text-align: center; font-size: var(--fs-md); color: var(--fg-muted); }

/* ==== 20-auth.css ==== */
/* 20-auth.css — 登录与改密页 */
.auth-page {
  align-items: center;
  justify-content: center;
  padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
  overflow-y: auto;
  background:
    radial-gradient(ellipse at 15% 10%, rgba(109, 116, 246, 0.22), transparent 45%),
    radial-gradient(ellipse at 85% 90%, rgba(192, 132, 252, 0.12), transparent 42%),
    var(--bg);
}
.auth-card {
  width: min(400px, 100%);
  padding: 40px 32px 30px;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: rgba(16, 16, 22, 0.78);
  box-shadow: var(--shadow-pop);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  animation: modal-in 0.5s var(--ease);
}
.auth-card .brand { margin-bottom: 28px; text-align: center; }
.auth-card .brand h1 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.auth-card .brand p { margin-top: 8px; font-size: var(--fs-md); color: var(--fg-muted); }
.auth-card .btn-block + .btn-block { margin-top: 10px; }
@media (max-width: 640px) {
  .auth-card { padding: 32px 22px 24px; border-radius: 20px; }
}

/* ==== 30-shell.css ==== */
/* 30-shell.css — 应用外壳:侧边导航、主区视图、底部导航
   断点:≤640 手机(底部导航) / 641–1023 窄桌面(图标侧栏) / ≥1024 完整侧栏 / ≥1280 播放页显示右侧信息栏 */
.app-shell.page.active {
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}
@media (min-width: 1280px) {
  .app-shell.page.active[data-view="feed"] { grid-template-columns: var(--side-w) minmax(0, 1fr) var(--info-w); }
  .app-shell[data-view="feed"] .info-panel { display: flex; }
}

/* ---------- 侧边导航 ---------- */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  min-height: 0;
  padding: 18px 12px 14px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: var(--surface-1);
}
.side-brand {
  padding: 4px 12px 20px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.side-brand span { color: var(--accent); }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--r-md);
  background: transparent;
  color: var(--fg-muted);
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--dur), color var(--dur);
}
.nav-item svg { width: 20px; height: 20px; }
.nav-item:hover { background: var(--surface-2); color: var(--fg); }
.nav-item[aria-current="page"] { background: var(--accent-soft); color: var(--fg); }
.nav-item[aria-current="page"] svg { color: var(--accent); }
.nav-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.side-tags { display: flex; flex-direction: column; gap: 1px; margin: 0 0 4px 32px; }
.side-tags:empty { display: none; }
.side-tag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--fg-muted);
  font-size: var(--fs-md);
  text-align: left;
  cursor: pointer;
}
.side-tag span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-tag small { color: var(--fg-faint); font-variant-numeric: tabular-nums; }
.side-tag:hover { background: var(--surface-2); color: var(--fg); }
.side-tag[aria-current="page"] { color: var(--fg); background: var(--surface-2); }
.side-sep { height: 1px; margin: 10px 4px; background: var(--line); }
.side-grow { flex: 1; min-height: 12px; }
.side-user {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--r-md);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.side-user:hover, .side-user[aria-current="page"] { background: var(--surface-2); }
.side-user-text { display: flex; flex-direction: column; min-width: 0; }
.side-user-text b { font-size: var(--fs-md); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user-text small { font-size: var(--fs-xs); color: var(--fg-faint); }

/* 窄桌面:只显示图标 */
@media (min-width: 641px) and (max-width: 1023px) {
  .app-shell.page.active { grid-template-columns: var(--side-w-mini) minmax(0, 1fr); }
  .sidebar { align-items: center; padding: 18px 10px 14px; }
  .side-brand { padding: 4px 0 20px; font-size: 0; }
  .side-brand::before { content: "N"; font-size: 24px; color: var(--accent); }
  .nav-item { justify-content: center; width: 48px; padding: 0; }
  .nav-label, .side-user-text, .side-tags { display: none; }
  .side-user { justify-content: center; width: auto; }
}

/* ---------- 主区与视图 ---------- */
.shell-main { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.view { position: absolute; inset: 0; display: none; flex-direction: column; }
.view.active { display: flex; animation: fade-in var(--dur) ease-out; }
.view-scroll { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.view-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 26px 28px 48px;
}
.view-inner.narrow { max-width: 920px; }
.view-head { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-bottom: 18px; }
.view-head h1 {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* ---------- 底部导航(仅手机) ---------- */
.tabbar { display: none; }
.info-panel { display: none; }

@media (max-width: 640px) {
  .app-shell.page.active { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  .tabbar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
    padding: 0 max(8px, env(safe-area-inset-left)) env(safe-area-inset-bottom) max(8px, env(safe-area-inset-right));
    border-top: 1px solid var(--line);
    background: var(--bg);
    transition: opacity var(--dur-slow) ease, transform var(--dur-slow) var(--ease);
  }
  .tabbar button {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: 0;
    background: transparent;
    color: var(--fg-faint);
    font-size: var(--fs-xs);
    font-weight: 650;
    cursor: pointer;
  }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar button[aria-current="page"] { color: var(--fg); }
  .view:not(.feed-page) { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
  .view-inner { padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 32px max(16px, env(safe-area-inset-left)); }
  .view-head h1 { font-size: 22px; }
  /* 沉浸播放:播放中自动隐藏底部导航 */
  .app-shell:has(#page-feed.active.chrome-dimmed) .tabbar { opacity: 0; transform: translateY(100%); pointer-events: none; }
}

/* ==== 40-feed.css ==== */
/* 40-feed.css — 播放页:顶栏、滑动轨道、右侧操作栏、控制条、各类浮层
   桌面为三行网格(顶栏/画面/控制条);手机画面铺满,其余控件浮在画面上 */
.feed-page { background: var(--bg); }
.feed-page.active { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.feed-page,
.feed-page * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

/* 环境光:当前画面缩成 48×27 后模糊铺满,填补竖屏内容两侧 */
.ambient-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  filter: blur(64px) saturate(1.35) brightness(0.42);
  transform: scale(1.15);
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}
.feed-page:has(.feed-viewport.fit-contain) .ambient-canvas.on { opacity: 1; }

/* ---------- 顶栏 ---------- */
.feed-top {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  height: 60px;
  padding: 0 20px;
}
.feed-top-left { justify-self: start; display: flex; align-items: center; gap: 10px; min-width: 0; }
.feed-top-right { justify-self: end; display: flex; align-items: center; gap: 6px; }
.feed-top-right .icon-btn { color: var(--fg-muted); }
.feed-top-right .icon-btn:hover { color: var(--fg); }
.feed-counter { font-size: var(--fs-sm); color: var(--fg-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.feed-tabs { display: none; }

/* ---------- 画面与滑动轨道 ---------- */
.feed-viewport { position: relative; z-index: 1; min-height: 0; overflow: hidden; touch-action: none; }
.feed-track {
  position: absolute;
  inset: 0;
  will-change: transform;
  transition: transform 0.35s var(--ease);
}
.feed-track.dragging { transition: none; }
.video-slide {
  position: absolute;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}
.video-slide video { max-width: 100%; max-height: 100%; background: #000; }
.feed-image {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: #000;
  pointer-events: none;
  -webkit-user-drag: none;
}
@media (min-width: 641px) {
  .fit-contain .video-slide,
  .fit-contain .video-slide video,
  .fit-contain .feed-image { background: transparent; }
}
.album-track {
  position: absolute;
  inset: 0;
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.28s var(--ease);
  will-change: transform;
  touch-action: none;
}
.album-slide {
  position: relative;
  display: flex;
  flex: 0 0 100%;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.fit-contain video, .fit-contain .feed-image { width: 100%; height: 100%; object-fit: contain; }
.fit-cover video, .fit-cover .feed-image { width: 100%; height: 100%; object-fit: cover; }
.fit-fill video, .fit-fill .feed-image { width: 100%; height: 100%; object-fit: fill; }
.fit-width video, .fit-width .feed-image { width: 100%; height: auto; object-fit: unset; }
.fit-height video, .fit-height .feed-image { width: auto; height: 100%; object-fit: unset; }

.tap-zones { position: absolute; inset: 0; z-index: 6; display: flex; }
.tap-zone { position: relative; flex: 1; height: 100%; }
.tap-zone.seek-flash::after {
  content: attr(data-flash);
  position: absolute;
  top: 42%;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  text-shadow: var(--shadow-media);
  pointer-events: none;
}
.tap-zone.left-zone.seek-flash::after { left: 18%; }
.tap-zone.right-zone.seek-flash::after { right: 18%; }

/* 每条内容自带标题,随滑动一起移动;宽屏桌面由右侧信息栏展示 */
.video-meta {
  position: absolute;
  left: 24px;
  right: 150px;
  bottom: 24px;
  z-index: 8;
  pointer-events: none;
}
.video-meta h2 {
  display: -webkit-box;
  overflow: hidden;
  margin-bottom: 4px;
  color: var(--on-media);
  font-size: var(--fs-lg);
  font-weight: 700;
  line-height: 1.4;
  text-shadow: var(--shadow-media);
  word-break: break-word;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.video-meta p { color: var(--on-media-muted); font-size: var(--fs-sm); text-shadow: var(--shadow-media); }
@media (min-width: 1280px) {
  .app-shell[data-view="feed"] .video-meta { display: none; }
}

/* ---------- 右侧操作栏 ---------- */
.action-rail {
  position: absolute;
  right: var(--rail-x, 84px);
  bottom: 24px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  transition: right var(--dur-slow) var(--ease), opacity var(--dur-slow) ease, transform var(--dur-slow) var(--ease);
}
.rail-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border: 0;
  background: none;
  color: var(--fg);
  font-size: var(--fs-xs);
  font-weight: 650;
  cursor: pointer;
}
.rail-ic {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  /* 不用 backdrop-filter:浮在播放中的视频上,每帧重算模糊在手机上很耗 GPU */
  background: rgba(22, 22, 29, 0.84);
  transition: transform var(--dur-fast) var(--ease), background var(--dur), color var(--dur);
}
.rail-ic svg { width: 24px; height: 24px; }
.rail-btn:hover .rail-ic { background: var(--surface-3); }
.rail-btn:active .rail-ic { transform: scale(0.9); }
.rail-btn:disabled { opacity: 0.35; pointer-events: none; }
.rail-label { color: var(--on-media-muted); text-shadow: var(--shadow-media); }
.rail-like.active .rail-ic { color: var(--like); }
.rail-btn.is-on .rail-ic { color: var(--accent); }
.rail-btn.pop .rail-ic { animation: rail-pop 0.38s var(--ease); }
@keyframes rail-pop { 40% { transform: scale(1.22); } }
.rail-mute { display: none; }
.rail-mute.is-muted .rail-ic { color: var(--on-media-muted); }

.dock-more { position: relative; display: flex; }
.dock-more-menu {
  position: absolute;
  right: calc(100% + 12px);
  bottom: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 168px;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--glass);
  box-shadow: var(--shadow-pop);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: menu-in var(--dur) var(--ease);
}
@keyframes menu-in { from { opacity: 0; transform: translateX(6px) scale(0.98); } to { opacity: 1; transform: none; } }
.side-more-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--fg);
  font-size: var(--fs-md);
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.side-more-item:hover { background: rgba(255, 255, 255, 0.08); }
.side-more-item svg { width: 20px; height: 20px; }
.side-more-item small { margin-left: auto; padding-left: 12px; color: var(--fg-faint); font-weight: 500; }

/* 横屏铺满画幅时操作栏与翻页按钮浮在画面上:增强底色并在鼠标静止时柔和淡出 */
.feed-viewport.rail-over-media .rail-ic,
.feed-viewport.rail-over-media .nav-arrow {
  background: rgba(12, 12, 18, 0.82);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
}
.feed-viewport.rail-over-media .feed-nav { transition: opacity var(--dur-slow) ease; }
.feed-page.rail-idle .feed-viewport.rail-over-media .action-rail,
.feed-page.rail-idle .feed-viewport.rail-over-media .feed-nav {
  opacity: 0.25;
}
.feed-viewport.rail-over-media .action-rail:hover,
.feed-viewport.rail-over-media .action-rail:focus-within,
.feed-viewport.rail-over-media .feed-nav:hover,
.feed-viewport.rail-over-media .feed-nav:focus-within {
  opacity: 1 !important;
}

/* 上一条 / 下一条 */
.feed-nav {
  position: absolute;
  right: 20px;
  top: 50%;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transform: translateY(-50%);
}
.nav-arrow {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(22, 22, 29, 0.72);
  color: var(--fg-muted);
  cursor: pointer;
  transition: background var(--dur), color var(--dur);
}
.nav-arrow svg { width: 20px; height: 20px; }
.nav-arrow:hover:not(:disabled) { background: var(--surface-3); color: var(--fg); }
.nav-arrow:disabled { opacity: 0.3; cursor: default; }

/* 双击喜欢的爱心 */
.heart-burst {
  position: absolute;
  z-index: 40;
  width: 96px;
  height: 96px;
  margin: -48px 0 0 -48px;
  color: var(--like);
  pointer-events: none;
  filter: drop-shadow(0 6px 18px rgba(255, 77, 109, 0.5));
  animation: heart-burst 0.76s var(--ease) forwards;
}
.heart-burst svg { width: 100%; height: 100%; }
@keyframes heart-burst {
  0% { transform: scale(0.3) rotate(var(--rot, 0deg)); opacity: 0; }
  25% { transform: scale(1.15) rotate(var(--rot, 0deg)); opacity: 1; }
  45% { transform: scale(0.95) rotate(var(--rot, 0deg)); }
  100% { transform: translateY(-60px) scale(1.4) rotate(var(--rot, 0deg)); opacity: 0; }
}

/* ---------- 控制条(桌面) ---------- */
.bottom-dock { position: relative; z-index: 3; padding: 2px 20px 12px; }
.progress-bar {
  position: relative;
  display: flex;
  align-items: center;
  height: 22px;
  cursor: pointer;
  touch-action: none;
}
.progress-bar::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.16);
  transition: height var(--dur-fast);
}
.progress-fill {
  position: relative;
  z-index: 1;
  width: 0%;
  height: 4px;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--accent), #c4b5fd);
  pointer-events: none;
  transition: height var(--dur-fast);
}
.progress-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  z-index: 2;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(-50%);
  pointer-events: none;
  transition: opacity var(--dur-fast);
}
.progress-bar:hover::before, .progress-bar.is-dragging::before,
.progress-bar:hover .progress-fill, .progress-bar.is-dragging .progress-fill { height: 6px; }
.progress-bar:hover .progress-thumb, .progress-bar.is-dragging .progress-thumb { opacity: 1; }
.scrub-time {
  position: absolute;
  left: 50%;
  bottom: 48px;
  z-index: 22;
  display: none;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: var(--fs-sm);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transform: translateX(-50%);
  pointer-events: none;
}
.dock-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dock-left, .dock-right { display: flex; align-items: center; gap: 6px; min-width: 0; }
#pc-playpause-btn svg { width: 22px; height: 22px; }
.time-label { min-width: 96px; color: var(--fg-muted); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; white-space: nowrap; }
.vol-wrap { display: flex; align-items: center; gap: 2px; }
.vol-wrap input[type="range"] { width: 88px; accent-color: var(--accent); }
@media (max-width: 900px) { .vol-wrap input[type="range"] { width: 64px; } }

/* ---------- 画面内浮层 ---------- */
.pause-indicator {
  position: absolute;
  inset: 0;
  z-index: 14;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur) ease;
}
.pause-indicator.show { opacity: 1; }
.pause-badge {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(10, 10, 12, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.pause-badge svg { width: 32px; height: 32px; margin-left: 3px; color: #fff; }
.loader-overlay {
  position: absolute;
  inset: 0;
  z-index: 16;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.45);
  pointer-events: none;
}
.loader-text { color: rgba(255, 255, 255, 0.88); font-size: var(--fs-md); font-weight: 650; }
.net-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 18;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: rgba(0, 0, 0, 0.55);
  color: #ffdcb4;
  font-size: var(--fs-xs);
  font-weight: 650;
  pointer-events: none;
}
.net-badge svg { width: 14px; height: 14px; }
.unplayable-badge {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 9;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: rgba(0, 0, 0, 0.55);
  color: var(--warn);
  font-size: var(--fs-xs);
}
.error-overlay {
  position: absolute;
  inset: 0;
  z-index: 17;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  background: rgba(0, 0, 0, 0.72);
  text-align: center;
}
.error-overlay.show { display: flex; }
.error-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 1px solid rgba(251, 113, 133, 0.38);
  border-radius: 50%;
  background: rgba(251, 113, 133, 0.14);
  color: var(--danger);
}
.video-slide:has(.error-overlay.show) .video-meta { display: none; }
.error-title { color: #fff; font-size: var(--fs-lg); font-weight: 750; }
.error-msg { max-width: 280px; color: rgba(255, 255, 255, 0.7); font-size: var(--fs-md); line-height: 1.45; overflow-wrap: anywhere; word-break: normal; }
.error-overlay .btn { min-width: 120px; margin-top: 4px; }
.album-indicator {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 9;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: var(--fs-sm);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.empty-state {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 32px;
  color: var(--fg-muted);
  text-align: center;
}
.empty-state::before {
  content: "";
  width: 68px;
  height: 68px;
  margin-bottom: 6px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 24 24' fill='none' stroke='%238e95ff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='18' x='3' y='3' rx='2'/%3E%3Cpath d='M7 3v18'/%3E%3Cpath d='M3 12h18'/%3E%3Cpath d='M17 3v18'/%3E%3C/svg%3E") no-repeat center;
}
.empty-state p:first-of-type { color: var(--fg); font-size: var(--fs-lg); font-weight: 700; }
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }

.speed-toast, .seek-toast {
  position: absolute;
  left: 50%;
  z-index: 30;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-weight: 700;
  opacity: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: opacity var(--dur);
}
.speed-toast { top: 14%; }
.seek-toast { top: 38%; border-radius: 10px; }
.speed-toast.show, .seek-toast.show { opacity: 1; }
.feed-toast {
  position: absolute;
  left: 50%;
  top: 18px;
  z-index: 32;
  max-width: min(86vw, 380px);
  padding: 10px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--glass);
  color: #fff;
  font-size: var(--fs-md);
  font-weight: 650;
  line-height: 1.45;
  text-align: center;
  white-space: pre-line;
  opacity: 0;
  transform: translate(-50%, -8px);
  pointer-events: none;
  transition: opacity var(--dur), transform var(--dur) var(--ease);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.feed-toast.show { opacity: 1; transform: translate(-50%, 0); }
.feed-toast.compact { padding: 6px 12px; border-radius: var(--r-pill); font-size: var(--fs-sm); white-space: nowrap; }

/* 快捷键 / 手势说明 */
.help-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--scrim);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.help-card {
  width: min(420px, 100%);
  padding: 22px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--surface-2);
  box-shadow: var(--shadow-pop);
  animation: modal-in var(--dur-slow) var(--ease);
}
.help-card h3 { margin-bottom: 14px; font-size: var(--fs-lg); }
.help-card ul { display: grid; gap: 9px; margin-bottom: 18px; list-style: none; }
.help-card li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--fg-muted); font-size: var(--fs-md); }
.help-card kbd {
  display: inline-flex;
  justify-content: center;
  min-width: 22px;
  padding: 2px 7px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-family: inherit;
  font-size: var(--fs-sm);
}
.help-mobile { display: none; }
.g-row { display: flex; align-items: center; gap: 14px; padding: 10px 0; }
.g-ic { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 14px; background: var(--surface-3); color: var(--accent); }
.g-ic svg { width: 22px; height: 22px; }
.g-row b { display: block; font-size: var(--fs-lg); }
.g-row small { color: var(--fg-muted); font-size: var(--fs-md); }

/* ---------- 桌面全屏 ---------- */
.exit-immersive-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: var(--fs-sm);
  font-weight: 700;
  cursor: pointer;
}
.exit-immersive-btn svg { width: 20px; height: 20px; }
.feed-page.is-immersive .feed-top,
.feed-page.is-immersive .bottom-dock,
.feed-page.is-immersive .action-rail,
.feed-page.is-immersive .feed-nav,
.feed-page.is-immersive .video-meta { display: none; }

/* ---------- 手机 ---------- */
@media (max-width: 640px) {
  .feed-page.active { display: block; }
  .ambient-canvas { display: none; }
  .feed-viewport { position: absolute; inset: 0; }
  .feed-viewport::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 240px;
    z-index: 7;
    pointer-events: none;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.68) 0%, rgba(0, 0, 0, 0.24) 58%, transparent 100%);
    transition: opacity var(--dur-slow) ease;
  }
  .feed-page.chrome-dimmed .feed-viewport::after { opacity: 0; }

  .feed-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 30;
    height: auto;
    padding: max(6px, env(safe-area-inset-top)) 6px 26px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.28) 60%, transparent 100%);
    pointer-events: none;
    transition: opacity var(--dur-slow) ease, transform var(--dur-slow) var(--ease);
  }
  .feed-top > * { pointer-events: auto; }
  .media-seg, .feed-counter { display: none; }
  .feed-tabs { display: flex; justify-self: center; gap: 22px; }
  .feed-tabs button {
    position: relative;
    height: 40px;
    border: 0;
    background: none;
    color: rgba(255, 255, 255, 0.62);
    font-size: 17px;
    font-weight: 700;
    text-shadow: var(--shadow-media);
    cursor: pointer;
    transition: color var(--dur);
  }
  .feed-tabs button[aria-pressed="true"] { color: #fff; }
  .feed-tabs button[aria-pressed="true"]::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 2px;
    width: 18px;
    height: 3px;
    margin-left: -9px;
    border-radius: 2px;
    background: #fff;
  }
  .feed-top-right .icon-btn { width: 44px; height: 44px; color: #fff; }
  .feed-top-right .icon-btn svg { width: 24px; height: 24px; }

  .action-rail {
    right: max(8px, env(safe-area-inset-right));
    bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 56px);
    gap: 16px;
  }
  .rail-mute { display: flex; }
  .rail-ic { width: 46px; height: 46px; border-color: rgba(255, 255, 255, 0.14); background: rgba(0, 0, 0, 0.44); }
  .rail-ic svg { width: 28px; height: 28px; }
  .rail-label { color: #fff; }
  .feed-page[data-kind="image"] .rail-mute,
  .feed-page[data-kind="album"] .rail-mute { display: none; }
  .feed-nav { display: none; }

  .video-meta {
    left: max(14px, env(safe-area-inset-left));
    right: 80px;
    bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 26px);
  }
  .video-meta h2 { font-size: 15px; text-wrap: balance; }

  .bottom-dock {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
    z-index: 25;
    padding: 0;
  }
  #dock-row { display: none; }
  .progress-bar { align-items: flex-end; height: 26px; }
  .progress-bar::before, .progress-fill { height: 2px; border-radius: 0; }
  .progress-bar:hover::before, .progress-bar:hover .progress-fill { height: 2px; }
  .progress-bar.is-dragging::before, .progress-bar.is-dragging .progress-fill { height: 6px; }
  .progress-thumb { top: auto; bottom: -4px; transform: none; }
  .progress-bar:hover .progress-thumb { opacity: 0; }
  .progress-bar.is-dragging .progress-thumb { opacity: 1; }
  .bottom-dock.is-scrubbing .scrub-time { display: block; }

  .album-indicator { top: calc(max(6px, env(safe-area-inset-top)) + 54px); }
  .net-badge { top: calc(max(6px, env(safe-area-inset-top)) + 54px); right: auto; left: 12px; }
  .unplayable-badge { top: calc(max(6px, env(safe-area-inset-top)) + 54px); }
  .feed-toast { top: calc(max(6px, env(safe-area-inset-top)) + 60px); }
  .pause-indicator { background: rgba(0, 0, 0, 0.14); }
  .error-overlay { padding: 24px 72px 24px 24px; }

  .help-overlay { align-items: flex-end; padding: 0; }
  .help-card { border-radius: 22px 22px 0 0; border-width: 1px 0 0; padding: 24px 22px calc(18px + env(safe-area-inset-bottom)); animation: sheet-in var(--dur-slow) var(--ease); }
  .help-desktop { display: none; }
  .help-mobile { display: block; margin-bottom: 12px; }
  .help-mobile h3 { font-size: var(--fs-xl); }

  .feed-page.chrome-dimmed .feed-top { opacity: 0; transform: translateY(-8px); pointer-events: none; }
  .feed-page.chrome-dimmed .action-rail,
  .feed-page.chrome-dimmed .video-meta { opacity: 0; transform: translateY(12px); pointer-events: none; }
  .exit-immersive-btn, #fullscreen-btn { display: none !important; }
}
@media (max-width: 360px) {
  .exit-search-btn .btn-label { display: none; }
}

/* ==== 45-info.css ==== */
/* 45-info.css — 宽屏桌面播放页右侧信息栏:详情、标记、分享、接下来 */
.info-panel {
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  border-left: 1px solid var(--line);
  background: var(--surface-1);
}
.ip-sec { padding: 18px 20px; border-bottom: 1px solid var(--line); }
.ip-sec:last-child { border-bottom: 0; }
.ip-title { font-size: 18px; font-weight: 700; line-height: 1.35; text-wrap: balance; word-break: break-word; }
.ip-sub { margin-top: 4px; color: var(--fg-muted); font-size: var(--fs-sm); }
.ip-kv { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 8px 10px; margin-top: 14px; font-size: var(--fs-md); }
.ip-kv dt { color: var(--fg-faint); }
.ip-kv dd { overflow-wrap: anywhere; word-break: normal; }
.ip-actions { display: flex; gap: 8px; margin-top: 14px; }
.ip-sec-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--fg-muted);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.ip-order { color: var(--fg-faint); font-weight: 600; letter-spacing: 0; }
.ip-share-state { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; font-size: var(--fs-md); color: var(--fg-muted); }
.ip-share-link { display: block; margin-bottom: 10px; color: var(--accent); font-size: var(--fs-sm); overflow-wrap: anywhere; word-break: normal; }
.ip-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.queue { display: flex; flex-direction: column; gap: 2px; }
.q-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 6px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.q-item:hover { background: var(--surface-2); }
.q-thumb {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 56px;
  overflow: hidden;
  border-radius: 6px;
  background: var(--surface-3);
  color: var(--fg-faint);
}
.q-thumb img, .q-thumb video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.q-thumb svg { width: 18px; height: 18px; }
.q-text { min-width: 0; }
.q-text b { display: block; overflow: hidden; font-size: var(--fs-md); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.q-text small { color: var(--fg-faint); font-size: var(--fs-xs); }
.queue-empty { padding: 6px; color: var(--fg-faint); font-size: var(--fs-md); }

/* ==== 50-library.css ==== */
/* 50-library.css — 媒体库:搜索、类型筛选、竖版封面网格 */
.library-page .view-head { align-items: center; }
.search-input-wrap { position: relative; flex: 1 1 280px; max-width: 440px; margin-left: auto; }
.search-input-wrap > svg {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 17px;
  height: 17px;
  color: var(--fg-faint);
  transform: translateY(-50%);
  pointer-events: none;
}
.search-input-wrap input {
  width: 100%;
  height: 40px;
  padding: 0 40px 0 38px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
  outline: none;
  transition: border-color var(--dur);
}
.search-input-wrap input:focus { border-color: var(--accent); }
.search-input-wrap input::-webkit-search-cancel-button { display: none; }
.search-clear-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: var(--fs-lg);
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
}
.search-filters { display: flex; gap: 8px; margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.search-filters::-webkit-scrollbar { display: none; }
.search-filter {
  flex: none;
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--fg-muted);
  font-size: var(--fs-md);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--dur), color var(--dur), border-color var(--dur);
}
.search-filter:hover { color: var(--fg); border-color: var(--line-strong); }
.search-filter.active { background: var(--fg); border-color: var(--fg); color: var(--accent-ink); }
.search-empty { padding: 48px 20px; color: var(--fg-muted); text-align: center; }
#search-spinner { width: 26px; height: 26px; margin: 32px auto 0; }

.search-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.search-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
  cursor: pointer;
  transition: transform var(--dur) var(--ease), border-color var(--dur);
}
.search-card:hover, .search-card:focus-visible { transform: translateY(-2px); border-color: var(--line-strong); outline: none; }
.search-card-cover {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #1d1d26, #0f0f13);
  color: rgba(255, 255, 255, 0.4);
}
.search-card-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.search-card-cover svg { width: 36px; height: 36px; }
.search-card-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur) ease;
}
.search-card-poster.ready { opacity: 1; }
.search-kind-badge {
  position: absolute;
  right: 6px;
  top: 6px;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: rgba(0, 0, 0, 0.55);
  color: rgba(255, 255, 255, 0.88);
  font-size: var(--fs-xs);
  font-weight: 650;
  backdrop-filter: blur(6px);
}
.search-card-info { padding: 8px 10px 10px; }
.search-card-title, .search-card-path { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-card-title { font-size: var(--fs-md); font-weight: 650; }
.search-card-path { margin-top: 2px; color: var(--fg-faint); font-size: var(--fs-xs); }

@media (max-width: 640px) {
  .search-input-wrap { flex-basis: 100%; max-width: none; margin-left: 0; }
  .search-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .search-card { border: 0; border-radius: var(--r-sm); background: transparent; }
  .search-card:hover { transform: none; }
  .search-card-cover { border-radius: var(--r-sm); }
  .search-card-info { padding: 6px 4px 8px; }
  .search-card-title { font-size: 13px; }
  .search-card-path { display: none; }
}

/* ==== 60-me.css ==== */
/* 60-me.css — 设置 / 我的 */
.profile {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding: 18px;
  border-radius: var(--r-lg);
  background: var(--surface-2);
}
.profile-text b { display: block; font-size: 17px; }
.profile-text small { display: block; margin-top: 2px; color: var(--fg-muted); font-size: var(--fs-md); }
.me-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; align-items: start; }
.me-group { margin-bottom: 20px; }
.me-group h4 { margin: 0 0 8px 4px; color: var(--fg-faint); font-size: var(--fs-sm); font-weight: 700; letter-spacing: 0.06em; }
.list { overflow: hidden; border-radius: var(--r-md); background: var(--surface-2); }
.li {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  padding: 8px 16px;
  border: 0;
  background: transparent;
  text-align: left;
}
.li + .li { border-top: 1px solid var(--line); }
.li-label { flex: 1; min-width: 0; font-weight: 500; }
.li-label small { display: block; margin-top: 2px; color: var(--fg-faint); font-size: var(--fs-sm); font-weight: 400; }
.li-select { height: auto; min-height: 36px; max-width: 54%; padding: 7px 10px; background-color: var(--surface-3); }
.li-link { cursor: pointer; transition: background var(--dur-fast); }
.li-link:hover { background: var(--surface-3); }
.li-chev { color: var(--fg-faint); font-size: 22px; line-height: 1; }
.li-danger { color: var(--like); }
.me-status { min-height: 1.4em; margin: 10px 4px 0; color: var(--ok); font-size: var(--fs-md); }
@media (max-width: 760px) {
  .me-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 380px) {
  .li .seg button { padding: 0 8px; }
}

/* ==== 70-admin.css ==== */
/* 70-admin.css — 管理后台:概览、分页标签、工具条、表格(手机端为卡片) */
.admin-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 18px;
  padding-right: 20px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 18px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 18px), transparent);
}
.admin-tabs.scrolled-end { -webkit-mask-image: none; mask-image: none; }
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tabs button {
  flex: none;
  margin-bottom: -1px;
  padding: 10px 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--fg-muted);
  font-size: var(--fs-md);
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--dur), border-color var(--dur);
}
.admin-tabs button:hover { color: var(--fg); }
.admin-tabs button.active { color: var(--fg); border-bottom-color: var(--accent); }
.panel { display: none; }
.panel.active { display: block; animation: fade-in var(--dur) ease-out; }

/* ---------- 概览 ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat { padding: 16px; border-radius: var(--r-md); background: var(--surface-2); }
.stat-k { color: var(--fg-muted); font-size: var(--fs-sm); font-weight: 650; }
.stat-v { margin-top: 8px; font-family: var(--font-display); font-size: 28px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-v small { margin-left: 2px; font-size: 15px; font-weight: 700; }
.stat-s { margin-top: 6px; color: var(--fg-faint); font-size: var(--fs-sm); }
.overview-cols { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 12px; }
.box { min-width: 0; padding: 16px; border-radius: var(--r-md); background: var(--surface-2); }
.box h4 { margin-bottom: 12px; font-size: var(--fs-md); }
.bar-row { display: grid; grid-template-columns: minmax(0, 90px) minmax(0, 1fr) 72px; align-items: center; gap: 10px; padding: 6px 0; font-size: var(--fs-sm); }
.bar-row > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 8px; overflow: hidden; border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.08); }
.bar-track i { display: block; height: 100%; border-radius: var(--r-pill); background: var(--accent); }
.bar-row .bar-n { color: var(--fg-muted); text-align: right; font-variant-numeric: tabular-nums; }
.act { display: flex; gap: 10px; padding: 9px 0; font-size: var(--fs-md); }
.act + .act { border-top: 1px solid var(--line); }
.act time { flex: none; min-width: 74px; color: var(--fg-faint); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.act span { min-width: 0; overflow-wrap: anywhere; word-break: normal; }
.act b { font-weight: 600; }
.box-empty { color: var(--fg-faint); font-size: var(--fs-md); }
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-cols { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 工具条 / 提示 / 表单 ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.toolbar select, .toolbar input { height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background-color: var(--surface-2); font-size: var(--fs-md); }
.toolbar select { height: auto; min-height: 36px; padding: 7px 10px; }
.hint-box {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(142, 149, 255, 0.2);
  border-radius: var(--r-md);
  background: rgba(142, 149, 255, 0.07);
  color: var(--fg-muted);
  font-size: var(--fs-sm);
  line-height: 1.55;
}
.discover-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.discover-list:empty { display: none; }
.discover-chip {
  padding: 6px 12px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--cyan);
  font-size: var(--fs-sm);
  cursor: pointer;
}
.discover-chip:hover { background: rgba(103, 232, 249, 0.08); border-color: rgba(103, 232, 249, 0.4); }
.backup-section { margin-bottom: 14px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
.backup-section-title { margin-bottom: 6px; font-weight: 800; }
.backup-section-desc { margin-bottom: 12px; color: var(--fg-muted); font-size: var(--fs-md); line-height: 1.6; }
.backup-section-danger { border-color: rgba(251, 113, 133, 0.4); }
.backup-section-danger .backup-section-title { color: var(--danger); }
.pagination { display: flex; align-items: center; gap: 8px; margin-top: 14px; color: var(--fg-muted); font-size: var(--fs-md); }
.share-detail-card { margin-top: 18px; padding: 12px 14px 4px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-1); }
.admin-toast {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 120;
  max-width: min(90%, 380px);
  padding: 12px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--glass);
  color: #fff;
  font-size: var(--fs-md);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity var(--dur), transform var(--dur);
}
.admin-toast.show { opacity: 1; transform: none; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-1); }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-md); }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { position: sticky; top: 0; background: var(--surface-2); color: var(--fg-muted); font-weight: 650; }
tbody tr { transition: background var(--dur-fast); }
tbody tr:hover { background: rgba(255, 255, 255, 0.03); }
tr:last-child td { border-bottom: 0; }
td.wrap { max-width: 280px; white-space: normal; overflow-wrap: anywhere; word-break: normal; }
td.table-empty { padding: 28px 12px; color: var(--fg-muted); text-align: center; white-space: normal; }
td .btn-sm { height: 28px; padding: 0 10px; font-size: var(--fs-sm); border-radius: 7px; }
td.cell-actions { white-space: nowrap; }
td.cell-actions .btn + .btn { margin-left: 6px; }
td.cell-stack b, td.cell-stack span, td.cell-stack small { display: block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
td.cell-stack b { font-weight: 650; }
td.cell-stack small { margin-top: 2px; color: var(--fg-muted); font-size: var(--fs-xs); }

@media (max-width: 640px) {
  .admin-toast { position: fixed; right: 12px; left: 12px; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 12px); max-width: none; }
  /* 表格转卡片:每行一张卡,字段名来自 td[data-label] */
  #page-admin .table-wrap { overflow: visible; border: 0; background: transparent; }
  #page-admin .table-wrap table,
  #page-admin .table-wrap tbody,
  #page-admin .table-wrap tr,
  #page-admin .table-wrap td { display: block; width: 100%; }
  #page-admin .table-wrap thead { display: none; }
  #page-admin .table-wrap tr { margin-bottom: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
  #page-admin .table-wrap td {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    max-width: none;
    padding: 4px 0;
    border: 0;
    text-align: right;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
  }
  #page-admin .table-wrap td[data-label]::before { content: attr(data-label); flex: none; color: var(--fg-muted); font-size: var(--fs-sm); text-align: left; }
  #page-admin .table-wrap td.cell-stack { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; column-gap: 12px; }
  #page-admin .table-wrap td.cell-stack::before { grid-row: span 2; }
  #page-admin .table-wrap td.cell-stack b,
  #page-admin .table-wrap td.cell-stack span,
  #page-admin .table-wrap td.cell-stack small { grid-column: 2; max-width: 100%; white-space: normal; }
  #page-admin .table-wrap td.cell-actions { flex-wrap: wrap; justify-content: flex-start; gap: 6px; margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
  #page-admin .table-wrap td.cell-actions::before { display: none; }
  #page-admin .table-wrap td.cell-actions .btn + .btn { margin-left: 0; }
  #page-admin .table-wrap td.table-empty { justify-content: center; text-align: center; }
  #page-admin .table-wrap tbody tr:hover { background: var(--surface-2); }
  .stat-v { font-size: 24px; }
}

/* ==== 80-share.css ==== */
/* 80-share.css — 公开分享页 */
.share-page {
  align-items: stretch;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  background:
    radial-gradient(ellipse at 20% 0%, rgba(109, 116, 246, 0.2), transparent 45%),
    radial-gradient(ellipse at 90% 100%, rgba(192, 132, 252, 0.1), transparent 42%),
    var(--bg);
}
.share-shell { display: flex; flex: 1; flex-direction: column; gap: 16px; width: min(720px, 100%); min-height: 0; margin: 0 auto; }
.share-video-wrap {
  position: relative;
  flex: 1;
  min-height: min(62vh, 520px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #000;
}
.share-video-wrap::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 68px;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.48), transparent);
}
.share-video-wrap video { position: relative; z-index: 0; display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
#share-image { width: 100%; height: 100%; object-fit: contain; }
.share-meta { padding: 4px 2px 8px; }
.share-meta h1 { margin-bottom: 6px; font-size: var(--fs-xl); font-weight: 700; word-break: break-word; }
.share-meta p { margin-bottom: 14px; color: var(--fg-muted); font-size: var(--fs-md); }
.share-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.album-page-indicator {
  position: absolute;
  top: 12px;
  left: 50%;
  z-index: 8;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: var(--fs-sm);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  transform: translateX(-50%);
  pointer-events: none;
}
.share-password-card {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  background: rgba(5, 5, 8, 0.82);
}
.share-password-card input {
  width: min(280px, 80vw);
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #111;
}
.share-password-error { min-height: 1.2em; color: var(--danger); font-size: var(--fs-md); }
@media (max-width: 640px) {
  .share-page { padding: 10px; }
  .share-video-wrap { min-height: 48vh; border-radius: 14px; }
  .share-meta h1 { font-size: var(--fs-lg); }
  .share-actions .btn { min-height: 40px; padding: 0 14px; }
}

/* ==== 90-motion.css ==== */
/* 90-motion.css — 尊重系统「减少动态效果」设置 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}
