/* ==========================================================================
   365Lab 加水印 · 设计系统
   明亮扁平现代风（仅明亮模式）· 内容宽度布局 · 桌面/移动自适应
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --brand: #4f5bd5;
  --brand-deep: #3a46b8;
  --brand-soft: #eef0fd;
  --brand-grad: linear-gradient(135deg, #4f5bd5 0%, #7c4ddc 100%);
  /* 用作「填充底色 + 白字」的品牌色。
     深色模式下 --brand 会被提亮成浅紫（当文字/描边用），
     浅紫底配白字只有 2.7:1，所以填充场景必须走这个独立的深色令牌。 */
  --brand-solid: #4f5bd5;

  --cyan: #0e9f9a;
  --cyan-soft: #e6f7f6;
  --pink: #e85d8c;
  --pink-soft: #fdecf2;
  --green: #2e9e6b;
  --green-soft: #e8f6ef;
  --amber: #d9861a;
  --amber-soft: #fdf3e3;
  --red: #d4483f;
  --red-soft: #fdeeec;

  --ink: #1b2330;
  --ink-2: #4a5568;
  /* ink-3 / ink-4 经对比度校准：ink-3 在白底与 --bg 上均 ≥4.5:1（WCAG AA 正文）；
     ink-4 仅用于装饰性箭头、分隔符与 hover 描边，不承载正文。 */
  --ink-3: #636e80;
  --ink-4: #8a94a6;

  --bg: #f5f7fb;
  --bg-2: #eef1f7;
  --surface: #ffffff;
  --surface-2: #fafbfe;
  --line: #e3e9f2;
  --line-2: #d3dbe8;

  --link: #3b4ac0;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;

  --sh-1: 0 1px 2px rgba(27, 35, 48, 0.05), 0 1px 3px rgba(27, 35, 48, 0.04);
  --sh-2: 0 2px 6px rgba(27, 35, 48, 0.06), 0 8px 24px rgba(27, 35, 48, 0.06);
  --sh-3: 0 10px 34px rgba(27, 35, 48, 0.12), 0 2px 8px rgba(27, 35, 48, 0.06);
  --sh-brand: 0 8px 22px rgba(79, 91, 213, 0.22);

  --font: "Segoe UI", system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  --header-h: 62px;
  --container: 1180px;
  --gutter: 24px;

  --dur: 0.18s;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

/* scroll-padding-top：页头是 sticky 的（桌面 62px / 移动 98px），
   不加偏移的话点页内锚点跳转后，目标标题会被页头盖住。
   写在滚动容器 html 上，一处生效覆盖全站所有锚点与 #main 跳转。 */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px); }

body {
  /* 必须清零：浏览器 UA 默认 8px 外边距会让整页四周留一圈 8px 空白，
     吸顶页头顶部露出一条缝、hero 渐变与页脚也都不是真通栏
     （实测 390 视口下只有 374 宽）。 */
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img, svg, video, canvas { display: block; max-width: 100%; }
button { cursor: pointer; background: none; border: 0; }
a { color: var(--link); text-decoration: none; }
[role="button"], button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

::selection { background: rgba(79, 91, 213, 0.18); }
/* [hidden] 在作者样式表里被 .field/.pnl-grid/.row/.dropzone/.btn/.thumb-rail 等
   display 规则覆盖（UA 的 [hidden]{display:none} 优先级低），导致 JS 的 el.hidden=bool
   与 HTML 的 hidden 属性全部失效（约 20 处 UI 分支恒显）。这里强制补回。 */
[hidden] { display: none !important; }
/* ---------- Bilingual inline pairs ----------
   长文内容用 .i18n-zh / .i18n-en 成对书写，按 <html lang> 显示对应语言 */
.i18n-zh,  .i18n-en { display: none; }
html[lang^="zh"] .i18n-zh { display: inline; }
html[lang^="en"] .i18n-en { display: revert; }
/* 下面这条原本是为了「再次隐藏被上层规则意外显示的」内联标签，但规则 3 已经覆盖
   了 span / em / li / td / th / option / code / small / b / i 等所有情况，
   留着是为 <option> 在某些浏览器里的特殊行为兜底；同时不再需要按标签列 zh/en 白名单。
   历史包袱：旧版只白名单了 em/li/td/th/option/code/small/b/i，导致 <h1> / <p> / <strong> /
   <a> 里的 <span class="i18n-zh"> 永远 display:none，主标题和正文看不见。已修复。 */

/* ---------- Typography ---------- */
h1, h2, h3, h4 { line-height: 1.32; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
/* 标题折行时让各行长度更均匀（避免末行只剩两个字）。
   不支持的浏览器忽略即可，不会有副作用。 */
h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }
h2 { font-size: clamp(1.3rem, 1.05rem + 1.1vw, 1.75rem); }
h4 { font-size: 1rem; }
.lead { font-size: clamp(0.98rem, 0.94rem + 0.25vw, 1.14rem); color: var(--ink-2); }
code {
  font-family: var(--mono); font-size: 0.88em;
  background: var(--bg-2); border: 1px solid var(--line);
  padding: 1px 6px; border-radius: 6px; color: var(--brand-deep);
}
kbd {
  font-family: var(--mono); font-size: 0.8em;
  background: var(--surface); border: 1px solid var(--line-2); border-bottom-width: 2px;
  padding: 1px 6px; border-radius: 6px; color: var(--ink-2);
}
hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  /* viewport-fit=cover 已开启：横屏时刘海/圆角会盖住内容，用 max() 让安全区
     只在比 gutter 更宽时生效，正常机型（inset=0）完全不受影响。 */
  padding-inline: max(var(--gutter), env(safe-area-inset-left, 0px))
                  max(var(--gutter), env(safe-area-inset-right, 0px));
}
.container-narrow { max-width: 860px; }
.section { padding-block: clamp(36px, 5vw, 64px); }
/* R107：从 index / 404 的内联 style 抽离的通用区块工具类 */
.section-alt { background: var(--surface); }
.section.center { text-align: center; }
/* 404 错误码（原内联 3.2rem 大号数字，不在 .section-head 内故不受眉标胶囊规则影响） */
.err-code { font-size: 3.2rem; font-weight: 800; color: var(--brand); letter-spacing: -.02em; }
.section-head { margin-bottom: 26px; }
.section-head .eyebrow {
  display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--brand); margin-bottom: 10px;
}
.section-head p { max-width: 720px; }
/* ---------- 内容页统一排版（R77）----------
   此前各内容页的页头结构、眉标、h1/h2 与面包屑间距各不相同
   （眉标有的页有有的页没有、h2 靠内联 margin 手写且数值有 4 种、面包屑 18px/14px 两种），
   这里统一成一套类名规则，HTML 只保留语义结构。 */
/* 眉标：全站统一为品牌色胶囊（原先只有裸文字，首页与各内容页观感不一致） */
.section-head .eyebrow {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-deep);
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; line-height: 1.5; margin-bottom: 10px;
}
/* 内容页 h1：原先吃 UA 默认 margin（上下 0.67em），与下方 lead 的间距各页不一 */
.section-head h1 {
  font-size: clamp(1.4rem, 1.15rem + 1.15vw, 2rem);
  margin: 0 0 8px;
}
/* 面包屑：统一只保留下边距 */
.page-crumbs { margin: 0 0 14px; }
/* 正文容器：统一标题、段落与列表的纵向节奏 */
.prose > h2 { margin: 28px 0 10px; }
.prose > h3 { margin: 20px 0 8px; }
.prose > p { margin: 0 0 12px; }
.prose > ul,  .prose > ol { margin: 0 0 14px; padding-inline-start: 22px; }
.prose > ul > li + li,  .prose > ol > li + li { margin-top: 6px; }
.prose > .note { margin: 20px 0; }
.prose > .grid { margin: 16px 0; }
.prose > .btn-group { margin-top: 26px; }
.prose > .table-wrap { margin-bottom: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row-wrap { flex-wrap: wrap; }
/* 布局原语：.row / .col / .grid 只提供 display 与间距，
   列数与换行交给 .g2 / .g4 / .row-wrap 组合使用。 */
.row  { display: flex; align-items: center; gap: 10px; }
.col  { display: flex; flex-direction: column; gap: 8px; }
.grid { display: grid; gap: 18px; }
/* 比 .section 更紧凑的纵向留白（首页英雄区用） */
.section-tight { padding-block: clamp(24px, 3.4vw, 40px); }
/* 面包屑里的 “/” 分隔符。用 ink-3 而不是 ink-4：
   它是链接之间的结构性分隔，读者要能看清，ink-4 在白底只有 2.85:1。 */
.sep { color: var(--ink-3); padding-inline: 2px; }
.spacer { flex: 1 1 auto; }
/* ---------- Site header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(1.5) blur(12px);
  -webkit-backdrop-filter: saturate(1.5) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  height: 100%;
  display: flex; align-items: center; gap: 18px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; }
.brand-logo {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  flex: 0 0 auto;
}
/* R54：logo 去掉渐变背景方块，直接展示放大的水滴+照片图标本体 */
.brand-logo svg { width: 44px; height: 44px; display: block; }
/* 0.68rem 只有 10.88px，低于 12px 可读下限；提到 0.75rem 并稍微放松字距 */
.brand-name small { display: block; font-size: 0.75rem; font-weight: 600; color: var(--ink-3); letter-spacing: 0.01em; line-height: 1.3; }
.nav { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.nav a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 10px;
  font-size: 0.93rem; font-weight: 550; color: var(--ink-2);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav a:hover { background: var(--bg-2); color: var(--ink); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-deep); font-weight: 650; }
.nav-group { position: relative; }
.dropdown {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 70;
  min-width: 252px; padding: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--sh-3);
  display: grid; gap: 2px;
  animation: pop 0.14s var(--ease);
}
.dropdown a {
  display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: center;
  padding: 9px 10px; border-radius: 9px;
}
.dropdown a:hover { background: var(--bg-2); text-decoration: none; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } }
.header-actions { display: flex; align-items: center; gap: 8px; margin-inline-start: 0; }
.lang-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; min-width: 44px; padding: 0 11px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--surface);
  font-size: 0.82rem; font-weight: 600; color: var(--ink-2);
  transition: border-color var(--dur), color var(--dur);
}
.lang-btn:hover { border-color: var(--brand); color: var(--brand-deep); }

.nav-toggle {
  display: none; width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--line-2); background: var(--surface);
  place-items: center;
}
.nav-toggle svg { width: 20px; height: 20px; }
/* mobile drawer */
.mobile-nav {
  position: fixed; inset: var(--header-h) 0 auto 0; z-index: 59;
  background: var(--surface); border-bottom: 1px solid var(--line);
  box-shadow: var(--sh-3);
  padding: 10px var(--gutter) 18px;
  max-height: calc(100dvh - var(--header-h)); overflow: auto;
  display: none;
}
.mobile-nav.open { display: block; animation: slide-down 0.18s var(--ease); }
.mobile-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 10px; border-radius: 10px; color: var(--ink-2); font-weight: 550;
}
.mobile-nav a:hover,  .mobile-nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-deep); text-decoration: none; }
/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border-radius: 11px;
  font-size: 0.93rem; font-weight: 600; line-height: 1;
  border: 1px solid transparent; background: var(--surface); color: var(--ink);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
    background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur);
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; flex: 0 0 auto; }
.btn:active { transform: translateY(1px); }
/* 按钮四种变体：
   primary 品牌渐变实心（主行动）· ghost 描边次要 · soft 浅底弱强调 · danger 危险操作。
   底色与文字色成对给出，深色模式下再成对反转。 */
.btn-primary {
  background: var(--brand-grad);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--sh-brand);
}
.btn-ghost {
  background: transparent;
  border-color: var(--line-2);
  color: var(--ink);
}
.btn-soft {
  background: var(--brand-soft);
  border-color: transparent;
  color: var(--brand-deep);
}
.btn-danger {
  background: var(--red-soft);
  border-color: transparent;
  /* 与 .icon-btn.danger 保持一致：--red 在浅底上只有 3.88:1，
     文字场景统一用更深的 #b8362f（5.8:1）。（旧注释里的 .chip-red 已随变体线删除） */
  color: #b8362f;
}
.btn-lg { min-height: 48px; padding: 0 22px; font-size: 1rem; border-radius: 13px; }
.btn-primary:hover { box-shadow: 0 10px 26px rgba(79, 91, 213, 0.32); background-position: 100% 50%; }
/* 触控/键盘聚焦时同样给出渐变位移，保证非鼠标路径下也有一致的"流动"反馈 */
.btn-primary:focus-visible { background-position: 100% 50%; }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-deep); background: var(--surface-2); }
.btn-soft:hover { background: #e3e6fb; }
.btn-danger:hover { background: #fbe1de; }
.btn-sm { min-height: 32px; padding: 0 11px; font-size: 0.82rem; border-radius: 9px; gap: 6px; }
.btn-block { width: 100%; }
.btn[disabled],  .btn[aria-disabled="true"] {
  opacity: 0.45; pointer-events: none; box-shadow: none;
}
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }
.email-copy .em { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 600; }
.email-copy svg { width: 18px; height: 18px; }
/* ---------- Chips / badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: 999px;
  background: var(--bg-2); color: var(--ink-2);
  font-size: 0.78rem; font-weight: 600;
}
.chip-green { background: var(--green-soft); color: #1f7d51; }
.chip-brand { background: var(--brand-soft); color: var(--brand-deep); }
.chip-dot::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor;
}
/* ---------- Cards ---------- */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: var(--sh-1);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
  overflow: hidden;
}
/* .card 经常包成 <a>，要清掉锚点的默认蓝色与下划线，并保证正文颜色一致 */
.card, .card:hover { color: var(--ink); text-decoration: none; }
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-2);
  border-color: var(--line-2);
}
.card:active { transform: translateY(-1px); }
.card p { color: var(--ink-2); text-decoration: none; }
.card h1, .card h2, .card h3, .card h4 { color: var(--ink); }
/* 卡片顶部装饰线已按需求整体移除（2026-09-30）：.card::before 4px 渐变线与
   .card-accent-cyan/pink/green 变体线全部删除，HTML 中的 card-accent-* 类名已同步清掉。
   .card::after 的顶部渐变淡染不是线条，保留。 */
.card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(79, 91, 213, 0.045), rgba(79, 91, 213, 0) 42%);
}
.card-hover:hover {
  transform: translateY(-3px);
  border-color: rgba(79, 91, 213, 0.42);
  box-shadow: 0 0 0 3px rgba(79, 91, 213, 0.1), var(--sh-3);
}
/* 卡片按下态：点击瞬间轻微回沉，与 .btn:active 一致的触感反馈 */
.card-hover:active { transform: translateY(-1px); }
.card > * { position: relative; z-index: 1; }
.card-ico {
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-deep); margin-bottom: 12px;
  box-shadow: inset 0 0 0 1px rgba(79, 91, 213, 0.08), 0 2px 4px rgba(27, 35, 48, 0.04);
}
.card-ico svg { width: 22px; height: 22px; }
.card-ico.ico-cyan { background: var(--cyan-soft); color: #0b7f78; box-shadow: inset 0 0 0 1px rgba(11, 127, 120, 0.08), 0 2px 4px rgba(27, 35, 48, 0.04); }
.card-ico.ico-green { background: var(--green-soft); color: #1f7d51; box-shadow: inset 0 0 0 1px rgba(31, 125, 81, 0.08), 0 2px 4px rgba(27, 35, 48, 0.04); }
.card-ico.ico-pink { background: var(--pink-soft); color: #c44978; box-shadow: inset 0 0 0 1px rgba(196, 73, 120, 0.08), 0 2px 4px rgba(27, 35, 48, 0.04); }
.card p { font-size: 0.92rem; }
.card-link:hover { text-decoration: none; }
/* tool entry cards (首页工具网格)
   图标与标题置于一行的两列网格：[图标] [标题]；描述/标签/CTA 跨两列。 */
.tool-card {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto 1fr auto auto;
  gap: 10px 14px;
  align-items: center;
  padding: 24px;
}
.tool-card .card-ico { grid-column: 1; grid-row: 1; margin-bottom: 0; }
.tool-card h3 { grid-column: 2; grid-row: 1; margin: 0; }
.tool-card p {
  grid-column: 1 / -1;
  grid-row: 2;
  /* 描述统一 2 行：三卡同行时 tags/foot 对齐，超长自动省略 */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.tool-card .tc-tags {
  grid-column: 1 / -1; grid-row: 3;
  display: flex; gap: 6px; flex-wrap: wrap;
}
.tool-card .tc-foot {
  grid-column: 1 / -1; grid-row: 4;
  margin-top: 0; padding-top: 4px;
  display: flex; align-items: center; gap: 8px;
  font-size: 0.87rem; font-weight: 650; color: var(--brand-deep);
}

/* 隐私特性卡（首页 .grid.g3 下的 .card.reveal）：图标与标题同行 */
.grid.g3 > .card.reveal {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto 1fr;
  gap: 10px 14px;
  align-items: center;
}
.grid.g3 > .card.reveal .card-ico { margin-bottom: 0; }
.grid.g3 > .card.reveal h3 { margin: 0; }
.grid.g3 > .card.reveal p { grid-column: 1 / -1; grid-row: 2; }

/* ---------- 卡片标题与图标同行（R79）----------
   普通 .card 若首子元素是 .card-ico 且紧跟标题（h2/h3），
   改为「图标 | 标题」两列网格、正文跨两列，与 .tool-card / .card.reveal 一致。
   用 :has() 选择器实现，无需改 HTML；不支持的浏览器回退为原有上下堆叠。 */
.card:not(.tool-card):not(.reveal):has(> .card-ico + h2),
.card:not(.tool-card):not(.reveal):has(> .card-ico + h3) {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 14px;
  align-items: center;
}
.card:not(.tool-card):not(.reveal):has(> .card-ico + h2) > .card-ico,
.card:not(.tool-card):not(.reveal):has(> .card-ico + h3) > .card-ico { margin-bottom: 0; }
.card:not(.tool-card):not(.reveal):has(> .card-ico + h2) > h2,
.card:not(.tool-card):not(.reveal):has(> .card-ico + h3) > h3 { margin: 0; }
/* 标题与图标之外的内容（p / ul / button…）跨满两列 */
.card:not(.tool-card):not(.reveal):has(> .card-ico + h2) > *:not(.card-ico):not(h2),
.card:not(.tool-card):not(.reveal):has(> .card-ico + h3) > *:not(.card-ico):not(h3) {
  grid-column: 1 / -1;
}

/* ---------- Steps ---------- */
.steps { display: grid; gap: 18px; counter-reset: st; }
.step-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  align-items: start;
}
.step-no {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--surface), var(--bg-2)); border: 1px solid var(--line);
  font-weight: 800; color: var(--brand-deep); font-size: 1rem;
  box-shadow: var(--sh-1);
}
.step-body { min-width: 0; }
.step-body h3 { margin-top: 0; margin-bottom: 4px; font-size: 1.02rem; }

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface);
  box-shadow: var(--sh-1);
}
table.data { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 640px; }
table.data caption {
  caption-side: top; text-align: start; padding: 14px 16px 0;
  font-size: 0.84rem; color: var(--ink-3);
}
table.data th,  table.data td {
  padding: 11px 16px; text-align: start; border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.data thead th {
  background: var(--surface-2); color: var(--ink-2); font-weight: 650; font-size: 0.82rem;
  letter-spacing: 0.02em; position: sticky; top: 0; z-index: 2;
}
table.data tbody tr:last-child td { border-bottom: 0; }
/* 大表格行 hover：提升逐行可读性（about 版本表 / 规格表等长表）。
   浅色 var(--bg-2)=#eef1f7、深色=#141b2a，均在两种主题下与 --surface 拉开可见差。 */
table.data tbody tr:hover { background: var(--bg-2); }
table.data td.num { font-family: var(--mono); font-size: 0.85rem; color: var(--ink-2); white-space: nowrap; }

/* collapsible spec groups */
.spec-group { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.spec-group > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; font-weight: 650; color: var(--ink);
  background: var(--surface-2);
}
.spec-group > summary::-webkit-details-marker { display: none; }
.spec-group > summary::after {
  content: ""; width: 9px; height: 9px; margin-inline-start: auto;
  border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3);
  transform: rotate(45deg); transition: transform var(--dur) var(--ease);
}
.spec-group[open] > summary::after { transform: rotate(-135deg); }
.spec-group .sg-body { padding: 4px; }
/* 规格分组标题右侧的数量徽章（靠 margin-inline-start:auto 顶到最右） */
.sg-count {
  margin-inline-start: auto; flex: 0 0 auto;
  font-size: 0.74rem; font-weight: 700; font-family: var(--mono);
  color: var(--brand-deep); background: var(--brand-soft);
  border-radius: 999px; padding: 1px 8px;
}

/* ---------- FAQ accordion ---------- */
.faq-list { display: grid; gap: 10px; }
.faq-item {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 0 18px; transition: border-color var(--dur), box-shadow var(--dur), background var(--dur), transform var(--dur);
  box-shadow: 0 1px 2px rgba(27, 35, 48, 0.03);
}
.faq-item:hover { background: var(--surface-2); transform: translateY(-1px); box-shadow: var(--sh-1); }
.faq-item[open] { border-color: rgba(79, 91, 213, 0.35); box-shadow: var(--sh-2); background: var(--surface); transform: translateY(-1px); }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 15px 0;
  font-weight: 650; font-size: 0.97rem; display: flex; align-items: center; gap: 10px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; flex: 0 0 24px; height: 24px; border-radius: 8px;
  display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-deep);
  font-weight: 700; font-size: 1rem; transition: transform var(--dur) var(--ease), background var(--dur), color var(--dur);
}
.faq-item[open] summary::after {
  content: "−";
  transform: rotate(180deg);
  background: var(--brand); color: #fff;
}
.faq-body { padding: 0 0 16px; color: var(--ink-2); font-size: 0.92rem; }
.faq-item .faq-body p + p { margin-top: 8px; }
/* 在支持的浏览器里让 <details> 展开有平滑高度动画 */
@supports (interpolate-size: allow-keywords) {
  .faq-item { interpolate-size: allow-keywords; }
  .faq-item::details-content { block-size: 0; overflow: hidden; transition: block-size var(--dur) var(--ease), content-visibility var(--dur); }
  .faq-item[open]::details-content { block-size: auto; }
}

/* ---------- Callouts ---------- */
.note {
  display: grid; grid-template-columns: 22px 1fr; gap: 12px;
  padding: 14px 16px; border-radius: var(--r-md);
  background: var(--brand-soft);
  border: 1px solid var(--line-2); border-left: 3px solid var(--brand);
  box-shadow: var(--sh-1);
  color: var(--ink-2); font-size: 0.9rem;
  transition: box-shadow var(--dur) var(--ease);
}
.note:hover { box-shadow: var(--sh-2); }
.note svg { width: 20px; height: 20px; margin-top: 2px; color: var(--brand-deep); }
.note-green { border-left-color: #1f7d51; }
.note-amber { border-left-color: #a4650f; }
.note-green svg { color: #1f7d51; }
.note-amber svg { color: #a4650f; }
.note strong { color: var(--ink); }
/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; }
.flabel {
  font-size: 0.82rem; font-weight: 650; color: var(--ink-2);
  display: flex; align-items: center; gap: 6px;
}
.fhint { font-size: 0.76rem; color: var(--ink-3); line-height: 1.5; }
.input {
  width: 100%; min-height: 40px; padding: 8px 12px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: 10px;
  transition: border-color var(--dur), box-shadow var(--dur);
  font-size: 16px; /* iOS 缩放抑制 */
}
@media (min-width: 721px) { .input, .select, .textarea { font-size: 0.92rem; } }
/* 表单控件 hover 微反馈：鼠标悬停时边框略加深，给出可点击/可输入的暗示
   （写在 :focus 之前，确保键盘聚焦态的 border-color 不被 hover 覆盖）。 */
.input:hover,  .select:hover,  .textarea:hover { border-color: var(--ink-3); }
.input:focus,  .select:focus,  .textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(79, 91, 213, 0.15);
}
.textarea { min-height: 72px; resize: vertical; line-height: 1.6; }
/* 下拉框：与 .input 同款盒模型。
   注意 HTML 里只写 class="select"（不是 "input select"），所以这里必须自带
   尺寸 / 边框 / 内边距，否则会退化成 18px 的原生裸控件，和旁边的输入框完全不齐。 */
.select {
  width: 100%; min-height: 40px; padding: 8px 12px;
  padding-inline-end: 34px;
  background-color: var(--surface); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: 10px;
  font-size: 16px; /* iOS 缩放抑制 */
  line-height: 1.4; cursor: pointer;
  transition: border-color var(--dur), box-shadow var(--dur);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234a5568' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.input-color {
  width: 46px; height: 40px; padding: 3px; border-radius: 10px;
  border: 1px solid var(--line-2); background: var(--surface); cursor: pointer;
}
.input-color::-webkit-color-swatch-wrapper { padding: 0; }
input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 26px;
  background: transparent; cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px; border-radius: 999px;
  background: linear-gradient(90deg, var(--brand) var(--fill, 50%), var(--bg-2) var(--fill, 50%));
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px; margin-top: -6px;
  border-radius: 50%; background: #fff; border: 2px solid var(--brand);
  box-shadow: var(--sh-1);
}
input[type="range"]::-moz-range-track { height: 6px; border-radius: 999px; background: var(--bg-2); }
input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 2px solid var(--brand);
}
.range-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; }
.range-val {
  min-width: 52px; text-align: end; font-family: var(--mono); font-size: 0.8rem;
  color: var(--ink-2); font-variant-numeric: tabular-nums;
}
.check {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font-size: 0.86rem; color: var(--ink-2); user-select: none; min-height: 32px;
}
.check input { width: 17px; height: 17px; accent-color: var(--brand); cursor: pointer; flex: 0 0 auto; }
.seg {
  display: inline-flex; padding: 3px; gap: 2px; background: var(--bg-2); border-radius: 10px;
  border: 1px solid var(--line);
}
.seg button {
  padding: 6px 12px; border-radius: 8px; font-size: 0.83rem; font-weight: 600; color: var(--ink-2);
  transition: background var(--dur), color var(--dur), box-shadow var(--dur);
  min-height: 32px;
}
.seg button[aria-pressed="true"],  .seg button.is-active {
  background: var(--surface); color: var(--brand-deep); box-shadow: var(--sh-1);
}
.seg.seg-block { display: flex; width: 100%; }

/* 9 宫格位置选择器。
   这里原先只有 border/background 加一条 :hover，而按钮内容本来就是空的
   （<button data-v="tl" aria-pressed="false"></button>）——于是界面上是
   9 个一模一样的空白方块：看不出每格代表哪个角，也看不出当前选的是哪一格。
   而「位置」恰恰是单水印场景最核心的参数。所以补两件事：
   ① 每格内画一个圆点，圆点落点即水印出现的位置；
   ② 用 [aria-pressed="true"] 表达选中——UI.segSelect() 一直在设这个属性，
      只是 CSS 里从来没人接，选中态因此一直是隐形的。 */
.anchor-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px;
  width: 100%; aspect-ratio: 3 / 2;
}
.anchor-grid button {
  position: relative;
  border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2);
  transition: border-color var(--dur), background var(--dur), box-shadow var(--dur);
}
.anchor-grid button:hover { border-color: var(--brand); }
/* 位置圆点。用 calc 居中而不是 transform：这样改尺寸/颜色时不用连带改 transform */
.anchor-grid button::after {
  content: ""; position: absolute; width: 9px; height: 9px; border-radius: 50%;
  background: var(--ink-3);
  transition: background var(--dur), box-shadow var(--dur);
}
.anchor-grid button[data-v^="t"]::after { top: 7px; }
.anchor-grid button[data-v^="b"]::after { bottom: 7px; }
.anchor-grid button[data-v$="l"]::after { left: 7px; }
.anchor-grid button[data-v$="r"]::after { right: 7px; }
/* 上中 / 居中 / 下中：水平居中 */
.anchor-grid button[data-v$="c"]::after { left: calc(50% - 4.5px); }
/* 左中 / 居中 / 右中：垂直居中 */
.anchor-grid button[data-v^="m"]::after { top: calc(50% - 4.5px); }
.anchor-grid button[aria-pressed="true"] {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: 0 0 0 3px rgba(79, 91, 213, 0.18);
}
/* 选中格的圆点加深，并加一圈底色描边，避免落在 --brand-soft 上糊掉 */
.anchor-grid button[aria-pressed="true"]::after {
  background: var(--brand-deep);
  box-shadow: 0 0 0 2px var(--surface);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 40px 0 26px;
  margin-top: auto;
  color: var(--ink-2);
  font-size: 0.88rem;
}
/* 页脚分栏小标题 */
.ft-h { font-size: 0.92rem; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
/* 页脚栏目标题用 h2 保持文档大纲层级，视觉上仍是小号标题 */
.site-footer .ft-h {
  font-size: 1rem; font-weight: 700; letter-spacing: -0.01em;
  color: var(--ink); margin-bottom: 8px;
}
.site-footer a { color: var(--ink-2); display: inline-flex; align-items: center; min-height: 24px; padding: 3px 0; transition: color var(--dur) var(--ease); }
.site-footer a:hover { color: var(--brand-deep); }
/* R107：页脚「品牌 + 标语 + 链接列表」此前每页都用内联 style 重复书写，
   抽到样式表统一治理（与 R77 内容页骨架同思路）。 */
.site-footer .brand { margin-bottom: 8px; }
.footer-tagline { font-size: .86rem; max-width: 34ch; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-grid {
  display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 22px;
  padding-bottom: 26px; border-bottom: 1px solid var(--line);
  /* 原先每页都用内联 style="margin-top:26px" 顶开上方隐私条，统一到样式表 */
  margin-top: 26px;
}
.footer-bottom {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding-top: 18px; font-size: 0.82rem; color: var(--ink-3);
}
/* footer 列继承全局 .col 的 flex 规则，需要还原为普通块 */
.footer-grid .col { display: block; gap: 0; }
/* 隐私状态条（页面下方） */
.privacy-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px; border-radius: var(--r-md);
  background: var(--green-soft); border: 1px solid #cfeadd;
  font-size: 0.86rem; color: #1f6a49;
  box-shadow: 0 1px 3px rgba(27, 35, 48, 0.04);
}
.privacy-bar svg { width: 18px; height: 18px; flex: 0 0 auto; }
.privacy-bar .pb-timer {
  font-family: var(--mono); font-variant-numeric: tabular-nums;
  background: rgba(255, 255, 255, 0.85); border: 1px solid rgba(207, 234, 221, 0.9); border-radius: 8px; padding: 3px 9px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}
.privacy-bar.is-warning { background: var(--amber-soft); border-color: #f4e2c4; color: #96590d; }
/* 三态之三：剩余 ≤15 秒「即将自动清除」，比 warning 更紧急，用红色 */
.privacy-bar.is-armed { background: var(--red-soft); border-color: #f0cdc9; color: #b8362f; }
/* 状态条里的盾牌图标与状态文字（JS 动态构建） */
.pb-ico { display: inline-flex; align-items: center; flex: 0 0 auto; }
.pb-state { font-weight: 650; }

/* ---------- Breadcrumb ---------- */
.crumbs { display: flex; align-items: center; gap: 7px; font-size: 0.83rem; color: var(--ink-3); flex-wrap: wrap; }
/* 面包屑链接原本只有 23px 高，差 1px 达不到 WCAG 2.5.8 的 24px 最小目标 */
.crumbs a { display: inline-flex; align-items: center; min-height: 24px; }
.crumbs a:hover { color: var(--brand-deep); }
.crumbs [aria-current] { color: var(--ink-2); font-weight: 600; }
/* ---------- Misc ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--brand-solid); color: #fff; padding: 10px 16px; border-radius: 0 0 10px 10px;
  transition: top var(--dur); font-weight: 600;
}
.skip-link:focus { top: 0; }
/* 粘性页头会盖住锚点跳转的目标（含「跳到主要内容」#main）。
   给跳转目标留足页头高度 + 余量，避免标题被遮。:target 覆盖未来站内锚点。 */
#main, :target { scroll-margin-top: calc(var(--header-h) + 12px); }
.reveal.in { opacity: 1; transform: none; }
/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1.5fr repeat(3, 1fr); }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .nav {
    display: flex; gap: 2px; width: 100%; order: 3;
    overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none;
    padding-bottom: 2px; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter);
  }
  .nav::-webkit-scrollbar { display: none; }
  /* 修复：nav 里每个链接默认会 flex-shrink:1，导致中文在 390px 下按字符换行
     （"图片加水印" 竖排成 4 行），与下方 H1 重叠。强制单行 + 不收缩，
     多余链接由 .nav 的 overflow-x:auto 横向滚动。 */
  .nav a { white-space: nowrap; flex-shrink: 0; }
  .nav-toggle { display: none !important; }
  .site-header .container { flex-wrap: wrap; gap: 8px; }
  .header-actions { margin-inline-start: auto; }
  .header-actions .btn-lg { min-height: 36px; padding: 0 13px; font-size: 0.86rem; }
}
@media (max-width: 720px) {
  :root { --gutter: 16px; --header-h: 98px; }
  .nav a:nth-child(3),
  .nav a:nth-child(4) { display: none; }
  body { font-size: 14.5px; }
  .card { padding: 18px; border-radius: var(--r-md); }
  .step-card { grid-template-columns: 34px 1fr; gap: 10px; }
  table.data { min-width: 560px; }
  /* .grid 恢复成 display:grid 之后，多列网格才开始真正生效；
     窄屏必须塌成单列，否则 390px 下两列各只有 ~160px，卡片内容被裁切。 */
  .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { font-size: clamp(1.35rem, 1.15rem + 1.2vw, 1.65rem); }
  .lead { font-size: 0.95rem; }
}
@media (max-width: 420px) {
  .footer-grid { grid-template-columns: 1fr; }
  .brand-name { font-size: 0.94rem; }
  .btn-group > .btn { flex: 1 1 auto; }
}

/* 触控目标：触屏设备 或 窄视口（手机/折叠屏窄态）统一放大可点区域，提升移动端 UX；
   桌面鼠标设备（fine pointer 且 ≥721px）不受影响。 */
@media (pointer: coarse), (max-width: 720px) {
  .nav a { min-height: 44px; }
  .btn { min-height: 40px; }
  .btn-sm { min-height: 40px; }
  .lang-btn { min-height: 40px; }
  .anchor-grid button { min-height: 40px; }
  .check input { width: 20px; height: 20px; }
  .icon-btn { min-width: 40px; min-height: 40px; }
  .download-menu-item { min-height: 40px; padding: 10px 12px; }
  .site-footer a { min-height: 40px; padding: 8px 0; }
  .crumbs a { min-height: 40px; padding-block: 8px; padding-inline: 6px; }
  .more-link { min-height: 40px; padding-block: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Print：只保留打印内容 ---------- */
@media print {
  .site-header, .site-footer, .mobile-nav, .skip-link, .crumbs { display: none !important; }
  body { background: #fff; }
  .print-only { display: block !important; }
  a[href^="http"]::after { content: ""; }
  /* 工具页：Ctrl+P 时保留画布本身，隐藏操作界面，
     否则整页被 .tool-shell 吞掉会打出一张近乎空白的纸 */
  .tool-shell { display: block !important; }
  .stage-hint { display: none !important; }
  /* 操作界面不进纸：控制面板(.panel-col 含全部滑块/下拉/按钮)、
     画布上方工具栏、底部导出栏在屏幕上可达 600~910px 高，
     不隐藏的话 Ctrl+P 会打出 2~3 页，第二页全是控件。
     打印只留画布——证件照/水印图的真实诉求就是出图。 */
  .panel-col, .toolbar, .panel-foot, .tb-group, .dropzone { display: none !important; }
  /* 瞬时/辅助 UI 同样不进纸：toast 是操作反馈（实测可达 365px 高，
     会把图片顶到第二页）、thumb-rail 是缩略图轨、privacy-strip 是屏幕提示条、
     overlay/stage-badge 是画布上的定位辅助层——出图时都不需要。 */
  .toast-host, .toast, .thumb-rail, .privacy-strip, .overlay,
  .stage-badge { display: none !important; }
  .stage-wrap {
    height: auto !important; min-height: 0 !important; overflow: visible !important;
    background: #fff !important; border: 0 !important; border-radius: 0 !important;
  }
  .stage-inner { position: static !important; transform: none !important; }
  /* 打印时忽略屏幕缩放：画布按自身像素尺寸等比缩到纸宽。
     否则在手机上（画布被自适应缩到 234px）Ctrl+P 会打出一张极小的图。
     canvas 是替换元素，width/height:auto + max-width:100% 会自动保持宽高比。 */
  canvas#mainCanvas { max-width: 100% !important; width: auto !important; height: auto !important; }
}
.print-only { display: none; }
/* ==========================================================================
   视觉增强层
   滚动进度 · 返回顶部 · 头部滚动态 · 卡片微交互 · 滚动条 · 首页英雄区
   ========================================================================== */

/* ---------- 返回顶部 ---------- */
.to-top {
  /* 加安全区偏移：全面屏机型的 home 指示条会盖住贴底的按钮 */
  position: fixed; z-index: 210;
  right: calc(22px + env(safe-area-inset-right, 0px));
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  width: 44px; height: 44px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line-2);
  color: var(--ink-2); box-shadow: var(--sh-2);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease),
    visibility var(--dur), color var(--dur) var(--ease),
    border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.to-top svg { width: 18px; height: 18px; }
.to-top:hover { color: var(--brand-deep); border-color: var(--brand); box-shadow: var(--sh-3); transform: translateY(-2px); }
/* ---------- 头部滚动态：离开顶部后加投影 ---------- */
.site-header { transition: box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease); }
/* 状态类规则缺失会让上面那条 transition 白写：滚动时投影永远不出现 */
.site-header.is-scrolled { box-shadow: var(--sh-2); border-bottom-color: var(--line-2); }
/* 返回顶部按钮默认 opacity:0 / visibility:hidden，靠 .show 显形。
   缺了这条规则，按钮滚到页面任何位置都不会出现。 */
.to-top.show { opacity: 1; visibility: visible; transform: none; }

/* ---------- 首页英雄区 ---------- */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 34px; align-items: center;
}
.hero { position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -30% -8% auto -8%; height: 460px;
  background:
    radial-gradient(58% 62% at 26% 42%, rgba(79, 91, 213, 0.10), transparent 70%),
    radial-gradient(48% 52% at 80% 28%, rgba(232, 93, 140, 0.09), transparent 70%),
    radial-gradient(44% 48% at 62% 80%, rgba(14, 159, 154, 0.07), transparent 70%);
  pointer-events: none;
}
.hero > .container { position: relative; z-index: 1; }
.hero h1 {
  font-size: clamp(1.55rem, 1.2rem + 1.8vw, 2.45rem);
  margin: 14px 0 10px;
  line-height: 1.22;
}
/* 英雄区顶部渐变原本写死在 index.html 的 style 属性里（#fff → --bg）。
   内联样式无法被深色模式覆盖，所以提取成类。 */
.hero-fade {
  background: linear-gradient(180deg, #fff, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}
/* ---------- 首页 hero 效果演示图（图片 + 水印实拍图） ---------- */
.hero-demo {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  line-height: 0;
}
.hero-demo img { display: block; width: 100%; height: auto; }
.hero-demo-foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.hpill {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.75rem; font-weight: 600;
  padding: 5px 11px; border-radius: 999px;
  background: #ffffff; border: 1px solid var(--line); color: var(--ink-2);
}
.hpill i { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.hpill .hp-brand { background: linear-gradient(135deg, #14b8a6, #3b82f6); }
.hpill .hp-red { background: #ef4444; }
.hpill .hp-gray { background: #64748b; }

/* ---------- 卡片微交互 ---------- */
.card-ico { transition: transform 0.22s var(--ease); }
.tool-card .tc-foot { transition: color var(--dur) var(--ease); }
.tool-card .tc-foot svg { transition: transform 0.22s var(--ease); width: 16px; height: 16px; flex: 0 0 auto; }
/* 卡片悬停微交互：图标轻抬放大、CTA 箭头右移。
   激活上方已声明的 .card-ico / .tc-foot svg 的 transition（此前为空转）。
   .tc-foot 默认已是品牌色，故不再叠加变色规则（避免 no-op）。 */
.card:hover .card-ico { transform: translateY(-2px) scale(1.05); }
.card:hover .tc-foot svg, .tool-card:hover .tc-foot svg { transform: translateX(3px); }

/* ---------- 主按钮：渐变流动 ---------- */
.btn-primary { background-size: 180% 180%; background-position: 0% 50%; }
.btn {
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
    background var(--dur) var(--ease), background-position 0.35s var(--ease),
    border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

/* 链接下划线动效已按需求整体移除（2026-09-30）：全站链接一律不加下划线，
   可辨识度交给链接色（--link）与各自的 hover 背景/提亮。 */

/* 独立成段的「了解更多 →」类行动链接：行内盒只有 20px 高，触摸目标偏小 */
.more-link {
  display: inline-flex; align-items: center; gap: 2px;
  min-height: 24px; padding-inline: 2px; margin-inline-start: -2px;
  font-weight: 600; text-decoration: none;
  transition: color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.more-link:hover { color: var(--brand-deep); transform: translateX(2px); }
/* ---------- 自定义滚动条 ---------- */
* { scrollbar-width: thin; scrollbar-color: #cfd8e6 transparent; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cfd8e6; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #b6c2d8; }
/* ---------- 响应式补充 ---------- */
@media (max-width: 900px) {
  /* 首页英雄区：单列堆叠（原内联样式无法被媒体查询覆盖） */
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  /* 横向滚动导航：右侧渐隐，提示还有更多 */
  .nav {
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent 100%);
    mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent 100%);
  }
}
@media (max-width: 720px) {
  .to-top {
    right: calc(14px + env(safe-area-inset-right, 0px));
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    width: 42px; height: 42px;
  }
  .toast-host { bottom: 70px; } /* 为返回顶部按钮让位 */
}
@media (prefers-reduced-motion: reduce) {
  .to-top { transition: opacity var(--dur), visibility var(--dur); }
}
@media print {
  .to-top { display: none !important; }
}
