:root {
  --paper: #fffaf1;
  --surface: #ffffff;
  --ink: #222327;
  --muted: #73777f;
  --line: #ece2d4;
  --brand: #e73524;
  --brand-dark: #b91f15;
  --sun: #ffb534;
  --jade: #34b96f;
  --blue: #2677f2;
  --shadow: 0 22px 60px rgba(75, 40, 13, 0.16);
  color-scheme: light;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: radial-gradient(circle at top, #fff3d5 0, #f7f8fa 42%, #edf0f4 100%);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.phone-shell {
  position: relative;
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 16px 14px 26px;
  overflow-x: hidden;
  background: linear-gradient(180deg, #fff 0, var(--paper) 42%, #fff 100%);
  box-shadow: var(--shadow);
  --cta-bg: var(--brand);
  --cta-color: #fff;
  --cta-radius: 999px;
  --cta-shadow: 0 10px 24px rgba(199, 36, 25, 0.22);
}

.hero-card {
  position: relative;
  margin: 14px 0 18px;
  padding: 18px 16px 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 139, 48, 0.35);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 226, 71, 0.94) 0%, rgba(255, 141, 45, 0.95) 42%, rgba(255, 247, 230, 0.96) 100%),
    #ff9f2f;
  box-shadow: 0 14px 34px rgba(194, 80, 20, 0.2);
}

.hero-card::after {
  content: "";
  position: absolute;
  right: -48px;
  top: -36px;
  width: 156px;
  height: 156px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.26);
}

.hero-ribbon {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(35, 35, 35, 0.88);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.hero-card h1 {
  position: relative;
  z-index: 1;
  margin: 10px 0 8px;
  max-width: 320px;
  font-size: clamp(32px, 10vw, 44px);
  line-height: 0.98;
  letter-spacing: 0;
  white-space: pre-line;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.5);
}

.hero-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 315px;
  color: #3f3427;
  font-size: 14px;
  line-height: 1.65;
  font-weight: 700;
}

.feature-strip {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin-top: 14px;
}

.feature-strip span {
  display: grid;
  min-height: 58px;
  place-items: end center;
  padding: 8px 4px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.95)),
    radial-gradient(circle at 50% 22%, #383b48 0 16px, transparent 17px);
  color: #191b20;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.chat-flow {
  display: grid;
  gap: 14px;
}

.module-stack {
  display: grid;
  gap: 16px;
  padding-top: 14px;
}

.message {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.message.user {
  grid-template-columns: minmax(0, 1fr) auto;
  justify-items: end;
}

.avatar {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  margin-top: 1px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--brand);
  font-size: 10px;
  font-weight: 900;
}

.bubble {
  width: fit-content;
  max-width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 6px 17px 17px 17px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(54, 43, 30, 0.06);
}

.message.user .bubble {
  border-color: rgba(38, 119, 242, 0.18);
  border-radius: 17px 6px 17px 17px;
  background: var(--blue);
  color: #fff;
}

.bubble p {
  margin: 0;
  color: inherit;
  font-size: 14px;
  line-height: 1.7;
}

.quick-options {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.quick-options button,
.primary-cta,
.pay-cta,
.ghost-cta {
  width: 100%;
  min-height: 44px;
  border-radius: var(--cta-radius);
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.quick-options button {
  background: linear-gradient(180deg, #df3327, var(--brand-dark));
  color: #fff;
  box-shadow: 0 8px 18px rgba(191, 31, 21, 0.18);
}

.quick-options button:hover,
.primary-cta:hover,
.pay-cta:hover,
.ghost-cta:hover {
  transform: translateY(-1px);
}

.quick-options button:disabled {
  cursor: default;
  opacity: 0.64;
  transform: none;
}

.quick-options button:focus-visible,
.primary-cta:focus-visible,
.pay-cta:focus-visible,
.ghost-cta:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(38, 119, 242, 0.22);
  outline-offset: 2px;
}

.is-hidden {
  display: none;
}

.lead-card {
  width: 100%;
}

.match-title {
  font-weight: 900;
}

.lead-card ul {
  display: grid;
  gap: 6px;
  margin: 10px 0 14px;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.lead-form {
  display: grid;
  gap: 11px;
}

.lead-form label {
  display: grid;
  gap: 6px;
}

.lead-form label > span {
  color: #555b63;
  font-size: 12px;
  font-weight: 800;
}

.lead-form input:not([type="checkbox"]) {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffdfa;
  color: var(--ink);
}

.consent {
  grid-template-columns: 18px 1fr;
  align-items: start;
  gap: 8px !important;
}

.consent input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--brand);
}

.consent span {
  font-weight: 400 !important;
  line-height: 1.55;
}

.primary-cta {
  background: var(--cta-bg);
  color: var(--cta-color);
  box-shadow: var(--cta-shadow);
}

.pay-cta {
  margin-bottom: 10px;
  background: linear-gradient(180deg, #35c76d, #1d9f51);
  color: #fff;
  box-shadow: 0 10px 24px rgba(29, 159, 81, 0.2);
}

.plain-card,
.wechat-card,
.image-card {
  display: grid;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 28px rgba(54, 43, 30, 0.06);
}

.submodule-stack {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.sub-card {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: none;
}

.plain-card h2,
.wechat-card h2,
.image-card h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.plain-card p,
.wechat-card p,
.image-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.wechat-card img,
.image-card img {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.trust-panel {
  margin-top: 18px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.trust-panel h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.trust-grid div {
  display: grid;
  gap: 5px;
  min-height: 78px;
  padding: 10px 8px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(236, 226, 212, 0.75);
}

.trust-grid strong {
  font-size: 13px;
}

.trust-grid span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.sticky-bar {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr 136px;
  gap: 10px;
  width: min(100%, 430px);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  border-top: 1px solid rgba(236, 226, 212, 0.8);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(18px);
  box-shadow: 0 -10px 32px rgba(35, 31, 25, 0.08);
}

.sticky-bar div {
  display: grid;
  gap: 2px;
}

.sticky-bar span {
  color: var(--jade);
  font-size: 12px;
  font-weight: 800;
}

.sticky-bar strong {
  font-size: 14px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 90px;
  z-index: 80;
  max-width: min(320px, calc(100vw - 32px));
  padding: 10px 14px;
  transform: translate(-50%, 12px);
  border-radius: 999px;
  background: rgba(26, 28, 33, 0.9);
  color: #fff;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: end center;
  background: rgba(25, 27, 32, 0.38);
}

.result-sheet {
  position: relative;
  width: min(100%, 430px);
  padding: 28px 20px calc(24px + env(safe-area-inset-bottom));
  border-radius: 24px 24px 0 0;
  background: #fff;
  box-shadow: 0 -24px 70px rgba(18, 20, 24, 0.2);
  text-align: center;
}

.sheet-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f3f4f6;
  color: #59606a;
  font-size: 24px;
}

.loading-mark {
  width: 58px;
  height: 58px;
  margin: 0 auto 12px;
  border: 5px solid #f0e5dc;
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.95s linear infinite;
}

.result-sheet h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.result-sheet p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.sheet-qr {
  display: block;
  width: min(210px, 70vw);
  max-height: 210px;
  object-fit: contain;
  margin: 0 auto 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

/* 多档金额选择器已移除（v3 简化：只保留单一默认金额） */

.ghost-cta {
  margin-top: 10px;
  background: #eaf5ff;
  color: #1670c9;
}

@keyframes spin {
  to {
    transform: rotate(1turn);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    animation: float-in 0.45s ease both;
  }
}

@keyframes float-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@media (max-width: 360px) {
  .phone-shell {
    padding-inline: 10px;
  }

  .feature-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .trust-grid {
    grid-template-columns: 1fr;
  }

  .sticky-bar {
    grid-template-columns: 1fr 124px;
  }
}
