/* 画廊 · 高斯画室 —— 沿用 A1 画馆的美术馆气质深色 UI */

:root {
  --ink:        #1A1815;
  --warm-white: #F7F6F2;
  --warm-brown: #4A3528;
  --brand:      #5A8523;
  --gold:       #C9A961;
  --glass:      rgba(16, 14, 12, 0.62);
  --glass-line: rgba(201, 169, 97, 0.28);
  /* 半透明偏黑：参考图按钮/面板合成色约 (59,46,37)，
     等于约 50% 黑叠在棕色 3DGS 场景上；配 blur 让透出的场景柔化 */
  --surface:        rgba(14, 12, 10, 0.52);
  --surface-hover:  rgba(28, 24, 20, 0.68);
  --surface-line:   rgba(255, 255, 255, 0.08);
  /* 大卡片：同为半透明偏黑，但比按钮略实（画廊地面是浅灰，太透字会糊） */
  --panel:          rgba(14, 12, 10, 0.74);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: #0d0c0b;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  color: var(--warm-white);
  -webkit-font-smoothing: antialiased;
}

canvas { display: block; }

.hidden { display: none !important; }

/* ---------- 左侧竖排工具栏 ----------
   深色圆角方钮 + 白色线性图标 + 右侧悬浮黑标签
   -------------------------------------------------- */
#toolbar {
  position: fixed;
  left: 28px;
  top: 74px;          /* 在线统计胶囊 top:26 + 高约32 + 16 间距 */
  transform: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 30;
}

.tool-btn {
  position: relative;
  width: 56px;
  height: 56px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--surface-line);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  color: #F7F6F2;
  cursor: pointer;
  font-family: inherit;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
  -webkit-tap-highlight-color: transparent;
}

.tool-btn svg { width: 24px; height: 24px; display: block; }

.tool-btn:hover,
.tool-btn:focus-visible {
  background: var(--surface-hover);
  transform: translateY(-2px);
  outline: none;
}

.tool-btn:active { transform: translateY(0); }

/* 悬浮标签：黑底白字，出现在按钮右侧 */
.tool-btn::after {
  content: attr(data-tip);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translate(-6px, -50%);
  padding: 7px 13px;
  background: #080808;
  color: #F7F6F2;
  font-size: 13px;
  letter-spacing: .04em;
  white-space: nowrap;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .35);
  transition: opacity .18s ease, transform .18s ease;
}

.tool-btn:hover::after,
.tool-btn:focus-visible::after {
  opacity: 1;
  transform: translate(0, -50%);
}

/* ---------- 画作详情面板 ---------- */

#art-panel {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 7, 6, 0.82);
  backdrop-filter: blur(6px);
  animation: fade-in .25s ease;
}

@keyframes fade-in { from { opacity: 0 } to { opacity: 1 } }

.panel-inner {
  position: relative;
  width: min(1180px, 92vw);
  max-height: 86vh;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 36px;
  padding: 32px;
  background: var(--panel);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-line);
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .6);
}

.panel-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(247, 246, 242, .08);
  color: var(--warm-white);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background .2s;
}

.panel-close:hover { background: rgba(247, 246, 242, .18); }

.panel-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0908;
  border-radius: 10px;
  overflow: hidden;
  min-height: 320px;
}

.panel-media img,
.panel-media video {
  max-width: 100%;
  max-height: 66vh;
  object-fit: contain;
  display: block;
}

.panel-media video { display: none; }

.play-btn {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 22px;
  background: rgba(201, 169, 97, .92);
  color: var(--ink);
  border: none;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all .2s;
}

.play-btn:hover { background: var(--gold); transform: translateX(-50%) scale(1.04); }

.panel-info {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding-right: 8px;
}

.panel-info h1 {
  margin: 8px 0 14px;
  font-size: 26px;
  font-weight: 500;
  letter-spacing: .02em;
  line-height: 1.35;
}

/* 作品介绍：画作背景知识 */
.art-intro {
  margin: 0 0 22px;
  font-size: 13.5px;
  line-height: 1.95;
  color: rgba(247, 246, 242, .82);
  text-align: justify;
  padding: 14px 16px;
  background: rgba(201, 169, 97, .06);
  border-left: 2px solid rgba(201, 169, 97, .45);
  border-radius: 0 8px 8px 0;
}

.art-intro:empty { display: none; }

.artist-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(201, 169, 97, .18);
}

.artist-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--warm-brown), #2a1f18);
  border: 1px solid var(--glass-line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--gold);
  flex-shrink: 0;
}

.artist-name { font-size: 16px; margin-bottom: 3px; }

.artist-meta { font-size: 12px; opacity: .55; letter-spacing: .03em; }

.art-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.art-tag {
  padding: 5px 12px;
  font-size: 11.5px;
  border-radius: 999px;
  border: 1px solid rgba(201, 169, 97, .3);
  color: var(--gold);
  letter-spacing: .05em;
}

/* ---------- 标定条 ---------- */

#calib-bar {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: var(--glass);
  border: 1px solid var(--gold);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  z-index: 40;
  font-size: 13px;
}

#calib-hint { margin-right: 8px; color: var(--gold); }

#calib-bar button {
  padding: 7px 14px;
  border-radius: 7px;
  border: 1px solid var(--glass-line);
  background: rgba(247, 246, 242, .07);
  color: var(--warm-white);
  font-size: 12.5px;
  cursor: pointer;
  font-family: inherit;
  transition: background .2s;
}

#calib-bar button:hover { background: rgba(201, 169, 97, .2); }

/* ---------- HUD ---------- */

#hud {
  position: fixed;
  left: 24px;
  bottom: 24px;
  max-width: 420px;
  padding: 10px 14px;
  font-size: 12px;
  line-height: 1.7;
  color: rgba(247, 246, 242, .72);
  background: rgba(13, 12, 11, .62);
  border: 1px solid rgba(201, 169, 97, .16);
  border-radius: 8px;
  white-space: pre-wrap;
  pointer-events: none;
  z-index: 20;
}

#hud .ok   { color: #8fd46a; }
#hud .err  { color: #ff8b7b; }
#hud .warn { color: var(--gold); }
#hud .dim  { opacity: .5; }

/* ---------- 准星 ---------- */

#crosshair {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: rgba(247, 246, 242, .55);
  box-shadow: 0 0 0 2px rgba(26, 24, 21, .5);
  pointer-events: none;
  z-index: 15;
  transition: background .15s, transform .15s;
}

#crosshair.hot {
  background: var(--gold);
  transform: scale(1.8);
}

/* ---------- 机位调试面板 ---------- */

#cam-debug {
  position: fixed;
  left: 24px;
  bottom: 150px;
  width: 300px;
  padding: 14px 16px;
  background: rgba(20, 18, 16, .9);
  border: 1px solid var(--glass-line);
  border-radius: 10px;
  backdrop-filter: blur(10px);
  z-index: 25;
  font-size: 12px;
}

.cd-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.cd-label { width: 44px; opacity: .65; flex-shrink: 0; }

.cd-row input[type="range"] {
  flex: 1;
  accent-color: var(--gold);
  cursor: pointer;
}

.cd-value {
  width: 56px;
  text-align: right;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.cd-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.cd-actions button {
  flex: 1;
  padding: 7px 0;
  border-radius: 6px;
  border: 1px solid var(--glass-line);
  background: rgba(247, 246, 242, .06);
  color: var(--warm-white);
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: background .2s;
}

.cd-actions button:hover { background: rgba(201, 169, 97, .2); }

/* ---------- 画作悬浮提示 ---------- */

#art-labels {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 12;
}

.art-label {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px;
  font-size: 12.5px;
  letter-spacing: .05em;
  color: var(--warm-white);
  background: var(--surface);
  border: 1px solid var(--surface-line);
  border-radius: 999px;
  backdrop-filter: blur(12px);
  white-space: nowrap;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .28);
  animation: label-float 3s ease-in-out infinite;
  transition: opacity .2s ease;
  will-change: left, top, opacity;
}

.art-label::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 6px rgba(201, 169, 97, .45);
  flex-shrink: 0;
}

@keyframes label-float {
  0%, 100% { transform: translate(-50%, -50%); }
  50%      { transform: translate(-50%, calc(-50% - 5px)); }
}

@media (max-width: 900px) {
  .panel-inner {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 22px;
    max-height: 90vh;
    overflow-y: auto;
  }
  #toolbar { left: 14px; top: 56px; gap: 9px; }
  .tool-btn { width: 46px; height: 46px; border-radius: 13px; }
  .tool-btn svg { width: 20px; height: 20px; }
  .tool-btn::after { font-size: 12px; padding: 6px 10px; }
}

/* ---------- 知识问答面板 ---------- */

#quiz-panel {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 7, 6, 0.82);
  backdrop-filter: blur(6px);
  animation: fade-in .25s ease;
}

.quiz-inner {
  position: relative;
  width: min(640px, 92vw);
  max-height: 86vh;
  overflow-y: auto;
  padding: 40px 44px 36px;
  background: var(--panel);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-line);
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .6);
}

.quiz-stage { text-align: center; }

.quiz-icon { font-size: 44px; margin-bottom: 10px; }

.quiz-stage h2 {
  margin: 0 0 14px;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: .04em;
}

.quiz-intro {
  margin: 0 0 26px;
  font-size: 13.5px;
  line-height: 1.9;
  color: rgba(247, 246, 242, .72);
}

.quiz-btn {
  padding: 11px 30px;
  border: 1px solid rgba(201, 169, 97, .4);
  border-radius: 999px;
  background: transparent;
  color: var(--warm-white);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: all .2s;
}

.quiz-btn:hover { background: rgba(201, 169, 97, .12); }

.quiz-btn.primary {
  background: rgba(201, 169, 97, .92);
  border-color: transparent;
  color: var(--ink);
  font-weight: 600;
}

.quiz-btn.primary:hover { background: var(--gold); transform: translateY(-1px); }

/* 答题进行中 */
.quiz-progress {
  font-size: 12px;
  letter-spacing: .12em;
  color: rgba(201, 169, 97, .85);
  margin-bottom: 6px;
}

.quiz-score {
  font-size: 12px;
  color: rgba(247, 246, 242, .5);
  margin-bottom: 22px;
}

.quiz-q {
  margin: 0 0 24px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.7;
  text-align: left;
}

.quiz-options { display: flex; flex-direction: column; gap: 12px; }

.quiz-option {
  padding: 13px 18px;
  text-align: left;
  font-size: 14px;
  line-height: 1.6;
  font-family: inherit;
  color: var(--warm-white);
  background: rgba(247, 246, 242, .05);
  border: 1px solid rgba(247, 246, 242, .12);
  border-radius: 10px;
  cursor: pointer;
  transition: all .15s;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.quiz-option:hover:not(:disabled) {
  background: rgba(201, 169, 97, .1);
  border-color: rgba(201, 169, 97, .45);
}

.quiz-option:disabled { cursor: default; opacity: .75; }

.quiz-option .opt-key {
  flex: none;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(247, 246, 242, .1);
  font-size: 12px;
}

.quiz-option.correct {
  background: rgba(90, 133, 35, .28);
  border-color: rgba(122, 165, 55, .8);
  opacity: 1;
}

.quiz-option.wrong {
  background: rgba(158, 58, 44, .28);
  border-color: rgba(190, 80, 62, .8);
  opacity: 1;
}

.quiz-explain {
  margin: 20px 0 0;
  padding: 13px 16px;
  font-size: 13px;
  line-height: 1.9;
  text-align: justify;
  color: rgba(247, 246, 242, .8);
  background: rgba(201, 169, 97, .06);
  border-left: 2px solid rgba(201, 169, 97, .45);
  border-radius: 0 8px 8px 0;
}

#quiz-next { margin-top: 22px; }

/* 结算 */
.quiz-final {
  font-size: 44px;
  font-weight: 600;
  color: var(--gold);
  margin: 8px 0 10px;
  letter-spacing: .04em;
}

.quiz-comment {
  margin: 0 0 28px;
  font-size: 13.5px;
  line-height: 1.9;
  color: rgba(247, 246, 242, .72);
}

.quiz-result-actions { display: flex; gap: 12px; justify-content: center; }

/* ---------- AI 小助手面板 ---------- */

#ai-panel {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 7, 6, 0.82);
  backdrop-filter: blur(6px);
  animation: fade-in .25s ease;
}

.ai-inner {
  position: relative;
  width: min(680px, 92vw);
  height: min(640px, 86vh);
  display: flex;
  flex-direction: column;
  padding: 28px 30px 22px;
  background: var(--panel);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-line);
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .6);
}

.ai-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ai-title {
  margin: 0;
  font-size: 21px;
  font-weight: 500;
  letter-spacing: .03em;
}

.ai-provider {
  max-width: 260px;
  padding: 7px 12px;
  font-size: 12px;
  font-family: inherit;
  color: var(--warm-white);
  background: rgba(247, 246, 242, .07);
  border: 1px solid rgba(247, 246, 242, .16);
  border-radius: 8px;
  cursor: pointer;
}

.ai-provider option { background: #1a1815; color: var(--warm-white); }

.ai-hint {
  margin: 6px 0 14px;
  font-size: 12px;
  color: rgba(247, 246, 242, .5);
}

.ai-hint.err { color: rgba(190, 80, 62, .95); }

/* 消息流 */
.ai-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 6px 4px 10px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ai-msg { display: flex; }
.ai-msg.user { justify-content: flex-end; }

.ai-bubble {
  max-width: 82%;
  padding: 11px 16px;
  font-size: 13.5px;
  line-height: 1.85;
  border-radius: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}

.ai-msg.assistant .ai-bubble {
  background: rgba(201, 169, 97, .1);
  border: 1px solid rgba(201, 169, 97, .22);
  border-bottom-left-radius: 4px;
  color: rgba(247, 246, 242, .88);
}

.ai-msg.user .ai-bubble {
  background: rgba(201, 169, 97, .9);
  border-bottom-right-radius: 4px;
  color: var(--ink);
}

.ai-msg.error .ai-bubble {
  background: rgba(158, 58, 44, .22);
  border: 1px solid rgba(190, 80, 62, .5);
  color: rgba(255, 200, 190, .95);
  font-size: 12.5px;
}

.ai-bubble.typing { color: rgba(247, 246, 242, .55); font-style: italic; }

/* 输入行 */
.ai-input-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

#ai-input {
  flex: 1;
  padding: 12px 16px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--warm-white);
  background: rgba(247, 246, 242, .06);
  border: 1px solid rgba(247, 246, 242, .14);
  border-radius: 999px;
  outline: none;
  transition: border-color .15s;
}

#ai-input:focus { border-color: rgba(201, 169, 97, .55); }

#ai-input::placeholder { color: rgba(247, 246, 242, .35); }

#ai-send:disabled { opacity: .55; cursor: default; transform: none; }

.ai-attach {
  flex: none;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  line-height: 1;
  background: rgba(247, 246, 242, .06);
  border: 1px solid rgba(247, 246, 242, .14);
  border-radius: 50%;
  cursor: pointer;
  transition: all .15s;
}

.ai-attach:hover { background: rgba(201, 169, 97, .14); border-color: rgba(201, 169, 97, .5); }

.ai-attach-preview {
  position: relative;
  align-self: flex-start;
  margin-top: 10px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(201, 169, 97, .35);
  line-height: 0;
}

.ai-attach-preview img {
  max-height: 110px;
  max-width: 200px;
  display: block;
  object-fit: cover;
}

#ai-attach-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: rgba(8, 7, 6, .75);
  color: var(--warm-white);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

/* 消息里的图片 */
.ai-bubble img {
  display: block;
  max-width: 100%;
  max-height: 220px;
  border-radius: 8px;
  margin-bottom: 8px;
}

/* 自动降级提示 */
.ai-fallback-note {
  margin-top: 6px;
  font-size: 11px;
  color: rgba(201, 169, 97, .75);
  letter-spacing: .02em;
}

/* ---------- 自动导览 ---------- */

/* 导览进行中淡出顶栏和左下角调试日志，画面留给作品 */
#toolbar { transition: opacity .35s ease; }
body.touring #toolbar { opacity: 0; pointer-events: none; }

#hud { transition: opacity .3s ease; }
body.touring #hud { opacity: 0; pointer-events: none; }

/* 黑场过渡层：切换机位时遮住跳变 */
#tour-fade {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: #080706;
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s ease;
}
#tour-fade.on { opacity: 1; }

#tour-hud {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  z-index: 40;
  width: min(800px, 92vw);
  animation: fade-in .3s ease;
}

.tour-card {
  position: relative;
  padding: 22px 28px 18px;
  background: var(--panel);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-line);
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .6);
}

.tour-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 10px;
  padding-right: 34px;
}

.tour-step {
  flex: none;
  font-size: 11.5px;
  letter-spacing: .16em;
  color: rgba(201, 169, 97, .9);
}

.tour-title {
  font-size: 19px;
  font-weight: 500;
  letter-spacing: .04em;
}

.tour-text {
  margin: 0 0 14px;
  font-size: 13.5px;
  line-height: 1.9;
  color: rgba(247, 246, 242, .74);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tour-bar {
  height: 2px;
  background: rgba(247, 246, 242, .12);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 14px;
}

#tour-progress {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, rgba(201,169,97,.55), var(--gold));
  transition: width .28s linear;
}

.tour-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.tour-tip {
  margin: -6px 0 14px;
  font-size: 11.5px;
  letter-spacing: .04em;
  color: rgba(201, 169, 97, .62);
}

/* 「调整站位」入口：小号金色描边，不抢主按钮 */
.tour-mini {
  flex: none;
  margin-left: auto;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(201, 169, 97, .45);
  background: transparent;
  color: rgba(201, 169, 97, .92);
  font-family: inherit;
  font-size: 11.5px;
  letter-spacing: .04em;
  cursor: pointer;
  transition: all .16s ease;
  -webkit-tap-highlight-color: transparent;
}

.tour-mini:hover { background: rgba(201, 169, 97, .16); }

.tour-mini:disabled { opacity: .5; cursor: default; }

/* 调整态：正文先收起来，把画面和数值信息让出来 */
#tour-hud.editing .tour-text {
  display: none;
}

#tour-hud.editing .tour-mini {
  background: rgba(201, 169, 97, .94);
  border-color: transparent;
  color: var(--ink);
  font-weight: 600;
}

#tour-hud.editing .tour-card {
  border-color: rgba(201, 169, 97, .6);
  box-shadow: 0 0 0 1px rgba(201, 169, 97, .18), 0 24px 70px rgba(0, 0, 0, .6);
}

.tour-btn {
  min-height: 42px;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid rgba(247, 246, 242, .18);
  background: transparent;
  color: var(--warm-white);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: all .16s ease;
  -webkit-tap-highlight-color: transparent;
}

.tour-btn:hover { background: rgba(201, 169, 97, .14); border-color: rgba(201, 169, 97, .5); }

.tour-btn.primary {
  background: rgba(201, 169, 97, .92);
  border-color: transparent;
  color: var(--ink);
  font-weight: 600;
}

.tour-btn.primary:hover { background: var(--gold); }

.tour-x {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  background: transparent;
  color: rgba(247, 246, 242, .45);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: color .16s;
}

.tour-x:hover { color: var(--warm-white); }

@media (max-width: 720px) {
  #tour-hud { bottom: 18px; width: 94vw; }
  .tour-card { padding: 18px 18px 14px; }
  .tour-title { font-size: 16px; }
  .tour-text { font-size: 12.5px; -webkit-line-clamp: 3; }
  .tour-btn { padding: 9px 16px; font-size: 12.5px; }
}

/* ---------- 在线 / 访问统计 ---------- */

#presence {
  position: fixed;
  top: 26px;
  left: 30px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 15px;
  background: var(--surface);
  border: 1px solid var(--surface-line);
  border-radius: 999px;
  backdrop-filter: blur(12px);
  font-size: 12px;
  color: rgba(247, 246, 242, .7);
  letter-spacing: .04em;
  transition: opacity .35s ease;
  pointer-events: none;
}

#presence b { color: var(--warm-white); font-weight: 600; }

.p-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8fd46a;
  box-shadow: 0 0 8px rgba(143, 212, 106, .85);
  animation: p-pulse 2.6s ease-in-out infinite;
}

@keyframes p-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

.p-sep {
  width: 1px;
  height: 10px;
  background: rgba(247, 246, 242, .18);
}

body.touring #presence { opacity: 0; }

@media (max-width: 900px) {
  #presence { top: 16px; left: 16px; font-size: 11px; padding: 6px 12px; gap: 7px; }
}

/* ---------- 收藏 / 联系作者 ---------- */

.art-contact {
  margin-top: 24px;
  padding: 16px 18px;
  border: 1px solid rgba(201, 169, 97, .28);
  border-radius: 12px;
  background: rgba(201, 169, 97, .05);
}

.ac-title {
  font-size: 14px;
  color: var(--gold);
  letter-spacing: .08em;
  margin-bottom: 10px;
}

.ac-body {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.ac-qr-wrap {
  flex: none;
  width: 100px;
  height: 100px;
  padding: 6px;
  background: #fff;
  border-radius: 8px;
}

.ac-qr-wrap img { width: 100%; height: 100%; display: block; }

.ac-rows {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.ac-note {
  margin: 0 0 4px;
  font-size: 12px;
  line-height: 1.75;
  color: rgba(247, 246, 242, .6);
}

.ac-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
}

.ac-k {
  flex: none;
  width: 32px;
  color: rgba(201, 169, 97, .85);
}

.ac-v {
  color: rgba(247, 246, 242, .92);
  word-break: break-all;
}

.ac-copy {
  flex: none;
  margin-left: auto;
  padding: 3px 11px;
  font-size: 11px;
  font-family: inherit;
  border-radius: 999px;
  border: 1px solid rgba(201, 169, 97, .4);
  background: transparent;
  color: rgba(201, 169, 97, .92);
  cursor: pointer;
  transition: all .15s ease;
}

.ac-copy:hover { background: rgba(201, 169, 97, .16); }

/* ---------- 画作简介朗读 ---------- */

.art-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 8px 0 14px;
}

.art-title-row h1 {
  margin: 0;
  flex: 1;
  min-width: 0;
}

.speak-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 15px;
  min-height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(201, 169, 97, .42);
  background: transparent;
  color: rgba(201, 169, 97, .92);
  font-family: inherit;
  font-size: 12.5px;
  letter-spacing: .04em;
  cursor: pointer;
  transition: all .16s ease;
  -webkit-tap-highlight-color: transparent;
}

.speak-btn:hover { background: rgba(201, 169, 97, .14); }

.speak-btn.playing {
  background: rgba(201, 169, 97, .92);
  border-color: transparent;
  color: var(--ink);
  font-weight: 600;
}

.speak-btn:disabled { opacity: .6; cursor: default; }

.speak-ico { font-size: 13px; line-height: 1; }

/* ---------- 作者介绍卡（进馆渐变出现 / 可拖动 / 点任意处消失） ---------- */

#artist-card {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(880px, calc(100vw - 32px));
  transform: translate(-50%, -50%) scale(.92);
  opacity: 0;
  z-index: 60;
  background: var(--panel);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-line);
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .55);
  transition: opacity .5s ease, transform .5s ease;
  overflow: hidden;
}

#artist-card.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

#artist-card.hiding {
  opacity: 0;
  transform: translate(-50%, -50%) scale(.94);
  pointer-events: none;
}

.acard-drag {
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  touch-action: none;
  background: rgba(201, 169, 97, .08);
  border-bottom: 1px solid var(--glass-line);
}

.acard-drag:active { cursor: grabbing; }

.acard-drag i {
  width: 46px;
  height: 4px;
  border-radius: 999px;
  background: rgba(201, 169, 97, .35);
}

.acard-x {
  position: absolute;
  top: 36px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--glass-line);
  background: rgba(247, 246, 242, .08);
  color: var(--warm-white);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  transition: background .15s ease;
}

.acard-x:hover { background: rgba(247, 246, 242, .18); }

.acard-body {
  display: flex;
  gap: 30px;
  padding: 30px 36px 36px;
}

.acard-left { flex: 1 1 auto; min-width: 0; }

.acard-name {
  margin: 0 0 6px;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--warm-white);
}

.acard-meta {
  margin: 0 0 22px;
  font-size: 16px;
  letter-spacing: .05em;
  color: var(--gold);
}

/* 作者卡里的个人简介：独立段落，不带成就列表的绿点 */
.acard-bio {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--warm-white);
  opacity: .88;
}

/* 展览清单：8 个个展 + 29 条群展，分栏 + 局部滚动，字号压小 */
.acard-sections {
  max-height: min(58vh, 520px);
  overflow-y: auto;
  padding-right: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(74, 53, 40, .25) transparent;
}

.acard-sections::-webkit-scrollbar { width: 6px; }
.acard-sections::-webkit-scrollbar-thumb {
  background: rgba(74, 53, 40, .25);
  border-radius: 999px;
}

.acard-section { margin-bottom: 16px; }
.acard-section:last-child { margin-bottom: 0; }

.acard-section-title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .18em;
  color: var(--gold);
}

.acard-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.acard-list li {
  position: relative;
  padding-left: 14px;
  margin-bottom: 3px;
  font-size: 12.5px;
  line-height: 1.62;
  color: rgba(247, 246, 242, .88);
}

.acard-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 8px;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--gold);
}

.acard-right {
  flex: none;
  width: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.acard-photo {
  width: 220px;
  height: 300px;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--warm-brown), #2a1f18);
  border: 1px solid var(--glass-line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 72px;
  color: var(--gold);
  background-size: contain;      /* 竖长线描像完整显示，不裁头脚 */
  background-repeat: no-repeat;
  background-position: center;
  background-color: #2a1f18;     /* contain 留白处用深棕补底 */
}

.acard-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.acard-photo-cap {
  margin: 0;
  font-size: 13px;
  letter-spacing: .04em;
  color: rgba(247, 246, 242, .5);
  text-align: center;
  line-height: 1.6;
}

/* 徽章：作者介绍常驻入口（右下角，与工具栏同一视觉） */
#artist-badge {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 55;
  width: 56px;
  height: 56px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  border: 1px solid var(--surface-line);
  background: var(--surface);
  backdrop-filter: blur(12px);
  color: var(--warm-white);
  font-family: inherit;
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .35s ease, transform .35s ease, background .2s ease, border-color .2s ease;
  -webkit-tap-highlight-color: none;
}

#artist-badge.show { opacity: 1; transform: translateY(0); }

#artist-badge:hover,
#artist-badge:focus-visible {
  background: var(--surface-hover);
  outline: none;
}

/* 右下角按钮的标签放左边，避免超出屏幕 */
#artist-badge::after {
  content: '作者介绍';
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translate(6px, -50%);
  padding: 7px 13px;
  background: #080808;
  color: #F7F6F2;
  font-size: 13px;
  letter-spacing: .04em;
  white-space: nowrap;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .35);
  transition: opacity .18s ease, transform .18s ease;
}

#artist-badge:hover::after,
#artist-badge:focus-visible::after { opacity: 1; transform: translate(0, -50%); }

.ab-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--warm-brown), #2a1f18);
  border: 1px solid var(--glass-line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--gold);
  background-size: cover;
  background-position: center;
}

.ab-label { display: none; }

/* 画作详情里的「关于作者」入口 */
.about-artist-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 4px 0 8px;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid rgba(201, 169, 97, .42);
  background: transparent;
  color: rgba(201, 169, 97, .92);
  font-family: inherit;
  font-size: 12.5px;
  letter-spacing: .05em;
  cursor: pointer;
  transition: all .16s ease;
}

.about-artist-btn:hover {
  background: rgba(201, 169, 97, .14);
  border-color: var(--gold);
}

.about-artist-btn span { transition: transform .16s ease; }
.about-artist-btn:hover span { transform: translateX(3px); }

/* 手机端：作者卡竖排 */
@media (max-width: 600px) {
  .acard-body {
    flex-direction: column-reverse;
    align-items: center;
    padding: 18px 18px 22px;
    gap: 16px;
  }
  .acard-left { width: 100%; }
  .acard-name { font-size: 26px; text-align: center; }
  .acard-meta { font-size: 14px; text-align: center; }
  .acard-bio { font-size: 14px; text-align: center; }
  .acard-list li { font-size: 12px; }
  .acard-sections { max-height: 46vh; }
  .acard-right { width: 100%; }
  .acard-photo { width: 170px; height: 232px; font-size: 58px; }
}

/* ---------- WebGL 启动失败兜底 ---------- */
#fatal {
  position: fixed; inset: 0; z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  background: rgba(13, 12, 11, .96);
  padding: 24px;
}
.fatal-card {
  width: min(560px, 100%);
  max-height: 88vh; overflow: auto;
  padding: 32px 34px;
  background: var(--panel);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-line);
  border-left: 3px solid var(--gold);
  border-radius: 4px;
}
.fatal-card h2 { margin: 0 0 14px; font-size: 20px; font-weight: 600; letter-spacing: .5px; }
.fatal-reason { margin: 0 0 18px; font-size: 14px; line-height: 1.8; color: rgba(247,246,242,.86); }
.fatal-steps { margin: 0 0 18px; padding-left: 20px; font-size: 13px; line-height: 2; color: rgba(247,246,242,.76); }
.fatal-steps code { color: var(--gold); font-size: 12.5px; }
.fatal-dim { margin: 0 0 8px; font-size: 12px; line-height: 1.7; color: rgba(247,246,242,.45); word-break: break-all; }
.fatal-btn {
  margin-top: 16px; padding: 10px 26px;
  background: transparent; color: var(--gold);
  border: 1px solid var(--glass-line); border-radius: 3px;
  font-size: 13px; cursor: pointer; font-family: inherit;
}
.fatal-btn:hover { background: rgba(201,169,97,.12); }

/* ---------- 内容面板：暖米白玻璃（贴合浅灰墙 + 当代艺术画） ----------
   在这三个面板内局部重定义主题变量，原有深色规则自动翻转；
   下面再集中覆盖少数硬编码的白色 / 金色。删掉这一整块即可回退。
   ------------------------------------------------------------------ */
:root {
  --paper:       rgba(247, 246, 242, .94);
  --paper-ink:   #1A1815;
  --paper-sub:   rgba(26, 24, 21, .64);
  --paper-line:  rgba(74, 53, 40, .20);
  --paper-tint:  rgba(74, 53, 40, .055);
  --paper-green: #5A8523;
  --paper-brown: #4A3528;
}

/* 面板外的遮罩放透，别把整个展厅压成纯黑 */
#art-panel, #ai-panel, #quiz-panel { background: rgba(28, 25, 21, .48) !important; }

.panel-inner, .ai-inner, .quiz-inner {
  --warm-white: #1A1815;
  --gold:       #5A8523;
  --ink:        #F7F6F2;
  --glass-line: rgba(74, 53, 40, .20);
  background: var(--paper) !important;
  color: var(--paper-ink) !important;
  border-color: var(--paper-line) !important;
  box-shadow: 0 24px 80px rgba(30, 24, 18, .28) !important;
}

/* 硬编码的浅白文字 → 墨黑 / 次要墨黑 */
.panel-inner .art-intro,
.panel-inner .ac-note,
.panel-inner .ac-v,
.quiz-inner .quiz-intro,
.quiz-inner .quiz-score,
.quiz-inner .quiz-explain,
.quiz-inner .quiz-comment,
.ai-inner .ai-hint,
.ai-inner .ai-msg.assistant .ai-bubble,
.ai-inner .ai-bubble.typing,
.ai-inner #ai-input::placeholder { color: var(--paper-sub) !important; }

.quiz-inner .quiz-progress,
.panel-inner .ac-k,
.panel-inner .ac-title,
.panel-inner .art-tag { color: var(--paper-green) !important; }

.panel-inner .artist-avatar { color: #F7F6F2 !important; }

/* 浅底上的输入框 / 选项 / 气泡 / 关闭按钮 */
.panel-inner .panel-close,
.ai-inner .panel-close,
.quiz-inner .panel-close,
.ai-inner .ai-attach,
.ai-inner #ai-input,
.ai-inner .ai-provider,
.quiz-inner .quiz-option,
.panel-inner .art-intro,
.panel-inner .art-contact,
.quiz-inner .quiz-explain,
.ai-inner .ai-msg.assistant .ai-bubble {
  background: var(--paper-tint) !important;
  border-color: var(--paper-line) !important;
}

.quiz-inner .quiz-option .opt-key { background: rgba(74, 53, 40, .10) !important; }

/* 次按钮：暖棕描边 */
.quiz-inner .quiz-btn:not(.primary),
.ai-inner .quiz-btn:not(.primary),
.panel-inner .speak-btn:not(.playing),
.panel-inner .about-artist-btn,
.panel-inner .ac-copy {
  color: var(--paper-brown) !important;
  border-color: var(--paper-line) !important;
  background: transparent !important;
}

/* 主按钮 / 用户气泡 / 播放态：品牌绿底白字 */
.quiz-inner .quiz-btn.primary,
.ai-inner .quiz-btn.primary,
.panel-inner .play-btn,
.panel-inner .speak-btn.playing,
.ai-inner .ai-msg.user .ai-bubble {
  background: var(--paper-green) !important;
  border-color: transparent !important;
  color: #fff !important;
}

/* 深底元素保持白字 */
.ai-inner .ai-provider option,
.ai-inner #ai-attach-remove { background: #1a1815 !important; color: #F7F6F2 !important; }
.ai-inner .ai-hint.err { color: #A33B2A !important; }
.ai-inner .ai-msg.error .ai-bubble { background: rgba(158, 58, 44, .12) !important; color: #8B2E22 !important; }


/* ---------- 统一补充：悬浮展签 + 作者介绍卡 ----------
   与 画作详情 / AI 小助手 / 知识问答 共用同一套暖米白玻璃变量。
   只改颜色：胶囊形态与浮动动画、作者卡的版式 / 圆形印章 / 字号都不动。
   删掉这一整块即可回退。
   ---------------------------------------------------- */

/* 画作悬浮胶囊 */
.art-label {
  --gold: var(--paper-green);
  color: var(--paper-ink);
  background: var(--paper);
  border-color: var(--paper-line);
  box-shadow: 0 4px 18px rgba(30, 24, 18, .22);
}

.art-label::before {
  background: var(--paper-green);
  box-shadow: 0 0 6px rgba(90, 133, 35, .35);
}

/* 作者介绍卡：容器内翻转主题变量，原有深色规则自动跟着变 */
#artist-card {
  --warm-white: #1A1815;
  --gold:       #5A8523;
  --glass-line: rgba(74, 53, 40, .20);
  background: var(--paper);
  border-color: var(--paper-line);
  color: var(--paper-ink);
  box-shadow: 0 24px 80px rgba(30, 24, 18, .28);
}

#artist-card .acard-drag {
  background: var(--paper-tint);
  border-bottom-color: var(--paper-line);
}

#artist-card .acard-drag i { background: rgba(74, 53, 40, .22); }

#artist-card .acard-x {
  background: var(--paper-tint);
  border-color: var(--paper-line);
  color: var(--paper-ink);
}

#artist-card .acard-x:hover { background: rgba(74, 53, 40, .12); }

#artist-card .acard-name { color: var(--paper-ink); }
#artist-card .acard-meta { color: var(--paper-green); }
#artist-card .acard-bio { color: var(--paper-sub); opacity: 1; }
#artist-card .acard-section-title { color: var(--paper-green); }
#artist-card .acard-list li { color: var(--paper-sub); }
#artist-card .acard-list li::before { background: rgba(90, 133, 35, .55); }

/* 白底线描像融进米白卡：去掉深棕渐变，留白改暖米色 */
#artist-card .acard-photo {
  background-image: none;
  background-color: #F2F0E9;
  border-color: var(--paper-line);
  color: var(--paper-green);
}

#artist-card .acard-photo-cap { color: rgba(26, 24, 21, .52); }


/* ---------- 透明胶囊：背景全透，画面直接透出来 ----------
   只留文字 + 圆点；文字用浅色光晕描边，保证浅灰墙、绿色画面、
   深色人物衣服上都能读。默认连轮廓线也去掉，避免线条穿过人物。
   想加底 / 加轮廓，改下面两个变量即可。
   -------------------------------------------------------- */
:root {
  --label-ghost-bg:   transparent;
  --label-ghost-line: transparent;
}

.art-label.label-ghost {
  background: var(--label-ghost-bg);
  backdrop-filter: none;
  border-color: var(--label-ghost-line);
  box-shadow: none;
  color: #1A1815;
  text-shadow:
    0 1px 2px rgba(247, 246, 242, .98),
    0 0 8px rgba(247, 246, 242, .90),
    0 0 14px rgba(247, 246, 242, .55);
}

.art-label.label-ghost::before {
  background: var(--paper-green);
  box-shadow: 0 0 0 2px rgba(247, 246, 242, .9), 0 0 6px rgba(90, 133, 35, .4);
}


/* ---------- 导览解说 / 站位调整面板：暖米白玻璃 ----------
   与 画作详情 / AI / 问答 / 作者卡 共用 --paper 系列。
   容器内翻转主题变量让原有深色规则自动变，再覆盖硬编码的金色。
   只改颜色，布局 / 字号 / 按钮位置不动。删掉这一整块即可回退。
   -------------------------------------------------------- */
#tour-hud {
  --warm-white: #1A1815;
  --gold:       #5A8523;
  --ink:        #F7F6F2;
  --glass-line: rgba(74, 53, 40, .20);
}

#tour-hud .tour-card {
  background: var(--paper);
  border-color: var(--paper-line);
  color: var(--paper-ink);
  box-shadow: 0 24px 70px rgba(30, 24, 18, .26);
}

#tour-hud.editing .tour-card {
  border-color: rgba(90, 133, 35, .45);
  box-shadow: 0 0 0 1px rgba(90, 133, 35, .12), 0 24px 70px rgba(30, 24, 18, .26);
}

#tour-hud .tour-step,
#tour-hud .tour-tip { color: var(--paper-green); }

#tour-hud .tour-text { color: var(--paper-sub); }
#tour-hud .tour-bar  { background: rgba(74, 53, 40, .12); }

#tour-hud #tour-progress {
  background: linear-gradient(90deg, rgba(90, 133, 35, .45), var(--paper-green));
}

/* 小按钮：常驻态暖棕描边，调整态（保存站位）品牌绿实心 */
#tour-hud .tour-mini {
  border-color: var(--paper-line);
  color: var(--paper-brown);
}

#tour-hud .tour-mini:hover { background: var(--paper-tint); }

#tour-hud.editing .tour-mini {
  background: var(--paper-green);
  border-color: transparent;
  color: #fff;
}

/* 主次按钮：次按钮墨黑描边，主按钮品牌绿底白字 */
#tour-hud .tour-btn {
  border-color: var(--paper-line);
  color: var(--paper-brown);
}

#tour-hud .tour-btn:hover {
  background: var(--paper-tint);
  border-color: rgba(74, 53, 40, .38);
}

#tour-hud .tour-btn.primary {
  background: var(--paper-green);
  border-color: transparent;
  color: #fff;
}

#tour-hud .tour-btn.primary:hover { background: #4A6E1C; }

#tour-hud .tour-x { color: rgba(26, 24, 21, .48); }
#tour-hud .tour-x:hover { color: var(--paper-ink); }


/* ---------- 一键隐藏画作标签 ----------
   只收起 #art-labels 里所有画作的浮动介绍（现场 18 幅）。
   工具栏、在线统计、作者入口、HUD、各弹出面板一律保留；
   隐藏时画作热区也不可点击（见 main.js 的 handleClick 守卫），
   WASD 走动与调试快捷键照常。之前误做成「隐藏全部 UI」，已收回。
   删掉这一整块即可回退。
   ------------------------------------------------ */
body.labels-hidden #art-labels { display: none !important; }

/* 按钮图标：常态「隐藏」，隐藏态「显示」 */
.tool-btn .ui-icon-show { display: none; }
body.labels-hidden .tool-btn .ui-icon-hide { display: none; }
body.labels-hidden .tool-btn .ui-icon-show { display: block; }

/* 画作详情左侧：视频黑块 → 作品图，底色融入暖米白面板 */
#art-panel .panel-media { background: #EDEAE2; }
#art-panel .panel-media img { box-shadow: 0 8px 28px rgba(30, 24, 18, .18); }

/* 展览年份列：把年份从正文里拆出来对齐，时间顺序一眼可见 */
.acard-list li .acard-year {
  display: inline-block;
  min-width: 44px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
}
#artist-card .acard-list li .acard-year { color: var(--paper-green); }


/* ---------- 小人视角按钮 + 第一人称相机参数面板 ----------
   与左侧工具栏同一套半透明偏黑表面；面板只在第一人称下浮出。
   删掉这一整块即可回退。
   ------------------------------------------------------ */
:root { --vp-accent: #7FAE3C; }

.tool-btn .view-icon-first { display: none; }
body.view-first .tool-btn .view-icon-third { display: none; }
body.view-first .tool-btn .view-icon-first { display: block; }

#view-panel {
  display: none;
  position: fixed;
  left: 96px;
  top: 74px;
  transform: none;
  width: 248px;
  padding: 16px 18px 14px;
  z-index: 29;
  background: var(--surface);
  border: 1px solid var(--surface-line);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .30);
  color: #F7F6F2;
  font-family: inherit;
}

body.view-first #view-panel { display: block; }
body.touring #view-panel { display: none !important; }   /* 导览内部也是第一人称，但不弹参数 */

.vp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(247, 246, 242, .14);
}

.vp-title { font-size: 14px; font-weight: 600; letter-spacing: .04em; }

.vp-reset {
  width: 26px; height: 26px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: none; border-radius: 7px;
  color: rgba(247, 246, 242, .7); cursor: pointer;
}
.vp-reset:hover { background: rgba(247, 246, 242, .10); color: #F7F6F2; }
.vp-reset svg { width: 16px; height: 16px; }

.vp-label { font-size: 12.5px; color: rgba(247, 246, 242, .82); }

.vp-row { margin-bottom: 15px; }
.vp-row-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 9px;
}
.vp-val {
  min-width: 44px; padding: 2px 9px;
  text-align: center; font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: #F7F6F2;
  border: 1px solid rgba(247, 246, 242, .30);
  border-radius: 999px;
}

.vp-slider {
  -webkit-appearance: none; appearance: none;
  display: block; width: 100%; height: 4px; margin: 0;
  border-radius: 999px; outline: none; cursor: pointer;
  background: rgba(247, 246, 242, .22);
}
.vp-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 15px; height: 15px; border-radius: 50%;
  background: #F7F6F2; border: 2px solid var(--vp-accent);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}
.vp-slider::-moz-range-thumb {
  width: 15px; height: 15px; border-radius: 50%;
  background: #F7F6F2; border: 2px solid var(--vp-accent);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}
.vp-slider:focus-visible { box-shadow: 0 0 0 3px rgba(127, 174, 60, .35); }

.vp-hint {
  margin: 2px 0 0;
  font-size: 11px; line-height: 1.5;
  color: rgba(247, 246, 242, .48);
}

@media (max-width: 900px) {
  #view-panel { left: 69px; top: 56px; width: 208px; padding: 13px 14px 11px; }
  .vp-title { font-size: 13px; }
  .vp-label { font-size: 12px; }
}


/* ---------- 作者标识：纯文字「杨」印章 ----------
   用户反馈线性小人不好、名字前的圆圈没设计感。
   三处统一为衬线首字，去掉圆形底、边框与所有 SVG：
   右下角徽章白字 / 画作详情与作者卡品牌绿字。
   删掉这一整块即可回退。
   ------------------------------------------------ */
#artist-badge .ab-avatar {
  width: auto;
  height: auto;
  background: none;
  border: none;
  border-radius: 0;
  color: #F7F6F2;
  font-family: "Songti SC", "SimSun", "Noto Serif SC", serif;
  font-size: 24px;
  line-height: 1;
}

#art-panel .artist-avatar {
  width: 44px;
  height: 48px;
  background: none;
  border: none;
  border-radius: 0;
  color: var(--paper-green);
  font-family: "Songti SC", "SimSun", "Noto Serif SC", serif;
  font-size: 30px;
  line-height: 1;
}

#artist-card .acard-photo {
  font-family: "Songti SC", "SimSun", "Noto Serif SC", serif;
  font-size: 84px;
  line-height: 1;
}

#artist-badge .ab-avatar svg,
#art-panel .artist-avatar svg,
#artist-card .acard-photo svg { display: none; }


/* ---------- 导览卡：背景全透、保留边框 ----------
   暖米白实底会挡住画面上方的画；改成完全透明且不模糊，
   只留边框与极轻阴影做层次。文字加浅色光晕保证深色场景上可读。
   ------------------------------------------------ */
#tour-hud .tour-card {
  background: transparent;
  backdrop-filter: none;
  border: 1px solid rgba(74, 53, 40, .34);
  box-shadow: 0 12px 40px rgba(30, 24, 18, .18);
}

#tour-hud.editing .tour-card {
  border-color: rgba(90, 133, 35, .55);
  box-shadow: 0 0 0 1px rgba(90, 133, 35, .12), 0 12px 40px rgba(30, 24, 18, .18);
}

/* 卡片全透后，深色画作会从文字背后穿过。字改成实色墨黑 / 深品牌绿 +
   四向浅米白描边光晕，浅灰墙和深色画两种背景上都清楚。
   只改文字，不碰背景（仍全透、不模糊）。 */
#tour-hud .tour-card {
  --tour-halo:
    -1px -1px 0 rgba(247, 246, 242, .96),
     1px -1px 0 rgba(247, 246, 242, .96),
    -1px  1px 0 rgba(247, 246, 242, .96),
     1px  1px 0 rgba(247, 246, 242, .96),
     0 0 6px  rgba(247, 246, 242, .95),
     0 0 14px rgba(247, 246, 242, .88);
  border-color: rgba(74, 53, 40, .5);
}

#tour-hud .tour-step,
#tour-hud .tour-title,
#tour-hud .tour-text,
#tour-hud .tour-tip,
#tour-hud .tour-btn,
#tour-hud .tour-mini,
#tour-hud .tour-x {
  text-shadow: var(--tour-halo);
}

/* 绿底白字的主按钮不需要浅色描边，否则白字会糊 */
#tour-hud .tour-btn.primary { text-shadow: none; }

#tour-hud .tour-title {
  color: #1A1815;
  font-size: 20px;
  font-weight: 600;
}

#tour-hud .tour-text {
  color: #1A1815;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.85;
}

#tour-hud .tour-step,
#tour-hud .tour-tip {
  color: #43681A;
  font-weight: 600;
}

#tour-hud .tour-bar { background: rgba(74, 53, 40, .30); }

#tour-hud .tour-btn,
#tour-hud .tour-mini { color: #1A1815; border-color: rgba(74, 53, 40, .5); font-weight: 600; }
#tour-hud .tour-x   { color: rgba(26, 24, 21, .8); }
#tour-hud .tour-btn:hover,
#tour-hud .tour-mini:hover { background: rgba(247, 246, 242, .5); }


/* ---------- 维护模式：访客态收起全部场景编辑 / 调试 UI ----------
   body.dev-mode 由 main.js 的 setDevMode() 控制（?dev=1 或 Ctrl+Alt+D）。
   这里只管「看不见」，「点不动」由 JS 的 devMode 守卫负责，两层都要有。
   删掉这一整块即可回退到「所有调试 UI 常驻」。
   ---------------------------------------------------------------- */
body:not(.dev-mode) #hud,
body:not(.dev-mode) #calib-bar,
body:not(.dev-mode) #cam-debug,
body:not(.dev-mode) #crosshair,
body:not(.dev-mode) #tour-edit,
body:not(.dev-mode) #tour-actions-edit {
  display: none !important;
}


/* ---------- 左下角访客操作说明卡 ----------
   参照参考展馆的「标题 + 按键胶囊」排版，内容按本项目真实按键写：
   只有 WASD / 方向键、Shift、E/Q、拖拽、点击、Esc，
   参考图里的 Space 跳跃、O 环顾、视角翻转开关本项目都没有，不写。
   维护模式下让位给 #hud 调试日志；导览中淡出，不挡作品。
   删掉这一整块即可回退。
   ------------------------------------------------ */
#controls {
  position: fixed;
  left: 24px;
  bottom: 24px;
  width: 286px;
  padding: 14px 16px 12px;
  background: var(--surface);
  border: 1px solid var(--surface-line);
  border-radius: 14px;
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 44px rgba(0, 0, 0, .28);
  color: var(--warm-white);
  font-size: 12.5px;
  line-height: 1.5;
  pointer-events: none;
  z-index: 20;
  transition: opacity .35s ease;
}

.ctl-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .06em;
  margin-bottom: 10px;
}

.ctl-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 26px;
}

.ctl-k { color: rgba(247, 246, 242, .82); white-space: nowrap; }

.ctl-v {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  white-space: nowrap;
}

#controls kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  background: rgba(247, 246, 242, .14);
  border: 1px solid rgba(247, 246, 242, .18);
  border-radius: 6px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1;
  color: #F7F6F2;
}

.ctl-or,
.ctl-mouse {
  font-style: normal;
  font-size: 11px;
  color: rgba(247, 246, 242, .55);
  margin-left: 3px;
}

.ctl-mouse { margin-left: 0; font-size: 11.5px; color: rgba(247, 246, 242, .74); }

.ctl-foot {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(255, 255, 255, .10);
  font-size: 10.5px;
  line-height: 1.6;
  color: rgba(247, 246, 242, .52);
}

body.dev-mode #controls { display: none !important; }
body.touring #controls { opacity: 0; pointer-events: none; }

@media (max-width: 900px) {
  #controls { left: 14px; bottom: 14px; width: 246px; padding: 11px 12px 10px; font-size: 11.5px; }
  .ctl-title { font-size: 12.5px; margin-bottom: 6px; }
  .ctl-foot { display: none; }
  #controls kbd { min-width: 19px; height: 19px; padding: 0 4px; font-size: 10.5px; }
}

/* ---------- 开场加载遮罩（访客态也能看到进度） ---------- */
#boot {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0E0C0A;
  transition: opacity .6s ease;
}
#boot.done { opacity: 0; pointer-events: none; }
.boot-inner { width: min(300px, 68vw); text-align: center; }
.boot-name {
  margin-bottom: 20px;
  color: #F7F6F2;
  font-size: 14px;
  letter-spacing: .22em;
  opacity: .8;
}
.boot-bar {
  height: 2px;
  border-radius: 2px;
  overflow: hidden;
  background: rgba(247, 246, 242, .14);
}
.boot-bar i {
  display: block;
  width: 0;
  height: 100%;
  background: #5A8523;
  transition: width .25s ease;
}
.boot-tip {
  margin-top: 14px;
  color: rgba(247, 246, 242, .5);
  font-size: 12px;
  letter-spacing: .05em;
  font-variant-numeric: tabular-nums;
}
