/* 大千世界 · 样式
   设计基调：暗房 / 档案。深色墙、米色纸、每个国家一枚主色。
   所有颜色走变量，国家页只换 --accent / --accent-deep / --wash 三个值。 */

/* ---------- 0. 变量 ---------- */

:root {
  --wall: #171412;
  --wall-lift: #1F1B18;
  --paper: #ECE6DA;
  --ash: #9C948B;
  --ash-dim: #8A8178;
  --line: rgba(236, 230, 218, 0.14);
  --line-soft: rgba(236, 230, 218, 0.07);

  /* 默认主色 = 土耳其赭红；国家页与详情页会被内联覆盖 */
  --accent: #C0532F;
  --accent-deep: #8A3A20;
  --wash: #2A1B14;

  --gutter: clamp(18px, 4.5vw, 64px);
  --maxw: 1360px;

  /* 全站使用本地系统宋体，不再从 Google Fonts 拉中文（大陆不可达且 90KB+ 阻塞首屏） */
  --serif: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong", "SimSun",
    "Noto Serif CJK SC", serif;
  --sans: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* ---------- 1. 基础 ---------- */

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--wall);
  color: var(--paper);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::selection,
::selection { background: var(--accent); color: #fff; }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 1px solid var(--paper);
  outline-offset: 3px;
}

/* 键盘用户的第一站：跳到正文 */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 999;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--wall);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus-visible {
  transform: translateY(0);
  outline-offset: 2px;
}

/* 地图上的可聚焦区域：键盘走到时给一圈亮边 */
.map-country:focus-visible,
.map-china:focus-visible,
.map-prov:focus-visible,
.map-dot:focus-visible {
  outline: none;
  stroke: var(--paper);
  stroke-width: 2.2;
}

.shell {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* 小节标题：小字号、宽字距，像档案标签 */
.sec-title {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ash-dim);
  margin: 0 0 clamp(22px, 3.6vh, 36px);
}

/* ---------- 2. 顶栏 ---------- */

.masthead {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  padding-block: 16px;
  transition: background 0.5s ease, border-color 0.5s ease;
  border-bottom: 1px solid transparent;
}

body.is-scrolled .masthead {
  background: rgba(23, 20, 18, 0.86);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  backdrop-filter: blur(14px) saturate(120%);
  border-bottom-color: var(--line-soft);
}

.masthead-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.wordmark {
  font-size: 17px;
  letter-spacing: 0.3em;
  padding-left: 0.3em;             /* 抵消末字字距，视觉左对齐 */
  transition: opacity 0.3s;
}

.wordmark:hover { opacity: 0.7; }

.masthead nav {
  display: flex;
  gap: clamp(16px, 2.4vw, 36px);
}

.masthead nav a {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ash);
  transition: color 0.3s;
}

.masthead nav a:hover { color: var(--paper); }

/* ---------- 3. 首页首屏：滚动显影 ---------- */

/* 100svh 的画面 + 一段显影跑道；sticky 把画面钉住，滚动只用来「显影」 */
.home-hero {
  --rv: 1;
  position: relative;
  height: calc(100svh + clamp(300px, 58vh, 660px));
  min-height: 880px;
  isolation: isolate;
}

.hero-pin {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  isolation: isolate;
  touch-action: pan-y;
}

/* 照片从暗房里显出来：暗 → 亮，灰 → 彩，微微推近 → 归位。
   --rv 由 main.js 按滚动进度写进来（0 是一张很暗的灰片，1 才完全显影）。
   起点不能全黑——那样第一眼像页面没加载出来 */
.home-hero .country-media img,
.country-hero .country-media img {
  opacity: calc(0.86 + 0.14 * var(--rv));
  filter:
    grayscale(calc((1 - var(--rv)) * 0.95))
    brightness(calc(0.52 + 0.48 * var(--rv)))
    contrast(1.02)
    blur(calc((1 - var(--rv)) * var(--rv-blur, 3.5px)));
  transform: scale(calc(1.13 - 0.13 * var(--rv)));
  transform-origin: 50% 46%;
  will-change: opacity, filter, transform;
}

/* 标题分行错峰浮现，副标题最后跟上 */
.home-hero .hero-line > span {
  --r: clamp(0, calc((var(--rv) - var(--d, 0.12)) / 0.18), 1);
  opacity: var(--r);
  transform: translateY(calc((1 - var(--r)) * 26px));
  will-change: opacity, transform;
}

.home-hero .hero-sub {
  --r: clamp(0, calc((var(--rv) - 0.46) / 0.22), 1);
  opacity: var(--r);
  transform: translateY(calc((1 - var(--r)) * 16px));
}

.home-hero .hero-hint {
  opacity: clamp(0, calc((0.66 - var(--rv)) / 0.26), 1);
}

.home-hero-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(46px, 9vh, 92px);
}

.home-hero .hero-line {
  font-size: clamp(2.1rem, 4.8vw, 4.4rem);
}

.hero-line {
  margin: 0;
  font-weight: 500;
  line-height: 1.34;
}

.hero-line > span {
  display: block;
  letter-spacing: var(--ls, 0.08em);
}

.hero-sub {
  margin: clamp(20px, 3vh, 34px) 0 0;
  max-width: 36ch;
  font-size: 14px;
  line-height: 2.05;
  color: var(--ash);
}

/* ---------- 3b. 探索区（地图 + 大类切换） ---------- */

.explore {
  display: flex;
  flex-direction: column;
  padding-top: clamp(64px, 10vh, 128px);
  padding-bottom: clamp(40px, 6vh, 80px);
}

/* 标题与大类切换：宽屏左右分布，窄屏堆叠 */
.explore-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: clamp(18px, 3vw, 44px);
  margin-bottom: clamp(20px, 3.2vh, 38px);
}

.explore-head {
  flex: 1 1 360px;
  min-width: 0;
}

.explore-head::before {
  content: "EXPLORE · 点亮足迹";
  display: block;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.32em;
  color: var(--ash-dim);
  margin-bottom: clamp(18px, 2.6vh, 32px);
}

.explore-head .hero-line { font-size: clamp(1.6rem, 2.4vw, 2.5rem); }

.explore-sub {
  margin: clamp(18px, 2.6vh, 30px) 0 0;
  max-width: 36ch;
  font-size: 13px;
  line-height: 2;
  color: var(--ash);
}

/* 3a. 大类切换 */

.scope-tabs {
  display: flex;
  gap: 10px;
}

.scope-tab {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: grid;
  gap: 7px;
  padding: 15px 16px 14px;
  text-align: left;
  background: transparent;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color 0.4s, background 0.4s;
}

.scope-tab:hover { border-color: rgba(236, 230, 218, 0.34); }

.scope-tab .scope-name {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 16px;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.scope-tab .scope-name i {
  font-family: var(--sans);
  font-size: 9px;
  font-style: normal;
  letter-spacing: 0.24em;
  color: var(--ash-dim);
}

.scope-tab .scope-sub {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ash-dim);
  white-space: nowrap;
}

.scope-tab.is-on {
  background: rgba(236, 230, 218, 0.05);
  border-color: rgba(236, 230, 218, 0.42);
}

.scope-tab.is-on::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--paper);
}

.scope-tab.is-on .scope-sub { color: var(--ash); }
.scope-tab[data-scope="cn"].is-on::before { background: var(--accent); }

/* 3b. 世界地图 */

/* 地图窗口：全宽，高度按视口给，SVG 填满（viewBox 随容器比例重算） */
.map-wrap {
  position: relative;
  width: 100%;
  height: clamp(360px, 62vh, 620px);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background:
    radial-gradient(120% 130% at 50% 44%, rgba(56, 48, 42, 0.5) 0%, rgba(20, 17, 15, 0) 72%),
    var(--wall);
  overflow: hidden;
  overscroll-behavior: contain;
  touch-action: none;            /* 地图内触摸完全归地图，不滚页面 */
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
}

.map-wrap.is-grabbing { cursor: grabbing; }

.map-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  cursor: inherit;
  touch-action: none;
}

.map-svg.is-grabbing { cursor: grabbing; }

.map-vp { will-change: transform; }

/* 缩放控制 */
.map-ctl {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.map-ctl button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(236, 230, 218, 0.3);
  background: rgba(23, 20, 18, 0.92);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.3s, border-color 0.3s;
}

.map-ctl button:hover,
.map-ctl button:focus-visible {
  color: var(--paper);
  border-color: rgba(236, 230, 218, 0.42);
}

.map-land {
  fill: #221E1B;
  stroke: #342E29;
  stroke-width: 0.9;
  stroke-linejoin: round;
}

/* 中国：已收录，勾实线，点进去切分省地图 */
.map-china {
  fill: #2E2724;
  stroke: rgba(176, 58, 46, 0.55);
  stroke-width: 1.1;
  stroke-linejoin: round;
  cursor: pointer;
  transition: fill 0.5s, stroke 0.5s;
}

.map-china:hover {
  fill: rgba(176, 58, 46, 0.35);
  stroke: rgba(236, 230, 218, 0.6);
}

/* 去过的国家：各自主色 */
.map-country {
  fill: var(--ac);
  fill-opacity: 0.58;
  stroke: var(--ac);
  stroke-width: 1.1;
  stroke-linejoin: round;
  cursor: pointer;
  transition: fill-opacity 0.45s, stroke-width 0.45s, filter 0.45s;
}

.map-country:hover,
.map-country:focus-visible {
  fill-opacity: 0.95;
  stroke-width: 1.6;
  filter: drop-shadow(0 0 10px var(--ac));
}

/* 面积太小的国家：打点 */
.map-dot {
  fill: var(--ac);
  stroke: rgba(23, 20, 18, 0.9);
  stroke-width: 1.5;
  cursor: pointer;
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.4s var(--ease-out-expo, cubic-bezier(0.16, 1, 0.3, 1)), filter 0.4s;
}

.map-dot:hover {
  transform: scale(1.5);
  filter: drop-shadow(0 0 8px var(--ac));
}

/* 国内视角：地图整体换成中国分省，无需压暗规则 */

/* 悬停预览卡 */
.map-tip {
  position: absolute;
  z-index: 3;
  transform: translate(-50%, -100%) translateY(-4px);
  min-width: 168px;
  padding: 13px 16px 14px;
  background: rgba(19, 16, 15, 0.95);
  border: 1px solid var(--line);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.map-tip.is-on {
  opacity: 1;
  transform: translate(-50%, -100%) translateY(-10px);
}

.map-tip .tip-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: 2px;
}

.map-tip strong {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.1em;
}

.map-tip .tip-en {
  display: block;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.24em;
  color: var(--ash-dim);
  margin-top: 3px;
}

.map-tip .tip-meta {
  display: block;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ash);
  margin-top: 8px;
}

.map-tip .tip-go {
  display: block;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--paper);
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid var(--line-soft);
}

.map-hint {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  margin: 0;
  pointer-events: none;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--ash-dim);
}

/* 中国分省：未收录省份的暗墙 */
.map-prov {
  fill: #2B2522;
  stroke: #4A4038;
  stroke-width: 0.9;
  stroke-linejoin: round;
  cursor: pointer;
  transition: fill 0.45s;
}

.map-prov:hover {
  fill: rgba(176, 58, 46, 0.38);
  stroke: rgba(236, 230, 218, 0.4);
}

/* 点选中的省份 */
.map-prov.is-active {
  fill: rgba(176, 58, 46, 0.62);
  stroke: rgba(236, 230, 218, 0.62);
}

/* 有照片的省份：用主题色点亮，可点击进入 */
.map-prov.is-visited {
  fill: var(--ac);
  fill-opacity: 0.6;
  stroke: var(--ac);
  stroke-width: 1;
}

.map-prov.is-visited:hover,
.map-prov.is-visited:focus-visible {
  fill-opacity: 0.95;
  stroke-width: 1.5;
  filter: drop-shadow(0 0 8px var(--ac));
}

/* 九段线 */
.map-jd {
  fill: none;
  stroke: rgba(236, 230, 218, 0.4);
  stroke-width: 1.6;
  stroke-linejoin: round;
}

/* 3c. 国家索引 */

.country-index {
  display: flex;
  margin-top: clamp(18px, 3vh, 30px);
  flex-wrap: wrap;
  gap: 9px;
  padding-top: clamp(16px, 2.4vh, 24px);
  border-top: 1px solid var(--line-soft);
}

.country-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ash);
  transition: color 0.35s, border-color 0.35s, background 0.35s;
}

.country-chip:hover {
  color: var(--paper);
  border-color: color-mix(in srgb, var(--ac) 60%, transparent);
  background: rgba(236, 230, 218, 0.04);
}

.chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ac);
  box-shadow: 0 0 7px var(--ac);
  flex: none;
}

.country-chip span {
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--ash-dim);
}

.index-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.9;
  color: var(--ash-dim);
  max-width: 46ch;
}

/* 索引条里的说明单独占一行（后面跟着省市 chip） */
.country-index .index-note {
  flex: 1 0 100%;
  margin-bottom: 4px;
}

/* 国内：还没照片的省份 chip，只作展示 */
.country-chip.is-wait {
  color: var(--ash-dim);
  border-color: var(--line-soft, rgba(236, 230, 218, 0.12));
  cursor: default;
  opacity: 0.72;
}

.country-chip.is-wait:hover {
  color: var(--ash-dim);
  border-color: var(--line-soft, rgba(236, 230, 218, 0.12));
  background: transparent;
}

/* ---------- 4. 最新收录 ---------- */

.latest {
  padding-block: clamp(56px, 9vh, 108px);
  border-top: 1px solid var(--line-soft);
}

.latest-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 26px) clamp(12px, 1.4vw, 22px);
}

.latest-card { display: grid; gap: 12px; }

.latest-figure {
  margin: 0;
  position: relative;
  overflow: hidden;
  background: var(--wall-lift);
}

.latest-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s cubic-bezier(0.16, 1, 0.3, 1), filter 1.1s;
}

.latest-card:hover .latest-figure img { transform: scale(1.035); }

.latest-label h3 {
  margin: 0 0 5px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.latest-label span {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ash-dim);
}

/* 弧形照片长廊（React Bits CircularGallery 原生移植） */
/* 注意：.circular-gallery 自带 height:100%，这里必须用双类选择器压过它，否则高度塌成 0 */
.latest-gallery,
.latest-gallery.circular-gallery {
  height: clamp(400px, 58vh, 640px);
  touch-action: pan-y;
}

@media (max-width: 760px) {
  .latest-gallery,
  .latest-gallery.circular-gallery { height: 420px; }
}

.latest-gallery .circular-gallery:focus-visible {
  outline: 1px solid var(--line);
  outline-offset: 4px;
}

.circular-gallery {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}

.circular-gallery[data-pointer] { cursor: pointer; }
.circular-gallery[data-dragging] { cursor: grabbing; }

.cg-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.cg-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cg-label {
  position: absolute;
  top: 0;
  left: 0;
  line-height: 1.2;
  white-space: nowrap;
  will-change: transform, opacity;
}

.cg-caption {
  position: absolute;
  top: 0;
  left: 50%;
  width: min(90%, 36rem);
  text-align: center;
  opacity: 0;
  pointer-events: none;
}

.cg-caption p {
  margin: 0;
  line-height: 1.5;
  opacity: 0.65;
}

.cg-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.cg-close[data-visible] { opacity: 0.8; pointer-events: auto; }
.cg-close:hover { opacity: 1; }

/* ---------- 5. 页脚 ---------- */

.site-foot {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: clamp(24px, 5vw, 72px);
  padding-top: clamp(48px, 7vh, 84px);
  padding-bottom: clamp(40px, 6vh, 64px);
  border-top: 1px solid var(--line-soft);
}

.foot-block h3 {
  margin: 0 0 16px;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.28em;
  color: var(--ash-dim);
}

.foot-block p {
  margin: 0;
  max-width: 52ch;
  font-size: 13px;
  line-height: 2.05;
  color: var(--ash);
}

.foot-block a {
  color: var(--paper);
  border-bottom: 1px solid var(--line);
  transition: border-color 0.3s;
}

.foot-block a:hover { border-color: var(--paper); }

.colophon {
  grid-column: 1 / -1;
  margin: clamp(24px, 4vh, 40px) 0 0;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--ash-dim);
}

/* ---------- 6. 国家页首屏 ---------- */

.country-hero {
  --rv: 1;
  position: relative;
  touch-action: pan-y;
  height: calc(100svh + clamp(300px, 58vh, 660px));
  min-height: 880px;
  isolation: isolate;
}

.country-media {
  position: absolute;
  inset: 0;
  background: var(--wall-lift);
}

.country-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 安全灯：该国主色的暖光，压在图底 */
.country-glow {
  position: absolute;
  inset: auto 0 0 0;
  height: 70%;
  pointer-events: none;
  background: radial-gradient(ellipse 60% 70% at 14% 96%, var(--wash), transparent 62%);
  opacity: 0.9;
  mix-blend-mode: screen;
}

.country-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to top, var(--wall) 0%, rgba(23, 20, 18, 0.72) 26%, rgba(23, 20, 18, 0.06) 62%),
    linear-gradient(to right, rgba(23, 20, 18, 0.72) 0%, rgba(23, 20, 18, 0.12) 46%, transparent 66%),
    linear-gradient(to bottom, rgba(23, 20, 18, 0.65) 0%, transparent 22%);
}

.country-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(46px, 9vh, 92px);
}

/* 国家页标题随显影浮现：英文名 → 国名 → 引言 → 统计，同首页错峰 */
.country-hero .country-en-line,
.country-hero .country-name,
.country-hero .country-lede,
.country-hero .country-meta {
  --r: clamp(0, calc((var(--rv) - var(--d, 0.12)) / 0.18), 1);
  opacity: var(--r);
  transform: translateY(calc((1 - var(--r)) * 22px));
  will-change: opacity, transform;
}

.country-hero .country-en-line { --d: 0.08; }
.country-hero .country-name  { --d: 0.18; }
.country-hero .country-lede  { --d: 0.3; }
.country-hero .country-meta  { --d: 0.42; }

.country-hero .hero-hint {
  opacity: clamp(0, calc((0.66 - var(--rv)) / 0.26), 1);
}

.country-en-line {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.34em;
  color: var(--accent);
}

.country-en-line::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--accent);
}

.country-name {
  margin: 0.3em 0 0.28em;
  font-size: clamp(2.8rem, 8.4vw, 6.8rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.14em;
}

.country-lede {
  margin: 0;
  max-width: 42ch;
  font-size: clamp(14px, 1.1vw, 16px);
  line-height: 2.1;
  color: rgba(236, 230, 218, 0.78);
}

.country-meta {
  margin: 22px 0 0;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--accent);
}

/* 首屏提示：一个小点 + 一行小字 */
.hero-hint {
  position: absolute;
  right: var(--gutter);
  bottom: clamp(30px, 5vh, 46px);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: rgba(236, 230, 218, 0.45);
}

.hero-hint::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: hint-pulse 2.6s ease-in-out infinite;
}

@keyframes hint-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

/* ---------- 7. 章节画廊 ---------- */

.works {
  padding-block: clamp(52px, 9vh, 104px) clamp(40px, 6vh, 72px);
}

.chapter {
  padding-block: clamp(28px, 5vh, 56px);
  border-top: 1px solid var(--line-soft);
}

.chapter:first-child { border-top: 0; padding-top: 0; }

.chapter-head {
  display: grid;
  grid-template-columns: 3.4ch minmax(0, 1fr);
  grid-template-areas:
    "no name"
    "no meta"
    "no lede";
  gap: 0 clamp(12px, 2vw, 28px);
  margin-bottom: clamp(24px, 4vh, 44px);
}

.chapter-no {
  grid-area: no;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--accent);
  padding-top: 0.9em;
}

.chapter-name {
  grid-area: name;
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 2.5vw, 2.1rem);
  font-weight: 500;
  letter-spacing: 0.1em;
}

.chapter-meta {
  grid-area: meta;
  margin: 0 0 14px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--ash-dim);
}

.chapter-lede {
  grid-area: lede;
  margin: 0;
  max-width: 50ch;
  font-size: 14px;
  line-height: 2;
  color: var(--ash);
}

.chapter-body {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(14px, 2.2vw, 34px) clamp(12px, 1.8vw, 26px);
  align-items: start;
}

.work { display: block; }

.work-figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: var(--wall-lift);
}

.work-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), filter 1.2s;
}

.work:hover .work-figure img,
.work:focus-visible .work-figure img { transform: scale(1.03); }

/* 接触印样的内框 + 帧号 */
.work-figure::before,
.work-figure::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.work-figure::before {
  inset: 9px;
  border: 1px solid transparent;
  transition: border-color 0.5s;
}

.work:hover .work-figure::before { border-color: rgba(236, 230, 218, 0.42); }

.work-figure[data-no]::after {
  content: attr(data-no);
  position: absolute;
  left: 16px;
  bottom: 13px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: rgba(236, 230, 218, 0.9);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.45s, transform 0.45s;
}

.work:hover .work-figure[data-no]::after {
  opacity: 1;
  transform: none;
}

.work-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding-top: 12px;
}

.work-label h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.series-year {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ash-dim);
  white-space: nowrap;
}

/* 换个国家 */
.country-nav {
  padding-block: clamp(40px, 6vh, 72px) clamp(60px, 9vh, 100px);
  border-top: 1px solid var(--line-soft);
}

.country-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

/* ---------- 8. 详情页 ---------- */

.detail {
  padding-top: clamp(92px, 13vh, 140px);
  padding-bottom: clamp(56px, 8vh, 88px);
}

.backlink {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: clamp(22px, 3.4vh, 34px);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--ash-dim);
  transition: color 0.3s;
}

.backlink::before { content: "←"; font-size: 12px; }
.backlink:hover { color: var(--paper); }

.detail-figure {
  display: flex;
  justify-content: center;
  margin: 0 0 clamp(26px, 4vh, 44px);
  background: var(--wall-lift);
}

.detail-figure img {
  max-width: 100%;
  max-height: 76vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.detail-caption {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(20px, 4vw, 72px);
  max-width: 1120px;
  padding-top: clamp(22px, 3.2vh, 34px);
  border-top: 1px solid var(--line-soft);
}

.detail-crumb {
  display: inline-block;
  margin-bottom: 14px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--accent);
  text-transform: uppercase;
  transition: opacity 0.3s;
}

.detail-crumb:hover { opacity: 0.7; }

#detail-title {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 3.4vw, 2.8rem);
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.3;
  outline: none;
}

.detail-note {
  margin: 0 0 22px;
  font-size: 15px;
  line-height: 2.1;
  color: rgba(236, 230, 218, 0.86);
}

.detail-gear {
  margin: 0;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--ash-dim);
}

.detail-nav {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: clamp(36px, 6vh, 64px);
  padding-top: clamp(18px, 3vh, 26px);
  border-top: 1px solid var(--line-soft);
}

.detail-nav a {
  display: grid;
  gap: 9px;
  max-width: 44%;
  transition: opacity 0.3s;
}

.detail-nav a:hover { opacity: 0.62; }

.detail-nav .dir {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--ash-dim);
}

.detail-nav a span:last-child {
  font-size: 15px;
  letter-spacing: 0.04em;
}

#next-link { text-align: right; justify-items: end; }

/* 本辑其他照片：详情页底部的横向缩略条。看一张 → 看一组。 */
.detail-rail {
  margin-top: clamp(38px, 6vh, 68px);
  padding-top: clamp(20px, 3vh, 30px);
  border-top: 1px solid var(--line-soft);
}

.detail-rail:empty { display: none; }

.rail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 18px;
  margin-bottom: clamp(14px, 2.2vh, 20px);
}

.rail-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.rail-count {
  margin: 0;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--ash-dim);
}

#detail-count { color: var(--accent); }

.rail-track {
  display: flex;
  gap: clamp(10px, 1.2vw, 16px);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding-bottom: 10px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}

.rail-item {
  flex: 0 0 auto;
  width: 132px;
  display: grid;
  gap: 8px;
  scroll-snap-align: start;
  opacity: 0.5;
  transition: opacity 0.35s;
}

.rail-item figure {
  margin: 0;
  overflow: hidden;
  background: var(--wall-lift);
}

.rail-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rail-item span {
  font-size: 11px;
  line-height: 1.5;
  color: var(--ash);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rail-item:hover,
.rail-item:focus-visible { opacity: 0.85; }

.rail-item.is-current { opacity: 1; }

.rail-item.is-current figure {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}

.rail-item.is-current span { color: var(--paper); }

/* ---------- 9. 兜底与占位 ---------- */

.stand-in {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  border: 1px dashed var(--line);
  background: repeating-linear-gradient(135deg,
      rgba(236, 230, 218, 0.025) 0 8px, transparent 8px 16px);
  color: var(--ash-dim);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.16em;
}

.stand-in.is-big small { font-size: 11px; letter-spacing: 0.24em; }

.empty-note {
  padding-block: clamp(48px, 8vh, 96px);
  color: var(--ash-dim);
}

.empty-note p { margin: 0; font-size: 14px; line-height: 2; }

/* ---------- 10. 响应式 ---------- */

@media (max-width: 1080px) {
  .latest-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .chapter-body { gap: clamp(12px, 2vw, 22px); }
}

@media (max-width: 900px) {
  .explore { padding-top: clamp(56px, 9vh, 96px); }
  .explore-top {
    flex-direction: column;
    align-items: stretch;
    gap: clamp(18px, 3vh, 26px);
  }
  .scope-tabs { width: 100%; }
  .map-wrap { height: clamp(320px, 56vh, 460px); }

  .home-hero .hero-line { font-size: clamp(1.9rem, 7vw, 2.8rem); }
  .home-hero { --rv-blur: 2.5px; height: calc(100svh + 46vh); min-height: 640px; }
  .country-hero { --rv-blur: 2.5px; height: calc(100svh + 46vh); min-height: 640px; }
  .explore-head .hero-line { font-size: clamp(1.5rem, 5.6vw, 2rem); }

  .map-ctl { flex-direction: row; top: 8px; right: 8px; }
  .map-hint { left: 10px; right: auto; bottom: 12px; max-width: 60%; }

  .detail-caption { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .site-foot { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .latest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; }
  .latest-label h3 { font-size: 13px; }

  /* 手机上图片单列整幅 */
  .work { grid-column: 1 / -1 !important; }
  .work-label { padding-top: 10px; }

  .chapter-head { grid-template-columns: 2.6ch minmax(0, 1fr); }

  .country-name { letter-spacing: 0.1em; }
  .country-lede { font-size: 13px; }

  /* 滚动显影提示 */
  .hero-hint {
    left: var(--gutter);
    right: auto;
    bottom: 24px;
    font-size: 9px;
    letter-spacing: 0.16em;
  }
  .detail-figure img { max-height: 62vh; }
  .detail-nav { gap: 16px; }
  .detail-nav a { max-width: 48%; }
  .detail-nav a span:last-child { font-size: 13px; }
  .rail-item { width: 104px; }
  .rail-item span { font-size: 10px; }
}

@media (max-width: 420px) {
  .scope-tabs { flex-direction: column; }
  .scope-tab .scope-sub { white-space: normal; }
}

/* ---------- 11. 减少动态 ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .home-hero { --rv: 1; height: 100svh; min-height: 560px; }
  .country-hero { --rv: 1; height: 100svh; min-height: 560px; }
  .hero-pin { position: relative; }
  .hero-hint::before { animation: none; }
  .home-hero .hero-line > span,
  .country-hero .country-en-line,
  .country-hero .country-name,
  .country-hero .country-lede,
  .country-hero .country-meta { opacity: 1; transform: none; }
  .work-figure img,
  .latest-figure img { transition: none; }
  .country-media img { filter: none; }
}

/* ---------- 12. 通用动效（自 motion.css 合并） ---------- */

/* 显影 · 动效 token 层
   只放变量与通用入场基类，不写任何组件样式。 */

:root {
  /* 时长（5 档，不再增加）*/
  --dur-1: 220ms;   /* 按钮、链接、下划线等即时反馈 */
  --dur-2: 480ms;   /* 卡片悬停、图注跟随 */
  --dur-3: 800ms;   /* 文字与图注入场 */
  --dur-4: 1200ms;  /* 图片显影 */
  --dur-5: 1600ms;  /* 章节级编排 */

  /* 缓动（两个 + 一个线性）*/
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);  /* 入场：快出慢收 */
  --ease-ui: cubic-bezier(0.4, 0, 0.2, 1);         /* 小控件状态切换 */
  --ease-scrub: linear;                             /* 滚动进度映射 */

  /* 幅度 */
  --rise: 18px;        /* 入场位移上限 */
  --scale-in: 1.03;    /* 图片入场缩放上限 */
  --stagger: 70ms;     /* 同组逐个入场的间隔 */
}

/* 通用入场基类：
   由 JS 在元素将入视口前添加 .u-rise，进入视口后加 .is-in 复原。
   类名由 JS 添加，未启用 JavaScript 时内容始终可见（渐进增强）。 */
.u-rise {
  opacity: 0;
  transform: translateY(var(--rise));
  filter: blur(6px);
  transition:
    opacity var(--dur-3) var(--ease-out-expo),
    transform var(--dur-3) var(--ease-out-expo),
    filter var(--dur-3) var(--ease-out-expo);
  transition-delay: calc(var(--i, 0) * var(--stagger));
}

.u-rise.is-in {
  opacity: 1;
  transform: none;
  filter: none;
}

/* 统一降级：所有动效在减少动态偏好下静态呈现 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .u-rise {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}

/* ---------- 7. 404 ---------- */

.lost {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(12px, 2vh, 20px);
  padding-top: clamp(110px, 16vh, 190px);
  padding-bottom: clamp(60px, 10vh, 110px);
}

.lost-code {
  margin: 0;
  font-size: clamp(88px, 17vw, 190px);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: 0.02em;
  color: var(--paper);
  opacity: 0.13;
}

.lost-lede {
  margin: 0;
  max-width: 32ch;
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 2;
  color: var(--ash);
}

.lost-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(8px, 1.6vh, 16px);
}

.lost-btn {
  display: inline-flex;
  align-items: center;
  padding: 11px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--paper);
  text-decoration: none;
  transition: border-color 0.35s, background 0.35s;
}

.lost-btn:hover {
  border-color: var(--paper);
  background: rgba(236, 230, 218, 0.05);
}

.lost-btn.is-ghost { color: var(--ash); }

.lost-foot {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 0 var(--gutter) 40px;
}

/* ---------- 9. 显影特效（react-bits 风格，原生实现零依赖） ---------- */

/* 逐字显影：字形从模糊泛白逐字浮出，像影像在药水里显色 */
.dev-char {
  display: inline-block;
  font-style: normal;
  will-change: opacity, filter, transform;
  opacity: 0;
  filter: blur(9px);
  transform: translateY(0.16em) scale(1.015);
  transition:
    opacity 1s var(--ease-out-expo),
    filter 1s var(--ease-out-expo),
    transform 1s var(--ease-out-expo);
}

.dev-char.is-in {
  opacity: 1;
  filter: blur(0);
  transform: none;
}

/* 点击火花：细光自指针向外散开 */
.spark {
  position: fixed;
  z-index: 95;
  width: 0;
  height: 0;
  pointer-events: none;
}

.spark i {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 13px;
  margin-left: -0.5px;
  transform-origin: 50% 100%;
  background: linear-gradient(to top, rgba(236, 230, 218, 0), rgba(236, 230, 218, 0.92));
}

@media (prefers-reduced-motion: reduce) {
  .dev-char {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
  }
}

/* 光阱专题入口（国家页 → /photo/<slug>/lighttrap.html） */
.country-lt{
  display:flex;align-items:center;gap:12px;
  margin:0 auto 26px;max-width:1232px;
  padding:14px 18px;
  border:1px solid rgba(192,83,47,.42);
  border:1px solid color-mix(in srgb, var(--accent, #C0532F) 42%, transparent);
  border-radius:10px;
  color:var(--ink);text-decoration:none;
  font-size:14px;letter-spacing:.04em;
  background:rgba(192,83,47,.1);
  background:color-mix(in srgb, var(--accent, #C0532F) 10%, transparent);
  transition:background .25s ease,border-color .25s ease,transform .25s ease;
}
.country-lt i{
  width:8px;height:8px;border-radius:50%;
  background:var(--accent, #C0532F);
  box-shadow:0 0 0 4px rgba(192,83,47,.22);
}
.country-lt em{margin-left:auto;font-style:normal;opacity:.7;transition:transform .25s ease;}
.country-lt:hover{background:rgba(192,83,47,.18);background:color-mix(in srgb, var(--accent, #C0532F) 18%, transparent);}
.country-lt:hover em{transform:translateX(4px);}
.country-lt:focus-visible{outline:2px solid var(--accent, #C0532F);outline-offset:3px;}
@media (max-width:760px){
  .country-lt{margin:0 16px 22px;font-size:13px;padding:12px 14px;}
}
