/* ============================================================
   博物馆扫码导览 · H5 视觉体系
   米纸底 + 朱砂主色 + 鎏金点缀，衬线标题 + 无衬线正文
   ============================================================ */
:root {
  --primary: #a8382a;
  --primary-dark: #8c2c20;
  --primary-soft: #f6e8e3;
  --gold: #b98a2e;
  --gold-soft: #f7efdc;
  --ink: #33291f;
  --body: #4d4237;
  --muted: #8b7d6b;
  --line: #e9e1d5;
  --bg: #f6f2ec;
  --card: #ffffff;
  --radius: 16px;
  --shadow: 0 2px 14px rgba(76, 54, 28, 0.07);
  --font-serif: "Songti SC", "STSong", "SimSun", "Noto Serif SC", serif;
  --font-sans: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;

  /* Vant 主题覆盖 */
  --van-primary-color: #a8382a;
  --van-danger-color: #a8382a;
  --van-text-color: #33291f;
  --van-text-color-2: #8b7d6b;
  --van-text-color-3: #b3a692;
  --van-background: #f6f2ec;
  --van-background-2: #ffffff;
  --van-border-color: #e9e1d5;
  --van-radius-md: 12px;
  --van-font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--body);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.75;
}
[v-cloak] { display: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; }

/* 大字模式 */
body.font-lg { zoom: 1.15; }

.page { min-height: 100vh; padding-bottom: 40px; }
.wrap { padding: 0 16px; }

/* ---------------- 顶部 ---------------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px;
}
.topbar .brand {
  display: flex; align-items: center; gap: 10px; min-width: 0;
}
.brand-mark {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; font-family: var(--font-serif); font-size: 19px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 8px rgba(168, 56, 42, 0.28);
}
.brand-name {
  font-family: var(--font-serif); font-size: 18px; font-weight: 700;
  color: var(--ink); line-height: 1.3; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.brand-slogan { font-size: 11px; color: var(--muted); line-height: 1.4; }
.icon-btn {
  flex: none; width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card); color: var(--body);
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.icon-btn.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }

/* ---------------- 首页 Hero ---------------- */
.hero {
  margin: 6px 16px 16px; border-radius: var(--radius); overflow: hidden;
  background:
    radial-gradient(1200px 300px at 90% -80px, rgba(185, 138, 46, 0.35), transparent 60%),
    linear-gradient(135deg, #8c2c20 0%, #a8382a 55%, #b9522e 100%);
  color: #fff; padding: 26px 22px 24px; position: relative;
}
.hero::after {
  content: ""; position: absolute; right: -30px; bottom: -46px;
  width: 170px; height: 170px; border-radius: 50%;
  border: 18px solid rgba(255, 255, 255, 0.10);
}
.hero-kicker {
  font-size: 11px; letter-spacing: 3px; opacity: 0.85; text-transform: uppercase;
}
.hero-title {
  font-family: var(--font-serif); font-size: 25px; font-weight: 700;
  margin: 8px 0 6px; line-height: 1.35; position: relative;
}
.hero-sub { font-size: 13px; opacity: 0.92; line-height: 1.7; position: relative; }
.hero-stats { display: flex; gap: 18px; margin-top: 16px; position: relative; }
.hero-stats .n { font-family: var(--font-serif); font-size: 21px; font-weight: 700; line-height: 1.2; }
.hero-stats .l { font-size: 11px; opacity: 0.85; }

/* ---------------- 搜索 ---------------- */
.search-box { margin: 0 16px 14px; }
.search-box .van-search {
  background: transparent; padding: 0;
  --van-search-input-background: var(--card);
  --van-search-content-background: var(--card);
}
.search-box .van-search__content {
  border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow);
}

/* ---------------- 分区标题 ---------------- */
.sec-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 22px 16px 12px;
}
.sec-title {
  font-family: var(--font-serif); font-size: 18px; font-weight: 700; color: var(--ink);
  position: relative; padding-left: 12px;
}
.sec-title::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 4px; height: 16px; border-radius: 2px;
  background: linear-gradient(180deg, var(--primary), var(--gold));
}
.sec-more { font-size: 12px; color: var(--muted); }

/* ---------------- 文物卡片 ---------------- */
.star-strip {
  display: flex; gap: 12px; overflow-x: auto; padding: 2px 16px 6px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.star-strip::-webkit-scrollbar { display: none; }
.star-card {
  flex: none; width: 220px; background: var(--card); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); cursor: pointer;
  border: 1px solid rgba(233, 225, 213, 0.7);
}
.star-card .cover { height: 132px; background: var(--gold-soft); overflow: hidden; }
.star-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.star-card .info { padding: 10px 12px 12px; }
.star-card .nm {
  font-family: var(--font-serif); font-size: 15px; font-weight: 700; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.star-card .meta { font-size: 11px; color: var(--muted); margin-top: 3px; }

.art-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
  padding: 0 16px;
}
.art-card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); cursor: pointer;
  border: 1px solid rgba(233, 225, 213, 0.7);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.art-card:active { transform: scale(0.975); }
.art-card .cover { aspect-ratio: 4 / 3; background: var(--gold-soft); overflow: hidden; }
.art-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.art-card .info { padding: 10px 12px 12px; }
.art-card .nm {
  font-family: var(--font-serif); font-size: 15px; font-weight: 700; color: var(--ink);
  line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 43px;
}
.art-card .meta {
  display: flex; align-items: center; gap: 6px; margin-top: 6px;
  font-size: 11px; color: var(--muted);
  white-space: nowrap; overflow: hidden;
}
.badge-star {
  flex: none; padding: 1px 7px; border-radius: 999px;
  background: var(--gold-soft); color: var(--gold);
  font-size: 10px; font-weight: 700;
}

.load-more {
  display: block; width: calc(100% - 32px); margin: 18px 16px 0;
  padding: 11px 0; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); color: var(--muted); font-size: 13px; cursor: pointer;
}

/* ---------------- 通用 chip ---------------- */
.chip {
  display: inline-flex; align-items: center; padding: 3px 10px;
  border-radius: 999px; font-size: 11px; line-height: 1.6;
  background: var(--primary-soft); color: var(--primary); border: 1px solid transparent;
}
.chip.gold { background: var(--gold-soft); color: var(--gold); }
.chip.plain { background: #f2ede4; color: var(--muted); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-select {
  cursor: pointer; transition: all 0.15s ease;
  background: #f2ede4; color: var(--muted);
}
.chip-select.active { background: var(--primary); color: #fff; }

/* ---------------- 围栏引导页 ---------------- */
.guard-page {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 32px 28px;
  text-align: center;
  background:
    radial-gradient(700px 320px at 50% -80px, rgba(185, 138, 46, 0.18), transparent 65%),
    var(--bg);
}
.guard-ring {
  width: 108px; height: 108px; border-radius: 50%; margin-bottom: 26px;
  display: flex; align-items: center; justify-content: center;
  background: var(--card); box-shadow: 0 10px 30px rgba(168, 56, 42, 0.16);
  position: relative;
}
.guard-ring::before {
  content: ""; position: absolute; inset: -8px; border-radius: 50%;
  border: 2px dashed rgba(168, 56, 42, 0.35);
  animation: spin 14s linear infinite;
}
.guard-ring .ic { font-size: 42px; }
@keyframes spin { to { transform: rotate(360deg); } }
.guard-title { font-family: var(--font-serif); font-size: 22px; color: var(--ink); font-weight: 700; }
.guard-desc { font-size: 13px; color: var(--muted); margin: 10px 0 26px; line-height: 1.9; max-width: 300px; }
.guard-btn {
  width: 100%; max-width: 320px; padding: 13px 0; border: none; border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; font-size: 15px; letter-spacing: 2px; cursor: pointer;
  box-shadow: 0 8px 20px rgba(168, 56, 42, 0.28);
}
.guard-btn.ghost {
  background: transparent; color: var(--primary); border: 1px solid var(--primary);
  box-shadow: none; margin-top: 12px; letter-spacing: 0;
}
.guard-status {
  margin: 18px 0 0; font-size: 13px; line-height: 1.9; max-width: 300px;
}
.guard-status.ok { color: var(--gold); }
.guard-status.err { color: var(--primary); }
.code-input {
  width: 100%; max-width: 320px; margin: 16px auto 0; padding: 11px 14px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--card);
  font-size: 15px; text-align: center; letter-spacing: 4px; color: var(--ink);
}
.code-input:focus { outline: none; border-color: var(--primary); }

/* ---------------- 详情页 ----------------
   沉浸式头部：banner 影像全出血融入头部背景，
   暗色渐变压底保证可读性，名称/标签叠加在影像之上 */
.detail-hero {
  position: relative; min-height: 400px; overflow: hidden;
  padding: 56px 16px 68px;
  display: flex; flex-direction: column; justify-content: flex-end;
  /* 无影像兜底：品牌朱砂渐变（整段保持深色，白字可读） */
  background: linear-gradient(155deg, var(--primary-dark) 0%, var(--primary) 72%, var(--primary-dark) 100%);
}
.hero-bg { position: absolute; inset: 0; background: #14100c; }
.hero-bg .van-swipe { display: block; height: 100%; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
/* 视频贴顶、底部留出信息带，原生控制条不与名称/标签重叠（含 .banner-single 单视频） */
.hero-bg video {
  display: block; width: 100%; height: calc(100% - 256px);
  object-fit: contain; background: #14100c;
}
.hero-scrim {
  pointer-events: none;
  background: linear-gradient(180deg,
    rgba(16, 11, 7, 0.34) 0%, rgba(16, 11, 7, 0.05) 24%,
    rgba(16, 11, 7, 0.10) 44%, rgba(16, 11, 7, 0.55) 74%, rgba(16, 11, 7, 0.86) 100%);
}
.detail-back {
  position: absolute; top: 14px; left: 14px; z-index: 20;
  width: 36px; height: 36px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(20, 14, 9, 0.42); color: #fff; font-size: 17px;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.banner-more {
  position: absolute; top: 14px; right: 14px; z-index: 20;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 14px; border: none; border-radius: 999px; cursor: pointer;
  background: rgba(20, 14, 9, 0.42); color: #fff; font-size: 11px;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
/* 叠加信息区：圆形封面 + 名称/又名 + 标签，整体居中 */
.hero-info { position: relative; z-index: 3; pointer-events: none; }
.hero-idrow { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.hero-avatar {
  flex: none; width: 84px; height: 84px; border-radius: 50%; overflow: hidden;
  background: rgba(255, 255, 255, 0.16);
  border: 2.5px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.32);
  display: flex; align-items: center; justify-content: center;
}
.hero-avatar img { width: 100%; height: 100%; object-fit: cover; }
.hero-avatar .ic { font-size: 34px; opacity: 0.9; }
.hero-text { min-width: 0; text-align: center; }
.detail-hero .detail-name {
  font-family: var(--font-serif); font-size: 22px; font-weight: 700;
  color: #fff; line-height: 1.35; margin: 0; text-align: center;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.4);
}
.detail-hero .detail-alias {
  font-size: 12px; color: rgba(255, 255, 255, 0.8); margin-top: 3px; text-align: center;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hero-chips { margin-top: 12px; justify-content: center; }
/* 影像上的浅色药丸标签：白半透明底 + 细边框，与全站 chip 语言一致 */
.hero-chips .chip {
  background: rgba(255, 255, 255, 0.16); color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.hero-chips .chip.gold {
  background: rgba(216, 168, 64, 0.30); color: #f4dca8; border-color: rgba(216, 168, 64, 0.5);
}
.hero-chips .chip.plain {
  background: rgba(255, 255, 255, 0.12); color: rgba(255, 255, 255, 0.88);
}

.panel {
  margin: 14px 16px 0; background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; border: 1px solid rgba(233, 225, 213, 0.7);
}
.panel-title {
  font-family: var(--font-serif); font-size: 16px; font-weight: 700;
  color: var(--ink); margin: 0 0 12px; display: flex; align-items: center; gap: 8px;
}
.panel-title .tag { font-family: var(--font-sans); font-size: 10px; font-weight: 600; }

/* 音频播放器 */
.audio-item { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.audio-item + .audio-item { border-top: 1px dashed var(--line); }
.play-btn {
  flex: none; width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; font-size: 17px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 5px 12px rgba(168, 56, 42, 0.26);
}
.play-btn.playing { background: linear-gradient(135deg, var(--gold), #a87b22); }
.audio-body { flex: 1; min-width: 0; }
.audio-name { font-size: 13px; color: var(--ink); font-weight: 600; }
.audio-track {
  height: 4px; border-radius: 2px; background: var(--line); margin: 8px 0 5px;
  overflow: hidden; cursor: pointer;
}
.audio-fill { height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--primary), var(--gold)); }
.audio-time { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------------- 媒体查看器（逐个查看） ---------------- */
.media-viewer {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column;
  background: rgba(18, 12, 7, 0.95);
}
.mv-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
}
.mv-count { color: #fff; font-size: 13px; letter-spacing: 1px; font-variant-numeric: tabular-nums; }
.mv-close {
  width: 34px; height: 34px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 19px; line-height: 1;
}
.mv-stage {
  flex: 1; min-height: 0;
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 8px;
}
.mv-stage img { max-width: 100%; max-height: 100%; object-fit: contain; }
.mv-stage video { max-width: 100%; max-height: 100%; background: #000; }
/* 组内左右滑动容器（van-swipe 需显式宽高） */
.mv-swipe { width: 100%; height: 100%; }
.mv-swipe .van-swipe-item { display: flex; align-items: center; justify-content: center; }
.mv-swipe img { max-width: 100%; max-height: 100%; object-fit: contain; }
.mv-back {
  padding: 0; border: none; background: none; cursor: pointer;
  color: #fff; font-size: 14px; line-height: 1;
}
.mv-nav {
  flex: none; width: 38px; height: 38px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 19px; line-height: 1;
}
.mv-nav:disabled { opacity: 0.28; cursor: default; }
.mv-title {
  padding: 12px 16px 30px; text-align: center;
  font-size: 12px; color: rgba(255, 255, 255, 0.72);
}

/* ---------------- 影像资料清单（两级浏览第一级） ---------------- */
.media-list {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: flex-end;
  background: rgba(18, 12, 7, 0.5);
}
.ml-panel {
  width: 100%; max-height: 78%;
  display: flex; flex-direction: column;
  background: var(--bg); border-radius: 18px 18px 0 0; overflow: hidden;
}
.ml-head {
  flex: none; display: flex; align-items: center; gap: 8px;
  padding: 16px 18px 12px; background: var(--card);
  border-bottom: 1px solid var(--line);
}
.ml-title { font-family: var(--font-serif); font-size: 16px; color: var(--ink); font-weight: 600; }
.ml-sub { font-size: 12px; color: var(--muted); }
.ml-close {
  margin-left: auto; width: 28px; height: 28px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--bg); color: var(--muted); font-size: 17px; line-height: 1;
}
.ml-items { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 12px 16px; }
.ml-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px; margin-bottom: 8px;
  background: var(--card); border-radius: 12px; box-shadow: var(--shadow);
  cursor: pointer;
}
.ml-item:active { background: var(--gold-soft); }
.ml-thumb {
  position: relative; flex: none; width: 62px; height: 62px; border-radius: 10px; overflow: hidden;
  background: linear-gradient(135deg, var(--primary-soft), var(--gold-soft));
  display: flex; align-items: center; justify-content: center;
}
.ml-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ml-vicon { font-size: 20px; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); }
.ml-badge {
  position: absolute; right: 3px; bottom: 3px;
  padding: 1px 5px; border-radius: 8px;
  background: rgba(24, 16, 10, 0.6); color: #fff; font-size: 10px; line-height: 1.5;
}
.ml-text { flex: 1; min-width: 0; }
.ml-name {
  font-size: 15px; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ml-meta { margin-top: 4px; font-size: 12px; color: var(--muted); }
.ml-arrow { flex: none; color: var(--muted); font-size: 20px; }

/* 讲解词 */
.script-body { font-size: 15px; line-height: 2; color: var(--body); white-space: pre-wrap; }
.script-foot {
  margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line);
  font-size: 11px; color: var(--muted);
}

/* 信息表 */
.info-table { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 12px; }
.info-cell .k { font-size: 11px; color: var(--muted); }
.info-cell .v { font-size: 13px; color: var(--ink); margin-top: 2px; line-height: 1.6; }
.info-cell.wide { grid-column: 1 / -1; }

/* AI 拓展卡片 */
.ai-notice {
  display: flex; gap: 7px; align-items: flex-start;
  font-size: 11px; color: var(--gold); background: var(--gold-soft);
  border-radius: 10px; padding: 8px 11px; margin-bottom: 12px; line-height: 1.7;
}
.expand-card {
  border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px;
  margin-bottom: 10px; background: linear-gradient(180deg, #fffdf9, #fff);
}
.expand-card .et { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.expand-card .ec { font-size: 13px; line-height: 1.95; color: var(--body); white-space: pre-wrap; }
.expand-card .es { margin-top: 8px; font-size: 10px; color: var(--muted); }

/* 反馈与页脚 */
.detail-actions { display: flex; gap: 10px; margin: 14px 16px 16px; }
.detail-actions button {
  flex: 1; padding: 11px 0; border-radius: 12px; font-size: 13px; cursor: pointer;
  border: 1px solid var(--line); background: var(--card); color: var(--muted);
}
.detail-actions button.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.official-link {
  display: block; margin: 14px 16px 0; padding: 12px 14px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--line); color: var(--primary);
  font-size: 13px; text-decoration: none;
}
.site-foot {
  margin: 28px 16px 10px; padding-top: 18px; border-top: 1px solid var(--line);
  font-size: 11px; color: var(--muted); text-align: center; line-height: 2;
}

/* 空态 */
.empty-box { text-align: center; padding: 54px 20px; color: var(--muted); }
.empty-box .ic { font-size: 44px; opacity: 0.5; }
.empty-box .tx { margin-top: 12px; font-size: 13px; }

/* 反馈弹层 */
.fb-body { padding: 18px 16px 26px; }
.fb-body textarea {
  width: 100%; min-height: 110px; padding: 12px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg); font-size: 14px;
  font-family: inherit; resize: none; color: var(--ink);
}
.fb-body textarea:focus { outline: none; border-color: var(--primary); }
.fb-body input {
  width: 100%; margin-top: 10px; padding: 11px 12px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg); font-size: 13px;
}
.fb-body input:focus { outline: none; border-color: var(--primary); }
.fb-submit {
  width: 100%; margin-top: 14px; padding: 12px 0; border: none; border-radius: 999px;
  background: var(--primary); color: #fff; font-size: 14px; cursor: pointer;
}

/* 覆盖 vant 细节 */
.van-tab { color: var(--muted); }
.van-tab--active { color: var(--primary); font-weight: 600; }
.van-tabs__line { background: var(--primary); border-radius: 2px; }
.van-hairline--top-bottom::after { border-color: var(--line); }
.van-empty__description { color: var(--muted); }
