/* 繁简同源字体：思源宋体/黑体的 SC+TC 网络字体（Google Fonts 国内镜像）。
   两种语言渲染同一套字形 → 字号观感一致；加载失败回落系统字体则繁简略有大小差。 */
@import url("https://fonts.loli.net/css2?family=Noto+Sans+SC:wght@400;700;900&family=Noto+Sans+TC:wght@400;700;900&family=Noto+Serif+SC:wght@400;700;900&family=Noto+Serif+TC:wght@400;700;900&display=swap");
/* 书目站 · 共享样式 —— 首页/榜单/分类书库 三页共用 */
:root {
  color-scheme: light dark;
  --bg: #f4f5f6; --surface: #ffffff; --surface-2: #e9ecef;
  --ink: #121416; --muted: #555d64; --line: #c8cdd1; --strong-line: #202428;
  --accent: #e94f24; --accent-soft: #ffe2d8; --chip: #e3e6e8;
  --gold: #c8a45e;
  /* 简体优先 SC 字形；繁体页(html lang=zh-Hant)改用 TC 字形 */
  --serif: "Noto Serif SC", "Noto Serif TC", serif;
  --sans: "Noto Sans SC", "Noto Sans TC", sans-serif;
}
:lang(zh-Hant) {
  --serif: "Noto Serif TC", "Noto Serif SC", serif;
  --sans: "Noto Sans TC", "Noto Sans SC", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0f10; --surface: #15191c; --surface-2: #20262a;
    --ink: #f4f6f7; --muted: #b3bbc1; --line: #343b40; --strong-line: #e2e7ea;
    --accent: #ff744d; --accent-soft: #4a251c; --chip: #242a2e;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 0; background: var(--bg); color: var(--ink); overflow-x: clip;
  font-family: var(--sans, "Noto Sans SC", sans-serif); line-height: 1.6; text-rendering: optimizeLegibility; }
a { color: inherit; }
button, input { font: inherit; }
button { color: inherit; }
/* 移动端：去掉点按灰闪；touch-action 消除 300ms 点击延迟 */
a, button, input, select, textarea { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.wrap { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

/* —— 顶部站点菜单条（吸顶毛玻璃，三页一致） —— */
.sitebar { position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line); }
.sitebar::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent) 18%, var(--accent) 82%, transparent);
  opacity: .85; }
.sitebar .wrap { display: flex; justify-content: space-between; align-items: center; height: 48px; }
.sitebar .brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; }
.sitebar .logo-badge { position: relative; width: 27px; height: 27px; border-radius: 8px;
  background: linear-gradient(135deg, #ff8a5c 0%, var(--accent) 55%, #c93a15 100%);
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--serif,"Noto Serif SC",serif); font-weight: 900; font-size: 15px; line-height: 1;
  box-shadow: inset 3px 0 0 rgba(255,255,255,.30), 0 3px 10px rgba(233,79,36,.32);
  transform: translateY(-1px); transition: transform .22s ease, box-shadow .22s ease; }
.sitebar .logo-badge svg { width: 15px; height: 15px; display: block; }
.sitebar .brand:hover .logo-badge { transform: translateY(-2px) rotate(-4deg);
  box-shadow: inset 3px 0 0 rgba(255,255,255,.30), 0 6px 16px rgba(233,79,36,.42); }
.sitebar .logo-word { font-family: var(--serif,"Noto Serif SC",serif); font-weight: 900; font-size: 15.5px; letter-spacing: .03em; }
.sitebar .logo-word i { color: var(--accent); font-style: normal; margin: 0 2px; opacity: .85; }
.sitebar .logo-word em { color: var(--accent); font-style: normal; }
.sitebar .logo-tag { margin-left: 1px; padding-left: 10px; border-left: 1px solid var(--line);
  font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--muted); white-space: nowrap; }
.sitebar nav { display: flex; gap: 6px; }
.sitebar nav a { display: inline-flex; align-items: center; gap: 5px; padding: 6px 15px; border-radius: 99px;
  font-size: 13px; font-weight: 700; color: var(--muted); text-decoration: none;
  transition: color .18s ease, background .18s ease; }
.sitebar nav a:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); }
.sitebar nav a.active { background: var(--ink); color: var(--bg); }
.sitebar nav a svg { width: 14px; height: 14px; }
.sitebar .langbtn { display: inline-flex; align-items: center; padding: 6px 15px; border-radius: 99px;
  border: 0; background: transparent; font: inherit; font-size: 13px; font-weight: 700;
  color: var(--muted); cursor: pointer; transition: color .18s ease, background .18s ease; }
.sitebar .langbtn:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); }

/* —— 面包屑（内页顶部导航，轻量文字链，与标题左对齐） —— */
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 0; max-width: 100%;
  margin: 14px auto 0; font-size: 13px; color: var(--muted); }
.crumbs a { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 99px;
  color: var(--muted); text-decoration: none; font-weight: 600; white-space: nowrap;
  transition: color .18s ease, background .18s ease; }
.crumbs a:first-child { padding-left: 0; }
.crumbs a:hover { color: var(--accent); }
.crumbs a svg { width: 13px; height: 13px; }
.crumbs i { margin: 0 1px; font-style: normal; color: var(--muted); opacity: .4; font-size: 12px; }
.crumbs .cur { padding: 3px 0 3px 1px; color: var(--ink); font-weight: 700;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 46vw; }

/* —— 共用控件 —— */
.search-pill { position: relative; }
.search-pill svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; color: var(--muted); }
.search-pill input { width: 100%; height: 42px; border: 1px solid var(--line); border-radius: 99px;
  background: var(--surface); color: var(--ink); padding: 0 14px 0 40px; outline: none; }
.search-pill input:focus { border-color: var(--accent); }

.chiprow { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; }
.chiprow::-webkit-scrollbar { display: none; }
.chiprow a { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px;
  background: var(--surface-2); color: var(--ink); border-radius: 99px; padding: 8px 16px;
  font-size: 13px; font-weight: 700; text-decoration: none; }
.chiprow a.hot { background: var(--accent-soft); color: var(--accent); }
.chiprow a:hover { color: var(--accent); }
.chiprow a svg { width: 12px; height: 12px; }

.tag { display: inline-block; background: var(--chip); padding: 2px 7px;
  font-size: 11px; font-weight: 800; border-radius: 2px; }
.tag.god { background: var(--accent); color: #fff; }
.rating { font-family: var(--serif,"Noto Serif SC",serif); font-weight: 900; color: var(--accent); }

.bookcover { display: block; object-fit: cover; border-radius: 3px;
  background: var(--surface-2); box-shadow: 0 6px 18px rgba(0,0,0,.14); }

.footbar { padding: 24px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.footbar .wrap { display: flex; justify-content: space-between; gap: 30px; }

@media (max-width: 780px) {
  .wrap { width: min(100% - 28px, 1180px); }
  .footbar .wrap { display: block; }

  /* 顶栏：压间距保导航不溢出，点击区垫高 */
  .sitebar .wrap { height: 52px; }
  .sitebar nav { gap: 2px; }
  .sitebar nav a, .sitebar .langbtn { padding: 10px; font-size: 12.5px; }
  .search-pill input { height: 46px; font-size: 16px; } /* ≥16px 防 iOS 聚焦自动放大 */
  .crumbs .cur { max-width: 40vw; }
}
@media (max-width: 480px) {
  .sitebar nav a svg { display: none; } /* 图标让位给文字 */
  .sitebar nav a, .sitebar .langbtn { padding: 9px 8px; font-size: 12px; }
  .sitebar .logo-tag { display: none; }
  .sitebar .brand { gap: 7px; }
  .sitebar .logo-badge { width: 25px; height: 25px; }
}
/* iPhone 刘海横屏安全区 */
@supports (padding: env(safe-area-inset-left)) {
  .sitebar .wrap { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
  .footbar .wrap { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
}
