/* ============================================================
 * 9527 · 样式 —— 暗色玄学主题 / 移动端优先 / 桌面与微信自适应
 * ============================================================ */
:root {
  --bg: #14100c;
  --bg-2: #1c1610;
  --surface: #221a12;
  --surface-2: #2a2115;
  --border: #3d3020;
  --border-soft: #33291b;
  --gold: #d4af37;
  --gold-soft: #b8963a;
  --ink: #e8ddc9;
  --ink-dim: #a89880;
  --ink-faint: #7d6f5c;
  --red: #c0553f;
  --green: #5a9d6a;
  --query: #7fb8a8;            /* 用户提问专用强调色：静谧青玉，与圆金小标题明显区分、又同属页面冷调点缀 */
  --query-bg: rgba(127, 184, 168, 0.10);
  --radius: 14px;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  background-image: radial-gradient(circle at 20% 10%, rgba(212, 175, 55, 0.07), transparent 40%),
    radial-gradient(circle at 85% 90%, rgba(192, 85, 63, 0.05), transparent 45%);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
  padding-bottom: env(safe-area-inset-bottom);
}
button { font-family: inherit; }
.view { display: none; max-width: 720px; margin: 0 auto; padding: 16px 14px 60px; }
.view.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- 顶栏 ---------- */
#topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  background: rgba(20, 16, 12, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.tb-btn {
  width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--gold); font-size: 18px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.tb-btn:active { transform: scale(0.94); }
.tb-title { flex: 1; text-align: center; font-weight: 600; color: var(--ink); font-size: 15px; }
#progressWrap {
  position: sticky; top: 57px; z-index: 49;
  height: 22px; background: var(--bg-2);
  display: flex; align-items: center; justify-content: flex-end;
  padding-right: 8px;
}
#progressBar {
  position: absolute; left: 0; top: 0; height: 100%;
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.25), rgba(212, 175, 55, 0.5));
  width: 0; transition: width 0.35s ease;
}
#progressText { position: relative; font-size: 11px; color: var(--gold); }

/* ---------- 首页 ---------- */
.hero { text-align: center; padding: 34px 0 22px; }
.hero-symbol {
  width: 74px; height: 74px; margin: 0 auto 14px;
  border: 2px solid var(--gold); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; color: var(--gold);
  box-shadow: 0 0 34px rgba(212, 175, 55, 0.25), inset 0 0 18px rgba(212, 175, 55, 0.12);
  animation: spinSlow 24s linear infinite;
}
@keyframes spinSlow { to { transform: rotate(360deg); } }
.hero h1 { margin: 0; font-size: 38px; letter-spacing: 6px; color: var(--gold); font-weight: 800; }
/* slogan：金色描边字，两侧细线呼应，移动端自动缩放不换行 */
.hero-slogan {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 10px 0 0; font-size: 14px; letter-spacing: 3px;
  color: var(--gold-soft); font-weight: 600;
}
.hero-slogan::before, .hero-slogan::after {
  content: ''; width: 26px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-soft));
}
.hero-slogan::after { background: linear-gradient(90deg, var(--gold-soft), transparent); }
.hero-sub { color: var(--ink-dim); margin: 10px 0 0; font-size: 14px; }
.purpose-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.purpose {
  position: relative; text-align: left; cursor: pointer;
  background: linear-gradient(160deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border-soft); border-radius: var(--radius);
  padding: 16px 14px 14px; color: var(--ink);
  display: flex; flex-direction: column; gap: 6px;
  transition: transform 0.15s ease, border-color 0.15s ease;
  min-height: 118px;
}
.purpose:active { transform: scale(0.97); border-color: var(--gold-soft); }
.p-icon { font-size: 26px; }
.p-title { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.p-title .hot {
  font-style: normal; font-size: 9px; color: #1a1409; background: var(--gold);
  border-radius: 4px; padding: 1px 5px; letter-spacing: 0.5px; font-weight: 700;
}
.p-title .last {
  font-style: normal; font-size: 9px; color: #fff; background: var(--gold-soft);
  border-radius: 4px; padding: 1px 5px; letter-spacing: 0.5px; font-weight: 700;
}
.p-desc { font-size: 12px; color: var(--ink-dim); line-height: 1.5; flex: 1; }
.p-tag {
  font-size: 10px; color: var(--gold-soft);
  border: 1px solid var(--border); border-radius: 20px;
  padding: 2px 8px; align-self: flex-start;
}
.home-foot { text-align: center; color: var(--ink-faint); font-size: 11px; margin-top: 28px; line-height: 1.8; }

/* ---------- 聊天流 ---------- */
#chatStream { display: flex; flex-direction: column; gap: 14px; padding-top: 10px; }
.msg { display: flex; gap: 8px; animation: msgIn 0.3s ease; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.msg .avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: var(--surface-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.msg .bubble {
  max-width: calc(100% - 46px);
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: 4px 14px 14px 14px; padding: 10px 13px;
}
.msg .bubble p { margin: 0 0 6px; }
.msg .bubble p:last-child { margin-bottom: 0; }
.msg .bubble .q { font-weight: 700; font-size: 16.5px; color: #f1e7d2; }
.msg .bubble .sub { font-size: 12px; color: var(--ink-dim); }
.msg.user { justify-content: flex-end; }
.msg.user .bubble {
  background: linear-gradient(160deg, #3a2d16, #2c2210);
  border-color: var(--gold-soft); color: var(--gold);
  border-radius: 14px 4px 14px 14px; font-weight: 600;
}
.msg.typing .bubble { display: flex; gap: 5px; padding: 14px 16px; }
.msg.typing .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--gold);
  animation: blink 1.2s infinite;
}
.msg.typing .dot:nth-child(2) { animation-delay: 0.2s; }
.msg.typing .dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 60%, 100% { opacity: 0.25; } 30% { opacity: 1; } }

/* ---------- 选项 ---------- */
.options { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.options.grid { display: grid; grid-template-columns: 1fr 1fr; }
.opt {
  cursor: pointer; text-align: left;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 12px; color: var(--ink);
  font-size: 14px; transition: all 0.15s ease;
  display: flex; flex-direction: column; gap: 2px;
}
.opt:active { transform: scale(0.97); }
.opt.picked { border-color: var(--gold); background: #3a2d16; color: var(--gold); }
.opt-d { font-size: 11px; color: var(--ink-faint); }
.options.grid .opt { font-size: 13px; padding: 8px 10px; }
/* 「✍️ 自定义」标签 + 行内输入（choice 步骤，如「最想重点了解哪个方面」） */
.opt-custom { border-style: dashed; border-color: var(--gold-soft); color: var(--gold); }
.opt-custom .opt-t { color: var(--gold); }
.custom-row { display: flex; gap: 8px; margin-top: 8px; align-items: stretch; }
.custom-row[hidden] { display: none !important; }
.custom-input {
  flex: 1 1 auto; min-width: 0; width: auto;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; color: var(--ink); font-size: 14px; font-family: inherit; line-height: 1.5;
}
.custom-input:focus { outline: none; border-color: var(--gold-soft); }
.custom-row .custom-ok { flex: 0 0 auto; width: auto; white-space: nowrap; }

/* ---------- 日期选择器 ---------- */
.datepicker { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.cal-switch { display: flex; gap: 6px; }
.cal-switch .cs {
  flex: 1; padding: 6px; border-radius: 8px; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--ink-dim); font-size: 13px;
}
.cal-switch .cs.active { border-color: var(--gold); color: var(--gold); background: #3a2d16; }
.dp-row { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 6px; }
.dp-row select {
  background: var(--surface-2); color: var(--ink);
  border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 6px; font-size: 14px; width: 100%;
  appearance: none; text-align: center; text-align-last: center;
}
.btn-primary, .btn-ghost {
  cursor: pointer; border-radius: 10px; padding: 11px 16px; font-size: 14px; font-weight: 600;
  transition: transform 0.15s ease;
}
.btn-primary {
  background: linear-gradient(160deg, var(--gold), var(--gold-soft));
  border: none; color: #1a1409;
}
.btn-ghost {
  background: transparent; border: 1px solid var(--border); color: var(--ink-dim);
}
.btn-primary:active, .btn-ghost:active { transform: scale(0.96); }

/* ---------- 数字表单 ---------- */
.num-form { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.num-form input {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 11px 12px; color: var(--ink); font-size: 16px; width: 100%;
}
.num-actions { display: flex; gap: 8px; }
.num-actions .btn-primary { flex: 1; }

/* ---------- 塔罗 ---------- */
.tarot-fan { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.tcard {
  aspect-ratio: 2 / 3.2; cursor: pointer; position: relative;
  perspective: 600px; animation: cardIn 0.4s ease backwards; animation-delay: var(--d, 0s);
}
@keyframes cardIn { from { opacity: 0; transform: translateY(14px) rotate(-4deg); } to { opacity: 1; transform: none; } }
.tback, .tfront {
  position: absolute; inset: 0; border-radius: 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  backface-visibility: hidden; transition: transform 0.4s ease;
  border: 1px solid var(--border);
}
.tback {
  background: linear-gradient(150deg, #2a2115, #1a150d);
  font-size: 18px; color: var(--gold-soft);
}
.tfront {
  background: linear-gradient(160deg, #3a2d16, #241c10);
  transform: rotateY(180deg); padding: 4px; text-align: center;
}
.tcard.picked .tback { transform: rotateY(180deg); }
.tcard.picked .tfront { transform: rotateY(0deg); border-color: var(--gold); }
.tcard.rev .tfront .tg { transform: rotate(180deg); }
.tfront .tg { font-size: 16px; }
.tfront .tn { font-size: 10px; color: var(--ink); line-height: 1.2; }
.tfront .tr { font-size: 9px; color: var(--gold); }
.tarot-card-inline { display: flex; gap: 12px; align-items: center; margin: 8px 0; }
.tc-face {
  width: 56px; height: 84px; flex-shrink: 0; border-radius: 8px;
  background: linear-gradient(160deg, #3a2d16, #241c10);
  border: 1px solid var(--gold-soft);
  display: flex; align-items: center; justify-content: center; font-size: 24px;
}
.tc-face.rev { transform: rotate(180deg); }

/* ---------- 六爻摇卦 ---------- */
.coin-area { margin-top: 12px; }
.coin-lines { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.cline {
  height: 14px; font-size: 12px; color: var(--gold-soft); letter-spacing: 2px;
  display: flex; align-items: center;
}
.cline.yang { color: var(--gold); }
.coin-stage { display: flex; gap: 8px; align-items: center; }
.coin-btn {
  flex: 1; cursor: pointer; border: none; border-radius: 12px;
  background: linear-gradient(160deg, var(--gold), var(--gold-soft));
  color: #1a1409; font-size: 15px; font-weight: 700; padding: 14px;
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.25);
}
.coin-btn:active { transform: scale(0.96); }

/* ---------- 结果卡片（聊天内） ---------- */
.result-bubble { width: 100%; max-width: 100% !important; }
.rc-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.rc-icon { font-size: 26px; }
.rc-head b { font-size: 16px; color: var(--gold); }
.rc-head p { margin: 2px 0 0; font-size: 12px; color: var(--ink-dim); }
.rc-lines { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.rc-lines span {
  font-size: 11px; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 20px; padding: 3px 10px; color: var(--ink-dim);
}
.rc-cta { font-size: 12px; color: var(--gold-soft); margin: 6px 0 10px !important; }
.result-bubble .btn-primary { width: 100%; }

/* ---------- 完整报告 ---------- */
.report { padding-top: 8px; }
/* 历史归档提示条 */
.rp-archive {
  margin: 0 0 12px; padding: 9px 12px; border-radius: 10px;
  font-size: 12px; color: var(--gold);
  background: rgba(212,175,55,.10); border: 1px dashed var(--gold-soft);
}
.rp-hero {
  text-align: center; padding: 26px 16px 20px;
  background: linear-gradient(170deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border-soft); border-radius: var(--radius);
  margin-bottom: 16px;
}
.rp-icon { font-size: 40px; }
.rp-hero h2 { margin: 8px 0 2px; color: var(--gold); font-size: 22px; letter-spacing: 2px; }
.rp-hero > p { margin: 0; color: var(--ink-dim); font-size: 13px; }
.rp-lines { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 12px; }
.rp-lines span {
  font-size: 11px; border: 1px solid var(--border); border-radius: 20px;
  padding: 3px 10px; color: var(--ink-dim); background: var(--bg-2);
}
.rp-scores { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.rp-score { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.rp-score > span { width: 76px; text-align: right; color: var(--ink-dim); flex-shrink: 0; }
.rp-track { flex: 1; height: 8px; background: var(--bg); border-radius: 6px; overflow: hidden; }
.rp-fill { height: 100%; background: linear-gradient(90deg, var(--gold-soft), var(--gold)); border-radius: 6px; }
.rp-score b { width: 30px; color: var(--gold); }
.rp-sec {
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 14px 15px; margin-bottom: 12px;
}
.rp-sec h3 {
  margin: 0 0 8px; font-size: 15px; color: var(--gold);
  display: flex; align-items: center; gap: 8px;
}
.rp-sec h3::before { content: "◈"; font-size: 11px; }
.rp-sec p { margin: 0 0 8px; font-size: 14px; }
.rp-sec p:last-child { margin-bottom: 0; }
/* AI 解读并入报告后（长图里是 .rp-sec 直挂 h3/h4/ul/p）：补齐与正文一致的层次 */
.rp-sec h4, .rp-sec h5 {
  margin: 12px 0 6px; font-size: 14px; color: var(--gold-soft);
  display: flex; align-items: center; gap: 7px; line-height: 1.5;
}
.rp-sec h4::before, .rp-sec h5::before { content: "◈"; font-size: 10px; }
.rp-sec ul, .rp-sec ol { margin: 6px 0 10px; padding-left: 20px; }
.rp-sec li { font-size: 14px; line-height: 1.8; margin-bottom: 4px; }
.rp-sec li::marker { color: var(--gold-soft); }
.rp-sec blockquote {
  margin: 8px 0; padding: 2px 0 2px 10px;
  border-left: 2px solid var(--gold-soft); color: var(--ink-dim); font-size: 13px;
}
.rp-sec hr { border: none; border-top: 1px solid var(--border-soft); margin: 12px 0; }
.rp-sec .tip { font-size: 12px; color: var(--ink-dim); border-left: 2px solid var(--gold-soft); padding-left: 8px; }
.disclaimer { font-size: 11px; color: var(--ink-faint); text-align: center; margin: 16px 0; line-height: 1.7; }

/* 表格 */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { border: 1px solid var(--border-soft); padding: 6px 8px; text-align: left; }
th { background: var(--surface-2); color: var(--gold-soft); font-weight: 600; }
td.gz { color: var(--gold); font-weight: 700; font-size: 15px; }
.gua-table .yao { letter-spacing: 1px; color: var(--ink-dim); white-space: nowrap; }
.gua-table .shiyao td { background: rgba(212, 175, 55, 0.08); }
.pillar-table, .dy-scroll { overflow-x: auto; }
.dy-scroll table tr.cur td { background: rgba(212, 175, 55, 0.12); color: var(--gold); }

/* 五行条 */
.wx-bars { display: flex; flex-direction: column; gap: 7px; margin: 10px 0; }
.wx-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.wx-name { width: 18px; font-weight: 700; }
.wx-track { flex: 1; height: 9px; background: var(--bg); border-radius: 6px; overflow: hidden; }
.wx-fill { height: 100%; border-radius: 6px; opacity: 0.85; }
.wx-num { width: 14px; color: var(--ink-dim); }

/* 星星评分 */
.star-rows { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.star-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.star-row > span:first-child { width: 36px; color: var(--ink-dim); }
.stars { color: var(--gold); letter-spacing: 2px; flex: 1; }
.star-row b { color: var(--gold); }

/* 评分大数字 */
.score-hero { text-align: center; margin: 10px 0 14px; }
.score-num { font-size: 44px; font-weight: 800; color: var(--gold); line-height: 1; }
.score-stars { color: var(--gold); font-size: 20px; letter-spacing: 4px; margin-top: 4px; }

/* 卦象盒 */
.gua-box { display: flex; gap: 10px; margin: 10px 0; }
.gua-half {
  flex: 1; text-align: center; padding: 12px 8px;
  background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: 10px;
}
.gua-name { font-size: 11px; color: var(--ink-dim); }
.gua-big { font-size: 26px; font-weight: 800; color: var(--gold); margin: 2px 0; }
.gua-sub { font-size: 11px; color: var(--ink-faint); }

/* 小六壬 */
.xln-flow { display: flex; align-items: stretch; gap: 4px; margin: 10px 0; }
.xln-node {
  flex: 1; text-align: center; padding: 10px 4px;
  background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: 10px;
}
.xln-node.main { border-color: var(--gold); background: rgba(212, 175, 55, 0.1); }
.xln-name { font-size: 16px; font-weight: 700; color: var(--gold); }
.xln-gu { font-size: 10px; color: var(--ink-faint); margin-top: 2px; line-height: 1.4; }
.xln-arrow { align-self: center; color: var(--ink-faint); }

/* 择吉日列表 */
.day-list { display: flex; flex-direction: column; gap: 8px; }
.day-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: 10px; padding: 10px 12px;
}
.day-item.best { border-color: var(--gold); background: rgba(212, 175, 55, 0.08); }
.day-date { font-size: 15px; font-weight: 700; color: var(--ink); width: 76px; flex-shrink: 0; }
.day-date span { font-size: 11px; color: var(--ink-faint); margin-left: 4px; font-weight: 400; }
.day-info { flex: 1; font-size: 12px; color: var(--ink-dim); line-height: 1.5; }
.day-info b { color: var(--gold); }
.day-score { font-size: 18px; font-weight: 800; color: var(--gold); width: 38px; text-align: right; }

/* 建议 */
.advice-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.adv { background: var(--bg-2); border-radius: 10px; padding: 10px; border: 1px solid var(--border-soft); }
.adv h4 { margin: 0 0 6px; font-size: 13px; }
.adv.yi h4 { color: var(--green); }
.adv.huan h4 { color: var(--gold); }
.adv.bi h4 { color: var(--red); }
.adv ul { margin: 0; padding-left: 16px; }
.adv li { font-size: 12px; color: var(--ink-dim); margin-bottom: 4px; line-height: 1.5; }

/* 金句 */
.rp-quote {
  text-align: center; color: var(--gold-soft); font-size: 15px;
  margin: 18px 0; padding: 14px; border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft); font-style: italic;
}

/* AI 区（原 horosa 精排盘样式已随功能移除） */
.ai-config {  background: var(--surface); border: 1px dashed var(--gold-soft);
  border-radius: var(--radius); padding: 14px; margin: 14px 0;
}
.ai-config h3 { margin: 0 0 8px; font-size: 15px; color: var(--gold); }
.ai-note { font-size: 12px; color: var(--ink-dim); margin: 0 0 10px; line-height: 1.6; }
.ai-config input {
  width: 100%; background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 8px; padding: 9px 10px; color: var(--ink); font-size: 13px; margin-bottom: 8px;
}
.ai-out { font-size: 14px; line-height: 1.8; margin: 10px 0; color: var(--ink); }
.ai-out p { margin: 0 0 9px; font-size: 14px; }
.ai-out p:last-child { margin-bottom: 0; }
/* AI 正文的小标题 / 列表：与报告「分节」同一套视觉语言（金色标题 + ◈ 前缀） */
.ai-out h3, .ai-out h4, .ai-out h5 {
  margin: 14px 0 7px; font-size: 15px; font-weight: 600; color: var(--gold);
  display: flex; align-items: center; gap: 7px; line-height: 1.5;
}
.ai-out h3:first-child, .ai-out h4:first-child { margin-top: 0; }
.ai-out h3::before, .ai-out h4::before, .ai-out h5::before {
  content: "◈"; font-size: 10px; color: var(--gold-soft); transform: translateY(-1px);
}
.ai-out h5 { font-size: 14px; color: var(--gold-soft); }
.ai-out ul, .ai-out ol { margin: 6px 0 10px; padding-left: 20px; }
.ai-out li { font-size: 14px; line-height: 1.8; margin-bottom: 4px; }
.ai-out li::marker { color: var(--gold-soft); }
.ai-out b, .ai-out strong { color: var(--gold-soft); font-weight: 700; }
.ai-out i, .ai-out em { color: var(--ink-dim); }
.ai-out blockquote {
  margin: 8px 0; padding: 2px 0 2px 10px;
  border-left: 2px solid var(--gold-soft); color: var(--ink-dim); font-size: 13px;
}
.ai-out hr { border: none; border-top: 1px solid var(--border-soft); margin: 12px 0; }
.ai-out code {
  background: var(--bg); border: 1px solid var(--border); border-radius: 4px;
  padding: 0 4px; font-size: 12px; color: var(--gold-soft);
}
.ai-out s { color: var(--ink-faint); }
.ai-out[hidden] { display: none !important; }
.ai-out .ai-err { color: #e0836c; border-left: 2px solid #c0553f; padding-left: 8px; }
/* 追问区：建议问题 chips + 对话气泡 */
.ai-follow {
  margin: 14px 0 4px; padding: 12px; border-radius: 10px;
  background: var(--bg-2); border: 1px solid var(--border);
}
.ai-follow-hint { font-size: 12px; color: var(--ink-dim); margin: 0 0 8px; line-height: 1.6; }
.ai-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.ai-chip {
  width: auto; flex: 0 0 auto; cursor: pointer;
  font-size: 12px; line-height: 1.4; padding: 6px 10px; border-radius: 30px;
  background: rgba(212,175,55,.08); border: 1px solid var(--gold-soft); color: var(--gold);
}
.ai-chip:hover { background: rgba(212,175,55,.16); }
.ai-follow textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 9px 10px; color: var(--ink); font-size: 13px;
  resize: vertical; font-family: inherit; line-height: 1.6;
}
.ai-follow-row { display: flex; gap: 8px; }
.ai-follow-row .btn-primary, .ai-follow-row .btn-ghost { width: auto; flex: 0 0 auto; margin: 0; }
.ai-bubble {
  max-width: 92%; margin: 0 0 10px; padding: 9px 12px; font-size: 14px; line-height: 1.8;
  border-radius: 12px; word-break: break-word;
}
.ai-bubble.user {
  margin-left: auto; text-align: right; white-space: pre-wrap;
  background: rgba(212,175,55,.10); border: 1px solid var(--gold-soft); color: var(--gold);
  border-bottom-right-radius: 4px;
}
.ai-bubble.ai-answer {
  margin-right: auto; background: var(--bg-2); border: 1px solid var(--border);
  color: var(--ink); border-bottom-left-radius: 4px;
}
.ai-bubble.ai-answer h3, .ai-bubble.ai-answer h4, .ai-bubble.ai-answer h5 {
  margin: 10px 0 6px; font-size: 14px; font-weight: 600; color: var(--gold);
  display: flex; align-items: center; gap: 6px;
}
.ai-bubble.ai-answer h3:first-child, .ai-bubble.ai-answer h4:first-child { margin-top: 0; }
.ai-bubble.ai-answer h3::before, .ai-bubble.ai-answer h4::before, .ai-bubble.ai-answer h5::before {
  content: "◈"; font-size: 9px; color: var(--gold-soft);
}
.ai-bubble.ai-answer ul, .ai-bubble.ai-answer ol { margin: 6px 0 8px; padding-left: 20px; }
.ai-bubble.ai-answer li { font-size: 14px; line-height: 1.8; }
.ai-bubble.ai-answer p { margin: 0 0 8px; font-size: 14px; }
.ai-bubble.ai-answer p:last-child { margin-bottom: 0; }
.ai-bubble.ai-answer b, .ai-bubble.ai-answer strong { color: var(--gold-soft); font-weight: 700; }
.ai-bubble.ai-answer blockquote {
  margin: 6px 0; padding-left: 8px; border-left: 2px solid var(--gold-soft);
  color: var(--ink-dim); font-size: 13px;
}
/* 追问区同属 AI 区，隐藏语义与其他 AI 元素一致 */
.ai-follow[hidden] { display: none !important; }
.ai-raw { white-space: pre-wrap; word-break: break-all; background: var(--bg); border: 1px solid var(--border-soft); border-radius: 8px; padding: 10px; font-size: 11px; line-height: 1.6; color: var(--ink-dim); max-height: 280px; overflow: auto; margin: 8px 0 0; }
.ai-config code { background: var(--bg); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; font-size: 11px; color: var(--gold-soft); }
.ai-config textarea {
  width: 100%; background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 8px; padding: 9px 10px; color: var(--ink); font-size: 13px;
  margin-bottom: 8px; resize: vertical; font-family: inherit; line-height: 1.6;
}
.ai-config button:disabled { opacity: .55; cursor: not-allowed; }
.ai-quota-badge { display: inline-block; color: var(--gold); }
.ai-loading { color: var(--ink-dim); font-size: 13px; }
.ai-loading::after {
  content: '…'; animation: ai-dots 1.2s steps(4, end) infinite;
}
@keyframes ai-dots { 0% { content: ''; } 25% { content: '·'; } 50% { content: '··'; } 75% { content: '···'; } }

/* 星阙 AI 解读 · 追问框 */
.ha-follow-row { display: flex; gap: 8px; margin-top: 14px; align-items: stretch; }
.ha-follow-row .ai-input {
  flex: 1 1 auto; min-width: 0; width: auto;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px;
  padding: 11px 12px; color: var(--ink); font-size: 14px; font-family: inherit; line-height: 1.5;
}
.ha-follow-row .ai-input:focus { outline: none; border-color: var(--gold-soft); }
.ha-follow-row .btn-ghost { flex: 0 0 auto; width: auto; white-space: nowrap; align-self: stretch; }
.ha-sep { border: none; border-top: 1px dashed var(--border-soft); margin: 16px 0 12px; }
.ha-q {
  font-size: 16px; color: #f4ecd6; font-weight: 700; margin: 0 0 10px;
  padding: 7px 11px; background: var(--query-bg);
  border-left: 3px solid var(--query); border-radius: 8px; line-height: 1.6;
}
.ha-q::before { content: '❖ '; color: var(--query); }

/* AI 解读中的 Markdown 表格（星阙/DeepSeek 返回的命盘对照表等） */
.md-table { width: 100%; border-collapse: collapse; font-size: 13.5px; margin: 10px 0; table-layout: fixed; }
.md-table th, .md-table td { border: 1px solid var(--border); padding: 6px 9px; text-align: left; word-break: break-word; vertical-align: top; }
.md-table th { background: var(--bg-2); color: var(--ink-dim); font-weight: 600; }
.md-table tr:nth-child(even) td { background: rgba(212,175,55,.045); }

/* 会员引导（额度用尽时插入 AI 区） */
.ai-upgrade {
  margin-top: 12px; padding: 14px; border-radius: 12px;
  background: linear-gradient(160deg, rgba(212,175,55,.10), rgba(212,175,55,.03));
  border: 1px solid var(--gold-soft);
}
.ai-upgrade p { font-size: 13px; line-height: 1.7; margin: 0 0 10px; color: var(--ink); }
.ai-upgrade button { width: 100%; margin-top: 6px; }

/* 顶栏会员入口 */
.me-entry { display: flex; align-items: center; }
.me-btn {
  cursor: pointer; border: 1px solid var(--border); border-radius: 30px;
  background: var(--surface-2); color: var(--ink); font-size: 12px;
  padding: 5px 12px; white-space: nowrap; max-width: 130px; overflow: hidden;
  text-overflow: ellipsis; font-family: inherit;
}
.me-btn .crown { margin-right: 4px; font-style: normal; }
/* 管理员后台入口（仅 admin 账号可见） */
.me-adm {
  cursor: pointer; margin-right: 6px; flex: 0 0 auto;
  width: 28px; height: 28px; border-radius: 8px;
  border: 1px solid var(--gold-soft); background: rgba(212, 175, 55, 0.12);
  color: var(--gold); font-size: 14px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
}
.me-adm:active { transform: scale(0.92); }

/* 弹窗 */
.mb-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.68); z-index: 120;
  display: flex; align-items: center; justify-content: center; padding: 18px;
  backdrop-filter: blur(3px);
  animation: mbIn .18s ease;
}
@keyframes mbIn { from { opacity: 0; } to { opacity: 1; } }
.mb-box {
  width: 100%; max-width: 400px; max-height: 88vh; overflow: auto;
  background: linear-gradient(180deg, #2c2317 0, var(--surface-2) 132px);
  border: 1px solid var(--border);
  border-radius: 18px; padding: 22px 18px 18px; position: relative;
  box-shadow: 0 18px 48px rgba(0,0,0,.55), inset 0 1px 0 rgba(212,175,55,.14);
  animation: mbUp .24s cubic-bezier(.2,.8,.3,1);
}
@keyframes mbUp { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.mb-box h3 { margin: 0 0 8px; font-size: 17px; color: var(--gold); }
/* 品牌头：印章 + 站名，与首页 hero 同源风格 */
.mb-brand {
  display: flex; align-items: center; gap: 10px; padding: 2px 30px 14px 2px;
  border-bottom: 1px solid var(--border-soft); margin-bottom: 14px;
}
.mb-seal {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 9px;
  background: linear-gradient(150deg, var(--gold), var(--gold-soft));
  color: #1a1409; font-size: 11px; font-weight: 800; letter-spacing: -.5px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgba(212,175,55,.25);
}
.mb-brand b { display: block; font-size: 17px; color: var(--gold); letter-spacing: 3px; font-weight: 800; }
.mb-brand i { font-style: normal; font-size: 11px; color: var(--ink-faint); letter-spacing: 1px; }
.mb-sub { font-size: 12px; color: var(--ink-dim); line-height: 1.7; margin: 0 0 12px; }
.mb-tip { font-size: 11px; color: var(--ink-dim); margin: 10px 0 0; line-height: 1.6; }
.mb-err { color: #e0836c; font-size: 12px; margin: 0 0 8px; }
.mb-close {
  position: absolute; top: 10px; right: 10px; width: 30px; height: 30px;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 50%;
  color: var(--ink-dim); font-size: 13px; cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s ease;
}
.mb-close:active { transform: scale(.9); color: var(--gold); border-color: var(--gold-soft); }

/* ---------- 表单：带前缀字的输入框 ---------- */
.mb-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.mb-field {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 12px; padding: 0 12px;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.mb-field:focus-within {
  border-color: var(--gold);
  background: #171208;
  box-shadow: 0 0 0 3px rgba(212,175,55,.13);
}
.mb-field > i {
  flex-shrink: 0; width: 20px; height: 20px; border-radius: 6px;
  background: rgba(212,175,55,.12); color: var(--gold-soft);
  font-style: normal; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.mb-box input {
  /* flex:1 + width:auto：避免「label 宽度由 input 宽度决定、input 宽度又是 100%」的循环 →
     在 .mb-code-row 这类窄容器里会被算成 0 宽 */
  flex: 1 1 auto; width: auto; min-width: 0;
  background: transparent; border: none; outline: none;
  padding: 12px 0; color: var(--ink); font-size: 16px; font-family: inherit;
  line-height: 1.4;
}
.mb-box input::placeholder { color: var(--ink-faint); }
.mb-box input:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0 1000px var(--bg-2) inset;
}
.mb-eye {
  flex-shrink: 0; cursor: pointer; border: none; background: none;
  color: var(--ink-faint); font-size: 12px; font-family: inherit; padding: 4px 2px;
}
.mb-eye:active { color: var(--gold); }
.mb-code-row .mb-field { flex: 1 1 0%; min-width: 0; }
/* 兑换按钮不能被全局 width:100% 撑满，否则输入框被挤成 0 宽 */
.mb-code-row > button { width: auto; flex: 0 0 auto; padding: 11px 18px; white-space: nowrap; }
.mb-code-row .mb-field input { font-size: 14px; letter-spacing: .5px; }

/* 分段切换 */
.mb-tabs {
  display: flex; gap: 4px; margin-bottom: 14px; padding: 4px;
  background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: 12px;
}
.mb-tabs button {
  flex: 1; cursor: pointer; border: none; border-radius: 9px;
  background: transparent; color: var(--ink-dim); font-size: 13px; padding: 8px 0;
  font-family: inherit; transition: all .18s ease;
}
.mb-tabs button.on {
  color: #1a1409; font-weight: 700;
  background: linear-gradient(160deg, var(--gold), var(--gold-soft));
  box-shadow: 0 2px 8px rgba(212,175,55,.22);
}
.mb-card {
  display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 12px;
  background: var(--bg-2); border: 1px solid var(--border); margin-bottom: 14px;
}
.mb-card.vip { border-color: var(--gold-soft); background: rgba(212,175,55,.07); }
.mb-av {
  width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%;
  background: linear-gradient(160deg, var(--gold), var(--gold-soft)); color: #1a1409;
  display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700;
}
.mb-info { min-width: 0; }
.mb-info b { display: block; font-size: 14px; color: var(--ink); }
.mb-info p { margin: 2px 0 4px; font-size: 11px; color: var(--ink-dim); }
.mb-badge { display: block; font-size: 11px; color: var(--ink-dim); line-height: 1.7; margin-top: 2px; }
.mb-badge.on { color: var(--gold); }
.mb-badge b { font-size: 13px; }
.mb-plan {
  padding: 14px; border-radius: 12px; background: var(--bg-2);
  border: 1px solid var(--gold-soft); margin-bottom: 12px;
}
.mb-plan-h { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
.mb-plan-h b { font-size: 15px; color: var(--ink); }
.mb-price { color: var(--gold); font-size: 18px; font-weight: 700; }
.mb-plan p { font-size: 12px; color: var(--ink-dim); margin: 0 0 8px; line-height: 1.6; }
.mb-list { margin: 0; padding-left: 18px; font-size: 12px; color: var(--ink); line-height: 1.9; }
.mb-list b { color: var(--gold); }
.mb-ord { background: var(--bg-2); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.mb-ord p { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-dim); margin: 4px 0; }
.mb-ord b { color: var(--ink); font-weight: 600; }
.mb-amt { color: var(--gold) !important; font-size: 15px; }
.mb-pay { margin-bottom: 12px; }
.mb-code { border-top: 1px dashed var(--border); padding-top: 12px; }
.mb-code-row { display: flex; gap: 8px; }
.mb-code-row input { flex: 1; margin-bottom: 0; }
.mb-row { display: flex; gap: 8px; margin-top: 12px; }
.mb-row button { flex: 1; }
.mb-qr { word-break: break-all; font-size: 12px; color: var(--gold-soft); background: var(--bg); padding: 10px; border-radius: 8px; }

/* 历史记录列表 */
.mb-hist { display: flex; flex-direction: column; gap: 8px; max-height: 52vh; overflow: auto; }
.hi-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  background: var(--bg-2); border: 1px solid var(--border); cursor: pointer;
}
.hi-main { flex: 1; min-width: 0; }
.hi-main b { display: block; font-size: 13px; color: var(--ink); }
.hi-sub { margin: 3px 0 2px; font-size: 11px; color: var(--ink-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hi-time { font-size: 10px; color: var(--ink-dim); }
.hi-del {
  flex-shrink: 0; background: none; border: 1px solid #c0553f; color: #e0836c;
  border-radius: 8px; width: 26px; height: 26px; cursor: pointer; font-size: 12px;
}
.hi-tag {
  font-style: normal; margin-left: 6px; padding: 1px 6px; border-radius: 20px;
  font-size: 10px; color: var(--gold); background: rgba(212,175,55,.14);
  border: 1px solid var(--gold-soft); vertical-align: 1px;
}
.hi-go { flex-shrink: 0; color: var(--ink-faint); font-size: 18px; margin-right: 2px; }
.hi-item:active { background: var(--surface); }
.mb-summary {
  font-size: 13px; line-height: 1.9; color: var(--ink); background: var(--bg-2);
  border-radius: 10px; padding: 12px; margin-top: 10px; max-height: 46vh; overflow: auto;
}

/* ---------- 按钮 / 提示 / 页脚（统一全站控件语言） ---------- */
.btn-primary, .btn-ghost { display: block; width: 100%; text-align: center; }
.btn-block { width: 100%; padding: 13px 16px; font-size: 15px; letter-spacing: 1px; }
.btn-primary[disabled], .btn-ghost[disabled] { opacity: .6; }
.btn-primary.loading { position: relative; color: transparent; }
.btn-primary.loading::after {
  content: ''; position: absolute; left: 50%; top: 50%;
  width: 16px; height: 16px; margin: -8px 0 0 -8px;
  border: 2px solid rgba(26,20,9,.35); border-top-color: #1a1409;
  border-radius: 50%; animation: mbSpin .7s linear infinite;
}
@keyframes mbSpin { to { transform: rotate(360deg); } }
.mb-err {
  display: flex; align-items: center; gap: 5px;
  color: #e0836c; font-size: 12px; margin: 0 0 10px;
  background: rgba(192,85,63,.10); border: 1px solid rgba(192,85,63,.35);
  border-radius: 9px; padding: 7px 10px;
}
.mb-err[hidden] { display: none !important; }
.mb-foot {
  font-size: 11px; color: var(--ink-faint); text-align: center;
  margin: 12px 0 0; line-height: 1.7;
}
.mb-foot-sep { color: var(--border); margin: 0 6px; }

/* 会员卡：带皇冠金边 */
.mb-card.vip {
  border-color: var(--gold-soft);
  background: linear-gradient(140deg, rgba(212,175,55,.16), rgba(212,175,55,.04));
  box-shadow: inset 0 1px 0 rgba(212,175,55,.18);
}
.mb-plan {
  background: linear-gradient(165deg, rgba(212,175,55,.10), rgba(212,175,55,.02));
  box-shadow: inset 0 1px 0 rgba(212,175,55,.14);
}
.mb-price i { font-style: normal; font-size: 11px; opacity: .75; margin-right: 1px; }
.hi-ico {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 9px;
  background: var(--surface); border: 1px solid var(--border-soft);
  display: flex; align-items: center; justify-content: center; font-size: 17px;
}

/* 顶栏会员入口：会员为金色实心，游客为描边 */
.me-btn {
  cursor: pointer; border-radius: 30px; font-size: 12px;
  padding: 6px 13px; white-space: nowrap; max-width: 130px; overflow: hidden;
  text-overflow: ellipsis; font-family: inherit; transition: all .15s ease;
}
.me-btn.vip {
  border: 1px solid var(--gold); color: #1a1409; font-weight: 700;
  background: linear-gradient(160deg, var(--gold), var(--gold-soft));
  box-shadow: 0 2px 10px rgba(212,175,55,.25);
}
.me-btn.guest {
  border: 1px solid var(--gold-soft); color: var(--gold); background: rgba(212,175,55,.07);
}
.me-btn:active { transform: scale(.94); }
.me-btn .crown { margin-right: 3px; font-style: normal; }

/* ---------- 计次购买 ---------- */
.mb-gift {
  font-size: 12px; line-height: 1.7; color: var(--ink);
  background: rgba(212,175,55,.10); border: 1px solid var(--gold-soft);
  border-radius: 10px; padding: 9px 12px; margin: 0 0 14px;
}
.mb-gift b { color: var(--gold); }

.mb-unlimited {
  margin: 12px 0; padding: 12px 14px; border-radius: 12px; font-size: 13px; line-height: 1.8;
  color: var(--ink); background: linear-gradient(140deg, rgba(212,175,55,.14), rgba(212,175,55,.03));
  border: 1px solid var(--gold-soft);
}
.mb-unlimited b { color: var(--gold); }

.mb-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 0; }
.mb-num {
  text-align: center; padding: 10px 6px; border-radius: 10px;
  background: var(--bg-2); border: 1px solid var(--border-soft);
}
.mb-num span { display: block; font-size: 11px; color: var(--ink-dim); margin-bottom: 2px; }
.mb-num b { font-size: 20px; color: var(--gold); font-weight: 800; }
.mb-num b i { font-style: normal; font-size: 11px; color: var(--ink-faint); font-weight: 400; }

.mb-buy { margin: 12px 0; }
.mb-buy-h { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.mb-buy-h b { font-size: 14px; color: var(--ink); }

/* 三档套餐 */
.pk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 12px; }
.pk {
  position: relative; cursor: pointer; text-align: center;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 6px 10px; color: var(--ink);
  font-family: inherit; display: flex; flex-direction: column; gap: 3px;
  transition: all .15s ease;
}
.pk:active { transform: scale(.97); }
.pk.hot {
  border-color: var(--gold); background: rgba(212,175,55,.10);
  box-shadow: 0 0 0 1px rgba(212,175,55,.25) inset;
}
.pk-tag {
  position: absolute; top: -8px; left: 50%; transform: translateX(-50%);
  font-size: 10px; padding: 1px 7px; border-radius: 20px; white-space: nowrap;
  background: linear-gradient(160deg, var(--gold), var(--gold-soft)); color: #1a1409; font-weight: 700;
}
.pk-n { font-size: 20px; font-weight: 800; color: var(--gold); line-height: 1.2; }
.pk-n small { font-size: 11px; font-weight: 400; color: var(--ink-dim); margin-left: 1px; }
.pk-p { font-size: 14px; font-weight: 700; color: var(--ink); }
.pk-u { font-size: 10px; color: var(--ink-faint); }

/* AI 区里的套餐卡略紧凑（窄容器） */
.ai-upgrade .pk { padding: 10px 4px 8px; border-radius: 10px; }
.ai-upgrade .pk-n { font-size: 18px; }
.ai-upgrade .pk-p { font-size: 13px; }
.ai-upgrade .pk-u { font-size: 9px; }

.up-gift {
  font-size: 13px; line-height: 1.8; color: var(--ink);
  background: rgba(212,175,55,.08); border: 1px dashed var(--gold-soft);
  border-radius: 10px; padding: 10px 12px;
}
.up-gift b { color: var(--gold); font-size: 15px; }
.up-gift span { font-size: 11px; color: var(--ink-dim); }

/* 顶栏入口上的次数角标 */
.me-cr {
  font-style: normal; margin-left: 4px; padding: 0 5px; border-radius: 20px;
  background: rgba(26,20,9,.22); font-size: 10px; font-weight: 700;
}

/* ---------- 长图页脚：左品牌 + 右小二维码 ---------- */
.rp-shot-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.rp-foot-brand { display: flex; flex-direction: column; gap: 4px; letter-spacing: .5px; }
.rp-foot-tip { font-style: normal; font-size: 10px; color: var(--ink-faint); letter-spacing: 0; }
.rp-qr-mini {
  display: inline-flex; flex: 0 0 auto; padding: 3px; line-height: 0;
  background: #fff; border-radius: 6px; box-shadow: 0 3px 10px rgba(0,0,0,.28);
}
.rp-qr-mini svg { display: block; width: 84px; height: 84px; }

/* ---------- 报告长图预览 ---------- */
.shot-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.86); z-index: 200;
  display: flex; flex-direction: column; align-items: center;
  padding: 14px; animation: mbIn .2s ease;
}
.shot-top {
  width: 100%; max-width: 520px; display: flex; align-items: center; gap: 10px;
  color: var(--gold); font-size: 14px; margin-bottom: 10px;
}
.shot-top b { flex: 1; }
.shot-x {
  background: none; border: 1px solid var(--border); border-radius: 50%;
  color: var(--ink-dim); width: 28px; height: 28px; cursor: pointer; font-size: 13px;
}
.shot-scroll {
  flex: 1; width: 100%; max-width: 520px; overflow: auto;
  -webkit-overflow-scrolling: touch; border-radius: 12px;
}
.shot-scroll img {
  width: 100%; display: block; border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.5);
  /* 微信/iOS 里长按图片要能弹出「保存图片」：不要禁用 callout / 选中 */
  -webkit-touch-callout: default;
  -webkit-user-select: auto; user-select: auto;
}
.shot-bar {
  width: 100%; max-width: 520px; display: flex; gap: 8px; margin-top: 12px;
}
.shot-tip { color: var(--ink-faint); font-size: 11px; text-align: center; margin-top: 8px; }
.shot-loading { color: var(--ink-dim); font-size: 13px; text-align: center; padding: 40px 0; }

/* 报告操作 */
.rp-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.rp-actions button { flex: 1; min-width: 130px; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(20px);
  background: var(--surface-2); border: 1px solid var(--gold-soft); color: var(--gold);
  padding: 9px 18px; border-radius: 30px; font-size: 13px; z-index: 100;
  opacity: 0; transition: all 0.3s ease; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 桌面端 ---------- */
@media (min-width: 640px) {
  body { font-size: 15.5px; }
  .view { padding: 20px 24px 70px; max-width: 760px; }
  .purpose-grid { grid-template-columns: repeat(3, 1fr); }
  .purpose { min-height: 150px; }
  .purpose:hover { border-color: var(--gold-soft); transform: translateY(-2px); }
  .options.grid { grid-template-columns: repeat(3, 1fr); }
  .tarot-fan { grid-template-columns: repeat(7, 1fr); }
  .msg .bubble { max-width: 78%; }
  .result-bubble { max-width: 100% !important; }
  .hero h1 { font-size: 40px; }
  .advice-grid { grid-template-columns: repeat(3, 1fr); }
}

/* 微信端：略保守的字号与间距，避免误触 */
@media (max-width: 360px) {
  .options.grid { grid-template-columns: 1fr; }
  .tarot-fan { grid-template-columns: repeat(3, 1fr); }
  .advice-grid { grid-template-columns: 1fr; }
  .dp-row select { font-size: 13px; padding: 9px 2px; }
}
