/* =========================================================
   Agonionce Gallery —— 全站样式「色卡手册」
   整站是一本色卡：左边是装订好的色卡条，每页标题是一张色片，
   每组参数像色片下面的配方一样印出来。
   想改颜色：只改下面 :root 里的变量。
   ========================================================= */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage-grotesque-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrains-mono-latin.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}

/* 中文标题字体：思源黑体 Noto Sans SC 的子集（只含标题用到的字），由 _scripts/subset_cjk_font.py 生成 */
@font-face { font-family: "AG CJK"; src: url("fonts/noto-sans-sc-700-subset.woff2") format("woff2"); font-weight: 600 700; font-display: swap; }
@font-face { font-family: "AG CJK"; src: url("fonts/noto-sans-sc-900-subset.woff2") format("woff2"); font-weight: 800 900; font-display: swap; }

:root {
  /* 你给的五个颜色 */
  --fog: #6E87B0;        /* 雾蓝 */
  --mist: #B2C1D6;       /* 浅雾蓝 */
  --shell: #EDE5E3;      /* 贝壳米：页面底色 */
  --blush: #DBBACB;      /* 浅粉 */
  --mauve: #B7799E;      /* 豆沙紫 */
  /* 由它们调出来的 */
  --ink: #2B2F3A;        /* 墨色：文字、色卡条 */
  --paper: #F6F2F1;      /* 色片的白色标签条 */
  --paper-2: #E6DDDB;    /* 表头、分隔 */
  --line: #D6CBC8;       /* 发丝线 */
  --text-2: #4A4E5A;     /* 次要文字 */
  --text-3: #5C5F6B;     /* 说明文字（仍满足 4.5:1） */
  --link: #4A6191;       /* 链接：加深的雾蓝 */
  --mauve-ink: #8E4F74;  /* 加深的豆沙紫，用于小字 */
  --mist-tint: #E1E7EF;
  --blush-tint: #F1E3EA;
  --chip: var(--fog);    /* 当前页面的色片颜色（由 app.js 设置） */
  --chip-ink: var(--ink);

  --spine-w: 252px;
  --radius: 5px;
  --display: "Bricolage Grotesque", "AG CJK", -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--shell);
  color: var(--ink);
  font: 16px/1.8 var(--sans);
  -webkit-font-smoothing: antialiased;
  caret-color: var(--mauve);
  font-variant-numeric: tabular-nums;
}
::selection { background: var(--blush); color: var(--ink); }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 3px; }
html { scrollbar-color: #B9AEB0 var(--shell); scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--shell); }
::-webkit-scrollbar-thumb { background: #C4B9BA; border-radius: 10px; border: 2px solid var(--shell); }
img { max-width: 100%; display: block; }
a { color: var(--link); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--link) 40%, transparent); text-decoration-thickness: 1px; text-underline-offset: 4px; transition: text-decoration-color .2s; }
a:hover { text-decoration-color: currentColor; }
.ext::after, .more::after {
  content: ""; display: inline-block; width: .72em; height: .72em; margin-left: .3em; vertical-align: .02em;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 2.5h6v6M9.5 2.5 2.5 9.5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 2.5h6v6M9.5 2.5 2.5 9.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.more::after { transform: rotate(45deg); }
code, kbd {
  font-family: var(--mono); font-size: .84em;
  background: var(--paper); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px;
}
kbd { box-shadow: 0 1px 0 var(--line); font-weight: 600; }
.path { font-size: .9em; background: var(--paper); border-radius: 4px; padding: 2px 8px; border: 1px solid var(--line); white-space: normal; }
.muted { color: var(--text-3); }
.small { font-size: 14px; }
p { margin: 0 0 14px; }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: 4px; }
li::marker { color: var(--text-3); }

h1, h2, h3, h4 { line-height: 1.3; color: var(--ink); text-wrap: balance; }
h1 { font: 800 50px/1.08 var(--display); letter-spacing: -.02em; margin: 0; }
h2 {
  font: 700 26px/1.3 var(--display); letter-spacing: -.01em;
  margin: 64px 0 16px; padding-top: 18px; border-top: 2px solid var(--ink);
  position: relative;
}
/* 每个大标题上方都有一小块当前页的色片 */
h2::before { content: ""; position: absolute; left: 0; top: -2px; width: 44px; height: 6px; background: var(--chip); }
h3 { font: 700 19px/1.4 var(--sans); margin: 34px 0 10px; }
h4 { font: 700 13px/1.4 var(--sans); letter-spacing: .04em; color: var(--text-2); margin: 18px 0 8px; }

/* ---------- 左侧色卡条 ---------- */
.spine {
  position: fixed; inset: 0 auto 0 0; width: var(--spine-w); z-index: 40;
  background: var(--ink); color: var(--shell);
  display: flex; flex-direction: column; padding: 30px 0 22px;
  overflow-y: auto; scrollbar-width: none;
}
.spine::-webkit-scrollbar { display: none; }
.brand {
  font: 800 26px/1 var(--display); letter-spacing: -.02em;
  color: var(--paper); text-decoration: none; padding: 0 26px 30px;
}
.brand:hover { color: #fff; }
.fan { display: flex; flex-direction: column; gap: 2px; }
/* 每一行就是一张涂满自己颜色的色片 */
.fan a {
  --sw: var(--fog); --sw-ink: var(--ink);
  display: flex; flex-direction: column; justify-content: center; gap: 1px;
  margin-left: 26px; padding: 8px 14px 8px 14px; min-height: 52px;
  background: var(--sw); color: var(--sw-ink); text-decoration: none;
  border-radius: 3px 0 0 3px; position: relative;
  transition: margin .35s var(--ease), padding .35s var(--ease);
}
.fan .sw { display: none; }
.fan .nm { font: 700 14.5px/1.3 var(--sans); }
.fan .cd { font: 500 10.5px/1.3 var(--mono); letter-spacing: .06em; }
.fan a:hover { margin-left: 18px; }
/* 当前栏目：这张色片从色卡条里抽出来，伸过书脊的边 */
.fan a.on { margin-left: 0; margin-right: -16px; padding-left: 26px; border-radius: 0 3px 3px 0; min-height: 60px; animation: chip-out .6s var(--ease) both; }
.fan a.on::before { content: ""; position: absolute; left: 10px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--sw-ink); }
@keyframes chip-out { from { transform: translateX(-16px); } to { transform: none; } }
.spine-foot { margin: auto 0 0; padding: 26px 26px 0; font: 500 11px/1.5 var(--mono); letter-spacing: .06em; color: #8E93A3; }

/* ---------- 页面框架 ---------- */
body.has-spine { padding-left: var(--spine-w); }
body { overflow-x: clip; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 56px; }

/* 每页标题 = 一张色片：上面颜色，下面标签条 */
.page-head { margin: 44px 0 40px; border-radius: var(--radius); overflow: hidden; background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
.ph-field {
  position: relative; min-height: 190px; padding: 30px 36px 26px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 32px;
  color: var(--chip-ink); isolation: isolate;
}
.ph-field::before { content: ""; position: absolute; inset: 0; background: var(--chip); z-index: -1; animation: chip-wipe .9s var(--ease) both; }
@keyframes chip-wipe { from { clip-path: inset(0 22% 0 0); } to { clip-path: inset(0 0 0 0); } }
.ph-field h1 { color: var(--chip-ink); max-width: 18em; }
.ph-code { text-align: right; font: 500 12px/1.4 var(--mono); letter-spacing: .1em; white-space: nowrap; color: var(--chip-ink); }
.ph-code b { display: block; font: 800 40px/1 var(--display); letter-spacing: -.02em; margin-bottom: 6px; }
.ph-label { padding: 20px 36px 22px; }
.ph-label .lede { margin: 0; }
.lede { font-size: 17px; line-height: 1.8; color: var(--text-2); max-width: 46em; }
.h1-count { font: 600 .42em var(--mono); letter-spacing: 0; opacity: .8; margin-left: .4em; vertical-align: .3em; }

.layout { display: grid; grid-template-columns: minmax(0, 760px) 196px; gap: 64px; justify-content: space-between; }
.content { min-width: 0; padding-bottom: 72px; }
.content > h2:first-child { margin-top: 0; }
.content > p, .content > ul, .content > ol { max-width: 44em; }
.toc { order: 2; position: sticky; top: 28px; align-self: start; font-size: 13.5px; max-height: calc(100vh - 56px); overflow: auto; padding-top: 4px; }
.toc b { display: block; font: 600 11px var(--mono); letter-spacing: .14em; color: var(--text-3); margin-bottom: 10px; }
.toc a { display: block; color: var(--text-2); text-decoration: none; padding: 5px 0 5px 14px; border-left: 2px solid var(--line); transition: border-color .2s, color .2s; }
.toc a:hover { color: var(--ink); border-left-color: var(--chip); }

/* ---------- 首页 ---------- */
.home-chip { margin: 44px 0 0; border-radius: 6px 6px 0 0; overflow: hidden; background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
.home-field { position: relative; isolation: isolate; display: grid; grid-template-columns: 1fr minmax(0, 470px); gap: 40px; align-items: end; padding: 44px 44px 0; }
.home-field::before { content: ""; position: absolute; inset: 0 0 56px 0; background: var(--chip); z-index: -1; animation: chip-wipe 1s var(--ease) both; }
.home-title { padding-bottom: 92px; }
.home-title h1 { font-size: 92px; line-height: .92; letter-spacing: -.035em; color: var(--paper); }
.home-sub { margin: 18px 0 0; color: var(--paper); font-size: 21px; font-weight: 600; letter-spacing: .04em; }
.home-code { position: absolute; right: 44px; top: 30px; text-align: right; color: #15171D; font: 500 12px/1.4 var(--mono); letter-spacing: .1em; }
.home-code b { display: block; font: 800 32px/1 var(--display); letter-spacing: -.02em; margin-bottom: 4px; }
.home-field { padding-top: 96px; }
.home-plate { margin: 0; }
/* 首页刊头下方：你的五色配方 */
.home-band { display: grid; grid-template-columns: repeat(5, 1fr); border-radius: 0 0 6px 6px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.home-band span { --sw-ink: var(--ink); background: var(--sw); color: var(--sw-ink); min-height: 84px; padding: 10px 14px; display: flex; flex-direction: column; justify-content: flex-end; font: 500 11.5px/1.4 var(--mono); letter-spacing: .08em; }
.home-band b { font: 700 13px/1.3 var(--sans); letter-spacing: 0; }
.home-plate img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 8px solid var(--paper); border-radius: 3px; box-shadow: 0 0 0 1px var(--line); cursor: zoom-in; }
.home-plate figcaption { margin-top: 10px; }
.home-label { display: grid; grid-template-columns: 1fr minmax(0, 470px); gap: 40px; padding: 26px 44px 34px; }
.home-label .lede { margin: 0; }

.chip-index { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.ichip { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 0 var(--line); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.ichip:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px var(--ink); }
.ichip-field { height: 112px; background: var(--sw); color: var(--sw-ink); padding: 14px 16px; display: flex; flex-direction: column; justify-content: space-between; }
.ichip-field b { font: 800 22px/1 var(--display); letter-spacing: -.01em; }
.ichip-field i { font: 500 11px var(--mono); font-style: normal; letter-spacing: .12em; }
.ichip-label { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; }
.ichip-label strong { font-size: 16px; }
.ichip-label span { font-size: 13.5px; line-height: 1.6; color: var(--text-3); }

/* ---------- 参数条（全站统一） ---------- */
.formula { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 14px 0; border-top: 2px solid var(--ink); }
.formula > div { padding: 8px 12px 6px 0; border-right: 1px solid var(--line); margin-right: 12px; min-width: 0; }
.formula > div:last-child { border-right: 0; margin-right: 0; }
.formula dt { font: 500 11.5px/1.3 var(--sans); color: var(--text-3); letter-spacing: .04em; }
.formula dd { margin: 3px 0 0; font: 600 17px/1.3 var(--mono); color: var(--ink); overflow-wrap: anywhere; }
.formula small { display: block; font-size: 12px; color: var(--text-3); margin-top: 2px; }
.formula + .formula { margin-top: -6px; border-top-width: 1px; }
.kit { margin: 0; }
.kit dd { font: 800 26px/1.1 var(--display); letter-spacing: -.01em; }
.spec { font-size: 13.5px; color: var(--text-3); margin: -4px 0 12px; }

/* ---------- 网格与色片卡 ---------- */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--paper); border-radius: var(--radius); padding: 20px 22px; box-shadow: 0 1px 0 var(--line); }
.card h3 { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card-title { font: 700 16px/1.4 var(--sans); margin-bottom: 8px; padding-top: 12px; position: relative; }
.card-title::before { content: ""; position: absolute; left: 0; top: 0; width: 28px; height: 4px; background: var(--chip); }
.card ul.small { padding-left: 1.2em; }
.presets { margin: 18px 0 28px; }
.presets .table-wrap { margin-bottom: 0; }

/* ---------- 提示框：靠记号区分，不靠杂色 ---------- */
.callout { border-radius: var(--radius); padding: 14px 18px 14px 50px; margin: 18px 0; position: relative; font-size: 15.5px; background: var(--paper); }
.callout::before {
  content: ""; position: absolute; left: 16px; top: 15px; width: 20px; height: 20px; background: var(--ink);
  -webkit-mask: var(--mark) center / contain no-repeat; mask: var(--mark) center / contain no-repeat;
}
.callout > :last-child { margin-bottom: 0; }
.callout b:first-child { margin-right: 2px; }
.tip { background: var(--mist-tint); --mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.6'%3E%3Ccircle cx='10' cy='10' r='8.2'/%3E%3Cpath d='m6.2 10.3 2.5 2.5 5-5.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.tip::before { background: var(--link); }
.note { background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); --mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.6'%3E%3Crect x='2' y='2' width='16' height='16' rx='2.5'/%3E%3Cpath d='M10 9v5.2' stroke-linecap='round'/%3E%3Ccircle cx='10' cy='6.1' r='.6' fill='black'/%3E%3C/svg%3E"); }
.note::before { background: var(--text-2); }
.warn { background: var(--blush-tint); --mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.6' stroke-linejoin='round'%3E%3Cpath d='M10 2.4 18.2 17H1.8z'/%3E%3Cpath d='M10 8v4.2' stroke-linecap='round'/%3E%3Ccircle cx='10' cy='14.4' r='.6' fill='black'/%3E%3C/svg%3E"); }
.warn::before { background: var(--mauve-ink); }
.danger { background: #EBD6E1; --mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.7'%3E%3Ccircle cx='10' cy='10' r='8.2'/%3E%3Cpath d='m4.3 15.7 11.4-11.4'/%3E%3C/svg%3E"); }
.danger::before { background: var(--mauve-ink); }

/* ---------- 步骤 ---------- */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 18px 0; }
.steps > li { counter-increment: step; position: relative; padding: 2px 0 20px 50px; margin: 0; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; border-radius: 3px; background: var(--ink); color: var(--paper);
  display: grid; place-items: center; font: 600 13px/1 var(--mono);
}
.steps > li::after { content: ""; position: absolute; left: 14px; top: 36px; bottom: 6px; width: 2px; background: var(--line); }
.steps > li:last-child::after { display: none; }
.steps .who { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 3px; margin-right: 6px; vertical-align: 1px; letter-spacing: .04em; }
.who.cam { background: var(--ink); color: var(--paper); }
.who.phone { background: var(--mauve-ink); color: var(--paper); }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; margin: 16px 0 24px; background: var(--paper); border-radius: var(--radius); box-shadow: 0 1px 0 var(--line); }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); }
th { background: var(--paper-2); font-weight: 600; font-size: 13px; color: var(--text-2); white-space: nowrap; letter-spacing: .02em; }
tr:last-child td { border-bottom: none; }
tbody tr:hover td, table tr:hover td { background: rgba(237, 229, 227, .5); }
td.val { font: 600 14px/1.5 var(--mono); color: var(--link); white-space: nowrap; }

/* ---------- 标签 ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; font-size: 12.5px; line-height: 1.6; padding: 2px 9px; border-radius: 3px; white-space: nowrap; background: var(--paper-2); color: var(--text-2); }
.chip.subj { background: var(--ink); color: var(--paper); }
.chip.comp { background: var(--blush-tint); color: var(--mauve-ink); }
.chip.light { background: var(--mist-tint); color: var(--link); }

/* 印章：可 / 近 / 超 */
.stamp {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; font: 800 17px/1 var(--sans);
  border: 2px solid currentColor; transform: rotate(-10deg);
  box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 3px currentColor;
}
.stamp.ok { color: var(--link); }
.stamp.near { color: var(--mauve-ink); }
.stamp.no { color: var(--text-3); border-style: dashed; box-shadow: none; }

/* ---------- 图片 ---------- */
figure { margin: 18px 0; }
figure img { border-radius: 3px; background: var(--paper); cursor: zoom-in; box-shadow: 0 1px 0 var(--line); }
figcaption { font-size: 13.5px; color: var(--text-3); margin-top: 8px; }
.pl { font: 600 11.5px var(--mono); letter-spacing: .06em; color: var(--ink); background: var(--paper-2); padding: 1px 6px; border-radius: 3px; margin-right: 8px; }
.phone-shots { display: flex; gap: 20px; flex-wrap: wrap; }
.phone-shots figure { width: 230px; margin: 0; }
.phone-shots img { border-radius: 26px; border: 7px solid var(--ink); }

details.shot { margin: 10px 0 4px; }
details.shot > summary {
  cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; color: var(--link); padding: 4px 11px 4px 9px; border-radius: 4px;
  background: var(--mist-tint); user-select: none; transition: background .2s;
}
details.shot > summary:hover { background: #D6DEEA; }
details.shot > summary::-webkit-details-marker { display: none; }
details.shot > summary::before { content: ""; width: 6px; height: 6px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(-45deg); transition: transform .25s var(--ease); }
details.shot[open] > summary::before { transform: rotate(45deg) translate(-1px, -1px); }
details.shot .shot-body { margin-top: 10px; max-height: 620px; overflow: auto; background: #fff; border-radius: var(--radius); padding: 8px; box-shadow: 0 1px 0 var(--line); }
details.shot .shot-body img { max-width: 560px; width: 100%; margin: 0 auto; box-shadow: none; }
details.shot .src { font-size: 12px; color: var(--text-3); padding: 8px 8px 2px; }

/* ---------- 器材卡 ---------- */
.gear-item { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 18px; align-items: start; }
.gicon { width: 64px; height: 80px; border-radius: 3px; background: var(--paper-2); overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; position: relative; }
.gicon::before { content: ""; position: absolute; inset: 0 0 22px 0; background: var(--sw); }
.gicon b { position: relative; font: 600 11px/22px var(--mono); text-align: center; color: var(--ink); letter-spacing: .06em; }
.gear-item h3 { margin: 0 0 2px; font-size: 18px; }
.gear-item .what { color: var(--text-3); font-size: 14px; margin-bottom: 8px; }
.gear-item ul { margin: 6px 0 0; padding-left: 1.2em; }

/* ---------- 学习路线：完成一项打一个孔 ---------- */
.route-head { display: grid; grid-template-columns: 1fr auto; gap: 8px 20px; align-items: center; margin-bottom: 16px; }
.route-head p { margin: 0; }
.progress { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.progress i { height: 10px; border-radius: 2px; background: var(--paper-2); transition: background .4s var(--ease); }
.progress i.on { background: var(--fog); }
.route-count { font: 600 13px var(--mono); color: var(--text-2); grid-row: 1; grid-column: 2; }
.route { list-style: none; padding: 0; margin: 0; border-bottom: 1px solid var(--ink); }
.route li { display: grid; grid-template-columns: 30px 1fr auto; gap: 16px; align-items: start; padding: 14px 4px; margin: 0; border-top: 1px solid var(--line); transition: background .3s; }
.route li:first-child { border-top: 1px solid var(--ink); }
.route input {
  appearance: none; -webkit-appearance: none; margin: 2px 0 0; cursor: pointer;
  width: 24px; height: 24px; border-radius: 50%; border: 1.6px dashed var(--text-3); background: transparent;
  transition: all .3s var(--ease);
}
.route input:hover { border-color: var(--ink); }
.route input:checked { border: 0; background: radial-gradient(circle, var(--shell) 0 33%, var(--ink) 35%); box-shadow: inset 0 2px 3px rgba(0, 0, 0, .35); }
.route li.done { background: rgba(246, 242, 241, .7); }
.route li.done .rt { color: var(--text-2); }
.route li.done .rt::after { content: "已完成"; margin-left: 10px; font: 600 11px var(--sans); color: var(--link); border: 1.4px solid currentColor; border-radius: 3px; padding: 0 5px; vertical-align: 2px; letter-spacing: .1em; }
.route .rt { font-weight: 600; }
.route .rd { font-size: 14px; color: var(--text-3); }
.route .go { font-size: 14px; white-space: nowrap; }

/* ---------- 样片库 / 博主参数：筛选 ---------- */
.filters { padding: 18px 0 14px; border-bottom: 2px solid var(--ink); margin-bottom: 24px; }
.filter-row { display: flex; gap: 12px; align-items: baseline; margin-bottom: 8px; }
.filter-row > label { font-size: 12.5px; font-weight: 600; color: var(--text-3); width: 40px; flex: none; }
.filter-row .chips { gap: 5px; }
.fchip { font: inherit; font-size: 13px; padding: 3px 10px; border-radius: 3px; cursor: pointer; background: var(--paper); border: 1px solid var(--line); color: var(--text-2); transition: border-color .2s, background .2s; }
.fchip:hover { border-color: var(--ink); }
.fchip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.fchip .n { font: 500 11px var(--mono); opacity: .7; margin-left: 4px; }
.filter-tools { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.search { font: inherit; font-size: 14px; padding: 7px 12px; border-radius: 4px; border: 1px solid var(--line); background: var(--paper); min-width: 260px; color: var(--ink); }
.search::placeholder { color: var(--text-3); }
.search:focus { outline: 2px solid var(--link); outline-offset: 1px; }
.count { font: 500 13px var(--mono); color: var(--text-3); }
.linkbtn { font: inherit; font-size: 14px; background: none; border: none; color: var(--link); cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: color-mix(in srgb, var(--link) 40%, transparent); }
.filters-toggle { display: none; }

/* ---------- 样片卡 ---------- */
.sample { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 32px; background: var(--paper); border-radius: 6px; padding: 18px; margin-bottom: 20px; box-shadow: 0 1px 0 var(--line); }
.sample .ph { position: relative; align-self: start; }
.sample .ph > img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 3px; cursor: zoom-in; background: var(--paper-2); }
.pl-tag { position: absolute; left: 10px; top: 10px; font: 600 11.5px/1 var(--mono); letter-spacing: .04em; background: var(--paper); color: var(--ink); padding: 5px 7px; border-radius: 3px; }
.sbody { min-width: 0; padding: 4px 8px 4px 0; }
.sample h3 { margin: 10px 0 2px; font-size: 21px; }
.sample .spec { margin: 0 0 12px; }
.learn { font-size: 15px; margin: 6px 0 12px; }
.learn b { display: block; font-size: 12.5px; color: var(--mauve-ink); letter-spacing: .06em; margin-bottom: 2px; }
.repro { display: flex; gap: 14px; align-items: center; font-size: 14px; color: var(--text-2); background: var(--shell); border-radius: 4px; padding: 10px 14px; }
.repro b { display: block; color: var(--ink); font-size: 13px; }
.credit { font-size: 12.5px; color: var(--text-3); margin: 12px 0 0; }
.credit a { color: var(--text-3); }
.empty { text-align: center; padding: 60px 20px; color: var(--text-3); }

.dy .ph > img { aspect-ratio: auto; max-height: 440px; object-fit: contain; background: var(--ink); }
.dy-thumbs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 6px; }
.dy-thumbs > span { position: relative; display: block; }
.dy-thumbs img { aspect-ratio: 16 / 9; object-fit: cover; border-radius: 3px; cursor: zoom-in; width: 100%; }
.dy-thumbs .pl-tag { left: 6px; top: 6px; font-size: 10px; padding: 3px 5px; }
.recipe { margin: 0 0 6px; display: grid; grid-template-columns: 1fr; }
.recipe > div { border-top: 1px solid var(--line); padding: 6px 0 7px; display: grid; grid-template-columns: 9em 1fr; gap: 12px; font-size: 14px; }
.recipe dt { color: var(--text-3); }
.recipe dd { margin: 0; font-weight: 600; }
.dy-how { margin: 0 0 14px; padding-left: 1.3em; font-size: 14.5px; }

/* ---------- 拍摄记录 ---------- */
.journal-entry { grid-template-columns: minmax(0, 440px) minmax(0, 1fr); }
.journal-meta { font: 500 12.5px var(--mono); color: var(--text-3); margin-bottom: 6px; }
.journal-entry .refl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.journal-entry .refl div { background: var(--shell); border-radius: 4px; padding: 10px 12px; font-size: 14.5px; }
.journal-entry .refl b { display: block; font-size: 12.5px; color: var(--text-3); margin-bottom: 2px; }
.blank-chip { display: grid; grid-template-columns: 150px 1fr; gap: 24px; align-items: center; background: var(--paper); border-radius: 6px; padding: 18px; box-shadow: 0 1px 0 var(--line); margin-bottom: 8px; }
.blank-chip strong { display: block; font-size: 18px; margin-bottom: 4px; }
.blank-chip p { margin: 0; color: var(--text-3); }
.blank-field { display: block; height: 110px; border-radius: 3px; border: 1.6px dashed #B9AEB0; background: var(--shell); }
a.blank-chip.small { display: block; text-align: center; padding: 40px 18px; }
pre.code { background: var(--ink); color: #E9E3E1; border-radius: var(--radius); padding: 18px 20px; overflow-x: auto; font: 13.5px/1.7 var(--mono); }

/* ---------- 灯箱 ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(28, 30, 38, .94); display: none; align-items: center; justify-content: center; padding: 36px; cursor: zoom-out; }
.lightbox.open { display: flex; animation: lb-in .35s var(--ease); }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 3px; }
.lightbox .cap { position: fixed; bottom: 14px; left: 0; right: 0; text-align: center; color: var(--mist); font-size: 13px; padding: 0 20px; }

/* ---------- 页脚 ---------- */
.footer { padding: 40px 0 48px; color: var(--text-3); font-size: 13px; }
.footer p { margin: 6px 0 0; max-width: 60em; }
.footer a { color: var(--text-2); }
.note-line { margin-top: 14px; }

/* ---------- 动效：只在用户允许时 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 1280px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
  .chip-index { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
  .home-title h1 { font-size: 72px; }
  h1 { font-size: 42px; }
  .home-field, .home-label { grid-template-columns: 1fr; }
  .home-title { padding-bottom: 8px; }
  .home-field::before { bottom: 120px; }
  .sample, .journal-entry { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 900px) {
  body.has-spine { padding-left: 0; }
  .spine { position: sticky; top: 0; inset: auto; width: auto; height: auto; flex-direction: row; align-items: center; padding: 10px 0 10px 18px; gap: 16px; overflow: visible; }
  .brand { padding: 0; font-size: 17px; flex: none; }
  .brand br { display: none; }
  .fan { flex-direction: row; overflow-x: auto; gap: 4px; padding-right: 18px; scrollbar-width: none; min-width: 0; flex: 1; }
  .fan::-webkit-scrollbar { display: none; }
  .fan a { margin: 0; padding: 6px 12px; min-height: 0; border-radius: 3px; flex: none; }
  .fan a:hover { margin: 0; }
  .fan .nm { font-size: 13px; white-space: nowrap; }
  .fan .cd, .spine-foot { display: none; }
  .fan a.on { margin: 0; padding: 6px 12px 6px 22px; min-height: 0; border-radius: 3px; animation: none; }
  .fan a.on::before { left: 9px; }
  .home-code { right: 20px; top: 20px; }
  .home-code b { font-size: 22px; }
  .home-field { padding-top: 70px; }
  .home-band { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .home-band span { min-height: 64px; padding: 8px; font-size: 9.5px; letter-spacing: .02em; }
  .home-band b { font-size: 11px; }
  .wrap { padding: 0 20px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-4, .chip-index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  body { font-size: 15.5px; }
  .page-head, .home-chip { margin-top: 20px; }
  .ph-field { min-height: 150px; padding: 22px 20px 18px; flex-direction: column; align-items: flex-start; gap: 12px; }
  .ph-code { text-align: left; }
  .ph-code b { font-size: 22px; display: inline; margin-right: 8px; }
  .ph-label { padding: 16px 20px 18px; }
  .home-field { padding: 72px 20px 0; gap: 22px; }
  .home-title h1 { font-size: 52px; }
  h1 { font-size: 32px; }
  .home-label { padding: 20px; gap: 18px; }
  .formula { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .formula > div:nth-child(2) { border-right: 0; margin-right: 0; }
  .formula > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .sample, .journal-entry { grid-template-columns: 1fr; gap: 14px; padding: 14px; }
  .recipe { grid-template-columns: 1fr; }
  .table-wrap table { min-width: 600px; }
  .recipe > div { grid-template-columns: 7em 1fr; }
  .journal-entry .refl, .blank-chip { grid-template-columns: 1fr; }
  .filters-toggle { display: inline-block; }
  .filters .filter-row { display: none; }
  .filters.expanded .filter-row { display: flex; }
  .filter-row { flex-direction: column; gap: 4px; }
  .search { min-width: 0; width: 100%; }
  .gear-item { grid-template-columns: 48px minmax(0, 1fr); gap: 14px; }
  .gicon { width: 48px; height: 62px; }
  .phone-shots figure { width: calc(50% - 10px); }
  .route li { grid-template-columns: 26px 1fr; }
  .route .go { grid-column: 2; }
  h2 { font-size: 22px; margin-top: 48px; }
}
