/* ============================================================
   带薪穿越大明 · 设计系统
   基调：手绘线条 + 仿古籍木刻版画 · 老纸肌理 · 留白
   三主色：墨褐（动作/选中）· 驼米（纸底）· 灰绿（次强调/状态）
   忌：印章、大红大金、高饱和、投影渐变堆砌
   ============================================================ */

:root {
  /* —— 色彩 tokens —— */
  --bg-silk: #F0E7D3;          /* 驼米底 · 老纸 */
  --bg-silk-deep: #E9DEC6;     /* 深驼，卡片层次 */
  --bg-silk-dim: #E1D4B8;      /* 更深一层，按压态 */
  --ink: #3D3A34;              /* 淡墨正文 */
  --ink-soft: #6B655A;         /* 次级文字 */
  --ink-faint: rgba(61, 58, 52, .14);  /* 烟墨细线 */
  --ink-faint-soft: rgba(61, 58, 52, .08);
  --cha: #6B4F32;              /* 墨褐 · 主强调（动作/选中，木刻印版条印） */
  --cha-deep: #54402A;         /* 墨褐按压 */
  --qing: #5E7C6A;             /* 灰绿 · 次强调（状态/进度/链接） */
  --qing-deep: #4C6657;
  --dai: #465B6B;              /* 黛青 · 辅助（年份标签/招幌字） */
  --zhe: #B0713E;              /* 赭石 · 价格数字 */
  --zhe-soft: rgba(176, 113, 62, .12);
  --jiang: #A6473F;            /* 绛红 · 仅小面积点缀 */

  /* —— 字体 —— */
  --font-serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", "Source Han Serif SC", serif;
  --font-display: "Qiji", "Noto Serif SC", "Songti SC", serif;   /* 展示层：齐伋体（木刻活字），缺字自动回退衬线 */

  /* —— 节奏 —— */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;

  /* —— 形 —— */
  --radius: 2px;
  --line: 1px solid var(--ink-faint);
  --line-strong: 1px solid rgba(61, 58, 52, .35);
}

/* —— 老纸肌理：帘纹（造纸竹帘痕）+ 细噪 + 极弱暗角（走背景层，绝不拦截点击） —— */
:root {
  --paper-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.24 0 0 0 0 0.22 0 0 0 0 0.18 0 0 0 0.04 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  --paper-screen: repeating-linear-gradient(to right, rgba(61, 58, 52, .022) 0 1px, transparent 1px 7px);
  --paper-vignette: radial-gradient(135% 100% at 50% 42%, transparent 68%, rgba(107, 79, 50, .035) 100%);
}

/* —— 齐伋体（子集 621 字 · 506KB，仅展示层；引文正文走衬线栈） —— */
@font-face {
  font-family: "Qiji";
  src: url("../assets/fonts/qiji.woff2?v=188") format("woff2");   /* v116：字库更新必 bump 此版本（缓存根因修复） */
  font-display: swap;
  unicode-range: U+4E00-9FFF, U+3000-303F, U+FF00-FFEF, U+30-39;
}

/* —— 齐伋体 · 展示层集中应用（缺字自动回退衬线栈，正文不在此列） —— */
.topbar-title,
.cover-title, .cover-sub, .cover-step i, .cover-start, .cover-foot,
.tabbar-item,
.title-lg, .title-md,
.btn, .btn-kao,
.item-name, .seg-name, .seg-desc, .cite-name, .cite-price,
.price, .num, .ladder-name, .ladder-val,
.ph, .v-text {
  font-family: var(--font-display);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%;
  background: var(--bg-silk);
}

body {
  font-family: var(--font-serif);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.8;
  letter-spacing: 0.04em;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

/* ============================================================
   应用骨架 · 三段式：顶栏 / 弹性内容 / 底栏（恒贴底部）
   ============================================================ */
#app {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100vh;            /* 旧内核回退 */
  height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  background-color: var(--bg-silk);
  background-image:         /* 老纸三层：极弱暗角 + 帘纹 + 细噪 */
    var(--paper-vignette),
    var(--paper-screen),
    var(--paper-grain);
  overflow: hidden;
}

.view {
  position: relative;       /* 视图参与 flex 布局；内部绝对定位以视图为锚 */
  flex: 1;
  min-height: 0;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.view.active { display: flex; }   /* v181：切换不再闪（用户令"直接切过去"）——viewIn 淡入动画停用，keyframes 留档 */

@keyframes viewIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.view-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: var(--sp-4);
  padding-bottom: calc(var(--sp-7) + env(safe-area-inset-bottom, 0px));
}

/* ============================================================
   排版
   ============================================================ */
.v-text {                 /* 竖排 */
  writing-mode: vertical-rl;
  text-orientation: upright;
  letter-spacing: 0.22em;
}

.title-xl {               /* 开卷大标题 */
  font-size: 34px;
  font-weight: 600;
  letter-spacing: 0.3em;
  line-height: 1.35;
}

.title-lg {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.title-md {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.text-soft { color: var(--ink-soft); font-size: 13px; letter-spacing: 0.06em; }
.text-xs { font-size: 11.5px; color: var(--ink-soft); letter-spacing: 0.05em; }

.num {                    /* 账本数字 */
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: 0.02em;
}

.price { color: var(--zhe); font-weight: 600; }

.hr-ink {                 /* 细墨分隔线，中段渐隐 */
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--ink-faint) 18%, var(--ink-faint) 82%, transparent);
  margin: var(--sp-4) 0;
}

/* ============================================================
   册页卡片（文武线双框）
   ============================================================ */
.card {
  position: relative;
  background: rgba(255, 252, 244, .55);
  border: var(--line);
  border-radius: var(--radius);
  padding: var(--sp-4);
}

.card::after {            /* 内衬细线，形成文武线 */
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid var(--ink-faint-soft);
  border-radius: 1px;
  pointer-events: none;
}

.card-plain::after { display: none; }

/* ============================================================
   按钮
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font-size: 15px;
  letter-spacing: 0.14em;
  padding: 10px 26px;
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(61, 58, 52, .4);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease, opacity .18s ease;
}

.btn:active { background: var(--ink); color: var(--bg-silk); }

.btn-primary {             /* 墨褐条印：木刻印版反白 */
  background: var(--cha);
  border-color: var(--cha-deep);
  color: #F6F1E4;
}

.btn-primary:active { background: var(--cha-deep); }

.btn-sm {
  font-size: 13px;
  padding: 5px 14px;
  letter-spacing: 0.1em;
}

.btn-ghost { border-color: var(--ink-faint); color: var(--ink-soft); }
.btn-ghost:active { background: var(--bg-silk-dim); color: var(--ink); }

.btn:disabled { opacity: .35; pointer-events: none; }

/* ============================================================
   "考"字按钮 —— 绛红仅此一处
   ============================================================ */
.btn-kao {
  flex: none;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--jiang);
  border: 1px solid rgba(166, 71, 63, .45);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  letter-spacing: 0;
  transition: background .18s ease, color .18s ease;
}

.btn-kao:active { background: var(--jiang); color: #F6F1E4; }

/* ============================================================
   顶栏 · 账本式余额
   ============================================================ */
.topbar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) var(--sp-4);
  /* v198：公共代码恢复正常顶距（web/Cloudflare 版无胶囊遮挡）。
     小红书专属的 64px 下移由 build-zip-min.sh 打包时注入到压缩版（v166/v195 的教训：
     平台避让写进公共样式 → 线上完整版顶栏被压偏下，用户发现） */
  padding-top: calc(var(--sp-3) + env(safe-area-inset-top, 0px));
  border-bottom: var(--line);
  background: rgba(240, 231, 211, .92);
  z-index: 10;
  cursor: pointer;              /* 整栏点击回卷首（封面入口） */
}

.topbar-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.2em;
}

.wallet {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.wallet .label { font-size: 13px; color: var(--ink-soft); letter-spacing: 0.12em; }
.wallet .amount { font-size: 20px; color: var(--zhe); font-weight: 600; }   /* v166 加大（用户令） */
.wallet .unit { font-size: 14px; color: var(--ink-soft); }

/* ============================================================
   底部导航
   ============================================================ */
.tabbar {
  position: relative;
  flex: none;
  display: flex;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(240, 231, 211, .95);
  z-index: 10;
}

/* 顶边文武线：外粗（文）内细（武），古籍版面收边 */
.tabbar::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: rgba(61, 58, 52, .5);
  pointer-events: none;
}
.tabbar::after {
  content: "";
  position: absolute;
  top: 3px; left: 0; right: 0;
  height: 1px;
  background: var(--ink-faint);
  pointer-events: none;
}

.tabbar-item {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 7px 0 6px;
  font-size: 13px;   /* v158：10.5→13（用户"太小了难看清楚"）——齐伋体放大一档补偿 */
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  background: none;
  border: none;
  font-family: var(--font-display);
  cursor: pointer;
  transition: color .18s ease;
}

/* 墨钉：选中项墨褐底反白，如版画墨钉字块 */
.tab-ink {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 12px 3px;
  border-radius: 2px;
  transition: background .18s ease, color .18s ease;
}

.tabbar-item svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; }   /* v158：图标加大加粗 */
.tabbar-item.on { color: var(--ink-soft); }
.tabbar-item.on .tab-ink { background: var(--cha); color: #F6F1E4; }

/* ============================================================
   钱庄·兑换
   ============================================================ */
#view-intro {
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--sp-6) var(--sp-5);
  overflow-y: auto;
}

.qz-year-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 12px;
  border: 1px solid rgba(70, 91, 107, .4);
  color: var(--dai);
  font-size: 12px;
  letter-spacing: .16em;
  border-radius: 1px;
  background: rgba(255, 252, 244, .55);
  align-self: flex-start;
}

.qz-silver-cn {
  font-size: 38px;
  font-weight: 600;
  letter-spacing: .12em;
  color: var(--zhe);
  line-height: 1.3;
}

.qz-silver-num {
  font-size: 14px;
  color: var(--ink-soft);
  letter-spacing: .08em;
  margin-top: 2px;
}

.qz-zhixian {
  margin-top: 10px;
  padding: 10px 14px;
  border: 1px solid var(--ink-faint);
  border-radius: var(--radius);
  background: rgba(255, 252, 244, .45);
  text-align: center;
  font-size: 13.5px;
  line-height: 1.9;
}

.qz-zhixian-num {
  font-size: 20px;
  font-weight: 600;
  color: var(--jiang);
  margin: 0 2px;
}

.intro-mountain {         /* 远山 · 底部剪影 */
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 26vh;
  pointer-events: none;
  opacity: .5;
}

.intro-title-wrap {
  display: flex;
  flex-direction: row-reverse;
  justify-content: center;
  gap: var(--sp-5);
  margin-bottom: var(--sp-6);
  animation: inkIn 1.1s ease both;
}

@keyframes inkIn {
  from { opacity: 0; filter: blur(6px); }
  to   { opacity: 1; filter: blur(0); }
}

.intro-sub {
  animation: inkIn 1.1s .35s ease both;
}

.input-salary {
  font-family: var(--font-serif);
  font-size: 22px;
  text-align: center;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(61, 58, 52, .4);
  padding: 6px 4px;
  width: 200px;
  letter-spacing: 0.08em;
  outline: none;
}

.input-salary:focus { border-bottom-color: var(--qing); }

/* ============================================================
   街市 · 横版长卷
   ============================================================ */
.street-root {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* v166 删顶部整行（入街/展卷+进度线+参照小字），圆点改为浮在画面顶部居中的半透明小托 */
.street-dots {
  position: absolute; top: 10px; left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px;
  background: rgba(30, 22, 14, .52);
  border-radius: 999px;
}
.street-dots .progress-dot { border-color: rgba(240, 231, 211, .65); }
.street-dots .progress-dot.on { background: #F0E7D3; border-color: #F0E7D3; }

.progress-line { flex: 1; height: 1px; background: var(--ink-faint-soft); position: relative; }
.progress-fill { position: absolute; left: 0; top: 0; height: 1px; background: var(--qing); transition: width .2s ease; }

.progress-dot {
  flex: none;
  width: 7px; height: 7px;
  border-radius: 50%;
  border: 1px solid var(--ink-faint);
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
}
.progress-dot.on { background: var(--qing); border-color: var(--qing-deep); }

.street-scroll {
  flex: 1;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  position: relative;   /* 街廊模式 .s3d-space 的定位锚 */
  touch-action: pan-x;
}
.street-scroll::-webkit-scrollbar { display: none; }

.street-track { display: flex; height: 100%; }

.street-seg {
  flex: none;
  width: 620px;
  height: 100%;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  /* 无图回退：绢底 + 青绿渐层 + 屋檐意象 */
  background:
    linear-gradient(to bottom, rgba(94, 124, 106, .12), transparent 52%),
    radial-gradient(140% 60% at 50% 0%, rgba(70, 91, 107, .10), transparent 70%),
    var(--bg-silk-deep);
  transition: background-color .2s ease;
}
.street-seg:active { background-color: rgba(94, 124, 106, .08); }

/* 段间衔接（v72 无缝硬接）：用户否决叠压羽化（渐变带难看）——图片直接贴边相接，无重叠无遮罩 */

.seg-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.seg-art { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }   /* 场景回退线稿（SVG） */

/* 作画过程（v60 混合式）：深褐底上先落墨街景人物线（分批），再描店铺轮廓线，最后淡彩原图收尾。
   基态一律=成品可见（动画只写 from 隐藏态）——不支持动画的老 webview 直接见完成稿，无破相 */
.seg-draw {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
  /* v169 复勾洗稿定版：复勾态（彩图+墨线）首帧常驻，触发后墨线逐条褪去=干净原图 */
}
.draw-strip {                      /* 复勾线稿条：基态整幅常驻（无动画） */
  position: absolute; left: 0; width: 100%;
  overflow: hidden;
}
.draw-strip.erase {                /* v169 触发后自上而下逐条褪去=扫描洗出原图 */
  animation: stripOut .26s ease-in both;
}
@keyframes stripOut { to { opacity: 0; } }
.draw-strip-img {
  position: absolute; left: 0; width: 100%;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  filter: brightness(.34);         /* v168 米白线稿压成墨褐色=木刻复勾（用户定版） */
}
@media (prefers-reduced-motion: reduce) {
  .draw-strip.erase { animation-duration: .01s; animation-delay: 0s; }
}

.seg-overlay {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  pointer-events: none;
}

.seg-hang {
  position: absolute;
  top: 16px;
  left: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;             /* v108 加大（46）：牌匾大一点文字大一点——用户指令 */
  height: 106px;           /* v108 加大（84） */
  font-size: 19px;         /* v108 加大（15） */
  font-weight: 600;
  letter-spacing: .26em;
  color: var(--dai);
  border: 1px solid rgba(70, 91, 107, .35);
  border-top: 3px solid rgba(70, 91, 107, .35);
  background: rgba(240, 231, 211, .97);   /* v128：半透明曾透出背后线条 */
  box-shadow: 0 1px 0 rgba(61, 58, 52, .06);
  border-radius: 4px;      /* v108：矩形统一带一点圆角 */
}

/* 纸签底：街市段图改深褐底后（素材清单§7 v2），深墨店名需纸底才可读；兜底浅底态亦协调 */
.seg-info {
  position: absolute; left: 16px; bottom: 16px;
  padding: 12px 16px 14px;   /* v108 加大（9/13/11）——左下角信息卡也是（用户指令） */
  background: rgba(240, 231, 211, .88);
  border: 1px solid rgba(70, 91, 107, .35);
  border-top: 3px solid rgba(70, 91, 107, .35);
  box-shadow: 0 1px 0 rgba(61, 58, 52, .06);
  border-radius: 4px;        /* v108：圆角 */
}
.seg-name { font-size: 26px; font-weight: 600; letter-spacing: .16em; color: var(--ink); }
.seg-desc { font-size: 14px; color: var(--ink-soft); letter-spacing: .1em; margin-top: 4px; }
.seg-cta {
  display: inline-block;
  font-size: 13.5px;
  color: var(--qing-deep);
  letter-spacing: .14em;
  margin-top: 11px;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(92, 102, 87, .4);
  animation: ctaPulse 1.7s ease-in-out infinite;   /* v174：闪烁加重（用户令：提示可点进店），谷值更暗+峰值微光 */
}
@keyframes ctaPulse {
  0%, 100% { opacity: .3; }
  50% { opacity: 1; text-shadow: 0 0 7px rgba(92, 102, 87, .5); }
}

/* v110 修双闪：默认隐藏、仅 .live 浮现（v109 基态可见导致"先出现一遍又浮现"）；
   作用域限 .street-seg——3D 廊同款 .seg-hang 不隐藏 */
.street-seg .seg-hang, .street-seg .seg-info { opacity: 0; }
.street-seg.live .seg-hang { animation: segHangIn .55s ease .32s both; }
.street-seg.live .seg-info { animation: segInfoIn .55s ease .62s both; }
@keyframes segHangIn {
  from { opacity: 0; transform: translateY(-9px); }
  to { opacity: 1; transform: none; }
}
@keyframes segInfoIn {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .street-seg.live .seg-hang, .street-seg.live .seg-info { animation-duration: .01s; animation-delay: 0s; }
}

.street-hint {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11.5px;
  color: var(--ink-soft);
  letter-spacing: .18em;
  padding: 4px 14px;
  background: rgba(240, 231, 211, .85);
  border: 1px solid var(--ink-faint);
  border-radius: 2px;
  pointer-events: none;
  transition: opacity .5s ease;
  white-space: nowrap;
}
.street-hint.gone { opacity: 0; }

/* v175 五店吆喝气泡：与钱铺 .qp-bubble 同语言，更小一号；v176 用户令——下移至门面近店主处（反正会消失）、一句展示完不分行 */
.street-hawk {
  position: absolute; left: 50%; top: 52%; transform: translateX(-50%); z-index: 5;
  max-width: 92%;
  background: rgba(240, 231, 211, .96);
  border: 2.5px solid #5B4632; border-radius: 5px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .35), inset 0 0 0 1.5px rgba(240, 231, 211, .9), inset 0 0 0 3px rgba(91, 70, 50, .55);
  padding: 8px 14px;
  font-family: var(--font-display);
  font-size: 16px; letter-spacing: .1em; line-height: 1.55; color: var(--ink);
  text-align: center; white-space: nowrap; pointer-events: none;
  animation: bubbleIn .4s ease .9s both, bubbleOut .5s ease 6.2s both;
}
.street-hawk:empty { display: none; }
/* v183：滑动一开始旧吆喝慢慢隐去（animation 会压住 transition，须先卸掉） */
.street-hawk.hawk-fade { animation: none !important; opacity: 0; transition: opacity .7s ease; }

/* 调图模式（v66 ?edit=seg）：取景窗口预览层 + 工具条 + 选中描边 + 配置弹层 */
.segfit-editing .seg-img, .segfit-editing .seg-draw { visibility: hidden; }   /* 预览层接管 */
.segfit-view {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background-repeat: no-repeat;
  background-color: #3E2C1B;                    /* 窗口外的原图外区域（不会露：窗口永铺满） */
  z-index: 5;
}
.segfit-bar {
  position: absolute;
  top: 52px; left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: flex; gap: 6px; align-items: center;
  background: rgba(61, 58, 52, .93);
  color: #F0E7D3;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 12px;
  letter-spacing: .05em;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
  max-width: 94vw;
  flex-wrap: wrap;
  justify-content: center;
}
.segfit-bar .segfit-name { min-width: 110px; text-align: center; font-size: 11.5px; }
.segfit-bar button {
  background: #F0E7D3; color: #3D3A34;
  border: none; border-radius: 3px;
  font-size: 12px; padding: 5px 8px;
  cursor: pointer;
}
.street-seg.segfit-sel { outline: 2px dashed #F0E4C0; outline-offset: -2px; }
/* 对照条（v68）：五段真实比例同屏对比 + 实时店高% */
.segfit-strip {
  position: absolute;
  bottom: 56px; left: 8px; right: 8px;
  z-index: 55;
  display: flex;
  gap: 2px;
  overflow-x: auto;
  padding: 4px;
  background: rgba(61, 58, 52, .9);
  border-radius: 4px;
}
.segfit-cell {
  flex: none;
  height: 108px;
  background-repeat: no-repeat;
  background-color: #3E2C1B;
  position: relative;
  cursor: pointer;
  border: 1px solid rgba(240, 228, 192, .25);
}
.segfit-cell .segfit-cell-tag {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: rgba(61, 58, 52, .82);
  color: #F0E7D3;
  font-size: 10px;
  letter-spacing: .04em;
  text-align: center;
  padding: 2px 0;
  white-space: nowrap;
  overflow: hidden;
}
.segfit-copy {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0;
  z-index: 999;
  background: rgba(61, 58, 52, .88);
  display: flex; align-items: center; justify-content: center;
}
.segfit-copy textarea {
  width: 78vw; height: 42vh;
  font: 12px/1.5 monospace;
  color: #F0E7D3; background: rgba(0, 0, 0, .4);
  border: 1px solid rgba(240, 228, 192, .5);
  padding: 8px;
}

/* 店内场景横幅 */
.shop-banner {
  margin: 0 calc(-1 * var(--sp-4)) 12px;
  height: 150px;
  overflow: hidden;
  border-bottom: var(--line);
  background: linear-gradient(to bottom, rgba(94, 124, 106, .08), transparent);
}
.shop-banner img, .shop-banner .banner-art { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---- 店内货架模式（第一人称空间 · 试点杂货铺）---- */
.shop-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.shop-room {
  position: relative;
  margin: 0 calc(-1 * var(--sp-4));
  background: var(--bg-silk-deep);
  overflow: hidden;
}
.shop-room .room-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.shop-room .room-bg-img {   /* 用户生成的空间壳图（加载失败自动移除，露出SVG线稿壳） */
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  z-index: 0;
}

.room-plaque {                    /* 匾额：叠在梁架下方 */
  position: absolute;
  top: 30px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  padding: 4px 22px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .3em;
  color: var(--dai);
  background: rgba(240, 231, 211, .82);
  border: 1px solid rgba(70, 91, 107, .4);
  border-top: 3px solid rgba(70, 91, 107, .4);
}

.room-shelves {
  position: relative;
  z-index: 1;
  padding: 88px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.shelf-unit {
  background: rgba(240, 231, 211, .78);
  border: 1px solid rgba(61, 58, 52, .3);
  padding: 8px 8px 10px;
  box-shadow: 0 1px 0 rgba(61, 58, 52, .08);
}
.shelf-t {
  font-size: 11.5px;
  letter-spacing: .28em;
  color: var(--dai);
  text-align: center;
  padding: 2px 0 6px;
}

.shelf-board {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  min-height: 86px;
  padding: 6px 2px 4px;
  background: linear-gradient(to bottom, rgba(176, 113, 62, .12), rgba(176, 113, 62, .03));
  border-top: 2px solid rgba(107, 79, 50, .35);
}
.shelf-board + .shelf-board { margin-top: 6px; }

.room-slot {
  flex: none;
  width: 78px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  padding: 2px 0;
  cursor: pointer;
  transition: transform .15s ease;
}
.room-slot:active { transform: scale(.93); }

.slot-img {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}
.slot-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 0 rgba(61, 58, 52, .14));   /* 商品落在板上的影 */
}
.slot-name {
  font-size: 10.5px;
  color: var(--ink);
  line-height: 1.3;
  text-align: center;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.room-hint {
  text-align: center;
  padding: 10px 0 14px;
  position: relative;
  z-index: 1;
}

/* ============================================================
   街廊模式 · CSS 3D 透视长街（2.5D 试点）
   滑动 = 前进；两侧店铺掠过；无建模，纯平面图 + 透视变换
   ============================================================ */
.s3d-space {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  perspective: 1900px;
  perspective-origin: 50% 40%;
  overflow: hidden;
  /* 街廊深褐底：与封面带/长卷段图深褐底浅线口径同调（#4A3624→#3E2C1B），远处淡黄微光作街灯 */
  background:
    radial-gradient(60% 34% at 50% 26%, rgba(240, 228, 192, .10), transparent 70%),
    linear-gradient(to bottom, #4A3624, #3E2C1B 82%),
    #3E2C1B;
}
.s3d-world {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  transform-style: preserve-3d;
}

.s3d-ground {
  position: absolute;
  left: 50%;
  top: 58%;
  width: 2400px;
  height: 4200px;
  margin-left: -1200px;
  transform-origin: top center;
  transform: rotateX(-90deg);
  /* 石板线改浅米低透明（深底上勾线），底色与街廊底同调 */
  background:
    repeating-linear-gradient(to bottom, rgba(240, 228, 192, .085) 0 2px, transparent 2px 92px),
    repeating-linear-gradient(to right, rgba(240, 228, 192, .05) 0 2px, transparent 2px 130px),
    linear-gradient(to bottom, rgba(240, 228, 192, .04), rgba(240, 228, 192, .015)),
    #3E2C1B;
}

.s3d-shop {
  position: absolute;
  left: 50%;
  top: 17%;
  width: 460px;
  height: 400px;
  transform-style: preserve-3d;
  cursor: pointer;
}
.s3d-shop .s3d-face {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background:
    linear-gradient(to bottom, rgba(94, 124, 106, .12), transparent 50%),
    var(--bg-silk-deep);
  border: 1px solid var(--ink-faint);
  border-top: 3px solid rgba(70, 91, 107, .4);
  padding: 16px;
  backface-visibility: hidden;
  overflow: hidden;
}
.s3d-shop .s3d-face .scene {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: -1;
}
.s3d-shop .seg-name { font-size: 24px; position: relative; }
.s3d-shop.is-house .s3d-face { background: var(--bg-silk-dim); border-style: dashed; cursor: default; }

.s3d-gate {
  position: absolute;
  left: 50%;
  top: 2%;
  width: 820px;
  height: 560px;
  margin-left: -410px;
  transform: translateZ(-3820px);
  background:
    linear-gradient(to bottom, rgba(70, 91, 107, .22), rgba(70, 91, 107, .08) 55%, transparent),
    var(--bg-silk-deep);
  border: 1px solid rgba(70, 91, 107, .3);
  display: flex;
  align-items: center;
  justify-content: center;
}
.s3d-gate .v-text { font-size: 26px; letter-spacing: .5em; color: var(--dai); font-weight: 600; }

/* 街廊 2D 投影热区：铺面点击的可靠通道（绕开 3D 变换命中测试） */
.s3d-hot {
  position: absolute;
  top: 0; left: 0;
  width: 100px;
  height: 100px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  z-index: 5;
  -webkit-tap-highlight-color: transparent;
}

/* 竖排招幌（店内头部/钱庄用） */
.shop-hang {
  flex: none;
  width: 44px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: var(--dai);
  border: 1px solid rgba(70, 91, 107, .35);
  border-top: 3px solid rgba(70, 91, 107, .35);
  background: rgba(255, 252, 244, .6);
}

/* ============================================================
   店铺 · 商品册页
   ============================================================ */
.item-row {
  display: flex;
  gap: var(--sp-3);
  align-items: stretch;
  padding: var(--sp-3) 0;
  border-bottom: var(--line);
}

.item-row:last-child { border-bottom: none; }

.item-thumb {
  flex: none;
  width: 74px;
  height: 74px;
  border: none;   /* v154：框线删（用户报'有一条框线'——底改米白后边框成多余线条） */
  border-radius: var(--radius);
  background: transparent;   /* v154：底色也删——商品本体自带底色，容器不再垫色 */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.item-thumb .sketch-svg { display: none; }   /* v125：深底上原墨线框不可见，改 CSS 细边 */

.item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 占位图：竖排物名，图片到位后自动被替换 */
.item-thumb .ph {
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: #6B4F32;             /* v152：米白底配深棕 */
}

.item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.item-name { font-size: 15.5px; font-weight: 600; letter-spacing: 0.1em; }
.item-note { font-size: 12px; color: var(--ink-soft); letter-spacing: 0.04em; line-height: 1.6; margin-top: 2px; }
.item-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: var(--sp-2); }
.item-price { font-size: 15px; }
.item-price .unit { font-size: 11.5px; color: var(--ink-soft); font-weight: 400; }

.badge-tier {             /* 证据强度标 */
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--qing-deep);
  border: 1px solid rgba(92, 102, 87, .35);
  padding: 1px 6px;
  border-radius: 1px;
  margin-left: 6px;
  vertical-align: 2px;
  font-weight: 400;
}

/* ============================================================
   宅院装扮
   ============================================================ */
.house-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: var(--line);
  border-radius: var(--radius);
  background: linear-gradient(to bottom, rgba(70, 91, 107, .08), transparent 55%), rgba(255, 252, 244, .45);
  overflow: hidden;
}

.house-stage > svg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }   /* 宅院回退线稿 */

.house-slot {
  position: absolute;
  width: 54px;
  height: 54px;   /* v171 用户令"大小适中"：整体缩一档——基型 54；sz-lg 64 / sz-sm 44（旧 76/54 在院前地面带摆不下） */
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-size: 11px;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease;
  /* v173：空槽位无文字无虚线框（用户令：不露定位痕迹）；编辑模式另有红框（.editing） */
}
.house-slot.sz-lg { width: 64px; height: 64px; }
.house-slot.sz-sm { width: 44px; height: 44px; }
.qp-panel.noanim { animation: none; }   /* v143：布置/撤回重渲染直显（面板曾重播3.7s隐藏态=「弹窗消失」） */

.house-slot.filled { background: transparent; border: none; }   /* v185 用户报"抠图不干净"：真凶是已布置槽位的米白卡片底，深宅院上像白盒——撤掉，物件直接落在画里 */
.house-slot.filled img { filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .35)); }   /* 落地轻影，与画面衔接 */
.house-slot:active { background: var(--bg-silk-dim); }
.house-slot img { width: 100%; height: 100%; object-fit: contain; }
.house-slot .ph { writing-mode: vertical-rl; text-orientation: upright; letter-spacing: 0.16em; }

.storage-chip {
  flex: none;
  width: 58px;
  border: var(--line);
  border-radius: var(--radius);
  background: rgba(255, 252, 244, .55);
  padding: var(--sp-1);
  text-align: center;
  cursor: pointer;
}

.storage-chip .mini-thumb {
  width: 100%;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.storage-chip .mini-thumb img { width: 100%; height: 100%; object-fit: cover; }
.storage-chip .mini-name { font-size: 10.5px; letter-spacing: 0.04em; line-height: 1.5; }
.storage-chip.placed { border-color: rgba(94, 124, 106, .55); }

/* ============================================================
   典当行 · 当票
   ============================================================ */
.pawn-ticket {
  background: rgba(255, 252, 244, .7);
  border: var(--line);
  border-radius: var(--radius);
  padding: var(--sp-4);
  position: relative;
}

.pawn-ticket::before,
.pawn-ticket::after {     /* 票据骑缝线 */
  content: "";
  position: absolute;
  left: 10px; right: 10px;
  height: 1px;
  background: repeating-linear-gradient(to right, var(--ink-faint) 0 6px, transparent 6px 12px);
}
.pawn-ticket::before { top: 6px; }
.pawn-ticket::after { bottom: 6px; }

/* ============================================================
   报告 · 分享卡
   ============================================================ */
.report-ladder { position: relative; margin: var(--sp-4) 0; }
.ladder-row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 5px 0;
}
.ladder-name { flex: none; width: 92px; font-size: 12.5px; color: var(--ink-soft); letter-spacing: 0.08em; text-align: right; }
.ladder-bar-wrap { flex: 1; height: 5px; background: var(--ink-faint-soft); border-radius: 1px; overflow: hidden; }
.ladder-bar { height: 100%; background: var(--qing); opacity: .55; border-radius: 1px; }
.ladder-row.you .ladder-name { color: var(--zhe); font-weight: 600; }
.ladder-row.you .ladder-bar { opacity: 1; background: var(--zhe); }
.ladder-val { flex: none; width: 66px; font-size: 11.5px; color: var(--ink-soft); }

#share-canvas, #share-card { width: 100%; max-width: 340px; display: block; margin: var(--sp-4) auto; border: var(--line); -webkit-touch-callout: default; -webkit-user-select: auto; user-select: auto; }

/* ---- 封面 · 开卷（真迹《南都繁会图》反相底纹）---- */
#view-cover { background: var(--bg-silk); }
#view-cover.active { flex-direction: column; }

/* 中部长卷带：深棕底（与题签墨褐区分）+ 真迹淡黄反相纹理（淡淡） */
.cover-band {
  position: relative;
  flex: none;
  height: 46%;
  margin-top: 13%;
  background: linear-gradient(to bottom, #4A3624, #3E2C1B);
  overflow: hidden;
}
.cover-band .band-art {              /* 无真迹时的线稿兜底（垫底） */
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  animation: bandUnroll 1.6s ease-out both;
}
@keyframes bandUnroll {
  from { clip-path: inset(0 0 0 100%); }
  to   { clip-path: inset(0 0 0 0); }
}
.cover-band .cover-band-img {        /* 真迹线稿提取：淡黄线描已烘焙进深棕底(cover.webp)，此处零滤镜 */
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 40%;
  z-index: 1;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, rgba(0,0,0,1) 10%, rgba(0,0,0,1) 90%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, rgba(0,0,0,1) 10%, rgba(0,0,0,1) 90%, transparent 100%);
  animation: bandUnroll 1.6s ease-out both;
}

/* 题签式标题：墨褐底 + 米白竖字（边框由 sketch.js 手绘线绘制，勿加 CSS 直线框） */
.cover-title {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 30px);
  right: 24px;
  z-index: 2;
  writing-mode: vertical-rl;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: .2em;
  color: #F2E9D5;
  background: var(--cha);
  padding: 13px 9px;
  border: 1px solid transparent;
  animation: fadeInDown 1s .3s ease both;
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 底部内容区（流式跟随，占余下空间） */
.cover-bottom {
  flex: 1;
  min-height: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 26px calc(env(safe-area-inset-bottom, 0px) + 24px);
}
.cover-sub { font-size: 15px; color: var(--ink-soft); line-height: 2.05; letter-spacing: .14em; }
.cover-steps { margin: 16px 0 20px; display: flex; flex-direction: column; gap: 10px; }
.cover-step { display: flex; align-items: center; gap: 11px; font-size: 13.5px; color: var(--ink); letter-spacing: .04em; }
.cover-step i {
  flex: none; width: 27px; height: 27px; border: 1px solid rgba(70, 91, 107, .45); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-style: normal;
  font-size: 13px; color: var(--dai); background: rgba(255, 252, 244, .6);
}
.cover-start { align-self: flex-start; padding: 13px 42px; font-size: 19px; letter-spacing: .24em; }
.cover-foot { margin-top: 18px; color: var(--ink-soft); letter-spacing: .12em; }

@media (max-height: 700px) {        /* 矮屏：带子收紧，防底部内容溢出 */
  .cover-band { height: 37%; margin-top: 12%; }
  .cover-title { font-size: 32px; }
  .cover-steps { gap: 8px; margin: 12px 0 16px; }
}

/* ---- 手绘框线（sketch.js v3 注入层，全站组件自动上框） ---- */
.sketch-svg { position: absolute; left: 0; top: 0; pointer-events: none; }
.sketched { border-color: transparent; }   /* 定位由 sketch.js 按 static 判定补 relative，勿在此改 position */
.hr-ink.sketched { background: none; height: 5px; }

/* ============================================================
   弹层 · 考据卡
   ============================================================ */
.modal-mask {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(61, 58, 52, .32);
  z-index: 100;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.modal-mask.open { display: flex; animation: maskIn .25s ease both; }

@keyframes maskIn { from { opacity: 0; } to { opacity: 1; } }

.modal-sheet {
  position: relative;
  width: 100%;
  max-height: 82%;
  background-color: var(--bg-silk);
  background-image:         /* 弹层同款纸感：帘纹 + 细噪 */
    var(--paper-screen),
    var(--paper-grain);
  border-radius: 0;   /* v163：顶部文武线双线已删（用户：弹窗顶部不要横线） */
  padding: var(--sp-5) var(--sp-4) calc(var(--sp-5) + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  animation: sheetUp .3s ease both;
}

@keyframes sheetUp { from { transform: translateY(40px); opacity: .4; } to { transform: translateY(0); opacity: 1; } }

/* 版心题名：标题居中如版心，按钮靠边悬置 */
.modal-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}
.modal-head .title-md { text-align: center; letter-spacing: .18em; font-size: 20px; white-space: nowrap; }   /* v149：加大+nowrap 一行放完 */
.modal-head .btn { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }
/* v149 合上按钮（全站三处统一）：棕色清晰版——衬线缩档 15px、棕框棕字、留白够 */
.btn-close-m {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  background: rgba(240, 231, 211, .6);
  border: 1.5px solid #6B4F32; border-radius: 4px;
  color: #6B4F32;
  font-family: var(--font-serif);
  font-size: 15px; font-weight: 600; letter-spacing: .14em;
  padding: 7px 16px; cursor: pointer;
}

.quote-block {           /* 史料原文引用块 · 竖界行如版面行格 */
  position: relative;
  border-left: 2px solid rgba(107, 79, 50, .5);
  padding: var(--sp-2) var(--sp-3);
  margin: var(--sp-3) 0;
  background:
    repeating-linear-gradient(to right, transparent 0 23px, rgba(61, 58, 52, .05) 23px 24px),
    rgba(233, 222, 198, .38);
  font-size: 13.5px;
  line-height: 1.9;
}

/* v140 当铺规矩卡：清晰留白版式 */
.pawnrule-lead {
  text-align: center; margin: 2px 0 4px;
  font-size: 15px; color: var(--ink);
}
.pawnrule-lead b { font-size: 19px; color: #A6473F; font-weight: 700; }
.pawnrule-sec {
  font-size: 13px; font-weight: 600; letter-spacing: .22em;
  color: #5B4632; margin: 12px 0 4px;
  display: flex; align-items: center; gap: 8px;
}
.pawnrule-sec::after { content: ""; flex: 1; border-top: 1px solid rgba(91, 70, 50, .3); }
.qb-src { display: block; font-size: 11.5px; color: var(--ink-soft); margin-top: 4px; text-align: right; }
.cite-src { font-size: 12px; color: var(--ink-soft); letter-spacing: 0.05em; }
.cite-src .src-name, .src-inline { color: var(--ink); }

/* ---- 考据卡 · 简版（局部图 + 价源/图源 + 双按钮） ---- */
.cite-fig { position: relative; overflow: hidden; border: var(--line); background: rgba(255, 252, 244, .6); }
.cite-fig img { display: block; width: 100%; }
.cite-fig[data-crop] img { position: absolute; height: auto; max-width: none; }
.cite-fig.fig-text { aspect-ratio: auto; height: auto; padding: 10px 12px; font-size: 12px; color: var(--ink-soft); }
.cite-head { display: flex; align-items: baseline; justify-content: space-between; margin-top: 12px; gap: 8px; }
.cite-name { font-size: 16px; font-weight: 600; color: var(--ink); letter-spacing: .04em; }
.cite-price { flex: none; font-size: 21px; font-weight: 700; color: var(--zhe); }
.cite-price small { font-size: 12px; font-weight: 400; margin-left: 2px; }
.cite-note { font-size: 12.5px; color: var(--ink-soft); margin: 4px 0 12px; letter-spacing: .03em; }
.cite-box { border: 1px solid var(--ink-faint); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 10px; background: rgba(255, 252, 244, .5); }
.cite-box-t { font-size: 11px; letter-spacing: .4em; color: var(--dai); margin-bottom: 6px; }
.cite-quote { font-size: 13px; line-height: 1.9; color: var(--ink); }
.cite-box-src { font-size: 11.5px; color: var(--ink-soft); margin-top: 6px; letter-spacing: .03em; }
.cite-box-loc { font-size: 11.5px; color: var(--ink-soft); margin-top: 3px; line-height: 1.7; }
.cite-btns { display: flex; gap: 10px; margin-top: 14px; }
.cite-btns .btn { flex: 1; }
/* 裁切编辑器（?crop=1）：图上拖拽选框 */
.crop-out { font-size: 11px; color: var(--dai); text-align: center; padding: 7px 4px; word-break: break-all; cursor: pointer; letter-spacing: .03em; }
.crop-sel { position: absolute; border: 1.5px dashed var(--jiang); background: rgba(166, 71, 63, .08); pointer-events: none; z-index: 5; }

.painting-fig { margin: var(--sp-3) 0; text-align: center; }
.painting-fig img { max-width: 100%; border: var(--line); }
.painting-fig figcaption { font-size: 11.5px; color: var(--ink-soft); margin-top: 6px; letter-spacing: 0.05em; line-height: 1.7; }
.painting-fig .ph-name { color: var(--ink); font-size: 12.5px; }
.painting-fig.fig-text {
  border: 1px solid var(--ink-faint);
  border-radius: var(--radius);
  background: rgba(255, 252, 244, .5);
  padding: 10px 12px;
  text-align: left;
}

.link-plain {
  color: var(--dai);
  text-decoration: underline;
  text-decoration-color: rgba(70, 91, 107, .4);
  text-underline-offset: 3px;
  word-break: break-all;
}

/* ============================================================
   通用动效 · 水墨晕染过场
   ============================================================ */

@keyframes inkVeil {
  0%   { clip-path: circle(0% at 50% 45%); }
  45%  { clip-path: circle(75% at 50% 45%); }
  100% { clip-path: circle(75% at 50% 45%); opacity: 0; }
}

/* v190：提示 toast 全部正文字体（齐伋体子集缺字事故，用户令：所有提示文字换正常字体），允许折行 */
/* v191：位置 底部96px→画面正中（用户令：在底下用户看不清） */
.toast {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 150;
  background: var(--ink);
  color: var(--bg-silk);
  font-family: var(--font-serif);
  font-size: 14px;
  letter-spacing: .02em;
  line-height: 1.55;
  padding: 8px 20px;
  border-radius: 2px;
  animation: toastIn 1.8s ease both;
  pointer-events: none;
  white-space: normal;
  max-width: 84vw;
  text-align: center;
}

@keyframes toastIn {
  0% { opacity: 0; transform: translate(-50%, calc(-50% + 6px)); }
  12% { opacity: 1; transform: translate(-50%, -50%); }
  85% { opacity: 1; transform: translate(-50%, -50%); }
  100% { opacity: 0; transform: translate(-50%, -50%); }
}

.fade-up { animation: fadeUp .5s ease both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 小屏适配 */
@media (max-width: 360px) {
  .title-xl { font-size: 28px; }
  .item-thumb { width: 64px; height: 64px; }
}

/* 自由取景面板（v81）：底图+可拖取景框，无隐藏上限 */
.segfit-panel {
  position: absolute;
  bottom: 50px; left: 8px; right: 8px;
  height: 36vh;
  z-index: 56;
  background: rgba(61, 58, 52, .94);
  border-radius: 6px;
  padding: 6px;
  display: flex;
  flex-direction: column;
}
.segfit-thumb {
  flex: 1;
  position: relative;
  background-repeat: no-repeat;
  background-color: #2a2018;
  border-radius: 4px;
  overflow: hidden;
  touch-action: none;
}
.segfit-rect {
  position: absolute;
  border: 2px solid #F0E4C0;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, .45);
  cursor: move;
}
.segfit-corner {
  position: absolute;
  right: -7px; bottom: -7px;
  width: 14px; height: 14px;
  background: #F0E4C0;
  border-radius: 3px;
  cursor: nwse-resize;
}
.segfit-tip {
  flex: none;
  color: rgba(240, 231, 211, .75);
  font-size: 10.5px;
  text-align: center;
  padding: 4px 0 1px;
  letter-spacing: .04em;
}

/* v90 取景面板收起：点击街面收起看全貌 */
.segfit-panel.folded { display: none; }
.segfit-fold {
  position: absolute;
  bottom: 54px; left: 50%;
  transform: translateX(-50%);
  z-index: 57;
  background: rgba(61, 58, 52, .93);
  color: #F0E7D3;
  border: 1px solid rgba(240, 228, 192, .4);
  border-radius: 16px;
  font-size: 12px;
  letter-spacing: .06em;
  padding: 7px 16px;
  cursor: pointer;
}

/* ============ 封面 v3（用户供五图：底图+三店叠层+兑银子去 依次淡入）============ */
.cover3 { position: relative; width: 100%; height: 100%; overflow: hidden; background: #241A10; }
.cover3-layer {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center;      /* 五图同源 1080×1920，cover 裁切对齐不跑 */
  opacity: 0; transition: opacity .6s ease;
  user-select: none; -webkit-user-select: none; pointer-events: none;
}
.cover3-layer.on { opacity: 1; }
.cover3-go.on { pointer-events: auto; cursor: pointer; animation: goBreath 1.8s ease-in-out .7s infinite; }   /* v181：忽大忽小呼吸感（用户令） */
@keyframes goBreath {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.05); }
}
.cover3-go { transform-origin: 74% 63%; }   /* 按钮在新版 1080×1920 图中的中心位置，绕它缩放不跑位 */

/* ============ 封面 v2（米白纸底 · 五框浮现 · 戥子兑换）—— v180 起 dormant，DOM 已撤（git 历史可找回）============ */
.cover2 { position: relative; width: 100%; height: 100%; overflow: hidden; }
.cover2-bg {                                   /* 背景占位：驼米帘纹纸（生成图到位后替换） */
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--bg-silk);
  background-image: var(--paper-screen), var(--paper-grain);
}
.cover2-framecol {                             /* 左列：五个店铺小框 */
  position: absolute; top: 4.5%; left: 4.5%; width: 44%; bottom: 4.5%;
  display: flex; flex-direction: column;
  justify-content: space-between;
}
.cover2-frame {
  position: relative;
  width: 100%;
  flex: 1;
  margin: 0 0 4.5% 0;
  border: 1.5px solid rgba(107, 79, 50, .55);
  border-top: 3px solid rgba(107, 79, 50, .55);
  background: rgba(233, 222, 198, .35);
  overflow: hidden;
  opacity: 0;
}
.cover2-frame:last-child { margin-bottom: 0; }
.cover2-frame .cf-ink, .cover2-frame .cf-color {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover;
}
.cover2-frame .cf-ink   { filter: grayscale(1) brightness(.96); opacity: 0; }
.cover2-frame .cf-color { opacity: 0; }
/* 从上到下逐个浮现：墨线先落（0.5s 淡入），淡彩后至（0.9s），依次错开 0.8s */
.cover2-frame.cf-on .cf-ink   { animation: cfIn .5s ease-out both; }
.cover2-frame.cf-on .cf-color { animation: cfIn .9s ease .55s both; }
@keyframes cfIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .cover2-frame.cf-on .cf-ink, .cover2-frame.cf-on .cf-color { animation-duration: .01s; animation-delay: 0s; }
}
.cover2-right {                                /* 右列：题签+兑换+入口 */
  position: absolute; top: 4.5%; right: 4.5%; bottom: 4.5%; width: 42%;
  display: flex; flex-direction: column; align-items: center;
}
.cover2-title {
  writing-mode: vertical-rl;
  font-family: var(--font-display);
  font-size: 34px; font-weight: 600;
  letter-spacing: .22em; color: var(--ink);
  flex: none;
}
.cover2-title::after {                          /* 题签底签 */
  content: "";
}
.cover2-sub {
  writing-mode: vertical-rl;
  font-size: 13px; color: var(--ink-soft);
  letter-spacing: .3em; margin: 14px 0 0 6px;
  flex: none;
}
.cover2-deng { margin-top: auto; width: 88%; text-align: center; }
.cover2-deng svg { width: 100%; height: auto; }
.cover2-deng .deng-coin { animation: dengCoin 3.2s ease-in-out infinite; }
.cover2-deng .deng-silver { opacity: 0; animation: dengSilver 3.2s ease-in-out infinite; }
@keyframes dengCoin   { 0%, 15% { transform: translateY(-16px); opacity: 0; } 30%, 60% { transform: none; opacity: 1; } 78%, 100% { transform: none; opacity: 1; } }
@keyframes dengSilver { 0%, 55% { opacity: 0; } 72%, 88% { opacity: 1; } 100% { opacity: 0; } }
.cover2-deng-note { font-size: 11px; color: var(--ink-soft); letter-spacing: .12em; margin-top: 4px; }
.cover2-right .cover-start { margin-top: 12px; }
.cover2-foot { color: var(--ink-soft); margin-top: 8px; }

/* ============ 钱铺 v5（江南百景图式面板：深木框+纸面+牌匾，上下居中）============ */
.qp-bg {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background-size: cover; background-position: 50% 34%;
  z-index: 0;
}
.qp-wrap {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 1;
  display: flex; align-items: flex-end; justify-content: center;
  /* v114 沉底面板（用户参考图布局）：上气泡+中间留景+底部面板，牌匾遮挡问题随之消解 */
  padding: 0 8px 14px; box-sizing: border-box;
  overflow: hidden;   /* v116：进场动画 from 态曾撑出临时滚动条（用户：不要滚动条） */
}
#intro-body { padding: 0; }
#shop-body { padding: 0; }
#house-body { padding: 0; }   /* v142：家业铺底全屏 */   /* v140：当铺铺底全屏（view-scroll 自带 padding 曾把背景框起来）*/                     /* 钱铺全屏模式：去掉滚动容器自带内边距 */
.qp-panel {
  position: relative; width: 100%; max-width: 345px;
  background: rgba(240, 231, 211, .96);
  border: 3px solid #5B4632; border-radius: 5px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .4), inset 0 0 0 1.5px rgba(240, 231, 211, .9), inset 0 0 0 3px rgba(91, 70, 50, .55);
  padding: 30px 18px 16px;
}
.qp-plaque {                                    /* 悬挂牌匾题签 */
  position: absolute; top: -21px; left: 50%; transform: translateX(-50%);
  background: #5B4632; color: #F0E7D3;
  padding: 7px 22px 6px;
  font-size: 19px; letter-spacing: .3em; font-weight: 600;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(240, 231, 211, .35), 0 3px 8px rgba(0, 0, 0, .3);
  white-space: nowrap;
}
.qp-corner { position: absolute; width: 14px; height: 14px; border: 2px solid rgba(91, 70, 50, .7); }
.qp-corner.tl { top: 6px; left: 6px; border-right: none; border-bottom: none; }
.qp-corner.tr { top: 6px; right: 6px; border-left: none; border-bottom: none; }
.qp-corner.bl { bottom: 6px; left: 6px; border-right: none; border-top: none; }
.qp-corner.br { bottom: 6px; right: 6px; border-left: none; border-top: none; }
.qp-cal { display: flex; align-items: baseline; justify-content: center; gap: 8px; letter-spacing: .12em; }
/* v116：历书卡↔输入行间距缩短（用户指定位置——勿再动其他间距） */
.qp-panel .hr-ink { margin: 4px 0 6px; }
.qp-cal-main { font-size: 15px; font-weight: 600; color: var(--ink); }
.qp-cal-jie {
  font-size: 12.5px; color: #A6473F;
  border: 1px solid rgba(166, 71, 63, .45);
  padding: 2px 8px; letter-spacing: .3em; margin-left: .3em;
}
.qp-input-row { display: flex; align-items: baseline; gap: 8px; justify-content: center; margin-top: 2px; }
.qp-lab { color: var(--ink-soft); font-size: 13.5px; letter-spacing: .1em;
  white-space: nowrap; flex: none; }          /* v114：4字标签永不折行 */
.qp-input-row .input-salary { flex: 0 1 104px; min-width: 84px; }   /* 数字横线缩短让位标签 */
.qp-quick { display: flex; gap: 8px; justify-content: center; margin-top: 10px; }
.qp-res { text-align: center; }
/* ============ v139 当铺：柜房内景铺底＋掌柜气泡＋底部面板（钱铺同构） ============ */
.pawnv { position: relative; height: 100%; }
.pawn-bg {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background-size: cover; background-position: 50% 30%;
  z-index: 0;
}
.pawnv .qp-wrap { padding: 0 8px 14px; }   /* 复用钱铺容器，贴底 */
.pawn-rules {
  position: relative;
  border: 1px dashed rgba(107, 79, 50, .35);
  border-radius: 4px;
  padding: 11px 38px 11px 13px;   /* v141：放宽（曾挤成一团） */
  margin: 0 0 4px;
}
.pawn-rule { font-size: 14.5px; color: var(--ink); line-height: 2.1; letter-spacing: .05em; }   /* v141：字号+行距双升 */
.pawn-rule b { font-size: 17.5px; color: #A6473F; font-weight: 700; }   /* v140：绛红+放大——齐伋体(num)视觉偏小,用必放大一档 */
.pawn-rule-sub { display: block; font-size: 10.5px; color: var(--ink-soft); letter-spacing: .06em; }
.pawn-rule-seal { position: absolute; right: 7px; top: 50%; margin-top: -17px; width: 30px; height: 30px; font-size: 14px; }
.pawn-sec-t {
  font-size: 16.5px; font-weight: 700; letter-spacing: .2em;   /* v141：分区标题加大（用户令） */
  color: #5B4632; margin: 10px 0 7px;
  display: flex; align-items: center; gap: 8px;
}
.pawn-sec-t::after { content: ""; flex: 1; border-top: 1px solid rgba(91, 70, 50, .35); }
/* v177 库房提示条：标题旁就地提示（用户令：不用齐伋体小字——正文衬线才看得清；5.2s 自动隐） */
.storage-tip {
  flex: 0 1 auto; min-width: 0;   /* 自然宽度、长了换行；分隔线（::after flex:1）自动让位 */
  font-family: var(--font-serif); font-size: 11.5px; font-weight: 400;
  letter-spacing: .02em; line-height: 1.5; color: #A6473F;
  opacity: 0; transition: opacity .3s ease;
}
.storage-tip.on { opacity: 1; }
.pawn-scroll { max-height: 46vh; overflow-y: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-top: 2px; }
.pawn-scroll::-webkit-scrollbar { display: none; }
.pawn-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 2px; border-bottom: 1px dashed rgba(107, 79, 50, .25);
}
.pawn-row .item-thumb { width: 44px; height: 44px; flex: none; }
.pawn-row-main { flex: 1; min-width: 0; }
.pawn-row-name { font-size: 14px; color: var(--ink); }
.pawn-row-name .num { font-style: normal; font-size: 11.5px; color: var(--ink-soft); margin-left: 3px; }
.pawn-row-note { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.pawn-row-note b { font-size: 13px; }
.pawn-act { font-size: 15px; padding: 7px 16px; letter-spacing: .1em; flex: none; }
.pawn-empty { text-align: center; padding: 18px 4px 12px; color: var(--ink-soft); font-size: 13px; letter-spacing: .08em; line-height: 1.8; }

/* v142 家业：槽位浮在上方场景区（约上 48%）＋底部面板（复用当铺容器） */
/* v143 修点击穿透：wrap 全屏层曾盖住槽位点击（家业页下层有交互首创）——
   wrap 穿透、面板自身恢复可点 */
.house-scene {
  position: absolute; inset: 0;   /* v172：全幅——槽位改画面相对px定位（house.js layoutSlots），不再按容器% */
  z-index: 1;
}

/* v172 槽位定标编辑器（?edit=slots） */
.house-slot.editing { outline: 1.5px dashed #C0392B; outline-offset: 2px; cursor: grab; touch-action: none; z-index: 60; }
.house-slot.editing:active { cursor: grabbing; }
/* v173：缩放手柄（右下角小方块，横向拖动调大小） */
.slot-size-handle {
  position: absolute; right: -8px; bottom: -8px; width: 16px; height: 16px;
  background: #C0392B; border: 2px solid #F0E7D3; border-radius: 3px;
  cursor: nwse-resize; touch-action: none; z-index: 61;
}
.slot-edit-bar {
  position: absolute; top: 6px; left: 8px; right: 8px; z-index: 70;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: rgba(240, 231, 211, .96); border: 1.5px solid #5B4632; border-radius: 4px;
  padding: 6px 10px; font-size: 12px; color: #3D3A34;
}
.slot-edit-bar button {
  flex: none; font-size: 12px; padding: 4px 10px; border: 1.5px solid #5B4632;
  background: #5B4632; color: #F0E7D3; border-radius: 3px;
}
.slot-edit-out {
  position: absolute; bottom: 12px; left: 8px; right: 8px; z-index: 70; margin: 0;
  background: rgba(30, 24, 16, .88); color: #E8DCC0;
  font: 10.5px/1.5 monospace; padding: 8px 10px; border-radius: 4px;
  white-space: pre-wrap; pointer-events: none;
}
#house-body .qp-wrap { pointer-events: none; }
#house-body .qp-panel { pointer-events: auto; }
.housev-hint { position: absolute; top: 5px; left: 50%; transform: translateX(-50%); z-index: 2; }
.house-elegant {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 2px 4px 4px;
}
.house-elegant b { font-size: 18px; color: #5B4632; }
.house-elegant .num { font-size: 15px; color: #A6473F; }

/* v145 乔迁卡：红契意象（米纸+骑缝朱印） */
.estate-card {
  position: relative;
  background: rgba(240, 231, 211, .97);
  border: 2px solid #5B4632; border-radius: 5px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .4);
  padding: 26px 20px 20px;
  margin: 10px 6px 4px;
}
.estate-seal {
  position: absolute; top: 10px; right: 12px;
  width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid rgba(166, 71, 63, .8);
  color: #A6473F; font-family: var(--font-display);
  font-size: 17px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transform: rotate(-10deg);
}
.estate-head {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 700; letter-spacing: .12em;
  color: #5B4632;
}
.estate-body {
  margin-top: 10px; font-size: 14px; line-height: 1.9;
  color: var(--ink-soft); letter-spacing: .04em;
}

/* v146 家业进场引导：点击布置院落（纸签，点后收起并放行面板） */
.house-tip {
  position: absolute; left: 50%; top: 48%;   /* v148：下移（用户），落在院落区上方 */
  transform: translate(-50%, -50%);
  z-index: 3;
  background: rgba(240, 231, 211, .97);
  border: 2px solid #5B4632; border-radius: 5px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .4);
  padding: 14px 26px;
  font-family: var(--font-serif);   /* v147：齐伋体古形看不清（用户），提示语用衬线 */
  font-size: 15px; letter-spacing: .2em; color: #5B4632;   /* v148：衬线常规字显大——降一档（齐伋体放大/衬线缩小，双向补偿规则） */
  cursor: pointer;
  transition: opacity .35s ease, transform .35s ease;
}
.house-tip.gone { opacity: 0; transform: translate(-50%, -60%); pointer-events: none; }

/* v157 切换宅子横排 */
.house-switch-row { display: flex; gap: 8px; padding: 2px 0 6px; }
.house-chip { font-size: 14px; letter-spacing: .1em; }

/* v158 家产图鉴：紧凑两列分类卡 */
.atlas-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 0; }
.atlas-cat { background: rgba(255, 252, 242, .5); border-radius: 4px; padding: 8px 8px 6px; }
.atlas-cat-t { font-size: 13px; font-weight: 600; letter-spacing: .18em; color: #5B4632; margin-bottom: 6px; }
.atlas-thumbs { display: flex; flex-wrap: wrap; gap: 5px; }
.atlas-thumb { width: 40px; height: 40px; border-radius: 3px; overflow: hidden; }
.atlas-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rank-compact {
  display: flex; align-items: baseline; justify-content: center; gap: 8px;
  padding: 6px 0 2px;
}
.rank-compact b { font-size: 22px; color: #A6473F; }

/* v147 已布置物横排（点图撤回/换物） */
.placed-row { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 2px; scrollbar-width: none; }
.placed-row::-webkit-scrollbar { display: none; }

/* v117 账目卡（回访态）：标签左/值右基线对齐，现存行加强 */
.qp-acc { display: flex; flex-direction: column; gap: 7px; padding: 4px 2px 2px; }
.qp-acc-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  min-width: 0;            /* v120：防超宽值把面板 min-content 撑爆（flex 居中溢出曾左移出屏） */
}
@media (max-width: 360px) {
  .qp-acc-val { font-size: 14.5px; }
  .qp-acc-row.main .qp-acc-val { font-size: 17px; }
  .qp-acc-val .num { font-size: 11px; }
}
.qp-acc-lab { color: var(--ink-soft); font-size: 14px; letter-spacing: .12em; flex: none; white-space: nowrap; }
.qp-acc-val { font-size: 16px; color: var(--ink); letter-spacing: .04em; text-align: right; white-space: nowrap; }   /* v118 规则：单行能放下绝不折行 */
.qp-acc-val .num { font-style: normal; font-size: 12.5px; color: var(--ink-soft); margin-left: 7px; }
.qp-acc-row.main .qp-acc-val { font-size: 19px; }
.qp-acc-row.main .qp-acc-lab { color: var(--ink); }

/* v114 结果一行化（用户）：银锭+八两+8.00两 同行，八两缩号 */
.qp-res-main { display: flex; align-items: baseline; justify-content: center; gap: 10px; }
.qp-res-main .qp-ingot { width: 36px; height: auto; align-self: center; margin: 0; display: block; }
.qp-res .qz-silver-cn { font-size: 22px; }
.qp-res-line { color: var(--ink-soft); font-size: 12px; letter-spacing: .08em; margin-top: 6px; }
.qp-empty {
  text-align: center; padding: 22px 0; color: var(--ink-soft);
  letter-spacing: .2em; font-size: 13px;
  border: 1px dashed rgba(107, 79, 50, .35); margin-top: 4px;
}
.qp-actions { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }
/* 逐层浮现（面板先入，内部错位） */
.qp-in { opacity: 1; animation: qpIn .5s ease both; }
/* v114 分镜（用户定版）：0-1s 赏图 → 1s 气泡问话 → 2.6s 底部面板滑入 → 内部错峰 */
.qp-panel { animation: qpUp .6s ease 3.7s both; }
.qp-wrap .d1 { animation-delay: 4.05s; }
.qp-wrap .d2, .qp-wrap .d2b { animation-delay: 4.3s; }
.qp-wrap .d3 { animation-delay: 4.6s; }
.qp-wrap .d4 { animation-delay: 4.8s; }
@keyframes qpIn { from { opacity: 0; transform: translateY(10px); } }
@keyframes qpUp { from { opacity: 0; transform: translateY(38px); } }

/* 账房先生问话气泡：样式与面板完全同语言（用户 v115：无尾巴），停驻加长 3.6s 才淡出 */
.qp-bubble {
  position: absolute; left: 11%; top: 35%; z-index: 2;   /* v122：32%曾与背景牌匾带(205-258)交叠6px */
  max-width: 78%;
  background: rgba(240, 231, 211, .96);
  border: 3px solid #5B4632; border-radius: 5px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .4), inset 0 0 0 1.5px rgba(240, 231, 211, .9), inset 0 0 0 3px rgba(91, 70, 50, .55);
  padding: 12px 18px;
  font-family: var(--font-display);
  font-size: 21px; letter-spacing: .12em; line-height: 1.6; color: var(--ink);
  white-space: pre-line;   /* v122：气口分行由 \n 控制，逐字打字机 */
  animation: bubbleIn .4s ease 1s both, bubbleOut .45s ease 3.7s both;
}
@keyframes bubbleIn { from { opacity: 0; transform: translateY(8px); } }
@keyframes bubbleOut { to { opacity: 0; transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .qp-in { animation-duration: .01s; animation-delay: 0s; } }

/* v104：牌匾/历书用齐伋体 · 按钮加大 · 钱袋动画 · 顶栏钱袋 */
.qp-plaque, .qp-cal-main, .qp-cal-year { font-family: var(--font-display); }
.qp-cal-year { font-size: 13px; letter-spacing: .1em; color: #A6473F; border: 1px solid rgba(166,71,63,.45); padding: 2px 8px; }
.qp-actions .btn { font-size: 20px; padding: 11px 24px; letter-spacing: .18em; }
.qp-actions .qp-btn-sub { font-size: 15px; padding: 9px 18px; letter-spacing: .12em; }   /* v118：次按钮适中 15px（用户：字号说了一百遍） */

/* v118：钱袋脉动——重开/兑银入城后右上角钱袋抖两下，告知 purse 已刷新 */
.wallet-bag.pulse { animation: bagPulse .62s ease-in-out 3; }   /* v119：更明显——1.5倍/±10°/三连抖 */
@keyframes bagPulse {
  0% { transform: scale(1) rotate(0deg); }
  28% { transform: scale(1.52) rotate(-10deg); }
  58% { transform: scale(1.16) rotate(7deg); }
  100% { transform: scale(1) rotate(0deg); }
}
.amount.flash { color: #A6473F; transition: color .15s ease; }   /* 银数滚动中染绛 */
.wallet-bag { width: 26px; height: 28px; margin-right: 2px; align-self: center; }   /* v166 加大（用户令） */

/* ============ v164 分享页二次调整（用户参考图布局）：面板上移至中上部 + 按钮外置 ============ */
#report-body { padding: 0; }   /* 底图全屏：去滚动容器内边距（同 #intro-body） */
.rp-bg {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background-size: cover; background-position: 50% 22%;
  background-color: #2A2018;
  z-index: 0;
}
/* 面板：顶约 14% 起、高度随内容自然生长（v165 用户令：不限高、不要滚动条、
   家产全部展示——wrap 为整页滑动层，底图与按钮固定不动） */
.rp-wrap {
  display: block; padding: 14vh 0 96px;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.rp-wrap::-webkit-scrollbar { display: none; }
.rp-panel { width: calc(100% - 16px); max-width: 345px; margin: 0 auto; }
.rp-acc { padding-top: 2px; }
/* 档位名绛红凸显（用户：'豪富'四字要显眼） */
.rp-rank-name { color: #A6473F !important; font-weight: 700; font-size: 21px; letter-spacing: .12em; font-family: var(--font-display); }   /* v176：齐伋体（用户令） */
.rp-rank-desc {
  font-size: 12px; color: var(--ink-soft); letter-spacing: .08em;
  text-align: right; margin: -3px 0 3px; line-height: 1.6;
}
.rp-sec-t {
  font-size: 13px; color: var(--ink-soft); letter-spacing: .1em;
  margin: 8px 0 2px; text-align: center;
}
.rp-ladder { margin: 0 0 2px; }
.rp-ladder .ladder-row { padding: 2px 0; }
.rp-ladder .ladder-val { width: 72px; }
/* 阶梯条加浓（纸底上原色太寡淡） */
.rp-ladder .ladder-bar-wrap { height: 6px; background: rgba(61, 58, 52, .12); }
.rp-ladder .ladder-bar { opacity: .75; }
.rp-gallery-t {
  font-size: 13px; color: var(--ink-soft); letter-spacing: .1em;
  margin: 2px 0 10px; text-align: center;
}
/* 家产图鉴：全部展示，4 列网格、图标 56px + 名签压图底边（商品列表 .cell-name 同款缩小版） */
.rp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 6px; padding: 2px; }
.rp-cell { min-width: 0; padding-bottom: 9px; }   /* 给名签压图出界留位 */
.rp-thumb-wrap { position: relative; width: 56px; margin: 0 auto; }
.rp-thumb-wrap .item-thumb { width: 56px; height: 56px; flex: none; }
/* v189：宅/田大图规则撤除（用户令：图鉴图标全部统一小尺寸，与米粮铺商品一样） */
/* v173：购买力评级字=汇文明朝体刻本匾风 PNG（rank-{idx}.png） */
.rp-rank-img { display: none; }   /* v176：方案已撤（评级字改齐伋体文本），规则留空防旧缓存引用 */
.rp-tag {
  position: absolute; bottom: 0; left: 50%;
  transform: translate(-50%, 50%);
  background: rgba(240, 231, 211, .97); color: #3D3A34;
  border: 1px solid #5B4632; border-radius: 3px;
  font-size: 9.5px; font-weight: 600; letter-spacing: .02em;
  padding: 0 5px; white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}
.rp-empty { text-align: center; color: var(--ink-soft); font-size: 12.5px; letter-spacing: .08em; padding: 10px 0 6px; }
/* 三按钮外置：浮在底图上、面板之下；点保存后淡出隐藏（点画面唤回） */
.rp-actions {
  position: absolute; left: 0; right: 0; z-index: 3;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  display: flex; gap: 10px; justify-content: center;
  transition: opacity .3s ease;
}
.rp-actions.rp-hide { opacity: 0; pointer-events: none; }
.rp-btn {
  font-size: 14px; padding: 10px 16px; letter-spacing: .12em; min-height: 44px;
  background: rgba(46, 36, 24, .72);
  border: 1.5px solid rgba(240, 231, 211, .85);
  color: #F0E7D3; border-radius: 5px;
}
.rp-btn-main { background: #F0E7D3; color: #3D3A34; border-color: #F0E7D3; font-weight: 600; }


/* 兑银钱袋动画（无 rAF：CSS 关键帧链） */
.qp-anim-mask {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  z-index: 300;
  background: rgba(46, 36, 24, .58);
  display: flex; align-items: center; justify-content: center;
}
.qp-bag-scene { position: relative; width: 150px; height: 165px; animation: bagFly .55s ease-in 1.35s both; }
.qp-bag { position: absolute; left: 15px; top: 30px; width: 120px; height: 130px;
  animation: bagSquash .28s ease .95s, bagIn .4s ease-out .1s both; }
.qp-bag-mouth { position: absolute; left: 55px; top: 26px; width: 40px; height: 14px;
  background: #6B4F32; border-radius: 8px; opacity: 0;
  animation: mouthCinch .3s ease .9s both; }
.qp-ingot-fly { position: absolute; width: 46px; opacity: 0; }
.qp-ingot-fly.i1 { left: 8px;  top: 44px; --tx: 48px; --ty: 20px; }
.qp-ingot-fly.i2 { left: 96px; top: 34px; --tx: -46px; --ty: 30px; }
.qp-ingot-fly.i3 { left: 50px; top: 0px;  --tx: 2px;   --ty: 52px; }
.qp-ingot-fly { animation: ingotShow .3s ease both, ingotDrop .45s ease-in .45s both; }
.qp-ingot-fly.i1 { animation-delay: .05s, .5s; }
.qp-ingot-fly.i2 { animation-delay: .15s, .6s; }
.qp-ingot-fly.i3 { animation-delay: .25s, .7s; }
@keyframes ingotShow { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
@keyframes ingotDrop { to { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(.35); } }
@keyframes bagIn { from { opacity: 0; transform: translateY(26px) scale(.8); } to { opacity: 1; transform: none; } }
@keyframes bagSquash { 0% { transform: none; } 45% { transform: scale(1.09, .93); } 100% { transform: none; } }
@keyframes mouthCinch { 0% { opacity: 1; transform: scaleX(1.15); } 70% { opacity: 1; transform: scaleX(.42); } 100% { opacity: 0; transform: scaleX(.28); } }
@keyframes bagFly { to { transform: translate(38vw, -36vh) scale(.16); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .qp-bag-scene, .qp-bag, .qp-ingot-fly, .qp-bag-mouth { animation-duration: .01s; animation-delay: 0s; } }

/* ============ v107 店内浮层改版：街市之上弹窗 + 手绘线稿组件 ============ */
#view-street { position: relative; }   /* 浮层挂载基准（作用域限定，勿全局） */
.shop-layer {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; justify-content: center; align-items: flex-start;
  opacity: 0; transition: opacity .22s ease;
}
.shop-layer.on { opacity: 1; }
.shop-layer.closing { opacity: 0; transition: opacity .26s ease; }
.shop-layer-scrim {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(30, 20, 12, .48);
}
.shop-layer .shopv-panel { transform: translateY(10px); transition: transform .26s ease; }
.shop-layer.on .shopv-panel { transform: translateY(0); }
.shopv-back {
  position: absolute; top: 12px; left: 12px; z-index: 3;
  background: rgba(240, 231, 211, .92);
}
.shopv-panel {
  position: relative; z-index: 2;
  width: calc(100% - 28px); max-width: 352px;
  max-height: calc(100% - 64px);
  margin-top: 50px;   /* 给返回按钮(底边43px)留位——v106几何检查曾交叠70x11px */
  display: flex; flex-direction: column;
  background: rgba(240, 231, 211, .96);
  border-radius: 5px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .42);
  padding: 24px 12px 9px;
  /* v107：直边框/双环删除——边线由 sketch.js 手绘框接管 */
}
.shopv-plaque {
  position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
  background: #5B4632; color: #F0E7D3;
  padding: 5px 18px 4px;
  font-family: var(--font-display);
  font-size: 17px; letter-spacing: .3em; font-weight: 600; border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(240, 231, 211, .35), 0 3px 8px rgba(0, 0, 0, .3);
  white-space: nowrap;
}
.shopv-sub {
  text-align: center; color: var(--ink-soft);
  font-size: 11.5px; letter-spacing: .22em;
  padding-bottom: 7px; margin-bottom: 8px;
  border-bottom: 1px solid rgba(91, 70, 50, .4);
  flex: none;
}
.shopv-grid {
  flex: 1; min-height: 0;
  overflow-y: auto; overflow-x: hidden;   /* v127：y设auto时x计算值变auto——两列布局不该有横向滚动 */
  display: grid; grid-template-columns: 1fr 1fr; gap: 9px;
  align-content: start;
  padding: 2px 2px 4px;
  scrollbar-width: none;                  /* v127 方案A：藏原生滚动条（古风=不见铁条），滚轮/触摸照滚 */
}
.shopv-grid::-webkit-scrollbar { display: none; }
.shopv-foot {
  flex: none; text-align: center; padding: 7px 0 3px;
  border-top: 1px solid rgba(91, 70, 50, .35); margin-top: 6px;
}

/* 宫格（v107：去直边框改手绘框；名行+考据右置；价格两行对齐；买下加大加深） */
.item-cell {
  display: flex; flex-direction: column;
  background: transparent;   /* v155：底色删（改透明后格子色块边缘=可见线） */
  border-radius: 4px;
  padding: 9px 9px 9px;
}
/* v126 用户定版：图放大占满格宽；名条压图底边；考据圆章盖右上 */
.cell-thumb { position: relative; }
.cell-thumb .item-thumb { width: 100%; height: 150px; border-radius: 3px 3px 0 0; }
.cell-thumb .item-thumb img { object-fit: contain; }   /* 透明底版画 contain 展示 */
.cell-seal {                        /* v127 考据=朱文线章：细线框+绛红"按"字，底透明（原实心红太抢）；
                                       "按"=古籍考订按语传统（编者按），比"考"更贴 */
  position: absolute; top: 7px; right: 7px;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(62, 44, 27, .25);
  color: #C4665C;
  border: 1.5px solid rgba(196, 102, 92, .85);
  font-family: var(--font-display);
  font-size: 16px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  transform: rotate(8deg);
  padding: 0; cursor: pointer;
}
.cell-name {                        /* v127 名条：米白底+深框深字（深木底曾与深褐图叠看不清） */
  position: absolute; bottom: 0; left: 50%;
  transform: translate(-50%, 45%);
  background: rgba(240, 231, 211, .97); color: #3D3A34;
  border: 1.5px solid #5B4632;
  font-size: 13px; font-weight: 600; letter-spacing: .1em;
  padding: 2px 12px; border-radius: 3px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}
.cell-note {
  margin-top: 20px;                 /* v128：离图（名条）远一点，不拥挤 */
  font-size: 11.5px; line-height: 1.6; color: var(--ink-soft); text-align: center;
}
.cell-note span { display: block; }   /* v126：前半句/后半句各一行 */
.item-cell .sketch-svg { display: none; }   /* v127：退出手绘框（外溢撑横滚），保留 CSS 细边 */
.cell-foot { margin-top: auto; padding-top: 7px; }  /* v128：描述贴近价格，仅格底富余才撑开 */
.cell-price {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 5px 0 7px;
  margin-bottom: 8px;
  /* v155：底部虚线删（用户报'有两根线'） */
}
.price-line { display: flex; align-items: baseline; gap: 4px; }
.price-line .num { font-size: 17px; font-weight: 700; }
.price-line .unit { font-size: 11px; }
.price-modern { font-size: 11px; color: var(--ink-soft); letter-spacing: .06em; }
.cell-buy {
  width: 100%;
  font-size: 16px; font-weight: 700; letter-spacing: .3em; text-indent: .3em;
  padding: 10px 0;
  background: #4E3826;                              /* v107 加深：原墨褐在纸底上陷没 */
  border: none; border-radius: 4px;
  color: #F5EDD8;
}
.cell-buy:disabled {
  background: rgba(107, 79, 50, .18); color: rgba(61, 58, 52, .55);
}
/* v178 打工入口并入灰按钮（用户批方案A）：浅底两行字，左右格按钮等高不错行 */
.cell-buy-job {
  background: rgba(107, 79, 50, .18); color: rgba(61, 58, 52, .62);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 7px 0 8px;
}
.cell-buy-job span:first-child { font-size: 15px; font-weight: 700; letter-spacing: .22em; text-indent: .22em; }
.cell-buy-sub { font-size: 11px; font-weight: 400; letter-spacing: .04em; color: var(--dai); }
.cell-buy-job:active { opacity: .7; }
.job-used .item-name { color: var(--ink-soft); }

/* v178 招工榜重排（用户令：原版太简、字小）——缺口大字绛红、纸底工帖卡片、墨戳 */
.jobboard-sub { text-align: center; font-size: 14px; letter-spacing: .06em; color: var(--ink-soft); margin: 4px 0 10px; }
.job-gap { font-size: 24px; font-weight: 700; color: var(--jiang); padding: 0 2px; }
.job-card {
  position: relative; margin: 10px 0; padding: 13px 14px 12px;
  border: 1px solid rgba(91, 70, 50, .38); border-radius: 6px;
  background: rgba(245, 237, 216, .55);
  box-shadow: 0 1px 3px rgba(61, 50, 32, .1);
}
.job-card-head { display: flex; justify-content: space-between; align-items: baseline; }
.job-name { font-family: var(--font-display); font-size: 20px; font-weight: 600; letter-spacing: .12em; color: var(--ink); }
.job-daily { font-size: 14px; color: var(--ink-soft); letter-spacing: .04em; }   /* v179：用户令字号加大（原12px看不清） */
.job-dur { margin: 6px 0 11px; font-size: 15px; letter-spacing: .05em; color: var(--ink-soft); }
.job-dur b { font-size: 18px; font-weight: 700; color: var(--jiang); padding: 0 2px; }
.job-btn { width: 100%; min-height: 44px; font-size: 16px; font-weight: 700; letter-spacing: .34em; text-indent: .34em; }
.job-card-used { opacity: .55; }
.job-card-used .job-btn { background: transparent; color: var(--ink-soft); border: 1px solid var(--ink-faint); }
.job-stamp {
  position: absolute; top: 10px; right: 12px;
  padding: 2px 7px; transform: rotate(-12deg);
  border: 1.5px solid var(--jiang); border-radius: 3px;
  font-size: 13px; font-weight: 700; letter-spacing: .18em; text-indent: .18em; color: var(--jiang);
  background: rgba(245, 237, 216, .6);
}
.jobboard-src { margin-top: 12px; text-align: center; font-size: 11px; letter-spacing: .05em; color: var(--ink-soft); opacity: .8; }

/* 提盒（右下角浮标 + 已购清单面板；边线由手绘框接管） */
.shopv-basket {
  position: absolute; right: 12px; bottom: 14px; z-index: 4;
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(62, 44, 27, .85);
  border: 2px solid rgba(240, 228, 192, .78);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .45);
  display: flex; align-items: center; justify-content: center;
  padding: 0;
}
.basket-svg { width: 33px; height: 33px; display: block; }
.shopv-basket.pop { animation: basketPop .5s ease; }   /* v127：飞达后放大亮一下 */
@keyframes basketPop {
  0% { transform: scale(1); }
  45% { transform: scale(1.38); box-shadow: 0 0 18px rgba(240, 228, 192, .75); }
  100% { transform: scale(1); }
}
.fly-thumb {                     /* v127：买下后商品图飞向提盒 */
  position: fixed; z-index: 400;
  border-radius: 4px;
  pointer-events: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .4);
  transition: transform .55s cubic-bezier(.5, -0.1, .8, .5), opacity .55s ease;
}
.basket-badge {
  position: absolute; top: -5px; right: -6px;
  min-width: 18px; height: 18px; border-radius: 9px;
  background: #A6473F; color: #F0E7D3;
  font-size: 11px; font-weight: 600; line-height: 18px;
  padding: 0 4px; box-sizing: border-box;
  border: 1px solid rgba(240, 231, 211, .6);
}
.basket-panel {
  position: absolute; right: 10px; bottom: 78px; z-index: 5;
  width: min(82%, 300px);
  background: rgba(240, 231, 211, .97);
  border-radius: 5px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .5);
  padding: 12px 12px 8px;
  display: none;
  /* v107：直边框删——手绘框接管 */
}
.basket-panel.on { display: block; }
.basket-title {
  font-family: var(--font-display);
  text-align: center; color: #5B4632;
  font-size: 15px; letter-spacing: .24em;
  border-bottom: 1px solid rgba(91, 70, 50, .4);
  padding-bottom: 6px; margin-bottom: 4px;
}
.basket-list { max-height: 42vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.basket-row {
  display: flex; gap: 9px; align-items: center;
  padding: 6px 0; border-bottom: 1px dashed rgba(107, 79, 50, .25);
}
.basket-row:last-child { border-bottom: none; }
.basket-row .item-thumb { width: 34px; height: 34px; }
.basket-main { flex: 1; min-width: 0; }
.basket-name { font-size: 13px; }
.basket-sum {
  text-align: center; padding: 8px 0 4px;
  color: #5B4632; font-size: 12px; letter-spacing: .15em;
}
.basket-empty {
  text-align: center; padding: 16px 4px 12px;
  color: var(--ink-soft); font-size: 12px; letter-spacing: .1em; line-height: 1.7;
}
