/* ============================================================
 * styles1.1.3.css — 开头封面 + 18 幅展陈合并版
 * 纯白底 / 近黑文字 / 1px 细黑线 / Helvetica 系无衬线 / 大留白
 * 强调色仅用一处：赭红（界面强调色，与展厅墙面解耦）
 * ============================================================ */

:root {
  /* —— 白盒色板 —— */
  --paper: #ffffff;
  --paper2: #f5f4f2;
  --card: #ffffff;
  --ink: #1a1a1a;
  --ink2: #3f3f3f;
  --ink3: #6b6b6b;
  --ink4: #949494;
  --hair: #111111;
  --hair-soft: rgba(17, 17, 17, 0.16);
  --hair-faint: rgba(17, 17, 17, 0.08);
  --rust: #9c5330;

  --line: rgba(17, 17, 17, 0.18);
  --line-soft: rgba(17, 17, 17, 0.08);
  --line-strong: rgba(17, 17, 17, 0.42);

  --sans: 'Helvetica Neue', Helvetica, Arial, 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', sans-serif;
  --mono: 'SF Mono', ui-monospace, 'Cascadia Code', Consolas, 'Microsoft YaHei', monospace;

  /* 中文古典书法感字体栈：楷体优先，其次仿宋 / 宋体 */
  --serif: 'Kaiti SC', 'STKaiti', KaiTi, '楷体', 'FangSong', '仿宋',
    'Songti SC', 'SimSun', '宋体', 'Noto Serif CJK SC', 'Source Han Serif SC', serif;

  /* 开场题字专用隶书栈：优先加载内嵌的四字子集，保证各设备字形一致 */
  --lishu: 'LiShuTitle', 'STLiti', '华文隶书', LiSu, '隶书', 'SIMLI', serif;

  --radius: 0px;
}

/* 华文隶书四字子集（观境悠然），仅 3.6KB */
@font-face {
  font-family: 'LiShuTitle';
  src: url('assets/lishu-title.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--paper2);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  outline: none;
}

/* ---------- 开场封面：毛玻璃门头 + 主题字 ---------- */
.cover {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2.2vh, 22px);
  padding: 26px 16px;
  background:
    radial-gradient(125% 92% at 50% 0%, #fbfaf9 0%, #f2f1ee 52%, #e8e7e3 100%);
  opacity: 0;
  visibility: hidden;
  transition: opacity .55s ease, visibility .55s ease;
}
.cover.show { opacity: 1; visibility: visible; }
.cover.dismissed {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* 图像板块：宽高同时受视口宽高约束，保证桌面与手机都是完整竖幅，不裁切建筑 */
.cover-plate {
  position: relative;
  width: min(566px, calc(100vw - 32px), calc((100vh - 240px) * 0.6667));
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #e9e8e5;
  border: 1px solid var(--hair);
  box-shadow: 0 26px 68px rgba(17, 17, 17, 0.15);
  container-type: inline-size;
}
.cover-plate img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 主题字背后的柔光，让灰字在磨砂玻璃上依然清晰 */
.cover-halo {
  position: absolute;
  left: 50%;
  top: 34%;
  transform: translate(-50%, -50%);
  width: 148%;
  height: 50%;
  background: radial-gradient(ellipse at center,
    rgba(255, 255, 255, 0.18) 0%,
    rgba(255, 255, 255, 0.08) 46%,
    rgba(255, 255, 255, 0) 74%);
  pointer-events: none;
}

.cover-title {
  position: absolute;
  left: 50%;
  top: 34%;
  transform: translate(-50%, -50%);
  margin: 0;
  font-family: var(--lishu);
  font-weight: 400;   /* 用隶书原生字形，避免合成粗体把笔锋挤硬 */
  /* 回退值：按视口宽度估；支持容器查询的浏览器改用图片区宽度精确自适应 */
  font-size: clamp(32px, 9.6vw, 60px);
  font-size: clamp(32px, 11cqw, 62px);
  letter-spacing: .26em;
  text-indent: .26em;  /* 抵消末字后的字距，保持视觉居中 */
  /* 兜底：不支持文字描边的浏览器仍显示实心字 */
  /* 浅灰 + 细描边：让题字退进墙面，不做画面里最跳的元素 */
  color: #8b8882;
  -webkit-text-stroke-color: #8b8882;
  -webkit-text-stroke-width: clamp(1.5px, 0.4cqw, 2.2px);
  /* 极轻的柔化：磨掉燕尾、折笔处的硬尖角，轮廓更顺；
     用 filter 而非 text-shadow，避免把镂空的字内重新填成灰 */
  filter: blur(.35px);
  -webkit-font-smoothing: antialiased;
  white-space: nowrap;
  line-height: 1.2;
  text-shadow: none;
}

/* 字内镂空，只留外轮廓，露出背后的墙面 */
@supports (-webkit-text-stroke-width: 1px) {
  .cover-title {
    color: transparent;
    -webkit-text-fill-color: transparent;
  }
}

.cover-note {
  margin: 0;
  font-size: 16.5px;
  letter-spacing: .2em;
  text-transform: none;
  color: var(--ink3);
  text-align: center;
}

/* 画廊英文名：小字、宽字距，做成门头招牌式的副行 */
.cover-note-en {
  display: block;
  margin-top: 8px;
  font-size: 13.5px;
  letter-spacing: .26em;
  text-indent: .26em;   /* 抵消末字后的字距，保持视觉居中 */
  color: var(--ink4);
}

.cover-enter {
  padding: 11px 32px;
  font-size: 12px;
  letter-spacing: .2em;
}

/* 封面提示：说明点击「开始参观」后会先选择参观方式 */
.cover-hint {
  margin: 0;
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--ink4);
  text-align: center;
}
.cover-hint b {
  font-weight: 500;
  color: var(--ink3);
}

/* ---------- 通用 UI 层 ---------- */
.ui-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

button {
  font-family: var(--sans);
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  padding: 9px 18px;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  pointer-events: auto;
  transition: background .18s, color .18s, border-color .18s;
  -webkit-tap-highlight-color: transparent;
}
button:hover { background: var(--hair); color: #fff; }
button:active { transform: translateY(1px); }
button.is-active {
  background: var(--rust);
  border-color: var(--rust);
  color: #fff;
}
button.ghost { background: transparent; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 30px;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--hair);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.brand { display: flex; flex-direction: column; gap: 5px; }
.brand .kicker {
  font-size: 10px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--ink3);
}
.brand h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: .02em;
  line-height: 1.1;
  color: var(--ink);
}
.brand small {
  color: var(--ink4);
  font-size: 10px;
  letter-spacing: .24em;
  text-transform: uppercase;
}

.top-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- HUD ---------- */
.online-badge {
  position: absolute;
  top: 94px; right: 30px;
  display: flex; align-items: center; gap: 8px;
  padding: 6px 13px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line-strong);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--ink2);
}
.online-badge .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--rust);
}

.crosshair {
  position: absolute;
  top: 50%; left: 50%;
  width: 5px; height: 5px;
  margin: -2.5px 0 0 -2.5px;
  border-radius: 50%;
  background: rgba(17, 17, 17, 0.32);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.75);
}

.bottom-hint {
  position: absolute;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  padding: 9px 18px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line-strong);
  font-size: 11.5px;
  letter-spacing: .05em;
  color: var(--ink2);
  white-space: nowrap;
  max-width: 92vw;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 移动端摇杆 ---------- */
.joystick {
  display: none;
  position: absolute;
  left: 28px; bottom: 88px;
  width: 108px; height: 108px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--line-strong);
  pointer-events: auto;
  touch-action: none;
}
.joystick .knob {
  position: absolute;
  top: 50%; left: 50%;
  width: 42px; height: 42px;
  margin: -21px 0 0 -21px;
  border-radius: 50%;
  background: var(--hair);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}
.joystick .label {
  position: absolute;
  bottom: -22px; left: 0; right: 0;
  text-align: center;
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink3);
}
body.touch-device .joystick { display: block; }

/* ---------- 抽屉：作品目录 ---------- */
.drawer {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(370px, 92vw);
  background: #fff;
  border-left: 1px solid var(--hair);
  padding: 28px 24px;
  transform: translateX(102%);
  transition: transform .28s cubic-bezier(.22,.8,.25,1);
  pointer-events: auto;
  overflow-y: auto;
}
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.drawer-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.drawer-sub {
  color: var(--ink3);
  font-size: 11.5px;
  letter-spacing: .04em;
  margin: 0 0 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--hair);
}

.art-item {
  position: relative;
  display: flex; gap: 14px; align-items: center;
  width: 100%;
  padding: 14px 0;
  margin-bottom: 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: padding .18s, background .18s;
}
.art-item:hover { background: var(--paper2); padding-left: 10px; padding-right: 10px; }
/* 1.1.3：18 幅里有 42×91 的竖长条，cover 会把画面裁掉，
   改用 contain 并垫一层浅底，保留完整画幅比例 */
.art-item img {
  width: 62px; height: 52px; object-fit: contain;
  border: 1px solid var(--line-soft);
  background: #f4f2ef; flex: none;
  padding: 1px;
}
.art-item .meta { min-width: 0; }
.art-item .meta strong {
  display: block;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .01em;
  margin-bottom: 4px;
}
.art-item .meta span {
  display: block;
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.art-item .idx {
  margin-left: auto;
  color: var(--ink4);
  font-size: 11px;
  letter-spacing: .1em;
  flex: none;
}

/* ---------- 详情面板 ---------- */
.overlay {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: auto;
  z-index: 20;
}
.overlay.open { display: flex; }

.detail-card {
  position: relative;
  width: min(940px, 96vw);
  max-height: min(660px, 88vh);
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  background: var(--card);
  border: 1px solid var(--hair);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.16);
}
.detail-visual {
  position: relative;
  background: #f0efed;
  min-height: 330px;
  padding: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
  border-right: 1px solid var(--hair);
}
.detail-visual img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  min-width: 0;
  object-fit: contain;
  display: block;
  background: #e9e8e5;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.16);
}

/* ---------- 详情大图缩放（1.1.4） ----------
 * 结构：.detail-visual > .zoom-wrap > img
 * 缩放通过 transform: translate() scale() 实现，
 * 图片本身保持 object-fit: contain，缩放时不会变形。 */
.zoom-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}
.zoom-wrap.is-dragging { cursor: grabbing; }
.zoom-wrap.is-zoomed { cursor: grab; }
.zoom-wrap img {
  transform-origin: center center;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

/* 缩放工具条：右下角一排小按钮 */
.zoom-tools {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 1px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line-strong);
  z-index: 3;
}
.zoom-tools button {
  width: 28px;
  height: 26px;
  padding: 0;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--ink2);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  font-family: var(--mono);
}
.zoom-tools button:last-child { border-right: 0; }
.zoom-tools button:hover { background: var(--ink); color: #fff; }
.zoom-level {
  min-width: 46px;
  padding: 0 6px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink3);
  text-align: center;
  letter-spacing: .04em;
}
.zoom-hint {
  position: absolute;
  left: 16px;
  bottom: 16px;
  margin: 0;
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--ink4);
  pointer-events: none;
  z-index: 2;
}
.detail-visual .tag {
  position: absolute; left: 16px; top: 16px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line-strong);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink2);
}
.detail-body { padding: 32px 32px 26px; overflow-y: auto; display: flex; flex-direction: column; min-width: 0; }
.detail-body h2 {
  margin: 0 0 12px;
  font-size: 27px;
  font-weight: 500;
  letter-spacing: .01em;
  line-height: 1.2;
}
.detail-meta {
  color: var(--ink3);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 22px;
  line-height: 1.7;
}
/* 1.1.3：作品尺寸（厘米）与展区标注 */
.detail-size {
  display: inline-block;
  margin-left: 10px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  color: var(--ink2);
  letter-spacing: .08em;
}
.detail-desc {
  font-size: 14px;
  line-height: 1.95;
  color: var(--ink2);
  margin: 0 0 24px;
}

/* ---------- 英文说明（1.1.4） ---------- */
.detail-title-en {
  margin: -6px 0 10px;
  font-size: 13px;
  font-style: italic;
  letter-spacing: .04em;
  color: var(--ink3);
  line-height: 1.5;
}
.detail-en {
  position: relative;
  padding: 16px 0 0 42px;
  margin: 0 0 26px;
  border-top: 1px solid var(--hair-faint);
}
.en-label {
  position: absolute;
  left: 0;
  top: 18px;
  display: inline-block;
  padding: 2px 6px;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .14em;
  color: var(--ink3);
}
.detail-desc-en {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--ink3);
  font-family: var(--serif);
}

.detail-divider { height: 1px; background: var(--hair); margin: 2px 0 18px; }
.social-title {
  font-size: 10.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink3);
  margin-bottom: 14px;
}

.reaction-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.reaction-row button {
  font-size: 12px;
  padding: 7px 13px;
  text-transform: none;
  letter-spacing: .02em;
  border-color: var(--line);
}
.reaction-row button:hover { border-color: var(--hair); }

.detail-social-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.detail-social-bar button { padding: 7px 16px; font-size: 12px; }
.like-count { font-size: 11.5px; color: var(--ink3); letter-spacing: .04em; }

.message-list {
  flex: 1; min-height: 62px; max-height: 138px;
  overflow-y: auto; margin: 0 0 20px; padding: 0; list-style: none;
  border-top: 1px solid var(--line-soft);
}
.message-list li {
  font-size: 12.5px;
  color: var(--ink2);
  padding: 10px 0;
  margin: 0;
  border-bottom: 1px solid var(--line-soft);
  display: flex; justify-content: space-between; gap: 12px;
}
.message-list li span { color: var(--ink4); font-size: 10.5px; white-space: nowrap; }
.message-list .empty {
  color: var(--ink4);
  padding: 12px 0;
  border-bottom: none;
}

.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.detail-actions button { flex: 1; min-width: 88px; font-size: 11.5px; padding: 10px 8px; }
.detail-actions .primary {
  background: var(--hair);
  border-color: var(--hair);
  color: #fff;
}
.detail-actions .primary:hover { background: var(--rust); border-color: var(--rust); }

.close-x {
  position: absolute; top: 14px; right: 14px;
  width: 34px; height: 34px; padding: 0;
  border-radius: 50%; font-size: 18px; line-height: 1;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--hair);
  z-index: 2;
  text-transform: none;
  letter-spacing: 0;
}

/* ---------- 操作说明 ---------- */
.guide-card {
  width: min(560px, 94vw);
  background: var(--card);
  border: 1px solid var(--hair);
  padding: 34px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.16);
}
.guide-card h2 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.guide-card p.sub {
  margin: 0 0 24px;
  color: var(--ink3);
  font-size: 11.5px;
  letter-spacing: .04em;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--hair);
}
.guide-card table { width: 100%; border-collapse: collapse; font-size: 13px; }
.guide-card td { padding: 11px 0; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.guide-card td:first-child {
  color: var(--ink3);
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  width: 108px;
  white-space: nowrap;
}
.guide-card td:last-child { color: var(--ink2); line-height: 1.7; }
.guide-note {
  margin-top: 24px; padding: 14px 16px;
  background: var(--paper2);
  border-left: 2px solid var(--hair);
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--ink2);
}
.guide-note strong { font-size: 12px; color: var(--ink); }

/* ---------- 加载 / 错误 ---------- */
.loading, .fatal {
  position: fixed; inset: 0; z-index: 40;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 16px;
  background: var(--paper2);
  transition: opacity .45s;
  text-align: center;
  padding: 24px;
}
.loading.hide { opacity: 0; pointer-events: none; }
.loading .ring {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line-strong);
  border-top-color: var(--hair);
  animation: spin .9s linear infinite;
}
.loading small, .fatal small { color: var(--ink3); font-size: 11.5px; letter-spacing: .1em; line-height: 1.8; }
.fatal strong { font-size: 15px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; }
@keyframes spin { to { transform: rotate(360deg); } }
.fatal { display: none; }

/* ---------- 备案信息页脚 ---------- */
.site-footer {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 12;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.94);
  border-top: 1px solid var(--hair);
  font-size: 11px;
  color: var(--ink3);
  pointer-events: auto;
}
.site-footer[hidden] { display: none; }
.site-footer span:empty { display: none; }
.site-footer a { color: var(--ink2); text-decoration: none; }
.site-footer a:hover { color: var(--rust); text-decoration: underline; }
body.has-footer .bottom-hint { bottom: 56px; }

/* ---------- 移动端 ---------- */
@media (max-width: 760px) {
  body.has-footer .bottom-hint { bottom: 72px; }
  .cover { gap: 14px; padding: 20px 14px; }
  .cover-plate {
    width: min(420px, calc(100vw - 28px), calc((100vh - 216px) * 0.6667));
  }
  .cover-title { letter-spacing: .24em; text-indent: .24em; }
  .cover-note { font-size: 15px; letter-spacing: .22em; }
  .cover-enter { padding: 10px 26px; font-size: 11px; }
  .cover-hint { font-size: 11px; line-height: 1.6; padding: 0 12px; }
  .site-footer { gap: 2px; font-size: 10px; padding: 6px 10px; flex-direction: column; line-height: 1.4; }
  .site-footer span { max-width: 100%; text-align: center; overflow-wrap: anywhere; }
  .topbar { padding: 12px 14px; flex-direction: column; align-items: stretch; gap: 12px; }
  .brand h1 { font-size: 19px; }
  .brand small { font-size: 9px; letter-spacing: .18em; }
  /* 按钮变多后（返回 / 公众号），改成单行横向滚动，避免换行压住「演示」徽标 */
  .top-actions {
    gap: 5px;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }
  .top-actions::-webkit-scrollbar { display: none; }
  .top-actions button { padding: 7px 9px; font-size: 10px; flex: none; white-space: nowrap; letter-spacing: .06em; }
  /* 「← 返回」箭头不占额外宽度 */
  .top-actions .btn-back { padding-left: 8px; }
  .online-badge { top: 112px; left: 14px; right: auto; font-size: 10px; }
  .bottom-hint { bottom: 16px; font-size: 10px; padding: 8px 12px; }
  .detail-card {
    grid-template-columns: minmax(0, 1fr);
    max-height: 88vh;
    width: calc(100vw - 24px);
    overflow-y: auto;
    overflow-x: hidden;
  }
  .detail-visual { min-height: 0; height: 210px; padding: 14px; border-right: none; border-bottom: 1px solid var(--hair); }
  .zoom-hint { left: 14px; bottom: 12px; font-size: 9px; letter-spacing: .06em; }
  .zoom-tools { right: 10px; bottom: 10px; }
  .zoom-tools button { width: 30px; height: 28px; }
  .detail-body { padding: 22px 20px; min-width: 0; overflow-x: hidden; }
  .detail-body h2 { font-size: 22px; }
  .detail-title-en { font-size: 12px; margin: -4px 0 8px; }
  .detail-en { padding-left: 0; padding-top: 14px; }
  .en-label { position: static; display: inline-block; margin-bottom: 8px; }
  .detail-desc-en { font-size: 12px; line-height: 1.8; }
  .reaction-row { gap: 6px; }
  .reaction-row button { font-size: 11.5px; padding: 6px 10px; }
  .detail-actions button { flex: 1 1 28%; min-width: 0; font-size: 11px; padding: 10px 5px; }
  .message-list { max-height: 92px; }
  .overlay { align-items: flex-end; padding: 12px; }
  .drawer { padding: 22px 16px; }
  .guide-card { padding: 24px 20px; }
}

/* ============================================================
 * 模式选择层：参观模式（三维漫游）/ 浏览模式（按编号翻阅）
 * ============================================================ */
.mode-pick { z-index: 26; }
.mode-card {
  width: min(700px, 94vw);
  background: var(--card);
  border: 1px solid var(--hair);
  padding: 38px 38px 26px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .16);
}
.mode-card h2 {
  margin: 0 0 6px;
  font-size: 23px;
  font-weight: 500;
  letter-spacing: .08em;
}
.mode-card .sub {
  margin: 0 0 28px;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink4);
}
.mode-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.mode-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 28px 18px 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  text-transform: none;
  letter-spacing: normal;
}
.mode-choice:hover {
  background: var(--paper2);
  color: var(--ink);
  border-color: var(--hair);
}
.mode-choice .mode-glyph {
  font-size: 26px;
  line-height: 1;
  color: var(--rust);
}
.mode-choice strong {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .1em;
}
.mode-choice small {
  font-size: 12px;
  line-height: 1.8;
  color: var(--ink3);
  letter-spacing: .02em;
}
.mode-foot { margin-top: 26px; }
.mode-foot .ghost { border-color: var(--line); color: var(--ink3); }

/* ============================================================
 * 浏览模式：按编号翻阅作品
 * ============================================================ */
.browser {
  position: fixed;
  inset: 0;
  z-index: 25;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}
.browser[hidden] { display: none; }

.browser-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 24px;
  border-bottom: 1px solid var(--hair);
  background: var(--paper);
}
.browser-brand {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  min-width: 0;
}
.browser-brand strong {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: .08em;
}
.browser-brand small {
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--ink4);
}
.browser-mode {
  padding: 3px 8px;
  border: 1px solid var(--rust);
  color: var(--rust);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.browser-tools { display: flex; gap: 10px; flex: none; }

.browser-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(300px, .78fr);
  grid-template-rows: minmax(0, 1fr);
}
.browser-stage {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 24px 14px;
  min-width: 0;
  min-height: 0;
  background: var(--paper2);
  border-right: 1px solid var(--hair);
}
.browser-figure {
  position: relative;
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.browser-zoom {
  position: relative;
  flex: 1;
  width: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}
.browser-zoom.is-dragging { cursor: grabbing; }
.browser-zoom img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  background: #e9e8e5;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}
.browser-zoomtools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  flex: none;
}
.browser-zoomtools span {
  min-width: 44px;
  text-align: center;
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--ink3);
}
.browser-hint {
  margin: 8px 0 0;
  font-size: 10.5px;
  letter-spacing: .12em;
  color: var(--ink4);
  text-align: center;
}
.browser-arrow {
  flex: none;
  align-self: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  background: var(--paper);
}

.browser-info {
  padding: 26px 30px 26px;
  overflow-y: auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.browser-info .tag {
  align-self: flex-start;
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink2);
  margin-bottom: 16px;
}
.browser-info h2 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 500;
  letter-spacing: .01em;
  line-height: 1.2;
}
.browser-title-en {
  margin: -2px 0 12px;
  font-size: 13px;
  font-style: italic;
  letter-spacing: .04em;
  color: var(--ink3);
  line-height: 1.5;
  font-family: var(--serif);
}
.browser-meta {
  color: var(--ink3);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 20px;
  line-height: 1.7;
}
.browser-meta .detail-size {
  display: inline-block;
  margin-left: 10px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  color: var(--ink2);
  letter-spacing: .08em;
}
.browser-desc {
  font-size: 14px;
  line-height: 1.95;
  color: var(--ink2);
  margin: 0 0 22px;
}
.browser-en {
  position: relative;
  padding: 16px 0 0 42px;
  margin: 0 0 24px;
  border-top: 1px solid var(--hair-faint);
}
.browser-en .en-label {
  position: absolute;
  left: 0;
  top: 18px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .14em;
  color: var(--ink3);
}
.browser-en p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--ink3);
  font-family: var(--serif);
}
.browser-social {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--hair);
}
.browser-social-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.browser-social-bar button { padding: 7px 16px; font-size: 12px; }
.browser-social-bar span {
  font-size: 11.5px;
  color: var(--ink3);
  letter-spacing: .04em;
}
.browser-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.browser-reactions button {
  font-size: 12px;
  padding: 7px 13px;
  text-transform: none;
  letter-spacing: .02em;
  border-color: var(--line);
}
.browser-reactions button:hover { border-color: var(--hair); }
.browser-messages {
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 132px;
  overflow-y: auto;
}
.browser-messages li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  color: var(--ink2);
  padding: 9px 0;
  margin: 0;
  border-bottom: 1px solid var(--line-soft);
}
.browser-messages li span:last-child {
  color: var(--ink4);
  font-size: 10.5px;
  white-space: nowrap;
}
.browser-messages .empty {
  color: var(--ink4);
  padding: 12px 0;
  border-bottom: none;
}

.browser-index {
  display: flex;
  gap: 6px;
  padding: 12px 24px;
  border-top: 1px solid var(--hair);
  overflow-x: auto;
  background: var(--paper);
}
.browser-index button {
  flex: none;
  width: 38px;
  height: 32px;
  padding: 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
  border-color: var(--line);
  color: var(--ink3);
}
.browser-index button:hover {
  background: var(--paper2);
  color: var(--ink);
  border-color: var(--hair);
}
.browser-index button.is-current {
  background: var(--hair);
  color: #fff;
  border-color: var(--hair);
}
/* 文字页按钮：用文字标签 + 赭红描边，与数字编号一眼可辨 */
.browser-index button.is-page {
  width: auto;
  min-width: 52px;
  padding: 0 12px;
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--rust);
  border-color: var(--rust);
}
.browser-index button.is-page:hover {
  background: var(--rust);
  color: #fff;
  border-color: var(--rust);
}
.browser-index button.is-page.is-current {
  background: var(--rust);
  color: #fff;
  border-color: var(--rust);
}

/* 浏览模式打开时，三维 HUD 全部让位 */
body.mode-browse .ui-layer { display: none; }

/* 文字页：整幅铺开，右侧信息栏让位给页面本身 */
body.mode-browse-page .browser-body {
  grid-template-columns: minmax(0, 1fr);
}
body.mode-browse-page .browser-info {
  display: none;
}
body.mode-browse-page .browser-stage {
  border-right: 0;
  padding: 20px 20px 20px 20px;
}
body.mode-browse-page .browser-zoom img {
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .14);
}

@media (max-width: 900px) {
  .mode-choices { grid-template-columns: 1fr; }
  .mode-card { padding: 26px 20px 18px; }
  .browser-head { padding: 12px 14px; }
  .browser-brand small { display: none; }
  /* 工具条按钮变多（返回 / 参观模式 / 退出 / 公众号），单行滚动不换行 */
  .browser-tools {
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }
  .browser-tools::-webkit-scrollbar { display: none; }
  .browser-tools button { padding: 7px 9px; font-size: 10px; flex: none; white-space: nowrap; letter-spacing: .06em; }
  .browser-body {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 46%) minmax(0, 54%);
  }
  .browser-stage {
    border-right: 0;
    border-bottom: 1px solid var(--hair);
    padding: 12px 6px;
  }
  .browser-info { padding: 18px 18px 20px; }
  .browser-info h2 { font-size: 22px; }
  .browser-hint { display: none; }
  .browser-index { padding: 10px 12px; }
  .browser-index button { width: 34px; height: 30px; }
  .browser-index button.is-page { width: auto; min-width: 48px; padding: 0 10px; }
  /* 文字页在移动端占满整屏，不留信息栏的空行 */
  body.mode-browse-page .browser-body {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr);
  }
  body.mode-browse-page .browser-stage {
    padding: 10px 8px;
    border-bottom: 0;
  }
  /* 窄屏下页面按宽度铺满，缩放工具紧贴页面下方，避免大片空白 */
  body.mode-browse-page .browser-figure { justify-content: center; }
  body.mode-browse-page .browser-zoom { flex: none; }
  body.mode-browse-page .browser-zoom img {
    width: 100%;
    max-width: none;
    max-height: none;
    object-fit: contain;
  }
  body.mode-browse-page .browser-hint { display: none; }
}

/* ============================================================
 * 返回键：从参观模式 / 浏览模式退回「选择参观方式」
 * ============================================================ */
.btn-back {
  border-color: var(--rust);
  color: var(--rust);
}
.btn-back:hover {
  background: var(--rust);
  border-color: var(--rust);
  color: #fff;
}
.top-actions .btn-back::first-letter { margin-right: 2px; }

/* 浏览模式下的返回键：与三维侧保持同一种语言 */
.browser-tools #browserBackPick {
  border-color: var(--rust);
  color: var(--rust);
}
.browser-tools #browserBackPick:hover {
  background: var(--rust);
  border-color: var(--rust);
  color: #fff;
}

/* ============================================================
 * 公众号二维码弹层
 * 素材来自公众号后台「搜一搜与二维码 → 线下物料素材」
 * ============================================================ */
.qr-overlay {
  z-index: 28;
  background: rgba(255, 255, 255, .74);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.qr-card {
  position: relative;
  width: min(680px, 94vw);
  max-height: min(720px, 90vh);
  overflow: auto;
  background: var(--card);
  border: 1px solid var(--hair);
  padding: 34px 36px 30px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .18);
}
.qr-card h2 {
  margin: 0 0 5px;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: .14em;
  text-align: center;
}
.qr-card .sub {
  margin: 0 0 24px;
  text-align: center;
  font-size: 10.5px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--ink4);
}
.qr-body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 30px;
  align-items: start;
}
.qr-shot {
  padding: 10px;
  background: #fff;
  border: 1px solid var(--hair);
  line-height: 0;
}
.qr-shot img {
  width: 208px;
  height: 208px;
  display: block;
  image-rendering: -webkit-optimize-contrast;
}
.qr-side { min-width: 0; }
.qr-lead {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink);
}
.qr-note {
  margin: 0 0 20px;
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--ink3);
}
.qr-souyisou {
  display: block;
  width: 168px;
  height: auto;
  margin-bottom: 12px;
}
/* 搜一搜搜索框：用 CSS 重绘，沿用画廊色板。
   原素材的微信绿搜索框在纯白底上太跳，且与赭红强调色冲突。 */
.qr-searchbox {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 268px;
  padding: 9px 14px;
  background: var(--paper2);
  border: 1px solid var(--line-strong);
}
.qr-searchbox .mag {
  flex: none;
  width: 15px;
  height: 15px;
  border: 1.5px solid var(--ink3);
  border-radius: 50%;
  position: relative;
}
.qr-searchbox .mag::after {
  content: '';
  position: absolute;
  right: -4px;
  bottom: -3px;
  width: 6px;
  height: 1.5px;
  background: var(--ink3);
  transform: rotate(45deg);
}
.qr-searchbox .name {
  font-size: 16px;
  color: var(--ink);
  letter-spacing: .04em;
}
.qr-tip {
  margin: 14px 0 0;
  font-size: 11px;
  line-height: 1.75;
  color: var(--ink4);
}
/* 微信内置浏览器：扫不了本机屏幕，把搜一搜提到前面并加提示 */
body.in-wechat .qr-souyisou { width: 200px; }
body.in-wechat .qr-tip { color: var(--rust); }

/* 移动端 */
@media (max-width: 760px) {
  .qr-card { padding: 26px 20px 22px; }
  /* 内容比视口高时从顶部排起，避免上下留白一大片 */
  .qr-overlay { align-items: flex-start; padding: 20px 14px; }
  .qr-body { grid-template-columns: 1fr; gap: 18px; justify-items: center; }
  .qr-shot img { width: 172px; height: 172px; }
  .qr-side { text-align: center; display: flex; flex-direction: column; align-items: center; }
  .qr-souyisou { width: 150px; }
  .qr-searchbox { max-width: 240px; }
  .btn-back { padding: 7px 11px; font-size: 10.5px; }
}
