/* 옛글방 新版 (platform 版式): 白底、粗黑体、橙色点缀; 顶栏标签 + 轮播横幅 + 一排排竖版封面, 漫画 + 小说 */
.theme-platform {
  --bg: #ffffff; --surface: #f4f4f6; --card: #f7f7f9; --fg: #141416; --fg-soft: #3b3b42; --muted: #8b8b94; --line: #ececf0;
  --accent: #ff5a1f; --accent-fg: #ffffff; --brand: #141416;
  --font-ui: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; --font-title: "Noto Sans KR", sans-serif;
  --font-serif: "Noto Serif KR", serif; --font-sans: "Noto Sans KR", "Malgun Gothic", sans-serif;
  --read-bg: #ffffff;
  --radius: 10px; --maxw: 1200px;
}
.theme-platform { font-size: 15px; letter-spacing: -0.01em; }
.pf-wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---- 顶栏 */
.pf-head { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, 0.94); backdrop-filter: saturate(1.8) blur(12px); border-bottom: 1px solid var(--line); }
.pf-head .pf-wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.pf-logo { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 21px; letter-spacing: -0.04em; text-decoration: none; color: var(--fg); flex: none; }
.pf-logo i { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg, #ff8a3d, #ff3d2e); display: grid; place-items: center; color: #fff; font-style: normal; font-size: 14px; font-weight: 900; box-shadow: 0 2px 8px rgba(255, 90, 31, 0.35); }
.pf-nav { display: flex; gap: 22px; height: 100%; }
.pf-nav a { display: flex; align-items: center; font-size: 16px; font-weight: 700; color: var(--muted); text-decoration: none; border-top: 3px solid transparent; border-bottom: 3px solid transparent; }
.pf-nav a:hover { color: var(--fg); }
.pf-nav a.active { color: var(--fg); border-bottom-color: var(--fg); }
.pf-search { margin-left: auto; position: relative; flex: 0 1 260px; }
.pf-search input { width: 100%; height: 38px; border: 0; border-radius: 999px; background: var(--surface); padding: 0 16px 0 38px; font: inherit; font-size: 14px; color: var(--fg); }
.pf-search input:focus { outline: 2px solid var(--fg); }
.pf-search svg { position: absolute; left: 13px; top: 11px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.pf-head .login-link { position: static; flex: none; border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 600; color: var(--fg-soft); text-decoration: none; background: #fff; cursor: pointer; font-family: inherit; line-height: 1.2; }
.pf-head .login-link:hover { border-color: var(--fg); color: var(--fg); }

/* ---- 胶囊分类 */
.pf-pills { display: flex; gap: 8px; padding: 18px 0 6px; overflow-x: auto; scrollbar-width: none; }
.pf-pills::-webkit-scrollbar { display: none; }
.pf-pill { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--fg-soft); font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; }
.pf-pill:hover { border-color: #c9c9d0; }
.pf-pill[aria-pressed="true"], .pf-pill.on { background: var(--fg); border-color: var(--fg); color: #fff; }
.pf-pill b { color: var(--accent); }

.pf-continue { display: flex; align-items: center; gap: 10px; margin: 14px 0 0; padding: 12px 16px; border-radius: 12px; background: #fff4ee; color: #b33a0c; font-weight: 600; font-size: 14px; text-decoration: none; }
.pf-continue::before { content: "▶"; font-size: 11px; }

/* ---- 轮播横幅 */
.pf-hero { position: relative; margin: 14px 0 8px; }
.pf-track { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; padding-bottom: 2px; }
.pf-track::-webkit-scrollbar { display: none; }
.pf-slide { position: relative; flex: 0 0 min(760px, 86%); height: 340px; border-radius: 18px; overflow: hidden; scroll-snap-align: center; text-decoration: none; color: #fff; background: #222; }
.pf-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 22%; transition: transform .6s; }
.pf-slide:hover img { transform: scale(1.03); }
.pf-slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0.78)); }
.pf-slide .gc { border-radius: 0; }
.pf-slide-text { position: absolute; left: 28px; right: 28px; bottom: 26px; z-index: 2; }
.pf-slide-text .pf-badge { position: static; display: inline-block; margin-bottom: 10px; }
.pf-slide-text h3 { margin: 0 0 6px; font-size: 30px; font-weight: 900; letter-spacing: -0.03em; line-height: 1.2; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3); }
.pf-slide-text p { margin: 0; font-size: 15px; opacity: 0.92; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 560px; }
.pf-slide.novel { background: radial-gradient(60% 90% at 88% 10%, hsl(calc(var(--h) + 40) 80% 62% / .55), transparent 60%), linear-gradient(125deg, hsl(var(--h) 45% 26%), hsl(calc(var(--h) + 30) 55% 12%)); }
.pf-quote { position: absolute; top: 28px; left: 28px; right: 28px; z-index: 1; font-family: var(--font-serif); font-size: 26px; line-height: 1.5; color: rgba(255, 255, 255, .26); word-break: keep-all; }
.pf-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.92); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18); cursor: pointer; font-size: 18px; color: var(--fg); }
.pf-arrow.prev { left: 10px; }
.pf-arrow.next { right: 10px; }
.pf-dots { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
.pf-dots i { width: 6px; height: 6px; border-radius: 3px; background: #d6d6dc; transition: width .2s, background .2s; }
.pf-dots i.on { width: 18px; background: var(--fg); }

/* ---- 区块 + 横排 */
.pf-sec { margin-top: 38px; }
.pf-sec-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.pf-sec-head h2 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -0.03em; }
.pf-sec-head h2 small { margin-left: 8px; font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.pf-more { font-size: 14px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.pf-more:hover { color: var(--fg); }
.pf-row { display: grid; grid-auto-flow: column; grid-auto-columns: 152px; gap: 14px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding-bottom: 4px; }
.pf-row::-webkit-scrollbar { display: none; }
.pf-row > * { scroll-snap-align: start; }
.pf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 26px 16px; }

/* ---- 封面卡片 */
.pf-card { display: block; text-decoration: none; color: inherit; min-width: 0; }
.pf-cover { position: relative; aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden; background: var(--surface); container-type: inline-size; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06); }
.pf-cover img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; transition: transform .35s; }
.pf-card:hover .pf-cover img, .pf-card:hover .gc { transform: scale(1.04); }
.pf-badge { position: absolute; top: 7px; left: 7px; z-index: 2; padding: 2px 7px; border-radius: 4px; font-size: 11px; font-weight: 800; letter-spacing: 0; color: #fff; background: rgba(20, 20, 22, 0.82); }
.pf-badge.comic { background: var(--accent); }
.pf-count { position: absolute; right: 7px; bottom: 7px; z-index: 2; padding: 1px 6px; border-radius: 4px; font-size: 11px; font-weight: 700; color: #fff; background: rgba(0, 0, 0, 0.55); }
.pf-card-title { margin: 9px 0 2px; font-size: 15px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pf-card-meta { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 生成的小说封面 (按作品算出色相 --h, 四种花样) */
.gc { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 11cqw 10cqw 10cqw; color: #fff; transition: transform .35s;
  background: radial-gradient(120% 70% at 85% 0%, hsl(calc(var(--h) + 40) 70% 62% / .55), transparent 60%), linear-gradient(160deg, hsl(var(--h) 48% 34%), hsl(calc(var(--h) + 25) 55% 16%)); }
.gc.p1 { color: hsl(var(--h) 45% 18%); background: linear-gradient(0deg, hsl(var(--h) 55% 42%) 0 18%, transparent 18%), hsl(calc(var(--h) + 20) 35% 90%); }
.gc.p2 { background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .06) 0 6px, transparent 6px 14px), linear-gradient(180deg, hsl(var(--h) 42% 26%), hsl(var(--h) 50% 12%)); }
.gc.p3 { background: radial-gradient(circle at 70% 34%, hsl(calc(var(--h) + 30) 85% 66%) 0 22%, transparent 22.5%), linear-gradient(180deg, hsl(var(--h) 40% 22%), hsl(calc(var(--h) - 20) 50% 38%)); }
.gc-kicker { font-size: 6.5cqw; letter-spacing: .25em; opacity: .75; font-weight: 600; visibility: hidden; }
.pf-rank .pf-badge, .pf-rank .pf-count { display: none; }
.gc-title { font-family: var(--font-serif); font-weight: 700; font-size: 15cqw; line-height: 1.22; letter-spacing: -0.02em; word-break: keep-all; text-shadow: 0 1px 8px rgba(0, 0, 0, .18); }
.gc.p1 .gc-title { text-shadow: none; }
.gc-author { font-size: 7cqw; opacity: .85; }
.gc.p1 .gc-author { color: #fff; opacity: 1; }

/* ---- 排行样式列表 */
.pf-rank { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 40px; }
.pf-rank a { display: grid; grid-template-columns: 30px 66px 1fr; align-items: center; gap: 14px; padding: 8px 0; text-decoration: none; color: inherit; border-radius: 8px; }
.pf-rank a:hover .pf-rank-title { text-decoration: underline; }
.pf-rank-n { font-size: 22px; font-weight: 900; font-style: italic; color: var(--fg); text-align: center; }
.pf-rank a:nth-child(-n+3) .pf-rank-n { color: var(--accent); }
.pf-rank .pf-cover { border-radius: 6px; }
.pf-rank-title { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.pf-rank-sub { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }

/* 作者 */
.pf-authors { display: grid; grid-auto-flow: column; grid-auto-columns: 200px; gap: 12px; overflow-x: auto; scrollbar-width: none; }
.pf-authors::-webkit-scrollbar { display: none; }
.pf-author { display: block; padding: 16px; border-radius: 12px; background: var(--card); text-decoration: none; color: inherit; border: 1px solid var(--line); }
.pf-author:hover { border-color: #cfcfd6; }
.pf-author b { display: block; font-size: 16px; }
.pf-author span { font-size: 12px; color: var(--muted); }
.pf-author p { margin: 8px 0 0; font-size: 13px; color: var(--fg-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* 列表页 */
.pf-page-title { margin: 28px 0 0; font-size: 26px; font-weight: 900; letter-spacing: -0.03em; }
.pf-page-sub { margin: 4px 0 6px; color: var(--muted); }
.pf-comic-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; margin-top: 18px; }
.pf-comic { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); text-decoration: none; color: inherit; }
.pf-comic:hover { border-color: #cfcfd6; box-shadow: 0 6px 20px rgba(0, 0, 0, .06); }
.pf-comic h3 { margin: 2px 0 2px; font-size: 18px; font-weight: 800; }
.pf-comic .en { font-size: 12px; color: var(--muted); }
.pf-comic p { margin: 8px 0 0; font-size: 13.5px; color: var(--fg-soft); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pf-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.pf-tags span { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--surface); color: var(--fg-soft); }
.pf-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 16px 0 20px; }
.pf-tools .pf-search { margin-left: auto; flex: 0 1 280px; }
.pf-empty { padding: 60px 0; text-align: center; color: var(--muted); }

/* ---- 详情页 */
.pf-dhead { position: relative; overflow: hidden; color: #fff; background: #1b1b1f; }
.pf-dhead-bg { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(34px) saturate(1.3); opacity: .55; transform: scale(1.1); }
.pf-dhead-bg.gcbg { filter: none; opacity: 1; background: linear-gradient(120deg, hsl(var(--h) 45% 22%), hsl(calc(var(--h) + 30) 50% 12%)); }
.pf-dhead::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .15), rgba(0, 0, 0, .55)); }
.pf-dhead .pf-wrap { position: relative; z-index: 2; display: flex; gap: 32px; align-items: flex-end; padding-top: 40px; padding-bottom: 36px; }
.pf-dhead .pf-cover { width: 200px; flex: none; border-radius: 10px; box-shadow: 0 12px 40px rgba(0, 0, 0, .45); }
.pf-dinfo { min-width: 0; }
.pf-dinfo .pf-tags span { background: rgba(255, 255, 255, .16); color: #fff; }
.pf-dinfo h1 { margin: 12px 0 6px; font-size: 34px; font-weight: 900; letter-spacing: -0.03em; line-height: 1.2; }
.pf-dinfo .en { font-size: 14px; opacity: .75; margin: -2px 0 6px; }
.pf-dinfo .by { font-size: 15px; opacity: .92; }
.pf-dinfo .facts { font-size: 13px; opacity: .75; margin-top: 4px; }
.pf-dinfo .lead { margin: 14px 0 0; font-size: 14.5px; line-height: 1.7; opacity: .92; max-width: 640px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pf-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.pf-btn { display: inline-flex; align-items: center; justify-content: center; height: 46px; padding: 0 26px; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 800; font-size: 15px; text-decoration: none; border: 0; }
.pf-btn:hover { filter: brightness(1.06); }
.pf-btn.ghost { background: rgba(255, 255, 255, .14); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45); }
.pf-tabbar { position: sticky; top: 64px; z-index: 20; background: #fff; border-bottom: 1px solid var(--line); }
.pf-tabbar .pf-wrap { display: flex; gap: 26px; }
.pf-tabbar button { height: 52px; border: 0; border-top: 3px solid transparent; border-bottom: 3px solid transparent; background: none; font: inherit; font-size: 16px; font-weight: 700; color: var(--muted); cursor: pointer; }
.pf-tabbar button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--fg); }
.pf-tabbar button span { font-size: 13px; color: var(--accent); margin-left: 4px; }
.pf-panel { padding-top: 8px; }
.pf-eps { list-style: none; margin: 0; padding: 0; }
.pf-eps a { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; padding: 12px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.pf-eps a:hover { background: var(--card); }
.pf-eps .thumb { width: 64px; aspect-ratio: 3 / 4; border-radius: 6px; overflow: hidden; background: var(--surface); }
.pf-eps .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.pf-eps .no { width: 44px; height: 44px; border-radius: 10px; background: var(--surface); display: grid; place-items: center; font-weight: 800; color: var(--fg-soft); font-size: 14px; }
.pf-eps b { display: block; font-size: 15px; font-weight: 600; }
.pf-eps small { font-size: 13px; color: var(--muted); }
.pf-eps .go { color: #c2c2ca; font-size: 18px; }
.pf-about { max-width: 760px; padding: 20px 0; }
.pf-about h3 { font-size: 17px; margin: 26px 0 10px; }
.pf-about p { line-height: 1.85; margin: 0 0 12px; color: var(--fg-soft); }
.pf-about .credit { font-size: 12px; color: var(--muted); }

/* ---- 漫画阅读 */
.page-comic { background: #0f0f11; color: #e9e9ec; }
.pf-vbar { position: sticky; top: 0; z-index: 20; background: rgba(15, 15, 17, .92); backdrop-filter: blur(10px); border-bottom: 1px solid #222226; }
.pf-vbar .in { max-width: 900px; margin: 0 auto; padding: 0 16px; height: 54px; display: flex; align-items: center; gap: 12px; }
.pf-vbar a { color: #e9e9ec; text-decoration: none; }
.pf-vbar .back { font-size: 15px; font-weight: 700; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-vbar .ep { font-size: 14px; color: #a0a0a8; }
.pf-vbar .list { font-size: 13px; padding: 6px 12px; border: 1px solid #3a3a40; border-radius: 999px; }
.pf-viewer { max-width: 900px; margin: 0 auto; padding: 0 0 20px; }
.pf-viewer img { display: block; width: 100%; height: auto; background: #1b1b1f; }
.pf-vnote { max-width: 900px; margin: 0 auto; padding: 14px 16px 0; font-size: 12.5px; color: #8b8b94; }
.pf-vnote a { color: #b0b0b8; }
.pf-vnav { max-width: 900px; margin: 0 auto; padding: 22px 16px 60px; display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; }
.pf-vnav a, .pf-vnav span { display: flex; align-items: center; justify-content: center; height: 50px; border-radius: 10px; background: #1d1d21; color: #e9e9ec; text-decoration: none; font-weight: 700; }
.pf-vnav span { opacity: .35; }
.pf-vnav a.list { padding: 0 20px; background: transparent; border: 1px solid #333338; font-weight: 600; }
.pf-vnav a[rel="next"] { background: var(--accent); }
.page-comic .progress i { background: var(--accent); }

/* ---- 底栏 */
.pf-foot { margin-top: 70px; background: var(--card); border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }
.pf-foot .pf-wrap { padding-top: 26px; padding-bottom: 40px; }
.pf-foot b { color: var(--fg-soft); font-size: 14px; }
.pf-foot p { margin: 6px 0 0; }
.pf-foot a { color: var(--fg-soft); }

/* 阅读页 (小说) 的顶栏跟新版配色 */
.theme-platform.page-read .read-head { background: var(--r-bg); }
.theme-platform .read-title { font-weight: 800; }

/* ---- 手机 */
@media (max-width: 760px) {
  .pf-wrap { padding: 0 16px; }
  .pf-head .pf-wrap { gap: 14px; height: 56px; }
  .pf-logo { font-size: 19px; }
  .pf-logo i { width: 24px; height: 24px; }
  .pf-nav { gap: 14px; }
  .pf-nav a { font-size: 15px; }
  .pf-head .pf-search { display: none; }
  .pf-head .login-link { margin-left: auto; padding: 6px 11px; }
  .pf-slide { flex-basis: 90%; height: 230px; border-radius: 14px; }
  .pf-slide-text { left: 18px; right: 18px; bottom: 18px; }
  .pf-slide-text h3 { font-size: 22px; }
  .pf-slide-text p { font-size: 13px; }
  .pf-arrow { display: none; }
  .pf-sec-head h2 small { display: none; }
  .pf-row { grid-auto-columns: 118px; gap: 10px; }
  .pf-grid { grid-template-columns: repeat(3, 1fr); gap: 20px 10px; }
  .pf-card-title { font-size: 14px; }
  .pf-rank { grid-template-columns: 1fr; }
  .pf-comic-list { grid-template-columns: 1fr; }
  .pf-comic { grid-template-columns: 96px 1fr; }
  .pf-tools .pf-search { margin-left: 0; flex: 1 1 100%; }
  .pf-dhead .pf-wrap { flex-direction: column; align-items: flex-start; gap: 18px; padding-top: 24px; padding-bottom: 26px; }
  .pf-dhead .pf-cover { width: 132px; }
  .pf-dinfo h1 { font-size: 26px; }
  .pf-tabbar { top: 56px; }
  .pf-actions .pf-btn { flex: 1; }
}

/* 4 个网站共用的结构; 颜色、字体在 themes/*.css 里用变量定义 */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--font-ui); font-size: 16px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; word-break: keep-all; overflow-wrap: anywhere;
}
a { color: inherit; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: var(--maxw, 1080px); margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 760px; }
.meta { color: var(--muted); font-size: 13px; }

/* ---- 顶栏 / 底栏 */
.site-head { background: var(--head-bg, var(--bg)); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; padding-top: 18px; padding-bottom: 16px; }
.brand { font-family: var(--font-title); font-size: 24px; font-weight: 700; text-decoration: none; color: var(--brand, var(--fg)); letter-spacing: -0.01em; }
.tagline { color: var(--muted); font-size: 14px; }
.site-head .wrap { position: relative; }
.login-link { position: absolute; right: 20px; top: 18px; padding: 4px 13px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--muted); text-decoration: none; background: transparent; cursor: pointer; font-family: var(--font-ui); line-height: 1.6; }
.login-link:hover { color: var(--fg); border-color: var(--accent); }
.site-foot { margin-top: 72px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.site-foot .wrap { padding-top: 24px; padding-bottom: 40px; }
.site-foot p { margin: 0 0 4px; }

/* ---- 首页 */
.hero { padding: 52px 0 8px; }
.hero h1 { font-family: var(--font-title); font-size: clamp(28px, 5.2vw, 46px); line-height: 1.25; margin: 0 0 12px; font-weight: 700; letter-spacing: -0.02em; }
.hero p { margin: 0; color: var(--muted); }
.continue { display: inline-block; margin-top: 18px; padding: 8px 16px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); text-decoration: none; font-size: 14px; }
.continue:hover { border-color: var(--accent); }
.tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 28px 0 24px; }
.chip { border: 1px solid var(--line); background: transparent; padding: 6px 15px; border-radius: 999px; font-size: 14px; cursor: pointer; }
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.search { margin-left: auto; flex: 0 1 260px; min-width: 0; padding: 8px 15px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--fg); font: inherit; font-size: 14px; }
.empty { color: var(--muted); padding: 40px 0; text-align: center; }

/* 作品条目 (共用部分) */
.work-top { display: flex; gap: 8px; align-items: baseline; }
.genre { font-size: 12px; font-weight: 600; color: var(--accent); letter-spacing: 0.02em; margin: 0; }
.work-title { font-family: var(--font-title); font-size: 21px; line-height: 1.35; margin: 4px 0 2px; font-weight: 700; }
.work-title a { text-decoration: none; }
.work-title a:hover { text-decoration: underline; }
.work-author { color: var(--muted); font-size: 14px; }
.work-syn { margin: 10px 0 12px; font-size: 15px; line-height: 1.7; color: var(--fg-soft, var(--fg)); }
.work-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: auto; }
.read-link { font-size: 14px; font-weight: 600; color: var(--accent); text-decoration: none; white-space: nowrap; }
.read-link:hover { text-decoration: underline; }

/* 封面 (按作品 id 算出色相 --h) */
.cover {
  display: flex; flex-direction: column; justify-content: space-between; text-decoration: none;
  aspect-ratio: 3 / 4; padding: 14px 12px; border-radius: calc(var(--radius) * 0.6);
  background: hsl(var(--h) var(--cover-s, 35%) var(--cover-l, 42%)); color: #fff;
  box-shadow: inset 6px 0 0 rgba(0, 0, 0, 0.18);
}
.cover span { font-family: var(--font-title); font-size: 17px; font-weight: 700; line-height: 1.3; }
.cover small { font-size: 12px; opacity: 0.85; }
.cover.big { width: 150px; flex: none; }
.cover.big span { font-size: 21px; }

/* 一行一部 */
.works.list .work { display: grid; grid-template-columns: 1fr; padding: 26px 0; border-bottom: 1px solid var(--line); }
.works.list .cover { display: none; }
.works.list .work-title { font-size: 25px; }
.works.list .work-syn { max-width: 68ch; }

/* 卡片 */
.works.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.works.grid .work { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .15s, border-color .15s; }
.works.grid .work:hover { transform: translateY(-2px); border-color: var(--accent); }
.works.grid .cover { aspect-ratio: auto; height: 112px; border-radius: 0; box-shadow: none; }
.works.grid .cover small { display: none; }
.works.grid .work-body { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 16px; }
.works.grid .work-syn { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* 按作者分组 */
.works.authors .group { display: grid; grid-template-columns: 220px 1fr; gap: 12px 36px; padding: 32px 0; border-top: 1px solid var(--line); }
.group-head h2 { font-family: var(--font-title); font-size: 26px; margin: 8px 0 2px; }
.group-head p { margin: 0 0 6px; }
.group-desc { font-size: 14px; color: var(--muted); }
.works.authors .work { padding: 0 0 18px; margin-bottom: 18px; border-bottom: 1px dashed var(--line); }
.works.authors .work:last-child { border-bottom: 0; margin-bottom: 0; }
.works.authors .cover { display: none; }
.works.authors .work-author { display: none; }

/* ---- 作品介绍 */
.crumb { padding: 22px 0 0; font-size: 14px; }
.crumb a { text-decoration: none; color: var(--muted); }
.crumb a:hover { color: var(--fg); }
.book-head { display: flex; gap: 28px; align-items: flex-start; padding: 26px 0 8px; }
.book-head h1 { font-family: var(--font-title); font-size: clamp(28px, 5vw, 40px); line-height: 1.25; margin: 4px 0 6px; }
.subtitle { margin: 0 0 6px; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.btn { display: inline-flex; align-items: center; padding: 10px 20px; border-radius: var(--radius); background: var(--accent); color: var(--accent-fg); border: 1px solid var(--accent); text-decoration: none; font-weight: 600; font-size: 15px; }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.sec-title { font-family: var(--font-title); font-size: 19px; margin: 40px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.lead { font-size: 16px; line-height: 1.85; margin: 0 0 14px; }
.plot { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 18px; margin: 0 0 12px; }
.plot summary { cursor: pointer; font-weight: 600; }
.plot p { margin: 12px 0 4px; line-height: 1.85; }
.credit { font-size: 12px; color: var(--muted); margin: 0; }
.opening { margin: 0 0 8px; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent); font-family: var(--font-serif); line-height: 1.9; }
.author-box { margin-top: 26px; padding: 16px 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.author-box h3 { margin: 0 0 4px; font-size: 16px; }
.author-box p { margin: 0; font-size: 14px; color: var(--fg-soft, var(--fg)); }
.toc { margin: 0; padding: 0; list-style: none; counter-reset: ch; columns: 2 260px; column-gap: 32px; }
.toc li { counter-increment: ch; break-inside: avoid; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 15px; display: flex; gap: 10px; }
.toc li::before { content: counter(ch); color: var(--muted); font-size: 13px; min-width: 1.8em; text-align: right; padding-top: 1px; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.source { margin-top: 32px; }

/* ---- 阅读页 */
html { --r-size: 18px; }
html[data-size="1"] { --r-size: 15px; }
html[data-size="2"] { --r-size: 16.5px; }
html[data-size="3"] { --r-size: 18px; }
html[data-size="4"] { --r-size: 19.5px; }
html[data-size="5"] { --r-size: 21px; }
html[data-size="6"] { --r-size: 23px; }
.page-read { --r-bg: var(--read-bg, var(--bg)); --r-fg: var(--read-fg, var(--fg)); --r-muted: var(--muted); --r-line: var(--line); background: var(--r-bg); color: var(--r-fg); }
html[data-rbg="light"] .page-read { --r-bg: #ffffff; --r-fg: #1d1d1f; --r-muted: #6b6b70; --r-line: #e4e4e7; }
html[data-rbg="sepia"] .page-read { --r-bg: #f4ecd8; --r-fg: #3b2f22; --r-muted: #7d6b55; --r-line: #e2d5b8; }
html[data-rbg="dark"] .page-read { --r-bg: #16171a; --r-fg: #d6d3cc; --r-muted: #8a8780; --r-line: #2b2c30; }
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 20; }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); }
.read-head { position: sticky; top: 0; z-index: 10; background: var(--r-bg); border-bottom: 1px solid var(--r-line); }
.read-bar { max-width: 760px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 12px; }
.read-bar .back { flex: 1; min-width: 0; text-decoration: none; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.read-site { font-size: 13px; color: var(--r-muted); }
.read-site a { text-decoration: none; }
.icon { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--r-line); background: transparent; cursor: pointer; font-weight: 700; }
.icon[aria-expanded="true"] { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.settings { max-width: 760px; margin: 0 auto; padding: 4px 20px 14px; display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 13px; }
.settings > div { display: flex; align-items: center; gap: 6px; }
.settings span { color: var(--r-muted); margin-right: 2px; }
.settings button { border: 1px solid var(--r-line); background: transparent; border-radius: 6px; padding: 4px 10px; cursor: pointer; font-size: 13px; }
.settings button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.read-wrap { max-width: 720px; margin: 0 auto; padding: 40px 20px 24px; }
.read-kicker { margin: 0; color: var(--r-muted); font-size: 14px; }
.read-title { font-family: var(--font-title); font-size: clamp(24px, 4.5vw, 32px); line-height: 1.35; margin: 6px 0 36px; }
.text { font-family: var(--font-serif); font-size: var(--r-size); line-height: 1.95; }
html[data-rfont="sans"] .text { font-family: var(--font-sans); }
.text p { margin: 0 0 1.05em; text-indent: 1em; }
.text h3 { font-family: var(--font-title); font-size: 1.1em; text-align: center; margin: 2.2em 0 1.2em; }
.text .sep { border: 0; text-align: center; margin: 2em 0; overflow: visible; }
.text .sep::before { content: "＊　＊　＊"; color: var(--r-muted); font-size: 0.8em; }
.the-end { text-align: center; color: var(--r-muted); margin: 40px 0 0; font-family: var(--font-serif); }
.pager { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--r-line); font-size: 15px; }
.pager a { text-decoration: none; padding: 8px 0; }
.pager a:hover { color: var(--accent); }
.pager > :first-child { justify-self: start; }
.pager > :nth-child(2) { justify-self: center; color: var(--r-muted); font-size: 14px; }
.pager > :last-child { justify-self: end; font-weight: 600; }

/* ---- 手机 */
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .hero { padding-top: 36px; }
  .search { margin-left: 0; flex: 1 1 100%; }
  .works.authors .group { grid-template-columns: 1fr; gap: 12px; }
  .book-head { gap: 18px; }
  .cover.big { width: 96px; }
  .cover.big span { font-size: 15px; }
  .read-bar, .settings { padding-left: 16px; padding-right: 16px; }
  .read-wrap { padding: 28px 16px 20px; }
  .read-site { display: none; }
  .login-link { right: 16px; top: 14px; }
}
