html, body { overflow-x: hidden; max-width: 100vw; }
/* LunaX 主样式 */
:root {
  --primary: #0096fa;
  --primary-dark: #007acc;
  --primary-soft: #e6f4ff;
  --accent: #ff4060;
  --bg: #ffffff;
  --bg-alt: #f5f7fa;
  --bg-card: #ffffff;
  --text: #1f1f1f;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.04);
  --radius: 10px;
  --header-h: 60px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --font-serif: "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", SimSun, serif;
}
[data-theme="dark"] {
  --bg: #121417;
  --bg-alt: #1a1d21;
  --bg-card: #1e2227;
  --text: #e6e6e6;
  --text-muted: #9aa0a6;
  --border: #2c3138;
  --primary-soft: #16283a;
  --shadow: 0 1px 3px rgba(0,0,0,.4);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 14.5px; line-height: 1.6; color: var(--text); background: #edf1f5; min-height: 100vh; }
[data-theme="dark"] body { background: #0c0e11; }
body.admin-body { background: var(--bg-alt); }
.app-wrap { width: 100%; max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--bg); border-left: 1px solid var(--border); border-right: 1px solid var(--border); box-shadow: 0 0 24px rgba(0,0,0,.06); display: flex; flex-direction: column; position: relative; }
[data-theme="dark"] .app-wrap { box-shadow: 0 0 24px rgba(0,0,0,.45); }
@media (max-width: 480px) { .app-wrap { border-left: 0; border-right: 0; box-shadow: none; } }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: 1.45rem; } h2 { font-size: 1.15rem; } h3 { font-size: .95rem; }
p { margin: 0 0 1em; }
button { font-family: inherit; font-size: inherit; cursor: pointer; }
input:not([type="checkbox"]):not([type="radio"]), textarea, select { font-family: inherit; font-size: inherit; color: var(--text); background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px; padding: 7px 10px; max-width: 100%; }
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; margin: 0; padding: 0; accent-color: var(--primary); cursor: pointer; flex-shrink: 0; vertical-align: middle; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--primary); outline-offset: 0; border-color: var(--primary); }
textarea { width: 100%; resize: vertical; }
.container { width: 100%; max-width: 100%; margin: 0 auto; padding: 0 12px; }
.container.narrow { max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--primary); color: #fff; padding: 8px; z-index: 1000; }
.skip-link:focus { left: 8px; }
.muted { color: var(--text-muted); }
.small { font-size: .85em; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.inline { display: inline; }
.hp { position: absolute; left: -9999px; }
.mobile-only { display: none; }
.hide-sm { display: inline-flex; }

/* 按钮 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 7px 14px; border-radius: 999px; border: 1px solid transparent; font-weight: 600; background: var(--bg-card); color: var(--text); line-height: 1.2; white-space: nowrap; transition: .15s; font-size: .9rem; }
.btn:hover { text-decoration: none; filter: brightness(.96); }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: transparent; border-color: var(--border); }
.btn-ghost:hover { background: var(--bg-alt); }
.btn-danger { background: var(--accent); color: #fff; }
.btn-sm { padding: 4px 10px; font-size: .82rem; }
.btn-lg { padding: 8px 16px; font-size: .92rem; }
.btn-block { display: flex; width: 100%; }
.btn.is-active { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.btn-group { display: inline-flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.btn-group.wrap { display: flex; margin-bottom: 10px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--primary); font-size: .88em; }
.link-btn.danger { color: var(--accent); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; border: 0; background: transparent; color: var(--text); position: relative; }
.icon-btn:hover { background: var(--bg-alt); text-decoration: none; }
.badge { position: absolute; top: 1px; right: -1px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 10px; line-height: 16px; text-align: center; font-weight: 700; }
.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--bg-alt); border: 1px solid var(--border); font-size: .85em; }
.chip-sm { padding: 0 7px; font-size: .75em; }
.chip-danger { background: #fee; color: #c00; border-color: #fcc; }
.chip-author { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); }
.tag-r18 { position: absolute; top: 6px; left: 6px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 4px; }
.tag-r18.inline { position: static; vertical-align: middle; }

/* 头部 */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--bg-card); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: var(--header-h); padding: 0 12px; }
.logo { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 1.15rem; color: var(--primary); letter-spacing: -.02em; flex-shrink: 0; }
.logo:hover { text-decoration: none; }
.logo-text { font-size: 1.15rem; font-weight: 800; }
.nav-toggle { display: flex; flex-direction: column; justify-content: center; gap: 4px; background: none; border: 0; padding: 8px 6px; cursor: pointer; flex-shrink: 0; }
.nav-toggle span { width: 18px; height: 2px; background: var(--text); display: block; border-radius: 1px; }
.main-nav { display: none; position: absolute; top: calc(var(--header-h) + 6px); left: 8px; right: 8px; flex-direction: column; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.12); padding: 8px; z-index: 99; }
[data-theme="dark"] .main-nav { box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.main-nav.open { display: flex; }
.main-nav-group { display: flex; flex-direction: column; gap: 3px; }
.main-nav a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; color: var(--text); font-weight: 500; font-size: .92rem; border: 0; text-decoration: none; transition: background .15s ease, color .15s ease; }
.main-nav a svg { color: var(--text-muted); flex-shrink: 0; transition: color .15s ease; }
.main-nav a:hover { background: var(--bg-alt); text-decoration: none; color: var(--text); }
.main-nav a:hover svg { color: var(--text); }
.main-nav a.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.main-nav a.active svg { color: var(--primary); }
.main-nav .main-nav-post-btn { background: var(--primary); color: #fff; font-weight: 600; justify-content: center; margin-top: 4px; }
.main-nav .main-nav-post-btn svg { color: #fff; }
.main-nav .main-nav-post-btn:hover { background: var(--primary-dark); color: #fff; }
.main-nav .main-nav-post-btn:hover svg { color: #fff; }
.main-nav-divider { height: 1px; background: var(--border); margin: 6px 4px; }

/* 抽屉内主题切换开关 */
.main-nav-theme-row { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 8px 12px; background: transparent; border: 0; border-radius: 8px; color: var(--text); cursor: pointer; font-size: .92rem; transition: background .15s ease; }
.main-nav-theme-row:hover { background: var(--bg-alt); }
.theme-row-left { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.theme-icon-box { display: flex; align-items: center; justify-content: center; width: 18px; height: 18px; color: var(--text-muted); }
.theme-icon-sun { display: block; }
.theme-icon-moon { display: none; }
[data-theme="dark"] .theme-icon-sun { display: none; }
[data-theme="dark"] .theme-icon-moon { display: block; color: var(--primary); }
.theme-switch { width: 38px; height: 22px; background: var(--border); border-radius: 11px; position: relative; transition: background .2s ease; flex-shrink: 0; }
.theme-switch-slider { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s cubic-bezier(0.4, 0, 0.2, 1); }
[data-theme="dark"] .theme-switch { background: var(--primary); }
[data-theme="dark"] .theme-switch-slider { transform: translateX(16px); }

.search-form { flex: 1; min-width: 0; position: relative; display: flex; margin: 0 6px; }
.search-form input,
.search-form input[type="search"] {
  width: 100%;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border-radius: 999px !important;
  padding: 6px 30px 6px 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  font-size: .84rem;
  box-sizing: border-box;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.search-form input:focus,
.search-form input[type="search"]:focus {
  outline: none !important;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-soft);
  background: var(--bg-card);
  border-radius: 999px !important;
}
.search-form input::-webkit-search-decoration,
.search-form input::-webkit-search-cancel-button,
.search-form input::-webkit-search-results-button,
.search-form input::-webkit-search-results-decoration {
  -webkit-appearance: none;
  display: none;
}
.search-form button { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--text-muted); padding: 4px; display: flex; }
.search-suggest {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 6px;
  min-width: 220px;
  width: auto;
  max-width: min(340px, calc(100vw - 24px));
  max-height: min(360px, calc(100vh - 80px));
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 60;
  scrollbar-width: thin;
}
.search-suggest::-webkit-scrollbar {
  width: 6px;
}
.search-suggest::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
.search-suggest::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}
.search-suggest .suggest-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  color: var(--text);
  font-size: .86rem;
  line-height: 1.4;
  white-space: nowrap;
}
.search-suggest .suggest-item:hover {
  background: var(--bg-alt);
  text-decoration: none;
}
.search-suggest .suggest-tag-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}
.search-suggest .suggest-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
}
.search-suggest .suggest-user-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}
.search-suggest .suggest-user-handle {
  flex-shrink: 0;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-left: auto;
}
.search-suggest .suggest-meta {
  flex-shrink: 0;
  margin-left: auto;
}
.search-suggest .suggest-submit {
  border-top: 1px solid var(--border);
  font-size: .86rem;
}
.search-suggest .suggest-submit-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.header-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; margin-left: auto; }
.header-auth-btn { padding: 5px 12px; font-size: .86rem; font-weight: 600; }
.avatar { border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.avatar-btn { background: none; border: 0; padding: 2px; border-radius: 50%; display: flex; }
.user-menu { position: relative; }
.dropdown { position: absolute; right: 0; top: calc(100% + 6px); min-width: 180px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px 0; z-index: 60; }
.dropdown a, .dropdown button { display: block; width: 100%; text-align: left; padding: 8px 16px; color: var(--text); background: none; border: 0; }
.dropdown a:hover, .dropdown button:hover { background: var(--bg-alt); text-decoration: none; }
.dropdown-head { padding: 8px 16px; border-bottom: 1px solid var(--border); margin-bottom: 6px; display: flex; flex-direction: column; }
.admin-link { color: var(--accent) !important; }

/* flash */
/* flash 提示条统一美化：上下间距严格等比例对称，左右边缘与对应内容对齐 */
.flash-container {
  margin-top: 18px;
  margin-bottom: 6px;
}
.flash {
  margin: 0 0 10px;
  padding: 10px 40px 10px 16px;
  border-radius: 8px;
  position: relative;
  font-size: .88rem;
  line-height: 1.45;
  box-sizing: border-box;
  border: 1px solid transparent;
}
.flash-success { background: #e8f8ef; color: #17693a; border-color: #c3e6cb; }
.flash-error { background: #fdeaea; color: #b21f1f; border-color: #f5c6cb; }
.flash-close {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  color: inherit;
  cursor: pointer;
  opacity: .65;
  border-radius: 4px;
  transition: opacity .15s ease, background-color .15s ease;
}
.flash-close:hover {
  opacity: 1;
  background-color: rgba(0, 0, 0, 0.06);
}
.flash-close svg {
  display: block;
  pointer-events: none;
}

/* 登录/注册等认证卡片页面的专属对称适配：宽度与 440px 表单卡片严格对齐，上下间距均为 20px 对称 */
.flash-auth-container {
  max-width: 440px;
  margin-top: 20px;
  margin-bottom: 0;
  padding-left: 16px;
  padding-right: 16px;
  box-sizing: border-box;
}
.flash-auth-container .flash {
  margin: 0;
}
.flash-auth-container + .site-main {
  padding-top: 0 !important;
}
.flash-auth-container + .site-main .auth-wrap {
  padding-top: 20px !important;
}
.notice { background: var(--primary-soft); padding: 10px 14px; border-radius: 6px; margin: 8px 0 12px; }
.novel-main > .notice:first-child { margin-top: 2px; }
.notice-info { }

/* 布局 */
.site-main { flex: 1 0 auto; min-height: 0; padding: 12px 0 20px; }
.section { margin: 18px 0; }
.section:first-child { margin-top: 0; }
.section:last-child { margin-bottom: 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 10px; }
.section-head h2 { margin: 0; font-size: 1.05rem; font-weight: 700; line-height: 1.3; }
.more { font-size: .84rem; color: var(--text-muted); display: inline-flex; align-items: center; gap: 2px; line-height: 1; white-space: nowrap; }
.more:hover { color: var(--primary); text-decoration: none; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.page-head h1 { margin-bottom: 3px; font-size: 1.25rem; line-height: 1.3; }
.ranking-title-bar { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 3px; }
.ranking-title-bar h1 { margin: 0; }
.ranking-title-bar .inline-form { margin: 0; }
.page-head p { margin: 0; font-size: .84rem; }
.page-head.compact { margin-bottom: 12px; align-items: center; }
.ranking-filters { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.ranking-filter-row { display: flex; align-items: center; }
.ranking-filter-row .inline-form { margin: 0; display: inline-flex; align-items: center; }
.ranking-filter-label { font-size: .84rem; color: var(--text-muted); cursor: pointer; user-select: none; margin-right: 2px; }
.ranking-select-wrap { position: relative; display: inline-flex; align-items: center; }
.ranking-select-wrap select {
  height: 28px;
  font-size: .82rem;
  font-weight: 500;
  padding: 0 24px 0 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  line-height: 26px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  transition: .15s;
}
.ranking-select-wrap select:hover {
  background: var(--bg-alt);
  border-color: var(--border);
}
.ranking-select-wrap select:focus {
  outline: none;
  border-color: var(--primary);
}
.ranking-select-wrap::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--text-muted);
  pointer-events: none;
}
.ranking-date-controls { display: inline-flex; align-items: center; gap: 6px; }
.ranking-picker-wrap { position: relative; display: inline-flex; align-items: center; }
.ranking-picker-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  transition: all .15s ease;
}
.ranking-picker-wrap:hover .ranking-picker-btn {
  background: var(--bg-alt);
  color: var(--primary);
  border-color: var(--primary);
}
.ranking-date-picker {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
  margin: 0;
  padding: 0;
}
.home-columns { display: block; }
.side-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; margin-bottom: 14px; }
.empty-state { padding: 28px 16px; text-align: center; color: var(--text-muted); background: var(--bg-card); border: 1px dashed var(--border); border-radius: var(--radius); }
.breadcrumb { font-size: .82rem; color: var(--text-muted); margin-bottom: 10px; line-height: 1.4; }
.tabs-wrap {
  position: relative;
  width: 100%;
  margin-bottom: 12px;
  overflow: hidden;
}
.tabs {
  display: grid;
  grid-template-columns: repeat(var(--tabs-total, 6), minmax(0, 1fr));
  width: 100%;
  border-bottom: 1px solid var(--border);
}
.tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 1px;
  color: var(--text);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  font-size: .78rem;
  letter-spacing: -0.4px;
  text-decoration: none;
  margin-bottom: -1px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  transition: color .15s ease, border-color .15s ease;
}
.tabs a.active {
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
  font-weight: 600;
}
.tabs a:hover {
  text-decoration: none;
  color: var(--primary);
}

@media (max-width: 449px) {
  .tabs {
    display: grid !important;
    grid-template-columns: repeat(var(--tabs-total, 6), minmax(0, 1fr)) !important;
    width: 100% !important;
  }
  .tabs a {
    padding: 7px 0 !important;
    font-size: .75rem !important;
    letter-spacing: -0.4px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    text-align: center !important;
  }
}

/* Welcome 迎宾微卡（纯粹干练版：标语简介 + 极简微公告） */
.welcome-card { margin: 0 0 18px; padding: 12px 14px 10px; background: linear-gradient(135deg, var(--primary-soft), var(--bg-card)); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; gap: 8px; }
.welcome-header { display: flex; flex-direction: column; gap: 4px; }
.welcome-title { font-size: 1.05rem; font-weight: 700; margin: 0; color: var(--text); letter-spacing: -.01em; line-height: 1.3; }
.welcome-desc { font-size: .83rem; color: var(--text-muted); margin: 0; line-height: 1.45; }
.welcome-announcement { display: flex; align-items: center; gap: 8px; padding: 7px 10px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; font-size: .8rem; color: var(--text); transition: border-color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease; text-decoration: none; margin-top: 2px; position: relative; cursor: pointer; overflow: hidden; }
.welcome-announcement:hover { background: var(--bg-alt); border-color: var(--primary); box-shadow: 0 2px 8px rgba(0, 150, 250, 0.12); transform: translateY(-1px); text-decoration: none; }
.announce-badge { display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--primary), #38bdf8); color: #fff; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; flex-shrink: 0; line-height: 1.35; box-shadow: 0 1px 4px rgba(0, 150, 250, 0.25); }
.announce-ticker-wrap { flex: 1; min-width: 0; height: 20px; position: relative; overflow: hidden; }
.announce-ticker-track { position: relative; width: 100%; height: 100%; }
.announce-ticker-item { display: none; width: 100%; height: 100%; align-items: center; }
.announce-ticker-item.is-active { display: flex; }
.announce-ticker-item.slide-in { animation: announceUpIn .25s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.announce-ticker-item.slide-out { display: flex; position: absolute; top: 0; left: 0; animation: announceUpOut .25s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.announce-ticker-title { display: block; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .82rem; color: var(--text); font-weight: 500; line-height: 20px; transition: color .15s ease; }
.welcome-announcement:hover .announce-ticker-title { color: var(--primary); }
.announce-action { display: inline-flex; align-items: center; gap: 2px; color: var(--text-muted); font-size: .78rem; font-weight: 400; flex-shrink: 0; padding-left: 2px; transition: color .2s ease; }
.welcome-announcement:hover .announce-action { color: var(--primary); }
.announce-action svg { transition: transform .2s ease; }
.welcome-announcement:hover .announce-action svg { transform: translateX(2px); }

@keyframes announceUpIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes announceUpOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-12px); }
}

/* 作品卡片与系列卡片 */
.novel-grid { display: flex; flex-direction: column; gap: 8px; }
.novel-card, .series-card { position: relative; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: row; padding: 8px 10px; gap: 10px; transition: .15s; }
.novel-card:hover, .series-card:hover { box-shadow: var(--shadow); border-color: var(--primary); }
.novel-card-rank { display: flex; align-items: center; justify-content: center; width: 24px; flex-shrink: 0; align-self: center; }
.novel-card-rank .rank-medal { font-size: 1.25rem; line-height: 1; display: inline-flex; align-items: center; justify-content: center; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15)); user-select: none; }
.novel-card-rank .rank-badge { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; font-size: .88rem; font-weight: 700; line-height: 1; color: var(--text-muted); }
.novel-card-rank.rank-1, .novel-card-rank.rank-2, .novel-card-rank.rank-3 { background: transparent; }
.novel-card-rank.rank-n .rank-badge { background: transparent; color: var(--text-muted); font-size: .88rem; font-weight: 700; }
[data-theme="dark"] .novel-card-rank.rank-1 .rank-badge { background: #d97706; color: #fff; box-shadow: 0 2px 4px rgba(217,119,6,.35); }
[data-theme="dark"] .novel-card-rank.rank-2 .rank-badge { background: #475569; color: #fff; }
[data-theme="dark"] .novel-card-rank.rank-3 .rank-badge { background: #9a3412; color: #fff; }
[data-theme="dark"] .novel-card-rank.rank-n .rank-badge { color: var(--text-muted); }
.novel-card-cover, .series-card-cover { position: relative; display: block; width: 60px; height: 80px; flex-shrink: 0; border-radius: 6px; background: var(--bg-alt); overflow: hidden; }
.novel-card-cover img, .series-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-placeholder {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, hsl(var(--hue, 215) 35% 48%), hsl(calc(var(--hue, 215) + 30) 40% 36%));
  color: #fff;
  overflow: hidden;
  user-select: none;
}
/* 实体书立体书脊压线 */
.cover-placeholder::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(to right, rgba(0,0,0,0.22), rgba(255,255,255,0.18) 50%, rgba(0,0,0,0.08));
  z-index: 2;
}
/* 封面极简内嵌压纹细框 */
.cover-placeholder::after {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 3px;
  pointer-events: none;
}
/* 中央极简几何书卷徽标 */
.cover-placeholder-icon {
  width: 18px;
  height: 18px;
  margin-bottom: 5px;
  opacity: 0.85;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15));
}
/* 底部大字距极简品牌印签 */
.cover-placeholder-brand {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1;
  transform: translateX(1px); /* 补偿大字距视觉偏移 */
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.card-badge { position: absolute; top: 3px; right: 3px; background: rgba(0,0,0,.65); color: #fff; font-size: 9px; padding: 1px 3px; border-radius: 3px; }
.card-badge-ai { top: 18px; }
.card-meta-overlay { display: none; }
.novel-card-body { padding: 1px 0; display: flex; flex-direction: column; flex: 1; min-width: 0; overflow: hidden; }
.novel-card-title { display: block; width: 100%; max-width: 100%; min-width: 0; font-size: .93rem; font-weight: 600; margin: 0; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.novel-card-title a { color: var(--text); }
.novel-card-title a:hover { color: var(--primary); }
.novel-card-caption { display: none; }

.novel-card-series { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .72rem; line-height: 1.4; margin-bottom: 2px; }
.novel-card-series a { color: var(--text-muted); }
.novel-card-series a:hover { color: var(--primary); }
.novel-card-tags { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .72rem; line-height: 1.4; margin: auto 0; transform: translateY(1.5px); }
.novel-card-tags a { color: var(--text-muted); margin-right: 6px; }
.novel-card-tags a:hover { color: var(--primary); }
.novel-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: .75rem; color: var(--text-muted); margin-top: auto; }
.novel-card-tags ~ .novel-card-footer { margin-top: 0; }
.novel-card-author { display: inline-flex; align-items: center; gap: 4px; font-size: inherit; color: var(--text-muted); min-width: 0; flex-shrink: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.novel-card-author span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.novel-card-stats { display: inline-flex; align-items: center; gap: 8px; font-size: inherit; color: var(--text-muted); flex-shrink: 0; margin-left: auto; }
.stat-item {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--text-muted);
  font-size: inherit;
  line-height: 1;
  cursor: default;
  user-select: none;
}
.stat-item svg { flex-shrink: 0; }
.stat-item.stat-like.is-active,
.stat-item.like-item.is-active,
.stat-item.like-btn.is-active { color: var(--accent); }
.stat-item.stat-bookmark.is-active,
.stat-item.bookmark-item.is-active,
.stat-item.bookmark-btn.is-active { color: var(--primary); }
.stat-btn {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  padding: 0 !important;
  color: var(--text-muted);
  font-size: inherit;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color .15s ease;
}
.stat-btn:hover,
.stat-btn:focus,
.stat-btn:active,
.stat-btn:focus-visible {
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  border: 0 !important;
}
.stat-btn.like-btn:hover { color: var(--accent); }
.stat-btn.like-btn.is-active { color: var(--accent); background: transparent !important; box-shadow: none !important; }
.stat-btn.bookmark-btn:hover { color: var(--primary); }
.stat-btn.bookmark-btn.is-active { color: var(--primary); background: transparent !important; box-shadow: none !important; }
.stat-views { display: inline-flex; align-items: center; gap: 3px; }
.stat-time { margin-left: auto; }
.is-restricted .novel-card-cover img { filter: blur(12px); }
.progress-bar { height: 3px; background: var(--bg-alt); border-radius: 2px; overflow: hidden; margin-top: 2px; }
.progress-bar span { display: block; height: 100%; background: var(--primary); }

/* 推荐大卡片 */
.featured-grid { display: flex; flex-direction: column; gap: 10px; }
.featured-card { display: flex; gap: 10px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; }
.featured-card:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.featured-cover { width: 76px; height: 102px; flex-shrink: 0; border-radius: 6px; overflow: hidden; }
.featured-cover img { width: 100%; height: 100%; object-fit: cover; }
.featured-body { min-width: 0; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.featured-body h3 { margin: 0; font-size: .94rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.featured-body h3 a { color: var(--text); }
.featured-body h3 a:hover { color: var(--primary); }

/* 行式列表 */
.novel-rows { display: flex; flex-direction: column; gap: 8px; }
.novel-row { display: flex; gap: 10px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 10px; align-items: center; }
.novel-row-rank { width: 24px; font-size: 1.05rem; font-weight: 800; color: var(--text-muted); text-align: center; flex-shrink: 0; line-height: 1; }
.rank-1 { color: #e6b800 !important; } .rank-2 { color: #9aa5b1 !important; } .rank-3 { color: #c47b3a !important; }
.novel-row-cover { width: 60px; height: 80px; flex-shrink: 0; border-radius: 6px; overflow: hidden; position: relative; }
.novel-row-cover img { width: 100%; height: 100%; object-fit: cover; }
.novel-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.novel-row-title { margin: 0 0 4px; font-size: .92rem; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.novel-row-title a { color: var(--text); }
.novel-row-caption { display: none; }
.novel-row-meta { display: flex; flex-wrap: wrap; gap: 3px 8px; font-size: .74rem; color: var(--text-muted); align-items: center; }
.row-tags a { margin-right: 4px; }
.author-link { display: inline-flex; align-items: center; gap: 4px; }
.novel-row-actions { flex-shrink: 0; }

/* 排行侧栏 & 单栏排行网格 */
.rank-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.rank-card { display: flex; align-items: center; gap: 10px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 10px; min-height: 48px; }
.rank-card:hover { border-color: var(--primary); text-decoration: none; }
.rank-card .rank-num { width: 24px; text-align: center; font-size: 1.05rem; font-weight: 800; flex-shrink: 0; line-height: 1; }
.rank-card-body { min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 3px; flex: 1; }
.rank-card-title { font-weight: 600; font-size: .88rem; line-height: 1.3; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-list { list-style: none; padding: 0; margin: 0; }
.rank-list li { display: flex; gap: 8px; padding: 7px 0; border-top: 1px solid var(--border); align-items: flex-start; }
.rank-list li:first-child { border-top: 0; }
.rank-num { width: 22px; font-weight: 800; color: var(--text-muted); text-align: center; flex-shrink: 0; }
.rank-body { min-width: 0; display: flex; flex-direction: column; }
.rank-title { color: var(--text); font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 5px; }
.tag-chip { display: inline-flex; gap: 3px; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: .78rem; line-height: 1.4; border: 1px solid var(--border); background: var(--bg-alt); color: var(--text-muted); font-weight: 500; text-decoration: none; transition: background .15s ease, border-color .15s ease, color .15s ease; }
.tag-chip:hover { text-decoration: none; background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.tag-chip-alt { background: var(--bg-alt) !important; border-color: var(--border) !important; color: var(--text-muted) !important; font-weight: 600; }

/* 仅在文章页展示彩色清新标签 */
.novel-tags .tag-chip:nth-child(6n+1) { background: #edf5ff; border-color: #dbeafe; color: #2563eb; }
.novel-tags .tag-chip:nth-child(6n+2) { background: #eefaf3; border-color: #d1fae5; color: #059669; }
.novel-tags .tag-chip:nth-child(6n+3) { background: #f6f2fe; border-color: #ede9fe; color: #7c3aed; }
.novel-tags .tag-chip:nth-child(6n+4) { background: #fff1f2; border-color: #ffe4e6; color: #e11d48; }
.novel-tags .tag-chip:nth-child(6n+5) { background: #fef7ed; border-color: #ffedd5; color: #d97706; }
.novel-tags .tag-chip:nth-child(6n+6) { background: #ecfeff; border-color: #cffafe; color: #0891b2; }
.novel-tags .tag-chip:hover { filter: brightness(.95); }
.novel-tags .tag-chip-alt { background: var(--bg-alt) !important; border-color: var(--border) !important; color: var(--text-muted) !important; font-weight: 600; filter: none !important; }

[data-theme="dark"] .novel-tags .tag-chip:nth-child(6n+1) { background: rgba(37, 99, 235, 0.14); border-color: rgba(147, 197, 253, 0.25); color: #93c5fd; }
[data-theme="dark"] .novel-tags .tag-chip:nth-child(6n+2) { background: rgba(5, 150, 105, 0.14); border-color: rgba(110, 231, 183, 0.25); color: #6ee7b7; }
[data-theme="dark"] .novel-tags .tag-chip:nth-child(6n+3) { background: rgba(124, 58, 237, 0.14); border-color: rgba(196, 181, 253, 0.25); color: #c4b5fd; }
[data-theme="dark"] .novel-tags .tag-chip:nth-child(6n+4) { background: rgba(225, 29, 72, 0.14); border-color: rgba(253, 164, 175, 0.25); color: #fda4af; }
[data-theme="dark"] .novel-tags .tag-chip:nth-child(6n+5) { background: rgba(217, 119, 6, 0.14); border-color: rgba(253, 216, 153, 0.25); color: #fcd34d; }
[data-theme="dark"] .novel-tags .tag-chip:nth-child(6n+6) { background: rgba(8, 145, 178, 0.14); border-color: rgba(103, 232, 249, 0.25); color: #67e8f9; }
[data-theme="dark"] .novel-tags .tag-chip-alt { background: var(--bg-alt) !important; border-color: var(--border) !important; color: var(--text-muted) !important; }
.author-list { list-style: none; padding: 0; margin: 0; }
.author-list li { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px solid var(--border); }
.author-list li:first-child { border-top: 0; }
.author-list li a { display: flex; align-items: center; gap: 8px; color: var(--text); flex: 1; min-width: 0; }
.author-list li a > span { display: flex; flex-direction: column; min-width: 0; }

/* 标签页 */
.tag-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tag-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 10px 8px;
  color: var(--text);
  overflow: hidden;
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.tag-card:hover {
  text-decoration: none;
  border-color: var(--primary);
  box-shadow: var(--shadow);
}
.tag-card-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
}
.tag-card-name {
  font-size: .86rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .15s ease;
}
.tag-card:hover .tag-card-name {
  color: var(--primary);
}
.tag-card-count {
  font-size: .72rem;
  color: var(--text-muted);
  line-height: 1.25;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tag-card.has-r18 .tag-card-name {
  padding-right: 28px;
}
.tag-card .tag-r18 {
  position: absolute;
  top: 4px;
  right: 4px;
  left: auto;
  font-size: 9px;
  font-weight: 700;
  padding: 0 4px;
  line-height: 14px;
  border-radius: 3px;
}
.tag-card-cover { display: none; }
.tag-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.tag-page-head-info {
  min-width: 0;
  flex: 1;
}
.tag-search-form {
  position: relative;
  display: flex;
  align-items: center;
  width: 170px;
  flex-shrink: 0;
}
.tag-search-form input,
.tag-search-form input[type="search"] {
  width: 100%;
  height: 32px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border-radius: 999px !important;
  padding: 5px 32px 5px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: .84rem;
  box-sizing: border-box;
  color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.tag-search-form input:focus,
.tag-search-form input[type="search"]:focus {
  outline: none !important;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-soft);
  background: var(--bg-card);
}
.tag-search-form input::-webkit-search-decoration,
.tag-search-form input::-webkit-search-cancel-button,
.tag-search-form input::-webkit-search-results-button,
.tag-search-form input::-webkit-search-results-decoration {
  -webkit-appearance: none;
  display: none;
}
.tag-search-form button {
  position: absolute;
  right: 3px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: transparent;
  border: 0;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: color .15s ease, background-color .15s ease;
}
.tag-search-form button:hover {
  color: var(--primary);
  background: var(--bg-alt);
}
@media (max-width: 380px) {
  .tag-page-head {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .tag-search-form {
    width: 100%;
  }
}
.tag-show-head {
  margin-bottom: 12px;
  align-items: flex-start;
}
.tag-show-head-info {
  min-width: 0;
  flex: 1;
}
.tag-show-head-info h1 {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.related-tags-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  margin: 0 0 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.related-tags-icon {
  display: flex;
  align-items: center;
  color: var(--text-muted);
  flex-shrink: 0;
}
.related-tags-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  flex: 1;
}
.related-tags-list a.tag-chip {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: .78rem;
  padding: 2px 10px;
  border-radius: 999px;
  transition: all .15s ease;
}
.related-tags-list a.tag-chip:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
}

/* 用户 */
.user-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 340px) { .user-grid { grid-template-columns: 1fr; } }
.user-card { display: flex; gap: 8px; align-items: center; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 10px; min-width: 0; position: relative; transition: .15s; }
.user-card:hover { border-color: var(--primary); text-decoration: none; }
.user-card-avatar { flex-shrink: 0; display: flex; }
.user-card-avatar .avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.user-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.user-card-body h3, .user-card-name { margin: 0; font-size: .88rem; font-weight: 600; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-card-body h3 a, .user-card-name a { color: var(--text); }
.user-card-body h3 a:hover, .user-card-name a:hover { color: var(--primary); text-decoration: none; }
.user-card-stats { font-size: .72rem; color: var(--text-muted); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-card-dot { margin: 0 1px; opacity: .7; }
.user-card .follow-btn { flex-shrink: 0; padding: 2px 8px; font-size: .74rem; border-radius: 999px; line-height: 1.4; }
.user-card-body p { margin: 0; }
.profile-banner {
  width: 100%;
  height: 160px;
  background-color: #bae6fd;
  background-image: linear-gradient(140deg, #7dd3fc 0%, #38bdf8 55%, #93c5fd 100%);
  background-size: cover;
  background-position: center;
  margin-top: -12px;
  position: relative;
  border-bottom: 1px solid rgba(0, 150, 250, 0.12);
}
[data-theme="dark"] .profile-banner {
  background-color: #0369a1;
  background-image: linear-gradient(140deg, #075985 0%, #0284c7 60%, #0369a1 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.profile-header { display: flex; flex-direction: column; padding-bottom: 12px; position: relative; }
.profile-top-bar { display: flex; justify-content: space-between; align-items: flex-end; margin-top: -40px; margin-bottom: 10px; gap: 10px; position: relative; }
.profile-avatar-wrap { position: relative; flex-shrink: 0; }
.profile-avatar { width: 78px; height: 78px; border-radius: 50%; border: 3.5px solid var(--bg); background: var(--bg-card); box-shadow: 0 2px 8px rgba(0,0,0,.12); display: block; object-fit: cover; }
[data-theme="dark"] .profile-avatar { border-color: var(--bg); box-shadow: 0 2px 8px rgba(0,0,0,.45); }
.profile-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.profile-action-btn { display: inline-flex; align-items: center; gap: 4px; }
.profile-more-btn { padding: 4px 9px; min-width: 32px; height: 26px; box-sizing: border-box; }
.profile-identity { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.profile-name-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.profile-name { margin: 0; font-size: 1.25rem; font-weight: 800; line-height: 1.25; color: var(--text); }
.chip-admin { background: #e0f2fe; color: #0284c7; border-color: #bae6fd; font-weight: 600; }
.chip-mod { background: #dcfce7; color: #16a34a; border-color: #bbf7d0; font-weight: 600; }
.chip-follows-you { background: var(--bg-alt); color: var(--text-muted); font-size: .72rem; padding: 1px 6px; border-radius: 4px; font-weight: 500; border-color: var(--border); }
[data-theme="dark"] .chip-admin { background: rgba(2, 132, 199, 0.2); color: #38bdf8; border-color: rgba(56, 189, 248, 0.3); }
[data-theme="dark"] .chip-mod { background: rgba(22, 163, 74, 0.2); color: #4ade80; border-color: rgba(74, 222, 128, 0.3); }
.profile-handle { font-size: .84rem; color: var(--text-muted); }
.profile-bio { font-size: .88rem; line-height: 1.55; color: var(--text); white-space: pre-wrap; word-break: break-word; margin: 0 0 10px; }
.profile-bio a { color: var(--primary); }
.profile-bio.profile-bio-empty a { color: var(--text-muted); font-size: .84rem; text-decoration: none; border-bottom: 1px dashed var(--border); }
.profile-bio.profile-bio-empty a:hover { color: var(--primary); border-bottom-color: var(--primary); }
.profile-meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: .78rem; color: var(--text-muted); margin-bottom: 0; }
.profile-meta-item { display: inline-flex; align-items: center; gap: 4px; color: var(--text-muted); text-decoration: none; }
.profile-meta-item svg { flex-shrink: 0; color: var(--text-muted); }
.profile-meta-item:hover { color: var(--primary); text-decoration: none; }
.profile-meta-item:hover svg { color: var(--primary); }
.profile-stats-row { display: flex; align-items: baseline; gap: 8px; font-size: .82rem; color: var(--text-muted); margin-top: 10px; line-height: 1.4; }
.profile-stat-item { display: inline-flex; align-items: baseline; gap: 4px; }
.profile-stat-item strong { color: var(--text); font-weight: 700; font-size: .88rem; }
.profile-stat-dot { opacity: .35; font-size: .75rem; user-select: none; }

/* 作品页 */
.novel-layout { display: block; width: 100%; margin: 0 auto; }
.novel-main { width: 100%; }

/* 作品头部卡片 */
.novel-header-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 14px 12px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px; }
.novel-series-pill { display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--text-muted); width: fit-content; max-width: 100%; flex-wrap: wrap; }
.series-pill-link { display: inline-flex; align-items: center; gap: 5px; color: var(--primary); font-weight: 600; font-size: inherit; max-width: 320px; min-width: 0; }
.series-pill-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.series-pill-link svg { flex-shrink: 0; }
.series-pill-link:hover { text-decoration: underline; }
.series-pill-order { display: inline-block; padding: 2px 7px; border-radius: 5px; background: var(--primary-soft); color: var(--primary); font-size: .78rem; font-weight: 700; line-height: 1.35; flex-shrink: 0; }
.novel-view-title { margin: 0; font-size: 1.25rem; line-height: 1.35; font-weight: 700; color: var(--text); word-break: break-word; }
.novel-meta-group { display: flex; flex-direction: column; gap: 4px; }
.novel-meta-compact { font-size: .75rem; display: flex; align-items: center; flex-wrap: wrap; gap: 3px 6px; line-height: 1.3; color: var(--text-muted); }
.meta-dot { opacity: .6; }

/* 简介与标签 */
.novel-desc-wrap { display: flex; position: relative; }
.series-desc-wrap { padding-top: 10px; border-top: 1px solid var(--border); display: flex; position: relative; }
.novel-caption,
.series-card-desc {
  position: relative;
  width: 100%;
  color: var(--text-muted);
  font-size: .86rem;
  line-height: 1.55;
  word-break: break-word;
  margin: 0;
  padding: 0;
  text-align: justify;
}
.series-card-desc { color: var(--text); }
.novel-caption a,
.series-card-desc a { color: var(--primary); }

.novel-caption.is-clamped,
.series-card-desc.is-clamped {
  max-height: calc(1.55em * 3);
  overflow: hidden;
}
.novel-caption.is-clamped::before,
.series-card-desc.is-clamped::before {
  content: '';
  float: right;
  width: 0;
  height: 100%;
  margin-bottom: -1.55em;
}
.desc-toggle-btn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--primary);
  font-size: .82rem;
  font-weight: 500;
  cursor: pointer;
  line-height: 1.55;
  font-family: inherit;
  transition: opacity .15s ease;
}
.desc-toggle-btn:hover { text-decoration: underline; }
.desc-toggle-icon {
  vertical-align: -2px;
  flex-shrink: 0;
  transition: transform .2s ease;
}
.desc-toggle-icon.is-rotated { transform: rotate(180deg); }
.desc-btn-expand {
  float: right;
  clear: both;
  height: 1.55em;
  line-height: 1.55;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 4px;
  background: var(--bg-card);
  position: relative;
  z-index: 1;
}
.desc-btn-collapse {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  vertical-align: baseline;
  margin-left: 6px;
  white-space: nowrap;
}
.novel-caption.is-clamped .desc-btn-collapse,
.series-card-desc.is-clamped .desc-btn-collapse {
  display: none !important;
}
.novel-caption:not(.is-clamped) .desc-btn-expand,
.series-card-desc:not(.is-clamped) .desc-btn-expand,
.novel-caption:not(.is-clamped)::before,
.series-card-desc:not(.is-clamped)::before {
  display: none !important;
}
.novel-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; }
.reader-tag-add { margin-top: 6px; }
.reader-tag-add summary,
.reader-tag-add a,
.reader-tag-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .85em;
  color: var(--text);
  cursor: pointer;
  user-select: none;
  text-decoration: none;
  list-style: none;
  background: none;
  border: 0;
  padding: 0;
  font-family: inherit;
  line-height: 1.4;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.reader-tag-add summary::-webkit-details-marker { display: none; }
.reader-tag-add summary::marker { display: none; content: ""; }
.reader-tag-trigger::before {
  content: "▶";
  font-size: .7em;
  color: currentColor;
  transition: transform .15s ease;
  line-height: 1;
}
details.reader-tag-add[open] > summary.reader-tag-trigger::before {
  transform: rotate(90deg);
}
.reader-tag-add summary:hover,
.reader-tag-add a:hover,
.reader-tag-trigger:hover,
.reader-tag-add summary:active,
.reader-tag-add a:active,
.reader-tag-trigger:active,
.reader-tag-add summary:focus,
.reader-tag-add a:focus,
.reader-tag-trigger:focus,
.reader-tag-add a:visited {
  color: var(--text);
  text-decoration: none;
  outline: none;
}
.reader-tag-add summary:hover::before,
.reader-tag-add a:hover::before,
.reader-tag-trigger:hover::before,
.reader-tag-add summary:active::before,
.reader-tag-add a:active::before,
.reader-tag-trigger:active::before {
  color: currentColor;
}
.reader-tag-form {
  margin-top: 8px;
  width: 50%;
  box-sizing: border-box;
}
.reader-tag-input-row {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}
.reader-tag-input-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}
.reader-tag-input {
  width: 100%;
  height: 32px;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: .84rem;
  box-sizing: border-box;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.reader-tag-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-soft);
}
.reader-tag-input-wrap .tag-suggest {
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  min-width: 180px;
}
.reader-tag-submit-btn {
  height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: .82rem;
  font-weight: 600;
  flex-shrink: 0;
  box-sizing: border-box;
  white-space: nowrap;
}
.reader-tag-status {
  margin-top: 4px;
  font-size: .78rem;
  color: var(--text);
  line-height: 1.4;
  min-height: 0;
}
.reader-tag-status.is-error {
  color: var(--accent);
}
.reader-tag-status:empty {
  display: none;
}

/* 章节目录折叠 */
.chapter-toc-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; transition: border-color .15s ease; }
.chapter-toc-summary { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; cursor: pointer; list-style: none; font-size: .88rem; font-weight: 600; color: var(--text); user-select: none; }
.chapter-toc-summary::-webkit-details-marker { display: none; }
.toc-summary-left { display: flex; align-items: center; gap: 6px; }
.toc-badge { font-size: .72rem; background: var(--bg-alt); padding: 1px 6px; border-radius: 999px; color: var(--text-muted); }
.toc-summary-arrow { color: var(--text-muted); display: flex; align-items: center; transition: transform .2s ease; }
.chapter-toc-card[open] .toc-summary-arrow { transform: rotate(180deg); }
.chapter-toc-list { border-top: 1px solid var(--border); padding: 4px 0; max-height: 240px; overflow-y: auto; }
.chapter-toc-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 14px; font-size: .84rem; color: var(--text); text-decoration: none; transition: background .15s ease; }
.chapter-toc-item:hover { background: var(--bg-alt); color: var(--primary); text-decoration: none; }
.chapter-toc-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chapter-toc-page { font-size: .74rem; color: var(--text-muted); flex-shrink: 0; }

/* 阅读器控制工具栏 */
.reader-toolbar-capsule { display: flex; align-items: center; justify-content: space-between; gap: 6px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 10px; margin-bottom: 12px; }
.toolbar-section { display: flex; align-items: center; gap: 4px; }
.toolbar-btn { display: inline-flex; align-items: center; justify-content: center; padding: 4px 7px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 6px; font-size: .78rem; font-weight: 500; color: var(--text); line-height: 1.2; cursor: pointer; transition: border-color .15s, background .15s; }
.toolbar-btn:hover { border-color: var(--primary); color: var(--primary); }
.toolbar-btn-icon { width: 28px; height: 28px; padding: 0; border-radius: 6px; }
.toolbar-indicator { font-size: .78rem; font-weight: 700; min-width: 18px; text-align: center; color: var(--text); }
.theme-swatches { display: inline-flex; align-items: center; gap: 5px; padding: 2px; }
.theme-swatch { width: 19px; height: 19px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; transition: transform .15s ease, border-color .15s ease; box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.theme-swatch:hover { transform: scale(1.15); }
.theme-swatch.is-active { border-color: var(--primary); transform: scale(1.18); box-shadow: 0 0 0 1px var(--bg-card); }
.swatch-default { background: #ffffff; border: 1px solid #cbd5e1; }
.swatch-sepia { background: #f6efe1; }
.swatch-green { background: #e3edd9; }
.swatch-dark { background: #1b1b1b; }

/* 正文 */
.novel-body { background: var(--reader-bg, var(--bg-card)); color: var(--reader-fg, var(--text)); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 14px; font-size: var(--reader-size, 17px); line-height: var(--reader-lh, 1.9); font-family: var(--reader-font, var(--font)); width: 100%; margin: 0 auto 14px; word-break: break-word; overflow-wrap: anywhere; transition: background .2s ease, color .2s ease; }
.novel-body > :first-child { margin-top: 0 !important; }
.novel-body p { margin: 0 0 1.25em; text-indent: 0; }
.novel-body p:last-child { margin-bottom: 0; }
.novel-body h2.novel-chapter { font-size: 1.22em; font-weight: 700; line-height: 1.35; margin: 1.5em 0 8px; padding-bottom: 13px; border-bottom: 1px solid var(--border); color: inherit; }
.novel-body h2.novel-chapter:first-child { margin-top: 0 !important; }
.novel-body ruby rt { font-size: .6em; color: var(--text-muted); }
.novel-image { margin: 1.4em 0; text-align: center; }
.novel-image img { margin: 0 auto; border-radius: 6px; max-width: 100%; }
.novel-jump { display: inline-block; padding: 2px 10px; border: 1px solid var(--border); border-radius: 999px; font-size: .82em; color: var(--primary); }

/* 沉浸阅读模式 */
body.reader-immersive .site-header, body.reader-immersive .site-footer, body.reader-immersive .novel-side, body.reader-immersive .novel-header-card, body.reader-immersive .breadcrumb, body.reader-immersive .novel-series-hub, body.reader-immersive .novel-author-profile, body.reader-immersive .comments-section, body.reader-immersive .comments-card, body.reader-immersive .novel-action-panel, body.reader-immersive .novel-rel-section, body.reader-immersive .section { display: none !important; }
body.reader-immersive .novel-layout { max-width: 100%; }
body.reader-immersive .reader-toolbar-capsule { top: 0; }

/* 翻页 */
.page-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin: 14px 0 18px; width: 100%; }
.page-nav-side { display: flex; align-items: center; }
.page-nav-side.prev { justify-content: flex-start; }
.page-nav-side.next { justify-content: flex-end; }
.page-jump { display: flex; justify-content: center; align-items: center; white-space: nowrap; font-size: .88rem; color: var(--text-muted); }
.page-jump label { display: inline-flex; align-items: center; gap: 4px; }
.page-jump input { width: 44px; padding: 3px 4px; text-align: center; border-radius: 6px; font-size: .88rem; margin: 0 2px; }

/* 交互操作面板 */
.novel-action-panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; margin: 14px 0; display: flex; flex-direction: column; gap: 10px; }
.action-panel-grid { display: flex; width: 100%; gap: 6px; align-items: center; }
.action-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 28px; padding: 0 8px; font-size: .82rem; border-radius: 999px; font-weight: 600; line-height: 1; white-space: nowrap; cursor: pointer; transition: all .15s ease; box-sizing: border-box; }
.action-btn:active { transform: scale(0.97); }
.action-btn svg { flex-shrink: 0; }
.action-count { font-weight: 700; font-size: .8rem; font-variant-numeric: tabular-nums; }
.action-btn.like-btn { flex: 1 1 0; min-width: 0; border-color: var(--border); }
.action-btn.like-btn.is-active { background: #ffe8ec; color: var(--accent); border-color: var(--accent); }
[data-theme="dark"] .action-btn.like-btn.is-active { background: #3a1a22; }
.bookmark-split-btn { display: flex; flex: 1.15 1 0; min-width: 0; height: 28px; }
.bookmark-split-btn .bookmark-btn { flex: 1 1 0; min-width: 0; height: 28px; border-color: var(--border); border-radius: 999px 0 0 999px !important; padding: 0 6px; }
.bookmark-split-btn .bookmark-btn.is-active { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); }
.bookmark-split-btn .bookmark-lock-btn { width: 28px; height: 28px; padding: 0; flex-shrink: 0; border-color: var(--border); border-left: 0; border-radius: 0 999px 999px 0 !important; color: var(--text-muted); }
.bookmark-split-btn .bookmark-lock-btn.is-active { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); }
.share-btn { flex: 0 0 auto; height: 28px; border-color: var(--border); padding: 0 10px; }
.share-btn:hover { background: var(--bg-alt); border-color: var(--primary); color: var(--primary); }
.action-panel-footer { display: flex; align-items: center; justify-content: flex-end; gap: 12px; border-top: 1px solid var(--border); padding-top: 8px; }
.link-action-btn { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; padding: 3px 6px; color: var(--text-muted); font-size: .82rem; font-weight: 500; cursor: pointer; }
.link-action-btn:hover { color: var(--primary); text-decoration: none; }

/* 统一系列枢纽卡片 */
.novel-series-hub { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; margin: 14px 0; display: flex; flex-direction: column; gap: 10px; }
.series-hub-header { display: flex; align-items: center; gap: 10px; }
.series-hub-cover { width: 48px; height: 64px; flex-shrink: 0; border-radius: 6px; overflow: hidden; background: var(--bg-alt); }
.series-hub-cover img { width: 100%; height: 100%; object-fit: cover; }
.series-hub-cover .cover-placeholder::before { width: 2px; }
.series-hub-cover .cover-placeholder::after { inset: 3px; }
.series-hub-cover .cover-placeholder-icon { width: 12px; height: 12px; margin-bottom: 3px; }
.series-hub-cover .cover-placeholder-brand { font-size: 5.5px; letter-spacing: 0.12em; }
.series-hub-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.series-hub-badge { font-size: .72rem; color: var(--primary); font-weight: 600; }
.series-hub-title { margin: 0; font-size: .92rem; font-weight: 700; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.series-hub-title a { color: var(--text); }
.series-hub-title a:hover { color: var(--primary); }
.series-hub-meta { font-size: .74rem; line-height: 1.2; }
.series-hub-watch { flex-shrink: 0; }
.series-hub-nav { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; align-items: stretch; border-top: 1px solid var(--border); padding-top: 10px; }
.series-nav-btn { display: flex; flex-direction: column; justify-content: center; padding: 6px 8px; min-height: 42px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 6px; font-size: .78rem; color: var(--text); min-width: 0; text-decoration: none; transition: border-color .15s; }
.series-nav-btn:hover { border-color: var(--primary); text-decoration: none; }
.series-nav-btn.next { text-align: right; }
.series-nav-btn.catalog { flex-direction: row; align-items: center; justify-content: center; gap: 4px; padding: 8px 10px; font-weight: 600; }
.series-nav-btn.disabled { opacity: .5; cursor: not-allowed; background: var(--bg-alt); border-style: dashed; }
.nav-dir { font-size: .72rem; color: var(--text-muted); font-weight: 600; }
.nav-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8rem; font-weight: 500; }

/* 底部作者档案卡片 */
.novel-author-profile { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; margin: 14px 0; }
.author-profile-main { display: flex; gap: 10px; align-items: center; }
.author-profile-avatar { flex-shrink: 0; display: flex; align-self: center; }
.author-profile-avatar .avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.author-profile-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.author-profile-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.author-profile-name { margin: 0; font-size: .95rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.author-profile-name a { color: var(--text); }
.author-profile-name a:hover { color: var(--primary); }
.author-profile-actions { display: flex; gap: 5px; flex-shrink: 0; }
.author-profile-bio { margin: 2px 0 0; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.author-profile-stats { margin-top: 2px; }

/* 小说页推荐区块 */
.novel-rel-section { margin: 16px 0; }
.novel-rel-section .section-head { margin-bottom: 10px; padding: 0 2px; }
.novel-rel-section .section-head h2 { font-size: .95rem; font-weight: 600; color: var(--text); }

.r18-gate { text-align: center; padding: 32px 14px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); }
.side-series { display: flex; gap: 8px; color: var(--text); margin-bottom: 8px; }
.side-series img { border-radius: 4px; }
.side-series > span { display: flex; flex-direction: column; }
.side-novel-list { list-style: none; padding: 0; margin: 0; }
.side-novel-list li { display: flex; gap: 8px; padding: 7px 0; border-top: 1px solid var(--border); }
.side-novel-list li:first-child { border-top: 0; }
.side-novel-cover { width: 40px; height: 54px; flex-shrink: 0; border-radius: 4px; overflow: hidden; }
.side-novel-cover img { width: 100%; height: 100%; object-fit: cover; }
.side-novel-list li > div { display: flex; flex-direction: column; min-width: 0; }
.side-novel-title { color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .85rem; }

/* 系列页 */
.series-header-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 12px; }
.series-main-row { display: flex; gap: 12px; align-items: flex-start; }
.series-cover { width: 76px; height: 102px; flex-shrink: 0; border-radius: 6px; overflow: hidden; box-shadow: var(--shadow-sm); background: var(--bg-alt); }
.series-cover img { width: 100%; height: 100%; object-fit: cover; }
.series-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.series-view-title { margin: 0; font-size: 1.1rem; font-weight: 700; line-height: 1.35; color: var(--text); word-break: break-word; }
.series-author-row { display: flex; align-items: center; font-size: .84rem; }
.series-author-row .author-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-weight: 500; }
.series-author-row .author-link:hover { color: var(--primary); }
.series-meta-stats { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; font-size: .78rem; color: var(--text-muted); line-height: 1.4; }
.series-actions-bar { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 1px solid var(--border); }
.series-actions-grid { display: flex; gap: 6px; align-items: center; width: 100%; }
.series-actions-grid .btn { flex: 1 1 0; min-width: 0; height: 30px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; font-size: .8rem; font-weight: 600; padding: 0 6px; white-space: nowrap; border-radius: 999px; }
.series-actions-grid .btn svg { flex-shrink: 0; width: 13px; height: 13px; }
.series-actions-grid .action-count { font-size: .76rem; font-weight: 700; margin-left: 1px; }
.series-actions-aux { display: flex; justify-content: flex-end; padding-top: 2px; }
.sortable { list-style: none; padding: 0; margin: 0 0 10px; }
.sortable li { display: flex; align-items: center; gap: 10px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px; padding: 8px 12px; margin-bottom: 6px; cursor: grab; }
.sortable li.dragging { opacity: .5; }
.drag-handle { color: var(--text-muted); }
.sortable-title { flex: 1; }
.sortable-actions { display: flex; gap: 6px; }
.sortable-actions button { border: 1px solid var(--border); background: var(--bg-card); border-radius: 4px; padding: 2px 8px; }

/* 评论 */
.comments-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin: 14px 0 0; display: flex; flex-direction: column; gap: 12px; }
.comments-card-header { display: flex; align-items: center; justify-content: space-between; }
.comments-card-title { display: flex; align-items: center; gap: 6px; font-size: 1rem; font-weight: 700; color: var(--text); }
.comments-card-title h2 { margin: 0; font-size: inherit; font-weight: inherit; }
.comments-card-title svg { color: var(--primary); flex-shrink: 0; }
.comments-count-pill { display: inline-flex; align-items: center; justify-content: center; background: var(--bg-alt); color: var(--text-muted); font-size: .74rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; min-width: 20px; line-height: 1.3; }
.comments-closed { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--text-muted); font-size: .84rem; padding: 16px 12px; background: var(--bg-alt); border-radius: 8px; }

.comment-form { display: flex; gap: 10px; align-items: flex-start; margin: 0; }
.comment-my-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex-shrink: 0; margin-top: 2px; }
.comment-form-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.reply-to { display: flex; align-items: center; justify-content: space-between; background: var(--primary-soft); border-radius: 6px; padding: 4px 8px; font-size: .78rem; color: var(--primary); }
.reply-to[hidden] { display: none !important; }
.reply-to-text { display: inline-flex; align-items: center; gap: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reply-cancel-btn { display: inline-flex; align-items: center; justify-content: center; background: none; border: 0; color: var(--primary); padding: 2px; cursor: pointer; border-radius: 4px; }
.reply-cancel-btn:hover { background: rgba(0,0,0,.06); }
[data-theme="dark"] .reply-cancel-btn:hover { background: rgba(255,255,255,.1); }

.comment-input-box { background: var(--bg-alt); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.comment-input-box textarea { background: transparent; border: 0 !important; outline: none !important; padding: 0; width: 100%; font-size: .86rem; line-height: 1.5; color: var(--text); resize: none; min-height: 48px; box-shadow: none !important; }
.comment-input-box:focus-within { border-color: var(--primary); background: var(--bg-card); box-shadow: 0 0 0 2px var(--primary-soft); }
.comment-form-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; padding-top: 5px; border-top: 1px solid var(--border); }
.comment-submit-btn { display: inline-flex; align-items: center; gap: 4px; padding: 3px 12px; font-size: .8rem; font-weight: 600; border-radius: 999px; }

.comment-guest-prompt { display: flex; align-items: center; gap: 10px; background: var(--bg-alt); border: 1px dashed var(--border); border-radius: 10px; padding: 10px 12px; text-decoration: none; transition: border-color .15s, background .15s; }
.comment-guest-prompt:hover { border-color: var(--primary); background: var(--primary-soft); text-decoration: none; }
.guest-avatar-ph { width: 32px; height: 32px; border-radius: 50%; background: var(--border); display: flex; align-items: center; justify-content: center; color: var(--text-muted); flex-shrink: 0; }
.guest-prompt-text { flex: 1; font-size: .84rem; color: var(--text-muted); }
.guest-login-badge { font-size: .78rem; font-weight: 600; color: var(--primary); background: var(--bg-card); padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); flex-shrink: 0; }

.comment-list { display: flex; flex-direction: column; }
.comment { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); position: relative; }
.comment:first-child { border-top: 0; padding-top: 0; }
.comment:last-child { padding-bottom: 0; }
.comment-avatar { flex-shrink: 0; display: block; align-self: flex-start; margin-top: 1px; }
.comment-avatar .avatar { border-radius: 50%; object-fit: cover; }
.comment-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.comment-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; line-height: 1.3; margin: 0; }
.comment-head-left { display: flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: wrap; }
.comment-name { font-weight: 600; font-size: .86rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comment-name:hover { color: var(--primary); text-decoration: none; }
.comment-author-chip { display: inline-flex; align-items: center; font-size: .68rem; font-weight: 700; color: var(--primary); background: var(--primary-soft); padding: 1px 5px; border-radius: 4px; line-height: 1.25; }
.comment-reply-indicator { font-size: .75rem; color: var(--text-muted); }
.comment-reply-user { color: var(--primary); font-weight: 500; }
.comment-time { font-size: .72rem; color: var(--text-muted); flex-shrink: 0; }
.comment-content { font-size: .86rem; line-height: 1.55; color: var(--text); word-break: break-word; white-space: pre-wrap; margin: 0; }
.comment-actions { display: flex; align-items: center; gap: 12px; margin: 0; }
.comment-actions:empty { display: none; margin: 0; }
.comment-action-btn { display: inline-flex; align-items: center; gap: 3px; background: none; border: 0; padding: 2px 4px; color: var(--text-muted); font-size: .75rem; font-weight: 500; cursor: pointer; border-radius: 4px; transition: color .15s ease; }
.comment-action-btn svg { flex-shrink: 0; }
.comment-action-btn:hover { color: var(--primary); text-decoration: none; }
.comment-action-btn.danger:hover { color: var(--accent); }
.comment-actions .comment-action-btn:first-child { padding-left: 0 !important; margin-left: 0 !important; }

.comment-replies { margin-top: 2px; padding-left: 10px; border-left: 2px solid var(--border); display: flex; flex-direction: column; gap: 0; }
.comment-replies[hidden], .comment-replies:empty { display: none !important; margin: 0 !important; padding: 0 !important; border: 0 !important; }
.comment-reply { padding: 6px 0; border-top: 1px dashed var(--border); }
.comment-reply:first-child { border-top: 0; padding-top: 0; }
.comment-reply:last-child { padding-bottom: 0; }
.comment-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 24px 12px; text-align: center; color: var(--text-muted); }
.comment-empty svg { color: var(--border); opacity: .8; }
.comment-empty p { margin: 0; font-size: .82rem; }
.comments-more-wrap { padding-top: 10px; border-top: 1px solid var(--border); }

/* 表单 */
.form { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; }
.form.compact { padding: 10px; }
.form-row { margin-bottom: 10px; }
.form-row > label:not(.checkbox):not(.radio) { display: block; font-weight: 600; margin-bottom: 6px; }
.form-row > label.checkbox, .form-row > label.radio { margin-bottom: 0; }
.form-row input[type="text"], .form-row input[type="email"], .form-row input[type="password"], .form-row input[type="url"], .form-row input[type="number"], .form-row input[type="date"], .form-row input[type="search"], .form-row input:not([type]), .form-row .admin-input, .form-row select, .form-row input[type="datetime-local"], .form-row textarea { width: 100%; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 16px; }
.form-inline { display: flex; justify-content: space-between; align-items: center; }
.form-actions { display: flex; gap: 10px; align-items: center; justify-content: flex-end; }
.form-actions.sticky { position: sticky; bottom: 0; background: var(--bg-card); padding: 10px 14px; border-top: 1px solid var(--border); margin: 0 -14px -16px; border-radius: 0 0 var(--radius) var(--radius); }
.req { color: var(--accent); }
.hint { font-size: .85em; margin: 4px 0 0; }
.radio-group { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.radio-group.vertical { flex-direction: column; }
.radio, .checkbox, label.checkbox, label.radio { display: inline-flex; align-items: center; gap: 7px; font-weight: 400; cursor: pointer; user-select: none; line-height: 1.4; }
.radio input[type="radio"], .checkbox input[type="checkbox"], label.checkbox input[type="checkbox"], label.radio input[type="radio"] { margin: 0; flex-shrink: 0; position: relative; }
.inline-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; position: relative; }
.auth-wrap { max-width: 440px; padding-top: 24px; padding-bottom: 24px; }
.auth-form h1 { text-align: center; margin-bottom: 14px; }
.auth-form .btn-block { margin-top: 6px; }
.auth-form p.center { margin: 14px 0 2px; }
.cover-preview { display: flex; gap: 12px; align-items: center; margin-top: 8px; }
.cover-preview img { border-radius: 6px; }
.avatar-row { display: flex; gap: 16px; align-items: center; }
.danger-zone { border: 1px solid #fcc; border-radius: var(--radius); padding: 14px; margin-top: 24px; }
.danger-zone summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.tool-hint { margin-left: auto; }
.novel-form textarea[data-editor] { font-family: var(--font); font-size: 15px; line-height: 1.8; min-height: 400px; }
.editor-preview { margin-top: 10px; }
.tag-suggest { position: absolute; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); z-index: 40; min-width: 200px; max-height: 240px; overflow: auto; }
.tag-suggest button { display: flex; justify-content: space-between; width: 100%; gap: 12px; padding: 6px 12px; background: none; border: 0; text-align: left; color: var(--text); }
.tag-suggest button:hover, .tag-suggest button.active { background: var(--bg-alt); }
.search-filters { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 12px; }
.search-filters summary { cursor: pointer; font-weight: 600; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin: 12px 0 10px; }
.filter-grid label { display: flex; flex-direction: column; gap: 4px; font-size: .85em; }
.filter-grid label.checkbox { flex-direction: row; align-items: center; align-self: end; }
.search-filters .hint { margin: 8px 0 12px; }
.search-filters .filter-form button[type="submit"] { margin-top: 0; }

/* 创作中心 / 设置 (单栏顶栏选项卡导航) */
.dash-layout { display: flex; flex-direction: column; gap: 12px; }
.dash-main { width: 100%; min-width: 0; }

/* 创作中心与设置现代化分段导航卡片 */
.dash-nav-card, .settings-nav-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dash-nav-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  background: var(--bg-alt);
  padding: 3px;
  border-radius: 10px;
}
.dash-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 4px;
  border-radius: 7px;
  color: var(--text-muted);
  font-size: .82rem;
  font-weight: 500;
  text-decoration: none;
  transition: all .15s ease;
  white-space: nowrap;
}
.dash-tab svg { flex-shrink: 0; opacity: .75; }
.dash-tab:hover {
  color: var(--text);
  text-decoration: none;
}
.dash-tab.is-active {
  background: var(--bg-card);
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.dash-tab.is-active svg { opacity: 1; color: var(--primary); }
.dash-nav-actions {
  display: flex;
  gap: 8px;
}
.dash-action-btn {
  flex: 1 1 0;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: .82rem;
  font-weight: 600;
  border-radius: 8px;
  padding: 0 8px;
  white-space: nowrap;
}

/* 页面标题栏 */
.dash-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 2px 0 10px;
}
.dash-page-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.dash-page-title {
  font-size: 1.18rem;
  font-weight: 800;
  margin: 0;
  color: var(--text);
  letter-spacing: -.01em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
}
.dash-page-title svg {
  flex-shrink: 0;
  display: block;
}
.dash-head-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  height: 28px;
  padding: 0 10px;
  font-size: .78rem;
  font-weight: 600;
}

/* 8大核心指标网格 (2列并排，4行平衡布局) */
.dash-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.dash-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color .15s ease, transform .15s ease;
}
.dash-stat-card:hover {
  border-color: var(--primary);
}
.dash-stat-top {
  display: flex;
  align-items: center;
  gap: 6px;
}
.dash-stat-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dash-stat-icon.icon-primary { background: var(--primary-soft); color: var(--primary); }
.dash-stat-icon.icon-warn { background: rgba(245, 158, 11, .15); color: #d97706; }
.dash-stat-icon.icon-purple { background: rgba(139, 92, 246, .15); color: #8b5cf6; }
.dash-stat-icon.icon-teal { background: rgba(20, 184, 166, .15); color: #0d9488; }
.dash-stat-icon.icon-blue { background: rgba(59, 130, 246, .15); color: #2563eb; }
.dash-stat-icon.icon-red { background: rgba(239, 68, 68, .15); color: #ef4444; }
.dash-stat-icon.icon-amber { background: rgba(245, 158, 11, .15); color: #b45309; }
.dash-stat-icon.icon-green { background: rgba(16, 185, 129, .15); color: #059669; }

[data-theme="dark"] .dash-stat-icon.icon-warn { background: rgba(245, 158, 11, .25); color: #fbbf24; }
[data-theme="dark"] .dash-stat-icon.icon-purple { background: rgba(139, 92, 246, .25); color: #a78bfa; }
[data-theme="dark"] .dash-stat-icon.icon-teal { background: rgba(20, 184, 166, .25); color: #2dd4bf; }
[data-theme="dark"] .dash-stat-icon.icon-blue { background: rgba(59, 130, 246, .25); color: #60a5fa; }
[data-theme="dark"] .dash-stat-icon.icon-red { background: rgba(239, 68, 68, .25); color: #f87171; }
[data-theme="dark"] .dash-stat-icon.icon-amber { background: rgba(245, 158, 11, .25); color: #f59e0b; }
[data-theme="dark"] .dash-stat-icon.icon-green { background: rgba(16, 185, 129, .25); color: #34d399; }

.dash-stat-label {
  font-size: .75rem;
  font-weight: 500;
  color: var(--text-muted);
}
.dash-stat-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  margin-top: 1px;
}

/* 作品与系列管理卡片通用组件 (.dash-work-card, .dash-manage-card) */
.dash-work-list, .dash-manage-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dash-work-card, .dash-manage-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 10px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.dash-work-card:hover, .dash-manage-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
}
.dash-work-cover, .dash-manage-cover {
  width: 52px;
  height: 70px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-alt);
  position: relative;
}
.dash-work-cover img, .dash-manage-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.dash-work-body, .dash-manage-body {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dash-work-title-row, .dash-manage-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
}
.dash-work-title, .dash-manage-title {
  margin: 0;
  font-size: .88rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  min-width: 0;
  flex: 1;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dash-work-title a, .dash-manage-title a {
  color: var(--text);
  text-decoration: none;
}
.dash-work-title a:hover, .dash-manage-title a:hover {
  color: var(--primary);
  text-decoration: none;
}
.chip-sub {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  color: var(--primary);
  margin-right: 2px;
}

/* 状态药丸胶囊 */
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: .68rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.3;
}
.status-pill.status-public {
  background: rgba(16, 185, 129, .12);
  color: #059669;
}
.status-pill.status-draft {
  background: rgba(245, 158, 11, .15);
  color: #d97706;
}
.status-pill.status-private {
  background: var(--bg-alt);
  color: var(--text-muted);
}
.status-pill.status-fan {
  background: rgba(59, 130, 246, .12);
  color: #2563eb;
}
.status-pill.status-hidden {
  background: rgba(239, 68, 68, .12);
  color: #dc2626;
}
[data-theme="dark"] .status-pill.status-public { background: rgba(16, 185, 129, .22); color: #34d399; }
[data-theme="dark"] .status-pill.status-draft { background: rgba(245, 158, 11, .22); color: #fbbf24; }
[data-theme="dark"] .status-pill.status-private { background: var(--bg-alt); color: var(--text-muted); }
[data-theme="dark"] .status-pill.status-fan { background: rgba(59, 130, 246, .22); color: #60a5fa; }
[data-theme="dark"] .status-pill.status-hidden { background: rgba(239, 68, 68, .22); color: #f87171; }

/* 卡片统计与时间指标行 */
.dash-work-metrics, .dash-manage-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 6px;
  font-size: .74rem;
  color: var(--text-muted);
}
.metric-item {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.metric-val {
  font-weight: 600;
  color: var(--text);
}
.metric-key {
  color: var(--text-muted);
}

/* 卡片底部操作栏 */
.dash-work-foot, .dash-manage-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
  gap: 8px;
}
.dash-work-time, .dash-manage-time {
  font-size: .72rem;
  color: var(--text-muted);
  flex-shrink: 0;
}
.dash-work-actions, .dash-manage-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.dash-mini-btn, .btn-manage {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: .74rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: all .15s ease;
  line-height: 1.35;
}
.dash-mini-btn:hover, .btn-manage:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}
.dash-mini-btn.danger:hover, .btn-manage.danger:hover {
  background: rgba(239, 68, 68, .1);
  border-color: #ef4444;
  color: #dc2626;
}

/* 筛选工具栏 (作品管理) */
.dash-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.dash-filter-chips {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
  scrollbar-width: none;
  flex: 1 1 auto;
}
.dash-filter-chips::-webkit-scrollbar { display: none; }
.filter-chip {
  display: inline-flex;
  align-items: center;
  height: 28px;
  box-sizing: border-box;
  font-size: .78rem;
  font-weight: 500;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  white-space: nowrap;
  text-decoration: none;
  transition: all .15s ease;
}
.filter-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}
.filter-chip.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
}
.dash-sort-box {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.dash-sort-form {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 10px 2px 8px;
}
.dash-sort-label {
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
}
.dash-select {
  border: 0;
  background: transparent;
  font-size: .78rem;
  color: var(--text);
  padding: 3px 0;
  outline: none;
  cursor: pointer;
}

/* 概览页通知列表 */
.dash-notif-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dash-notif-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: .84rem;
  transition: border-color .15s ease;
}
.dash-notif-item.is-unread {
  border-left: 3px solid var(--primary);
  background: var(--primary-soft);
}
.dash-notif-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  margin-top: 6px;
  flex-shrink: 0;
}
.dash-notif-item.is-unread .dash-notif-dot {
  background: var(--primary);
}
.dash-notif-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dash-notif-link {
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
}
.dash-notif-link:hover {
  color: var(--primary);
  text-decoration: none;
}
.dash-notif-time {
  font-size: .72rem;
  color: var(--text-muted);
}
.dash-notif-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 24px 10px;
  color: var(--text-muted);
  font-size: .84rem;
}

/* 数据统计页周期与作品排行卡片 */
.stats-period-group {
  display: inline-flex;
  background: var(--bg-alt);
  padding: 2px;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.period-btn {
  padding: 3px 8px;
  font-size: .76rem;
  border-radius: 6px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: all .15s ease;
}
.period-btn:hover {
  color: var(--text);
  text-decoration: none;
}
.period-btn.is-active {
  background: var(--bg-card);
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.top-works-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.top-work-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color .15s ease;
}
.top-work-card:hover {
  border-color: var(--primary);
}
.top-work-header {
  display: flex;
  align-items: center;
  gap: 8px;
}
.top-work-rank {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .78rem;
  font-weight: 800;
  flex-shrink: 0;
  line-height: 1;
}
.top-work-rank.rank-1, .top-work-rank.rank-2, .top-work-rank.rank-3 { background: transparent !important; box-shadow: none !important; }
.top-work-rank .rank-medal { font-size: 1.15rem; line-height: 1; display: inline-flex; align-items: center; justify-content: center; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.12)); }
.top-work-rank.rank-n { background: var(--bg-alt); color: var(--text-muted); }
.top-work-title {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: .88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.top-work-title a {
  color: var(--text);
  text-decoration: none;
}
.top-work-title a:hover {
  color: var(--primary);
  text-decoration: none;
}
.top-work-recent-badge {
  text-align: right;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.2;
}
.recent-val {
  font-size: .82rem;
  font-weight: 700;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}
.recent-lbl {
  font-size: .68rem;
  color: var(--text-muted);
}
.top-work-bar-track {
  height: 4px;
  background: var(--bg-alt);
  border-radius: 2px;
  overflow: hidden;
}
.top-work-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-soft) 0%, var(--primary) 100%);
  border-radius: 2px;
  transition: width .3s ease;
}
.top-work-stats {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .74rem;
  color: var(--text-muted);
}
.stat-cell-val {
  font-weight: 600;
  color: var(--text);
}
.stat-cell-lbl {
  color: var(--text-muted);
}

/* ========== 用户设置中心 (Settings Redesign) ========== */
.settings-form,
.novel-workspace-form,
.series-workspace-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color .15s ease;
}
.settings-card:hover {
  border-color: rgba(30, 126, 255, .3);
}
.settings-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.settings-card-head-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.settings-card-title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.35;
}
.settings-card-title svg {
  color: var(--primary);
  flex-shrink: 0;
}
.settings-card-desc {
  font-size: .76rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

/* 主页视觉媒体定制器 (横幅 + 头像) */
.settings-banner-uploader {
  position: relative;
  width: 100%;
  height: 120px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-alt);
  border: 1px dashed var(--border);
}
.settings-banner-uploader img[data-banner-preview] {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.settings-banner-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: .78rem;
  background: linear-gradient(135deg, var(--bg-alt) 0%, rgba(30, 126, 255, .06) 100%);
}
.settings-banner-placeholder svg {
  color: var(--text-muted);
  opacity: .8;
}
.settings-banner-actions {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 2;
}
.settings-banner-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-size: .75rem;
  font-weight: 600;
  cursor: pointer;
  border: 0;
  transition: background .15s ease;
  user-select: none;
}
.settings-banner-btn:hover {
  background: rgba(0, 0, 0, .85);
}
.settings-banner-remove {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(220, 38, 38, .75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-size: .72rem;
  cursor: pointer;
  user-select: none;
  border: 0;
  margin: 0;
}
.settings-banner-remove input {
  margin: 0;
}

.settings-avatar-uploader {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 2px;
}
.settings-avatar-frame {
  position: relative;
  width: 76px;
  height: 76px;
  flex-shrink: 0;
}
.settings-avatar-frame img.avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 2px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}
.settings-avatar-trigger {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px solid var(--bg-card);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  transition: transform .15s ease, background .15s ease;
}
.settings-avatar-trigger:hover {
  transform: scale(1.08);
  background: var(--primary-dark);
}
.settings-avatar-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}
.settings-avatar-name {
  font-size: .92rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.settings-avatar-hint {
  font-size: .74rem;
  color: var(--text-muted);
  line-height: 1.35;
}
.settings-avatar-remove {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .75rem;
  color: #dc2626;
  cursor: pointer;
  margin-top: 3px;
  user-select: none;
}
.settings-avatar-remove-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(220, 38, 38, .3);
  background: rgba(220, 38, 38, .08);
  color: #dc2626;
  font-size: .74rem;
  cursor: pointer;
  margin-top: 4px;
  width: fit-content;
  transition: all .15s ease;
}
.settings-avatar-remove-btn:hover {
  background: rgba(220, 38, 38, .16);
  border-color: #dc2626;
}
.settings-avatar-remove input {
  margin: 0;
}

/* 表单字段组件 */
.settings-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.settings-label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.settings-label .req {
  color: var(--accent);
  margin-left: 2px;
}
.settings-label-hint {
  font-size: .72rem;
  font-weight: 400;
  color: var(--text-muted);
}
.settings-input,
.settings-select,
.settings-textarea {
  width: 100%;
  padding: 8px 11px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: .88rem;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  box-sizing: border-box;
  font-family: inherit;
}
.settings-input:focus,
.settings-select:focus,
.settings-textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--bg-card);
  box-shadow: 0 0 0 2px var(--primary-soft);
}
.settings-input:disabled {
  opacity: 1;
  cursor: not-allowed;
  background: var(--bg-alt);
  color: var(--text-muted);
  -webkit-text-fill-color: var(--text-muted);
  border-color: var(--border);
}
.settings-textarea {
  min-height: 80px;
  resize: vertical;
  line-height: 1.5;
}
.settings-field-hint {
  font-size: .74rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin: 1px 0 0;
}
.settings-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

/* 现代化开关行 (iOS风格 Switch) */
.settings-switch-group {
  display: flex;
  flex-direction: column;
}
.settings-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.settings-switch-row:last-child {
  border-bottom: 0;
  padding-bottom: 2px;
}
.settings-switch-row:first-child {
  padding-top: 2px;
}
.switch-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.switch-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.switch-title {
  font-size: .86rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.switch-desc {
  font-size: .74rem;
  color: var(--text-muted);
  line-height: 1.35;
}
.switch-badge {
  font-size: .68rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  line-height: 1.3;
  white-space: nowrap;
}
.switch-badge.badge-r18 {
  background: rgba(225, 29, 72, .12);
  color: #e11d48;
}
.switch-badge.badge-r18g {
  background: rgba(147, 51, 234, .12);
  color: #9333ea;
}
.switch-badge.badge-ai {
  background: rgba(59, 130, 246, .12);
  color: #2563eb;
}
[data-theme="dark"] .switch-badge.badge-r18 { background: rgba(225, 29, 72, .25); color: #fb7185; }
[data-theme="dark"] .switch-badge.badge-r18g { background: rgba(147, 51, 234, .25); color: #c084fc; }
[data-theme="dark"] .switch-badge.badge-ai { background: rgba(59, 130, 246, .25); color: #93c5fd; }

/* 核心 UI Switch */
.ui-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
  user-select: none;
  margin: 0;
}
.ui-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
  margin: 0;
}
.ui-switch-track {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--border);
  border-radius: 999px;
  transition: background .2s cubic-bezier(0.4, 0, 0.2, 1);
}
.ui-switch-track::after {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  border-radius: 50%;
  transition: transform .2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.ui-switch input:checked + .ui-switch-track {
  background: var(--primary);
}
.ui-switch input:checked + .ui-switch-track::after {
  transform: translateX(18px);
}
.ui-switch input:focus-visible + .ui-switch-track {
  box-shadow: 0 0 0 2px var(--primary-soft);
}
.ui-switch input:disabled + .ui-switch-track {
  opacity: .45;
  cursor: not-allowed;
}

/* 邮箱验证状态胶囊与提示栏 */
.verify-status-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  margin-top: 6px;
  font-size: .78rem;
}
.verify-status-box.is-unverified {
  background: rgba(245, 158, 11, .1);
  border: 1px solid rgba(245, 158, 11, .25);
  color: #b45309;
}
.verify-status-box.is-verified {
  background: rgba(16, 185, 129, .1);
  border: 1px solid rgba(16, 185, 129, .25);
  color: #059669;
}
[data-theme="dark"] .verify-status-box.is-unverified {
  background: rgba(245, 158, 11, .18);
  border-color: rgba(245, 158, 11, .3);
  color: #fbbf24;
}
[data-theme="dark"] .verify-status-box.is-verified {
  background: rgba(16, 185, 129, .18);
  border-color: rgba(16, 185, 129, .3);
  color: #34d399;
}
.verify-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
}
.verify-badge.is-verified {
  background: rgba(16, 185, 129, .15);
  color: #059669;
}
.verify-badge.is-unverified {
  background: rgba(245, 158, 11, .18);
  color: #d97706;
}
[data-theme="dark"] .verify-badge.is-verified { background: rgba(16, 185, 129, .25); color: #34d399; }
[data-theme="dark"] .verify-badge.is-unverified { background: rgba(245, 158, 11, .25); color: #fbbf24; }

/* 危险操作折叠卡片 */
.settings-danger-card {
  background: var(--bg-card);
  border: 1px solid rgba(239, 68, 68, .25);
  border-radius: var(--radius);
  padding: 14px;
  margin-top: 4px;
  transition: border-color .15s ease;
}
.settings-danger-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .92rem;
  font-weight: 700;
  color: #dc2626;
  cursor: pointer;
  user-select: none;
  list-style: none;
}
.settings-danger-card summary::-webkit-details-marker {
  display: none;
}
.settings-danger-body {
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.settings-danger-alert {
  background: rgba(239, 68, 68, .08);
  border-left: 3px solid #ef4444;
  padding: 8px 10px;
  border-radius: 4px;
  color: #dc2626;
  font-size: .76rem;
  line-height: 1.45;
}
[data-theme="dark"] .settings-danger-alert {
  background: rgba(239, 68, 68, .15);
  color: #f87171;
}

/* 标签屏蔽与用户屏蔽 */
.tag-input-bar {
  display: flex;
  gap: 8px;
  align-items: stretch;
  position: relative;
  max-width: 520px;
}
.tag-input-prefix {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
}
.tag-input-prefix svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  transition: color .15s;
}
.tag-input-prefix:focus-within svg {
  color: var(--primary);
}
.tag-input-prefix input {
  padding-left: 34px !important;
  height: 38px;
  border-radius: 8px;
  font-size: .88rem;
  line-height: normal;
}
.tag-input-submit {
  height: 38px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: .88rem;
  font-weight: 500;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}
.tag-mute-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.tag-mute-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px 3px 8px;
  border-radius: 6px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  font-size: .78rem;
  font-weight: 600;
  color: var(--text);
}
.tag-mute-del {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: none;
  border: 0;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  font-size: 13px;
  line-height: 1;
  transition: all .15s ease;
}
.tag-mute-del:hover {
  background: rgba(239, 68, 68, .15);
  color: #ef4444;
}

.blocked-user-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.blocked-user-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.blocked-user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  text-decoration: none;
  color: var(--text);
}
.blocked-user-info:hover {
  text-decoration: none;
  color: var(--primary);
}
.blocked-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.blocked-user-names {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}
.blocked-user-name {
  font-size: .86rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.blocked-user-handle {
  font-size: .72rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* 统一保存操作按钮与空状态 */
.settings-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}
.settings-save-btn {
  font-weight: 700;
  height: 36px;
  padding: 0 18px;
  font-size: .88rem;
  border-radius: 8px;
}
.settings-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 24px 12px;
  color: var(--text-muted);
  font-size: .82rem;
  text-align: center;
  background: var(--bg-alt);
  border-radius: 8px;
  border: 1px dashed var(--border);
}
.settings-empty-state svg {
  color: var(--text-muted);
  opacity: .5;
}

/* ========================================================
   通知中心现代化设计 (.notif-feed, .notif-card, .notif-filter)
   ======================================================== */
.notif-page-header {
  margin-bottom: 12px;
}
.notif-header-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.notif-header-title-wrap .dash-page-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
}
.notif-count-total {
  font-size: .75rem;
  color: var(--text-muted);
  background: var(--bg-alt);
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 600;
}
.notif-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.notif-readall-btn,
.notif-clear-btn {
  height: 28px;
  padding: 0 10px;
  font-size: .78rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.notif-readall-btn,
.notif-clear-btn {
  color: var(--text-muted);
}
.notif-readall-btn:hover {
  color: var(--text);
}
.notif-clear-btn:hover {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.08);
}
.notif-filter-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 12px;
  padding-bottom: 2px;
  scroll-behavior: smooth;
}
.notif-filter-scroll::-webkit-scrollbar {
  display: none;
}
.notif-filter-track {
  display: flex;
  gap: 6px;
  white-space: nowrap;
  min-width: min-content;
}
.notif-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: .78rem;
  font-weight: 500;
  text-decoration: none;
  transition: all .15s ease;
  flex-shrink: 0;
  box-sizing: border-box;
  line-height: 1;
}
.notif-filter-pill:hover {
  color: var(--text);
  border-color: var(--primary);
  text-decoration: none;
}
.notif-filter-pill.is-active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(30, 126, 255, .25);
}

.notif-feed {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.notif-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: border-color .15s ease, box-shadow .15s ease;
  position: relative;
}
.notif-card:hover {
  border-color: var(--primary);
}
.notif-card.is-unread {
  background: linear-gradient(90deg, rgba(30, 126, 255, .04) 0%, var(--bg-card) 100%);
  border-color: rgba(30, 126, 255, .4);
}
[data-theme="dark"] .notif-card.is-unread {
  background: linear-gradient(90deg, rgba(30, 126, 255, .1) 0%, var(--bg-card) 100%);
  border-color: rgba(30, 126, 255, .5);
}
.notif-card-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
}
.notif-card-avatar-link img, .notif-card-avatar-wrap .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.notif-system-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.notif-badge-icon {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-card);
  color: #fff;
  font-size: 9px;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.badge-like { background: #e11d48; }
.badge-bookmark { background: #f59e0b; }
.badge-comment { background: #3b82f6; }
.badge-follow { background: #10b981; }
.badge-update { background: #8b5cf6; }
.badge-tag { background: #06b6d4; }
.badge-system { background: #64748b; }
.badge-default { background: var(--primary); }

.notif-card-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.notif-card-text {
  font-size: .86rem;
  line-height: 1.45;
  color: var(--text);
  word-break: break-word;
}
.notif-title-link {
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
}
.notif-title-link:hover {
  color: var(--primary);
  text-decoration: none;
}
.notif-title-plain {
  font-weight: 500;
}
.notif-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 1px;
}
.notif-card-time {
  font-size: .74rem;
  color: var(--text-muted);
}
.notif-unread-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 4px var(--primary);
}

/* ========================================================
   私信现代化收件箱与聊天室
   ======================================================== */
.msg-inbox-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.msg-inbox-title-wrap .dash-page-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
}
.msg-inbox-count {
  font-size: .75rem;
  color: var(--text-muted);
  background: var(--bg-alt);
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
}

/* 空状态卡片 */
.msg-empty-card {
  text-align: center;
  padding: 42px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.msg-empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--bg-alt);
  color: var(--text-muted);
  opacity: .6;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.msg-empty-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--text);
}
.msg-empty-desc {
  font-size: .84rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

/* 对话列表 (收件箱视图) */
.msg-inbox-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.msg-thread-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.msg-thread-item {
  position: relative;
  border-bottom: 1px solid var(--border);
  transition: background .15s ease;
}
.msg-thread-item:hover {
  background: var(--bg-alt);
}
.msg-thread-item:hover .msg-thread-link {
  background: transparent;
}
.msg-thread-item:last-child {
  border-bottom: 0;
}
.msg-thread-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  text-decoration: none;
  color: var(--text);
}
.msg-thread-link:hover {
  background: var(--bg-alt);
  text-decoration: none;
}
.msg-thread-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.msg-thread-avatar-wrap .avatar {
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.msg-unread-dot {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--bg-card);
}
.msg-thread-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.msg-thread-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.msg-thread-name {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.msg-thread-item.unread .msg-thread-name {
  color: var(--primary);
  font-weight: 700;
}
.msg-thread-time {
  font-size: .72rem;
  color: var(--text-muted);
  flex-shrink: 0;
}
.msg-thread-preview-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.msg-thread-preview {
  font-size: .8rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  margin-right: 28px;
}
.msg-thread-item.unread .msg-thread-preview {
  color: var(--text);
}
.msg-thread-badge {
  background: var(--primary);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  line-height: 1.3;
  flex-shrink: 0;
}
.msg-thread-del-form {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: flex;
  align-items: center;
  z-index: 2;
}
.msg-thread-del-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  opacity: .4;
  transition: all .15s ease;
}
.msg-thread-del-btn:hover {
  opacity: 1;
  color: #dc2626;
  background: rgba(220, 38, 38, 0.12);
}
.msg-chat-header-action {
  margin-left: auto;
  display: flex;
  align-items: center;
}
.msg-chat-del-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  padding: 0;
  transition: all .15s ease;
}
.msg-chat-del-btn:hover {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.1);
}
.msg-thread-pagination {
  padding: 8px 14px;
  border-top: 1px solid var(--border);
}
.msg-thread-pagination:empty {
  display: none;
  padding: 0;
  border-top: 0;
}

/* 聊天室视图 */
.msg-chat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  min-height: 520px;
  height: calc(100vh - 170px);
  max-height: 720px;
}
.msg-chat-header {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  flex-shrink: 0;
}
.msg-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--primary);
  font-weight: 600;
  font-size: .85rem;
  text-decoration: none;
  padding: 4px 8px 4px 4px;
  border-radius: 6px;
  transition: background .15s ease;
  flex-shrink: 0;
}
.msg-back-btn:hover {
  background: var(--bg-alt);
  text-decoration: none;
}
.msg-chat-recipient {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  min-width: 0;
  flex: 1;
}
.msg-chat-recipient:hover {
  color: var(--primary);
  text-decoration: none;
}
.msg-chat-recipient .avatar {
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.msg-chat-user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}
.msg-chat-user-name {
  font-size: .92rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.msg-chat-user-handle {
  font-size: .74rem;
  color: var(--text-muted);
}
.msg-list {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-alt);
}
.msg-load-older-btn {
  align-self: center;
  margin-bottom: 6px;
  font-size: .76rem;
  padding: 4px 14px;
  border-radius: 999px;
}
.msg-start-hint {
  text-align: center;
  padding: 30px 10px;
  color: var(--text-muted);
  font-size: .86rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.msg-start-hint strong {
  color: var(--text);
}
.msg {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 82%;
  gap: 2px;
}
.msg.mine {
  align-self: flex-end;
  align-items: flex-end;
}
.msg-bubble {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 14px 14px 14px 3px;
  word-break: break-word;
  white-space: pre-wrap;
  font-size: .88rem;
  line-height: 1.5;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.msg.mine .msg-bubble {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  border-radius: 14px 14px 3px 14px;
}
.msg.mine .msg-bubble a {
  color: #fff;
  text-decoration: underline;
}
.msg-time {
  font-size: .7rem;
  color: var(--text-muted);
  padding: 0 4px;
}
.msg-form {
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  flex-shrink: 0;
}
.msg-input-container {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 6px 4px 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.msg-input-container:focus-within {
  border-color: var(--primary);
  background: var(--bg-card);
  box-shadow: 0 0 0 2px var(--primary-soft);
}
.msg-textarea {
  flex: 1;
  background: transparent;
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  font-size: .88rem;
  line-height: 1.4;
  color: var(--text);
  resize: none;
  min-height: 24px;
  max-height: 100px;
  padding: 4px 0;
}
.msg-send-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform .15s ease, filter .15s ease;
}
.msg-send-btn:hover {
  filter: brightness(1.1);
  transform: scale(1.05);
}
.msg-send-disabled {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px;
  color: var(--text-muted);
  font-size: .84rem;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
}

/* 手机端原生 App 沉浸式聊天体验 (<= 600px) */
@media (max-width: 600px) {
  body.page-chat {
    overflow: hidden !important;
    height: 100% !important;
    position: fixed !important;
    width: 100% !important;
  }
  body.page-chat .site-header,
  body.page-chat .site-footer,
  body.page-chat .flash-container {
    display: none !important;
  }
  body.page-chat .app-wrap {
    min-height: 100dvh;
    height: 100dvh;
    overflow: hidden;
  }
  body.page-chat .site-main {
    padding: 0 !important;
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
  }
  body.page-chat .container.narrow {
    padding: 0 !important;
    max-width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
  }
  body.page-chat .msg-chat-card {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    height: 100% !important;
    max-height: none !important;
    min-height: 0 !important;
    flex: 1;
    display: flex;
    flex-direction: column;
  }
  body.page-chat .msg-chat-header {
    border-top: none;
    padding: 10px 14px;
  }
  body.page-chat .msg-list {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  body.page-chat .msg-form {
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
  }
}

/* 系列内章节排序组件美化 */
.series-sortable-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sortable-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sortable-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  transition: border-color .15s ease, background .15s ease;
}
.sortable-item:hover {
  border-color: var(--primary);
}
.sortable-item.dragging {
  opacity: .5;
  background: var(--primary-soft);
}
.drag-handle {
  cursor: grab;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
}
.drag-handle:active {
  cursor: grabbing;
}
.sortable-order-num {
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-muted);
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}
.sortable-title {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.sortable-name {
  font-size: .86rem;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sortable-draft-badge {
  font-size: .68rem;
  background: rgba(245, 158, 11, .15);
  color: #d97706;
  padding: 1px 5px;
  border-radius: 4px;
}
.sortable-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.sort-move-btn, .sort-edit-link {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s ease;
}
.sort-move-btn:hover, .sort-edit-link:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}
.sortable-submit-row {
  display: flex;
  justify-content: flex-end;
  padding-top: 4px;
}

/* 分段选择器控件 (.segmented-control, .segmented-item) */
.segmented-control {
  display: inline-flex;
  width: 100%;
  background: var(--bg-alt);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--border);
  gap: 3px;
}
.segmented-item {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  user-select: none;
  margin: 0;
}
.segmented-item input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
}
.segmented-item span {
  width: 100%;
  text-align: center;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: .8rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all .15s ease;
}
.segmented-item:hover span {
  color: var(--text);
}
.segmented-item input:checked + span {
  background: var(--bg-card);
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

/* 投稿编辑器卡片式工具条与计数胶囊 */
.editor-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.editor-status-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}
.editor-counter-pill {
  font-size: .74rem;
  font-weight: 600;
  background: var(--primary-soft);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 999px;
}
.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
  padding: 0;
  background: transparent;
  border: 0;
}
.editor-toolbar .editor-tool-btn {
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 6px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}
.editor-toolbar .editor-tool-btn:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
}
.editor-toolbar .editor-tool-btn:active {
  transform: scale(0.97);
}
.editor-toolbar .editor-preview-btn {
  margin-left: auto;
  background: var(--primary-soft);
  color: var(--primary);
  border-color: rgba(30, 126, 255, .3);
  font-weight: 700;
}
.editor-toolbar .editor-preview-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.novel-editor-textarea {
  min-height: 360px;
  font-family: var(--font);
  font-size: .92rem;
  line-height: 1.8;
}

/* 封面上传胶囊 */
.novel-cover-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.cover-upload-btn {
  cursor: pointer;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cover-remove-check {
  font-size: .78rem;
  color: #dc2626;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.cover-file-name {
  font-size: .82rem;
  color: var(--primary);
  font-weight: 500;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cover-thumb-preview {
  width: 48px;
  height: 64px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  flex-shrink: 0;
  box-shadow: var(--shadow);
}
.cover-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 创作与系列表单底部操作栏与按钮 */
.novel-form-actions,
.novel-form-sticky-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 4px 0 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  position: static;
}
.novel-action-btn,
.novel-publish-btn,
.novel-draft-btn {
  height: 32px;
  padding: 0 14px;
  font-size: .82rem;
  font-weight: 600;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  box-sizing: border-box;
  line-height: 1;
}
.danger-card {
  margin-top: 12px;
  border-color: rgba(220, 38, 38, .25);
}

/* 旧版保留兼容 (如果其他模块用到) */
.side-nav { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 10px; margin-bottom: 10px; position: static; }
.side-nav-links { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.side-nav-links a, .side-nav > a:not(.btn) { padding: 5px 10px; border-radius: 999px; color: var(--text); font-weight: 500; transition: .15s; font-size: .84rem; text-decoration: none; }
.side-nav-links a:hover, .side-nav > a:not(.btn):hover { background: var(--bg-alt); color: var(--primary); text-decoration: none; }
.side-nav-links a.active, .side-nav > a:not(.btn).active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.side-nav-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.stat-tile { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-direction: column; }
.stat-label { font-size: .75em; color: var(--text-muted); }
.stat-value { font-size: 1.3rem; }
.table { width: 100%; border-collapse: collapse; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); display: block; overflow-x: auto; white-space: nowrap; }
.table th, .table td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; font-size: .88rem; }
.table th { background: var(--bg-alt); font-weight: 600; font-size: .82em; }
.table.compact th, .table.compact td { padding: 5px 8px; font-size: .82em; }
.table.kv th { width: 80px; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* 平滑曲线/面积走势图 */
.smooth-chart-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chart-stage {
  position: relative;
  width: 100%;
  height: 160px;
  overflow: visible;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.chart-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}
.chart-grid-line {
  stroke: var(--border);
  stroke-dasharray: 3 3;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.chart-axis-text {
  fill: var(--text-muted);
  font-size: 10px;
  font-family: inherit;
}
.chart-line {
  stroke: var(--primary);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.chart-y-axis {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}
.chart-y-label {
  position: absolute;
  transform: translateY(-100%);
  margin-top: -3px;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1;
  font-family: inherit;
  font-variant-numeric: tabular-nums;
  user-select: none;
  white-space: nowrap;
}
.chart-hover-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.chart-hover-item {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 32px;
  transform: translateX(-50%);
  pointer-events: auto;
  cursor: pointer;
}
.chart-hover-line {
  position: absolute;
  top: 15px;
  bottom: 25px;
  left: 50%;
  width: 1px;
  background: var(--primary);
  opacity: 0;
  transition: opacity .15s;
}
.chart-node {
  position: absolute;
  left: 50%;
  width: 8px;
  height: 8px;
  background: #fff;
  border: 2px solid var(--primary);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  transition: transform .15s;
  box-shadow: 0 0 6px rgba(0,150,250,.4);
}
.chart-detail-card {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(4px);
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: .75rem;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .15s, transform .15s;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
  z-index: 20;
}
.chart-detail-card::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: rgba(15, 23, 42, 0.92);
}
.chart-hover-item.is-active .chart-hover-line {
  opacity: 0.6;
}
.chart-hover-item.is-active .chart-node {
  transform: translate(-50%, -50%) scale(1);
}
.chart-hover-item.is-active .chart-detail-card {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-10px);
}
.chart-detail-card.align-left {
  left: 0;
  transform: translateX(0) translateY(-6px);
}
.chart-detail-card.align-left::after {
  left: 14px;
  transform: none;
}
.chart-hover-item.is-active .chart-detail-card.align-left {
  transform: translateX(0) translateY(-10px);
}
.chart-detail-card.align-right {
  left: auto;
  right: 0;
  transform: translateX(0) translateY(-6px);
}
.chart-detail-card.align-right::after {
  left: auto;
  right: 14px;
  transform: none;
}
.chart-hover-item.is-active .chart-detail-card.align-right {
  transform: translateX(0) translateY(-10px);
}
.detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: .72rem;
  line-height: 1.5;
  color: #e2e8f0;
}
.detail-row strong {
  color: #fff;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.detail-date {
  color: #94a3b8;
  font-size: .7rem;
  margin-bottom: 4px;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  justify-content: center;
}
.chart-summary-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.summary-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.card-label {
  font-size: .75rem;
  color: var(--text-muted);
}
.card-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.chart-x-axis {
  display: flex;
  justify-content: space-between;
  padding: 4px 6px 0;
  font-size: 11px;
  color: var(--text-muted);
}
.chart-hint-row {
  display: flex;
  justify-content: flex-end;
  padding: 2px 6px 0;
}
.chart-hint-row span {
  font-size: .72rem;
  color: var(--text-muted);
  opacity: .8;
}
.notif-list { list-style: none; padding: 0; margin: 0 0 10px; }
.notif-list li { display: flex; gap: 10px; align-items: flex-start; padding: 10px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 6px; font-size: .88rem; }
.notif-list li.unread { border-left: 3px solid var(--primary); }
.notif-list.compact li { padding: 6px 8px; }
.notif-body { flex: 1; display: flex; flex-direction: column; }
.avatar-system { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: var(--bg-alt); }
.announce-list { list-style: none; padding: 0; }
.announce-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 6px; font-size: .88rem; }
.announce-item-main { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1; }
.announce-item-main a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-weight: 500; }
.announce-item-main a:hover { color: var(--primary); }
.announce-list time { flex-shrink: 0; }

/* 分页 */
.pagination { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; margin: 16px 0; }
.page-link { padding: 5px 10px; border: 1px solid var(--border); border-radius: 6px; color: var(--text); background: var(--bg-card); font-size: .85rem; }
.page-link:hover { border-color: var(--primary); text-decoration: none; }
.page-link.current { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-link.disabled { opacity: .4; }
.page-ellipsis { padding: 5px 3px; color: var(--text-muted); font-size: .85rem; }

/* 静态页 */
.prose { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 14px; font-size: .92rem; }
.prose h2 { margin-top: 1.2em; font-size: 1.15rem; }
.prose ul, .prose ol { padding-left: 1.2em; }
.error-page { text-align: center; padding: 40px 14px; }
.error-page h1 { font-size: 3.5rem; color: var(--primary); margin: 0; }

/* 自定义 HTML 区域容器 */
.custom-nav-html-wrap {
  width: 100%;
  padding-top: 8px;
  position: relative;
  z-index: 5;
}
.custom-footer-html-wrap {
  width: 100%;
  margin-bottom: 8px;
}

/* 页脚 */
.site-footer { background: var(--bg-card); border-top: 1px solid var(--border); padding: 14px 0 18px; margin-top: auto; }
.footer-inner { display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center; }
.footer-brand strong { font-size: .95rem; }
.footer-brand p { margin: 2px 0 0; font-size: .8rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 12px; justify-content: center; font-size: .82rem; }
.footer-links a { color: var(--text-muted); }
.footer-copy { font-size: .78rem; }

/* ==========================================================================
   后台管理系统 (现代精致控制台设计系统 - Console Quality Architecture)
   ========================================================================== */
.admin-body {
  background: var(--bg-alt);
  min-height: 100vh;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* 控制台统一圆角系统 (与全站视觉规范一致：卡片10px、控件8px、状态胶囊999px、头像50%) */
.admin-body .section,
.admin-body .table-wrap,
.admin-body .log-box,
.admin-body .inline-details > div,
.admin-body .admin-stat-tile {
  border-radius: var(--radius);
}
.admin-body .btn,
.admin-body .admin-tool-btn,
.admin-body .admin-filter-btn,
.admin-body .admin-foot-btn,
.admin-body .admin-theme-btn,
.admin-body .admin-menu-toggle,
.admin-body .admin-nav-item,
.admin-body .admin-brand-icon,
.admin-body .admin-user-card,
.admin-body .admin-tab-group,
.admin-body .flash,
.admin-body input:not([type="checkbox"]):not([type="radio"]),
.admin-body select,
.admin-body textarea {
  border-radius: 8px;
}
.admin-body .admin-tab-btn,
.admin-body .inline-details summary,
.admin-body .inline-details-close,
.admin-body .admin-stat-icon-wrap {
  border-radius: 6px;
}
.admin-body .admin-stat-delta,
.admin-body .admin-pill,
.admin-body .chip,
.admin-body .admin-page-badge,
.admin-body .admin-nav-badge {
  border-radius: 999px;
}
.admin-body .tag-r18 {
  border-radius: 4px;
}
.admin-body .admin-avatar,
.admin-body .admin-user-avatar {
  border-radius: 50% !important;
}

/* 主布局结构 (桌面端固定侧边栏 + 自适应主内容区) */
.admin-wrap {
  display: block;
  padding-left: 240px;
  min-height: 100vh;
  position: relative;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* 移动端顶部导航栏 */
.admin-mobile-bar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 52px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
  z-index: 1050;
  box-shadow: none;
}
.admin-mobile-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-mobile-title {
  font-weight: 700;
  font-size: .92rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
.admin-mobile-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.admin-theme-btn,
.admin-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  transition: all .15s ease;
}
.admin-theme-btn:hover,
.admin-menu-toggle:hover {
  background: var(--bg-alt);
  color: var(--text);
  border-color: var(--text-muted);
}

/* 侧边栏抽屉遮罩 */
.admin-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 1090;
  opacity: 0;
  transition: opacity .2s ease;
}
.admin-backdrop.is-open {
  display: block;
  opacity: 1;
}

/* 侧边栏 (桌面端完全锁定 fixed，右侧滚动绝对不跟随) */
.admin-side {
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 16px 12px 14px;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 240px;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1000;
  box-sizing: border-box;
  box-shadow: none;
}
.admin-side::-webkit-scrollbar {
  width: 4px;
}
.admin-side::-webkit-scrollbar-thumb {
  background: rgba(150, 150, 150, 0.2);
  border-radius: 4px;
}
.admin-brand-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px 14px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.admin-brand-icon {
  width: 28px;
  height: 28px;
  background: var(--text);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--border);
  overflow: hidden;
}
.admin-brand-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.admin-brand-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}
.admin-brand-name {
  font-weight: 700;
  font-size: .95rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.admin-brand-name:hover {
  text-decoration: none;
  color: var(--primary);
}
.admin-brand-badge {
  font-size: .68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
  margin-top: 1px;
}

/* 侧边栏导航链接 */
.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
}
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: .84rem;
  text-decoration: none;
  transition: all .12s ease;
  position: relative;
}
.admin-nav-item:hover {
  background: var(--bg-alt);
  color: var(--text);
  text-decoration: none;
}
.admin-nav-item.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}
.admin-nav-item .nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: .85;
}
.admin-nav-item.active .nav-icon {
  opacity: 1;
  color: var(--primary);
}
.admin-nav-item .nav-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  font-size: .68rem;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.3);
  line-height: 1;
  margin-left: auto;
}
[data-theme="dark"] .admin-nav-badge {
  background: rgba(239, 68, 68, 0.25);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.4);
}

/* 侧边栏底部卡片 */
.admin-side-foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.admin-user-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
}
.admin-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50% !important;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.admin-user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}
.admin-user-name {
  font-weight: 600;
  font-size: .82rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-role-pill {
  font-size: .68rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: .2px;
}
.admin-foot-actions {
  display: flex;
  gap: 6px;
}
.admin-foot-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: .76rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all .12s ease;
  box-sizing: border-box;
}
.admin-foot-btn:hover {
  color: var(--text);
  background: var(--bg-alt);
  border-color: var(--text-muted);
  text-decoration: none;
}

/* 主工作区 - 紧凑高信息密度排版 */
.admin-main {
  padding: 24px 28px 48px;
  min-width: 0;
  max-width: 1440px;
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}
.admin-content {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}
.admin-content > h1:first-child,
.admin-main > h1:first-child {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--text);
  letter-spacing: -0.02em;
}

/* 提示通知条 (克制细边框轻质感) */
.admin-flash-container {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.admin-flash-container .flash {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: .84rem;
  border: 1px solid transparent;
  line-height: 1.4;
}
.admin-flash-container .flash-success {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.25);
  color: #065f46;
}
[data-theme="dark"] .admin-flash-container .flash-success {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34d399;
}
.admin-flash-container .flash-error {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.25);
  color: #991b1b;
}
[data-theme="dark"] .admin-flash-container .flash-error {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.35);
  color: #f87171;
}
.admin-flash-container .flash-info {
  background: rgba(0, 150, 250, 0.08);
  border-color: rgba(0, 150, 250, 0.25);
  color: #1e40af;
}
[data-theme="dark"] .admin-flash-container .flash-info {
  background: rgba(0, 150, 250, 0.15);
  border-color: rgba(0, 150, 250, 0.35);
  color: #60a5fa;
}
.admin-flash-container .flash-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* 仪表盘统计卡片 KPI (纯平直角极简风) */
.admin-body .stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.admin-stat-tile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: none;
  transition: border-color .12s ease;
  position: relative;
  box-sizing: border-box;
}
.admin-stat-tile:hover {
  border-color: var(--text-muted);
}
.admin-stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.admin-stat-label {
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.admin-stat-icon-wrap {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  color: var(--text-muted);
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.admin-stat-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}
.admin-stat-number {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.admin-stat-delta {
  font-size: .7rem;
  font-weight: 600;
  padding: 1px 5px;
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.2);
  font-variant-numeric: tabular-nums;
}
[data-theme="dark"] .admin-stat-delta {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

/* 区块卡片与分列容器 */
.admin-body .section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 16px 18px;
  margin: 0 0 18px;
  box-shadow: none;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.admin-body .section:last-child {
  margin-bottom: 0;
}
.admin-body .section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  gap: 10px;
}
.admin-body .section-head h2 {
  margin: 0;
  font-size: .96rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.admin-body .section-head .more {
  font-size: .78rem;
  color: var(--primary);
  font-weight: 500;
  text-decoration: none;
}
.admin-body .section-head .more:hover {
  text-decoration: underline;
}
.admin-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
  min-width: 0;
  max-width: 100%;
  align-items: stretch;
}
.admin-cols > .section,
.admin-cols > * {
  margin: 0 !important;
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
}
.admin-cols > .section .table-wrap {
  flex: 1;
  margin-bottom: 0;
}
.admin-body .section .table-wrap:last-child {
  margin-bottom: 0;
}

/* 控制台专业表格 (严谨对齐与等宽数字) */
.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-sizing: border-box;
}
.admin-body .table {
  display: table;
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  background: var(--bg-card);
  border: 0;
  margin-bottom: 0;
  white-space: normal;
  font-size: .84rem;
}
.admin-body .table thead th {
  background: var(--bg-alt);
  color: var(--text-muted);
  font-weight: 600;
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  border-top: 0;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}
.admin-body .table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  font-size: .84rem;
  color: var(--text);
  line-height: 1.45;
  transition: background .08s ease;
}
.admin-body .table tbody tr:last-child td {
  border-bottom: none;
}
.admin-body .table tbody tr:hover td {
  background: rgba(0, 150, 250, 0.035);
}
[data-theme="dark"] .admin-body .table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}
.admin-body .table.compact thead th {
  padding: 7px 10px;
  font-size: .72rem;
}
.admin-body .table.compact tbody td {
  padding: 7px 10px;
  font-size: .81rem;
}
.admin-body .table.kv {
  border: 1px solid var(--border);
  min-width: 0 !important;
}
.admin-body .table.kv th {
  width: 120px;
  background: var(--bg-alt);
  color: var(--text-muted);
  font-weight: 600;
  font-size: .8rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-transform: none;
  letter-spacing: normal;
  padding: 8px 12px;
}
.admin-body .table.kv td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}

/* 表格内数字与 ID 等宽排版 */
.admin-body .table td.muted.small,
.admin-body .table td:first-child:is(.muted) {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  font-size: .76rem;
}

/* 严格右对齐操作单元格 */
.admin-body .table th:last-child,
.admin-body .table td:last-child {
  text-align: right;
}
.admin-body .table th.text-left,
.admin-body .table td.text-left {
  text-align: left !important;
}
.admin-body .table th.text-right,
.admin-body .table td.text-right {
  text-align: right !important;
}
.admin-body .table th.text-center,
.admin-body .table td.text-center {
  text-align: center !important;
}

/* 筛选与查询条 (34px 标准化控件高度与基线对齐) */
.admin-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.admin-page-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-page-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-page-badge {
  font-size: .72rem;
  font-weight: 600;
  padding: 2px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}
.admin-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.admin-search-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.admin-search-wrap svg {
  position: absolute;
  left: 10px;
  pointer-events: none;
  color: var(--text-muted);
  width: 14px;
  height: 14px;
}
.admin-body input[type="search"],
.admin-body input[type="text"],
.admin-body input[type="number"],
.admin-body input[type="email"],
.admin-body input[type="password"],
.admin-body input:not([type]),
.admin-body input.admin-input,
.admin-body .admin-input,
.admin-body select {
  height: 34px;
  box-sizing: border-box;
  font-size: .84rem;
  padding: 6px 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  line-height: 1.4;
  outline: none;
}
.admin-body textarea {
  display: block;
  box-sizing: border-box;
  font-size: .84rem;
  padding: 6px 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  line-height: 1.4;
  outline: none;
  width: 100%;
}
.admin-body input:focus,
.admin-body select:focus,
.admin-body textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 1px var(--primary);
}
.admin-search-wrap input {
  padding-left: 32px !important;
  min-width: 200px;
  height: 34px;
}
.admin-select {
  height: 34px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  padding: 0 10px;
  font-size: .84rem;
  cursor: pointer;
  box-sizing: border-box;
}
.admin-filter-btn,
.admin-body .admin-filter-btn,
.admin-body .admin-filter-bar .admin-filter-btn,
.admin-body .admin-filter-bar .btn,
.admin-body .admin-filter-bar .btn-sm {
  height: 34px !important;
  padding: 0 14px !important;
  font-size: .82rem !important;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
  cursor: pointer;
  border-radius: 8px;
}

/* 通用按钮系统在 Admin 中的直角控制台重置 */
.admin-body .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: .82rem;
  line-height: 1.2;
  cursor: pointer;
  box-sizing: border-box;
  transition: all .12s ease;
}
.admin-body .btn-sm {
  height: 28px;
  padding: 0 10px;
  font-size: .78rem;
}
.admin-body .btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}
.admin-body .btn-primary:hover {
  filter: brightness(.92);
  text-decoration: none;
}
.admin-body .btn-ghost {
  background: var(--bg-card);
  border-color: var(--border);
  color: var(--text);
}
.admin-body .btn-ghost:hover {
  background: var(--bg-alt);
  border-color: var(--text-muted);
  text-decoration: none;
}
.admin-body .btn-danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #dc2626;
}
.admin-body .btn-danger:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
  text-decoration: none;
}
[data-theme="dark"] .admin-body .btn-danger {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}
[data-theme="dark"] .admin-body .btn-danger:hover {
  background: #dc2626;
  color: #ffffff;
}

/* 控制台状态徽章体系 (Semi-transparent Tints & Crisp 1px Borders) */
.admin-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  font-size: .72rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  letter-spacing: .2px;
  box-sizing: border-box;
}
.admin-pill-success {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
}
[data-theme="dark"] .admin-pill-success {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.35);
}
.admin-pill-warning {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.25);
}
[data-theme="dark"] .admin-pill-warning {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.35);
}
.admin-pill-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.25);
}
[data-theme="dark"] .admin-pill-danger {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.35);
}
.admin-pill-primary {
  background: rgba(0, 150, 250, 0.1);
  color: var(--primary);
  border: 1px solid rgba(0, 150, 250, 0.25);
}
[data-theme="dark"] .admin-pill-primary {
  background: rgba(0, 150, 250, 0.18);
  color: #60a5fa;
  border-color: rgba(0, 150, 250, 0.35);
}
.admin-pill-muted {
  background: var(--bg-alt);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* 标签 Chip 重置 */
.admin-body .chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  font-size: .74rem;
  font-weight: 500;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text);
  line-height: 1.25;
}
.admin-body .chip-sm {
  padding: 1px 5px;
  font-size: .7rem;
}
.admin-body .chip-danger {
  background: rgba(239, 68, 68, 0.08);
  color: #dc2626;
  border-color: rgba(239, 68, 68, 0.25);
}
[data-theme="dark"] .admin-body .chip-danger {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.35);
}
.admin-body .chip-success {
  background: rgba(16, 185, 129, 0.08);
  color: #059669;
  border-color: rgba(16, 185, 129, 0.25);
}
[data-theme="dark"] .admin-body .chip-success {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.35);
}

/* 分级标签圆角 */
.admin-body .tag-r18 {
  border-radius: 4px;
  font-size: .68rem;
  padding: 1px 5px;
  font-weight: 700;
  letter-spacing: .3px;
}

/* 用户与小说单元格 */
.admin-user-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
}
.admin-user-cell:hover {
  text-decoration: none;
}
.admin-user-cell:hover .admin-user-name {
  color: var(--primary);
}
.admin-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50% !important;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.admin-user-meta-box {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}
.admin-user-name {
  font-weight: 600;
  font-size: .84rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color .12s;
}
.admin-user-sub {
  font-size: .7rem;
  color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.admin-novel-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.admin-novel-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.admin-novel-title {
  font-weight: 600;
  font-size: .88rem;
  color: var(--text);
  text-decoration: none;
  transition: color .12s;
}
.admin-novel-title:hover {
  color: var(--primary);
  text-decoration: none;
}
.admin-novel-tags {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .7rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

/* 选项卡 (Tabs) */
.admin-tab-group {
  display: inline-flex;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 2px;
  gap: 2px;
}
.admin-tab-btn {
  padding: 5px 12px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: all .12s ease;
  line-height: 1.3;
}
.admin-tab-btn:hover {
  color: var(--text);
  background: var(--bg-alt);
  text-decoration: none;
}
.admin-tab-btn.is-active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

/* 维护工具按钮网格 */
.admin-tool-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.admin-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  font-size: .8rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all .12s ease;
  box-sizing: border-box;
}
.admin-tool-btn:hover {
  background: var(--bg-card);
  border-color: var(--primary);
  color: var(--primary);
}

/* 弹出详情菜单 (Details Popover) */
.inline-details {
  position: relative;
  display: inline-block;
}
.inline-details summary {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 9px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: .78rem;
  font-weight: 600;
  list-style: none;
  transition: all .12s ease;
  user-select: none;
  box-sizing: border-box;
}
.inline-details summary::-webkit-details-marker {
  display: none;
}
.inline-details summary::after {
  content: '▾';
  font-size: .75em;
  margin-left: 2px;
  color: var(--text-muted);
}
.inline-details summary:hover {
  background: var(--bg-alt);
  border-color: var(--text-muted);
}
.inline-details[open] > summary {
  background: var(--bg-alt);
  border-color: var(--primary);
  color: var(--primary);
}
.inline-details > div {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  padding: 12px;
  z-index: 100;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}
[data-theme="dark"] .inline-details > div {
  box-shadow: 0 4px 16px rgba(0,0,0,0.45);
}
.admin-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--border);
  line-height: 1;
}
.admin-popover-title {
  font-size: .82rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: .2px;
}
.inline-details-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .15s ease;
  flex-shrink: 0;
  line-height: 1;
}
.inline-details-close:hover {
  background: var(--bg-alt);
  color: var(--text);
}
.inline-details-close svg {
  display: block;
  pointer-events: none;
}
.inline-details > div > .inline-details-close:first-child:not(.admin-popover-head *) {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
}
.admin-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.admin-actions form {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
}
.admin-actions form input:not([type="checkbox"]):not([type="radio"]),
.admin-actions form select {
  flex: 1;
  min-width: 100px;
  font-size: .8rem;
  height: 28px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
}
.admin-actions .checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  font-size: .82rem;
  color: var(--text);
  margin: 0;
}
.admin-actions .checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  max-width: 16px;
  flex: 0 0 16px;
  margin: 0;
  padding: 0;
  accent-color: var(--primary);
  cursor: pointer;
  border-radius: 3px;
  vertical-align: middle;
}

/* 控制台日志区域 */
.log-box {
  background: #0d1117;
  color: #58a6ff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  padding: 14px 16px;
  border: 1px solid #30363d;
  max-height: 440px;
  overflow: auto;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-all;
}

/* 响应式 (移动端控制台适配) */
@media (max-width: 960px) {
  .admin-mobile-bar {
    display: flex;
  }
  .admin-wrap {
    display: block;
    padding-top: 52px;
    padding-left: 0;
    overflow-x: hidden;
  }
  .admin-side {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    max-width: 85vw;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform .24s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
    z-index: 1100;
    padding: 16px 12px 14px;
  }
  .admin-side.is-open {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0,0,0,0.2);
  }
  .admin-main {
    padding: 18px 14px 36px;
  }
  .admin-cols {
    grid-template-columns: 1fr;
  }
  .table-wrap {
    margin-bottom: 12px;
  }
  .admin-body .table {
    display: table;
    min-width: 600px;
  }
  .inline-details > div {
    position: fixed;
    left: 14px;
    right: 14px;
    top: auto;
    bottom: 16px;
    min-width: auto;
    max-width: none;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.25);
  }
}
@media print {
  .site-header, .site-footer, .reader-toolbar, .novel-actions, .novel-side, .comments-section, .series-nav, .author-box, .admin-side, .admin-mobile-bar { display: none !important; }
  .novel-body, .admin-main { border: 0; padding: 0; }
}
@media print {
  .site-header, .site-footer, .reader-toolbar, .novel-actions, .novel-side, .comments-section, .series-nav, .author-box { display: none !important; }
  .novel-body { border: 0; padding: 0; }
}

/* ==========================================================================
   全站通用全屏沉浸式取景裁切器 (Universal Image Cropper)
   ========================================================================== */
.banner-wx-cropper {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #000000;
  display: none;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.banner-wx-cropper.is-active {
  display: flex !important;
  opacity: 1;
  visibility: visible;
}
.banner-wx-stage {
  position: relative;
  flex: 1;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.banner-wx-img-wrap {
  position: absolute;
  inset: 0;
  overflow: visible;
  pointer-events: none;
}
.banner-wx-img-wrap img {
  position: absolute;
  top: 0;
  left: 0;
  max-width: none !important;
  max-height: none !important;
  transform-origin: 0 0;
  will-change: transform;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
/* 遮罩与高亮镂空取景框 */
.banner-wx-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  cursor: grab;
}
.banner-wx-overlay.is-dragging {
  cursor: grabbing;
}
.banner-wx-frame {
  position: relative;
  width: 92vw;
  max-width: 820px;
  aspect-ratio: 3 / 1;
  box-shadow: 0 0 0 4000px rgba(0, 0, 0, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.85);
  pointer-events: none;
  transition: border-radius .15s ease;
}
/* 比例形态适配 */
.banner-wx-frame.is-aspect-1-1 {
  width: min(84vw, 360px);
  max-width: 360px;
  aspect-ratio: 1 / 1;
}
.banner-wx-frame.is-aspect-3-4 {
  width: min(78vw, 330px);
  max-width: 330px;
  aspect-ratio: 3 / 4;
}
/* 圆形遮罩高亮（头像模式） */
.banner-wx-frame.is-circle {
  border-radius: 50%;
}
.banner-wx-frame.is-circle .banner-wx-corners,
.banner-wx-frame.is-circle .banner-wx-grid {
  display: none;
}
/* 九宫格辅助线 */
.banner-wx-grid {
  position: absolute;
  inset: 0;
}
.wx-grid-line {
  position: absolute;
  background: rgba(255, 255, 255, 0.28);
  pointer-events: none;
}
.wx-grid-h1 { top: 33.333%; left: 0; right: 0; height: 1px; }
.wx-grid-h2 { top: 66.666%; left: 0; right: 0; height: 1px; }
.wx-grid-v1 { left: 33.333%; top: 0; bottom: 0; width: 1px; }
.wx-grid-v2 { left: 66.666%; top: 0; bottom: 0; width: 1px; }

/* 四角粗框标记 */
.banner-wx-corners .wx-corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: #ffffff;
  border-style: solid;
}
.banner-wx-corners .tl { top: -2px; left: -2px; border-width: 2.5px 0 0 2.5px; }
.banner-wx-corners .tr { top: -2px; right: -2px; border-width: 2.5px 2.5px 0 0; }
.banner-wx-corners .bl { bottom: -2px; left: -2px; border-width: 0 0 2.5px 2.5px; }
.banner-wx-corners .br { bottom: -2px; right: -2px; border-width: 0 2.5px 2.5px 0; }

/* 微信风格底部提示与操作栏 */
.banner-wx-hint {
  position: absolute;
  top: max(20px, env(safe-area-inset-top));
  left: 0;
  right: 0;
  text-align: center;
  font-size: .84rem;
  color: rgba(255, 255, 255, 0.55);
  pointer-events: none;
  letter-spacing: .5px;
}
.banner-wx-bar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px calc(16px + env(safe-area-inset-bottom));
  background: rgba(18, 18, 18, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.banner-wx-btn {
  background: transparent;
  border: none;
  font-size: 1rem;
  font-weight: 500;
  padding: 8px 16px;
  cursor: pointer;
  transition: all .15s ease;
  line-height: 1.4;
}
.banner-wx-cancel {
  color: rgba(255, 255, 255, 0.9);
}
.banner-wx-cancel:active {
  opacity: .6;
}
.banner-wx-confirm {
  background: var(--primary);
  color: #ffffff;
  border-radius: 999px;
  padding: 7px 20px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 150, 250, 0.35);
}
.banner-wx-confirm:active {
  background: var(--primary-dark);
}

/* ==========================================================================
   密码可见性切换控件 (Password Visibility Toggle)
   ========================================================================== */
.password-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.password-wrap input {
  width: 100% !important;
  padding-right: 36px !important;
  box-sizing: border-box;
}
.password-wrap input::-ms-reveal,
.password-wrap input::-ms-clear {
  display: none;
}
.password-toggle-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--text-muted);
  cursor: pointer;
  transition: color .15s ease, background-color .15s ease;
  -webkit-tap-highlight-color: transparent;
  z-index: 2;
}
.password-toggle-btn:hover {
  color: var(--text);
  background: rgba(0, 0, 0, .05);
}
[data-theme="dark"] .password-toggle-btn:hover {
  background: rgba(255, 255, 255, .08);
}
.password-toggle-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -1px;
}
.password-toggle-btn .icon-eye-open { display: block; }
.password-toggle-btn .icon-eye-closed { display: none; }
.password-toggle-btn.is-active .icon-eye-open { display: none; }
.password-toggle-btn.is-active .icon-eye-closed { display: block; }
.password-toggle-btn.is-active { color: var(--primary); }



/* ============================================================
   Creator Ranking Page Styles
   ============================================================ */
.creator-list { display: flex; flex-direction: column; gap: 10px; }
.creator-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.creator-card:hover { border-color: var(--primary); }
.creator-card-rank { flex-shrink: 0; width: 34px; display: flex; justify-content: center; align-items: center; }
.creator-card-rank .rank-medal { font-size: 1.5rem; line-height: 1; display: inline-block; filter: drop-shadow(0 2px 4px rgba(0,0,0,.15)); }
.creator-card-rank .rank-num { font-size: 1rem; font-weight: 700; color: var(--text-muted); font-variant-numeric: tabular-nums; }

.creator-card-main { flex: 1; min-width: 0; }
.creator-card-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.creator-card-user { display: flex; align-items: center; gap: 14px; min-width: 0; }
.creator-avatar .avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); }
.creator-info { min-width: 0; }
.creator-name { margin: 0; font-size: .98rem; font-weight: 600; line-height: 1.3; }
.creator-name a { color: var(--text); }
.creator-name a:hover { color: var(--primary); text-decoration: none; }
.creator-stats { font-size: .8rem; line-height: 1.4; margin-top: 4px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.creator-stats strong { color: var(--text); }
.creator-action .btn { padding: 5px 16px; border-radius: 999px; font-size: .82rem; }

.creator-bio { margin: 8px 0 0 0; font-size: .84rem; line-height: 1.5; color: var(--text-muted); word-break: break-word; }

@media (max-width: 540px) {
  .creator-card { padding: 12px 14px; gap: 10px; }
  .creator-card-rank { width: 26px; }
  .creator-card-rank .rank-medal { font-size: 1.25rem; }
  .creator-avatar .avatar { width: 42px; height: 42px; }
  .creator-action .btn { padding: 4px 12px; font-size: .78rem; }
}

/* ==========================================================================
   用户主页子导航响应式：与全站按钮(.btn .85rem)及个人中心导航(.82~.88rem)完全统一的黄金比例
   ========================================================================== */
.user-profile-tabs .tabs-wrap {
  position: relative;
  width: 100%;
  margin-bottom: 12px;
}

/* 电脑桌面端 (宽度 > 640px)：单行横向排开，6 项舒展平铺 */
@media (min-width: 641px) {
  .user-profile-tabs .tabs {
    display: grid !important;
    grid-template-columns: repeat(var(--tabs-total, 6), minmax(0, 1fr)) !important;
    width: 100% !important;
    border-bottom: 1px solid var(--border) !important;
  }
  .user-profile-tabs .tabs a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 9px 8px !important;
    font-size: .86rem !important; /* 与全站标准子导航 .86rem 统一 */
    letter-spacing: 0 !important;
    font-weight: 500 !important;
    color: var(--text) !important;
    border-bottom: 2px solid transparent !important;
    margin-bottom: -1px !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    transition: color .15s ease, border-color .15s ease !important;
  }
  .user-profile-tabs .tabs a.active {
    color: var(--primary) !important;
    border-bottom-color: var(--primary) !important;
    font-weight: 600 !important;
  }
}

/* 手机移动端 (宽度 <= 640px)：一排四个 (4 + 2 布局)，字号与全站按钮、个人信息区完全协调统一 */
@media (max-width: 640px) {
  .user-profile-tabs .tabs {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    width: 100% !important;
    border-bottom: 1px solid var(--border) !important; /* 第二排底部分隔线 */
  }
  .user-profile-tabs .tabs a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 9px 2px !important;
    font-size: .85rem !important; /* 约 13.6px，与个人信息 strong(.88rem)及关注/私信按钮(.85rem)严格和谐统一 */
    letter-spacing: 0 !important;  /* 自然间距，告别旧版 -0.4px 拥挤感 */
    font-weight: 500 !important;
    color: var(--text) !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    position: relative !important;
    box-sizing: border-box !important;
    margin-bottom: -1px !important;
    transition: color .15s ease !important;
  }
  /* 第一排 4 个选项下方：浅灰 1px 细线分隔，与全站边框风格一致 */
  .user-profile-tabs .tabs a:nth-child(-n+4) {
    border-bottom: 1px solid var(--border) !important;
  }
  /* 第二排选项下方：透明边框，依托容器底线 */
  .user-profile-tabs .tabs a:nth-child(n+5) {
    border-bottom: 1px solid transparent !important;
  }
  /* 激活项文字与高亮 */
  .user-profile-tabs .tabs a.active {
    color: var(--primary) !important;
    font-weight: 600 !important;
  }
  /* 激活下划线指示条：粗细 2px，细腻精致，紧贴行下边界 */
  .user-profile-tabs .tabs a.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 12%;
    right: 12%;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    z-index: 3;
  }
}
