/* ============================================================
   pc-comic-ui.css — 深色潮流漫画平台主题(对齐 manga-platform 新前端)
   ============================================================ */
:root {
  --background: oklch(0.16 0.035 275);
  --foreground: oklch(0.97 0.015 90);
  --card: oklch(0.22 0.04 275);
  --card-foreground: oklch(0.97 0.015 90);
  --primary: oklch(0.72 0.2 20);
  --primary-foreground: oklch(0.16 0.035 275);
  --primary-hover: oklch(0.77 0.19 20);
  --accent: oklch(0.86 0.18 155);
  --accent-foreground: oklch(0.16 0.035 275);
  --muted: oklch(0.26 0.04 275);
  --muted-foreground: oklch(0.72 0.035 275);
  --border: oklch(0.97 0.015 90 / 0.16);
  --input: oklch(0.97 0.015 90 / 0.2);
  --radius: 0.8rem;
  --shadow: 0 24px 80px oklch(0.1 0.04 275 / 0.28);
  /* 兼容别名 */
  --bg: var(--background);
  --surface: var(--card);
  --ink: var(--foreground);
}

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

html { scroll-behavior: smooth; background: var(--background); }

body {
  font-family: "Noto Sans SC", "Noto Sans CJK SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--foreground);
  background: var(--background);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { max-width: 100%; }

.container { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 48px; }
@media (max-width: 820px) { .container { padding: 0 32px; } }
@media (max-width: 560px) { .container { padding: 0 20px; } }

/* ---------- Buttons ---------- */
.btn {
  font-family: inherit;
  font-weight: 700;
  border: none;
  border-radius: 999px;
  padding: 10px 22px;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, gap .18s ease;
  font-size: 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.btn:active { transform: scale(.96); }
.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--foreground); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--card); transform: translateY(-2px); }
.btn-dark { background: var(--foreground); color: var(--primary-foreground); }
.btn-dark:hover { transform: translateY(-2px); opacity: .92; }
.btn-lg { padding: 13px 26px; font-size: 14px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: oklch(0.16 0.035 275 / 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 24px; }

.logo { display: flex; align-items: baseline; text-decoration: none; font-weight: 900; font-size: 24px; letter-spacing: -0.12em; color: var(--foreground); }
.logo .dot { color: var(--primary); }
.logo-mark { display: none; }
.logo-text { font-weight: 900; }

.main-nav { display: flex; gap: 32px; }
.nav-link {
  text-decoration: none; color: var(--muted-foreground);
  font-weight: 700; font-size: 12px; letter-spacing: 0.18em;
  transition: color .15s ease;
}
.nav-link:hover { color: var(--foreground); }
.nav-link.active { color: var(--foreground); }

.header-actions { display: flex; align-items: center; gap: 12px; }
.search-box {
  display: none; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 999px; padding: 9px 16px; color: var(--muted-foreground);
  transition: border-color .15s ease;
}
.search-box:focus-within { border-color: var(--primary); }
.search-box input { border: none; outline: none; background: transparent; font-family: inherit; font-size: 14px; width: 180px; color: var(--foreground); }
.search-box input::placeholder { color: var(--muted-foreground); }
.search-icon-btn {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  border: none; background: transparent; color: var(--muted-foreground); cursor: pointer;
  transition: background .15s ease, color .15s ease;
  text-decoration: none;
}
.search-icon-btn:hover { background: var(--card); color: var(--foreground); }
/* 仅首页显示搜索框,其余页面显示搜索图标 */
body.page-index .site-header .search-box { display: flex; }
body.page-index .site-header .search-icon-btn { display: none; }

.menu-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 1px solid var(--border); border-radius: 50%; cursor: pointer; padding: 10px; }
.menu-toggle span { width: 16px; height: 2px; background: var(--foreground); border-radius: 2px; transition: transform .25s ease, opacity .2s ease; }
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Toast / Dialog ---------- */
.toast {
  display: none; position: fixed; top: 84px; left: 50%; transform: translateX(-50%);
  z-index: 200; background: var(--foreground); color: var(--primary-foreground);
  font-weight: 700; font-size: 14px; padding: 10px 24px; border-radius: 999px;
  box-shadow: var(--shadow); max-width: 80vw;
}
.alertTop_1 { display: none; }

/* ---------- Hero(首页) ---------- */
.hero-home { display: grid; gap: 32px; padding: 40px 0; align-items: center; }
@media (min-width: 1024px) { .hero-home { grid-template-columns: 0.9fr 1.1fr; padding: 64px 0; } }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); background: var(--card);
  border-radius: 999px; padding: 6px 14px;
  font-size: 12px; font-weight: 700; color: var(--muted-foreground);
  margin-bottom: 24px;
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.hero-h1 {
  font-size: clamp(3.2rem, 8vw, 7.2rem); font-weight: 900;
  line-height: 0.92; letter-spacing: -0.07em; text-wrap: balance;
}
.hero-h1 .text-primary { color: var(--primary); }
.hero-lead { margin-top: 32px; max-width: 28rem; font-size: 16px; line-height: 1.75; color: var(--muted-foreground); }
.hero-cta { margin-top: 32px; display: inline-flex; }
.hero-cta:hover { gap: 18px; }

.hero-visual {
  position: relative; overflow: hidden;
  border-radius: 2rem; border: 1px solid var(--border);
  background: var(--card); padding: 12px; box-shadow: var(--shadow);
}
.hero-visual-inner {
  position: relative; min-height: 390px; overflow: hidden; border-radius: 1.5rem;
}
@media (min-width: 640px) { .hero-visual-inner { min-height: 520px; } }
.hero-visual-inner img.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-visual-inner .hero-shade { position: absolute; inset: 0; background: linear-gradient(to top, oklch(0.16 0.035 275 / 0.82), oklch(0.16 0.035 275 / 0.12) 50%, transparent 75%); }
.hero-visual-tag {
  position: absolute; left: 20px; top: 20px;
  border-radius: 999px; background: var(--accent); color: var(--accent-foreground);
  padding: 5px 14px; font-size: 10px; font-weight: 900; letter-spacing: 0.2em;
}
.hero-visual-cap { position: absolute; left: 24px; bottom: 24px; color: var(--foreground); }
.hero-visual-cap .cap-kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.2em; color: var(--accent); }
.hero-visual-cap .cap-title { margin-top: 8px; font-size: 30px; font-weight: 900; line-height: 1.05; letter-spacing: -0.02em; color: var(--foreground); }

/* ---------- Hero(详情页横幅) ---------- */
.hero { position: relative; min-height: 520px; display: flex; align-items: flex-end; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center 28%; transform: scale(1.05); filter: blur(2px); }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, oklch(0.16 0.035 275 / 0.4) 0%, oklch(0.16 0.035 275 / 0.72) 55%, var(--background) 100%); }
.hero-content { position: relative; padding-bottom: 56px; padding-top: 140px; max-width: 720px; }
.hero-tag {
  display: inline-block; background: var(--accent); color: var(--accent-foreground);
  font-weight: 700; font-size: 13px; padding: 6px 14px; border-radius: 999px; margin-bottom: 16px;
}
.hero-title { font-size: clamp(34px, 5vw, 58px); font-weight: 900; color: var(--foreground); line-height: 1.05; letter-spacing: -0.04em; text-wrap: balance; }
.hero-desc { color: var(--muted-foreground); font-size: 16px; margin: 16px 0 20px; max-width: 560px; }
.hero-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.pill { background: var(--card); color: var(--foreground); border: 1px solid var(--border); padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.rating { color: var(--accent); font-weight: 800; font-size: 16px; }
.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Sections ---------- */
.section { padding: 48px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 32px; flex-wrap: wrap; }
.section-title { font-size: clamp(28px, 4vw, 44px); font-weight: 900; letter-spacing: -0.05em; line-height: 1.05; margin-top: 8px; }
.section-title.sm { font-size: 24px; }
.kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.2em; color: var(--primary); text-transform: uppercase; }
.see-all { text-decoration: none; color: var(--primary); font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 4px; }
.see-all:hover { color: var(--primary-hover); }
.fire { font-size: 20px; }

/* ---------- Chips ---------- */
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font-family: inherit; font-weight: 700; font-size: 12px;
  background: var(--card); color: var(--muted-foreground);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 8px 16px; cursor: pointer;
  transition: all .15s ease;
}
.chip:hover { color: var(--foreground); }
.chip-active, .chip-active:hover { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }

/* ---------- Comic grid(新版卡片) ---------- */
.comic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.comic-grid.dense { grid-template-columns: repeat(5, 1fr); }
.comic-card { cursor: pointer; text-decoration: none; color: inherit; display: block; }
.comic-cover {
  position: relative; border-radius: 1rem; overflow: hidden;
  aspect-ratio: 4 / 3; background: var(--muted); border: 1px solid var(--border);
}
.comic-grid.dense .comic-cover { aspect-ratio: 3 / 4; }
.comic-cover img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .9; transition: transform .5s ease, opacity .5s ease; }
.comic-card:hover .comic-cover img { transform: scale(1.05); opacity: 1; }
.cover-fade { position: absolute; inset: 0; background: linear-gradient(to top, oklch(0.97 0.015 90 / 0.6), transparent 55%); pointer-events: none; }
.cover-fade span { position: absolute; left: 14px; bottom: 12px; color: var(--primary-foreground); font-size: 12px; font-weight: 700; opacity: 0; transition: opacity .2s ease; }
.comic-card:hover .cover-fade span { opacity: 1; }
.badge {
  position: absolute; top: 14px; left: 14px;
  background: oklch(0.16 0.035 275 / 0.9); color: var(--foreground);
  font-size: 10px; font-weight: 900; letter-spacing: 0.08em;
  padding: 5px 11px; border-radius: 999px;
}
.badge.new { background: var(--accent); color: var(--accent-foreground); }
.badge.hot { background: var(--primary); color: var(--primary-foreground); }
.cover-genre {
  position: absolute; left: 14px; bottom: 14px;
  background: var(--accent); color: var(--accent-foreground);
  font-size: 10px; font-weight: 900; padding: 5px 11px; border-radius: 999px;
}
.cover-num { position: absolute; right: 14px; bottom: 12px; font-size: 12px; font-weight: 700; color: var(--primary-foreground); }
.cover-bookmark {
  position: absolute; right: 14px; top: 14px;
  width: 34px; height: 34px; border-radius: 50%; border: none; cursor: pointer;
  background: oklch(0.16 0.035 275 / 0.9); color: var(--foreground);
  display: flex; align-items: center; justify-content: center;
  transition: color .15s ease, transform .15s ease;
}
.cover-bookmark:hover { transform: scale(1.08); }
.cover-bookmark.saved { color: var(--accent); }
.comic-info { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-top: 16px; }
.comic-info-main { min-width: 0; }
.comic-name { font-weight: 900; font-size: 20px; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.comic-grid.dense .comic-name { font-size: 15px; font-weight: 700; }
.comic-sub { color: var(--muted-foreground); font-size: 12px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.comic-arrow { color: var(--muted-foreground); flex-shrink: 0; margin-top: 4px; transition: transform .15s ease; }
.comic-card:hover .comic-arrow { transform: translateX(4px); }

/* ---------- 空数据占位 ---------- */
.empty-hint {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; text-align: center;
  border: 1px dashed var(--border); border-radius: 1rem;
  background: var(--card); color: var(--muted-foreground);
  padding: 40px 24px; font-size: 14px; font-weight: 700;
}
.empty-hint svg { color: var(--primary); }
.empty-hint .empty-title { color: var(--foreground); font-weight: 900; font-size: 16px; }
/* 网格内占位:占满除第一格外的剩余列 */
.comic-grid .empty-hint { grid-column: 2 / -1; min-height: 200px; }
@media (max-width: 560px) { .comic-grid .empty-hint { grid-column: 1 / -1; } }
.rank-rows .empty-hint { border: none; background: transparent; padding: 24px 0; align-items: flex-start; text-align: left; }

/* ---------- Ranking(新版大面板) ---------- */
.rank-panel {
  display: grid; gap: 32px;
  border-radius: 2rem; background: var(--card);
  padding: 28px; border: 1px solid transparent;
}
@media (min-width: 640px) { .rank-panel { padding: 40px; } }
@media (min-width: 1024px) { .rank-panel { grid-template-columns: 0.7fr 1.3fr; padding: 56px; } }
.rank-panel-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.2em; color: var(--primary); margin-bottom: 16px; }
.rank-panel-title { font-size: clamp(30px, 4.5vw, 54px); font-weight: 900; line-height: 1; letter-spacing: -0.05em; }
.rank-panel-desc { margin-top: 20px; max-width: 20rem; font-size: 14px; line-height: 1.7; color: var(--muted-foreground); }
.rank-rows { display: flex; flex-direction: column; }
.rank-row {
  display: flex; align-items: center; gap: 18px; padding: 16px 0;
  border-top: 1px solid var(--border); text-decoration: none; color: inherit;
}
.rank-row:first-child { border-top: none; }
.rank-row-num { width: 34px; font-size: 28px; font-weight: 900; color: var(--primary); flex-shrink: 0; }
.rank-row-thumb { width: 56px; height: 56px; border-radius: 0.8rem; object-fit: cover; flex-shrink: 0; background: var(--muted); }
.rank-row-meta { min-width: 0; flex: 1; }
.rank-row-name { font-weight: 900; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-row-sub { font-size: 12px; color: var(--muted-foreground); margin-top: 2px; }
.rank-row-heat { flex-shrink: 0; color: var(--muted-foreground); font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }

/* ---------- 旧版 ranking-list(保留兼容) ---------- */
.ranking-section .container { background: var(--card); border: 1px solid var(--border); border-radius: 2rem; padding: 30px; }
.ranking-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 40px; }
.rank-item { display: flex; align-items: center; gap: 14px; padding: 12px 10px; border-radius: 14px; cursor: pointer; transition: background .15s ease; text-decoration: none; color: inherit; }
.rank-item:hover { background: var(--muted); }
.rank-num { font-size: 24px; font-weight: 900; width: 38px; text-align: center; color: var(--muted-foreground); }
.rank-item:nth-child(1) .rank-num,
.rank-item:nth-child(2) .rank-num,
.rank-item:nth-child(3) .rank-num { color: var(--primary); }
.rank-thumb { width: 52px; height: 68px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.rank-meta { min-width: 0; }
.rank-name { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-tag { color: var(--muted-foreground); font-size: 13px; }
.rank-heat { margin-left: auto; color: var(--primary); font-weight: 700; font-size: 13px; white-space: nowrap; }

/* ---------- Panel(通用面板) ---------- */
.panel {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.panel.lg { border-radius: 2rem; padding: 32px; }
.panel p, .panel span, .panel div { background: transparent; }
.panel p span { background: transparent !important; }
.panel h1, .panel h2, .panel h3 { letter-spacing: -0.02em; }

/* ---------- Forms ---------- */
.form-input, .form-select, .form-textarea {
  width: 100%; background: var(--background); color: var(--foreground);
  border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 16px; font-family: inherit; font-size: 15px; outline: none;
  transition: border-color .15s ease;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--primary); }
.form-input::placeholder, .form-textarea::placeholder { color: var(--muted-foreground); }
.form-textarea { resize: vertical; }
.form-label { font-size: 14px; font-weight: 700; color: var(--muted-foreground); }
.form-card { max-width: 440px; margin: 0 auto; }

/* ---------- Tables ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; color: var(--muted-foreground); font-size: 12px; letter-spacing: 0.1em; font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.table td { padding: 14px 12px; border-bottom: 1px solid var(--border); color: var(--foreground); }
.table tr:last-child td { border-bottom: none; }
.table a { color: var(--primary); text-decoration: none; font-weight: 700; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; border-bottom: 1px solid var(--border); padding-bottom: 0; }
.tabs a {
  display: inline-block; padding: 10px 16px; text-decoration: none;
  color: var(--muted-foreground); font-weight: 700; font-size: 14px;
  border-radius: 999px; transition: all .15s ease;
}
.tabs a:hover { color: var(--foreground); }
.tabs a.active { background: var(--primary); color: var(--primary-foreground); }

/* ---------- Pagination ---------- */
.page-pagination ul, .pagination { display: flex; gap: 6px; list-style: none; flex-wrap: wrap; }
.pagination li a, .pagination li span, .page-pagination a {
  display: flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 10px;
  border-radius: 10px; border: 1px solid var(--border);
  background: var(--card); color: var(--muted-foreground);
  font-weight: 700; font-size: 14px; text-decoration: none; cursor: pointer;
  transition: all .15s ease;
}
.pagination li a:hover, .page-pagination a:hover { color: var(--foreground); border-color: var(--primary); }
.pagination li a.active { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }

/* ---------- User center ---------- */
.uc-layout { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: start; padding: 40px 0; }
.site-aside { min-width: 0; }
.uc-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; text-align: center; }
.uc-avatar { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; margin: 0 auto 12px; }
.uc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.uc-name { font-size: 18px; font-weight: 900; }
.uc-desc { font-size: 13px; color: var(--muted-foreground); margin-top: 4px; }
.user-menu { list-style: none; margin-top: 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; }
.user-menu li a { display: block; text-decoration: none; color: var(--muted-foreground); font-weight: 700; font-size: 14px; padding: 12px 16px; border-radius: 12px; transition: color .15s ease, background .15s ease; }
.user-menu li a:hover { color: var(--foreground); background: var(--muted); }
.user-menu li a.active { color: var(--primary-foreground); background: var(--primary); }
.uc-main { min-width: 0; }
.uc-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.uc-title { font-size: 26px; font-weight: 900; letter-spacing: -0.02em; }
.uc-desc-box { background: var(--background); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; font-size: 14px; color: var(--muted-foreground); margin-bottom: 20px; }
.uc-desc-box .title { display: block; color: var(--foreground); font-weight: 900; margin-bottom: 6px; }
.info-row { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 15px; flex-wrap: wrap; }
.info-row:last-child { border-bottom: none; }
.info-row label { width: 90px; flex-shrink: 0; color: var(--muted-foreground); font-weight: 700; font-size: 14px; }
.info-row samp { font-family: inherit; color: var(--accent); word-break: break-all; }
.btn-sm { padding: 7px 16px; font-size: 13px; }

/* ---------- mh-list(书架/精选网格) ---------- */
.mh-list { list-style: none; display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.mh-list li { min-width: 0; }
.mh-cover {
  position: relative; display: block; aspect-ratio: 3 / 4;
  background-size: cover; background-position: center;
  border-radius: 1rem; overflow: hidden; border: 1px solid var(--border);
  background-color: var(--muted); text-decoration: none;
  transition: transform .2s ease;
}
.mh-cover:hover { transform: translateY(-4px); }
.mh-tag {
  position: absolute; top: 10px; left: 10px;
  background: var(--primary); color: var(--primary-foreground);
  font-size: 10px; font-weight: 900; padding: 4px 10px; border-radius: 999px;
}
.mh-tag.tag-end { background: var(--accent); color: var(--accent-foreground); }
.read-section {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to top, oklch(0.16 0.035 275 / 0.92), transparent);
  color: var(--foreground); font-size: 11px; font-weight: 700; padding: 22px 10px 8px;
}
.edit-state {
  display: none; position: absolute; top: 10px; right: 10px;
  width: 26px; height: 26px; border-radius: 50%;
  background: oklch(0.16 0.035 275 / 0.85); border: 2px solid var(--foreground);
  cursor: pointer; z-index: 2;
}
.edit-state.active { background: var(--primary); border-color: var(--primary); }
.edit-state.active::after { content: '✓'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--primary-foreground); font-size: 13px; font-weight: 900; }
.mh-item-detali { padding-top: 10px; }
.mh-item-detali .title { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mh-item-detali .title a { text-decoration: none; color: var(--foreground); }
.mh-item-detali .chapter { font-size: 12px; color: var(--muted-foreground); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mh-item-detali .chapter a { color: var(--muted-foreground); text-decoration: none; }
.mh-item-detali .chapter a:hover { color: var(--primary); }

/* 横向购买记录 */
.mh-row { display: flex; gap: 18px; padding: 18px 0; border-top: 1px solid var(--border); }
.mh-row:first-child { border-top: none; }
.mh-row-cover { width: 90px; aspect-ratio: 3 / 4; flex-shrink: 0; background-size: cover; background-position: center; border-radius: 0.8rem; border: 1px solid var(--border); background-color: var(--muted); }
.mh-row-body { min-width: 0; flex: 1; }
.mh-row-title { font-size: 17px; font-weight: 900; }
.mh-row-title a { text-decoration: none; color: var(--foreground); }
.mh-row-info { font-size: 13px; color: var(--muted-foreground); margin-top: 6px; }
.mh-row-info a { color: var(--primary); text-decoration: none; font-weight: 700; }

/* ---------- Detail page ---------- */
.detail-layout { display: grid; grid-template-columns: 1fr 300px; gap: 24px; padding-top: 40px; }
.side-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.side-list a { display: flex; gap: 10px; text-decoration: none; color: inherit; }
.side-list img { width: 48px; height: 62px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.side-list .s-name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-list .s-sub { font-size: 12px; color: var(--muted-foreground); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.chapter-grid { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; max-height: 300px; overflow: hidden; }
.chapter-grid li { display: flex; align-items: center; gap: 4px; min-width: 0; }
.chapter-grid li a {
  display: block; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-decoration: none; color: var(--foreground); font-weight: 700; font-size: 14px;
  padding: 8px 12px; border-radius: 10px; transition: background .15s ease;
}
.chapter-grid li a:hover { background: var(--muted); color: var(--primary); }
.comment-item { display: flex; gap: 12px; }
.comment-item + .comment-item { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.comment-avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }
.comment-name { font-weight: 700; }
.comment-body { font-size: 14px; color: var(--muted-foreground); margin-top: 4px; }
.comment-meta { font-size: 12px; color: var(--muted-foreground); margin-top: 6px; display: flex; gap: 16px; }
.comment-meta a { text-decoration: none; color: var(--muted-foreground); }
.comment-meta a.zan { color: var(--primary); }

/* ---------- Reader ---------- */
.reader-bar { position: sticky; top: 0; z-index: 50; background: oklch(0.16 0.035 275 / 0.92); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.reader-bar-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; gap: 12px; }
.reader-crumbs { display: flex; align-items: center; gap: 8px; font-size: 14px; min-width: 0; }
.reader-crumbs a { text-decoration: none; color: var(--muted-foreground); font-weight: 700; }
.reader-crumbs a:hover { color: var(--primary); }
.reader-crumbs span { color: var(--muted-foreground); }
.reader-title { font-weight: 900; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reader-nav { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 20px 0; flex-wrap: wrap; }
.reader-nav a, .reader-nav span { text-decoration: none; padding: 8px 20px; border-radius: 999px; font-weight: 700; font-size: 14px; }
.reader-nav a { background: var(--card); border: 1px solid var(--border); color: var(--foreground); transition: all .15s; }
.reader-nav a:hover { border-color: var(--primary); color: var(--primary); }
.reader-nav a.btn-primary { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }
.reader-nav a.btn-primary:hover { background: var(--primary-hover); color: var(--primary-foreground); }
.reader-nav a.btn-secondary { background: var(--foreground); color: var(--primary-foreground); border-color: var(--foreground); }
.reader-nav span { color: var(--muted-foreground); border: 1px solid var(--border); background: var(--card); }
.comicpage img { display: block; margin: 0 auto; max-width: 800px; width: 100%; }
.reader-sidebar { position: fixed; left: 0; top: 0; z-index: 60; height: 100%; width: 240px; background: var(--card); border-right: 1px solid var(--border); transform: translateX(-100%); transition: transform .25s ease; }
.reader-sidebar.open { transform: translateX(0); }
.reader-sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.reader-sidebar-head span { font-weight: 900; font-size: 16px; }
.reader-sidebar-list { list-style: none; height: calc(100% - 57px); overflow-y: auto; padding: 8px; }
.reader-sidebar-list a { display: block; text-decoration: none; color: var(--muted-foreground); font-weight: 700; font-size: 14px; padding: 10px 14px; border-radius: 10px; transition: all .15s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reader-sidebar-list a:hover { color: var(--primary); background: var(--muted); }
.reader-sidebar-btn { position: fixed; left: 12px; top: 68px; z-index: 55; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: var(--card); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.reader-sidebar-btn span { width: 18px; height: 2px; background: var(--foreground); border-radius: 2px; position: relative; }
.reader-sidebar-btn span::before, .reader-sidebar-btn span::after { content: ''; position: absolute; left: 0; width: 18px; height: 2px; background: var(--foreground); border-radius: 2px; }
.reader-sidebar-btn span::before { top: -5px; }
.reader-sidebar-btn span::after { top: 5px; }

/* ---------- Articles ---------- */
.article-layout { display: grid; grid-template-columns: 1fr 300px; gap: 24px; padding: 32px 0; }
.article-bread { font-size: 13px; color: var(--muted-foreground); padding: 20px 0 0; }
.article-bread a { color: var(--muted-foreground); text-decoration: none; }
.article-bread a:hover { color: var(--primary); }
.article-title { font-size: clamp(24px, 3vw, 34px); font-weight: 900; letter-spacing: -0.02em; text-align: center; }
.article-meta { text-align: center; color: var(--muted-foreground); font-size: 13px; margin-top: 12px; }
.article-desc { margin-top: 20px; padding: 16px 20px; line-height: 1.85; font-size: 15px; background: var(--background); border: 1px solid var(--border); border-radius: 12px; color: var(--muted-foreground); }
.article-content { margin-top: 28px; line-height: 1.9; font-size: 16px; }
.article-content img { max-width: 100%; border-radius: 12px; }
.article-book { display: flex; gap: 20px; margin-top: 32px; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--background); }
.article-book img { width: 102px; height: 136px; object-fit: cover; border-radius: 10px; flex-shrink: 0; }
.article-book .b-name { font-size: 20px; font-weight: 900; }
.article-book .b-name a { text-decoration: none; color: var(--foreground); }
.article-book .b-info { color: var(--muted-foreground); font-size: 13px; margin-top: 8px; }
.article-book .b-intro { color: var(--muted-foreground); font-size: 14px; margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.article-book .b-btn { margin-top: 14px; }
.side-news { list-style: none; }
.side-news li { padding: 10px 0; border-top: 1px solid var(--border); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.side-news li:first-child { border-top: none; }
.side-news a { text-decoration: none; color: var(--muted-foreground); }
.side-news a:hover { color: var(--primary); }
.news-row { padding: 18px 0; border-top: 1px solid var(--border); }
.news-row:first-child { border-top: none; }
.news-row .tit { font-size: 18px; font-weight: 900; }
.news-row .tit a { text-decoration: none; color: var(--foreground); }
.news-row .tit a:hover { color: var(--primary); }
.news-row .info { font-size: 12px; color: var(--muted-foreground); margin-top: 6px; }
.news-row .text { font-size: 14px; color: var(--muted-foreground); margin-top: 8px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }

/* ---------- Pay / charge / vip ---------- */
.pay-layout { max-width: 860px; margin: 0 auto; padding: 48px 0; }
.pay-kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.2em; color: var(--primary); text-transform: uppercase; }
.pay-title { font-size: clamp(30px, 4vw, 44px); font-weight: 900; letter-spacing: -0.04em; margin-top: 8px; }
.pay-meta { margin-top: 16px; font-size: 14px; color: var(--muted-foreground); }
.pay-meta strong { color: var(--accent); font-weight: 900; }
.opt-label { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.15em; color: var(--muted-foreground); margin: 28px 0 12px; text-transform: uppercase; }
.opt-list { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; }
.opt-list label { display: block; cursor: pointer; }
.opt-list input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.opt-card {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--border); background: var(--background);
  border-radius: 14px; padding: 12px 18px; min-height: 56px;
  font-weight: 700; font-size: 14px; color: var(--foreground);
  transition: all .15s ease;
}
.opt-list input:checked + .opt-card { border-color: var(--primary); background: oklch(0.72 0.2 20 / 0.12); color: var(--primary); }
.opt-card img { height: 32px; width: auto; }
.amount-card { flex-direction: column; align-items: flex-start; gap: 4px; min-width: 130px; padding: 16px 18px; }
.amount-card .a-val { font-size: 20px; font-weight: 900; }
.amount-card .a-sub { font-size: 12px; color: var(--muted-foreground); font-weight: 400; }
.pay-total { margin-top: 28px; font-size: 16px; font-weight: 700; }
.pay-total .total { color: var(--primary); font-size: 24px; font-weight: 900; margin-left: 6px; }
.pay-actions { margin-top: 24px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.pay-actions input[type="submit"] {
  font-family: inherit; font-weight: 700; border: none; border-radius: 999px;
  padding: 13px 30px; cursor: pointer; font-size: 14px;
  background: var(--primary); color: var(--primary-foreground);
  transition: transform .18s ease, background .18s ease;
}
.pay-actions input[type="submit"]:hover { background: var(--primary-hover); transform: translateY(-2px); }
.pay-actions a { color: var(--muted-foreground); font-size: 13px; text-decoration: none; }
.pay-actions a:hover { color: var(--primary); }
.pay-tip { font-size: 12px; color: var(--muted-foreground); }

/* ---------- Pay chapter(独立付费页) ---------- */
.pay-stage { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 80px 20px; }
.pay-card { width: 100%; max-width: 460px; background: var(--card); border: 1px solid var(--border); border-radius: 2rem; padding: 36px; text-align: center; }
.pay-card .p-kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.2em; color: var(--primary); }
.pay-card h1 { font-size: 26px; font-weight: 900; letter-spacing: -0.02em; margin-top: 10px; }
.pay-card .p-tip { color: var(--muted-foreground); font-size: 14px; margin-top: 10px; }
.pay-card .p-price { font-size: 34px; font-weight: 900; color: var(--primary); margin-top: 16px; }
.pay-card .p-balance { font-size: 13px; color: var(--muted-foreground); margin-top: 6px; }
.pay-card .p-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.pay-card .p-links { margin-top: 18px; font-size: 13px; display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }
.pay-card .p-links a { color: var(--muted-foreground); text-decoration: none; }
.pay-card .p-links a:hover { color: var(--primary); }

/* ---------- Exchange(vipexchange/kami) ---------- */
.exchange-card { max-width: 460px; margin: 0 auto; text-align: center; }
.exchange-card h3 { font-size: 28px; font-weight: 900; letter-spacing: -0.02em; }
.exchange-card .desc { text-align: left; margin-top: 20px; font-size: 13px; color: var(--muted-foreground); }
.exchange-card .desc dt { font-weight: 900; color: var(--foreground); margin-bottom: 6px; }
.exchange-card .desc dd { margin-top: 4px; }

/* ---------- Success page ---------- */
.success-wrap { min-height: 60vh; display: flex; align-items: center; justify-content: center; padding: 60px 0; }

/* ---------- Prose(协议页) ---------- */
.prose { line-height: 1.9; font-size: 14px; color: var(--muted-foreground); }
.prose p { margin: 0 0 10px; background: transparent !important; }
.prose p span, .prose span { background: transparent !important; color: inherit !important; }

/* ---------- Footer(新版精简) ---------- */
.site-footer { border-top: 1px solid var(--border); margin-top: 24px; }
.footer-line {
  display: flex; flex-direction: column; gap: 14px;
  padding: 32px 0; font-size: 12px; font-weight: 700;
}
@media (min-width: 640px) { .footer-line { flex-direction: row; align-items: center; justify-content: space-between; } }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand svg { color: var(--accent); }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: var(--muted-foreground); text-decoration: none; transition: color .15s ease; }
.footer-links a:hover { color: var(--foreground); }
.footer-copy { color: var(--muted-foreground); font-weight: 400; }
.footer-copy a { color: inherit; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .comic-grid.dense { grid-template-columns: repeat(4, 1fr); }
  .mh-list { grid-template-columns: repeat(4, 1fr); }
  .search-box input { width: 120px; }
  .detail-layout, .article-layout { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .main-nav {
    position: fixed; top: 76px; left: 0; right: 0;
    flex-direction: column; gap: 16px;
    background: var(--background); padding: 20px 32px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-140%); transition: transform .3s ease;
    z-index: 49;
  }
  .main-nav.open { transform: translateY(0); }
  .menu-toggle { display: flex; }
  .search-box { display: none !important; }
  .site-header .search-icon-btn { display: flex !important; }
  .comic-grid { grid-template-columns: repeat(2, 1fr); }
  .comic-grid.dense { grid-template-columns: repeat(3, 1fr); }
  .ranking-list { grid-template-columns: 1fr; }
  .uc-layout { grid-template-columns: 1fr; }
  .mh-list { grid-template-columns: repeat(3, 1fr); }
  .chapter-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .comic-grid, .comic-grid.dense { grid-template-columns: 1fr; }
  .mh-list { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .hero { min-height: 440px; }
  .hero-content { padding-bottom: 40px; }
  .chapter-grid { grid-template-columns: 1fr; }
  .article-book { flex-direction: column; }
  .panel.lg { padding: 22px; }
}
