
:root {
  --layout-width: 1140px;
  /* 背景与纸张 */
  --body-bg: linear-gradient(180deg, #F5F0E8 0%, #EDE4D3 100%);
  --color-paper: #fff;
  --color-paper-strong: #fff;
  --color-surface-strong: #fffffffa;
  /* 文字层级 */
  --color-ink-strong: #111827;
  --color-ink-mid: #4b5563;
  --color-ink-soft: #9ca3af;
  /* 边线与分割 */
  --color-line: rgba(17,24,39,.08);
  --color-line-strong: rgba(17,24,39,.14);
  /* 表面与卡片 */
  --color-surface: #fffffffc;
  --color-card-border: rgba(17,24,39,.12);
  --color-card-shadow: 0 4px 20px rgba(17,24,39,.05), 0 1px 3px rgba(17,24,39,.03);
  --color-card-shadow-hover: 0 12px 32px rgba(17,24,39,.10), 0 2px 6px rgba(17,24,39,.04);
  /* 功能色 */
  --color-accent: #8B6914;
  --color-accent-warm: #CD853F;
  --color-accent-blue: #5C4033;
  --color-accent-indigo: #8B6914;
  --color-tag-bg: rgba(17,24,39,.05);
}


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

.main-content {
  max-width: var(--layout-width);
  margin: 0 auto;
  padding: 0 12px;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  font-size: 14px; color: var(--color-ink-mid);
  background: var(--body-bg);
  background-attachment: fixed;
  line-height: 1.5; min-width: 320px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { text-decoration: none; color: inherit; touch-action: manipulation; }
button { cursor: pointer; border: none; background: none; font: inherit; padding: 0; touch-action: manipulation; }
[role="button"], .nav-item, .category-btn, .back-to-top,
.float-notif-btn, .social-icon, .detail-close, .modal-close,
.detail-action-btn, .mobile-cat-btn, .banner-dot, .hot-tag { touch-action: manipulation; }
input, textarea { outline: none; border: none; font: inherit; -webkit-appearance: none; }
.search-box input { -webkit-appearance: none; }
img { max-width: 100%; height: auto; display: block; image-rendering: -webkit-optimize-contrast; }
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #c4b5fd, #93c5fd); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #a78bfa, #60a5fa); }

/* iOS 触摸优化 */
* { -webkit-tap-highlight-color: transparent; }
.modal-card, .detail-body, .float-notif-list { -webkit-overflow-scrolling: touch; }


.top-navbar {
  position: sticky; top: 0; z-index: 100;
  background: linear-gradient(180deg, rgba(245,240,232,.95) 0%, rgba(237,228,211,.84) 100%);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--color-line);
  box-shadow: 0 1px 8px rgba(17,24,39,.04);
  transition: background .3s ease, box-shadow .3s ease;
}
/* 移动端顶部导航也保持 sticky */
.navbar-inner {
  max-width: var(--layout-width); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 24px; gap: 18px;
  flex-wrap: nowrap;
}
/* 左侧：汉堡菜单 + 品牌 */
.navbar-left {
  display: flex; align-items: center; gap: 10px;
}
.mobile-menu-btn {
  display: none; font-size: 22px; cursor: pointer;
  background: none; border: none; color: var(--color-ink-strong);
  padding: 4px 6px; border-radius: 8px; transition: background .2s;
}
.mobile-menu-btn:hover { background: var(--color-tag-bg); }
.navbar-brand {
  display: flex; align-items: center; gap: 14px; flex-shrink: 0;
  text-decoration: none; color: inherit; cursor: pointer;
}
.navbar-brand:hover { opacity: .85; }
.brand-icon { font-size: 22px; animation: brandPulse 3s ease-in-out infinite; }
@keyframes brandPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
.brand-logo { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; image-rendering: auto; transform: scale(1.1); transform-origin: left center; transition: transform .3s ease, filter .3s ease, box-shadow .3s ease; }
.brand-logo:hover { filter: brightness(1.1); box-shadow: 0 0 14px rgba(139,105,20,.4); animation: logoSpin .6s ease-in-out; transform-origin: center center; }
@keyframes logoSpin {
  0% { transform: scale(1.1) rotate(0deg); }
  100% { transform: scale(1.1) rotate(360deg); }
}
.brand-text { display: flex; flex-direction: column; }

/* 弹窗基础样式 */
.modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.45);
  z-index: 1000; justify-content: center; align-items: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overscroll-behavior: contain;
}
.modal-overlay.show {
  display: flex;
}
.modal-card {
  background: #fff; border-radius: 12px; width: 90%; max-width: 420px; max-height: 88vh;
  overflow-y: auto; box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid #f0f0f0; }
.modal-header h3 { font-size: 16px; font-weight: 600; margin: 0; }
.modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: #999; padding: 0 4px; line-height: 1; }
.modal-close:hover { color: #333; }
.modal-body { padding: 20px 22px; }
.modal-footer { display: flex; justify-content: center; gap: 10px; padding: 16px 22px; border-top: 1px solid #f0f0f0; }
body.dark-theme .modal-card { background: #1a1a2e; box-shadow: 0 8px 32px rgba(0,0,0,0.4); }
body.dark-theme .modal-header { border-bottom-color: #2a2a3e; }
body.dark-theme .modal-header h3 { color: #e0e0e0; }
body.dark-theme .modal-close { color: #888; }
body.dark-theme .modal-close:hover { color: #ccc; }
body.dark-theme .modal-footer { border-top-color: #2a2a3e; }

.brand-name { font-size: 15.5px; font-weight: 700; color: var(--color-ink-strong); letter-spacing: .12em; line-height: 1.25; }
.brand-slogan { font-size: 11px; color: var(--color-ink-soft); letter-spacing: .02em; line-height: 1.25; }


.category-nav {
  display: flex; gap: 5px; flex-wrap: nowrap;
  justify-content: center; align-items: center;
  flex: 1 1 auto; min-width: 0;
  padding: 0;
  box-sizing: border-box;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE 10+ */
}
.category-nav::-webkit-scrollbar { display: none; } /* Chrome/Safari */
.category-btn {
  padding: 6px 15px; border-radius: 20px; font-size: 13px;
  color: var(--color-ink-mid); background: transparent;
  transition: all .25s cubic-bezier(.22,1,.36,1);
  white-space: nowrap; border: 1px solid transparent;
  cursor: pointer; font-weight: 500;
}
.category-btn:hover { background: var(--color-tag-bg); }
.category-btn.active {
  font-weight: 700; box-shadow: 0 2px 8px rgba(18,26,34,.10);
}

/* ========== 内容区：左侧子分类浮动栏 + 右侧文章列表 ========== */
.content-with-sidebar {
  display: flex; gap: 16px;
  align-items: flex-start;
}
/* 宽屏下增加与上方板块的间距 */
@media (min-width: 901px) {
  .content-with-sidebar { padding-top: 10px; }
}
.content-with-sidebar .content-main {
  flex: 1; min-width: 0;
}
/* 有子分类时文章列表取消自身最大宽度限制（桌面端） */
@media (min-width: 901px) {
  .content-with-sidebar.has-sidebar .article-list {
    max-width: none; margin: 12px 0;
  }
}

/* 左侧子分类浮动侧边栏 */
.sub-cat-sidebar {
  width: 120px; flex-shrink: 0;
  position: sticky; top: 80px;
  display: none;
  padding-left: 0;
}
.sub-cat-sidebar-inner {
  display: flex; flex-direction: column; gap: 6px;
}
.sub-cat-sidebar .sub-cat-title {
  font-size: 14px; color: #5C3D0E; font-weight: 800;
  letter-spacing: .06em; margin-bottom: 8px;
  text-align: center; padding-bottom: 8px;
  border-bottom: 2px solid #e8d5a0;
  white-space: nowrap;
}
.sub-cat-sidebar .category-btn.sub {
  display: block; text-align: center;
  font-size: 11px; padding: 6px 8px;
  border-radius: 10px; font-weight: 400;
  color: #8B6914; background: #fdf8f0;
  border: 1px solid #e8d5a0;
  cursor: pointer; transition: all .2s;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sub-cat-sidebar .category-btn.sub:hover {
  background: #f5ebd8; border-color: #d4b860;
}
.sub-cat-sidebar .category-btn.sub.active {
  background: linear-gradient(135deg, #f5ebe0, #fdf8f0);
  color: #6B4E0A; font-weight: 600;
  border-color: #c4a040; box-shadow: 0 1px 4px rgba(139,105,20,.15);
}
/* 返回全部 */
.sub-cat-sidebar .sub-back-all {
  display: block; text-align: center;
  font-size: 10px; padding: 4px 6px;
  border-radius: 8px; color: #999; background: #fafafa;
  border: 1px dashed #ddd; cursor: pointer; transition: all .2s;
  margin-top: 4px;
}
.sub-cat-sidebar .sub-back-all:hover {
  color: #8B6914; border-color: #d4c5a0; background: #fdf8f0;
}

/* 移动端：侧边栏隐藏，恢复顶部横排 */
@media (max-width: 900px) {
  .content-with-sidebar { flex-direction: column; padding: 0; gap: 0; align-items: stretch; }
  .content-main { flex: auto; width: 100%; }
  .sub-cat-sidebar {
    position: static; width: 100%;
    padding: 6px 16px; top: auto;
  }
  .sub-cat-sidebar-inner {
    flex-direction: row; flex-wrap: wrap; gap: 6px; align-items: center;
  }
  .sub-cat-sidebar .sub-cat-title {
    width: 100%; text-align: left; font-size: 13px;
    margin-bottom: 2px; padding-bottom: 4px;
    border-bottom: none;
  }
  .sub-cat-sidebar .sub-back-all { margin-top: 0; padding: 6px 8px; font-size: 11px; border-radius: 10px; }
  /* 移动端移除文章列表顶部间距 */
  .content-with-sidebar.has-sidebar .article-list {
    margin-top: 6px;
  }
}

.category-btn.sub {
  font-size: 11px; padding: 3px 10px;
  border-radius: 14px; font-weight: 400;
  color: #8B6914; background: #fdf8f0;
  border: 1px solid #e8d5a0;
}
.category-btn.sub:hover {
  background: #f5ebd8; border-color: #d4b860;
}
.category-btn.sub.active {
  background: linear-gradient(135deg, #f5ebe0, #fdf8f0);
  color: #6B4E0A; font-weight: 600;
  border-color: #c4a040; box-shadow: 0 1px 4px rgba(139,105,20,.15);
}

/* 桌面分类导航 — 激活态淡彩渐变（左彩右白） */
.category-btn[data-category="all"].active { background:linear-gradient(135deg,#f5f0e8 0%,#faf7f1 45%,#fff 100%); color:#8B6914; border-color:#d4c5a0; }
.category-btn[data-category="tianya"].active { background:linear-gradient(135deg,#f5ebe0 0%,#faf5ef 45%,#fff 100%); color:#8B4513; border-color:#d4a574; }
.category-btn[data-category="ancient"].active { background:linear-gradient(135deg,#f0f5e8 0%,#f6faf0 45%,#fff 100%); color:#6B8E23; border-color:#b5c98a; }
.category-btn[data-category="rarebook"].active { background:linear-gradient(135deg,#fce8e8 0%,#fef5f5 45%,#fff 100%); color:#8B0000; border-color:#d4a0a0; }
.category-btn[data-category="rareinfo"].active { background:linear-gradient(135deg,#fdf3d0 0%,#fef9eb 45%,#fff 100%); color:#B8860B; border-color:#e0c070; }
.category-btn[data-category="favorites"].active { background:linear-gradient(135deg,#ffedd5 0%,#fff7ed 45%,#fff 100%); color:#c2410c; border-color:#fdba74; }
/* 移动端搜索按钮（默认隐藏） */
.mobile-search-btn {
  display: none; font-size: 19px; cursor: pointer;
  background: none; border: none; color: var(--color-ink-mid);
  padding: 4px 6px; border-radius: 50%;
  transition: transform .2s, color .2s;
}
.mobile-search-btn:hover { color: var(--color-ink-strong); transform: scale(1.15); }


.mobile-cat-grid {
  display: none;
}
.mobile-cat-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 14px 8px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 12px; font-weight: 600; color: var(--color-ink-mid);
  cursor: pointer; transition: all .28s cubic-bezier(.22,1,.36,1);
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.mobile-cat-btn .mcat-icon { font-size: 24px; line-height: 1; }

/* 默认淡彩渐变：左彩右白 */
.mobile-cat-btn[data-category="all"] {
  background: linear-gradient(135deg, #ede9fe 0%, #f5f3ff 45%, #fff 100%);
  border-color: #e9d5ff; color: #7c3aed;
}
.mobile-cat-btn[data-category="tianya"] {
  background: linear-gradient(135deg, #f5ebe0 0%, #faf5ef 45%, #fff 100%);
  border-color: #d4a574; color: #8B4513;
}
.mobile-cat-btn[data-category="ancient"] {
  background: linear-gradient(135deg, #f0f5e8 0%, #f6faf0 45%, #fff 100%);
  border-color: #b5c98a; color: #6B8E23;
}
.mobile-cat-btn[data-category="rarebook"] {
  background: linear-gradient(135deg, #fce8e8 0%, #fef5f5 45%, #fff 100%);
  border-color: #d4a0a0; color: #8B0000;
}
.mobile-cat-btn[data-category="rareinfo"] {
  background: linear-gradient(135deg, #fdf3d0 0%, #fef9eb 45%, #fff 100%);
  border-color: #e0c070; color: #B8860B;
}
.mobile-cat-btn[data-category="favorites"] {
  background: linear-gradient(135deg, #ffedd5 0%, #fff7ed 45%, #fff 100%);
  border-color: #fed7aa; color: #ea580c;
}

/* hover / active 加深 */
.mobile-cat-btn:hover, .mobile-cat-btn.active {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
}
.mobile-cat-btn[data-category="all"]:hover,
.mobile-cat-btn[data-category="all"].active { background:linear-gradient(135deg,#ddd6fe 0%,#ede9fe 40%,#faf5ff 100%); color:#5b21b6; border-color:#c4b5fd; }
.mobile-cat-btn[data-category="tianya"]:hover,
.mobile-cat-btn[data-category="tianya"].active { background:linear-gradient(135deg,#e8d5c0 0%,#f5ebe0 40%,#fdf8f3 100%); color:#6d3410; border-color:#c08a5c; }
.mobile-cat-btn[data-category="ancient"]:hover,
.mobile-cat-btn[data-category="ancient"].active { background:linear-gradient(135deg,#d5e8b5 0%,#f0f5e8 40%,#f8faf0 100%); color:#4a6e14; border-color:#8cb958; }
.mobile-cat-btn[data-category="rarebook"]:hover,
.mobile-cat-btn[data-category="rarebook"].active { background:linear-gradient(135deg,#f0c0c0 0%,#fce8e8 40%,#fff5f5 100%); color:#6b0000; border-color:#c08080; }
.mobile-cat-btn[data-category="rareinfo"]:hover,
.mobile-cat-btn[data-category="rareinfo"].active { background:linear-gradient(135deg,#e8d070 0%,#fdf3d0 40%,#fef9eb 100%); color:#8a6008; border-color:#c8a040; }
.mobile-cat-btn[data-category="favorites"]:hover,
.mobile-cat-btn[data-category="favorites"].active { background:linear-gradient(135deg,#fed7aa 0%,#ffedd5 40%,#fff8f1 100%); color:#c2410c; border-color:#fdba74; }


.navbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; flex-wrap: nowrap; white-space: nowrap; }

#socialIconsArea {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
}
.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  font-size: 22px;
  opacity: 1;
  transition: all .2s;
  background: transparent;
}
.social-icon img { width: 22px; height: 22px; object-fit: contain; }
.social-icon:hover { opacity: 1; transform: scale(1.1); }

.search-box { position: relative; }
.search-box .search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--color-ink-soft);
  pointer-events: none;
}
.search-box input {
  padding: 7px 28px 7px 30px; border-radius: 20px;
  background: var(--color-tag-bg);
  font-size: 16px; width: 170px; max-width: 170px; color: var(--color-ink-mid);
  border: 1px solid transparent; transition: all .25s;
}
.search-box input:focus {
  width: 170px; max-width: 170px; background: var(--color-paper-strong);
  border-color: var(--color-line-strong);
  box-shadow: 0 0 0 3px rgba(99,102,241,.08);
}
.search-box input::placeholder { color: var(--color-ink-soft); }
.search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  background: none;
  border: none;
  color: var(--color-ink-soft);
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  transition: color .2s;
}
.search-clear:hover { color: var(--color-ink-mid); }

/* 桌面端搜索下拉面板 */
.desktop-search-dropdown {
  display: none;
  position: absolute; top: 110%; right: 0;
  width: 320px; max-width: calc(100vw - 32px);
  background: var(--color-paper-strong);
  border: 1px solid var(--color-card-border);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,.12), 0 4px 16px rgba(0,0,0,.06);
  padding: 16px;
  z-index: 100;
  box-sizing: border-box;
}
.desktop-search-dropdown.show { display: block; }
.desktop-search-hot-title {
  font-size: 12px; font-weight: 700; color: var(--color-ink-soft);
  text-transform: uppercase; letter-spacing: .05em;
  margin-bottom: 10px; display: block;
}
.desktop-search-hot-tags {
  display: flex; flex-wrap: wrap; gap: 8px;
}
body.dark-theme .desktop-search-dropdown {
  background: #1a1f2e; border-color: rgba(148,163,184,.2);
}

/* 桌面端热门搜索关键词 */
.desktop-hot-bar {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  max-width: var(--layout-width);
  margin: 0 auto;
  padding: 8px 24px 4px;
}
.desktop-hot-bar:empty { display: none; }
.desktop-hot-bar .hot-tag, .desktop-search-hot-tags .hot-tag {
  font-family: inherit; font-size: 12px;
  padding: 5px 12px;
  border-radius: 14px;
  color: var(--color-ink-mid);
  background: var(--color-paper-strong);
  border: 1px solid var(--color-card-border);
  box-shadow: 0 1px 3px rgba(17,24,39,.04);
  cursor: pointer;
  user-select: none;
}
.desktop-hot-bar .hot-tag:hover, .desktop-search-hot-tags .hot-tag:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}
body.dark-theme .desktop-hot-bar .hot-tag, body.dark-theme .desktop-search-hot-tags .hot-tag {
  background: rgba(15,23,42,.5);
  border-color: rgba(148,163,184,.2);
  color: #cbd5e1;
}
body.dark-theme .desktop-hot-bar .hot-tag:hover, body.dark-theme .desktop-search-hot-tags .hot-tag:hover {
  color: #93c5fd;
  border-color: #60a5fa;
}
@media (max-width: 768px) {
  .desktop-hot-bar { display: none; }
}

.theme-toggle,
.user-center-btn {
  box-sizing: border-box;
  width: 40px; height: 40px; border-radius: 50%;
  /* 在 flex 容器中 button 默认 min-width:auto 会被内容撑大，必须显式清零 */
  min-width: 0; min-height: 0;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none;
  margin-left: 4px;
  padding: 0;
  color: var(--color-ink-mid);
  background: transparent;
  border: 1px solid var(--color-line-strong);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  line-height: 1;
  vertical-align: middle;
  overflow: hidden;
  transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease;
}
.theme-toggle { position: relative; }
/* Firefox 中 button 默认有 ::-moz-focus-inner 内边距，会导致边框不一致 */
.theme-toggle::-moz-focus-inner { border: 0; padding: 0; }
.theme-toggle svg,
.user-center-btn svg {
  width: 20px; height: 20px;
  display: block;
  flex-shrink: 0;
}
.theme-toggle:hover,
.user-center-btn:hover {
  color: var(--color-accent);
  background: rgba(233, 69, 96, 0.06);
  border-color: rgba(233, 69, 96, 0.25);
  transform: translateY(-1px);
}
.theme-toggle:active,
.user-center-btn:active {
  transform: translateY(0) scale(0.96);
}
body.dark-theme .theme-toggle,
body.dark-theme .user-center-btn,
body.dark-theme .mobile-search-btn {
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.35);
  background: rgba(30, 41, 59, 0.25);
}
body.dark-theme .theme-toggle:hover,
body.dark-theme .user-center-btn:hover,
body.dark-theme .mobile-search-btn:hover {
  color: #F59E0B;
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.45);
}

/* 移动端搜索面板暗色 */
body.dark-theme .mobile-search-panel { background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%); }
body.dark-theme .mobile-search-panel-label { color: #64748b; }
body.dark-theme .mobile-search-panel-close { background: rgba(255,255,255,.08); color: #94a3b8; }
body.dark-theme .mobile-search-panel-close:hover { background: rgba(255,255,255,.12); color: #e2e8f0; }
body.dark-theme .mobile-search-panel-title { color: #f1f5f9; }
body.dark-theme .mobile-search-panel-desc { color: #94a3b8; }
body.dark-theme .mobile-search-input-wrap { background: rgba(15,23,42,.6); border-color: rgba(148,163,184,.2); }
body.dark-theme .mobile-search-input-wrap input { color: #f1f5f9; }
body.dark-theme .mobile-search-input-wrap input::placeholder { color: #64748b; }
body.dark-theme .mobile-search-input-wrap:focus-within { border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(96,165,250,.2); }
body.dark-theme .mobile-search-hot-title { color: #e2e8f0; }
body.dark-theme .mobile-search-hot-tag { background: rgba(15,23,42,.5); border-color: rgba(148,163,184,.2); color: #cbd5e1; }
body.dark-theme .mobile-search-hot-tag:hover { background: rgba(37,99,235,.15); border-color: #60a5fa; color: #93c5fd; }

/* 移动端侧滑导航暗色 */
body.dark-theme .mobile-nav { background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%); }
body.dark-theme .mobile-nav-item { color: #f1f5f9; }
body.dark-theme .mobile-nav-item:hover,
body.dark-theme .mobile-nav-item:active { background: rgba(37,99,235,.15); color: #93c5fd; }
body.dark-theme .mobile-nav-overlay { background: rgba(2,6,23,.55); }

/* 移动端搜索面板默认隐藏，仅在 <=768px 显示 */
.mobile-search-panel {
  display: none;
}

/* 移动端侧滑导航默认隐藏 */
.mobile-nav,
.mobile-nav-overlay {
  display: none;
}

.hero-banner {
  position: relative; overflow: hidden; border-radius: 14px;
  margin: 20px 0 0;
  aspect-ratio: 1920 / 800; height: auto; box-shadow: 0 4px 24px rgba(0,0,0,.10);
  cursor: pointer;
}
/* Banner 响应式 */
@media (max-width: 1140px) {
  .hero-banner { background: #f5f0e8; }
}
@media (max-width: 768px) {
  .hero-banner { border-radius: 12px; margin: 12px 0 0; background: #f5f0e8; }
}
@media (max-width: 1140px) {
  .banner-slides { position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important; }
  .banner-item { position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important; opacity: 0; filter: blur(6px); display: block; }
  .banner-item.active { opacity: 1 !important; filter: blur(0) !important; z-index: 2 !important; }
  .banner-item img { width: 100% !important; height: 100% !important; object-fit: cover !important; display: block; background-color: transparent !important; }
  .hero-banner::before { border-radius: 14px; }
}
@media (max-width: 768px) {
  .hero-banner::before { border-radius: 12px; }
}
@media (max-width: 480px) {
  .banner-item img { object-fit: cover !important; background-color: transparent !important; }
}
/* Hero Banner 顶部渐变遮罩 */
.hero-banner::before {
  content: "";
  position: absolute; inset: 0; z-index: 3;
  background: linear-gradient(180deg, rgba(0,0,0,.05) 0%, transparent 30%, transparent 70%, rgba(0,0,0,.15) 100%);
  pointer-events: none;
  border-radius: 14px;
}

.banner-slides { width: 100%; height: 100%; position: absolute; top: 0; left: 0; z-index: 2; }
.banner-item {
  position: absolute; inset: 0;
  opacity: 0; z-index: 1;
  filter: blur(6px);
  transition: opacity .8s cubic-bezier(.4,0,.2,1), 
              filter .8s cubic-bezier(.4,0,.2,1);
}
.banner-item.active {
  opacity: 1; z-index: 2;
  filter: blur(0);
}
.banner-bg {
  width: 100%; height: 100%;
  background-size: cover; background-position: center;
  background-color: #e8e8e8;
}
.banner-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  /* 图片加载时渐显 */
  animation: imgFadeIn .4s ease-out;
  background-color: #e8e8e8;
}

/* 首页骨架屏：Banner + 文章卡片 */
.banner-skeleton {
  position: absolute; inset: 0; z-index: 5;
  background: #ede8e0;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .3s ease;
}
.banner-skeleton.hidden { opacity: 0; pointer-events: none; }
.skeleton-shimmer {
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.35) 50%, transparent 100%);
  animation: skeletonShimmer 1.6s infinite;
}
.article-skeleton-list {
  display: flex; flex-direction: column; gap: 16px;
  padding: 16px 0;
}
.article-card-skeleton {
  width: 100%; height: 140px;
  border-radius: 12px;
  background: #ede8e0;
  overflow: hidden;
  position: relative;
}
.article-card-skeleton::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.35) 50%, transparent 100%);
  animation: skeletonShimmer 1.6s infinite;
}
@keyframes skeletonShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
body.dark-theme .banner-skeleton,
body.dark-theme .article-card-skeleton { background: #1a1f2e; }
body.dark-theme .skeleton-shimmer,
body.dark-theme .article-card-skeleton::after {
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.08) 50%, transparent 100%);
}
@keyframes imgFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
/* 轮播指示点 */
.banner-dots {
  position: absolute; bottom: 20px; left: 50%;
  transform: translateX(-50%); display: flex; gap: 10px; z-index: 5;
}
.banner-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,.35); cursor: pointer;
  transition: all .3s ease; border: none; padding: 0;
  -webkit-appearance: none; appearance: none;
}
.banner-dot.active { background: #fff; width: 28px; border-radius: 5px; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.banner-dot:hover { background: rgba(255,255,255,.70); }

/* Banner 切换箭头 - 隐藏 */
.banner-arrow {
  display: none;
}


.ticker-bar {
  margin: 12px 0 0;
  background: rgba(245,240,232,.75);
  border-radius: 14px;
  border: 1px solid rgba(139,105,20,.10);
  display: flex; align-items: center; padding: 10px 20px;
  overflow: hidden; gap: 12px;
  box-shadow: 0 2px 10px rgba(139,105,20,.06);
  transition: border-color .3s, box-shadow .3s, background .3s;
}
.ticker-bar:hover {
  border-color: rgba(139,105,20,.18);
  box-shadow: 0 4px 14px rgba(139,105,20,.08);
  background: rgba(237,228,211,.85);
}
.ticker-label {
  font-size: 12.5px; font-weight: 600; color: #fff;
  white-space: nowrap; flex-shrink: 0;
  display: flex; align-items: center; gap: 6px;
  padding: 5px 14px; border-radius: 20px;
  background: linear-gradient(135deg, #8B6914, #6B4E0A);
  box-shadow: 0 2px 10px rgba(139,105,20,.25);
  cursor: pointer;
  transition: opacity .2s, transform .2s;
}
.ticker-label:hover {
  opacity: .9;
  transform: scale(1.04);
}
@keyframes tickerPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(1.3); }
}
.ticker-scroll-wrap {
  overflow: hidden !important; flex: 1; min-width: 0;
  position: relative;
}
.ticker-scroll {
  display: flex; gap: 48px; animation: tickerScroll 30s linear infinite;
  width: max-content; white-space: nowrap;
}
.ticker-scroll:hover {
  animation-play-state: paused;
}
.ticker-item {
  font-size: 13px; color: var(--color-ink-mid); white-space: nowrap;
  padding: 5px 12px; padding-right: 36px; position: relative; flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 8px;
  line-height: 1.4; border-radius: 8px;
  cursor: pointer;
  transition: all .25s ease;
}
.ticker-item:hover {
  color: var(--color-ink-strong);
  background: rgba(102,126,234,.06);
  transform: translateY(-1px);
}
.ticker-item .ticker-badge {
  font-size: 11px; padding: 2px 8px; border-radius: 10px; border: 1px solid;
  font-weight: 600; flex-shrink: 0; letter-spacing: .02em;
}
.ticker-badge.tianya { background: linear-gradient(135deg, #f5ebe0, #fdf8f0); color: #8B4513; border-color: #d4a574; }
.ticker-badge.ancient { background: linear-gradient(135deg, #f0f5e8, #f8faf0); color: #6B8E23; border-color: #b5c98a; }
.ticker-badge.rarebook { background: linear-gradient(135deg, #fce8e8, #fff5f5); color: #8B0000; border-color: #d4a0a0; }
.ticker-badge.rareinfo { background: linear-gradient(135deg, #fdf3d0, #fef9eb); color: #B8860B; border-color: #e0c070; }
/* 动态分类（不在预定义列表中的用通用渐变) */
.ticker-badge { background: linear-gradient(135deg, #f5ebe0, #fdf8f0); border-color: #d4c5a0; color: #8B6914; }
/* 日期部分灰色 */
.ticker-item .ticker-date {
  color: var(--color-ink-soft); font-size: 12.5px;
  flex-shrink: 0; font-variant-numeric: tabular-nums;
}
/* 分隔竖线 */
.ticker-item::after {
  content: ""; position: absolute; right: 16px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 3px; border-radius: 50%;
  background: #d1d5db;
}
@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}


.article-list {
  margin: 12px 0 26px;
}
#articleList, #todayArticleList {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

/* 空状态 */
.empty {
  text-align: center; padding: 60px 20px;
  color: var(--color-ink-soft); font-size: 15px;
  grid-column: 1 / -1;
}
.empty-icon { font-size: 48px; display: block; margin-bottom: 12px; }
.empty-search .empty-icon { font-size: 56px; }
.empty-search strong { display: block; font-size: 17px; color: var(--color-ink-mid); margin-bottom: 6px; }
.empty-search p { font-size: 13px; color: var(--color-ink-soft); }

/* 搜索结果计数 */
.search-result-count {
  text-align: center; padding: 8px 0 4px; font-size: 12.5px;
  color: var(--color-ink-soft); letter-spacing: .02em;
  grid-column: 1 / -1;
}
.search-result-count strong { color: var(--color-accent-blue); font-weight: 700; }


.article-card {
  background: var(--color-paper-strong); border-radius: 16px; overflow: hidden;
  border: 1px solid var(--color-card-border);
  cursor: pointer;
  touch-action: manipulation;
  transition: transform .25s cubic-bezier(.22,1,.36,1),
              box-shadow .25s cubic-bezier(.22,1,.36,1),
              border-color .25s;
  display: flex; flex-direction: row; align-items: stretch;
  position: relative;
  box-shadow: var(--color-card-shadow);
  content-visibility: auto;
  contain-intrinsic-size: auto 180px;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--color-card-shadow-hover);
  border-color: rgba(17,24,39,.12);
}

/* 卡片封面图 — 固定大小不放大 + hover微缩放 */
.article-card-img {
  width: 160px; flex-shrink: 0; background-size: cover;
  background-position: center; border-radius: 12px;
  margin: 16px 0 16px 16px;
  aspect-ratio: 4 / 3;
  transition: transform .35s cubic-bezier(.22,1,.36,1);
  /* 提升渲染性能 */
  background-color: #e8e8e8;
  will-change: transform;
  transform: translateZ(0);
}
/* 懒加载背景图加载后渐显 */
.article-card-img[data-bg] {
  transition: transform .35s cubic-bezier(.22,1,.36,1);
}
.article-card-img:not([data-bg]) {
  animation: cardImgReveal .5s ease-out;
}
@keyframes cardImgReveal {
  from { opacity: 0.7; }
  to { opacity: 1; }
}
.article-card:hover .article-card-img {
  transform: scale(1.04);
}

/* 卡片交错入场动画 */
.card-animate {
  opacity: 0;
  transform: translateY(24px);
  animation: cardFadeIn .45s cubic-bezier(.22,1,.36,1) forwards;
}
@keyframes cardFadeIn {
  to { opacity: 1; transform: translateY(0); }
}

/* 卡片内容区 — 图文之间有间隙 */
.article-card-body {
  padding: 18px 20px 18px 18px; display: flex; flex-direction: column;
  flex: 1; min-width: 0; justify-content: space-between;
}
.article-card-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 10px; margin-bottom: 8px;
}
.article-card-title {
  font-size: 15.5px; font-weight: 700; color: var(--color-ink-strong);
  line-height: 1.42; flex: 1; min-width: 0;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
  letter-spacing: -.01em;
}
.article-card-date {
  font-size: 11.5px; color: var(--color-ink-soft); white-space: nowrap;
  flex-shrink: 0; margin-left: 4px; padding-top: 2px;
  font-variant-numeric: tabular-nums;
}
.article-card-desc {
  font-size: 13px; color: var(--color-ink-mid); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 8px; flex-shrink: 0;
}
.article-card-platform {
  font-size: 11.5px; color: var(--color-ink-soft); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 1;
  -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 10px;
}
.article-card-tags {
  display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto;
}

/* 标签药丸 .tag-pill — 随机多彩渐变 */
.tag-pill {
  font-size: 11px; padding: 3px 11px; border-radius: 14px; font-weight: 600;
  border: 1px solid transparent;
  transition: transform .2s ease, box-shadow .2s;
}
.tag-pill:hover { transform: translateY(-1px); }
.tag-c1 { background: linear-gradient(135deg, #dbeafe, #eff6ff); color: #1d4ed8; border-color: #93c5fd; }
.tag-c2 { background: linear-gradient(135deg, #d1fae5, #ecfdf5); color: #047857; border-color: #6ee7b7; }
.tag-c3 { background: linear-gradient(135deg, #fef3c7, #fffbeb); color: #b45309; border-color: #fcd34d; }
.tag-c4 { background: linear-gradient(135deg, #fce7f3, #fdf2f8); color: #be185d; border-color: #f9a8d4; }
.tag-c5 { background: linear-gradient(135deg, #ede9fe, #f5f3ff); color: #6d28d9; border-color: #c4b5fd; }
.tag-c6 { background: linear-gradient(135deg, #ffe4e6, #fff1f2); color: #be123c; border-color: #fda4af; }
.tag-c7 { background: linear-gradient(135deg, #cffafe, #ecfeff); color: #0e7490; border-color: #67e8f9; }
.tag-c8 { background: linear-gradient(135deg, #dcfce7, #f0fdf4); color: #15803d; border-color: #86efac; }

/* ===== 广告位卡片 ===== */
.sp-card {
  background: linear-gradient(135deg, #fef9f0, #fff7ed);
  border: 1px dashed #fbbf24;
  border-radius: 16px;
  overflow: hidden;
  display: flex; flex-direction: row; align-items: stretch;
  position: relative;
  cursor: pointer;
  transition: transform .25s cubic-bezier(.22,1,.36,1),
              box-shadow .25s cubic-bezier(.22,1,.36,1),
              border-color .25s;
  box-shadow: var(--color-card-shadow);
}
.sp-card:hover {
  border-color: #f59e0b;
  box-shadow: var(--color-card-shadow-hover);
  transform: translateY(-4px);
}
.sp-card-badge {
  position: absolute; top: 10px; right: 10px; z-index: 3;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #fff; font-size: 10px; font-weight: 700;
  padding: 3px 10px; border-radius: 10px;
  letter-spacing: .05em;
}
.sp-card-media {
  width: 160px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(245,158,11,.08);
  margin: 16px 0 16px 16px;
  border-radius: 12px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.sp-card-media .sp-card-img {
  width: 100%; height: 100%; object-fit: cover;
}
.sp-card-icon {
  font-size: 42px; line-height: 1;
}
.sp-card-body {
  padding: 18px 20px 18px 18px;
  display: flex; flex-direction: column;
  flex: 1; min-width: 0;
  justify-content: center;
}
.sp-card-title {
  font-size: 15.5px; font-weight: 700; color: #92400e;
  margin-bottom: 8px;
}
.sp-card-desc {
  font-size: 13px; color: #a16207;
  line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 12px;
}
.sp-card-btn {
  align-self: flex-start;
  padding: 6px 18px; border-radius: 16px;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #fff; font-size: 12px; font-weight: 700;
  border: none; cursor: pointer;
  transition: all .2s;
}
.sp-card-btn:hover {
  box-shadow: 0 4px 12px rgba(245,158,11,.3);
}

body.dark-theme .sp-card {
  background: linear-gradient(135deg, rgba(245,158,11,.08), rgba(251,191,36,.04));
  border-color: rgba(245,158,11,.25);
}
body.dark-theme .sp-card:hover {
  border-color: rgba(245,158,11,.4);
}
body.dark-theme .sp-card-media { background: rgba(245,158,11,.05); }
body.dark-theme .sp-card-title { color: #fcd34d; }
body.dark-theme .sp-card-desc { color: #fbbf24; }


.pagination.feed-pagination,
.pagination {
  display: flex; justify-content: center; align-items: center;
  gap: 6px; padding: 32px 20px 44px;
}
.page-btn, .page-num {
  min-width: 44px; height: 44px; padding: 0 14px;
  display: inline-flex; align-items: center;
  justify-content: center; border-radius: 10px; font-size: 14px;
  border: 1px solid var(--color-card-border);
  background: var(--color-paper-strong); color: var(--color-ink-mid);
  transition: all .2s cubic-bezier(.22,1,.36,1);
  box-shadow: 0 2px 6px rgba(18,26,34,.04);
  cursor: pointer;
}
.page-btn:hover:not(:disabled), .page-num:hover {
  border-color: var(--color-accent); color: var(--color-accent);
  box-shadow: 0 4px 12px rgba(233,69,96,.12);
}
.page-btn:disabled { opacity: .35; cursor: not-allowed; }
.page-num.active {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(37,99,235,.30);
  font-weight: 700;
}
.page-ellipsis { color: var(--color-ink-soft); font-size: 13px; padding: 0 4px; }
.page-jump-box {
  width: 52px; height: 36px; text-align: center; border-radius: 9px;
  border: 1px solid var(--color-card-border);
  background: var(--color-paper-strong); color: var(--color-ink-mid);
  font-size: 13px; outline: none;
  transition: all .2s;
}
.page-jump-box:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(233,69,96,.08);
}


.about-section {
  margin: 0 0 40px; padding: 0;
}
.about-title {
  text-align: center; font-size: 11px; font-weight: 800;
  color: var(--color-ink-soft); letter-spacing: .16em;
  margin: 24px 0 16px;
  position: relative;
}
.about-title::after {
  content: "";
  display: block; width: 40px; height: 2px; margin: 8px auto 0;
  background: linear-gradient(90deg, #93c5fd, #c4b5fd);
  border-radius: 1px;
}
.about-card-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

/* 浅色模式底部关于卡片统一为白底淡灰边框 */
.about-mini-card {
  background: #fff;
  border: 1px solid rgba(17,24,39,.08);
  border-radius: 18px;
  display: grid; grid-template-columns: 38px minmax(0, 1fr);
  align-items: center; gap: 11px; padding: 10px 13px;
  position: relative; overflow: hidden;
  box-shadow: 0 2px 10px rgba(17,24,39,.04), 0 1px 3px rgba(17,24,39,.02);
  min-height: 68px;
  cursor: pointer;
  transition: transform .28s cubic-bezier(.22,1,.36,1),
              border-color .28s ease,
              box-shadow .28s ease;
}
.about-mini-card:hover {
  border-color: rgba(17,24,39,.14);
  box-shadow: 0 8px 24px rgba(17,24,39,.08), 0 2px 6px rgba(17,24,39,.03);
}
.about-mini-card.about-trigger,
.about-mini-card.feedback-card,
.about-mini-card.disclaimer-card,
.about-mini-card.submit-card {
  background: #fff;
  border-color: rgba(17,24,39,.08);
}
.about-mini-card.about-trigger:hover { border-color: rgba(59,130,246,.35); }
.about-mini-card.feedback-card:hover { border-color: rgba(6,182,212,.35); }
.about-mini-card.disclaimer-card:hover { border-color: rgba(245,158,11,.35); }
.about-mini-card.submit-card:hover { border-color: rgba(236,72,153,.35); }
.about-mini-card::before {
  content: "";
  position: absolute; top: -30px; right: -30px;
  width: 80px; height: 80px;
  background: radial-gradient(circle, rgba(99,102,241,.07) 0%, transparent 70%);
  pointer-events: none;
}
.about-trigger-mark,
.feedback-card-icon,
.disclaimer-card-icon,
.submit-card-icon {
  width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
/* About 图标彩色圆底 */
.about-trigger-mark { background: linear-gradient(135deg, #bfdbfe 0%, #e0f2fe 50%, #eff6ff 100%); box-shadow: inset 0 1px 1px rgba(255,255,255,.6), 0 2px 6px rgba(59,130,246,.12); transition: transform .3s cubic-bezier(.34,1.56,.64,1); }
.feedback-card-icon { background: linear-gradient(135deg, #a5f3fc 0%, #cffafe 50%, #ecfeff 100%); box-shadow: inset 0 1px 1px rgba(255,255,255,.6), 0 2px 6px rgba(6,182,212,.12); transition: transform .3s cubic-bezier(.34,1.56,.64,1); }
.disclaimer-card-icon { background: linear-gradient(135deg, #fde68a 0%, #fef3c7 50%, #fffbeb 100%); box-shadow: inset 0 1px 1px rgba(255,255,255,.6), 0 2px 6px rgba(245,158,11,.12); transition: transform .3s cubic-bezier(.34,1.56,.64,1); }
.submit-card-icon { background: linear-gradient(135deg, #fbcfe8 0%, #fce7f3 50%, #fdf2f8 100%); box-shadow: inset 0 1px 1px rgba(255,255,255,.6), 0 2px 6px rgba(236,72,153,.12); transition: transform .3s cubic-bezier(.34,1.56,.64,1); }
.about-mini-card:hover .about-trigger-mark,
.about-mini-card:hover .feedback-card-icon,
.about-mini-card:hover .disclaimer-card-icon,
.about-mini-card:hover .submit-card-icon { transform: scale(1.1) rotate(-3deg); }
/* 关于卡片文字区域（匹配实际HTML结构） */
.about-trigger-copy,
.feedback-card-copy,
.disclaimer-card-copy,
.submit-card-copy {
  display: flex; flex-direction: column; gap: 2px;
  position: relative; z-index: 1;
}
.about-trigger-copy strong,
.feedback-card-copy strong,
.disclaimer-card-copy strong,
.submit-card-copy strong {
  font-size: 13px; font-weight: 600; color: var(--color-ink-strong); line-height: 1.3;
}
.about-trigger-copy span,
.feedback-card-copy span,
.disclaimer-card-copy span,
.submit-card-copy span {
  font-size: 11px; color: var(--color-ink-soft); line-height: 1.4;
}



/* ---- 详情弹窗（三板块：左文+信息 / 右图 / 下按钮） ---- */
.detail-overlay {
  position: fixed; inset: 0; z-index: 1200;
  background: rgba(14,20,27,.40);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 24px; opacity: 0; visibility: hidden;
  overscroll-behavior: contain;
  overflow: hidden;
  transition: opacity .35s ease, visibility .35s ease;
}
.detail-overlay.show { opacity: 1; visibility: visible; }

/* 弹窗主体 — 加大 */
.detail-modal {
  background: radial-gradient(circle at 0% 0%, rgba(99,102,241,.03) 0%, transparent 50%), #fff;
  border-radius: 18px;
  width: 100%; max-width: 940px;
  max-height: 90dvh;
  position: relative;
  box-shadow: 0 32px 88px rgba(14,20,27,.20), 0 8px 28px rgba(14,20,27,.10);
  display: flex; flex-direction: column;
  margin: auto 0;
  overflow: hidden;
}
.detail-close { position: absolute; top: -15px; right: -15px; z-index: 25; width: 30px; height: 30px; border-radius: 50%; background: #e5e7eb; color: rgba(0,0,0,.55); font-size: 18px; display: flex; align-items: center; justify-content: center; transition: background .2s, color .2s; cursor: pointer; border: none; line-height: 1; overflow: visible; }
.detail-close:hover { background: #d1d5db; color: rgba(0,0,0,.8); }

/* 弹窗顶部 meta 操作区 */
.detail-meta-actions {
  display: flex; align-items: center; gap: 8px;
  margin-left: auto;
}
.detail-fav-btn {
  width: 30px; height: 30px; border-radius: 50%;
  background: #f0f2f5; color: #999;
  font-size: 15px; display: flex; align-items: center; justify-content: center;
  transition: all .2s; cursor: pointer; border: none; line-height: 1;
  padding: 0;
}
.detail-fav-btn:hover { background: #ffe0e6; color: #e94560; transform: scale(1.1); }
.detail-fav-btn.favorited { color: #e94560; background: #ffe0e6; }
.detail-share-btn {
  padding: 5px 14px; border-radius: 16px;
  background: #f0f2f5; color: #666;
  font-size: 12px; font-weight: 600; cursor: pointer;
  border: 1px solid #e0e0e0;
  transition: all .2s;
  display: inline-flex; align-items: center; gap: 4px;
}
.detail-share-btn:hover { background: #e8f0fe; color: #1890ff; border-color: #1890ff; }

/* 详情分享面板 */
.detail-share-wrap { position: relative; }
.detail-share-panel {
  display: none;
  position: absolute; top: 110%; right: 0;
  background: var(--color-paper-strong);
  border: 1px solid var(--color-card-border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  padding: 8px;
  z-index: 30;
  min-width: 130px;
}
.detail-share-panel.show { display: flex; flex-direction: column; gap: 4px; }
.share-platform {
  padding: 8px 12px; border-radius: 8px; font-size: 12px;
  border: none; background: none; cursor: pointer;
  text-align: left; color: var(--color-ink-mid);
  transition: all .2s; display: flex; align-items: center; gap: 6px;
}
.share-platform:hover { background: #f0f2f5; }
.share-platform.wechat:hover { color: #07c160; }
.share-platform.qq:hover { color: #12b7f5; }
.share-platform.weibo:hover { color: #e6162d; }
.share-platform.copy:hover { color: #6366f1; }

body.dark-theme .detail-close { background: #e5e7eb; color: rgba(0,0,0,.55); }
body.dark-theme .detail-close:hover { background: #d1d5db; color: rgba(0,0,0,.8); }
body.dark-theme .detail-fav-btn { background: rgba(255,255,255,.07); color: #94a3b8; }
body.dark-theme .detail-fav-btn:hover { background: rgba(233,69,96,.15); color: #e94560; }
body.dark-theme .detail-fav-btn.favorited { color: #e94560; background: rgba(233,69,96,.15); }
body.dark-theme .detail-share-btn { background: rgba(255,255,255,.07); color: #94a3b8; border-color: rgba(255,255,255,.1); }
body.dark-theme .detail-share-btn:hover { background: rgba(24,144,255,.1); color: #60a5fa; border-color: #60a5fa; }
body.dark-theme .detail-share-panel { background: #1a1f2e; border-color: rgba(148,163,184,.2); }
body.dark-theme .share-platform { color: #cbd5e1; }
body.dark-theme .share-platform:hover { background: rgba(255,255,255,.08); }

/* ===== 上部板块：左文+信息 / 右图 ===== */
.detail-body {
  display: flex; gap: 26px;
  padding: 30px 30px 22px;
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto;
}

/* 左侧 — 文字 + 信息卡片 */
.detail-left {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  background: #fff; border-radius: 12px;
  border: 1px solid rgba(0,0,0,.06);
  padding: 20px 22px 16px;
}

/* 右侧 — 图片区 */
.detail-right {
  width: 400px; flex-shrink: 0;
  background: #fafbfc; border-radius: 12px;
  border: 1px solid rgba(0,0,0,.06);
  padding: 14px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}

/* 顶部分类+社交图标行 */
.detail-meta-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.detail-cat-tag {
  display: inline-block; padding: 4px 14px; border-radius: 18px;
  font-size: 12px; font-weight: 600;
  border: 1px solid transparent;
  background: linear-gradient(135deg,#f5ebe0,#fdf8f0); color:#8B6914; border-color:#d4c5a0;
}
/* 详情弹窗分类标签 — 按分类着色 */
.detail-cat-tag.cat-tianya { background: linear-gradient(135deg,#f5ebe0,#faf5ef); color:#8B4513; border-color:#d4a574; }
.detail-cat-tag.cat-ancient { background: linear-gradient(135deg,#f0f5e8,#f6faf0); color:#6B8E23; border-color:#b5c98a; }
.detail-cat-tag.cat-rarebook { background: linear-gradient(135deg,#fce8e8,#fef5f5); color:#8B0000; border-color:#d4a0a0; }
.detail-cat-tag.cat-rareinfo { background: linear-gradient(135deg,#fdf3d0,#fef9eb); color:#B8860B; border-color:#e0c070; }
/* 标题 */
.detail-title {
  font-size: 21px; font-weight: 700; color: var(--color-ink-strong);
  line-height: 1.35; margin-bottom: 8px; letter-spacing: -.01em;
}

/* 描述 */
.detail-desc {
  font-size: 13px; color: var(--color-ink-mid); line-height: 1.68;
  margin-bottom: 12px;
}

/* 标签行 */
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.dtag {
  font-size: 11px; padding: 3px 11px; border-radius: 14px;
  color: var(--color-ink-mid); font-weight: 500;
  border: 1px solid transparent;
}

/* 信息卡片 — 在左侧内部，紧贴标签下方 */
.detail-info-grid {
  display: flex; flex-direction: column;
  background: #f7f8fa; border: 1px solid rgba(0,0,0,.06);
  border-radius: 11px; overflow: hidden;
  margin-top: auto;
}
.info-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 18px; border-bottom: 1px solid rgba(0,0,0,.05);
  font-size: 13px; overflow: hidden;
  gap: 12px;
}
.info-row:last-child { border-bottom: none; }
@media (max-width: 480px) {
  .info-row {
    padding: 12px 16px;
    gap: 10px;
  }
  .info-label { flex-shrink: 1; }
  .info-value { flex-shrink: 0; }
}
.info-label {
  color: var(--color-ink-soft); white-space: nowrap;
  display: flex; align-items: center; gap: 6px; font-size: 13px;
  flex-shrink: 0;
}
.info-value {
  color: var(--color-ink-strong); font-weight: 500;
  text-align: right; min-width: 0; word-break: break-all;
}

/* 适用设备标签 — 超过3个自动换行 */
#detailPlatform {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}

.pf-badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11.5px; padding: 3px 11px; border-radius: 6px;
  margin-left: 4px; font-weight: 500; border: 1px solid transparent;
  white-space: nowrap;
}
.pf-badge.win { background: #eef4ff; color: #2563eb; border-color: #dce7ff; }
.pf-badge.mac { background: #fef2f2; color: #dc2626; border-color: #fecaca; }
.pf-badge.default { background: var(--color-tag-bg); color: var(--color-ink-mid); }

/* 封面图 */
.detail-cover {
  border-radius: 18px; overflow: hidden; flex-shrink: 0;
  background-size: cover; background-position: center;
  aspect-ratio: 4 / 3; width: 100%;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.detail-cover img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 18px; }

/* ===== 下部板块：仅按钮区 ===== */
.detail-bottom {
  padding: 10px 30px 26px;
  text-align: center;
  flex-shrink: 0;
  background: inherit;
}
.tag-pill { cursor: pointer; }
.tag-pill:hover { opacity: .8; transform: scale(1.05); }
.dtag[style*="cursor:pointer"]:hover { opacity: .8; }
.detail-hint {
  font-size: 14.5px; font-weight: 600; color: var(--color-ink-mid);
  margin-bottom: 14px; letter-spacing: .02em;
}
.detail-action-btn {
  display: block; width: 100%; padding: 15px 32px; border-radius: 28px;
  font-size: 15.5px; font-weight: 700;
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 50%, #8b5cf6 100%);
  background-size: 200% 200%;
  color: #fff; transition: transform .25s, box-shadow .25s, background-position .4s;
  border: none; cursor: pointer;
  letter-spacing: .03em;
  box-shadow:
    0 4px 14px rgba(17,24,39,.12),
    0 0 0 1px rgba(255,255,255,.1) inset,
    0 1px 0 rgba(255,255,255,.15) inset;
  animation: btnShimmer 3s ease-in-out infinite;
}
@keyframes btnShimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.detail-action-btn:hover { transform: scale(1.02) translateY(-1px); box-shadow: 0 8px 24px rgba(17,24,39,.18), 0 0 0 1px rgba(255,255,255,.12) inset; background-position: 100% 50%; }

/* ---- 模态弹窗（共享样式：反馈/投稿）---- */
.about-modal-layer {
  position: fixed; inset: 0; z-index: 2000;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(8,14,24,.42);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; opacity: 0; visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
  overscroll-behavior: contain;
}
.about-modal-layer.show { opacity: 1; visibility: visible; }

.about-modal-card {
  background: radial-gradient(circle at 30% 0%, rgba(99,102,241,.05) 0%, transparent 50%), var(--color-surface-strong);
  border: 1px solid var(--color-card-border);
  border-radius: 24px;
  width: min(100%, 440px);
  max-height: min(760px, calc(100dvh - 48px));
  padding: 22px 22px 20px;
  box-shadow: 0 24px 54px rgba(18,26,34,.18);
  overflow-y: auto; position: relative;
}
.about-modal-close {
  position: absolute; top: 14px; right: 16px; z-index: 20;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(18,26,34,.06); color: var(--color-ink-soft);
  font-size: 16px; display: flex; align-items: center; justify-content: center;
  transition: all .2s; cursor: pointer; border: none; line-height: 1;
}
.about-modal-close:hover { background: rgba(18,26,34,.12); color: var(--color-ink-mid); }

.about-modal-head {
  text-align: center; margin-bottom: 18px;
}
.about-modal-mark {
  width: 72px; height: 72px; border-radius: 22px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px; font-size: 30px; color: #fff;
  box-shadow: 0 8px 24px rgba(102,126,234,.25);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
}
.about-modal-mark:hover {
  transform: scale(1.05) rotate(-5deg);
}
.about-modal-head h2 {
  text-align: center; font-size: 18px; font-weight: 700;
  color: var(--color-ink-strong); margin-bottom: 4px; letter-spacing: -.01em;
}
.about-modal-head span {
  display: block; text-align: center; font-size: 13px; color: var(--color-ink-soft);
  line-height: 1.5;
}

/* ---- 免责声明弹窗内容 ---- */
.disclaimer-modal-body {
  font-size: 14px; line-height: 1.8;
  color: var(--color-ink-mid);
  white-space: pre-wrap;
  text-align: left;
  padding: 6px 4px;
}

/* ---- 反馈表单 ---- */
.feedback-form { display: flex; flex-direction: column; gap: 16px; }
.feedback-form .form-group {
  display: flex; flex-direction: column; gap: 6px;
  text-align: left;
}
.feedback-form label {
  font-size: 13px; font-weight: 600; color: var(--color-ink-mid);
}
.feedback-form .required { color: #e94560; }
.feedback-form .form-control {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--color-card-border); border-radius: 12px;
  background: var(--color-paper-strong); color: var(--color-ink-strong);
  font-size: 16px; box-sizing: border-box;
  transition: border-color .2s, box-shadow .2s;
}
.feedback-form .form-control:focus {
  outline: none; border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102,126,234,.12);
}
.feedback-form textarea.form-control { resize: vertical; min-height: 90px; }
.feedback-form .form-error {
  font-size: 12px; color: #e94560; display: none;
}
.feedback-form .form-error.show { display: block; }

.back-to-top {
  position: fixed; right: 24px; bottom: 80px; z-index: 99;
  width: 44px; height: 44px; border-radius: 50%;
  background: conic-gradient(var(--color-accent) var(--progress, 0%), rgba(233,69,96,.12) 0);
  color: #fff; font-size: 18px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transform: translateY(10px) scale(.8);
  transition: all .35s cubic-bezier(.22,1,.36,1);
  border: none; cursor: pointer;
  box-shadow: 0 4px 14px rgba(233,69,96,.25), inset 0 0 0 3px #fff;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.back-to-top:hover {
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 8px 24px rgba(233,69,96,.38), inset 0 0 0 3px #fff;
}

/* ========== 首页浮动通知按钮与面板 ========== */
.float-notif-btn {
  position: fixed; right: 24px; bottom: 136px; z-index: 98;
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff; font-size: 22px;
  display: flex; align-items: center; justify-content: center;
  border: none; cursor: pointer;
  box-shadow: 0 4px 16px rgba(102,126,234,.35), inset 0 0 0 3px #fff;
  opacity: 0; visibility: hidden; transform: translateY(10px) scale(.8);
  transition: all .35s cubic-bezier(.22,1,.36,1);
}
.float-notif-btn.show {
  display: flex !important;
  opacity: 1; visibility: visible; transform: translateY(0) scale(1);
}
.float-notif-btn:hover {
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 8px 24px rgba(102,126,234,.45), inset 0 0 0 3px #fff;
}
.float-notif-badge {
  position: absolute; top: -2px; right: -2px;
  min-width: 18px; height: 18px; border-radius: 9px;
  background: #e94560; color: #fff; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px; box-shadow: 0 2px 6px rgba(233,69,96,.4);
}
.float-notif-panel {
  position: fixed; right: 24px; bottom: 192px; z-index: 98;
  width: 360px; max-width: calc(100vw - 48px);
  max-height: 480px;
  background: var(--color-paper-strong);
  border: 1px solid var(--color-card-border);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.06);
  display: none; flex-direction: column;
  overflow: hidden;
}
.float-notif-panel.show { display: flex; }
.float-notif-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px; border-bottom: 1px solid var(--color-card-border);
  font-size: 14px; font-weight: 600; color: var(--color-ink-strong);
  flex-shrink: 0;
}
.float-notif-read-all {
  background: none; border: none; font-size: 12px; color: #667eea;
  cursor: pointer; font-weight: 600; padding: 4px 8px; border-radius: 6px;
  transition: background 0.2s;
}
.float-notif-read-all:hover { background: rgba(102,126,234,.08); }
.float-notif-list { overflow-y: auto; flex: 1; }
.float-notif-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 18px; cursor: pointer; transition: background 0.2s;
  border-bottom: 1px solid var(--color-card-border); position: relative;
}
.float-notif-item:last-child { border-bottom: none; }
.float-notif-item:hover { background: var(--color-paper); }
.float-notif-unread { background: rgba(102,126,234,.04); }
.float-notif-icon { font-size: 18px; flex-shrink: 0; width: 28px; text-align: center; }
.float-notif-body { flex: 1; min-width: 0; }
.float-notif-title { font-size: 13px; font-weight: 600; color: var(--color-ink-strong); margin-bottom: 3px; }
.float-notif-msg { font-size: 12px; color: var(--color-ink-soft); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.float-notif-time { font-size: 11px; color: var(--color-ink-soft); margin-top: 3px; }
.float-notif-dot { position: absolute; top: 14px; right: 14px; width: 8px; height: 8px; border-radius: 50%; background: #e94560; }
@media (max-width: 480px) {
  .float-notif-panel { right: 12px; bottom: 180px; width: calc(100vw - 24px); }
  .float-notif-btn { right: 12px; bottom: 124px; }
}


.skeleton {
  animation: shimmer 1.5s infinite;
  background: linear-gradient(
    90deg,
    var(--color-tag-bg) 25%,
    rgba(18,26,26,.07) 50%,
    var(--color-tag-bg) 75%
  );
  background-size: 200% 100%;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.top-badge {
  position: absolute; top: -6px; left: -6px;
  background: #f59e0b; color: #fff; font-size: 10px;
  padding: 2px 7px; border-radius: 8px; font-weight: 600;
  z-index: 2; box-shadow: 0 2px 6px rgba(245,158,11,.3);
}


.front-toast-container {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  z-index: 9999; display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.front-toast {
  padding: 10px 24px; border-radius: 10px; color: #fff; font-size: 14px;
  box-shadow: 0 6px 20px rgba(0,0,0,.14);
  animation: toastDown .3s ease, toastUp .3s ease 2.2s forwards;
  white-space: nowrap; pointer-events: auto;
  font-weight: 500; letter-spacing: .01em;
}
.front-toast.success { background: linear-gradient(135deg, #22c55e, #16a34a); }
.front-toast.error { background: linear-gradient(135deg, #ef4444, #dc2626); }
.front-toast.info { background: linear-gradient(135deg, #3b82f6, #2563eb); }
@keyframes toastDown { from{opacity:0;transform:translateY(-16px)} to{opacity:1;transform:translateY(0)} }
@keyframes toastUp { from{opacity:1;transform:translateY(0)} to{opacity:0;transform:translateY(-16px)} }

/* 通用 Toast（common.js 使用） */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { padding: 12px 20px; border-radius: 8px; color: #fff; font-size: 14px; box-shadow: 0 4px 12px rgba(0,0,0,.15); pointer-events: auto; font-weight: 500; max-width: 360px; word-break: break-word; }
.toast.success { background: #52c41a; }
.toast.error { background: #ff4d4f; }
.toast.info { background: #8B6914; }
.toast.warning { background: #fa8c16; }
.toast-undo-btn { color: #fff; opacity: .9; }
.toast-undo-btn:hover { opacity: 1; }

body.dark-theme .toast { box-shadow: 0 6px 20px rgba(0,0,0,.35); }


mark { background: #fef08a; color: #854d0e; padding: 0 2px; border-radius: 3px; font-weight: 500; }

/* 订阅更新区域 */
.subscribe-section {
  max-width: var(--layout-width);
  margin: 0 auto;
  padding: 32px 20px;
  text-align: center;
}
.subscribe-section h3 {
  font-size: 18px;
  color: var(--color-ink-strong);
  margin-bottom: 6px;
  font-weight: 600;
}
.subscribe-section > p {
  color: var(--color-ink-soft);
  font-size: 13px;
  margin-bottom: 16px;
}
.subscribe-form {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 480px;
  margin: 0 auto;
}
.subscribe-form input {
  flex: 1;
  min-width: 220px;
  padding: 11px 16px;
  border-radius: 24px;
  border: 1px solid var(--color-line-strong);
  background: var(--color-paper);
  color: var(--color-ink-mid);
  font-size: 14px;
  transition: border-color .2s, box-shadow .2s;
}
.subscribe-form input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(233,69,96,.12);
}
.subscribe-form button {
  padding: 11px 24px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-warm));
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  transition: transform .2s, box-shadow .2s;
}
.subscribe-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(233,69,96,.28);
}
.subscribe-msg {
  margin-top: 10px;
  font-size: 13px;
  min-height: 18px;
  color: var(--color-ink-soft);
}
.subscribe-msg.error {
  color: #e94560;
  font-weight: 600;
}
.subscribe-msg.success {
  color: #22c55e;
}


.site-footer {
  text-align: center; padding: 28px 20px 32px; font-size: 13px;
  color: var(--color-ink-soft);
  background: linear-gradient(180deg, rgba(248,249,251,.6) 0%, rgba(240,242,245,.8) 40%, var(--color-paper) 100%);
  border-top: 1px solid var(--color-line);
  position: relative;
}
/* 页脚顶部装饰渐变线 */
.site-footer::before {
  content: "";
  position: absolute; top: -1px; left: 10%; right: 10%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #93c5fd, #c4b5fd, #fca5a5, #fcd34d, transparent);
  border-radius: 2px;
}
.site-footer a { color: var(--color-accent); font-weight: 500; transition: color .2s; }
.site-footer a:hover { color: var(--color-accent-warm); }
/* 页脚底部微光 */
.site-footer::after {
  content: "";
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 200px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99,102,241,.2), transparent);
}

/* 友链区域 */
.footer-links { margin-bottom: 10px; font-size: 13px; color: var(--color-ink-soft); }
.footer-links a { color: var(--color-ink-soft); margin: 0 10px; transition: color .2s; font-weight: 400; }
.footer-links a:hover { color: var(--color-accent); }


body.dark-theme {
  --body-bg: radial-gradient(circle at top center, #8B691418, transparent 28%),
              linear-gradient(180deg, #1a1410 0%, #1f1812 100%);
  --color-paper: #0e151d;
  --color-paper-strong: #131c27;
  --color-surface-strong: #151f2cfa;
  --color-ink-strong: #f8fafc;
  --color-ink-mid: #cbd5e1;
  --color-ink-soft: #6b7d91;
  --color-line: rgba(224,234,244,.09);
  --color-line-strong: rgba(217,229,241,.18);
  --color-surface: rgba(18,26,36,.82);
  --color-card-border: rgba(217,229,241,.10);
  --color-card-shadow: 0 10px 30px rgba(0,0,0,.25), 0 2px 6px rgba(0,0,0,.15);
  --color-card-shadow-hover: 0 18px 44px rgba(0,0,0,.36), 0 4px 10px rgba(0,0,0,.22);
  --color-tag-bg: rgba(255,255,255,.06);
}

body.dark-theme .top-navbar {
  background: linear-gradient(180deg, rgba(26,20,16,.90) 0%, rgba(31,24,18,.76) 100%);
  border-bottom-color: var(--color-line);
}
body.dark-theme .brand-name { color: var(--color-ink-strong); }
body.dark-theme .brand-slogan { color: var(--color-ink-soft); }
body.dark-theme .category-btn { color: var(--color-ink-mid); }
body.dark-theme .category-btn:hover { background: var(--color-tag-bg); }
body.dark-theme .category-btn.active { background: var(--color-ink-strong); color: #fff; }
body.dark-theme .category-btn.sub { color: #DAA520; background: rgba(139,105,20,.12); border-color: rgba(184,134,11,.25); }
body.dark-theme .category-btn.sub:hover { background: rgba(139,105,20,.20); border-color: rgba(184,134,11,.40); }
body.dark-theme .category-btn.sub.active { background: rgba(139,105,20,.22); color: #FFD700; border-color: rgba(184,134,11,.45); }
body.dark-theme .sub-cat-sidebar .sub-cat-title { color: #FFD700; border-bottom-color: rgba(184,134,11,.35); }
body.dark-theme .sub-cat-sidebar .category-btn.sub { color: #DAA520; background: rgba(139,105,20,.12); border-color: rgba(184,134,11,.25); }
body.dark-theme .sub-cat-sidebar .category-btn.sub:hover { background: rgba(139,105,20,.20); border-color: rgba(184,134,11,.40); }
body.dark-theme .sub-cat-sidebar .category-btn.sub.active { background: rgba(139,105,20,.22); color: #FFD700; border-color: rgba(184,134,11,.45); }
body.dark-theme .sub-cat-sidebar .sub-back-all { color: #888; background: rgba(255,255,255,.03); border-color: rgba(255,255,255,.1); }
body.dark-theme .sub-cat-sidebar .sub-back-all:hover { color: #DAA520; border-color: rgba(184,134,11,.4); background: rgba(139,105,20,.12); }
/* 移动端分类网格暗色：左彩右暗 */
body.dark-theme .mobile-cat-btn[data-category="all"] { background:linear-gradient(135deg,rgba(124,58,237,.18) 0%,rgba(139,92,246,.08) 45%,rgba(15,21,30,.4) 100%); border-color:rgba(139,92,246,.25); color:#a78bfa; }
body.dark-theme .mobile-cat-btn[data-category="tianya"] { background:linear-gradient(135deg,rgba(139,69,19,.18) 0%,rgba(160,82,45,.08) 45%,rgba(15,21,30,.4) 100%); border-color:rgba(160,82,45,.25); color:#d4a574; }
body.dark-theme .mobile-cat-btn[data-category="ancient"] { background:linear-gradient(135deg,rgba(107,142,35,.16) 0%,rgba(128,170,42,.07) 45%,rgba(15,21,30,.4) 100%); border-color:rgba(128,170,42,.22); color:#b5c98a; }
body.dark-theme .mobile-cat-btn[data-category="rarebook"] { background:linear-gradient(135deg,rgba(139,0,0,.16) 0%,rgba(165,0,0,.07) 45%,rgba(15,21,30,.4) 100%); border-color:rgba(165,0,0,.22); color:#d4a0a0; }
body.dark-theme .mobile-cat-btn[data-category="rareinfo"] { background:linear-gradient(135deg,rgba(184,134,11,.16) 0%,rgba(200,150,20,.07) 45%,rgba(15,21,30,.4) 100%); border-color:rgba(200,150,20,.22); color:#e0c070; }
body.dark-theme .mobile-cat-btn[data-category="favorites"] { background:linear-gradient(135deg,rgba(234,88,12,.13) 0%,rgba(251,146,60,.05) 45%,rgba(15,21,30,.4) 100%); border-color:rgba(251,146,60,.19); color:#fb923c; }
/* 暗色模式悬停/选中状态 */
body.dark-theme .mobile-cat-btn:hover,
body.dark-theme .mobile-cat-btn.active { box-shadow: 0 6px 20px rgba(0,0,0,.30); }
body.dark-theme .mobile-cat-btn[data-category="all"]:hover,
body.dark-theme .mobile-cat-btn[data-category="all"].active { background:linear-gradient(135deg,rgba(124,58,237,.30) 0%,rgba(139,92,246,.15) 45%,rgba(15,21,30,.5) 100%); border-color:rgba(139,92,246,.40); color:#c4b5fd; }
body.dark-theme .mobile-cat-btn[data-category="tianya"]:hover,
body.dark-theme .mobile-cat-btn[data-category="tianya"].active { background:linear-gradient(135deg,rgba(139,69,19,.28) 0%,rgba(160,82,45,.14) 45%,rgba(15,21,30,.5) 100%); border-color:rgba(160,82,45,.40); color:#e8c9a0; }
body.dark-theme .mobile-cat-btn[data-category="ancient"]:hover,
body.dark-theme .mobile-cat-btn[data-category="ancient"].active { background:linear-gradient(135deg,rgba(107,142,35,.26) 0%,rgba(128,170,42,.12) 45%,rgba(15,21,30,.5) 100%); border-color:rgba(128,170,42,.35); color:#d0e0a0; }
body.dark-theme .mobile-cat-btn[data-category="rarebook"]:hover,
body.dark-theme .mobile-cat-btn[data-category="rarebook"].active { background:linear-gradient(135deg,rgba(139,0,0,.26) 0%,rgba(165,0,0,.12) 45%,rgba(15,21,30,.5) 100%); border-color:rgba(165,0,0,.35); color:#e8b8b8; }
body.dark-theme .mobile-cat-btn[data-category="rareinfo"]:hover,
body.dark-theme .mobile-cat-btn[data-category="rareinfo"].active { background:linear-gradient(135deg,rgba(184,134,11,.26) 0%,rgba(200,150,20,.12) 45%,rgba(15,21,30,.5) 100%); border-color:rgba(200,150,20,.35); color:#f0d870; }
body.dark-theme .mobile-cat-btn[data-category="favorites"]:hover,
body.dark-theme .mobile-cat-btn[data-category="favorites"].active { background:linear-gradient(135deg,rgba(234,88,12,.22) 0%,rgba(251,146,60,.10) 45%,rgba(15,21,30,.5) 100%); border-color:rgba(251,146,60,.30); color:#fdba74; }
body.dark-theme .search-box input { background: rgba(15,21,30,.7); color: var(--color-ink-mid); border-color: var(--color-line); }
body.dark-theme .search-box input::placeholder { color: var(--color-ink-soft); }
body.dark-theme .social-icon { opacity: 1; }
body.dark-theme .social-icon:hover { opacity: 1; }

/* Hero Banner 暗色 */
body.dark-theme .hero-banner { box-shadow: 0 4px 24px rgba(0,0,0,.3), 0 1px 6px rgba(0,0,0,.15); }
body.dark-theme .hero-banner::before { background: linear-gradient(180deg, rgba(0,0,0,.2) 0%, transparent 30%, transparent 70%, rgba(0,0,0,.3) 100%); }
body.dark-theme .banner-bg { background-color: #1a1f2e; }
body.dark-theme .banner-item img { background-color: #1a1f2e; }

/* Ticker 暗色 */
body.dark-theme .ticker-bar { background: rgba(19,28,39,.55); border-color: rgba(255,255,255,.08); }

/* 卡片暗色 — 增强层次感：深底 + 亮边 + 内发光 */
body.dark-theme .article-card { 
  background: linear-gradient(145deg, #141b25 0%, #0f151d 100%); 
  border-color: rgba(255,255,255,.08);
  border-top: 1px solid rgba(255,255,255,.12);
  box-shadow: 
    0 1px 0 rgba(255,255,255,.06) inset,
    0 8px 28px rgba(0,0,0,.35),
    0 2px 6px rgba(0,0,0,.25);
  position: relative;
  overflow: hidden;
}
body.dark-theme .article-card::before {
  content: '';
  position: absolute; top: 0; left: 5%; right: 5%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
  pointer-events: none; z-index: 1;
}
body.dark-theme .article-card:hover { 
  border-color: rgba(255,255,255,.16);
  border-top-color: rgba(255,255,255,.2);
  box-shadow: 
    0 1px 0 rgba(255,255,255,.08) inset,
    0 12px 40px rgba(0,0,0,.45),
    0 4px 12px rgba(0,0,0,.3);
  transform: translateY(-4px);
}
body.dark-theme .article-card:hover::before {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.28), transparent);
}
body.dark-theme .article-card-title { color: #f1f5f9; }
body.dark-theme .article-card-desc { color: #94a3b8; }
body.dark-theme .article-card-date { color: #64748b; }
body.dark-theme .article-card-platform { color: #94a3b8; }
body.dark-theme .article-card-img { background-color: #1a1f2e; }

/* 分页暗色 */
body.dark-theme .empty { color: var(--color-ink-soft); }
body.dark-theme .page-num { background: var(--color-paper-strong); color: var(--color-ink-mid); border-color: var(--color-card-border); }
body.dark-theme .page-num.active { background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff; border-color: transparent; box-shadow: 0 4px 14px rgba(37,99,235,.30); }
body.dark-theme .page-btn { background: var(--color-paper-strong); color: var(--color-ink-mid); border-color: var(--color-card-border); }
body.dark-theme .page-btn:hover:not(:disabled) { border-color: var(--color-accent); color: var(--color-accent); box-shadow: 0 4px 12px rgba(233,69,96,.12); }
body.dark-theme .page-jump-box { background: var(--color-paper-strong); color: var(--color-ink-mid); border-color: var(--color-card-border); }

/* About 区域暗色 */
body.dark-theme .about-title { color: var(--color-ink-soft); }
body.dark-theme .about-title::after { background: linear-gradient(90deg, rgba(147,197,253,.6), rgba(196,180,254,.6)); }
body.dark-theme .about-mini-card {
  box-shadow: var(--color-card-shadow);
}
body.dark-theme .about-mini-card.about-trigger { background: linear-gradient(135deg, rgba(37,99,235,.14) 0%, rgba(59,130,246,.06) 45%, rgba(15,21,30,.4) 100%); border-color: rgba(59,130,246,.22); }
body.dark-theme .about-mini-card.feedback-card { background: linear-gradient(135deg, rgba(6,182,212,.11) 0%, rgba(34,211,238,.05) 45%, rgba(15,21,30,.4) 100%); border-color: rgba(6,182,212,.2); }
body.dark-theme .about-mini-card.disclaimer-card { background: linear-gradient(135deg, rgba(217,119,6,.13) 0%, rgba(245,158,11,.05) 45%, rgba(15,21,30,.4) 100%); border-color: rgba(217,119,6,.2); }
body.dark-theme .about-mini-card.submit-card { background: linear-gradient(135deg, rgba(219,39,119,.12) 0%, rgba(236,72,153,.05) 45%, rgba(15,21,30,.4) 100%); border-color: rgba(219,39,119,.2); }
body.dark-theme .about-mini-card:hover { border-color: var(--color-line-strong); box-shadow: 0 22px 44px rgba(0,0,0,.35); }
body.dark-theme .about-trigger-copy strong,
body.dark-theme .feedback-card-copy strong,
body.dark-theme .disclaimer-card-copy strong,
body.dark-theme .submit-card-copy strong { color: var(--color-ink-strong); }
body.dark-theme .about-trigger-copy span,
body.dark-theme .feedback-card-copy span,
body.dark-theme .disclaimer-card-copy span,
body.dark-theme .submit-card-copy span { color: var(--color-ink-soft); }
body.dark-theme .about-trigger-mark { background: linear-gradient(135deg, rgba(59,130,246,.28) 0%, rgba(37,99,235,.16) 100%); box-shadow: inset 0 1px 1px rgba(255,255,255,.1), 0 2px 6px rgba(0,0,0,.2); }
body.dark-theme .feedback-card-icon { background: linear-gradient(135deg, rgba(6,182,212,.26) 0%, rgba(8,145,178,.14) 100%); box-shadow: inset 0 1px 1px rgba(255,255,255,.1), 0 2px 6px rgba(0,0,0,.2); }
body.dark-theme .disclaimer-card-icon { background: linear-gradient(135deg, rgba(245,158,11,.26) 0%, rgba(217,119,6,.14) 100%); box-shadow: inset 0 1px 1px rgba(255,255,255,.1), 0 2px 6px rgba(0,0,0,.2); }
body.dark-theme .submit-card-icon { background: linear-gradient(135deg, rgba(236,72,153,.26) 0%, rgba(219,39,119,.14) 100%); box-shadow: inset 0 1px 1px rgba(255,255,255,.1), 0 2px 6px rgba(0,0,0,.2); }

/* 详情弹窗暗色 */
body.dark-theme .detail-modal { background: radial-gradient(circle at 0% 0%, rgba(99,102,241,.04) 0%, transparent 50%), var(--color-paper-strong); }
body.dark-theme .detail-title { color: var(--color-ink-strong); }
body.dark-theme .detail-desc { color: var(--color-ink-mid); }
body.dark-theme .detail-close { background: #e5e7eb; color: rgba(0,0,0,.55); }
body.dark-theme .detail-close:hover { background: #d1d5db; color: rgba(0,0,0,.8); }
body.dark-theme .detail-cat-tag { background: rgba(99,102,241,.18); color: #a5b4fc; }
body.dark-theme .dtag { color: var(--color-ink-soft); }
body.dark-theme .detail-cat-tag.cat-tianya { background: linear-gradient(135deg,rgba(139,69,19,.25),rgba(212,165,116,.08)); color:#d4a574; border-color:rgba(139,69,19,.30); }
body.dark-theme .detail-cat-tag.cat-ancient { background: linear-gradient(135deg,rgba(107,142,35,.22),rgba(181,201,138,.07)); color:#b5c98a; border-color:rgba(107,142,35,.26); }
body.dark-theme .detail-cat-tag.cat-rarebook { background: linear-gradient(135deg,rgba(139,0,0,.20),rgba(212,160,160,.06)); color:#d4a0a0; border-color:rgba(139,0,0,.24); }
body.dark-theme .detail-cat-tag.cat-rareinfo { background: linear-gradient(135deg,rgba(184,134,11,.22),rgba(224,192,112,.07)); color:#e0c070; border-color:rgba(184,134,11,.26); }
body.dark-theme .info-label { color: var(--color-ink-soft); }
body.dark-theme .info-value { color: var(--color-ink-strong); }
body.dark-theme .pf-badge.win { background: rgba(38,99,235,.15); color: #60a5fa; }
body.dark-theme .pf-badge.mac { background: rgba(220,38,38,.15); color: #f87171; }
body.dark-theme .pf-badge.default { background: var(--color-tag-bg); color: var(--color-ink-soft); border-color: var(--color-line); }
body.dark-theme .detail-info-grid { background: rgba(255,255,255,.03); border-color: var(--color-line); }
body.dark-theme .detail-left { background: var(--color-paper-strong); border-color: var(--color-line); }
body.dark-theme .detail-right { background: rgba(255,255,255,.02); border-color: var(--color-line); }
body.dark-theme .detail-hint { color: var(--color-ink-soft); }
body.dark-theme .detail-overlay { background: rgba(3,7,12,.60); }
body.dark-theme .detail-action-btn:hover { box-shadow: 0 6px 22px rgba(59,130,246,.35); }

/* 模态弹窗暗色（反馈/投稿） */
body.dark-theme .about-modal-card {
  background: radial-gradient(circle at 30% 0%, rgba(99,102,241,.04) 0%, transparent 50%), var(--color-surface-strong);
  border-color: var(--color-card-border);
  box-shadow: 0 24px 54px rgba(0,0,0,.35);
}
body.dark-theme .about-modal-close { background: rgba(255,255,255,.06); color: var(--color-ink-soft); }
body.dark-theme .about-modal-close:hover { background: rgba(255,255,255,.12); color: var(--color-ink-mid); }
body.dark-theme .about-modal-head h2 { color: var(--color-ink-strong); }
body.dark-theme .about-modal-head span { color: var(--color-ink-soft); }
body.dark-theme .about-modal-mark { background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%); box-shadow: 0 8px 24px rgba(99,102,241,.35); }

/* 其他组件暗色 */
/* 主题切换按钮暗色已在上方定义，这里移除重复文字色 */
body.dark-theme .search-clear { color: var(--color-ink-soft); }
body.dark-theme .search-clear:hover { color: var(--color-ink-mid); }
body.dark-theme mark { background: rgba(250,204,21,.25); color: #fde047; }
body.dark-theme .footer-links { color: var(--color-ink-soft); }
body.dark-theme .footer-links a { color: var(--color-ink-soft); }
body.dark-theme .footer-links a:hover { color: #7dc2ff; }
body.dark-theme .front-toast { box-shadow: 0 6px 20px rgba(0,0,0,.35); }
body.dark-theme .top-badge { background: #b45309; box-shadow: 0 2px 6px rgba(180,83,9,.4); }
body.dark-theme .skeleton { background: linear-gradient(90deg, rgba(255,255,255,.04) 25%, rgba(255,255,255,.02) 50%, rgba(255,255,255,.04) 75%); background-size: 200% 100%; }
body.dark-theme .info-row { border-bottom-color: var(--color-line); }

/* ========== 响应式与可访问性增强 ========== */
/* 触摸目标最小 44x44，提升移动端可点击性（仅对关键交互元素） */
button, input[type="checkbox"], input[type="radio"] { min-height: 44px; min-width: 44px; }
/* 浮层按钮和返回顶部保持 44px 触摸目标 */
.float-notif-btn, .back-to-top { min-height: 44px; min-width: 44px; }
/* 小型 UI 元素不受触摸目标限制 */
.tag-pill, .category-btn, .page-num, .page-btn, .mobile-cat-btn, .social-icon,
.about-mini-card, .detail-fav-btn, .detail-share-btn, .detail-close, .banner-dot { min-height: auto; min-width: auto; }

/* 禁止 iOS 自动调整字体大小 */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* 图片自适应与懒加载占位 */
img { height: auto; }

/* 小屏优化：避免横向溢出与提升字号可读性 */
@media (max-width: 768px) {
  body { font-size: 15px; }
  .article-card-title { font-size: 15.5px; }
  .article-card-desc { font-size: 13px; }
  .brand-name { font-size: 15px; }
  .navbar-left { gap: 6px; }
  .search-box { max-width: none; }
  .back-to-top { right: 16px; bottom: max(100px, env(safe-area-inset-bottom, 100px)); width: 52px; height: 52px; font-size: 22px; }
}

@media (max-width: 480px) {
  body { font-size: 15.5px; }
  .article-card { flex-direction: column; }
  .article-card-img { width: 100%; aspect-ratio: 4 / 3; height: auto; min-height: auto; }
  .about-mini-card { min-height: 64px; }
  /* 升级高级用户弹窗：手机端最大化显示，减少内边距 */
  .modal-card.vip-modal-card { width: 94%; max-width: none; max-height: 92vh; margin: 0; }
  .modal-header.vip-modal-header { padding: 12px 16px; }
  .modal-body.vip-modal-body { padding: 12px 14px !important; }
  .modal-footer.vip-modal-footer { padding: 10px 14px !important; }
  .vip-modal-body #vipModalQrcode > div { width: 160px !important; height: 160px !important; }
}

/* 打印样式优化 */
@media print {
  .top-navbar, .back-to-top, .float-notif-btn, .float-notif-panel, .hero-banner,
  .ticker-bar, .mobile-nav, .mobile-search-btn, .hamburger { display: none !important; }
  body { background: #fff; color: #000; }
  .article-card { break-inside: avoid; box-shadow: none; border: 1px solid #ddd; }
}
body.dark-theme .site-footer { background: linear-gradient(180deg, rgba(11,17,23,.6) 0%, var(--color-paper) 100%); border-top-color: var(--color-line); color: var(--color-ink-soft); }
body.dark-theme .site-footer::before { background: linear-gradient(90deg, transparent, rgba(147,197,253,.4), rgba(196,180,254,.4), rgba(252,165,165,.4), rgba(252,211,77,.4), transparent); }
body.dark-theme .site-footer::after { background: linear-gradient(90deg, transparent, rgba(99,102,241,.3), transparent); }

/* 新增组件暗色适配 */
body.dark-theme .tag-c1 { background: linear-gradient(135deg,rgba(59,130,246,.18),rgba(96,165,250,.08)); color:#93c5fd; border-color:rgba(59,130,246,.25); }
body.dark-theme .tag-c2 { background: linear-gradient(135deg,rgba(5,150,105,.16),rgba(52,211,153,.07)); color:#6ee7b7; border-color:rgba(5,150,105,.22); }
body.dark-theme .tag-c3 { background: linear-gradient(135deg,rgba(217,119,6,.15),rgba(251,191,36,.06)); color:#fcd34d; border-color:rgba(217,119,6,.20); }
body.dark-theme .tag-c4 { background: linear-gradient(135deg,rgba(219,39,119,.14),rgba(249,115,222,.05)); color:#f9a8d4; border-color:rgba(219,39,119,.20); }
body.dark-theme .tag-c5 { background: linear-gradient(135deg,rgba(109,40,217,.15),rgba(167,139,250,.06)); color:#c4b5fd; border-color:rgba(109,40,217,.20); }
body.dark-theme .tag-c6 { background: linear-gradient(135deg,rgba(190,18,60,.13),rgba(253,164,175,.05)); color:#fda4af; border-color:rgba(190,18,60,.18); }
body.dark-theme .tag-c7 { background: linear-gradient(135deg,rgba(14,116,144,.12),rgba(103,232,249,.05)); color:#67e8f9; border-color:rgba(14,116,144,.17); }
body.dark-theme .tag-c8 { background: linear-gradient(135deg,rgba(21,128,61,.12),rgba(134,239,172,.05)); color:#86efac; border-color:rgba(21,128,61,.17); }

body.dark-theme .ticker-label { background: linear-gradient(135deg, rgba(233,130,60,.5), rgba(212,103,46,.35)); box-shadow: 0 2px 8px rgba(233,130,60,.2); }

body.dark-theme .back-to-top {
  background: conic-gradient(var(--color-accent) var(--progress, 0%), rgba(233,69,96,.10) 0);
  box-shadow: 0 4px 14px rgba(233,69,96,.2), inset 0 0 0 3px rgba(255,255,255,.06);
}
body.dark-theme .back-to-top:hover { box-shadow: 0 8px 24px rgba(233,69,96,.32), inset 0 0 0 3px rgba(255,255,255,.08); }
body.dark-theme .float-notif-btn { box-shadow: 0 4px 16px rgba(102,126,234,.25), inset 0 0 0 3px rgba(255,255,255,.08); }
body.dark-theme .float-notif-btn:hover { box-shadow: 0 8px 24px rgba(102,126,234,.35), inset 0 0 0 3px rgba(255,255,255,.12); }
body.dark-theme .float-notif-panel { background: var(--color-paper-strong); border-color: var(--color-card-border); }
body.dark-theme .float-notif-item:hover { background: rgba(255,255,255,.04); }

body.dark-theme .search-result-count strong { color: #7dc2ff; }
body.dark-theme .site-footer a { color: #7dc2ff; }
body.dark-theme .site-footer a:hover { color: #a5b4fc; }

/* 分类按钮暗色颜色覆盖 */
body.dark-theme .category-btn[data-category="all"].active { background:rgba(139,105,20,.20); color:#DAA520; border-color:rgba(139,105,20,.35); }
body.dark-theme .category-btn[data-category="tianya"].active { background:rgba(139,69,19,.18); color:#d4a574; border-color:rgba(139,69,19,.28); }
body.dark-theme .category-btn[data-category="ancient"].active { background:rgba(107,142,35,.18); color:#b5c98a; border-color:rgba(107,142,35,.28); }
body.dark-theme .category-btn[data-category="rarebook"].active { background:rgba(139,0,0,.18); color:#d4a0a0; border-color:rgba(139,0,0,.28); }
body.dark-theme .category-btn[data-category="rareinfo"].active { background:rgba(184,134,11,.18); color:#e0c070; border-color:rgba(184,134,11,.28); }
body.dark-theme .category-btn[data-category="favorites"].active { background:rgba(234,88,12,.18); color:#fdba74; border-color:rgba(234,88,12,.28); }

/* 中等屏幕 (769px - 1024px)：导航栏分两行，避免分类按钮被挤压到网站名下方 */
@media (max-width: 1024px) {
  .navbar-inner {
    flex-wrap: wrap;
    gap: 8px 18px;
    padding: 10px 20px;
  }
  .navbar-left,
  .navbar-right {
    flex: 0 0 auto;
  }
  .category-nav {
    order: 3;
    flex: 1 1 100%;
    min-width: auto;
    justify-content: center;
    padding: 2px 0;
  }
}

/* 底部导航默认隐藏（桌面端），移动端媒体查询内覆盖为 flex */
.mobile-bottom-nav { display: none; }

/* 平板及以下 (<= 768px) */
@media (max-width: 768px) {
  /* 提升顶部导航整体层级，移动端非 sticky，底部导航替代 */
  .top-navbar { position: relative; z-index: 1100; }

  /* 导航栏：左汉堡 + 品牌居中 + 右侧图标不覆盖 */
  .navbar-inner { flex-wrap: nowrap; padding: 5px 10px; position: relative; gap: 6px; }
  .navbar-left { gap: 6px; flex: 0 0 auto; justify-content: flex-start; min-width: 0; }
  .navbar-brand { position: absolute; left: 50%; transform: translateX(-50%); gap: 8px; flex-shrink: 0; min-width: 0; }
  .brand-logo { width: 36px; height: 36px; transform: none; }
  .brand-icon { font-size: 18px; }
  .brand-text { min-width: 0; overflow: hidden; text-align: center; }
  .brand-name { font-size: 15.5px; letter-spacing: 0.12em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .brand-slogan { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mobile-menu-btn { display: inline-flex; position: static; flex-shrink: 0; font-size: 20px; padding: 4px; }
  .category-nav { display: none; }  /* 桌面分类隐藏 */
  .social-icon { display: none; }    /* 社交图标隐藏 */
  .navbar-right { position: static; flex-shrink: 0; gap: 3px; margin-left: auto; }

  /* 搜索框默认隐藏，显示搜索图标；缩小右侧三个图标并保持统一尺寸 */
  .search-box { display: none; }
  .navbar-right .mobile-search-btn { display: inline-flex !important; width: 28px !important; height: 28px !important; min-width: 0 !important; min-height: 0 !important; align-items: center; justify-content: center; font-size: 16px !important; }
  .navbar-right .theme-toggle,
  .navbar-right .user-center-btn { width: 30px !important; height: 30px !important; min-width: 0 !important; min-height: 0 !important; flex-shrink: 0 !important; padding: 0 !important; }
  .navbar-right .theme-toggle svg,
  .navbar-right .user-center-btn svg { width: 17px !important; height: 17px !important; }

  /* 移动端侧滑导航 */
  .mobile-nav {
    display: block;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 74%; max-width: 300px;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    z-index: 1200;
    transform: translateX(-100%);
    opacity: 0; visibility: hidden;
    transition: transform .35s cubic-bezier(.22,1,.36,1), opacity .3s ease, visibility .3s ease;
    pointer-events: none;
    box-shadow: 10px 0 40px rgba(18,26,34,.15);
    padding: 22px 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .mobile-nav.open {
    transform: translateX(0);
    opacity: 1; visibility: visible;
    pointer-events: auto;
  }
  .mobile-nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15,23,34,.45);
    z-index: 1199;
    opacity: 0; visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
    pointer-events: none;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
  }
  .mobile-nav-overlay.open {
    opacity: 1; visibility: visible;
    pointer-events: auto;
  }

  /* 移动端侧滑菜单内容：品牌头 + 社交图标 + ABOUT + 底部卡片 */
  .mobile-nav-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 18px;
  }
  .mobile-nav-brand {
    display: flex; align-items: center; gap: 12px;
  }
  .mobile-nav-brand-icon {
    width: 44px; height: 44px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: var(--color-paper-strong);
    box-shadow: 0 2px 8px rgba(17,24,39,.08);
    font-size: 24px; overflow: hidden;
  }
  .mobile-nav-brand-icon img { width: 100%; height: 100%; object-fit: cover; }
  .mobile-nav-brand-text { display: flex; flex-direction: column; gap: 2px; }
  .mobile-nav-brand-text strong {
    font-size: 16px; font-weight: 700; color: var(--color-ink-strong);
  }
  .mobile-nav-brand-text span {
    font-size: 12px; color: var(--color-ink-soft);
  }
  .mobile-nav-close {
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(18,26,34,.06); color: #64748b;
    font-size: 16px; border: none; cursor: pointer;
    transition: all .2s;
  }
  .mobile-nav-close:hover { background: rgba(18,26,34,.1); color: #334155; }
  .sidebar-add-to-home {
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(7,193,96,.1); color: #07c160;
    border: none; cursor: pointer; margin-right: 8px;
    transition: all .2s;
  }
  .sidebar-add-to-home:hover { background: rgba(7,193,96,.18); color: #059669; }
  .sidebar-add-to-home svg { width: 18px; height: 18px; }

  .mobile-nav-socials {
    display: flex; gap: 2px;
    margin-bottom: 20px;
  }
  .mobile-nav-social {
    flex: 0 0 auto;
    width: 60px; height: 60px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 12px;
    background: transparent;
    border: none;
    box-shadow: none;
    text-decoration: none; color: var(--color-ink-mid);
    transition: all .2s;
  }
  .mobile-nav-social:hover {
    transform: scale(1.08);
    color: var(--color-ink-strong);
  }
  .mobile-nav-social-icon {
    width: 52px; height: 52px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 48px; background: transparent;
  }
  .mobile-nav-social-icon img { width: 52px; height: 52px; object-fit: contain; }
  .mobile-nav-social-name { display: none; }

  .mobile-nav-about {
    margin-bottom: 20px;
    padding: 16px;
    border-radius: 14px;
    background: var(--color-paper-strong);
    border: 1px solid var(--color-card-border);
    box-shadow: 0 2px 8px rgba(17,24,39,.05);
  }
  .mobile-nav-about h4 {
    font-size: 12px; font-weight: 700; letter-spacing: .08em;
    color: var(--color-ink-soft); margin-bottom: 10px;
  }
  .mobile-nav-about p {
    font-size: 13px; line-height: 1.7;
    color: var(--color-ink-mid); white-space: pre-wrap;
  }

  .mobile-nav-cards {
    display: flex; flex-direction: column; gap: 10px;
  }
  .mobile-nav-card {
    display: flex; align-items: center; gap: 12px;
    padding: 14px;
    border-radius: 14px;
    background: var(--color-paper-strong);
    border: 1px solid var(--color-card-border);
    box-shadow: 0 2px 8px rgba(17,24,39,.05);
    cursor: pointer; transition: all .2s;
  }
  .mobile-nav-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(17,24,39,.1);
  }
  .mobile-nav-card-icon {
    width: 36px; height: 36px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; flex-shrink: 0;
    background: rgba(17,24,39,.04);
  }
  .mobile-nav-card-icon img { width: 28px; height: 28px; object-fit: cover; border-radius: 4px; }
  .mobile-nav-card-copy { display: flex; flex-direction: column; gap: 3px; }
  .mobile-nav-card-copy strong {
    font-size: 14px; font-weight: 600; color: var(--color-ink-strong);
  }
  .mobile-nav-card-copy span {
    font-size: 12px; color: var(--color-ink-soft); line-height: 1.4;
  }

  /* 小窗口下隐藏底部四个关于卡片 */
  .about-section { display: none; }

  /* 移动端全屏搜索下拉面板 */
  .mobile-search-panel {
    display: block;
    position: absolute; top: 100%; left: 0; right: 0; z-index: 101;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 0 0 22px 22px;
    box-shadow: 0 20px 50px rgba(18,26,34,.15);
    padding: 18px 20px 24px;
    transform: translateY(-12px);
    opacity: 0; visibility: hidden;
    transition: transform .35s cubic-bezier(.22,1,.36,1), opacity .3s ease, visibility .3s ease;
    pointer-events: none;
    box-sizing: border-box;
  }
  .mobile-search-panel.open {
    transform: translateY(0);
    opacity: 1; visibility: visible;
    pointer-events: auto;
  }
  .mobile-search-panel-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 4px;
  }
  .mobile-search-panel-label {
    font-size: 10px; font-weight: 700; letter-spacing: .12em;
    color: #94a3b8;
  }
  .mobile-search-panel-close {
    width: 30px; height: 30px; border-radius: 50%;
    background: rgba(18,26,34,.06); color: #64748b;
    font-size: 14px; display: flex; align-items: center; justify-content: center;
    border: none; cursor: pointer; transition: all .2s;
  }
  .mobile-search-panel-close:hover { background: rgba(18,26,34,.1); color: #334155; }
  .mobile-search-panel-title {
    font-size: 22px; font-weight: 800; color: #0f172a;
    margin: 0 0 6px 0; letter-spacing: -.01em;
  }
  .mobile-search-panel-desc {
    font-size: 13px; color: #64748b; line-height: 1.5;
    margin: 0 0 16px 0;
  }
  .mobile-search-form {
    display: flex; gap: 10px; margin-bottom: 20px;
  }
  .mobile-search-input-wrap {
    flex: 1; display: flex; align-items: center; gap: 10px;
    background: #fff; border-radius: 14px; padding: 0 14px;
    border: 1px solid #e2e8f0; box-shadow: 0 2px 8px rgba(15,23,42,.04);
    transition: border-color .2s, box-shadow .2s;
  }
  .mobile-search-input-wrap:focus-within {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(147,197,253,.2), 0 2px 8px rgba(15,23,42,.04);
  }
  .mobile-search-icon { font-size: 15px; opacity: .55; }
  .mobile-search-input-wrap input {
    flex: 1; height: 46px; font-size: 16px; color: #0f172a;
    background: transparent; border: none; outline: none;
  }
  .mobile-search-input-wrap input::placeholder { color: #94a3b8; }
  .mobile-search-submit {
    height: 46px; padding: 0 22px; border-radius: 14px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff; font-size: 15px; font-weight: 600;
    border: none; cursor: pointer;
    box-shadow: 0 4px 14px rgba(37,99,235,.25);
    transition: transform .2s, box-shadow .2s;
  }
  .mobile-search-submit:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(37,99,235,.35); }
  .mobile-search-hot-title {
    display: block; font-size: 12px; font-weight: 700; color: #334155;
    margin-bottom: 10px;
  }
  .mobile-search-hot-tags {
    display: flex; flex-wrap: wrap; gap: 8px;
  }
  .mobile-search-hot-tag {
    padding: 7px 14px; border-radius: 20px; font-size: 13px;
    color: #475569; background: #fff;
    border: 1px solid #e2e8f0; cursor: pointer;
    transition: all .2s;
  }
  .mobile-search-hot-tag:hover {
    border-color: #93c5fd; color: #2563eb;
    background: #eff6ff;
  }

  /* 移动端分类网格 — 工具动态下方默认显示（4列） */
  .mobile-cat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 14px 0 0;
    background: transparent;
  }
  .mobile-cat-grid.collapsed { display: none; }
  .mobile-cat-btn { padding: 10px 4px 8px; border-radius: 10px; }
  .mobile-cat-btn .mcat-icon { font-size: 20px; }
  .mobile-cat-btn { font-size: 11px; }

  /* Ticker 响应式 */
  .ticker-bar { padding: 7px 12px; gap: 10px; }
  .ticker-label { font-size: 11px; }
  .ticker-scroll { gap: 30px; animation-duration: 28s; }
  .ticker-item { font-size: 12px; padding-right: 20px; }

  /* 文章列表 → 单列；与上方网格导航间距与卡片间距一致 */
  .article-list { max-width: 100%; margin: 14px 0 20px; }
  #articleList, #todayArticleList { grid-template-columns: 1fr; gap: 14px; }
  .article-card,
  .sp-card { flex-direction: row; align-items: stretch; border-radius: 12px; }
  .article-card-img,
  .sp-card-media { width: 140px; flex-shrink: 0; margin: 12px 0 12px 12px; border-radius: 10px; aspect-ratio: 4 / 3; }
  .article-card-body,
  .sp-card-body { padding: 14px 14px 14px 12px; min-width: 0; justify-content: center; }
  .article-card-top { align-items: flex-start; flex-direction: column; gap: 2px; margin-bottom: 4px; }
  .article-card-title { font-size: 13.5px; -webkit-line-clamp: 2; line-height: 1.35; }
  .article-card-date { font-size: 10px; color: var(--color-ink-soft); margin-left: 0; }
  .article-card-desc { font-size: 12px; -webkit-line-clamp: 2; line-height: 1.45; margin-bottom: 2px; }
  .article-card-platform { font-size: 11px; -webkit-line-clamp: 2; margin-bottom: 5px; }
  .tag-pill { font-size: 10px; padding: 2px 9px; border-radius: 12px; }
  .sp-card-icon { font-size: 32px; }
  .sp-card-title { font-size: 13.5px; margin-bottom: 4px; }
  .sp-card-desc { font-size: 12px; -webkit-line-clamp: 2; margin-bottom: 8px; }
  .sp-card-btn { padding: 5px 14px; font-size: 11px; }

  /* About 区域改为两列 */
  .about-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* 详情弹窗移动端 — 左文+信息 / 右图堆叠 */
  .detail-overlay { align-items: flex-start; justify-content: center; padding: 60px 5px 0; scrollbar-width: none; -ms-overflow-style: none; max-height: 100dvh;
  overscroll-behavior: contain;
}
  .detail-overlay::-webkit-scrollbar { display: none; }
  .detail-modal { width: calc(100% - 10px); max-width: none; max-height: calc(100dvh - 60px); border-radius: 14px; margin: 0; }
  .detail-body { flex-direction: column; gap: 14px; padding: 18px 14px 0; overflow-y: auto; flex: 1; min-height: 0; scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; }
  .detail-body::-webkit-scrollbar { display: none; }
  .detail-left { padding: 14px 16px 12px; }
  .detail-right { width: 100%; order: -1; padding: 10px; }
  .detail-cover { width: 100%; border-radius: 16px; aspect-ratio: 4 / 3; }
  .detail-share-panel { z-index: 35; }
  .detail-cover img { border-radius: 16px; }
  .detail-title { font-size: 17px; }
  .detail-desc { font-size: 13px; line-height: 1.6; }
  .detail-meta-top { margin-bottom: 8px; }
  .detail-tags { margin-bottom: 8px; }
  .detail-bottom { padding: 12px 18px max(12px, env(safe-area-inset-bottom, 12px)); flex-shrink: 0; background: inherit; }
  .info-row { padding: 11px 14px; font-size: 12.5px; }
  .detail-action-btn { font-size: 14px; padding: 13px 24px; }

  .top-navbar { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
  .navbar-inner { padding: 7px 14px; }
  #articleList { gap: 10px; }
  .pagination { padding: 24px 12px 36px; }

  /* 移动端底部固定导航 */
  .mobile-bottom-nav {
    display: flex;
    position: fixed; bottom: 0; left: 0; right: 0;
    z-index: 1100;
    background: var(--color-paper);
    border-top: 1px solid var(--color-line);
    box-shadow: 0 -2px 12px rgba(0,0,0,.06);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .mobile-bottom-nav .nav-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 6px 0; gap: 2px; font-size: 10px; color: var(--color-ink-soft);
    cursor: pointer; transition: color .2s; text-decoration: none;
  }
  .mobile-bottom-nav .nav-item .nav-icon { font-size: 20px; line-height: 1; }
  .mobile-bottom-nav .nav-item.active { color: var(--color-accent); font-weight: 600; }
  body.dark-theme .mobile-bottom-nav { background: #1a1a2e; border-color: #2a2a3e; }
  body.dark-theme .mobile-bottom-nav .nav-item { color: #888; }
  body.dark-theme .mobile-bottom-nav .nav-item.active { color: #F59E0B; }
  /* 底部导航存在时给页面底部留出空间 */
  body.has-bottom-nav { padding-bottom: 56px; }
  body.has-bottom-nav .detail-overlay { padding-bottom: calc(max(0px, env(safe-area-inset-bottom, 0px)) + 56px); }
}

/* 小手机 (<= 480px) */
@media (max-width: 480px) {
  /* Ticker 小屏：宽度与 Banner/文章卡片保持一致 */
  .ticker-bar { padding: 6px 10px; gap: 8px; }
  .ticker-label { font-size: 10.5px; }
  .ticker-scroll { gap: 22px; animation-duration: 24s; }
  .ticker-item { font-size: 11px; padding-right: 16px; }

  /* 移动端分类网格 — 小屏也改成一排4列；与文章列表间距与卡片间距一致 */
  .mobile-cat-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 12px 0 0;
  }
  .mobile-cat-btn { padding: 8px 2px 6px; border-radius: 8px; }
  .mobile-cat-btn .mcat-icon { font-size: 18px; }
  .mobile-cat-btn { font-size: 10px; }

  .article-list { margin: 10px 0 18px; }
  #articleList, #todayArticleList { gap: 10px; }
  .article-card-img,
  .sp-card-media { width: 120px; margin: 10px 0 10px 10px; border-radius: 10px; }
  .article-card-body,
  .sp-card-body { padding: 10px 10px 10px 8px; }
  .article-card-title { font-size: 12.5px; -webkit-line-clamp: 2; }
  .article-card-desc { font-size: 11.5px; -webkit-line-clamp: 2; }
  .article-card-platform { font-size: 10.5px; -webkit-line-clamp: 2; }
  .tag-pill { font-size: 9.5px; padding: 2px 7px; }
  .sp-card-icon { font-size: 28px; }
  .sp-card-title { font-size: 12px; margin-bottom: 2px; }
  .sp-card-desc { font-size: 11px; margin-bottom: 6px; }
  .sp-card-btn { padding: 4px 12px; font-size: 10.5px; }

  .about-section { display: none; }
  .about-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .about-mini-card { padding: 8px 10px; min-height: 58px; border-radius: 14px; }
  .about-mini-icon { width: 32px; height: 32px; font-size: 15px; border-radius: 8px; }

  /* 小手机详情弹窗 */
  .detail-overlay { align-items: flex-start; justify-content: center; padding: 60px 5px 0; scrollbar-width: none; -ms-overflow-style: none; max-height: 100dvh;
  overscroll-behavior: contain;
}
  .detail-overlay::-webkit-scrollbar { display: none; }
  .detail-modal { width: calc(100% - 10px); max-width: none; max-height: calc(100dvh - 60px); border-radius: 14px; margin: 0; }
  .detail-body { flex-direction: column; gap: 14px; padding: 16px 14px 0; overflow-y: auto; flex: 1; min-height: 0; scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; }
  .detail-body::-webkit-scrollbar { display: none; }
  .detail-left { padding: 12px 10px; }
  .detail-right { width: 100%; order: -1; }
  .detail-cover { width: 100%; border-radius: 14px; aspect-ratio: 4 / 3; }
  .detail-cover img { border-radius: 14px; }
  .detail-close { top: -15px; right: -15px; width: 30px; height: 30px; font-size: 18px; background: #e5e7eb; overflow: visible; }
  .detail-title { font-size: 15px; }
  .detail-desc { font-size: 12.5px; }
  .info-row { padding: 7px 12px; font-size: 12.5px; }
  .pf-badge { font-size: 10px; padding: 2px 8px; }
  .detail-bottom { padding: 10px 12px max(10px, env(safe-area-inset-bottom, 10px)); flex-shrink: 0; background: inherit; }
  .detail-hint { font-size: 12px; margin-bottom: 8px; }
  .detail-action-btn { font-size: 13.5px; padding: 12px 20px; border-radius: 24px; }

  .navbar-inner { padding: 3px 8px; }
  .brand-logo { width: 34px; height: 34px; }
  .brand-name { font-size: 15px; }
  .navbar-right .mobile-search-btn,
  .navbar-right .theme-toggle,
  .navbar-right .user-center-btn { width: 28px !important; height: 28px !important; min-width: 0 !important; min-height: 0 !important; padding: 0 !important; }
  .navbar-right .theme-toggle svg,
  .navbar-right .user-center-btn svg { width: 15px !important; height: 15px !important; }
  .ticker-bar { padding: 6px 10px; }
  .ticker-label { font-size: 10.5px; }
  .ticker-item { font-size: 11px; }
  .pagination { padding: 20px 10px 32px; }
  .page-btn, .page-num { min-width: 40px; height: 40px; padding: 0 12px; font-size: 13px; }
}

/* 主题切换时临时禁用所有过渡动画，确保瞬间切换 */
.no-theme-transition,
.no-theme-transition * {
  transition: none !important;
  animation: none !important;
}

/* ========== 可访问性增强 ========== */
.skip-link {
  position: absolute; top: -100px; left: 8px;
  background: #1a1a2e; color: #fff; padding: 10px 18px;
  z-index: 9999; text-decoration: none; border-radius: 0 0 8px 8px;
  font-size: 14px; font-weight: 600;
  transition: top .2s;
}
.skip-link:focus { top: 0; }

:focus-visible {
  outline: 2px solid var(--color-accent, #667eea);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ========== 搜索历史/建议 ========== */
.desktop-search-history, .desktop-search-suggestions { margin-top: 12px; }
.desktop-search-history:empty, .desktop-search-suggestions:empty { display: none; }
.desktop-search-hot-tags .hot-tag.highlight {
  background: var(--color-accent); color: #fff; border-color: var(--color-accent);
}

/* ========== 快捷键帮助 ========== */
.shortcut-list { list-style: none; padding: 0; margin: 0; }
.shortcut-list li { padding: 8px 0; font-size: 14px; color: var(--color-ink-mid); border-bottom: 1px solid var(--color-card-border); }
.shortcut-list li:last-child { border-bottom: none; }
.shortcut-list kbd {
  display: inline-block; padding: 3px 8px; margin: 0 2px;
  background: var(--color-paper); border: 1px solid var(--color-card-border);
  border-radius: 6px; font-family: monospace; font-size: 12px; color: var(--color-ink-strong);
}

/* ========== 焦点陷阱辅助类 ========== */
.trap-focus { outline: none; }

/* ========== 保存到桌面按钮：仅在手机端显示 ========== */
@media (min-width: 769px) {
  .add-to-home-btn,
  .sidebar-add-to-home {
    display: none !important;
  }
}

/* ===== 保存到桌面教程页 ===== */
.guide-card {
  background: var(--color-surface);
  border-radius: 16px;
  border: 1px solid var(--color-line-strong);
  margin-bottom: 16px;
  overflow: hidden;
}
.guide-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: var(--color-surface-strong);
  border-bottom: 1px solid var(--color-line);
}
.guide-card-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-ink-strong);
}
.guide-card-header p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--color-ink-soft);
}
.guide-browser-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #e8f1fc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.guide-steps {
  padding: 12px 18px 18px;
}
.guide-step {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--color-line);
}
.guide-step:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.guide-step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #2b7de9;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.guide-step-content {
  flex: 1;
  min-width: 0;
}
.guide-step-title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-ink-strong);
}
.guide-step-desc {
  margin: 0;
  font-size: 13px;
  color: var(--color-ink-soft);
  line-height: 1.5;
}
.menu-dot {
  display: inline-block;
  width: 22px;
  height: 22px;
  line-height: 22px;
  text-align: center;
  background: #333;
  color: #fff;
  border-radius: 4px;
  font-size: 11px;
  vertical-align: middle;
}
.share-icon-box {
  display: inline-block;
  width: 22px;
  height: 22px;
  line-height: 22px;
  text-align: center;
  background: #007aff;
  color: #fff;
  border-radius: 4px;
  font-size: 12px;
  vertical-align: middle;
}
.guide-illustration {
  margin-top: 10px;
  padding: 10px;
  background: var(--body-bg);
  border-radius: 10px;
  overflow-x: auto;
}
.guide-svg {
  display: block;
  width: 100%;
  max-width: 350px;
  height: auto;
}

/* 浏览器切换导航 */
.guide-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-bottom: 20px;
  padding: 0 4px;
}
.guide-nav-btn {
  padding: 6px 14px;
  border-radius: 18px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-ink-mid);
  background: var(--color-surface);
  border: 1px solid var(--color-line-strong);
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.guide-nav-btn:hover {
  background: #e8f1fc;
  border-color: #2b7de9;
  color: #2b7de9;
}
.guide-nav-btn.active {
  background: #2b7de9;
  color: #fff;
  border-color: #2b7de9;
  font-weight: 600;
}

/* 卡片高亮动画 */
.guide-card-highlight {
  animation: guideCardPulse 0.6s ease-in-out 3;
  box-shadow: 0 0 0 3px #2b7de9, 0 4px 24px rgba(43,125,233,.2);
}
@keyframes guideCardPulse {
  0%, 100% { box-shadow: 0 0 0 3px #2b7de9, 0 4px 24px rgba(43,125,233,.2); }
  50% { box-shadow: 0 0 0 6px rgba(43,125,233,.3), 0 8px 32px rgba(43,125,233,.3); }
}

