/* ============================================================
   星辰漫画 · 全站样式
   ============================================================ */

:root {
  --ink: #141519;
  --ink-2: #3a3d46;
  --muted: #7b7f8b;
  --line: #e9ebf0;
  --bg: #f6f7f9;
  --card: #ffffff;
  --accent: #ff4a1c;
  --accent-dark: #e23c10;
  --accent-soft: #fff2ed;
  --vip-a: #6d4bff;
  --vip-b: #c44bff;
  --radius: 14px;
  --shadow-sm: 0 2px 10px rgba(20, 21, 25, .05);
  --shadow-md: 0 12px 34px rgba(20, 21, 25, .12);
  --header-h: 72px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #fff;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; border: 0; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; font-weight: 800; letter-spacing: -.01em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.text-center { text-align: center; }

/* ------------------------------------------------------------ 通用组件 */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  transition: .18s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-ghost {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { background: #fafafb; border-color: #d9dce3; color: var(--ink); }

.btn-dark { background: var(--ink); }
.btn-dark:hover { background: #000; }

.btn-vip {
  background: linear-gradient(135deg, var(--vip-a), var(--vip-b));
  box-shadow: 0 8px 20px rgba(109, 75, 255, .28);
}
.btn-vip:hover { background: linear-gradient(135deg, #5c3bff, #b43aff); }

.btn-sm { height: 36px; padding: 0 16px; font-size: 14px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

.badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
}
.badge-free { background: #e9f8ef; color: #128a4a; }
.badge-vip { background: linear-gradient(135deg, var(--vip-a), var(--vip-b)); color: #fff; }
.badge-soon { background: #fff3e2; color: #b4690e; }

.chip {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  font-size: 14px;
  transition: .15s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ------------------------------------------------------------ 顶部导航 */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 28px;
}

.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-mark {
  width: 36px; height: 36px;
  border-radius: 11px;
  background: linear-gradient(135deg, #ff6a3d, var(--accent) 55%, #e22f6b);
  display: grid; place-items: center;
  box-shadow: 0 6px 16px rgba(255, 74, 28, .3);
}
.logo-mark svg { width: 20px; height: 20px; fill: #fff; }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-text strong { font-size: 18px; letter-spacing: .02em; }
.logo-text span { font-size: 10px; color: var(--muted); letter-spacing: .18em; text-transform: uppercase; }

.main-nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.main-nav a {
  position: relative;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 15px;
  color: var(--ink-2);
  font-weight: 500;
}
.main-nav a:hover { color: var(--ink); background: #f5f6f8; }
.main-nav a.is-active { color: var(--ink); font-weight: 700; }
.main-nav a.is-active::after {
  content: "";
  position: absolute; left: 14px; right: 14px; bottom: 0;
  height: 2px; border-radius: 2px; background: var(--accent);
}

/* ========== 合规文档页 ========== */
.doc-wrap {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px;
  padding: 48px 0 72px;
  max-width: 1080px;
  margin: 0 auto;
}
.doc-sidebar {
  position: sticky;
  top: 80px;
  height: fit-content;
  border-right: 1px solid var(--line);
  padding-right: 24px;
}
.doc-sidebar a {
  display: block;
  padding: 10px 14px;
  color: var(--ink-2);
  font-size: 14px;
  border-radius: 8px;
  margin-bottom: 4px;
  font-weight: 500;
}
.doc-sidebar a:hover { background: #f5f6f8; color: var(--ink); }
.doc-sidebar a.is-active { background: #fff1ec; color: var(--accent); font-weight: 700; }
.doc-body h1 { font-size: 28px; font-weight: 800; letter-spacing: -.01em; margin-bottom: 8px; }
.doc-body .doc-meta { color: var(--ink-3); font-size: 13px; margin-bottom: 32px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.doc-body h2 { font-size: 18px; font-weight: 700; margin: 28px 0 12px; color: var(--ink); }
.doc-body h3 { font-size: 15px; font-weight: 600; margin: 18px 0 8px; color: var(--ink-2); }
.doc-body p { line-height: 1.95; color: #4a4d55; font-size: 15px; margin-bottom: 12px; }
.doc-body ol, .doc-body ul { line-height: 1.95; color: #4a4d55; margin: 8px 0 14px 22px; font-size: 15px; }
.doc-body ol { list-style: decimal; }
.doc-body ul { list-style: disc; }
.doc-body li { margin-bottom: 4px; }
.doc-body a { color: var(--accent); text-decoration: underline; }

@media (max-width: 720px) {
  .doc-wrap { grid-template-columns: 1fr; gap: 24px; padding: 24px 0 48px; }
  .doc-sidebar { position: static; border-right: none; padding-right: 0; display: flex; flex-wrap: wrap; gap: 8px; }
  .doc-sidebar a { display: inline-block; padding: 6px 12px; font-size: 13px; margin-bottom: 0; }
  .doc-body h1 { font-size: 22px; }
}

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.search-box { position: relative; }
.search-box input {
  width: 210px;
  height: 38px;
  padding: 0 38px 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f6f7f9;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: .18s;
}
.search-box input::placeholder { color: #a2a6b0; }
.search-box input:focus { background: #fff; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 74, 28, .1); }
.search-box button {
  position: absolute; right: 4px; top: 4px;
  width: 30px; height: 30px;
  border: 0; border-radius: 50%;
  background: transparent;
  display: grid; place-items: center;
  color: var(--muted);
}
.search-box button:hover { color: var(--accent); }
.search-box svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2; }

.user-chip { display: flex; align-items: center; gap: 8px; }
.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffb199, var(--accent));
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 14px;
  overflow: hidden;
  flex-shrink: 0;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-name { font-size: 14px; font-weight: 600; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vip-tag {
  font-size: 11px; font-weight: 700; color: #7a4b00;
  background: linear-gradient(135deg, #ffe6a8, #ffc94d);
  padding: 1px 7px; border-radius: 6px;
}

/* ------------------------------------------------------------ 首页 Hero */

.hero { padding: 28px 0 8px; }
.hero-stage {
  position: relative;
  height: 430px;
  border-radius: 20px;
  overflow: hidden;
  background: #0d1015;
  box-shadow: var(--shadow-md);
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .7s ease;
  pointer-events: none;
}
.hero-slide.is-active { opacity: 1; pointer-events: auto; }
.hero-slide img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}
.hero-slide::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(8, 9, 12, .94) 0%, rgba(8, 9, 12, .78) 34%, rgba(8, 9, 12, .25) 62%, rgba(8, 9, 12, .05) 100%),
              linear-gradient(0deg, rgba(8, 9, 12, .75), transparent 45%);
  pointer-events: none;
}
.hero-content {
  position: absolute;
  left: 56px;
  bottom: 54px;
  max-width: 520px;
  color: #fff;
  z-index: 2;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; letter-spacing: .14em; font-weight: 600;
  color: #ffb59f; text-transform: uppercase;
  margin-bottom: 14px;
}
.hero-eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--accent); }
.hero-title { font-size: 42px; line-height: 1.15; margin-bottom: 12px; letter-spacing: -.02em; }
.hero-desc {
  font-size: 14.5px; line-height: 1.75; color: rgba(255, 255, 255, .78);
  margin-bottom: 20px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-meta { display: flex; align-items: center; gap: 10px; font-size: 13px; color: rgba(255,255,255,.62); margin-bottom: 26px; }
.hero-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: rgba(255,255,255,.4); }
.hero-actions { display: flex; gap: 12px; align-items: center; }
.hero-actions .btn-ghost { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.28); color: #fff; backdrop-filter: blur(6px); }
.hero-actions .btn-ghost:hover { background: rgba(255,255,255,.24); }

.hero-nav {
  position: absolute; right: 28px; bottom: 26px;
  display: flex; gap: 10px; z-index: 3;
}
.hero-nav button {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.12);
  color: #fff;
  display: grid; place-items: center;
  backdrop-filter: blur(6px);
  transition: .18s;
}
.hero-nav button:hover { background: rgba(255,255,255,.26); }
.hero-nav svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.2; }

.hero-dots {
  position: absolute; left: 56px; bottom: 28px;
  display: flex; gap: 8px; z-index: 3;
}
.hero-dots button {
  width: 7px; height: 7px; padding: 0;
  border: 0; border-radius: 999px;
  background: rgba(255,255,255,.35);
  transition: .3s;
}
.hero-dots button.is-active { width: 26px; background: var(--accent); }

/* ------------------------------------------------------------ 区块 */

.section { padding: 44px 0 8px; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 22px; gap: 16px;
}
.section-title { font-size: 23px; display: flex; align-items: center; gap: 10px; }
.section-title::before {
  content: ""; width: 4px; height: 20px; border-radius: 3px;
  background: var(--accent);
}
.section-sub { font-size: 13px; color: var(--muted); margin-top: 4px; margin-left: 14px; }
.section-more { font-size: 14px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.section-more:hover { color: var(--accent); }

/* 分类快捷 */
.cat-row { display: flex; flex-wrap: wrap; gap: 10px; padding: 6px 0 2px; }

/* 漫画卡片 */
.comic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  gap: 26px 22px;
}
.comic-card { display: block; }
.comic-card .cover {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  background: #eceef2;
  box-shadow: var(--shadow-sm);
}
.comic-card .cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}
.comic-card:hover .cover img { transform: scale(1.055); }
.comic-card .cover::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 58%, rgba(10, 11, 14, .55));
  opacity: 0; transition: .25s;
  pointer-events: none;
}
.comic-card:hover .cover::after { opacity: 1; }
.comic-card .badge { position: absolute; left: 10px; top: 10px; z-index: 2; }
.comic-card .cover-read {
  position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 2;
  height: 34px; border-radius: 8px;
  background: rgba(255,255,255,.95);
  color: var(--ink); font-size: 13px; font-weight: 600;
  display: grid; place-items: center;
  opacity: 0; transform: translateY(6px); transition: .25s;
}
.comic-card:hover .cover-read { opacity: 1; transform: translateY(0); }
.comic-card .title {
  margin-top: 12px;
  font-size: 15.5px; font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.comic-card .meta {
  margin-top: 3px;
  font-size: 12.5px; color: var(--muted);
  display: flex; align-items: center; gap: 6px;
}
.comic-card .meta .dot { width: 2px; height: 2px; border-radius: 50%; background: #c3c6cd; }

/* 最新更新列表 */
.update-list { border-top: 1px solid var(--line); }
.update-item {
  display: flex; align-items: center; gap: 18px;
  padding: 16px 4px;
  border-bottom: 1px solid var(--line);
  transition: background .15s;
}
.update-item:hover { background: #fafafa; }
.update-item .thumb {
  width: 54px; height: 72px; border-radius: 8px; overflow: hidden;
  background: #eceef2; flex-shrink: 0;
}
.update-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.update-item .info { min-width: 0; flex: 1; }
.update-item .info h4 { font-size: 15.5px; display: flex; align-items: center; gap: 8px; }
.update-item .info p { font-size: 13px; color: var(--muted); margin-top: 4px; }
.update-item .newest { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.update-item .btn { flex-shrink: 0; }

/* ------------------------------------------------------------ 会员横幅 */

.vip-banner {
  margin: 48px 0 56px;
  border-radius: 20px;
  padding: 40px 46px;
  background:
    radial-gradient(900px 320px at 88% 20%, rgba(196, 75, 255, .5), transparent 62%),
    radial-gradient(700px 300px at 8% 90%, rgba(255, 74, 28, .32), transparent 65%),
    linear-gradient(120deg, #171427, #241a44 55%, #33205c);
  color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  gap: 28px; flex-wrap: wrap;
  overflow: hidden; position: relative;
}
.vip-banner::after {
  content: "";
  position: absolute; right: -60px; top: -70px;
  width: 260px; height: 260px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.14);
  pointer-events: none;
}
.vip-banner h3 { font-size: 27px; margin-bottom: 8px; }
.vip-banner p { color: rgba(255,255,255,.66); font-size: 14px; }
.vip-banner .price-hint { color: #ffd166; font-weight: 700; }

/* ------------------------------------------------------------ 页脚 */

.site-footer { background: #101116; color: #9a9ea9; padding: 52px 0 0; margin-top: 60px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.4fr;
  gap: 40px;
  padding-bottom: 40px;
}
.site-footer h4 { color: #fff; font-size: 14px; margin-bottom: 16px; letter-spacing: .04em; }
.site-footer p { font-size: 13px; line-height: 1.9; }
.footer-links a { display: block; font-size: 13px; padding: 5px 0; transition: .15s; }
.footer-links a:hover { color: #fff; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand .logo-text strong { color: #fff; }
.footer-brand .logo-text span { color: #6f7480; }
.footer-contact .row { display: flex; gap: 8px; font-size: 13px; padding: 4px 0; }
.footer-contact .row span:first-child { color: #6f7480; width: 44px; flex-shrink: 0; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 20px 0;
  font-size: 12.5px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: #6f7480;
}
.footer-bottom a:hover { color: #fff; }
.footer-report {
  padding: 0 0 20px;
  font-size: 12px;
  color: #5a5f6a;
  display: flex; justify-content: center; gap: 10px; flex-wrap: wrap;
}
.footer-report a { color: #6f7480; }
.footer-report a:hover { color: #fff; }
.footer-report .sep { opacity: .5; }

/* ------------------------------------------------------------ 页面通用头部 */

.page-head { padding: 34px 0 6px; }
.page-head h1 { font-size: 30px; }
.page-head .lead { color: var(--muted); font-size: 14px; margin-top: 8px; }
.breadcrumb { font-size: 13px; color: var(--muted); padding: 18px 0 0; display: flex; gap: 7px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: #c3c6cd; }

/* ------------------------------------------------------------ 漫画详情 */

.comic-hero { display: flex; gap: 36px; padding: 26px 0 34px; align-items: flex-start; }
.comic-cover {
  width: 246px; flex-shrink: 0;
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(20,21,25,.18);
  background: #eceef2;
}
.comic-cover img { width: 100%; height: 100%; object-fit: cover; }
.comic-info { flex: 1; min-width: 0; padding-top: 4px; }
.comic-info h1 { font-size: 34px; margin-bottom: 14px; }
.comic-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.comic-tags .chip { height: 30px; font-size: 13px; }
.comic-facts { display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: 13.5px; color: var(--muted); margin-bottom: 20px; }
.comic-facts b { color: var(--ink); font-weight: 600; }
.comic-desc { font-size: 14.5px; color: var(--ink-2); line-height: 1.85; max-width: 760px; white-space: pre-line; }
.comic-actions { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; border-bottom: 1px solid var(--line); gap: 14px;
}
.panel-head h3 { font-size: 17px; }
.panel-body { padding: 22px 24px; }

.chapter-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2px 14px; padding: 8px 10px; }
.chapter-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 9px;
  font-size: 14.5px; transition: .15s;
}
.chapter-row:hover { background: #f6f7f9; }
.chapter-row .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chapter-row .lock { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.chapter-row .lock svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; }
.chapter-row.is-locked .name { color: var(--muted); }

/* ------------------------------------------------------------ 阅读器 */

body.reader-body { background: #0b0c0f; color: #e7e8ec; }
.reader-bar {
  position: sticky; top: 0; z-index: 50;
  height: 58px;
  background: rgba(12, 13, 16, .9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: center; gap: 14px;
  padding: 0 20px;
}
.reader-bar a, .reader-bar button { color: #d6d8de; }
.reader-bar .back { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.reader-bar .back:hover { color: #fff; }
.reader-bar .reader-title { font-size: 14px; font-weight: 600; color: #fff; margin-left: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reader-bar .reader-sub { font-size: 12.5px; color: #8d919c; }
.reader-bar .spacer { flex: 1; }
.reader-bar .bar-btn {
  height: 34px; padding: 0 14px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  font-size: 13px;
  display: inline-flex; align-items: center; gap: 6px;
  transition: .15s;
}
.reader-bar .bar-btn:hover { background: rgba(255,255,255,.14); color: #fff; }

.reader-progress { position: fixed; top: 58px; left: 0; right: 0; height: 2px; background: rgba(255,255,255,.08); z-index: 51; }
.reader-progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .1s linear; }

.reader-main { max-width: 900px; margin: 0 auto; padding: 18px 14px 60px; }
.reader-pages img { width: 100%; height: auto; display: block; margin: 0 auto 8px; background: #15171c; border-radius: 4px; }
.reader-nav {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 26px 0 8px;
}
.reader-nav .btn { min-width: 140px; }
.reader-nav .btn-ghost { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.16); color: #e7e8ec; }
.reader-nav .btn-ghost:hover { background: rgba(255,255,255,.14); color: #fff; }
.reader-tip { text-align: center; color: #6f7480; font-size: 12.5px; padding: 20px 0; }

.chapter-drawer {
  position: fixed; inset: 0; z-index: 80;
  display: none;
}
.chapter-drawer.is-open { display: block; }
.chapter-drawer .mask { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.chapter-drawer .drawer {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: 360px; max-width: 86vw;
  background: #16181d;
  border-left: 1px solid rgba(255,255,255,.08);
  padding: 22px;
  overflow-y: auto;
}
.chapter-drawer h3 { color: #fff; font-size: 16px; margin-bottom: 16px; }
.chapter-drawer .item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 12px; border-radius: 8px; font-size: 14px; color: #c9ccd4;
}
.chapter-drawer .item:hover { background: rgba(255,255,255,.06); color: #fff; }
.chapter-drawer .item.is-current { background: rgba(255, 74, 28, .16); color: #ff9b7e; }

/* 付费墙 */
.paywall {
  margin: 30px auto 10px;
  max-width: 560px;
  background: linear-gradient(180deg, #191b22, #121419);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px;
  padding: 34px 30px 30px;
  text-align: center;
}
.paywall .icon {
  width: 54px; height: 54px; margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(109,75,255,.16);
  display: grid; place-items: center;
}
.paywall .icon svg { width: 24px; height: 24px; stroke: #a78bfa; fill: none; stroke-width: 1.8; }
.paywall h3 { color: #fff; font-size: 20px; margin-bottom: 8px; }
.paywall p { color: #8d919c; font-size: 13.5px; margin-bottom: 22px; }
.paywall .price { color: #ffd166; font-weight: 700; }
.paywall .actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.paywall .hint { margin-top: 16px; font-size: 12px; color: #6f7480; }

/* ------------------------------------------------------------ 表单 / 用户中心 */

.auth-wrap { min-height: calc(100vh - var(--header-h)); display: grid; place-items: center; padding: 50px 20px 70px; background:
  radial-gradient(700px 400px at 15% 10%, #fff1ec, transparent 60%),
  radial-gradient(700px 400px at 85% 90%, #f0edff, transparent 60%),
  #fafbfc;
}
.auth-card {
  width: 100%; max-width: 460px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 38px 36px 32px;
  box-shadow: var(--shadow-sm);
}
.auth-card.wide { max-width: 520px; }
.auth-card h1 { font-size: 25px; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); font-size: 13.5px; margin-bottom: 26px; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 7px; color: var(--ink-2); }
.form-group label .req { color: var(--accent); }
.input {
  width: 100%; height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 14.5px;
  color: var(--ink);
  outline: none;
  transition: .16s;
  font-family: inherit;
}
textarea.input { height: auto; min-height: 110px; padding: 12px 14px; resize: vertical; line-height: 1.7; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237b7f8b' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,74,28,.1); }
.input.is-error { border-color: #e23c3c; }
.form-hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.form-error { font-size: 12.5px; color: #d92d20; margin-top: 6px; display: none; }
.form-error.is-show { display: block; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.alert { border-radius: 10px; padding: 12px 14px; font-size: 13.5px; margin-bottom: 18px; line-height: 1.6; }
.alert-error { background: #fff1f0; color: #b42318; border: 1px solid #ffd5d2; }
.alert-success { background: #edfdf3; color: #067647; border: 1px solid #c9f0d8; }
.alert-info { background: #f2f5ff; color: #2b4bd0; border: 1px solid #d8e0ff; }
.alert-warn { background: #fff8e6; color: #93600a; border: 1px solid #ffe9b0; }

.auth-foot { margin-top: 20px; font-size: 13.5px; color: var(--muted); text-align: center; }
.auth-foot a { color: var(--accent); font-weight: 600; }
.agree { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--muted); margin: 4px 0 18px; }
.agree input { margin-top: 3px; }

.account { display: grid; grid-template-columns: 236px 1fr; gap: 28px; padding: 34px 0 60px; align-items: start; }
.side-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 26px 20px; }
.side-user { text-align: center; padding-bottom: 20px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.side-user .avatar { width: 68px; height: 68px; margin: 0 auto 12px; font-size: 24px; }
.side-user h3 { font-size: 17px; margin-bottom: 4px; }
.side-user p { font-size: 12.5px; color: var(--muted); }
.side-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 13px; border-radius: 9px;
  font-size: 14px; color: var(--ink-2);
}
.side-nav a:hover { background: #f6f7f9; }
.side-nav a.is-active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.side-link-btn {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 11px 13px; border: 0; border-radius: 9px; background: transparent;
  font-size: 14px; font-family: inherit; color: var(--muted); text-align: left;
  cursor: pointer; transition: background .15s, color .15s;
}
.side-link-btn:hover { background: #f6f7f9; color: var(--ink-2); }

.account-main { min-width: 0; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 26px 28px; }
.card + .card { margin-top: 20px; }
.card-title { font-size: 18px; margin-bottom: 4px; }
.card-sub { font-size: 13px; color: var(--muted); margin-bottom: 22px; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat-row > div {
  background: #f8f9fb; border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 14px; text-align: center;
}
.stat-row b { display: block; font-size: 20px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.stat-row span { font-size: 12.5px; color: var(--muted); }

.vip-status {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  border-radius: 14px; padding: 22px 24px;
  background: linear-gradient(120deg, #1a1630, #2f2050);
  color: #fff; flex-wrap: wrap;
}
.vip-status h3 { font-size: 18px; margin-bottom: 4px; }
.vip-status p { font-size: 13px; color: rgba(255,255,255,.62); }
.vip-status .btn { height: 38px; padding: 0 18px; font-size: 14px; }

.table { width: 100%; border-collapse: collapse; font-size: 13.8px; }
.table th {
  text-align: left; font-weight: 600; color: var(--muted);
  font-size: 12.5px; padding: 10px 12px; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .t-title { font-weight: 600; }
.table .t-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 6px; font-size: 12px; font-weight: 600; background: #f1f2f6; color: var(--ink-2); }
.pill-success { background: #e9f8ef; color: #128a4a; }
.pill-warn { background: #fff3e2; color: #a96608; }
.pill-danger { background: #fff0ef; color: #c22a1c; }

.empty {
  text-align: center; padding: 60px 20px; color: var(--muted);
}
.empty svg { width: 46px; height: 46px; stroke: #cfd3db; fill: none; stroke-width: 1.5; margin: 0 auto 14px; }
.empty p { font-size: 14px; }

/* ------------------------------------------------------------ 搜索结果 / 筛选 */

.filter-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 16px 0 22px;
}
.filter-bar .spacer { flex: 1; }
.filter-bar select { height: 36px; border-radius: 8px; border: 1px solid var(--line); background: #fff; padding: 0 12px; font-size: 13.5px; color: var(--ink-2); outline: none; }
.result-count { font-size: 13px; color: var(--muted); }

.pager { display: flex; gap: 8px; justify-content: center; padding: 44px 0 10px; flex-wrap: wrap; }
.pager-item {
  min-width: 38px; height: 38px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 9px;
  font-size: 13.5px; color: var(--ink-2); background: #fff;
}
.pager-item:hover { border-color: var(--accent); color: var(--accent); }
.pager-item.is-active { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.pager-item.is-disabled { color: #c3c6cd; background: #fafafa; }
.pager-item.is-gap { border: 0; background: transparent; color: #b5b9c2; }

/* ------------------------------------------------------------ 会员页 */

.vip-hero {
  margin-top: 26px;
  border-radius: 22px;
  padding: 56px 52px;
  background:
    radial-gradient(800px 320px at 85% 15%, rgba(196, 75, 255, .45), transparent 60%),
    radial-gradient(600px 300px at 10% 90%, rgba(255, 74, 28, .28), transparent 65%),
    linear-gradient(120deg, #141122, #241a44 60%, #33205c);
  color: #fff;
}
.vip-hero h1 { font-size: 34px; margin-bottom: 12px; }
.vip-hero p { color: rgba(255,255,255,.68); font-size: 14.5px; max-width: 560px; }
.vip-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 30px; }
.plan {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 30px 26px; position: relative; transition: .2s;
}
.plan:hover { border-color: #d9d0ff; box-shadow: 0 14px 34px rgba(90, 60, 200, .12); transform: translateY(-3px); }
.plan.is-featured { border-color: var(--vip-a); box-shadow: 0 14px 34px rgba(90, 60, 200, .16); }
.plan .flag {
  position: absolute; right: 20px; top: -12px;
  height: 24px; padding: 0 12px; border-radius: 999px;
  background: linear-gradient(135deg, var(--vip-a), var(--vip-b));
  color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center;
}
.plan h3 { font-size: 17px; margin-bottom: 6px; }
.plan .days { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.plan .amount { font-size: 40px; font-weight: 800; letter-spacing: -.02em; }
.plan .amount small { font-size: 18px; font-weight: 700; margin-right: 2px; }
.plan .unit { font-size: 13px; color: var(--muted); margin-left: 4px; font-weight: 400; }
.plan ul { margin: 22px 0 26px; border-top: 1px solid var(--line); padding-top: 18px; }
.plan li { font-size: 13.5px; color: var(--ink-2); padding: 5px 0; display: flex; gap: 8px; }
.plan li svg { width: 15px; height: 15px; stroke: #128a4a; fill: none; stroke-width: 2.4; margin-top: 4px; }
.vip-note { font-size: 12.5px; color: var(--muted); margin-top: 18px; line-height: 1.9; }

/* ------------------------------------------------------------ 支付 */

.pay-card { max-width: 620px; margin: 40px auto; }
.pay-summary { background: #f8f9fb; border-radius: 12px; padding: 20px 22px; margin-bottom: 22px; }
.pay-summary .row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 14px; }
.pay-summary .row span:first-child { color: var(--muted); }
.pay-amount { text-align: center; padding: 22px 0 26px; }
.pay-amount .label { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.pay-amount .value { font-size: 40px; font-weight: 800; letter-spacing: -.02em; }
.pay-amount .value small { font-size: 20px; margin-right: 2px; }

/* ------------------------------------------------------------ Toast */

.toast-wrap { position: fixed; left: 50%; top: 84px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  padding: 11px 20px; border-radius: 10px; font-size: 13.5px;
  background: #141519; color: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
  animation: toastIn .25s ease;
}
.toast.is-error { background: #c22a1c; }
.toast.is-success { background: #0f7a43; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* ------------------------------------------------------------ 响应式 */

@media (max-width: 1080px) {
  .hero-stage { height: 380px; }
  .hero-title { font-size: 34px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .comic-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 22px 16px; }
}

@media (max-width: 900px) {
  .main-nav { display: none; }
  .account { grid-template-columns: 1fr; }
  .side-card { display: flex; align-items: center; gap: 18px; padding: 16px 18px; }
  .side-user { border: 0; margin: 0; padding: 0; text-align: left; display: flex; align-items: center; gap: 12px; }
  .side-user .avatar { width: 46px; height: 46px; margin: 0; font-size: 17px; }
  .side-nav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; }
  .side-nav a { white-space: nowrap; padding: 8px 12px; }
  .comic-hero { gap: 22px; }
  .comic-cover { width: 186px; }
  .comic-info h1 { font-size: 27px; }
  .vip-plans { grid-template-columns: 1fr; }
  .vip-banner { padding: 30px 26px; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .container { padding: 0 16px; }
  .header-inner { gap: 12px; height: 64px; }
  :root { --header-h: 64px; }
  .logo-text span { display: none; }
  .search-box input { width: 132px; }
  .user-name { display: none; }
  .hero { padding-top: 16px; }
  .hero-stage { height: 340px; border-radius: 16px; }
  .hero-slide::after { background: linear-gradient(0deg, rgba(8,9,12,.95) 6%, rgba(8,9,12,.55) 46%, rgba(8,9,12,.12) 100%); }
  .hero-content { left: 22px; right: 22px; bottom: 24px; max-width: none; }
  .hero-title { font-size: 26px; }
  .hero-desc { font-size: 13.5px; -webkit-line-clamp: 2; margin-bottom: 16px; }
  .hero-meta { margin-bottom: 18px; }
  .hero-actions .btn { height: 40px; padding: 0 18px; font-size: 14px; }
  .hero-dots { left: 22px; bottom: 12px; display: none; }
  .hero-nav { right: 16px; bottom: 14px; }
  .hero-nav button { width: 32px; height: 32px; }
  .section { padding: 32px 0 4px; }
  .section-title { font-size: 19px; }
  .comic-grid { grid-template-columns: repeat(2, 1fr); gap: 18px 14px; }
  .comic-card .title { font-size: 14px; }
  .update-item { gap: 12px; }
  .update-item .newest { display: none; }
  .update-item .btn { display: none; }
  .comic-hero { flex-direction: column; }
  .comic-cover { width: 150px; }
  .comic-info h1 { font-size: 24px; }
  .chapter-list { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .site-footer { padding-top: 36px; }
  .footer-bottom { flex-direction: column; gap: 8px; }
  .panel-head, .panel-body { padding-left: 16px; padding-right: 16px; }
  .auth-card { padding: 28px 22px; }
  .form-row { grid-template-columns: 1fr; }
  .vip-hero { padding: 36px 26px; }
  .vip-hero h1 { font-size: 26px; }
  .reader-bar .reader-sub { display: none; }
  .reader-bar .bar-btn span { display: none; }
  .reader-main { padding: 10px 8px 40px; }
  .reader-nav .btn { min-width: 0; flex: 1; }
  .paywall { padding: 28px 20px; }
}

@media (max-width: 420px) {
  .search-box { display: none; }
  .logo-text strong { font-size: 16px; }
}
