* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html,body { height:100%; }
body {
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;
  background:#e9e0cf; color:#2b2118; font-size:15px;
  touch-action:manipulation;   /* 禁掉双击退缩放（捏合缩放在 app.js 里拦 gesture 事件） */
}
#app {
  max-width:560px; margin:0 auto; min-height:100%; position:relative;
  /* 暖纸色纵向渐变：上亮下沉，像宣纸摊开，比死板的平涂有层次 */
  background:linear-gradient(180deg,#fcf8f1 0%,#f6f0e3 45%,#efe6d3 100%);
  box-shadow:0 0 24px rgba(90,60,20,.10);
}
.hidden { display:none !important; }
a { color:inherit; text-decoration:none; }
/* iOS Safari 聚焦 font-size<16px 的输入框会自动放大页面且不回缩，全部抬到 16px 根治；按钮不参与 */
input,select { font-family:inherit; font-size:16px; outline:none; }
button { font-family:inherit; font-size:15px; outline:none; }

/* 登录 */
#view-login { min-height:100vh; display:flex; align-items:center;
  background:
    radial-gradient(ellipse 72% 55% at 50% -6%, rgba(240,207,142,.30), rgba(240,207,142,0) 70%),
    radial-gradient(ellipse 60% 40% at 50% 112%, rgba(0,0,0,.16), rgba(0,0,0,0) 70%),
    linear-gradient(160deg,#b3261e,#7e1410);
}
.reg-corner { position:absolute; top:16px; right:18px; z-index:20; background:rgba(255,255,255,.18); color:#f7e7c9; border:1px solid rgba(255,255,255,.55); border-radius:20px; padding:7px 18px; font-size:14px; letter-spacing:2px; cursor:pointer; }
.reg-corner:active { background:rgba(255,255,255,.32); }
.login-wrap { width:100%; padding:40px 32px; text-align:center; }
.login-logo {
  width:92px; height:92px; margin:0 auto 18px; border-radius:26px;
  background:linear-gradient(145deg,#f4d795,#c79a3f); color:#7e1410;
  font-size:50px; font-weight:700; line-height:92px;
  border:1px solid rgba(255,255,255,.30);
  box-shadow:0 12px 30px rgba(0,0,0,.30), inset 0 1px 0 rgba(255,255,255,.55);
  text-shadow:0 1px 2px rgba(255,255,255,.40);
}
.login-wrap h1 { color:#fdf3dc; font-size:32px; letter-spacing:6px; text-shadow:0 2px 8px rgba(0,0,0,.28); }
.login-sub { color:rgba(253,243,220,.82); margin:10px 0 20px; letter-spacing:1px; }
.login-ads { background:#fdf3e2; border:1px solid #e8c37a; border-radius:12px; padding:10px 14px 12px; margin:0 0 20px; text-align:left; box-shadow:0 2px 10px rgba(120,60,20,.14); }
.login-ads .ads-title { color:#8b2a1e; font-size:14px; font-weight:700; letter-spacing:.5px; display:flex; align-items:center; gap:7px; }
.login-ads .ads-line { color:#6b5d4f; font-size:12px; margin-top:3px; line-height:1.5; display:flex; align-items:flex-start; gap:6px; }
.login-ads .ads-points { margin-top:8px; display:flex; flex-direction:column; gap:4px; }
.login-ads .ads-points div { color:#b3261e; font-size:11.5px; }
.form .login-fields { display:flex; justify-content:center; gap:16px; align-items:stretch; margin-bottom:14px; }
.form .lf-inputs { width:58%; flex:none; display:flex; flex-direction:column; gap:10px; }
.form .lf-inputs input { margin-bottom:0; }
.login-fields #btn-login { width:132px; flex:none; height:auto; padding:0; font-size:17px; }
.form input {
  width:100%; height:52px; border:1px solid rgba(255,255,255,.14); border-radius:14px; padding:0 16px;
  margin-bottom:14px; background:rgba(255,255,255,.96); color:#3a2418;
  transition:border-color .2s, box-shadow .2s;
}
.form input::placeholder { color:#b3a088; }
.form input:focus { border-color:#e8c37a; box-shadow:0 0 0 3px rgba(232,195,122,.35); }
.btn-primary {
  width:100%; height:46px; border:0; border-radius:12px;
  background:linear-gradient(145deg,#e8c37a,#c79a3f); color:#5e120e;
  font-size:17px; font-weight:700; letter-spacing:3px;
}
.btn-primary:active { opacity:.85; }
.login-wrap .btn-primary { height:50px; border-radius:14px; box-shadow:0 6px 18px rgba(0,0,0,.28); cursor:pointer; transition:transform .12s, box-shadow .12s, opacity .12s; }
.login-wrap .btn-primary:active { transform:translateY(1px); opacity:.9; }
.login-tip { color:rgba(247,231,201,.8); margin-top:16px; font-size:14px; }
.remember { display:flex; align-items:center; justify-content:center; gap:6px;
  margin:14px 0 2px; color:rgba(247,231,201,.92); font-size:13px; user-select:none; }
.remember input { width:16px; height:16px; accent-color:#f0cf8e; }
.login-install { margin-top:12px; font-size:13px; }
.login-install a { color:#f0cf8e; text-decoration:underline; }
.top-actions #btn-install { color:#f0cf8e !important; font-size:13px; }
.login-tip a { color:#f0cf8e; }
.msg { color:#ffd6a0; font-size:13px; min-height:18px; margin-top:8px; }

/* 顶栏 */
.topbar {
  position:sticky; top:0; z-index:20; height:52px;
  background:linear-gradient(135deg,#b3261e,#921914); color:#f7e7c9;
  display:flex; align-items:center; padding:0 14px;
}
.brand { flex:1; font-size:18px; font-weight:700; letter-spacing:2px; text-align:center; }
/* 左区（试用天数）与右区（入口按钮）各占 1/3，品牌标题居中于正中间，互不遮挡 */
.top-side { flex:1; display:flex; align-items:center; gap:10px; justify-content:flex-start; }
.top-actions { flex:1; display:flex; align-items:center; justify-content:flex-end; gap:10px; font-size:13px; }
.me-name { display:none; }   /* 昵称挤得和居中标题重叠，改为只在「账号」里看 */
.top-actions a { color:#f0cf8e; }
.back { position:absolute; left:12px; font-size:30px; line-height:1; color:#f7e7c9; padding:4px 8px; }
.top-link { color:#f0cf8e !important; position:absolute; right:14px; font-size:14px; }

/* 小屏幕手机：标题与入口按钮分两行，避免「分享」等被「礼尚往来」遮住 */
@media (max-width:520px){
  .topbar { height:auto; flex-wrap:wrap; padding:6px 8px; }
  /* 第一行：试用天数绝对定位在左上角，礼尚往来标题真正居中于全屏；第二行：按钮居中 */
  .top-side { position:absolute; left:10px; top:9px; z-index:2; justify-content:flex-start; }
  .brand { order:0; flex:1 0 100%; font-size:16px; letter-spacing:1px; padding:2px 0; }
  .top-actions { order:1; flex:1 0 100%; justify-content:center; gap:14px; font-size:13px; }
}

/* 统计卡 */
.stats-card { margin:12px; background:#fff; border-radius:14px; padding:12px 10px 16px;
  box-shadow:0 2px 10px rgba(90,60,20,.06); }
.stats-row { display:flex; }
.stats-item { flex:1; text-align:center; }
.stats-item + .stats-item { border-left:1px dashed #e5d9c8; }
.stats-label { font-size:13px; color:#9a8b78; margin-bottom:6px; }
.stats-val { font-size:22px; font-weight:700; font-variant-numeric:tabular-nums; }
.stats-val.recv { color:#b3261e; }
.stats-val.give { color:#2e7d4f; }
.stats-diff { font-size:15px; font-weight:700; }
.badge-diff { padding:3px 10px; border-radius:20px; font-size:13px; font-weight:700; flex:none; }
.badge-diff.over { background:#fdecea; color:#b3261e; }
.badge-diff.flat { background:#efece7; color:#8a7b68; }
.badge-diff.under { background:#e8f3ec; color:#2e7d4f; }

/* 同人合并 */
.dupes-entry { display:block; margin:0 12px 8px; padding:9px 12px; font-size:13px;
  color:#b3261e; background:#fdecea; border-radius:10px; text-decoration:none; }
.dupes-tip { margin:12px; padding:10px 12px; font-size:12.5px; line-height:1.6;
  color:#8a7b68; background:#f6f2ea; border-radius:10px; }
/* 同人合并顶部计数条 */
.dupes-count-bar { margin:0 12px 10px; padding:8px 12px; background:#fdf3e3; border-radius:8px;
  font-size:13px; color:#8a7b68; text-align:center; }
.dupes-count-bar span { color:#b3261e; font-weight:600; }
.dupe-group { margin:10px 12px; background:#fff; border-radius:14px; overflow:hidden;
  box-shadow:0 2px 10px rgba(90,60,20,.06); }
.dg-title { padding:10px 14px; font-size:13px; font-weight:700; color:#b3261e;
  background:#fbf3f2; border-bottom:1px solid #f2e8e6; }
.dupe-person { display:flex; align-items:center; justify-content:space-between;
  padding:12px 14px; border-bottom:1px solid #f4f0ea; }
.dupe-person:last-child { border-bottom:none; }
.dp-info { flex:1; min-width:0; padding-right:10px; }
.dp-name { font-size:16px; font-weight:700; color:#3a2e22; }
.dp-sub { font-size:12.5px; color:#9a8b78; margin-top:3px; }
.dp-remark { font-size:12.5px; color:#b3261e; margin-top:4px; line-height:1.5;
  background:#fbf3f2; border-radius:6px; padding:3px 8px; display:inline-block; }
.dp-remark.none { color:#b8ac9c; background:#f6f2ea; }
.dp-remark.editable { cursor:pointer; }
.dp-remark.editable:active { opacity:.6; }
.dp-remark-input { border:0; outline:0; background:transparent; font-size:16px;
  color:#b3261e; width:100%; min-width:8em; padding:0; }
.dp-keep { flex:none; margin-left:10px; padding:8px 14px; font-size:13px; color:#fff;
  background:#b3261e; border:none; border-radius:20px; }
/* 忽略此人：和并入此名并排，低调灰 */
.dp-btns { display:flex; flex-direction:column; gap:6px; margin-left:10px; }
.dp-ignore-person { flex:none; padding:8px 14px; font-size:13px; color:#8a7b68;
  background:transparent; border:1px solid #d9cfc0; border-radius:20px; }
.dg-actions { padding:9px 14px; background:#fdfcfa; border-top:1px solid #f4f0ea; text-align:right; }
.dg-ignore { font-size:13px; color:#8a7b68; background:transparent;
  border:1px solid #d9cfc0; border-radius:18px; padding:7px 14px; }
.dg-restore { font-size:13px; color:#b3261e; background:transparent;
  border:1px dashed #d98b86; border-radius:18px; padding:7px 14px; }
.dupe-group.ignored { opacity:.62; }
.dupe-group.ignored .dg-title { color:#9a8b78; background:#f4f1ec; }
.ignored-head { margin:18px 12px 4px; font-size:13px; color:#9a8b78;
  border-top:1px dashed #d9cfc0; padding-top:14px; }
.btn-merge-line { display:block; margin:18px 12px 40px; padding:13px; font-size:14px;
  color:#b3261e; background:#fff; border:1px dashed #d98b86; border-radius:12px; }
.merge-from { font-size:14px; color:#5a4a38; margin:4px 0 10px; line-height:1.6; }
.merge-list { max-height:46vh; overflow-y:auto; margin:0 -4px; }
.mg-person { padding:11px 12px; border-bottom:1px solid #f0ebe3; border-radius:8px; }
.mg-person:active { background:#f6f2ea; }
.mg-hint { padding:18px 8px; text-align:center; color:#a99a86; font-size:13px; }

/* 礼薄来源标签 */
.ledger-tags { margin-top:7px; }
.ci-ledgers { margin-top:6px; }
.lt-chip { display:inline-block; font-size:11.5px; padding:2px 9px; margin-right:6px;
  border-radius:4px; color:#8a6d3b; background:#f7efe0; border:1px solid #e5d3b0; }
.lt-chip.empty { color:#9a8b78; background:#f2f0ec; border-color:#e0dbd2; }
.lt-chip.sm { font-size:11px; padding:1px 7px; }
/* 全部视图：多本礼薄逐本列收/送 */
.ci-ledgers-detail { margin-top:7px; border-top:1px dashed #eee5d6; padding-top:4px; }
.ci-led-line { display:flex; justify-content:flex-start; align-items:center;
  font-size:calc(var(--ci-fs) - 1px); color:#6b5d4c; padding:2.5px 0; gap:0 8px; }   /* 金额比名字小1px、随屏缩放；与主列表 .ci-name-row 的 8px 间距一致，收列从同一 X 对齐 */
.ci-led-line .ln { color:#8a6d3b; font-size:calc(var(--ci-fs) - 1px); flex:none; width:var(--ci-c1,3em); box-sizing:border-box;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }   /* 礼薄名无背景色；大小与数字一致；列宽与姓名列(var --ci-c1)同宽、随屏缩放 */
.ci-led-line .r { color:#b3261e; font-weight:700; }
.ci-led-line .g { color:#2e7d4f; font-weight:700; }
/* 逐本礼薄统计行：收/送金额各自定宽，收金额宽度固定使「送」标签各行竖线对齐；等宽数字 */
.ci-led-line .lv { display:flex; align-items:center; flex:none; white-space:nowrap; }
.ci-led-line .lv .r { display:inline-block; width:6ch; text-align:left; margin-right:8px;
  font-variant-numeric: tabular-nums; }   /* 收金额后 8px 间距（同主列表 badge 前 gap），「送」列与主列表第三列对齐 */
.ci-led-line .lv .g { display:inline-block; width:6ch; text-align:left;
  font-variant-numeric: tabular-nums; }
/* 明细行收标签与金额 2px（同主列表 .amt-col 的 gap），保证收金额右缘与主列表一致 */
.ci-led-line .lv .amt-tag:first-child { margin-right:2px; }
/* 明细行「收/送」标签：大小与主列表 .ci-name-amt 的收/送标签(12px)统一 */
.ci-led-line .amt-tag { font-size:calc(var(--ci-fs) - 5px); color:#9a8b78; flex:none; min-width:2em; text-align:left; }   /* 与主列表收/送标签同号、随屏缩放 */

/* 礼薄 chips */
.toolbar { margin:0 12px; display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
/* chips 自己在行内滚动，给小计条留出固定位置 */
#ledger-chips { flex:1 1 auto; min-width:0; flex-wrap:wrap; row-gap:8px; }
/* 多本礼薄：下拉占满剩余宽度，chips 只剩「礼薄管理」一个入口、不再滚动 */
#ledger-select { flex:1; min-width:0; height:38px; border:1px solid #e7ddcd; border-radius:10px;
  background:#fff; padding:0 10px; color:#5b4a36; }
.toolbar.sel-mode #ledger-chips { flex:none; overflow:visible; }
.chips { display:flex; gap:8px; padding-bottom:2px; }
.chip {
  flex:none; padding:7px 14px; border-radius:20px; background:#fff; color:#6b5d4c;
  font-size:14px; border:1px solid #e7ddcd;
}
.chip.active { background:#b3261e; color:#f7e7c9; border-color:#b3261e; font-weight:700; }
.chip.add { color:#b3261e; border-style:dashed; font-weight:700; }
.chip .chip-cnt { font-size:11px; opacity:.65; margin-left:2px; }

/* 搜索 */
.searchbar { padding:12px; }
.searchbar input {
  width:100%; height:44px; border:1px solid #e7ddcd; border-radius:22px;
  padding:0 18px; background:#fff;
}

/* 列表 */
.list { padding:0 12px 90px; }

/* 主视图铺满一屏：顶栏/统计卡/按钮行/搜索框全部钉住，名单在 #contact-list 内部滚动 */
#view-main { display:flex; flex-direction:column; height:100dvh; overflow:hidden; }
#view-main > .topbar, #view-main > .stats-card, #view-main > .toolbar,
#view-main > .list-tools, #view-main > .searchbar, #view-main > .page-nav,
#view-main > .dupes-entry, #view-main > .view-row { flex:none; }
#contact-list { flex:1; min-height:0; overflow-y:auto; -webkit-overflow-scrolling:touch; }
/* 输入法候选窗会盖住列表第一行：组字时把列表顶出候选窗高度（约一行候选词） */
#contact-list.ime-open { padding-top:52px; }
.contact-item, .record-item {
  background:#fff; border-radius:12px; padding:14px; margin-bottom:10px;
  display:flex;
  --ci-fs: clamp(15px, 4.6vw, 19px);   /* 名字字号随屏幕宽度自动缩放（约 320~430px 手机 → 15~19px） */
  --ci-c1: calc(var(--ci-fs) * 3);      /* 名字/礼薄名列宽 = 3 个字宽，随屏自动匹配；收/送/差从同一 X 对齐 */
  font-size: var(--ci-fs);
  box-shadow:0 1px 6px rgba(90,60,20,.05);
}
/* 记录模式：内容垂直居中 */
.record-item { align-items:center; }
/* 礼薄统计列表：总收/总送(右侧)固定在名字那一行顶部对齐，各礼薄明细行独立往下排，避免与明细并排拥挤 */
.contact-item { align-items:flex-start; }
.ci-main { flex:1; min-width:0; }
/* 名字行：名字 + 总收送金额 + 状态徽标 强制同一行，总收送紧贴名字 */
.ci-name-row { display:flex; align-items:baseline; flex-wrap:nowrap; gap:3px 8px; margin-bottom:4px; }
/* 名字统一 3 字宽、居中：2 字名字居中留空、3 字正好填满、超 3 字自动换行，各行名字右缘对齐 */
.ci-name { font-size:var(--ci-fs); font-weight:700; flex:0 0 auto; width:var(--ci-c1,3em); text-align:center;
  white-space:normal; word-break:break-all; line-height:1.3; overflow:hidden; }
/* 两字名字两端对齐：第一字对齐三字名的第1格，第二字对齐第3格，中间留空 */
.ci-name.w2 { text-align:justify; text-align-last:justify; }
.ci-name .mark { color:#b3261e; }
/* 总收/总送金额：紧贴名字，红绿区分；收、送定宽右对齐，与差徽标排成对齐的三列 */
.ci-name-amt { font-size:15px; color:#6b5d4c; font-variant-numeric:tabular-nums; white-space:nowrap; flex:none;
  display:flex; align-items:baseline; gap:0 8px; }
.ci-name-amt .amt-col { display:inline-flex; align-items:baseline; gap:0 2px; }
.ci-name-amt .amt-tag { font-size:calc(var(--ci-fs) - 5px); color:#9a8b78; flex:none; min-width:2em; text-align:left; }
.ci-name-amt .r { color:#b3261e; font-weight:700; font-size:calc(var(--ci-fs) - 1px); display:inline-block; width:6ch; text-align:left; }
.ci-name-amt .g { color:#2e7d4f; font-weight:700; font-size:calc(var(--ci-fs) - 1px); display:inline-block; width:6ch; text-align:left; }
.ci-sub { font-size:13px; color:#9a8b78; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ci-right { text-align:right; margin-left:10px; flex-shrink:0; }
/* 金额大字+等宽数字：右对齐后上下行个位对个位，整齐不乱，客人远看也清楚 */
.ci-amounts { font-size:18px; color:#6b5d4c; margin-bottom:5px; white-space:nowrap; font-variant-numeric:tabular-nums; letter-spacing:.3px; }
.ci-amounts .r { color:#b3261e; font-weight:700; font-size:19px; }
.ci-amounts .g { color:#2e7d4f; font-weight:700; font-size:19px; }
/* 标签定宽、金额定宽右对齐：上下行「礼金」二字和数字各成一条直线 */
.ci-amounts .amt-tag { display:inline-block; min-width:2.1em; text-align:left; font-size:14px; }
.ci-amounts .amt-num { display:inline-block; min-width:5.5ch; text-align:right; }

.empty { text-align:center; color:#b0a493; padding:40px 0; font-size:14px; }

/* 没有任何礼薄时的引导卡片 */
.empty-setup { padding:5vh 16px 10vh; }
.es-card { background:#fff; border-radius:18px; padding:30px 22px 26px; text-align:center;
  box-shadow:0 4px 18px rgba(90,60,20,.07); }
.es-art { display:block; width:96px; height:96px; margin:0 auto 14px; }
.es-title { font-size:19px; font-weight:700; color:#3d2b28; letter-spacing:.5px; }
.es-sub { font-size:13.5px; color:#9a8f8a; margin:10px 0 22px; line-height:1.75; }
.es-btn { max-width:280px; margin:0 auto; box-shadow:0 6px 16px rgba(199,154,63,.35); }
/* 一页账都没有时：内容在剩余空间里居中，不留大片空白；
   同时藏掉「点右下角＋」的提示——这时＋按钮本身就没显示，留着只会误导 */
#view-main.no-data { display:flex; flex-direction:column; min-height:100vh; }
#view-main.no-data .empty-setup { flex:1; display:flex; flex-direction:column; justify-content:center; align-items:center; padding:24px 16px; }
#view-main.no-data .es-card { width:100%; }
#view-main.no-data #list-empty { display:none; }
/* 空页文化区：礼尚往来的出处与礼簿小故事，空页也有可读的内容 */
.es-culture { max-width:330px; margin:24px auto 0; text-align:center; }
.es-quote { font-family:"Kaiti SC","STKaiti","KaiTi","FangSong",serif; font-size:15.5px; color:#8a6d3b; line-height:1.9; }
.es-quote-src { display:block; margin-top:4px; font-size:12.5px; color:#b8ac9c; }
.es-story { margin-top:14px; font-size:13px; color:#9a8f8a; line-height:1.95; text-align:justify; }
.es-tags { margin-top:16px; display:flex; justify-content:center; align-items:center; gap:9px;
  font-size:12.5px; color:#8a6d3b; }
.es-tags span { background:#f7efe0; border:1px solid #e5d3b0; border-radius:14px; padding:4px 12px; }
.es-tags i { width:3px; height:3px; border-radius:50%; background:#d9ccb8; }

.fab {
  position:fixed; bottom:26px; right:max(16px,calc(50vw - 264px));
  width:58px; height:58px; border-radius:50%; border:0;
  background:linear-gradient(145deg,#d9483c,#a31f18); color:#fff;
  font-size:32px; line-height:58px; box-shadow:0 6px 18px rgba(160,30,20,.4);
}
.fab:active { transform:scale(.94); }
/* 「补收礼」悬浮按钮：现场记录关闭（查询模式）时显示，给名单上没有的人补记收礼 */
#fab-recv {
  bottom:164px;
  background:linear-gradient(145deg,#e8a13a,#c77a1a);
  font-size:18px; line-height:58px;
  box-shadow:0 6px 18px rgba(200,125,20,.35);
}
/* 「记送礼」悬浮按钮：现场记录关闭（查询模式）时显示，给名单上没有的人补记送礼 */
.fab-give {
  bottom:96px;
  background:linear-gradient(145deg,#3aa95f,#1f7a44);
  font-size:18px; line-height:58px;
  box-shadow:0 6px 18px rgba(30,120,60,.35);
}

/* 详情 */
.detail-head { background:#fff; margin:12px; border-radius:14px; padding:18px; text-align:center; }
.detail-name { font-size:24px; font-weight:700; margin-bottom:6px; }
.detail-sub { font-size:13px; color:#9a8b78; min-height:18px; margin-bottom:10px; }
.detail-badge { font-size:15px; }
.detail-actions { display:flex; gap:10px; padding:0 12px; margin-bottom:12px; }
.btn-half {
  flex:1; height:46px; border-radius:12px; border:0; font-size:16px; font-weight:700;
}
.btn-block { width:100%; height:48px; border-radius:12px; border:0; font-size:16px; font-weight:700; }
.recv-btn { background:#fdecea; color:#b3261e; }
.btn-wx { background:#07c160; color:#fff; }
.btn-wx:active { background:#06ad56; }
.give-btn { background:#e8f3ec; color:#2e7d4f; }
.record-item { align-items:flex-start; }
.ri-dot { width:10px; height:10px; border-radius:50%; margin:6px 12px 0 2px; flex:none; }
.ri-dot.r1 { background:#b3261e; }
.ri-dot.r2 { background:#2e7d4f; }
.ri-main { flex:1; min-width:0; }
.ri-line1 { font-size:16px; font-weight:700; margin-bottom:4px; }
.ri-line1 .r { color:#b3261e; }
.ri-line1 .g { color:#2e7d4f; }
.ri-line2 { font-size:12.5px; color:#9a8b78; }
.ri-line2 .ltag { display:inline-block; background:#f3ece1; border-radius:6px; padding:1px 7px; margin-right:6px; }
.ri-right { margin-left:8px; display:flex; gap:8px; align-items:center; flex:none; }
/* 小药丸按钮：记录上的 改/删、礼薄管理里的 改名/删除 */
.mini-btn {
  padding:6px 13px; font-size:13px; border-radius:16px;
  border:1px solid #e0d6c6; color:#8a7b68; background:#fdfbf7; white-space:nowrap;
}
.mini-btn:active { opacity:.6; }
.mini-btn.danger { color:#b3261e; border-color:#ecd5d2; background:#fdf6f5; }

/* 礼薄管理列表 */
.la-row { display:flex; align-items:center; padding:13px 2px; border-bottom:1px solid #f0ebe3; }
.la-row:last-child { border-bottom:none; }
.la-name { flex:1; min-width:0; font-size:16px; font-weight:700; color:#3a2e22;
  overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.la-cnt { font-size:12px; color:#9a8b78; font-weight:400; margin-left:6px; }
.la-row .mini-btn + .mini-btn { margin-left:8px; }

/* Excel 导入弹窗 */
.btn-file { width:100%; height:46px; border:1px dashed #d9ccb8; border-radius:10px;
  background:#faf7f2; color:#6b5d4c; font-size:14px; }
.btn-file:active { opacity:.7; }
.mi-file-name { font-size:12.5px; color:#8a7b68; margin-top:6px; word-break:break-all; min-height:16px; }
.mi-preview { font-size:12.5px; color:#3a2e22; background:#f6f2ea; border-radius:8px;
  padding:8px 10px; margin-top:8px; line-height:1.7; white-space:pre-wrap;
  max-height:150px; overflow-y:auto; }

/* 导入弹窗录入说明 */
.mi-guide { margin:10px 0; padding:12px; background:#f6f2ea; border-radius:10px;
  font-size:12.5px; line-height:1.8; color:#5a4d3e; }
.mi-guide-title { font-weight:700; margin-bottom:6px; color:#3a2e22; }
.mi-guide-item { margin-bottom:2px; }
.mi-guide-item b { color:#b3261e; }
.btn-template { margin-top:8px; padding:6px 12px; font-size:12px; border:1px solid #d4c9b8;
  background:#fff; border-radius:6px; color:#5a4d3e; cursor:pointer; }
.btn-template:active { opacity:.7; }

/* 拍照识别 / 手动多行录入 */
.mi-btns { display:flex; gap:8px; margin-bottom:8px; }
.mi-btns .btn-file { flex:1; width:auto; }
.btn-photo { border-color:#d98b86; color:#b3261e; background:#fdf7f6; }
.btn-manual { margin-bottom:2px; }
.btn-file:disabled { opacity:.55; }
.sheet-ocr { max-width:560px; }
.ocr-tip { font-size:12.5px; color:#8a7b68; background:#fdf3e3; border-radius:8px;
  padding:8px 10px; line-height:1.6; margin-bottom:4px; }
/* 表头单行四列，与行内输入框一一对齐 */
.ocr-head { display:flex; gap:6px; margin:12px 0 4px; font-size:12px; color:#9a8b78; }
.oh-name { flex:1.4; padding-left:4px; }
.oh-amt { flex:1.1; padding-left:4px; }
.oh-remark { flex:1.4; padding-left:4px; }
.oh-page { flex:.8; padding-left:4px; }
/* 整页批量页码框（独立一行，不参与表头 6 列，窄屏不再被挤） */
.oh-page-all { flex:none; width:58px; height:24px; border:1px solid #e7ddcd; border-radius:6px;
  padding:0 5px; font-size:12px; text-align:center; background:#fff; color:#6b5d4c; margin-left:2px; }
#oh-page-all { flex:1; min-width:0; height:30px; border:1px solid #e7ddcd; border-radius:6px;
  font-size:12px; padding:0 6px; color:#6b5b47; background:#fff; }
.oh-x { flex:none; width:26px; }
.ocr-rows { max-height:44vh; overflow-y:auto; -webkit-overflow-scrolling:touch; }
/* 合计校验条：默认绿，对不上变红 */
.ocr-sum { position:sticky; top:0; z-index:6; margin:8px 0 2px; padding:8px 10px; font-size:12.5px; border-radius:8px;
  background:#e8f3ec; color:#2e7d4f; line-height:1.6; display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.ocr-sum.bad { background:#fdecea; color:#b3261e; }
.oc-cmp { display:flex; gap:16px; flex-wrap:wrap; font-weight:700; }
.oc-cmp .c { display:flex; flex-direction:column; align-items:center; }
.oc-cmp .c span { font-size:11px; opacity:.8; font-weight:600; }
.oc-cmp .c b { font-size:15px; }
.oc-cmp .c.diff.bad b { color:#b3261e; }
.oc-verdict { font-weight:700; }
.ocr-row { display:flex; gap:6px; align-items:center; background:#faf7f2; border-radius:10px; padding:6px; margin-bottom:6px; }
/* 行内输入框覆盖 .sheet input 的全宽样式（单行四列：姓名/礼金/备注/页码） */
.ocr-row input { height:38px !important; border:1px solid #e7ddcd; border-radius:8px;
  padding:0 6px !important; font-size:16px !important; background:#fff; }
.ocr-row .oi-name { flex:1.4; min-width:0; }
.ocr-row .oi-amt { flex:1.1; min-width:0; text-align:right; }
.ocr-row .oi-remark { flex:1.4; min-width:0; }
.ocr-row .oi-page { flex:.8; min-width:0; }
.ocr-row .oi-del { flex:none; width:26px; height:26px; border:none; background:transparent;
  color:#b8ac9c; font-size:13px; border-radius:50%; }
.ocr-row .oi-del:active { color:#b3261e; }
/* 行首拖动柄：宽触点，按住直接上下拖（识别漏行时的补救：先加一行，再拖到正确位置） */
.oh-grip { flex:none; width:20px; }
.oi-grip { flex:none; width:40px; align-self:stretch; display:flex; align-items:center; justify-content:center;
  color:#a99a86; font-size:18px; line-height:1; cursor:grab; touch-action:none;
  background:#f0e9dc; border-radius:8px;
  user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; }
.oi-grip:active { background:#e5d9c4; color:#8a7b68; }
.ocr-row.holding { background:#f2e8d8; }
.ocr-row.holding .oi-grip { color:#8a7b68; }
.ocr-row.dragging { background:#fff; z-index:60; box-shadow:0 8px 24px rgba(0,0,0,.18); }
.ocr-row.ph { background:#efe7db; border:1px dashed #cbbda6; }
.ocr-row.flash { animation:ocrFlash 1.2s ease-out; }
@keyframes ocrFlash { 0%{ background:#ffe9bd; } 100%{ background:#faf7f2; } }

/* 拍照后先裁剪对准页面：框住礼簿、裁掉桌面和手指，识别更准 */
.sheet-crop { max-width:560px; display:flex; flex-direction:column; }
/* 缺陷教训：.sheet-btns 全局是 sticky（表单弹窗滚到底自然让位，没问题），
   但裁剪弹窗是要「看着图片操作」的——内容一超高，sticky 按钮条就浮在
   图片上，把最需要框进来的礼簿底部合计栏盖住。这里强制 static + 图片限高，
   保证标题+提示+图+按钮一屏放下，任何机型按钮都不许遮挡图片。 */
.sheet-crop .sheet-btns { position:static; margin-top:14px; }
.crop-stage { position:relative; width:fit-content; max-width:100%; margin:0 auto;
  line-height:0; touch-action:none; user-select:none; -webkit-user-select:none; }
.crop-stage img { max-width:100%; max-height:46vh; border-radius:10px; }
/* box-shadow 无限扩散做框外遮罩 */
.crop-frame { position:absolute; border:2px solid #f5c453; border-radius:4px;
  box-shadow:0 0 0 9999px rgba(0,0,0,.55); cursor:move; }
/* 四角手柄圆心压在裁剪框四角上（框在 sheet 的 20px padding 内，伸出 13px 不会被裁） */
.crop-h { position:absolute; width:26px; height:26px; border-radius:50%;
  background:#f5c453; border:3px solid #fff; box-shadow:0 1px 6px rgba(0,0,0,.45); }
.h-tl { left:-13px; top:-13px; cursor:nwse-resize; }
.h-tr { right:-13px; top:-13px; cursor:nesw-resize; }
.h-bl { left:-13px; bottom:-13px; cursor:nesw-resize; }
.h-br { right:-13px; bottom:-13px; cursor:nwse-resize; }

/* 家庭共享 */
.fam-card { background:#fff; border-radius:14px; padding:14px; margin-bottom:12px;
  box-shadow:0 2px 10px rgba(90,60,20,.06); }
.fam-title { font-size:16px; font-weight:700; margin-bottom:6px; }
.fam-tip { font-size:13px; color:#9a8b78; line-height:1.7; margin-bottom:10px; }
.fam-join { display:flex; gap:8px; align-items:center; }
.fam-join input { flex:1; min-width:0; height:46px; border:1px solid #e7ddcd; border-radius:10px;
  padding:0 12px; letter-spacing:3px; text-transform:uppercase; font-size:18px; }
.fam-join .btn-tool { flex:none; flex-shrink:0; width:84px; height:46px; font-size:15px; }
.fam-code { margin-top:10px; text-align:center; font-size:28px; font-weight:700;
  letter-spacing:8px; color:#b3261e; background:#fdf3f2; border-radius:10px; padding:12px; }
.fam-mrow { display:flex; align-items:center; padding:10px 0; border-bottom:1px solid #f4f0ea; }
.fam-mrow:last-child { border-bottom:none; }
.fm-name { flex:1; min-width:0; font-size:15px; font-weight:600; }
.fm-sub { display:block; font-size:12px; color:#9a8b78; font-weight:400; margin-top:2px; }
.fam-empty { color:#b0a493; font-size:13px; padding:8px 0; }
.who { color:#b3261e; }

/* 弹层：全部垂直+水平居中、顶层显示 */
.modal { position:fixed; inset:0; z-index:100; background:rgba(0,0,0,.45); display:flex; align-items:center; justify-content:center; }
/* 新建/改名礼薄会从「礼薄管理」弹窗里打开，要压在它上面 */
#modal-ledger { z-index:110; }
/* 拍照要求弹窗从「导入」弹窗里弹出，必须压在最顶层 */
#modal-photo-tip { z-index:120; }
.sheet {
  width:100%; max-width:560px; background:#fff; border-radius:18px 18px 0 0;
  padding:20px 20px calc(26px + env(safe-area-inset-bottom));
  max-height:86vh; max-height:86dvh;
  overflow-y:auto; -webkit-overflow-scrolling:touch;
}
.sheet-sm { max-width:560px; }
.ocr-time { font-size:12px; color:#9a8b78; font-weight:400; margin-left:6px; }
.ver-badge { position:fixed; top:6px; left:6px; z-index:9999; font-size:10px; color:#9a8b78;
  background:rgba(255,255,255,.72); padding:2px 6px; border-radius:6px; pointer-events:none; }
.sheet-title { font-size:18px; font-weight:700; text-align:center; margin-bottom:16px; }
.field { display:block; font-size:13px; color:#9a8b78; margin:12px 0 6px; }
.sheet input,.sheet select {
  width:100%; height:46px; border:1px solid #e7ddcd; border-radius:10px; padding:0 14px; background:#fff;
}
.big-input { font-size:24px !important; font-weight:700; color:#b3261e; text-align:center; }
.seg { display:flex; border:1px solid #e7ddcd; border-radius:10px; overflow:hidden; }
.seg-item { flex:1; text-align:center; padding:11px 0; font-size:14px; color:#6b5d4c; }
.seg-item.active { background:#b3261e; color:#fff; font-weight:700; }
/* 按钮栏吸底：字段多的时候内容可以滚，按钮永远贴屏幕底部可见 */
.sheet-btns {
  display:flex; gap:10px; margin-top:12px; padding:12px 0 4px;
  position:sticky; bottom:0; background:#fff;
}
.btn-ghost {
  flex:1; height:46px; border:1px solid #d9ccb8; border-radius:12px; background:#fff; color:#6b5d4c;
}
/* 弹层按钮栏里的主按钮与取消等宽（.btn-primary 默认 width:100%，在 flex 里会把取消挤没） */
.sheet-btns .btn-primary { flex:1; width:auto; }
/* 删除这个人：独立一行文字链接，不与取消/保存抢位 */
.btn-del-link {
  display:block; text-align:center; padding:13px 0 2px;
  font-size:14px; color:#b3261e;
}
.btn-del-link:active { opacity:.6; }
/* 礼薄管理里的同人合并入口：整行宽度，安静不打扰 */
.btn-wide { width:100%; flex:none; margin-top:8px; }
.btn-wide.empty { opacity:.55; }
/* OCR 确认弹窗底部工具行：「＋加一行」与「精准重识」并排等宽 */
.ocr-tools { display:flex; gap:10px; margin-top:8px; }
.ocr-tools .btn-ghost { flex:1; white-space:nowrap; }
/* OCR 弹窗的按钮栏不吸底：吸底会把上方的排序/加行工具行覆盖住（倒序/正序被取消/确认导入遮掉） */
.sheet-ocr .sheet-btns { position:static; margin-top:14px; }

/* 列表工具栏：排序 + 新建宾客 */
.list-tools { display:flex; flex-wrap:wrap; gap:8px; padding:0 14px 10px; }
.btn-tool {
  flex:1; height:46px; border:1px solid #d9ccb8; border-radius:10px;
  background:#fff; color:#6b5d4c; font-size:14px; white-space:nowrap;
}
.btn-tool:active { background:#f5efe3; }
.btn-tool.on { background:#b3261e; border-color:#b3261e; color:#fff; }
/* 现场记录/查询 切换（btn-mode）：开=现场记录(绿)，关=查询模式(整体灰) */
#btn-mode.btn-tool { display:flex; align-items:center; justify-content:center; gap:8px; background:#ececec; border-color:#d6d6d6; color:#9a9a9a; }
#btn-mode .bm-lab { font-size:14px; line-height:1; color:#9a9a9a; }
#btn-mode.on { background:#fff; border-color:#4caf50; color:#4caf50; }
#btn-mode.on .bm-lab { color:#4caf50; }

/* 显示切换（全部/按页）：按钮已并入 .list-tools 一排；此处只留空壳兼容，恒隐藏 */
.view-row { display:none; }
.list-tools .vm-btn { height:46px; font-size:14px; border-radius:10px; font-weight:400; white-space:nowrap; }
.list-tools .vm-btn.active { background:#b3261e; border-color:#b3261e; color:#fff; font-weight:600; }
.vm-btn { flex:1; height:36px; border:1px solid #e7ddcd; border-radius:18px;
  background:#fff; color:#6b5b47; font-size:13.5px; }
.vm-btn.active { background:#b3261e; border-color:#b3261e; color:#fff; font-weight:600; }
.page-nav { display:flex; align-items:center; gap:8px; padding:0 14px; margin-bottom:8px; }
.pg-btn { flex:none; height:38px; padding:0 14px; border:1px solid #e7ddcd; border-radius:19px;
  background:#fff; color:#8a6f3c; font-size:13.5px; font-weight:600; }
.pg-btn:active { background:#f7efe0; }
.pg-input { flex:none; width:64px; height:38px; border:1px solid #e7ddcd; border-radius:10px;
  text-align:center; font-size:16px; font-weight:700; color:#5b4a36; background:#fff; }
.pg-info { flex:1; text-align:right; font-size:11.5px; color:#a08a6a; min-width:0; }
/* 按页显示时的本页小计：钉在礼薄 chips 行尾（「礼薄管理」后面），跟 chips 同一行 */
.page-subtotal { flex:none; padding:6px 10px; background:#fdf3e3; border-radius:8px;
  font-size:12.5px; color:#8a7b68; white-space:nowrap; }
.page-subtotal b { color:#b3261e; font-weight:700; }
.stat-eye { margin-left:5px; color:#c9b899; cursor:pointer; display:inline-block; vertical-align:-2px; }
.stat-eye:hover { color:#b3261e; }
.acct-phone { font-size:14px; color:#9a8b78; margin:6px 0 12px; }
.acct-btn { width:100%; height:46px; margin-top:10px; }
.acct-divider { font-size:14px; color:#9a8b78; text-align:center; margin:18px 0 10px; border-top:1px solid #eee5d5; padding-top:14px; }
/* 数字输入框去掉上下调节箭头，防止记账时误触 */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { -webkit-appearance:none; margin:0; }
input[type=number] { -moz-appearance:textfield; appearance:textfield; }

/* toast */
.toast {
  position:fixed; left:50%; bottom:90px; transform:translateX(-50%); z-index:200;
  background:rgba(40,30,22,.92); color:#fff; padding:10px 20px; border-radius:22px; font-size:14px;
  max-width:86%; text-align:center;
}


/* 登录页账号备忘 */
.login-help{margin-top:14px;text-align:center}
.login-help .btn-ghost { background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.5); color:#f7e7c9; }
.login-help a{color:#8a4b32;font-size:13px}
.help-box{margin-top:14px;background:#fdf6ee;border:1px solid #f0dfc8;border-radius:10px;padding:12px 14px;text-align:left}
.help-title{font-size:13px;font-weight:600;color:#8a4b32;margin-bottom:6px}
.help-box .help-title{margin-top:12px}
.help-box .help-title:first-child{margin-top:0}
.help-line{font-size:13px;color:#444;line-height:1.8}
.help-line b{color:#b3261e}
.help-tel{color:#b3261e;font-weight:600;text-decoration:none;border-bottom:1px dashed #e0b4ad}
.help-note{font-size:12px;color:#999;margin-top:8px}
.help-scroll{max-height:60vh;overflow-y:auto;padding:4px 6px 12px;text-align:left}
.help-scroll .help-title{margin-top:12px}
.help-scroll .help-title:first-child{margin-top:0}
.help-item{margin-top:10px;border:1px solid #f0dfc8;border-radius:8px;background:#fff}
.help-item>summary{list-style:none;cursor:pointer;padding:11px 12px;font-size:13px;font-weight:600;color:#8a4b32;position:relative;padding-right:28px}
.help-item>summary::-webkit-details-marker{display:none}
.help-item>summary:after{content:'＋';position:absolute;right:12px;top:50%;transform:translateY(-50%);color:#c99a7e;font-weight:600}
.help-item[open]>summary:after{content:'－'}
.help-body{padding:2px 12px 12px;font-size:13px;color:#444;line-height:1.8}
.ac-body{padding:4px 6px 10px;text-align:left}
.ac-tip{font-size:13px;color:#444;line-height:1.8;margin:0 0 12px}
.ac-input{width:100%;box-sizing:border-box;padding:11px 12px;border:1px solid #e0cfb8;border-radius:8px;font-size:15px;background:#fffdf8}
.ac-body .msg{margin-top:8px}

.pwd-body { text-align:center; }
/* 拍照录入：左=要求列表左对齐，右=竖屏实例图框 */
#modal-photo-tip .pwd-body { display:flex; align-items:flex-start; gap:12px; text-align:left; }
#modal-photo-tip .photo-tip-left { flex:1; min-width:0; }
#modal-photo-tip .photo-tip-right { flex:none; width:122px; height:172px; border:1px solid #e8ddcd; border-radius:10px; overflow:hidden; background:#f7f3ec; }
#modal-photo-tip .photo-tip-right img { width:100%; height:100%; object-fit:cover; display:block; }
.pwd-body textarea { width:100%; box-sizing:border-box; padding:11px 12px; border:1px solid #e0cfb8; border-radius:8px; font-size:15px; background:#fffdf8; resize:vertical; font-family:inherit; text-align:left; }
.pwd-img { max-width:100%; border-radius:10px; box-shadow:0 2px 10px rgba(0,0,0,.12); }
.pwd-tip { font-size:12.5px; color:#9a8b78; line-height:1.7; margin:10px 4px 0; }
#ml-year { width:100%; box-sizing:border-box; padding:11px 12px; border:1px solid #e0cfb8; border-radius:8px; font-size:15px; background:#fffdf8; color:#5b4a36; }
.field-tip { font-size:12px; color:#9a8b78; margin-top:6px; }
.ledger-meta { margin:0 0 10px; padding:9px 12px; background:#fdf3e3; border-radius:8px; text-align:center; font-size:15px; font-weight:700; color:#b3261e; }
.cal-head { display:flex; align-items:center; justify-content:space-between; padding:2px 4px 12px; }
.cal-nav { font-size:22px; color:#b3261e; padding:0 14px; cursor:pointer; user-select:none; }
.cal-title { font-size:15px; font-weight:700; color:#5b4a36; }
.cal-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:4px; text-align:center; }
.cal-wd { font-size:11px; color:#9a8b78; padding:5px 0; }
.cal-cell { padding:9px 0; border-radius:8px; font-size:14px; color:#5b4a36; background:#fffdf8; cursor:pointer; }
.cal-cell.empty { background:transparent; cursor:default; }
.cal-cell.sel { background:#b3261e; color:#fff; font-weight:700; }
/* 年历弹窗：提到最上层、居中完整显示，手机上也整屏可见不被遮挡 */
#modal-cal { align-items:center; z-index:110; }
#modal-cal .sheet { border-radius:18px; }
@media (max-width:420px){
  .cal-cell { padding:7px 0; font-size:13px; }
  .cal-grid { gap:2px; }
}

/* ============ 数据分析看板 ============ */
#modal-dashboard { align-items:center; z-index:110; }
#modal-dashboard .sheet { max-width:480px; }
.db-body { font-size:13px; color:#5b4a36; }
.db-overview { display:flex; gap:8px; margin-bottom:4px; }
.db-ov-item { flex:1; background:#fdf3e3; border:1px solid #eecf9a; border-radius:10px; padding:10px 6px; text-align:center; }
.db-ov-item b { display:block; font-size:17px; color:#b3261e; }
.db-ov-item span { font-size:11.5px; color:#8a4b32; }
.db-sec { margin-top:14px; }
.db-h { font-size:13px; font-weight:700; color:#8a4b32; margin-bottom:8px; border-left:3px solid #b3261e; padding-left:7px; }
.db-chart { display:flex; align-items:flex-end; gap:6px; min-height:86px; padding:2px 2px 0; }
.db-col { flex:1; display:flex; flex-direction:column; align-items:center; gap:3px; min-width:0; }
.db-col .db-bars { display:flex; align-items:flex-end; gap:2px; height:64px; width:100%; }
.db-col .bar { width:50%; min-height:2px; border-radius:2px 2px 0 0; }
.db-col .bar.recv { background:#d9483c; }
.db-col .bar.give { background:#2f9e6e; }
.db-col .db-lb { font-size:10px; color:#9a8b78; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:64px; }
.db-empty { color:#9a8b78; font-size:12.5px; padding:6px 2px; }
.db-occ-row { display:flex; align-items:center; gap:8px; padding:4px 0; }
.db-occ-name { flex:0 0 44px; font-size:12.5px; color:#5b4a36; }
.db-occ-bar { flex:1; height:14px; background:#f3e9dd; border-radius:7px; overflow:hidden; }
.db-occ-fill { height:100%; border-radius:7px; background:#c99a7e; }
.db-occ-num { flex:0 0 auto; font-size:11.5px; color:#8a4b32; }
.db-list-row { display:flex; justify-content:space-between; align-items:center; padding:7px 8px; border:1px solid #f0dfc8; border-radius:8px; margin-bottom:6px; }
.db-list-name { font-weight:600; color:#5b4a36; font-size:13px; }
.db-list-nums { font-size:12px; color:#8a4b32; }
.btn-danger { background:#fdecec; color:#b3261e; border:1px solid #f0c4c0; }
.acct-del-note { font-size:12px; color:#b3261e; margin-top:8px; text-align:center; }
/* 顶部试用剩余天数（靠左） */
.trial-days { font-size:11px; font-weight:400; color:#ffe08a; margin:0 6px 0 0; letter-spacing:0; background:rgba(0,0,0,.14); border-radius:4px; padding:1px 5px; vertical-align:middle; white-space:nowrap; align-self:center; }
/* 分享弹窗：一屏完整显示，禁止内部滚动 */
#modal-share .sheet { overflow:visible; max-height:none; padding:16px 18px 18px; }
#modal-share .sheet-title { font-size:16px; margin-bottom:10px; }
#modal-share .share-qr { margin:8px 0 !important; }
#modal-share .share-qr img { width:118px !important; height:118px !important; }
#modal-share .sheet-btns { margin-top:8px; padding:8px 0 2px; }
/* 升级中心 */
.up-tip { font-size:13px; color:#b3261e; text-align:center; margin:0 0 12px; }
.up-guide { background:#fdf3e3; border:1px solid #ecd9c6; border-radius:10px; padding:10px 12px; margin:0 0 12px; }
.up-guide-title { font-size:14px; font-weight:700; color:#8a4a15; margin-bottom:6px; }
.up-guide-item { font-size:13px; color:#6b4a22; margin:3px 0 0 4px; }
.up-card { border:1px solid #ecd9c6; border-radius:12px; padding:12px; margin-bottom:12px; }
.up-card-title { font-size:15px; font-weight:700; color:#8a4a15; margin-bottom:8px; }
.up-body { font-size:13px; color:#6b5d4c; }
.up-desc { line-height:1.6; margin:0 0 10px; }
.up-pay-qr { width:150px; height:150px; display:block; margin:0 auto 10px; border-radius:10px; }
.up-pay-box { border:1px dashed #d9a45c; border-radius:10px; padding:10px; margin:0 0 12px; background:#fff8ec; }
.up-pay-box .btn-ghost { margin-bottom:4px; }
.up-hint { font-size:13px; color:#b3261e; text-align:center; margin:6px 0 0; }
.up-progress { font-size:14px; color:#b3261e; font-weight:700; margin:0 0 10px; }
.up-upload { display:flex; align-items:center; gap:8px; margin:0 0 10px; }
.up-upload input[type=file] { display:none; }
#up-group-name-input { width:100%; padding:9px 12px; border:1px dashed #b98a5a; border-radius:10px;
  color:#5b4a36; background:#fff8f0; font-size:15px; margin:0 0 10px; }
.up-file-btn { flex:0 0 auto; padding:8px 12px; border:1px dashed #b98a5a; border-radius:10px; color:#8a4a15; background:#fff8f0; font-size:13px; cursor:pointer; }
.up-file-name { font-size:12px; color:#9a8b78; flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
/* 合伙人徽标 */
.partner-badge { display:inline-block; font-size:10px; color:#fff; background:linear-gradient(135deg,#c07a1d,#8a4a15); border-radius:3px; padding:1px 5px; vertical-align:middle; margin-left:3px; }
.tel-link { color:#b3261e; font-weight:700; text-decoration:underline; }
.up-sec { font-size:14px; font-weight:700; color:#6b4a22; margin:16px 0 8px; }
.up-sec-pay { border-top:1px dashed #e6d3b8; padding-top:12px; margin-top:18px; color:#b3261e; }

/* 横屏锁竖屏：手机旋转到横屏时，页面仍按竖屏版式居中显示（宽度=竖屏宽度=视口高度），
   两侧深色留白，内容可上下滚动；仅高度较小的横屏（手机）生效，桌面/平板宽屏不受影响 */
@media (orientation: landscape) and (max-height: 520px) {
  body { background:#1a1815; }
  #app { width:100vh; max-width:100vw; min-height:0; }
  #view-main { height:auto; min-height:100vh; overflow-y:auto; }
  #view-login { min-height:100vh; }
}

/* 识别中全屏遮罩：拍照/相册/裁剪识别期间显示，遮挡操作防止并发 */
#ocr-busy-overlay { position:fixed; inset:0; z-index:99999; display:flex; align-items:center; justify-content:center; background:rgba(0,0,0,.55); }
#ocr-busy-overlay.hidden { display:none; }
.ocr-busy-box { display:flex; flex-direction:column; align-items:center; gap:14px; padding:30px 38px; border-radius:16px; background:#fff; box-shadow:0 8px 30px rgba(0,0,0,.3); }
.ocr-spinner { width:46px; height:46px; border:4px solid rgba(0,0,0,.12); border-top-color:#2f7d4f; border-radius:50%; animation:ocrspin .9s linear infinite; }
@keyframes ocrspin { to { transform:rotate(360deg); } }
.ocr-busy-text { font-size:16px; color:#333; font-weight:600; }

/* 换薄/跳页警告弹窗：盖在识别结果弹窗之上，醒目提示可能拿错礼薄 */
#modal-swap-warn { z-index:130; }
#modal-swap-warn .sheet { max-width:340px; }
#modal-swap-warn .sheet-btns { justify-content:center; }

