/* =========================================================================
   动漫大全 · 视觉系统 v2
   参考香蕉漫画的「内容门户」版式：灰白底 + 通栏白卡 + 4px 黄边 + 深蓝英雄条
   ========================================================================= */

:root {
  --banana: #f9c928;
  --banana-400: #f9c928;
  --banana-500: #e9b617;
  --banana-700: #9a6500;
  --banana-100: #fff0aa;
  --banana-50: #fff9df;
  --coral: #ef5b42;
  --ink: #18212f;
  --navy: #243a55;
  --slate-50: #f6f7f9;
  --slate-100: #eef1f5;
  --slate-500: #64748b;
  --slate-700: #334155;
  --white: #ffffff;
  --line: #dbe1ea;
  --line-strong: #c3cbd6;
  --shadow-card: 0 12px 28px -14px rgba(33, 45, 61, .55);
  --shadow-soft: 0 6px 18px -12px rgba(33, 45, 61, .4);
  --radius: 16px;
  --radius-sm: 12px;
  --maxw: 1280px;
  --head-h: 68px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

html[data-theme="dark"] {
  --slate-50: #12161d;
  --slate-100: #171c25;
  --white: #1b212b;
  --ink: #f3f6fa;
  --slate-500: #9aa6b6;
  --slate-700: #cdd6e1;
  --line: #2a3240;
  --line-strong: #3a4557;
  --navy: #16263a;
  --banana-50: #2a2410;
  --banana-100: #3a3115;
  --banana-700: #f9c928;
  --shadow-card: 0 14px 30px -16px rgba(0, 0, 0, .8);
  --shadow-soft: 0 8px 20px -14px rgba(0, 0, 0, .7);
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  background: var(--slate-50);
  color: var(--ink);
  font-family: "PingFang SC", "HarmonyOS Sans SC", "Noto Sans SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { font: inherit; }
svg { width: 20px; height: 20px; fill: currentColor; }
::selection { background: var(--banana-100); color: var(--ink); }

/* ---------- 页头：白底 + 4px 黄边 ---------- */
.site-head {
  position: sticky; top: 0; z-index: 60;
  background: var(--white);
  border-bottom: 4px solid var(--banana);
}
.site-head__inner { max-width: var(--maxw); margin: 0 auto; height: var(--head-h); display: flex; align-items: center; gap: 22px; padding: 0 20px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand__mark {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--banana); color: var(--ink); font-weight: 900; font-size: 20px;
}
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__text strong { font-size: 19px; font-weight: 900; letter-spacing: .2px; }
.brand__text small { font-size: 10px; letter-spacing: 2.8px; color: var(--slate-500); font-weight: 700; }

.nav { display: flex; gap: 22px; margin-left: 10px; }
.nav a { font-size: 14.5px; font-weight: 700; color: var(--slate-700); }
.nav a:hover, .nav a.is-active { color: var(--banana-700); }
html[data-theme="dark"] .nav a.is-active { color: var(--banana); }

.head-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.head-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 12px;
  border: 2px solid var(--ink); font-size: 13.5px; font-weight: 800; color: var(--ink); background: var(--white);
  transition: background .18s, transform .18s;
}
.head-btn:hover { background: var(--banana-100); transform: translateY(-1px); }
.head-search {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 12px;
  background: var(--ink); color: var(--white); font-size: 13.5px; font-weight: 700;
  transition: background .18s, transform .18s;
}
.head-search:hover { background: var(--slate-700); transform: translateY(-1px); }
.head-search kbd { padding: 1px 6px; border-radius: 6px; border: 1px solid rgba(255,255,255,.35); font-size: 11px; opacity: .8; }
.head-search svg { width: 17px; height: 17px; }
.theme-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; border: 2px solid var(--line-strong); color: var(--slate-700); background: var(--white); }
.theme-btn:hover { border-color: var(--ink); }
.icon-sun { display: none; }
html[data-theme="dark"] .icon-moon { display: none; }
html[data-theme="dark"] .icon-sun { display: block; }
.progress-bar { position: absolute; left: 0; bottom: -4px; height: 4px; width: 0; background: var(--coral); }

/* ---------- 布局 ---------- */
.view { position: relative; max-width: none; padding: 0 0 90px; }
.section { max-width: var(--maxw); margin: 0 auto; padding: 34px 20px 0; }
.section--tight { padding-top: 26px; }
.section-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.section-head__eyebrow { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .12em; color: var(--banana-700); text-transform: uppercase; }
.section-head h2 { margin: 2px 0 0; font-size: 30px; line-height: 1.15; font-weight: 900; letter-spacing: -.4px; }
.section-head__more { margin-left: auto; font-size: 13.5px; font-weight: 800; color: var(--banana-700); }
.section-head__more:hover { text-decoration: underline; }
.section--banana { background: var(--banana-50); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding-bottom: 34px; margin-top: 34px; }
html[data-theme="dark"] .section--banana { border-color: var(--line); }

.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  padding: 7px 14px; border-radius: 999px; border: 2px solid var(--line-strong); background: var(--white);
  color: var(--slate-700); font-size: 13px; font-weight: 700; white-space: nowrap; transition: all .16s var(--ease);
}
.pill:hover { border-color: var(--banana-500); color: var(--ink); }
.pill.is-active { background: var(--banana); border-color: var(--banana); color: var(--ink); }
.pill b { opacity: .55; font-weight: 700; }
.pill--ghost { background: transparent; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 12px; font-weight: 800; font-size: 14.5px;
  border: 2px solid var(--line-strong); background: var(--white); color: var(--ink);
  transition: transform .16s var(--ease), border-color .16s, background .16s;
}
.btn:hover { transform: translateY(-2px); border-color: var(--ink); }
.btn svg { width: 18px; height: 18px; }
.btn--ink { background: var(--ink); border-color: var(--ink); color: var(--white); }
.btn--ink:hover { background: var(--slate-700); }
.btn--banana { background: var(--banana); border-color: var(--banana); color: var(--ink); box-shadow: 0 10px 22px -12px var(--banana-500); }
.btn--ghost { background: transparent; }
.btn--sm { padding: 8px 14px; border-radius: 10px; font-size: 13px; }
.btn.is-on { border-color: var(--coral); color: var(--coral); background: color-mix(in srgb, var(--coral) 8%, var(--white)); }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ---------- 英雄条：深蓝 + 12px 黄底 ---------- */
.hero-band { background: var(--navy); border-bottom: 12px solid var(--banana); color: #fff; }
.hero-band__inner { max-width: var(--maxw); margin: 0 auto; padding: 38px 20px 44px; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 36px; align-items: center; }
.hero-band__eyebrow { margin: 0 0 10px; font-size: 12px; font-weight: 800; letter-spacing: .16em; color: var(--banana); text-transform: uppercase; }
.hero-band h1 { margin: 0 0 10px; font-size: clamp(28px, 3.4vw, 44px); line-height: 1.1; font-weight: 900; letter-spacing: -.6px; color: #fff; }
.hero-band__sub { margin: 0 0 20px; color: #c8d6e5; font-size: 14.5px; }
.hero-search { display: flex; gap: 8px; max-width: 560px; margin-bottom: 16px; }
.hero-search input {
  flex: 1; min-width: 0; padding: 14px 18px; border-radius: 12px; border: 0; outline: none;
  font-size: 15px; color: var(--ink); background: #fff;
}
.hero-search button { padding: 0 22px; border-radius: 12px; background: var(--banana); color: var(--ink); font-weight: 900; font-size: 14.5px; }
.hero-search button:hover { background: var(--banana-500); }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hero-tags span { font-size: 12.5px; color: #a9bbcd; margin-right: 2px; }
.hero-tags a {
  padding: 5px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.34);
  font-size: 12.5px; font-weight: 700; color: #eaf1f8; background: rgba(255,255,255,.06);
}
.hero-tags a:hover { background: var(--banana); border-color: var(--banana); color: var(--ink); }
.hero-figures { position: relative; display: flex; justify-content: flex-end; gap: 12px; }
.hero-figure {
  position: relative; width: 108px; border-radius: 14px; overflow: hidden;
  border: 3px solid #fff; box-shadow: 0 16px 30px -14px rgba(0,0,0,.6); transform: rotate(3deg);
}
.hero-figure:nth-child(2) { transform: rotate(-2deg) translateY(-14px); }
.hero-figure:nth-child(3) { transform: rotate(1.5deg) translateY(8px); }
.hero-figure img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.hero-figure__tag { position: absolute; left: 6px; top: 6px; padding: 2px 7px; border-radius: 6px; background: var(--banana); color: var(--ink); font-size: 10px; font-weight: 900; }

/* ---------- 分类瓷砖 ---------- */
.cat-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.cat-tile {
  position: relative; padding: 18px 16px; border-radius: 14px; color: #fff; min-height: 104px;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: var(--shadow-card); transition: transform .18s var(--ease);
}
.cat-tile:hover { transform: translateY(-4px) rotate(-1deg); }
.cat-tile__icon { font-size: 22px; line-height: 1; }
.cat-tile__name { font-size: 17px; font-weight: 900; margin-top: 10px; }
.cat-tile__count { font-size: 12px; opacity: .85; }
html[data-theme="dark"] .cat-tile { color: #fff; }

/* ---------- 卡片（白底 + 灰影，标题在下方） ---------- */
.grid { display: grid; gap: 22px 16px; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); }
.card { position: relative; display: block; }
.card__cover {
  position: relative; display: block; border-radius: 14px; overflow: hidden;
  aspect-ratio: 3/4; background: var(--slate-100); box-shadow: var(--shadow-card);
  border: 1px solid var(--line); transition: transform .25s var(--ease), box-shadow .25s;
}
.card:hover .card__cover { transform: translateY(-4px); box-shadow: 0 18px 34px -16px rgba(33,45,61,.6); }
.card__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card__cover img { transform: scale(1.05); }
.card__top {
  position: absolute; left: 8px; top: 8px; padding: 2px 8px; border-radius: 6px;
  background: #fff; color: var(--coral); font-size: 11px; font-weight: 900;
}
.card__top--hot { background: var(--banana); color: var(--ink); }
.card__fav {
  position: absolute; right: 8px; top: 8px; width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center; background: rgba(255,255,255,.88); color: var(--ink);
  opacity: 0; transform: translateY(-4px); transition: all .2s var(--ease);
}
.card:hover .card__fav, .card__fav.is-on { opacity: 1; transform: none; }
.card__fav.is-on { color: var(--coral); }
.card__fav svg { width: 16px; height: 16px; }
.card__progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(24,33,47,.14); }
.card__progress i { display: block; height: 100%; background: var(--banana); }
.card__title { margin: 10px 2px 2px; font-size: 15px; font-weight: 900; line-height: 1.35; min-height: 40px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__meta { margin: 0; font-size: 12.5px; color: var(--slate-500); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.card__meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

.chip { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 800; letter-spacing: .2px; background: var(--banana-100); color: var(--ink); }
.chip--src { background: var(--banana); color: var(--ink); }
.chip--se8 { background: #ffe6bd; color: #8a4b00; }
.chip--jiuer { background: #d7f2e6; color: #0b5f43; }
.chip--jiuyao { background: #ffdcdc; color: #8f2020; }
html[data-theme="dark"] .chip--se8 { background: #4a2f00; color: #ffd8a1; }
html[data-theme="dark"] .chip--jiuer { background: #0d3a2c; color: #a7e8cf; }
html[data-theme="dark"] .chip--jiuyao { background: #451417; color: #ffc1c1; }

/* ---------- 双栏：人气榜 + 今日更新 ---------- */
.two-col { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 26px; }
.rank-card { background: var(--white); border-radius: 16px; box-shadow: var(--shadow-card); overflow: hidden; border: 1px solid var(--line); }
.rank-row { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); transition: background .16s; }
.rank-row:last-child { border-bottom: 0; }
.rank-row:hover { background: var(--banana-50); }
.rank-row__no { font-size: 26px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; color: var(--coral); }
.rank-row:nth-child(n+4) .rank-row__no { color: var(--banana-700); font-size: 22px; }
.rank-row__body { min-width: 0; }
.rank-row__body strong { display: block; font-size: 15px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-row__body small { color: var(--slate-500); font-size: 12.5px; }
.rank-row__body small b { color: var(--coral); font-weight: 800; }
.rank-row__arrow { color: var(--coral); font-weight: 900; font-size: 16px; }

.feed { display: grid; gap: 10px; }
.feed-row { display: block; background: var(--white); border-radius: 12px; border-left: 4px solid var(--banana); padding: 12px 16px; box-shadow: var(--shadow-soft); transition: transform .16s var(--ease), box-shadow .16s; }
.feed-row:hover { transform: translateX(3px); box-shadow: var(--shadow-card); }
.feed-row__line { display: flex; align-items: baseline; gap: 8px; }
.feed-row__line b { font-size: 14.5px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-row__chip { margin-left: auto; padding: 1px 8px; border-radius: 6px; background: var(--banana-100); color: var(--ink); font-size: 12px; font-weight: 800; white-space: nowrap; }
.feed-row small { display: block; margin-top: 3px; color: var(--slate-500); font-size: 12.5px; }
.feed-row--coral { border-left-color: var(--coral); }
.feed-row--navy { border-left-color: var(--navy); }
.feed-row--green { border-left-color: #5b8751; }

/* ---------- 筛选面板 ---------- */
.filterbar { background: var(--white); border-radius: 16px; box-shadow: var(--shadow-soft); border: 1px solid var(--line); overflow: hidden; margin-bottom: 24px; }
.filterbar__head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.filterbar__title { font-size: 14px; font-weight: 900; }
.filterbar__count { margin-left: auto; font-size: 13px; color: var(--slate-500); }
.filterbar__reset { height: 30px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: 999px; border: 2px solid var(--line-strong); font-size: 12.5px; font-weight: 700; color: var(--slate-500); }
.filterbar__row { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 10px; padding: 12px 18px; align-items: start; }
.filterbar__row + .filterbar__row { border-top: 1px solid var(--line); }
.filterbar__label { padding-top: 7px; font-size: 12.5px; font-weight: 800; color: var(--slate-500); letter-spacing: .06em; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; justify-self: start; }
.seg a, .seg button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 34px; min-width: 84px;
  padding: 0 14px; border-radius: 10px; border: 2px solid var(--line-strong); background: var(--white);
  font-size: 12.5px; font-weight: 800; color: var(--slate-700); white-space: nowrap;
}
.seg a:hover, .seg button:hover { border-color: var(--banana-500); color: var(--ink); }
.seg .is-active { background: var(--ink); border-color: var(--ink); color: var(--white); }
html[data-theme="dark"] .seg .is-active { background: var(--banana); border-color: var(--banana); color: var(--ink); }
.seg--scroll { flex: 1 1 260px; display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.seg--scroll::-webkit-scrollbar { display: none; }
.seg--scroll button { flex: 0 0 auto; min-width: 0; padding: 0 13px; font-variant-numeric: tabular-nums; }

/* ---------- 详情 ---------- */
.detail { max-width: var(--maxw); margin: 0 auto; padding: 22px 20px 0; }
.breadcrumb { display: flex; gap: 8px; align-items: center; color: var(--slate-500); font-size: 13px; margin-bottom: 16px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--banana-700); }
.detail__hero { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; background: var(--white); border-radius: 18px; box-shadow: var(--shadow-card); border: 1px solid var(--line); padding: 24px; align-items: start; }
.detail__poster { border-radius: 14px; overflow: hidden; border: 5px solid var(--banana); box-shadow: var(--shadow-card); }
.detail__poster img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.detail__info { min-width: 0; }
.detail__info .chip { margin-bottom: 10px; }
.detail__title { margin: 0 0 12px; font-size: clamp(26px, 3vw, 38px); line-height: 1.1; font-weight: 900; letter-spacing: -.5px; }
.detail__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.tag { padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 800; background: var(--slate-100); color: var(--slate-700); border: 1px solid var(--line); }
.tag--accent { background: var(--banana-100); color: var(--ink); border-color: transparent; }
.tag--status { background: transparent; color: #17835d; border-color: #17835d55; }
.tag--status.is-ongoing { color: var(--coral); border-color: #ef5b4255; }
.info-rows { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-bottom: 18px; }
.info-row { border-left: 4px solid var(--banana); background: var(--slate-50); border-radius: 8px; padding: 8px 12px; }
.info-row b { display: block; font-size: 18px; font-weight: 900; font-variant-numeric: tabular-nums; }
.info-row span { font-size: 12px; color: var(--slate-500); }
.detail__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.detail__summary { background: var(--slate-50); border-left: 4px solid var(--banana); border-radius: 8px; padding: 14px 18px; color: var(--slate-700); font-size: 14px; line-height: 1.8; }
.detail__summary h3 { margin: 0 0 6px; font-size: 13.5px; font-weight: 900; color: var(--ink); }

.chapter-card { background: var(--white); border-radius: 16px; box-shadow: var(--shadow-soft); border: 1px solid var(--line); padding: 20px; margin-top: 22px; }
.chapter-card .section-head { margin-bottom: 14px; }
.chapter-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.chapter-jump { display: flex; align-items: center; gap: 6px; }
.chapter-jump input { width: 104px; padding: 8px 11px; border-radius: 10px; font-size: 13px; border: 2px solid var(--line-strong); background: var(--white); color: var(--ink); outline: none; }
.chapter-jump input:focus { border-color: var(--banana); }
.chapter-count { margin-left: auto; font-size: 12.5px; color: var(--slate-500); font-variant-numeric: tabular-nums; }
.chapter-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
.chapter-link { padding: 9px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--slate-50); font-size: 13px; font-weight: 700; text-align: center; color: var(--slate-700); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: all .14s var(--ease); }
.chapter-link:hover { border-color: var(--banana); background: var(--banana-100); color: var(--ink); }
.chapter-link.is-read { color: var(--slate-500); opacity: .65; }

/* ---------- 阅读器 ---------- */
body.reader-mode { background: #0e131a; }
body.reader-mode .site-head, body.reader-mode .footer, body.reader-mode .tabbar { display: none; }
.reader { max-width: 900px; margin: 0 auto; padding: 0 0 90px; }
.reader__bar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: #fff; border-bottom: 4px solid var(--banana); color: var(--ink); }
.reader__bar .icon-btn { border: 2px solid var(--line-strong); background: var(--white); color: var(--ink); }
.reader__title { min-width: 0; flex: 1; }
.reader__title strong { display: block; font-size: 14.5px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reader__title small { color: var(--slate-500); font-size: 12px; }
.reader__bar-progress { position: absolute; left: 0; right: 0; bottom: -4px; height: 4px; background: var(--coral); width: 0; }
.reader__pages { background: #0e131a; }
.reader__page { position: relative; background: #141b24; min-height: 220px; }
.reader__page img { width: 100%; display: block; opacity: 0; transition: opacity .4s var(--ease); }
.reader__page img.is-loaded { opacity: 1; }
.reader__page img.is-error { min-height: 120px; opacity: .3; }
.reader__nav { display: flex; gap: 12px; padding: 22px 16px; background: #0e131a; }
.reader__nav .btn { flex: 1; }
.reader__nav .btn--ghost { color: #cdd6e1; border-color: #3a4557; }
.reader__end { text-align: center; padding: 10px 16px 20px; color: #9aa6b6; font-size: 13px; background: #0e131a; }
.icon-btn { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; border: 2px solid var(--line-strong); background: var(--white); color: var(--ink); }
.icon-btn--ghost { width: auto; padding: 0 12px; font-size: 12px; font-weight: 800; }

.chapter-sheet { position: fixed; inset: 0; z-index: 90; display: grid; align-items: end; }
.chapter-sheet__scrim { position: absolute; inset: 0; background: rgba(12,17,24,.7); backdrop-filter: blur(4px); }
.chapter-sheet__panel { position: relative; max-height: 74vh; overflow: hidden auto; background: var(--white); border-radius: 20px 20px 0 0; border-top: 6px solid var(--banana); padding: 18px 18px 30px; animation: sheetUp .3s var(--ease); }
@keyframes sheetUp { from { transform: translateY(30px); opacity: .4; } }
.sheet__head { display: flex; align-items: center; margin-bottom: 14px; }
.sheet__head strong { font-size: 16px; font-weight: 900; }
.sheet__head button { margin-left: auto; }
.sheet__grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.sheet__grid a { padding: 9px; text-align: center; border-radius: 8px; border: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--slate-700); }
.sheet__grid a.is-current { background: var(--banana); border-color: var(--banana); color: var(--ink); }

/* ---------- 搜索面板 ---------- */
.search-overlay { position: fixed; inset: 0; z-index: 100; }
.search-overlay[hidden] { display: none; }
.search-overlay__scrim { position: absolute; inset: 0; background: rgba(20,28,40,.42); backdrop-filter: blur(5px); animation: fade .2s; }
.search-panel { position: relative; max-width: 660px; margin: 7vh auto 0; border-radius: 16px; overflow: hidden; background: var(--white); border: 1px solid var(--line); border-top: 6px solid var(--banana); box-shadow: 0 30px 60px -30px rgba(20,28,40,.7); animation: pop .24s var(--ease); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(-10px); opacity: 0; } }
.search-panel__head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.search-panel__head svg { color: var(--slate-500); width: 22px; height: 22px; }
.search-panel__head input { flex: 1; border: 0; background: none; outline: none; font-size: 17px; font-weight: 700; color: var(--ink); }
.search-panel__body { max-height: 56vh; overflow-y: auto; padding: 8px; }
.search-panel__foot { display: flex; gap: 18px; padding: 10px 18px; border-top: 1px solid var(--line); color: var(--slate-500); font-size: 12px; }
.search-panel__foot kbd { padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line); font-size: 11px; }
.search-hit { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; position: relative; }
.search-hit:hover, .search-hit.is-active { background: var(--banana-50); }
.search-hit img { width: 42px; height: 56px; border-radius: 8px; object-fit: cover; background: var(--slate-100); }
.search-hit__body { min-width: 0; flex: 1; }
.search-hit__body strong { display: block; font-size: 14.5px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-hit__body small { color: var(--slate-500); font-size: 12.5px; }
.search-group { padding: 10px 12px 4px; font-size: 12px; font-weight: 800; color: var(--slate-500); }
.search-empty { padding: 40px 20px; text-align: center; color: var(--slate-500); }
.search-inline { display: flex; gap: 8px; align-items: center; }
.search-inline input { flex: 1; min-width: 0; padding: 11px 14px; border-radius: 10px; border: 2px solid var(--line-strong); background: var(--white); color: var(--ink); outline: none; }
.search-inline input:focus { border-color: var(--banana); }

/* ---------- 书架 ---------- */
.shelf-tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.shelf-list { display: grid; gap: 10px; }
.shelf-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 12px; background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--banana); box-shadow: var(--shadow-soft); transition: transform .16s var(--ease); }
.shelf-row:hover { transform: translateX(4px); }
.shelf-row__cover { width: 54px; aspect-ratio: 3/4; border-radius: 8px; object-fit: cover; background: var(--slate-100); }
.shelf-row__body { min-width: 0; flex: 1; }
.shelf-row__body strong { display: block; font-size: 14.5px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shelf-row__body small { color: var(--slate-500); font-size: 12.5px; }
.shelf-row__go { font-size: 12.5px; font-weight: 800; color: var(--banana-700); white-space: nowrap; }

.empty { margin: 0 auto; max-width: 720px; padding: 56px 24px; text-align: center; background: var(--white); border: 2px dashed var(--line-strong); border-radius: 16px; color: var(--slate-500); }
.empty h3 { color: var(--ink); font-weight: 900; margin: 12px 0 6px; font-size: 20px; }
.empty p { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

/* ---------- 骨架 / 提示 ---------- */
.skeleton-card .card__cover, .skeleton { background: var(--slate-100); animation: pulse 1.5s infinite ease-in-out; }
.skeleton-line { height: 12px; border-radius: 6px; background: var(--slate-100); animation: pulse 1.5s infinite ease-in-out; }
@keyframes pulse { 50% { opacity: .55; } }
.load-more { display: flex; justify-content: center; margin-top: 26px; }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--banana); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-box { margin: 30px auto; max-width: 640px; padding: 44px 24px; text-align: center; background: var(--white); border-radius: 16px; border-left: 6px solid var(--coral); color: var(--slate-700); }

.toast-stack { position: fixed; left: 50%; bottom: 88px; transform: translateX(-50%); z-index: 200; display: grid; gap: 10px; }
.toast { padding: 11px 18px; border-radius: 10px; background: var(--ink); color: var(--white); font-size: 14px; font-weight: 700; box-shadow: var(--shadow-card); animation: pop .22s var(--ease); }
.toast.is-ok { border-left: 4px solid #17835d; }
.toast.is-err { border-left: 4px solid var(--coral); }

.to-top { position: fixed; right: 20px; bottom: 92px; z-index: 50; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--white); border: 2px solid var(--line-strong); color: var(--ink); box-shadow: var(--shadow-card); }
.to-top:hover { border-color: var(--banana); color: var(--banana-700); }
.to-top[hidden] { display: none; }

/* ---------- 页脚 / 底部导航 ---------- */
.footer { background: var(--white); border-top: 6px solid var(--banana); margin-top: 44px; padding: 34px 20px 100px; }
.footer__inner { max-width: var(--maxw); margin: 0 auto; }
.footer__brand { display: flex; gap: 14px; align-items: flex-start; }
.footer__brand strong { font-size: 15px; font-weight: 900; }
.footer__brand p { margin: 4px 0 0; color: var(--slate-500); font-size: 13px; max-width: 560px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 18px; margin: 20px 0 12px; color: var(--slate-700); font-size: 13.5px; font-weight: 700; }
.footer__links a:hover { color: var(--banana-700); }
.footer__note { color: var(--slate-500); font-size: 12px; margin: 6px 0 0; }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; display: none; grid-template-columns: repeat(5, 1fr); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: var(--white); border-top: 4px solid var(--banana); }
.tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 0; color: var(--slate-500); font-size: 11px; font-weight: 700; }
.tabbar svg { width: 21px; height: 21px; }
.tabbar .is-active { color: var(--ink); }
html[data-theme="dark"] .tabbar .is-active { color: var(--banana); }

.page-head { max-width: var(--maxw); margin: 0 auto; padding: 26px 20px 0; }
.page-head h1 { margin: 0 0 6px; font-size: clamp(26px, 3vw, 34px); font-weight: 900; letter-spacing: -.5px; }
.page-head p { margin: 0; color: var(--slate-500); font-size: 14px; }

@media (max-width: 1100px) {
  .cat-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-band__inner { grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; }
  .hero-figure { width: 92px; }
}

@media (max-width: 860px) {
  :root { --head-h: 60px; }
  .nav { display: none; }
  .head-btn { display: none; }
  .head-search { padding: 9px 13px; }
  .head-search .head-search__label { display: none; }
  .tabbar { display: grid; }
  .to-top { bottom: 84px; right: 14px; }
  .hero-band__inner { grid-template-columns: 1fr; padding: 26px 16px 32px; }
  .hero-band h1 { font-size: 26px; }
  .hero-figures { justify-content: flex-start; margin-top: 6px; }
  .hero-figure { width: 84px; }
  .hero-figure:nth-child(2) { transform: rotate(-2deg) translateY(-8px); }
  .section { padding: 26px 14px 0; }
  .section-head h2 { font-size: 23px; }
  .cat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cat-tile { min-height: 88px; padding: 14px; }
  .cat-tile__name { font-size: 15px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 16px 10px; }
  .card__title { font-size: 13px; min-height: 36px; }
  .two-col { grid-template-columns: 1fr; gap: 22px; }
  .rank-row { padding: 12px 14px; grid-template-columns: 38px minmax(0, 1fr) auto; }
  .detail { padding: 16px 14px 0; }
  .detail__hero { grid-template-columns: 104px minmax(0, 1fr); gap: 12px; padding: 14px; }
  .detail__title { font-size: 21px; }
  .detail__tags { gap: 5px; margin-bottom: 10px; }
  .tag { font-size: 11px; padding: 3px 8px; }
  .info-rows { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 6px; }
  .info-row { padding: 7px 9px; }
  .info-row b { font-size: 15px; }
  .info-row span { font-size: 11px; }
  .detail__actions { gap: 8px; margin-top: 2px; }
  .detail__actions .btn { padding: 9px 12px; font-size: 13px; }
  .detail__actions .btn--ink { flex: 1 1 100%; }
  .detail__actions .btn:not(.btn--ink) { flex: 1 1 0; }
  .detail__summary { padding: 12px 14px; font-size: 13px; }
  .chapter-card { padding: 14px; margin-top: 16px; }
  .chapter-jump input { width: 92px; }
  .chapter-grid { gap: 6px; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
  .chapter-link { padding: 8px 6px; font-size: 12.5px; }
  .footer { padding-bottom: 120px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
