/* 山河县记 · 县域页
 * 设计变量全部由构建脚本按县注入：--bg --paper --ink --ink2 --accent --accent2 --line
 * 版式 1 卷 / 2 志 / 3 册 / 4 碑 由 html[data-layout] 切换。
 */

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

:root {
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --maxw: 1180px;
  --pad: clamp(20px, 5vw, 64px);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --header-h: 68px;
  --r: 2px;
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(var(--line) .5px, transparent .7px);
  background-size: 3px 3px;
  opacity: .42;
}
header, main, footer, .drawer, .lightbox { position: relative; z-index: 1; }

img, svg { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; margin: 0; line-height: 1.25; letter-spacing: .01em; }
p { margin: 0 0 1.15em; }
::selection { background: var(--accent); color: var(--paper); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 1px; }

.skip {
  position: fixed; left: 12px; top: -60px; z-index: 200;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 2px;
  transition: top .2s;
}
.skip:focus { top: 12px; }

/* ── 进度条 ───────────────────────────────────────────── */
.progress { position: fixed; inset: 0 0 auto; height: 2px; z-index: 120; background: transparent; }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .1s linear; }

/* ── 顶栏 ─────────────────────────────────────────────── */
.top {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center; gap: clamp(16px, 3vw, 40px);
  padding: 0 var(--pad);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.top.is-scrolled { border-bottom-color: var(--line); background: color-mix(in srgb, var(--bg) 92%, transparent); }
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand-mark {
  width: 30px; height: 30px; display: grid; place-items: center;
  background: var(--accent); color: var(--paper);
  font-family: var(--serif); font-size: 17px; line-height: 1; border-radius: 2px;
}
.brand-text { font-family: var(--serif); font-size: 16px; line-height: 1.1; letter-spacing: .06em; }
.brand-text small { display: block; font-family: var(--sans); font-size: 10px; letter-spacing: .22em; color: var(--ink2); margin-top: 3px; }

.nav { display: flex; gap: clamp(10px, 1.6vw, 22px); margin-left: auto; }
.nav a {
  position: relative; font-size: 13px; letter-spacing: .08em; color: var(--ink2);
  padding: 6px 0; transition: color .2s;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px;
  background: var(--accent); transition: right .3s var(--ease);
}
.nav a:hover, .nav a.is-active { color: var(--ink); }
.nav a:hover::after, .nav a.is-active::after { right: 0; }

.top-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav + .top-actions { margin-left: 0; }
.sound {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 12px; letter-spacing: .08em; color: var(--ink2);
  transition: border-color .25s, color .25s, background .25s;
}
.sound:hover { border-color: var(--accent); color: var(--ink); }
.sound.is-playing { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; width: 14px; }
.bars i { display: block; width: 2px; height: 5px; background: currentColor; border-radius: 1px; transform-origin: bottom; }
.sound.is-playing .bars i { animation: bar .9s var(--ease-io) infinite alternate; }
.sound.is-playing .bars i:nth-child(2) { animation-delay: -.35s; }
.sound.is-playing .bars i:nth-child(3) { animation-delay: -.62s; }
.sound.is-playing .bars i:nth-child(4) { animation-delay: -.15s; }
@keyframes bar { from { height: 3px; } to { height: 12px; } }

.menu-btn {
  display: none; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 999px;
  padding: 0; place-items: center; gap: 5px;
}
.menu-btn span { display: block; width: 15px; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease), opacity .2s; }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

/* ── 抽屉 ─────────────────────────────────────────────── */
.drawer {
  position: fixed; inset: 0; z-index: 95;
  background: var(--bg); padding: calc(var(--header-h) + 32px) var(--pad) 32px;
  display: flex; flex-direction: column; justify-content: space-between;
  opacity: 0; transform: translateY(-10px); pointer-events: none;
  transition: opacity .3s var(--ease), transform .35s var(--ease);
}
.drawer.open { opacity: 1; transform: none; pointer-events: auto; }
.drawer nav { display: grid; gap: 2px; }
.drawer nav a {
  display: flex; align-items: baseline; gap: 18px;
  font-family: var(--serif); font-size: clamp(1.7rem, 7vw, 2.4rem);
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.drawer nav a span { font-family: var(--sans); font-size: 11px; letter-spacing: .2em; color: var(--accent); }
.drawer-foot { font-size: 13px; color: var(--ink2); }
.drawer-foot a { color: var(--accent); border-bottom: 1px solid currentColor; }

/* ── 页首 ─────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  padding: clamp(48px, 9vh, 104px) var(--pad) 0;
  display: flex; flex-direction: column; justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 8% 20%, color-mix(in srgb, var(--paper) 70%, transparent), transparent 60%),
    var(--bg);
}
.hero-art {
  position: absolute; top: 0; right: 0; width: min(66%, 980px); height: 100%;
  z-index: 0; pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 34%, #000 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 34%, #000 100%);
  will-change: transform;
}
.hero-art svg { width: 100%; height: 100%; display: block; }
.hero-copy { position: relative; z-index: 2; max-width: 720px; will-change: transform; }
.eyebrow { font-size: 12px; letter-spacing: .18em; color: var(--ink2); display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 26px; }
.eyebrow a { color: var(--accent); border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.eyebrow span { opacity: .5; }

.hero h1 { display: flex; flex-direction: column; margin: 0; }
.hero h1 .cn {
  font-size: clamp(3.5rem, 11vw, 8.6rem);
  line-height: 1.02; letter-spacing: .06em;
  font-weight: 700;
}
.hero h1 .en {
  font-family: var(--sans); font-size: clamp(10px, 1vw, 12px);
  letter-spacing: .52em; color: var(--ink2); margin-top: 14px; padding-left: 4px;
}
.tagline {
  font-family: var(--serif); font-size: clamp(1.2rem, 2.2vw, 1.7rem);
  line-height: 1.6; margin: 26px 0 0; color: var(--ink);
  display: flex; align-items: baseline; gap: 14px;
}
.tagline::before { content: ""; width: 28px; height: 1px; background: var(--accent); flex: none; transform: translateY(-6px); }
.lede { max-width: 46ch; color: var(--ink2); font-size: .97rem; line-height: 1.95; margin: 20px 0 0; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 46px; padding: 0 22px; border-radius: 999px;
  background: var(--ink); color: var(--bg);
  font-size: 13px; letter-spacing: .12em;
  transition: transform .25s var(--ease), background .25s, color .25s, box-shadow .25s;
}
.btn:hover { background: var(--accent); color: var(--paper); transform: translateY(-2px); box-shadow: 0 10px 24px -14px var(--ink); }
.btn span { font-size: 12px; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--accent); background: transparent; color: var(--accent); box-shadow: none; }

.hero-meta {
  display: flex; flex-wrap: wrap; gap: clamp(16px, 4vw, 44px);
  margin: clamp(32px, 6vh, 56px) 0 0; padding-top: 20px;
  border-top: 1px solid var(--line); max-width: 640px;
}
.hero-meta div { min-width: 0; }
.hero-meta dt { font-size: 10px; letter-spacing: .22em; color: var(--ink2); margin-bottom: 4px; }
.hero-meta dd { margin: 0; font-family: var(--serif); font-size: 14px; font-variant-numeric: tabular-nums; }

.hero-foot {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 22px 0 26px; margin-top: clamp(40px, 8vh, 80px);
  font-size: 11px; letter-spacing: .14em; color: var(--ink2);
}
.scroll-cue { display: inline-flex; align-items: center; gap: 10px; }
.scroll-cue i {
  width: 18px; height: 28px; border: 1px solid var(--line); border-radius: 999px; position: relative;
}
.scroll-cue i::after {
  content: ""; position: absolute; left: 50%; top: 7px; width: 3px; height: 3px; border-radius: 50%;
  background: var(--accent); transform: translateX(-50%);
  animation: cue 1.8s var(--ease-io) infinite;
}
@keyframes cue { 0%, 100% { transform: translate(-50%, 0); opacity: 1; } 70% { transform: translate(-50%, 10px); opacity: 0; } }
.plate-tag { text-align: right; }

/* ── 章节骨架 ─────────────────────────────────────────── */
.sec {
  padding: clamp(64px, 10vw, 120px) var(--pad);
  border-top: 1px solid var(--line);
  max-width: calc(var(--maxw) + var(--pad) * 2);
  margin: 0 auto;
}
.sec-head { margin-bottom: clamp(32px, 5vw, 60px); }
.sec-head .num {
  font-family: var(--sans); font-size: 11px; letter-spacing: .3em; color: var(--accent);
  margin: 0 0 12px; font-variant-numeric: tabular-nums;
}
.sec-head h2 { font-size: clamp(1.9rem, 4.2vw, 3.2rem); letter-spacing: .06em; }
.sec-sub { margin: 12px 0 0; color: var(--ink2); font-size: .92rem; max-width: 52ch; }

.split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, .85fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.prose { font-size: 1.01rem; line-height: 2; color: var(--ink2); max-width: 64ch; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose .dropcap::first-letter {
  float: left; font-family: var(--serif); font-size: 3.6em; line-height: .86;
  padding: 8px 12px 0 0; color: var(--accent);
}
.prose-wide { max-width: 68ch; color: var(--ink2); line-height: 2; font-size: 1.01rem; }
.caveat {
  font-size: 12.5px; line-height: 1.85; color: var(--ink2);
  border-left: 2px solid var(--line); padding-left: 14px; margin-top: 22px;
}
.caveat strong { color: var(--ink); }
.text-link { border-bottom: 1px solid var(--accent); color: var(--accent); font-size: 13px; letter-spacing: .04em; }
.text-link span { display: inline-block; transition: transform .25s var(--ease); }
.text-link:hover span { transform: translate(2px, -2px); }
.link-row { margin-top: 24px; }

/* 侧栏 */
.side-card {
  position: sticky; top: calc(var(--header-h) + 28px);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px; box-shadow: 0 24px 60px -48px var(--ink);
}
.locator { margin: 0 0 16px; }
.locator img { display: block; width: 100%; height: auto; background: color-mix(in srgb, var(--bg) 60%, var(--paper)); border-radius: 1px; }
.locator figcaption { font-size: 10.5px; letter-spacing: .08em; color: var(--ink2); margin-top: 8px; }
.facts { margin: 0; font-size: 12.5px; }
.facts div { display: grid; grid-template-columns: 6.2em minmax(0, 1fr); gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.facts dt { color: var(--ink2); }
.facts dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }

/* 引文 */
.quote {
  margin: 0; padding: 26px 26px 20px;
  background: var(--paper); border-left: 3px solid var(--accent);
  border-radius: 0 var(--r) var(--r) 0;
  box-shadow: 0 24px 60px -52px var(--ink);
}
.quote p { font-family: var(--serif); font-size: 1rem; line-height: 2.05; color: var(--ink); margin-bottom: 16px; }
.quote cite { display: block; font-style: normal; font-size: 11px; letter-spacing: .06em; color: var(--ink2); border-top: 1px solid var(--line); padding-top: 12px; }

/* 时间线 */
.timeline { list-style: none; margin: 28px 0; padding: 0; counter-reset: tl; }
.timeline li {
  display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 16px;
  padding: 16px 0; border-top: 1px solid var(--line);
}
.timeline li:last-child { border-bottom: 1px solid var(--line); }
.timeline b { font-family: var(--serif); font-size: 15px; color: var(--accent); font-weight: 600; }
.timeline span { font-size: .95rem; line-height: 1.9; }

/* 地标 */
.sight-list { border-bottom: 1px solid var(--line); }
.sight {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) minmax(0, 260px);
  gap: clamp(12px, 3vw, 32px); align-items: center;
  padding: 24px 12px; border-top: 1px solid var(--line);
  transition: background .3s, padding .3s var(--ease);
}
.sight:hover { background: color-mix(in srgb, var(--accent) 5%, transparent); padding-left: 20px; padding-right: 20px; }
.sight .idx { font-size: 11px; letter-spacing: .2em; color: var(--accent); font-variant-numeric: tabular-nums; }
.sight h3 { font-size: clamp(1.15rem, 1.8vw, 1.45rem); letter-spacing: .03em; }
.sight .kind { margin: 6px 0 0; font-size: 11px; letter-spacing: .16em; color: var(--ink2); }
.sight .tip { margin: 0; font-size: 12.5px; line-height: 1.8; color: var(--ink2); }

.motif-strip {
  display: flex; align-items: center; gap: 20px;
  margin-top: 32px; padding: 22px 24px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: color-mix(in srgb, var(--paper) 55%, transparent);
}
.motif-glyph { font-size: 26px; color: var(--accent); line-height: 1; flex: none; }
.motif-strip p { margin: 0; font-size: 12.5px; line-height: 1.85; color: var(--ink2); }
.motif-strip p span { display: block; font-size: 10px; letter-spacing: .22em; color: var(--accent); margin-bottom: 4px; }

/* 今日 */
.bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.card {
  grid-column: span 1; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r);
  padding: 22px; display: flex; flex-direction: column; justify-content: space-between; gap: 14px;
  transition: transform .35s var(--ease), border-color .3s, box-shadow .35s;
}
.card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: 0 22px 50px -40px var(--ink); }
.card.wide { grid-column: span 2; grid-row: span 2; background: var(--ink); color: var(--bg); border-color: var(--ink); }
.card.wide .card-k, .card.wide p { color: color-mix(in srgb, var(--bg) 72%, var(--ink)); }
.card.wide .card-big { color: var(--bg); }
.card-k { font-size: 10px; letter-spacing: .2em; color: var(--ink2); margin: 0; }
.card p { margin: 0; font-size: 12.5px; line-height: 1.85; color: var(--ink2); }
.card-big { font-family: var(--serif); font-size: clamp(2.2rem, 3.4vw, 3.2rem); line-height: 1.2; letter-spacing: .04em; color: var(--ink); }
.card-big span { display: block; font-family: var(--sans); font-size: 11px; letter-spacing: .3em; margin-top: 8px; opacity: .6; }
.card-num { font-family: var(--serif); font-size: clamp(1.9rem, 2.8vw, 2.6rem); line-height: 1.1; color: var(--accent); font-variant-numeric: tabular-nums; }
.card-num small { font-family: var(--sans); font-size: 10px; letter-spacing: .16em; margin-left: 6px; color: var(--ink2); }
.card-num.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 1.35rem; letter-spacing: .04em; color: var(--ink); }
.map-links { display: flex; flex-wrap: wrap; gap: 6px; }
.map-links a {
  font-size: 11px; letter-spacing: .04em; padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px;
  transition: border-color .2s, color .2s;
}
.map-links a:hover { border-color: var(--accent); color: var(--accent); }

/* 风物 */
.food-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-top: 28px; }
.food {
  border: 1px solid var(--line); border-radius: var(--r); padding: 22px;
  background: color-mix(in srgb, var(--paper) 60%, transparent);
  transition: background .3s, transform .35s var(--ease);
}
.food:hover { background: var(--paper); transform: translateY(-3px); }
.food-k { font-size: 10px; letter-spacing: .2em; color: var(--accent); }
.food h3 { font-size: 1.35rem; margin: 14px 0 8px; letter-spacing: .04em; }
.food p { margin: 0; font-size: 12.5px; color: var(--ink2); line-height: 1.8; }
.food.ghost { border-style: dashed; background: transparent; }
.food.ghost h3 { color: var(--ink2); }

/* 四时 */
.season-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.season {
  position: relative; overflow: hidden;
  border-top: 2px solid var(--accent); padding: 22px 20px 26px;
  background: color-mix(in srgb, var(--paper) 45%, transparent);
  min-height: 240px;
}
.season-cn {
  position: absolute; right: -6px; bottom: -46px;
  font-family: var(--serif); font-size: 9rem; line-height: 1;
  color: var(--accent); opacity: .09; pointer-events: none; user-select: none;
}
.season h3 { font-size: 1.3rem; display: flex; align-items: baseline; gap: 10px; }
.season h3 small { font-family: var(--sans); font-size: 10px; letter-spacing: .18em; color: var(--accent); font-weight: 400; }
.season p { margin: 16px 0 0; font-size: 12.5px; line-height: 1.9; color: var(--ink2); position: relative; }

/* 影像 */
.notice {
  border: 1px solid var(--line); padding: 16px 18px; border-radius: var(--r);
  background: color-mix(in srgb, var(--paper) 55%, transparent);
  font-size: 12.5px; line-height: 1.9;
}
.plates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 26px 0 30px; }
.plate { margin: 0; }
.plate-btn {
  display: block; width: 100%; padding: 0; overflow: hidden; border: 1px solid var(--line);
  border-radius: var(--r); background: var(--paper); cursor: zoom-in; position: relative;
}
.plate-btn::after {
  content: "放大"; position: absolute; right: 10px; bottom: 10px;
  font-size: 10px; letter-spacing: .16em; padding: 5px 9px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); color: var(--ink);
  border-radius: 999px; opacity: 0; transform: translateY(4px); transition: .3s var(--ease);
}
.plate-btn:hover::after, .plate-btn:focus-visible::after { opacity: 1; transform: none; }
.plate img { display: block; width: 100%; aspect-ratio: 5 / 3; object-fit: cover; transition: transform .8s var(--ease); }
.plate-btn:hover img { transform: scale(1.035); }
.plate figcaption {
  display: flex; justify-content: space-between; font-size: 10.5px; letter-spacing: .14em;
  color: var(--ink2); padding-top: 9px;
}
.palette-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.swatch { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); position: relative; flex: none; }
.swatch i { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.palette-row p { margin: 0 0 0 10px; font-size: 11px; letter-spacing: .1em; color: var(--ink2); }

.sound-note {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 22px; align-items: center;
  border: 1px solid var(--line); border-radius: var(--r); padding: 22px 24px;
  background: var(--paper);
}
.sound-note h3 { font-size: 1.1rem; }
.sound-note p { margin: 8px 0 0; font-size: 12.5px; line-height: 1.9; color: var(--ink2); }
.bars.big { width: 30px; height: 30px; gap: 4px; }
.bars.big i { width: 4px; height: 8px; background: var(--accent); }
.bars.big i:nth-child(2) { height: 18px; }
.bars.big i:nth-child(3) { height: 12px; }
.bars.big i:nth-child(4) { height: 24px; }

/* 资料 */
.sources { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.sources li {
  display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 20px;
  padding: 18px 0; border-top: 1px solid var(--line); font-size: 12.5px; line-height: 1.9; color: var(--ink2);
}
.sources b { color: var(--ink); font-weight: 500; letter-spacing: .04em; }
.sources a { color: var(--accent); border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }

/* ── 页脚 ─────────────────────────────────────────────── */
.foot { background: var(--ink); color: color-mix(in srgb, var(--bg) 78%, var(--ink)); padding: clamp(48px, 7vw, 80px) var(--pad) 28px; }
.foot-main {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1.2fr) auto minmax(0, .9fr); gap: 40px;
  padding-bottom: 40px; border-bottom: 1px solid color-mix(in srgb, var(--bg) 18%, var(--ink));
}
.foot-brand { font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--bg); margin: 0 0 10px; letter-spacing: .06em; }
.foot-brand span { display: block; font-family: var(--sans); font-size: 9px; letter-spacing: .42em; margin-top: 10px; opacity: .5; }
.foot-tag { font-family: var(--serif); font-size: .95rem; margin: 0; opacity: .8; }
.foot nav { display: grid; grid-template-columns: repeat(2, auto); gap: 6px 26px; align-content: start; }
.foot nav a { font-size: 12px; letter-spacing: .1em; opacity: .72; transition: opacity .2s, color .2s; }
.foot nav a:hover { opacity: 1; color: var(--bg); }
.foot-meta { font-size: 11px; letter-spacing: .08em; line-height: 2; opacity: .7; text-align: right; }
.foot-meta p { margin: 0; }
.foot-base {
  max-width: var(--maxw); margin: 22px auto 0;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 10.5px; letter-spacing: .06em; opacity: .55;
}
.foot-base p { margin: 0; }
.foot-base a { border-bottom: 1px solid currentColor; }

/* 回顶 */
.to-top {
  position: fixed; right: clamp(16px, 3vw, 28px); bottom: clamp(16px, 3vw, 28px); z-index: 90;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--ink); color: var(--bg); border: 1px solid var(--ink);
  display: grid; place-items: center; font-size: 15px;
  opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity .3s, transform .35s var(--ease), background .25s;
  box-shadow: 0 14px 30px -18px var(--ink);
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }

/* 灯箱 */
.lightbox {
  border: 0; padding: 0; background: transparent; max-width: min(1200px, 94vw); width: 100%;
  color: var(--bg);
}
.lightbox::backdrop { background: color-mix(in srgb, var(--ink) 82%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lightbox figure { margin: 0; }
.lightbox img { display: block; width: 100%; height: auto; border-radius: 2px; background: var(--paper); }
.lightbox figcaption {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 12px 2px 0; font-size: 12px; letter-spacing: .1em;
}
.lightbox figcaption a { border-bottom: 1px solid currentColor; }
.lb-close {
  position: absolute; right: 0; top: -44px; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--bg) 40%, transparent); color: inherit;
  font-size: 20px; line-height: 1; display: grid; place-items: center;
}
.lightbox[open] { animation: lbIn .35s var(--ease); }
@keyframes lbIn { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: none; } }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 14px);
  background: var(--ink); color: var(--bg); font-size: 12px; letter-spacing: .08em;
  padding: 10px 18px; border-radius: 999px; opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .3s var(--ease); z-index: 150;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 进场 */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .hero-copy { animation: rise 1.1s var(--ease) both .1s; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

/* ── 版式 2 · 志（左栏 / 横排标题） ──────────────────── */
html[data-layout="2"] .sec {
  display: grid; grid-template-columns: 180px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px); max-width: calc(1100px + var(--pad) * 2);
}
html[data-layout="2"] .sec-head { position: sticky; top: calc(var(--header-h) + 28px); align-self: start; margin-bottom: 0; }
html[data-layout="2"] .sec-sub { font-size: 12px; line-height: 1.8; margin-top: 10px; }
html[data-layout="2"] .sec-head h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
html[data-layout="2"] .sec-head .num { margin-bottom: 8px; }
html[data-layout="2"] .split { grid-template-columns: minmax(0, 1.4fr) minmax(0, .85fr); gap: clamp(24px, 4vw, 48px); }
html[data-layout="2"] .hero-art { width: min(60%, 820px); opacity: .92; }
html[data-layout="2"] .hero h1 .cn { letter-spacing: .02em; }
html[data-layout="2"] .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
html[data-layout="2"] .season-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
html[data-layout="2"] .card.wide { grid-row: span 1; }
html[data-layout="2"] .plate { border-top: 1px solid var(--line); padding-top: 12px; }

/* ── 版式 3 · 册（纸页卡片） ─────────────────────────── */
html[data-layout="3"] .sec-body {
  background: var(--paper); border: 1px solid var(--line); border-radius: 4px;
  padding: clamp(22px, 4vw, 44px);
  box-shadow: 0 30px 80px -70px var(--ink);
}
html[data-layout="3"] .sight-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 0; gap: 12px; }
html[data-layout="3"] .sight {
  display: block; border: 1px solid var(--line); border-radius: 2px; padding: 22px;
  background: var(--bg);
}
html[data-layout="3"] .sight .idx { display: block; margin-bottom: 12px; }
html[data-layout="3"] .sight .tip { margin-top: 12px; }
html[data-layout="3"] .sight:hover { padding: 22px; transform: translateY(-3px); }
html[data-layout="3"] .sight { transition: background .3s, transform .3s var(--ease), border-color .3s; }
html[data-layout="3"] .sight:hover { border-color: var(--accent); }
html[data-layout="3"] .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
html[data-layout="3"] .card { background: var(--bg); }
html[data-layout="3"] .card.wide { grid-row: span 1; }
html[data-layout="3"] .season-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
html[data-layout="3"] .season { background: var(--bg); }
html[data-layout="3"] .quote { box-shadow: none; }
html[data-layout="3"] .food { background: var(--bg); }
html[data-layout="3"] .hero-art { opacity: .85; }

/* ── 版式 4 · 碑（重线 / 墨块） ──────────────────────── */
html[data-layout="4"] .sec { border-top: 2px solid var(--ink); }
html[data-layout="4"] .sec-head .num { color: var(--ink); }
html[data-layout="4"] .sec-head h2 { letter-spacing: .14em; }
html[data-layout="4"] .sec-head h2::after { content: ""; display: block; width: 56px; height: 4px; background: var(--accent); margin-top: 14px; }
html[data-layout="4"] .quote { background: var(--ink); color: var(--bg); border-left-color: var(--accent); }
html[data-layout="4"] .quote p { color: var(--bg); }
html[data-layout="4"] .quote cite { color: color-mix(in srgb, var(--bg) 62%, var(--ink)); border-top-color: color-mix(in srgb, var(--bg) 20%, var(--ink)); }
html[data-layout="4"] .card, html[data-layout="4"] .food, html[data-layout="4"] .season { border-radius: 0; }
html[data-layout="4"] .card.wide { background: var(--accent); border-color: var(--accent); }
html[data-layout="4"] .card.wide .card-big, html[data-layout="4"] .card.wide p, html[data-layout="4"] .card.wide .card-k { color: var(--paper); }
html[data-layout="4"] .hero h1 .cn { letter-spacing: .12em; }
html[data-layout="4"] .tagline::before { width: 48px; height: 3px; }
html[data-layout="4"] .plate img { filter: saturate(.92) contrast(1.03); }

/* ── 响应式 ───────────────────────────────────────────── */
@media (max-width: 1080px) {
  .nav { display: none; }
  .menu-btn { display: inline-grid; }
}
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .side-card { position: static; }
  .quote { border-radius: var(--r); }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card.wide { grid-column: span 2; grid-row: span 1; }
  .season-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plates { grid-template-columns: 1fr; }
  .plate img { aspect-ratio: 16 / 9; }
  .sources li { grid-template-columns: 110px minmax(0, 1fr); }
  .sound-note { grid-template-columns: auto minmax(0, 1fr); }
  .sound-note .btn { grid-column: 1 / -1; justify-self: start; }
  .foot-main { grid-template-columns: 1fr 1fr; }
  .foot-meta { text-align: left; grid-column: 1 / -1; }
  html[data-layout="2"] .sec { grid-template-columns: 1fr; }
  html[data-layout="2"] .sec-head { position: static; }
  html[data-layout="3"] .sight-list { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  :root { --header-h: 60px; }
  .hero { min-height: auto; padding-top: 26px; justify-content: flex-start; }
  .hero-copy { order: 1; margin-top: 0; }
  .hero-art {
    order: 2;
    position: relative; width: 100%; height: 44vh; min-height: 280px; max-height: 420px; margin: 34px calc(var(--pad) * -1) 0;
    -webkit-mask-image: linear-gradient(to bottom, #000 52%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 52%, transparent 100%);
  }
  .hero-art svg { height: 100%; }
  .hero-foot { order: 3; }
  .hero h1 .cn { font-size: clamp(3rem, 15.5vw, 5.2rem); }
  .hero-foot { margin-top: 40px; }
  .plate-tag { max-width: 55%; line-height: 1.7; }
  .sight { grid-template-columns: 32px minmax(0, 1fr); align-items: start; }
  .sight .tip { grid-column: 2; }
  .sight:hover { padding-left: 12px; padding-right: 12px; }
  .card.wide { grid-column: span 2; }
  .foot-main { grid-template-columns: 1fr; gap: 28px; }
  .foot nav { grid-template-columns: repeat(4, auto); }
  .hero-meta { gap: 18px 26px; }
  .hero-meta div { min-width: 88px; }
  .sec { padding-top: 64px; padding-bottom: 64px; }
  html[data-layout="3"] .sec-body { margin: 0 calc(var(--pad) * -.35); padding: 20px; }
}
@media (max-width: 560px) {
  .bento, .season-grid { grid-template-columns: 1fr; }
  .card.wide { grid-column: span 1; }
  .food-grid { grid-template-columns: 1fr; }
  .sources li { grid-template-columns: 1fr; gap: 4px; }
  .drawer nav a { font-size: 1.5rem; }
  .sound span[data-sound-label] { display: none; }
  .sound { padding: 0 10px; }
  .hero-actions .btn { flex: 1; justify-content: center; }
  .hero-meta { display: grid; grid-template-columns: 1fr 1fr; }
  .hero-meta div:last-child { grid-column: span 2; }
  .motif-strip { align-items: flex-start; }
  .sound-note { grid-template-columns: 1fr; }
}

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