@charset "UTF-8";
/* ==========================================================================
   宫墙有痕 · 伪满皇宫历史建筑数字展馆
   样式结构：变量 → 基础 → 通用组件 → 首页 → 建筑探索 → 历史 → 影像 → 尾声
   → 底部导航 → 弹窗 → 动效与响应式
   第二阶段视觉优化：紧凑底部导航 / 近全屏场景 / 可展开史料 / 横向展廊
   ========================================================================== */

:root {
  color-scheme: dark;
  --ink: #12110e;
  --deep: #0c0b09;
  --panel: #1b1915;
  --panel-soft: #232019;
  --paper: #f0e8d9;
  --muted: #b9ae9a;
  --gold: #cbb083;
  --gold-soft: #e6cda2;
  --line: rgba(203, 176, 131, .22);
  --line-strong: rgba(203, 176, 131, .42);
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  --nav-h: 52px;
  --nav-size: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.8;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

/* 极细颗粒质感，仅装饰、不吃点击 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 10;
  opacity: .03;
  pointer-events: none;
  background-image: url("../assets/images/grain.svg");
}

body.modal-open { overflow: hidden; }

p, h1, h2, h3 { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; }
h2 { font-size: 30px; line-height: 1.5; letter-spacing: .07em; }
h3 { font-size: 24px; }
p { overflow-wrap: break-word; }

img { max-width: 100%; display: block; }

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: 0;
  background: none;
}
a { color: inherit; text-decoration: none; }
button, a { touch-action: manipulation; -webkit-touch-callout: none; }
button:disabled { cursor: default; opacity: .5; }

button:focus-visible,
a:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #f4d6a1;
  outline-offset: 4px;
}

section[id] { scroll-margin-top: 20px; }

/* ---------- 通用组件 ---------- */
.wrap {
  width: calc(100% - 40px);
  max-width: 1240px;
  margin-inline: auto;
}

.eyebrow {
  font-size: 11px;
  color: var(--gold);
  letter-spacing: .17em;
  line-height: 1.8;
}

.skip-link {
  position: fixed;
  z-index: 60;
  top: 8px;
  left: 8px;
  background: var(--paper);
  color: var(--ink);
  padding: 12px;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  min-height: 44px;
  padding: 6px 0;
  font-size: 13px;
  color: var(--paper);
  border-bottom: 1px solid var(--line-strong);
}
.text-button span { font-size: 18px; color: var(--gold); }

.status { font-size: 13px; color: var(--gold); }
.status:empty { display: none; }

/* 图片失败兜底 */
.image-fallback {
  display: none;
  position: absolute;
  top: 34%;
  left: 20px;
  right: 20px;
  z-index: 1;
  text-align: center;
  color: var(--paper);
  font-size: 14px;
}
.media-frame.failed > .image-fallback { display: block; }
.media-frame.failed > img { visibility: hidden; }

/* ---------- 顶部品牌栏 ---------- */
.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 12;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 18px 14px;
  border-bottom: 1px solid rgba(238, 230, 215, .1);
  background: linear-gradient(180deg, rgba(10, 9, 7, .38), rgba(10, 9, 7, 0));
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: .13em;
  line-height: 1.3;
}
.brand small {
  display: block;
  margin-top: 4px;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: .03em;
  color: var(--muted);
}

.seal {
  display: grid;
  place-items: center;
  width: 32px;
  height: 36px;
  flex-shrink: 0;
  border: 1px solid var(--line-strong);
  color: var(--gold);
  font-size: 22px;
  line-height: 1;
}

.desktop-nav { display: none; }

.motion-toggle {
  min-height: 44px;
  padding: 4px 0 4px 8px;
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
}
.motion-toggle > span:first-child {
  margin-right: 3px;
  font-size: 18px;
  vertical-align: middle;
}

/* ---------- 序章 / 首屏 ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: #191712;
}

.hero-art {
  position: absolute;
  inset: 0;
  z-index: -3;
  overflow: hidden;
}
.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 48%;
  animation: drift 26s ease-in-out infinite alternate;
}
/* 三层明暗：上方压暗品牌栏、中部保护文字、底部融入正文 */
.hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(9, 8, 6, .6) 0%, rgba(9, 8, 6, .18) 26%, rgba(9, 8, 6, .48) 62%, #12110e 100%),
    linear-gradient(104deg, rgba(9, 8, 6, .62) 0%, rgba(9, 8, 6, .12) 58%, rgba(9, 8, 6, .38) 100%);
}
/* 柔和金色光晕，制造纵深 */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(120% 68% at 16% 40%, rgba(203, 176, 131, .12), transparent 62%),
    radial-gradient(80% 55% at 84% 10%, rgba(203, 176, 131, .06), transparent 60%);
}

.light-beam {
  position: absolute;
  left: 38%;
  top: -34%;
  width: 46%;
  height: 122%;
  transform: rotate(33deg);
  background: linear-gradient(90deg, transparent, rgba(228, 202, 151, .05), transparent);
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 720px;
  padding: 132px 22px 138px;
  animation: reveal 1.2s ease-out both;
}

.short-rule {
  display: inline-block;
  width: 22px;
  height: 1px;
  margin-right: 9px;
  background: var(--gold);
  vertical-align: middle;
}

.hero-preface {
  margin-top: 34px;
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: .2em;
  color: #dbcbb0;
  text-shadow: 0 2px 16px rgba(0, 0, 0, .55);
}

.hero h1 {
  margin: 12px 0 6px;
  font-size: clamp(52px, 16vw, 92px);
  letter-spacing: .09em;
  line-height: 1.3;
  white-space: nowrap;
  max-width: 100%;
  text-shadow: 0 6px 44px rgba(0, 0, 0, .45), 0 1px 2px rgba(0, 0, 0, .35);
}
.hero h1 span { color: #dcc396; }

.hero-english {
  font-size: 9px;
  letter-spacing: .2em;
  color: #cfc0a8;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .5);
}

.hero-description {
  margin-top: 28px;
  font-size: 15px;
  line-height: 2;
  color: #e0d4bf;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .55);
}

.primary-button {
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
  gap: 34px;
  min-height: 52px;
  margin-top: 32px;
  padding: 10px 22px;
  background: #ccb48a;
  color: #23201a;
  font-size: 15px;
  letter-spacing: .04em;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .28);
  transition: background .2s, transform .2s;
}
.primary-button span { font-size: 22px; line-height: 1; }
.primary-button:hover { background: #e0c9a3; transform: translateY(-2px); }

.hero-note {
  margin-top: 13px;
  font-size: 10px;
  letter-spacing: .12em;
  color: #b3a894;
}

.hero-date { display: none; }

.hero-bottom {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: calc(var(--nav-size) + 14px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 10px;
  color: var(--muted);
}
.scroll-cue { display: flex; align-items: center; gap: 9px; min-height: 44px; }
.scroll-cue > span { font-size: 20px; color: var(--gold); }
.art-label { max-width: 148px; text-align: right; font-size: 10px; }

/* ---------- 序章正文 ---------- */
.introduction {
  padding-block: 56px;
  border-bottom: 1px solid var(--line);
}
.introduction > div { margin-top: 22px; }
.introduction h2 { margin-bottom: 20px; }
.introduction > div > p {
  max-width: 580px;
  font-size: 15px;
  line-height: 2.1;
  color: var(--muted);
}
.source-inline {
  margin-left: 8px;
  padding-block: 12px;
  font-size: 11px;
  color: var(--gold);
  white-space: nowrap;
}

/* ---------- 区块标题 ---------- */
.section-heading {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 52px 0 22px;
}
.section-heading h2 { margin-top: 8px; }
.section-heading > p { font-size: 13px; color: var(--muted); }

/* ---------- 01 建筑探索：近全屏场景 ---------- */
.explore-section { padding-bottom: 12px; }

.scene-tabs {
  display: flex;
  gap: 4px;
  padding: 3px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  background: rgba(27, 25, 20, .8);
}

.scene-tabs button {
  position: relative;
  flex: 1;
  min-height: 44px;
  padding: 6px 2px;
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: .04em;
  color: #a89e8e;
  transition: color .2s, background .2s;
}
.scene-tabs button > span {
  display: inline-block;
  margin-right: 4px;
  font: 9px var(--sans);
  color: var(--gold);
  vertical-align: 1px;
}
.scene-tabs [aria-selected="true"] {
  color: #f6ead2;
  background: linear-gradient(180deg, rgba(203, 176, 131, .16), rgba(203, 176, 131, .06));
}
.scene-tabs [aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 16px;
  height: 1px;
  background: var(--gold);
  transform: translateX(-50%);
}

.scene-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--deep);
}

/* 场景舞台：手机上接近整屏 */
.scene-stage {
  position: relative;
  height: 78vh;
  height: max(78svh, 480px);
  max-height: 700px;
  overflow: hidden;
  touch-action: pan-y;
  background: radial-gradient(ellipse at 50% 26%, #5b4d38, #191813 74%);
  user-select: none;
  -webkit-user-select: none;
}
.scene-stage:focus { outline: none; }

.scene-track {
  display: flex;
  height: 100%;
  will-change: transform;
  transition: transform .52s cubic-bezier(.22, .68, .24, 1);
}

.scene-slide {
  position: relative;
  flex: 0 0 100%;
  height: 100%;
  overflow: hidden;
}
.scene-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 46%;
  transform: scale(1.05);
  transition: transform 1.1s ease-out;
}
.scene-slide:not([inert]) > img { transform: scale(1); }
.scene-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(8, 7, 5, .42) 0%, transparent 26%),
    linear-gradient(0deg, rgba(8, 7, 5, .5) 0%, transparent 34%);
}

.scene-image-label {
  position: absolute;
  left: 14px;
  top: 12px;
  z-index: 3;
  max-width: calc(100% - 28px);
  padding: 4px 9px;
  border: 1px solid var(--line);
  background: rgba(14, 13, 10, .72);
  color: #e2d8c7;
  font-size: 10px;
  letter-spacing: .04em;
}

/* 热点百分比坐标只在上方图像区域内解析，避免落到底部信息浮层上 */
.hotspots {
  position: absolute;
  inset: 0 0 42% 0;
  z-index: 4;
  transition: opacity .2s ease, visibility .2s ease;
}

/* 覆盖式信息层（手机/平板）里展开建筑说明时，暂时隐藏并停用背景热点，
   避免说明文字与热点标签重叠；收起说明后自动恢复。 */
@media (max-width: 899px) {
  .scene-panel.scene-expanded .hotspots {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}

.hotspot {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 64px;
  min-height: 44px;
  padding: 0;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  line-height: 1.5;
}
.hotspot-dot {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(233, 207, 159, .88);
  border-radius: 50%;
  background: rgba(18, 16, 12, .62);
  color: #f2e1c3;
  font-size: 19px;
  box-shadow: 0 0 0 6px rgba(233, 207, 159, .07), 0 6px 18px rgba(0, 0, 0, .4);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.hotspot-dot::after {
  content: "";
  position: absolute;
  inset: -7px;
  border: 1px solid rgba(233, 207, 159, .38);
  border-radius: 50%;
  animation: pulse 3s ease-out infinite;
}
.hotspot-label {
  margin-top: 7px;
  padding: 2px 8px;
  border: 1px solid rgba(203, 176, 131, .26);
  background: rgba(14, 13, 10, .6);
  color: #f4e8d5;
  font-size: 10.5px;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

/* 场景信息：手机为底部浮层（底部预留导航高度，避免被遮挡），桌面为右侧栏 */
.scene-info {
  position: absolute;
  inset: auto 0 0;
  z-index: 5;
  padding: 34px 16px calc(var(--nav-size) + 6px);
  background: linear-gradient(180deg,
    rgba(8, 7, 5, 0) 0%,
    rgba(8, 7, 5, .58) 32%,
    rgba(8, 7, 5, .9) 56%,
    rgba(8, 7, 5, .97) 100%);
  pointer-events: none;
}
.scene-info > h3,
.scene-info > .scene-subtitle,
.scene-info > .eyebrow { pointer-events: none; }

.scene-info h3 {
  margin-top: 2px;
  font-size: clamp(27px, 7.6vw, 36px);
  line-height: 1.3;
  letter-spacing: .12em;
  text-shadow: 0 2px 20px rgba(0, 0, 0, .6);
}

.scene-subtitle {
  margin-top: 3px;
  font-family: var(--serif);
  font-size: 13px;
  color: #d5c6ae;
  text-shadow: 0 1px 14px rgba(0, 0, 0, .6);
}

.scene-more { margin-top: 6px; pointer-events: auto; }
.scene-more > summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 2px 0;
  list-style: none;
  border-bottom: 1px solid rgba(203, 176, 131, .38);
  color: var(--gold-soft);
  font-size: 12.5px;
  letter-spacing: .06em;
  cursor: pointer;
}
.scene-more > summary::-webkit-details-marker { display: none; }
.scene-more > summary::after { content: "+"; font-size: 14px; line-height: 1; }
.scene-more[open] > summary::after { content: "−"; }
.scene-more-body {
  max-width: 46ch;
  margin-top: 8px;
  padding: 10px 12px;
  border-left: 1px solid rgba(203, 176, 131, .38);
  background: rgba(8, 7, 5, .58);
  color: #d3c7b1;
  font-size: 14px;
  line-height: 1.9;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.scene-more-body > p + p,
.scene-more-scroll > p + p { margin-top: 8px; }
.scene-more-body .reading-hint { color: var(--gold); font-size: 11px; }
.scene-more-body .reading-hint > span { margin-left: 5px; }

/* 说明正文可独立滚动：来源链接与「建筑说明」收起入口留在滚动区之外，始终可达 */
@media (max-width: 899px) {
  .scene-more-scroll {
    max-height: 200px;
    max-height: min(34svh, 200px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
}

.scene-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  margin-top: 6px;
  pointer-events: auto;
}
.scene-actions .text-button {
  min-height: 44px;
  gap: 9px;
  font-size: 12.5px;
  border-bottom-color: rgba(203, 176, 131, .5);
}
.scene-actions .text-button span { font-size: 15px; }
.scene-swipe-hint {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.scene-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 0;
  padding-top: 4px;
  border-top: 1px solid rgba(203, 176, 131, .16);
  color: #a99d88;
  font-size: 12px;
  pointer-events: auto;
}
.scene-foot a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--gold);
}
#scene-kicker { letter-spacing: .04em; }
#scene-count { margin-left: auto; letter-spacing: .16em; color: #bfae90; }
/* 320 窄屏：资料来源移入“建筑说明”，这里默认隐藏，避免底部信息行拥挤 */
.scene-source-inline {
  display: none;
  align-items: center;
  min-height: 44px;
  margin-top: 2px;
  padding: 2px 0;
  border-bottom: 1px solid rgba(203, 176, 131, .38);
  color: var(--gold-soft);
  font-size: 12.5px;
  letter-spacing: .03em;
}

/* 首次进入时短暂出现的滑动提示（不拦截点击） */
.scene-swipe-toast {
  position: absolute;
  left: 50%;
  bottom: 46%;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border: 1px solid rgba(203, 176, 131, .42);
  border-radius: 999px;
  background: rgba(10, 9, 7, .74);
  color: #f1e5d0;
  font-size: 12px;
  letter-spacing: .06em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 6px);
  transition: opacity .45s ease, transform .45s ease, visibility .45s;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.scene-swipe-toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.explore-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
  font-size: 10px;
  line-height: 1.8;
  color: var(--muted);
}
.explore-legend > span { display: flex; gap: 9px; }
.explore-legend i {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  margin-top: 7px;
  border: 1px solid var(--gold);
  border-radius: 50%;
}
.explore-legend > a {
  align-self: flex-end;
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--gold);
}

/* ---------- 02 历史回望 ---------- */
.history-section { padding-bottom: 52px; }

.timeline {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}
.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 16px;
  padding: 22px 0 20px;
  border-top: 1px solid var(--line);
}
.timeline-year {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  line-height: 1.5;
  color: var(--gold);
}
.timeline-year > span { display: block; font-size: 15px; }
.timeline h3 { margin: 2px 0 9px; font-size: 19px; line-height: 1.6; }
.timeline-lead {
  color: #b6ab98;
  font-size: 14.5px;
  line-height: 1.95;
}

.timeline-more { margin-top: 10px; }
.timeline-more > summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 2px 0;
  list-style: none;
  border-bottom: 1px solid rgba(203, 176, 131, .32);
  color: var(--gold);
  font-size: 11.5px;
  letter-spacing: .05em;
  cursor: pointer;
}
.timeline-more > summary::-webkit-details-marker { display: none; }
.timeline-more > summary::after { content: "+"; font-size: 13px; line-height: 1; }
.timeline-more[open] > summary::after { content: "−"; }

.timeline-detail {
  padding-top: 10px;
  animation: detail-in .28s ease-out;
}
.timeline-detail p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.95;
}
.timeline-detail a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--gold);
  font-size: 10.5px;
}
.interpretation {
  display: block;
  font-size: 10px;
  color: #948a79;
}

/* ---------- 03 影像档案：沉浸式横向展廊 ---------- */
.archive-section {
  position: relative;
  padding-bottom: 42px;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(90% 40% at 50% 0%, rgba(203, 176, 131, .07), transparent 68%),
    linear-gradient(180deg, #0e0d0a 0%, #17150f 46%, #0e0d0a 100%);
  color: var(--paper);
}
.archive-section .section-heading { padding: 46px 0 16px; }
.archive-section .section-heading > p { color: var(--muted); }

.archive-notice {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 0 18px;
  border-top: 1px solid var(--line);
  color: #a2967f;
  font-size: 11.5px;
  line-height: 1.85;
}
.archive-scroll-hint { color: var(--gold); letter-spacing: .05em; }

.gallery {
  display: flex;
  gap: 12px;
  margin-inline: -20px;
  padding: 2px 20px 12px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.gallery::-webkit-scrollbar { display: none; }

.gallery-card {
  position: relative;
  flex: 0 0 76%;
  max-width: 330px;
  padding: 0;
  text-align: left;
  color: var(--paper);
  scroll-snap-align: start;
}

.gallery-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  max-height: 62svh;
  background: #2a271f;
}
.gallery-frame > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s ease-out;
}
.gallery-card:hover .gallery-frame > img { transform: scale(1.04); }

.gallery-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 3px 9px;
  background: rgba(14, 13, 10, .74);
  color: #ddd2bf;
  font-size: 9.5px;
  letter-spacing: .05em;
}

.gallery-caption {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  padding: 46px 13px 13px;
  background: linear-gradient(180deg, rgba(8, 7, 5, 0) 0%, rgba(8, 7, 5, .72) 52%, rgba(8, 7, 5, .94) 100%);
}
.gallery-caption strong {
  display: block;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 400;
  letter-spacing: .08em;
}
.gallery-caption small {
  display: block;
  margin-top: 2px;
  color: #b9ab93;
  font-size: 9.5px;
  letter-spacing: .1em;
}
.gallery-caption .gallery-arrow { color: var(--gold-soft); font-size: 18px; line-height: 1; }

.archive-video {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  margin-top: 22px;
  padding: 16px 0;
  border-block: 1px solid var(--line);
  text-align: left;
  color: var(--paper);
}
.play-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--gold-soft);
  font-size: 20px;
}
.archive-video small {
  display: block;
  color: var(--gold);
  font-size: 8.5px;
  letter-spacing: .12em;
}
.archive-video strong {
  display: block;
  margin-top: 3px;
  font: 19px/1.55 var(--serif);
  letter-spacing: .05em;
}
.archive-video > span:nth-child(2) > span {
  display: block;
  color: #a39780;
  font-size: 10.5px;
}
.video-arrow { margin-left: auto; color: var(--gold); font-size: 20px; }

/* ---------- 尾声 / 页脚 ---------- */
.epilogue {
  position: relative;
  padding-block: 68px calc(48px);
  text-align: center;
}
.end-mark {
  display: inline-block;
  margin-top: 26px;
  padding: 4px 12px;
  border: 1px solid rgba(122, 99, 67, .28);
  color: rgba(203, 176, 131, .3);
  font: 38px var(--serif);
}
.epilogue h2 { margin-top: 24px; font-size: 26px; line-height: 1.8; }
.epilogue > p:not(.eyebrow) {
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 2.05;
}
.epilogue > .text-button { margin-top: 26px; gap: 36px; }
.back-home {
  display: block;
  max-width: 150px;
  margin: 14px auto 0;
  padding: 12px;
  color: var(--muted);
  font-size: 11px;
}

.site-footer {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-block: 24px calc(var(--nav-size) + 20px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}
.site-footer > div > span {
  font: 16px var(--serif);
  letter-spacing: .13em;
  color: var(--gold);
}
.site-footer > div > p { margin-top: 6px; }

/* ---------- 底部导航（紧凑四项） ---------- */
.mobile-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 0 4px;
  padding-bottom: constant(safe-area-inset-bottom);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  border-top: 1px solid rgba(203, 176, 131, .16);
  background: rgba(14, 13, 10, .93);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  backdrop-filter: blur(14px) saturate(120%);
  box-shadow: 0 -10px 26px rgba(0, 0, 0, .38);
}
.mobile-nav a {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: var(--nav-h);
  padding: 6px 0 5px;
  color: #bcb09b;
  font-size: 12px;
  letter-spacing: .04em;
  line-height: 1.35;
}
.mobile-nav a > span {
  font: 17px/1.15 var(--serif);
  color: #a19684;
}
.mobile-nav a[aria-current] { color: var(--gold-soft); }
.mobile-nav a[aria-current] > span { color: var(--gold); }
.mobile-nav a[aria-current]::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 20px;
  height: 2px;
  background: var(--gold);
  transform: translateX(-50%);
}

/* ---------- 详情弹窗 ---------- */
.modal[hidden] { display: none; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.modal-shade {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 4, .8);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
}
.modal-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: 92vh;
  max-height: 92dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 20px calc(18px + env(safe-area-inset-bottom, 0px));
  border: 1px solid var(--line);
  border-bottom: 0;
  background: var(--panel);
  animation: sheet-in .3s ease-out;
  scrollbar-width: thin;
  scrollbar-color: #8c7857 var(--panel);
  -webkit-overflow-scrolling: touch;
}
.modal-top {
  position: sticky;
  top: -12px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-block: 6px;
  background: var(--panel);
}
.close-button {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  color: var(--gold);
  font: 26px/1 var(--sans);
}
.modal-body h2 { margin: 10px 0 14px; font-size: 27px; line-height: 1.45; }
.detail-classification { margin-top: 14px; font-size: 11px; color: var(--gold); }
.modal-body p:not([class]) {
  margin-bottom: 14px;
  color: #c9beac;
  font-size: 15.5px;
  line-height: 2;
}
.modal-body img {
  width: 100%;
  height: auto;
  max-height: 46vh;
  object-fit: contain;
  background: var(--deep);
}
.modal-body .media-frame { position: relative; min-height: 150px; }
.modal-body .media-frame.failed { aspect-ratio: 4 / 3; }

.detail-source {
  display: inline-flex;
  min-height: 44px;
  padding-block: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--gold);
  font-size: 12px;
}
.modal-return { margin-top: 22px; margin-bottom: 4px; }

.photo-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}
.photo-tools button {
  min-height: 44px;
  padding: 4px 14px;
  border: 1px solid var(--line);
  color: var(--gold);
  font-size: 13px;
}

.video-player {
  display: block;
  width: 100%;
  max-height: 48vh;
  background: #000;
}
.media-empty {
  padding: 30px 16px;
  border: 1px solid var(--line);
  background: var(--deep);
  text-align: center;
}
.media-empty > span {
  display: block;
  margin-bottom: 10px;
  color: var(--gold);
  font-size: 30px;
}
.media-empty strong {
  display: block;
  margin-bottom: 10px;
  font: 21px/1.5 var(--serif);
  font-weight: 400;
}
.media-empty p { font-size: 14px !important; }
.video-status { margin-top: 12px; color: var(--gold) !important; font-size: 13px !important; }
.retry-button {
  display: inline-block;
  min-height: 44px;
  margin-top: 14px;
  padding: 8px 18px;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 14px;
}

.video-index { display: grid; gap: 10px; margin-top: 16px; }
.video-index-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-height: 64px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  background: #1e1c17;
  text-align: left;
}
.video-index-item strong {
  display: block;
  font: 19px var(--serif);
  font-weight: 400;
  letter-spacing: .06em;
}
.video-index-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}
.video-index-item > span:last-child { flex-shrink: 0; color: var(--gold); font-size: 17px; }
.video-back {
  min-height: 44px;
  padding-block: 10px;
  color: var(--gold);
  font-size: 12px;
  text-align: left;
}

.noscript-message {
  margin-bottom: var(--nav-size);
  padding: 20px;
  background: #342c20;
  color: var(--paper);
  font-size: 14px;
}

/* ---------- 动效 ---------- */
@keyframes drift {
  from { transform: scale(1.015) translateX(-.4%); }
  to { transform: scale(1.06) translateX(.4%); }
}
@keyframes reveal {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0% { transform: scale(.85); opacity: .8; }
  80%, 100% { transform: scale(1.45); opacity: 0; }
}
@keyframes sheet-in {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes detail-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.motion-reduced *,
.motion-reduced *::before,
.motion-reduced *::after {
  animation: none !important;
  transition: none !important;
}
.motion-reduced { scroll-behavior: auto; }

/* ---------- 响应式：平板 ---------- */
@media (min-width: 600px) {
  .wrap { width: calc(100% - 88px); }
  .site-header { padding-inline: 40px; }
  .hero-content { padding-left: 44px; padding-right: 44px; }
  .hero h1 { font-size: 100px; }
  .hero-bottom { left: 44px; right: 44px; }
  .introduction { padding-block: 68px; }
  .introduction h2 { font-size: 32px; }
  .scene-stage { height: max(80svh, 540px); }
  .scene-info { padding-inline: 24px; }
  .scene-info h3 { font-size: 40px; }
  .scene-subtitle { font-size: 15px; }
  .hotspot-label { font-size: 11.5px; }
  .timeline li { grid-template-columns: 120px 1fr; gap: 28px; }
  .timeline-year { font-size: 32px; }
  .timeline-year > span { display: inline; font-size: 18px; margin-left: 4px; }
  .timeline h3 { font-size: 22px; }
  .timeline-lead { font-size: 15px; }
  .gallery { margin-inline: 0; padding-inline: 0; gap: 16px; }
  .gallery-card { flex-basis: 46%; }
  .archive-video { margin-top: 26px; padding-block: 18px; gap: 20px; }
  .archive-video strong { font-size: 23px; }
  .modal { align-items: center; padding: 24px; }
  .modal-card { max-width: 760px; border-bottom: 1px solid var(--line); padding-inline: 30px; }
  .epilogue h2 { font-size: 34px; }
}

/* ---------- 响应式：桌面 ---------- */
@media (min-width: 900px) {
  h2 { font-size: 38px; }
  .wrap { width: calc(100% - 128px); }

  .site-header { padding: 22px 52px; }
  .brand { font-size: 21px; }
  .brand small { font-size: 10px; }
  .seal { width: 36px; height: 42px; }
  .desktop-nav { display: flex; gap: 34px; color: #d0c4af; font-size: 12px; }
  .desktop-nav a { display: flex; align-items: center; min-height: 44px; }
  .motion-toggle { font-size: 12px; }

  .hero { min-height: 740px; min-height: 100svh; }
  .hero-art img { object-position: center 54%; }
  .hero-content {
    margin-left: max(0px, calc((100vw - 1368px) / 2));
    padding: 138px 64px;
  }
  .hero h1 { margin: 10px 0; font-size: 112px; letter-spacing: .15em; }
  .hero-preface { margin-top: 36px; font-size: 16px; }
  .hero-english { font-size: 10px; letter-spacing: .32em; }
  .hero-description { margin-top: 26px; font-size: 16px; }
  .hero-date {
    position: absolute;
    right: 62px;
    top: 42%;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--gold);
    font-family: Georgia, serif;
    font-size: 14px;
    letter-spacing: .1em;
  }
  .hero-date i { width: 1px; height: 84px; margin: 16px 0; background: var(--line); }
  .hero-bottom { left: 64px; right: 62px; bottom: 30px; font-size: 11px; }
  .art-label { max-width: none; }

  .introduction {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 56px;
    padding-block: 80px;
  }
  .introduction > div {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    align-items: center;
    gap: 56px;
    margin: 0;
  }
  .introduction h2 { margin: 0; font-size: 33px; }
  .introduction > div > p { font-size: 15px; }

  .section-heading {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    padding: 74px 0 20px;
    margin-bottom: 10px;
  }

  /* 场景：左图右文 */
  .scene-tabs { max-width: 560px; padding: 4px; margin-bottom: 12px; }
  .scene-tabs button { min-height: 46px; font-size: 18px; }
  .scene-tabs button > span { font-size: 10px; margin-right: 10px; }

  .scene-panel {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    min-height: 540px;
  }
  .scene-stage {
    height: 100%;
    min-height: 540px;
    max-height: none;
    cursor: grab;
  }
  .hotspots { inset: 0; }
  .scene-stage:active { cursor: grabbing; }
  .scene-info {
    position: static;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 34px 30px 22px;
    background: linear-gradient(180deg, #1e1b16, #17150f);
    pointer-events: auto;
    -webkit-user-select: text;
    user-select: text;
  }
  .scene-info h3 { font-size: 44px; }
  .scene-subtitle { margin-top: 8px; font-size: 16px; }
  .scene-more { margin-top: 18px; }
  .scene-more > summary { display: none; }
  .scene-more-body {
    display: block;
    max-width: none;
    margin-top: 0;
    padding: 0;
    border: 0;
    background: none;
    font-size: 14.5px;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .scene-actions { margin-top: 18px; gap: 8px 22px; }
  .scene-actions .text-button { font-size: 13px; }
  .scene-swipe-hint { display: none; }
  .scene-swipe-toast { display: none; }
  .scene-foot { margin-top: 14px; padding-top: 10px; }
  .scene-foot a { min-height: 44px; }

  .explore-legend {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    font-size: 11px;
  }
  .explore-legend > a { align-self: auto; }

  .history-section { padding-bottom: 76px; }
  .timeline {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    margin-top: 26px;
  }
  .timeline li {
    display: block;
    padding: 22px 0 0;
  }
  .timeline li::before {
    content: "";
    position: absolute;
    top: -3px;
    left: 0;
    width: 5px;
    height: 5px;
    border: 1px solid var(--gold);
    background: var(--ink);
  }
  .timeline-year { display: block; min-height: 78px; font-size: 36px; }
  .timeline-year > span { display: inline; font-size: 19px; margin-left: 4px; }
  .timeline h3 { font-size: 20px; margin-bottom: 12px; }
  .timeline-lead { font-size: 14px; }

  .archive-section { padding-bottom: 60px; }
  .archive-section .section-heading { padding: 74px 0 20px; }
  .gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    overflow: visible;
    scroll-snap-type: none;
  }
  .gallery-card { flex: none; max-width: none; }
  .gallery-frame { aspect-ratio: 4 / 5; max-height: none; }
  .gallery-caption strong { font-size: 24px; }
  .archive-scroll-hint { display: none; }
  .archive-video { margin-top: 30px; padding-block: 20px; gap: 24px; }
  .archive-video strong { font-size: 25px; }
  .play-icon { width: 58px; height: 58px; font-size: 24px; }

  .epilogue { padding-block: 90px 70px; }
  .epilogue h2 { font-size: 38px; }

  .site-footer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding-block: 28px;
  }
  .site-footer > p { text-align: right; }

  .mobile-nav { display: none; }
}

/* ---------- 窄屏（320–359） ---------- */
@media (max-width: 359px) {
  .wrap { width: calc(100% - 32px); }
  .site-header { padding-inline: 15px; }
  .brand { font-size: 16px; gap: 8px; }
  .brand small { font-size: 8px; }
  .seal { width: 30px; height: 34px; font-size: 20px; }
  .motion-toggle { font-size: 10px; }
  .hero-content { padding-inline: 18px; }
  .hero h1 { font-size: clamp(48px, 16.4vw, 58px); letter-spacing: .07em; }
  .hero-preface { font-size: 13px; letter-spacing: .14em; }
  .hero-description { font-size: 14px; }
  .hero-bottom { left: 18px; right: 18px; gap: 8px; }
  .art-label { max-width: 118px; font-size: 9px; }
  .scene-tabs button { font-size: 13.5px; }
  .scene-tabs button > span { display: none; }
  .scene-info { padding-inline: 13px; }
  .scene-info h3 { font-size: 27px; }
  .hotspot-label { font-size: 10px; padding-inline: 6px; }
  .timeline li { grid-template-columns: 66px 1fr; gap: 12px; }
  .timeline-year { font-size: 22px; }
  .timeline h3 { font-size: 17px; }
  .gallery { margin-inline: -16px; padding-inline: 16px; }
  .gallery-card { flex-basis: 84%; }
  .eyebrow { letter-spacing: .1em; }
}

/* ---------- 矮屏（如 320×568、360×640） ---------- */
@media (max-height: 700px) {
  .hero {
    flex-direction: column;
    align-items: stretch;
    min-height: auto;
    padding: 88px 0 calc(var(--nav-size) + 20px);
  }
  .hero-content { max-width: none; padding: 0 20px; }
  .hero-preface { margin-top: 20px; font-size: 13px; letter-spacing: .15em; }
  .hero h1 { margin: 8px 0 4px; font-size: clamp(48px, 15.4vw, 74px); }
  .hero-description { margin-top: 20px; font-size: 14px; line-height: 1.9; }
  .primary-button { margin-top: 22px; min-height: 48px; }
  .hero-bottom {
    position: static;
    margin-top: 18px;
    padding: 0 20px;
  }
  .scroll-cue { display: none; }
  .art-label { max-width: none; text-align: left; }
}

/* ---------- 矮屏场景（≤700px 高，手机竖屏）：压缩浮层，把画面留给建筑 ---------- */
@media (max-height: 700px) and (max-width: 899px) {
  /* 舞台抬高：同样的浮层高度下，露出的画面更多 */
  .scene-stage { height: max(80svh, 470px); max-height: 640px; }

  .scene-info {
    padding: 13px 14px calc(var(--nav-size) + 2px);
    background: linear-gradient(180deg,
      rgba(8, 7, 5, 0) 0%,
      rgba(8, 7, 5, .34) 22%,
      rgba(8, 7, 5, .8) 50%,
      rgba(8, 7, 5, .96) 100%);
  }
  /* 建筑名与副题同一行，省掉一整行高度 */
  .scene-info h3 {
    display: inline;
    font-size: 22px;
    line-height: 1.4;
    letter-spacing: .1em;
  }
  .scene-info .scene-subtitle {
    display: inline;
    margin: 0 0 0 8px;
    font-size: 11.5px;
    letter-spacing: .01em;
  }
  .scene-more { margin-top: 3px; }
  .scene-more > summary { min-height: 44px; font-size: 12px; }
  .scene-more-body {
    padding: 8px 10px;
    font-size: 12.5px;
    line-height: 1.8;
  }
  .scene-actions { margin-top: 0; gap: 0 14px; }
  .scene-actions .text-button { min-height: 44px; font-size: 12px; gap: 7px; }
  .scene-actions .text-button span { font-size: 13px; }
  .scene-foot {
    gap: 10px;
    margin-top: 0;
    padding-top: 2px;
    border-top: 0;
    font-size: 12px;
    line-height: 1.5;
  }
  .scene-foot a { min-height: 44px; }
}

/* ---------- 320 窄屏收口：底部只留场景名与序号，名称与副题分行 ---------- */
@media (max-width: 359px) {
  /* 舞台再抬高一点，信息层加高后仍留出足够画面 */
  .scene-stage { height: max(80svh, 500px); }

  .scene-info { padding: 12px 13px calc(var(--nav-size) + 2px); }
  /* 名称与副题各自独立成行，避免在 320px 上并排挤压或被截断 */
  .scene-info h3 {
    display: block;
    margin: 0;
    font-size: 21px;
    line-height: 1.35;
    letter-spacing: .08em;
  }
  .scene-info .scene-subtitle {
    display: block;
    margin: 1px 0 0;
    font-size: 12px;
    line-height: 1.5;
    letter-spacing: 0;
  }
  .scene-more > summary { min-height: 44px; font-size: 12px; }
  .scene-actions .text-button { min-height: 44px; font-size: 12px; }

  /* 底部信息行只保留场景名称 + 场景序号，字号不低于 12px */
  .scene-foot {
    gap: 8px;
    margin-top: 0;
    padding-top: 4px;
    border-top: 0;
    font-size: 12px;
    line-height: 1.5;
    letter-spacing: .03em;
  }
  .scene-foot #scene-source { display: none; }
  .scene-more-body .scene-source-inline { display: inline-flex; }

  /* 展开说明时：正文内部滚动区收窄，保证整块信息层仍留在舞台内，
     收起入口（summary）在滚动区之上、来源链接在滚动区之下，始终可达 */
  .scene-panel.scene-expanded .scene-more-scroll { max-height: min(26svh, 152px); }
  .scene-panel.scene-expanded .scene-more-body { padding: 8px 10px 6px; }
}

/* ---------- 减少动态 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
