/* 团队记账 · 甜笺 Sweet Journal 设计系统
   模块印色：靛蓝 #35597D（账本 / 理性）+ 金额金 #C99A3F */

:root {
  --bg: #F4F2EE;
  --card: #FFFFFF;
  --ink: #24292E;
  --ink-soft: #616B75;
  --ink-faint: #98A1AA;
  --line: #E3E5E8;
  --indigo: #35597D;
  --indigo-deep: #274563;
  --indigo-soft: #E8EEF5;
  --gold: #C99A3F;
  --gold-soft: #FBF3E2;
  --red: #C25336;
  --red-soft: #FBEAE4;
  --radius-lg: 18px;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(39, 69, 99, .10);
  --shadow-soft: 0 4px 14px rgba(39, 69, 99, .07);
  --display: Georgia, "Times New Roman", "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
/* 去掉数字输入框的上下微调箭头，输入区更干净 */
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; }
a { color: inherit; }
.hidden { display: none !important; }

/* ── hero ── */
.ledger-hero {
  position: relative;
  background: linear-gradient(135deg, #1F3A55 0%, #35597D 52%, #4E7EA8 100%);
  color: #fff;
  padding: clamp(26px, 5vw, 44px) clamp(20px, 5vw, 40px) 84px;
  overflow: hidden;
}
.ledger-hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1.6px);
  background-size: 22px 22px;
  pointer-events: none;
}
.hero-inner { max-width: 720px; margin: 0 auto; position: relative; }
.ledger-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(32px, 6.4vw, 44px);
  margin: 22px 0 8px;
  letter-spacing: .04em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .18);
}
.ledger-title::after {
  content: "";
  display: block; width: 46px; height: 4px; border-radius: 4px;
  margin-top: 12px;
  background: linear-gradient(90deg, var(--gold), #EFD08A);
}
.ledger-tagline { margin: 14px 0 0; color: rgba(255, 255, 255, .88); font-size: 14.5px; letter-spacing: .04em; }
.hero-deco { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 64px; display: block; }

/* ── 版心与卡片 ── */
.ledger-shell { max-width: 720px; margin: -56px auto 0; padding: 0 clamp(18px, 4.5vw, 36px) 60px; position: relative; }
.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: clamp(18px, 4vw, 24px);
  margin-bottom: 16px;
  /* 不加 fill-mode：动画只是「淡入」，即使因隐藏未播放也保持可见 */
  animation: rise .4s ease;
}
.card:first-child { box-shadow: var(--shadow); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.card__title {
  font-family: var(--display);
  font-size: 19px; font-weight: 600;
  margin: 0 0 2px;
}
.card__sub { margin: 0 0 14px; font-size: 13px; color: var(--ink-faint); }

/* ── 表单 ── */
.field { margin-bottom: 12px; }
.field input {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: #FBFCFD;
  color: var(--ink);
  outline: none;
  font-size: 15px;
  transition: border-color .2s, box-shadow .2s;
}
.field input::placeholder { color: var(--ink-faint); }
.field input:focus { border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(53, 89, 125, .12); }
/* 邀请码：等宽大字，视觉上像 6 个格子 */
.code-input {
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 26px !important;
  letter-spacing: .34em;
  text-indent: .34em;
  text-transform: uppercase;
  padding: 14px 10px !important;
  background: var(--indigo-soft) !important;
  border-color: #CFDCE9 !important;
}
.btn {
  width: 100%;
  padding: 14px 18px;
  border: 0; border-radius: 999px;
  font-size: 15px; font-weight: 600; letter-spacing: .08em;
  cursor: pointer;
  transition: all .2s;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
}
.btn--primary {
  background: linear-gradient(135deg, var(--indigo-deep), var(--indigo));
  color: #fff;
  box-shadow: 0 8px 20px rgba(39, 69, 99, .28);
}
.btn--primary:hover { filter: brightness(1.07); transform: translateY(-1px); }
.btn--primary:disabled { opacity: .6; cursor: wait; transform: none; }

/* ── 我的队伍列表 ── */
.team-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 8px; }
.team-item {
  display: flex; align-items: center; gap: 10px;
  background: #FBFCFD; border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .18s, background .18s;
}
.team-item:hover { border-color: var(--indigo); background: #fff; }
.team-item__open {
  flex: 1; min-width: 0;
  display: flex; align-items: baseline; gap: 10px;
  padding: 11px 13px; border: 0; background: transparent;
  text-align: left; cursor: pointer; font: inherit; color: inherit;
}
.team-item__name {
  font-family: var(--display); font-size: 15.5px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.team-item__code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px; letter-spacing: .12em;
  color: var(--indigo); background: var(--indigo-soft);
  border-radius: 999px; padding: 2px 9px;
  white-space: nowrap;
}
.team-item__time { margin-left: auto; font-size: 11.5px; color: var(--ink-faint); white-space: nowrap; }
/* 单条删除：平时低调，按住/悬停才显红，避免顺手误点 */
.team-item__del {
  flex: none; width: 32px; height: 32px; margin-right: 7px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%; background: transparent;
  color: #C3C9CF; cursor: pointer;
  transition: background .15s, color .15s;
}
.team-item__del:hover, .team-item__del:focus-visible { background: var(--red-soft); color: var(--red); }
.team-item__del:active { background: #F6DCD3; }
.team-empty { padding: 14px 4px; font-size: 13px; color: var(--ink-faint); text-align: center; }
.team-hint { margin: 10px 2px 0; font-size: 11.5px; line-height: 1.6; color: var(--ink-faint); }
.card.is-empty .team-hint { display: none; }

/* ── 队伍头 ── */
.team-head__top { display: flex; align-items: center; gap: 10px; }
.team-head__name { font-family: var(--display); font-size: 21px; font-weight: 600; margin: 0; flex: 1; min-width: 0; }
.team-head__exit {
  border: 1.5px solid var(--line); background: #fff; color: var(--ink-soft);
  border-radius: 999px; padding: 6px 14px; font-size: 12.5px; cursor: pointer;
  transition: all .18s;
}
.team-head__exit:hover { border-color: var(--red); color: var(--red); }

/* 队头信息行：成员 chips + 加人输入；邀请码收进「邀请」面板，把版面让给记账 */
.team-head__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.team-head__share {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1.5px solid var(--line); background: #fff; color: var(--indigo);
  border-radius: 999px; padding: 6px 13px; font-size: 12.5px; cursor: pointer;
  transition: all .18s;
}
.team-head__share:hover { border-color: var(--indigo); background: var(--indigo-soft); }
.members { display: flex; flex-wrap: wrap; gap: 7px; }
.members:empty { display: none; }
.member-chip {
  font-size: 12.5px; color: var(--ink-soft);
  background: #F4F6F8; border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 11px; line-height: 1.45;
}
/* 添加成员：虚线输入框，回车即加入名单 */
.member-add {
  flex: 1 1 76px; min-width: 68px;
  border: 1.5px dashed var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  background: transparent;
  color: var(--ink-soft);
  outline: none;
  transition: border-color .18s, border-style .18s, color .18s;
}
.member-add::placeholder { color: var(--ink-faint); }
.member-add:focus { border-style: solid; border-color: var(--indigo); color: var(--ink); background: #FBFCFD; }

/* ── 统计卡 ── */
.stat__main { display: flex; flex-direction: column; gap: 2px; }
.stat__label { font-size: 12px; letter-spacing: .18em; color: var(--ink-faint); }
.stat__num {
  font-family: var(--display);
  font-size: clamp(34px, 8vw, 46px);
  font-weight: 600;
  line-height: 1.15;
  color: var(--indigo-deep);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
  transition: transform .25s ease;
}
.stat__num.is-bump { transform: scale(1.04); }
/* 当日还没记账时主数字淡化，避免「¥0.00」抢视线 */
.stat__num.is-zero { color: var(--ink-faint); }
.stat__sub { font-size: 12.5px; color: var(--ink-faint); margin-top: 1px; }
.stat__grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 12px 10px;
  margin-top: 14px; padding-top: 14px;
  border-top: 1px dashed var(--line);
}
@media (min-width: 560px) {
  .stat__grid { grid-template-columns: repeat(4, 1fr); }
}
.stat__item { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.stat__item span { font-size: 11.5px; color: var(--ink-faint); letter-spacing: .1em; }
.stat__item b {
  font-size: 17px; font-weight: 600; color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stat__item:first-child b { color: var(--gold); }
.stat__item i { font-style: normal; font-size: 11.5px; color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── 结算 ── */
.settle__head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.settle__head h3 { font-family: var(--display); font-size: 18px; font-weight: 600; margin: 0; }
.settle__head span { font-size: 12px; color: var(--ink-faint); }
.settle-list { list-style: none; margin: 0; padding: 0; }
.settle-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0;
  border-top: 1px dashed var(--line);
}
.settle-row:first-child { border-top: 0; }
.settle-row__nick {
  font-size: 14.5px; font-weight: 600;
  min-width: 4em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.settle-row__nums {
  flex: 1; min-width: 0;
  display: flex; gap: 12px; flex-wrap: wrap;
  font-size: 11.5px; color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}
.settle-row__nums b { color: var(--ink-soft); font-weight: 600; }
.settle-row__diff {
  font-size: 15px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.settle-row__diff.is-plus { color: var(--gold); }
.settle-row__diff.is-minus { color: var(--red); }
.settle-row__diff.is-zero { color: var(--ink-faint); font-weight: 500; font-size: 13px; }
.settle-suggest {
  margin-top: 12px; padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.settle-suggest__title {
  font-size: 11.5px; letter-spacing: .14em; color: var(--ink-faint);
  margin-bottom: 8px;
}
.settle-tip {
  display: flex; align-items: center; gap: 8px;
  background: var(--indigo-soft);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 7px;
  font-size: 14px;
}
.settle-tip:last-child { margin-bottom: 0; }
.settle-tip__from, .settle-tip__to { font-weight: 600; }
.settle-tip__arrow { color: var(--indigo); font-size: 13px; }
.settle-tip__fen {
  margin-left: auto;
  font-weight: 700; color: var(--gold);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.settle-done {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; color: var(--ink-soft);
  background: #F4F6F8; border-radius: var(--radius); padding: 10px 12px;
}
.settle-empty { padding: 14px 4px; font-size: 13px; color: var(--ink-faint); text-align: center; }

/* ── AA 快速算账 ── */
.aa__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.aa__head h3 { font-family: var(--display); font-size: 18px; font-weight: 600; margin: 0; }
.aa__head span { font-size: 12px; color: var(--ink-faint); }
/* 「用本次金额」：把最近一笔的金额一键填进算账框 */
.aa__use {
  border: 1.5px solid var(--line); background: #fff; color: var(--indigo);
  border-radius: 999px; padding: 5px 12px; font-size: 12.5px; cursor: pointer;
  font-variant-numeric: tabular-nums;
  transition: all .18s;
}
.aa__use:hover { border-color: var(--indigo); background: var(--indigo-soft); }
.aa__use:disabled { opacity: .45; cursor: not-allowed; }
.aa__input {
  display: flex; align-items: center; gap: 8px;
  border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 0 12px; background: #FBFCFD;
  transition: border-color .2s, box-shadow .2s;
}
.aa__input:focus-within { border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(53, 89, 125, .12); }
.aa__yuan { color: var(--gold); font-size: 19px; font-weight: 700; }
.aa__input input {
  flex: 1; min-width: 0;
  border: 0; background: transparent; outline: none;
  font-size: 22px; font-weight: 600; color: var(--ink);
  font-variant-numeric: tabular-nums;
  padding: 11px 0;
}
.aa__input input::placeholder { color: #C7CDD4; font-weight: 400; }
.aa__clear {
  border: 0; background: transparent; color: var(--ink-faint);
  font-size: 12.5px; cursor: pointer; padding: 4px 2px;
}
.aa__clear:hover { color: var(--indigo); }
.aa__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.aa-cell {
  border: 1.5px solid var(--line);
  background: #FBFCFD;
  border-radius: var(--radius);
  padding: 9px 6px 8px;
  text-align: center;
  cursor: pointer;
  transition: all .18s;
}
.aa-cell:hover { border-color: var(--indigo); background: #fff; transform: translateY(-1px); }
.aa-cell:active { transform: none; }
.aa-cell__n { display: block; font-size: 11.5px; color: var(--ink-faint); letter-spacing: .06em; }
.aa-cell__v {
  display: block;
  font-size: 15.5px; font-weight: 700; color: var(--indigo-deep);
  font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.aa-cell.is-empty .aa-cell__v { color: #C7CDD4; font-weight: 500; }
.aa-cell.is-hit { animation: pop .3s ease; }
@keyframes pop { 50% { transform: scale(.94); } }
.aa__tip { margin: 10px 0 0; font-size: 11.5px; color: var(--ink-faint); text-align: center; }

/* ── 记一笔 ── */
.add__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.add__head .card__title { margin: 0; }
.add__hint { font-size: 12px; color: var(--ink-faint); }

.add__row { margin-bottom: 10px; }
.add__row input {
  width: 100%;
  border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; background: #FBFCFD; outline: none; font-size: 15px;
  transition: border-color .2s, box-shadow .2s;
}
.add__row input:focus { border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(53, 89, 125, .12); }
.add__row--money { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 0 14px; background: #FBFCFD; transition: border-color .2s, box-shadow .2s; }
.add__row--money:focus-within { border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(53, 89, 125, .12); }
.add__row--money input { border: 0; background: transparent; padding: 12px 0; font-size: 25px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.add__yuan { color: var(--gold); font-size: 21px; font-weight: 700; }
/* 记一笔是这张卡的主操作：按钮再厚一点，和下面的次要素材拉开层级 */
.add .btn--primary { padding: 15px 18px; font-size: 15.5px; }
/* ── 记账日期（可补记往日） ── */
.add__date { margin: 4px 0 12px; }
.date-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.add__date input[type="date"] {
  flex: 1 1 150px; min-width: 0;
  border: 1.5px solid var(--line); border-radius: 10px;
  padding: 8px 11px;
  font-size: 14px; color: var(--ink); background: #fff;
  font-variant-numeric: tabular-nums;
  transition: border-color .18s, box-shadow .18s;
}
.add__date input[type="date"]:focus {
  outline: none; border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(53, 89, 125, .10);
}
.date-quick { display: flex; gap: 6px; }
.date-chip {
  border: 1.5px solid var(--line); background: #fff; color: var(--ink-soft);
  border-radius: 999px; padding: 5px 11px; font-size: 12.5px; cursor: pointer;
  transition: all .18s;
}
.date-chip:hover { border-color: var(--indigo); color: var(--indigo); }
.date-chip.is-active { background: var(--indigo); border-color: var(--indigo); color: #fff; font-weight: 600; }

.add__payer { margin: 4px 0 14px; }
.add__payer-label { display: block; font-size: 12px; letter-spacing: .12em; color: var(--ink-faint); margin-bottom: 7px; }
.payer-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 8px; }
.payer-chips:empty { display: none; }
.payer-chip {
  border: 1.5px solid var(--line); background: #fff; color: var(--ink-soft);
  border-radius: 999px; padding: 5px 13px; font-size: 13px; cursor: pointer;
  transition: all .18s;
}
.payer-chip:hover { border-color: var(--indigo); color: var(--indigo); }
.payer-chip.is-active { background: var(--indigo); border-color: var(--indigo); color: #fff; font-weight: 600; }
.add__payer input {
  width: 100%;
  border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 10px 14px; background: #FBFCFD; outline: none; font-size: 14px;
}
.add__payer input:focus { border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(53, 89, 125, .12); }

/* ── 流水 ── */
.list__head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.list__head h3 { font-family: var(--display); font-size: 18px; font-weight: 600; margin: 0; }
.list__refresh {
  margin-left: auto;
  border: 1.5px solid var(--line); background: #fff; color: var(--ink-soft);
  border-radius: 999px; padding: 5px 13px; font-size: 12.5px; cursor: pointer;
  transition: all .18s;
}
.list__refresh:hover { border-color: var(--indigo); color: var(--indigo); }
.record-list { list-style: none; margin: 0; padding: 0; }
/* ── 流水按日期分组 ── */
.record-day { list-style: none; }
.record-day__head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 13px 0 5px;
  border-top: 1px dashed var(--line);
}
.record-day:first-child .record-day__head { border-top: 0; padding-top: 2px; }
.record-day__label {
  font-family: var(--display); font-size: 14px; font-weight: 600;
  color: var(--indigo-deep); letter-spacing: .02em;
}
.record-day__sum { font-size: 11.5px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.record-day__list { list-style: none; margin: 0; padding: 0; }

.record-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 0;
  border-top: 1px dashed var(--line);
  animation: rise .3s ease;
}
.record-item:first-child { border-top: 0; }
.record-item__main { flex: 1; min-width: 0; }
.record-item__title {
  display: block; font-size: 15px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.record-item__meta { display: flex; gap: 8px; font-size: 11.5px; color: var(--ink-faint); }
.record-item__payer { color: var(--indigo); }
.record-item__amount {
  font-size: 16.5px; font-weight: 700; color: var(--ink);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.record-item__del {
  flex: none;
  border: 0; background: transparent; color: var(--ink-faint);
  font-size: 12.5px; cursor: pointer; padding: 6px 4px;
  border-radius: 8px;
  transition: color .18s, background .18s;
}
.record-item__del:hover { color: var(--red); background: var(--red-soft); }
.record-item__del.is-confirm { color: #fff; background: var(--red); font-weight: 600; }
.record-empty { padding: 18px 4px; font-size: 13px; color: var(--ink-faint); text-align: center; }

.ledger-foot {
  margin-top: 26px; padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 12px; color: var(--ink-faint); text-align: center;
}

/* ── toast ── */
.toast {
  position: fixed;
  left: 50%; bottom: calc(30px + env(safe-area-inset-bottom));
  transform: translate(-50%, 16px);
  background: rgba(36, 41, 46, .93);
  color: #fff; font-size: 13.5px;
  padding: 10px 20px; border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
  opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s;
  z-index: 90; max-width: 86vw; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── 移动端 ── */
@media (max-width: 640px) {
  .ledger-hero { padding-bottom: 76px; }
  .ledger-shell { margin-top: -48px; }
  .aa__grid { gap: 7px; }
  .aa-cell__v { font-size: 14.5px; }
  .stat__grid { gap: 6px; }
  .stat__item b { font-size: 15.5px; }
  .toast { bottom: calc(22px + env(safe-area-inset-bottom)); }
}

/* ─────────────────────────────────────────
   昵称前置：进门先起名字
   ───────────────────────────────────────── */
.nickname { border: 1.5px solid #CFDCE9; }
.nickname .card__title { font-size: 22px; }
.nick-line {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 18px;
}
.nick-line__text { font-size: 14.5px; color: var(--ink-soft); }
.nick-line__text b { color: var(--indigo-deep); font-weight: 700; }
.nick-line__edit {
  border: 1.5px solid var(--line); background: #fff; color: var(--ink-soft);
  border-radius: 999px; padding: 5px 13px; font-size: 12.5px; cursor: pointer;
  transition: all .18s;
}
.nick-line__edit:hover { border-color: var(--indigo); color: var(--indigo); }

/* ── 用途快捷选择 ── */
.use-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 10px; }
.use-chip {
  border: 1.5px solid var(--line); background: #fff; color: var(--ink-soft);
  border-radius: 999px; padding: 5px 13px; font-size: 13px; cursor: pointer;
  transition: all .18s;
}
.use-chip:hover { border-color: var(--indigo); color: var(--indigo); }
.use-chip.is-active { background: var(--indigo); border-color: var(--indigo); color: #fff; font-weight: 600; }

/* ── AA：分摊方式切换 ── */
.aa__modes {
  display: flex; gap: 3px; margin-top: 12px;
  background: #F1F4F7; border: 1px solid #E6EBF0;
  border-radius: 999px; padding: 3px;
}
.aa-mode {
  flex: 1; border: 0; background: transparent; color: var(--ink-soft);
  border-radius: 999px; padding: 7px 10px; font-size: 13px; cursor: pointer;
  transition: background .18s, color .18s;
}
.aa-mode:hover { color: var(--indigo); }
.aa-mode.is-active {
  background: #fff; color: var(--indigo-deep); font-weight: 600;
  box-shadow: 0 1px 3px rgba(53, 89, 125, .14);
}

/* ── AA：几人分摊 + 每人多少 ── */
.aa__people { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.aa__people-label { font-size: 12.5px; color: var(--ink-faint); letter-spacing: .06em; }
.aa__stepper {
  display: inline-flex; align-items: center; gap: 2px;
  border: 1.5px solid var(--line); border-radius: 999px;
  padding: 2px; background: #FBFCFD;
}
.aa__step {
  width: 30px; height: 30px; border: 0; border-radius: 50%;
  background: transparent; color: var(--indigo);
  font-size: 17px; font-weight: 600; line-height: 1; cursor: pointer;
  transition: background .18s;
}
.aa__step:hover { background: var(--indigo-soft); }
.aa__step:disabled { opacity: .32; cursor: not-allowed; }
.aa__stepper b {
  min-width: 30px; text-align: center;
  font-family: var(--display); font-size: 17px; font-weight: 700;
  color: var(--indigo-deep); font-variant-numeric: tabular-nums;
}
.aa__people-total { font-size: 12.5px; color: var(--ink-faint); }
.aa__result {
  margin-top: 12px; padding: 13px 15px;
  border-radius: var(--radius); background: var(--indigo-soft);
  border: 1px dashed #CFDCE9;
}
.aa__result-num {
  display: block;
  font-family: var(--display); font-size: 27px; font-weight: 700;
  color: var(--indigo-deep); font-variant-numeric: tabular-nums; line-height: 1.2;
}
.aa__result-note { display: block; font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }

/* ── 分享面板（点「邀请」弹出，给出可直接加入的链接） ── */
.share-panel {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(20, 17, 13, .42);
}
.share-panel__box {
  width: 100%; max-width: 360px;
  background: var(--card); border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(20, 17, 13, .28);
  padding: 22px 20px;
  animation: rise .22s ease;
}
.share-panel__title { font-family: var(--display); font-size: 19px; font-weight: 600; margin: 0 0 6px; }
.share-panel__desc { margin: 0 0 14px; font-size: 13px; color: var(--ink-faint); line-height: 1.6; }
.share-panel__code { margin: 0 0 10px; font-size: 13px; color: var(--ink-soft); }
.share-panel__code b {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 19px; font-weight: 700; letter-spacing: .12em;
  color: var(--indigo-deep); font-variant-numeric: tabular-nums;
}
.share-panel__link {
  margin: 0 0 16px; padding: 10px 12px;
  background: #FBFCFD; border: 1px solid var(--line); border-radius: 10px;
  font-size: 12px; color: var(--ink-soft);
  word-break: break-all; line-height: 1.5;
}
.share-panel__acts { display: flex; flex-direction: column; gap: 8px; }

/* 次要按钮 */
.btn--ghost { background: #fff; color: var(--ink-soft); border: 1.5px solid var(--line); }
.btn--ghost:hover { border-color: var(--indigo); color: var(--indigo); }
/* 危险操作（删除）：确认弹层里用 */
.btn--danger { background: var(--red); color: #fff; }
.btn--danger:hover { filter: brightness(1.06); transform: translateY(-1px); }

/* ── 分享面板：微信卡片预览（和微信抓取 og meta 后的样式一致） ── */
.share-card-preview {
  display: flex; gap: 10px; align-items: flex-start;
  background: #F4F6F8; border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px; margin: 0 0 12px;
}
.share-card-preview img {
  width: 56px; height: 56px; border-radius: 6px;
  object-fit: cover; flex: none; background: #fff;
}
.share-card-preview__body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.share-card-preview__body b {
  font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.share-card-preview__body span {
  font-size: 11.5px; color: var(--ink-faint); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.share-card-preview__body i { font-style: normal; font-size: 10.5px; color: #B3BAC2; margin-top: 2px; }
/* 微信内分享引导（仅微信 UA 显示） */
.share-panel__wx {
  margin: 0 0 12px; padding: 9px 12px;
  background: var(--gold-soft); border-radius: var(--radius);
  font-size: 12px; color: #8A6A2F; line-height: 1.6;
}

/* AA 网格：当前选中的分摊人数高亮 */
.aa-cell.is-active {
  border-color: var(--indigo);
  background: var(--indigo-soft);
  box-shadow: 0 0 0 2px rgba(53, 89, 125, .14);
}
.aa-cell.is-active .aa-cell__n { color: var(--indigo); }

/* ── 队头：成员按钮 + 记账/明细页签 ── */
.team-head__btn {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1.5px solid var(--line); background: #fff; color: var(--indigo);
  border-radius: 999px; padding: 6px 13px; font-size: 12.5px; cursor: pointer;
  transition: all .18s;
}
.team-head__btn:hover { border-color: var(--indigo); background: var(--indigo-soft); }
.team-head__btn b {
  font-weight: 700; color: var(--indigo-deep);
  font-variant-numeric: tabular-nums;
}
.team-tabs {
  display: flex; gap: 3px; margin-top: 12px;
  background: #F1F4F7; border: 1px solid #E6EBF0;
  border-radius: 999px; padding: 3px;
}
.team-tab {
  flex: 1; border: 0; background: transparent; color: var(--ink-soft);
  border-radius: 999px; padding: 8px 10px; font-size: 13.5px; cursor: pointer;
  transition: background .18s, color .18s;
}
.team-tab:hover { color: var(--indigo); }
.team-tab.is-active {
  background: #fff; color: var(--indigo-deep); font-weight: 600;
  box-shadow: 0 1px 3px rgba(53, 89, 125, .14);
}

/* ── 成员面板：名单 + 各自垫付 + 添加 ── */
.member-panel__list {
  list-style: none; margin: 0 0 12px; padding: 0;
  max-height: 264px; overflow: auto;
}
.member-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 2px;
  border-top: 1px dashed var(--line);
  font-size: 14px;
}
.member-row:first-child { border-top: 0; }
.member-row__nick {
  font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.member-row__paid {
  flex: none; font-size: 12px; color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}
.member-row--empty { justify-content: center; color: var(--ink-faint); font-size: 12.5px; padding: 14px 2px; }
.member-panel__add { display: flex; gap: 8px; margin-bottom: 12px; }
.member-panel__add .member-add {
  flex: 1; min-width: 0;
  border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 10px 14px; font-size: 14px;
  background: #FBFCFD; color: var(--ink);
}
.member-panel__add .member-add:focus { border-color: var(--indigo); }
.member-add__btn {
  flex: none; border: 0; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--indigo-deep), var(--indigo));
  color: #fff; font-size: 13.5px; font-weight: 600;
  padding: 0 18px; cursor: pointer;
  transition: filter .18s;
}
.member-add__btn:hover { filter: brightness(1.07); }

/* 成员面板：我的手机号绑定状态 */
.member-phone {
  display: flex; align-items: center; gap: 8px;
  background: var(--indigo-soft); border-radius: var(--radius);
  padding: 9px 12px; margin-bottom: 12px;
  font-size: 13px; color: var(--indigo-deep);
}
.member-phone__text { flex: 1; min-width: 0; }
.member-phone__act {
  flex: none; border: 0; background: transparent; color: var(--indigo);
  font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 4px 6px;
  border-radius: 8px; transition: background .18s;
}
.member-phone__act:hover { background: rgba(53, 89, 125, .12); }
.member-phone__act.is-quiet { color: var(--ink-faint); font-weight: 400; }

/* 名单里的手机尾号徽标 */
.member-row__phone {
  font-style: normal; font-size: 10.5px; color: var(--indigo);
  background: var(--indigo-soft);
  border-radius: 999px; padding: 1px 7px; margin-left: 6px;
  vertical-align: 1px; white-space: nowrap;
}

/* 付款人提示（无独立输入框，chips 即选择） */
.add__payer-hint { margin: 2px 0 0; font-size: 11.5px; color: var(--ink-faint); }

/* ── 记一笔内：分摊设置（小按钮 + 红字结果，设置在弹窗里） ── */
/* ── 分账（次级区：记账才是主角，这里只有两个金额放大） ── */
.split-bar {
  display: flex; align-items: center; gap: 8px;
  margin-top: 16px; padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.split-bar__label { font-size: 11.5px; letter-spacing: .12em; color: var(--ink-faint); }
.split-set-btn {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1.5px solid var(--line); background: #fff; color: var(--ink-soft);
  border-radius: 999px; padding: 4px 11px; font-size: 12px; cursor: pointer;
  transition: all .18s;
}
.split-set-btn:hover { border-color: var(--indigo); color: var(--indigo); }
/* 结果面板：淡暖底 + 细边，让它是「次要容器」，但内部数字是主角 */
.split-out {
  margin-top: 9px; padding: 11px 13px 12px;
  background: #FFFCFA; border: 1px solid #F1E8E2; border-radius: 12px;
}
.split-out__ctx { margin: 0 0 7px; font-size: 11.5px; line-height: 1.55; color: #A8998F; }
.split-out__main {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px;
  margin: 0; font-size: 12.5px; color: var(--ink-soft);
}
.split-out__cell { white-space: nowrap; }
.split-out__cell b {
  margin-left: 5px; font-size: 20px; font-weight: 700; color: #B23A20;
  letter-spacing: -.01em; font-variant-numeric: tabular-nums;
}
.split-out__sep { color: #DCD0C9; }
.split-out__note { margin: 6px 0 0; font-size: 11.5px; color: #B98A78; }

/* 分摊设置弹窗 */
.split-opts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.split-opt {
  display: flex; flex-direction: column; gap: 2px; text-align: left;
  border: 1.5px solid var(--line); background: #FBFCFD; border-radius: var(--radius);
  padding: 10px 13px; cursor: pointer; font: inherit; color: inherit;
  transition: border-color .15s, background .15s;
}
.split-opt b { font-size: 14px; font-weight: 600; color: var(--ink); }
.split-opt span { font-size: 12px; color: var(--ink-faint); }
.split-opt.is-active { border-color: var(--indigo); background: var(--indigo-soft); }
.split-opt.is-active b { color: var(--indigo-deep); }
.split-pop-people {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 6px;
}
.split-pop-label { font-size: 13px; color: var(--ink-soft); }
.split-pop-stepper {
  display: inline-flex; align-items: center; gap: 1px;
  border: 1.5px solid var(--line); border-radius: 999px;
  padding: 1px; background: #FBFCFD;
}
.split-step {
  width: 26px; height: 26px; border: 0; border-radius: 50%;
  background: transparent; color: var(--indigo);
  font-size: 15px; font-weight: 600; line-height: 1; cursor: pointer;
  transition: background .15s;
}
.split-step:hover { background: rgba(53, 89, 125, .12); }
.split-step:disabled { opacity: .3; cursor: not-allowed; }
.split-pop-stepper b {
  min-width: 24px; text-align: center;
  font-size: 14px; font-weight: 600; color: var(--indigo-deep);
  font-variant-numeric: tabular-nums;
}
.split-pop-note { margin: 0 0 4px; font-size: 12px; color: var(--ink-faint); }
.split-pop-preview { margin: 0 0 14px; font-size: 13.5px; color: var(--ink); }
.split-pop-preview b { font-size: 16px; color: #B23A20; font-variant-numeric: tabular-nums; }

/* ── 用途枚举：本机可增删 ── */
.use-chip { position: relative; }
.use-chip--add { border-style: dashed; color: var(--ink-faint); }
.use-chip--add:hover { color: var(--indigo); border-color: var(--indigo); }
.use-chip__del {
  position: absolute; top: -7px; right: -6px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--red); color: #fff;
  font-style: normal; font-size: 13px; line-height: 17px; text-align: center;
  font-weight: 700; cursor: pointer;
  box-shadow: 0 1px 4px rgba(194, 83, 54, .35);
}
.use-manage {
  align-self: center;
  border: 0; background: transparent; color: var(--ink-faint);
  font-size: 12px; cursor: pointer; padding: 5px 6px;
  transition: color .18s;
}
.use-manage:hover { color: var(--indigo); }
.use-custom { display: flex; gap: 8px; }
.use-custom input { width: auto; flex: 1; min-width: 0; }
.use-keep {
  flex: none; border: 1.5px solid var(--indigo); background: #fff; color: var(--indigo);
  border-radius: var(--radius); padding: 0 16px; font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: all .18s;
}
.use-keep:hover { background: var(--indigo-soft); }
