/*
 * 诗词格律官网 · 共享样式（全站唯一一份）
 *
 * 视觉体系：一套「纸、墨、印」的中国风规则（来源 .ai-team/2026-11-13-官网/design/DESIGN.md「视觉规则」）。
 * 不受 App 设计系统约束（BRIEF D-020）：App 的印泥红只作配色参考，其余取值本站自定。
 * 全站唯一的取值来源：本文件顶部的变量。任何规则不得在别处硬编码颜色、字号、间距。
 */

:root {
  /* ── 色板：纸 2 层 + 墨 2 级 + 朱 2 级 + 赭（占位/底纹） ── */
  --paper: #EFE6D5;        /* 宣纸：第一层底色 */
  --paper-2: #FAF5E9;      /* 素纸：第二层，装裱面的纸芯 */
  --paper-3: #E7DCC7;      /* 赭纸：占位块、标签底 */
  --ink: #1E1B16;          /* 松烟墨：标题与正文主色 */
  --ink-2: #57503F;        /* 淡墨：次级文字、说明 */
  --ink-3: #6E6450;        /* 更淡：注脚、占位字（素纸 5.36 : 1、宣纸 4.71 : 1，13px 也过 4.5） */
  --seal: #A8261C;         /* 朱砂/印泥：印章、主按钮、当前项（只做点睛） */
  --seal-deep: #7C1912;    /* 印章描边、按下态 */
  --seal-wash: rgba(168, 38, 28, .07);   /* 朱色淡底（当前项、标签） */
  --rule: rgba(87, 80, 63, .26);         /* 淡墨细线：行间线 */
  --rule-strong: rgba(87, 80, 63, .5);   /* 淡墨粗线：装裱边、双线 */

  /* ── 字体：正文系统黑体，引文系统宋体；标题继承正文字体，不打包字体文件 ── */
  --f-song: "Songti SC", "STSongti-SC-Regular", "Noto Serif CJK SC", "SimSun", serif;
  --f-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
            "MiSans", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;

  /* ── 字阶（手机 / 桌面在下方覆盖） ── */
  --t-hero: 34px;    /* 首页主标语 */
  --t-page: 30px;    /* 内页标题（桌面竖排时同值） */
  --t-sec: 21px;     /* 区域标题 */
  --t-item: 16px;    /* 条目标题 */
  --t-body: 15px;    /* 正文 */
  --t-lead: 16px;    /* 导语 */
  --t-note: 13px;    /* 注脚、说明 */
  --lh-body: 1.9;    /* 中文正文行高：1.9 是本书排版的常见值 */
  --ls: .04em;       /* 中文轻微字距，长行更透气 */

  /* ── 间距：8 的标尺（纸面留白比 App 松） ── */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;

  --w-content: 1040px;   /* 桌面内容最大宽 */
  --w-member-comparison: 880px; /* 会员对照表的内容最大宽 */
  --river-sky: #fcfdfa;
  --river-surface: #fdfdfa;
  --river-section: #f7f9f5;
  --river-shot: #f0f2ed;
  --river-ink: #1e3329;
  --river-muted: #3b4e43;
  --river-rule: #d6ded4;
  --river-border: #6b8073;
  --river-footer: #ebf2ed;
  --w-feature-shot: 256px; /* 功能页竖屏截图的显示宽度 */
  --w-prose: 660px;      /* 段落最大行长（约 42 字） */
  --h-header: 56px;
  --pad-section: 32px;   /* 装裱面上下内边距 */
  /* 断点 840px：桌面字号、间距和导航。 */
}

@media (min-width: 840px) {
  :root {
    --t-hero: 46px;
    --t-page: 40px;
    --t-sec: 24px;
    --t-item: 17px;
    --t-body: 16px;
    --t-lead: 18px;
    --h-header: 68px;
    --pad-section: 56px;
  }
}

/* ── 基础 ── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--h-header) + 56px); }
body {
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  font-family: var(--f-sans);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  letter-spacing: var(--ls);
  overflow-wrap: anywhere;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 var(--s-3); max-width: var(--w-prose); }
h1, h2, h3 { margin: 0; font-weight: 600; }

.wrap {
  max-width: calc(var(--w-content) + var(--s-6) * 2);
  margin: 0 auto;
  padding: 0 var(--s-4);
}
@media (min-width: 840px) { .wrap { padding: 0 var(--s-6); } }

/* ── 装裱面：素纸 + 一圈淡墨细边，块间露 24 纸底 ── */
.mount {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  padding: var(--pad-section) 0;
  margin-top: var(--s-5);
}
.mount > .wrap { padding: 0 var(--s-5); }
@media (min-width: 840px) { .mount > .wrap { padding: 0 var(--s-7); } }

/* ── 顶栏 ── */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--paper);
  background-image: inherit; border-bottom: 1px solid var(--rule); }
.site-header .wrap { height: var(--h-header); display: flex; align-items: center; gap: var(--s-2); }
.brand { display: flex; align-items: center; gap: var(--s-2); margin-right: auto;
  text-decoration: none; font-size: 20px; font-weight: 600; letter-spacing: .12em; }
.brand img { width: 28px; height: 28px; border-radius: 2px; }

/* 一级导航：7 项平铺，没有下拉（BRIEF D-026） */
.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-link {
  display: flex; align-items: center;
  min-height: 48px; padding: 0 var(--s-3);
  font: inherit; font-size: 15px; letter-spacing: .08em; color: var(--ink-2);
  text-decoration: none;
}
.nav-link:hover { color: var(--ink); }

/* 按钮：朱色主行动与淡墨描边次行动。 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 48px; padding: 0 var(--s-5); border: 0; border-radius: 2px;
  font-size: 17px; font-weight: 600; letter-spacing: .12em;
  text-decoration: none; cursor: pointer; }
.btn-primary { background: var(--seal); color: #FBF5E7; box-shadow: inset 0 0 0 2px rgba(255,255,255,.14); }
.btn-primary:hover { background: var(--seal-deep); }
.btn-ghost { border: 1px solid var(--rule-strong); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink-2); }
/* 手机端「下载」常驻右上角（BRIEF D-001 沿用，待确认），桌面端收进导航 */
.header-download-mobile { color: var(--seal); font-size: 16px;
  letter-spacing: .12em; text-decoration: none; display: inline-flex; align-items: center;
  min-height: 44px; padding: 0 var(--s-2); margin-right: var(--s-1); }
@media (min-width: 840px) { .header-download-mobile { display: none; } }

/* 「软件下载」在导航里是朱色文字项，不做实心红按钮——首屏只留一个朱色主按钮 */
.nav-download { color: var(--seal); font-size: 16px; letter-spacing: .12em; }

.menu-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 0; color: var(--ink); cursor: pointer; }
.menu-btn svg { width: 22px; height: 22px; }
.menu-btn .i-close { display: none; }
.menu-open .menu-btn .i-open { display: none; }
.menu-open .menu-btn .i-close { display: block; }

/* 手机：折叠成一列 7 项 */
@media (max-width: 839.98px) {
  .site-nav { display: none; position: fixed; left: 0; right: 0; top: var(--h-header); bottom: 0;
    background: var(--paper-2); overflow-y: auto; padding-bottom: var(--s-6);
    border-top: 1px solid var(--rule); }
  .menu-open .site-nav { display: block; }
  .menu-open { overflow: hidden; }
  .site-nav .nav-link { position: relative; width: 100%; padding: 0 var(--s-4); font-size: 17px; color: var(--ink); }
  /* 行间线：左端对齐本行文字起点 16、右端抵边 */
  .site-nav .nav-list > li + li > .nav-link::before {
    content: ""; position: absolute; top: 0; right: 0; left: var(--s-4); border-top: 1px solid var(--rule);
  }
  .site-nav [aria-current="page"] { color: var(--seal); background: var(--seal-wash); }
  .site-nav .nav-download { color: var(--seal); }
}

/* 桌面：7 项横排；1024 以下收一点间距，保证 7 项 + 品牌名排得下不换行 */
@media (min-width: 840px) {
  .menu-btn { display: none; }
  .site-nav .nav-list { display: flex; align-items: center; }
  .nav-item { position: relative; }
  .nav-link[aria-current="page"] { color: var(--ink); }
  .nav-link[aria-current="page"]::after {
    content: ""; position: absolute; left: var(--s-3); right: var(--s-3); bottom: 8px;
    border-bottom: 2px solid var(--seal);
  }
}
@media (min-width: 840px) and (max-width: 1119.98px) {
  .nav-link { padding: 0 var(--s-2); letter-spacing: .04em; }
  .brand { font-size: 18px; letter-spacing: .08em; }
}

/* ── 双线：中式分隔（上粗下细），只用于叶片级分界 ── */
.double-rule { border: 0; border-top: 1px solid var(--rule-strong); margin: 0; position: relative; }
.double-rule::after { content: ""; display: block; border-top: 1px solid var(--rule); margin-top: 2px; }

/* ── 朱印：小方印，白字 ── */
.seal-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; flex: none;
  background: var(--seal); color: #FBF5E7; border-radius: 2px;
  font-size: 15px; font-weight: 600; line-height: 1;
  box-shadow: inset 0 0 0 1px var(--seal-deep);
}
.seal-mark.lg { width: 40px; height: 40px; font-size: 22px; }

/* ── 区域标题：朱印 + 标题 + 淡墨尾线 ── */
.sec-title { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-4); }
.sec-title .txt { font-family: var(--f-song); font-size: var(--t-sec); letter-spacing: .14em; }
.sec-title::after { content: ""; flex: 1; border-top: 1px solid var(--rule); }
.sec-sub { margin: calc(-1 * var(--s-2)) 0 var(--s-5); color: var(--ink-2); font-size: var(--t-note); }

/* ── 页头：桌面竖排题签 ── */
.page-head { display: grid; gap: var(--s-4); align-items: start; }
.page-head .head-text { display: grid; gap: var(--s-3); }
.page-title { font-family: var(--f-song); font-size: var(--t-page); font-weight: 600; letter-spacing: .18em; line-height: 1.3; }
.page-title .v { display: none; }
.lead { font-size: var(--t-lead); color: var(--ink-2); line-height: 1.9; }
@media (min-width: 840px) {
  .page-head.has-media { grid-template-columns: 1fr 460px; gap: var(--s-7); }
  /* 标题竖排 + 右侧朱线，像书页题签；只在桌面用，窄屏横排保证可读 */
  .page-head .head-text { grid-template-columns: auto 1fr; column-gap: var(--s-5); }
  .page-head .head-body { display: grid; gap: var(--s-3); align-content: start; }
  .page-title { writing-mode: vertical-rl; text-orientation: upright; letter-spacing: .22em;
    border-right: 1px solid var(--seal); padding-right: var(--s-3); margin: 0; }
}
.page-head .media { width: 100%; }
@media (max-width: 839.98px) {
  .page-head .media { order: -1; margin: 0 calc(-1 * var(--s-5)); }
}

/* 首页导读：同样的图文入口按导航顺序排列。 */
.lead-grid { display: grid; }
.lead-item {
  display: grid; grid-template-columns: clamp(104px, 30vw, 144px) minmax(0, 1fr);
  align-items: center; gap: var(--s-3); padding: var(--s-4) 0;
  text-decoration: none;
}
.lead-item + .lead-item { border-top: 1px solid var(--rule); }
.lead-item:hover .lead-title { color: var(--seal); }
.lead-item:focus-visible { outline: 2px solid var(--seal); outline-offset: 4px; }
.lead-item img { border: 1px solid var(--rule); border-radius: var(--s-2); }
.lead-title { font-family: var(--f-song); margin-bottom: var(--s-1); }
.lead-item p { margin: 0; color: var(--ink-2); line-height: 1.65; }
.home-news .more { font-size: var(--t-sec); }
@media (min-width: 840px) {
  .lead-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s-7); }
  .lead-item { gap: var(--s-5); }
  .lead-item:nth-child(2) { border-top: 0; }
}

/* 功能页：截图按真实比例展示，普通手机宽度起图文交错。 */
.feature-page { background: var(--paper-2); }
.feature-intro, .feature-section, .feature-actions { padding: var(--pad-section) 0; }
.feature-intro { background: var(--paper); }
.feature-intro .page-title { writing-mode: horizontal-tb; border: 0; padding: 0; }
.feature-intro .lead { margin: var(--s-2) 0 0; text-wrap: balance; }
.feature-section, .feature-actions { border-block-start: 1px solid var(--rule); }
.feature-section .wrap { display: grid; gap: var(--s-5); padding-inline: var(--s-5); }
.feature-section h2 { font-family: var(--f-song); font-size: var(--t-page); line-height: 1.35; }
.feature-section ul { margin: var(--s-3) 0 0; padding-inline-start: var(--s-4); color: var(--ink-2); text-wrap: pretty; }
.feature-section li::marker { color: var(--seal); }
.feature-section .shot { width: min(100%, var(--w-feature-shot)); justify-self: center; }
.feature-section .shot img { border: 1px solid var(--rule); border-radius: var(--s-2); }
/* 尚未上线的板块（社刊）没有截图：单列排布，用一句说明代替图片位。 */
.feature-section.feature-section--soon .wrap { grid-template-columns: minmax(0, 1fr); }
.feature-section--soon .sec-sub { margin: calc(-1 * var(--s-2)) 0 0; }
.feature-intro .wrap, .download-options .wrap { padding-inline: var(--s-5); }
.feature-actions .hero-actions { justify-content: center; }
@media (min-width: 380px) {
  /* 扣除两侧留白与列间距后，每列至少 158px，足以放下体裁标题。 */
  .feature-section .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center;
    gap: var(--s-4); }
  .feature-section h2 { font-size: var(--t-sec); }
  .feature-section:nth-of-type(even) .shot { grid-column: 1; grid-row: 1; }
  .feature-section:nth-of-type(even) .wrap > div:first-child { grid-column: 2; grid-row: 1; }
}
@media (min-width: 840px) {
  .feature-section .wrap { gap: var(--s-7); }
  .feature-intro .wrap, .feature-section .wrap, .download-options .wrap { padding-inline: var(--s-7); }
  .feature-section h2 { font-size: var(--t-page); }
}

/* 最新信息：时间倒序条目 */
.news { max-width: var(--w-prose); }
/* 列表页只有标题与摘要，按正文行长排会显得窄；详情仍用 prose 宽度。 */
.news--list { max-width: 100%; }
@media (min-width: 840px) { .news--list { max-width: 860px; } }
.entry { padding: var(--s-5) 0; }
.entry:first-child { padding-top: 0; }
.entry:last-child { padding-bottom: 0; }
.entry + .entry { border-top: 1px solid var(--rule); }
.entry-meta { display: flex; align-items: center; gap: var(--s-3); font-size: 13px; color: var(--ink-2); }
.entry-tag { display: inline-flex; align-items: center; min-height: 22px; padding: 0 var(--s-2);
  font-size: 12px; letter-spacing: .1em;
  color: var(--seal-deep); background: var(--seal-wash); border: 1px solid rgba(168,38,28,.22); }
.entry-title { font-family: var(--f-song); font-size: 21px; letter-spacing: .1em; margin: var(--s-2) 0 var(--s-3); }
.entry-body p { margin: 0 0 var(--s-3); color: var(--ink); }
.entry-body p:last-child { margin-bottom: 0; }
.entry-body strong { font-weight: 600; }
/* 列表只有标题与摘要，缩略图只放详情页。 */
.entry-link { display: block; text-decoration: none; }
.entry-link:hover .entry-title { color: var(--seal); }
.entry-link:focus-visible { outline: 2px solid var(--seal); outline-offset: 4px; }
.entry-link .entry-title { margin: 0 0 var(--s-1); }
.entry-summary { margin: 0; color: var(--ink-2); }
.entry-figure img {
  width: 100%; height: auto; border: 1px solid var(--rule); border-radius: var(--s-2);
}
.entry-detail {
  display: grid; gap: var(--s-5); padding: var(--pad-section) var(--s-5);
}
.entry-detail .inline-link { justify-self: start; }
.entry-detail .entry-title { font-size: var(--t-page); margin-bottom: 0; line-height: 1.3; }
.entry-figure { margin: 0; }
.entry-figure figcaption { margin-top: var(--s-1); color: var(--ink-2); font-size: var(--t-note); }
/* 详情里的真机截图：两张并排，按手机比例限宽，不铺满正文。 */
/* 窄屏单列（两个 165px 的截图看不清字），640px 起并排两张。 */
.entry-figures { display: grid; gap: var(--s-4); justify-items: center; }
.entry-figures .entry-figure { width: min(100%, 320px); }
@media (min-width: 640px) {
  .entry-figures { grid-template-columns: repeat(2, minmax(0, 300px)); justify-content: center; gap: var(--s-3); }
}
/* 视频：外部播放器按 16:9 自适应宽度。 */
.entry-video { margin: 0; }
.entry-video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0;
  border-radius: var(--s-2); background: var(--paper-3); }
.entry-video figcaption { margin-top: var(--s-1); color: var(--ink-2); font-size: var(--t-note); }

/* ── 条目网格：纸面上直接排字，用淡墨线分行，不做卡片 ── */
.items { display: grid; margin: 0; padding: 0; list-style: none; }
.items > li { padding: var(--s-4) 0; }
.items > li + li { border-top: 1px solid var(--rule); }
.item-title { font-family: var(--f-song); font-size: var(--t-item); font-weight: 600; letter-spacing: .1em; margin-bottom: var(--s-1); }
.item-title a { text-decoration: none; }
.item-title a:hover { color: var(--seal); }
.item-desc { margin: 0; color: var(--ink-2); }
@media (min-width: 840px) {
  .items.cols-2 { grid-template-columns: 1fr 1fr; column-gap: var(--s-7); }
  .items.cols-3 { grid-template-columns: repeat(3, 1fr); column-gap: var(--s-7); }
  .items.cols-2 > li:nth-child(2), .items.cols-3 > li:nth-child(-n+3) { border-top: 0; }
}

.more { display: inline-flex; align-items: center; min-height: 48px;
  font-size: 16px; letter-spacing: .1em; color: var(--ink-2); text-decoration: none; }
.more::after { content: "›"; font-family: var(--f-sans); margin-left: 4px; }
.more:hover { color: var(--seal); }
.prose a, .inline-link { color: var(--seal-deep); text-underline-offset: 3px; }

/* ── 图片：HTML 里一律带 width/height（防抖动），这里只让它铺满所在列；加载前露赭纸底 ── */
.media img, .lead-item img, .gallery img, .shot img { width: 100%; height: auto; background: var(--paper-3); }

/* 首页标语与行动入口共用淡墨山水页首。 */
.home-intro .page-title { font-size: var(--t-hero); line-height: 1.25; }
.hero-tagline {
  margin: var(--s-2) 0 var(--s-4); font-size: var(--t-lead);
  line-height: 1.9; color: var(--ink-2); letter-spacing: .06em;
}
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4) var(--s-5); }

/* 单栏功能页：标题、表格和图片组依次排布。 */
.feature-page--stacked .feature-section .wrap { grid-template-columns: minmax(0, 1fr); align-items: start; gap: var(--s-5); }
.feature-page--stacked .feature-section h2 { font-size: var(--t-sec); }
.feature-page--stacked .item-desc { margin-top: var(--s-2); }
/* 诗集打印的样张是竖幅书页，手机上单列整宽、桌面两列，保证页面上的小字看得清。 */
.gallery { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-5); }
@media (min-width: 640px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.gallery figure { margin: 0; }
.gallery img { border: 1px solid var(--rule); border-radius: var(--s-2); }
.gallery figcaption { font-size: 14px; color: var(--ink-2); margin-top: var(--s-2); }

/* ── 对照表 ── */
.compare { width: 100%; max-width: 780px; border-collapse: collapse; }
.compare th, .compare td { padding: var(--s-3) var(--s-2); text-align: left;
  border-top: 1px solid var(--rule); vertical-align: top; }
.compare thead th { border-top: 0; border-bottom: 1px solid var(--rule-strong);
  font-size: 16px; letter-spacing: .12em; color: var(--ink); }
.compare th:first-child, .compare td:first-child { padding-left: 0; }
.compare td.c { text-align: center; width: 88px; white-space: nowrap; }
.compare thead th.c { text-align: center; white-space: nowrap; }
.compare .yes { color: var(--seal); font-weight: 600; }
.compare .no { color: var(--ink-3); }
.compare .row-desc { display: block; font-size: 13px; color: var(--ink-2); line-height: 1.7; }
.compare th[scope="rowgroup"] { color: var(--ink-2); font-size: var(--t-note); }
/* 标题和表格共用居中容器，保留功能区的响应式页边距。 */
.feature-section.member-comparison .wrap {
  grid-template-columns: minmax(0, var(--w-member-comparison));
  justify-content: center;
}
.member-comparison .compare { max-width: none; }
.compare--compact th, .compare--compact td { padding-block: var(--s-2); }
.compare--compact th[scope="rowgroup"] { background: var(--paper-3); }
@media (min-width: 840px) {
  .member-comparison td.c { width: 18%; }
}
.print-spec { table-layout: fixed; }
.print-spec thead th:first-child { width: 28%; }
.print-spec tbody th { font-weight: 600; }

/* 软件下载：窄屏两列商店，宽屏五个入口在同一行。 */
.download-options { padding: var(--s-6) 0 var(--s-5); border-top: 1px solid var(--rule); }
.download-heading { font-family: var(--f-song); font-size: var(--t-sec); line-height: 1.35; }
.download-android .download-heading { color: var(--seal); font-size: var(--t-page); }
.download p { margin: var(--s-2) 0 0; color: var(--ink-2); line-height: 1.55; }
.download-stores { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3);
  list-style: none; margin: var(--s-5) 0 0; padding: 0; }
.download-link { justify-content: space-between; padding-inline: var(--s-3); min-height: 44px;
  line-height: 1.35; letter-spacing: .04em; }
.download-link:hover { background: var(--seal-wash); border-color: var(--seal); }
.download-link:focus-visible { outline: 2px solid var(--seal); outline-offset: 2px; }
.download-link::after { content: ""; flex: 0 0 var(--s-4); height: var(--s-4);
  background: var(--seal); mask: url("download/chevron-right.svg") center / contain no-repeat; }
.download-stores .download-link { width: 100%; min-height: 52px; justify-content: flex-start;
  font: 600 var(--t-item) / 1.35 var(--f-sans); }
.download-stores img { flex: none; }
.download-stores .download-link::after { margin-left: auto; }

.download-platforms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5);
  margin-top: var(--s-5); padding: var(--s-5) 0; border-block: 1px solid var(--rule); }
.download-platforms section { display: flex; flex-direction: column; align-items: flex-start; }
.download-platforms p { flex: 1; }
.download-platforms .download-link { width: 100%; margin-top: var(--s-3); }
.download-legacy { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--s-3); padding: var(--s-4) 0; border-bottom: 1px solid var(--rule); }
.download-upcoming { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-1) var(--s-3);
  padding-top: var(--s-4); color: var(--ink-2); font-size: var(--t-note); }
.download-upcoming h2 { font-size: inherit; }
.download-upcoming ul { display: flex; flex-wrap: wrap; column-gap: var(--s-2);
  list-style: none; padding: 0; margin: 0; }
.download-upcoming li + li::before { content: "·"; margin-right: var(--s-2); }

@media (max-width: 359px) {
  .download-platforms { grid-template-columns: 1fr; }
  .download-stores img { width: 24px; height: 24px; }
}
@media (min-width: 840px) {
  .download-options { padding: var(--s-7) 0 var(--s-6); }
  .download-stores { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .download-stores .download-link { min-height: 64px; }
  .download-platforms { gap: var(--s-7); margin-top: var(--s-6); padding: var(--s-6) 0; }
  .download-platforms .download-link { width: auto; min-width: 176px; }
}

/* ── 页脚 ── */
.site-footer { margin-top: var(--s-7); padding: var(--s-6) 0 var(--s-7); font-size: 13px; color: var(--ink-2); }
.footer-rule { margin-bottom: var(--s-5); }
.footer-grid { display: grid; gap: var(--s-4); }
@media (min-width: 840px) { .footer-grid { grid-template-columns: 1fr auto; align-items: end; } }
.footer-title { font-family: var(--f-song); font-size: 15px; letter-spacing: .14em; color: var(--ink); margin-bottom: var(--s-1); }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 var(--s-4); }
.footer-links a { display: inline-flex; align-items: center; min-height: 40px; }
.site-footer p { margin: 0; }

/* 功能页用近白底色承托淡墨山水。 */
.river-theme {
  --paper: var(--river-sky);
  --paper-2: var(--river-surface);
  --paper-3: var(--river-section);
  --ink: var(--river-ink);
  --ink-2: var(--river-muted);
  --rule: var(--river-rule);
  --rule-strong: var(--river-border);
}
.river-theme .feature-intro { display: grid; gap: var(--s-5); padding-bottom: 0; }
.river-theme .feature-intro .wrap { width: 100%; }
.river-hero-art { width: 100%; height: auto; grid-row: 2; }
.river-theme .feature-section:nth-of-type(even) { background: var(--river-section); }
.river-theme .feature-section .shot img { background: var(--river-shot); }
.feature-page--shot-gallery .feature-section .wrap { grid-template-columns: minmax(0, 1fr); align-items: center; }
.feature-page--shot-gallery .feature-section h2 { font-size: var(--t-sec); }
.river-theme .site-footer {
  margin-top: 0;
  background: var(--river-footer) url("river-footer.webp") right bottom / cover no-repeat;
  background-blend-mode: luminosity;
}

@media (min-width: 600px) {
  .river-theme .feature-intro { position: relative; display: block; padding-block: var(--s-8); }
  .river-theme .feature-intro .wrap { position: relative; }
  .river-theme .feature-intro .lead { max-width: 48%; }
  .river-hero-art { position: absolute; inset: 0; height: 100%; object-fit: cover; object-position: right 65%; }
}
@media (min-width: 720px) {
  .feature-page--shot-gallery .feature-section .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 2.35fr); }
  .feature-page--shot-gallery .feature-section:nth-of-type(even) .wrap { grid-template-columns: minmax(0, 2.35fr) minmax(0, 1fr); }
  .feature-page--shot-gallery .feature-section:nth-of-type(even) .shot-gallery { grid-column: 1; grid-row: 1; }
}
@media (max-width: 719.98px) {
  .shot-gallery { width: min(100%, 580px); justify-self: center; }
  .feature-page--shot-gallery .feature-section:nth-of-type(even) .wrap > div:first-child { grid-column: auto; grid-row: auto; }
}

/* 按截图区实际宽度排图，触屏通过原生滚动切换。 */
.shot-gallery { min-width: 0; container-type: inline-size; }
.shot-gallery-track {
  --visible-shots: 1;
  --shot-gap: var(--s-3);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - (var(--visible-shots) - 1) * var(--shot-gap)) / var(--visible-shots));
  max-width: calc(var(--visible-shots) * var(--w-feature-shot) + (var(--visible-shots) - 1) * var(--shot-gap));
  margin-inline: auto;
  align-items: start;
  gap: var(--shot-gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}
.shot-gallery-track[data-enhanced] { scrollbar-width: none; }
.shot-gallery-track:focus-visible { outline: 2px solid var(--seal); outline-offset: 4px; }
.shot-gallery-track img {
  width: 100%; height: auto; align-self: start; scroll-snap-align: start;
  background: var(--river-shot); border: 1px solid var(--rule); border-radius: var(--s-2);
}
/* 两张 256px 的截图加 12px 间距。 */
@container (min-width: 524px) {
  .shot-gallery-track:has(> img + img) { --visible-shots: 2; }
}
.shot-gallery-controls:not([hidden]) {
  display: flex; justify-content: center; align-items: center;
  margin-top: var(--s-2);
}
.shot-gallery-controls button {
  display: grid; place-items: center;
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; cursor: pointer;
}
.shot-gallery-controls button:hover { background: var(--paper-3); }
.shot-gallery-controls button:focus-visible { outline: 2px solid var(--seal); outline-offset: -2px; }
.shot-gallery-controls button::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--rule-strong);
}
.shot-gallery-controls button[aria-current="true"]::before { background: var(--seal); }
.shot-gallery-dots { display: flex; }
.shot-gallery-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
