/* =========================================================
   汤姆的奇妙冒险 · 站点样式
   基调：暗、冷、克制。一点暖色只留给「人」走过的地方。
   ========================================================= */

:root {
  --bg: #0a0b0d;
  --bg-soft: #0f1114;
  --bg-card: #121418;
  --ink: #e9e5dd;
  --ink-dim: #a9a39b;
  --ink-mute: #6d6862;
  --line: rgba(233, 229, 221, 0.11);
  --line-strong: rgba(233, 229, 221, 0.22);
  --accent: #c8884c;
  --accent-soft: rgba(200, 136, 76, 0.16);
  --cold: #7e9aa9;
  --serif: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --pad: clamp(20px, 5vw, 64px);
  --maxw: 1180px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

[hidden] { display: none !important; }

::selection { background: rgba(200, 136, 76, 0.3); color: #fff; }

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

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

/* 胶片颗粒 */
.grain {
  position: fixed;
  inset: -50%;
  z-index: 900;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='160' height='160' filter='url(%23n)' opacity='0.55'/></svg>");
  animation: grainShift 6s steps(6) infinite;
}
@keyframes grainShift {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-2%, 1%); }
  40% { transform: translate(1%, -2%); }
  60% { transform: translate(-1%, -1%); }
  80% { transform: translate(2%, 1%); }
}

/* 顶部进度条 */
.progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--accent), rgba(200, 136, 76, 0.2));
  z-index: 950;
  transition: width 0.1s linear;
}

/* ---------------- 顶栏 ---------------- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 800;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--pad);
  transition: padding 0.5s var(--ease), background 0.5s var(--ease), border-color 0.5s;
  border-bottom: 1px solid transparent;
}
.topbar.solid {
  padding: 14px var(--pad);
  background: rgba(10, 11, 13, 0.78);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.14em;
  color: var(--ink);
}
.brand i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(200, 136, 76, 0.5);
  animation: brandPulse 3.2s ease-out infinite;
}
@keyframes brandPulse {
  0% { box-shadow: 0 0 0 0 rgba(200, 136, 76, 0.45); }
  70% { box-shadow: 0 0 0 9px rgba(200, 136, 76, 0); }
  100% { box-shadow: 0 0 0 0 rgba(200, 136, 76, 0); }
}
.topbar nav { display: flex; gap: clamp(16px, 3vw, 40px); }
.topbar nav a {
  position: relative;
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--ink-dim);
  transition: color 0.3s;
}
.topbar nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.45s var(--ease);
}
.topbar nav a:hover { color: var(--ink); }
.topbar nav a:hover::after { width: 100%; }

/* ---------------- 首页大图 ---------------- */
.hero {
  position: relative;
  height: 100svh;
  min-height: 620px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-repeat: no-repeat;
  transform: scale(1.06);
  filter: saturate(0.82) contrast(1.06) brightness(0.74);
  animation: kenburns 44s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes kenburns {
  from { transform: scale(1.06) translate3d(0, 0, 0); }
  to { transform: scale(1.16) translate3d(-1.5%, -1.5%, 0); }
}
.hero-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 75% 65% at 46% 42%, rgba(0, 0, 0, 0) 0%, rgba(8, 9, 11, 0.45) 58%, rgba(8, 9, 11, 0.92) 100%),
    linear-gradient(180deg, rgba(8, 9, 11, 0.62) 0%, rgba(8, 9, 11, 0.1) 26%, rgba(10, 11, 13, 0.55) 76%, #0a0b0d 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad) clamp(72px, 13vh, 150px);
}
.kicker {
  margin: 0 0 22px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.34em;
  color: var(--accent);
  text-transform: uppercase;
  opacity: 0;
  animation: fadeUp 1.1s var(--ease) 0.15s forwards;
}
.hero-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 9.2vw, 116px);
  line-height: 0.98;
  letter-spacing: 0.03em;
  text-shadow: 0 4px 60px rgba(0, 0, 0, 0.55);
  opacity: 0;
  animation: fadeUp 1.3s var(--ease) 0.3s forwards;
}
.hero-title em {
  font-style: normal;
  color: var(--accent);
  position: relative;
  padding: 0 0.06em;
}
.hero-en {
  margin: 26px 0 0;
  font-size: clamp(13px, 1.5vw, 17px);
  letter-spacing: 0.14em;
  color: rgba(233, 229, 221, 0.82);
  font-weight: 300;
  opacity: 0;
  animation: fadeUp 1.3s var(--ease) 0.5s forwards;
}
.hero-zh {
  margin: 6px 0 0;
  font-family: var(--serif);
  font-size: clamp(13px, 1.4vw, 16px);
  letter-spacing: 0.3em;
  color: var(--ink-mute);
  opacity: 0;
  animation: fadeUp 1.3s var(--ease) 0.62s forwards;
}
.hero-stats {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: clamp(30px, 5vh, 48px);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--ink-dim);
  opacity: 0;
  animation: fadeUp 1.3s var(--ease) 0.8s forwards;
}
.hero-stats b {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  color: var(--ink);
  margin-right: 4px;
}
.hero-stats i { width: 1px; height: 16px; background: var(--line-strong); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-scroll {
  position: absolute;
  right: var(--pad);
  bottom: clamp(40px, 8vh, 90px);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--ink-mute);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.3em;
  writing-mode: vertical-rl;
  opacity: 0;
  animation: fadeUp 1.4s var(--ease) 1.1s forwards;
}
.hero-scroll i {
  width: 1px;
  height: 46px;
  background: linear-gradient(to bottom, var(--ink-mute), transparent);
  animation: scrollLine 2.4s ease-in-out infinite;
}
@keyframes scrollLine {
  0%, 100% { opacity: 0.25; transform: scaleY(0.6); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
}

/* ---------------- 通用区块 ---------------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(72px, 11vh, 140px) var(--pad);
}
.section-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: clamp(36px, 6vh, 64px);
}
.section-head .idx {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.2em;
}
.section-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 3.6vw, 42px);
  letter-spacing: 0.08em;
}
.section-head .rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
  margin-bottom: 8px;
}
.section-head .sub-en {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--ink-mute);
  text-transform: uppercase;
  white-space: nowrap;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------------- 关于 ---------------- */
.about-body { max-width: 680px; }
.about-body p {
  position: relative;
  margin: 0 0 26px;
  padding-left: 22px;
  font-family: var(--serif);
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 2.15;
  letter-spacing: 0.05em;
  color: var(--ink-dim);
}
.about-body p::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 1px; height: 1.6em;
  background: var(--accent);
  opacity: 0.7;
}

/* ---------------- 地图 ---------------- */
.map-wrap {
  position: relative;
  height: clamp(400px, 60vh, 620px);
  border: 1px solid var(--line);
  background: #0d0f12;
  overflow: hidden;
}
.map { position: absolute; inset: 0; background: #0d0f12; }

/* 高德瓦片反色成暗色地图 */
.map .leaflet-tile-pane { filter: invert(1) hue-rotate(186deg) brightness(0.82) contrast(0.92) saturate(0.45); }
.map .leaflet-tile-pane::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 45%, rgba(10, 11, 13, 0.1), rgba(10, 11, 13, 0.62) 100%);
  z-index: 500;
  pointer-events: none;
}
.map.leaflet-container { background: #0d0f12; font-family: var(--sans); }
.map .leaflet-control-attribution {
  background: rgba(10, 11, 13, 0.6) !important;
  color: var(--ink-mute) !important;
  font-size: 9px !important;
  border-radius: 0;
}
.map .leaflet-control-attribution a { color: var(--ink-mute) !important; }
.map .leaflet-control-zoom a {
  background: rgba(16, 18, 21, 0.9) !important;
  color: var(--ink-dim) !important;
  border-color: var(--line) !important;
  backdrop-filter: blur(6px);
}
.map .leaflet-control-zoom a:hover { color: var(--accent) !important; }

.map-legend {
  position: absolute;
  left: 16px; bottom: 16px;
  z-index: 600;
  display: flex;
  gap: 16px;
  padding: 9px 14px;
  background: rgba(10, 11, 13, 0.72);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-dim);
}
.map-legend span { display: flex; align-items: center; gap: 7px; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot--done { background: var(--accent); box-shadow: 0 0 10px rgba(200, 136, 76, 0.8); }
.dot--plan { background: transparent; border: 1px solid var(--cold); }

.map-tip {
  position: absolute;
  right: 16px; bottom: 16px;
  z-index: 600;
  max-width: 260px;
  padding: 9px 14px;
  background: rgba(10, 11, 13, 0.72);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-mute);
  transition: opacity 0.4s;
}
.map-tip.hide { opacity: 0; pointer-events: none; }

/* 地图标记 */
.mk { position: relative; display: grid; place-items: center; width: 0; height: 0; }
.mk-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(200, 136, 76, 0.9), 0 0 0 1px rgba(255, 240, 220, 0.5);
  transform: translate(-50%, -50%);
  transition: transform 0.35s var(--ease);
}
.mk--plan .mk-dot {
  background: #0a0b0d;
  border: 1px solid var(--cold);
  box-shadow: 0 0 10px rgba(126, 154, 169, 0.55);
}
.mk-ring {
  position: absolute;
  width: 9px; height: 9px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  transform: translate(-50%, -50%);
  animation: ping 3s ease-out infinite;
}
.mk--plan .mk-ring { border-color: var(--cold); animation-duration: 4.5s; }
@keyframes ping {
  0% { opacity: 0.75; transform: translate(-50%, -50%) scale(1); }
  80%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(5.2); }
}
.mk-name {
  position: absolute;
  left: 12px; top: 0;
  transform: translateY(-50%);
  white-space: nowrap;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink);
  background: rgba(10, 11, 13, 0.72);
  border-left: 1px solid var(--accent);
  padding: 2px 8px;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s var(--ease);
  pointer-events: none;
}
.mk--plan .mk-name { border-left-color: var(--cold); color: var(--ink-dim); }
.mk:hover .mk-name, .mk.active .mk-name { opacity: 1; transform: translate(0, -50%) translateX(2px); }
.mk:hover .mk-dot { transform: translate(-50%, -50%) scale(1.55); }
.mk.active .mk-dot { transform: translate(-50%, -50%) scale(1.8); }

.map-lists { margin-top: 26px; display: grid; gap: 14px; }
.chip-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}
.chip-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--ink-mute);
  text-transform: uppercase;
  min-width: 62px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.014);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
  transition: all 0.35s var(--ease);
}
.chip span {
  font-size: 10px;
  color: var(--ink-mute);
  letter-spacing: 0.08em;
}
.chip i {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.chip--plan i { background: transparent; border: 1px solid var(--cold); }
.chip:hover {
  border-color: var(--accent);
  color: var(--ink);
  background: var(--accent-soft);
  transform: translateY(-2px);
}
.chip--plan:hover { border-color: var(--cold); background: rgba(126, 154, 169, 0.1); }

/* ---------------- 时间轴 ---------------- */
.tl { position: relative; }
.tl::before {
  content: "";
  position: absolute;
  left: 116px;
  top: 8px; bottom: 8px;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--line-strong) 6%, var(--line-strong) 94%, transparent);
}
.tl-year {
  display: grid;
  grid-template-columns: 96px 40px 1fr;
  align-items: center;
  margin: 56px 0 26px;
}
.tl-year:first-child { margin-top: 0; }
.tl-year span {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: 0.04em;
  color: rgba(233, 229, 221, 0.16);
  text-align: right;
}
.tl-item {
  display: grid;
  grid-template-columns: 96px 40px 1fr;
  align-items: start;
  margin-bottom: 22px;
}
.tl-node { position: relative; display: flex; justify-content: center; padding-top: 26px; }
.tl-node i {
  position: relative;
  z-index: 2;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--accent);
  box-shadow: 0 0 0 4px var(--bg);
  transition: all 0.4s var(--ease);
}
.tl-item:hover .tl-node i {
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--bg), 0 0 16px rgba(200, 136, 76, 0.85);
}
.tl-date {
  padding-top: 20px;
  text-align: right;
  padding-right: 8px;
}
.tl-date b {
  display: block;
  font-family: var(--serif);
  font-size: 17px;      /* 月份，主字号 */
  font-weight: 400;
  color: var(--ink-dim);
  line-height: 1.25;
}
.tl-date span {
  display: block;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 12.5px;    /* 日期，和月份只差一档，不再一大一小 */
  letter-spacing: 0.06em;
  color: var(--ink-mute);
}
.tl-card {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 22px;
  padding: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.026), rgba(255, 255, 255, 0));
  cursor: pointer;
  transition: border-color 0.45s var(--ease), transform 0.45s var(--ease), background 0.45s;
}
.tl-card:hover {
  border-color: rgba(200, 136, 76, 0.45);
  transform: translateY(-3px);
  background: linear-gradient(135deg, rgba(200, 136, 76, 0.07), rgba(255, 255, 255, 0));
}
.tl-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.9) brightness(0.92);
  transition: filter 0.6s, transform 0.6s var(--ease);
  overflow: hidden;
  background: #0b0d10;
}
.tl-card:hover .tl-thumb { filter: saturate(1.05) brightness(1); transform: scale(1.015); }
.tl-thumb--empty {
  display: grid;
  place-items: center;
  background: repeating-linear-gradient(45deg, #101216, #101216 6px, #0c0e11 6px, #0c0e11 12px);
  border: 1px solid var(--line);
}
.tl-thumb--empty span {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.28em;
  color: rgba(233, 229, 221, 0.18);
}
.tl-body { padding: 8px 8px 8px 0; display: flex; flex-direction: column; justify-content: center; }
.tl-body h3 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 400;
  letter-spacing: 0.05em;
}
.tl-body h3 .en {
  display: block;
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.tl-region {
  margin: 0 0 10px;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: var(--accent);
}
.tl-story {
  margin: 0 0 14px;
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--ink-dim);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tl-open {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.35s;
}
.tl-open::after {
  content: "";
  width: 18px; height: 1px;
  background: currentColor;
  transition: width 0.4s var(--ease);
}
.tl-card:hover .tl-open { color: var(--accent); }
.tl-card:hover .tl-open::after { width: 30px; }

.empty {
  padding: 40px;
  border: 1px dashed var(--line);
  text-align: center;
  color: var(--ink-mute);
  font-size: 13px;
}

/* ---------------- 页脚 ---------------- */
.foot {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(60px, 9vh, 110px) var(--pad) 70px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.foot-line {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: clamp(16px, 2vw, 21px);
  letter-spacing: 0.16em;
  color: var(--ink-dim);
}
.foot-meta {
  margin: 6px 0 0;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.foot-meta a:hover { color: var(--accent); }

/* 备案号：工信部要求首页底部展示且可点击跳转 beian.miit.gov.cn
   字号/对比度要足够清晰，不能被判「未正确添加、影响识别」，故不复用 .foot-meta 的极小字号与宽字距 */
.foot-icp {
  margin: 12px 0 0;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: 0.02em;
  color: var(--ink-dim);
}
.foot-icp a {
  color: var(--ink-dim);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.foot-icp a:hover,
.foot-icp a:focus-visible {
  color: var(--ink);
  border-bottom-color: var(--accent);
}
@media (max-width: 640px) {
  .foot-icp { font-size: 14px; }
}

/* ---------------- 相册灯箱 ---------------- */
.lb {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  background: rgba(7, 8, 10, 0.94);
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  animation: lbIn 0.4s var(--ease);
}
@keyframes lbIn { from { opacity: 0; } to { opacity: 1; } }
.lb-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px var(--pad) 10px;
}
.lb-info h4 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(18px, 2.4vw, 26px);
  font-weight: 400;
  letter-spacing: 0.08em;
}
.lb-info p {
  margin: 6px 0 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
  text-transform: uppercase;
}
.lb-close {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  color: var(--ink-dim);
  font-size: 14px;
  transition: all 0.3s;
  flex: none;
}
.lb-close:hover { border-color: var(--accent); color: var(--accent); transform: rotate(90deg); }

.lb-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 clamp(8px, 2vw, 24px);
}
.lb-figure {
  flex: 1;
  min-width: 0;
  margin: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.lb-figure img {
  max-width: 100%;
  max-height: calc(100% - 40px);
  object-fit: contain;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transition: opacity 0.45s var(--ease);
}
.lb-figure img.ready { opacity: 1; }
.lb-figure figcaption {
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--ink-dim);
  text-align: center;
  max-width: 80%;
}
/* 没写注释时不占位置（不显示） */
.lb-figure figcaption:empty { display: none; }
.lb-nav {
  flex: none;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  color: var(--ink-dim);
  font-size: 22px;
  line-height: 1;
  transition: all 0.3s;
}
.lb-nav:hover { border-color: var(--accent); color: var(--accent); background: rgba(200, 136, 76, 0.08); }
.lb-nav[disabled] { opacity: 0.18; pointer-events: none; }

.lb-foot {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px var(--pad) 20px;
}
.lb-thumbs {
  flex: 1;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding: 4px 0;
}
.lb-thumbs::-webkit-scrollbar { height: 3px; }
.lb-thumbs::-webkit-scrollbar-thumb { background: var(--line-strong); }
.lb-thumbs img {
  width: 74px;
  height: 52px;
  object-fit: cover;
  flex: none;
  opacity: 0.4;
  filter: grayscale(0.6);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.3s;
}
.lb-thumbs img:hover { opacity: 0.8; filter: none; }
.lb-thumbs img.on { opacity: 1; filter: none; border-color: var(--accent); }
.lb-count {
  flex: none;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
}
.lb-empty {
  margin: auto;
  text-align: center;
  color: var(--ink-mute);
  font-size: 13px;
  letter-spacing: 0.1em;
  line-height: 2;
}
.lb-empty b { display: block; font-family: var(--serif); font-size: 20px; color: var(--ink-dim); margin-bottom: 8px; }

body.lb-open { overflow: hidden; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 900px) {
  .tl::before { left: 13px; }

  /* 年份：改成简单的左对齐块，和卡片文字对齐 */
  .tl-year {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 40px 0 16px;
    padding-left: 38px;
  }
  .tl-year span { text-align: left; font-size: 24px; }

  /* 关键：用命名区域把「节点 / 日期 / 卡片」固定住，
     不能靠自动排布，否则卡片会被塞进 0 宽的第一列压成一条 */
  .tl-item {
    grid-template-columns: 26px minmax(0, 1fr);
    grid-template-areas:
      "node date"
      "node card";
    column-gap: 12px;
    align-items: start;
  }
  .tl-node { grid-area: node; padding-top: 6px; justify-content: center; }
  .tl-date {
    grid-area: date;
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 0 0 8px;
    text-align: left;
  }
  .tl-date b { font-size: 15.5px; }
  .tl-date span { display: inline; margin-top: 0; font-size: 12px; }
  .tl-card { grid-area: card; grid-template-columns: 1fr; gap: 12px; }
  .tl-thumb { aspect-ratio: 16 / 10; }
  .tl-body { padding: 0 12px 14px; }

  .section-head .sub-en { display: none; }
  .map-tip { display: none; }
}

@media (max-width: 640px) {
  .topbar { padding: 16px var(--pad); }
  .brand { font-size: 13px; }
  .topbar nav { gap: 16px; }
  .topbar nav a { font-size: 12px; }
  .hero-scroll { display: none; }
  .map-wrap { height: 66vh; }
  .chip-label { width: 100%; }
  .lb-nav { width: 38px; height: 38px; font-size: 18px; }
  .lb-thumbs img { width: 56px; height: 40px; }
  .lb-bar { padding: 16px var(--pad) 8px; }
}

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

/* 时间轴卡片上的「第 N 次」标记 */
.tl-times {
  margin-left: 10px;
  padding: 1px 6px;
  border: 1px solid rgba(200, 136, 76, 0.45);
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--accent);
  vertical-align: middle;
  white-space: nowrap;
}

/* 灯箱里的到访切换 */
.lb-visits { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.lb-visit {
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
  background: transparent;
  transition: all 0.25s var(--ease);
}
.lb-visit:hover { border-color: rgba(200, 136, 76, 0.5); color: var(--ink-dim); }
.lb-visit.on {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
