/* ============================================================
   深度雅游版 · 适老化样式
   设计原则：大字、高对比、大触控、防误触、弱动画
   WCAG AA → AAA 对比度目标
   ============================================================ */

/* ---- 全局 ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* 故宫主色 */
  --color-red:        #8B1A1A;
  --color-red-light:  #A52A2A;
  --color-gold:       #C8A45C;
  --color-gold-light: #E8D5A3;
  --color-bg:         #FDF8F0;
  --color-bg-alt:     #F5EDE0;
  --color-text:       #2C1810;
  --color-text-light: #5C4033;
  --color-border:     #D4C4A8;
  --color-white:      #FFFFFF;
  --color-green:      #2E7D32;
  --color-blue:       #1565C0;

  /* 适老化尺寸 */
  --font-base:  20px;
  --font-lg:    24px;
  --font-xl:    28px;
  --font-xxl:   36px;
  --font-small: 16px;
  --radius:     12px;
  --gap:        16px;
  --touch-min:  48px;  /* 最小触控目标 */
}

html {
  font-size: var(--font-base);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---- 顶栏 ---- */
.header {
  background: linear-gradient(135deg, var(--color-red) 0%, var(--color-red-light) 100%);
  color: var(--color-gold-light);
  padding: 16px 20px;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.header h1 {
  font-size: var(--font-xl);
  font-weight: 700;
  letter-spacing: 2px;
}
.header-sub {
  font-size: var(--font-small);
  opacity: 0.85;
  margin-top: 4px;
}

/* ---- 模式切换（现场/云游） ---- */
.mode-switch {
  display: flex;
  justify-content: center;
  gap: 0;
  margin: var(--gap) auto;
  max-width: 400px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid var(--color-red);
}
.mode-btn {
  flex: 1;
  padding: 14px 8px;
  font-size: var(--font-lg);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  min-height: var(--touch-min);
  background: var(--color-white);
  color: var(--color-red);
}
.mode-btn.active {
  background: var(--color-red);
  color: var(--color-gold-light);
}

/* ---- 节气提示条 ---- */
.solar-bar {
  background: var(--color-bg-alt);
  border-left: 4px solid var(--color-gold);
  padding: 12px 16px;
  margin: 0 var(--gap) var(--gap);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: var(--font-base);
  color: var(--color-text-light);
  line-height: 1.6;
}
.solar-bar strong {
  color: var(--color-red);
}

/* ---- 场景卡片网格 ---- */
.scene-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--gap);
  padding: 0 var(--gap) var(--gap);
  max-width: 960px;
  margin: 0 auto;
}
.scene-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid var(--color-border);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  background: var(--color-white);
  min-height: 160px;
}
.scene-card:active {
  transform: scale(0.97);
}
.scene-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.scene-card-img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}
.scene-card-placeholder {
  width: 100%;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  background: linear-gradient(135deg, var(--color-bg-alt), var(--color-gold-light));
}
.scene-card-body {
  padding: 12px 14px;
}
.scene-card-name {
  font-size: var(--font-lg);
  font-weight: 700;
  color: var(--color-red);
}
.scene-card-area {
  font-size: var(--font-small);
  color: var(--color-text-light);
  margin-top: 2px;
}
.scene-card-desc {
  font-size: var(--font-small);
  color: var(--color-text-light);
  margin-top: 6px;
  line-height: 1.5;
}
.scene-card-personas {
  margin-top: 8px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.scene-card-personas span {
  font-size: var(--font-small);
  background: var(--color-bg-alt);
  padding: 2px 8px;
  border-radius: 20px;
}

/* ---- 场景详情面板 ---- */
.scene-panel {
  display: none;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 var(--gap);
}
.scene-panel.visible { display: block; }
.scene-panel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: var(--gap);
}
.btn-back {
  font-size: var(--font-xl);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-red);
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  display: flex;
  align-items: center;
  justify-content: center;
}
.scene-panel-title {
  font-size: var(--font-xl);
  font-weight: 700;
  color: var(--color-red);
}

/* ---- 讲解人选择 ---- */
.persona-list {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: var(--gap);
}
.persona-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: var(--color-white);
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: var(--font-base);
  font-weight: 600;
  min-height: var(--touch-min);
  transition: border-color 0.15s;
}
.persona-chip.active {
  border-color: var(--color-red);
  background: #FFF5F5;
}
.persona-chip .emoji {
  font-size: var(--font-xl);
}
.persona-chip .view-tag {
  font-size: 13px;
  color: var(--color-text-light);
  font-weight: 400;
}

/* ---- 对话区 ---- */
.chat-area {
  background: var(--color-white);
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  min-height: 300px;
  max-height: 60vh;
  overflow-y: auto;
  padding: var(--gap);
  margin-bottom: var(--gap);
  scroll-behavior: smooth;
}
.chat-msg {
  margin-bottom: 14px;
  line-height: 1.7;
}
.chat-msg.assistant {
  padding: 12px 16px;
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  font-size: var(--font-base);
}
.chat-msg.user {
  text-align: right;
  padding: 12px 16px;
  background: #E8F5E9;
  border-radius: var(--radius);
  font-size: var(--font-base);
}
.chat-msg .msg-label {
  font-size: var(--font-small);
  font-weight: 600;
  color: var(--color-red);
  margin-bottom: 4px;
}
.chat-typing {
  color: var(--color-text-light);
  font-style: italic;
}

/* ---- 输入栏 ---- */
.chat-input-bar {
  display: flex;
  gap: 10px;
  margin-bottom: var(--gap);
}
.chat-input {
  flex: 1;
  padding: 14px 16px;
  font-size: var(--font-base);
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  outline: none;
  min-height: var(--touch-min);
}
.chat-input:focus {
  border-color: var(--color-red);
}
.btn-send, .btn-voice {
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  padding: 0 20px;
  font-size: var(--font-lg);
  font-weight: 700;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
}
.btn-send {
  background: var(--color-red);
  color: var(--color-white);
}
.btn-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-voice {
  background: var(--color-green);
  color: var(--color-white);
  font-size: var(--font-xl);
}
.btn-voice.recording {
  background: #C62828;
  animation: pulse 1s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ---- 快捷故事气泡 ---- */
.story-bubbles {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: var(--gap);
}
.story-bubble {
  padding: 10px 16px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  font-size: var(--font-small);
  cursor: pointer;
  min-height: var(--touch-min);
  display: flex;
  align-items: center;
}
.story-bubble:active {
  background: var(--color-gold-light);
}

/* ---- TTS 朗读控制 ---- */
.tts-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  margin-bottom: var(--gap);
  font-size: var(--font-small);
}
.btn-tts {
  min-width: var(--touch-min);
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-white);
  cursor: pointer;
  font-size: var(--font-base);
}
.btn-tts.active {
  background: var(--color-gold-light);
  border-color: var(--color-gold);
}

/* ---- 共创入口 ---- */
.cocreate-section {
  max-width: 960px;
  margin: 0 auto var(--gap);
  padding: 0 var(--gap);
}
.cocreate-btn {
  width: 100%;
  padding: 16px;
  font-size: var(--font-lg);
  font-weight: 700;
  background: var(--color-gold);
  color: var(--color-text);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  min-height: var(--touch-min);
}
.cocreate-form {
  display: none;
  background: var(--color-white);
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--gap);
  margin-top: var(--gap);
}
.cocreate-form.visible { display: block; }
.cocreate-form textarea {
  width: 100%;
  min-height: 120px;
  font-size: var(--font-base);
  padding: 12px;
  border: 2px solid var(--color-border);
  border-radius: 8px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.6;
}
.cocreate-form textarea:focus {
  border-color: var(--color-red);
  outline: none;
}
.cocreate-form input {
  width: 100%;
  padding: 12px;
  font-size: var(--font-base);
  border: 2px solid var(--color-border);
  border-radius: 8px;
  margin-top: 10px;
}
.cocreate-submit {
  margin-top: 12px;
  padding: 14px 32px;
  font-size: var(--font-lg);
  background: var(--color-red);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  min-height: var(--touch-min);
}

/* ---- 共创故事列表 ---- */
.cocreate-list {
  margin-top: var(--gap);
}
.cocreate-item {
  background: var(--color-bg-alt);
  padding: 14px 16px;
  border-radius: var(--radius);
  margin-bottom: 10px;
  line-height: 1.6;
}
.cocreate-item .author {
  font-weight: 700;
  color: var(--color-red);
}
.cocreate-item .label-tag {
  font-size: 13px;
  padding: 2px 8px;
  background: var(--color-gold-light);
  border-radius: 4px;
  margin-left: 6px;
}
.cocreate-item .seal {
  color: var(--color-gold);
  font-size: var(--font-lg);
}

/* ---- 歇脚提示 ---- */
.rest-tip {
  background: #E8F5E9;
  border-left: 4px solid var(--color-green);
  padding: 10px 14px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: var(--font-small);
  margin-bottom: var(--gap);
  color: var(--color-text-light);
}

/* ---- 底部 ---- */
.footer {
  text-align: center;
  padding: 20px var(--gap);
  font-size: var(--font-small);
  color: var(--color-text-light);
  border-top: 1px solid var(--color-border);
}
.footer a {
  color: var(--color-red);
  text-decoration: none;
}

/* ============================================================
   UIUX 精心设计增补样式
   ============================================================ */

/* ---- 全局焦点环（无障碍） ---- */
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

button:focus-visible, .mode-btn:focus-visible {
  outline-offset: 2px;
}

/* ---- 自定义滚动条 ---- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--paper-2); border-radius: 5px; }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 5px; border: 2px solid var(--paper-2); }
::-webkit-scrollbar-thumb:hover { background: var(--red); }

/* ---- 入场动画关键帧 ---- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes pulse-soft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ---- 滚动揭示动画类（由JS驱动） ---- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: .08s; }
.reveal-delay-2 { transition-delay: .16s; }
.reveal-delay-3 { transition-delay: .24s; }
.reveal-delay-4 { transition-delay: .32s; }

/* ---- 按钮按压反馈 ---- */
button:active, .scene-card:active, .persona-chip:active, .story-bubble:active {
  transform: scale(0.97);
}

/* ---- Hero 区域升级 ---- */
.hero {
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(180deg, transparent, var(--paper));
  pointer-events: none;
}

.elderly-hero {
  padding: 40px 20px 48px;
  position: relative;
}

.kicker {
  animation: fadeInUp .6s ease both;
}

.hero h2 {
  animation: fadeInUp .6s .1s ease both;
}

.hero p {
  animation: fadeInUp .6s .2s ease both;
}

.solar-bar {
  animation: fadeInUp .6s .3s ease both;
}

/* ---- 节气信息条升级 ---- */
.solar-bar {
  position: relative;
  display: block;
}

/* ---- 区块标题装饰 ---- */
.sec-title {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 6px;
}

.sec-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 48px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), var(--red));
}

/* ---- 场景卡片区域标签 ---- */
.scene-card {
  position: relative;
  overflow: hidden;
}

.scene-card .area-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(110,20,20,0.82);
  color: #fdf2dc;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  z-index: 2;
  pointer-events: none;
}

.scene-card-img {
  transition: transform .42s cubic-bezier(.25,.46,.45,.94);
}

.scene-card-placeholder {
  transition: transform .42s cubic-bezier(.25,.46,.45,.94);
}


/* ---- 讲解人卡片视觉升级 ---- */
.persona-chip {
  position: relative;
  overflow: hidden;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}

.persona-chip::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--gold);
  border-radius: 999px 0 0 999px;
  opacity: 0;
  transition: opacity .18s;
}

.persona-chip:hover::before {
  opacity: 1;
}

.persona-chip.active::before {
  opacity: 1;
  background: var(--red);
}

/* ---- 聊天气泡升级 ---- */
.chat-msg.assistant {
  border-radius: 14px 14px 14px 4px;
  position: relative;
}

.chat-msg.user {
  border-radius: 14px 14px 4px 14px;
}

.chat-msg .msg-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(200,162,74,0.18);
}

.chat-msg.user .msg-label {
  background: rgba(253,242,220,0.25);
}

/* ---- 聊天输入框升级 ---- */
.chat-input-bar {
  position: relative;
}

.chat-input {
  transition: border-color .2s, box-shadow .2s;
}

.chat-input:focus {
  box-shadow: 0 0 0 4px rgba(200,162,74,0.15), 0 2px 8px rgba(200,162,74,0.1);
}

/* ---- TTS 按钮脉冲动画 ---- */
.btn-tts.active {
  animation: pulse-soft 2s infinite;
}

/* ---- 共创展开动画 ---- */
.cocreate-form {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .4s ease, opacity .3s ease, padding .3s ease;
}

.cocreate-form.visible {
  max-height: 600px;
  opacity: 1;
}

/* ---- 图片骨架屏加载 ---- */
.img-skeleton {
  background:
    linear-gradient(90deg, var(--paper-2) 25%, var(--color-bg-alt) 50%, var(--paper-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.scene-card-img.img-skeleton {
  animation: shimmer 1.5s infinite;
}

/* ---- 底部信息面板升级 ---- */
.map-info-panel {
  position: relative;
  overflow: hidden;
}

.map-info-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--red), var(--gold));
  border-radius: 20px 20px 0 0;
}

/* ---- 信息面板路线选择器 ---- */
.map-route-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.map-route-picker-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  color: var(--red-deep);
  font-size: 15px;
  font-weight: 900;
}

.map-route-mini {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  transition: transform .12s, border-color .15s, background .15s, box-shadow .15s;
}

.map-route-mini:hover {
  border-color: var(--gold);
  background: #fbf0d8;
  box-shadow: 0 2px 8px rgba(200,162,74,0.18);
}

.map-route-mini:active {
  transform: scale(0.98);
}

.map-route-mini.active {
  border-color: var(--red);
  background: linear-gradient(135deg, #fff4d4, #ecd18a);
  box-shadow: 0 4px 12px rgba(138,26,26,0.14);
}

.map-route-mini-name {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--red-deep);
  font-size: 15px;
  font-weight: 900;
}

.map-route-mini-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.map-route-mini-stops {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 3px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
}

.map-back-routes {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  border: 1px dashed var(--gold);
  border-radius: 10px;
  background: transparent;
  color: var(--red-deep);
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}

.map-back-routes:hover {
  background: var(--gold-soft);
  border-color: var(--red);
}

/* ---- 镇馆之宝卡片 ---- */
.treasure-section {
  margin-top: 34px;
}

.treasure-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.treasure-card {
  display: flex;
  flex-direction: row;
  background: linear-gradient(135deg, #fffcf5, #faf5eb);
  border: 1px solid rgba(196,164,105,0.2);
  border-radius: 14px;
  padding: 0;
  box-shadow: 0 2px 10px rgba(120,80,20,0.06);
}
.treasure-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(120,80,20,0.1);
}
.treasure-card .tc-img {
  width: 140px;
  min-width: 140px;
  height: auto;
  min-height: 105px;
  border-radius: 14px 0 0 14px;
}
.treasure-card .tc-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px 16px;
}

/* ---- 历史的声音弹窗 ---- */
.hv-panel {
  max-width: 620px;
  min-height: min(88vh, 700px);
  max-height: 92vh;
}
.hv-avatar {
  font-size: 36px;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hv-story-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}
.hv-story-text {
  font-size: 14px;
  line-height: 1.9;
  color: #3a332a;
  white-space: pre-wrap;
  text-align: justify;
  letter-spacing: 0.2px;
}
.hv-story-text .typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--red);
  margin-left: 2px;
  animation: blink 0.8s step-end infinite;
  vertical-align: text-bottom;
}
@keyframes blink { 50% { opacity: 0; } }
.hv-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: var(--paper-2, #fdf6e6);
}
.hv-play-btn, .hv-stop-btn {
  padding: 10px 24px;
  border-radius: 999px;
  border: none;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.hv-play-btn {
  background: linear-gradient(135deg, var(--red), var(--red-deep));
  color: #fff;
}
.hv-play-btn:hover { filter: brightness(1.1); }
.hv-stop-btn {
  background: #e8e0d4;
  color: #5a4a3a;
}
.hv-stop-btn:hover { background: #ddd4c8; }

/* Tab 切换 */
.hv-tabs {
  display: flex;
  border-bottom: 2px solid var(--line);
  background: var(--paper-2, #fdf6e6);
}
.hv-tab {
  flex: 1;
  padding: 10px 0;
  border: none;
  background: transparent;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.hv-tab.active {
  color: var(--red-deep);
}
.hv-tab.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 20%;
  width: 60%;
  height: 2px;
  background: var(--red);
  border-radius: 2px;
}
.hv-tab:hover:not(.active) {
  color: var(--brown);
}
.hv-tab i { margin-right: 6px; }

/* Tab 面板容器 */
.hv-tab-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}
.hv-tab-panel[hidden] {
  display: none !important;
}

/* 聊天区域 */
.hv-chat-area {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.hv-chat-welcome {
  text-align: center;
  padding: 24px 16px;
  color: #3a332a;
  font-size: 14px;
  line-height: 1.9;
  letter-spacing: 0.2px;
}
.hv-chat-msg {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.hv-chat-msg.user {
  flex-direction: row-reverse;
}
.hv-chat-msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
  flex-shrink: 0;
}
.hv-chat-msg-avatar.user-avatar {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.hv-chat-bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.9;
  word-break: break-word;
}
.hv-chat-msg:not(.user) .hv-chat-bubble {
  background: #f5ede0;
  color: #3a332a;
  border-top-left-radius: 4px;
  text-align: justify;
  letter-spacing: 0.2px;
}
.hv-chat-msg.user .hv-chat-bubble {
  background: linear-gradient(135deg, var(--red), var(--red-deep));
  color: #fff;
  border-top-right-radius: 4px;
}
.hv-chat-bubble .typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--red);
  margin-left: 2px;
  animation: blink 0.8s step-end infinite;
  vertical-align: text-bottom;
}

/* 聊天输入栏 */
.hv-chat-input-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: var(--paper-2, #fdf6e6);
}
.hv-chat-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 16px;
  background: #fff;
  outline: none;
  transition: border-color 0.2s;
}
.hv-chat-input:focus {
  border-color: var(--red);
}
.hv-chat-send {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--red), var(--red-deep));
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  transition: filter 0.2s;
  flex-shrink: 0;
}
.hv-chat-send:hover { filter: brightness(1.1); }
.hv-chat-send:disabled { opacity: 0.5; cursor: not-allowed; }

/* 跟随问题建议 */
.hv-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0 8px;
}
.hv-suggest-btn {
  padding: 8px 14px;
  border: 1px solid var(--gold);
  border-radius: 18px;
  background: rgba(196,164,105,0.08);
  color: var(--brown);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  line-height: 1.4;
}
.hv-suggest-btn:hover {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
}
.hv-suggest-btn i {
  margin-right: 4px;
  font-size: 12px;
  opacity: 0.7;
}

/* ---- 响应式 ---- */
@media (max-width: 768px) {
  .hero-desc {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  :root {
    --font-base: 18px;
    --font-lg: 22px;
    --font-xl: 26px;
  }
  .scene-grid {
    grid-template-columns: 1fr;
  }
  .persona-list {
    flex-direction: column;
  }
  .chat-area {
    max-height: 85vh;
  }
}

/* ---- 弱动画模式（尊重系统偏好）---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ---- 高对比度模式 ---- */
@media (prefers-contrast: high) {
  :root {
    --color-bg:      #FFFFFF;
    --color-bg-alt:  #F0F0F0;
    --color-text:    #000000;
    --color-border:  #333333;
  }
}

:root {
  --red: #8a1a1a;
  --red-deep: #6e1414;
  --gold: #c8a24a;
  --gold-soft: #e7d49b;
  --ink: #2b2320;
  --paper: #f6efe2;
  --paper-2: #efe5d2;
  --card: #fffaf0;
  --muted: #8a7d68;
  --line: #e3d6bd;
  --shadow: 0 10px 30px rgba(60, 30, 10, 0.16);
  --green: #3f7d4e;
  --color-red: var(--red);
  --color-red-light: var(--red-deep);
  --color-gold: var(--gold);
  --color-gold-light: var(--gold-soft);
  --color-bg: var(--paper);
  --color-bg-alt: var(--paper-2);
  --color-text: var(--ink);
  --color-text-light: var(--muted);
  --color-border: var(--line);
  --radius: 16px;
  --gap: 18px;
}

html {
  background: var(--paper);
}

body {
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 18%, rgba(200,162,74,0.12), transparent 40%),
    radial-gradient(circle at 88% 82%, rgba(138,26,26,0.08), transparent 45%),
    linear-gradient(180deg, #fbf3df 0%, var(--paper) 45%, #f2e7d4 100%);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  line-height: 1.68;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(110,20,20,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110,20,20,0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.2), rgba(0,0,0,0.02));
  z-index: -1;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px max(22px, calc((100vw - 1120px) / 2));
  background: linear-gradient(120deg, var(--red), var(--red-deep));
  color: #fdf6e6;
  box-shadow: 0 4px 18px rgba(60,20,20,0.28);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.seal {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: var(--gold);
  color: var(--red-deep);
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 900;
  border: 2px solid #f3e6c2;
  box-shadow: inset 0 0 0 2px rgba(110,20,20,0.25), 0 4px 10px rgba(0,0,0,0.16);
  flex-shrink: 0;
}

.brand h1 {
  font-size: 22px;
  letter-spacing: 1px;
  white-space: nowrap;
}

.tagline {
  margin-top: 2px;
  color: rgba(253,246,230,0.82);
  font-size: 14px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.mode-switch {
  display: flex;
  gap: 4px;
  max-width: none;
  margin: 0;
  padding: 4px;
  overflow: visible;
  border: 1px solid rgba(243,230,194,0.45);
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
}

.mode-btn {
  min-height: 44px;
  padding: 8px 18px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: #f4e8cf;
  font-size: 17px;
  font-weight: 700;
  white-space: nowrap;
  font-family: inherit;
}

.mode-btn.active {
  background: var(--gold);
  color: var(--red-deep);
  box-shadow: 0 2px 8px rgba(20,10,5,0.18);
}

main {
  max-width: 820px;
  margin: 0 auto;
  padding: 28px 22px 64px;
}

.hero {
  position: relative;
  text-align: center;
  padding: 28px 10px 34px;
  border-bottom: 1px solid rgba(200,162,74,0.2);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(200,162,74,0.08), transparent 60%),
    radial-gradient(ellipse at 20% 80%, rgba(138,26,26,0.04), transparent 40%);
}

.elderly-hero::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: min(800px, 96vw);
  height: 100%;
  transform: translateX(-50%);
  border-radius: 0 0 32px 32px;
  background:
    linear-gradient(180deg, rgba(40,24,12,0.12), rgba(40,24,12,0.02) 70%, transparent),
    url("/assets/gugong.jpg") center 35% / cover no-repeat;
  opacity: 0.1;
  filter: saturate(0.85);
  z-index: -1;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  padding: 6px 18px;
  border: 1px solid rgba(196,164,105,0.5);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(231,212,155,0.5), rgba(200,162,74,0.12));
  color: #7a6530;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 3px;
  backdrop-filter: blur(4px);
}

.hero h2 {
  margin-bottom: 18px;
  color: var(--red-deep);
  font-size: 30px;
  line-height: 1.35;
  letter-spacing: 2px;
  font-weight: 800;
  text-shadow: 0 1px 3px rgba(110,20,20,0.06);
  white-space: nowrap;
}
.hero h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  margin: 16px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: 2px;
}

.hero p {
  max-width: 780px;
  margin: 0 auto 20px;
  color: #5b5145;
  font-size: 18px;
}

/* Hero 描述文字 */
.hero-desc {
  max-width: 640px;
  margin: 0 auto 22px;
  color: #6b5d4f;
  font-size: 15px;
  line-height: 1.85;
  text-align: center;
  animation: fadeInUp .6s .2s ease both;
  letter-spacing: 0.3px;
}

/* Hero 故宫总体介绍 */
.hero-intro-box {
  max-width: 680px;
  margin: 0 auto 28px;
  padding: 22px 28px;
  background: linear-gradient(145deg, rgba(255,252,245,0.95), rgba(248,240,220,0.9));
  border: none;
  border-left: 4px solid var(--gold);
  border-radius: 4px 14px 14px 4px;
  box-shadow: 0 4px 20px rgba(80,50,20,0.06), inset 0 0 0 1px rgba(196,164,105,0.12);
  animation: fadeInUp .6s .35s ease both;
  position: relative;
}
.hero-intro-box::before {
  content: "\201C";
  position: absolute;
  top: 8px;
  left: 14px;
  font-size: 48px;
  line-height: 1;
  color: rgba(196,164,105,0.2);
  font-family: Georgia, serif;
}
.hero-intro-box p {
  color: #3a332a;
  font-size: 14px;
  line-height: 1.9;
  text-align: justify;
  text-indent: 2em;
  margin: 0;
  letter-spacing: 0.2px;
}
.hero-intro-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 9px 22px;
  font-size: 14px;
  font-weight: 600;
  background: linear-gradient(135deg, #8a1a1a, #6b1414);
  color: #fff;
  border: none;
  border-radius: 22px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 3px 12px rgba(138,26,26,0.25);
  letter-spacing: 0.5px;
  font-family: inherit;
}
.hero-intro-play-btn:hover,
.hero-intro-play-btn:active {
  transform: translateY(-1px);
  box-shadow: 0 5px 18px rgba(138,26,26,0.3);
}

/* Hero 节气条包裹 */
.hero-solar-wrap {
  max-width: 660px;
  margin: 0 auto;
  animation: fadeInUp .6s .35s ease both;
}

.hero-solar-wrap .solar-bar {
  width: 100%;
  margin: 0;
}

/* 胡太医清宫养生经 */
.solar-health-panel {
  margin-top: 10px;
  background: linear-gradient(135deg, rgba(255,248,235,0.95), rgba(245,235,210,0.92));
  border: 1px solid rgba(196,164,105,0.3);
  border-radius: 14px;
  overflow: hidden;
  animation: fadeInUp 0.5s ease both;
  box-shadow: 0 2px 12px rgba(120,80,20,0.08);
}
.solar-health-header {
  background: linear-gradient(135deg, rgba(196,164,105,0.18), rgba(196,164,105,0.08));
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--brown);
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(196,164,105,0.15);
}
.solar-health-header i { color: var(--green, #2e7d32); }
.solar-health-body {
  padding: 14px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.solar-health-card {
  flex: 1 1 140px;
  min-width: 120px;
  background: #fff;
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  transition: transform 0.2s;
}
.solar-health-card:hover { transform: translateY(-2px); }
.solar-health-card .shc-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.solar-health-card .shc-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--brown);
  line-height: 1.5;
}
.solar-health-card .shc-value small {
  font-weight: 400;
  font-size: 13px;
  color: var(--muted);
  display: block;
  margin-top: 3px;
  line-height: 1.4;
}
.solar-health-tts-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  padding: 6px 14px;
  font-size: 14px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 18px;
  cursor: pointer;
  transition: 0.2s;
}
.solar-health-tts-btn:hover { filter: brightness(1.1); }

/* Hero 装饰线 */
.hero-deco-top {
  width: 64px;
  height: 3px;
  margin: 0 auto 20px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--red), var(--gold));
  opacity: .7;
}

.hero-deco-bottom {
  width: 120px;
  height: 2px;
  margin: 28px auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: .5;
}

.solar-bar {
  max-width: 760px;
  margin: 18px auto 0;
  padding: 16px 22px;
  border: 1px solid var(--gold);
  border-left: 5px solid var(--gold);
  border-radius: 14px;
  background: rgba(255,250,240,0.95);
  color: #5b5145;
  box-shadow: 0 4px 14px rgba(80,50,20,0.08);
  font-size: 17px;
  line-height: 1.75;
  text-align: left;
}

.solar-bar strong {
  color: var(--red-deep);
}

.sec-title {
  margin-bottom: 6px;
  color: var(--red-deep);
  font-size: 24px;
}

.sec-sub {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 16px;
}

.map-section,
.task-section {
  margin-top: 34px;
}

.guide-map-section {
  margin-top: 30px;
  padding: 20px;
  border: 1px solid rgba(200,162,74,0.35);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255,250,240,0.9), rgba(251,240,216,0.72)),
    radial-gradient(circle at 20% 12%, rgba(200,162,74,0.14), transparent 34%);
  box-shadow: 0 8px 24px rgba(80,50,20,0.10);
}

.guide-map-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 240px;
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: #5b5145;
  font-size: 14px;
  font-weight: 800;
}

.legend-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}

.legend-dot.route {
  background: var(--red);
}

.legend-dot.rest {
  background: var(--green);
}

.legend-dot.axis {
  background: var(--gold);
}

.guide-map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.8fr);
  gap: 18px;
  margin-top: 16px;
  align-items: stretch;
}

.palace-map {
  position: relative;
  width: 100%;
  max-width: 620px;
  aspect-ratio: 9 / 16;
  justify-self: center;
  overflow: hidden;
  border: 8px solid var(--red);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(40,24,12,0.42), rgba(40,24,12,0.30) 45%, rgba(40,24,12,0.5));
  box-shadow: var(--shadow), inset 0 0 0 3px var(--gold);
}

.palace-map::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/assets/gugong.jpg") center 30% / cover no-repeat;
  z-index: 0;
}

.axis-line {
  position: absolute;
  left: 50%;
  top: 4%;
  bottom: 4%;
  width: 0;
  border-left: 3px dashed rgba(255,235,190,0.75);
  transform: translateX(-50%);
  z-index: 1;
}

.compass {
  position: absolute;
  top: 12px;
  right: 16px;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  text-shadow: 0 1px 3px rgba(0,0,0,0.75);
  z-index: 2;
}

.moat-label {
  position: absolute;
  bottom: 12px;
  left: 16px;
  color: #ffe9c2;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 2px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.75);
  z-index: 2;
}

.map-gate-label {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(110,20,20,0.88);
  color: #fdf2dc;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 1px;
  pointer-events: none;
  z-index: 2;
}

.map-gate-label.north {
  top: 12px;
}

.map-gate-label.south {
  bottom: 12px;
}

.map-route-line {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s;
  z-index: 2;
}

.map-route-line.active {
  opacity: 1;
}

.map-route-line polyline {
  fill: none;
  stroke: rgba(224,60,60,0.95);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 6 5;
  filter: drop-shadow(0 1px 3px rgba(80,20,20,0.6));
  animation: routeFlow 1.2s linear infinite;
}

@keyframes routeFlow {
  to { stroke-dashoffset: -11; }
}

.map-point {
  position: absolute;
  left: var(--left);
  top: var(--top);
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
  color: var(--ink);
  box-shadow: none;
  font-family: inherit;
  cursor: pointer;
  z-index: 3;
  transition: transform .15s;
}

.map-point:hover,
.map-point:focus-visible {
  transform: translate(-50%, -50%) scale(1.06);
  outline: 3px solid rgba(200,162,74,0.32);
  outline-offset: 7px;
}

.map-point.active,
.map-point.in-route {
  color: var(--red-deep);
}

.map-point .pin {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #fff;
  border: 3px solid #fff;
  box-shadow: 0 5px 14px rgba(0,0,0,0.42);
}

.map-point .pin img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.map-point .pin-main-ic {
  color: var(--red-deep);
  font-size: 24px;
}

.map-point .pin-ic {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.94);
  color: var(--red-deep);
  font-size: 13px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
}

.map-point.axis .pin {
  border-color: var(--gold);
}

.map-point.in-route .pin,
.map-point.active .pin {
  border-color: var(--gold);
  box-shadow: 0 0 0 5px rgba(200,162,74,0.62), 0 5px 14px rgba(0,0,0,0.42);
}

.map-point:not(.in-route):not(.active) .pin img {
  filter: grayscale(0.28) brightness(0.88);
}

.map-point .pin-label {
  max-width: 90px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.92);
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 2px 7px rgba(0,0,0,0.18);
}

.map-point.in-route .pin-label,
.map-point.active .pin-label {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.map-rest-badge {
  position: absolute;
  right: 6px;
  top: -7px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 12px;
  box-shadow: 0 2px 8px rgba(40,80,45,0.22);
  z-index: 5;
}

.map-info-panel {
  display: flex;
  flex-direction: column;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 4px 14px rgba(80,50,20,0.08);
  overflow: hidden;
}

.map-info-scroll {
  flex: 1;
  overflow-y: auto;
  margin: 0 -6px;
  padding: 0 6px;
}

.map-info-kicker {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: #6b551f;
  font-size: 12px;
  font-weight: 900;
}

.map-info-panel h4 {
  margin-bottom: 6px;
  color: var(--red-deep);
  font-size: 18px;
}

.map-info-panel p {
  color: #5b5145;
  font-size: 14px;
  line-height: 1.65;
}

.map-rest-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.map-rest-item {
  padding: 8px 10px;
  border: 1px solid #cfe6d5;
  border-radius: 10px;
  background: #eaf3ec;
  color: #2f5b3c;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.elderly-scenes-section {
  position: relative;
  padding: 20px;
  border: 1px solid rgba(200,162,74,0.32);
  border-radius: 24px;
  background: rgba(255,250,240,0.42);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.42);
}

.scene-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 18px;
  max-width: none;
  margin: 0;
  padding: 0;
}

.scene-card {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 4px 14px rgba(80,50,20,0.08);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}

.scene-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: 0 12px 26px rgba(80,50,20,0.18);
}

.scene-card:active {
  transform: translateY(-1px) scale(.99);
}

.scene-card::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 44px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--red));
}

.scene-card-img,
.scene-card-placeholder {
  width: 100%;
  height: 158px;
  display: block;
}

.scene-card-img {
  object-fit: cover;
  transition: transform .32s;
}

.scene-card:hover .scene-card-img {
  transform: scale(1.06);
}

.scene-card-placeholder {
  display: grid;
  place-items: center;
  color: #fdf6e6;
  font-size: 54px;
  background:
    linear-gradient(135deg, rgba(138,26,26,.82), rgba(110,20,20,.92)),
    radial-gradient(circle at 30% 20%, rgba(200,162,74,.42), transparent 40%);
}

.scene-card-body {
  position: relative;
  padding: 15px 15px 42px;
}

.scene-card-name {
  color: var(--red-deep);
  font-size: 22px;
  font-weight: 900;
  line-height: 1.3;
}

.scene-card-area {
  margin-top: 4px;
  color: var(--gold);
  font-size: 14px;
  font-weight: 800;
}

.scene-card-desc {
  margin-top: 8px;
  color: #5b5145;
  font-size: 15px;
  line-height: 1.55;
}

.scene-card-personas {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.scene-card-personas span {
  padding: 3px 9px;
  border: 1px solid rgba(200,162,74,0.55);
  border-radius: 999px;
  background: #fbf0d8;
  color: #6b551f;
  font-size: 13px;
  font-weight: 700;
}

.scene-panel {
  max-width: 980px;
  margin: 28px auto 64px;
  padding: 0 18px;
}

.scene-panel.visible {
  display: block;
}

.scene-panel.visible::before {
  content: "";
  display: block;
  height: 10px;
}

.scene-panel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 16px 18px;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(120deg, var(--red), var(--red-deep));
  color: #fdf6e6;
  box-shadow: var(--shadow);
}

.btn-back {
  width: 46px;
  height: 46px;
  min-width: 46px;
  min-height: 46px;
  border: 1px solid rgba(243,230,194,0.45);
  border-radius: 50%;
  background: rgba(255,255,255,0.16);
  color: #fff;
  font-size: 22px;
}

.scene-panel-title {
  color: #fdf6e6;
  font-size: 26px;
  font-weight: 900;
}

.scene-panel > .scene-hero,
.scene-panel > .rest-tip,
.scene-panel > .persona-list,
.scene-panel > .story-bubbles,
.scene-panel > .tts-bar,
.scene-panel > .chat-area,
.scene-panel > .chat-input-bar,
.scene-panel > .cocreate-section {
  background: var(--paper);
}

.scene-hero {
  background: var(--paper);
  padding: 0;
  overflow: hidden;
}
.scene-hero-img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  display: block;
}
.scene-hero-intro {
  padding: 16px 20px;
  font-size: 14px;
  line-height: 1.9;
  color: #3a332a;
  white-space: pre-wrap;
  min-height: 48px;
  text-align: justify;
  letter-spacing: 0.2px;
}
.drama-scene.narrator { font-size: 14px; line-height: 1.9; color: #fff8e8; letter-spacing: 0.2px; }
.ds-text { font-size: 14px; line-height: 1.9; color: #3a332a; text-align: justify; letter-spacing: 0.2px; }
.drama-scene.narrator .ds-text { color: #fff8e8; }
.td-text p { font-size: 14px; line-height: 1.9; color: #3a332a; text-align: justify; letter-spacing: 0.2px; }
.td-text h4 { font-size: 14px; color: var(--red-deep); }
.char-popup-body { font-size: 14px; line-height: 1.9; color: #3a332a; text-align: justify; letter-spacing: 0.2px; }
.scene-hero-intro .typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--red);
  margin-left: 2px;
  animation: blink 0.8s step-end infinite;
  vertical-align: text-bottom;
}

.rest-tip {
  margin: 0;
  padding: 13px 18px;
  border: 1px solid #cfe6d5;
  border-top: none;
  border-left: 5px solid var(--green);
  border-radius: 0;
  background: #eaf3ec !important;
  color: #2f5b3c;
  font-size: 16px;
  font-weight: 700;
}

.persona-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 16px 18px 10px;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.persona-chip {
  min-height: 58px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--red-deep);
  font-size: 18px;
  box-shadow: 0 2px 8px rgba(80,50,20,0.06);
  transition: transform .15s, border-color .15s, background .15s;
}

.persona-chip:hover {
  transform: translateY(-1px);
  border-color: var(--gold);
}

.persona-chip.active {
  border-color: var(--gold);
  background: linear-gradient(120deg, var(--gold), #d9b85e);
  color: var(--red-deep);
  box-shadow: 0 4px 12px rgba(200,162,74,0.28);
}

.persona-chip .emoji {
  font-size: 26px;
}

.persona-chip .view-tag {
  color: #6b551f;
  font-size: 13px;
}

.story-bubbles {
  gap: 8px;
  margin: 0;
  padding: 8px 18px 14px;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.story-bubble {
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: #fff;
  color: var(--red-deep);
  font-size: 14px;
  font-weight: 700;
}

.story-bubble:hover {
  background: var(--gold-soft);
}

.tts-bar {
  margin: 0;
  padding: 10px 18px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: var(--paper-2) !important;
}

.btn-tts {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: #fff;
  color: var(--red-deep);
  font-weight: 800;
}

.btn-tts.active {
  background: var(--red);
  color: #fff;
}

.chat-area {
  min-height: 360px;
  max-height: 85vh;
  margin: 0;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #f7eedb !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
}

.chat-msg {
  max-width: 82%;
  margin: 0;
  line-height: 1.9;
}

.chat-msg.assistant,
.chat-msg.user {
  position: relative;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 2px 6px rgba(80,50,20,0.06);
  font-size: 14px;
  line-height: 1.9;
}

.chat-msg.assistant {
  align-self: flex-start;
  background: var(--card);
  color: #3a332a;
  text-align: justify;
  letter-spacing: 0.2px;
}

.chat-msg.user {
  align-self: flex-end;
  background: var(--red);
  color: #fdf2dc;
  border-color: var(--red);
  text-align: left;
}

.chat-msg .msg-label {
  margin-bottom: 5px;
  color: var(--red-deep);
  font-size: 13px;
  font-weight: 900;
}

.chat-msg.user .msg-label {
  color: var(--gold-soft);
}

.chat-input-bar {
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 14px 18px 18px;
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 18px 18px;
  background: var(--paper-2) !important;
  box-shadow: var(--shadow);
}

.chat-input {
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
}

.chat-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200,162,74,0.18);
}

.btn-send,
.btn-voice {
  min-width: 54px;
  min-height: 52px;
  border-radius: 999px;
  font-size: 18px;
  font-family: inherit;
  box-shadow: 0 4px 12px rgba(60,30,10,0.12);
}

.btn-send {
  padding: 0 24px;
  border: 1px solid var(--gold);
  background: linear-gradient(120deg, var(--red), var(--red-deep));
  color: #fdf2dc;
}

.btn-send:disabled {
  opacity: .45;
}

.btn-voice {
  background: var(--green);
  color: #fff;
}

.cocreate-section {
  margin: 18px 0 0;
  padding: 0 !important;
  background: transparent !important;
}

.cocreate-btn {
  min-height: 58px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: linear-gradient(120deg, var(--gold), #d9b85e);
  color: var(--red-deep);
  box-shadow: 0 4px 14px rgba(200,162,74,0.25);
  font-size: 19px;
}

.cocreate-form {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 4px 14px rgba(80,50,20,0.08);
}

.cocreate-form textarea,
.cocreate-form input {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 17px;
}

.cocreate-submit {
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: linear-gradient(120deg, var(--red), var(--red-deep));
  color: #fdf2dc;
  font-weight: 900;
}

.cocreate-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  box-shadow: 0 2px 8px rgba(80,50,20,0.06);
}

.footer {
  margin-top: 10px;
  padding: 24px 18px 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255,250,240,0.42);
}

.footer::before {
  content: "★";
  display: block;
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 20px;
  opacity: .72;
}

.footer a {
  color: var(--red-deep);
  font-weight: 800;
}

/* ---- （字号切换已移除） ---- */
.font-size-btn { display: none; }
._deprecated_font_btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid rgba(243,230,194,0.55);
  background: rgba(255,255,255,0.15);
  color: #fdf6e6;
  font-size: 18px;
  font-weight: 900;
  font-family: inherit;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .15s, transform .12s;
  flex-shrink: 0;
}
.font-size-btn:hover {
  background: rgba(255,255,255,0.25);
}
.font-size-btn:active {
  transform: scale(0.93);
}
body.font-large {
  --font-base: 22px;
  --font-lg: 26px;
  --font-xl: 32px;
  --font-small: 18px;
}
body.font-xlarge {
  --font-base: 24px;
  --font-lg: 28px;
  --font-xl: 36px;
  --font-small: 20px;
}
.font-size-btn.size-large { background: rgba(200,162,74,0.35); }
.font-size-btn.size-xlarge { background: rgba(200,162,74,0.55); }

/* ---- 一键追问快捷气泡 ---- */
.quick-ask-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 18px;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: var(--paper);
}
.quick-ask-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.quick-ask {
  padding: 10px 16px;
  min-height: 44px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: var(--card);
  color: var(--red-deep);
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background .12s, transform .12s, box-shadow .12s;
}
.quick-ask:hover {
  background: var(--gold-soft);
  box-shadow: 0 2px 8px rgba(200,162,74,0.2);
}
.quick-ask:active {
  transform: scale(0.96);
  background: var(--gold);
}

/* ---- KTV 歌词高亮 ---- */
.ktv-char {
  transition: color 0.12s, background 0.12s;
  border-radius: 2px;
}
.ktv-char.ktv-active {
  color: #fff;
  background: var(--red);
  padding: 0 1px;
  border-radius: 3px;
  box-shadow: 0 0 8px rgba(180,40,40,0.3);
}
.ktv-char.ktv-read {
  color: var(--red-deep);
  opacity: 0.85;
}

/* ---- 知识图谱管理面板 ---- */
.graph-panel {
  max-width: 680px;
  width: 95%;
  max-height: 85vh;
  overflow-y: auto;
}
.graph-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid rgba(196,164,105,0.2);
  padding: 0 16px;
}
.graph-tab {
  padding: 10px 18px;
  border: none;
  background: none;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: 0.2s;
}
.graph-tab.active { color: var(--red-deep); border-bottom-color: var(--red); font-weight: 600; }
.graph-tab-panel { padding: 16px 18px; }
.graph-stats {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 12px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.graph-stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 12px;
  background: rgba(196,164,105,0.1);
  font-size: 13px;
  color: var(--brown);
}
.graph-stat-badge strong { color: var(--red-deep); }
.graph-nodes { display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow-y: auto; }
.graph-node-item {
  padding: 10px 14px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid rgba(196,164,105,0.15);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
.graph-node-type {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--red);
  color: #fff;
  text-transform: uppercase;
}
.graph-node-type.character { background: #1565c0; }
.graph-node-type.relic { background: #6a1b9a; }
.graph-node-type.story { background: #2e7d32; }
.graph-node-type.classic { background: #e65100; }
.graph-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.graph-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
  color: var(--brown);
  font-weight: 500;
}
.graph-form input,
.graph-form select,
.graph-form textarea {
  padding: 8px 12px;
  border: 1px solid rgba(196,164,105,0.3);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 400;
  background: #fff;
}
.graph-form textarea { resize: vertical; font-family: inherit; }
.graph-submit-btn {
  padding: 10px 20px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  cursor: pointer;
  transition: 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
}
.graph-submit-btn:hover { filter: brightness(1.1); }
.graph-result { font-size: 14px; min-height: 24px; }
.footer-graph-btn {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 14px;
  font-size: 13px;
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.8);
  border-radius: 16px;
  cursor: pointer;
  transition: 0.2s;
}
.footer-graph-btn:hover { background: rgba(255,255,255,0.18); color: #fff; }

/* ---- 百姓电台 ---- */
.radio-section { padding-bottom: 24px; }
.radio-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.radio-card {
  background: linear-gradient(135deg, #fffcf5, #faf5eb);
  border: 1px solid rgba(196,164,105,0.2);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: default;
}
.radio-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(120,80,20,0.1); }
.radio-card-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.radio-card-body { flex: 1; min-width: 0; }
.radio-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.radio-card-author {
  font-weight: 600;
  color: var(--brown);
  font-size: 15px;
}
.radio-card-label {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(196,164,105,0.15);
  color: var(--brown);
}
.radio-card-scene {
  font-size: 12px;
  color: var(--muted);
}
.radio-card-text {
  font-size: 15px;
  line-height: 1.65;
  color: #3e2c16;
}
.radio-card-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
}
.radio-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  font-size: 13px;
  border: 1px solid var(--gold);
  background: rgba(196,164,105,0.08);
  border-radius: 16px;
  color: var(--brown);
  cursor: pointer;
  transition: 0.2s;
}
.radio-play-btn:hover { background: var(--gold); color: #fff; }
.radio-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--muted);
  font-size: 15px;
}
.radio-submit-wrap {
  margin-top: 16px;
  text-align: center;
}
.radio-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  font-size: 15px;
  background: var(--red);
  color: #fff;
  border: 2px solid var(--gold);
  border-radius: 22px;
  cursor: pointer;
  transition: 0.2s;
}
.radio-submit-btn:hover { filter: brightness(1.1); transform: scale(1.03); }
.radio-submit-form {
  max-width: 560px;
  margin: 14px auto 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}
.radio-submit-form textarea,
.radio-submit-form input {
  padding: 10px 14px;
  border: 1px solid rgba(196,164,105,0.3);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  resize: vertical;
  background: #fff;
}
.radio-do-submit {
  padding: 8px 18px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 16px;
  font-size: 14px;
  cursor: pointer;
  transition: 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.radio-do-submit:hover { filter: brightness(1.1); }
.radio-submit-result { font-size: 14px; min-height: 20px; }
.radio-photo-row { display: flex; align-items: flex-start; gap: 10px; }
.radio-photo-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 16px;
  border: 1.5px dashed rgba(196,164,105,0.4);
  border-radius: 10px;
  font-size: 14px;
  color: var(--brown);
  cursor: pointer;
  transition: 0.2s;
}
.radio-photo-label:hover { border-color: var(--gold); background: rgba(196,164,105,0.06); }
.radio-photo-preview {
  position: relative;
  display: inline-block;
}
.radio-photo-preview[hidden] { display: none !important; }
.radio-photo-preview img {
  max-width: 120px;
  max-height: 90px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(196,164,105,0.3);
}
.radio-photo-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  border: none;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.radio-card-has-img {
  flex-wrap: nowrap;
}
.radio-card-thumb {
  flex-shrink: 0;
  width: 140px;
  height: 105px;
  border-radius: 10px;
  overflow: hidden;
  align-self: center;
}
.radio-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.radio-card-thumb img:hover {
  transform: scale(1.05);
}
@media (max-width: 600px) {
  .radio-card-has-img { flex-wrap: wrap; }
  .radio-card-thumb { width: 100%; height: 140px; order: -1; }
}
.radio-card-img {
  margin-top: 8px;
  max-width: 200px;
  max-height: 150px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(196,164,105,0.2);
}

/* ---- 回到顶部按钮 ---- */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 100px;
  z-index: 180;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  border: 2.5px solid var(--gold);
  font-size: 24px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(80,30,10,0.35);
  transition: transform 0.25s, opacity 0.25s;
}
.back-to-top.show { display: flex; }
.back-to-top:hover,
.back-to-top:active { transform: translateY(-3px) scale(1.06); filter: brightness(1.1); }

/* ---- 一键呼救浮窗 ---- */
.sos-fab {
  position: fixed;
  right: 18px;
  bottom: 24px;
  z-index: 200;
}
.sos-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid #fff;
  background: #C62828;
  color: #fff;
  font-size: 26px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(198,40,40,0.45), 0 8px 24px rgba(0,0,0,0.15);
  display: grid;
  place-items: center;
  transition: transform .12s;
  animation: sos-breathe 3s infinite;
}
@keyframes sos-breathe {
  0%, 100% { box-shadow: 0 4px 16px rgba(198,40,40,0.45), 0 0 0 0 rgba(198,40,40,0.3); }
  50% { box-shadow: 0 4px 16px rgba(198,40,40,0.45), 0 0 0 8px rgba(198,40,40,0); }
}
.sos-btn:active {
  transform: scale(0.92);
}
.sos-panel {
  display: none;
  position: fixed;
  right: 18px;
  bottom: 96px;
  width: min(340px, calc(100vw - 36px));
  z-index: 201;
  border-radius: 20px;
  background: #fff;
  border: 2px solid #C62828;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  overflow: hidden;
  animation: scaleIn .2s ease;
}
.sos-panel.visible {
  display: block;
}
.sos-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: #C62828;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}
.sos-close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}
.sos-panel-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sos-location {
  padding: 12px 14px;
  border-radius: 12px;
  background: #FFF3E0;
  border: 1px solid #FFE0B2;
  color: #E65100;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
}
.sos-call-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  border-radius: 14px;
  background: var(--green);
  color: #fff;
  font-size: 19px;
  font-weight: 900;
  text-decoration: none;
  transition: background .12s;
}
.sos-call-btn:active {
  background: #1B5E20;
}
.sos-call-btn.sos-call-120 {
  background: #C62828;
}
.sos-call-btn.sos-call-120:active {
  background: #8E0000;
}
.sos-tip {
  padding: 10px 12px;
  border-radius: 10px;
  background: #E8F5E9;
  color: #2E7D32;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
}

/* ---- 镇馆之宝详情弹窗 ---- */
/* treasure-modal / tc-3d-badge / treasure-modal-qa / img-zoom → shared-components.css */

/* ---- 黑科技实验室 ---- */
.lab-promo { margin-top: 38px; }
.lab-promo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.lab-promo-card {
  display: flex; align-items: flex-start; gap: 12px; text-align: left; cursor: pointer; font-family: inherit;
  background: linear-gradient(135deg, #fffaf0, #fbf0d8); border: 1px solid var(--line); border-radius: 14px; padding: 16px;
  box-shadow: 0 4px 14px rgba(80,50,20,0.07); transition: .18s; position: relative;
}
.lab-promo-card:hover { transform: translateY(-3px); border-color: var(--gold); box-shadow: 0 10px 24px rgba(80,50,20,0.16); }
.lp-icon { font-size: 32px; flex-shrink: 0; }
.lab-promo-card h4 { font-size: 16px; color: var(--red-deep); }
.lab-promo-card small { font-size: 11px; color: var(--gold); font-weight: 700; }
.lab-promo-card p { font-size: 12.5px; color: #5b5145; margin-top: 6px; }
.lp-go { position: absolute; right: 14px; bottom: 12px; font-size: 12px; color: var(--red); font-weight: 700; }

.lab-panel { max-width: 760px; }
.lab-tabs { display: flex; gap: 8px; padding: 12px 16px; background: var(--paper-2); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.lab-tab {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px; cursor: pointer;
  font-family: inherit; font-size: 13px; transition: .15s;
}
.lab-tab.active { background: var(--red); color: #fff; border-color: var(--red); }
.lab-stage { padding: 16px 18px; overflow-y: auto; }
.lab-intro { font-size: 13.5px; color: #5b5145; margin-bottom: 12px; }
.lab-canvas-wrap { width: 100%; background: #eef3f1; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.lab-canvas { display: block; width: 100%; height: auto; }
.lab-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 14px 0; }
.lab-field { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink); font-weight: 600; }
.lab-field input[type="range"] { width: 160px; accent-color: var(--red); }
.lab-val { min-width: 56px; color: var(--red-deep); font-weight: 700; }
.lab-btn {
  border: 1px solid var(--gold); background: linear-gradient(120deg, var(--red), var(--red-deep)); color: #fdf2dc;
  border-radius: 999px; padding: 8px 16px; cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 700;
}
.lab-btn.ghost { background: #fff; color: var(--red-deep); }
.lab-btn:hover { filter: brightness(1.05); }
.lab-seg { display: inline-flex; border: 1px solid var(--gold); border-radius: 999px; overflow: hidden; }
.lab-seg-btn { border: none; background: #fff; color: var(--red-deep); padding: 8px 14px; cursor: pointer; font-family: inherit; font-size: 13px; }
.lab-seg-btn.active { background: var(--red); color: #fff; }
.lab-readout { width: 100%; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: #5b5145; background: var(--paper-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.lab-readout b { color: var(--red-deep); }
.lab-readout .ok { color: var(--green); font-weight: 600; }
.lab-readout .bad { color: #a31515; font-weight: 600; }
.lab-principle { margin-top: 14px; font-size: 13px; color: #4a4137; background: #fbf3df; border: 1px solid var(--gold); border-radius: 10px; padding: 11px 14px; }
.lab-principle b { display: block; color: var(--red-deep); margin-bottom: 4px; }

/* ---- 3D 查看器覆盖层 (复用研学版样式) ---- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 350;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(43,35,32,0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 18px;
}
.overlay[hidden] { display: none; }
.panel {
  position: relative;
  width: 100%;
  max-width: 640px;
  max-height: min(88vh, calc(100dvh - 36px));
  background: var(--card);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  border: 2px solid var(--gold);
  display: flex;
  flex-direction: column;
  animation: scaleIn .25s ease;
}
.treasure-panel { max-width: 860px; }
.char-panel { max-width: 600px; min-height: min(78vh, 620px); }

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
}
.panel-head.red {
  background: linear-gradient(120deg, var(--red), var(--red-deep));
  color: #fdf6e6;
}
.panel-head h3 {
  font-size: 20px;
  font-weight: 900;
}
.icon-btn {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(243,230,194,0.45);
  border-radius: 50%;
  background: rgba(255,255,255,0.16);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.icon-btn:hover {
  background: rgba(255,255,255,0.28);
}
.viewer3d-panel {
  max-width: 900px;
  width: 100%;
}
.viewer3d-stage {
  position: relative;
  width: 100%;
  height: 62vh;
  min-height: 360px;
  background: radial-gradient(circle at 50% 35%, #3a2f2a 0%, #1c1512 80%);
  overflow: hidden;
}
#viewer3dCanvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}
.v3d-hotspots {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}
.v3d-hot {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  z-index: 6;
}
.v3d-hot-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--red-deep);
  font-weight: 800;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2.5px solid #fff;
  box-shadow: 0 0 0 4px rgba(200,162,74,0.5), 0 2px 10px rgba(0,0,0,0.55);
  animation: v3dPulse 1.8s infinite;
  transition: transform .15s ease;
}
.v3d-hot:active .v3d-hot-dot {
  transform: scale(1.15);
}
.v3d-hot.active .v3d-hot-dot {
  background: var(--red);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(180,40,40,0.5), 0 2px 10px rgba(0,0,0,0.55);
}
@keyframes v3dPulse {
  0%,100% { box-shadow: 0 0 0 3px rgba(200,162,74,0.45), 0 2px 8px rgba(0,0,0,0.5); }
  50% { box-shadow: 0 0 0 7px rgba(200,162,74,0.15), 0 2px 8px rgba(0,0,0,0.5); }
}
.v3d-loading {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: #f3e6c8;
  font-size: 15px;
  background: rgba(0,0,0,0.35);
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--gold);
}
.v3d-info {
  background: rgba(255,250,240,0.96);
  border: 1px solid var(--gold);
  border-radius: 12px;
  padding: 12px 16px;
  margin: 8px 16px;
  box-shadow: 0 4px 14px rgba(80,50,20,0.08);
}
.v3d-info b { color: var(--red-deep); font-size: 15px; }
.v3d-info p { color: #5b5145; font-size: 14px; margin-top: 4px; line-height: 1.5; }
.viewer3d-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--paper-2);
  border-top: 1px solid var(--line);
}
.v3d-btn {
  background: #fff;
  color: var(--red-deep);
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 8px 16px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: background .15s;
}
.v3d-btn:hover {
  background: var(--gold-soft);
}
.v3d-hint {
  font-size: 13px;
  color: var(--muted);
}
.v3d-controls {
  display: flex;
  gap: 8px;
  margin-left: auto;
}
.v3d-credit {
  flex-basis: 100%;
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 640px) {
  .overlay { padding: 0; padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); align-items: flex-end; }
  .panel { max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; }
  .panel-head { padding: 12px 14px; }
  .treasure-panel { max-width: 100%; }
  .treasure-detail { flex-direction: column; }
  .td-figure { flex: none; height: 220px; }
  .td-figure img { max-height: 220px; }
  .char-panel { max-width: 100%; }
  .lab-panel { max-width: 100%; }
  .lab-promo-grid { grid-template-columns: 1fr; gap: 12px; }
  .lab-canvas-wrap { border-radius: 8px; }
  .lab-field input[type="range"] { width: 120px; }
}
@media (max-width: 620px) {
  .viewer3d-panel { max-width: 100%; }
  .viewer3d-stage { height: 52vh; min-height: 280px; }
  .v3d-controls { margin-left: 0; flex-wrap: wrap; }
  .v3d-hint { font-size: 12px; }
}

/* ---- 地图信息面板详情块 ---- */
.map-detail-block {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.map-detail-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  color: var(--red-deep);
  font-size: 15px;
  font-weight: 900;
}
.map-detail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.map-persona-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: #fbf0d8;
  color: var(--red-deep);
  font-size: 14px;
  font-weight: 700;
}
.map-persona-tag small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.map-detail-action {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.map-enter-scene {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: 1px solid var(--red);
  border-radius: 999px;
  background: linear-gradient(120deg, var(--red), var(--red-deep));
  color: #fdf2dc;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .12s, box-shadow .12s;
}
.map-enter-scene:hover {
  box-shadow: 0 4px 12px rgba(138,26,26,0.3);
}
.map-enter-scene:active {
  transform: scale(0.96);
}
.map-route-stops-detail {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.map-stop-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.map-stop-num {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
  color: var(--red-deep);
  font-size: 14px;
  font-weight: 900;
}
.map-stop-info {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  line-height: 1.5;
}

/* ---- Legend icon fix ---- */
.legend-fa {
  font-size: 14px;
}
.legend-fa.route { color: var(--red); }
.legend-fa.rest { color: var(--green); }
.legend-fa.axis { color: var(--gold); }

@media (max-width: 720px) {
  .topbar {
    flex-direction: row;
    align-items: center;
    padding: 10px 14px;
  }

  .brand h1 {
    font-size: 20px;
  }

  .tagline {
    font-size: 12px;
  }

  .top-actions {
    margin-left: auto;
    gap: 8px;
    white-space: nowrap;
  }

  main {
    padding: 20px 14px 48px;
  }

  .elderly-hero {
    padding: 28px 16px 36px;
  }

  .hero h2 {
    font-size: 22px;
    letter-spacing: 1px;
    margin-bottom: 10px;
  }

  .hero-desc {
    font-size: 14px;
    margin-bottom: 14px;
    line-height: 1.7;
  }
  .solar-bar {
    font-size: 15px;
  }

  .hero-deco-top {
    width: 48px;
    margin-bottom: 16px;
  }

  .elderly-scenes-section {
    padding: 14px;
  }

  .guide-map-section {
    padding: 14px;
  }

  .guide-map-head,
  .guide-map-layout {
    grid-template-columns: 1fr;
  }

  .guide-map-head {
    flex-direction: column;
  }

  .map-legend {
    justify-content: flex-start;
    min-width: 0;
  }

  .palace-map {
    max-width: 100%;
    aspect-ratio: 9 / 16;
    border-width: 5px;
  }

  .map-info-panel {
    max-height: none;
  }

  .map-point .pin {
    width: 46px;
    height: 46px;
  }

  .map-point .pin-label {
    max-width: 76px;
    font-size: 12px;
    padding: 2px 6px;
  }

  .map-rest-badge {
    width: 22px;
    height: 22px;
    font-size: 10px;
  }

  .scene-grid {
    grid-template-columns: 1fr;
  }

  .scene-panel {
    margin: 14px auto 48px;
    padding: 0 12px;
  }

  .chat-input-bar {
    flex-wrap: wrap;
  }

  .chat-input {
    flex-basis: 100%;
  }

  .quick-ask {
    font-size: 14px;
    padding: 8px 13px;
  }

  .back-to-top { right: 14px; bottom: 80px; width: 52px; height: 52px; font-size: 22px; }

  .sos-fab {
    right: 12px;
    bottom: 16px;
  }
  .sos-btn {
    width: 54px;
    height: 54px;
    font-size: 22px;
  }

  .treasure-modal-img {
    height: 180px;
  }
  .treasure-modal-body {
    padding: 16px 18px 22px;
  }
  .treasure-modal-name {
    font-size: 22px;
  }

  /* Hero 区域 - 移动端优化 */
  .hero-intro-box {
    padding: 14px 16px;
    margin: 0 auto 14px;
    border-radius: 12px;
  }
  .hero-intro-box p {
    font-size: 14px;
    line-height: 1.75;
  }
  .hero-intro-play-btn {
    font-size: 13px;
    padding: 7px 16px;
  }
  .kicker {
    font-size: 12px;
    letter-spacing: 0.5px;
    padding: 5px 14px;
    margin-bottom: 12px;
  }

  /* 节气养生面板 */
  .solar-health-panel { border-radius: 12px; }
  .solar-health-header { font-size: 15px; padding: 10px 14px; }
  .solar-health-body {
    padding: 10px 12px;
    gap: 8px;
  }
  .solar-health-card {
    flex: 1 1 100%;
    min-width: 0;
    padding: 10px 12px;
  }
  .solar-health-card .shc-value { font-size: 14px; }
  .solar-health-tts-btn { font-size: 14px; padding: 8px 16px; }

  /* 场景卡片网格 */
  .treasure-grid,
  .char-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .treasure-card {
    flex-direction: column;
  }
  .treasure-card .tc-img {
    width: 100%;
    min-width: 0;
    height: 140px;
    border-radius: 14px 14px 0 0;
  }

  /* 记忆墙 */
  .radio-section { padding: 14px; }
  .radio-card { padding: 12px 14px; gap: 10px; }
  .radio-card-icon { width: 36px; height: 36px; font-size: 16px; }
  .radio-card-text { font-size: 14px; line-height: 1.6; }
  .radio-card-meta { gap: 6px; }
  .radio-card-author { font-size: 14px; }
  .radio-submit-form textarea { font-size: 15px; }
  .radio-photo-label { font-size: 13px; padding: 7px 12px; }

  /* 知识图谱面板 */
  .graph-panel {
    max-width: 100%;
    width: 100%;
    max-height: 92vh;
    border-radius: 18px 18px 0 0;
  }
  .graph-overlay {
    align-items: flex-end;
  }
  .graph-tabs { gap: 0; }
  .graph-tab { flex: 1; font-size: 13px; padding: 10px 8px; text-align: center; }
  .graph-form label { font-size: 14px; }
  .graph-form input,
  .graph-form select { font-size: 15px; padding: 8px 10px; }
  .graph-node-item { padding: 10px 12px; }

  /* SOS面板 */
  .sos-panel {
    left: 12px;
    right: 12px;
    bottom: 78px;
    width: auto;
  }

  /* 场景面板 */
  .scene-panel {
    padding: 0 10px;
  }
  .scene-hero-intro {
    font-size: 14px;
    line-height: 1.9;
  }
  .persona-list {
    flex-direction: column;
    gap: 6px;
  }
  .persona-chip {
    font-size: 14px;
    padding: 8px 12px;
  }
  .story-bubbles {
    font-size: 14px;
  }

  /* 历史声音 */
  .hv-chat-area { max-height: 80vh; }
  .hv-chat-msg { padding: 10px 14px; }
  .hv-chat-bubble { font-size: 14px; line-height: 1.9; }
  .hv-input-bar { gap: 6px; }
  .hv-input-bar input { font-size: 14px; }

  /* 弹窗类 */
  .char-popup-body,
  .td-body { font-size: 14px; padding: 14px; line-height: 1.9; }

  /* 微短剧 */
  .drama-msg { font-size: 14px; padding: 10px 14px; }
}

/* ---- 极小屏幕 (iPhone SE / 375px 以下) ---- */
@media (max-width: 380px) {
  .brand h1 { font-size: 18px; }
  .tagline { font-size: 11px; }
  .elderly-hero { padding: 22px 12px 28px; }
  .hero h2 { font-size: 18px; letter-spacing: 0.5px; }
  .hero-desc { font-size: 12px; line-height: 1.65; }
  .sec-title { font-size: 20px; }
  .sec-sub { font-size: 13px; }
  main { padding: 16px 10px 48px; }
  .hero-intro-box { padding: 10px 12px; }
  .hero-intro-box p { font-size: 13px; }
  .kicker { font-size: 11px; padding: 4px 12px; margin-bottom: 10px; }
  .treasure-grid,
  .char-grid { grid-template-columns: 1fr; }
  .radio-card { flex-direction: column; align-items: stretch; }
  .radio-card-icon { display: none; }
  .radio-card-thumb { width: 100%; height: 120px; }
  .graph-panel { border-radius: 14px 14px 0 0; }
  .chat-input { font-size: 14px; }
  .btn-send { font-size: 14px; padding: 8px 14px; }
  .quick-ask { font-size: 13px; padding: 7px 10px; }
  .back-to-top { right: 10px; bottom: 74px; width: 46px; height: 46px; font-size: 20px; }
  .sos-btn { width: 48px; height: 48px; font-size: 20px; }
}

/* ===== 游览进度仪表板（卡片网格） ===== */
.visit-progress-section {
  margin-bottom: 32px;
}
.vp-dashboard {
  margin-top: 16px;
}
.vp-stat-bar {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.vp-stat {
  font-size: 14px;
  color: var(--brown);
}
.vp-stat i {
  margin-right: 4px;
  color: var(--gold);
}
.vp-stat strong {
  font-weight: 700;
  margin-left: 2px;
}
.vp-reset-btn {
  margin-left: auto;
  padding: 5px 14px;
  font-size: 12px;
  color: var(--muted);
  background: none;
  border: 1px solid rgba(196,164,105,0.25);
  border-radius: 16px;
  cursor: pointer;
  transition: 0.2s;
  font-family: inherit;
}
.vp-reset-btn:hover {
  color: var(--red);
  border-color: var(--red);
}
.vp-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.vp-card {
  background: linear-gradient(135deg, #fffcf5, #faf5eb);
  border: 1px solid rgba(196,164,105,0.2);
  border-radius: 14px;
  padding: 16px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.vp-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 18px rgba(120,80,20,0.1);
}
.vp-card-done {
  background: linear-gradient(135deg, #f4fbf4, #e8f5e8);
  border-color: rgba(46,125,50,0.2);
}
.vp-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.vp-card-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(196,164,105,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brown);
  font-size: 14px;
  flex-shrink: 0;
}
.vp-card-done .vp-card-icon {
  background: rgba(46,125,50,0.12);
  color: var(--green);
}
.vp-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--brown);
  flex: 1;
}
.vp-card-ok {
  color: var(--green);
  font-size: 18px;
  flex-shrink: 0;
}
.vp-card-area {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}
.vp-card-bar {
  height: 6px;
  background: rgba(196,164,105,0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}
.vp-card-bar-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 3px;
  transition: width 0.4s ease;
}
.vp-card-done .vp-card-bar-fill {
  background: var(--green);
}
.vp-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.vp-card-count {
  font-size: 13px;
  color: var(--brown);
  font-weight: 600;
}
.vp-card-miss {
  font-size: 11px;
  color: #B8860B;
  background: rgba(218,165,32,0.1);
  padding: 2px 8px;
  border-radius: 8px;
}
.vp-card-miss i {
  font-size: 10px;
  margin-right: 2px;
}

/* ===== 场景文物/亮点列表 ===== */
.scene-highlights {
  margin: 16px 0;
  background: linear-gradient(135deg, #fffcf5, #faf5eb);
  border: 1px solid rgba(196,164,105,0.2);
  border-radius: 14px;
  overflow: hidden;
}
.sh-header {
  padding: 14px 18px 10px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.sh-header h4 {
  margin: 0;
  font-size: 16px;
  color: var(--brown);
  white-space: nowrap;
}
.sh-progress {
  flex: 1;
  height: 6px;
  background: rgba(196,164,105,0.12);
  border-radius: 3px;
  overflow: hidden;
}
.sh-progress-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 3px;
  transition: width 0.4s ease;
}
.sh-must-see-tip {
  margin: 0 18px 10px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #fff8e8, #fff3d0);
  border: 1px solid rgba(218,165,32,0.25);
  border-radius: 10px;
  font-size: 14px;
  color: #8B6914;
  line-height: 1.5;
}
.sh-must-see-tip i {
  color: #DAA520;
  margin-right: 4px;
}
.sh-list {
  padding: 0 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sh-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  transition: background 0.15s;
}
.sh-item:hover {
  background: rgba(196,164,105,0.06);
}
.sh-done {
  opacity: 0.65;
}
.sh-done .sh-item-name {
  text-decoration: line-through;
  text-decoration-color: var(--muted);
}
.sh-check {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 20px;
  color: var(--muted);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, transform 0.15s;
}
.sh-check:hover { transform: scale(1.15); }
.sh-done .sh-check { color: var(--green); }
.sh-item-body { flex: 1; min-width: 0; }
.sh-item-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 3px;
}
.sh-item-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--brown);
}
.sh-star {
  color: #DAA520;
  font-size: 12px;
}
.sh-type-tag {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 6px;
  background: rgba(196,164,105,0.12);
  color: var(--muted);
  white-space: nowrap;
}
.sh-item-desc {
  font-size: 13px;
  color: #5a4a3a;
  line-height: 1.55;
}
.sh-view-treasure,
.sh-cloud-listen {
  margin-top: 6px;
  padding: 5px 12px;
  font-size: 12px;
  color: var(--gold-dark, #8B6914);
  background: rgba(196,164,105,0.1);
  border: 1px solid rgba(196,164,105,0.25);
  border-radius: 16px;
  cursor: pointer;
  font-family: inherit;
  transition: 0.15s;
}
.sh-view-treasure:hover,
.sh-cloud-listen:hover {
  background: rgba(196,164,105,0.2);
}
.sh-must .sh-item-name::before {
  content: "";
}

/* 进度仪表板 + 场景看点响应式 */
@media (max-width: 720px) {
  .vp-card-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
  .vp-card { padding: 12px; }
  .vp-card-title { font-size: 15px; }
  .vp-stat-bar { gap: 12px; }
  .sh-header { padding: 12px 14px 8px; }
  .sh-header h4 { font-size: 15px; }
  .sh-item { padding: 8px 10px; }
  .sh-item-name { font-size: 14px; }
  .sh-item-desc { font-size: 12px; }
  .sh-must-see-tip { font-size: 13px; margin: 0 12px 8px; }
}
@media (max-width: 380px) {
  .vp-card-grid { grid-template-columns: 1fr; }
  .vp-card-icon { width: 28px; height: 28px; font-size: 12px; }
  .sh-check { width: 28px; height: 28px; font-size: 18px; }
}
