/* ============================================================
   流梦故事 · 仿古书卷主题
   在 style.css 之后加载，用同一套选择器覆盖现代 SaaS 皮肤。
   设计线索：宣纸 / 墨 / 朱砂印 / 双线界格 / 线装书脊
   ============================================================ */

:root {
    /* —— 纸与墨 —— */
    --paper: #f4ecd8;          /* 宣纸 */
    --paper-light: #fbf6e9;    /* 笺纸（卡片） */
    --paper-deep: #eadcbe;     /* 旧纸（凹陷/分区） */
    --paper-edge: #ddcba6;     /* 纸边 */
    --ink: #241e18;            /* 浓墨 */
    --ink-soft: #5a4c3d;       /* 淡墨 */
    --ink-faint: #8c7a63;      /* 烟墨 */
    --cinnabar: #a83226;       /* 朱砂 */
    --cinnabar-dark: #85261c;
    --cinnabar-light: #c2564a;
    --indigo: #35505c;         /* 靛青 */
    --gold: #a67c3d;           /* 藤黄 */
    --rule: #c9b795;           /* 界格线 */

    /* —— 覆盖原主题变量，令旧组件自动换色 —— */
    --primary-color: var(--cinnabar);
    --primary-dark: var(--cinnabar-dark);
    --primary-light: var(--cinnabar-light);
    --secondary-color: var(--indigo);
    --accent-color: var(--gold);
    --text-primary: var(--ink);
    --text-secondary: var(--ink-soft);
    --text-muted: var(--ink-faint);
    --bg-primary: var(--paper-light);
    --bg-secondary: var(--paper);
    --bg-tertiary: var(--paper-deep);
    --border-color: var(--rule);
    --shadow-sm: 0 1px 0 rgba(255, 255, 255, .45) inset, 0 1px 3px rgba(58, 42, 30, .10);
    --shadow-md: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 4px 14px rgba(58, 42, 30, .10);
    --shadow-lg: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 14px 34px rgba(58, 42, 30, .16);
    --radius-sm: 2px;
    --radius-md: 2px;
    --radius-lg: 3px;
    --transition: all .2s ease;
    --space-gradient: linear-gradient(135deg, var(--indigo), var(--ink));
    --space-gradient-warm: linear-gradient(135deg, var(--indigo), var(--cinnabar));
    --space-glow-sm: 0 0 12px rgba(53, 80, 92, .12);
    --space-glow-md: 0 0 24px rgba(53, 80, 92, .18);
    --glass-bg: rgba(247, 240, 223, .86);
    --glass-border: rgba(90, 76, 61, .18);
    --glass-shadow: 0 4px 18px rgba(58, 42, 30, .08);

    /* —— 字体 —— */
    --font-display: "STKaiti", "Kaiti SC", "KaiTi", "楷体", "TW-Kai",
                    "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", "SimSun", Georgia, serif;
    --font-body: "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC",
                 "Source Han Serif SC", Georgia, "Times New Roman", serif;
    --font-mono: "SF Mono", "Fira Code", "Cascadia Code", Consolas, monospace;

    /* —— 纸纹 —— */
    --paper-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.055'/%3E%3C/svg%3E");
}

/* ============================================================
   基础排版
   ============================================================ */
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--ink);
    background-color: var(--paper);
    background-image:
        var(--paper-grain),
        radial-gradient(1100px 520px at 50% -8%, rgba(255, 255, 255, .55), transparent 70%),
        repeating-linear-gradient(0deg, rgba(90, 76, 61, .009) 0 1px, transparent 1px 3px);
    background-size: 220px 220px, auto, auto;
    background-attachment: fixed;
    line-height: 1.75;
    letter-spacing: .012em;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: .06em;
    color: var(--ink);
}

p { line-height: 1.8; }

a { color: var(--cinnabar-dark); }
a:hover { color: var(--cinnabar); }

::selection {
    background: rgba(168, 50, 38, .22);
    color: var(--ink);
}

button, input, textarea, select {
    font-family: inherit;
    letter-spacing: inherit;
}

/* 纸张纤维上的滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--paper-deep); }
::-webkit-scrollbar-thumb {
    background: #b8a37e;
    border: 2px solid var(--paper-deep);
    border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover { background: #9c8763; }

/* 键盘可达性 */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--cinnabar);
    outline-offset: 2px;
}

/* ============================================================
   导航 —— 卷首题签
   ============================================================ */
.navbar {
    background:
        var(--paper-grain),
        linear-gradient(180deg, rgba(251, 246, 233, .96), rgba(244, 236, 216, .96));
    background-size: 220px 220px, auto;
    border-bottom: 3px double var(--rule);
    box-shadow: 0 6px 18px rgba(58, 42, 30, .06);
    backdrop-filter: blur(6px);
}

.navbar .container { height: 68px; }

.logo {
    gap: 12px;
    color: var(--ink);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 23px;
    letter-spacing: .14em;
}

.logo-icon { display: none; }

.logo-seal {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    background: var(--cinnabar);
    color: #f8f0da;
    font-family: var(--font-display);
    font-size: 23px;
    line-height: 1;
    border-radius: 2px;
    box-shadow: inset 0 0 0 2px rgba(248, 240, 218, .62);
    transform: rotate(-2.5deg);
    text-shadow: 0 1px 0 rgba(0, 0, 0, .18);
}

.logo-text { padding-bottom: 2px; }

.nav-links { gap: 22px; }

.nav-link {
    position: relative;
    color: var(--ink-soft);
    font-family: var(--font-display);
    font-size: 16px;
    letter-spacing: .08em;
    font-weight: 500;
    padding: 6px 2px;
}

.nav-link:hover { color: var(--cinnabar-dark); }

.nav-link:not(.btn-primary)::after {
    content: "";
    position: absolute;
    left: 50%;
    right: 50%;
    bottom: 0;
    height: 1px;
    background: var(--cinnabar);
    transition: left .2s ease, right .2s ease;
}

.nav-link:not(.btn-primary):hover::after {
    left: 0;
    right: 0;
}

.nav-link.btn-primary {
    background: transparent;
    color: var(--cinnabar-dark);
    border: 1px solid var(--cinnabar);
    padding: 6px 14px;
    border-radius: 1px;
    box-shadow: none;
}

.nav-link.btn-primary:hover {
    background: var(--cinnabar);
    color: #f8f0da;
}

/* 创作点：一枚小签 */
.user-points {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(166, 124, 61, .10);
    border: 1px solid rgba(166, 124, 61, .38);
    color: #7d5a26;
    font-family: var(--font-display);
    font-size: 14px;
    letter-spacing: .04em;
    padding: 4px 10px;
    border-radius: 1px;
}

.points-seal {
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    background: var(--gold);
    color: #f8f0da;
    font-size: 11px;
    line-height: 1;
    border-radius: 1px;
}

/* 用户头像：姓名首字作印 */
.user-avatar-icon {
    width: 26px;
    height: 26px;
    display: inline-grid;
    place-items: center;
    background: var(--indigo);
    color: #f8f0da;
    font-family: var(--font-display);
    font-size: 14px;
    line-height: 1;
    border-radius: 1px;
    box-shadow: inset 0 0 0 1.5px rgba(248, 240, 218, .45);
    transform: rotate(-1.5deg);
}

.user-dropdown-toggle {
    color: var(--ink-soft);
    font-family: var(--font-display);
    letter-spacing: .04em;
    border-radius: 1px;
}

.user-dropdown-toggle:hover { background: rgba(90, 76, 61, .07); }

.member-tier-icon { filter: grayscale(1) sepia(.5); }

.user-caret { color: var(--ink-faint); }

.user-dropdown-menu {
    background: var(--paper-light);
    border: 1px solid var(--rule);
    border-radius: 2px;
    box-shadow: 0 14px 34px rgba(58, 42, 30, .18);
    min-width: 196px;
    padding: 4px 0;
}

.user-dropdown-menu a {
    font-family: var(--font-display);
    font-size: 15px;
    letter-spacing: .04em;
    color: var(--ink-soft);
}

.user-dropdown-menu a:hover {
    background: rgba(168, 50, 38, .07);
    color: var(--cinnabar-dark);
}

.dropdown-header {
    font-family: var(--font-display);
    color: var(--ink-faint);
    letter-spacing: .06em;
}

.user-dropdown-menu hr { border-top: 1px solid var(--rule); }

.member-badge-inline {
    background: rgba(166, 124, 61, .16);
    color: #7d5a26;
    border: 1px solid rgba(166, 124, 61, .4);
    border-radius: 1px;
}

.lang-switch { gap: 8px; }
.lang-flag {
    font-family: var(--font-display);
    color: var(--ink-soft) !important;
    letter-spacing: .04em;
}

/* 汉堡 */
.hamburger-line { background: var(--ink-soft); }

/* 消息中心 —— 改作「讯」字小印 */
.bell-button {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    background: transparent;
    border: 1px solid var(--rule);
    border-radius: 50%;
    color: var(--ink-soft) !important;
    font-family: var(--font-display);
    font-size: 15px;
    line-height: 1;
    padding: 0;
}

.bell-button:hover {
    border-color: var(--cinnabar);
    color: var(--cinnabar) !important;
}

.bell-badge {
    background: var(--cinnabar);
    color: #f8f0da;
    box-shadow: 0 0 0 2px var(--paper-light);
    font-family: var(--font-body);
}

.notification-dropdown {
    background: var(--paper-light);
    border: 1px solid var(--rule);
    border-radius: 2px;
    box-shadow: 0 16px 40px rgba(58, 42, 30, .18);
}

.notif-dropdown-header {
    border-bottom: 1px solid var(--rule);
    font-family: var(--font-display);
    letter-spacing: .06em;
}

.notif-dropdown-header strong { color: var(--ink); }

.notif-dropdown-footer {
    border-top: 1px solid var(--rule);
    background: rgba(234, 220, 190, .35);
}

.notif-dropdown-footer a { color: var(--cinnabar-dark); }

/* ============================================================
   页脚
   ============================================================ */
.footer {
    background:
        var(--paper-grain),
        linear-gradient(180deg, rgba(234, 220, 190, .45), rgba(244, 236, 216, .2));
    background-size: 220px 220px, auto;
    border-top: 3px double var(--rule);
    padding: 30px 0;
    color: var(--ink-faint);
    font-family: var(--font-display);
    letter-spacing: .1em;
}

.footer p { font-size: 14px; }

/* ============================================================
   按钮 —— 朱印 / 墨线
   ============================================================ */
.btn-primary,
.btn-secondary,
.btn-danger {
    font-family: var(--font-display);
    font-weight: 500;
    letter-spacing: .1em;
    border-radius: 1px;
    padding: 9px 22px;
    transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}

.btn-primary {
    background: var(--cinnabar);
    color: #f8f0da;
    border: 1px solid var(--cinnabar-dark);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 2px 0 rgba(58, 42, 30, .16);
}

.btn-primary:hover {
    background: var(--cinnabar-dark);
    color: #f8f0da;
    transform: translateY(-1px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 4px 10px rgba(58, 42, 30, .2);
}

.btn-primary:active { transform: translateY(0); }

.btn-secondary {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--ink-soft);
}

.btn-secondary:hover {
    background: var(--ink);
    color: var(--paper-light);
    border-color: var(--ink);
}

.btn-danger {
    background: transparent;
    color: var(--cinnabar-dark);
    border: 1px solid var(--cinnabar);
}

.btn-danger:hover {
    background: var(--cinnabar);
    color: #f8f0da;
}

.btn-lg { padding: 12px 30px; font-size: 16px; }
.btn-sm { padding: 5px 12px; font-size: 13px; }

.btn-trash-link { color: var(--ink-faint); }
.btn-trash-link:hover { color: var(--cinnabar); }

/* 首屏与宣传按钮（旧落点，也一并收编） */
.btn-hero {
    border-radius: 1px;
    font-family: var(--font-display);
    letter-spacing: .12em;
    font-weight: 500;
}

.btn-hero-primary {
    background: var(--cinnabar);
    color: #f8f0da;
    border: 1px solid var(--cinnabar-dark);
    box-shadow: 0 2px 0 rgba(58, 42, 30, .18);
}

.btn-hero-primary:hover {
    background: var(--cinnabar-dark);
    color: #f8f0da;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(58, 42, 30, .22);
}

.btn-hero-outline {
    border: 1px solid var(--ink-soft);
    color: var(--ink);
}

.btn-hero-outline:hover {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--paper-light);
}

/* ============================================================
   卡片 —— 笺纸
   ============================================================ */
.novel-card,
.feature-card,
.auth-card,
.pricing-card,
.recharge-card,
.summary-card,
.stat-card,
.daily-checkin,
.quick-create-banner,
.pending-outlines-banner,
.season-card,
.episode-card {
    background:
        var(--paper-grain),
        linear-gradient(180deg, var(--paper-light), #f6efdd);
    background-size: 220px 220px, auto;
    border: 1px solid var(--rule);
    border-radius: 2px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 3px 0 rgba(90, 76, 61, .06), 0 10px 24px rgba(58, 42, 30, .07);
}

.novel-card,
.feature-card,
.auth-card,
.pricing-card,
.summary-card,
.stat-card {
    position: relative;
}

.novel-card::after,
.feature-card::after,
.auth-card::after,
.pricing-card::after,
.summary-card::after {
    content: "";
    position: absolute;
    inset: 6px;
    border: 1px solid rgba(201, 183, 149, .5);
    pointer-events: none;
}

.novel-card:hover,
.feature-card:hover {
    transform: translateY(-3px);
    border-color: var(--cinnabar-light);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 6px 0 rgba(90, 76, 61, .05), 0 18px 34px rgba(58, 42, 30, .13);
}

.novel-cover {
    background-blend-mode: multiply;
    border-bottom: 1px solid var(--rule);
}

.novel-genre-tag {
    background: rgba(168, 50, 38, .92);
    color: #f8f0da;
    writing-mode: vertical-rl;
    text-orientation: upright;
    padding: 9px 5px;
    border-radius: 1px;
    font-family: var(--font-display);
    font-size: 13px;
    letter-spacing: .16em;
    box-shadow: 0 2px 6px rgba(58, 42, 30, .2);
    transform: rotate(1deg);
}

.novel-info { padding: 22px 20px; }

.novel-title {
    font-family: var(--font-display);
    font-size: 20px;
    letter-spacing: .08em;
}

.meta-item { font-size: 12.5px; letter-spacing: .03em; }

.latest-chapter {
    color: var(--ink-soft);
    border-top: 1px dashed rgba(201, 183, 149, .7);
    padding-top: 10px;
    margin-top: 10px;
}

/* 空状态 */
.empty-icon { filter: grayscale(1) sepia(.45) opacity(.85); }

.quick-start-input,
.quick-create-input,
.quick-start-box,
.option-content {
    border-radius: 2px;
}

.quick-start-box {
    background: rgba(255, 255, 255, .35);
    border: 1px solid var(--rule);
}

.quick-start-input,
.quick-create-input {
    background: rgba(251, 246, 233, .8);
    border: 1px solid var(--rule);
    color: var(--ink);
}

.quick-start-input:focus,
.quick-create-input:focus {
    outline: none;
    border-color: var(--cinnabar);
}

/* ============================================================
   表单 —— 墨线格
   ============================================================ */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="date"],
textarea,
select,
.form-input {
    font-family: var(--font-body);
    background: rgba(251, 246, 233, .78);
    color: var(--ink);
    border: 1px solid var(--rule);
    border-radius: 1px;
    box-shadow: 0 1px 2px rgba(58, 42, 30, .04) inset;
}

input::placeholder,
textarea::placeholder { color: #a69274; }

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus,
.form-input:focus {
    outline: none;
    border-color: var(--cinnabar);
    box-shadow: 0 0 0 3px rgba(168, 50, 38, .12);
}

.form-group label,
.form-label {
    font-family: var(--font-display);
    letter-spacing: .05em;
    color: var(--ink-soft);
}

input[type="checkbox"],
input[type="radio"] { accent-color: var(--cinnabar); }

.user-input-section textarea:focus { border-color: var(--cinnabar); }

.code-input { font-family: var(--font-mono); }

/* ============================================================
   选项卡（创作流程）
   ============================================================ */
.option-content {
    background: rgba(251, 246, 233, .7);
    border: 1px solid var(--rule);
    border-radius: 2px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset;
}

.option-card:hover .option-content {
    border-color: var(--cinnabar-light);
    background: var(--paper-light);
}

.option-card input:checked + .option-content {
    border-color: var(--cinnabar);
    background:
        var(--paper-grain),
        linear-gradient(180deg, rgba(168, 50, 38, .06), rgba(166, 124, 61, .05));
    background-size: 220px 220px, auto;
    box-shadow: inset 0 0 0 1px rgba(168, 50, 38, .35);
}

.option-icon {
    font-size: 30px;
    line-height: 1;
    color: var(--cinnabar-dark);
    font-family: var(--font-display);
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(168, 50, 38, .5);
    border-radius: 1px;
    background: rgba(168, 50, 38, .04);
    filter: grayscale(1) sepia(.35);
}

.option-card input:checked + .option-content .option-icon {
    background: var(--cinnabar);
    color: #f8f0da;
    border-color: var(--cinnabar-dark);
    filter: none;
}

.option-title {
    font-family: var(--font-display);
    font-size: 17px;
    letter-spacing: .08em;
}

.option-desc { line-height: 1.65; }

/* 标签 */
.tag-item,
.tag-label {
    border-radius: 1px;
}

.tag-item {
    border: 1px solid var(--rule);
    background: rgba(251, 246, 233, .6);
    color: var(--ink-soft);
    font-family: var(--font-display);
    letter-spacing: .04em;
}

.tag-item:hover { border-color: var(--cinnabar-light); }

.tag-item.selected,
.tag-item input:checked + .tag-label,
.tag-item.active {
    background: var(--cinnabar);
    color: #f8f0da;
    border-color: var(--cinnabar-dark);
}

/* ============================================================
   创作进度步骤
   ============================================================ */
.progress-steps { gap: 0; }

.step-num {
    background: transparent;
    border: 1px solid var(--rule);
    color: var(--ink-faint);
    border-radius: 1px;
    font-family: var(--font-display);
    font-weight: 500;
}

.step.active .step-num,
.step.completed .step-num {
    background: var(--cinnabar);
    border-color: var(--cinnabar-dark);
    color: #f8f0da;
    box-shadow: inset 0 0 0 2px rgba(248, 240, 218, .55);
}

.step-label {
    font-family: var(--font-display);
    letter-spacing: .06em;
    color: var(--ink-faint);
}

.step.active .step-label { color: var(--ink); }

.step-line {
    background: var(--rule);
    height: 1px;
}

.step-content h2,
.step-content h3,
.step-desc { letter-spacing: .04em; }

.step-desc { color: var(--ink-faint); }

.config-section {
    background: rgba(234, 220, 190, .28);
    border: 1px solid var(--rule);
    border-radius: 2px;
}

.config-title {
    font-family: var(--font-display);
    letter-spacing: .08em;
    border-left: 3px solid var(--cinnabar);
    padding-left: 10px;
}

/* 断点续传 / 快速模式横幅 */
.create-resume-banner,
.sequel-banner,
.quick-create-banner {
    border: 1px solid var(--rule);
    border-left: 4px solid var(--cinnabar);
    border-radius: 2px;
}

.quick-create-banner {
    background:
        var(--paper-grain),
        linear-gradient(180deg, rgba(251, 246, 233, .95), rgba(234, 220, 190, .55));
    background-size: 220px 220px, auto;
}

.sequel-banner-icon,
.quick-create-icon { filter: grayscale(1) sepia(.5); }

/* ============================================================
   故事详情 / 阅读页
   ============================================================ */
.sidebar {
    background:
        var(--paper-grain),
        linear-gradient(180deg, rgba(234, 220, 190, .55), rgba(244, 236, 216, .35));
    background-size: 220px 220px, auto;
    border-right: 3px double var(--rule);
}

.sidebar-completeness {
    background: rgba(251, 246, 233, .7);
    border: 1px solid var(--rule);
    border-radius: 2px;
}

.sidebar-completeness:hover {
    border-color: var(--cinnabar-light);
    box-shadow: 0 2px 8px rgba(168, 50, 38, .12);
}

.sidebar-completeness-fill { background: var(--cinnabar); border-radius: 0; }
.sidebar-completeness-bar { border-radius: 0; background: rgba(201, 183, 149, .55); }
.sidebar-completeness-refresh:hover,
.sidebar-completeness-ask { color: var(--cinnabar-dark); }

.back-link { font-family: var(--font-display); letter-spacing: .04em; }
.novel-title-sidebar { font-family: var(--font-display); letter-spacing: .06em; }

.tag {
    background: rgba(166, 124, 61, .12);
    color: #7d5a26;
    border: 1px solid rgba(166, 124, 61, .3);
    border-radius: 1px;
    font-family: var(--font-display);
}

.stage-progress,
.bible-panel,
.chapter-content {
    background:
        var(--paper-grain),
        linear-gradient(180deg, #fbf6e9, #f6efdd);
    background-size: 220px 220px, auto;
    border: 1px solid var(--rule);
    border-radius: 2px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 10px 26px rgba(58, 42, 30, .07);
}

.chapter-content {
    padding: 56px 64px;
    position: relative;
}

.chapter-content::before {
    content: "";
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(201, 183, 149, .55);
    pointer-events: none;
}

.chapter-text {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 2.15;
    letter-spacing: .03em;
    color: #2b241c;
}

.chapter-text p { margin-bottom: 18px; }

/* 首段首字：如古籍的起首字 */
.chapter-text > p:first-of-type {
    text-indent: 0;
}

.chapter-text > p:first-of-type::first-letter {
    float: left;
    font-family: var(--font-display);
    font-size: 3.1em;
    line-height: .92;
    padding: 4px 12px 0 0;
    color: var(--cinnabar-dark);
}

.chapter-text h1,
.chapter-text h2,
.chapter-text h3 {
    text-align: center;
    letter-spacing: .12em;
    margin: 1.4em 0 .9em;
}

.chapter-item { border-bottom: 1px solid rgba(201, 183, 149, .45); }

.chapter-link {
    font-family: var(--font-display);
    letter-spacing: .04em;
    color: var(--ink-soft);
}

.chapter-item:hover .chapter-link { color: var(--cinnabar-dark); }

.chapter-btn {
    border-radius: 1px;
    border-color: var(--rule);
}

.chapter-indicator,
.toolbar-chapter-nav,
.stage-progress {
    font-family: var(--font-display);
    letter-spacing: .04em;
}

.stage-progress-fill,
.stage-sub-bar .stage-progress-fill {
    background: var(--cinnabar);
}

.empty-chapter { color: var(--ink-faint); }

/* 正文工具条 */
.novel-toolbar {
    background: rgba(251, 246, 233, .82);
    border: 1px solid var(--rule);
    border-radius: 2px;
    backdrop-filter: blur(6px);
}

/* 故事圣经 */
.bible-panel {
    border-left: 4px solid var(--cinnabar);
}

.bible-header { border-bottom: 1px solid var(--rule); }

.bible-panel h3,
.bible-panel h4 { letter-spacing: .08em; }

/* ============================================================
   模态框 / 下拉 / 提示
   ============================================================ */
.modal { background: rgba(36, 30, 24, .55); backdrop-filter: blur(2px); }

.modal-content,
.fork-modal-content,
.mgmt-modal-content {
    background:
        var(--paper-grain),
        linear-gradient(180deg, var(--paper-light), #f5eedc);
    background-size: 220px 220px, auto;
    border: 1px solid var(--ink-soft);
    border-radius: 2px;
    box-shadow: 0 24px 60px rgba(24, 18, 12, .35);
}

.modal-content h3 { font-family: var(--font-display); letter-spacing: .08em; }

.fork-header,
.fork-actions,
.mgmt-tab-toolbar {
    border-color: var(--rule) !important;
    background: rgba(234, 220, 190, .35) !important;
}

.mgmt-tab.active {
    color: var(--cinnabar-dark);
    border-bottom-color: var(--cinnabar);
}

/* Flash 消息 */
.flash {
    background: var(--paper-light);
    border: 1px solid var(--rule);
    border-left: 4px solid var(--ink-soft);
    border-radius: 2px;
    color: var(--ink);
    box-shadow: 0 8px 22px rgba(58, 42, 30, .14);
    font-family: var(--font-display);
    letter-spacing: .03em;
}

.flash-success { border-left-color: #4f6b4a; }
.flash-error { border-left-color: var(--cinnabar); }
.flash-info { border-left-color: var(--indigo); }
.flash-close { color: var(--ink-faint); }

/* Toast */
.toast {
    background: var(--ink) !important;
    color: var(--paper-light) !important;
    border-radius: 2px !important;
    font-family: var(--font-display);
}

/* ============================================================
   表格 / 徽章（管理后台等）
   ============================================================ */
.admin-table th,
.foreshadow-table th {
    background: rgba(90, 76, 61, .08);
    color: var(--ink-soft);
    font-family: var(--font-display);
    letter-spacing: .06em;
    border-bottom: 1px solid var(--rule);
}

.admin-table td,
.foreshadow-table td { border-bottom: 1px solid rgba(201, 183, 149, .55); }

.admin-table tr:hover,
.foreshadow-table tr:hover { background: rgba(166, 124, 61, .07); }

.badge {
    border-radius: 1px;
    font-family: var(--font-display);
    letter-spacing: .04em;
    border: 1px solid transparent;
}

.badge-success { background: rgba(79, 107, 74, .14); color: #3f5a3a; border-color: rgba(79, 107, 74, .3); }
.badge-warning { background: rgba(166, 124, 61, .16); color: #7d5a26; border-color: rgba(166, 124, 61, .35); }
.badge-danger { background: rgba(168, 50, 38, .12); color: var(--cinnabar-dark); border-color: rgba(168, 50, 38, .3); }

.badge-planned,
.badge-open,
.badge-used,
.badge-closed {
    border-radius: 1px;
    border: 1px solid rgba(90, 76, 61, .2);
}

/* ============================================================
   会员 / 充值
   ============================================================ */
.membership-subtitle,
.pricing-subtitle,
.points-note,
.pricing-note { color: var(--ink-faint); }

.tier-name,
.pricing-label { font-family: var(--font-display); letter-spacing: .06em; }

.tier-price,
.pricing-points {
    color: var(--cinnabar-dark);
    font-family: var(--font-display);
}

.tier-period,
.pricing-price { color: var(--ink-soft); }

.pricing-card-featured {
    border-color: var(--cinnabar);
    background:
        var(--paper-grain),
        linear-gradient(180deg, rgba(168, 50, 38, .05), rgba(251, 246, 233, .9));
    background-size: 220px 220px, auto;
    box-shadow: inset 0 0 0 1px rgba(168, 50, 38, .35), 0 10px 24px rgba(58, 42, 30, .09);
}

.best-value {
    background: var(--cinnabar);
    color: #f8f0da;
    border-radius: 1px;
    font-family: var(--font-display);
    letter-spacing: .06em;
}

.btn-subscribe,
.btn-alipay {
    border-radius: 1px;
    font-family: var(--font-display);
    letter-spacing: .08em;
}

.btn-alipay {
    background: var(--indigo);
    border: 1px solid #24343c;
    color: #f8f0da;
}

.btn-alipay:hover { background: #24343c; }

.current-points strong { color: var(--gold); }

.btn-subscribe-primary { background: var(--cinnabar); color: #f8f0da; }
.btn-subscribe-outline { background: transparent; color: var(--cinnabar-dark); border: 1px solid var(--cinnabar); }
.btn-subscribe-alipay { background: var(--indigo); color: #f8f0da; }

.active-membership {
    background:
        var(--paper-grain),
        linear-gradient(135deg, rgba(53, 80, 92, .92), rgba(36, 30, 24, .94));
    background-size: 220px 220px, auto;
    border: 1px solid var(--ink);
    border-radius: 2px;
}

.recharge-card { text-align: center; }

.recharge-points { color: var(--gold); font-family: var(--font-display); }

/* ============================================================
   认证页 —— 一纸笺
   ============================================================ */
.auth-page { min-height: 72vh; }

.auth-card {
    max-width: 420px;
    padding: 44px 40px;
    border: 1px solid var(--ink-soft);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 18px 44px rgba(58, 42, 30, .14);
}

.auth-card h1 {
    font-size: 30px;
    letter-spacing: .16em;
    color: var(--ink);
}

.auth-card h1::after {
    content: "";
    display: block;
    width: 46px;
    height: 2px;
    margin: 12px auto 0;
    background: var(--cinnabar);
    box-shadow: 0 4px 0 -1px rgba(201, 183, 149, .9);
}

.auth-subtitle { color: var(--ink-faint); letter-spacing: .04em; }

.auth-tabs { border-bottom: 1px solid var(--rule); }

.auth-tab {
    font-family: var(--font-display);
    letter-spacing: .06em;
    color: var(--ink-faint);
    border-bottom: 2px solid transparent;
}

.auth-tab.active,
.auth-tab:hover {
    color: var(--cinnabar-dark);
    border-bottom-color: var(--cinnabar);
}

.auth-form .btn-primary { width: 100%; margin-top: 6px; }

.auth-footer,
.auth-links { color: var(--ink-faint); }

.btn-google {
    border: 1px solid var(--rule);
    border-radius: 1px;
    background: var(--paper-light);
    color: var(--ink-soft);
    font-family: var(--font-display);
    letter-spacing: .04em;
}

.btn-google:hover {
    border-color: var(--cinnabar-light);
    background: var(--paper);
    color: var(--ink);
}

.sms-input-row .btn-secondary {
    border-radius: 1px;
    border: 1px solid var(--rule);
    background: var(--paper-light);
    color: var(--ink-soft);
    font-family: var(--font-display);
    letter-spacing: .04em;
}

.sms-input-row .btn-secondary:hover {
    border-color: var(--cinnabar);
    background: rgba(168, 50, 38, .06);
    color: var(--cinnabar-dark);
}

.sms-input-row .btn-secondary:disabled {
    background: var(--paper-deep);
    color: var(--ink-faint);
}

/* ============================================================
   首页 —— 手卷
   ============================================================ */
/* 旧 Hero 兜底 */
.landing-hero {
    background: transparent;
    padding: 0;
}

/* ============ 手卷首屏 ============ */
.scroll-hero {
    position: relative;
    padding: 34px 0 46px;
    overflow: hidden;
    isolation: isolate;
}

.scroll-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(60% 80% at 18% 30%, rgba(53, 80, 92, .06), transparent 70%),
        radial-gradient(50% 70% at 88% 70%, rgba(168, 50, 38, .05), transparent 70%);
    z-index: -1;
}

.scroll-hero-frame {
    position: relative;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 46px;
}

.scroll-hero-rod {
    position: absolute;
    top: 18px;
    bottom: 18px;
    width: 24px;
    border-radius: 4px;
    background:
        repeating-linear-gradient(90deg, rgba(0, 0, 0, .12) 0 1px, transparent 1px 4px),
        linear-gradient(90deg, #2b1d14, #5a3c28 28%, #7d5738 50%, #4a3120 74%, #241811);
    box-shadow: 0 10px 26px rgba(36, 30, 24, .3), inset 0 0 0 1px rgba(0, 0, 0, .35);
    z-index: 2;
}

.scroll-hero-rod::before,
.scroll-hero-rod::after {
    content: "";
    position: absolute;
    left: -4px;
    right: -4px;
    height: 16px;
    border-radius: 2px;
    background: linear-gradient(180deg, #d9b166, #a67c3d 45%, #7e5a24);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset;
}

.scroll-hero-rod::before { top: -10px; }
.scroll-hero-rod::after { bottom: -10px; }

.scroll-hero-rod--left { left: 18px; }
.scroll-hero-rod--right { right: 18px; }

.scroll-hero-sheet {
    position: relative;
    padding: 52px 54px 56px;
    background:
        var(--paper-grain),
        linear-gradient(180deg, #fbf6e9, #f4ecda 55%, #efe4cf);
    background-size: 220px 220px, auto;
    border-top: 1px solid rgba(201, 183, 149, .8);
    border-bottom: 1px solid rgba(201, 183, 149, .8);
    box-shadow: 0 22px 60px rgba(58, 42, 30, .16), 0 1px 0 rgba(255, 255, 255, .7) inset;
    clip-path: inset(0);
    animation: scrollUnfurl .9s cubic-bezier(.22, .8, .3, 1) both;
}

/* 界格：淡淡的竖行，像旧稿纸 */
.scroll-hero-sheet::before {
    content: "";
    position: absolute;
    inset: 12px;
    background-image: repeating-linear-gradient(90deg, transparent 0 47px, rgba(90, 76, 61, .05) 47px 48px);
    pointer-events: none;
}

.scroll-hero-sheet::after {
    content: "";
    position: absolute;
    inset: 14px;
    border: 1px solid rgba(201, 183, 149, .55);
    pointer-events: none;
}

.scroll-hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr) minmax(220px, 300px);
    align-items: center;
    gap: 44px;
    min-height: 360px;
}

.scroll-hero-titlecol {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.scroll-eyebrow {
    writing-mode: vertical-rl;
    text-orientation: upright;
    font-family: var(--font-display);
    font-size: 12px;
    letter-spacing: .3em;
    color: var(--ink-faint);
}

.scroll-hero-title {
    writing-mode: vertical-rl;
    text-orientation: upright;
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(40px, 4.2vw, 58px);
    font-weight: 600;
    letter-spacing: .16em;
    line-height: 1.12;
    color: var(--ink);
    text-shadow: 0 1px 0 rgba(255, 255, 255, .6);
}

.scroll-hero-title span {
    display: inline-block;
    animation: inkSeep .8s ease both;
}
.scroll-hero-title span:nth-child(1) { animation-delay: .22s; }
.scroll-hero-title span:nth-child(2) { animation-delay: .32s; }
.scroll-hero-title span:nth-child(3) { animation-delay: .42s; }
.scroll-hero-title span:nth-child(4) { animation-delay: .52s; }

.scroll-seal {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    background: var(--cinnabar);
    color: #f8f0da;
    writing-mode: vertical-rl;
    text-orientation: upright;
    font-family: var(--font-display);
    font-size: 16px;
    line-height: 1.05;
    letter-spacing: .1em;
    border-radius: 2px;
    box-shadow: inset 0 0 0 2px rgba(248, 240, 218, .55), 0 3px 8px rgba(58, 42, 30, .2);
    transform: rotate(-4deg);
}

.scroll-hero-copy {
    padding: 6px 0;
    animation: copyRise .8s .35s ease both;
}

.scroll-hero-subtitle {
    font-family: var(--font-display);
    font-size: clamp(19px, 1.7vw, 24px);
    letter-spacing: .2em;
    color: var(--ink-soft);
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(201, 183, 149, .8);
    position: relative;
}

.scroll-hero-subtitle::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    border-bottom: 1px solid rgba(201, 183, 149, .45);
}

.scroll-hero-desc {
    max-width: 520px;
    font-size: 15.5px;
    line-height: 2;
    color: var(--ink-soft);
    letter-spacing: .02em;
    margin-bottom: 32px;
}

.scroll-hero-actions {
    display: flex;
    justify-content: flex-start;
    gap: 14px;
    flex-wrap: wrap;
}

.scroll-hero-actions .btn-hero {
    padding: 12px 28px;
    font-size: 15px;
}

.scroll-hero-ink {
    position: relative;
    align-self: stretch;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: .92;
}

.scroll-hero-ink svg {
    width: 100%;
    height: auto;
    max-height: 300px;
}

.scroll-hero-ink .ink-sun {
    animation: sunRise 1.4s .5s ease both;
    transform-origin: center;
}

/* ============ 首页其余区块 ============ */
.brand-story {
    background: transparent;
    border-bottom: 1px solid rgba(201, 183, 149, .55);
    padding: 64px 24px 68px;
}

.brand-story-title {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 600;
    letter-spacing: .28em;
    color: var(--ink);
}

.brand-story-divider {
    width: 64px;
    height: 2px;
    background: var(--cinnabar);
    border-radius: 0;
    margin: 0 auto 30px;
    position: relative;
}

.brand-story-divider::before,
.brand-story-divider::after {
    content: "";
    position: absolute;
    top: 3px;
    width: 100%;
    border-top: 1px solid rgba(201, 183, 149, .9);
}

.brand-story-divider::before { left: -10px; width: calc(100% + 20px); }

.brand-story-body {
    font-size: 16.5px;
    line-height: 2.25;
    color: var(--ink-soft);
    letter-spacing: .015em;
}

.brand-story-body p { margin-bottom: 14px; }

.landing-stats {
    background: rgba(234, 220, 190, .32);
    border-bottom: 1px solid rgba(201, 183, 149, .6);
}

.stat-num {
    font-family: var(--font-display);
    color: var(--cinnabar-dark);
    letter-spacing: .04em;
}

.landing-section { padding: 72px 24px; }

.landing-section-header h2 {
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 600;
    letter-spacing: .18em;
    color: var(--ink);
    display: inline-block;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--ink);
    position: relative;
}

.landing-section-header h2::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    border-bottom: 1px solid rgba(201, 183, 149, .95);
}

.landing-section-header p {
    font-size: 15px;
    color: var(--ink-faint);
    letter-spacing: .1em;
    margin-top: 18px;
}

.feature-card {
    padding: 30px 28px;
    overflow: hidden;
}

.feature-seal {
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-bottom: 18px;
    border: 1px solid var(--cinnabar);
    color: var(--cinnabar-dark);
    font-family: var(--font-display);
    font-size: 24px;
    line-height: 1;
    letter-spacing: 0;
    background: rgba(168, 50, 38, .035);
    transition: background .2s ease, color .2s ease;
}

.feature-card:hover .feature-seal {
    background: var(--cinnabar);
    color: #f8f0da;
}

.feature-card h3 {
    font-family: var(--font-display);
    font-size: 19px;
    letter-spacing: .1em;
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 14.5px;
    color: var(--ink-soft);
    line-height: 1.85;
}

.workflow-step-num {
    width: 52px;
    height: 52px;
    border-radius: 2px;
    background: transparent;
    border: 1px solid var(--cinnabar);
    color: var(--cinnabar-dark);
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 500;
    box-shadow: inset 0 0 0 2px rgba(168, 50, 38, .12);
}

.workflow-step h4 {
    font-family: var(--font-display);
    font-size: 17px;
    letter-spacing: .08em;
}

.workflow-step p { color: var(--ink-faint); }

.landing-cta {
    background:
        var(--paper-grain),
        linear-gradient(180deg, rgba(234, 220, 190, .5), rgba(244, 236, 216, .2));
    background-size: 220px 220px, auto;
    border-top: 1px solid rgba(201, 183, 149, .7);
    border-bottom: 1px solid rgba(201, 183, 149, .7);
}

.landing-cta h2 {
    font-family: var(--font-display);
    font-size: 28px;
    letter-spacing: .2em;
    color: var(--ink);
}

.landing-cta p { color: var(--ink-soft); letter-spacing: .04em; }

.template-section {
    background: transparent !important;
    padding: 64px 0 72px;
}

.template-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.template-heading {
    text-align: center;
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 600;
    letter-spacing: .16em;
    color: var(--ink);
    margin-bottom: 8px;
}

.template-sub {
    text-align: center;
    color: var(--ink-faint);
    font-size: 14.5px;
    letter-spacing: .06em;
    margin-bottom: 34px;
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.template-card {
    display: block;
    padding: 24px;
    background:
        var(--paper-grain),
        linear-gradient(180deg, var(--paper-light), #f6efdd);
    background-size: 220px 220px, auto;
    border: 1px solid var(--rule);
    border-radius: 2px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .55) inset, 0 10px 24px rgba(58, 42, 30, .07);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.template-card:hover {
    transform: translateY(-3px);
    border-color: var(--cinnabar-light);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .55) inset, 0 18px 34px rgba(58, 42, 30, .13);
    color: inherit;
}

.template-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.template-card-tag {
    background: var(--cinnabar);
    color: #f8f0da;
    padding: 3px 10px;
    border-radius: 1px;
    font-family: var(--font-display);
    font-size: 12px;
    letter-spacing: .08em;
}

.template-card-chapters {
    color: var(--ink-faint);
    font-size: 13px;
    letter-spacing: .04em;
}

.template-card-title {
    font-family: var(--font-display);
    font-size: 19px;
    letter-spacing: .06em;
    color: var(--ink);
    margin: 0 0 8px;
}

.template-card-snippet {
    color: var(--ink-soft);
    font-size: 13.5px;
    line-height: 1.7;
    min-height: 60px;
    margin: 0;
}

.template-card-cta {
    color: var(--cinnabar-dark);
    font-family: var(--font-display);
    font-size: 13.5px;
    letter-spacing: .08em;
    margin-top: 14px;
}

/* 会员等级：小印 */
.member-tier-icon {
    display: inline-grid;
    place-items: center;
    width: 17px;
    height: 17px;
    background: rgba(166, 124, 61, .16);
    border: 1px solid rgba(166, 124, 61, .55);
    color: #7d5a26;
    font-family: var(--font-display);
    font-size: 11px;
    line-height: 1;
    border-radius: 1px;
    filter: none;
}

/* ============================================================
   剧集 / 流梦空间的基础收编
   ============================================================ */
.drama-card,
.episode-card,
.season-card {
    border-radius: 2px;
    border: 1px solid var(--rule);
}

/* --- 流梦空间：广场 --- */
.space-hero {
    background:
        var(--paper-grain),
        radial-gradient(60% 90% at 20% 20%, rgba(53, 80, 92, .08), transparent 65%),
        radial-gradient(55% 80% at 85% 75%, rgba(168, 50, 38, .06), transparent 65%),
        linear-gradient(180deg, rgba(251, 246, 233, .95), rgba(234, 220, 190, .55));
    background-size: 220px 220px, auto, auto, auto;
    border: 1px solid var(--rule);
    border-radius: 2px;
    padding: 52px 24px 46px;
}

.space-hero::after {
    width: 140px;
    height: 2px;
    border-radius: 0;
    background: var(--cinnabar);
}

.space-hero h1 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: .22em;
}

.space-hero-text {
    background: none;
    -webkit-text-fill-color: currentColor;
    color: var(--ink);
}

.space-subtitle {
    color: var(--ink-faint);
    letter-spacing: .12em;
}

.space-filters {
    background: rgba(251, 246, 233, .78);
    border: 1px solid var(--rule);
    border-radius: 2px;
    backdrop-filter: blur(6px);
}

.space-filter-group select,
.space-filter-group input {
    border-radius: 1px;
    background: var(--paper-light);
    border-color: var(--rule);
    color: var(--ink);
}

.space-card,
.space-spotlight-card {
    background:
        var(--paper-grain),
        linear-gradient(180deg, var(--paper-light), #f6efdd);
    background-size: 220px 220px, auto;
    border: 1px solid var(--rule);
    border-radius: 2px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .55) inset, 0 8px 20px rgba(58, 42, 30, .07);
}

.space-card::before,
.space-spotlight-card::before {
    background: var(--cinnabar);
    border-radius: 0;
    opacity: .45;
}

.space-card:hover,
.space-spotlight-card:hover {
    border-color: var(--cinnabar-light);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .55) inset, 0 16px 32px rgba(58, 42, 30, .13);
}

.space-card-title,
.space-spotlight-card h3 {
    font-family: var(--font-display);
    letter-spacing: .06em;
    color: var(--ink);
}

.space-tag {
    border-radius: 1px;
    font-family: var(--font-display);
    letter-spacing: .04em;
    border: 1px solid transparent;
}

.space-tag.genre {
    background: rgba(53, 80, 92, .12);
    color: var(--indigo);
    border-color: rgba(53, 80, 92, .25);
}

.space-tag.mood {
    background: rgba(166, 124, 61, .14);
    color: #7d5a26;
    border-color: rgba(166, 124, 61, .3);
}

.space-tag.form {
    background: rgba(168, 50, 38, .1);
    color: var(--cinnabar-dark);
    border-color: rgba(168, 50, 38, .22);
}

.space-spotlight-badge {
    background: var(--cinnabar);
    border-radius: 1px;
    font-family: var(--font-display);
    letter-spacing: .06em;
}

/* --- 流梦空间：阅读页 --- */
.space-read-header {
    background: rgba(244, 236, 216, .9);
    border-bottom: 1px solid var(--rule);
    top: 68px;
}

.space-back-link,
.space-novel-title,
.space-chapter-title {
    font-family: var(--font-display);
    color: var(--ink);
    letter-spacing: .05em;
}

.space-novel-title { font-size: 1.5rem; }

.space-novel-intro {
    background: rgba(251, 246, 233, .6);
    border-left: 3px solid var(--cinnabar);
    border-radius: 1px;
}

.space-order-btn,
.space-nav-btn {
    border-radius: 1px;
    background: var(--paper-light);
    color: var(--cinnabar-dark);
    border: 1px solid var(--rule);
    font-family: var(--font-display);
    letter-spacing: .05em;
}

.space-order-btn:hover,
.space-nav-btn:hover {
    background: var(--cinnabar);
    border-color: var(--cinnabar-dark);
    color: #f8f0da;
    box-shadow: 0 4px 12px rgba(58, 42, 30, .18);
}

.space-chapter-nav {
    background: rgba(251, 246, 233, .82);
    border: 1px solid var(--rule);
    border-radius: 2px;
    box-shadow: none;
    backdrop-filter: blur(6px);
}

.space-chapter {
    background:
        var(--paper-grain),
        linear-gradient(180deg, var(--paper-light), #f6efdd);
    background-size: 220px 220px, auto;
    border: 1px solid var(--rule);
    border-radius: 2px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .55) inset, 0 10px 26px rgba(58, 42, 30, .07);
    padding: 48px 54px;
}

.space-chapter-title {
    font-size: 1.45rem;
    border-bottom: 1px solid var(--rule);
    border-image: none;
    padding-bottom: 14px;
}

.space-chapter-content {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 2.1;
    letter-spacing: .02em;
    color: var(--ink-soft);
}

.space-read-footer {
    border-top: 1px solid var(--rule);
    color: var(--ink-faint);
}

/* ============================================================
   页面标题 —— 墨字双线
   ============================================================ */
.page-header h1,
.pricing-header h1,
.membership-page h1 {
    background: none;
    -webkit-background-clip: border-box;
    -webkit-text-fill-color: currentColor;
    background-clip: border-box;
    color: var(--ink);
    font-family: var(--font-display);
    letter-spacing: .18em;
    display: inline-block;
    position: relative;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--ink);
}

.page-header h1::after,
.pricing-header h1::after,
.membership-page h1::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    border-bottom: 1px solid rgba(201, 183, 149, .95);
}

.page-header .subtitle,
.pricing-header .subtitle {
    color: var(--ink-faint);
    letter-spacing: .06em;
}

/* ============================================================
   签到 / 消耗说明 / 表单控件收口
   ============================================================ */
.checkin-card {
    background:
        var(--paper-grain),
        linear-gradient(180deg, #fbf6e9, #f3e6c8);
    background-size: 220px 220px, auto;
    border: 1px solid var(--gold);
    border-radius: 2px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 8px 20px rgba(58, 42, 30, .07);
}

.checkin-title { font-family: var(--font-display); letter-spacing: .06em; }
.checkin-streak { color: var(--ink-faint); }

.checkin-icon {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--gold);
    color: #7d5a26;
    font-family: var(--font-display);
    font-size: 18px;
    line-height: 1;
    border-radius: 1px;
}

.checkin-btn {
    background: var(--gold);
    color: #f8f0da;
    border: 1px solid #8f6932;
    border-radius: 1px;
    font-family: var(--font-display);
    letter-spacing: .08em;
    font-weight: 500;
}

.checkin-btn:hover { background: #8f6932; transform: none; }
.checkin-btn.done { background: #4f6b4a; border-color: #3f5a3a; }

.checkin-day {
    border-radius: 1px;
    background: rgba(251, 246, 233, .7);
    border: 1px solid var(--rule);
    max-width: none;
}

.checkin-day.done {
    background: rgba(79, 107, 74, .12);
    border-color: rgba(79, 107, 74, .45);
}

.checkin-day.today {
    border-color: var(--gold);
    background: rgba(166, 124, 61, .14);
}

.checkin-day-num { font-family: var(--font-display); }

/* 创作点消耗说明 */
.pricing-header .points-badge {
    display: block;
    width: fit-content;
    margin: 0 auto 14px;
    background: var(--cinnabar);
    color: #f8f0da;
    border: 1px solid var(--cinnabar-dark);
    border-radius: 1px;
    font-family: var(--font-display);
    letter-spacing: .08em;
    box-shadow: 0 2px 0 rgba(58, 42, 30, .12);
}

.pricing-card.featured::before {
    border-radius: 1px;
    font-family: var(--font-display);
    letter-spacing: .08em;
    padding: 4px 16px;
}

.alipay-months {
    border: 1px solid var(--rule);
    border-radius: 1px;
    background: var(--paper-light);
    color: var(--ink);
}

.volume-header {
    background: rgba(168, 50, 38, .05);
    border-left: 3px solid var(--cinnabar);
    border-radius: 1px;
}

.price-table {
    background: var(--paper-light);
    border: 1px solid var(--rule);
    border-radius: 2px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .55) inset, 0 10px 24px rgba(58, 42, 30, .07);
}

.price-table th {
    background: rgba(90, 76, 61, .08);
    color: var(--ink-soft);
    font-family: var(--font-display);
    letter-spacing: .05em;
}

.price-table td { color: var(--ink); }

.price-table th,
.price-table td { border-bottom-color: rgba(201, 183, 149, .55); }

.price-tag {
    background: rgba(168, 50, 38, .1);
    color: var(--cinnabar-dark);
    border: 1px solid rgba(168, 50, 38, .28);
    border-radius: 1px;
    font-family: var(--font-display);
}

.price-tag.free { background: rgba(79, 107, 74, .12); color: #3f5a3a; border-color: rgba(79, 107, 74, .3); }
.price-tag.variable { background: rgba(166, 124, 61, .14); color: #7d5a26; border-color: rgba(166, 124, 61, .35); }

.note-row td { color: var(--ink-faint); }

.chat-note {
    background: rgba(234, 220, 190, .38);
    border-left: 3px solid var(--cinnabar);
    border-radius: 1px;
    color: var(--ink-soft);
}

/* 会员卡细节 */
.pricing-card.featured {
    border-color: var(--cinnabar);
    background:
        var(--paper-grain),
        linear-gradient(180deg, rgba(168, 50, 38, .045), rgba(251, 246, 233, .92));
    background-size: 220px 220px, auto;
    box-shadow: inset 0 0 0 1px rgba(168, 50, 38, .28), 0 12px 28px rgba(58, 42, 30, .1);
}

.tier-features li {
    color: var(--ink-soft);
    border-bottom: 1px solid rgba(201, 183, 149, .5);
}

.tier-features li::before { color: var(--cinnabar); }

.btn-subscribe-primary:hover { background: var(--cinnabar-dark); }
.btn-subscribe-outline:hover { background: rgba(168, 50, 38, .08); }
.btn-subscribe.current {
    background: var(--paper-deep);
    color: var(--ink-faint);
    border-color: var(--rule);
}

.alipay-months select,
.recharge-card select {
    border-radius: 1px;
    border: 1px solid var(--rule);
    background: var(--paper-light);
    color: var(--ink);
}

.recharge-section { border-top: 1px solid var(--rule); }
.recharge-section h2 { color: var(--ink-soft); font-family: var(--font-display); letter-spacing: .08em; }
.recharge-card:hover { border-color: var(--cinnabar-light); }

/* 认证表单控件：压掉圆角 */
.auth-form input[type="text"],
.auth-form input[type="tel"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"] {
    border: 1px solid var(--rule);
    border-radius: 1px;
    background: rgba(251, 246, 233, .72);
    color: var(--ink);
}

.auth-form input[type="text"]:focus,
.auth-form input[type="tel"]:focus,
.auth-form input[type="email"]:focus,
.auth-form input[type="password"]:focus,
.form-group input[type="text"]:focus,
.form-group input[type="tel"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="number"]:focus {
    border-color: var(--cinnabar);
    outline: none;
    box-shadow: 0 0 0 3px rgba(168, 50, 38, .12);
}

/* ============================================================
   创作流程细节
   ============================================================ */
.lang-radio,
.lang-select-bar-inline .lang-radio {
    border: 1px solid var(--rule);
    border-radius: 1px;
    background: rgba(251, 246, 233, .7);
    color: var(--ink-soft);
    font-family: var(--font-display);
    letter-spacing: .06em;
}

.lang-radio:hover {
    border-color: var(--cinnabar-light);
    color: var(--cinnabar-dark);
}

.lang-radio:has(input:checked) {
    background: var(--cinnabar);
    border-color: var(--cinnabar-dark);
    color: #f8f0da;
}

.tag-label {
    border: 1px solid var(--rule);
    border-radius: 1px;
    background: rgba(251, 246, 233, .65);
    color: var(--ink-soft);
    font-family: var(--font-display);
    letter-spacing: .04em;
}

.tag-item:hover .tag-label {
    border-color: var(--cinnabar-light);
    color: var(--cinnabar-dark);
    background: rgba(168, 50, 38, .05);
}

.tag-item.selected .tag-label {
    border-color: var(--cinnabar-dark);
    background: var(--cinnabar);
    color: #f8f0da;
    box-shadow: 0 2px 0 rgba(58, 42, 30, .14);
}

.tag-item.disabled .tag-label {
    background: rgba(234, 220, 190, .35);
    border-color: var(--rule);
    color: var(--ink-faint);
}

.tag-count-hint { color: var(--ink-faint); }

.quick-create-icon {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--cinnabar);
    color: var(--cinnabar-dark);
    font-family: var(--font-display);
    font-size: 20px;
    line-height: 1;
    border-radius: 1px;
}

.quick-create-content strong {
    color: var(--cinnabar-dark);
    font-family: var(--font-display);
    letter-spacing: .08em;
}

.quick-create-content p { color: var(--ink-soft); }

.quick-create-collapse-btn {
    background: transparent;
    border: 1px solid var(--rule);
    border-radius: 1px;
    color: var(--ink-faint);
}

.quick-create-collapse-btn:hover {
    border-color: var(--cinnabar);
    color: var(--cinnabar-dark);
}

.quick-create-divider { color: var(--ink-faint); }

.sequel-banner-icon { color: var(--cinnabar-dark); font-family: var(--font-display); }

/* 生成过程中的步骤小印 */
.step-icon {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    margin: 0 auto 6px;
    border: 1px solid var(--cinnabar);
    border-radius: 1px;
    color: var(--cinnabar-dark);
    font-family: var(--font-display);
    font-size: 20px;
    line-height: 1;
}

.step-text { font-family: var(--font-display); letter-spacing: .04em; }

/* 空书架：一枚淡墨大字 */
.empty-icon {
    font-family: var(--font-display);
    color: rgba(90, 76, 61, .22);
    font-size: 88px;
    line-height: 1;
    letter-spacing: .1em;
}

.delete-btn {
    background: rgba(251, 246, 233, .92);
    border: 1px solid var(--rule);
    border-radius: 1px;
    color: var(--ink-faint);
    font-family: var(--font-display);
    font-size: 18px;
    line-height: 1;
}

.delete-btn:hover {
    background: var(--cinnabar);
    border-color: var(--cinnabar-dark);
    color: #f8f0da;
}

/* ============================================================
   阅读页：工具栏 / 语音栏 / 章节页签 / 底部控制
   ============================================================ */
.btn-export {
    background: var(--indigo);
    border: 1px solid #24343c;
    border-radius: 1px;
    color: #f8f0da;
    font-family: var(--font-display);
    letter-spacing: .06em;
}

.btn-export:hover {
    background: #24343c;
    transform: none;
    box-shadow: 0 4px 12px rgba(53, 80, 92, .25);
}

.btn-share {
    background: var(--cinnabar);
    border: 1px solid var(--cinnabar-dark);
    border-radius: 1px;
    color: #f8f0da;
    font-family: var(--font-display);
    letter-spacing: .06em;
}

.btn-share:hover {
    background: var(--cinnabar-dark);
    transform: none;
    box-shadow: 0 4px 12px rgba(58, 42, 30, .22);
}

.chapter-tabs {
    border: 1px solid var(--rule) !important;
    border-radius: 2px !important;
    background: transparent !important;
}

.chapter-tabs-header {
    background: rgba(90, 76, 61, .07) !important;
    border-bottom: 1px solid var(--rule) !important;
}

.chapter-tabs-body {
    background:
        var(--paper-grain),
        linear-gradient(180deg, var(--paper-light), #f6efdd) !important;
    background-size: 220px 220px, auto !important;
}

.chapter-tabs .chapter-tab {
    color: var(--ink-faint) !important;
    font-family: var(--font-display);
    letter-spacing: .06em;
}

.chapter-tabs .chapter-tab.active {
    color: var(--cinnabar-dark) !important;
    border-bottom: 2px solid var(--cinnabar) !important;
    background: rgba(251, 246, 233, .72) !important;
}

/* 页签里再套一层纸框会显笨重：正文面板直接落在纸面上 */
.chapter-tabs .chapter-content {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 34px 42px;
}

.chapter-tabs .chapter-content::before { display: none; }

.copy-chapter-btn {
    border-radius: 1px;
    color: var(--ink-faint);
    font-family: var(--font-display);
    font-size: 12px;
}

.copy-chapter-btn:hover { background: var(--paper-deep); color: var(--ink); }

.chapter-btn {
    border: 1px solid var(--rule);
    border-radius: 1px;
    background: rgba(251, 246, 233, .7);
    color: var(--ink-soft);
    font-family: var(--font-display);
    font-size: 11px;
}

.chapter-btn:hover {
    border-color: var(--cinnabar);
    color: var(--cinnabar-dark);
}

.seal-char {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border: 1px solid var(--cinnabar);
    color: var(--cinnabar-dark);
    font-family: var(--font-display);
    font-size: 16px;
    line-height: 1;
    border-radius: 1px;
}

.ending-icon {
    display: inline-grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin: 0 auto 8px;
    border: 1px solid var(--cinnabar);
    color: var(--cinnabar-dark);
    font-family: var(--font-display);
    font-size: 26px;
    line-height: 1;
}

/* TTS 语音栏 */
.tts-bar {
    background: rgba(251, 246, 233, .8);
    border-bottom: 1px solid var(--rule);
}

.tts-bar-label {
    color: var(--ink-soft);
    font-family: var(--font-display);
    letter-spacing: .04em;
}

.mode-tab {
    border-radius: 1px;
    color: var(--ink-faint);
    font-family: var(--font-display);
    letter-spacing: .04em;
}

.mode-tab.active {
    background: var(--paper-light);
    color: var(--cinnabar-dark);
    box-shadow: inset 0 -2px 0 var(--cinnabar);
}

.voice-select {
    border-radius: 1px;
    border: 1px solid var(--rule);
    background: var(--paper-light);
    color: var(--ink);
}

.tts-btn {
    background: var(--paper-light);
    border: 1px solid var(--rule);
    border-radius: 1px;
    color: var(--ink-soft);
    font-family: var(--font-display);
    letter-spacing: .04em;
}

.tts-btn:hover { background: var(--paper-deep); border-color: var(--rule); }
.tts-stream-btn,
.tts-web-btn { background: #4f6b4a; border-color: #3f5a3a; color: #f8f0da; }
.tts-stream-btn:hover,
.tts-web-btn:hover { background: #3f5a3a; }
.tts-stop-btn { background: var(--cinnabar); border-color: var(--cinnabar-dark); color: #f8f0da; }
.tts-stop-btn:hover { background: var(--cinnabar-dark); }

.tts-panel-inner { border-bottom: 1px solid var(--rule); }
.tts-panel-inner .tts-player { background: rgba(251, 246, 233, .55); }
.tts-panel-inner .tts-stream-status { background: var(--paper-light); border-color: var(--rule); border-radius: 1px; }

.rate-value { color: var(--ink-faint); }
input[type="range"] { accent-color: var(--cinnabar); }

/* 底部指令与生成控制 */
.bottom-controls {
    background:
        var(--paper-grain),
        linear-gradient(180deg, var(--paper-light), #f4ecda);
    background-size: 220px 220px, auto;
    border-top: 1px solid var(--rule);
    box-shadow: 0 -8px 24px rgba(58, 42, 30, .08);
}

.bottom-toggle {
    background: rgba(234, 220, 190, .4);
    border-bottom: 1px solid var(--rule);
}

.bottom-toggle:hover { background: rgba(234, 220, 190, .65); }
.bottom-toggle:active { background: rgba(220, 203, 168, .75); }
.bottom-toggle-label {
    color: var(--ink-faint);
    font-family: var(--font-display);
    letter-spacing: .06em;
}
.bottom-toggle-drag { background: var(--rule); border-radius: 0; }

#userInstructionInput {
    background: rgba(251, 246, 233, .75);
    border: 1px solid var(--rule);
    border-radius: 1px;
    color: var(--ink);
}

#userInstructionInput:focus {
    border-color: var(--cinnabar);
    box-shadow: 0 0 0 3px rgba(168, 50, 38, .1);
}

.btn-send,
.btn-generate,
.btn-manual,
.btn-end-story,
.btn-postscript,
.btn-sequel,
.btn-unend {
    border-radius: 1px;
    font-family: var(--font-display);
    letter-spacing: .05em;
}

.btn-send { background: var(--cinnabar); border: 1px solid var(--cinnabar-dark); color: #f8f0da; }
.btn-send:hover { background: var(--cinnabar-dark); }

.btn-generate { background: var(--ink); border: 1px solid var(--ink); color: var(--paper-light); }
.btn-generate:hover { background: #3a2f26; }

.btn-manual {
    background: transparent;
    border: 1px solid var(--ink-soft);
    color: var(--ink);
}
.btn-manual:hover { background: var(--ink); color: var(--paper-light); }

.btn-end-story { background: var(--indigo); border: 1px solid #24343c; color: #f8f0da; }

.chat-fab {
    background: var(--ink);
    color: var(--paper-light);
    border-radius: 1px;
    font-family: var(--font-display);
    font-size: 20px;
    letter-spacing: 0;
}

.chat-fab:hover { background: var(--cinnabar); }

/* 「展开指令」是另一个按钮：放在聊天按钮左侧，改用纸色，
   避免和「助」按钮叠在一起、也避免被误认成助手入口 */
.bottom-expand-fab {
    right: 84px;
    bottom: 16px;
    z-index: 997;
    background: var(--paper-light);
    border: 1px solid var(--rule);
    border-radius: 1px;
    color: var(--ink-soft);
    font-family: var(--font-display);
    font-size: 12px;
    letter-spacing: .04em;
    box-shadow: 0 2px 10px rgba(58, 42, 30, .12);
}

.bottom-expand-fab:hover {
    background: var(--paper-deep);
    border-color: var(--cinnabar-light);
    color: var(--cinnabar-dark);
}

.chat-fab-tip { cursor: pointer; }

@media (max-width: 768px) {
    .bottom-expand-fab {
        right: calc(84px + env(safe-area-inset-right, 0px));
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    }
}

/* 章节正文中的小面板 */
.reflection-section,
.enrichment-section {
    background: rgba(234, 220, 190, .35);
    border: 1px solid var(--rule);
    border-radius: 2px;
}

.enrichment-section { background: rgba(254, 243, 199, .5); border-color: rgba(166, 124, 61, .45); }

.hash-proof-bar {
    background: rgba(234, 220, 190, .35);
    border-radius: 1px;
    color: var(--ink-faint);
}

/* ============================================================
   动效
   ============================================================ */
@keyframes scrollUnfurl {
    from { clip-path: inset(0 48% 0 48%); }
    to { clip-path: inset(0 0 0 0); }
}

@keyframes inkSeep {
    from { opacity: 0; filter: blur(6px); transform: translateY(-8px); }
    to { opacity: 1; filter: blur(0); transform: translateY(0); }
}

@keyframes copyRise {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes sunRise {
    from { opacity: 0; transform: translateY(14px) scale(.85); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 900px) {
    .scroll-hero-frame { padding: 0 30px; }
    .scroll-hero-sheet { padding: 40px 34px 44px; }
    .scroll-hero-inner {
        grid-template-columns: 120px minmax(0, 1fr);
        gap: 30px;
        min-height: 0;
    }
    .scroll-hero-ink { display: none; }
    .scroll-hero-title { font-size: clamp(34px, 7vw, 48px); }
}

@media (max-width: 768px) {
    .navbar .container { height: 62px; }
    .logo { font-size: 20px; letter-spacing: .1em; }
    .logo-seal { width: 34px; height: 34px; font-size: 20px; }

    .scroll-hero { padding: 20px 0 32px; }
    .scroll-hero-frame { padding: 0 18px; }
    .scroll-hero-rod { width: 16px; top: 12px; bottom: 12px; }
    .scroll-hero-rod--left { left: 6px; }
    .scroll-hero-rod--right { right: 6px; }
    .scroll-hero-sheet { padding: 30px 24px 34px; }
    .scroll-hero-sheet::before { background-image: none; }
    .scroll-hero-sheet::after { inset: 9px; }
    .scroll-hero-inner { display: block; min-height: 0; }
    .scroll-hero-titlecol {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 16px;
        margin-bottom: 22px;
    }
    .scroll-eyebrow { display: none; }
    .scroll-hero-title {
        writing-mode: horizontal-tb;
        font-size: clamp(32px, 10vw, 44px);
        letter-spacing: .14em;
    }
    .scroll-seal { width: 38px; height: 38px; font-size: 13px; }
    .scroll-hero-subtitle { font-size: 17px; letter-spacing: .1em; }
    .scroll-hero-desc { font-size: 14.5px; line-height: 1.9; margin-bottom: 24px; }
    .scroll-hero-actions { gap: 10px; }
    .scroll-hero-actions .btn-hero { padding: 11px 20px; }

    .brand-story { padding: 46px 20px 50px; }
    .brand-story-title { font-size: 22px; }
    .brand-story-body { font-size: 15.5px; line-height: 2.1; }
    .landing-section { padding: 50px 20px; }
    .landing-section-header h2 { font-size: 24px; }
    .landing-cta h2 { font-size: 23px; }

    .chapter-content { padding: 30px 22px 34px; }
    .chapter-tabs .chapter-content { padding: 24px 16px 28px; }
    .chapter-content::before { inset: 7px; }
    .chapter-text { font-size: 17px; line-height: 2.05; }
    .chapter-text > p:first-of-type::first-letter { font-size: 2.6em; }

    /* 窄屏下完整度横幅别把正文挤成一列字 */
    .completeness-banner,
    .enrichment-review-bar {
        flex-wrap: wrap;
        align-items: flex-start !important;
    }

    .completeness-banner > div,
    .enrichment-review-bar > div {
        flex: 1 1 calc(100% - 48px) !important;
        min-width: 0;
    }

    .completeness-banner .btn-primary,
    .completeness-banner .btn-sm,
    .enrichment-review-bar .btn-primary,
    .enrichment-review-bar .btn-sm {
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* 移动端下拉/菜单换纸色 */
@media (max-width: 768px) {
    .nav-links {
        background:
            var(--paper-grain),
            linear-gradient(180deg, var(--paper-light), var(--paper));
        background-size: 220px 220px, auto;
        border-left: 1px solid var(--rule);
    }
    .mobile-user-header { border-bottom: 1px solid var(--rule); }

    /* 移动端目录是盖在正文上的抽屉：背景必须不透明，
       否则正文会从半透明的纸色渐变里透出来，看着像没有背景。 */
    .sidebar {
        background:
            var(--paper-grain),
            linear-gradient(180deg, var(--paper-light), var(--paper));
        background-size: 220px 220px, auto;
    }
}

/* 减弱动画 */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .scroll-hero-sheet,
    .scroll-hero-title span,
    .scroll-hero-copy,
    .scroll-hero-ink .ink-sun {
        animation: none !important;
    }
    .novel-card, .feature-card, .btn-primary, .btn-hero-primary {
        transition: none;
    }
}

/* ============================================================
   细节装帧：菱形钉 / 回纹 / 按钮内框 / 卷尾印
   只在少数关键面上出现，避免满屏花纹
   ============================================================ */
:root {
    --stud: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10'%3E%3Cpath d='M5 .6 9.4 5 5 9.4.6 5Z' fill='none' stroke='%23a83226' stroke-opacity='.55' stroke-width='.9'/%3E%3Ccircle cx='5' cy='5' r='1' fill='%23a83226' fill-opacity='.65'/%3E%3C/svg%3E");
    --meander: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='9' viewBox='0 0 28 9'%3E%3Cpath d='M0 8h6V1h16v7h6' fill='none' stroke='%23a83226' stroke-opacity='.5' stroke-width='1'/%3E%3C/svg%3E");
}

/* 页题 / 区块题：在双线之间点一枚小菱印 */
.page-header h1::before,
.pricing-header h1::before,
.membership-page h1::before,
.landing-section-header h2::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -10px;
    width: 6px;
    height: 6px;
    background: var(--cinnabar);
    transform: translateX(-50%) rotate(45deg);
    box-shadow: 0 0 0 2px var(--paper);
    pointer-events: none;
}

/* 品牌故事分隔线中间的小菱口 */
.brand-story-divider { position: relative; }

.brand-story-divider span {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 7px;
    height: 7px;
    background: var(--cinnabar);
    transform: translate(-50%, -50%) rotate(45deg);
    box-shadow: 0 0 0 3px var(--paper);
}

/* 朱砂按钮：加一道极细的内框，像盖印时的边 */
.btn-primary,
.btn-hero-primary,
.btn-send,
.btn-share,
.btn-postscript,
.btn-sequel,
.btn-subscribe-primary,
.checkin-btn {
    box-shadow:
        inset 0 0 0 1px rgba(248, 240, 218, .28),
        inset 0 1px 0 rgba(255, 255, 255, .18),
        0 2px 0 rgba(58, 42, 30, .16);
}

.btn-primary:hover,
.btn-hero-primary:hover,
.btn-send:hover,
.btn-share:hover,
.btn-postscript:hover,
.btn-sequel:hover,
.btn-subscribe-primary:hover,
.checkin-btn:hover {
    box-shadow:
        inset 0 0 0 1px rgba(248, 240, 218, .34),
        inset 0 1px 0 rgba(255, 255, 255, .2),
        0 4px 10px rgba(58, 42, 30, .2);
}

/* 手卷首屏与登录笺纸：四角埋小菱钉 */
.scroll-hero-sheet {
    background-image:
        var(--stud), var(--stud), var(--stud), var(--stud),
        var(--paper-grain),
        linear-gradient(180deg, #fbf6e9, #f4ecda 55%, #efe4cf);
    background-position:
        9px 9px,
        calc(100% - 19px) 9px,
        9px calc(100% - 19px),
        calc(100% - 19px) calc(100% - 19px),
        0 0,
        0 0;
    background-size:
        10px 10px, 10px 10px, 10px 10px, 10px 10px,
        220px 220px, auto;
    background-repeat:
        no-repeat, no-repeat, no-repeat, no-repeat,
        repeat, no-repeat;
}

.auth-card {
    background-image:
        var(--stud), var(--stud), var(--stud), var(--stud),
        var(--paper-grain),
        linear-gradient(180deg, var(--paper-light), #f6efdd);
    background-position:
        2px 2px,
        calc(100% - 12px) 2px,
        2px calc(100% - 12px),
        calc(100% - 12px) calc(100% - 12px),
        0 0,
        0 0;
    background-size:
        10px 10px, 10px 10px, 10px 10px, 10px 10px,
        220px 220px, auto;
    background-repeat:
        no-repeat, no-repeat, no-repeat, no-repeat,
        repeat, no-repeat;
}

/* 页脚：一截极淡的回纹 */
.footer::before {
    content: "";
    display: block;
    width: 112px;
    height: 9px;
    margin: 0 auto 14px;
    background: var(--meander) repeat-x center center;
    opacity: .5;
}

/* 阅读页：卷尾一枚淡朱印 */
.chapter-tabs-body { position: relative; }

.chapter-tabs-body::after {
    content: "流梦";
    position: absolute;
    right: 28px;
    bottom: 24px;
    writing-mode: vertical-rl;
    text-orientation: upright;
    padding: 7px 4px;
    border: 1px solid rgba(168, 50, 38, .22);
    color: var(--cinnabar);
    opacity: .10;
    font-family: var(--font-display);
    font-size: 17px;
    line-height: 1.1;
    letter-spacing: .14em;
    pointer-events: none;
    z-index: 0;
}

.chapter-tabs .chapter-tab-panel {
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .scroll-hero-sheet {
        background-position:
            6px 6px,
            calc(100% - 16px) 6px,
            6px calc(100% - 16px),
            calc(100% - 16px) calc(100% - 16px),
            0 0,
            0 0;
    }

    .auth-card {
        background-position:
            2px 2px,
            calc(100% - 12px) 2px,
            2px calc(100% - 12px),
            calc(100% - 12px) calc(100% - 12px),
            0 0,
            0 0;
    }

    .chapter-tabs-body::after {
        right: 14px;
        bottom: 16px;
        font-size: 14px;
        opacity: .08;
    }

    .footer::before {
        width: 84px;
        height: 8px;
        margin-bottom: 12px;
        opacity: .45;
    }
}
