/* web_app/static/yqxs.css
 * 第九轮 S-2/S-3：从 templates/layout.php 的 <style> 块外置而来（原 475-2719 行，共 2245 行）。
 * 目的：为 CSP 去除 style-src 的 unsafe-inline 铺路。
 * 外置前已核实块内无任何 PHP 插值，故可安全静态化。
 * 由 web_app/templates/layout.php 以 <link rel="stylesheet"> 引用。
 */

        /* 语义化 CSS 主题变量定义（支持 经典纸白、复古羊皮、豆沙护眼绿、极夜暗黑） */
        :root {
            --bg-page: #f7f6f2;
            --bg-card: #ffffff;
            --bg-subtle: #faf9f6;
            --bg-hover: #f3f0e8;
            --border-color: #ebe8df;
            --border-subtle: #f0eee6;
            --text-primary: #2b2b2b;
            --text-secondary: #555555;
            --text-muted: #888888;
            --primary-color: #b83b5e;
            --primary-hover: #9b2e4d;
            --primary-light: #fdf0f3;
            --primary-border: #f2c7d3;
            --shadow-sm: 0 1px 3px rgba(0,0,0,0.03);
            --shadow-md: 0 4px 14px rgba(184, 59, 94, 0.08);
            --drawer-overlay: rgba(0, 0, 0, 0.45);
            --drawer-overlay: rgba(0, 0, 0, 0.45);
            --reader-font-size: 18px;
            --reader-line-height: 2.0;
            --reader-max-width: 860px;
            --reader-font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
        }

        [data-theme="sepia"] {
            --bg-page: #f4ecd8;
            --bg-card: #fdf7e9;
            --bg-subtle: #eee3c8;
            --bg-hover: #e5d7b5;
            --border-color: #dfcfab;
            --border-subtle: #e8dbbc;
            --text-primary: #433422;
            --text-secondary: #5e4932;
            --text-muted: #8a7356;
            --primary-color: #a44222;
            --primary-hover: #833116;
            --primary-light: #fae9df;
            --primary-border: #f0cbb5;
            --shadow-sm: 0 1px 3px rgba(67, 52, 34, 0.06);
            --shadow-md: 0 4px 14px rgba(164, 66, 34, 0.12);
            --drawer-overlay: rgba(50, 38, 25, 0.55);
        }

        [data-theme="eyegreen"] {
            --bg-page: #dcecd2;
            --bg-card: #eaf4e2;
            --bg-subtle: #d0e4c5;
            --bg-hover: #c4dcb7;
            --border-color: #bed7b0;
            --border-subtle: #cde4c1;
            --text-primary: #1e3520;
            --text-secondary: #315134;
            --text-muted: #56775a;
            --primary-color: #2e7d32;
            --primary-hover: #1b5e20;
            --primary-light: #e8f5e9;
            --primary-border: #c8e6c9;
            --shadow-sm: 0 1px 3px rgba(30, 53, 32, 0.06);
            --shadow-md: 0 4px 14px rgba(46, 125, 50, 0.12);
            --drawer-overlay: rgba(25, 45, 27, 0.55);
        }

        [data-theme="dark"] {
            --bg-page: #131417;
            --bg-card: #1c1d22;
            --bg-subtle: #24262c;
            --bg-hover: #2d3038;
            --border-color: #31343d;
            --border-subtle: #292b33;
            --text-primary: #e6e8ec;
            --text-secondary: #adb3be;
            --text-muted: #79808d;
            --primary-color: #e06283;
            --primary-hover: #eb7c9a;
            --primary-light: #321923;
            --primary-border: #5a2736;
            --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
            --shadow-md: 0 4px 16px rgba(0,0,0,0.5);
            --drawer-overlay: rgba(0, 0, 0, 0.7);
        }

        * { box-sizing: border-box; margin: 0; padding: 0; }
        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang TC", "Microsoft JhengHei", "PingFang SC", "Microsoft YaHei", sans-serif;
            background-color: var(--bg-page);
            color: var(--text-primary);
            line-height: 1.8;
            transition: background-color 0.25s ease, color 0.25s ease;
        }

        .header {
            background: rgba(255, 255, 255, 0.92);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border-bottom: 1px solid var(--border-color);
            padding: 8px 16px;
            position: sticky;
            top: 0;
            z-index: 1000;
            box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
            transition: background-color 0.25s ease, border-color 0.25s ease;
        }
        [data-theme="dark"] .header {
            background: rgba(24, 25, 30, 0.92);
            box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
        }
        .header-inner {
            max-width: 1140px;
            margin: 0 auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 12px;
        }
        .logo {
            font-size: 1.15rem;
            font-weight: 800;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            letter-spacing: 0.5px;
            white-space: nowrap;
            flex-shrink: 0;
            margin-right: 6px;
        }
        .logo:hover {
            transform: translateY(-1px);
        }
        .logo-mark {
            font-size: 1.25rem;
            display: inline-block;
            filter: drop-shadow(0 2px 4px rgba(184, 59, 94, 0.25));
            transition: transform 0.25s ease;
        }
        .logo:hover .logo-mark {
            transform: scale(1.15) rotate(8deg);
        }
        .logo-text {
            background: linear-gradient(135deg, var(--primary-color) 0%, #d84315 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        .logo-tag {
            font-size: 0.65rem;
            font-weight: 700;
            color: #fff;
            background: linear-gradient(135deg, #b83b5e 0%, #e05275 100%);
            padding: 1px 6px;
            border-radius: 10px;
            letter-spacing: 0.5px;
        }
        .header-right {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-shrink: 1;
            justify-content: flex-end;
            min-width: 0;
        }
        .nav-menu {
            display: inline-flex;
            align-items: center;
            gap: 2px;
            background: var(--bg-subtle);
            padding: 3px 4px;
            border-radius: 20px;
            border: 1px solid var(--border-subtle);
            flex-shrink: 0;
        }
        .nav-link {
            font-size: 0.85rem;
            color: var(--text-secondary);
            text-decoration: none;
            font-weight: 500;
            padding: 4px 8px;
            border-radius: 15px;
            transition: all 0.15s ease;
            white-space: nowrap;
            display: inline-flex;
            align-items: center;
            gap: 2px;
        }
        .nav-link:hover {
            color: var(--primary-color);
            background: rgba(184, 59, 94, 0.08);
        }
        .nav-link.active {
            color: #fff;
            background: linear-gradient(135deg, #b83b5e 0%, #cf436a 100%);
            font-weight: 600;
            box-shadow: 0 2px 6px rgba(184, 59, 94, 0.28);
        }
        .nav-link.active .dropdown-chevron {
            fill: #fff;
        }
        .header-tools {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            flex-shrink: 0;
        }

        /* 顶部导航下拉菜单（排行榜二级分类） */
        .nav-item-dropdown {
            position: relative;
            display: inline-flex;
            align-items: center;
        }
        .dropdown-chevron {
            width: 12px;
            height: 12px;
            fill: currentColor;
            opacity: 0.75;
            transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
        }
        .nav-item-dropdown:hover .dropdown-chevron {
            transform: rotate(180deg);
        }
        .nav-dropdown-panel {
            position: absolute;
            top: calc(100% + 8px);
            left: 50%;
            transform: translateX(-50%) translateY(-6px);
            background: var(--bg-card);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid var(--border-color);
            border-radius: 14px;
            box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(184, 59, 94, 0.06);
            padding: 8px;
            min-width: 205px;
            display: flex;
            flex-direction: column;
            gap: 4px;
            z-index: 1100;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
        }
        [data-theme="dark"] .nav-dropdown-panel {
            box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
        }
        .nav-dropdown-panel::before {
            content: '';
            position: absolute;
            top: -6px;
            left: 50%;
            transform: translateX(-50%) rotate(45deg);
            width: 10px;
            height: 10px;
            background: inherit;
            border-top: 1px solid var(--border-color);
            border-left: 1px solid var(--border-color);
        }
        .nav-dropdown-panel::after {
            content: '';
            position: absolute;
            top: -12px;
            left: 0;
            right: 0;
            height: 12px;
        }
        .nav-item-dropdown:hover .nav-dropdown-panel,
        .nav-item-dropdown:focus-within .nav-dropdown-panel {
            opacity: 1;
            pointer-events: auto;
            transform: translateX(-50%) translateY(0);
        }
        .dropdown-link {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px 12px;
            border-radius: 8px;
            text-decoration: none;
            transition: all 0.15s ease;
            white-space: nowrap;
        }
        .dropdown-link:hover {
            background: rgba(184, 59, 94, 0.08);
        }
        .dropdown-link.active {
            background: rgba(184, 59, 94, 0.12);
        }
        .dropdown-link-icon {
            width: 28px;
            height: 28px;
            border-radius: 7px;
            background: var(--bg-subtle);
            border: 1px solid var(--border-subtle);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.95rem;
            flex-shrink: 0;
        }
        .dropdown-link-title {
            font-size: 0.88rem;
            font-weight: 600;
            color: var(--text-primary);
            line-height: 1.2;
            transition: color 0.15s;
        }
        .dropdown-link:hover .dropdown-link-title,
        .dropdown-link.active .dropdown-link-title {
            color: var(--primary-color);
        }
        .dropdown-link-desc {
            font-size: 0.72rem;
            color: var(--text-muted);
            margin-top: 2px;
        }

        /* 顶部功能操作区：统一 34px 精英高度 */
        .history-btn {
            height: 34px;
            box-sizing: border-box;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            background: var(--bg-subtle);
            border: 1px solid var(--border-color);
            color: var(--text-secondary);
            padding: 0 12px;
            border-radius: 17px;
            font-size: 0.84rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            white-space: nowrap;
            flex-shrink: 0;
        }
        .history-btn:hover {
            color: var(--primary-color);
            border-color: var(--primary-border);
            background: rgba(184, 59, 94, 0.08);
        }
        .history-btn svg {
            width: 14px;
            height: 14px;
            fill: currentColor;
        }
        .history-badge {
            background: linear-gradient(135deg, #b83b5e 0%, #e05275 100%);
            color: #fff;
            font-size: 0.68rem;
            font-weight: 700;
            line-height: 1;
            padding: 2px 6px;
            border-radius: 10px;
            margin-left: 2px;
        }

        .lang-switch {
            height: 34px;
            line-height: 32px;
            box-sizing: border-box;
            font-size: 0.82rem;
            padding: 0 12px;
            border-radius: 17px;
            border: 1px solid var(--primary-border);
            color: var(--primary-color);
            background: rgba(184, 59, 94, 0.04);
            text-decoration: none;
            font-weight: 600;
            transition: all 0.2s ease;
            white-space: nowrap;
            flex-shrink: 0;
            display: inline-block;
        }
        .lang-switch:hover {
            background: var(--primary-color);
            color: #fff;
            border-color: var(--primary-color);
            box-shadow: 0 2px 8px rgba(184, 59, 94, 0.25);
        }

        .container {
            max-width: 960px;
            margin: 20px auto;
            padding: 0 16px;
            min-height: calc(100vh - 160px);
        }
        .container.reader-container {
            max-width: var(--reader-max-width, 860px);
            transition: max-width 0.2s ease;
        }
        .card {
            background: var(--bg-card);
            border-radius: 8px;
            padding: 22px;
            box-shadow: var(--shadow-sm);
            margin-bottom: 20px;
            border: 1px solid var(--border-subtle);
            transition: background-color 0.25s ease, border-color 0.25s ease;
        }
        .breadcrumbs {
            font-size: 0.86rem;
            color: var(--text-muted);
            margin-bottom: 18px;
        }
        .breadcrumbs a {
            color: var(--text-secondary);
            text-decoration: none;
        }
        .breadcrumbs a:hover {
            color: var(--primary-color);
        }

        /* 字母导航条 */
        .letter-nav {
            display: flex;
            flex-wrap: wrap;
            gap: 4px;
            margin: 14px 0 20px 0;
            background: var(--bg-subtle);
            padding: 10px;
            border-radius: 6px;
            border: 1px solid var(--border-color);
        }
        .letter-nav a {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 32px;
            height: 32px;
            border-radius: 4px;
            font-size: 0.88rem;
            font-weight: 600;
            color: var(--text-secondary);
            text-decoration: none;
            transition: all 0.15s;
        }
        .letter-nav a:hover {
            background: var(--bg-hover);
            color: var(--primary-color);
        }
        .letter-nav a.active {
            background: var(--primary-color);
            color: #fff;
        }
        /* 空首字母：保留字母表视觉，但不可点（该页 404，不给站内死链）。
           见 internal/server/pages.go letterPage 的空页判定。 */
        .letter-nav .letter-empty {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 32px;
            height: 32px;
            border-radius: 4px;
            font-size: 0.88rem;
            font-weight: 600;
            color: var(--text-muted, var(--text-secondary));
            opacity: 0.35;
            cursor: not-allowed;
        }

        /* 书籍卡片流与封面布局 */
        .novel-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 16px;
        }
        .novel-card {
            border: 1px solid var(--border-color);
            border-radius: 6px;
            padding: 14px;
            background: var(--bg-card);
            display: flex;
            gap: 14px;
            transition: all 0.2s;
        }
        .novel-card:hover {
            border-color: var(--primary-color);
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
        }
        .novel-card-content {
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }
        .novel-title {
            font-size: 1.08rem;
            font-weight: 600;
            color: var(--text-primary);
            text-decoration: none;
            display: block;
            margin-bottom: 4px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .novel-title:hover {
            color: var(--primary-color);
        }
        /* 无障碍/SEO：视觉隐藏但仍可被屏幕阅读器与搜索引擎解析的区块标题 */
        .sr-only {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
            border: 0;
        }
        .novel-meta {
            font-size: 0.82rem;
            color: var(--text-muted);
            margin-bottom: 6px;
            line-height: 1.5;
        }
        .novel-meta a {
            color: var(--text-secondary);
            text-decoration: none;
            font-weight: 500;
        }
        .novel-meta a:hover {
            color: var(--primary-color);
        }
        .novel-desc {
            font-size: 0.83rem;
            color: var(--text-secondary);
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            line-height: 1.6;
            margin-bottom: 6px;
        }

        /* 首页专用一行2本卡片网格布局 */
        .novel-grid-2col {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 18px;
        }
        .novel-card-2col {
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 14px;
            background: var(--bg-card);
            display: flex;
            gap: 14px;
            transition: all 0.2s;
            box-shadow: var(--shadow-sm);
        }
        .novel-card-2col:hover {
            border-color: var(--primary-color);
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
        }
        .novel-card-2col .card-body {
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }
        .novel-card-2col .card-header {
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            gap: 8px;
            margin-bottom: 4px;
        }
        .novel-card-2col .card-title {
            font-size: 1.08rem;
            font-weight: 700;
            color: var(--text-primary);
            text-decoration: none;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            flex: 1;
        }
        .novel-card-2col .card-title:hover {
            color: var(--primary-color);
        }
        /* S-115: 卡片标题语义化为 <h3>；由 h3 承接原 flex 布局角色，标题链接保留省略号截断。
           不使用 display:contents —— 部分浏览器会因此将标题移出无障碍树，反而削弱语义。 */
        .card-title-h {
            flex: 1;
            min-width: 0;
            margin: 0;
            font-size: inherit;
            font-weight: inherit;
        }
        .card-title-h .card-title {
            display: block;
        }
        .novel-card-2col .card-ch-badge {
            font-size: 0.75rem;
            color: var(--primary-color);
            background: var(--primary-light);
            border: 1px solid var(--primary-border);
            padding: 2px 7px;
            border-radius: 10px;
            font-weight: 600;
            white-space: nowrap;
        }
        .novel-card-2col .card-author-line {
            font-size: 0.84rem;
            color: var(--text-muted);
            margin-bottom: 6px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        .novel-card-2col .card-author-line a {
            color: var(--text-secondary);
            text-decoration: none;
            font-weight: 500;
        }
        .novel-card-2col .card-author-line a:hover {
            color: var(--primary-color);
        }
        .novel-card-2col .card-words-tag {
            font-size: 0.78rem;
            color: var(--text-muted);
        }
        .novel-card-2col .card-meta-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 5px;
            margin-bottom: 8px;
        }
        .novel-card-2col .meta-pill {
            font-size: 0.75rem;
            padding: 2px 6px;
            border-radius: 4px;
            display: inline-flex;
            align-items: center;
            line-height: 1.4;
            max-width: 140px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        a.meta-pill {
            text-decoration: none;
            cursor: pointer;
            transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
        }
        a.meta-pill:hover {
            transform: translateY(-1px);
            filter: brightness(0.96);
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
            text-decoration: none;
        }
        .pill-boy { background: #eef3fc; color: #1967d2; border: 1px solid #d2e3fc; }
        .pill-girl { background: #fdf0f4; color: #c5221f; border: 1px solid #fad2cf; }
        .pill-era { background: var(--bg-subtle); color: var(--text-secondary); border: 1px solid var(--border-color); }
        .pill-location { background: #e6f4ea; color: #137333; border: 1px solid #ceead6; }
        .pill-plot { background: #fff8e1; color: #b76e00; border: 1px solid #ffe082; }
        .pill-pub { background: #f3e8fd; color: #6200ea; border: 1px solid #e1bee7; }

        [data-theme="dark"] .pill-boy { background: #162438; color: #7cb3f3; border-color: #243b5a; }
        [data-theme="dark"] .pill-girl { background: #381a22; color: #f28b9d; border-color: #552735; }
        [data-theme="dark"] .pill-location { background: #152d1c; color: #81c995; border-color: #224a2e; }
        [data-theme="dark"] .pill-plot { background: #362912; color: #fdd663; border-color: #58411b; }
        [data-theme="dark"] .pill-pub { background: #2c1840; color: #d7aefb; border-color: #482766; }

        .rating-stars { color: #f59e0b; font-size: 0.95rem; letter-spacing: 1px; }
        .book-meta-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 8px 16px;
            margin: 12px 0 16px 0;
            font-size: 0.88rem;
            color: var(--text-secondary);
        }
        .book-meta-item { display: flex; align-items: baseline; gap: 6px; }
        .book-meta-item strong { color: var(--text-primary); font-weight: 600; white-space: nowrap; }
        @media (max-width: 600px) {
            .book-meta-grid { grid-template-columns: 1fr; }
        }
        .novel-card-2col .card-summary {
            font-size: 0.82rem;
            color: var(--text-secondary);
            line-height: 1.5;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            margin-bottom: 6px;
        }
        .novel-card-2col .card-footer { display: flex; justify-content: flex-end; margin-top: 4px; }
        .novel-card-2col .card-read-btn {
            font-size: 0.84rem;
            color: var(--primary-color);
            text-decoration: none;
            font-weight: 600;
            transition: color 0.15s;
        }
        .novel-card-2col .card-read-btn:hover { color: var(--primary-hover); }

        /* 换一批按钮与首页头部 */
        .home-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 10px;
            margin-bottom: 18px;
            padding-bottom: 12px;
            border-bottom: 1px solid var(--border-color);
        }
        .btn-shuffle {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            background: var(--primary-light);
            color: var(--primary-color);
            border: 1px solid var(--primary-border);
            padding: 5px 12px;
            border-radius: 20px;
            font-size: 0.84rem;
            font-weight: 500;
            text-decoration: none;
            transition: all 0.2s;
        }
        .btn-shuffle:hover {
            background: var(--primary-color);
            color: #fff;
            border-color: var(--primary-color);
        }

        @media (max-width: 680px) {
            .novel-grid-2col { grid-template-columns: 1fr; }
        }

        /* 封面与书脊组件 */
        .book-cover-container {
            position: relative;
            flex-shrink: 0;
            border-radius: 4px;
            overflow: hidden;
            box-shadow: 0 2px 6px rgba(0,0,0,0.12);
            background: var(--bg-subtle);
        }
        .book-cover-img { width: 100%; height: 100%; object-fit: cover; display: block; }
        .cover-thumb { width: 72px; height: 100px; }
        .cover-medium { width: 90px; height: 125px; }
        .cover-large { width: 130px; height: 180px; }

        /* 优雅实体书脊降级外观 */
        .book-spine-card {
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, #b83b5e 0%, #6a2c70 100%);
            color: #fff;
            padding: 6px 4px;
            /* 默认隐藏：内联 style 会被 CSP style-src 'self' 拦截，改由 .is-visible 显示 */
            display: none;
            flex-direction: column;
            justify-content: space-between;
            align-items: center;
            text-align: center;
            box-sizing: border-box;
        }
        .book-spine-card.is-visible { display: flex; }

        .book-spine-card .spine-badge {
            font-size: 0.65rem;
            background: rgba(255,255,255,0.22);
            padding: 1px 4px;
            border-radius: 2px;
        }
        .book-spine-card .spine-title {
            font-size: 0.76rem;
            font-weight: 700;
            line-height: 1.3;
            overflow: hidden;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            word-break: break-all;
        }
        .book-spine-card .spine-author {
            font-size: 0.65rem;
            opacity: 0.85;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 100%;
        }

        /* 详情页排版 */
        .book-detail-box {
            display: flex;
            gap: 24px;
            margin-bottom: 24px;
            padding-bottom: 20px;
            border-bottom: 1px dashed var(--border-color);
        }
        .book-detail-info { flex: 1; }
        .book-detail-info h1 {
            font-size: 1.6rem;
            color: var(--text-primary);
            margin-bottom: 10px;
            font-weight: 700;
        }
        .novel-info-row {
            display: flex;
            flex-wrap: wrap;
            gap: 14px 20px;
            font-size: 0.9rem;
            color: var(--text-secondary);
            margin-bottom: 12px;
        }
        .novel-info-row a {
            color: var(--primary-color);
            text-decoration: none;
            font-weight: 500;
        }
        .novel-info-row strong {
            color: var(--text-primary);
            font-weight: 600;
        }
        .novel-actions {
            margin-top: 16px;
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 12px;
        }
        .btn-read {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            background: var(--primary-color);
            color: #fff;
            padding: 9px 24px;
            border-radius: 6px;
            text-decoration: none;
            font-size: 0.95rem;
            font-weight: 600;
            transition: all 0.2s;
            box-shadow: 0 2px 6px rgba(184, 59, 94, 0.25);
        }
        .btn-read:hover {
            background: var(--primary-hover);
            transform: translateY(-1px);
        }
        .btn-continue-read {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
            color: #fff;
            padding: 9px 22px;
            border-radius: 6px;
            text-decoration: none;
            font-size: 0.95rem;
            font-weight: 600;
            transition: all 0.2s;
            box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
        }
        .btn-continue-read:hover {
            opacity: 0.92;
            transform: translateY(-1px);
        }
        .btn-secondary {
            display: inline-flex;
            align-items: center;
            background: var(--bg-subtle);
            border: 1px solid var(--border-color);
            color: var(--text-secondary);
            padding: 8px 18px;
            border-radius: 6px;
            text-decoration: none;
            font-size: 0.92rem;
            font-weight: 500;
            transition: all 0.15s;
        }
        .btn-secondary:hover {
            color: var(--primary-color);
            border-color: var(--primary-border);
            background: var(--primary-light);
        }
        .btn-disabled {
            display: inline-block;
            background: var(--bg-subtle);
            color: var(--text-muted);
            border: 1px solid var(--border-color);
            padding: 9px 24px;
            border-radius: 6px;
            text-decoration: none;
            font-size: 0.95rem;
            font-weight: 500;
            cursor: not-allowed;
        }

        /* 零内容/暂无收录提示横幅 */
        .empty-notice-card {
            background: var(--bg-subtle);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            padding: 14px 18px;
            margin: 18px 0;
            color: var(--text-secondary);
            font-size: 0.92rem;
            line-height: 1.6;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .empty-notice-card .notice-icon { font-size: 1.3rem; }

        /* 目录与章节样式 */
        .section-title {
            font-size: 1.2rem;
            font-weight: 700;
            color: var(--text-primary);
            margin: 24px 0 14px 0;
            border-left: 4px solid var(--primary-color);
            padding-left: 10px;
        }
        .chapter-list {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
            gap: 10px;
            margin-top: 10px;
        }
        .chapter-item a {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 10px 14px;
            background: var(--bg-subtle);
            border: 1px solid var(--border-color);
            border-radius: 4px;
            color: var(--text-primary);
            text-decoration: none;
            font-size: 0.92rem;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            transition: all 0.15s;
        }
        .chapter-item a:hover {
            background: var(--bg-card);
            border-color: var(--primary-color);
            color: var(--primary-color);
        }
        .chapter-item a.read-history-active {
            border-color: #10b981;
            background: rgba(16, 185, 129, 0.08);
            font-weight: 600;
        }
        .chapter-badge-read {
            font-size: 0.72rem;
            color: #10b981;
            background: rgba(16, 185, 129, 0.15);
            padding: 2px 6px;
            border-radius: 4px;
            margin-left: 6px;
            flex-shrink: 0;
        }

        /* 作家列表网格 */
        .author-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
            gap: 12px;
            margin-top: 12px;
        }
        .author-card {
            background: var(--bg-subtle);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            padding: 12px 14px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            text-decoration: none;
            color: var(--text-primary);
            transition: all 0.15s;
        }
        .author-card:hover {
            border-color: var(--primary-color);
            background: var(--bg-card);
            transform: translateY(-1px);
            box-shadow: var(--shadow-md);
        }
        .author-card-name { font-weight: 600; font-size: 0.96rem; color: var(--text-primary); }
        .author-card:hover .author-card-name { color: var(--primary-color); }
        .author-card-count {
            font-size: 0.8rem;
            color: var(--text-muted);
            background: var(--bg-hover);
            padding: 2px 7px;
            border-radius: 10px;
        }

        /* 阅读器正文与翻页 */
        .chapter-header {
            text-align: center;
            border-bottom: 1px dashed var(--border-color);
            padding-bottom: 16px;
            margin-bottom: 25px;
        }
        .chapter-header h1 {
            font-size: 1.45rem;
            color: var(--text-primary);
            margin-bottom: 8px;
        }
        .chapter-header .meta {
            font-size: 0.85rem;
            color: var(--text-muted);
        }
        .chapter-header .meta a {
            color: var(--primary-color);
            text-decoration: none;
        }
        .reader-content {
            font-size: var(--reader-font-size, 18px);
            line-height: var(--reader-line-height, 2.0);
            font-family: var(--reader-font-family, inherit);
            color: var(--text-primary);
            word-wrap: break-word;
            transition: font-size 0.15s ease, line-height 0.15s ease;
        }
        .reader-content p {
            margin-bottom: 1.4em;
            text-indent: 2em;
            word-break: break-word;
        }

        /* 顶部阅读器控制工具栏 */
        .reader-toolbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 10px;
            background: var(--bg-subtle);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 8px 14px;
            margin-bottom: 22px;
        }
        .reader-toolbar-group {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .reader-tool-btn {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 6px 12px;
            font-size: 0.85rem;
            font-weight: 500;
            color: var(--text-secondary);
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            cursor: pointer;
            text-decoration: none;
            transition: all 0.15s ease;
            user-select: none;
        }
        .reader-tool-btn:hover {
            color: var(--primary-color);
            border-color: var(--primary-border);
            background: var(--primary-light);
        }
        .reader-tool-btn svg {
            width: 15px;
            height: 15px;
            fill: currentColor;
        }

        /* 主题颜色选择圆点 */
        .reader-theme-dots {
            display: flex;
            align-items: center;
            gap: 8px;
            background: var(--bg-card);
            padding: 4px 8px;
            border-radius: 20px;
            border: 1px solid var(--border-color);
        }
        .theme-dot-btn {
            width: 22px;
            height: 22px;
            border-radius: 50%;
            border: 2px solid transparent;
            cursor: pointer;
            padding: 0;
            outline: none;
            transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.15s;
        }
        .theme-dot-btn:hover {
            transform: scale(1.18);
        }
        .theme-dot-btn.active {
            box-shadow: 0 0 0 2px var(--bg-card), 0 0 0 4px var(--primary-color);
            transform: scale(1.08);
        }
        .theme-dot-light { background: #ffffff; border-color: #d1d5db; }
        .theme-dot-sepia { background: #f4ecd8; border-color: #dfcfab; }
        .theme-dot-eyegreen { background: #dcecd2; border-color: #bed7b0; }
        .theme-dot-dark { background: #1a1c22; border-color: #4b5563; }

        /* 字号步进器组件 */
        .reader-font-group {
            display: inline-flex;
            align-items: center;
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            overflow: hidden;
        }
        .reader-font-btn {
            background: transparent;
            border: none;
            color: var(--text-secondary);
            font-size: 0.85rem;
            font-weight: 600;
            padding: 5px 10px;
            cursor: pointer;
            transition: all 0.15s;
            user-select: none;
        }
        .reader-font-btn:hover {
            color: var(--primary-color);
            background: var(--bg-hover);
        }
        .reader-font-display {
            font-size: 0.82rem;
            color: var(--text-muted);
            min-width: 32px;
            text-align: center;
            font-family: monospace;
            border-left: 1px solid var(--border-subtle);
            border-right: 1px solid var(--border-subtle);
            padding: 2px 4px;
        }

        /* 侧边悬浮操作栏 (Floating Action Dock) */
        .floating-dock {
            position: fixed;
            right: 22px;
            bottom: 35px;
            display: flex;
            flex-direction: column;
            gap: 8px;
            z-index: 990;
        }
        .floating-dock-btn {
            width: 42px;
            height: 42px;
            border-radius: 50%;
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
            color: var(--text-primary);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
            padding: 0;
            outline: none;
        }
        .floating-dock-btn:hover {
            transform: translateY(-2px) scale(1.08);
            color: var(--primary-color);
            border-color: var(--primary-border);
            box-shadow: 0 6px 18px rgba(184, 59, 94, 0.18);
        }
        .floating-dock-btn svg {
            width: 18px;
            height: 18px;
            fill: currentColor;
        }
        @media (max-width: 768px) {
            .floating-dock {
                right: 12px;
                bottom: 22px;
                gap: 6px;
            }
            .floating-dock-btn {
                width: 38px;
                height: 38px;
            }
            .floating-dock-btn svg {
                width: 16px;
                height: 16px;
            }
        }

        /* 阅读设置弹窗 Modal */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: var(--drawer-overlay);
            z-index: 2100;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.25s, visibility 0.25s;
        }
        .modal-overlay.active {
            opacity: 1;
            visibility: visible;
        }
        .reader-modal {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) scale(0.95);
            width: 90%;
            max-width: 440px;
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
            z-index: 2200;
            padding: 22px;
            opacity: 0;
            visibility: hidden;
            transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
        }
        .reader-modal.active {
            opacity: 1;
            visibility: visible;
            transform: translate(-50%, -50%) scale(1);
        }
        .reader-modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding-bottom: 12px;
            border-bottom: 1px solid var(--border-subtle);
            margin-bottom: 18px;
        }
        .reader-modal-title {
            font-size: 1.05rem;
            font-weight: 700;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .reader-modal-close {
            background: none;
            border: none;
            font-size: 1.35rem;
            color: var(--text-muted);
            cursor: pointer;
            line-height: 1;
            padding: 2px 6px;
            border-radius: 4px;
        }
        .reader-modal-close:hover {
            color: var(--primary-color);
            background: var(--bg-hover);
        }
        .settings-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 16px;
        }
        .settings-label {
            font-size: 0.88rem;
            font-weight: 600;
            color: var(--text-primary);
        }
        .settings-options {
            display: inline-flex;
            background: var(--bg-subtle);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            padding: 2px;
            gap: 2px;
        }
        .settings-pill {
            background: transparent;
            border: none;
            border-radius: 4px;
            padding: 5px 9px;
            font-size: 0.8rem;
            font-weight: 500;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.15s;
            outline: none;
        }
        .settings-pill:hover {
            color: var(--primary-color);
        }
        .settings-pill.active {
            background: var(--bg-card);
            color: var(--primary-color);
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
            font-weight: 600;
        }
        .reader-modal-footer {
            margin-top: 20px;
            padding-top: 14px;
            border-top: 1px solid var(--border-subtle);
            display: flex;
            justify-content: flex-end;
            gap: 10px;
        }

        /* 章节目录侧边抽屉 */
        .chapter-drawer {
            position: fixed;
            top: 0;
            left: 0;
            bottom: 0;
            width: 320px;
            max-width: 86vw;
            background: var(--bg-card);
            z-index: 2050;
            transform: translateX(-100%);
            transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
            display: flex;
            flex-direction: column;
            box-shadow: 4px 0 24px rgba(0,0,0,0.2);
        }
        .chapter-drawer.active {
            transform: translateX(0);
        }
        .chapter-drawer-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: var(--drawer-overlay);
            z-index: 2040;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.25s, visibility 0.25s;
        }
        .chapter-drawer-overlay.active {
            opacity: 1;
            visibility: visible;
        }
        .chapter-drawer-header {
            padding: 14px 16px;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: var(--bg-subtle);
        }
        .chapter-drawer-title {
            font-size: 0.98rem;
            font-weight: 700;
            color: var(--text-primary);
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .chapter-search-box {
            padding: 8px 14px;
            border-bottom: 1px solid var(--border-subtle);
            background: var(--bg-card);
        }
        .chapter-search-input {
            width: 100%;
            padding: 7px 10px;
            border-radius: 6px;
            border: 1px solid var(--border-color);
            background: var(--bg-subtle);
            color: var(--text-primary);
            font-size: 0.85rem;
            outline: none;
            box-sizing: border-box;
            transition: border-color 0.15s;
        }
        .chapter-search-input:focus {
            border-color: var(--primary-color);
            background: var(--bg-card);
        }
        .chapter-drawer-list {
            flex: 1;
            overflow-y: auto;
            padding: 6px 10px;
            -webkit-overflow-scrolling: touch;
        }
        .chapter-drawer-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 9px 12px;
            border-radius: 6px;
            text-decoration: none;
            color: var(--text-secondary);
            font-size: 0.88rem;
            margin-bottom: 2px;
            transition: background 0.12s, color 0.12s;
        }
        .chapter-drawer-item:hover {
            background: var(--bg-hover);
            color: var(--primary-color);
        }
        .chapter-drawer-item.active {
            background: var(--primary-light);
            color: var(--primary-color);
            font-weight: 600;
        }
        .chapter-drawer-badge {
            font-size: 0.72rem;
            background: var(--primary-color);
            color: #fff;
            padding: 1px 6px;
            border-radius: 4px;
            font-weight: 500;
        }
        .nav-btns {
            display: flex;
            justify-content: space-between;
            margin-top: 30px;
            gap: 12px;
        }
        .nav-btns a, .nav-btns span {
            flex: 1;
            text-align: center;
            padding: 10px 0;
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            color: var(--text-secondary);
            text-decoration: none;
            font-weight: 500;
            font-size: 0.95rem;
            transition: all 0.15s;
        }
        .nav-btns a:hover {
            border-color: var(--primary-color);
            color: var(--primary-color);
            background: var(--primary-light);
        }
        .nav-btns span.disabled {
            background: var(--bg-subtle);
            color: var(--text-muted);
            border-color: var(--border-color);
            cursor: not-allowed;
            opacity: 0.6;
        }

        /* 通用分页组件 */
        .pagination {
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
            gap: 6px;
            margin-top: 26px;
        }
        .pagination a, .pagination span {
            padding: 6px 12px;
            border: 1px solid var(--border-color);
            background: var(--bg-card);
            border-radius: 4px;
            text-decoration: none;
            color: var(--text-secondary);
            font-size: 0.88rem;
            transition: all 0.15s;
        }
        .pagination span.current {
            background: var(--primary-color);
            color: #fff;
            border-color: var(--primary-color);
            font-weight: bold;
        }
        .pagination a:hover {
            border-color: var(--primary-color);
            color: var(--primary-color);
        }
        /* ---- 章节页页尾推荐（对齐 PHP 版两个场景）---- */
        .reader-complete-section {
            margin-top: 32px;
            padding: 22px 18px;
            background: var(--bg-subtle, var(--bg-card));
            border: 1px solid var(--border-color);
            border-radius: 8px;
        }
        .rec-complete-head {
            text-align: center;
            margin-bottom: 22px;
        }
        .rec-complete-emoji {
            font-size: 2rem;
            line-height: 1;
        }
        .rec-complete-title {
            margin: 8px 0 6px;
            font-size: 1.25rem;
        }
        .rec-complete-sub {
            margin: 0;
            color: var(--text-secondary);
            font-size: 0.92rem;
        }
        .rec-group + .rec-group {
            margin-top: 24px;
        }
        .rec-group-head {
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            gap: 12px;
            margin-bottom: 12px;
        }
        .rec-group-title {
            margin: 0;
            font-size: 1rem;
        }
        .rec-group-more {
            color: var(--primary-color);
            font-size: 0.86rem;
            text-decoration: none;
            white-space: nowrap;
        }
        .rec-grid {
            grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
            gap: 10px;
        }
        .reader-compact-rec {
            margin-top: 24px;
            padding-top: 18px;
            border-top: 1px dashed var(--border-color);
        }
        .rec-compact-head {
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            gap: 12px;
            margin-bottom: 12px;
        }
        .rec-compact-title {
            color: var(--text-secondary);
            font-size: 0.92rem;
        }
        .rec-compact-back {
            color: var(--primary-color);
            font-size: 0.86rem;
            text-decoration: none;
        }
        .rec-compact-grid {
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 8px;
        }
        .rec-compact-item {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 6px 8px;
            background: var(--bg-subtle, var(--bg-card));
            border: 1px solid var(--border-color);
            border-radius: 6px;
        }
        .rec-compact-cover {
            flex: 0 0 auto;
        }
        .rec-compact-cover .book-cover-container {
            width: 40px;
        }
        .rec-compact-body {
            min-width: 0;
        }
        .rec-compact-name {
            display: block;
            font-size: 0.88rem;
            text-decoration: none;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .rec-compact-meta {
            color: var(--text-secondary);
            font-size: 0.8rem;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        /* 页码条新增态：省略号与不可点按钮（首/末页的上一页/下一页）。 */
        .pagination span.gap {
            border-color: transparent;
            background: transparent;
            color: var(--text-secondary);
        }
        .pagination span.disabled {
            color: var(--text-secondary);
            opacity: 0.45;
        }
        .footer {
            width: 100%;
            margin-top: 48px;
            padding: 36px 16px 28px 16px;
            background: var(--bg-card);
            border-top: 1px solid var(--border-color);
            text-align: center;
            box-sizing: border-box;
        }
        .footer-inner {
            max-width: 960px;
            margin: 0 auto;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 12px;
        }
        .footer-nav {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: center;
            gap: 8px 14px;
            font-size: 0.9rem;
        }
        .footer-nav a {
            color: var(--text-secondary);
            text-decoration: none;
            transition: color 0.15s ease;
        }
        .footer-nav a:hover {
            color: var(--primary-color);
            text-decoration: underline;
        }
        .footer-divider {
            color: var(--border-color);
            font-size: 0.8rem;
            user-select: none;
        }
        .footer-copyright {
            margin: 0;
            color: var(--text-muted);
            font-size: 0.82rem;
            line-height: 1.6;
            text-align: center;
        }

        /* 标签索引卡片 */
        .tags-hero { margin-bottom: 22px; padding-bottom: 14px; border-bottom: 1px solid var(--border-color); }
        .tags-hero h1 { font-size: 1.45rem; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
        .tags-hero p { font-size: 0.9rem; color: var(--text-muted); }
        .dim-cards-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 16px; }
        .dim-card {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 20px;
            transition: all 0.2s;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            box-shadow: var(--shadow-sm);
        }
        .dim-card:hover {
            border-color: var(--primary-color);
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
        }
        .dim-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
        .dim-card-title { font-size: 1.2rem; font-weight: 700; color: var(--text-primary); display: flex; align-items: center; gap: 8px; text-decoration: none; }
        .dim-card-badge { font-size: 0.78rem; color: var(--primary-color); background: var(--primary-light); padding: 3px 8px; border-radius: 12px; font-weight: 600; }
        .dim-card-desc { font-size: 0.86rem; color: var(--text-secondary); margin-bottom: 14px; line-height: 1.6; }
        .dim-card-preview { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
        .dim-preview-tag {
            font-size: 0.8rem;
            background: var(--bg-subtle);
            border: 1px solid var(--border-color);
            padding: 3px 8px;
            border-radius: 4px;
            color: var(--text-secondary);
            text-decoration: none;
            transition: all 0.15s;
        }
        .dim-preview-tag:hover { background: var(--primary-light); border-color: var(--primary-border); color: var(--primary-color); }
        .dim-card-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 4px;
            padding: 8px 14px;
            border-radius: 6px;
            background: var(--bg-subtle);
            border: 1px solid var(--border-color);
            color: var(--text-secondary);
            font-size: 0.88rem;
            font-weight: 600;
            text-decoration: none;
            transition: all 0.2s;
            align-self: flex-start;
        }
        .dim-card-btn:hover { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }

        .dim-tabs-nav {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-bottom: 20px;
            background: var(--bg-subtle);
            padding: 8px;
            border-radius: 8px;
            border: 1px solid var(--border-color);
        }
        .dim-tab-link {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 6px 14px;
            border-radius: 6px;
            font-size: 0.9rem;
            font-weight: 500;
            color: var(--text-secondary);
            text-decoration: none;
            transition: all 0.15s;
        }
        .dim-tab-link:hover { background: var(--bg-card); color: var(--primary-color); box-shadow: var(--shadow-sm); }
        .dim-tab-link.active { background: var(--primary-color); color: #fff; font-weight: 600; }
        .dim-tab-count { font-size: 0.76rem; opacity: 0.85; }

        .tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
        .tag-pill-link {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 6px 12px;
            background: var(--bg-subtle);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            font-size: 0.88rem;
            color: var(--text-primary);
            text-decoration: none;
            transition: all 0.15s;
        }
        .tag-pill-link:hover {
            background: var(--bg-card);
            border-color: var(--primary-color);
            color: var(--primary-color);
            transform: translateY(-1px);
            box-shadow: var(--shadow-md);
        }
        .tag-pill-count { font-size: 0.76rem; color: var(--text-muted); background: var(--bg-hover); padding: 1px 6px; border-radius: 8px; }
        .tag-pill-link:hover .tag-pill-count { background: var(--primary-light); color: var(--primary-color); }

        .rating-cards-list { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
        .rating-card-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: var(--bg-subtle);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 14px 18px;
            text-decoration: none;
            color: var(--text-primary);
            transition: all 0.2s;
        }
        .rating-card-item:hover {
            border-color: var(--primary-color);
            background: var(--bg-card);
            transform: translateY(-1px);
            box-shadow: var(--shadow-md);
        }
        .rating-card-left { display: flex; align-items: center; gap: 16px; }
        .rating-stars-badge { font-size: 1.15rem; color: #f59e0b; letter-spacing: 2px; }
        .rating-info-title { font-weight: 700; font-size: 1.02rem; color: var(--text-primary); }
        .rating-card-item:hover .rating-info-title { color: var(--primary-color); }
        .rating-info-desc { font-size: 0.83rem; color: var(--text-muted); margin-top: 2px; }
        .rating-card-right { display: flex; align-items: center; gap: 10px; }
        .rating-count-badge { font-size: 0.85rem; color: var(--primary-color); background: var(--primary-light); padding: 4px 10px; border-radius: 12px; font-weight: 600; }

        .filter-header {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 18px 20px;
            margin-bottom: 20px;
            box-shadow: var(--shadow-sm);
        }
        .filter-title-line { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
        .filter-title { font-size: 1.3rem; font-weight: 700; color: var(--text-primary); display: flex; align-items: center; gap: 8px; }
        .filter-count { font-size: 0.86rem; color: var(--text-muted); }
        .filter-count strong { color: var(--primary-color); }
        .sibling-tags-bar { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 10px; border-top: 1px dashed var(--border-color); align-items: center; }
        .sibling-tags-label { font-size: 0.82rem; color: var(--text-muted); margin-right: 4px; white-space: nowrap; }
        .sibling-tag-pill {
            font-size: 0.78rem;
            padding: 3px 8px;
            border-radius: 4px;
            background: var(--bg-subtle);
            border: 1px solid var(--border-color);
            color: var(--text-secondary);
            text-decoration: none;
            transition: all 0.15s;
        }
        .sibling-tag-pill:hover { border-color: var(--primary-color); color: var(--primary-color); background: var(--bg-card); }
        .sibling-tag-pill.active { background: var(--primary-color); color: #fff; border-color: var(--primary-color); font-weight: 600; }

        /* ================= 全局阅读历史侧边抽屉组件 (Slide-out Drawer) ================= */
        .drawer-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: var(--drawer-overlay);
            z-index: 2000;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.25s ease, visibility 0.25s ease;
            backdrop-filter: blur(2px);
        }
        .drawer-overlay.active {
            opacity: 1;
            visibility: visible;
        }
        .history-drawer {
            position: fixed;
            top: 0;
            right: -380px;
            width: 360px;
            max-width: 90vw;
            height: 100vh;
            background: var(--bg-card);
            border-left: 1px solid var(--border-color);
            box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
            z-index: 2010;
            display: flex;
            flex-direction: column;
            transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
        }
        .history-drawer.active {
            transform: translateX(-380px);
        }
        .drawer-header {
            padding: 16px 20px;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: var(--bg-subtle);
        }
        .drawer-title {
            font-size: 1.05rem;
            font-weight: 700;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .drawer-actions {
            display: flex;
            align-items: center;
            gap: 12px;
        }
        .drawer-clear-btn {
            background: none;
            border: none;
            color: var(--text-muted);
            font-size: 0.82rem;
            cursor: pointer;
            padding: 4px 6px;
            border-radius: 4px;
            transition: color 0.15s;
        }
        .drawer-clear-btn:hover {
            color: var(--primary-color);
        }
        .drawer-close-btn {
            background: none;
            border: none;
            font-size: 1.5rem;
            line-height: 1;
            color: var(--text-muted);
            cursor: pointer;
            padding: 0 4px;
            transition: color 0.15s;
        }
        .drawer-close-btn:hover {
            color: var(--text-primary);
        }
        .drawer-body {
            flex: 1;
            overflow-y: auto;
            padding: 12px 16px;
        }
        .drawer-empty {
            text-align: center;
            padding: 60px 20px;
            color: var(--text-muted);
        }
        .drawer-empty-icon {
            font-size: 2.5rem;
            margin-bottom: 10px;
            opacity: 0.5;
        }
        .drawer-item {
            display: flex;
            gap: 12px;
            padding: 12px;
            margin-bottom: 10px;
            background: var(--bg-subtle);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            transition: all 0.15s;
            position: relative;
        }
        .drawer-item:hover {
            background: var(--bg-card);
            border-color: var(--primary-color);
            box-shadow: var(--shadow-sm);
        }
        .drawer-item-cover {
            width: 44px;
            height: 60px;
            border-radius: 3px;
            overflow: hidden;
            flex-shrink: 0;
            background: #eee;
        }
        .drawer-item-cover img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        .drawer-item-info {
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }
        .drawer-item-title {
            font-size: 0.94rem;
            font-weight: 700;
            color: var(--text-primary);
            text-decoration: none;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .drawer-item-chapter {
            font-size: 0.82rem;
            color: var(--primary-color);
            margin: 2px 0;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .drawer-item-meta {
            font-size: 0.75rem;
            color: var(--text-muted);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .drawer-item-del {
            background: none;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            font-size: 0.85rem;
            padding: 0 4px;
            transition: color 0.15s;
        }
        .drawer-item-del:hover {
            color: #e53e3e;
        }

        /* 顶部/全局轻量 Toast 提示框 */
        .yqxs-toast {
            position: fixed;
            bottom: 30px;
            left: 50%;
            transform: translateX(-50%) translateY(20px);
            background: rgba(20, 20, 20, 0.88);
            color: #ffffff;
            padding: 10px 20px;
            border-radius: 24px;
            font-size: 0.88rem;
            font-weight: 500;
            z-index: 3000;
            opacity: 0;
            pointer-events: none;
            transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
            display: flex;
            align-items: center;
            gap: 8px;
            max-width: 90vw;
        }
        .yqxs-toast.show {
            opacity: 1;
            transform: translateX(-50%) translateY(0);
        }

        /* 全站搜索与高亮体系样式 */
        mark.search-highlight {
            background: rgba(245, 158, 11, 0.28);
            color: inherit;
            padding: 1px 3px;
            border-radius: 3px;
            font-weight: 600;
        }
        [data-theme="dark"] mark.search-highlight {
            background: rgba(245, 158, 11, 0.45);
            color: #fef08a;
        }
        .header-search-form {
            height: 32px;
            box-sizing: border-box;
            display: inline-flex;
            align-items: center;
            position: relative;
            background: var(--bg-subtle);
            border: 1px solid var(--border-color);
            border-radius: 16px;
            padding: 0 4px 0 10px;
            transition: all 0.2s ease;
            flex-shrink: 0;
        }
        .header-search-form:focus-within {
            border-color: var(--primary-color);
            background: var(--bg-card);
            box-shadow: 0 0 0 3px rgba(184, 59, 94, 0.15);
        }
        .header-search-input {
            background: transparent;
            border: none;
            outline: none;
            font-size: 0.82rem;
            color: var(--text-primary);
            width: 85px;
            transition: width 0.25s ease;
        }
        .header-search-input:focus {
            width: 125px;
        }
        .header-search-btn {
            background: transparent;
            border: none;
            padding: 3px;
            color: var(--text-muted);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            transition: color 0.15s;
        }
        .header-search-btn:hover {
            color: var(--primary-color);
        }
        .header-search-btn svg {
            width: 13px;
            height: 13px;
            fill: currentColor;
        }
        @media (max-width: 1024px) {
            .header-search-form {
                display: none;
            }
        }
        @media (max-width: 768px) {
            .header-inner {
                flex-wrap: wrap;
                gap: 6px;
            }
            .header-right {
                width: 100%;
                justify-content: flex-start;
                order: 3;
                /* 关键：窄屏下必须允许换行。
                   .nav-menu 在此断点被设为 width:100%，.header-tools（简繁切换 +
                   阅读足迹，约 126px）又是 flex-shrink:0；两者在 nowrap 下
                   必然撑破视口 —— 实测 390px 视口 document.scrollWidth=510，
                   溢出 120px，且 .header-tools 被整个推出屏幕（按钮看不见也点不到）。
                   wrap 后 .header-tools 落到下一行，溢出归零。 */
                flex-wrap: wrap;
            }
            .nav-menu {
                width: 100%;
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
                scrollbar-width: none;
                justify-content: flex-start;
                padding: 3px 4px;
            }
            .nav-menu::-webkit-scrollbar {
                display: none;
            }
            .header-tools {
                margin-left: auto;
            }
        }

        /* 搜索页面 Hero 与表单 */
        .search-hero-box {
            background: var(--bg-subtle);
            border: 1px solid var(--border-color);
            border-radius: 10px;
            padding: 24px 20px;
            margin-bottom: 22px;
            text-align: center;
        }
        .search-hero-title {
            font-size: 1.45rem;
            font-weight: 700;
            color: var(--text-primary);
            margin-bottom: 6px;
        }
        .search-hero-subtitle {
            font-size: 0.88rem;
            color: var(--text-secondary);
            margin-bottom: 20px;
            max-width: 640px;
            margin-left: auto;
            margin-right: auto;
        }
        .search-form-main {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            max-width: 580px;
            margin: 0 auto 16px auto;
        }
        .search-input-wrap {
            flex: 1;
            position: relative;
            display: flex;
            align-items: center;
            background: var(--bg-card);
            border: 2px solid var(--border-color);
            border-radius: 8px;
            padding: 4px 12px;
            transition: border-color 0.15s, box-shadow 0.15s;
        }
        .search-input-wrap:focus-within {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px var(--primary-light);
        }
        .search-icon-svg {
            width: 18px;
            height: 18px;
            fill: var(--text-muted);
            margin-right: 8px;
            flex-shrink: 0;
        }
        .search-input-field {
            flex: 1;
            border: none;
            background: transparent;
            outline: none;
            font-size: 0.95rem;
            color: var(--text-primary);
            padding: 6px 0;
        }
        .search-clear-link {
            color: var(--text-muted);
            text-decoration: none;
            font-size: 1.3rem;
            line-height: 1;
            padding: 0 4px;
            cursor: pointer;
        }
        .search-clear-link:hover {
            color: var(--text-primary);
        }
        .search-submit-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 10px 22px;
            background: var(--primary-color);
            color: #fff;
            border: none;
            border-radius: 8px;
            font-size: 0.95rem;
            font-weight: 600;
            cursor: pointer;
            transition: background 0.15s, transform 0.1s;
            box-shadow: 0 2px 6px rgba(184, 59, 94, 0.25);
            white-space: nowrap;
        }
        .search-submit-btn:hover {
            background: var(--primary-hover);
            transform: translateY(-1px);
        }
        .search-hot-tags {
            display: flex;
            align-items: center;
            justify-content: center;
            flex-wrap: wrap;
            gap: 6px;
            font-size: 0.82rem;
        }
        .search-hot-label {
            color: var(--text-muted);
            font-weight: 500;
        }
        .search-tags-list {
            display: inline-flex;
            flex-wrap: wrap;
            gap: 6px;
        }
        .search-hot-pill {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            color: var(--text-secondary);
            padding: 3px 9px;
            border-radius: 12px;
            text-decoration: none;
            transition: all 0.15s;
        }
        .search-hot-pill:hover, .search-hot-pill.active {
            border-color: var(--primary-color);
            color: var(--primary-color);
            background: var(--primary-light);
        }

        /* 搜索状态行与匹配作家区 */
        .search-result-bar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 10px 14px;
            background: var(--bg-subtle);
            border-radius: 6px;
            border: 1px solid var(--border-subtle);
            margin-bottom: 14px;
            font-size: 0.9rem;
            color: var(--text-primary);
        }
        .search-authors-section {
            margin-bottom: 22px;
            padding: 14px 16px;
            background: var(--bg-subtle);
            border: 1px solid var(--border-color);
            border-radius: 8px;
        }
        .search-section-subtitle {
            font-size: 0.95rem;
            font-weight: 700;
            color: var(--text-primary);
            margin-bottom: 12px;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .search-section-subtitle svg {
            width: 16px;
            height: 16px;
            fill: var(--primary-color);
        }
        .search-authors-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
            gap: 10px;
        }
        .author-match-card {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 12px;
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            transition: border-color 0.15s, box-shadow 0.15s;
        }
        .author-match-card:hover {
            border-color: var(--primary-color);
            box-shadow: var(--shadow-sm);
        }
        .author-match-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: var(--primary-light);
            color: var(--primary-color);
            font-weight: 700;
            font-size: 1rem;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        .author-match-info {
            flex: 1;
            min-width: 0;
        }
        .author-match-name {
            font-size: 0.92rem;
            font-weight: 600;
            color: var(--text-primary);
            text-decoration: none;
            display: block;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .author-match-name:hover {
            color: var(--primary-color);
        }
        .author-match-count {
            font-size: 0.75rem;
            color: var(--text-muted);
            margin-top: 2px;
        }
        .author-match-btn {
            font-size: 0.78rem;
            color: var(--primary-color);
            text-decoration: none;
            font-weight: 500;
            padding: 3px 6px;
            border-radius: 4px;
            white-space: nowrap;
            background: var(--bg-subtle);
        }
        .author-match-btn:hover {
            background: var(--primary-color);
            color: #fff;
        }

        /* 搜索空态与推荐大厅 */
        .search-empty-box {
            text-align: center;
            padding: 40px 20px;
            background: var(--bg-subtle);
            border-radius: 8px;
            border: 1px dashed var(--border-color);
            margin: 20px 0;
        }
        .search-empty-icon {
            font-size: 2.8rem;
            margin-bottom: 12px;
        }
        .search-empty-box h3 {
            font-size: 1.15rem;
            color: var(--text-primary);
            margin-bottom: 8px;
        }
        .search-empty-box p {
            font-size: 0.88rem;
            color: var(--text-secondary);
            margin-bottom: 20px;
        }
        .search-empty-actions {
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
            gap: 12px;
        }
        .search-welcome-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 16px;
            margin-top: 15px;
        }
        .search-welcome-card {
            background: var(--bg-subtle);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 16px;
        }
        .search-welcome-card h3 {
            font-size: 1rem;
            color: var(--text-primary);
            margin-bottom: 6px;
        }
        .search-welcome-card p {
            font-size: 0.85rem;
            color: var(--text-secondary);
            line-height: 1.5;
        }

/* --- 第九轮 S-2/S-3 阶段2a：自 templates/home.php 外置 --- */
.novel-card-2col:nth-child(n+9) {
    content-visibility: auto;
    contain-intrinsic-size: 0 140px;
}

/* --- 阶段4 自动生成：内联 style 属性提取的工具类（第九轮 S-2/S-3）--- */
.s-4eb70ff4 { text-align: center; padding: 45px 20px 30px 20px; }
.s-d876d380 { font-size: 3.5rem; color: var(--primary-color); margin-bottom: 10px; font-weight: 800; }
.s-18e705b2 { font-size: 1.25rem; color: var(--text-primary); margin-bottom: 8px; }
.s-038bcc24 { color: var(--text-muted); margin-bottom: 22px; font-size: 0.92rem; max-width: 540px; margin-left: auto; margin-right: auto; }
.s-1652a0bd { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 35px; }
.s-dfdec7f5 { text-align: left; border-top: 1px dashed var(--border-color); padding-top: 24px; }
.s-7a394e8b { font-size: 1.05rem; font-weight: 700; color: var(--text-primary); margin-bottom: 14px; }
.s-1c060365 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.s-c505081a { padding: 10px; gap: 10px; }
.s-c3bbbbae { justify-content: space-between; }
.s-e41d85ca { font-size: 0.92rem; margin-bottom: 2px; }
.s-fd024886 { font-size: 0.76rem; margin-bottom: 4px; }
.s-b548756c { font-size: 0.72rem; letter-spacing: 0.5px; margin-top: 1px; }
.s-13cbe03b { text-align: right; }
.s-7185ca80 { font-size: 0.78rem; color: var(--primary-color); text-decoration: none; font-weight: 500; }
.s-ae1645b7 { margin-bottom: 24px; padding: 20px; background: linear-gradient(135deg, rgba(184,59,94,0.04) 0%, rgba(255,255,255,0.9) 100%); border: 1px solid var(--border-color); border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.03); }
.s-f10a29dd { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.s-d8f683f3 { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, #b83b5e 0%, #e05275 100%); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; font-weight: bold; flex-shrink: 0; box-shadow: 0 4px 10px rgba(184,59,94,0.25); }
.s-4a7c9134 { flex: 1; min-width: 260px; }
.s-22d5ee63 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.s-5eb65003 { font-size: 1.5rem; color: var(--text-primary); font-weight: 700; margin: 0; }
.s-ffba5fe6 { font-size: 0.78rem; background: rgba(184,59,94,0.1); color: #b83b5e; padding: 2px 8px; border-radius: 12px; font-weight: 600; }
.s-cae5e017 { font-size: 0.78rem; background: var(--bg-subtle); color: var(--text-secondary); padding: 2px 8px; border-radius: 12px; border: 1px solid var(--border-color); }
.s-90891ffd { font-size: 0.88rem; color: var(--text-secondary); margin: 0 0 12px 0; }
.s-e22bdbae { background: var(--bg-card); border-left: 3px solid #b83b5e; padding: 12px 16px; border-radius: 0 8px 8px 0; margin-top: 10px; border-top: 1px solid var(--border-color); border-right: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); }
.s-50302f08 { font-size: 0.82rem; font-weight: 700; color: #b83b5e; margin-bottom: 6px; display: flex; align-items: center; gap: 5px; }
.s-a5e4d20b { font-size: 0.88rem; line-height: 1.7; color: var(--text-primary); text-align: justify; }
.s-d7813485 { color: var(--text-muted); font-style: italic; }
.s-f878ea7b { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--border-color); }
.s-d1c29397 { font-size: 0.84rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.s-ad003482 { width: 16px; height: 16px; fill: #b83b5e; }
.s-cd762402 { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.s-82547cdd { background: var(--bg-card); padding: 10px 14px; border-radius: 8px; border: 1px solid var(--border-color); text-align: center; }
.s-4afd3c2c { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 3px; }
.s-b7e09c34 { font-size: 1.25rem; font-weight: 700; color: #b83b5e; }
.s-4a149f97 { font-size: 1.25rem; font-weight: 700; color: #2e7d32; }
.s-1ba05917 { font-size: 1.25rem; font-weight: 700; color: #1976d2; }
.s-9a4b5910 { font-size: 1.25rem; font-weight: 700; color: #d84315; }
.s-3d6c5f19 { margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; }
.s-9c833a44 { font-size: 1.15rem; font-weight: 700; color: var(--text-primary); margin: 0; }
.s-4e96be30 { font-size: 0.82rem; color: var(--text-muted); }
.s-768bfc33 { margin-left: 6px; color: #b83b5e; font-weight: 500; }
.s-b9765d63 { text-align: right; margin-top: 4px; }
.s-9115e919 { font-size: 0.84rem; color: #b83b5e; text-decoration: none; font-weight: 500; }
.s-89dd3204 { color: #2e7d32; font-weight: 600; }
.s-980742ad { color: #999; margin: 0 4px; }
.s-d5b43342 { grid-column: 1 / -1; }
.s-55d53453 { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.s-134a7c03 { background: rgba(184,59,94,0.08); color: #b83b5e; font-weight: 500; }
.s-780c59b0 { background: rgba(46,125,50,0.08); color: #2e7d32; font-weight: 500; }
.s-f753299d { background: rgba(25,118,210,0.08); color: #1976d2; font-weight: 500; }
.s-566dfcfa { background: rgba(216,67,21,0.08); color: #d84315; font-weight: 600; }
.s-bc605c49 { text-decoration: none; }
.s-a4a96bf0 { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.s-dbb97bfa { font-size: 0.8rem; color: #888; margin-left: 4px; font-weight: normal; }
.s-f2892a2e { display: none; }
.s-36e83582 { width: 17px; height: 17px; fill: currentColor; }
.s-add482e6 { margin-left: 12px; font-size: 0.92rem; color: #b83b5e; text-decoration: none; }
.s-5fa693f3 { margin-top: 20px; }
.s-19388139 { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.s-90457f71 { margin: 0; padding-bottom: 0; border-bottom: none; }
.s-3260b35b { font-size: 0.86rem; color: #b83b5e; text-decoration: none; font-weight: 500; }
.s-8f155aa9 { background: var(--bg-card); border-left: 3px solid #b83b5e; }
.s-878e50ba { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; padding-bottom: 6px; border-bottom: 2px solid var(--border-color); }
.s-3bf69958 { margin: 0; border-bottom: none; padding-bottom: 0; }
.s-95a0a1b4 { font-size: 0.85rem; font-weight: normal; color: var(--text-secondary); margin-left: 8px; }
.s-eba923c4 { display: flex; gap: 8px; align-items: center; }
.s-7267a7c1 { padding: 4px 10px; font-size: 0.82rem; cursor: pointer; }
.s-320e6ed1 { width: 14px; height: 14px; fill: currentColor; margin-right: 4px; }
.s-8b5c734d { margin-top: 30px; padding-top: 20px; border-top: 1px dashed var(--border-color); }
.s-8a1dab95 { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.s-9428ad84 { font-size: 0.86rem; color: var(--primary-color); text-decoration: none; font-weight: 500; }
.s-41bf87d7 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.s-b5ce16d1 { font-size: 0.95rem; margin-bottom: 2px; }
.s-b6db8aa0 { font-size: 0.78rem; margin-bottom: 4px; }
.s-c8fbc344 { font-size: 0.75rem; letter-spacing: 0.5px; margin-top: 2px; }
.s-7f1fb906 { font-size: 0.8rem; color: var(--primary-color); text-decoration: none; font-weight: 500; }
.s-c5c49937 { margin-top: 26px; padding-top: 20px; border-top: 1px dashed var(--border-color); }
.s-d1156f75 { margin-top: 0; margin-bottom: 25px; }
.s-7b3fda53 { margin-top: 32px; padding: 22px 18px; background: var(--bg-subtle); border: 1px solid var(--border-color); border-radius: 8px; }
.s-5efb2661 { text-align: center; margin-bottom: 20px; }
.s-8abe26a3 { font-size: 2.2rem; line-height: 1; margin-bottom: 8px; }
.s-abd2b2df { font-size: 1.18rem; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.s-772150ef { font-size: 0.86rem; color: var(--text-secondary); max-width: 520px; margin: 0 auto; }
.s-b75fad00 { margin-bottom: 20px; }
.s-0280fd26 { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.s-7289bbee { font-size: 0.96rem; font-weight: 700; color: var(--text-primary); margin: 0; }
.s-ce963311 { font-size: 0.82rem; color: var(--primary-color); text-decoration: none; font-weight: 500; }
.s-c8b83e71 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.s-456cd864 { padding: 9px; gap: 9px; }
.s-9ed3553a { font-size: 0.76rem; margin-bottom: 2px; }
.s-9ae7e381 { font-size: 0.72rem; letter-spacing: 0.5px; margin-left: 4px; }
.s-9aa51e4b { margin-top: 24px; padding-top: 18px; border-top: 1px dashed var(--border-color); }
.s-58ce971b { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.s-b9f4510d { font-size: 0.88rem; font-weight: 600; color: var(--text-primary); display: flex; align-items: center; gap: 5px; }
.s-12b67754 { font-size: 0.8rem; color: var(--text-muted); text-decoration: none; }
.s-3f73c6e6 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.s-ec70f8d8 { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: var(--bg-subtle); border: 1px solid var(--border-color); border-radius: 6px; }
.s-c2bafe49 { flex-shrink: 0; }
.s-15fa32ae { flex: 1; min-width: 0; }
.s-a0648e26 { font-size: 0.86rem; font-weight: 600; color: var(--text-primary); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.s-1cc7a2f5 { font-size: 0.74rem; color: var(--text-muted); margin-top: 2px; }
.s-58a00f1b { font-size: 0.7rem; margin-left: 2px; }
.s-f1fc6da6 { padding: 6px 14px; font-size: 0.85rem; }
.s-8294810b { padding: 6px 18px; font-size: 0.85rem; }
.s-0145a9eb { max-width: 880px; margin: 0 auto; padding: 32px 28px; }
.s-1118eb26 { border-bottom: 1px solid var(--border-color); padding-bottom: 16px; margin-bottom: 24px; }
.s-0a77de5e { font-size: 1.5rem; font-weight: 700; color: var(--text-primary); margin: 0 0 8px 0; }
.s-ddc955f8 { font-size: 0.88rem; color: var(--text-muted); margin: 0; }
.s-bdd4eb2f { line-height: 1.8; color: var(--text-secondary); font-size: 0.95rem; }
.s-8d703344 { margin-bottom: 24px; }
.s-867791b2 { font-size: 1.15rem; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; }
.s-b2cfd371 { padding-left: 20px; margin: 8px 0; }
.s-c2deb176 { background: var(--bg-subtle); border: 1px solid var(--border-color); border-radius: 6px; padding: 16px 20px; margin: 12px 0; }
.s-98fa4619 { margin: 0 0 6px 0; }
.s-8131629a { color: var(--primary-color); font-weight: 600; text-decoration: underline; }
.s-f62ecc62 { margin: 0; font-size: 0.88rem; color: var(--text-muted); }
.s-f3f6b955 { font-size: 1.35rem; color: #222; font-weight: bold; margin-bottom: 2px; }
.s-0bf513a3 { font-size: 0.85rem; color: #888; }
.s-debc47d8 { cursor: pointer; background: transparent; border: 1px solid #ddd; border-radius: 4px; padding: 4px 8px; font-size: 0.85rem; }
.s-91d32937 { display: block; flex-shrink: 0; }
.s-23b34f3d { display: inline-flex; align-items: center; gap: 6px; }
.s-23122764 { font-size: 0.78rem; letter-spacing: 0.5px; }
.s-60a120ea { display: inline-flex; align-items: center; gap: 2px; font-size: 0.78rem; color: #b83b5e; font-weight: 500; }
.s-892db61a { border: none; padding: 6px 8px; color: #888; }
.s-de8ebc4d { font-size: 0.85rem; color: #888; margin-left: 8px; align-self: center; }
.s-c8be1ccb { display:none; }
.s-99cfe372 { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.s-0fabbd57 { font-size: 1.4rem; color: var(--text-primary); font-weight: bold; margin: 0; }
.s-570f6d39 { font-size: 0.85rem; color: var(--text-muted); }
.s-b5fca3bf { margin: 10px 0 16px 0; max-width: 320px; }
.s-1ca2e53f { width: 100%; padding: 6px 12px; font-size: 0.85rem; border: 1px solid var(--border-color); border-radius: 20px; background: var(--bg-subtle); color: var(--text-primary); outline: none; }
.s-78ce8e3b { font-size: 1.4rem; color: #333; font-weight: bold; }
.s-372f7063 { display: inline-flex; align-items: center; gap: 5px; }
.s-77f71fc3 { font-size: 0.75rem; letter-spacing: 0.5px; }
.s-9bee562f { margin-bottom: 22px; padding: 20px; background: linear-gradient(135deg, rgba(184,59,94,0.06) 0%, rgba(255,255,255,0.95) 100%); border: 1px solid var(--border-color); border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.03); }
.s-cfbc487f { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.s-61a927db { font-size: 1.45rem; font-weight: 700; color: var(--text-primary); margin: 0 0 6px 0; display: flex; align-items: center; gap: 8px; }
.s-f4c517cb { font-size: 0.88rem; color: var(--text-secondary); margin: 0; }
.s-623b8477 { font-size: 0.82rem; color: var(--text-muted); background: var(--bg-card); padding: 4px 10px; border-radius: 20px; border: 1px solid var(--border-color); }
.s-d06e7836 { margin-top: 18px; display: flex; gap: 8px; flex-wrap: wrap; }
.s-930d87fb { display: flex; flex-direction: column; gap: 12px; }
.s-65493a31 { padding: 40px; text-align: center; color: var(--text-muted); }
.s-2b9dc754 { font-size: 2rem; }
.s-2897a605 { display: flex; align-items: center; gap: 16px; padding: 14px 18px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 10px; transition: border-color 0.15s, box-shadow 0.15s; }
.s-7dfe7708 { width: 44px; text-align: center; flex-shrink: 0; }
.s-ec5cc37f { display: inline-block; width: 34px; height: 34px; line-height: 34px; border-radius: 50%; background: linear-gradient(135deg, #f7b731, #fa8231); color: #fff; font-weight: 800; font-size: 1rem; box-shadow: 0 2px 6px rgba(247,183,49,0.4); }
.s-268277fb { display: inline-block; width: 32px; height: 32px; line-height: 32px; border-radius: 50%; background: linear-gradient(135deg, #a5b1c2, #778ca3); color: #fff; font-weight: 800; font-size: 0.95rem; box-shadow: 0 2px 6px rgba(119,140,163,0.4); }
.s-e56f62ac { display: inline-block; width: 30px; height: 30px; line-height: 30px; border-radius: 50%; background: linear-gradient(135deg, #e58e26, #b71540); color: #fff; font-weight: 800; font-size: 0.9rem; box-shadow: 0 2px 6px rgba(229,142,38,0.4); }
.s-ecf484e6 { font-size: 1rem; font-weight: 700; color: var(--text-muted); font-family: monospace; }
.s-8702ee01 { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, #b83b5e 0%, #e05275 100%); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; font-weight: bold; flex-shrink: 0; }
.s-d4245d2b { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.s-27ba9b4f { font-size: 1.05rem; font-weight: 700; color: var(--text-primary); text-decoration: none; }
.s-5c940187 { font-size: 0.78rem; color: var(--text-muted); background: var(--bg-subtle); padding: 1px 6px; border-radius: 10px; border: 1px solid var(--border-color); }
.s-f4376522 { font-size: 0.84rem; color: var(--text-secondary); line-height: 1.5; margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-7bf8b03a { display: flex; gap: 12px; font-size: 0.8rem; }
.s-0b2613e5 { color: #b83b5e; font-weight: 600; }
.s-0f6b1ef9 { color: var(--text-secondary); }
.s-7aaf6d20 { flex-shrink: 0; text-align: right; }
.s-49886406 { display: inline-block; padding: 6px 14px; font-size: 0.84rem; color: #b83b5e; background: rgba(184,59,94,0.08); border-radius: 20px; text-decoration: none; font-weight: 600; }
.s-98b1560f { display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 10px; transition: border-color 0.15s, box-shadow 0.15s; }
.s-f4998b86 { width: 40px; text-align: center; flex-shrink: 0; }
.s-af6f97c5 { font-size: 0.95rem; font-weight: 700; color: var(--text-muted); font-family: monospace; }
.s-d12b17a1 { color: var(--text-primary); text-decoration: none; font-weight: 500; }
.s-e111e8d6 { margin: 0 4px; }
.s-0879c370 { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.s-8badcfd7 { font-size: 0.78rem; color: var(--text-muted); }
.s-ef7a9dfb { margin-top: 24px; }
.s-7521b95b { color: var(--primary-color); }
.s-093d160a { color: #2e7d32; }
.s-24c2788d { color: var(--text-muted); font-size: 0.85rem; margin-left: 6px; }
.s-c9608d0c { font-size: 0.85rem; color: var(--text-secondary); }
.s-d572aa26 { font-size: 0.76rem; color: var(--text-secondary); margin-top: 2px; line-height: 1.3; }
.s-b62ee557 { margin-top: 15px; }
.s-d5ad9b3c { color: #b83b5e; font-weight: 500; }
.s-c7d9cb6f { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.s-54d32d80 { margin-top: 10px; }
.s-a239ce89 { color: var(--primary-color); font-weight: 600; text-decoration: none; }
.s-be59100a { font-size:0.75rem; color:#888; }
.s-cfc294ff { color:#f59e0b; }
.s-6bef9bc6 { font-size: 0.95rem; font-weight: normal; color: #777; }
.s-dd7272cd { margin-bottom: 30px; }
.s-e9e16828 { color:#b83b5e; font-weight:bold; }
.s-401e6d87 { padding: 16px 20px; }
.s-72d6c38e { margin-bottom: 12px; }
.s-09704e1f { margin:0; font-size:1.15rem; font-weight:700; display:inline-flex; align-items:center; }
.s-ee820015 { margin-left:4px; }
.s-3b95611f { color:#b83b5e; }
.s-e1a885d6 { font-size:1.05rem; margin-left:6px; }
.s-70782b7b { font-size:0.72rem; opacity:0.8; }
.s-e67c58f7 { font-size:0.78rem; color:#b83b5e; text-decoration:none; margin-left:6px; }
.s-f38a951c { flex-shrink:0; }
.s-b0f3644f { background:#f5f5f5; color:#999; }
.s-9ea6615c { font-size:0.8rem; margin-right:4px; }
/* --- 阶段4 手动补充：动态样式的类化（rank 选项卡 / 徽章 / 书脊兜底）--- */
.rank-tab {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 16px; border-radius: 20px; font-size: 0.88rem;
    text-decoration: none; transition: all 0.2s;
}
.rank-tab--active {
    background: #b83b5e; color: #fff; font-weight: 600;
    box-shadow: 0 2px 6px rgba(184,59,94,0.3);
}
.rank-tab--idle {
    background: var(--bg-card); color: var(--text-secondary);
    border: 1px solid var(--border-color);
}
.rank-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px; border-radius: 4px; font-size: 0.8rem;
    font-weight: 600;
    background: var(--badge-bg, transparent);
    color: var(--badge-fg, inherit);
}
/* AUD-03：榜单热度徽章配色类化。
   原实现用 style="--badge-bg: ...; --badge-fg: ..." 内联属性传值，
   但 CSP style-src 的 nonce 仅对 <style> 元素生效、【不适用于 style 属性】，
   缺失 'unsafe-inline'/'unsafe-hashes' 时该属性会被浏览器阻止，
   导致徽章配色失效（功能不挂但视觉回归）。
   这四个类与 rank.php 中 $subRank 的四种取值一一对应。 */
.rank-badge--today { --badge-bg: rgba(184, 59, 94, 0.08); --badge-fg: #b83b5e; }
.rank-badge--week  { --badge-bg: rgba(46, 125, 50, 0.08);  --badge-fg: #2e7d32; }
.rank-badge--month { --badge-bg: rgba(25, 118, 210, 0.08); --badge-fg: #1976d2; }
.rank-badge--total { --badge-bg: rgba(216, 67, 21, 0.08);  --badge-fg: #d84315; }

/* AUD-03：JS 经 innerHTML 注入的元素原用内联 style，同样受 CSP 阻止，改为类。 */
.yqxs-empty-hint { font-size: 0.8rem; margin-top: 6px; opacity: 0.7; }
.yqxs-icon-17 { width: 17px; height: 17px; fill: currentColor; }
.yqxs-icon-15 { width: 15px; height: 15px; fill: currentColor; margin-right: 4px; }
.is-hidden { display: none; }
/* --- 阶段4 自动生成结束 --- */

/* 作者页四桶统计面板 */
.author-stats-panel { display: flex; gap: 12px; flex-wrap: wrap; margin: 14px 0; }
.author-stats-item { background: var(--bg-subtle); border: 1px solid var(--border-color); border-radius: 10px; padding: 10px 16px; display: flex; flex-direction: column; min-width: 96px; }
.author-stats-label { font-size: 12px; color: var(--text-muted); }
.author-stats-value { font-size: 18px; font-weight: 700; color: var(--primary-color); }

/* V9 4.7.2: search author cards + keyword highlight */
.search-author-panel{background:rgba(255,255,255,.6);border:1px solid rgba(0,0,0,.08);border-radius:12px;padding:14px 16px;margin:12px 0}
.search-author-panel-title{font-weight:600;font-size:.92rem;color:#4338ca;margin-bottom:10px}
.search-author-grid{display:flex;flex-wrap:wrap;gap:10px}
.search-author-card{display:flex;flex-direction:column;align-items:center;text-decoration:none;padding:10px 12px;border-radius:10px;background:#fff;border:1px solid #e5e7eb;min-width:84px;transition:transform .15s ease}
.search-author-card:hover{transform:translateY(-2px);box-shadow:0 4px 10px rgba(0,0,0,.08)}
.search-author-avatar{width:36px;height:36px;border-radius:50%;background:linear-gradient(135deg,#6366f1,#8b5cf6);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;margin-bottom:6px}
.search-author-name{font-size:.85rem;color:#1f2937;margin-bottom:2px}
.search-author-count{font-size:.72rem;color:#9ca3af}
mark.hl-kw{background:#fde68a;color:inherit;padding:0 2px;border-radius:2px}