/* =========================================================
   宝宝积分乐园 · 样式表（粉色主题 / 移动端优先）
   ========================================================= */

:root {
  --pink-50: #fff6f9;
  --pink-100: #ffe9f1;
  --pink-150: #ffdcea;
  --pink-200: #ffcfe0;
  --pink-300: #ffb1c8;
  --pink-400: #ff8eac;
  --pink-500: #ff6f91;
  --pink-600: #f2547d;
  --pink-700: #d93c66;
  --ink: #4a2b36;
  --ink-2: #8f6a7a;
  --ink-3: #b493a1;
  --blue: #5b6bd6;
  --white: #fff;
  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 10px 30px rgba(255, 111, 145, .14);
  --shadow-sm: 0 4px 14px rgba(255, 111, 145, .10);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  background:
    radial-gradient(900px 420px at 90% -8%, #ffe0ec 0%, rgba(255, 224, 236, 0) 62%),
    radial-gradient(760px 380px at -10% 8%, #ffeaf3 0%, rgba(255, 234, 243, 0) 60%),
    linear-gradient(180deg, #fff7fa 0%, #fffdfe 45%, #fff5f9 100%);
  background-attachment: fixed;
  padding-bottom: calc(92px + var(--safe-bottom));
}

a { color: var(--pink-600); text-decoration: none; }
img { max-width: 100%; display: block; }

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; }

.wrap {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 16px 8px;
}

/* ---------------- 顶部栏 ---------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 207, 224, .7);
}

.topbar-back {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--pink-600);
  background: var(--pink-50);
  flex: none;
}
.topbar-back svg { width: 20px; height: 20px; }

.topbar-title {
  flex: 1;
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  padding-right: 38px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-right { flex: none; min-width: 0; }
.topbar-right a {
  font-size: 14px;
  font-weight: 600;
}

/* ---------------- 首页 Hero ---------------- */

.hero {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  padding: 18px;
  color: #fff;
  background: linear-gradient(135deg, #ffa1bb 0%, #ff6f91 52%, #f2547d 100%);
  box-shadow: 0 18px 34px rgba(242, 84, 125, .28);
}

.hero::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -80px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  pointer-events: none;
}
.hero::before {
  content: "";
  position: absolute;
  left: -50px;
  bottom: -90px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .10);
  pointer-events: none;
}

.hero-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.hero-babies {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px;
}
.hero-babies::-webkit-scrollbar { display: none; }

.baby-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px 5px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .22);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, .28);
  flex: none;
  line-height: 1.2;
}

/* 添加宝宝的圆形「＋」按钮 */
.baby-add {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  background: rgba(255, 255, 255, .22);
  border: 1px solid rgba(255, 255, 255, .34);
  color: #fff;
  line-height: 0;
  -webkit-appearance: none;
  appearance: none;
}
.baby-add svg {
  display: block;
  width: 16px;
  height: 16px;
}
.baby-add:active { background: rgba(255, 255, 255, .34); }
.baby-chip.active {
  background: #fff;
  color: var(--pink-600);
  border-color: #fff;
}
.baby-chip .mini-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .55);
  font-size: 14px;
}
.baby-chip .mini-avatar img { width: 100%; height: 100%; object-fit: cover; }

.hero-add {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .2);
  color: #fff;
  flex: none;
  border: 1px solid rgba(255, 255, 255, .3);
}
.hero-add svg { width: 18px; height: 18px; }

.hero-main {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}

.avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  flex: none;
  background: linear-gradient(135deg, #ffe2ec, #ffc9dc);
  font-size: 24px;
  border: 2px solid rgba(255, 255, 255, .7);
  box-shadow: 0 4px 12px rgba(217, 60, 102, .18);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 36px; height: 36px; font-size: 18px; }
.avatar-lg { width: 64px; height: 64px; font-size: 32px; }
.avatar-xl { width: 88px; height: 88px; font-size: 44px; }

.hero-name {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
}
.hero-sub {
  font-size: 12.5px;
  opacity: .92;
  margin-top: 2px;
}

.hero-total {
  margin-left: auto;
  text-align: right;
  flex: none;
}
.hero-total .num {
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -1px;
  text-shadow: 0 2px 12px rgba(151, 22, 58, .2);
}
.hero-total .unit {
  display: block;
  font-size: 11px;
  opacity: .9;
  margin-top: 4px;
  letter-spacing: .5px;
}

/* ---------------- 卡片 ---------------- */

.card {
  background: #fff;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(255, 220, 234, .8);
  margin-top: 14px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.card-title {
  font-size: 15.5px;
  font-weight: 700;
}
.card-sub {
  font-size: 12.5px;
  color: var(--ink-2);
  font-weight: 400;
  margin-left: 6px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin: 18px 2px 10px;
}
.section-title .link { font-size: 12.5px; font-weight: 500; }

/* ---------------- 日历 ---------------- */

.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.cal-title {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.cal-title small { font-size: 12px; color: var(--ink-2); font-weight: 500; }

.cal-nav { display: flex; gap: 6px; }
.cal-nav a, .cal-nav span {
  width: 32px;
  height: 32px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--pink-50);
  color: var(--pink-600);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}
.cal-nav a:active { background: var(--pink-100); }

.cal-dow-row, .cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}
.cal-dow-row { margin-bottom: 6px; }
.cal-dow {
  text-align: center;
  font-size: 11.5px;
  color: var(--ink-3);
  font-weight: 600;
  padding: 2px 0;
}
.cal-dow.weekend { color: var(--pink-500); }

.cal-cell {
  position: relative;
  min-height: clamp(46px, 13.2vw, 62px);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--ink);
  border: 1px solid transparent;
  transition: transform .12s ease, background .12s ease;
}
.cal-cell:active { transform: scale(.96); }
.cal-cell .n {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.1;
}
.cal-cell .p {
  font-size: 10.5px;
  font-weight: 700;
  padding: 0 5px;
  border-radius: 7px;
  line-height: 16px;
  background: var(--pink-100);
  color: var(--pink-700);
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
}
.cal-cell .p.neg {
  background: #eef1ff;
  color: var(--blue);
}
.cal-cell.has {
  background: linear-gradient(180deg, #fff 0%, #fff2f7 100%);
  border-color: var(--pink-150);
  box-shadow: 0 2px 8px rgba(255, 111, 145, .07);
}
.cal-cell.is-today {
  border-color: var(--pink-400);
  box-shadow: 0 0 0 2px rgba(255, 143, 172, .28) inset;
}
.cal-cell.is-today .n { color: var(--pink-600); }
.cal-cell.blank {
  pointer-events: none;
  background: transparent;
  border-color: transparent;
}

.cal-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 12px;
}
.cal-legend .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 3px;
  margin-right: 4px;
  vertical-align: 1px;
}
.cal-legend .dot.up { background: var(--pink-300); }
.cal-legend .dot.down { background: #b9c1f2; }

/* ---------------- 统计小卡 ---------------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.stat {
  background: #fff;
  border-radius: 18px;
  padding: 14px;
  border: 1px solid rgba(255, 220, 234, .8);
  box-shadow: var(--shadow-sm);
}
.stat .label {
  font-size: 12px;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 5px;
}
.stat .value {
  font-size: 24px;
  font-weight: 800;
  margin-top: 4px;
  color: var(--pink-600);
  letter-spacing: -.5px;
}
.stat .value small { font-size: 12px; font-weight: 600; color: var(--ink-3); margin-left: 3px; }
.stat.blue .value { color: var(--blue); }

/* ---------------- 按钮 ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  border: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  text-align: center;
  line-height: 1.2;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary {
  background: linear-gradient(135deg, #ff9ab5 0%, #ff6f91 60%, #f2547d 100%);
  color: #fff;
  box-shadow: 0 10px 22px rgba(242, 84, 125, .28);
}
.btn-soft {
  background: var(--pink-100);
  color: var(--pink-700);
}
.btn-ghost {
  background: #fff;
  color: var(--pink-600);
  border: 1.5px solid var(--pink-200);
}
.btn-danger {
  background: #fff0f4;
  color: #d93c66;
  border: 1.5px solid #ffd3e0;
}
.btn-sm { padding: 8px 12px; font-size: 13px; border-radius: 11px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }

/* ---------------- 表单 ---------------- */

.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field > label, .label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 7px;
}
.field .hint {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 6px;
  line-height: 1.5;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--pink-150);
  background: #fffafc;
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  -webkit-appearance: none;
  appearance: none;
}
textarea { resize: vertical; min-height: 84px; }

input:focus, select:focus, textarea:focus {
  border-color: var(--pink-400);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 143, 172, .16);
}
::placeholder { color: #d3b6c2; }

input[type="date"] { min-height: 46px; }
input[type="file"] {
  width: 100%;
  font-size: 13px;
  color: var(--ink-2);
  padding: 10px;
  border: 1.5px dashed var(--pink-200);
  border-radius: var(--radius-sm);
  background: #fffafc;
}

.field-row { display: flex; gap: 10px; }
.field-row > * { flex: 1; min-width: 0; }

/* ---------------- 认证页 ---------------- */

.auth-page {
  padding-bottom: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
}
.auth-hero {
  text-align: center;
  padding: 22px 0 18px;
}
.auth-logo {
  width: 76px;
  height: 76px;
  margin: 0 auto 12px;
  border-radius: 26px;
  display: grid;
  place-items: center;
  font-size: 38px;
  background: linear-gradient(135deg, #ffe3ed, #ffc2d7);
  box-shadow: 0 14px 28px rgba(255, 111, 145, .25);
}
.auth-title { font-size: 22px; font-weight: 800; letter-spacing: .5px; }
.auth-sub { font-size: 13px; color: var(--ink-2); margin-top: 6px; }

.auth-card {
  background: #fff;
  border-radius: 24px;
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 220, 234, .9);
}
.auth-foot {
  text-align: center;
  font-size: 13.5px;
  color: var(--ink-2);
  margin-top: 18px;
}
.auth-foot a { font-weight: 600; }

/* ---------------- 提示 ---------------- */

.flash {
  padding: 11px 15px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 12px;
  line-height: 1.5;
  animation: flashIn .25s ease;
}
.flash-ok {
  background: #fff1f6;
  color: #b23a5e;
  border: 1px solid #ffd5e3;
}
.flash-error {
  background: #fff4f4;
  color: #c0392b;
  border: 1px solid #ffd7d7;
}
@keyframes flashIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

/* ---------------- 记录列表 ---------------- */

.record-list { display: flex; flex-direction: column; gap: 9px; }

.record {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(255, 224, 236, .95);
  box-shadow: 0 2px 8px rgba(255, 111, 145, .05);
}
.record .ico {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 20px;
  flex: none;
  background: var(--pink-50);
}
.record .body { flex: 1; min-width: 0; }
.record .title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.record .title-text {
  font-size: 14.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.record .pts {
  font-size: 15px;
  font-weight: 800;
  color: var(--pink-600);
  white-space: nowrap;
  flex: none;
}
.record .pts.neg { color: var(--blue); }
.record .meta {
  font-size: 12px;
  color: var(--ink-2);
  margin-top: 3px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: center;
}
.record .meta .who {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--pink-50);
  color: var(--pink-700);
  border-radius: 7px;
  padding: 1px 7px;
  font-weight: 600;
}
.record .remark {
  font-size: 12.5px;
  color: var(--ink-2);
  margin-top: 5px;
  background: #fffafc;
  border-left: 2px solid var(--pink-200);
  padding: 3px 8px;
  border-radius: 0 8px 8px 0;
  word-break: break-word;
}
.record .del {
  flex: none;
  border: none;
  background: transparent;
  color: #d9b6c3;
  padding: 4px;
  cursor: pointer;
  border-radius: 8px;
  line-height: 0;
}
.record .del svg { width: 17px; height: 17px; }
.record .del:hover { color: var(--pink-600); background: var(--pink-50); }

.day-group { margin-bottom: 18px; }
.day-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 4px 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
}
.day-group-head .sum { color: var(--pink-600); }
.day-group-head .sum.neg { color: var(--blue); }

/* ---------------- 日详情 ---------------- */

.day-hero {
  border-radius: 24px;
  padding: 20px;
  color: #fff;
  background: linear-gradient(135deg, #ffa8c0, #ff6f91 65%, #f2547d);
  box-shadow: 0 16px 30px rgba(242, 84, 125, .24);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  overflow: hidden;
}
.day-hero .date { font-size: 17px; font-weight: 700; }
.day-hero .sub { font-size: 12.5px; opacity: .9; margin-top: 4px; }
.day-hero .big {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1;
  text-align: right;
}

/* ---------------- 添加积分 ---------------- */

.rule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.rule {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 12px;
  border-radius: 15px;
  border: 1.5px solid var(--pink-150);
  background: #fff;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: var(--ink);
  transition: border-color .12s ease, background .12s ease, transform .12s ease;
  min-width: 0;
}
.rule:active { transform: scale(.97); }
.rule .emoji { font-size: 20px; flex: none; line-height: 1; }
.rule .t {
  flex: 1;
  font-size: 13.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rule .v { font-size: 13px; font-weight: 800; color: var(--pink-600); flex: none; }
.rule .v.neg { color: var(--blue); }
.rule.active {
  border-color: var(--pink-400);
  background: #fff3f8;
  box-shadow: 0 0 0 3px rgba(255, 143, 172, .16);
}

.amount-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.seg {
  display: flex;
  gap: 4px;
  background: var(--pink-100);
  border-radius: 13px;
  padding: 4px;
  flex: none;
}
.seg button {
  border: none;
  background: transparent;
  padding: 7px 14px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: #b0778c;
  cursor: pointer;
  transition: all .12s ease;
}
.seg button.active {
  background: #fff;
  color: var(--pink-600);
  box-shadow: 0 2px 8px rgba(255, 111, 145, .16);
}
.seg button[data-sign="-1"].active { color: var(--blue); }

.amount-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.amount {
  padding: 12px 0;
  border-radius: 13px;
  border: 1.5px solid var(--pink-150);
  background: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
  transition: all .12s ease;
}
.amount.active {
  border-color: var(--pink-400);
  background: #fff3f8;
  color: var(--pink-600);
  box-shadow: 0 0 0 3px rgba(255, 143, 172, .14);
}

.amount-custom {
  margin-top: 9px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--ink-2);
}
.amount-custom input { width: 110px; }

/* ---------------- 列表行（设置页） ---------------- */

.list { display: flex; flex-direction: column; gap: 8px; }
.list-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 15px;
  background: #fff;
  border: 1px solid rgba(255, 224, 236, .95);
}
.list-row .grow { flex: 1 1 130px; min-width: 0; }
.list-row .name {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.list-row .sub {
  font-size: 12px;
  color: var(--ink-2);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.list-row .row-actions { display: flex; gap: 6px; flex: none; margin-left: auto; }

.month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
}
.month-nav .m-title { font-size: 14.5px; font-weight: 700; }
.month-nav a {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--pink-600);
  background: var(--pink-50);
  padding: 7px 12px;
  border-radius: 11px;
}
.month-nav span.disabled {
  font-size: 13px;
  color: #cbb4bf;
  background: #faf5f7;
  padding: 7px 12px;
  border-radius: 11px;
}

.badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--pink-100);
  color: var(--pink-700);
  line-height: 17px;
}
.badge.admin { background: #ffe6c9; color: #a05b0d; }
.badge.pending { background: #fff3cd; color: #8a6d00; }
.badge.gray { background: #f2eef1; color: var(--ink-2); }

/* ---------------- 标签页 ---------------- */

.tabs {
  display: flex;
  gap: 4px;
  background: #fff;
  padding: 5px;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(255, 224, 236, .9);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  flex: 1;
  text-align: center;
  padding: 9px 6px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
}
.tabs a.active {
  background: linear-gradient(135deg, #ff9ab5, #ff6f91);
  color: #fff;
  box-shadow: 0 6px 14px rgba(242, 84, 125, .24);
}

/* ---------------- 空状态 ---------------- */

.empty {
  text-align: center;
  padding: 30px 16px;
  color: var(--ink-3);
  font-size: 13.5px;
}
.empty .emoji { font-size: 40px; display: block; margin-bottom: 8px; }

/* ---------------- 底部导航 ---------------- */

.nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 207, 224, .8);
  padding-bottom: var(--safe-bottom);
}
.nav-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  justify-content: space-around;
  padding: 7px 10px 8px;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: #b58b9c;
  padding: 6px 18px;
  border-radius: 14px;
  font-weight: 600;
  transition: color .12s ease, background .12s ease;
}
.nav-item svg { width: 22px; height: 22px; }
.nav-item.active { color: var(--pink-600); background: var(--pink-50); }

.fab {
  position: fixed;
  right: 18px;
  bottom: calc(84px + var(--safe-bottom));
  z-index: 35;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #ffa3bd, #ff6f91 60%, #f2547d);
  box-shadow: 0 12px 26px rgba(242, 84, 125, .42);
  transition: transform .15s ease;
}
.fab:active { transform: scale(.94); }
.fab svg { width: 26px; height: 26px; }

/* ---------------- 邀请二维码 ---------------- */

.qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px 0 4px;
}
.qr-box {
  width: 224px;
  height: 224px;
  padding: 12px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--pink-150);
  box-shadow: 0 8px 22px rgba(255, 111, 145, .16);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.qr-box canvas,
.qr-box img {
  display: block;
  width: 200px !important;
  height: 200px !important;
  max-width: 100%;
  border-radius: 6px;
}
.qr-fallback {
  font-size: 12px;
  color: var(--ink-2);
  text-align: center;
  line-height: 1.6;
  padding: 10px;
}
.qr-tip { font-size: 12px; color: var(--ink-3); }
.invite-meta {
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.7;
  margin-top: 6px;
}

/* ---------------- 其他 ---------------- */

.muted { color: var(--ink-2); font-size: 13px; }
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.divider { height: 1px; background: var(--pink-100); margin: 14px 0; }

.footer-note {
  text-align: center;
  font-size: 11.5px;
  color: var(--ink-3);
  padding: 22px 0 12px;
}

.day-picker {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.day-picker::-webkit-scrollbar { display: none; }

/* 桌面端微调 */
@media (min-width: 600px) {
  .wrap { padding: 20px 20px 8px; }
  .rule-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero { padding: 22px; }
  .hero-total .num { font-size: 40px; }
  .auth-card { padding: 26px; }
  .cal-cell { min-height: 58px; }
  body { font-size: 15.5px; }
}

@media (min-width: 820px) {
  .nav-inner { padding: 8px 10px 9px; }
  .fab { right: calc(50% - 360px + 4px); }
}

@media (max-width: 420px) {
  .tabs a { font-size: 12.5px; padding: 9px 2px; }
}

@media (max-width: 340px) {
  .amount-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-total .num { font-size: 30px; }
}

/* 尊重系统的减少动效设置 */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
