/* ============================================================
   文澜书阁 · 前台样式
   ============================================================ */

:root {
    --bg: #f5f3ee;
    --bg-soft: #efece4;
    --surface: #ffffff;
    --ink: #1f1d1a;
    --ink-2: #4a453e;
    --ink-3: #8a8378;
    --line: #e6e1d6;
    --line-2: #d9d3c5;
    --brand: #2f6b5e;
    --brand-dark: #23564b;
    --brand-soft: #e9f1ee;
    --accent: #b5803a;
    --accent-soft: #f7efe2;
    --danger: #c0503f;
    --radius: 14px;
    --radius-sm: 9px;
    --shadow-sm: 0 1px 2px rgba(31, 29, 26, .05), 0 2px 10px rgba(31, 29, 26, .04);
    --shadow-md: 0 6px 22px rgba(31, 29, 26, .09);
    --shadow-lg: 0 18px 48px rgba(31, 29, 26, .16);
    --serif: "Noto Serif SC", "Songti SC", "SimSun", Georgia, serif;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1 0 auto; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.35; }
p { margin: 0 0 1em; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }

.wrap { max-width: 1220px; margin: 0 auto; padding: 0 24px; }

/* ------------------------------ 顶栏 ------------------------------ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 255, 255, .93);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    max-width: 1220px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
}

/* 第一行：品牌 + 工具 */
.header-top { border-bottom: 1px solid var(--line); }
.header-top .header-inner { height: 64px; gap: 18px; }

/* 第二行：完整分类导航 */
.header-nav {
    background: #fbfaf6;
    border-bottom: 1px solid var(--line);
}
.header-nav .header-inner {
    height: 52px;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}
.header-nav .header-inner::-webkit-scrollbar { display: none; }

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--serif);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--brand);
    flex-shrink: 0;
}

.logo-mark {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: linear-gradient(150deg, var(--brand), #4c8f7d);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 15px;
    letter-spacing: 0;
    box-shadow: 0 4px 12px rgba(47, 107, 94, .3);
}

/* 第二行导航：完整分类 */
.nav-link {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14.5px;
    color: var(--ink-2);
    white-space: nowrap;
    flex-shrink: 0;
    transition: .18s;
    position: relative;
}
.nav-link:hover { color: var(--ink); background: rgba(0, 0, 0, .04); }
.nav-link.active { color: var(--brand); font-weight: 600; }
.nav-link.active::after {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: -1px;
    height: 2px;
    background: var(--brand);
    border-radius: 2px 2px 0 0;
}

.nav-divider {
    display: inline-block;
    width: 1px;
    height: 18px;
    background: var(--line);
    margin: 0 8px;
    flex-shrink: 0;
}

.header-search { position: relative; flex-shrink: 0; margin-left: auto; }

.header-search input {
    width: 152px;
    height: 36px;
    padding: 0 36px 0 14px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: var(--bg);
    outline: none;
    font-size: 13.5px;
    transition: .2s;
}

.header-search input:focus { border-color: var(--brand); background: #fff; width: 184px; }

.header-search button {
    position: absolute;
    right: 3px;
    top: 3px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: var(--ink-3);
    display: grid;
    place-items: center;
}

.header-search button:hover { background: var(--brand-soft); color: var(--brand); }

.header-user { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 36px;
    padding: 0 16px;
    border-radius: 9px;
    font-size: 13.5px;
    font-weight: 500;
    transition: .18s;
    white-space: nowrap;
}

.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 4px 14px rgba(47, 107, 94, .24); }
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-1px); }
.btn-ghost { background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { filter: brightness(.94); }
.btn-sm { height: 32px; padding: 0 13px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }

.avatar-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(140deg, var(--brand), #63a48f);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 15px;
    font-weight: 600;
    flex-shrink: 0;
}

.user-dropdown { position: relative; }
.user-dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    min-width: 168px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    padding: 7px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: .18s;
}
.user-dropdown:hover .user-dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.user-dropdown-menu a { display: block; padding: 9px 12px; border-radius: 8px; font-size: 14px; color: var(--ink-2); }
.user-dropdown-menu a:hover { background: var(--bg-soft); color: var(--brand); }
.user-dropdown-menu .divider { height: 1px; background: var(--line); margin: 6px 4px; }

/* ------------------------------ 主体 ------------------------------ */
.page { padding: 28px 0 64px; }

.section { margin-bottom: 46px; }

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.section-title {
    font-family: var(--serif);
    font-size: 22px;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 19px;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--brand), #6fae9b);
}

.section-sub { font-size: 13.5px; color: var(--ink-3); }
.section-more { font-size: 14px; color: var(--ink-3); }
.section-more:hover { color: var(--brand); }

/* ------------------------------ 轮播 ------------------------------ */
.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 20px;
    margin-bottom: 46px;
}

.slider {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    min-height: 320px;
    box-shadow: var(--shadow-md);
}

.slide {
    position: absolute;
    inset: 0;
    padding: 42px 46px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    transition: opacity .55s ease;
    background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 45%, #0d1219));
    color: #fff;
}

.slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 82% 18%, rgba(255, 255, 255, .22), transparent 58%);
    pointer-events: none;
}

.slide.active { opacity: 1; }

.slide-tag {
    display: inline-block;
    align-self: flex-start;
    padding: 4px 13px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .2);
    font-size: 12.5px;
    letter-spacing: 1px;
    margin-bottom: 18px;
}

.slide h2 { font-family: var(--serif); font-size: 38px; letter-spacing: 2px; margin-bottom: 12px; }
.slide p { font-size: 15px; opacity: .9; max-width: 460px; margin-bottom: 26px; }
.slide .btn { align-self: flex-start; background: #fff; color: var(--c); font-weight: 600; }

.slider-dots { position: absolute; left: 46px; bottom: 26px; display: flex; gap: 8px; z-index: 3; }
.slider-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .42); cursor: pointer; transition: .2s; }
.slider-dots i.active { width: 24px; border-radius: 5px; background: #fff; }

.hero-side {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 22px 22px 10px;
    box-shadow: var(--shadow-sm);
}

.hero-side h3 { font-family: var(--serif); font-size: 17px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.hero-side h3::before { content: '热'; font-size: 11px; width: 20px; height: 20px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }

.side-rank-item { display: flex; align-items: center; gap: 11px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.side-rank-item:last-child { border-bottom: none; }
.side-rank-no {
    width: 20px; height: 20px; border-radius: 6px; flex-shrink: 0;
    display: grid; place-items: center; font-size: 12px; font-weight: 700;
    background: var(--bg-soft); color: var(--ink-3);
}
.side-rank-item:nth-child(1) .side-rank-no { background: #fdeceb; color: #d0503c; }
.side-rank-item:nth-child(2) .side-rank-no { background: #fdf3e3; color: #c98b2e; }
.side-rank-item:nth-child(3) .side-rank-no { background: #eaf1fd; color: #4a7cd8; }
.side-rank-name { flex: 1; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-rank-name:hover { color: var(--brand); }
.side-rank-num { font-size: 12.5px; color: var(--ink-3); }

/* ------------------------------ 分类胶囊 ------------------------------ */
.cat-chips { display: flex; flex-wrap: wrap; gap: 10px; }

.cat-chip {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 17px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    font-size: 14.5px;
    transition: .18s;
}

.cat-chip:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.cat-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--brand)); }
.cat-chip .num { font-size: 12px; color: var(--ink-3); }

/* ------------------------------ 书目网格 ------------------------------ */
.book-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.book-grid.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.book-grid.g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.book-grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.book-card { display: flex; flex-direction: column; }

.book-cover {
    position: relative;
    aspect-ratio: 3 / 4.1;
    border-radius: 11px;
    padding: 15px 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #fff;
    overflow: hidden;
    background: linear-gradient(155deg, var(--c, var(--brand)), color-mix(in srgb, var(--c, var(--brand)) 52%, #0c1017));
    box-shadow: var(--shadow-md);
    transition: transform .22s ease, box-shadow .22s ease;
}

.book-cover::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, rgba(255, 255, 255, .17), transparent 46%);
}

.book-cover::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(255, 255, 255, .22);
}

.book-card:hover .book-cover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }

.cover-state {
    position: relative;
    align-self: flex-start;
    font-size: 11.5px;
    padding: 2px 9px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .22);
    backdrop-filter: blur(4px);
}

.cover-name {
    position: relative;
    font-family: var(--serif);
    font-size: 18px;
    line-height: 1.4;
    letter-spacing: 1.5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}

.cover-author { position: relative; font-size: 12px; opacity: .82; letter-spacing: .5px; }

.book-info { padding: 11px 2px 0; }
.book-title { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.book-title:hover { color: var(--brand); }
.book-meta { margin-top: 5px; font-size: 12.5px; color: var(--ink-3); display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.book-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--line-2); }
.book-intro {
    margin-top: 6px;
    font-size: 13px;
    color: var(--ink-3);
    line-height: 1.62;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 横向书目条目 */
.book-row {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: .18s;
}
.book-row:hover { border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.book-row .book-cover { width: 92px; flex-shrink: 0; aspect-ratio: 3 / 4.1; padding: 10px 9px; }
.book-row .cover-name { font-size: 13.5px; letter-spacing: .5px; }
.book-row .cover-state { font-size: 10px; padding: 1px 7px; }
.book-row .cover-author { display: none; }
.book-row-body { flex: 1; min-width: 0; }
.book-row-title { font-size: 16.5px; font-weight: 600; margin-bottom: 4px; }
.book-row-title:hover { color: var(--brand); }
.book-row-meta { font-size: 12.5px; color: var(--ink-3); display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.book-row-intro {
    font-size: 13.5px;
    color: var(--ink-3);
    line-height: 1.66;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.book-row-foot { margin-top: 10px; display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-3); }
.chip {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px; border-radius: 20px;
    background: var(--bg-soft); font-size: 12px; color: var(--ink-2);
}
.chip-brand { background: var(--brand-soft); color: var(--brand); }
.chip-accent { background: var(--accent-soft); color: var(--accent); }

/* ------------------------------ 卡片 / 面板 ------------------------------ */
.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.panel-head {
    padding: 17px 22px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}
.panel-head h3 { font-family: var(--serif); font-size: 17.5px; display: flex; align-items: center; gap: 9px; }
.panel-head h3::before { content: ''; width: 3px; height: 16px; border-radius: 2px; background: var(--brand); }
.panel-body { padding: 22px; }
.panel-body.p0 { padding: 0; }

/* ------------------------------ 筛选栏 ------------------------------ */
.filter-bar {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}
.filter-row { display: flex; align-items: center; gap: 12px; padding: 7px 0; flex-wrap: wrap; }
.filter-label { font-size: 13.5px; color: var(--ink-3); width: 46px; flex-shrink: 0; }
.filter-options { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.filter-options a {
    padding: 5px 13px;
    border-radius: 8px;
    font-size: 13.5px;
    color: var(--ink-2);
    transition: .16s;
}
.filter-options a:hover { background: var(--bg-soft); }
.filter-options a.active { background: var(--brand); color: #fff; font-weight: 500; }

/* ------------------------------ 分页 ------------------------------ */
.pagination-wrap { margin-top: 34px; display: flex; justify-content: center; }
.pagination { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pagination li { list-style: none; }
.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 11px;
    border-radius: 9px;
    background: var(--surface);
    border: 1px solid var(--line);
    font-size: 14px;
    color: var(--ink-2);
    transition: .16s;
}
.pagination a:hover { border-color: var(--brand); color: var(--brand); }
.pagination .active span { background: var(--brand); border-color: var(--brand); color: #fff; }
.pagination .disabled span { opacity: .42; }

/* ------------------------------ 详情页 ------------------------------ */
.detail-hero {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 32px;
    padding: 30px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 26px;
}
.detail-cover { border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-md); }
.detail-cover .book-cover { aspect-ratio: 3 / 4.15; border-radius: 12px; box-shadow: none; padding: 20px 18px; }
.detail-cover .cover-name { font-size: 24px; }

.detail-title { font-family: var(--serif); font-size: 32px; letter-spacing: 2px; margin-bottom: 12px; }
.detail-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.detail-meta { display: grid; grid-template-columns: repeat(4, auto); gap: 12px 36px; margin-bottom: 18px; }
.detail-meta div { font-size: 13.5px; color: var(--ink-3); }
.detail-meta strong { display: block; font-size: 16px; color: var(--ink); font-weight: 600; margin-top: 3px; }
.detail-intro { font-size: 14.5px; color: var(--ink-2); line-height: 1.85; margin-bottom: 22px; }
.detail-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.chapter-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.chapter-list a {
    padding: 11px 14px;
    font-size: 14px;
    color: var(--ink-2);
    border-bottom: 1px solid var(--line);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: .15s;
}
.chapter-list a:hover { background: var(--brand-soft); color: var(--brand); }
.chapter-list a .no { color: var(--ink-3); font-size: 12.5px; margin-right: 7px; }
.chapter-list a.vip .no::after { content: 'VIP'; font-size: 9px; color: var(--accent); border: 1px solid currentColor; border-radius: 3px; padding: 0 2px; margin-left: 4px; vertical-align: 2px; }

/* ------------------------------ 阅读页 ------------------------------ */
.reader-toolbar {
    position: sticky;
    top: 68px;
    z-index: 40;
    background: rgba(255, 255, 255, .95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}
.reader-toolbar-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 11px 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    justify-content: space-between;
}
.reader-book { font-size: 14.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reader-book b { color: var(--ink); font-weight: 600; }
.reader-tools { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.tool-btn {
    height: 32px;
    min-width: 32px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--surface);
    font-size: 13px;
    color: var(--ink-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: .16s;
}
.tool-btn:hover { border-color: var(--brand); color: var(--brand); }
.tool-btn.on { background: var(--brand); border-color: var(--brand); color: #fff; }

.reader-wrap { max-width: 900px; margin: 0 auto; padding: 40px 24px 80px; }
.reader-title { font-family: var(--serif); font-size: 27px; letter-spacing: 1.5px; margin-bottom: 14px; }
.reader-sub { font-size: 13px; color: var(--ink-3); display: flex; gap: 16px; flex-wrap: wrap; padding-bottom: 22px; border-bottom: 1px solid var(--line); margin-bottom: 30px; }
.reader-content { font-family: var(--serif); font-size: 18px; line-height: 2.05; color: #2a2724; letter-spacing: .4px; }
.reader-content p { margin: 0 0 1.35em; text-indent: 2em; }

body.reader-dark { background: #16181c; color: #b9bdc4; }
body.reader-dark .site-header, body.reader-dark .reader-toolbar { background: rgba(22, 24, 28, .95); border-color: #2a2e35; }
body.reader-dark .reader-content { color: #a9aeb6; }
body.reader-dark .reader-title { color: #dfe3e8; }
body.reader-dark .reader-sub { border-color: #2a2e35; }
body.reader-dark .tool-btn { background: #20242a; border-color: #2f343c; color: #a9aeb6; }
body.reader-dark .panel, body.reader-dark .hero-side { background: #1c1f24; border-color: #2a2e35; }

.reader-nav { display: flex; gap: 12px; margin-top: 46px; padding-top: 30px; border-top: 1px solid var(--line); }
.reader-nav .btn { flex: 1; height: 48px; }

.catalog-panel { margin-top: 40px; }
.catalog-panel .chapter-list { grid-template-columns: repeat(3, minmax(0, 1fr)); max-height: 380px; overflow-y: auto; }
.catalog-panel .chapter-list a.current { background: var(--brand-soft); color: var(--brand); font-weight: 600; }

/* ------------------------------ 评论 ------------------------------ */
.comment-form { margin-bottom: 26px; }
.comment-form textarea {
    width: 100%;
    min-height: 96px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--bg);
    resize: vertical;
    outline: none;
    font-size: 14.5px;
    line-height: 1.7;
    transition: .18s;
}
.comment-form textarea:focus { border-color: var(--brand); background: #fff; }
.comment-form-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.comment-form-foot .tip { font-size: 12.5px; color: var(--ink-3); }

.comment-item { display: flex; gap: 13px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.comment-item:last-child { border-bottom: none; }
.comment-body { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; }
.comment-name { font-size: 14px; font-weight: 600; }
.comment-time { font-size: 12.5px; color: var(--ink-3); }
.comment-text { font-size: 14.5px; color: var(--ink-2); line-height: 1.75; word-break: break-word; }
.comment-acts { margin-top: 7px; display: flex; gap: 14px; font-size: 12.5px; color: var(--ink-3); }
.comment-acts button:hover { color: var(--danger); }

/* ------------------------------ 用户中心 ------------------------------ */
.user-layout { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 24px; align-items: start; }

.user-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
}
.user-card .avatar-circle { width: 66px; height: 66px; font-size: 25px; margin: 0 auto 13px; }
.user-card .name { font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.user-card .sign { font-size: 13px; color: var(--ink-3); line-height: 1.6; }

.user-menu { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.user-menu a { display: flex; align-items: center; gap: 10px; padding: 13px 20px; font-size: 14.5px; color: var(--ink-2); border-bottom: 1px solid var(--line); transition: .16s; }
.user-menu a:last-child { border-bottom: none; }
.user-menu a:hover { background: var(--bg-soft); }
.user-menu a.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; box-shadow: inset 3px 0 0 var(--brand); }
.user-menu a .badge { margin-left: auto; font-size: 12px; color: var(--ink-3); }

.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.stat-box .num { font-size: 27px; font-weight: 700; font-family: var(--serif); color: var(--brand); }
.stat-box .label { font-size: 13.5px; color: var(--ink-3); margin-top: 3px; }

/* ------------------------------ 表单 ------------------------------ */
.form-item { margin-bottom: 18px; }
.form-item label { display: block; font-size: 13.5px; color: var(--ink-2); margin-bottom: 7px; font-weight: 500; }
.form-item .req { color: var(--danger); }
.input, .select, .textarea {
    width: 100%;
    padding: 11px 14px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--bg);
    outline: none;
    font-size: 14.5px;
    transition: .18s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(47, 107, 94, .1); }
.textarea { resize: vertical; min-height: 110px; line-height: 1.7; }
.form-tip { font-size: 12.5px; color: var(--ink-3); margin-top: 6px; }
.form-actions { display: flex; gap: 12px; align-items: center; margin-top: 24px; }

/* ------------------------------ 登录页 ------------------------------ */
.auth-wrap { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 46px 24px; }
.auth-card {
    width: 100%;
    max-width: 424px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 38px 36px;
    box-shadow: var(--shadow-md);
}
.auth-card h1 { font-family: var(--serif); font-size: 25px; letter-spacing: 1.5px; margin-bottom: 6px; }
.auth-card .sub { font-size: 13.5px; color: var(--ink-3); margin-bottom: 28px; }
.auth-alt { text-align: center; font-size: 13.5px; color: var(--ink-3); margin-top: 20px; }
.auth-alt a { color: var(--brand); font-weight: 500; }

/* ------------------------------ 提示 ------------------------------ */
.empty { text-align: center; padding: 66px 24px; color: var(--ink-3); }
.empty .icon { font-size: 42px; opacity: .32; margin-bottom: 14px; }
.empty p { margin-bottom: 18px; font-size: 14.5px; }

.toast {
    position: fixed;
    left: 50%;
    top: 84px;
    transform: translate(-50%, -14px);
    z-index: 200;
    padding: 11px 22px;
    border-radius: 11px;
    background: var(--ink);
    color: #fff;
    font-size: 14px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: .26s;
    max-width: 82vw;
}
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.toast.ok { background: var(--brand); }
.toast.err { background: var(--danger); }

/* ------------------------------ 页脚 ------------------------------ */
.site-footer {
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
    padding: 58px 0 26px;
    color: rgba(255, 255, 255, .6);
    background:
        radial-gradient(1100px 340px at 10% -40%, rgba(47, 107, 94, .5), transparent 62%),
        linear-gradient(180deg, #22302b 0%, #1a2521 100%);
}
.site-footer::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--brand) 16%, var(--accent) 50%, var(--brand) 84%, transparent);
    opacity: .9;
}
.site-footer::after {
    content: attr(data-watermark);
    position: absolute;
    right: -18px;
    bottom: -40px;
    font-family: var(--serif);
    font-size: 130px;
    font-weight: 700;
    letter-spacing: 10px;
    line-height: 1;
    white-space: nowrap;
    color: rgba(255, 255, 255, .026);
    pointer-events: none;
    user-select: none;
}
.footer-glow {
    position: absolute;
    top: -120px;
    left: 50%;
    width: 780px;
    height: 260px;
    transform: translateX(-50%);
    background: radial-gradient(closest-side, rgba(181, 128, 58, .16), transparent);
    pointer-events: none;
}

.footer-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.7fr repeat(4, minmax(0, 1fr));
    gap: 34px 26px;
    padding-bottom: 34px;
}

.footer-about { max-width: 340px; }

.footer-brand { display: inline-flex; align-items: center; gap: 11px; margin-bottom: 15px; }
.footer-logo {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 11px;
    border: 1px solid rgba(255, 255, 255, .16);
    background: linear-gradient(150deg, var(--brand), var(--brand-dark));
    box-shadow: 0 8px 20px rgba(0, 0, 0, .32);
    color: #fff;
    font-family: var(--serif);
    font-size: 18px;
}
.footer-name { font-family: var(--serif); font-size: 20px; letter-spacing: 3px; color: #fff; }

.footer-desc { margin: 0; font-size: 13.5px; line-height: 1.9; color: rgba(255, 255, 255, .5); }

.footer-contact { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.footer-contact li { display: flex; align-items: center; gap: 9px; font-size: 13px; color: rgba(255, 255, 255, .54); }
.footer-contact .ft-ic {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    border-radius: 6px;
    background: rgba(255, 255, 255, .08);
    color: var(--accent);
    font-size: 11px;
}

.footer-col h4 {
    position: relative;
    padding-bottom: 12px;
    margin-bottom: 13px;
    font-size: 14.5px;
    letter-spacing: 1px;
    color: #fff;
}
.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--accent), transparent);
}
.footer-col a {
    display: block;
    padding: 5px 0;
    font-size: 13.5px;
    color: rgba(255, 255, 255, .54);
    transition: color .18s ease, transform .18s ease;
}
.footer-col a:hover { color: #fff; transform: translateX(3px); }

.footer-bottom {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px 22px;
    flex-wrap: wrap;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    font-size: 13px;
    color: rgba(255, 255, 255, .46);
}
.footer-bottom .fb-left { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.footer-bottom .fb-sep { color: rgba(255, 255, 255, .2); }
.footer-bottom .fb-copy { color: rgba(255, 255, 255, .62); }
.footer-bottom .fb-note { color: rgba(255, 255, 255, .4); }

.fb-top {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 34px;
    padding: 0 15px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .82);
    font-size: 12.5px;
    transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}
.fb-top:hover { background: var(--brand); border-color: transparent; color: #fff; transform: translateY(-2px); }
.fb-top i { font-style: normal; font-size: 13px; line-height: 1; }

/* 阅读页夜间模式 */
body.reader-dark .site-footer { background: linear-gradient(180deg, #14171b 0%, #0f1215 100%); }
body.reader-dark .site-footer::after { color: rgba(255, 255, 255, .022); }

/* ------------------------------ 面包屑 ------------------------------ */
.crumb { font-size: 13.5px; color: var(--ink-3); margin-bottom: 18px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.crumb a:hover { color: var(--brand); }
.crumb .sp { opacity: .5; }

/* ------------------------------ 两栏布局 ------------------------------ */
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 306px; gap: 26px; align-items: start; }

.update-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 22px;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
    transition: .15s;
}
.update-item:last-child { border-bottom: none; }
.update-item:hover { background: var(--bg-soft); }
.update-item .u-cat { flex-shrink: 0; font-size: 12px; padding: 2px 9px; border-radius: 20px; background: var(--brand-soft); color: var(--brand); }
.update-item .u-title { font-weight: 600; width: 148px; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.update-item .u-chapter { flex: 1; color: var(--ink-3); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.update-item .u-time { flex-shrink: 0; font-size: 12.5px; color: var(--ink-3); }

/* ------------------------------ 响应式 ------------------------------ */
@media (max-width: 1080px) {
    .book-grid, .book-grid.g5, .book-grid.g6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .hero { grid-template-columns: 1fr; }
    .hero-side { display: none; }
    .detail-meta { grid-template-columns: repeat(2, auto); }
    .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 22px; }
    .footer-about { grid-column: 1 / -1; max-width: 520px; }
}

@media (max-width: 820px) {
    .wrap, .header-inner { padding: 0 16px; }
    .header-search input { width: 150px; }
    .header-search input:focus { width: 170px; }
    .header-nav { display: none; }
    .book-grid, .book-grid.g5, .book-grid.g6, .book-grid.g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .detail-hero { grid-template-columns: 132px minmax(0, 1fr); gap: 20px; padding: 20px; }
    .detail-title { font-size: 23px; }
    .chapter-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .user-layout { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: 1fr; }
    .slider { min-height: 260px; }
    .slide { padding: 28px 24px; }
    .slide h2 { font-size: 26px; }
    .reader-content { font-size: 17px; }
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 18px; }
    .footer-about { grid-column: 1 / -1; max-width: none; }
    .site-footer { padding: 44px 0 22px; }
    .site-footer::after { font-size: 84px; bottom: -24px; }
    .footer-bottom { justify-content: flex-start; }
}

@media (max-width: 560px) {
    .footer-grid { grid-template-columns: 1fr; }
    .footer-col h4 { padding-bottom: 9px; margin-bottom: 9px; }
    .fb-top { width: 100%; justify-content: center; }
}

/* ============================================================
   v2 · 首页 / 分类页 / 内容页 重构
   ============================================================ */

/* ------------------------------ 通用微调 ------------------------------ */
.page { padding: 26px 0 70px; }
.section { margin-bottom: 48px; }

.section-head { align-items: center; margin-bottom: 22px; }
.section-title::before {
    background: linear-gradient(180deg, var(--c, var(--brand)), color-mix(in srgb, var(--c, var(--brand)) 52%, #ffffff));
}

/* ------------------------------ 首页 · 首屏 ------------------------------ */
.hero {
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 22px;
    margin-bottom: 24px;
}

.slider { min-height: 362px; border-radius: 24px; }

.slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 0 54px;
    opacity: 0;
    transition: opacity .6s ease;
    background:
        radial-gradient(circle at 86% 8%, rgba(255, 255, 255, .22), transparent 52%),
        linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 38%, #0a0f15));
    color: #fff;
}
.slide.active { opacity: 1; }
.slide::after { display: none; }

.slide-copy { position: relative; flex: 1; min-width: 0; }

.slide-tag {
    display: inline-block;
    align-self: auto;
    padding: 5px 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .24);
    font-size: 12px;
    letter-spacing: 1.5px;
    margin-bottom: 0;
}

.slide h2 {
    font-family: var(--serif);
    font-size: 40px;
    letter-spacing: 3px;
    line-height: 1.28;
    margin: 16px 0 14px;
}
.slide p { font-size: 15px; opacity: .88; max-width: 430px; margin-bottom: 16px; }

.slide-meta { display: flex; align-items: center; gap: 12px; font-size: 13px; opacity: .82; margin-bottom: 26px; }
.slide-meta .sep { width: 4px; height: 4px; border-radius: 50%; background: rgba(255, 255, 255, .6); }

.slide .btn {
    align-self: flex-start;
    height: 44px;
    padding: 0 26px;
    border-radius: 12px;
    background: #fff;
    color: var(--c);
    font-weight: 600;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .22);
}

.slide-art { position: relative; flex-shrink: 0; }

.slide-cover {
    position: relative;
    width: 158px;
    aspect-ratio: 3 / 4.1;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 5px;
    padding: 17px 15px;
    color: #fff;
    overflow: hidden;
    transform: rotate(2deg);
    background: linear-gradient(155deg, var(--c, var(--brand)), color-mix(in srgb, var(--c, var(--brand)) 46%, #0a0f15));
    background-size: cover;
    background-position: center;
    box-shadow: 0 24px 50px rgba(0, 0, 0, .42);
}
.slide-cover::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, rgba(255, 255, 255, .18), transparent 48%);
}
.slide-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, .58), rgba(0, 0, 0, 0) 62%);
}
.slide-cover .sc-name { position: relative; font-family: var(--serif); font-size: 17px; letter-spacing: 1.5px; line-height: 1.4; }
.slide-cover .sc-author { position: relative; font-size: 11.5px; opacity: .82; }

/* 使用（含自动生成的）封面图时，隐藏封面上的占位书名 */
.slide-cover.has-img .sc-name,
.slide-cover.has-img .sc-author { display: none; }

.slider-dots { left: 54px; bottom: 26px; }

.slide-bg { position: absolute; inset: 0; z-index: 0; background-size: cover; background-position: center right; }
.slide-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(100deg,
            color-mix(in srgb, var(--c) 92%, #0a0f15) 0%,
            color-mix(in srgb, var(--c) 70%, #0a0f15) 34%,
            rgba(9, 13, 19, .42) 66%,
            rgba(9, 13, 19, .30) 100%);
}

/* 底图之上、文字之下的内容层 */
.slide-copy, .slide-art { z-index: 2; }

/* 侧栏榜单 */
.hero-side { padding: 20px 20px 12px; border-radius: 24px; }

.side-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.side-head h3 { font-family: var(--serif); font-size: 17px; display: flex; align-items: center; gap: 8px; }
.side-head h3::before { content: ''; width: 4px; height: 16px; border-radius: 2px; background: var(--brand); }
.side-more { font-size: 12.5px; color: var(--ink-3); }
.side-more:hover { color: var(--brand); }

.side-rank-item { display: flex; align-items: center; gap: 11px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.side-rank-item:last-child { border-bottom: none; }

.side-rank-no {
    width: 20px;
    height: 20px;
    border-radius: 7px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 700;
    font-family: var(--serif);
    background: var(--bg-soft);
    color: var(--ink-3);
}
.side-rank-no.top { background: linear-gradient(150deg, var(--brand), #58a08c); color: #fff; }
.side-rank-item:nth-of-type(1) .side-rank-no.top { background: linear-gradient(150deg, #e0644f, #c0452f); }
.side-rank-item:nth-of-type(2) .side-rank-no.top { background: linear-gradient(150deg, #dda43c, #c08a2a); }
.side-rank-item:nth-of-type(3) .side-rank-no.top { background: linear-gradient(150deg, #5c8ee0, #3f6fc0); }

.rank-thumb {
    width: 26px;
    height: 35px;
    border-radius: 5px;
    flex-shrink: 0;
    background: linear-gradient(155deg, var(--c, var(--brand)), color-mix(in srgb, var(--c, var(--brand)) 52%, #0c1017));
    box-shadow: 0 3px 8px rgba(31, 29, 26, .16);
}

.side-rank-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.side-rank-name { flex: none; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-rank-name:hover { color: var(--brand); }
.side-rank-sub { font-size: 11.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-rank-num { font-size: 12.5px; color: var(--ink-3); flex-shrink: 0; }

/* ------------------------------ 站点数据条 ------------------------------ */
.stat-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 48px;
}
.stat-cell { padding: 24px 20px; text-align: center; border-right: 1px solid var(--line); }
.stat-cell:last-child { border-right: none; }
.stat-cell b { display: block; font-family: var(--serif); font-size: 27px; letter-spacing: 1px; color: var(--brand); }
.stat-cell span { font-size: 13px; color: var(--ink-3); }

/* ------------------------------ 分类胶囊 / 封面 ------------------------------ */
.cat-chip { padding: 11px 18px; border-radius: 13px; }
.cat-chip .dot { box-shadow: 0 0 0 4px color-mix(in srgb, var(--c, var(--brand)) 15%, transparent); }

.book-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.book-cover.has-img .cover-name,
.book-cover.has-img .cover-author { display: none; }

/* ------------------------------ 侧栏堆叠 ------------------------------ */
.side-stack { display: flex; flex-direction: column; gap: 20px; }
.side-rank-body { padding: 12px 20px; }

/* ------------------------------ 分类页横幅 ------------------------------ */
.cat-banner {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    padding: 30px 32px;
    margin-bottom: 22px;
    color: #fff;
    box-shadow: var(--shadow-md);
    background:
        radial-gradient(circle at 88% 6%, rgba(255, 255, 255, .2), transparent 52%),
        linear-gradient(135deg, var(--c, var(--brand)), color-mix(in srgb, var(--c, var(--brand)) 40%, #0a0f15));
}
.cat-banner h1 { font-family: var(--serif); font-size: 30px; letter-spacing: 3px; margin-bottom: 10px; }
.cat-banner p { font-size: 14px; opacity: .88; max-width: 620px; margin-bottom: 16px; }
.cat-banner-meta { display: flex; gap: 24px; font-size: 13px; opacity: .9; }
.cat-banner-meta b { font-family: var(--serif); font-size: 16px; }

.cat-banner-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.cat-banner-nav a {
    padding: 6px 15px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .22);
    font-size: 13.5px;
    transition: .16s;
}
.cat-banner-nav a:hover { background: rgba(255, 255, 255, .32); }
.cat-banner-nav a.active { background: #fff; border-color: #fff; color: var(--c, var(--brand)); font-weight: 600; }

.filter-bar { padding: 6px 20px; }
.filter-row { padding: 11px 0; }
.filter-row + .filter-row { border-top: 1px dashed var(--line); }
.filter-options a { padding: 6px 15px; border-radius: 9px; }

/* ------------------------------ 内容页 ------------------------------ */
.detail-hero {
    grid-template-columns: 224px minmax(0, 1fr);
    gap: 34px;
    padding: 32px;
    border-radius: 22px;
    margin-bottom: 26px;
}
.detail-cover .book-cover { padding: 22px 20px; }

.detail-main { min-width: 0; }
.detail-title { font-size: 34px; margin-bottom: 12px; }

.detail-author { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; font-size: 13.5px; color: var(--ink-3); }
.detail-author .avatar-circle { width: 26px; height: 26px; font-size: 13px; }
.detail-author .da-name { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.detail-author a { color: var(--brand); }

.detail-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.detail-stats .ds { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; text-align: center; }
.detail-stats .ds b { display: block; font-family: var(--serif); font-size: 20px; color: var(--ink); }
.detail-stats .ds span { font-size: 12px; color: var(--ink-3); }

.detail-intro {
    font-size: 14.5px;
    color: var(--ink-2);
    line-height: 1.9;
    margin-bottom: 22px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.btn-lg { height: 46px; padding: 0 26px; font-size: 15px; border-radius: 12px; }

/* 选项卡 */
.detail-tabs { overflow: hidden; }

.tab-head { display: flex; gap: 4px; padding: 0 14px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab-head a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 16px;
    font-size: 15px;
    color: var(--ink-2);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    white-space: nowrap;
    transition: .16s;
}
.tab-head a:hover { color: var(--brand); }
.tab-head a.active { color: var(--brand); font-weight: 600; border-bottom-color: var(--brand); }
.tab-badge { font-size: 11px; padding: 1px 7px; border-radius: 20px; background: var(--bg-soft); color: var(--ink-3); }
.tab-head a.active .tab-badge { background: var(--brand-soft); color: var(--brand); }

.tab-panel { display: none; padding: 24px; }
.tab-panel.active { display: block; animation: tabIn .22s ease; }
.tab-panel.flush { padding: 0 0 22px; }
@keyframes tabIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.tab-foot { padding: 8px 24px 4px; text-align: center; }
.detail-intro-full { font-size: 14.5px; color: var(--ink-2); line-height: 1.95; margin-bottom: 22px; }

.info-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 30px; }
.info-list li { display: flex; gap: 12px; font-size: 14px; padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.info-list li span { width: 62px; flex-shrink: 0; color: var(--ink-3); }

.tab-panel .chapter-list { padding: 6px 0; }

/* ------------------------------ 响应式补充 ------------------------------ */
@media (max-width: 1080px) {
    .hero { grid-template-columns: 1fr; }
    .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat-cell:nth-child(2) { border-right: none; }
    .stat-cell:nth-child(1),
    .stat-cell:nth-child(2) { border-bottom: 1px solid var(--line); }
    .detail-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
    .slider { min-height: 300px; }
    .slide { padding: 0 26px; gap: 20px; }
    .slide h2 { font-size: 26px; letter-spacing: 1.5px; }
    .slide-cover { width: 110px; }
    .slider-dots { left: 26px; }
    .cat-banner { padding: 22px; }
    .cat-banner h1 { font-size: 23px; letter-spacing: 2px; }
    .detail-hero { grid-template-columns: 130px minmax(0, 1fr); }
    .detail-title { font-size: 22px; }
    .detail-cover .cover-name { font-size: 17px; }
    .detail-stats .ds b { font-size: 16px; }
    .detail-stats .ds span { font-size: 11px; }
    .tab-panel { padding: 18px; }
    .info-list { grid-template-columns: 1fr; }
    .two-col { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .slide-art { display: none; }
    .slide { padding: 0 22px; }
    .slide h2 { font-size: 22px; letter-spacing: 1px; }
    .stat-cell b { font-size: 22px; }
    .cat-banner-nav a { padding: 5px 12px; font-size: 12.5px; }
}

/* ------------------------------ 广告位 ------------------------------ */
.ad-zone {
    position: relative;
    margin: 26px 0;
    padding: 22px 18px 18px;
    border: 1px dashed var(--line-2);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(255, 255, 255, .72), rgba(255, 255, 255, .32));
}
.ad-zone-label {
    position: absolute;
    top: -9px;
    left: 18px;
    padding: 0 9px;
    background: var(--bg);
    font-size: 11px;
    letter-spacing: 3px;
    color: var(--ink-3);
}
.ad-zone-list { display: flex; flex-wrap: wrap; gap: 14px; }

.ad-item { transition: .18s; }

.ad-item-text {
    flex: 1 1 300px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.ad-item-text:hover {
    border-color: var(--brand);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.ad-item-tag {
    flex-shrink: 0;
    padding: 2px 9px;
    border-radius: 20px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 11px;
    letter-spacing: 1px;
}
.ad-item-text-body { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.5; }
.ad-item-text-body b { font-size: 14.5px; font-weight: 600; }
.ad-item-text-body span {
    font-size: 12.5px;
    color: var(--ink-3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ad-item-arrow { flex-shrink: 0; color: var(--brand); font-size: 15px; transition: .18s; }
.ad-item-text:hover .ad-item-arrow { transform: translateX(3px); }

.ad-item-image {
    flex: 1 1 100%;
    display: block;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
}
.ad-item-image img { width: 100%; }
.ad-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 96px;
    background: linear-gradient(135deg, var(--brand), #4c8f7d);
    color: #fff;
    font-family: var(--serif);
    font-size: 15px;
    letter-spacing: 2px;
}
.ad-item-html { flex: 1 1 100%; }

@media (max-width: 720px) {
    .ad-zone { padding: 20px 14px 14px; }
    .ad-item-text { flex: 1 1 100%; }
}

/* ============================================================
   作者中心 · 投稿与在线写作
   ============================================================ */
.author-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 16px; flex-wrap: wrap; margin-bottom: 18px;
}
.author-head h1 { font-family: var(--serif); font-size: 24px; }
.author-head p { font-size: 13.5px; color: var(--ink-3); margin-top: 6px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.form-grid .full { grid-column: 1 / -1; }
.form-item .checkbox-line {
    display: flex; align-items: center; gap: 8px;
    font-size: 14px; color: var(--ink-2); font-weight: 400; margin-bottom: 0;
}

.status-badge {
    display: inline-flex; align-items: center;
    height: 22px; padding: 0 9px; border-radius: 999px;
    font-size: 12px; font-weight: 600; white-space: nowrap;
}
.status-badge.pending { background: #fff6e5; color: #b9811a; }
.status-badge.passed { background: #e9f6ef; color: #2f8f5b; }
.status-badge.rejected { background: #fdecec; color: #c94b4b; }
.status-badge.off { background: var(--bg-soft); color: var(--ink-3); }

.work-list { display: flex; flex-direction: column; }
.work-item {
    display: flex; gap: 16px; padding: 18px 22px;
    border-bottom: 1px solid var(--line); align-items: flex-start;
}
.work-item:last-child { border-bottom: none; }
.work-thumb {
    width: 76px; flex-shrink: 0; aspect-ratio: 3 / 4; border-radius: 8px;
    position: relative; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(160deg, var(--c, #2f6b5e), #10151b);
    font-family: var(--serif); color: #fff; font-size: 13px;
    text-align: center; padding: 6px; overflow: hidden; box-shadow: var(--shadow-sm);
}
.work-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.work-main { flex: 1; min-width: 0; }
.work-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.work-title a { font-family: var(--serif); font-size: 17px; font-weight: 600; }
.work-title a:hover { color: var(--brand); }
.work-meta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; font-size: 13px; color: var(--ink-3); }
.work-tip {
    margin-top: 10px; font-size: 13px; color: #b9811a;
    background: #fff9ef; border: 1px solid #f5e3c4; border-radius: 8px; padding: 9px 12px;
}
.work-tip.err { color: #c94b4b; background: #fdf3f3; border-color: #f3d5d5; }
.work-ops { display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }

.chapter-row {
    display: flex; align-items: center; gap: 14px;
    padding: 13px 22px; border-bottom: 1px solid var(--line); font-size: 14px;
}
.chapter-row:last-child { border-bottom: none; }
.chapter-row .no { width: 42px; flex-shrink: 0; color: var(--ink-3); font-size: 13px; }
.chapter-row .tt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chapter-row .tt a:hover { color: var(--brand); }
.chapter-row .wd { width: 90px; flex-shrink: 0; color: var(--ink-3); font-size: 13px; }
.chapter-row .ops { display: flex; gap: 8px; flex-shrink: 0; }

.editor-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.textarea.big { min-height: 420px; font-size: 15.5px; line-height: 1.9; }

.stat-grid.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat-grid.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
a.stat-box { display: block; transition: border-color .18s, box-shadow .18s, transform .18s; }
a.stat-box:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
a.stat-box.active { border-color: var(--brand); background: var(--brand-soft); }

.preview-body { font-family: var(--serif); font-size: 17px; line-height: 2; color: var(--ink-2); }
.preview-body p { margin-bottom: 1em; text-indent: 2em; }
.preview-body p:last-child { margin-bottom: 0; }

/* ------------------------------ 提示条 ------------------------------ */
.notice {
    display: block; padding: 13px 18px; border-radius: 12px; font-size: 14px; line-height: 1.75;
    background: var(--bg-soft); border: 1px solid var(--line); color: var(--ink-2);
}
.notice + .notice { margin-top: 12px; }
.notice-warn { background: #fff8ec; border-color: #f3e0bd; color: #8a6520; }
.notice-warn strong { color: #a9761b; }
.notice-msg {
    background: var(--brand-soft); border-color: #cfe3dc; color: #23574d;
    margin-bottom: 18px; transition: box-shadow .18s;
}
.notice-msg:hover { box-shadow: var(--shadow-sm); }
.notice-msg strong { color: var(--brand); }
.notice-sub { display: block; font-size: 13px; color: var(--ink-3); margin-top: 3px; }

/* ------------------------------ 写作进度 ------------------------------ */
.write-progress { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 13px 16px; }
.wp-head { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; font-size: 13.5px; color: var(--ink-2); }
.wp-head b { color: var(--brand); }
.wp-req { color: var(--ink-3); }
.wp-bar { height: 7px; border-radius: 99px; background: #e6eae7; overflow: hidden; margin: 9px 0 7px; }
.wp-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand), #4f9a86); transition: width .3s; }
.wp-bar.sm { margin: 8px 0 6px; }
.wp-foot { font-size: 12.5px; color: var(--ink-3); }

/* ------------------------------ 封面上传 ------------------------------ */
.cover-upload { display: flex; gap: 18px; align-items: flex-start; }
.cover-preview {
    width: 128px; height: 172px; flex-shrink: 0; border-radius: 10px; overflow: hidden;
    border: 1px solid var(--line); background: var(--bg-soft);
    display: flex; align-items: center; justify-content: center;
}
.cover-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-blank { font-size: 12.5px; color: var(--ink-3); }
.cover-op { flex: 1; min-width: 0; }
.cover-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.cover-tip { font-size: 12.5px; color: var(--ink-3); line-height: 1.7; margin-bottom: 6px; }

/* ------------------------------ 消息中心 ------------------------------ */
.msg-list { border-bottom: 1px solid var(--line); }
.msg-item { display: flex; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--line); transition: background .15s; }
.msg-item:last-child { border-bottom: none; }
.msg-item:hover { background: var(--bg-soft); }
.msg-item.unread { background: #f7fbfa; }
.msg-item.unread:hover { background: #f0f8f5; }
.msg-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 8px; flex-shrink: 0; background: transparent; }
.msg-item.unread .msg-dot { background: var(--brand); }
.msg-main { flex: 1; min-width: 0; }
.msg-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.msg-title { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.msg-time { margin-left: auto; font-size: 12.5px; color: var(--ink-3); }
.msg-text { font-size: 13.5px; color: var(--ink-3); line-height: 1.8; margin-top: 5px; }

.dot-badge, .menu-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 17px; height: 17px; padding: 0 5px; border-radius: 99px;
    background: var(--danger); color: #fff; font-size: 11px; font-weight: 600; line-height: 1;
}
.dot-badge { margin-left: 6px; }
.menu-badge { margin-left: 6px; vertical-align: top; }

/* ------------------------------ 创作者细节 ------------------------------ */
.status-badge.draft { background: #eef2ff; color: #4c5fd5; }
.editor-note { font-size: 12.5px; color: var(--ink-3); line-height: 1.7; margin-top: 8px; }
.save-tip.ok { color: var(--brand); }
.save-tip.err { color: var(--danger); }
.editor-bar .save-tip { margin-right: auto; margin-left: 12px; }

@media (max-width: 720px) {
    .work-item { flex-wrap: wrap; }
    .work-ops { flex-direction: row; }
    .chapter-row .wd { display: none; }
    .form-grid { grid-template-columns: 1fr; }
    .author-head h1 { font-size: 20px; }
    .stat-grid.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat-grid.g5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cover-upload { flex-direction: column; }
    .msg-time { margin-left: 0; width: 100%; }
}
