/* user-layout.css · 个人后台重排版（2026-09-21 技术美术）
   目标：把「我的记录」和「账户与积分」两套原本割裂的卡片系统统一成同一套视觉语言；
   用「概览条 + 主/侧双列 + 整宽底部」替代原来一排通栏长卡片。
   注意：本文件必须在 user-credits.css 之后加载（覆盖 .lb-card 外观）。 */

/* ---------- 页面外壳 ---------- */
.udash { background: var(--cream); padding: 40px 0 72px; }
.udash__wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }

/* ---------- 页头 ---------- */
.udash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; }
.udash-eyebrow { display: inline-block; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; font-weight: 700; color: var(--clay); margin-bottom: 10px; }
.udash-head h1 { font-family: var(--serif); font-size: clamp(28px, 1.4rem + 2vw, 40px); line-height: 1.1; margin: 0; color: var(--ink); }
.udash-head p { color: var(--muted); font-size: 15px; margin: 8px 0 0; }

.udash-account { display: flex; align-items: center; gap: 12px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 7px 10px 7px 8px; }
.udash-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--jade); color: #fff; display: grid; place-items: center; font-family: var(--serif); font-size: 16px; font-weight: 600; flex: 0 0 auto; }
.udash-account__txt { display: grid; line-height: 1.3; }
.udash-account__mail { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.udash-account__state { font-size: 12px; color: var(--muted); }
.udash-account .btn { padding: 8px 16px; font-size: 13px; }

/* ---------- 区块小标题 ---------- */
.udash-title { display: flex; align-items: center; gap: 14px; margin: 32px 0 16px; font-family: var(--serif); font-size: 19px; color: var(--ink); }
.udash-title::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--line); }

/* ---------- 栅格 ---------- */
.udash-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.udash-col { display: grid; gap: 20px; align-content: start; }
.udash-sub { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.udash-full { margin-top: 20px; display: grid; gap: 20px; }

/* ---------- 统一卡片外观（.user-card 与 .lb-card 拉齐） ---------- */
.user-card, .lb-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px 26px;
  box-shadow: 0 1px 2px rgba(38, 33, 27, .04);
}
.user-card h2 { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 17px; color: var(--jade); margin: 0 0 16px; }
.lb-card__title { font-family: var(--serif); font-size: 18px; color: var(--jade); margin: 0; }
.lb-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.lb-eyebrow { display: block; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; font-weight: 700; color: var(--clay); margin-bottom: 8px; }
.lb-note, .user-card .empty { color: var(--muted); font-size: 13px; }
.user-record { margin-top: 4px; }

/* ---------- 积分概览条 ---------- */
.udash-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  background: linear-gradient(135deg, var(--jade-soft) 0%, var(--paper) 100%);
  border: 1px solid var(--line); border-radius: 20px; padding: 24px 28px;
  box-shadow: 0 1px 2px rgba(38, 33, 27, .04);
}
.udash-hero__left { display: flex; align-items: flex-end; gap: 14px; }
.udash-hero__num { font-family: var(--serif); font-size: 56px; line-height: 1; font-weight: 600; color: var(--jade); }
.udash-hero__unit { font-size: 15px; color: var(--ink-soft); padding-bottom: 8px; }
.udash-hero__meta { margin-top: 10px; font-size: 13px; color: var(--muted); }
.udash-hero__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.udash-hero__actions .btn { padding: 11px 20px; font-size: 14px; }

/* ---------- 7 天新手签到卡片（2026-09-21 改版：紧凑 / 领完即隐 / 当天脉动） ----------
   ⚠️ 这些规则必须留在 user-layout.css（本页最后加载的一张表）：user-credits.css 与
   credits-ui.css 里也有同名的 .lb-day 基础样式，三者权重相同，只能靠加载顺序决出胜负，
   放前面会被后面的基础样式盖掉「已签/今天」的高亮。 */
.lb-signin-card { padding: 15px 17px; }
.lb-signin-card .lb-eyebrow { font-size: 10px; margin-bottom: 6px; }
.lb-signin-card .lb-card__title { font-size: 15px; }

.lb-signin { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.lb-signin--compact { margin-top: 11px; }
.lb-day { padding: 7px 3px; text-align: center; border-radius: 9px; background: var(--cream-2); border: 1px solid var(--line-soft); }
.lb-day__n { font-size: 10px; color: var(--muted); font-weight: 600; }
.lb-day__pts { font-family: var(--serif); font-size: 15px; color: var(--jade); margin: 2px 0 0; }
.lb-day .lb-note { font-size: 9px; }
.lb-day--done { background: var(--jade-soft); border-color: var(--jade-300); }
.lb-day--done .lb-day__n, .lb-day--done .lb-day__pts { color: var(--jade); }
.lb-day--today { border-color: var(--clay); box-shadow: 0 0 0 2px var(--lb-gold, #C2A14E); }

/* 当天还没领 → 整张卡片金色脉动（取代原来的弹窗提醒）。卡片内没有任何按钮/文字提示。 */
@keyframes lbSigninPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(194, 161, 78, 0), 0 1px 2px rgba(38, 33, 27, .04); }
  50%      { box-shadow: 0 0 0 6px rgba(194, 161, 78, .20), 0 10px 26px rgba(194, 161, 78, .22); }
}
.lb-signin-card--due { border-color: var(--lb-gold, #C2A14E); animation: lbSigninPulse 2.4s ease-in-out infinite; }
/* 无障碍：系统开了「减少动态效果」时改用静态描边 */
@media (prefers-reduced-motion: reduce) {
  .lb-signin-card--due { animation: none; box-shadow: 0 0 0 3px rgba(194, 161, 78, .28); }
}

/* ---------- 邀请码行 ---------- */
.lb-row { display: flex; gap: 10px; align-items: center; }
/* 只读邀请码很长时，flex 会把「复制」按钮压到比文字还窄（2026-10-12 真机 390px：
   按钮被挤成竖排两字 + 旁边一个空胶囊）。按钮不许收缩，输入框自己缩。 */
.lb-row > .btn { flex-shrink: 0; }
.lb-input { flex: 1 1 auto; min-width: 0; }

/* ---------- 积分明细 ---------- */
.lb-hist { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.lb-hist li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 2px; border-bottom: 1px dashed var(--line-soft); font-size: 14px; color: var(--ink-soft); }
.lb-hist li:last-child { border-bottom: 0; }
.lb-hist li b { font-family: var(--serif); font-size: 15px; }

/* ---------- 充值档位 ---------- */
.lb-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.lb-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lb-plan { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: grid; gap: 6px; align-content: start; }
.lb-plan--feature { border-color: var(--jade-300); background: var(--jade-soft); }
.lb-plan__name { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--clay); }
.lb-plan__price { font-family: var(--serif); font-size: 26px; color: var(--jade); }
.lb-plan__meta { font-size: 12.5px; color: var(--muted); }
.lb-plan__btn { margin-top: 8px; justify-content: center; }

/* ---------- 症状记录：紧凑表格行（样式语言对齐参考工作台：发丝线 + 沙色 hover + 逐行浮现） ---------- */
#customSymptomsSection .user-record-item {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto auto;
  gap: 10px 15px; align-items: center;
  background: transparent; border: none; border-bottom: 1px solid var(--line-soft);
  border-radius: 10px; padding: 13px 12px; margin: 0;
  transition: background .3s;
  animation: recordRowIn .48s cubic-bezier(.16, 1, .3, 1) backwards;
}
#customSymptomsSection .user-record-item:nth-child(1) { animation-delay: .04s; }
#customSymptomsSection .user-record-item:nth-child(2) { animation-delay: .09s; }
#customSymptomsSection .user-record-item:nth-child(3) { animation-delay: .14s; }
#customSymptomsSection .user-record-item:nth-child(4) { animation-delay: .19s; }
#customSymptomsSection .user-record-item:nth-child(5) { animation-delay: .24s; }
#customSymptomsSection .user-record-item:nth-child(n+6) { animation-delay: .29s; }
@keyframes recordRowIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
#customSymptomsSection .user-record-item:hover { background: var(--cream-2); }
#customSymptomsSection .user-record-item.record-expanded { background: var(--paper); }
#customSymptomsSection .record-title-group { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
#customSymptomsSection .record-title-group h4 {
  margin: 0; font-size: 14.5px; font-family: var(--sans); font-weight: 600; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto;
}
#customSymptomsSection .record-title-group p {
  margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5;
  display: block; -webkit-line-clamp: unset; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1 1 auto; min-width: 0;
}
#customSymptomsSection .user-record-item.record-expanded .record-title-group { flex-wrap: wrap; }
#customSymptomsSection .user-record-item.record-expanded .record-title-group h4 { white-space: normal; }
#customSymptomsSection .user-record-item.record-expanded .record-title-group p { white-space: normal; }
#customSymptomsSection .user-record-item > .badge {
  font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
  background: var(--jade-soft); color: var(--jade); white-space: nowrap;
}
#customSymptomsSection .record-date { font-size: 12px; color: var(--muted); white-space: nowrap; }
#customSymptomsSection .user-record-body { grid-column: 1 / -1; margin-top: 2px; padding-top: 12px; border-top: 1px dashed var(--line-soft); }
#customSymptomsSection .user-record-del {
  width: 24px; height: 24px; border: none; background: transparent; color: var(--muted);
  font-size: 13px; border-radius: 6px;
}
#customSymptomsSection .user-record-del:hover { color: var(--clay); background: var(--cream-2); }
@media (max-width: 720px) {
  #customSymptomsSection .user-record-item { grid-template-columns: 1fr auto auto; }
  #customSymptomsSection .record-title-group { grid-column: 1 / -1; }
}

/* 表头行：让"表格感"成立 */
#customSymptomsSection .record-thead {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto auto;
  gap: 10px 15px; align-items: center;
  padding: 8px 12px; border-bottom: 1px solid var(--line);
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--muted);
}
@media (max-width: 720px) { #customSymptomsSection .record-thead { display: none; } }

/* 大师客服历史对话（详情弹窗内） */
.mc-log-list { display: grid; gap: 12px; margin-top: 14px; }
.mc-log-row { display: flex; gap: 10px; align-items: flex-start; }
.mc-log-user { flex-direction: row-reverse; }
.mc-log-who {
  flex: 0 0 auto; font-size: 11px; font-weight: 700; color: var(--muted);
  padding: 4px 9px; border-radius: 999px; background: var(--cream-2); align-self: center;
}
.mc-log-master .mc-log-who { background: var(--jade-soft); color: var(--jade); }
.mc-log-bubble { max-width: 78%; padding: 10px 14px; border-radius: 14px; font-size: 14px; line-height: 1.65; background: var(--cream-2); color: var(--ink-soft); word-break: break-word; }
.mc-log-user .mc-log-bubble { background: var(--jade-soft); color: var(--ink); }

/* ---------- 记录详情弹窗（动态放大；质感同参考工作台：奶油面板 + 大圆角 + 柔和长影） ---------- */
.record-modal { position: fixed; inset: 0; z-index: 120; visibility: hidden; pointer-events: none; }
.record-modal.open { visibility: visible; pointer-events: auto; }
.record-modal__mask { position: absolute; inset: 0; background: rgba(70, 58, 46, .35); opacity: 0; transition: opacity .28s; }
.record-modal.open .record-modal__mask { opacity: 1; }
.record-modal__panel {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%) scale(.88); opacity: 0;
  width: min(680px, 92vw); max-height: 84vh; display: flex; flex-direction: column;
  background: var(--white); border: 1px solid var(--line); border-radius: 22px;
  box-shadow: 0 4px 12px rgba(70, 58, 46, .08), 0 18px 48px rgba(70, 58, 46, .1);
  transition: transform .34s cubic-bezier(.34, 1.46, .64, 1), opacity .2s;
}
.record-modal.open .record-modal__panel { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.record-modal__head { display: flex; align-items: baseline; gap: 14px; padding: 22px 56px 14px 26px; border-bottom: 1px solid var(--line-soft); }
.record-modal__head h3 { margin: 0; font-family: var(--serif); font-size: 19px; color: var(--ink); }
.record-modal__meta { font-size: 12px; color: var(--muted); }
.record-modal__close {
  position: absolute; top: 14px; right: 14px; width: 32px; height: 32px;
  border-radius: 50%; border: 1px solid var(--line); background: var(--paper);
  color: var(--muted); cursor: pointer; font-size: 14px; line-height: 1;
  transition: color .2s, border-color .2s, transform .2s;
}
.record-modal__close:hover { color: var(--clay); border-color: var(--clay); transform: rotate(90deg); }
.record-modal__body { padding: 18px 26px 26px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
@media (prefers-reduced-motion: reduce) {
  .record-modal__panel, .record-modal__mask, #customSymptomsSection .user-record-item { animation: none; transition: none; }
}

/* ---------- 未登录 ---------- */
.user-grid { display: block; }
.user-dashboard--locked .udash-hero { display: none; }
.udash-credits { padding: 0 0 72px; }
.udash-grid--account { margin-top: 20px; }
.udash-hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.user-dashboard--locked .user-grid { display: none; }
.user-locked-notice { margin-top: 14px; padding: 12px 16px; background: var(--jade-soft); border: 1px solid var(--line); border-radius: 12px; font-size: 14px; color: var(--ink); }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .udash-grid { grid-template-columns: 1fr; }
  .udash-head { align-items: flex-start; }
}
@media (max-width: 600px) {
  .udash { padding: 28px 0 56px; }
  .udash__wrap { padding: 0 16px; }
  .udash-sub { grid-template-columns: 1fr; }
  .udash-hero { padding: 20px; }
  .udash-hero__num { font-size: 44px; }
  .lb-grid, .lb-grid--2 { grid-template-columns: 1fr; }
  .user-card, .lb-card { padding: 20px 18px; }
}

/* ---------- 2026-09-21：页头改版 ---------- */
/* ① 账号胶囊整块隐藏：账号/退出登录在站点页眉（shared-nav）里已有，此处是重复展示。
      节点保留不删 —— user.js(user.js:58) 与 user-credits.js(lbLogout/lbUserEmail) 仍在引用。 */
.udash-head .udash-account { display: none !important; }

/* ② 页头两栏：左欢迎语 / 右「每日 & 签到」+「邀请好友」卡片（已确认：左右并排） */
.udash-head--cards {
  display: grid;
  grid-template-columns: minmax(0, .78fr) minmax(0, 2.22fr);
  gap: 30px;
  align-items: start;
  margin-bottom: 28px;
}
.udash-head__cards { display: grid; gap: 20px; grid-template-columns: 1fr 1fr; }

@media (max-width: 980px) {
  .udash-head--cards { grid-template-columns: 1fr; }
  .udash-head__cards { grid-template-columns: 1fr; }
}

/* ============================================================================
   2026-09-21 二次改版（用户拍板四条）：
     ① 新手签到做短一点，别把邀请好友卡片挤变形；
     ② 签到做一个月连续签到（长期循环）；
     ③ 每天签到的分数按「递增阶梯 + 里程碑大奖」设计；
     ④ 退积分工单 + 积分明细 收小，一排放 2 个。
   预览与自检：user/ui-preview-signin-month-20260921.html（70 项断言全过后再并入本文件）。
   ============================================================================ */

/* ---------- ① 页头两卡：签到卡收窄到 300px，邀请卡拿回剩余宽度 ----------
   改前是 1fr 1fr 各一半，而签到卡里 7 个格子每格还带「第N天 / 分」两行字，
   7 格铺满整条 → 邀请卡的文案被压成窄条全部换行。 */
.udash-head__cards--narrow { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); align-items: start; }

/* ---------- ② 新手签到迷你格：格子里只有分数（第几天走 tooltip） ---------- */
.lb-signin-mini { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 10px; }
.lb-pip {
  text-align: center; padding: 5px 0 4px; border-radius: 7px;
  font-size: 10.5px; font-weight: 700;
  background: var(--cream-2); border: 1px solid var(--line-soft); color: var(--muted);
}
.lb-pip--done { background: var(--jade-soft); border-color: var(--jade-300); color: var(--jade); }
.lb-pip--today { background: #fff; border-color: var(--lb-gold, #C2A14E); color: var(--clay);
                 box-shadow: 0 0 0 2px rgba(194, 161, 78, .25); }

/* ---------- ③ 本月签到（月历卡）—— 长期循环，跟在余额条下方 ---------- */
.lb-month { margin-top: 20px; }
.lb-month__head { align-items: flex-start; }
.lb-month__streak { font-family: var(--serif); font-size: 16px; color: var(--ink); margin-top: 2px; }
.lb-month__streak b { font-size: 30px; color: var(--jade); line-height: 1; margin: 0 3px; }

/* 整体进度条（按连签天数占本月天数的比例） */
.lb-mbar { position: relative; height: 7px; border-radius: 999px; background: var(--cream-2); margin: 16px 0 0; overflow: hidden; }
.lb-mbar__fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px;
                 background: linear-gradient(90deg, var(--jade-300), var(--jade)); transition: width .4s; }

/* 三档里程碑（7 天 20 分 / 15 天 40 分 / 满签 100 分） */
.lb-mstones { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.lb-mstone { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); font-weight: 600; }
.lb-mstone__dot { width: 16px; height: 16px; border-radius: 50%; flex: 0 0 auto;
                  border: 2px solid var(--line); background: #fff; position: relative; }
.lb-mstone--hit { color: var(--jade); }
.lb-mstone--hit .lb-mstone__dot { background: var(--jade); border-color: var(--jade); }
.lb-mstone--hit .lb-mstone__dot::after { content: '✓'; position: absolute; inset: 0; color: #fff;
                                         font-size: 10px; line-height: 12px; text-align: center; }

/* 月历网格（周一起始） */
.lb-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 16px; }
.lb-cal__dow { text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); padding-bottom: 2px; }
.lb-cal__cell { position: relative; min-height: 38px; display: grid; place-items: center; border-radius: 9px;
                font-size: 12px; background: var(--cream-2); border: 1px solid var(--line-soft); color: var(--muted); }
.lb-cal__cell--blank { background: transparent; border-color: transparent; }
.lb-cal__cell--future { opacity: .5; }
.lb-cal__cell--done { background: var(--jade-soft); border-color: var(--jade-300); color: var(--jade); font-weight: 700; }
.lb-cal__cell--miss { background: #fff; border-style: dashed; border-color: #d8cbb6; color: #bfae95; }
.lb-cal__cell--today { background: #fff; border-color: var(--lb-gold, #C2A14E); color: var(--clay); font-weight: 700;
                       box-shadow: 0 0 0 2px rgba(194, 161, 78, .28); animation: lbCalPulse 2.4s ease-in-out infinite; }
.lb-cal__cell--todaydone { background: var(--jade); border-color: var(--jade); color: #fff; font-weight: 700;
                           box-shadow: 0 0 0 2px rgba(47, 74, 60, .18); }
/* 里程碑日（7 / 15 / 月末）：虚框 + 右上角小星标，不占用格子中间的数字位置 */
.lb-cal__cell--mile { outline: 1px dashed #cbbfa6; outline-offset: -3px; }
.lb-cal__cell--mile::after { content: '★'; position: absolute; top: 1px; right: 3px; font-size: 8px;
                             line-height: 1; color: var(--gold, #B58E54); }

@keyframes lbCalPulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(194, 161, 78, .28); }
  50%      { box-shadow: 0 0 0 7px rgba(194, 161, 78, .14); }
}
/* 无障碍：系统开了「减少动态效果」时不要闪 */
@media (prefers-reduced-motion: reduce) {
  .lb-cal__cell--today { animation: none; }
  .lb-mbar__fill { transition: none; }
}

/* ---------- ④ 账户与积分：退积分工单 + 积分明细 一排放 2 个，各自收小 ---------- */
.udash-2col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.udash-2col .lb-card { padding: 18px 20px; }
.udash-2col .lb-card__title { font-size: 16px; }
.udash-2col .lb-note { font-size: 12px; }
.udash-2col .lb-card__head { margin-bottom: 12px; }
.udash-2col .lb-hist li { padding: 9px 2px; font-size: 13px; }

@media (max-width: 980px) {
  .udash-head__cards--narrow { grid-template-columns: 1fr; }
  .udash-2col { grid-template-columns: 1fr; }
  .lb-mstones { grid-template-columns: 1fr; }
}

/* ---------- ⑤ 同步失败提示条（2026-09-22）----------
   放在余额条（#udashHero）内部，登录门控由 hero 统一负责，不需要单独显隐逻辑。
   只有当「接口暂时失败」时才显示：照旧画出上次同步到的数据 + 这一行轻提示 + 重试。
   设计上刻意做得克制（米色底 + 一点陶土色圆点），不用红色告警，避免吓到用户。 */
.lb-sync-warn {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 12px; padding: 8px 12px;
  background: var(--cream-2); border: 1px solid var(--line); border-radius: 10px;
  font-size: 13px; color: var(--muted); line-height: 1.5;
}
.lb-sync-warn__dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--clay); }
.lb-sync-warn .btn { margin-left: auto; }
@media (max-width: 640px) {
  .lb-sync-warn .btn { margin-left: 0; }
}

/* ============================================================================
   2026-09-22 三项 UI 改动（用户拍板）
   ① 「退积分工单 + 积分明细」两卡宽高对齐（原来 align-items:start，各随内容高）；
   ② 积分明细卡里只留 3 条，其余走「查看全部」放大弹窗（复用 .record-modal 缩放入场）；
   ③ 新手签到卡从页头右栏搬进余额条中间空位（「今日签到」左侧），格子恢复三行旧效果。
   ⚠️ 这几条必须留在 user-layout.css（本页最后加载的一张表）：credits-ui.css /
      user-credits.css 里也有同名 .lb-day / .lb-card 基础样式，权重相同，
      只能靠加载顺序决出胜负，放前面会被后面的基础样式盖掉。
   ============================================================================ */

/* ---------- ① 两卡对齐：等高 + 内容不撑破格子 ---------- */
.udash-2col { align-items: stretch; }
.udash-2col > .lb-card { display: flex; flex-direction: column; min-width: 0; }
/* 卡头里的长说明换行而不是横向撑破；极长的技术单号允许中途断行 */
.udash-2col .lb-card__head { flex-wrap: wrap; row-gap: 4px; }
.udash-2col .lb-card__head .lb-note { min-width: 0; overflow-wrap: anywhere; }
.udash-2col .lb-hist, .udash-2col #lbRefundTickets { overflow-wrap: anywhere; min-width: 0; }
/* 「查看全部」沉到卡片底部：两卡等高后，右侧卡底部不会空一块 */
.udash-2col .lb-hist__more { margin-top: auto; }

/* ---------- ② 积分明细：卡片只留 3 条 + 「查看全部」--------- */
.lb-hist__more { padding-top: 14px; }
.lb-hist__more-btn {
  display: block; width: 100%; padding: 10px 14px;
  border: 1px dashed var(--line); border-radius: 10px;
  background: var(--paper); color: var(--jade);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}
.lb-hist__more-btn:hover { background: var(--jade-soft); border-color: var(--jade-300); }
.lb-hist__more-btn:focus-visible { outline: 2px solid var(--clay); outline-offset: 2px; }
/* 弹窗里的明细比卡片里宽松一点（弹窗本身约 680px 宽） */
#histModalList.lb-hist li { font-size: 13.5px; }
#histModalList .lb-hist li { padding: 11px 2px; }

/* ---------- ③ 新手签到卡搬家：住进余额条中间，恢复三行格子 ----------
   2026-09-22 穿模修复：user-credits.css 的 .lb-day 带 min-width:92px（7 格最少 680px），
   白卡装不下就把第 6/7 格顶出卡外。这里让它归零收缩，同时白卡吃满中间可用宽度。 */
.udash-hero .lb-signin-card { flex: 1 1 430px; min-width: 0; max-width: 640px; margin: 0; }
.udash-hero .lb-signin { min-width: 0; }
.udash-hero .lb-signin .lb-day { min-width: 0; }
.udash-hero .lb-signin .lb-day__n { white-space: nowrap; }
/* 页头右栏：邀请码卡 + 「邀请记录与优惠券」卡（2026-10-08 用户要补的那一块）。
   两栏各占一半；窄屏退回单列。限宽 560px 是原来单卡时代留下的，
   两卡并排时它会挤压第二张，所以这里改成不 lim。
   🔴 这条必须排在上面那条 @media(max-width:980px) 的「--narrow 退回 1fr」之前：
      它曾写在媒体查询外面（2026-10-12 移动端体检抓到）——同特异性后写者赢，
      窄屏单列规则被顶掉，手机上两张卡并排挤成窄条、复制按钮被压成竖排。 */
.udash-head__cards--narrow { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); align-items: start; }
.udash-head__cards--narrow > .lb-card { max-width: none; }
@media (max-width: 980px) {
  .udash-head__cards--narrow { grid-template-columns: 1fr; }
}
.inv-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.inv-stat { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(120, 96, 72, .10); color: #5a4a3c; white-space: nowrap; }
.inv-sub { margin: 14px 0 6px; font-size: 12.5px; font-weight: 700; letter-spacing: .02em; color: #6b5a4a; }
.inv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.inv-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; padding: 7px 10px; border: 1px solid rgba(120,96,72,.16); border-radius: 9px; background: #fffdf9; }
.inv-list li .inv-main { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-list li .inv-when { color: #8a7a6a; font-size: 11.5px; white-space: nowrap; }
.inv-tag { font-size: 11px; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.inv-tag--ok { background: rgba(46,110,72,.12); color: #2e6e48; }
.inv-tag--wait { background: rgba(150,120,60,.14); color: #7a5f22; }
.inv-tag--used { background: rgba(120,96,72,.14); color: #6b5a4a; }
.inv-empty { color: #8a7a6a; font-style: italic; }

@media (max-width: 980px) {
  .udash-hero .lb-signin-card { flex: 1 1 100%; min-width: 0; max-width: none; }
  .udash-head__cards--narrow > .lb-card { max-width: none; }
  /* 窄屏下格子再紧一点，保证 7 格永远收在卡内 */
  .udash-hero .lb-signin { gap: 4px; }
  .udash-hero .lb-day { padding: 6px 1px; }
  .udash-hero .lb-day__pts { font-size: 13px; }
}
