/* =====================================================================
   快看漫画 · 全新前端设计系统
   粉红品牌语言 / 圆角卡片 / 轻阴影 / 统一间距
   仅重写 UI 层，所有控制器数据绑定与 JS 钩子保持不变
   ===================================================================== */

/* ---------- 设计令牌 ---------- */
:root {
  --pink:        #ff4e6a;
  --primary:     #ff4e6a; /* 兼容旧模板内联色值 */
  --text:        #20232e; /* 兼容旧模板内联色值 */
  --pink-2:      #ff7a95;
  --pink-deep:   #e63950;
  --pink-soft:   #fff1f4;
  --pink-tint:   #fff6f8;
  --brand-grad:  linear-gradient(135deg, #ff8aa0 0%, #ff4e6a 55%, #ff3d63 100%);
  --brand-grad-2:linear-gradient(135deg, #ffb3c1 0%, #ff7a95 100%);

  --ink:    #20232e;
  --ink-2:  #4a4f5e;
  --muted:  #9399a6;
  --line:   #f0f1f5;
  --line-2: #e7e9ef;
  --bg:     #ffffff;
  --bg-soft:#fafbfc;
  --bg-pink:#fff7f9;

  --gold:   #ffb020;
  --green:  #2bb673;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 6px 22px rgba(31,34,51,.07);
  --shadow-lg: 0 14px 40px rgba(255,78,106,.16);
  --wrap: 1200px;
  --header-h: 66px;
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; transition: color .15s; }
a:hover { color: var(--pink); }
img { display: block; max-width: 100%; }
h1,h2,h3,h4 { margin: 0; font-weight: 700; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 18px; }
.main { min-height: 60vh; padding: 22px 0 40px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--line-2); background: #fff; color: var(--ink-2);
  font-size: 14px; cursor: pointer; white-space: nowrap;
  transition: .18s transform, .18s box-shadow, .18s background, .18s border-color;
}
.btn:hover { transform: translateY(-1px); color: var(--ink); }
.btn-sm { height: 32px; padding: 0 13px; font-size: 13px; }
.btn-lg { height: 46px; padding: 0 26px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-primary {
  background: var(--brand-grad); border-color: transparent; color: #fff;
  box-shadow: 0 6px 16px rgba(255,78,106,.32);
}
.btn-primary:hover { color: #fff; box-shadow: 0 10px 24px rgba(255,78,106,.42); }
.btn-vip { background: linear-gradient(135deg, #ffb14e, #ff7a00); border-color: transparent; color: #fff; box-shadow: 0 6px 16px rgba(255,122,0,.32); }
.btn-vip:hover { color: #fff; }
.btn-ghost { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.5); color: #fff; }

/* ---------- 标签 / 角标 ---------- */
.tag {
  display: inline-block; padding: 1px 8px; border-radius: 6px;
  font-size: 12px; font-weight: 600; line-height: 1.7;
}
.tag-free   { background: #eafaf1; color: var(--green); }
.tag-vip    { background: #fff0e8; color: #ff7a00; }
.tag-ticket { background: #fff4e0; color: #d98a00; }
.tag-coin   { background: var(--pink-soft); color: var(--pink-deep); }

/* ---------- 顶部导航 ---------- */
.kk-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.kk-header .wrap { display: flex; align-items: center; height: var(--header-h); gap: 22px; }
.kk-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 18px; font-weight: 800; color: var(--ink);
  flex: 0 1 auto; min-width: 0;
}
.kk-logo__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kk-logo .mark {
  width: 34px; height: 34px; border-radius: 11px; background: var(--brand-grad);
  display: grid; place-items: center; color: #fff; font-size: 18px; flex: none;
  box-shadow: 0 6px 14px rgba(255,78,106,.4);
}
.kk-nav { display: flex; align-items: center; gap: 4px; flex: none; }
.kk-nav a {
  position: relative; padding: 8px 13px; border-radius: 999px;
  font-size: 15px; color: var(--ink-2); font-weight: 500;
}
.kk-nav a:hover { background: var(--pink-soft); color: var(--pink); }
.kk-nav a.on { color: var(--pink); font-weight: 700; }
.kk-nav a.on::after {
  content: ""; position: absolute; left: 50%; bottom: -2px; transform: translateX(-50%);
  width: 18px; height: 3px; border-radius: 3px; background: var(--pink);
}
.kk-nav .has-menu { display: inline-flex; align-items: center; }
.kk-sub {
  position: absolute; top: 100%; left: 0; min-width: 150px; padding: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: .18s; display: flex; flex-direction: column;
}
.kk-nav .has-menu:hover .kk-sub { opacity: 1; visibility: visible; transform: none; }
.kk-sub a { padding: 8px 12px; border-radius: 8px; font-size: 14px; }
.kk-sub a:hover { background: var(--pink-soft); }

.kk-head-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.kk-search {
  display: flex; align-items: center; background: var(--bg-soft);
  border: 1px solid var(--line-2); border-radius: 999px; padding: 0 6px 0 14px;
  height: 40px; transition: .2s border-color, .2s box-shadow;
}
.kk-search:focus-within { border-color: var(--pink); box-shadow: 0 0 0 3px var(--pink-soft); }
.kk-search input { border: 0; outline: 0; background: transparent; height: 100%; width: 190px; font-size: 14px; }
.kk-search button { border: 0; background: var(--brand-grad); color: #fff; height: 30px; padding: 0 16px; border-radius: 999px; cursor: pointer; font-size: 14px; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; }

.kk-user { display: flex; align-items: center; gap: 10px; }
.kk-greet { font-size: 13px; color: var(--muted); }
.kk-asset {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px;
  background: var(--pink-soft); border-radius: 999px; font-size: 13px; color: var(--pink-deep); font-weight: 600;
}
.kk-avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--brand-grad-2);
  color: #fff; display: grid; place-items: center; font-weight: 700; cursor: pointer; flex: none;
  box-shadow: 0 4px 10px rgba(255,122,149,.4);
}
.kk-dd { position: relative; }
.kk-dd.open .kk-dd-menu { opacity: 1; visibility: visible; transform: none; }
.kk-dd-menu {
  position: absolute; top: calc(100% + 10px); right: 0; min-width: 168px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
  padding: 8px; opacity: 0; visibility: hidden; transform: translateY(6px); transition: .18s; z-index: 30;
}
.kk-dd-menu a { display: block; padding: 9px 12px; border-radius: 9px; font-size: 14px; color: var(--ink-2); }
.kk-dd-menu a:hover { background: var(--pink-soft); color: var(--pink); }
.kk-dd-sep { height: 1px; background: var(--line); margin: 6px 4px; }

/* ---------- 页脚 ---------- */
.kk-footer { background: #1f1c24; color: #c9c5d0; margin-top: 50px; padding: 46px 0 26px; }
.kk-footer .grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; }
.kk-footer h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.kk-footer p { font-size: 13px; line-height: 1.8; }
.kk-footer a { display: block; font-size: 13px; color: #a9a4b3; padding: 4px 0; }
.kk-footer a:hover { color: #fff; }
.kk-footer .brand-row { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 20px; font-weight: 800; margin-bottom: 12px; }
.kk-footer .brand-row .mark { width: 30px; height: 30px; border-radius: 9px; background: var(--brand-grad); display: grid; place-items: center; font-size: 16px; }
.kk-footer .qual { border-top: 1px solid rgba(255,255,255,.1); margin-top: 28px; padding-top: 18px; font-size: 12px; color: #8d8896; text-align: center; }
.kk-footer .copy { margin-top: 10px; font-size: 12px; color: #6f6a78; text-align: center; }
.kk-footer .contact { margin-top: 18px; font-size: 13px; color: #a9a4b3; text-align: center; }

/* ---------- 漫画卡片 ---------- */
.mh-grid { display: grid; gap: 16px; grid-template-columns: repeat(6, 1fr); }
.mh-grid.cols-5 { grid-template-columns: repeat(5, 1fr); }
.mh-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .mh-grid, .mh-grid.cols-5 { grid-template-columns: repeat(4, 1fr); } .mh-grid.cols-4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px)  { .mh-grid, .mh-grid.cols-5, .mh-grid.cols-4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px)  { .mh-grid, .mh-grid.cols-5, .mh-grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }

.mh-card { display: block; border-radius: var(--radius); overflow: hidden; background: #fff; transition: .2s transform, .2s box-shadow; }
.mh-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.mh-card__cover {
  position: relative; aspect-ratio: 3 / 4; border-radius: var(--radius);
  background: var(--brand-grad-2); overflow: hidden;
}
.mh-card__cover::after {
  content: "📖"; position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 30px; opacity: .35; color: #fff;
}
.mh-card__cover img { position: relative; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.mh-card__cover img.img-broken { display: none; }
.mh-card__badge {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff;
  background: rgba(0,0,0,.32); backdrop-filter: blur(2px);
}
.mh-card__badge.free   { background: rgba(43,182,115,.92); }
.mh-card__badge.vip    { background: rgba(255,122,0,.95); }
.mh-card__badge.ticket { background: rgba(217,138,0,.95); }
.mh-card__badge.coin   { background: rgba(255,78,106,.95); }
.mh-card__body { padding: 9px 2px 2px; }
.mh-card__title {
  font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.mh-card:hover .mh-card__title { color: var(--pink); }
.mh-card__meta { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; font-size: 12px; color: var(--muted); }
.mh-card__meta .views::before { content: "👁 "; }

/* ---------- 区块标题 ---------- */
.sec { margin-top: 38px; }
.sec__head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 16px; }
.sec__title { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; }
.sec__title .bar { width: 6px; height: 22px; border-radius: 4px; background: var(--brand-grad); }
.sec__more { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.sec__more:hover { color: var(--pink); }

/* ---------- 首页 Hero ---------- */
.hero { background: var(--brand-grad); padding: 26px 0 30px; color: #fff; margin-top: -22px; }
.hero__inner { display: grid; grid-template-columns: 1fr 360px; gap: 22px; align-items: stretch; }
.hero__stage { position: relative; border-radius: 20px; overflow: hidden; min-height: 320px; box-shadow: var(--shadow-lg); background: rgba(255,255,255,.12); }
.hero__slide { position: absolute; inset: 0; opacity: 0; transition: .6s opacity; display: flex; align-items: flex-end; padding: 26px; }
.hero__slide.on { opacity: 1; }
.hero__slide .cap { background: rgba(0,0,0,.32); backdrop-filter: blur(4px); border-radius: 14px; padding: 14px 18px; max-width: 70%; }
.hero__slide .cap h3 { font-size: 22px; margin-bottom: 6px; }
.hero__slide .cap p { font-size: 13px; opacity: .9; }
.hero__slide .cap a { margin-top: 10px; }
.hero__dots { position: absolute; bottom: 14px; right: 18px; display: flex; gap: 7px; }
.hero__dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.5); cursor: pointer; }
.hero__dots i.on { background: #fff; width: 22px; border-radius: 6px; }
.hero__side { display: flex; flex-direction: column; gap: 14px; }
.hero__panel { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); border-radius: 18px; padding: 18px 20px; flex: 1; }
.hero__panel h4 { font-size: 16px; margin-bottom: 12px; }
.hero__chips { display: flex; flex-wrap: wrap; gap: 9px; }
.hero__chip { background: rgba(255,255,255,.22); color: #fff; padding: 6px 13px; border-radius: 999px; font-size: 13px; transition: .15s; }
.hero__chip:hover { background: #fff; color: var(--pink); }
.hero__rank-mini { display: flex; flex-direction: column; gap: 9px; }
.hero__rank-mini a { display: flex; align-items: center; gap: 10px; color: #fff; }
.hero__rank-mini .no { width: 20px; font-weight: 800; opacity: .85; }
.hero__rank-mini .t { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 分类快捷条 */
.kk-cats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.kk-cats a {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px;
  background: #fff; border: 1px solid var(--line-2); border-radius: 999px; font-size: 14px; color: var(--ink-2);
}
.kk-cats a:hover { border-color: var(--pink); color: var(--pink); background: var(--pink-tint); }

/* ---------- 飙升榜 ---------- */
.rank-cols { display: grid; grid-template-columns: 1fr 320px; gap: 24px; }
.rank-list { display: flex; flex-direction: column; }
.rank-item {
  display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line);
}
.rank-item:last-child { border-bottom: 0; }
.rank-item .no {
  width: 30px; height: 30px; flex: none; border-radius: 9px; display: grid; place-items: center;
  font-weight: 800; font-size: 15px; color: var(--muted); background: var(--bg-soft);
}
.rank-item.top1 .no { background: var(--brand-grad); color: #fff; }
.rank-item.top2 .no { background: #ffd0d9; color: var(--pink-deep); }
.rank-item.top3 .no { background: #ffe6c2; color: #d98a00; }
.rank-item__cover { width: 64px; height: 86px; flex: none; border-radius: 10px; overflow: hidden; background: var(--brand-grad-2); position: relative; }
.rank-item__cover img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }
.rank-item__cover img.img-broken { display: none; }
.rank-item__main { flex: 1; min-width: 0; }
.rank-item__main h4 { font-size: 15px; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.rank-item__main .sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.rank-item__main .upd { font-size: 12px; color: var(--pink); margin-top: 4px; }
.rank-item__hot { flex: none; text-align: right; font-size: 12px; color: var(--muted); }
.rank-item__hot b { display: block; color: var(--pink-deep); font-size: 15px; }

.kk-aside { display: flex; flex-direction: column; gap: 18px; }
.kk-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.kk-box h4 { font-size: 15px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.kk-box .cat-links { display: flex; flex-wrap: wrap; gap: 8px; }
.kk-box .cat-links a { background: var(--bg-soft); border: 1px solid var(--line); padding: 6px 12px; border-radius: 8px; font-size: 13px; color: var(--ink-2); }
.kk-box .cat-links a:hover { border-color: var(--pink); color: var(--pink); }
.kk-box .act-banner { display: block; border-radius: 12px; padding: 18px; color: #fff; background: var(--brand-grad-2); }
.kk-box .act-banner b { font-size: 16px; }
.kk-box .act-banner span { display: block; font-size: 12px; opacity: .9; margin-top: 4px; }

/* ---------- 真香漫 Pick / 编辑精选 ---------- */
.pick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.pick-card {
  position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/10;
  background: var(--brand-grad-2); display: flex; align-items: flex-end;
}
.pick-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.pick-card .mask { position: relative; z-index: 2; width: 100%; padding: 16px; background: linear-gradient(transparent, rgba(0,0,0,.6)); color: #fff; }
.pick-card .mask b { font-size: 16px; }
.pick-card .mask p { font-size: 12px; opacity: .9; margin-top: 3px; }

/* ---------- 综合 TOP ---------- */
.top-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 26px; }
.top-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.top-item .no { width: 26px; font-weight: 800; color: var(--muted); }
.top-item.top1 .no, .top-item.top2 .no, .top-item.top3 .no { color: var(--pink); font-size: 18px; }
.top-item .cv { width: 46px; height: 60px; border-radius: 8px; overflow: hidden; background: var(--brand-grad-2); flex: none; position: relative; }
.top-item .cv img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.top-item .cv img.img-broken { display: none; }
.top-item h4 { font-size: 14px; font-weight: 600; }

/* ---------- 分类页 ---------- */
.cate { display: grid; grid-template-columns: 220px 1fr; gap: 26px; align-items: start; }
.cate__side { position: sticky; top: calc(var(--header-h) + 14px); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; }
.cate__side .grp { padding: 8px; }
.cate__side .grp + .grp { border-top: 1px solid var(--line); }
.cate__side .grp h5 { font-size: 13px; color: var(--muted); margin: 4px 6px 8px; font-weight: 600; }
.cate__side .grp a { display: block; padding: 8px 12px; border-radius: 9px; font-size: 14px; color: var(--ink-2); }
.cate__side .grp a:hover { background: var(--pink-soft); color: var(--pink); }
.cate__side .grp a.on { background: var(--brand-grad); color: #fff; font-weight: 600; }
.cate__bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; align-items: center; }
.cate__bar .lab { color: var(--muted); font-size: 13px; margin-right: 2px; }
.cate__bar a { padding: 6px 14px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.cate__bar a:hover { border-color: var(--pink); color: var(--pink); }
.cate__bar a.on { background: var(--brand-grad); border-color: transparent; color: #fff; }

/* ---------- 排行榜页 ---------- */
.rank-page__tabs { display: flex; gap: 10px; margin-bottom: 20px; }
.rank-page__tabs a {
  padding: 10px 20px; border-radius: 999px; background: #fff; border: 1px solid var(--line-2);
  font-size: 15px; font-weight: 600; color: var(--ink-2);
}
.rank-page__tabs a.on { background: var(--brand-grad); border-color: transparent; color: #fff; box-shadow: 0 6px 16px rgba(255,78,106,.3); }
.rank-page__top3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 24px; }
.rank-page__top3 .card {
  position: relative; border-radius: var(--radius); overflow: hidden; background: #fff;
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.rank-page__top3 .cover { position: relative; aspect-ratio: 3/4; background: var(--brand-grad-2); }
.rank-page__top3 .cover img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }
.rank-page__top3 .cover img.img-broken { display: none; }
.rank-page__top3 .medal {
  position: absolute; top: 0; left: 0; z-index: 2; width: 46px; height: 52px;
  background: var(--brand-grad); color: #fff; font-weight: 800; font-size: 18px;
  display: grid; place-items: center; border-bottom-right-radius: 18px;
}
.rank-page__top3 .info { padding: 12px 14px; }
.rank-page__top3 .info h4 { font-size: 16px; }
.rank-page__top3 .info p { font-size: 12px; color: var(--muted); margin-top: 5px; }

/* ---------- 搜索页 ---------- */
.search-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.search-head h2 { font-size: 20px; }
.search-head .count { color: var(--muted); font-size: 14px; }

/* ---------- 单页（协议 / 帮助 / 关于） ---------- */
.page-article { max-width: 860px; margin: 30px auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 38px; box-shadow: var(--shadow); }
.page-title { font-size: 24px; font-weight: 800; color: var(--ink); }
.page-meta { color: var(--muted); font-size: 13px; margin: 10px 0 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.page-body { white-space: pre-wrap; word-break: break-word; line-height: 1.9; font-size: 15px; color: var(--ink-2); }
.page-body h2 { font-size: 19px; margin: 18px 0 10px; color: var(--ink); }
.page-body h3 { font-size: 16px; margin: 14px 0 8px; color: var(--ink); }
.page-body p { margin: 0 0 12px; }
.page-body ul, .page-body ol { margin: 0 0 12px; padding-left: 22px; }
.page-body li { margin: 4px 0; }
.page-body a { color: var(--pink); text-decoration: underline; }
@media (max-width: 760px) {
  .page-article { padding: 22px 18px; margin: 18px 12px; }
}

/* ---------- 详情页 ---------- */
.detail { display: grid; grid-template-columns: 280px 1fr; gap: 30px; align-items: start; }
.detail__cover { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--brand-grad-2); aspect-ratio: 3/4; }
.detail__cover img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }
.detail__cover img.img-broken { display: none; }
.detail__title { font-size: 26px; font-weight: 800; }
.detail__metas { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 14px 0; color: var(--ink-2); font-size: 14px; }
.detail__tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.detail__intro { color: var(--ink-2); line-height: 1.9; background: var(--bg-soft); border-radius: 14px; padding: 16px; }
.detail__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0; }
.detail__stats { display: flex; gap: 14px; flex-wrap: wrap; margin: 18px 0; }
.detail__stats .st { flex: 1; min-width: 90px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; text-align: center; }
.detail__stats .st b { display: block; font-size: 20px; color: var(--pink-deep); }
.detail__stats .st span { font-size: 12px; color: var(--muted); }
.detail__charge { background: var(--pink-tint); border: 1px solid #ffd9e0; border-radius: 14px; padding: 14px 16px; font-size: 13px; color: var(--ink-2); line-height: 1.8; }
.detail__owner-note { border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; font-size: 13px; }

.chapter-head { display: flex; justify-content: space-between; align-items: center; margin: 30px 0 14px; }
.chapter-head h3 { font-size: 18px; }
.chapter-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.chapter-grid a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: 14px; transition: .15s;
}
.chapter-grid a:hover { border-color: var(--pink); color: var(--pink); transform: translateY(-2px); }
.chapter-grid a.locked { background: var(--bg-soft); color: var(--muted); }
.chapter-grid a.vip-only { border-color: #ffb88c; background: #fff7f0; }
.chapter-grid a.vip-only .p { color: #ff7a00; font-weight: 600; }
.chapter-grid .p { font-size: 12px; color: var(--muted); flex: none; }
.chapter-grid .ch-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.comment-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.comment-form textarea { width: 100%; height: 84px; border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; font-family: inherit; resize: vertical; outline: none; }
.comment-form textarea:focus { border-color: var(--pink); box-shadow: 0 0 0 3px var(--pink-soft); }
.comment-item { padding: 14px 0; border-top: 1px solid var(--line); }
.comment-item .nm { font-weight: 600; }
.comment-item .tm { color: var(--muted); font-weight: 400; font-size: 12px; margin-left: 8px; }
.comment-item .ct { color: var(--ink-2); margin-top: 5px; }

/* ---------- 阅读页 ---------- */
.reader-bar {
  position: sticky; top: var(--header-h); z-index: 50; background: #fff; border-bottom: 1px solid var(--line);
}
.reader-bar .wrap { display: flex; align-items: center; gap: 12px; height: 52px; }
.reader-bar .t { font-weight: 600; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reader-bar .right { display: flex; gap: 8px; }
.reader { background: var(--bg-soft); padding: 24px 0; }
.reader__pages { max-width: 880px; margin: 0 auto; display: flex; flex-direction: column; gap: 0; }
.reader__pages img { width: 100%; border-radius: 6px; box-shadow: var(--shadow); }
.reader-page { position: relative; }
.reader-page__fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 85px; pointer-events: none;
  background: #fff;
}
.reader__nav { display: flex; justify-content: center; gap: 12px; padding: 22px 0 6px; }
.paywall { position: relative; min-height: 460px; overflow: hidden; border-radius: 6px; }
.paywall .pay-mask {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px; padding: 30px 20px;
  text-align: center;
  background: linear-gradient(rgba(255,255,255,.4) 0%, rgba(255,255,255,.96) 42%, #fff 100%);
}
.pay-mask .cover-mini { width: 90px; height: 120px; margin: 0 auto 12px; border-radius: 12px; overflow: hidden; background: var(--brand-grad-2); box-shadow: var(--shadow); }
.pay-mask .cover-mini img { width: 100%; height: 100%; object-fit: cover; }
.pay-mask .price { font-size: 22px; font-weight: 800; color: var(--pink-deep); margin: 10px 0; }
.pay-mask .price small { font-size: 13px; color: var(--muted); font-weight: 400; }
.pay-mask .balance { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.pay-mask .opts { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.pay-mask .vip-tip { margin-top: 12px; font-size: 12px; color: var(--pink); background: var(--pink-soft); border-radius: 10px; padding: 10px; }

/* ---------- 登录/注册 ---------- */
.auth { min-height: calc(100vh - var(--header-h)); display: grid; grid-template-columns: 1.1fr 1fr; }
.auth__brand { background: var(--brand-grad); color: #fff; display: flex; flex-direction: column; justify-content: center; padding: 60px; position: relative; overflow: hidden; }
.auth__brand::after { content: "📚"; position: absolute; right: -30px; bottom: -40px; font-size: 280px; opacity: .12; }
.auth__brand h1 { font-size: 40px; font-weight: 800; line-height: 1.2; }
.auth__brand p { font-size: 16px; opacity: .92; margin-top: 18px; max-width: 360px; }
.auth__brand .points { margin-top: 30px; display: flex; flex-direction: column; gap: 14px; }
.auth__brand .points div { display: flex; align-items: center; gap: 12px; font-size: 15px; }
.auth__brand .points .ic { width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,.2); display: grid; place-items: center; font-size: 20px; }
.auth__form { display: flex; align-items: center; justify-content: center; padding: 40px; background: #fff; }
.auth__box { width: 100%; max-width: 380px; }
.auth__box h2 { font-size: 26px; }
.auth__box .sub { color: var(--muted); margin: 8px 0 26px; }
.auth__box .link { margin-top: 18px; text-align: center; color: var(--muted); font-size: 14px; }
.auth__box .link a { color: var(--pink); font-weight: 600; }
.auth__demo { margin-top: 20px; background: var(--bg-soft); border-radius: 12px; padding: 12px 14px; font-size: 12px; color: var(--muted); }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth__brand { display: none; } }

/* ---------- 表单 ---------- */
.form-item { margin-bottom: 16px; }
.form-item label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 7px; font-weight: 600; }
.form-item input, .form-item select, .form-item textarea {
  width: 100%; height: 44px; border: 1px solid var(--line-2); border-radius: 12px; padding: 0 14px;
  font-size: 14px; outline: none; background: #fff; transition: .15s; font-family: inherit;
}
.form-item textarea { height: auto; padding: 12px 14px; resize: vertical; }
.form-item input:focus, .form-item select:focus, .form-item textarea:focus { border-color: var(--pink); box-shadow: 0 0 0 3px var(--pink-soft); }

/* ---------- 会员 / 充值 ---------- */
.pay-hero { background: var(--brand-grad); color: #fff; border-radius: var(--radius); padding: 30px; text-align: center; margin-bottom: 22px; }
.pay-hero h2 { font-size: 24px; }
.pay-hero p { opacity: .92; margin-top: 8px; }
.plan-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.plan-item {
  position: relative; border: 1.5px solid var(--line-2); border-radius: var(--radius); padding: 22px 16px; text-align: center;
  cursor: pointer; background: #fff; transition: .18s; overflow: hidden;
}
.plan-item:hover { border-color: var(--pink-2); transform: translateY(-3px); }
.plan-item.on { border-color: var(--pink); box-shadow: 0 10px 28px rgba(255,78,106,.18); background: var(--pink-tint); }
.plan-item .corner { position: absolute; top: 12px; right: -30px; transform: rotate(45deg); background: var(--pink); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 34px; }
.plan-item .name { font-size: 15px; color: var(--ink-2); }
.plan-item .coin { font-size: 26px; font-weight: 800; color: var(--pink-deep); margin: 8px 0; }
.plan-item .give { font-size: 12px; color: var(--green); margin: 2px 0; }
.plan-item .price { font-size: 20px; font-weight: 700; margin-top: 8px; }
.pay-types { display: flex; gap: 12px; margin-bottom: 18px; }
.pay-type { border: 1.5px solid var(--line-2); border-radius: 12px; padding: 12px 20px; cursor: pointer; font-size: 15px; background: #fff; }
.pay-type.on { border-color: var(--pink); background: var(--pink-tint); color: var(--pink); font-weight: 600; }

/* ---------- 个人中心 / 作者中心 ---------- */
.uc-wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 18px; display: grid; grid-template-columns: 230px 1fr; gap: 26px; align-items: start; }
.uc-menu { position: sticky; top: calc(var(--header-h) + 14px); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.uc-menu a { display: block; padding: 11px 14px; border-radius: 10px; font-size: 14px; color: var(--ink-2); }
.uc-menu a:hover { background: var(--pink-soft); color: var(--pink); }
.uc-menu a.on { background: var(--brand-grad); color: #fff; font-weight: 600; }
.uc-main { min-width: 0; }
.uc-hero { display: flex; align-items: center; gap: 20px; background: var(--brand-grad); color: #fff; border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-lg); }
.uc-hero .avatar { width: 72px; height: 72px; border-radius: 50%; background: rgba(255,255,255,.25); display: grid; place-items: center; font-size: 26px; font-weight: 700; flex: none; }
.uc-hero h3 { font-size: 22px; }
.uc-hero p { font-size: 13px; opacity: .92; margin-top: 5px; }
.uc-hero .assets { display: flex; gap: 22px; margin-left: auto; }
.uc-hero .assets div { text-align: center; }
.uc-hero .assets b { font-size: 20px; display: block; }
.uc-hero .assets span { font-size: 12px; opacity: .9; }
.uc-hero .info { min-width: 0; }
.uc-hero .badge { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13px; opacity: .95; }
.uc-hero .badge .vip { background: rgba(255,255,255,.22); padding: 2px 10px; border-radius: 999px; font-weight: 700; }
.uc-hero .badge a { color: #fff; text-decoration: underline; }
.uc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 18px 0; }
.uc-stats .st { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; text-align: center; }
.uc-stats .st b { font-size: 22px; color: var(--pink); display: block; }
.uc-stats .st span { font-size: 12px; color: var(--muted); }
.uc-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.uc-card { display: flex; align-items: center; gap: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; }
.uc-card .avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--brand-grad-2); color: #fff; display: grid; place-items: center; font-size: 22px; flex: none; }

.sign-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; margin-bottom: 22px; }
.sign-day { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 6px; text-align: center; }
.sign-day.done { background: var(--brand-grad); color: #fff; border-color: transparent; }
.sign-day b { display: block; font-size: 18px; font-weight: 800; }
.sign-day span { font-size: 12px; opacity: .85; }

/* ---------- 表格 / 空态 / 分页 ---------- */
.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14px; }
.table th { background: var(--bg-soft); font-weight: 600; color: var(--ink-2); font-size: 13px; }
.table tr:last-child td { border-bottom: 0; }
.status { padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.status.ok { background: #eafaf1; color: var(--green); }
.status.no { background: #ffeaea; color: #e34d4d; }
.status.wait { background: #fff4e0; color: #d98a00; }

.empty-box { text-align: center; padding: 50px 20px; color: var(--muted); background: #fff; border: 1px dashed var(--line-2); border-radius: var(--radius); }
.empty-box .ico { font-size: 44px; margin-bottom: 10px; }

.pager { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 24px 0; }
.pager a, .pager span { min-width: 38px; height: 38px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid var(--line-2); background: #fff; font-size: 14px; color: var(--ink-2); }
.pager a:hover { border-color: var(--pink); color: var(--pink); }
.pager .active { background: var(--brand-grad); border-color: transparent; color: #fff; }
.pager .disabled { opacity: .45; }
/* ThinkPHP 分页 ul.pagination 渲染：横向排列，去掉默认列表符号与缩进 */
.pager .pagination { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.pager .pagination li { list-style: none; margin: 0; padding: 0; }
.pager .pagination li.active { background: none; border: 0; }
.pager .pagination li.active span, .pager .pagination li.active a { background: var(--brand-grad); border-color: transparent; color: #fff; }
.pager .pagination li.disabled span { opacity: .45; }

.tabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.tabs a { padding: 8px 16px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.tabs a.on { background: var(--brand-grad); border-color: transparent; color: #fff; font-weight: 600; }

/* ---------- Toast / Modal ---------- */
.toast { position: fixed; left: 50%; top: 80px; transform: translateX(-50%) translateY(-10px); background: rgba(31,34,51,.92); color: #fff; padding: 10px 20px; border-radius: 999px; font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; z-index: 999; }
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 900; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal .box { background: #fff; border-radius: 18px; padding: 28px; width: 100%; max-width: 420px; text-align: center; box-shadow: var(--shadow-lg); }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; }
  .rank-cols, .detail, .cate, .uc { grid-template-columns: 1fr; }
  .cate__side, .uc__nav { position: static; }
  .kk-footer .grid { grid-template-columns: 1fr 1fr; }
  .pick-grid, .top-list, .plan-grid, .chapter-grid { grid-template-columns: repeat(2, 1fr); }
  .uc-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .kk-nav { display: none; }
  .kk-search input { width: 110px; }
  .kk-greet { display: none; }
  .uc-hero { flex-wrap: wrap; }
  .uc-hero .assets { margin-left: 0; width: 100%; justify-content: space-between; gap: 8px; }
}
