/*
 * warmth.css — 内页气质统一层（只覆盖，不改原有样式）
 * 目标：1) 小字可读  2) 把首页的爱丽丝色调（暖金/粉）带进内页  3) 内页头部有画面
 * 回退：删除 index.html 里对本文件的 <link> 即可恢复原样。
 * 范围：与其他样式一致，仅桌面端（>=761px）。
 */
@media (min-width: 761px) {
  :root {
    --warm-gold: var(--gold-1);
    --warm-gold-soft: #d1bc90;
    --warm-pink: #e7b0bc;
    --ink-soft: var(--ink-2);   /* 原 var(--ink-2)… 一类低对比灰蓝的替代 */
    --ink-meta: var(--ink-2);
    --menu-blue: var(--gold-1);  /* 原 var(--gold-0)：当前项下划线/竖线由冷青改为暖金 */
  }

  /* ───────── 1. 小字下限与对比度 ───────── */
  body .fine-scene-meta { font-size:var(--fs-1); color: var(--ink-meta); }
  body .fine-scene-meta[class] { letter-spacing: .02em; }
  body .section-label { font-size:var(--fs-1); opacity: 1; letter-spacing: .06em; color: var(--warm-gold); }
  body .journey-meta span { font-size:var(--fs-1); }
  body .journey-meta > span:first-child { font-size:var(--fs-1); color: var(--warm-pink); }
  body .journey-meta span:last-child { color: var(--ink-meta); }
  body .journey-picture .source-link,
  body .source-link { font-size:var(--fs-1); color: var(--ink-meta); }
  body .journey-read { font-size:var(--fs-2); color: var(--warm-gold); }
  body .home-room-number { font-size:var(--fs-1); color: var(--warm-gold-soft); }
  body .home-room-enter { font-size:var(--fs-2); color: var(--warm-gold); }
  body .archive-category,
  body .record-origin { font-size:var(--fs-1); color: var(--ink-meta); }
  body .archive-record-symbol { font-size:var(--fs-1); color: var(--warm-gold-soft); }
  body .pagination-summary { font-size:var(--fs-1); color: var(--ink-meta); }
  body .catalog-pagination button { font-size:var(--fs-1); }
  body .story-reading small { font-size:var(--fs-1); color: var(--ink-meta); }
  body .story-reading summary { font-size:var(--fs-1); color: var(--ink-soft); }
  body .case-focus-meta span { font-size:var(--fs-1); }
  body .book-room dt { font-size:var(--fs-1); color: var(--ink-meta); }
  body .book-room dd { font-size:var(--fs-1); }

  /* ───────── 2. 暖金 / 粉色点缀 ───────── */
  /* 导航当前项：由冷青改为暖金，并保留原有发光的克制程度 */
  body .site-header nav a.active:after {
    background: var(--warm-gold) !important;
    box-shadow: 0 0 10px #e3c59055 !important;
  }
  body .site-header nav a.active { color: var(--ink-0); }

  /* 小标签前的花形（取自站点 emblem.svg 的五瓣花），内页与首页共用 */
/* 小标签前缀的粉色百合已撤销（出现过于频繁：首页 7 处、故事页 7 处）。
 * 花形只保留在：导航 logo、页头下方"线·花·线"、阅读进度花。 */

  /* 首页 Hero：主按钮改为暖金实心，与描边次按钮拉开主次 */
  body.is-home .hero-copy .button.primary {
    background: linear-gradient(135deg, #ecd3a0, #d9b878);
    border-color: #ecd3a0;
    color: #2a1d10;
    font-weight: 600;
    backdrop-filter: none;
  }
  body.is-home .hero-copy .button.primary:hover { filter: brightness(1.06); }

  /* 标题：避免“风/景。”“部/分。”式的孤字换行 */
  body h1, body h2, body h3,
  body .journey-copy h3, body .journey-intro h2 { text-wrap: balance; }
  body .journey-copy p, body .case-focus-summary { text-wrap: pretty; }

  /* 首页时间线：每一幕上下留白收紧，减少“一屏一个信息点” */
  body .journey-moment { padding-top: 26px; padding-bottom: 26px; }

  /* 故事页章节大图：底部标签渐变减淡，不再像一条断开的色带 */
  body .chapter-still > span {
    padding: 22px 16px 12px;
    font-size:var(--fs-1);
    color: var(--ink-0);
    background: linear-gradient(transparent, #0b1927a8);
  }

  /* 事实核查：把一句话结论做成“结论”，而不是普通灰色描述 */
  body .case-focus-summary {
    font: 500 var(--fs-5)/1.75 var(--serif);
    color: var(--ink-0);
    max-width: 640px;
    padding-left: 18px;
    border-left: 2px solid var(--warm-gold);
  }
  /* 核读状态下拉：去掉浏览器原生外观，贴合站点 */
  body #check-status {
    -webkit-appearance: none; appearance: none;
    background: #152730
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23cdb98f' stroke-width='1.5'/%3E%3C/svg%3E")
      right 12px center / 12px 8px no-repeat;
    color: var(--ink-1);
    border: 1px solid color-mix(in srgb, var(--ink-0) 16%, transparent);
    border-radius:var(--r-1);
    padding: 7px 34px 7px 12px;
    font-size:var(--fs-1);
  }

  /* ───────── 3. 内页头部：加入画面，与首页 Hero 接上 ───────── */
  body .story-masthead,
  body .is-library .room-heading,
  body.is-library .room-heading,
  body.is-inquiry .room-heading,
  body.is-books .room-heading {
    position: relative;
    isolation: isolate;
    overflow: hidden;
  }
  body .story-masthead::before,
  body.is-library .room-heading::before,
  body.is-inquiry .room-heading::before,
  body.is-books .room-heading::before {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 58%;
    z-index: -1;
    background-repeat: no-repeat;
    background-size: cover;
    opacity: .5;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000000 55%, #000000 100%);
            mask-image: linear-gradient(90deg, transparent 0%, #000000 55%, #000000 100%);
  }
  /* 底部叠一层暖色微光，使画面与深蓝底色融合 */
  body .story-masthead::after,
  body.is-library .room-heading::after,
  body.is-inquiry .room-heading::after,
  body.is-books .room-heading::after {
    content: '';
    position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background:
      radial-gradient(ellipse 60% 120% at 100% 0%, #e7b0bc1c, transparent 70%),
      linear-gradient(180deg, transparent 55%, #101e26 100%);
  }
  /* 每页取一张既有的暗调官方画面（均已在站内、已优化为 webp） */
  body .story-masthead::before {
    background-image: url('/assets/optimized/scene-park-first-love-1280.97d7b6ddb8b3.webp');
    background-position: 60% 30%;
  }
  body.is-library .room-heading::before {
    background-image: url('/assets/optimized/aerith-stage-1280.a4e224e2393b.webp');
    background-position: 50% 28%;
  }
  body.is-inquiry .room-heading::before {
    background-image: url('/assets/optimized/hero-1280.3f9246f74c8d.webp');
    background-position: 50% 24%;
  }
  body.is-books .room-heading::before {
    background-image: url('/assets/optimized/midgar-1280.95e5cae04124.webp');
    background-position: 50% 30%;
  }
  body.is-books .room-heading .room-count { position: relative; z-index: 1; color: var(--ink-1); }
  /* 标题区文字保持在画面之上；阴影确保叠在亮部时仍可读 */
  body .story-masthead > div,
  body.is-library .room-heading > div,
  body.is-inquiry .room-heading > div,
  body.is-books .room-heading > div { position: relative; z-index: 1; text-shadow: 0 1px 14px #020b15aa; }
  body.is-library .room-heading,
  body.is-inquiry .room-heading,
  body.is-books .room-heading { min-height: 150px; padding-left: 0; }
  body .room-heading p, body .section-masthead p { color: var(--ink-2); font-size:var(--fs-2); }
}

@media (prefers-reduced-motion: reduce) {
  body .site-header nav a.active:after { transition: none; }
}

/* =====================================================================
 * 第二批：时间线节奏 / 世界观可读性 / 资料页层次
 * ===================================================================== */
@media (min-width: 761px) {

  /* ───────── A. 首页时间线：压缩节奏，同时让图片更大 ───────── */
  /* 原：每幕 min-height 520 + 上下 45 = 约 462–600px，8 幕 ≈ 3700px */
  body .journey-moment { min-height: 400px; }
  body .journey-intro { padding-top: 96px; }
  body .journey-intro .section-label { font-size:var(--fs-1); letter-spacing: .14em; }
  /* 图片略放大，图注由 9px 提到可读，且不再脱离图片漂在下方 */
  body .journey-picture > a { aspect-ratio: 1.6; }
  body .journey-picture .source-link { font-size:var(--fs-1); line-height: 1.7; color: var(--ink-meta); }
  body .journey-picture figcaption { top: calc(100% + 10px); }
  /* 正文：13px 行高 2.25 偏稀、偏小 → 14.5px / 2 */
  body .journey-copy > p { font-size:var(--fs-3); line-height: 2; color: var(--ink-2); max-width: 380px; margin-bottom: 20px; }
  body .journey-copy h3 { margin-bottom: 14px; text-wrap: balance; max-width: 15em; }
  body .journey-meta { margin-bottom: 16px; }
  /* 序号圆点：由 11px 灰紫提到可读，并带一点暖粉光 */
  body .journey-node span { font-size:var(--fs-1); top: -28px; color: var(--warm-pink); }
  body .journey-node { border-color: #e7b0bcaa; box-shadow: 0 0 0 8px #e7b0bc0a, 0 0 30px #e7b0bc28; }
  /* 竖线：由 1px 低透明度加强，才撑得起整条时间线 */
  body .journey-thread path { stroke: #e3c590aa; stroke-width: 1.4; }
  body .journey-thread path.thread-halo { stroke: #e7b0bc14; stroke-width: 12; }

  /* ───────── B. 世界观：卡片文字提升，空白收紧 ───────── */
  body .world-canvas .story-node .node-meta span { font-size:var(--fs-1); color: var(--ink-2); }
  body .world-canvas .story-node .node-kind { font-size:var(--fs-1); color: var(--warm-gold); }
  body .world-canvas .story-node p { font-size:var(--fs-2); color: var(--ink-2); }
  body .world-canvas .story-node .node-foot { font-size:var(--fs-1); color: var(--ink-2); }
  body .world-canvas .story-node h3 { font-size: 23px; color: var(--ink-1); }
  /* 左侧目录、画布说明与图例：原 11–12px 提到可读 */
  body .world-canvas-heading p { font-size:var(--fs-2); color: var(--ink-2); }
  body .world-canvas-heading nav a, body .world-canvas-heading nav button { font-size:var(--fs-1); color: var(--ink-2); }
  body .world-sidebar .world-canvas-note,
  body .world-canvas-note { font-size:var(--fs-1); line-height: 1.8; color: var(--ink-2); }
  body .world-canvas-note span { font-size:var(--fs-1); color: var(--ink-meta); }
  body .world-index > span { font-size:var(--fs-1); color: var(--warm-gold); }
  body .world-index button { font-size:var(--fs-3); color: var(--ink-1); }
  body .world-index button:hover, body .world-index button[aria-current], body .world-index button.active { color: var(--ink-0); }
  body .world-canvas-heading h1 { color: var(--ink-0); }
  /* 图例（选择分支 / 白魔晶跨越）*/
  body .atlas-page .legend, body .atlas-page [class*="legend"] { font-size:var(--fs-1); color: var(--ink-2); }

  /* ───────── C. 资料页：弱化重复层级，强化当前位置 ───────── */
  /* 顶部三个 Tab（资料条目 / 网页与访谈 / 延伸解读）作为主分区，当前项用暖金 */
  body .archive-section-nav > a { font-size:var(--fs-3); color: var(--ink-2); }
  body .archive-workspace > .archive-section-nav > [aria-current=page] { color: var(--ink-0); border-color: var(--warm-gold); }
  body .archive-workspace > .archive-section-nav > a { font-size:var(--fs-3); color: var(--ink-2); }
  /* 第二层主题筛选：次级，稍小、色更淡，选中项用暖金下划线，避免与上一层争主次 */
  body .collection-filters button { font-size:var(--fs-2); color: var(--ink-2); }
  body .collection-filters :is(.selected, .active) { color: var(--ink-0); border-bottom-color: var(--warm-gold); }
  /* 左侧来源栏：标题与条目提亮，当前项暖金竖线 */
  body .library-browse-layout > :first-child { font-size:var(--fs-2); }
  body .library-browse-layout > :first-child button { font-size:var(--fs-2); color: var(--ink-2); }
  body .library-browse-layout > :first-child [aria-pressed=true],
  body .library-browse-layout > :first-child .active,
  body .library-browse-layout > :first-child .selected { border-left-color: var(--warm-gold); color: var(--ink-0); }
  /* 每条记录：序号与分类放到同一视觉重心；标题再突出 */
  body .library-records h3 { color: var(--ink-0); }
  /* 右栏小标签 */
  body .library-browse-layout > :last-child small,
  body .library-browse-layout > :last-child .section-label { font-size:var(--fs-1); color: var(--ink-meta); }
}

/* =====================================================================
 * 第二批补遗：被高权重规则（含 !important）压住的残留小字
 * 以实测为准：逐个量过实际 computed 字号后补的，不是泛泛提升。
 * ===================================================================== */
@media (min-width: 761px) {
  /* 资料页：分类 / 出处原为 10px 且 color 带 !important */
  body .library-workspace .archive-category,
  body .library-workspace .record-origin,
  body .collection-library .archive-category,
  body .collection-library .record-origin { font-size:var(--fs-1) !important; color: var(--ink-meta) !important; }
  body .library-workspace .archive-category { color: var(--warm-pink) !important; }
  body .results-line span, body .archive-preview-edition, body .archive-preview-book,
  body .archive-preview .source-link { font-size:var(--fs-1); color: var(--ink-meta); }
  body .library-source-index span { font-size:var(--fs-1); }

  /* 核查页：左侧问题列表的小标注、图注、来源名 */
  body .case-question span { font-size:var(--fs-1); }
  body .case-focus-material .section-label,
  body .case-source-image figcaption,
  body .case-source-names span { font-size:var(--fs-1); color: var(--ink-meta); }
  body .case-source-names p { font-size:var(--fs-1); }

  /* 书籍页：书目侧栏与原题 */
  body .book-index span, body .book-index small,
  body .book-index-heading small,
  body .book-focus-copy .section-label { font-size:var(--fs-1); color: var(--ink-meta); }
  body .book-focus-original { font-size:var(--fs-1); color: var(--ink-2); }
  body .book-focus-note { font-size:var(--fs-1); }

  /* 故事页：场景标注 */
  body .story-reading .section-label { font-size:var(--fs-1); }
  body .story-reading span[class=""], body .story-reading small { font-size:var(--fs-1); }

  /* 首页：支线卡片 9–10px、尾部标签、Hero 图注 */
  body .journey-branch > span { font-size:var(--fs-1); color: var(--warm-pink); }
  body .journey-branch p { font-size:var(--fs-1); color: var(--ink-2); }
  body .journey-ending .section-label { font-size:var(--fs-1); }
  body .hero-caption { font-size:var(--fs-1); color: color-mix(in srgb, var(--ink-1) 80%, transparent); }
}

/* =====================================================================
 * 第三批：修复评审（2026-11-24）发现的真实缺陷
 * ===================================================================== */

/* P1-1 书籍抽屉"购买"按钮：drawer.css 的通用链接色 `.drawer-scroll a[href]{color:var(--gold-0)}`
 * 压过了 books.css 为它设计的深色字，粉底上浅青字对比度仅 1.28:1。
 * 此处以更高特异性恢复为深色字（#0e2230 / #c8adc0 = 7.7:1）。桌面与窄屏同样适用。 */
#detail-dialog .drawer-scroll a.book-buy[href],
#detail-dialog .drawer-scroll a.book-buy[href]:visited { color: #0e2230; }
#detail-dialog .drawer-scroll a.book-buy[href]:hover,
#detail-dialog .drawer-scroll a.book-buy[href]:focus-visible { color: #0e2230; background: var(--ink-2); }

/* P1-3 补齐 2026-11-24 评审发现的 9–11px 小字（依据：逐页读取 computed font-size 与命中的样式表规则）
 * 统一下限 12.5px，说明性长文 13px；颜色同步提亮到 --ink-meta 以保证对比度。 */
@media (min-width: 761px) {
  /* 访谈页：列表行元信息 / 目录计数 / 关系标签 */
  body .interview-row-meta,
  body .interview-row-footer,
  body .interview-row-meta span,
  body .interview-row-footer span,
  body .interview-row-meta time,
  body .interview-directory small,
  body .archive-workspace .interview-directory small { font-size:var(--fs-1); }
  body .interview-row-meta, body .interview-row-footer { color: var(--ink-meta); }
  body .interview-relation { font-size:var(--fs-1); color: var(--warm-gold); }
  body .interview-directory h2, body .interview-directory p { font-size:var(--fs-1); }

  /* 角色周边页：价格尾注 / 分组计数 / 卡片说明 / 目录说明 / 结果行 */
  body .merchandise-card-price { font-size:var(--fs-1); color: var(--ink-2); }
  body .merchandise-card-price small { font-size:var(--fs-1); color: var(--ink-meta); }
  body .merchandise-groups small { font-size:var(--fs-1); color: var(--ink-meta); }
  body .merchandise-card p { font-size:var(--fs-1); color: var(--ink-meta); }
  body .merchandise-directory-note { font-size:var(--fs-1); max-width: 200px; color: var(--ink-meta); }
  body .merchandise-result-line { font-size:var(--fs-1); color: var(--ink-meta); }

  /* 延伸解读页 / 故事页 / 场景详情页 */
  body .reading-results-line { font-size:var(--fs-1); color: var(--ink-meta); }
  body .reading-card-meta { font-size:var(--fs-1); color: var(--ink-meta); }
  body .group-readings > summary,
  body .group-readings summary,
  body .group-readings summary span,
  body .group-readings small { font-size:var(--fs-1); }
  body .interpretation-sources small,
  body .interpretation-intro span,
  body .scene-article .reading-origin,
  body .supplied-reading .reading-origin { font-size:var(--fs-1); }
  body .scene-article .quote-speaker,
  body .scene-source .quote-speaker { font-size:var(--fs-1); color: var(--ink-meta); }
  /* 场景页：相邻场景卡片里的 9–10px 小字 */
  body .scene-article a > span, body .scene-article a > small { font-size:var(--fs-1); }

  /* 书籍 / 资料 / 核查：被 !important 或更高特异性压住的残留 */
  body .book-focus-original { font-size:var(--fs-1) !important; }
  body .library-workspace .library-source-index > span,
  body .library-source-index > span { font-size:var(--fs-1); }
  body .case-index > span { font-size:var(--fs-1); }
}

/* P1-3（续）抽屉内的小字：引文出处、说话人、返回键、更新日期、关联场景卡片、原题 */
@media (min-width: 761px) {
  #detail-dialog .inline-citation span,
  #detail-dialog .inline-citation a { font-size:var(--fs-1); }
  #detail-dialog .quote-speaker { font-size:var(--fs-1) !important; color: var(--ink-meta); }
  #detail-dialog .drawer-back { font-size:var(--fs-1); }
  #detail-dialog .detail-updated { font-size:var(--fs-1); color: var(--ink-meta); }
  #detail-dialog .reader-expand { font-size:var(--fs-1); }
  #detail-dialog .scene-callout small,
  #detail-dialog .scene-callout span { font-size:var(--fs-1); }
  #detail-dialog .book-original { font-size:var(--fs-1); color: var(--ink-meta); }
  #detail-dialog .scene-source a > span, #detail-dialog .scene-source a > small,
  #detail-dialog .scene-source div > a span, #detail-dialog .scene-source div > a small { font-size:var(--fs-1); }
}

/* P1-3（续2）带 !important 的残留，以及抽屉里"相关书籍"链接 */
@media (min-width: 761px) {
  #detail-dialog .detail-updated { font-size:var(--fs-1) !important; color: var(--ink-meta) !important; }
  #detail-dialog .book-original { font-size:var(--fs-1) !important; color: var(--ink-meta) !important; }
  #detail-dialog .scene-books a span,
  #detail-dialog .scene-books a small { font-size:var(--fs-1) !important; }
}

/* P1-3（续3）正文区同款与残留：场景页"相关书籍"、延伸解读卡片、访谈目录标题 */
@media (min-width: 761px) {
  body .scene-books a span,
  body .scene-books a small,
  body .scene-article .scene-books span,
  body .scene-article .scene-books small { font-size:var(--fs-1) !important; color: var(--ink-meta); }
  /* 延伸解读卡片的主题标签：结构是 a > div > span（卡片没有专用类，靠结构匹配） */
  body main a[href^="#/reading/"] > div > span { font-size:var(--fs-1); color: var(--warm-pink); }
  body .interview-directory h2 { font-size:var(--fs-1) !important; }
}

/* P1-2 图片加载期占位（纯 CSS，不改 JS）
 * 原状：抽屉证据图加载期是一块亮灰色块（var(--ink-1)），图片查看器是一整块空框，
 *       用户会误以为图坏了。慢网模拟下可复现。
 * 做法：深色底 + 缓慢呼吸的占位光；查看器画布居中放"载入中"。图片加载完后自然覆盖，无需 JS。 */
@media (min-width: 761px) {
  @keyframes warmth-breathe { 0%,100% { opacity: .55 } 50% { opacity: 1 } }

  /* 抽屉内证据图：底色换成深色，避免加载期出现刺眼的亮灰块 */
  #detail-dialog .proof-figure .proof-image,
  #detail-dialog .proof-image { background: #0e2230; }
  #detail-dialog .proof-figure .proof-image img { background: #0e2230; }
  /* 仍在加载的图片：整张图淡显，加载完成后浏览器自动去掉 */
  #detail-dialog .proof-image img:not([src]),
  #detail-dialog .proof-image img[loading="lazy"]:not([data-loaded]) { animation: warmth-breathe 1.6s ease-in-out infinite; }

  /* 图片查看器：画布居中提示 */
  .image-viewer .image-viewer-canvas { position: relative; background: #0b1927; }
  .image-viewer .image-viewer-canvas::before {
    content: '图片载入中…';
    position: absolute; inset: 0;
    display: grid; place-items: center;
    color: var(--ink-meta); font-size:var(--fs-1); letter-spacing: .08em;
    animation: warmth-breathe 1.6s ease-in-out infinite;
    pointer-events: none; z-index: 0;
  }
  /* 图片叠在提示之上；加载完成后图片自身不透明，会完全盖住提示 */
  .image-viewer .image-viewer-canvas img { position: relative; z-index: 1; }
  /* 图片还没有可用尺寸时先隐藏，避免只露出一小块碎片（截图中的"人物局部"） */
  .image-viewer .image-viewer-canvas img:not([src]) { visibility: hidden; }
  /* 由 polish.js 在 load 后写入 data-ready；未就绪时隐藏，只露出"载入中"提示 */
  .image-viewer .image-viewer-canvas img:not([data-ready]) { visibility: hidden; }
}

/* P1-4 无效路由提示条（polish.js 插入）*/
.route-notice {
  display: flex; align-items: center; gap: 16px;
  max-width: 1320px; margin: 14px auto 0; padding: 11px 16px;
  background: #192a39; border: 1px solid #e3c59066; border-left: 3px solid #e3c590;
  border-radius:var(--r-1); color: var(--ink-0); font-size:var(--fs-2); line-height: 1.7;
}
.route-notice span { flex: 1; }
.route-notice a { color: #e3c590; font-size:var(--fs-1); white-space: nowrap; }
.route-notice button {
  background: none; border: 0; color: var(--ink-2); font-size:var(--fs-5); line-height: 1;
  width: 28px; height: 28px; cursor: pointer; border-radius:var(--r-1);
}
.route-notice button:hover { color: var(--ink-0); background: color-mix(in srgb, var(--ink-0) 8%, transparent); }
.route-notice button:focus-visible, .route-notice a:focus-visible { outline: 2px solid #e3c590; outline-offset: 2px; }

/* P1-3（续4）全站公共元素：品牌副标、页脚版权、画布缩放百分比、小地图标签 */
@media (min-width: 761px) {
  body .brand small { font-size:var(--fs-1); color: var(--ink-2); }
  body .site-footer > span { font-size:var(--fs-1); color: var(--ink-2); }
  body .site-footer .footer-links a, body .site-footer .footer-links button { font-size:var(--fs-1); min-height: 28px; display: inline-flex; align-items: center; }
  body .story-atlas .map-controls output,
  body .map-controls output { font-size:var(--fs-1); }
  body .atlas-page .minimap span,
  body .world-atlas .minimap span { font-size:var(--fs-1); }
}

/* 品牌 logo（2026-11-24 新百合图形）。原 remembrance.css 自 10 月起把导航里的花形 display:none 隐藏，现已撤销。 */
@media (min-width: 761px) {
  .site-header .brand { display: flex; align-items: center; gap: 12px; }
  .site-header .brand svg.brand-blossom { width: 40px; height: 40px; flex-shrink: 0; filter: drop-shadow(0 1px 8px #00000066); }
  .site-header .brand:hover svg.brand-blossom { transform: rotate(18deg); transition: transform .6s cubic-bezier(.2,.7,.2,1); }
}
@media (prefers-reduced-motion: reduce) { .site-header .brand:hover svg.brand-blossom { transform: none; } }

/* =====================================================================
 * 主张①：花形分隔符  线 · 花 · 线
 * --lily-mask 为百合剪影（单一来源），分隔符由 polish.js 插入 <div class="lily-rule"><i></i></div>
 * ===================================================================== */
:root { --lily-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cg fill='black' stroke='black' stroke-width='1.4' stroke-linejoin='round'%3E%3Cpath d=%22M32 32 C24.8 25.84, 25.16 15.71, 33.4 10 C38.84 15.71, 39.2 25.84, 32 32Z%22 transform=%22rotate(60 32 32)%22/%3E%3Cpath d=%22M32 32 C24.8 25.84, 25.16 15.71, 33.4 10 C38.84 15.71, 39.2 25.84, 32 32Z%22 transform=%22rotate(180 32 32)%22/%3E%3Cpath d=%22M32 32 C24.8 25.84, 25.16 15.71, 33.4 10 C38.84 15.71, 39.2 25.84, 32 32Z%22 transform=%22rotate(300 32 32)%22/%3E%3Cpath d=%22M32 32 C23.6 24.72, 24.02 12.76, 33.4 6 C39.98 12.76, 40.4 24.72, 32 32Z%22 transform=%22rotate(0 32 32)%22/%3E%3Cpath d=%22M32 32 C23.6 24.72, 24.02 12.76, 33.4 6 C39.98 12.76, 40.4 24.72, 32 32Z%22 transform=%22rotate(120 32 32)%22/%3E%3Cpath d=%22M32 32 C23.6 24.72, 24.02 12.76, 33.4 6 C39.98 12.76, 40.4 24.72, 32 32Z%22 transform=%22rotate(240 32 32)%22/%3E%3C/g%3E%3C/svg%3E"); }

.lily-rule {
  display: flex; align-items: center; gap: 18px; margin: 0 auto; padding: 0;
  height: 22px; color: var(--gold-2); pointer-events: none;
}
.lily-rule::before, .lily-rule::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-gold) 45%, var(--line-gold));
}
.lily-rule::after { background: linear-gradient(270deg, transparent, var(--line-gold) 45%, var(--line-gold)); }
.lily-rule > i {
  width: 17px; height: 17px; display: block; flex: none; background: var(--gold-1);
  -webkit-mask: var(--lily-mask) center/contain no-repeat; mask: var(--lily-mask) center/contain no-repeat;
}
/* 放在页头之下：占满版心宽度，并替代页头原本的底部细线 */
.lily-rule.is-head { max-width: 1320px; width: calc(100% - 120px); margin-top: -1px; }
body.is-reading .lily-rule.is-head { margin-bottom: 8px; }
@media (max-width: 760px) { .lily-rule { display: none; } }

/* 页头后面已有"线·花·线"时，去掉页头自己的底边线，避免双线 */
@media (min-width: 761px) {
  header.room-heading:has(+ .lily-rule),
  header.section-masthead:has(+ .lily-rule) { border-bottom: 0 !important; }
}

/* =====================================================================
 * 主张②：花朵阅读进度（polish.js 插入 .lily-progress）
 * 固定在右侧版心外的空白处；未点亮的花瓣只有淡淡的轮廓，随阅读逐瓣填充金色。
 * ===================================================================== */
.lily-progress {
  position: fixed; right: 22px; top: 50%; transform: translateY(-50%); z-index: 15;
  width: 46px; height: 46px; pointer-events: auto; opacity: .95;
  filter: drop-shadow(0 2px 10px #00000055);
}
.lily-progress-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.lily-progress .p { fill: transparent; stroke: var(--gold-3); stroke-width: 1.1; stroke-linejoin: round; transition: fill .6s ease, stroke .6s ease; }
.lily-progress .p.on { fill: var(--gold-1); stroke: var(--gold-0); }
.lily-progress .c { fill: var(--gold-3); transition: fill .6s ease; }
.lily-progress.is-full .c { fill: var(--gold-0); }
/* 读完：整朵微微放光一次 */
.lily-progress.is-full .lily-progress-svg { animation: lily-bloom 1.4s ease-out 1; }
@keyframes lily-bloom { 0% { filter: drop-shadow(0 0 0 #e9c77900); } 40% { filter: drop-shadow(0 0 14px #e9c779aa); } 100% { filter: drop-shadow(0 0 0 #e9c77900); } }
@media (prefers-reduced-motion: reduce) {
  .lily-progress .p, .lily-progress .c { transition: none; }
  .lily-progress.is-full .lily-progress-svg { animation: none; }
}
/* 窗口不够宽时右侧没有空位，隐藏避免压住正文 */
@media (max-width: 1280px) { .lily-progress { display: none; } }
@media (max-width: 760px) { .lily-progress { display: none; } }
/* 抽屉/弹窗打开时不显示，避免叠在抽屉上 */
body.drawer-open .lily-progress { display: none; }

/* =====================================================================
 * 主张④：衬线主标题 + 拉丁斜体副题
 * 现状：首页主标题是衬线体，内页主标题却是无衬线体——这是"首页与内页像两个网站"的一个直接原因。
 * ===================================================================== */
@media (min-width: 761px) {
  main :is(.room-heading, .section-masthead, .world-canvas-heading, .about-page) > div > h1,
  main .about-page > h1,
  main .world-canvas-heading h1 {
    font-family: var(--font-serif); font-weight: 400; letter-spacing: .06em; color: var(--ink-0);
  }
  main .room-heading h1 { font-size: var(--fs-7); line-height: 1.4; }
  main .section-masthead h1 { letter-spacing: .06em; }
  main .world-canvas-heading h1 { font-size: var(--fs-6); }
  /* 场景页 h1 是具体场景名（较长），保持较小，不加副题 */
  main .scene-masthead h1 { font-size: clamp(28px, 2.6vw, 36px); }

  .latin-sub {
    font-family: var(--font-latin); font-style: italic; font-weight: 400;
    font-size: 19px; line-height: 1.5; letter-spacing: .03em;
    color: var(--petal-1); margin: 2px 0 10px; opacity: .95;
  }
  /* 页头里副题紧跟主标题，不另占行距 */
  main .room-heading .latin-sub { margin-top: -2px; }
  main .about-page .latin-sub { font-size: 22px; margin: 4px 0 18px; }
  main .world-canvas-heading .latin-sub { font-size: 16px; margin: 0 0 6px; }
}

/* 主张④ 补强：remembrance.css / browsing.css 用 `font:` 简写把内页 h1 压回了无衬线，
 * 选择器权重更高。这里用同等限定 + body 前缀，并重写完整的 font，避免只改 family 时被简写后的字重/行高带偏。 */
@media (min-width: 761px) {
  body main .room-heading h1,
  body .archive-workspace > .room-heading h1,
  body .about-page :is(h1),
  body .world-atlas .world-canvas-heading h1,
  body main .section-masthead h1 {
    font-family: var(--font-serif);
    font-weight: 400;
    letter-spacing: .06em;
    color: var(--ink-0);
  }
  body main .room-heading h1, body .archive-workspace > .room-heading h1 { font-size: var(--fs-7); line-height: 1.4; }
  body .world-atlas .world-canvas-heading h1 { font-size: var(--fs-6); line-height: 1.5; }
  body .about-page h1 { font-size: 43px; line-height: 1.4; }
}

/* P1-3（续5）延伸解读详情页：章节类型标签、摘录图注 */
@media (min-width: 761px) {
  body .reading-kind { font-size: var(--fs-1); }
  body .reading-excerpt figcaption, body .interpretation-chapter figcaption { font-size: var(--fs-1); line-height: 1.8; color: var(--ink-2); }
  body .reading-excerpt figcaption small { font-size: var(--fs-1); }
}

/* =====================================================================
 * 抽屉里的花朵阅读进度（polish.js 挂在 #detail-dialog 上）
 * 位置：紧贴工具栏下沿。细线宽度 = 进度；线头一朵小百合随之移动。
 * ===================================================================== */
.drawer-lily { position: absolute; left: 0; right: 0; top: 52px; height: 0; z-index: 5; pointer-events: none; }
.drawer-lily[hidden] { display: none; }
.drawer-lily .line {
  position: absolute; left: 0; top: -1px; height: 2px; width: var(--p, 0%);
  background: linear-gradient(90deg, transparent, var(--gold-2) 30%, var(--gold-1));
  transition: width .12s linear;
}
.drawer-lily .flower {
  position: absolute; top: -11px; left: var(--p, 0%); width: 22px; height: 22px; margin-left: -11px;
  transition: left .12s linear; filter: drop-shadow(0 1px 4px #000a);
}
.drawer-lily .lily-progress-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.drawer-lily .p { fill: var(--night-2); stroke: var(--gold-3); stroke-width: 1.4; stroke-linejoin: round; transition: fill .4s ease, stroke .4s ease; }
.drawer-lily .p.on { fill: var(--gold-1); stroke: var(--gold-0); }
.drawer-lily .c { fill: var(--gold-3); transition: fill .4s; }
.drawer-lily.is-full .c { fill: var(--gold-0); }
.drawer-lily.is-full .flower { animation: lily-bloom 1.2s ease-out 1; }
@media (prefers-reduced-motion: reduce) {
  .drawer-lily .line, .drawer-lily .flower, .drawer-lily .p, .drawer-lily .c { transition: none; }
  .drawer-lily.is-full .flower { animation: none; }
}
/* 手机：抽屉是全屏层，工具栏高度不同；本轮只做桌面 */
@media (max-width: 760px) { .drawer-lily { display: none; } }

/* =====================================================================
 * 世界观页（2026-11-24 重做）：阅读视图（默认）+ 画布视图（原无限画布）
 * 阅读视图是普通纵向页面；画布视图时 JS 给 body 加 is-atlas，沿用原有全屏画布样式。
 * ===================================================================== */
.world-narrative { position: relative; }
/* —— 视图切换 —— */
.world-narrative[data-view="read"] .world-sidebar,
.world-narrative[data-view="read"] .world-canvas { display: none; }
.world-narrative[data-view="canvas"] .wd-read,
.world-narrative[data-view="canvas"] .wd-hero .wd-lead,
.world-narrative[data-view="canvas"] .wd-hero .wd-sub { display: none; }

/* —— 开场 —— */
.wd-hero {
  position: relative; isolation: isolate; overflow: hidden; min-height: 360px;
  display: flex; align-items: flex-end; border-bottom: 1px solid var(--line-1);
  background: var(--night-1);
}
.wd-hero::before {
  content: ''; position: absolute; inset: 0; z-index: -2;
  background: url('/assets/optimized/grasslands-1920.924ba0d30e9a.webp') center 40% / cover no-repeat;
  filter: saturate(.85) brightness(.72);
}
.wd-hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--night-0) 92%, transparent) 0%, color-mix(in srgb, var(--night-0) 62%, transparent) 42%, transparent 78%),
    linear-gradient(180deg, transparent 50%, var(--night-1) 100%);
}
.wd-hero-in { width: 100%; max-width: 1320px; margin: 0 auto; padding: 64px 60px 40px; }
.wd-hero h1 { font-family: var(--font-serif); font-weight: 400; font-size: var(--fs-8); letter-spacing: .08em; line-height: 1.25; color: var(--ink-0); margin: 0 0 6px; }
.wd-hero .latin-sub { font-size: 22px; margin: 0 0 22px; }
.wd-lead { font-family: var(--font-serif); font-size: var(--fs-5); line-height: 1.7; color: var(--ink-0); margin: 0 0 8px; max-width: 640px; }
.wd-sub { color: var(--ink-2); font-size: var(--fs-3); line-height: 1.95; max-width: 560px; margin: 0 0 28px; }
.wd-tools { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.wd-hero .world-source { position: static; display: inline-flex; align-items: center; gap: 8px; color: var(--gold-1); background: none; border: 0; font-size: var(--fs-2); cursor: pointer; }
.wd-switch { display: inline-flex; padding: 3px; border-radius: 999px; background: color-mix(in srgb, var(--night-0) 70%, transparent); border: 1px solid var(--line-2); backdrop-filter: blur(10px); }
.wd-switch button { border: 0; background: none; color: var(--ink-2); font-size: var(--fs-2); padding: 8px 18px; border-radius: 999px; cursor: pointer; transition: background .25s, color .25s; }
.wd-switch button[aria-pressed="true"] { background: linear-gradient(135deg, var(--gold-0), var(--gold-2)); color: #2a1d10; font-weight: 600; }
.wd-switch button:focus-visible, .wd-card:focus-visible, .wd-view:focus-visible { outline: 2px solid var(--gold-1); outline-offset: 3px; }
/* 画布视图下，标题区压缩为一条，让位给画布 */
.world-narrative[data-view="canvas"] .wd-hero { min-height: 0; border: 0; background: transparent; position: absolute; left: 0; right: 0; top: 0; z-index: 4; pointer-events: none; }
.world-narrative[data-view="canvas"] .wd-hero::before, .world-narrative[data-view="canvas"] .wd-hero::after { display: none; }
.world-narrative[data-view="canvas"] .wd-hero-in { padding: 24px 4.2% 0; }
.world-narrative[data-view="canvas"] .wd-hero h1 { font-size: var(--fs-6); }
.world-narrative[data-view="canvas"] .wd-hero .latin-sub { font-size: 15px; margin: 0; }
.world-narrative[data-view="canvas"] .wd-tools { position: absolute; right: 4.2%; top: 22px; pointer-events: auto; }

/* —— 正文 —— */
.wd-read { max-width: 1320px; margin: 0 auto; padding: 56px 60px 90px; }
.wd-sec { margin-bottom: 84px; }
.wd-sec h2 { display: flex; align-items: baseline; gap: 16px; font-family: var(--font-serif); font-weight: 400; font-size: var(--fs-6); letter-spacing: .06em; color: var(--ink-0); margin: 0 0 10px; }
.wd-sec h2 span { font-family: var(--font-latin); font-style: italic; font-size: var(--fs-3); color: var(--gold-1); letter-spacing: .14em; }
.wd-note { color: var(--ink-2); font-size: var(--fs-2); line-height: 1.9; max-width: 640px; margin: 0 0 34px; }

/* —— 分叉图 —— 三列：主线 / 扎克斯分叉 / 另一世界 */
.wd-tree { display: grid; grid-template-columns: 1fr 2.4fr 1fr; gap: 44px; align-items: start; }
.wd-col { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
.wd-colhead { font-size: var(--fs-1); letter-spacing: .16em; color: var(--ink-3); margin-bottom: 14px; }
.wd-card, .wd-view {
  display: flex; flex-direction: column; text-align: left; gap: 8px; cursor: pointer; color: inherit;
  padding: 20px 22px 18px; border-radius: var(--r-2); font: inherit;
  background: linear-gradient(165deg, color-mix(in srgb, var(--ink-0) 7%, transparent), color-mix(in srgb, var(--ink-0) 2%, transparent));
  border: 1px solid var(--line-2); transition: transform .35s, border-color .35s, background .35s;
}
.wd-card:hover, .wd-view:hover { transform: translateY(-3px); border-color: var(--line-gold); background: linear-gradient(165deg, color-mix(in srgb, var(--gold-1) 12%, transparent), color-mix(in srgb, var(--ink-0) 3%, transparent)); }
.wd-card strong, .wd-view strong { font-family: var(--font-serif); font-weight: 400; font-size: var(--fs-4); line-height: 1.55; letter-spacing: .03em; color: var(--ink-0); }
.wd-stamp { font-size: var(--fs-1); letter-spacing: .1em; color: var(--gold-1); }
.wd-body { font-size: var(--fs-2); line-height: 1.85; color: var(--ink-1); }
.wd-cite { margin-top: auto; padding-top: 6px; display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-1); color: var(--ink-2); }
.wd-cite svg { width: 12px; height: 12px; }
/* 类型：主线=金边左线；分叉=青灰→已换暖；选择分支=淡；另一世界=粉 */
.wd-card.is-main { border-left: 3px solid var(--gold-1); }
.wd-card.is-branch { border-left: 3px solid var(--gold-2); }
.wd-card.is-choice { border-top: 2px solid var(--gold-3); }
.wd-card.is-ca { border-left: 3px solid var(--petal-1); }
.wd-card.is-ca .wd-stamp { color: var(--petal-1); }
.wd-card.is-small { padding: 16px 18px 14px; }
.wd-card.is-small strong { font-size: var(--fs-3); }
/* 连接：只画原书画出的关系。用 CSS 竖线 + 末端小点，不做复杂曲线 */
.wd-link { display: block; width: 0; height: 44px; margin: 0 auto; border-left: 1px solid var(--gold-2); position: relative; }
.wd-link::after { content: ''; position: absolute; left: -4px; bottom: -1px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold-1); }
.wd-link-ca { border-left-style: dashed; border-color: var(--petal-2); }
.wd-link-ca::after { background: var(--petal-1); }
.wd-fork { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; height: 34px; position: relative; }
.wd-fork i { position: relative; display: block; }
.wd-fork i::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; border-left: 1px solid var(--gold-2); }
.wd-fork::before { content: ''; position: absolute; left: 16.66%; right: 16.66%; top: 0; border-top: 1px solid var(--gold-2); }
.wd-fork i::after { content: ''; position: absolute; left: calc(50% - 3px); bottom: -2px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold-1); }
.wd-row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.wd-cross { margin: 30px 0 0; padding: 16px 20px; border-left: 2px dashed var(--petal-2); color: var(--ink-1); font-size: var(--fs-2); line-height: 1.9; background: color-mix(in srgb, var(--petal-1) 5%, transparent); border-radius: 0 var(--r-2) var(--r-2) 0; }
.wd-cross span { color: var(--petal-1); }

/* —— 视点 —— */
.wd-views { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.wd-no { font-family: var(--font-latin); font-style: italic; font-size: 32px; line-height: 1; color: color-mix(in srgb, var(--ink-0) 22%, transparent); }
.wd-unknown .wd-view { max-width: 760px; border-style: dashed; }
@media (max-width: 1100px) { .wd-tree { grid-template-columns: 1fr; gap: 30px; } .wd-views { grid-template-columns: 1fr; } .wd-hero-in, .wd-read { padding-left: 28px; padding-right: 28px; } }

/* 世界观阅读视图：.atlas-page 原是"定高 + overflow:hidden"的画布容器，阅读视图必须还原为自然高度，否则内容被裁掉。 */
.world-narrative[data-view="read"] { height: auto; min-height: 0; overflow: visible; background: transparent; }
.world-narrative[data-view="read"]::before, .world-narrative[data-view="read"]::after { display: none; }
/* 阅读视图的页脚恢复显示（is-atlas 只在画布视图时才设置，这里作保险） */
body.is-world:not(.is-atlas) .site-footer { display: flex; }

/* 画布视图：标题区与左侧"世界的记录"目录左对齐（同为 4.2%） */
.world-narrative[data-view="canvas"] .wd-hero-in { max-width: none; margin: 0; padding: 22px 4.2% 0; }
