:root {
  --bg: #0f172a;
  --card: #111827;
  --accent: #22d3ee;
  --accent-2: #a855f7;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --border: #1f2937;
  --success: #22c55e;
  --error: #f97316;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", "SF Pro Display", "PingFang SC", system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.1), transparent 25%),
              radial-gradient(circle at 80% 0%, rgba(168, 85, 247, 0.12), transparent 30%),
              var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.banner {
  text-align: center;
  padding: 10px 12px;
  background: linear-gradient(90deg, #22d3ee, #a855f7);
  color: #0b1224;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.page {
  max-width: 960px;
  margin: 32px auto;
  padding: 0 16px 48px;
}

.card {
  background: linear-gradient(135deg, rgba(17,24,39,0.9), rgba(15,23,42,0.9));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.35);
  margin-bottom: 20px;
}

.card.wide h1, .card.wide h2 { margin-top: 0; }

.headline {
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
  font-size: 12px;
}

.pay-card {
  position: relative;
  overflow: hidden;
}

.pay-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(34,211,238,0.08), transparent 45%),
              radial-gradient(circle at 70% 20%, rgba(168,85,247,0.1), transparent 45%);
  pointer-events: none;
}

.badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(34,211,238,0.15);
  color: #67e8f9;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(103, 232, 249, 0.5);
}

.amount {
  font-size: 48px;
  font-weight: 800;
  margin: 8px 0;
}

.currency {
  font-size: 16px;
  color: var(--muted);
  margin-left: 8px;
}

.payee, .order, .memo {
  margin: 4px 0;
  color: var(--text);
}

.memo { color: var(--muted); }

.cta {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

button {
  cursor: pointer;
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 700;
  transition: transform 0.1s ease, box-shadow 0.2s ease;
}

button.primary {
  background: linear-gradient(135deg, #22d3ee, #0ea5e9);
  color: #0b1224;
  box-shadow: 0 10px 25px rgba(14,165,233,0.35);
}

button.ghost {
  background: rgba(255,255,255,0.08);
  color: var(--text);
  border: 1px solid var(--border);
}

button:hover { transform: translateY(-1px); }

.hint {
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
}

.form label {
  display: block;
  margin-bottom: 14px;
  font-size: 14px;
  color: var(--text);
}

.form input, .form select {
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font-size: 15px;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 10px;
}

.form button.primary {
  width: 100%;
  margin-top: 6px;
}

.muted { color: var(--muted); }
.strong { font-weight: 700; }
.meta { color: var(--muted); font-size: 12px; }

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

.list-item {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,0.02);
}

.pill {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(34,211,238,0.12);
  color: #67e8f9;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid rgba(103,232,249,0.5);
}

.ghost-pill {
  background: rgba(255,255,255,0.04);
  color: #cbd5e1;
  border: 1px solid var(--border);
}

.recent-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.avatar-preview-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0 20px;
}

.avatar-preview-item {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 12px 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
}

.avatar-preview {
  width: 68px;
  height: 68px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
}

.flash-list { margin: 12px 0; }
.flash {
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
}
.flash.error { background: rgba(249,115,22,0.12); color: #fdba74; }
.flash.success { background: rgba(34,197,94,0.12); color: #86efac; }
.flash.error { background: rgba(239,68,68,0.12); color: #fecdd3; }

@media (max-width: 640px) {
  .card { padding: 18px; }
  .amount { font-size: 38px; }
  .input-row { grid-template-columns: 1fr; }
  .cta { flex-direction: column; }
}

/* ===== Mobile receipt mimic (WeChat-style) ===== */
.receipt-page,
.wait-page,
.success-page {
  background: #ffffff;
  color: #111;
}

.receipt-page .banner,
.wait-page .banner,
.success-page .banner { display: none; }

.receipt-page .page,
.wait-page .page,
.success-page .page {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 18px 32px;
}

.wait-container,
.success-container {
  padding-top: 12px;
}

.back-icon {
  font-size: 28px;
  color: #111;
  padding: 4px 0;
  background: none;
  border: none;
  cursor: pointer;
}

.wait-icon {
  width: 86px;
  height: 86px;
  border-radius: 0;
  border: none;
  background: none;
  display: grid;
  place-items: center;
  margin: 26px auto 12px;
}

.wait-icon img {
  width: 100%;
  height: 100%;
  display: block;
}

.wait-title {
  text-align: center;
  font-size: 16px;
  color: #444;
}

.wait-amount,
.success-amount {
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 4px;
  font-size: 34px;
  font-weight: 800;
  color: #000;
  margin: 8px 0 18px;
}

.receipt-symbol {
  font-size: 0.56em;
  line-height: 1;
  font-weight: 700;
  transform: translateY(-0.04em);
}

.receipt-number {
  font-size: 1em;
  line-height: 1;
  font-weight: 700;
}

.time-table {
  margin: 6px 0 22px;
  border-top: 1px solid #f0f0f0;
}

.time-table .row {
  display: flex;
  justify-content: space-between;
  padding: 10px 2px;
  font-size: 14px;
  color: #6b7280;
}

.receive-btn {
  width: 100%;
  background: #16a34a;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 8px 16px rgba(22,163,74,0.25);
  cursor: pointer;
}

.wait-tip {
  margin-top: 14px;
  text-align: center;
  font-size: 13px;
  color: #6b7280;
}

.wait-tip .link {
  color: #2c7be5;
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  cursor: pointer;
}

.checkmark-large {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: #22c55e;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 42px;
  margin: 18px auto 12px;
  box-shadow: 0 10px 20px rgba(34,197,94,0.35);
}

.success-msg {
  text-align: center;
  font-size: 16px;
  color: #222;
}

.balance-link {
  text-align: center;
  color: #2c7be5;
  font-size: 14px;
  margin-top: 4px;
  margin-bottom: 16px;
}

.receipt-refund-icon {
  width: 86px;
  height: 86px;
  border-radius: 0;
  background: none;
  display: grid;
  place-items: center;
  margin: 18px auto 12px;
  box-shadow: none;
}

.contact-page {
  background: #f6f6f6;
  color: #111;
}

.contact-page .banner { display: none; }
.contact-page .page { max-width: 520px; margin: 0 auto; padding: 0 14px 32px; }
.contact-page.no-nav .wx-nav { display: none; }

.wx-nav {
  display: grid;
  grid-template-columns: 50px 1fr 50px;
  align-items: center;
  padding: 10px 8px;
  background: #f0f0f0;
  position: sticky;
  top: 0;
  z-index: 5;
}
.nav-back, .nav-actions {
  background: none;
  border: none;
  font-size: 24px;
  color: #111;
  cursor: pointer;
}
.nav-center { text-align: center; line-height: 1.1; }
.nav-main { font-size: 18px; font-weight: 700; }
.nav-sub { font-size: 12px; color: #6b7280; }

.card-bubble {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  position: relative;
  margin-top: 12px;
}
.card-bubble::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 16px;
  border: 8px solid transparent;
  border-right-color: #fff;
}
.bubble-avatar {
  width: 46px;
  height: 46px;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
}
.bubble-name { font-weight: 600; }
.bubble-caption { font-size: 12px; color: #9ca3af; margin-left: 2px; }

.contact-profile {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.06);
  padding: 14px 16px 22px;
  margin-top: 14px;
}
.card-elevated { box-shadow: 0 12px 28px rgba(0,0,0,0.08); }
.contact-top { display: grid; grid-template-columns: 72px 1fr 28px; gap: 10px; align-items: center; }
.avatar-lg { width: 72px; height: 72px; border-radius: 8px; background-size: cover; background-position: center; }
.contact-meta { line-height: 1.4; }
.contact-name { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 4px; }
.gender-icon {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  object-fit: contain;
  flex: 0 0 auto;
}
.contact-region, .contact-id { color: #6b7280; font-size: 13px; }
.more { text-align: right; color: #6b7280; font-size: 18px; }

.section { border-top: 1px solid #f0f0f0; padding: 12px 0; }
.section:first-of-type { border-top: 1px solid #f0f0f0; }
.section-title { color: #111; font-size: 14px; margin-bottom: 4px; }
.section-desc { color: #9ca3af; font-size: 12px; }

.primary-wide, .ghost-wide {
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.primary-wide { background: #2c7be5; color: #fff; box-shadow: 0 10px 18px rgba(44,123,229,0.25); }
.ghost-wide { background: #e5e7eb; color: #1f2937; }

.chat-page {
  background: #e5e5e5;
  color: #111;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}
.chat-page .banner { display: none; }
.chat-page .page { max-width: 560px; margin: 0 auto; padding: 0; }

.chat-body {
  padding: 10px 8px 8px;
  min-height: calc(100vh - 76px);
  background: #e5e5e5;
}

.msg {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
}

.msg.incoming { justify-content: flex-start; }
.msg.outgoing { justify-content: flex-end; }

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  flex: 0 0 auto;
}

.bubble {
  position: relative;
  background: #fff;
  border-radius: 8px;
  padding: 9px 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  max-width: 74%;
  word-break: break-word;
  font-size: 16px;
}

.msg.incoming .bubble:not(.transfer):not(.refund)::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 14px;
  border: 8px solid transparent;
  border-right-color: #fff;
}

.outgoing-bubble {
  background: #95ec69;
  color: #1c1c1c;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.msg.outgoing .outgoing-bubble::before {
  content: "";
  position: absolute;
  right: -8px;
  top: 14px;
  border: 8px solid transparent;
  border-left-color: #95ec69;
}

.chat-time {
  text-align: center;
  color: #a1a1a1;
  font-size: 14px;
  margin: 14px 0 10px;
}

.sys-notice {
  text-align: center;
  color: #a1a1a1;
  font-size: 16px;
  margin: 0 0 18px;
  line-height: 1.4;
}

.sys-notice span {
  color: #7d8fb0;
  font-weight: 600;
}

.sys-notice.expiring,
.sys-notice.expired {
  color: #b3b3b3;
}

.bubble.transfer,
.bubble.refund {
  position: relative;
  width: 280px;
  min-width: 280px;
  max-width: 280px;
  border-radius: 12px;
  border: none;
  color: #fff;
  padding: 12px 14px 11px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.bubble.transfer { background: #f5a742; }
.bubble.refund { background: #dac8b1; cursor: default; }
.bubble.transfer.accepted { background: #f5a742; }

.bubble.transfer::before,
.bubble.refund::before {
  content: none;
  position: absolute;
  top: 16px;
  border: 8px solid transparent;
}

.bubble.transfer::before,
.bubble.refund::before,
.pending-in::before,
.accepted-in::before,
.accepted-out::before,
.refund-in::before,
.refund-out::before,
.expired-card::before {
  display: none !important;
}

.bubble.transfer::before,
.accepted-in::before,
.refund-in::before {
  left: -8px;
}

.accepted-out::before,
.refund-out::before {
  right: -8px;
}

.bubble.transfer::before,
.accepted-in::before { border-right-color: #f5a742; }
.accepted-out::before { border-left-color: #f5a742; }
.refund-in::before { border-right-color: #dac8b1; }
.refund-out::before { border-left-color: #dac8b1; }

.transfer-top,
.refund-top {
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: center;
  gap: 10px;
}

.transfer-icon,
.refund-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
}

.transfer-text,
.refund-text {
  display: grid;
  gap: 3px;
}

.transfer-amount,
.refund-amount {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  font-size: 23px;
  line-height: 1;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0;
  font-feature-settings: "tnum" 1;
}

.amount-symbol {
  font-size: 1em;
  line-height: 1;
  font-weight: 700;
  transform: none;
}

.amount-number {
  font-size: 1em;
  line-height: 1;
  font-weight: 700;
}

.transfer-call,
.refund-call {
  font-size: 11px;
  line-height: 1.08;
  color: #fff;
}

.transfer-label,
.refund-label {
  margin-top: 6px;
  font-size: 10px;
  color: rgba(255,255,255,0.9);
}

.chat-tools {
  position: sticky;
  bottom: 0;
  background: #f2f2f2;
  border-top: 1px solid #d6d6d6;
}

.chat-input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 9px 8px;
}

.icon-btn {
  width: 37px;
  height: 37px;
  border: none;
  border-radius: 50%;
  background: transparent;
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
}

.icon-btn svg {
  display: block;
  color: #222;
}
.icon-btn.active { background: #e8e8e8; }
.plus-btn.active { background: #dfdfdf; }

.mode-icon {
  display: grid;
  place-items: center;
  line-height: 0;
}

.mode-icon-keyboard { display: none; }

.chat-input.voice-mode .mode-icon-keyboard { display: block; }
.chat-input.voice-mode .mode-icon-voice { display: none; }

.input-shell {
  flex: 1;
  height: 42px;
  background: #fff;
  border: 1px solid #dfdfdf;
  border-radius: 8px;
  padding: 0 8px 0 12px;
  display: flex;
  align-items: center;
}

.input-shell input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 17px;
  color: #1d1d1d;
  background: transparent;
}

.inner-mic-btn {
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  padding: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.hold-talk-btn {
  flex: 1;
  height: 42px;
  border: 1px solid #dfdfdf;
  background: #fff;
  color: #242424;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  display: none;
}

.hold-talk-btn.is-holding { background: #e8e8e8; }

.chat-input.voice-mode .input-shell { display: none; }
.chat-input.voice-mode .hold-talk-btn { display: block; }

.chat-more-panel {
  background: #ececec;
  border-top: 1px solid #dcdcdc;
  padding: 13px 14px calc(12px + env(safe-area-inset-bottom));
}

.chat-more-panel[hidden] { display: none; }

.panel-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px 12px;
}

.panel-item {
  border: none;
  background: transparent;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  color: #7a7a7a;
  font-size: 13px;
}

.panel-label { line-height: 1; }

.panel-icon {
  width: 72px;
  height: 72px;
  border-radius: 15px;
  background: #f8f8f8;
  border: 1px solid #ececec;
  display: grid;
  place-items: center;
}

.panel-item:active .panel-icon { background: #efefef; }

.panel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbcbcb;
}

.dot.active { background: #8f8f8f; }

.stats-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 20px;
  background: #fff;
  color: #111;
  border-radius: 10px;
  overflow: hidden;
}
.stats-table th, .stats-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  font-size: 14px;
}
.stats-table th { background: #f7f7f7; font-weight: 700; }
.stats-table tr:last-child td { border-bottom: none; }

.settings-list { margin-top: 6px; background: #fff; border-top: 1px solid #e5e7eb; border-bottom: 1px solid #e5e7eb; }
.settings-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  font-size: 16px;
  color: #111;
  border-top: 1px solid #f0f0f0;
  text-decoration: none;
}
.settings-item:first-child { border-top: none; }
.chevron { color: #9ca3af; font-size: 18px; }
.toggle { accent-color: #2c7be5; width: 44px; height: 22px; }
.mask {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
}

.mask.hidden { display: none; }

.dialog {
  background: #fff;
  width: 82%;
  max-width: 360px;
  border-radius: 12px;
  padding: 18px 16px 10px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.25);
  text-align: center;
}

.dialog-title {
  font-size: 16px;
  color: #111;
  margin-bottom: 16px;
}

.dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.dialog-btn {
  border: none;
  border-top: 1px solid #f0f0f0;
  padding: 12px 10px;
  font-size: 15px;
  background: none;
  cursor: pointer;
}

.dialog-btn.cancel { color: #4b5563; }
.dialog-btn.ok { color: #2563eb; font-weight: 700; }

/* ===== WeChat visual alignment overrides ===== */
.ios-status-bar,
.ios-home-indicator {
  display: none !important;
}

.contact-page,
.chat-page,
.wait-page,
.success-page,
.refund-page {
  background: #ededed;
  color: #111;
}

.contact-page .page,
.chat-page .page,
.wait-page .page,
.success-page .page,
.refund-page .page {
  max-width: 430px;
  margin: 0 auto;
  padding: 0;
}

.wx-nav {
  position: sticky;
  top: 0;
  height: 58px;
  grid-template-columns: 52px 1fr 52px;
  padding: 0;
  background: #ededed;
  border-bottom: 1px solid #dfdfdf;
}

.wx-nav-flat {
  border-bottom: none;
}

.nav-back,
.nav-actions {
  width: 52px;
  height: 58px;
  display: grid;
  place-items: center;
  color: #111;
  text-decoration: none;
  font-size: 31px;
  font-weight: 300;
  line-height: 1;
}

.nav-actions {
  font-size: 28px;
  letter-spacing: 1px;
}

.nav-dots {
  pointer-events: none;
  user-select: none;
}

.nav-title {
  text-align: center;
  font-size: 22px;
  font-weight: 600;
}

.nav-spacer {
  pointer-events: none;
}

.contact-flat {
  margin: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  padding: 18px 0 0;
}

.contact-top-large {
  display: grid;
  grid-template-columns: 96px 1fr;
  align-items: center;
  gap: 16px;
  padding: 0 16px 20px;
}

.avatar-lg-square {
  width: 82px;
  height: 82px;
  border-radius: 10px;
}

.contact-name-large {
  font-size: 27px;
  font-weight: 700;
  line-height: 1.1;
}

.contact-name-large .gender-icon {
  width: 22px;
  height: 22px;
}

.contact-region-large,
.contact-id {
  font-size: 18px;
  color: #7b7b7b;
  margin-top: 6px;
}

.section {
  border-top: 1px solid #e8e8e8;
  background: #fff;
  margin-bottom: 12px;
  padding: 16px;
}

.section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.compact-row {
  margin-top: -12px;
  margin-bottom: 12px;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.section-desc {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.25;
  color: #b0b0b0;
}

.chevron {
  font-size: 28px;
  color: #bababa;
  line-height: 1;
}

.contact-main-action {
  margin-top: 12px;
}

.add-book-btn {
  background: #fff;
  color: #586f98;
  border-radius: 0;
  font-size: 18px;
  font-weight: 600;
  box-shadow: none;
  border-top: 1px solid #ececec;
  border-bottom: 1px solid #ececec;
  padding: 18px;
}

.friend-action {
  width: 100%;
  border: none;
  border-top: 1px solid #ececec;
  background: #fff;
  color: #5f7095;
  font-size: 18px;
  font-weight: 600;
  padding: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.friend-action + .friend-action {
  border-top: 1px solid #ededed;
}

.action-icon {
  line-height: 0;
}

.settings-nav .nav-title {
  font-size: 20px;
}

.settings-list-flat {
  margin-top: 0;
  background: transparent;
  border: none;
}

.settings-item {
  background: #fff;
  border-top: none;
  border-bottom: 1px solid #ececec;
  min-height: 76px;
  padding: 0 16px;
  font-size: 18px;
}

.settings-item + .settings-item {
  margin-top: 12px;
}

.toggle {
  width: 52px;
  height: 30px;
  accent-color: #08c160;
}

.chat-nav {
  z-index: 11;
}

.chat-page .page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.chat-body {
  padding: 12px 8px 8px;
  min-height: calc(100vh - 58px - 63px);
  background: #ededed;
}

.bubble {
  font-size: 18px;
  line-height: 1.28;
}

.outgoing-bubble {
  background: #95ec69;
}

.bubble.transfer.pending {
  background: #f99c3e;
  cursor: pointer;
}

.bubble.transfer.accepted {
  background: #e8bc85;
  cursor: default;
}

.bubble.refund {
  background: #d8c3ad;
  cursor: default;
}

.bubble.transfer.pending::before,
.pending-in::before {
  border-right-color: #f99c3e;
}

.accepted-in::before {
  border-right-color: #e8bc85;
}

.accepted-out::before {
  right: -8px;
  left: auto;
  border-left-color: #e8bc85;
  border-right-color: transparent;
}

.refund-in::before {
  border-right-color: #d8c3ad;
}

.refund-out::before {
  right: -8px;
  left: auto;
  border-left-color: #d8c3ad;
  border-right-color: transparent;
}

.chat-time,
.sys-notice {
  color: #a8a8a8;
}

.chat-tools {
  margin-top: auto;
  position: sticky;
  bottom: 0;
  border-top: 1px solid #d9d9d9;
}

.chat-input {
  padding: 8px;
  gap: 10px;
}

.icon-btn {
  width: 38px;
  height: 38px;
}

.input-shell,
.hold-talk-btn {
  height: 42px;
  border-radius: 5px;
}

.hold-talk-btn {
  font-size: 18px;
  font-weight: 600;
}

.chat-more-panel {
  padding-bottom: 12px;
}

.panel-icon {
  width: 74px;
  height: 74px;
  border-radius: 14px;
}

.receipt-shell {
  min-height: 100vh;
  background: #ededed;
}

.ios-top-nav {
  height: 58px;
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  align-items: center;
  border-bottom: none;
  background: #ededed;
}

.ios-back-btn,
.ios-more-btn,
.ios-nav-placeholder {
  width: 52px;
  height: 58px;
  display: grid;
  place-items: center;
  background: none;
  border: none;
}

.ios-more-btn {
  pointer-events: none;
  cursor: default;
}

.ios-nav-title {
  text-align: center;
  font-size: 21px;
  font-weight: 600;
}

.receipt-layout {
  min-height: calc(100vh - 58px);
  display: flex;
  flex-direction: column;
  padding: 24px 22px 22px;
}

.status-icon {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  margin: 78px auto 14px;
}

.status-icon img,
.status-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.transfer-icon img,
.transfer-icon svg,
.refund-icon img,
.refund-icon svg,
.panel-icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.wait-title,
.success-msg,
.refund-msg {
  text-align: center;
  font-size: 20px;
  color: #1a1a1a;
}

.wait-amount,
.success-amount {
  margin: 14px 0 24px;
  text-align: center;
  font-size: 64px;
  line-height: 1;
  letter-spacing: 0.5px;
}

.balance-link {
  font-size: 14px;
  margin-top: -8px;
  margin-bottom: 22px;
}

.time-table {
  border-top: 1px solid #e7e7e7;
  margin-top: 10px;
}

.time-table .row {
  padding: 8px 0;
  font-size: 14px;
  color: #5f6368;
}

.time-table .row span:last-child {
  color: #1e1e1e;
}

.receipt-spacer {
  flex: 1;
}

.action-row {
  margin: 0 14px;
}

.receive-btn {
  height: 56px;
  border-radius: 9px;
  font-size: 17px;
  background: #07c160;
  box-shadow: none;
}

.wait-tip {
  margin-top: 18px;
  font-size: 14px;
  color: #61676d;
}

.wait-tip .link {
  font-size: 14px;
  color: #586f98;
  font-weight: 600;
}

.mask {
  background: rgba(0, 0, 0, 0.45);
}

.dialog {
  width: calc(100% - 46px);
  max-width: 388px;
  border-radius: 12px;
  padding: 0;
}

.dialog-title {
  font-size: 17px;
  font-weight: 600;
  padding: 34px 18px;
  margin: 0;
  border-bottom: 1px solid #e9e9e9;
}

.dialog-actions {
  gap: 0;
}

.dialog-actions form {
  margin: 0;
}

.dialog-btn {
  width: 100%;
  margin: 0;
  border-top: none;
  min-height: 56px;
  font-size: 17px;
}

.dialog-btn.cancel {
  border-right: 1px solid #e9e9e9;
  color: #0f172a;
}

.dialog-btn.ok {
  color: #5c6f94;
  font-weight: 600;
}

/* ===== Pixel-perfect tuning v2 (all phones) ===== */
:root {
  --phone-max-width: 430px;
  --nav-height: 58px;
  --chat-tools-height: 63px;
}

.contact-page .page,
.chat-page .page,
.wait-page .page,
.success-page .page,
.refund-page .page {
  width: min(100%, var(--phone-max-width));
}

.wx-nav,
.ios-top-nav {
  height: calc(var(--nav-height) + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
}

.nav-back,
.nav-actions,
.ios-back-btn,
.ios-more-btn,
.ios-nav-placeholder {
  height: var(--nav-height);
}

.nav-title,
.ios-nav-title {
  font-size: 21px;
}

.contact-top-large {
  padding: 0 clamp(12px, 4.2vw, 16px) clamp(16px, 4.8vw, 20px);
  gap: clamp(12px, 3.8vw, 16px);
}

.avatar-lg-square {
  width: 78px;
  height: 78px;
}

.contact-name-large {
  font-size: 27px;
}

.contact-region-large,
.contact-id {
  font-size: clamp(16px, 4.6vw, 18px);
}

.section,
.settings-item,
.friend-action,
.add-book-btn {
  padding-left: clamp(14px, 4.4vw, 18px);
  padding-right: clamp(14px, 4.4vw, 18px);
}

.section-title,
.settings-item,
.friend-action,
.add-book-btn {
  font-size: clamp(17px, 4.6vw, 19px);
}

.section-desc {
  font-size: clamp(13px, 3.8vw, 14px);
  line-height: 1.34;
}

.chat-body {
  min-height: calc(100dvh - var(--nav-height) - var(--chat-tools-height) - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  padding: clamp(10px, 2.8vw, 12px) clamp(8px, 2.5vw, 10px) 8px;
}

.msg {
  margin-bottom: clamp(10px, 2.8vw, 13px);
}

.bubble {
  font-size: 18px;
  border-radius: 8px;
}

.bubble.transfer,
.bubble.refund {
  width: 280px;
}

.transfer-amount,
.refund-amount {
  font-size: 23px;
}

.chat-tools {
  padding-bottom: env(safe-area-inset-bottom);
}

.chat-input {
  min-height: var(--chat-tools-height);
  padding: 8px 8px;
  gap: 8px;
}

.icon-btn {
  width: 37px;
  height: 37px;
}

.input-shell,
.hold-talk-btn {
  height: 42px;
}

.hold-talk-btn {
  font-size: clamp(16px, 4.6vw, 18px);
}

.chat-more-panel {
  padding: 13px clamp(10px, 2.8vw, 14px) calc(12px + env(safe-area-inset-bottom));
}

.panel-grid {
  gap: clamp(12px, 3.3vw, 14px) clamp(10px, 2.8vw, 12px);
}

.panel-icon {
  width: 72px;
  height: 72px;
}

.receipt-layout {
  min-height: calc(100dvh - var(--nav-height) - env(safe-area-inset-top));
  padding: clamp(20px, 6vw, 24px) clamp(16px, 5.6vw, 22px) calc(20px + env(safe-area-inset-bottom));
}

.status-icon {
  margin-top: clamp(64px, 18vw, 82px);
}

.receipt-layout .status-icon {
  width: 82px;
  height: 82px;
  margin-top: 72px;
}

.receipt-layout .status-icon img,
.receipt-layout .status-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.wait-title,
.success-msg,
.refund-msg {
  font-size: clamp(18px, 5.2vw, 20px);
}

.wait-amount,
.success-amount {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 4px;
  font-size: 52px;
  margin: 13px 0 22px;
}

.wait-amount .receipt-symbol,
.success-amount .receipt-symbol {
  font-size: 0.55em;
  transform: translateY(-0.05em);
}

.wait-amount .receipt-number,
.success-amount .receipt-number {
  font-weight: 700;
}

.time-table .row {
  font-size: clamp(13px, 3.8vw, 14px);
  padding: clamp(7px, 2.1vw, 9px) 0;
}

.action-row {
  margin: 0 clamp(8px, 3.4vw, 14px);
}

.receive-btn {
  height: 54px;
  font-size: 17px;
}

.wait-tip,
.wait-tip .link {
  font-size: clamp(13px, 3.8vw, 14px);
}

.dialog {
  width: min(calc(100% - 28px), 388px);
}

.dialog-title {
  font-size: clamp(16px, 4.6vw, 18px);
  padding: clamp(28px, 7.8vw, 34px) 18px;
}

.dialog-btn {
  min-height: clamp(52px, 14vw, 56px);
  font-size: clamp(16px, 4.6vw, 17px);
}

@media (max-width: 359px) {
  :root {
    --nav-height: 56px;
    --chat-tools-height: 61px;
  }

  .bubble {
    max-width: 77%;
  }

  .transfer-top,
  .refund-top {
    grid-template-columns: 48px 1fr;
    gap: 8px;
  }

  .transfer-icon,
  .refund-icon {
    width: 48px;
    height: 48px;
  }

  .chat-time,
  .sys-notice {
    font-size: 13px;
  }
}

@media (min-width: 414px) {
  .chat-body {
    padding-left: 10px;
    padding-right: 10px;
  }

  .bubble {
    max-width: 72%;
  }

  .settings-item {
    min-height: 80px;
  }
}

@media (max-width: 640px) {
  .recent-actions {
    gap: 6px;
  }

  .avatar-preview {
    width: 62px;
    height: 62px;
  }
}

/* ===== Screenshot alignment overrides (2026-03) ===== */
:root {
  --wechat-shot-width: 491px;
}

.wait-page .page,
.success-page .page,
.refund-page .page,
.chat-page .page {
  width: min(100%, var(--wechat-shot-width));
  max-width: var(--wechat-shot-width);
}

.wait-page,
.success-page,
.refund-page,
.wait-page .page,
.success-page .page,
.refund-page .page,
.receipt-shell,
.chat-page,
.chat-page .page {
  background: #ededed;
}

.receipt-shell,
.chat-page .page {
  min-height: 100vh;
}

.contact-page.no-nav .wx-nav,
.chat-page.no-nav .chat-nav,
.wait-page.no-nav .ios-top-nav,
.success-page.no-nav .ios-top-nav,
.refund-page.no-nav .ios-top-nav {
  display: none !important;
}

.contact-page.no-nav .contact-flat {
  padding-top: 2px;
}

.chat-page.no-nav .chat-body {
  min-height: calc(100dvh - 72px - env(safe-area-inset-bottom));
  padding-top: 10px;
  padding-bottom: 4px;
}

.wait-page.no-nav .receipt-layout,
.success-page.no-nav .receipt-layout,
.refund-page.no-nav .receipt-layout {
  min-height: 100dvh;
  padding-top: 14px;
}

.ios-top-nav,
.chat-nav {
  background: #ededed;
  border-bottom: none;
}

.ios-back-btn,
.chat-close-btn {
  justify-content: flex-start;
  padding-left: 17px;
}

.ios-back-btn svg,
.chat-close-btn svg {
  width: 22px;
  height: 22px;
  display: block;
}

.nav-actions,
.ios-more-btn,
.ios-nav-placeholder {
  justify-content: flex-end;
  padding-right: 15px;
}

.wait-page .receipt-layout,
.success-page .receipt-layout,
.refund-page .receipt-layout {
  min-height: calc(100vh - 58px);
  padding: 24px 40px 10px;
}

.wait-page .status-icon,
.refund-page .status-icon {
  width: 72px;
  height: 72px;
  margin: 83px auto 28px;
}

.success-page .status-icon {
  width: 58px;
  height: 58px;
  margin: 77px auto 38px;
}

.wait-page.no-nav .status-icon,
.refund-page.no-nav .status-icon {
  width: 66px;
  height: 66px;
  margin: 36px auto 18px;
}

.success-page.no-nav .status-icon {
  width: 54px;
  height: 54px;
  margin: 34px auto 24px;
}

.wait-title,
.success-msg,
.refund-msg {
  text-align: center;
  color: #232323;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0;
}

.wait-page.no-nav .wait-title,
.success-page.no-nav .success-msg,
.refund-page.no-nav .refund-msg {
  font-size: 18px;
  line-height: 1.28;
}

.success-page .success-msg {
  max-width: 320px;
  margin: 0 auto;
}

.wait-amount,
.success-amount {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 7px;
  margin: 20px 0 0;
  color: #1d1d1f;
  font-feature-settings: "tnum" 1;
}

.wait-page.no-nav .wait-amount,
.success-page.no-nav .success-amount,
.refund-page.no-nav .success-amount {
  gap: 5px;
  margin: 14px 0 0;
}

.wait-amount .receipt-symbol,
.success-amount .receipt-symbol {
  font-size: 31px;
  font-weight: 700;
  line-height: 1;
  transform: translateY(-6px);
}

.wait-page.no-nav .wait-amount .receipt-symbol,
.success-page.no-nav .success-amount .receipt-symbol,
.refund-page.no-nav .success-amount .receipt-symbol {
  font-size: 24px;
  transform: translateY(-4px);
}

.wait-amount .receipt-number,
.success-amount .receipt-number {
  font-size: 64px;
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 0;
}

.wait-page.no-nav .wait-amount .receipt-number,
.success-page.no-nav .success-amount .receipt-number,
.refund-page.no-nav .success-amount .receipt-number {
  font-size: 48px;
  line-height: 0.98;
}

.success-page .balance-link {
  margin-top: 26px;
  margin-bottom: 34px;
  text-align: center;
  color: #7f8fb2;
  font-size: 17px;
  font-weight: 600;
}

.success-page.no-nav .balance-link {
  margin-top: 18px;
  margin-bottom: 20px;
  font-size: 15px;
}

.wait-page .time-table,
.success-page .time-table,
.refund-page .time-table {
  margin-top: 56px;
  border-top: 1px solid #e2e2e2;
}

.wait-page.no-nav .time-table,
.success-page.no-nav .time-table,
.refund-page.no-nav .time-table {
  margin-top: 34px;
}

.wait-page .time-table .row,
.success-page .time-table .row,
.refund-page .time-table .row {
  display: grid;
  grid-template-columns: 108px 1fr;
  align-items: center;
  padding: 14px 0 0;
  font-size: 14px;
  line-height: 1.45;
}

.wait-page.no-nav .time-table .row,
.success-page.no-nav .time-table .row,
.refund-page.no-nav .time-table .row {
  grid-template-columns: 100px 1fr;
  padding-top: 10px;
  font-size: 13px;
}

.wait-page .time-table .row + .row,
.success-page .time-table .row + .row,
.refund-page .time-table .row + .row {
  padding-top: 4px;
}

.wait-page .time-table .row span:first-child,
.success-page .time-table .row span:first-child,
.refund-page .time-table .row span:first-child {
  color: #9b9b9b;
  text-align: left;
}

.wait-page .time-table .row span:last-child,
.success-page .time-table .row span:last-child,
.refund-page .time-table .row span:last-child {
  color: #2f2f2f;
  text-align: right;
  letter-spacing: 0;
}

.wait-page .receipt-spacer {
  flex: 1;
  min-height: 280px;
}

.wait-page.no-nav .receipt-spacer {
  min-height: 84px;
}

.success-page .receipt-spacer,
.refund-page .receipt-spacer {
  flex: 1;
  min-height: 360px;
}

.success-page.no-nav .receipt-spacer,
.refund-page.no-nav .receipt-spacer {
  min-height: 90px;
}

.wait-page .action-row {
  width: min(228px, 100%);
  margin: auto auto 22px;
}

.wait-page.no-nav .action-row {
  width: min(220px, 100%);
  margin-bottom: 16px;
}

.wait-page .receive-btn {
  width: 100%;
  height: 58px;
  border-radius: 10px;
  background: #07c160;
  color: #ffffff;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0;
  box-shadow: none;
}

.wait-page.no-nav .receive-btn {
  height: 52px;
  font-size: 18px;
}

.wait-page .wait-tip {
  margin: 0 auto 2px;
  text-align: center;
  color: #8e8e93;
  font-size: 14px;
  line-height: 1.6;
}

.wait-page.no-nav .wait-tip {
  font-size: 13px;
  line-height: 1.45;
}

@media (max-height: 760px) {
  .wait-page.no-nav .receipt-layout,
  .success-page.no-nav .receipt-layout,
  .refund-page.no-nav .receipt-layout {
    padding-top: 10px;
    padding-left: 28px;
    padding-right: 28px;
    padding-bottom: 14px;
  }

  .wait-page.no-nav .status-icon,
  .refund-page.no-nav .status-icon {
    margin-top: 18px;
    margin-bottom: 14px;
    width: 60px;
    height: 60px;
  }

  .success-page.no-nav .status-icon {
    margin-top: 18px;
    margin-bottom: 18px;
    width: 48px;
    height: 48px;
  }

  .wait-page.no-nav .wait-title,
  .success-page.no-nav .success-msg,
  .refund-page.no-nav .refund-msg {
    font-size: 16px;
  }

  .wait-page.no-nav .wait-amount .receipt-symbol,
  .success-page.no-nav .success-amount .receipt-symbol,
  .refund-page.no-nav .success-amount .receipt-symbol {
    font-size: 20px;
    transform: translateY(-3px);
  }

  .wait-page.no-nav .wait-amount .receipt-number,
  .success-page.no-nav .success-amount .receipt-number,
  .refund-page.no-nav .success-amount .receipt-number {
    font-size: 40px;
  }

  .wait-page.no-nav .time-table,
  .success-page.no-nav .time-table,
  .refund-page.no-nav .time-table {
    margin-top: 22px;
  }

  .wait-page.no-nav .receipt-spacer,
  .success-page.no-nav .receipt-spacer,
  .refund-page.no-nav .receipt-spacer {
    min-height: 36px;
  }

  .wait-page.no-nav .receive-btn {
    height: 46px;
    font-size: 17px;
  }
}

.wait-page .wait-tip .link {
  color: #6b7ea5;
  font-size: 14px;
  font-weight: 600;
}

.chat-nav {
  z-index: 15;
  background: #ededed;
  height: 56px;
  grid-template-columns: 46px 1fr 46px;
}

.chat-nav .nav-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0;
}

.chat-nav .nav-actions {
  padding-right: 12px;
  font-size: 24px;
  letter-spacing: 0;
}

.chat-close-btn {
  width: 46px;
  height: 56px;
  border: none;
  background: transparent;
  display: grid;
  place-items: center;
  padding-left: 12px;
}

.chat-close-btn svg {
  width: 20px;
  height: 20px;
}

.chat-body {
  background: #ededed;
}

.chat-tools {
  background: #ececec;
  border-top: 1px solid #d7d7d7;
}

.chat-input {
  min-height: 72px;
  padding: 11px 8px 10px;
  gap: 9px;
  align-items: center;
}

.icon-btn {
  width: 41px;
  height: 41px;
  border-radius: 50%;
  background: transparent;
}

.icon-btn svg {
  width: 31px;
  height: 31px;
  stroke: #414141;
}

.icon-btn.active,
.plus-btn.active {
  background: transparent;
}

.input-shell,
.hold-talk-btn {
  height: 48px;
  border-radius: 8px;
}

.input-shell {
  background: #f7f7f7;
  border: 1px solid #ececec;
  padding: 0 11px 0 14px;
}

.input-shell input {
  font-size: 20px;
  color: #242424;
}

.inner-mic-btn {
  width: 28px;
  height: 28px;
}

.inner-mic-btn svg {
  width: 20px;
  height: 20px;
  stroke: #7a7a7a;
}

.hold-talk-btn {
  border: 1px solid #dadada;
  background: #f8f8f8;
  color: #2b2b2b;
  font-size: 18px;
  font-weight: 500;
}

.chat-more-panel {
  background: #ededed;
  border-top: 1px solid #d7d7d7;
  padding: 18px 32px 16px;
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px 16px;
}

.panel-item {
  gap: 10px;
  color: #707070;
  font-size: 15px;
  font-weight: 400;
}

.panel-icon {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  border: 1px solid #efefef;
  background: #f6f6f6;
  box-shadow: none;
}

.panel-icon svg {
  width: 34px;
  height: 34px;
  stroke: #5b5b5b;
}

.panel-icon img {
  width: 36px;
  height: 36px;
}

.panel-dots {
  margin-top: 18px;
  gap: 10px;
}

.dot {
  width: 9px;
  height: 9px;
  background: #d2d2d2;
}

.dot.active {
  background: #8c8c8c;
}

@media (max-width: 520px) {
  .wait-page .receipt-layout,
  .success-page .receipt-layout,
  .refund-page .receipt-layout {
    padding-left: 36px;
    padding-right: 36px;
  }

  .chat-more-panel {
    padding-left: 22px;
    padding-right: 22px;
  }

  .panel-icon {
    width: min(80px, 18vw);
    height: min(80px, 18vw);
  }
}

/* ===== Contact page fine tune (refs 1/2) ===== */
.nav-back-icon {
  border: none;
  background: transparent;
  padding: 0 0 0 13px;
}

.nav-back-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.contact-page .wx-nav {
  background: #ededed;
  border-bottom: none;
}

.contact-page .contact-flat {
  padding-top: 14px;
}

.contact-page .contact-top-large {
  grid-template-columns: 76px 1fr;
  gap: 12px;
  padding: 10px 16px 20px;
}

.contact-page .avatar-lg-square {
  width: 62px;
  height: 62px;
  border-radius: 8px;
  background-color: #d8d8d8;
}

.contact-page .contact-name-large {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.15;
}

.contact-page .contact-name-large .gender-icon {
  width: 16px;
  height: 16px;
  margin-top: 2px;
}

.contact-page .contact-id,
.contact-page .contact-region-large {
  margin-top: 4px;
  font-size: 14px;
  color: #8c8c8c;
  line-height: 1.45;
}

.contact-page .section {
  margin-bottom: 10px;
  padding: 13px 16px;
  background: #fff;
  border-top: 1px solid #e4e4e4;
}

.contact-page .compact-row {
  margin-top: -10px;
}

.contact-page .section-title {
  font-size: 14px;
  font-weight: 600;
  color: #1f1f1f;
}

.contact-page .section-desc {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.45;
  color: #b7b7b7;
}

.contact-page .chevron {
  font-size: 24px;
  color: #c8c8c8;
}

.contact-page .add-book-btn,
.contact-page .friend-action {
  min-height: 54px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 600;
  line-height: 54px;
}

.contact-page .add-book-btn {
  color: #6c80a8;
}

.contact-page .friend-action {
  justify-content: center;
  gap: 6px;
  color: #5d6f94;
}

.contact-page .friend-action .action-icon {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  color: #9199a6;
}

.contact-page .friend-action .action-icon svg {
  width: 19px;
  height: 19px;
}

.contact-page .action-avcall {
  margin-top: -1px;
}


/* ===== Chat/contact polish round 2 (2026-03) ===== */
.contact-page .contact-flat {
  padding-top: 12px;
}

.contact-page .contact-top-large {
  grid-template-columns: 69px 1fr;
  gap: 13px;
  padding: 8px 16px 32px;
}

.contact-page .contact-meta-large {
  padding-top: 1px;
}

.contact-page .avatar-lg-square {
  width: 63px;
  height: 63px;
  border-radius: 8px;
}

.contact-page .section {
  padding: 15px 16px 15px;
}

.contact-page .compact-row {
  margin-top: -10px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.contact-page .section-desc {
  margin-top: 9px;
  line-height: 1.5;
}

.contact-page .contact-name-large {
  gap: 5px;
  font-size: 25px;
  font-weight: 700;
}

.contact-page .contact-name-large .gender-icon {
  width: 15px;
  height: 15px;
  margin-top: 3px;
}

.contact-page .contact-id,
.contact-page .contact-region-large {
  margin-top: 3px;
  color: #8d8d8d;
}

.contact-page .add-book-btn,
.contact-page .friend-action {
  min-height: 56px;
  line-height: 56px;
}

.contact-page .add-book-btn {
  color: #687da6;
}

.contact-page .friend-action .action-icon {
  width: 21px;
  height: 21px;
}

.contact-page .friend-action .action-icon svg {
  width: 20px;
  height: 20px;
}

.contact-add-page .contact-top-large {
  padding-bottom: 37px;
}

.contact-add-page .section {
  padding-top: 16px;
  padding-bottom: 17px;
}

.contact-add-page .compact-row {
  padding-top: 17px;
  padding-bottom: 17px;
}

.contact-add-page .contact-main-action {
  margin-top: 6px;
}

.contact-added-page .contact-top-large {
  padding-bottom: 33px;
}

.contact-added-page .friend-action {
  color: #657aa4;
}

.contact-added-page .friend-action .action-icon {
  color: #8d96a8;
}

.chat-body .msg:first-child {
  margin-top: 2px;
}

.chat-input.voice-mode {
  padding-top: 10px;
  padding-bottom: 11px;
}

.hold-talk-btn {
  border-color: #d4d4d4;
  background: #f7f7f7;
  font-size: 17px;
  font-weight: 500;
}

.chat-more-panel {
  padding: 20px 24px 18px;
}

.panel-grid {
  gap: 19px 16px;
}

.panel-item {
  gap: 11px;
  font-size: 14px;
}

.panel-icon {
  width: 82px;
  height: 82px;
  border-radius: 18px;
}

.panel-icon img {
  width: 38px;
  height: 38px;
}

.panel-dots {
  margin-top: 20px;
}

/* ===== More panel / voice mode fine tune (refs 6/7) ===== */
.chat-tools {
  background: #f1f1f1;
  border-top-color: #d8d8d8;
}

.chat-input {
  padding: 8px 9px 9px;
  gap: 7px;
  background: #f1f1f1;
}

.icon-btn {
  width: 36px;
  height: 36px;
}

.icon-btn svg {
  width: 22px;
  height: 22px;
}

.input-shell {
  height: 39px;
  border-radius: 4px;
  border-color: #e2e2e2;
  padding: 0 8px 0 10px;
}

.input-shell input {
  font-size: 16px;
}

.inner-mic-btn {
  width: 24px;
  height: 24px;
}

.chat-input.voice-mode {
  padding-top: 8px;
  padding-bottom: 10px;
  gap: 8px;
}

.chat-input.voice-mode .icon-btn {
  width: 35px;
  height: 35px;
}

.hold-talk-btn {
  height: 39px;
  border-radius: 4px;
  border-color: #dedede;
  background: #ffffff;
  color: #222;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.hold-talk-btn.is-holding {
  background: #e7e7e7;
}

.chat-more-panel {
  background: #efefef;
  border-top-color: #dddddd;
  padding: 14px 12px calc(14px + env(safe-area-inset-bottom));
}

.panel-grid {
  gap: 18px 12px;
}

.panel-item {
  gap: 8px;
  font-size: 12.5px;
  color: #6e6e6e;
}

.panel-icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: #f7f7f7;
  border: 1px solid #ededed;
}

.panel-icon img {
  width: 31px;
  height: 31px;
}

.panel-dots {
  gap: 7px;
  margin-top: 14px;
}

.dot {
  width: 7px;
  height: 7px;
}


/* ===== Received/refund chat alignment (ref 12) ===== */
.chat-body[data-state="received"],
.chat-body[data-state="refunded"],
.chat-body[data-state="expired"] {
  padding: 16px 15px 8px;
}

.chat-body[data-state="received"] .msg,
.chat-body[data-state="refunded"] .msg,
.chat-body[data-state="expired"] .msg {
  gap: 10px;
  margin-bottom: 14px;
}

.chat-body[data-state="received"] .msg.incoming,
.chat-body[data-state="refunded"] .msg.incoming,
.chat-body[data-state="expired"] .msg.incoming {
  padding-right: 34px;
}

.chat-body[data-state="received"] .msg.outgoing,
.chat-body[data-state="refunded"] .msg.outgoing,
.chat-body[data-state="expired"] .msg.outgoing {
  padding-left: 34px;
}

.chat-body[data-state="received"] .avatar,
.chat-body[data-state="refunded"] .avatar,
.chat-body[data-state="expired"] .avatar {
  width: 37px;
  height: 37px;
  border-radius: 6px;
}

.chat-body[data-state="received"] .bubble.transfer.accepted,
.chat-body[data-state="refunded"] .bubble.refund,
.chat-body[data-state="expired"] .bubble.refund {
  width: 242px;
  min-width: 242px;
  max-width: 242px;
  border-radius: 8px;
  padding: 12px 14px 10px;
}

.chat-body[data-state="received"] .bubble.transfer.accepted {
  background: #e8bc85;
}

.chat-body[data-state="refunded"] .bubble.refund,
.chat-body[data-state="expired"] .bubble.refund {
  background: #d8c3ad;
}

.chat-body[data-state="received"] .accepted-in::before,
.chat-body[data-state="received"] .accepted-out::before,
.chat-body[data-state="refunded"] .refund-in::before,
.chat-body[data-state="refunded"] .refund-out::before,
.chat-body[data-state="expired"] .refund-in::before,
.chat-body[data-state="expired"] .refund-out::before {
  top: 15px;
}

.chat-body[data-state="received"] .transfer-top,
.chat-body[data-state="refunded"] .refund-top,
.chat-body[data-state="expired"] .refund-top {
  grid-template-columns: 47px 1fr;
  gap: 10px;
}

.chat-body[data-state="received"] .transfer-icon,
.chat-body[data-state="refunded"] .refund-icon,
.chat-body[data-state="expired"] .refund-icon {
  width: 47px;
  height: 47px;
}

.chat-body[data-state="received"] .transfer-text,
.chat-body[data-state="refunded"] .refund-text,
.chat-body[data-state="expired"] .refund-text {
  gap: 3px;
  padding-top: 1px;
}

.chat-body[data-state="received"] .transfer-amount,
.chat-body[data-state="refunded"] .refund-amount,
.chat-body[data-state="expired"] .refund-amount {
  font-size: 18px;
}

.chat-body[data-state="received"] .transfer-call,
.chat-body[data-state="refunded"] .refund-call,
.chat-body[data-state="expired"] .refund-call {
  font-size: 11px;
  line-height: 1.1;
}

.chat-body[data-state="received"] .transfer-label,
.chat-body[data-state="refunded"] .refund-label,
.chat-body[data-state="expired"] .refund-label {
  margin-top: 6px;
  font-size: 10px;
}

.chat-body[data-state="received"] .msg:last-of-type,
.chat-body[data-state="refunded"] .msg:last-of-type,
.chat-body[data-state="expired"] .msg:last-of-type {
  margin-bottom: 0;
}

.chat-body[data-state="received"] .chat-time,
.chat-body[data-state="refunded"] .chat-time,
.chat-body[data-state="expired"] .chat-time {
  margin: 17px 0 2px;
  font-size: 14px;
  line-height: 1.15;
}

.chat-body.has-history-before-settled .history-before-settled-tail {
  margin-bottom: 7px;
}

.chat-body.has-history-before-settled #settledOutgoingMsg {
  margin-top: -3px;
  margin-bottom: 0;
}

.chat-body.has-history-before-settled #settledTimeNode {
  margin: 10px 0 2px;
}
