:root {
  --bg: #eef2ed;
  --surface: #ffffff;
  --surface-soft: #f4f7f2;
  --text: #202124;
  --muted: #697066;
  --line: #d8dfd5;
  --accent: #2f7a4f;
  --accent-dark: #215b39;
  --blue: #1d6fb8;
  --shadow: 0 14px 34px rgba(33, 38, 34, 0.1);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

button,
a {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.pay-shell {
  width: 100%;
  max-width: 430px;
  min-height: 100dvh;
  margin: 0 auto;
  padding-bottom: calc(22px + env(safe-area-inset-bottom));
  background: var(--surface);
  box-shadow: 0 0 0 1px rgba(33, 38, 34, 0.06), var(--shadow);
}

.pay-topbar {
  min-height: 52px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.pay-topbar strong {
  min-width: 0;
  text-align: center;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pay-exit-button {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  background: var(--surface-soft);
  font-size: 20px;
  line-height: 1;
}

.pay-exit-button:hover {
  background: #e8eee6;
}

.pay-hero {
  display: grid;
  gap: 9px;
  padding: 24px 18px 18px;
  background: linear-gradient(180deg, #f5faf4 0%, #ffffff 100%);
}

.eyebrow {
  margin: 0;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
}

.pay-hero h1 {
  margin: 0;
  font-size: 27px;
  line-height: 1.28;
  font-weight: 700;
}

.pay-hero p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.plan-list {
  display: grid;
  gap: 12px;
  padding: 0 14px 14px;
}

.plan-card {
  width: 100%;
  display: grid;
  gap: 13px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.plan-card.selected {
  border-color: var(--accent);
  background: #f1f8f2;
  box-shadow: 0 0 0 3px rgba(47, 122, 79, 0.1);
}

.plan-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.plan-head strong {
  display: block;
  font-size: 17px;
  line-height: 1.35;
}

.plan-head small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.price {
  color: var(--accent-dark);
  font-size: 19px;
  font-weight: 800;
  white-space: nowrap;
}

.plan-points {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.plan-points span {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  color: #405042;
  background: #edf3ef;
  font-size: 12px;
}

.pay-panel {
  display: grid;
  gap: 13px;
  margin: 0 14px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.order-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: end;
}

.order-summary span:first-child {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
}

.order-summary strong {
  min-width: 0;
  font-size: 16px;
}

#selectedPlanPrice {
  color: var(--accent-dark);
  font-size: 18px;
  font-weight: 800;
}

.wechat-box {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px dashed rgba(47, 122, 79, 0.38);
  border-radius: 8px;
  background: #ffffff;
}

.wechat-mark {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #ffffff;
  background: #20a45a;
  font-size: 15px;
  font-weight: 800;
}

.wechat-box strong {
  display: block;
  font-size: 15px;
}

.wechat-box p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.pay-button {
  min-height: 46px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--accent);
  font-size: 15px;
  font-weight: 800;
}

.pay-button:hover {
  background: var(--accent-dark);
}

.pay-status {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.pay-status.success {
  color: var(--accent-dark);
  font-weight: 700;
}

.service-note {
  display: grid;
  gap: 10px;
  padding: 20px 18px 0;
}

.service-note h2 {
  margin: 0;
  font-size: 17px;
}

.service-note ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

@media (max-width: 430px) {
  .pay-shell {
    box-shadow: none;
  }
}

@media (max-width: 340px) {
  .pay-hero h1 {
    font-size: 24px;
  }

  .plan-head {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .price {
    font-size: 18px;
  }
}
