:root {
  --gold: #68500e;
  --bg: #f1f1f1;
  --form-bg: #f2f2f2;
  --red: #eb4141;
  --blue: #2879fc;
  --bar: #f8f8f8;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  background: #f8f8f8;
  color: #1a1a1a;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html { font-size: 16.64px; }

body {
  overflow-x: hidden;
  padding-bottom: var(--safe-bottom);
}

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

img { max-width: 100%; border: 0; vertical-align: middle; }

#app { min-height: 100vh; }

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  height: calc(44px + var(--safe-top));
  padding-top: var(--safe-top);
  background: var(--bar);
  display: none;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(0, 0, 0, .06);
}

body.in-wechat .nav { display: flex; }

.nav-title {
  font-size: 17px;
  font-weight: 500;
  color: #000;
  letter-spacing: .5px;
}

.nav-back {
  position: absolute;
  left: 0;
  top: var(--safe-top);
  height: 44px;
  min-width: 44px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: #000;
  font-size: 22px;
  line-height: 44px;
}

.toast {
  position: fixed;
  left: 50%;
  top: 46%;
  z-index: 80;
  transform: translate(-50%, -50%);
  max-width: calc(100vw - 48px);
  padding: 12px 18px;
  border-radius: 8px;
  background: rgba(0, 0, 0, .72);
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  pointer-events: none;
}

.mask {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(0, 0, 0, .5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mask-card {
  background: #fff;
  padding: 20px 28px;
  border-radius: 8px;
  color: #333;
  font-size: 15px;
}

/* ===== 首页 ===== */
.home { background: var(--bg); min-height: 100vh; }

.home-head { position: relative; background: var(--bg); }

.home-banner {
  display: block;
  width: 100%;
  height: auto;
}

.home-title {
  position: absolute;
  top: 3.125rem;
  left: 0;
  width: 100%;
  margin: 0;
  text-align: center;
  font-size: 2.5rem;
  line-height: 1.1;
  color: var(--gold);
  font-weight: 700;
}

.home-body { margin-top: 5px; }

.home-content {
  position: relative;
  z-index: 1;
  margin-top: -4.375rem;
  padding: .75rem;
}

.product-card {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  column-gap: .75rem;
  row-gap: .35rem;
  padding: 1.15rem 1rem 1rem;
  margin-bottom: .78125rem;
  background: #fff;
  border-radius: .625rem;
  align-items: center;
}

.product-name {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  font-weight: 400;
  color: #222;
}

.product-action { grid-column: 1; grid-row: 2; display: flex; justify-content: center; }

.btn-search {
  width: 7.1875rem;
  height: 2.5rem;
  border: 0;
  color: #fff;
  font-size: .875rem;
  background: linear-gradient(180deg, #f07272 0%, #eb4141 55%, #e23a3a 100%);
  border-radius: 6px;
}

.product-sub {
  grid-column: 1;
  grid-row: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .625rem;
  color: #999;
}

.product-pic {
  grid-column: 2;
  grid-row: 1 / span 3;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.product-pic img {
  width: 100%;
  height: 6.5625rem;
  object-fit: contain;
}

.step-wrap { margin-top: 3.75rem; }

.step-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.step-card {
  flex: 1;
  min-width: 0;
  min-height: 8.6rem;
  height: auto;
  padding: 0 .45rem .55rem;
  margin-bottom: .46875rem;
  background: #fff;
  border-radius: .625rem;
  border: 1px solid rgba(104, 80, 14, .28);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.index-block {
  display: block;
  flex: 0 0 auto;
  margin-top: -.9375rem;
  width: 1.875rem;
  height: 1.875rem;
  border-radius: 50%;
  line-height: 1.875rem;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: var(--blue);
  border: .03125rem solid var(--blue);
}

.step-title { margin: .625rem 0; font-size: 1.125rem; color: #222; }

.step-desc { margin: 0; font-size: .6875rem; color: #333; line-height: 1.35; word-break: break-all; }

.about-banner {
  display: block;
  width: 100%;
  height: 6.9375rem;
  margin: .875rem auto;
  object-fit: cover;
  background: #fff;
  border-radius: .625rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto 1fr;
  column-gap: 10px;
}

.about-h {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 2rem;
  font-size: .95rem;
  color: #222;
}

.about-h img { width: 1.75rem; height: 1.75rem; margin-right: 4px; }

.about-p {
  margin: 0;
  padding: .8125rem .5625rem .75rem;
  border-radius: .625rem;
  background: #fff;
  color: #818488;
  line-height: 1.8;
  font-size: .71875rem;
  text-align: justify;
}

.gray {
  width: 21.875rem;
  max-width: 100%;
  margin: 1.03125rem auto 1.5rem;
  color: #999;
  font-size: .625rem;
  line-height: 1.7;
}

.gray p { margin: 0; }

/* ===== 表单 ===== */
.form-page { background: var(--form-bg); min-height: 100vh; }

.form-head { position: relative; height: 9.2rem; overflow: hidden; }

.form-head img { display: block; width: 100%; height: 9.2rem; object-fit: cover; object-position: center top; }

.main-title {
  position: absolute;
  top: 2.6rem;
  left: 0;
  width: 100%;
  margin: 0;
  text-align: center;
  font-size: 2.5rem;
  color: var(--gold);
  font-weight: 700;
  z-index: 2;
}

.form-content {
  position: relative;
  z-index: 1;
  margin-top: .4rem;
  padding: 0 .625rem 1.5rem;
}

.field {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 4.375rem;
  margin-top: .8125rem;
  padding: 1.25rem;
  background: #fff;
  border-radius: .625rem;
}

.field-label { font-size: 1rem; line-height: 1.875rem; color: #1a1a1a; letter-spacing: .0625rem; }

.required { color: red; margin-right: 2px; }

.field input[type="text"],
.field input[type="tel"] {
  width: 100%;
  height: 1.875rem;
  border: 0;
  border-bottom: .03125rem solid #1a1a1a;
  border-radius: 0;
  background: transparent;
  font-size: .9rem;
  outline: none;
  padding: 0;
  -webkit-appearance: none;
}

.field input::placeholder { color: #b5b5b5; }

.radio-group { display: flex; align-items: center; min-height: 30px; }

.radio-group label {
  display: flex;
  align-items: center;
  margin-right: 20px;
  font-size: 15px;
}

.radio-group input { margin: 0 6px 0 0; accent-color: #007aff; transform: scale(1.05); }

.form-actions { width: 100%; margin-top: 5px; }

.tips {
  margin: 0 0 .3125rem .3125rem;
  color: rgba(135, 206, 235, .85);
  text-align: left;
  font-size: .75rem;
}

.btn-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8%;
}

.btn-submit,
.btn-reset {
  width: 45%;
  height: 2.6rem;
  margin-top: 20px;
  margin-bottom: 5rem;
  border: 0;
  border-radius: 8px;
  color: #fff;
  font-size: 1rem;
  background: linear-gradient(180deg, #f07272 0%, #eb4141 55%, #e23a3a 100%);
}

/* ===== 支付确认 ===== */
.pay-page { background: var(--form-bg); min-height: 100vh; padding-bottom: 24px; }

.pay-content {
  position: relative;
  z-index: 1;
  margin-top: .4rem;
  padding: 0 10px;
}

.card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
}

.notice, .steps {
  background: #5a8be8;
  color: #fff;
  font-size: 16px;
  line-height: 36px;
  border-radius: 10px 10px 0 0;
}

.notice { padding-left: 10px; text-align: left; }

.steps { text-align: center; }

.remark {
  margin: 10px;
  color: #333;
  font-size: 14px;
  line-height: 1.7;
  text-align: justify;
}

.steps-ui {
  margin: 10px 0;
  display: flex;
  justify-content: center;
}

.steps-ui img { display: block; width: 320px; max-width: 100%; }

.xian { border-top: 1px solid #ddd; margin-top: 5px; }

.fee-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 12px 10px 4px;
  font-size: 15px;
  font-weight: 700;
}

.fee-row .red { color: red; }

.pay-box { margin: 10px; }

.pay-way { font-size: 15px; margin-bottom: 8px; }

.wx-row { display: flex; align-items: center; margin-top: 20px; }

.wx-row img { width: 42.5px; height: 42.5px; margin-right: 30px; }

.wx-name, .wx-desc { display: flex; font-size: 14px; line-height: 1.5; }

.agree-row {
  margin: 25px 10px 8px 5px;
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #333;
}

.check {
  width: 22px;
  height: 22px;
  margin-right: 8px;
  border: 0;
  padding: 0;
  background: transparent;
}

.check img { width: 22px; height: 22px; display: block; }

.linkish { color: blue; }

.pay-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
  margin: 0 10px 16px;
  background: #fff;
  border-radius: 10px;
}

.pay-now {
  width: 95%;
  height: 44px;
  border: 0;
  border-radius: 22.5px;
  background: #e64340;
  color: #fff;
  font-size: 16px;
}

.pay-now:disabled { opacity: .55; }

.modal {
  width: 80%;
  max-width: 400px;
  height: min(530px, 82vh);
  background: #fff;
  padding: 10px;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
}

.modal h3 { margin: 8px 0 0; text-align: center; font-size: 17px; }

.modal-scroll {
  margin-top: 12px;
  flex: 1;
  overflow-y: auto;
  color: gray;
  font-size: 14px;
  line-height: 1.75;
  text-align: justify;
  padding: 0 6px;
}

.modal-ok {
  margin: 12px auto 8px;
  width: 60%;
  height: 40px;
  border: 0;
  border-radius: 30px;
  background: #5a8be8;
  color: #fff;
  font-size: 15px;
}

/* ===== 投诉 ===== */
.tousu-page { background: #fff; min-height: 100vh; padding: 18px 10px 30px; }

.t-field { display: flex; flex-direction: column; padding: 5px; margin-top: 5px; background: #fff; border-radius: 10px; font-size: 12px; }

.t-field span { font-size: 15px; margin: 6px 0; }

.t-field input, .t-field textarea {
  width: 100%;
  border: .5px solid #1a1a1a;
  border-radius: 0;
  font-size: 14px;
  padding: 6px 8px;
  outline: none;
}

.t-field textarea { height: 80px; resize: none; }

.t-tips { margin: 8px 5px; color: rgba(135, 206, 235, .55); font-size: 11px; }

.t-submit {
  margin: 20px 0 40px 5px;
  height: 32px;
  line-height: 32px;
  padding: 0 22px;
  border: 1px solid blue;
  background: #fff;
  color: #000;
  font-size: 15px;
}

/* ===== 协议 ===== */
.agreement {
  max-width: 900px;
  margin: 10px;
  padding: 16px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .08);
}

.agreement h2 { margin: 0; font-size: 20px; text-align: center; color: #333; }

.agreement .sub { margin: 8px 0 16px; text-align: center; font-size: 14px; color: #999; }

.agreement h3 { margin: 18px 0 10px; font-size: 16px; color: #333; }

.agreement p { margin: 0 0 8px; font-size: 14px; color: #555; line-height: 1.7; text-align: justify; }

/* ===== 微信扫码支付 ===== */
.wxpay-page {
  min-height: 100vh;
  background: linear-gradient(180deg, #07c160, #05a350 35%, #f5f5f5 35%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.wxpay-inner { max-width: 600px; margin: 0 auto; padding: 20px 16px 40px; }

.wx-header { text-align: center; padding: 30px 0 20px; color: #fff; }

.logo-wrap { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 20px; font-size: 20px; font-weight: 500; letter-spacing: 2px; }

.logo-wrap img { width: 40px; height: 40px; }

.wx-amount { font-size: 48px; font-weight: 600; line-height: 1; margin-bottom: 8px; }

.wx-amount-label { font-size: 14px; opacity: .9; }

.qr-card {
  background: #fff;
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .06);
}

.qr-title { font-size: 15px; color: #666; margin-bottom: 20px; }

.qr-box {
  display: inline-flex;
  padding: 16px;
  border: 1px solid #f0f0f0;
  border-radius: 12px;
}

.qr-box img, .qr-loading { width: 230px; height: 230px; }

.qr-loading { display: flex; align-items: center; justify-content: center; color: #999; font-size: 14px; }

.qr-tip { margin-top: 16px; color: #07c160; font-size: 14px; }

/* ===== 搜一搜支付引导 ===== */
.wap-page { min-height: 100vh; background: #f5f5f5; padding: 8px 0 20px; }

.top-guide {
  margin: 0 12px 14px;
  padding: 10px 10px 16px;
  border: 1px dashed #ddd;
  border-radius: 12px;
  background: #fff;
}

.top-arrow { margin: 0 8px 8px 0; color: #222; font-size: 72px; font-weight: 900; line-height: 1; text-align: right; }

.guide-text { color: #333; font-size: 17px; font-weight: 600; line-height: 1.8; text-align: center; }

.guide-text b { color: #d93025; }

.pay-card { margin: 0 12px; padding: 18px 14px; border-radius: 12px; background: #fff; }

.amount-title { margin: 0 0 18px; color: #222; font-size: 34px; font-weight: 700; text-align: center; }

.maintenance {
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #ffd6d6;
  border-radius: 8px;
  background: #fff7f7;
  color: #d93025;
  font-size: 14px;
  line-height: 1.7;
}

.link-title { margin-bottom: 8px; font-size: 14px; font-weight: 600; }

.link-box {
  width: 100%;
  min-height: 57px;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fafafa;
  color: #555;
  font-size: 13px;
  line-height: 20px;
  word-break: break-all;
  resize: none;
}

.copy-btn {
  width: 100%;
  height: 42px;
  margin-top: 12px;
  border: 0;
  border-radius: 6px;
  background: #5bc0de;
  color: #fff;
  font-size: 15px;
}

.bottom-tip { margin-top: 12px; color: #777; font-size: 13px; line-height: 1.7; }

@media (min-width: 480px) {
  #app { max-width: 480px; margin: 0 auto; box-shadow: 0 0 0 1px rgba(0, 0, 0, .04); min-height: 100vh; background: #f8f8f8; }
  .nav, .toast, .mask { max-width: 480px; margin-left: auto; margin-right: auto; }
  .nav { left: 0; right: 0; }
}
