/* ==========================================================================
   加密服务器面板 · 统一设计系统样式 (从 2014 行重构优化)
   --------------------------------------------------------------------------
   优化要点：
   1. 统一 Design Token（颜色/间距/圆角/阴影/动效/z-index 层级）
   2. 全部组件改为 Flex / Grid，移除冗余旧布局
   3. 按钮/输入/弹窗四态微交互：hover / focus-visible / active / loading(disabled)
   4. 表单校验视觉提示：错误信息紧贴输入框，颜色 + 图标双通道（WCAG 2.1 AA）
   5. WCAG 2.1 AA 对比度：主/辅色按钮背景改为深色变体，白字 ≥ 4.5:1
   6. 响应式断点修复：1440 / 1024 / 768 / 600 / 480（导航折叠 + 表格横向滚动）
   7. 性能：首屏内联占位、懒加载图占位、content-visibility、reduced-motion
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Token 层
   -------------------------------------------------------------------------- */
:root {
  /* 颜色 —— 背景 / 表面 */
  --bg: #0f1115;
  --surface: #181b22;
  --surface-2: #21252e;
  --surface-3: #2b303b;
  --border: #2a2f3a;
  --border-strong: #3a4150;

  /* 颜色 —— 文本（对比度均符合 WCAG AA） */
  --text: #e6e8ec;
  --muted: #98a0af;              /* 在 surface-2 上也 ≥ 4.5:1 */
  --faint:  #6b7280;

  /* 颜色 —— 主/辅（链接、描边用亮色；按钮底色用深色变体以保证白字 AA） */
  --accent: #5a97ff;             /* 文本/链接/边框：在深底上 ≈ 5.1:1 */
  --accent-hover: #3f7ff0;
  --accent-btn: #2f6ee0;         /* 主按钮底色 + 白字 ≈ 4.75:1（AA 通过） */
  --accent-btn-hover: #2a63c8;

  --ok: #3ddc84;                 /* 成功文本 */
  --ok-btn: #1f9d5f;             /* 成功按钮底色 + 白字（AA） */
  --warn: #ffb454;               /* 警告文本 */
  --warn-strong: #f5a623;
  --danger: #ff5d5d;             /* 错误文本 */
  --danger-btn: #cf3535;         /* 危险按钮底色 + 白字 ≈ 4.6:1（AA） */
  --danger-btn-hover: #b92c2c;
  --focus: #6fa8ff;              /* focus 可见环 */

  /* 颜色 —— 语义（半透明叠层） */
  --accent-08: rgba(90,151,255,0.08);
  --accent-12: rgba(90,151,255,0.12);
  --accent-32: rgba(90,151,255,0.32);
  --ok-12: rgba(61,220,132,0.12);
  --ok-15: rgba(61,220,132,0.15);
  --warn-08: rgba(255,180,84,0.08);
  --warn-12: rgba(255,180,84,0.12);
  --danger-08: rgba(255,93,93,0.08);
  --danger-12: rgba(255,93,93,0.12);
  --danger-15: rgba(255,93,93,0.15);

  /* 圆角 */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-round: 999px;

  /* 阴影 */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.35);
  --shadow-sm: 0 2px 6px rgba(0,0,0,0.30);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.40);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.50);

  /* 间距（4px 基准） */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;

  /* 动效 */
  --ease: cubic-bezier(.22,.61,.36,1);
  --t-fast: 120ms var(--ease);
  --t-base: 200ms var(--ease);
  --t-slow: 300ms var(--ease);

  /* z-index 层级 */
  --z-topbar: 10;
  --z-settings-nav: 6;
  --z-reader: 50;
  --z-detail: 60;
  --z-login: 100;
  --z-toast: 200;
  --z-popup: 1000;      /* batch-progress / catalog */
  --z-lightbox: 2005;   /* reader zoom / manga-info */

  /* 字体 */
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "SF Mono", "Fira Code", monospace;
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;

  /* 布局 */
  --nav-height: 56px;
  --content-max: 1280px;
}

/* 动效精简模式：尊重系统“减少动态效果”偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   2. 基础 / Reset
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

a { color: var(--accent); }

/* 键盘焦点可见性（无障碍） */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}
:focus:not(:focus-visible) { outline: none; }

::selection { background: var(--accent-32); }

/* --------------------------------------------------------------------------
   3. 通用表单控件（含四态 + 校验态）
   -------------------------------------------------------------------------- */
button {
  font: inherit;
  cursor: pointer;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  transition: background var(--t-fast), border-color var(--t-fast),
              color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* 悬停 */
button:hover { border-color: var(--accent); }
/* 按下 */
button:active:not(:disabled) { transform: translateY(1px); }
/* 禁用/加载 */
button:disabled,
button.is-loading {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* —— 按钮变体 —— */
button.primary {
  background: var(--accent-btn);
  border-color: var(--accent-btn);
  color: #fff;
  box-shadow: var(--shadow-xs);
}
button.primary:hover { background: var(--accent-btn-hover); border-color: var(--accent-btn-hover); }
button.primary:active { background: var(--accent-btn-hover); }

button.danger {
  color: #fff;
  background: var(--danger-btn);
  border-color: var(--danger-btn);
}
button.danger:hover { background: var(--danger-btn-hover); border-color: var(--danger-btn-hover); }

button.warn {
  color: var(--warn);
  border-color: var(--warn-32);
  background: transparent;
}
button.warn:hover { background: var(--warn-08); border-color: var(--warn); color: #ffc06b; }

button.ghost { color: var(--muted); background: transparent; }
button.ghost:hover { color: var(--text); background: var(--surface-2); }

button.attention {
  animation: btnPulse 1.2s ease-in-out 3;
  border-color: var(--warn);
  color: var(--warn);
}
@keyframes btnPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(255,180,84,0); }
  50%     { box-shadow: 0 0 0 5px rgba(255,180,84,0.18); }
}

/* 加载态：按钮内旋转圆点（配合 JS 添加 .is-loading） */
button.is-loading,
.tb-btn.is-loading {
  position: relative;
  color: transparent !important;
}
button.is-loading::after,
.tb-btn.is-loading::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 14px; height: 14px;
  margin: -7px 0 0 -7px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

/* —— 输入 / 下拉 —— */
input, select, textarea {
  font: inherit;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:hover, select:hover, textarea:hover { border-color: var(--border-strong); }
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-12);
}
input:disabled, select:disabled { opacity: 0.55; cursor: not-allowed; }

/* 校验错误态：边框 + 右侧图标，不依赖单一红色 */
input.is-invalid, select.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-12);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ff5d5d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='8' x2='12' y2='12'/%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 16px;
  padding-right: 36px;
}

/* 输入错误提示：紧贴输入框下方，图标 + 文字双通道 */
.field-error {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 5px;
  font-size: 12px;
  color: var(--danger);
}
.field-error::before {
  content: "⚠";
  flex: 0 0 auto;
  font-size: 12px;
}
.field-error:empty { display: none; }

/* 通用错误文本（登录等） */
.err {
  color: var(--danger);
  font-size: 13px;
  min-height: 18px;
  margin-top: 8px;
}

/* --------------------------------------------------------------------------
   4. 通用组件：徽章 / 提示 / 加载骨架
   -------------------------------------------------------------------------- */
.badge {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: var(--radius-round);
  background: var(--surface-2);
  color: var(--muted);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translate(-50%, 12px);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  opacity: 0;
  transition: opacity var(--t-base), transform var(--t-base);
  pointer-events: none;
  font-size: 13px;
  z-index: var(--z-toast);
  box-shadow: var(--shadow-md);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.info { border-color: var(--muted); color: var(--text); }
.toast.ok { border-color: var(--ok); color: var(--ok); }
.toast.err { border-color: var(--danger); color: var(--danger); }
.toast.warn { border-color: var(--warn); color: var(--warn); }

/* 加载指示器 */
.loading {
  text-align: center;
  color: var(--muted);
  padding: 40px 20px;
  font-size: 13px;
}
.loading::after {
  content: "";
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid var(--muted);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin-left: 8px;
  vertical-align: -3px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 空状态 */
.empty {
  text-align: center;
  color: var(--muted);
  padding: 60px 20px;
  font-size: 13px;
}
.empty::before {
  content: "∅";
  display: block;
  font-size: 32px;
  margin-bottom: 8px;
  opacity: .4;
}

/* --------------------------------------------------------------------------
   5. 通用布局：容器 / 网格 / 分页 / 列表(表格横向滚动)
   -------------------------------------------------------------------------- */
main {
  padding: var(--space-5);
  max-width: var(--content-max);
  margin: 0 auto;
}

/* 网格：图片卡 / 封面卡 */
.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

/* 表格（横向滚动容器，防止窄屏溢出） */
.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.list {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px; /* 保证列内容不被压扁，超出时由容器横向滚动 */
}
.list th, .list td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  white-space: nowrap;
}
.list th { color: var(--muted); font-weight: 500; }
.list tr:hover td { background: var(--surface); }
.list td button {
  cursor: pointer;
  border: none;
  border-radius: var(--radius-xs);
  font-size: 12px;
  padding: 5px 12px;
  margin-right: 6px;
  transition: all var(--t-fast);
  background: transparent;
  color: var(--accent);
}
.list td button:hover { background: var(--accent-08); }

/* 加密状态徽章 */
.enc-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  font-size: 11px;
  font-weight: 600;
}
.enc-badge.done { background: var(--ok-15); color: var(--ok); }
.enc-badge.pending { background: var(--warn-12); color: var(--warn); }

/* 分页 */
.dl-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
  padding: 12px 0;
}
.dl-pagination button { padding: 8px 18px; }
.dl-pagination button:disabled { opacity: .4; cursor: default; }
#dlPageInfo { font-size: 13px; color: var(--muted); min-width: 80px; text-align: center; }

/* --------------------------------------------------------------------------
   6. 登录遮罩
   -------------------------------------------------------------------------- */
.login-mask {
  position: fixed;
  inset: 0;
  z-index: var(--z-login);
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(1200px 600px at 50% -10%, #1b2433, var(--bg));
  padding: 20px;
}
.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  width: 340px;
  max-width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: loginIn var(--t-slow);
}
@keyframes loginIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.login-card h1 { margin: 0 0 6px; font-size: 22px; }
.login-card .sub { color: var(--muted); margin: 0 0 20px; font-size: 13px; }
.login-card input { width: 100%; margin-bottom: 14px; }
.login-card button { width: 100%; background: var(--accent-btn); border-color: var(--accent-btn); color: #fff; }

/* --------------------------------------------------------------------------
   7. 顶栏（导航折叠自适应，断点见响应式层）
   -------------------------------------------------------------------------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: var(--z-topbar);
  min-height: var(--nav-height);
}
.brand {
  font-weight: 600;
  display: flex;
  align-items: center;
  white-space: nowrap;
}
.ver-badge {
  font-size: 11px;
  background: var(--accent-btn);
  color: #fff;
  padding: 1px 10px;
  border-radius: var(--radius-round);
  margin-left: 8px;
  cursor: pointer;
  transition: opacity var(--t-fast);
}
.ver-badge:hover { opacity: .8; }
.status {
  font-size: 13px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.status::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--muted);
  flex: 0 0 auto;
}
.status.on { color: var(--ok); }
.status.on::before { background: var(--ok); box-shadow: 0 0 6px var(--ok); }
.status.off { color: var(--danger); }
.status.off::before { background: var(--danger); box-shadow: 0 0 6px var(--danger); }

.tabs {
  display: flex;
  gap: 4px;
  margin-left: auto;
  align-items: center;
}
.tab {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  white-space: nowrap;
}
.tab:hover { color: var(--text); background: var(--surface-2); }
.tab.active {
  background: var(--accent-12);
  border-color: var(--accent-32);
  color: var(--accent);
}
.logout { margin-left: 10px; }

/* --------------------------------------------------------------------------
   8. 面板切页 & 通用工具条
   -------------------------------------------------------------------------- */
.panel-tab { display: none; }
.panel-tab.active { display: block; }

.searchbar, .toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.searchbar input, .toolbar input { flex: 1; min-width: 200px; }
.searchbar select { padding: 9px 10px; }

/* 直接输入 ID 行 */
.direct-dl-row { display: flex; gap: 8px; margin-bottom: 18px; }
.direct-dl-row input { flex: 1; }
.direct-dl-row button { white-space: nowrap; }
.auto-enc-label {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}
.auto-enc-label input { width: auto; flex: none; cursor: pointer; }
#tab-settings .auto-enc-label { white-space: normal; flex-wrap: wrap; }

/* 活跃任务概览 */
.active-tasks-bar {
  margin-bottom: 16px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.active-tasks-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.active-tasks-title { font-size: 13px; font-weight: 600; color: var(--accent); }
.active-tasks-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 12px;
}
.active-tasks-item:last-child { border-bottom: none; }
.at-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.at-id { font-size: 10px; color: var(--muted); font-family: var(--font-mono); }
.at-bar { flex: 1; height: 4px; background: var(--surface-2); border-radius: 2px; overflow: hidden; min-width: 60px; }
.at-bar-fill { height: 100%; border-radius: 2px; transition: width var(--t-slow); }
.at-bar-fill.running { background: linear-gradient(90deg, var(--accent), #6fa8ff); }
.at-bar-fill.pending { background: var(--warn); }
.at-pct { font-size: 10px; color: var(--muted); min-width: 28px; text-align: right; font-family: var(--font-mono); }
.at-speed { font-size: 10px; color: var(--accent); min-width: 80px; text-align: right; font-family: var(--font-mono); }
.at-actions { display: flex; gap: 4px; flex-shrink: 0; }
.at-actions button { font-size: 10px; padding: 3px 8px; border-radius: var(--radius-xs); }

/* --------------------------------------------------------------------------
   9. 图片卡 / 封面卡（懒加载占位 + 性能优化）
   -------------------------------------------------------------------------- */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--t-base), border-color var(--t-base), box-shadow var(--t-base);
}
.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.card .thumb {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  background: var(--surface-2);
  display: block;
  transition: opacity .4s ease;
}
/* 仅对真实<img>做懒加载骨架闪炼；非图片占位(如 .placeholder 的 div)保持静态，避免无谓重绘 */
.card img.thumb {
  content-visibility: auto;
  contain-intrinsic-size: auto 300px;
  animation: thumbShimmer 1.4s ease-in-out infinite;
}
.card img.thumb.loaded, .card img.thumb[data-loaded="1"] { animation: none; background: var(--surface-2); }
@keyframes thumbShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.card .meta { padding: 10px 12px; min-height: 80px; display: flex; flex-direction: column; }
.card .title {
  font-size: 13px;
  line-height: 1.4;
  max-height: 2.8em;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-all;
}
.card .info {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  overflow: hidden;
  line-height: 1.5;
  word-break: break-all;
}
.card .actions {
  display: flex;
  gap: 4px;
  padding: 0 10px 10px;
  flex-wrap: wrap;
}
.card .actions button {
  flex: 1;
  padding: 4px 5px;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* 卡片任务 / 状态类 */
.card.has-task { border-left: 3px solid var(--accent); }
.card.has-task.success { border-left-color: var(--ok); }
.card.has-task.error { border-left-color: var(--danger); }
.card.has-task.cancelled { border-left-color: var(--muted); }
.card.has-task.pending { border-left-color: var(--warn); }

.card-task-status { padding: 0 12px 6px; display: flex; align-items: center; gap: 8px; font-size: 11px; }
.card-task-status .task-badge {
  font-size: 10px; padding: 2px 8px; border-radius: var(--radius-round);
  font-weight: 600; flex-shrink: 0;
  background: var(--surface-2); color: var(--muted);
}
.card-task-status .task-badge.running { background: var(--accent-12); color: var(--accent); }
.card-task-status .task-badge.success { background: var(--ok-15); color: var(--ok); }
.card-task-status .task-badge.error { background: var(--danger-15); color: var(--danger); }
.card-task-status .task-badge.cancelled { color: var(--muted); }
.card-task-status .task-badge.pending { background: var(--warn-12); color: var(--warn); }

.card-progress-bar { flex: 1; height: 3px; background: var(--surface-2); border-radius: 2px; overflow: hidden; }
.card-progress-fill { height: 100%; border-radius: 2px; transition: width var(--t-slow); background: var(--muted); }
.card-progress-fill.running { background: linear-gradient(90deg, var(--accent), #6fa8ff); }
.card-progress-fill.success { background: var(--ok); }
.card-progress-fill.error { background: var(--danger); }
.card-progress-fill.pending { background: var(--warn); }
.card-progress-fill.cancelled { background: var(--muted); }
.card-progress-text {
  font-size: 10px; color: var(--muted); min-width: 28px; text-align: right;
  font-family: var(--font-mono);
}
.card-speed {
  padding: 2px 12px 4px;
  font-size: 10px;
  color: var(--accent);
  font-family: var(--font-mono);
}

/* 排行榜排名徽章 */
.card-rank {
  position: absolute;
  top: 6px; left: 8px;
  font-size: 14px; font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  z-index: 2;
  pointer-events: none;
}
.card-tags { display: flex; gap: 3px; flex-wrap: wrap; margin-top: 5px; }
.card-tag {
  font-size: 10px; background: var(--accent-12);
  color: var(--accent); padding: 1px 6px;
  border-radius: var(--radius-xs); white-space: nowrap;
}
.card-author {
  font-size: 11px; color: var(--muted); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card-badge { display: inline-block; font-size: 10px; padding: 1px 8px; border-radius: var(--radius-round); margin-top: 4px; font-weight: 600; }
.card-badge.enc { background: var(--ok-15); color: var(--ok); }
.card-badge.plain { background: var(--accent-12); color: var(--accent); }
.card-badge.warn { background: var(--warn-15); color: var(--warn); }
.card-stale { opacity: .75; border-style: dashed; }
.card-stale:hover { opacity: 1; }
.card-stats { display: flex; gap: 6px; margin-top: 6px; padding: 4px 0; border-top: 1px solid var(--border); font-size: 11px; color: var(--muted); }
.card-stat { display: flex; align-items: center; gap: 2px; }
.card-stat .cs-icon { font-size: 12px; }
.card-stat .cs-val { font-weight: 500; }

/* 卡内行内小按钮 */
.task-btn-inline {
  font-size: 11px;
  padding: 5px 8px;
  border-radius: var(--radius-xs);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: all var(--t-fast);
  flex-shrink: 0;
}
.task-btn-inline.cancel { color: var(--warn); white-space: nowrap; }
.task-btn-inline.cancel:hover { background: var(--warn-08); border-color: var(--warn-12); }
.task-btn-inline.retry { color: var(--accent); white-space: nowrap; }
.task-btn-inline.retry:hover { background: var(--accent-08); border-color: var(--accent-12); }
.task-btn-inline.redownload { color: var(--ok); white-space: nowrap; }
.task-btn-inline.redownload:hover { background: var(--ok-12); border-color: var(--ok-15); }

/* --------------------------------------------------------------------------
   10. 排行 / 分类 / 标签 / 作者浏览
   -------------------------------------------------------------------------- */
.ranking-quick-links {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.rql-label { font-size: 12px; color: var(--muted); font-weight: 500; }
.rql-btn {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  transition: all var(--t-fast);
}
.rql-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-08); }

.browse-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 3px;
  width: fit-content;
}
.browse-sub-tab {
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 20px;
  font-size: 13px;
  color: var(--muted);
  transition: all var(--t-base);
  white-space: nowrap;
}
.browse-sub-tab:hover { color: var(--text); background: var(--surface-2); }
.browse-sub-tab.active { background: var(--accent-btn); color: #fff; font-weight: 500; box-shadow: var(--shadow-xs); }
.browse-sub-panel { display: none; }
.browse-sub-panel.active { display: block; }

.browse-toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
  align-items: flex-end;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
}
.browse-filter-group { display: flex; flex-direction: column; gap: 4px; }
.browse-filter-group label {
  font-size: 11px; color: var(--muted); font-weight: 500;
  text-transform: uppercase; letter-spacing: .5px;
}
.browse-filter-group select { padding: 7px 10px; font-size: 13px; min-width: 110px; }
.browse-toolbar button.primary { align-self: flex-end; padding: 8px 16px; }

.browse-sub-cats { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.browse-sub-cats .sub-cat-btn {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-xs); padding: 5px 12px; font-size: 12px;
  color: var(--muted); transition: all var(--t-fast);
}
.browse-sub-cats .sub-cat-btn:hover { border-color: var(--accent); color: var(--text); }
.browse-sub-cats .sub-cat-btn.active { background: var(--accent-btn); border-color: var(--accent-btn); color: #fff; }

.filter-pills {
  display: flex;
  gap: 3px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px;
}
.fpill {
  background: transparent;
  border: none;
  border-radius: 7px;
  padding: 6px 14px;
  font-size: 12px;
  color: var(--muted);
  transition: all var(--t-base);
  white-space: nowrap;
  cursor: pointer;
}
.fpill:hover { color: var(--text); background: var(--surface); }
.fpill.active { background: var(--accent-btn); color: #fff; font-weight: 500; box-shadow: var(--shadow-xs); }

.result-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 8px;
}
.result-summary .rs-count { font-weight: 600; color: var(--accent); }
.result-summary .rs-actions { display: flex; gap: 6px; }
.result-summary .rs-btn {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-xs); padding: 4px 10px; font-size: 11px;
  color: var(--muted); cursor: pointer; transition: all var(--t-fast);
}
.result-summary .rs-btn:hover { border-color: var(--accent); color: var(--text); }

.browse-page-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
  padding: 12px 0;
  flex-wrap: wrap;
}
.browse-page-nav button { min-width: 36px; height: 34px; padding: 0 8px; border-radius: 7px; font-size: 13px; }
.browse-page-nav button.active { background: var(--accent-btn); border-color: var(--accent-btn); color: #fff; font-weight: 600; }
.browse-page-nav .pn-arrow { font-size: 15px; }
.browse-page-nav .pn-dots { color: var(--muted); padding: 0 2px; font-size: 13px; }
.browse-page-nav .pn-goto { display: flex; gap: 4px; align-items: center; margin-left: 12px; }
.browse-page-nav .pn-goto input { width: 48px; padding: 5px 8px; font-size: 12px; text-align: center; border-radius: var(--radius-xs); }
.browse-page-nav .pn-goto button { font-size: 11px; padding: 5px 10px; }

/* --------------------------------------------------------------------------
   11. 任务管理
   -------------------------------------------------------------------------- */
.task-stats {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.stat-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 120px;
  flex: 1;
  transition: border-color var(--t-base), transform var(--t-base);
  position: relative;
  overflow: hidden;
}
.stat-item::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--border);
  transition: background var(--t-base);
}
.stat-item:hover { border-color: var(--accent); transform: translateY(-1px); }
.stat-item.running::before { background: var(--accent); }
.stat-item.completed::before { background: var(--ok); }
.stat-item.failed::before { background: var(--danger); }
.stat-item.queued::before { background: var(--warn); }
.stat-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  background: var(--surface-2);
  flex-shrink: 0;
}
.stat-item.running .stat-icon { background: var(--accent-12); }
.stat-item.completed .stat-icon { background: var(--ok-12); }
.stat-item.failed .stat-icon { background: var(--danger-12); }
.stat-item.queued .stat-icon { background: var(--warn-12); }
.stat-body { display: flex; flex-direction: column; }
.stat-num { font-size: 22px; font-weight: 700; line-height: 1.1; color: var(--text); }
.stat-label { font-size: 11px; color: var(--muted); margin-top: 2px; letter-spacing: .3px; }
.stat-item.running .stat-num { color: var(--accent); }
.stat-item.completed .stat-num { color: var(--ok); }
.stat-item.failed .stat-num { color: var(--danger); }
.stat-item.queued .stat-num { color: var(--warn); }

.task-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.task-filter-pills {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 3px;
}
.pill {
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  padding: 7px 14px;
  font-size: 12px;
  color: var(--muted);
  transition: all var(--t-base);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pill:hover { color: var(--text); background: var(--surface-2); }
.pill.active { background: var(--accent-btn); color: #fff; font-weight: 500; box-shadow: var(--shadow-xs); }
.pill-count {
  font-size: 11px;
  min-width: 18px;
  padding: 0 5px;
  height: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-round);
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 600;
}
.pill.active .pill-count { background: rgba(255,255,255,0.22); color: #fff; }
.task-toolbar-actions { display: flex; gap: 6px; align-items: center; }
.task-summary { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; font-size: 12px; color: var(--muted); }
.task-sum-chip {
  padding: 2px 10px;
  border-radius: var(--radius-round);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
}
.task-sum-chip.muted { opacity: .6; border-style: dashed; }

.tb-btn {
  width: 34px; height: 34px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 15px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all var(--t-fast);
}
.tb-btn:hover { border-color: var(--accent); color: var(--accent); }
.tb-btn.danger { width: auto; padding: 0 12px; font-size: 12px; gap: 4px; color: var(--danger); border-color: transparent; }
.tb-btn.danger:hover { border-color: var(--danger); background: var(--danger-08); }
.tb-btn.text { width: auto; height: 32px; padding: 0 12px; font-size: 12px; gap: 4px; color: var(--accent); }
.tb-btn.text:hover { border-color: var(--accent); }

.task-search-input {
  height: 32px;
  width: 160px;
  padding: 0 10px;
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
}
.task-search-input:focus { border-color: var(--accent); outline: none; }

.task-list { display: flex; flex-direction: column; gap: 8px; }
.task-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  transition: border-color var(--t-base), box-shadow var(--t-base);
  position: relative;
}
.task-item:hover { border-color: var(--accent-32); box-shadow: var(--shadow-sm); }
.task-item.running { border-left: 3px solid var(--accent); }
.task-item.error { border-left: 3px solid var(--danger); }
.task-item.success, .task-item.done { border-left: 3px solid var(--ok); }
.task-item.cancelled { border-left: 3px solid var(--muted); opacity: .65; }
.task-item.pending { border-left: 3px solid var(--warn); }

.task-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 10px; }
.task-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; flex: 1; }
.task-name {
  font-weight: 500; font-size: 13px;
  max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.task-id {
  font-size: 11px; color: var(--muted);
  background: var(--surface-2); padding: 1px 6px; border-radius: var(--radius-xs);
  font-family: var(--font-mono);
}
.task-badge {
  font-size: 11px; padding: 3px 10px; border-radius: var(--radius-round);
  font-weight: 500; letter-spacing: .2px;
  background: var(--surface-2); color: var(--muted);
}
.task-badge.running { background: var(--accent-12); color: var(--accent); }
.task-badge.success, .task-badge.done { background: var(--ok-12); color: var(--ok); }
.task-badge.error { background: var(--danger-12); color: var(--danger); }
.task-badge.cancelled { background: var(--surface-2); color: var(--muted); }
.task-badge.pending { background: var(--warn-12); color: var(--warn); }
.task-source {
  font-size: 10px; padding: 2px 7px; border-radius: var(--radius-xs);
  background: var(--surface-2); color: var(--muted);
  border: 1px solid var(--border); white-space: nowrap;
}
.task-retry-info { font-size: 11px; color: var(--faint); font-weight: 600; white-space: nowrap; }
.task-prev-status { font-size: 11px; color: var(--muted); white-space: nowrap; }

.task-actions { display: flex; gap: 4px; flex-shrink: 0; }
.task-btn {
  font-size: 11px; padding: 4px 10px; border-radius: var(--radius-xs);
  border: 1px solid transparent; background: transparent;
  transition: all var(--t-fast);
}
.task-btn.cancel { color: var(--warn); }
.task-btn.cancel:hover { background: var(--warn-08); border-color: var(--warn-12); }
.task-btn.retry { color: var(--accent); }
.task-btn.retry:hover { background: var(--accent-08); border-color: var(--accent-12); }
.task-btn.delete { color: var(--muted); }
.task-btn.delete:hover { color: var(--danger); background: var(--danger-08); border-color: var(--danger-12); }
.task-btn.redownload { color: var(--ok); }
.task-btn.redownload:hover { background: var(--ok-12); border-color: var(--ok-15); }
.task-btn.chapters-toggle { color: var(--muted); }
.task-btn.chapters-toggle:hover { color: var(--text); background: var(--surface-2); border-color: var(--border); }
.task-btn.verify { color: #7c5cff; }
.task-btn.verify:hover { background: rgba(124,92,255,0.10); border-color: rgba(124,92,255,0.35); }
/* 卡住任务的强制重试按钮（琉珀色 + 脉冲提醒） */
.task-btn.retry.stuck, .task-btn-inline.retry.stuck {
  color: #ff9800;
  border-color: rgba(255,152,0,0.4);
  background: rgba(255,152,0,0.08);
  animation: stuckPulse 1.6s ease-in-out infinite;
}
.task-btn.retry.stuck:hover, .task-btn-inline.retry.stuck:hover {
  background: rgba(255,152,0,0.18); border-color: rgba(255,152,0,0.6);
}
@keyframes stuckPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(255,152,0,0); }
  50%     { box-shadow: 0 0 6px 1px rgba(255,152,0,0.35); }
}

.task-verify {
  font-size: 11px; padding: 5px 9px; border-radius: var(--radius-xs); margin-top: 6px;
  line-height: 1.5; word-break: break-all;
}
.task-verify.verify-ok { color: var(--ok); background: var(--ok-12); border: 1px solid var(--ok-15); }
.task-verify.verify-warn { color: var(--warn); background: var(--warn-08); border: 1px solid var(--warn-12); }

.task-progress { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.progress-bar { flex: 1; height: 4px; background: var(--surface-2); border-radius: 2px; overflow: hidden; }
.progress-fill {
  height: 100%;
  border-radius: 2px;
  transition: width var(--t-slow);
  background: var(--muted);
}
.progress-fill.running {
  background: linear-gradient(90deg, var(--accent), #6fa8ff);
  animation: progressPulse 2s ease-in-out infinite;
}
@keyframes progressPulse { 0%,100% { opacity: 1; } 50% { opacity: .7; } }
.progress-fill.success, .progress-fill.done { background: var(--ok); }
.progress-fill.error { background: var(--danger); }
.progress-fill.pending { background: var(--warn); }
.progress-fill.cancelled { background: var(--muted); }
.progress-text {
  font-size: 11px;
  color: var(--muted);
  min-width: 32px;
  text-align: right;
  font-family: var(--font-mono);
}

.task-info { display: flex; gap: 14px; font-size: 11px; color: var(--muted); }
.task-time { opacity: .7; }
.task-error {
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--danger-08);
  border: 1px solid var(--danger-15);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--danger);
  line-height: 1.5;
}
.task-speed {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 6px;
  padding: 4px 0;
  font-family: var(--font-mono);
}

/* 章节明细 */
.task-chapters-wrap { margin-top: 10px; }
.task-chapters-wrap .task-chapters { display: none; }
.task-chapters-wrap.open .task-chapters { display: block; }
.task-chapters-head { font-size: 12px; color: var(--muted); padding: 2px 0; user-select: none; }
.task-chapters {
  margin-top: 6px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  max-height: 240px;
  overflow-y: auto;
}
.task-chapter {
  display: grid;
  grid-template-columns: 18px 1fr 60px 60px;
  gap: 8px;
  align-items: center;
  padding: 4px 0;
  font-size: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.task-chapter:last-child { border-bottom: none; }
.ch-status { text-align: center; font-size: 11px; font-weight: 600; }
.task-chapter.success .ch-status { color: var(--ok); }
.task-chapter.running .ch-status { color: var(--accent); animation: pulse 1.5s ease-in-out infinite; }
.task-chapter.error .ch-status { color: var(--danger); }
.task-chapter.pending .ch-status { color: var(--muted); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
.ch-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.ch-imgs { font-size: 10px; color: var(--muted); text-align: right; font-family: var(--font-mono); }
.ch-bar { height: 3px; background: var(--surface-2); border-radius: 2px; overflow: hidden; }
.ch-bar-fill { height: 100%; border-radius: 2px; transition: width var(--t-base); }
.ch-bar-fill.running { background: var(--accent); }
.ch-bar-fill.success { background: var(--ok); }
.ch-bar-fill.error { background: var(--danger); }
.ch-bar-fill.pending { background: var(--muted); }
.task-chapters-done { margin-top: 8px; font-size: 12px; color: var(--muted); }

/* --------------------------------------------------------------------------
   12. 漫画架 / 统计卡 / 查重 / 回收站
   -------------------------------------------------------------------------- */
.stats-bar { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.stat-card {
  flex: 1;
  min-width: 150px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  transition: border-color var(--t-base), transform var(--t-base);
}
.stat-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.stat-card .stat-label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.stat-card .stat-value { font-size: 22px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.stat-card .stat-sub { font-size: 11px; color: var(--muted); margin-top: 4px; }
.shelf-actions { padding-top: 2px; }
.shelf-info {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  margin-bottom: 12px; font-size: 13px; color: var(--muted);
}
.shelf-count b { color: var(--text); }
.shelf-chip {
  padding: 2px 10px; border-radius: var(--radius-round); font-size: 12px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--muted);
}
.shelf-chip.muted { opacity: .7; border-style: dashed; }

/* 表/列表中带危险色的行内操作按钮（漫画架清理/删除等） */
.danger-btn {
  background: var(--danger-12);
  color: var(--danger);
  border: 1px solid var(--danger-15);
  padding: 5px 10px !important;
  font-size: 11px !important;
  font-weight: 500;
  border-radius: var(--radius-xs);
}
.danger-btn:hover {
  background: var(--danger-15);
  border-color: var(--danger);
}

.trash-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.trash-head span { font-size: 13px; color: var(--muted); }
.trash-deleted { font-size: 11px; color: var(--danger); margin-top: 2px; }
.dupe-wrap { display: flex; flex-direction: column; gap: 12px; }
.dupe-group { background: var(--surface-2); border-radius: var(--radius-md); padding: 12px 14px; border-left: 3px solid var(--warn-strong); }
.dupe-head { font-size: 13px; color: var(--warn-strong); font-weight: 600; margin-bottom: 8px; }
.dupe-item { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 13px; }
.dupe-src { flex-shrink: 0; padding: 2px 8px; border-radius: var(--radius-xs); font-size: 11px; font-weight: 600; }
.dupe-src.vault { background: var(--ok-15); color: var(--ok-green, #22c55e); }
.dupe-src.plain { background: var(--accent-12); color: #60a5fa; }
.dupe-title { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 批量进度弹窗 */
.batch-progress {
  position: fixed;
  right: 20px; bottom: 20px;
  width: 320px;
  background: var(--surface-2);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  box-shadow: var(--shadow-lg);
  z-index: var(--z-popup);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity var(--t-base), transform var(--t-base);
}
.batch-progress.show { opacity: 1; transform: translateY(0); }
.batch-progress .bp-head { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.batch-progress .bp-bar { height: 8px; border-radius: var(--radius-xs); background: rgba(255,255,255,0.1); overflow: hidden; }
.batch-progress .bp-fill { height: 100%; background: linear-gradient(90deg, #22c55e, #16a34a); border-radius: var(--radius-xs); transition: width var(--t-slow); }
.batch-progress .bp-fill.pulse { animation: bpPulse 1.5s ease-in-out infinite; }
@keyframes bpPulse { 0%,100% { opacity: 1; } 50% { opacity: .7; } }
.batch-progress .bp-sub { font-size: 12px; color: var(--muted); margin-top: 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.batch-progress .bp-eta { font-size: 11px; color: var(--muted); margin-top: 3px; }

/* --------------------------------------------------------------------------
   13. 审计日志
   -------------------------------------------------------------------------- */
.audit-stats { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; min-height: 22px; }
.audit-stat-chip {
  padding: 2px 10px; border-radius: var(--radius-round); font-size: 12px;
  background: var(--surface-2); color: var(--muted);
  border: 1px solid var(--border);
}
.audit-stat-chip.total { color: var(--accent); font-weight: 600; border-color: var(--accent); }
.audit-stat-chip.encrypt { color: #22c55e; }
.audit-stat-chip.restore, .audit-stat-chip.restore_trash { color: #60a5fa; }
.audit-stat-chip.delete, .audit-stat-chip.purge { color: var(--danger); }
.audit-stat-chip.clear_log { color: var(--warn-strong); }

.audit-list { display: flex; flex-direction: column; gap: 6px; }
.audit-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: 13px;
  transition: background var(--t-fast);
}
.audit-item:hover { background: var(--surface-3); }
.audit-badge {
  flex-shrink: 0;
  padding: 2px 10px;
  border-radius: var(--radius-xs);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  margin-top: 1px;
}
.audit-badge.encrypt { background: var(--ok-15); color: #22c55e; }
.audit-badge.restore, .audit-badge.restore_trash { background: var(--accent-12); color: #60a5fa; }
.audit-badge.delete, .audit-badge.purge { background: var(--danger-15); color: var(--danger); }
.audit-badge.clear_log { background: var(--warn-12); color: var(--warn-strong); }
.audit-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.audit-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.audit-item .audit-comic { color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audit-id {
  flex-shrink: 0; font-family: var(--font-mono);
  font-size: 11px; color: var(--muted); background: var(--surface);
  padding: 1px 6px; border-radius: var(--radius-xs);
}
.audit-detail { color: var(--muted); font-size: 12px; line-height: 1.5; word-break: break-all; }
.audit-side { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.audit-item .audit-meta { color: var(--muted); font-size: 12px; }
.audit-item .audit-time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.audit-more { display: flex; justify-content: center; padding: 12px 0 4px; }

/* --------------------------------------------------------------------------
   14. 订阅
   -------------------------------------------------------------------------- */
.grid-subs {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}
.sub-card .info { max-height: 3em; overflow: hidden; }
.sub-card .actions button { font-size: 10px; padding: 4px 4px; }
.sub-card.sub-disabled { opacity: .45; }
.sub-card.sub-disabled:hover { opacity: .7; }
.sub-thumb-empty {
  width: 100%; aspect-ratio: 3/4; display: flex;
  align-items: center; justify-content: center;
  background: #111; color: var(--faint); font-size: 13px;
}
.sub-status { margin-bottom: 12px; font-size: 13px; color: var(--muted); min-height: 18px; }
.sub-status b { color: var(--warn-strong); }
.sub-status .err-text { color: var(--danger); }
.sub-updates { margin: 8px 0 0; padding-left: 18px; }
.sub-updates li { font-size: 12px; color: var(--text); margin: 2px 0; }
.sub-section-title { font-size: 13px; font-weight: 600; color: var(--accent); padding: 4px 0 2px; margin-top: 4px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.sub-main { display: flex; align-items: center; gap: 10px; }
.sub-title { font-size: 14px; color: var(--text); font-weight: 600; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-jmid { font-size: 11px; color: var(--muted); flex-shrink: 0; }
.sub-meta { font-size: 12px; color: var(--muted); }
.sub-actions { display: flex; gap: 8px; margin-top: 4px; }
.sub-actions button { font-size: 12px; padding: 4px 12px; }
/* 旧版 .sub-item 列表样式（保留兼容） */
.sub-item {
  display: flex; align-items: center; padding: 12px 14px;
  border-radius: var(--radius-md); background: var(--surface-2);
  margin-bottom: 8px; transition: background var(--t-fast), border-color var(--t-fast);
  border: 1px solid var(--border);
}
.sub-item:hover { background: var(--surface-3); border-color: var(--accent-32); }
.sub-item.sub-disabled { opacity: .45; }
.sub-cover {
  width: 48px; height: 68px; border-radius: var(--radius-xs); flex-shrink: 0;
  background-size: cover; background-position: center;
  background-color: #111; margin-right: 12px;
}
.sub-badge-off {
  display: inline-block; font-size: 10px; padding: 1px 6px;
  border-radius: var(--radius-sm); background: var(--danger-12); color: var(--danger);
  margin-left: 6px;
}
.sub-checking {
  display: block; padding: 16px; text-align: center;
  color: var(--warn-strong); font-size: 14px;
}

/* --------------------------------------------------------------------------
   15. 继续阅读
   -------------------------------------------------------------------------- */
.continue-reading {
  margin-bottom: 16px;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--accent-08), var(--ok-12));
  border: 1px solid var(--accent-32);
  border-radius: var(--radius-lg);
}
.cr-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
  font-size: 14px; font-weight: 600; color: var(--accent);
}
.cr-header .cr-icon { font-size: 18px; }
.cr-list { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; }
.cr-card {
  flex: 0 0 160px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); overflow: hidden; cursor: pointer;
  transition: transform var(--t-fast), border-color var(--t-fast); position: relative;
}
.cr-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.cr-cover {
  width: 100%; height: 120px; object-fit: cover; background: #111;
  content-visibility: auto; contain-intrinsic-size: auto 120px;
}
.cr-cover-placeholder {
  width: 100%; height: 120px; display: flex; align-items: center;
  justify-content: center; background: #111; color: var(--faint); font-size: 24px;
}
.cr-info { padding: 8px 10px; }
.cr-title {
  font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; color: var(--text); margin-bottom: 4px;
}
.cr-progress { font-size: 11px; color: var(--accent); display: flex; align-items: center; gap: 4px; }
.cr-time { font-size: 10px; color: var(--muted); margin-top: 2px; }
.cr-badge {
  position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,0.7);
  color: #fff; font-size: 10px; padding: 2px 8px; border-radius: var(--radius-sm);
  backdrop-filter: blur(4px);
}
.cr-empty { color: var(--muted); font-size: 13px; padding: 4px 0; }

/* --------------------------------------------------------------------------
   16. 更新日志
   -------------------------------------------------------------------------- */
.changelog-content { display: flex; flex-direction: column; gap: 20px; }
.changelog-entry {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  transition: border-color var(--t-fast);
}
.changelog-entry:hover { border-color: var(--accent-32); }
.changelog-entry:first-child { border-color: var(--accent); background: linear-gradient(135deg, var(--accent-08), var(--surface)); }
.changelog-header { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.changelog-ver {
  background: var(--accent-btn); color: #fff; padding: 2px 10px; border-radius: var(--radius-round);
  font-size: 13px; font-weight: 700;
}
.changelog-entry:first-child .changelog-ver { background: linear-gradient(135deg, #4f8cff, #7c5cfc); }
.changelog-date { color: var(--muted); font-size: 13px; }
.changelog-title { font-size: 15px; font-weight: 600; color: var(--text); }
.changelog-list { margin: 0; padding-left: 18px; }
.changelog-list li { color: var(--muted); font-size: 13px; line-height: 1.8; overflow-wrap: break-word; word-break: break-word; }

/* --------------------------------------------------------------------------
   17. 漫画详情弹窗（模态微交互）
   -------------------------------------------------------------------------- */
.detail-mask {
  display: none;
  position: fixed;
  inset: 0;
  z-index: var(--z-detail);
  align-items: center;
  justify-content: center;
}
.detail-mask.open { display: flex; }
.detail-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.75);
  cursor: pointer;
  animation: overlayIn var(--t-base);
}
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }
.detail-panel {
  position: relative;
  z-index: 1;
  width: min(680px, 95vw);
  max-height: 90vh;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: detailIn var(--t-slow);
}
@keyframes detailIn {
  from { opacity: 0; transform: translateY(16px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.detail-scroll { overflow-y: auto; padding: 18px 20px; -webkit-overflow-scrolling: touch; }
.detail-header { display: flex; gap: 16px; margin-bottom: 14px; }
.detail-cover {
  width: 120px; height: 160px; object-fit: cover; border-radius: var(--radius-sm);
  background: var(--surface-2); flex-shrink: 0;
  content-visibility: auto; contain-intrinsic-size: auto 160px;
}
.detail-info { flex: 1; min-width: 0; }
.detail-title { font-size: 16px; font-weight: 600; color: var(--text); margin: 0 0 8px; line-height: 1.4; }
.detail-meta-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 6px; }
.detail-meta { font-size: 12px; color: var(--muted); }
.detail-meta-id {
  font-size: 11px; color: var(--accent); background: var(--accent-08);
  padding: 1px 6px; border-radius: var(--radius-xs); font-family: var(--font-mono);
}
.detail-stats-row { margin-bottom: 6px; }
.detail-stats { font-size: 12px; color: var(--muted); }
.detail-stats span { margin-right: 10px; }
.detail-tags-row { display: flex; flex-wrap: wrap; gap: 4px; }
.detail-tag {
  font-size: 11px; background: var(--accent-08); color: var(--accent);
  padding: 2px 8px; border-radius: var(--radius-xs); cursor: pointer; transition: all var(--t-fast);
}
.detail-tag:hover { background: var(--accent-12); }
.detail-desc {
  margin: 12px 0;
  padding: 10px 14px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  max-height: 160px;
  overflow-y: auto;
  white-space: pre-wrap;
}
.detail-desc.empty { display: none; }
.detail-actions-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
}
.detail-actions-bar button { font-size: 12px; padding: 7px 14px; }
.detail-actions-bar button.has-selection { color: #ff9800; border-color: rgba(255,152,0,0.5); background: rgba(255,152,0,0.1); font-weight: 600; }
.detail-chapters-head { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.detail-chapters { display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow-y: auto; }
.detail-chapter-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; background: var(--surface-2);
  border-radius: 7px; font-size: 12px; border: 1px solid transparent;
  transition: all var(--t-fast); cursor: pointer;
}
.detail-chapter-item:hover { border-color: var(--accent); background: var(--surface-3); }
.detail-chapter-item.selected { border-color: var(--accent); background: var(--accent-08); }
.detail-chapter-item .ch-check {
  width: 18px; height: 18px; border-radius: var(--radius-xs); border: 1px solid var(--border);
  flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 11px;
  color: transparent; transition: all var(--t-fast);
}
.detail-chapter-item.selected .ch-check { background: var(--accent-btn); border-color: var(--accent-btn); color: #fff; }
.detail-chapter-item .ch-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.detail-chapter-item .ch-pages { color: var(--muted); font-size: 11px; flex-shrink: 0; }

/* --------------------------------------------------------------------------
   18. 阅读器（沉浸式阅读）
   -------------------------------------------------------------------------- */
.reader-viewport {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  overflow-x: hidden;
  background: #111;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: auto;
}
.reader-page { width: 100%; min-height: 200px; }
.reader-page img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  user-select: none;
  -webkit-user-drag: none;
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}
.reader-page img.img-fail { opacity: .3; min-height: 80px; background: var(--surface-2); }

/* 全屏遮罩 */
.reader-mask {
  display: none;
  position: fixed;
  inset: 0;
  z-index: var(--z-reader);
  background: rgba(8,9,12,0.97);
  flex-direction: column;
}
.reader-mask.open { display: flex; }
.reader-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.reader-head > span:first-of-type { font-weight: 600; margin-right: auto; }
.reader-head select { max-width: 40vw; }
.reader-page-info { font-size: 12px; color: var(--muted); white-space: nowrap; }
.chap-nav {
  width: 32px; height: 32px; padding: 0; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-xs);
}
.chap-nav:disabled { opacity: .3; cursor: default; }
.reader-pages { flex: 1; overflow-y: auto; overflow-x: hidden; text-align: center; padding: 0; -webkit-overflow-scrolling: touch; will-change: scroll-position; transform: translateZ(0); }
.reader-pages img { max-width: 100%; width: 100%; display: block; margin: 0 auto; vertical-align: top; content-visibility: auto; contain-intrinsic-size: auto 600px; }
.reader-pages .loading { color: var(--muted); padding: 40px; }

/* v5 翻页模式 */
.reader-viewport.reader-paged {
  overflow: hidden;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  touch-action: pan-y;
}
.reader-paged-strip {
  display: flex;
  flex-direction: row;
  align-items: center;
  height: 100vh;
  height: 100dvh;
  transition: transform .32s var(--ease);
  will-change: transform;
}
.reader-viewport.reader-paged .reader-page {
  min-width: 100vw;
  width: 100vw;
  min-height: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.reader-viewport.reader-paged .reader-page img { max-width: 100%; max-height: 100vh; max-height: 100dvh; width: auto; height: auto; object-fit: contain; }
.reader-viewport.reader-paged.reader-fill .reader-page { overflow-y: auto; align-items: flex-start; }
.reader-viewport.reader-paged.reader-fill .reader-page img { width: 100% !important; height: auto !important; max-width: 100% !important; max-height: none !important; object-fit: contain; display: block; }
.reader-viewport.reader-paged.reader-fill .reader-skeleton { min-height: 100vh; min-height: 100dvh; }
.reader-viewport.reader-paged .reader-skeleton { min-height: 100vh; min-height: 100dvh; height: 100vh; height: 100dvh; }

/* 顶部细进度条 */
.reader-top-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: calc(var(--z-popup) + 2);
  background: rgba(255,255,255,0.08);
  pointer-events: none;
}
.reader-top-progress-bar {
  height: 100%; width: 0;
  background: linear-gradient(90deg, #34d399, #4f8cff);
  transition: width .2s ease;
}
.reader-img-placeholder {
  width: 100%; min-height: 800px;
  background: linear-gradient(180deg, #1a1a1a 0%, #222 100%);
  display: flex; align-items: center; justify-content: center;
  color: #666; font-size: 14px;
}
.reader-load { color: #888; padding: 60px; text-align: center; font-size: 16px; }
.reader-load-error { color: #ccc; }
.reader-err-icon { font-size: 48px; margin-bottom: 12px; }
.reader-err-msg { font-size: 18px; color: #ff6b6b; margin-bottom: 8px; }
.reader-err-detail { font-size: 13px; color: #999; margin-bottom: 20px; word-break: break-all; }
.reader-retry-btn {
  display: inline-block; padding: 10px 24px;
  border: 1px solid #666; border-radius: var(--radius-xs);
  background: #333; color: #fff; font-size: 14px; cursor: pointer;
  transition: background .2s; margin: 4px;
}
.reader-retry-btn:hover { background: #555; }
.reader-retry-btn-secondary { background: transparent; color: #999; border-color: #444; }
.reader-retry-btn-secondary:hover { background: #2a2a2a; color: #ccc; }
.reader-retry-btn-sm { padding: 4px 12px; font-size: 12px; border-radius: var(--radius-xs); }

.reader-close {
  position: fixed; top: 16px; left: 16px;
  z-index: var(--z-popup);
  width: 36px; height: 36px; border-radius: 50%;
  border: none; background: rgba(0,0,0,0.7); color: #fff; font-size: 18px;
  cursor: pointer; display: none; transition: background .2s;
}
.reader-close:hover { background: rgba(0,0,0,0.9); }

/* 沉浸式隐藏 */
body.reader-immersive .reader-close,
body.reader-immersive .reader-indi,
body.reader-immersive .reader-bar,
body.reader-immersive .reader-totop,
body.reader-immersive .reader-top-progress { opacity: 0 !important; pointer-events: none !important; }
.reader-close, .reader-indi, .reader-bar, .reader-totop { transition: opacity .25s ease; }

.reader-totop {
  position: fixed; right: 16px; bottom: 76px;
  z-index: var(--z-popup);
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(0,0,0,0.75); color: #fff; font-size: 20px;
  cursor: pointer; display: none; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease;
}
.reader-totop.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.reader-totop:hover { background: rgba(0,0,0,0.9); }
.reader-indi {
  position: fixed; top: 16px; right: 16px;
  z-index: calc(var(--z-popup) + 1);
  background: rgba(0,0,0,0.75); color: #fff;
  padding: 6px 14px; border-radius: var(--radius-lg);
  font-size: 13px; transition: opacity .3s;
  display: none; pointer-events: none;
}

/* 骨架屏（懒加载占位） */
.reader-skeleton {
  width: 100%; height: 100%; min-height: 600px;
  background: linear-gradient(90deg, #1a1a1a 25%, #252525 50%, #1a1a1a 75%);
  background-size: 200% 100%;
  animation: readerShimmer 1.5s ease-in-out infinite;
}
.reader-skeleton-loading { background: linear-gradient(90deg, #1a1a1a 25%, #2a2a4a 50%, #1a1a1a 75%); background-size: 200% 100%; }
@keyframes readerShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.reader-img-error {
  min-height: 120px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; color: #888; gap: 8px;
  font-size: 14px; background: #1a1a1a; padding: 24px;
}
.reader-img-error.reader-img-missing { min-height: 120px; color: #666; font-size: 13px; }

/* 章节分隔线 */
.reader-chapter-divider { text-align: center; padding: 24px 16px; color: #555; font-size: 13px; border-top: 1px solid rgba(255,255,255,0.04); margin-top: 12px; }
.reader-chapter-divider-next { color: #777; animation: dividerFadeIn .5s ease-out; }
.reader-chapter-divider-fail { color: #ef4444; display: flex; flex-direction: column; align-items: center; gap: 8px; }
@keyframes dividerFadeIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

.reader-chapter-transition {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);
  z-index: 2000; background: rgba(0,0,0,0.85); padding: 20px 32px;
  border-radius: var(--radius-lg); text-align: center; pointer-events: none;
  animation: rdFadeIn .2s ease;
}
@keyframes rdFadeIn { from { opacity: 0; transform: translate(-50%,-50%) scale(.95); } to { opacity: 1; transform: translate(-50%,-50%) scale(1); } }
.rd-trans-title { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.rd-trans-sub { font-size: 13px; color: var(--muted); }
.rd-spinner {
  width: 36px; height: 36px; margin: 0 auto 12px;
  border: 3px solid rgba(255,255,255,0.1); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .8s linear infinite;
}

/* 底部导航栏 */
.reader-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: calc(var(--z-popup) + 3);
  display: none; align-items: center; justify-content: center;
  gap: 16px; padding: 12px 16px;
  background: rgba(0,0,0,0.9); backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255,255,255,0.08);
}
.rb-btn {
  padding: 8px 18px; border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06); color: #ddd;
  font-size: 13px; cursor: pointer; transition: all var(--t-fast);
  min-height: 36px;
}
.rb-btn:hover:not(:disabled) { background: rgba(255,255,255,0.15); color: #fff; }
.rb-btn:disabled { opacity: .3; cursor: default; }
.rb-info { font-size: 13px; color: #aaa; white-space: nowrap; }
.rb-btn.active { background: rgba(52,211,153,0.18); border-color: rgba(52,211,153,0.4); color: #34d399; }
.rb-autoplay { font-size: 12px; padding: 6px 12px; opacity: .7; }
.rb-autoplay.active { opacity: 1; color: #34d399; border-color: rgba(52,211,153,0.3); background: rgba(52,211,153,0.1); }
.rb-mode { font-size: 12px; padding: 6px 12px; opacity: .85; }
.rb-mode:hover:not(:disabled) { opacity: 1; color: #fff; }

/* 阅读进度指示器 */
.reader-indi { transition: opacity .3s, transform .3s; }
.reader-indi.changing { opacity: 0; transform: translateY(-4px); }

/* 章节目录快速跳转面板 */
.reader-catalog {
  position: fixed; right: 12px; bottom: 64px; z-index: calc(var(--z-popup) + 4);
  width: 260px; max-width: 82vw; max-height: 60vh;
  display: flex; flex-direction: column;
  background: rgba(20,20,20,0.97); border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: rcIn .18s ease;
}
@keyframes rcIn { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.rc-head { padding: 10px 14px; font-size: 13px; font-weight: 600; color: #eee; border-bottom: 1px solid rgba(255,255,255,0.08); flex-shrink: 0; }
.rc-list { overflow-y: auto; flex: 1; padding: 4px; -webkit-overflow-scrolling: touch; }
.rc-item {
  padding: 8px 12px; border-radius: var(--radius-xs);
  font-size: 13px; color: #bbb; cursor: pointer;
  transition: background .12s;
  display: flex; align-items: center; justify-content: space-between;
}
.rc-item:hover { background: rgba(255,255,255,0.07); color: #fff; }
.rc-item.active { background: rgba(52,211,153,0.15); color: #34d399; font-weight: 600; }
.rc-cur { font-size: 11px; opacity: .7; }

/* 图片点击放大 lightbox */
.reader-zoom {
  position: fixed; inset: 0; z-index: var(--z-lightbox);
  background: rgba(0,0,0,0.94);
  display: flex; align-items: center; justify-content: center;
  cursor: zoom-out; overflow: auto;
  animation: rzIn .15s ease;
}
@keyframes rzIn { from { opacity: 0; } to { opacity: 1; } }
.reader-zoom-img { max-width: 96vw; max-height: 96vh; object-fit: contain; border-radius: var(--radius-xs); box-shadow: var(--shadow-lg); }
body.reader-zoom-open { overflow: hidden !important; }

/* --------------------------------------------------------------------------
   19. 漫画信息面板（reader.js 生成）
   -------------------------------------------------------------------------- */
.manga-info-overlay {
  position: fixed; inset: 0; z-index: var(--z-lightbox);
  display: flex; align-items: flex-start; justify-content: center;
  overflow-y: auto; padding: 20px;
}
.mi-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.85); }
.mi-panel {
  position: relative; z-index: 1;
  width: 100%; max-width: 680px;
  background: #1a1a2e;
  border-radius: var(--radius-lg);
  padding: 32px 28px 24px;
  box-shadow: var(--shadow-lg);
  color: #e0e0e0;
  animation: detailIn var(--t-slow);
}
.mi-close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px; border-radius: 50%;
  border: none; background: rgba(255,255,255,0.1);
  color: #fff; font-size: 20px; cursor: pointer; transition: background .2s;
}
.mi-close:hover { background: rgba(255,255,255,0.2); }
.mi-hero { display: flex; gap: 24px; margin-bottom: 20px; }
.mi-cover-wrap {
  flex-shrink: 0; width: 160px; height: 220px;
  border-radius: var(--radius-md); overflow: hidden; position: relative;
  background: #111; box-shadow: var(--shadow-sm);
}
.mi-cover { width: 100%; height: 100%; object-fit: cover; }
.mi-cover-fb { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #555; font-size: 14px; background: #1a1a1a; }
.mi-hero-info { flex: 1; min-width: 0; }
.mi-title { font-size: 22px; font-weight: 700; color: #fff; margin: 0 0 8px; line-height: 1.3; }
.mi-author-line { font-size: 14px; color: #aaa; margin-bottom: 6px; }
.mi-author-tag { display: inline-block; background: rgba(99,102,241,0.2); color: #818cf8; padding: 2px 10px; border-radius: var(--radius-round); margin-right: 4px; font-size: 13px; }
.mi-jmid { font-size: 12px; color: #666; margin-bottom: 6px; }
.mi-stats { font-size: 14px; color: #999; margin-bottom: 8px; }
.mi-enc-badge { color: #34d399; }
.mi-plain-badge { color: #f59e0b; }
.mi-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.mi-tag { display: inline-block; background: rgba(255,255,255,0.06); color: #999; padding: 2px 10px; border-radius: var(--radius-round); font-size: 12px; }
.mi-meta-empty { color: #555; font-style: italic; }
.mi-desc {
  font-size: 14px; line-height: 1.7; color: #bbb;
  background: rgba(255,255,255,0.03); border-radius: var(--radius-md);
  padding: 14px 16px; margin-bottom: 20px;
  max-height: 140px; overflow-y: auto;
}
.mi-section-title { font-size: 16px; font-weight: 600; color: #ddd; margin: 0 0 12px; border-left: 3px solid var(--accent); padding-left: 10px; }
.mi-chapter-list { max-height: 360px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.mi-chapter-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.03); cursor: pointer;
  transition: background .15s; font-size: 14px; color: #ccc;
}
.mi-chapter-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.mi-chapter-item.active { background: rgba(99,102,241,0.15); color: #818cf8; font-weight: 600; }
.mi-ch-arrow { font-size: 12px; opacity: .5; }
.mi-load-err { color: #666; text-align: center; padding: 30px; }

/* --------------------------------------------------------------------------
   20. 设置页
   -------------------------------------------------------------------------- */
.cfg-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 16px;
  transition: border-color var(--t-fast);
}
.cfg-group:hover { border-color: var(--border-strong); }
.cfg-title { font-weight: 600; margin-bottom: 14px; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.cfg-title-text { flex: 1; }
.cfg-title-tools { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.cfg-group label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
.cfg-group label:first-child { margin-top: 0; }
.cfg-group input, .cfg-group select { width: 100%; overflow: hidden; text-overflow: ellipsis; }
.cfg-row2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 10px; }
.cfg-row2 span label { margin-top: 0; }
.cfg-row2 span input { width: 100%; }
.cfg-row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cfg-row4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.cfg-actions { display: flex; gap: 10px; align-items: center; margin-top: 20px; flex-wrap: wrap; }
.save-msg { font-size: 13px; color: var(--ok); }

.cfg-test-btn {
  font-size: 11px; padding: 3px 10px; border-radius: var(--radius-xs);
  border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.04);
  color: var(--muted); cursor: pointer; transition: all var(--t-fast);
}
.cfg-test-btn:hover { background: rgba(255,255,255,0.1); color: var(--text); }
.cfg-test-result { display: inline-block; margin-top: 6px; font-size: 12px; }
.cfg-test-result.ok { color: #34d399; }
.cfg-test-result.err { color: #ef4444; }

/* 设置子导航 */
.settings-nav {
  position: sticky;
  top: var(--nav-height);
  z-index: var(--z-settings-nav);
  display: flex; align-items: center; gap: 8px;
  background: var(--bg);
  padding: 8px 0 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.snav-links { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.snav-link {
  font-size: 12px; color: var(--muted); text-decoration: none;
  padding: 5px 10px; border-radius: var(--radius-round); border: 1px solid transparent;
  white-space: nowrap; transition: all var(--t-fast);
}
.snav-link:hover { color: var(--text); background: var(--surface-2); }
.snav-link.active { color: var(--accent); background: var(--surface-2); border-color: var(--border); }
.snav-fold { font-size: 12px; padding: 5px 12px; flex-shrink: 0; }
#tab-settings .cfg-group { scroll-margin-top: 118px; }
.cfg-title-tools .tb-btn { width: auto; height: auto; padding: 4px 10px; font-size: 12px; }
.cfg-title-tools .cfg-fold {
  width: 24px; height: 24px; line-height: 20px; padding: 0;
  border-radius: var(--radius-xs); font-size: 13px; color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--border);
  transition: transform var(--t-base);
}
.cfg-group.collapsed .cfg-fold { transform: rotate(-90deg); }
.cfg-group.collapsed .cfg-body { display: none; }
.cfg-body > :first-child { margin-top: 0 !important; }
.cfg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 16px; align-items: start; }
.cfg-grid .cfg-group { margin-bottom: 0; }

/* 系统概览 */
.sys-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 12px; }
.sys-card {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-md); padding: 14px 16px; text-align: center;
  transition: border-color var(--t-base);
}
.sys-card:hover { border-color: rgba(255,255,255,0.12); }
.sys-card-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.sys-card-val { font-size: 22px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.disk-bar-wrap { height: 6px; background: rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden; margin-bottom: 12px; }
.disk-bar { height: 100%; border-radius: 3px; transition: width .8s ease; background: linear-gradient(90deg, #34d399, #f59e0b, #ef4444); }
.disk-bar.warn { background: #f59e0b; }
.disk-bar.critical { background: #ef4444; }
.disk-bar-meta { font-size: 12px; color: var(--muted); margin: -6px 0 12px; }
.sys-worker-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.sys-worker-row .sys-ver { margin-left: auto; font-size: 12px; color: #555; }
.worker-badge { display: inline-block; padding: 2px 10px; border-radius: var(--radius-round); font-size: 12px; font-weight: 600; }
.worker-badge.online { background: var(--ok-15); color: #34d399; }
.worker-badge.offline { background: var(--danger-12); color: #ef4444; }
.sys-meta { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; font-size: 12px; color: var(--muted); }
.worker-ctl {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 8px 12px; flex-wrap: wrap;
}
.worker-name { font-weight: 600; color: var(--text); }
.worker-actions { display: flex; gap: 4px; }
.worker-btn {
  font-size: 11px; padding: 4px 8px; border-radius: var(--radius-xs);
  background: var(--surface-2); border: 1px solid var(--border); color: var(--muted);
}
.worker-btn:hover { color: var(--text); border-color: var(--accent); }

/* token / 连接行 */
.token-row { display: flex; gap: 6px; align-items: center; }
.token-row button { padding: 6px 10px; font-size: 13px; flex-shrink: 0; }
.token-status { font-size: 11px; padding: 1px 8px; border-radius: var(--radius-round); font-weight: 600; }
.token-status.set { background: var(--ok-15); color: #34d399; }
.token-status.unset { background: var(--danger-12); color: #ef4444; }
.restart-hint { font-size: 12px; color: var(--warn); background: var(--warn-12); padding: 4px 10px; border-radius: var(--radius-sm); }

/* 连接 / JM 卡片 */
.conn-summary { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.conn-list { display: flex; flex-direction: column; gap: 6px; }
.conn-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 12px; }
.conn-item .conn-ip { font-weight: 600; color: var(--text); min-width: 110px; }
.conn-item .conn-ua { flex: 1; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conn-item .conn-ago { color: var(--muted); flex-shrink: 0; }
.conn-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; flex-shrink: 0; }

#jmCard .jm-ver-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; padding: 5px 0; color: var(--muted); gap: 8px; }
#jmCard .jm-ver-row span { flex-shrink: 0; }
#jmCard .jm-ver-row strong { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
#jmCard .jm-log {
  margin-top: 10px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px; font-size: 12px; font-family: var(--font-mono);
  max-height: 220px; overflow: auto; white-space: pre-wrap; overflow-wrap: break-word; word-break: normal;
  color: var(--muted); line-height: 1.5;
}
.worker-ctl-btn {
  display: inline-block; width: 24px; height: 24px; line-height: 22px;
  border-radius: 50%; border: 1px solid rgba(255,255,255,0.08);
  background: transparent; color: var(--muted); font-size: 11px;
  cursor: pointer; text-align: center; padding: 0; margin-left: 2px;
  transition: all var(--t-fast); vertical-align: middle;
}
.worker-ctl-btn:hover { background: rgba(255,255,255,0.1); color: var(--text); border-color: rgba(255,255,255,0.2); }

/* --------------------------------------------------------------------------
   21. 推送 CMS
   -------------------------------------------------------------------------- */
.push-cfg-row { display: flex; gap: 12px; flex-wrap: wrap; }
.push-cfg-item { display: flex; flex-direction: column; gap: 3px; min-width: 120px; }
.push-cfg-item label { font-size: 12px; color: var(--muted); }
.push-cfg-item input, .push-cfg-item select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
}
.push-section {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: 14px;
}
.push-comic-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.push-card { position: relative; cursor: pointer; transition: border-color var(--t-base), box-shadow var(--t-base); }
.push-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.push-card.selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(79,140,255,0.35); }
.push-card-check {
  position: absolute; top: 6px; right: 6px; z-index: 2;
  width: 26px; height: 26px; border-radius: var(--radius-xs);
  background: rgba(0,0,0,0.55); backdrop-filter: blur(2px);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 14px; transition: background .2s; pointer-events: none;
}
.push-card.selected .push-card-check { background: var(--accent-btn); }
.push-card .pci-preview, .push-card .pci-push-one { min-width: 36px; flex: 0 0 auto; }
.push-card .actions { justify-content: flex-end; }
.push-progress {
  font-size: 12px; color: var(--ok); padding: 4px 10px;
  background: var(--surface-2); border-radius: var(--radius-xs);
  animation: fadeInOut .3s ease;
}
.push-log-list { max-height: 300px; overflow-y: auto; font-size: 12px; }
.push-log-item {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px; border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
}
.push-log-item .pl-time { color: var(--muted); flex-shrink: 0; }
.push-log-item .pl-status { font-weight: 600; flex-shrink: 0; min-width: 40px; }
.push-log-item .pl-status.ok { color: var(--ok); }
.push-log-item .pl-status.fail { color: var(--danger); }
.push-log-item .pl-comic { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.push-log-item .pl-detail { color: var(--muted); flex-shrink: 0; }
@keyframes fadeInOut { from { opacity: 0; } to { opacity: 1; } }

/* --------------------------------------------------------------------------
   22. 响应式层（断点：1440 / 1100 / 1024 / 900 / 768 / 600 / 480）
   -------------------------------------------------------------------------- */
/* ≥1440px 大屏：放宽内容宽度与卡片密度 */
@media (min-width: 1440px) {
  main { max-width: 1360px; padding: var(--space-6); }
  .grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 20px; }
  .reader-viewport { max-width: 1000px; }
}

/* ≤1100px 窄桌面：顶栏换行、标签横向滚动 */
@media (max-width: 1100px) {
  .topbar { flex-wrap: wrap; gap: 8px 14px; padding: 10px 16px; }
  .tabs {
    order: 3; width: 100%; margin-left: 0;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap; gap: 4px; padding-bottom: 2px; scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: 0 0 auto; }
}

/* ≤1024px 中屏：设置双列转单列下限、工具栏收紧 */
@media (max-width: 1024px) {
  .cfg-grid { grid-template-columns: 1fr; }
  .browse-toolbar { padding: 12px 14px; gap: 10px; }
}

/* ≤900px 小平板/大手机：工具类元素提前放宽 */
@media (max-width: 900px) {
  #tab-shelf .toolbar input { flex: 1 1 100%; min-width: 0; }
  #tab-shelf .toolbar select { flex: 1 1 auto; min-width: 110px; }
  .browse-tabs { width: 100%; max-width: 100%; flex-wrap: wrap; }
  .browse-sub-tab { flex: 1 1 auto; padding: 8px 12px; }
}

/* ≤768px 广受关注的手机断点：导航折叠 + 卡片/搜索栏重排 */
@media (max-width: 768px) {
  /* 顶栏：品牌与导航分行 */
  .topbar { flex-wrap: wrap; gap: 8px 12px; padding: 10px 12px; }
  .tabs { order: 3; width: 100%; margin-left: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; gap: 4px; padding-bottom: 2px; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: 0 0 auto; white-space: nowrap; font-size: 13px; padding: 6px 10px; }
  .brand { font-size: 15px; }
  .status { font-size: 12px; }
  main { padding: 14px 12px; }

  /* 搜索栏：输入框满行，下拉不拥挤 */
  .searchbar input, .toolbar input { flex: 1 1 100%; min-width: 0; }
  .searchbar select, .toolbar select { flex: 1 1 auto; min-width: 46%; }
  .searchbar button, .toolbar button { flex: 1 1 auto; min-height: 38px; }

  /* 直接下载行 */
  .direct-dl-row { flex-wrap: wrap; }
  .direct-dl-row input { flex: 1 1 100%; }
  .direct-dl-row button { flex: 1 1 auto; min-height: 38px; }
  .auto-enc-label { flex: 1 1 100%; justify-content: flex-start; }

  /* 卡片网格：手机上更紧凑 */
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .card .actions button { font-size: 12px; padding: 6px 6px; min-height: 34px; }

  /* 详情弹窗全屏化 */
  .detail-panel { width: 100%; max-width: 100%; max-height: 92vh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .detail-chapters { max-height: 40vh; }
  .detail-actions-bar button { flex: 1 1 auto; min-height: 40px; }

  /* 阅读器头部触控友好 */
  .reader-head { padding: 8px 10px; gap: 6px; }
  .reader-head select { max-width: 40vw; }
  .reader-pages { padding: 0; }
  .reader-pages img { max-width: 100%; width: 100%; }
  .reader-bar { padding: 4px 8px; }
  .reader-page-info { font-size: 11px; }

  /* 批量进度弹窗不溢出窄屏 */
  .batch-progress { right: 10px; left: 10px; bottom: 10px; width: auto; }

  /* 任务页工具栏 */
  .task-toolbar { flex-direction: column; align-items: stretch; gap: 10px; }
  .task-filter-pills { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; scrollbar-width: none; padding-bottom: 2px; width: 100%; max-width: 100%; min-width: 0; }
  .task-filter-pills::-webkit-scrollbar { display: none; }
  .task-filter-pills .pill { flex: 0 0 auto; white-space: nowrap; }
  .task-toolbar-actions { flex-wrap: wrap; justify-content: flex-end; width: 100%; min-width: 0; }
  .task-toolbar-actions .tb-btn { flex: 1 1 auto; min-height: 36px; }

  /* 漫画架统计卡 */
  .stats-bar { gap: 8px; }
  .stat-card { flex: 1 1 0; min-width: 0; padding: 12px 10px; text-align: center; }
  .stat-card .stat-value { font-size: 18px; }
  #tab-shelf .toolbar { gap: 8px; }
  #tab-shelf .toolbar button { flex: 1 1 auto; min-height: 36px; font-size: 12px; }
  #tab-shelf .toolbar .filter-label { flex-basis: 100%; }

  /* 设置页 */
  .cfg-row4 { grid-template-columns: repeat(2, 1fr); }
  .cfg-row3 { grid-template-columns: repeat(2, 1fr); }
  .cfg-group { padding: 14px 14px; }
  .sys-worker-row { gap: 10px; }
  .sys-worker-row .sys-ver { margin-left: 0; flex-basis: 100%; }

  /* 审计条目换行 */
  .audit-item { flex-wrap: wrap; }
  .audit-side { flex-direction: row; align-items: center; gap: 10px; width: 100%; justify-content: space-between; }

  /* 分页 */
  .dl-pagination button { padding: 8px 14px; min-height: 38px; }
  .browse-page-nav { flex-wrap: wrap; }
  #jmCard .jm-ver-row strong { max-width: 55vw; }
  .cr-card { flex: 0 0 140px; }
}

/* ≤600px */
@media (max-width: 600px) {
  .cfg-row4 { grid-template-columns: repeat(2, 1fr); }
  .sys-grid { grid-template-columns: repeat(3, 1fr); }
  .cr-card { flex: 0 0 130px; }
  .cr-cover, .cr-cover-placeholder { height: 100px; }
}

/* ≤520px */
@media (max-width: 520px) {
  .mi-hero { flex-direction: column; align-items: center; }
  .mi-cover-wrap { width: 140px; height: 190px; }
  .mi-hero-info { text-align: center; }
  .mi-panel { padding: 24px 16px 16px; }
}

/* ≤720px 设置页专用 */
@media (max-width: 720px) {
  .settings-nav { position: static; border-bottom: 0; }
  .snav-fold { display: none; }
  .cfg-grid { grid-template-columns: 1fr; }
  #tab-settings .cfg-group { scroll-margin-top: 12px; }
}

/* ≤480px 小手机：两列卡片 / 单列表单 */
@media (max-width: 480px) {
  main { padding: 12px 10px; }
  .searchbar select, .toolbar select { min-width: 100%; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .card .title { font-size: 12px; }
  .card .actions button { font-size: 11px; padding: 5px 4px; }
  .stat-card .stat-value { font-size: 16px; }
  .stat-card .stat-label { font-size: 11px; }
  .sys-grid { grid-template-columns: repeat(2, 1fr); }
  .sys-card-val { font-size: 18px; }
  .cfg-row4, .cfg-row3, .cfg-row2 { grid-template-columns: 1fr; }
  .ranking-quick-links { padding: 8px 10px; }
  .reader-head select { max-width: 32vw; }
  .trash-head { flex-wrap: wrap; gap: 8px; }
  .detail-header { flex-direction: column; align-items: center; text-align: center; }
  .detail-cover { width: 140px; height: 190px; }
}

/* 触控设备：增大点按目标 */
@media (pointer: coarse) {
  .reader-viewport { -webkit-overflow-scrolling: touch; scroll-behavior: auto; }
  .reader-retry-btn { min-height: 36px; min-width: 80px; }
  .rb-btn { min-height: 36px; padding: 8px 14px; }
  button, [role="button"], input, select { min-height: 36px; }
}

/* --------------------------------------------------------------------------
   23. 工具 & 附注
   -------------------------------------------------------------------------- */
/* 视觉重心辅助：卡片底部分隔 */
.panel-tab { position: relative; }
/* 无障碍：为屏幕阅读器提供的跳转锚点 */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
