/* =========================================================
   救了么 · 样式
   ========================================================= */

:root {
  --cream: #fff8f4;
  --cream-2: #fff1ea;
  --ink: #2c2533;
  --ink-soft: #5d5668;
  --muted: #938c9e;
  --line: #f0e7e2;

  --coral: #ff6f5e;
  --coral-deep: #ea4f3c;
  --coral-soft: #ffe3dc;
  --mint: #37c39a;
  --mint-deep: #1fa87f;
  --mint-soft: #d9f6ec;
  --amber: #ffb546;
  --violet: #8b7bf7;

  --shadow-sm: 0 4px 14px rgba(88, 52, 44, 0.08);
  --shadow-md: 0 16px 40px rgba(88, 52, 44, 0.12);
  --shadow-lg: 0 28px 70px rgba(88, 52, 44, 0.18);

  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;

  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
    "Source Han Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

/* hidden 属性必须优先于组件的 display，否则 .field{display:flex} 等会把它盖掉 */
[hidden] { display: none !important; }

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

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* ---------------- 背景装饰 ---------------- */
.bg-decor {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
}
.blob-a {
  width: 460px; height: 460px;
  background: radial-gradient(circle at 30% 30%, #ffd2c4, #ffb6a4);
  top: -160px; left: -120px;
}
.blob-b {
  width: 420px; height: 420px;
  background: radial-gradient(circle at 30% 30%, #cdf3e6, #a7ebd3);
  top: 20%; right: -160px;
  opacity: 0.5;
}
.blob-c {
  width: 380px; height: 380px;
  background: radial-gradient(circle at 30% 30%, #fde3b8, #f8d095);
  bottom: -140px; left: 30%;
  opacity: 0.4;
}

/* ---------------- 顶部 ---------------- */
.site-header {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 24px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  font-size: 22px;
  border-radius: 15px;
  background: linear-gradient(135deg, #ff8a76, #ff5f4d);
  box-shadow: 0 8px 20px rgba(234, 79, 60, 0.35);
}
.brand-text h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 1px;
  font-weight: 800;
}
.brand-text p {
  margin: 1px 0 0;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 2px;
}

.role-tabs {
  display: flex;
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
}
.tab {
  border: none;
  background: transparent;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.22s ease;
  white-space: nowrap;
}
.tab-ico { font-size: 15px; }
.tab:hover { color: var(--coral-deep); }
.tab.is-active {
  background: linear-gradient(135deg, #ff7d6a, #ff5a45);
  color: #fff;
  box-shadow: 0 8px 18px rgba(234, 79, 60, 0.32);
}

/* ---------------- 数据条 ---------------- */
.stats-bar {
  max-width: 720px;
  margin: 16px auto 0;
  padding: 16px 26px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
}
.stat { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.stat-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--coral-deep);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
}
.stat:nth-child(3) .stat-num { color: var(--mint-deep); }
.stat-label { font-size: 12px; color: var(--muted); }
.stat-divider { width: 1px; height: 32px; background: var(--line); }

/* ---------------- 主体 ---------------- */
.stage {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 24px 40px;
}
.view { display: none; animation: viewIn 0.45s ease; }
.view.is-active { display: block; }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================= 救助者：卡片 ================= */
.helper-head { text-align: center; margin-bottom: 18px; }
.helper-head h2 {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 1px;
}
.helper-head p { margin: 0; font-size: 13px; color: var(--muted); }

.deck-area {
  position: relative;
  width: min(380px, 92vw);
  height: min(560px, 68vh);
  margin: 0 auto;
  perspective: 1400px;
}

.deck { position: absolute; inset: 0; }

/* 单张卡片 */
.bill-card {
  position: absolute;
  inset: 0;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  user-select: none;
  touch-action: none;
  transform-origin: center bottom;
  will-change: transform;
  border: 1px solid rgba(255, 255, 255, 0.9);
}
.bill-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 7px;
  background: var(--strip, linear-gradient(90deg, #ff8a76, #ff5f4d));
  z-index: 2;
}

.card-body {
  flex: 1;
  padding: 24px 24px 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}
.cat-badge {
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--coral-soft);
  color: var(--coral-deep);
  white-space: nowrap;
}
.urgency-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
  white-space: nowrap;
}
.urgency-normal { background: #eef6f1; color: #4c8f70; }
.urgency-urgent { background: #fff2d8; color: #b9791a; }
.urgency-critical { background: #ffe1dd; color: #d23f2c; }

.card-person {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 26px;
  background: linear-gradient(135deg, #fff0ea, #ffe0d6);
  border: 2px solid #fff;
  box-shadow: 0 6px 16px rgba(234, 79, 60, 0.16);
  flex-shrink: 0;
}
.person-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.person-name { font-size: 15px; font-weight: 700; }
.person-time { font-size: 12px; color: var(--muted); }

.card-title {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0.3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-amount {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin: 10px 0 16px;
  color: var(--coral-deep);
}
.card-amount .cur { font-size: 24px; font-weight: 700; }
.card-amount .num {
  font-size: 52px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}
.card-amount .unit { font-size: 14px; color: var(--muted); margin-left: 4px; }

.card-story {
  flex: 1;
  overflow-y: auto;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--ink-soft);
  background: #fdf8f5;
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 4px;
  scrollbar-width: thin;
}
.card-story::-webkit-scrollbar { width: 5px; }
.card-story::-webkit-scrollbar-thumb { background: #f0ddd5; border-radius: 4px; }

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px 16px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px dashed var(--line);
}
.card-foot .id { opacity: 0.6; }

/* 滑动印章 */
.stamp {
  position: absolute;
  top: 34px;
  padding: 8px 18px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 2px;
  border-radius: 12px;
  border: 4px solid currentColor;
  opacity: 0;
  transform: rotate(-12deg) scale(0.9);
  pointer-events: none;
  z-index: 5;
  transition: opacity 0.1s;
}
.stamp-pay { right: 24px; color: var(--mint-deep); transform: rotate(12deg) scale(0.9); }
.stamp-pass { left: 24px; color: #b7b0c2; }

/* 卡片堆层次 */
.bill-card[data-pos="0"] { z-index: 30; }
.bill-card[data-pos="1"] { z-index: 20; }
.bill-card[data-pos="2"] { z-index: 10; }
.bill-card[data-pos="1"], .bill-card[data-pos="2"] { pointer-events: none; }

/* 空 / 加载 */
.deck-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 32px;
  border: 2px dashed #f4ddd4;
}
.empty-emoji { font-size: 56px; margin-bottom: 10px; }
.deck-empty h3 { margin: 0 0 8px; font-size: 19px; }
.deck-empty p { margin: 0 0 20px; color: var(--muted); font-size: 13.5px; line-height: 1.7; }

.deck-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-lg);
  z-index: 40;
}
.spinner {
  width: 34px; height: 34px;
  border: 3px solid #ffe0d6;
  border-top-color: var(--coral);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 操作按钮 */
.deck-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  margin-top: 24px;
}
.round-btn {
  width: 62px; height: 62px;
  border-radius: 50%;
  border: none;
  background: #fff;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s;
  position: relative;
}
.round-btn span { font-size: 24px; line-height: 1; }
.round-btn em { font-size: 10px; font-style: normal; color: var(--muted); font-weight: 600; }
.round-btn:hover { transform: translateY(-3px) scale(1.04); }
.round-btn:active { transform: scale(0.94); }
.round-pass { color: #b7b0c2; }
.round-pass:hover { color: #8f879e; }
.round-undo { width: 52px; height: 52px; color: #b9a6f2; }
.round-undo span { font-size: 19px; }
.round-pay {
  width: 78px; height: 78px;
  background: linear-gradient(135deg, #ff8a76, #ff5a45);
  color: #fff;
  box-shadow: 0 14px 32px rgba(234, 79, 60, 0.42);
}
.round-pay em { color: rgba(255, 255, 255, 0.9); }
.round-pay span { font-size: 30px; }
.round-btn:disabled { opacity: 0.4; pointer-events: none; }

.helper-tip {
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
  margin: 14px 0 0;
}

/* 支付动画 */
.bill-card.is-paying {
  animation: payPop 0.5s ease forwards;
  pointer-events: none;
}
@keyframes payPop {
  0% { transform: scale(1); }
  35% { transform: scale(1.03) rotate(-1deg); }
  100% { transform: translateY(-140px) scale(0.5); opacity: 0; }
}
.bill-card.is-passing {
  animation: passOut 0.42s ease forwards;
  pointer-events: none;
}
@keyframes passOut {
  to { transform: translateX(-140%) rotate(-24deg); opacity: 0; }
}
.bill-card.is-returning { transition: transform 0.35s ease; }

/* ================= 求助者：表单 ================= */
.seeker-grid {
  display: grid;
  grid-template-columns: 1.45fr 0.85fr;
  gap: 26px;
  align-items: start;
}
.bill-form {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 30px 32px 26px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.9);
}
.form-head { margin-bottom: 22px; }
.form-head h2 { margin: 0 0 6px; font-size: 23px; font-weight: 800; }
.form-head p { margin: 0; color: var(--muted); font-size: 13.5px; }

.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; position: relative; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-row .field { margin-bottom: 18px; }
.field-label { font-size: 13px; font-weight: 700; color: var(--ink-soft); }

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  background: #fdfaf8;
  border-radius: 13px;
  padding: 12px 14px;
  font-size: 14.5px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.field textarea { resize: vertical; min-height: 96px; line-height: 1.6; }
.field input::placeholder, .field textarea::placeholder { color: #bdb6c6; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--coral);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 111, 94, 0.12);
}
.field-hint {
  position: absolute;
  right: 4px; bottom: -16px;
  font-size: 11px;
  color: var(--muted);
}

.money-input {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--line);
  background: #fdfaf8;
  border-radius: 13px;
  padding-left: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.money-input:focus-within {
  border-color: var(--coral);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 111, 94, 0.12);
}
.money-input span { font-size: 18px; font-weight: 700; color: var(--coral-deep); }
.money-input input {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding-left: 8px !important;
}

/* 头像选择 */
.avatar-picker { display: flex; gap: 6px; flex-wrap: wrap; }
.avatar-opt {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: #fdfaf8;
  font-size: 20px;
  display: grid;
  place-items: center;
  transition: all 0.18s;
}
.avatar-opt:hover { transform: translateY(-2px); border-color: #ffc4b8; }
.avatar-opt.is-active {
  border-color: var(--coral);
  background: var(--coral-soft);
  box-shadow: 0 6px 14px rgba(234, 79, 60, 0.2);
}

/* 紧急程度 */
.urgency-picker { display: flex; gap: 8px; }
.urgency-opt {
  flex: 1;
  border: 1.5px solid var(--line);
  background: #fdfaf8;
  border-radius: 12px;
  padding: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
  transition: all 0.18s;
}
.urgency-opt:hover { border-color: #ffc4b8; }
.urgency-opt.is-active {
  border-color: var(--coral);
  background: var(--coral-soft);
  color: var(--coral-deep);
}

/* 按钮 */
.btn {
  border: none;
  border-radius: 14px;
  font-weight: 700;
  font-size: 15px;
  transition: transform 0.16s, box-shadow 0.2s, background 0.2s;
}
.btn-primary {
  background: linear-gradient(135deg, #ff7d6a, #ff5a45);
  color: #fff;
  box-shadow: 0 12px 26px rgba(234, 79, 60, 0.34);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(234, 79, 60, 0.42); }
.btn-primary:active { transform: translateY(0) scale(0.99); }
.btn-primary:disabled { opacity: 0.65; pointer-events: none; }
.btn-block { width: 100%; padding: 15px; margin-top: 6px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn-ico { font-size: 17px; }
.btn-soft {
  background: var(--coral-soft);
  color: var(--coral-deep);
  padding: 11px 22px;
  font-size: 14px;
}
.btn-soft:hover { background: #ffd6cc; }
.form-foot { text-align: center; color: var(--muted); font-size: 12.5px; margin: 12px 0 0; }

/* 侧栏 */
.seeker-aside { display: flex; flex-direction: column; gap: 18px; }
.aside-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(255, 255, 255, 0.9);
}
.aside-card h3 { margin: 0 0 12px; font-size: 15px; font-weight: 800; }
.aside-why ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 11px; }
.aside-why li { font-size: 13.5px; line-height: 1.6; color: var(--ink-soft); padding-left: 22px; position: relative; }
.aside-why li::before { content: "💡"; position: absolute; left: 0; top: -1px; font-size: 14px; }
.aside-why b { color: var(--coral-deep); }

.my-bills { display: flex; flex-direction: column; gap: 10px; }
.my-bill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  border-radius: 12px;
  background: #fdf8f5;
  border: 1px solid var(--line);
}
.my-bill-info { min-width: 0; }
.my-bill-title { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.my-bill-meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.my-bill-amt { font-weight: 800; color: var(--coral-deep); font-size: 14px; white-space: nowrap; }
.my-bill-status { font-size: 10.5px; padding: 3px 8px; border-radius: 999px; font-weight: 700; white-space: nowrap; }
.status-pending { background: #fff2d8; color: #b9791a; }
.status-paid { background: var(--mint-soft); color: var(--mint-deep); }
.muted { color: var(--muted); font-size: 13px; margin: 0; }

/* ---------------- 页脚 ---------------- */
.site-footer {
  text-align: center;
  padding: 20px 24px 34px;
  color: var(--muted);
  font-size: 12.5px;
}
.site-footer p { margin: 3px 0; }
.foot-small { opacity: 0.7; font-size: 11.5px; }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translate(-50%, 20px);
  background: rgba(44, 37, 51, 0.94);
  color: #fff;
  padding: 12px 22px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s, transform 0.28s;
  z-index: 200;
  max-width: 88vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.success { background: linear-gradient(135deg, #2fbf94, #1fa87f); }
.toast.pass { background: rgba(90, 84, 100, 0.95); }

/* ---------------- 彩带 ---------------- */
.confetti-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 150;
  overflow: hidden;
}
.confetti {
  position: absolute;
  width: 9px; height: 14px;
  border-radius: 2px;
  animation: confettiFall 1.5s ease-in forwards;
}
@keyframes confettiFall {
  0% { transform: translateY(-20px) rotate(0); opacity: 1; }
  100% { transform: translateY(85vh) rotate(720deg); opacity: 0; }
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 900px) {
  .seeker-grid { grid-template-columns: 1fr; }
  .seeker-aside { flex-direction: row; }
  .seeker-aside .aside-card { flex: 1; }
}
@media (max-width: 640px) {
  .site-header { padding: 16px 16px 4px; }
  .brand-text h1 { font-size: 19px; }
  .brand-text p { letter-spacing: 1px; }
  .role-tabs { padding: 4px; }
  .tab { padding: 8px 13px; font-size: 13px; }
  .tab-ico { display: none; }
  .stats-bar { margin: 12px 16px 0; padding: 13px 8px; }
  .stat-num { font-size: 18px; }
  .stat-label { font-size: 10.5px; }
  .stage { padding: 18px 16px 30px; }
  .deck-area { height: min(520px, 62vh); }
  .bill-form { padding: 22px 18px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .seeker-aside { flex-direction: column; }
  .card-amount .num { font-size: 44px; }
  .deck-actions { gap: 18px; }
  .round-btn { width: 56px; height: 56px; }
  .round-pay { width: 70px; height: 70px; }
  .helper-head h2 { font-size: 20px; }
}

/* =========================================================
   第二轮：登录 / 钱包 / 易支付设置
   ========================================================= */

/* ---- 顶部右侧 ---- */
.header-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.user-area { position: relative; }
.btn-login {
  border: 1.5px solid #ffcbbf;
  background: #fff;
  color: var(--coral-deep);
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  box-shadow: var(--shadow-sm);
  transition: background 0.18s, transform 0.18s;
}
.btn-login:hover { background: var(--coral-soft); transform: translateY(-1px); }
.btn-login[hidden] { display: none; }
.user-chip {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.82);
  padding: 5px 12px 5px 5px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.user-chip[hidden] { display: none; }
.user-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--coral-soft); font-size: 16px;
}
.user-name { font-size: 13.5px; font-weight: 700; max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chev { font-size: 11px; color: var(--muted); }

.user-menu {
  position: absolute; right: 0; top: calc(100% + 10px);
  width: 224px; background: #fff; border-radius: 16px;
  box-shadow: 0 20px 50px rgba(60, 40, 40, 0.2);
  border: 1px solid #f2e8e2; padding: 8px; z-index: 250;
  animation: menuIn 0.18s ease;
}
.user-menu[hidden] { display: none; }
@keyframes menuIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.um-head { display: flex; align-items: center; gap: 10px; padding: 10px; border-bottom: 1px solid #f4ece7; margin-bottom: 6px; }
.um-avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--coral-soft); font-size: 18px; }
.um-name { font-size: 14px; font-weight: 700; }
.um-role { font-size: 11.5px; color: var(--muted); }
.um-item { display: block; width: 100%; text-align: left; border: none; background: transparent; padding: 10px 12px; border-radius: 10px; font-size: 13.5px; color: var(--ink-soft); }
.um-item:hover { background: #fdf4f0; }
.um-danger { color: #d0452f; }
.um-item[hidden] { display: none; }

/* ---- 救助者已支付现金 ---- */
.paid-cash {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 12px; font-size: 12.5px; color: var(--ink-soft);
  background: #fff; border: 1px solid #f2e8e2;
  padding: 7px 15px; border-radius: 999px; box-shadow: var(--shadow-sm);
}
.paid-cash b { color: var(--coral-deep); }
.pc-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 3px var(--mint-soft); }

/* ---- 侧栏钱包卡 ---- */
.wallet-tag { font-size: 10.5px; font-weight: 700; color: var(--mint-deep); background: var(--mint-soft); padding: 3px 8px; border-radius: 999px; vertical-align: middle; margin-left: 6px; }
.wallet-nums { display: flex; gap: 8px; margin: 6px 0 14px; }
.wallet-nums > div { flex: 1; background: #fdf8f5; border-radius: 12px; padding: 10px 6px; text-align: center; }
.wlabel { display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.wallet-nums b { font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
.wallet-nums b.w-strong { color: var(--mint-deep); }

/* ---- 通用弹层 ---- */
.modal { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-mask { position: absolute; inset: 0; background: rgba(40, 30, 45, 0.46); backdrop-filter: blur(4px); }
.modal-panel {
  position: relative; background: #fff; border-radius: 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
  width: 100%; max-width: 720px; max-height: 92vh;
  display: flex; flex-direction: column; overflow: hidden;
  animation: modalIn 0.3s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 26px; border-bottom: 1px solid #f0eae6; }
.modal-head h2 { margin: 0; font-size: 19px; font-weight: 800; }
.modal-x { border: none; background: transparent; font-size: 18px; color: #a9a2ae; width: 32px; height: 32px; border-radius: 8px; }
.modal-x:hover { background: #f6f0ec; color: var(--ink); }
.modal-body { padding: 22px 26px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 12px; padding: 16px 26px; border-top: 1px solid #f0eae6; }

/* ---- 登录页 ---- */
.auth-screen {
  position: fixed; inset: 0; z-index: 400;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: linear-gradient(160deg, #fff2ec, #fff8f4 52%, #eefaf4);
  overflow-y: auto;
}
.auth-screen[hidden] { display: none; }
.auth-card {
  width: 100%; max-width: 400px; background: #fff; border-radius: 24px;
  padding: 30px; box-shadow: 0 30px 70px rgba(180, 100, 80, 0.22);
  animation: modalIn 0.35s ease;
}
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.auth-brand h1 { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: 1px; }
.auth-brand p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.auth-tabs { display: flex; background: #f6f0ec; border-radius: 12px; padding: 4px; margin-bottom: 20px; }
.auth-tab { flex: 1; border: none; background: transparent; padding: 9px; border-radius: 9px; font-weight: 700; color: var(--ink-soft); font-size: 14px; transition: all 0.18s; }
.auth-tab.is-active { background: #fff; color: var(--coral-deep); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06); }
.auth-form .field { margin-bottom: 16px; }
.auth-error { color: #e0442f; font-size: 12.5px; margin: 0 0 12px; background: #fff0ec; padding: 9px 12px; border-radius: 10px; }
.auth-hint { font-size: 12px; color: var(--muted); text-align: center; margin: 16px 0 8px; line-height: 1.7; }
.auth-hint b { color: var(--ink-soft); }
.auth-skip { display: block; width: 100%; border: none; background: transparent; color: var(--muted); font-size: 13px; padding: 6px; cursor: pointer; }
.auth-skip:hover { color: var(--coral-deep); }

/* ---- 钱包弹层 ---- */
.wallet-panel { max-width: 800px; }
.wallet-hero { background: linear-gradient(135deg, #fff0ea, #ffe6dd); border-radius: 18px; padding: 20px 22px; margin-bottom: 20px; }
.wh-main { display: flex; flex-direction: column; gap: 2px; margin-bottom: 16px; }
.wh-label { font-size: 12.5px; color: var(--ink-soft); }
.wh-num { font-size: 36px; font-weight: 900; color: var(--coral-deep); letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }
.wh-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.wh-grid > div { background: rgba(255, 255, 255, 0.72); border-radius: 12px; padding: 10px; text-align: center; }
.wh-grid span { display: block; font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.wh-grid b { font-size: 14px; font-variant-numeric: tabular-nums; }
.wallet-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 22px; }
.wallet-block h3 { font-size: 14px; margin: 0 0 10px; font-weight: 800; }
.rec-list { display: flex; flex-direction: column; gap: 8px; max-height: 210px; overflow-y: auto; }
.rec { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; background: #fdf8f5; border: 1px solid var(--line); border-radius: 12px; font-size: 12.5px; }
.rec-title { font-weight: 700; }
.rec-meta { color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.rec-right { text-align: right; white-space: nowrap; }
.rec-amt { font-weight: 800; color: var(--mint-deep); }
.rec-amt.out { color: var(--coral-deep); }
.rec-badge { font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px; margin-top: 3px; display: inline-block; }
.badge-pending { background: #fff2d8; color: #b9791a; }
.badge-settled { background: var(--mint-soft); color: var(--mint-deep); }
.badge-processing { background: #e6f0ff; color: #3f7bd6; }
.withdraw-form { border-top: 1px dashed var(--line); padding-top: 18px; }
.withdraw-form h3 { font-size: 14px; margin: 0 0 12px; font-weight: 800; }
.wd-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---- 支付确认弹层 ---- */
.pay-panel { max-width: 420px; }
.pay-bill { background: #fdf8f5; border-radius: 14px; padding: 16px; text-align: center; margin-bottom: 16px; }
.pb-title { font-size: 14px; color: var(--ink-soft); margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-amount { color: var(--coral-deep); font-weight: 900; }
.pb-amount span { font-size: 20px; }
.pb-amount b { font-size: 38px; letter-spacing: -1px; }
.pay-tip { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.pay-methods { display: flex; gap: 10px; margin-bottom: 16px; }
.pay-method { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 12px; font-size: 14px; font-weight: 700; color: var(--ink-soft); transition: all 0.18s; }
.pay-method .pm-ico { font-size: 18px; }
.pay-method.is-active { border-color: var(--coral); background: var(--coral-soft); color: var(--coral-deep); }
.pay-note { font-size: 12px; color: var(--muted); background: #f3faf7; border: 1px solid #dff1e9; padding: 10px 12px; border-radius: 12px; margin-bottom: 16px; line-height: 1.6; }
.pay-note b { color: var(--mint-deep); }
.btn-ghost { background: #f4efeb; color: var(--ink-soft); padding: 13px; margin-top: 10px; }
.btn-ghost:hover { background: #ece3dd; }

/* ---- 易支付设置 ---- */
.settings-panel { max-width: 800px; }
.settings-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.settings-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin: 4px 0 18px; padding: 16px; background: #faf7f5; border-radius: 14px; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--ink-soft); }
.switch input { display: none; }
.slider { width: 40px; height: 22px; background: #d8d2da; border-radius: 999px; position: relative; transition: 0.2s; flex-shrink: 0; }
.slider::after { content: ""; position: absolute; width: 18px; height: 18px; background: #fff; border-radius: 50%; top: 2px; left: 2px; transition: 0.2s; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); }
.switch input:checked + .slider { background: #13b8a6; }
.switch input:checked + .slider::after { transform: translateX(18px); }
.inline-group { display: flex; align-items: center; gap: 10px; }
.inline-label { font-size: 12.5px; color: var(--muted); }
.chip-group { display: flex; gap: 6px; }
.chip { border: 1.5px solid #e3dcd6; background: #fff; border-radius: 8px; padding: 7px 14px; font-size: 13px; font-weight: 600; color: var(--ink-soft); transition: all 0.16s; }
.chip.is-active { background: #13b8a6; border-color: #13b8a6; color: #fff; }
.custom-method-box { display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid #eee; border-radius: 12px; padding: 14px 16px; margin-bottom: 20px; }
.custom-method-box b { font-size: 13.5px; }
.custom-method-box p { font-size: 12px; color: var(--muted); margin: 4px 0 0; line-height: 1.5; }
.btn-mini { border: 1px solid #ddd; background: #fff; border-radius: 8px; padding: 7px 12px; font-size: 12.5px; color: var(--ink-soft); white-space: nowrap; }
.btn-mini:hover { background: #f7f3f0; }
.settings-section-title { font-weight: 800; font-size: 14px; margin: 6px 0 14px; padding-top: 14px; border-top: 1px solid #f2ece7; }
.settings-form .field i { color: #e0442f; font-style: normal; }
.secret-input { position: relative; }
.secret-input input { width: 100%; border: 1.5px solid var(--line); background: #fdfaf8; border-radius: 13px; padding: 12px 44px 12px 14px; font-size: 14.5px; outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
.secret-input input:focus { border-color: var(--coral); box-shadow: 0 0 0 4px rgba(255, 111, 94, 0.12); }
.eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: none; background: transparent; font-size: 15px; color: var(--muted); padding: 6px; }
.field-help { font-size: 11.5px; color: var(--muted); margin: -10px 0 16px; line-height: 1.6; }
.btn-teal { background: #13b8a6; color: #fff; padding: 11px 26px; box-shadow: 0 8px 18px rgba(19, 184, 166, 0.3); }
.btn-teal:hover { background: #0fa495; transform: translateY(-1px); }

/* ---- 第二轮响应式 ---- */
@media (max-width: 720px) {
  .modal { padding: 0; align-items: flex-end; }
  .modal-panel { max-width: 100%; max-height: 94vh; border-radius: 20px 20px 0 0; }
  .settings-row { grid-template-columns: 1fr; }
  .wallet-cols { grid-template-columns: 1fr; }
  .wh-grid { grid-template-columns: 1fr 1fr; }
  .wd-row { grid-template-columns: 1fr; }
  .header-right { gap: 10px; justify-content: flex-end; }
  .settings-inline { gap: 12px; }
  .custom-method-box { flex-direction: column; align-items: flex-start; }
}

/* =========================================================
   第三轮：救助者视图「一屏铺满、不滚动」
   ========================================================= */
body.is-helper {
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
body.is-helper .site-header { flex: 0 0 auto; }
body.is-helper .stats-bar { flex: 0 0 auto; }
body.is-helper .site-header,
body.is-helper .stats-bar { width: 100%; }
body.is-helper .site-footer { display: none; }

body.is-helper .stage {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 24px 28px;
  overflow: hidden;
}

body.is-helper .view-helper.is-active {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

body.is-helper .helper-head {
  flex: 0 0 auto;
  margin-bottom: 10px;
}
body.is-helper .helper-head h2 { margin-bottom: 2px; }
body.is-helper .paid-cash { margin-top: 8px; }

body.is-helper .deck-area {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  max-height: 640px;
  margin-left: auto;
  margin-right: auto;
}

body.is-helper .deck-actions {
  flex: 0 0 auto;
  margin-top: 14px;
}
body.is-helper .helper-tip {
  flex: 0 0 auto;
  margin: 8px 0 0;
}

/* 矮屏时整体再收一收，保证一屏放下 */
@media (max-height: 820px) {
  body.is-helper .stats-bar { margin-top: 10px; padding: 11px 22px; }
  body.is-helper .stat-num { font-size: 19px; }
  body.is-helper .helper-head h2 { font-size: 20px; }
  body.is-helper .helper-head p { font-size: 12px; }
  body.is-helper .deck-actions { margin-top: 8px; }
  body.is-helper .round-btn { width: 54px; height: 54px; }
  body.is-helper .round-pay { width: 68px; height: 68px; }
  body.is-helper .round-pay span { font-size: 26px; }
  body.is-helper .card-amount .num { font-size: 42px; }
  body.is-helper .card-body { padding: 18px 20px 14px; }
  body.is-helper .card-story { padding: 11px 14px; }
}
@media (max-height: 700px) {
  body.is-helper .stats-bar { display: none; }
  body.is-helper .helper-head p { display: none; }
  body.is-helper .helper-tip { display: none; }
}

/* 卡片内说明区自身可滚动（页面不滚动） */
body.is-helper .card-story { overscroll-behavior: contain; }

/* =========================================================
   证明附件（选填）
   ========================================================= */
.field-label .opt {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: #f4eeea;
  padding: 1px 8px;
  border-radius: 999px;
  margin-left: 6px;
  font-style: normal;
}

.upload-zone {
  border: 1.8px dashed #ecd9d0;
  border-radius: 16px;
  background: #fdf8f5;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
}
.upload-zone:hover,
.upload-zone.dragover { border-color: var(--coral); background: #fff4ef; }

.upload-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--ink-soft); font-size: 13px; line-height: 1.6; }
.up-ico { font-size: 26px; }
.up-text i { color: var(--muted); font-size: 11.5px; font-style: normal; }

.upload-preview { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.upload-preview img { max-width: 100%; max-height: 190px; border-radius: 12px; border: 1px solid var(--line); object-fit: contain; background: #fff; }
.upload-actions { display: flex; gap: 10px; }
.upload-btn { border: 1px solid #e6dcd6; background: #fff; border-radius: 9px; padding: 6px 14px; font-size: 12.5px; color: var(--ink-soft); font-weight: 600; }
.upload-btn:hover { background: #fdf4f0; }
.upload-del { color: #d0452f; border-color: #f2cfc7; }

/* 卡片上的「查看凭证」 */
.proof-btn {
  border: none;
  background: var(--mint-soft);
  color: var(--mint-deep);
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  margin: 0 auto;
}
.proof-btn:hover { background: #c8f1e2; }

/* 凭证查看弹层 */
.proof-panel { max-width: 560px; }
.proof-body { display: flex; justify-content: center; padding: 16px 20px 24px; }
.proof-body img { max-width: 100%; max-height: 72vh; border-radius: 12px; object-fit: contain; }

/* =========================================================
   邮箱验证 / 找回密码 / 邮件设置
   ========================================================= */
.auth-aux { display: flex; justify-content: flex-end; margin: -6px 0 4px; }
.link-btn { border: none; background: transparent; color: var(--coral-deep); font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 2px 0; }
.link-btn:hover { text-decoration: underline; }

.code-row { display: flex; gap: 10px; align-items: stretch; }
.code-row input { flex: 1 1 auto; min-width: 0; }
.code-btn { flex: 0 0 auto; white-space: nowrap; height: auto; padding: 0 16px; }

.forgot-panel { max-width: 440px; }
.settings-tip { font-size: 12.5px; color: var(--muted); line-height: 1.7; margin: 0 0 14px; }
#eStatus { font-size: 12px; color: var(--mint-deep); margin: 4px 0 0; min-height: 1em; }
#codeHint, #fCodeHint { font-size: 12px; color: var(--coral-deep); }

/* 找回密码弹层需盖在登录页之上（登录页 z-index 400） */
#forgotModal { z-index: 500; }
