:root {
  --ink: #1b2421;
  --muted: #68736e;
  --paper: #f2f0e9;
  --surface: #fbfaf6;
  --line: #d8dad2;
  --accent: #28745c;
  --accent-dark: #153a2f;
  --soft: #e4eee8;
  --danger: #9b4138;
  font-family: "Geist", "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body { margin: 0; min-height: 100dvh; background: var(--paper); }
button, input { font: inherit; }
button { color: inherit; }

.support-header {
  height: 66px; padding: max(12px, env(safe-area-inset-top)) 16px 10px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid rgba(27,36,33,.09);
}
.back-link { display: inline-flex; align-items: center; gap: 5px; color: var(--ink); font-size: 14px; font-weight: 720; text-decoration: none; }
.back-link svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.free-label { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.free-label i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: breathe 2.4s ease-in-out infinite; }

main { width: min(100%, 680px); margin: 0 auto; padding: 0 16px 48px; }
.support-intro { padding: 46px 5px 30px; }
.eyebrow, .step-label { margin: 0; color: var(--accent); font-size: 10px; font-weight: 760; letter-spacing: .15em; }
.support-intro h1 { margin: 12px 0 0; font-size: clamp(42px, 13vw, 68px); line-height: .93; letter-spacing: -.065em; font-weight: 730; }
.support-intro > p:last-child { max-width: 36em; margin: 22px 0 0; color: var(--muted); font-size: 13px; line-height: 1.75; }

.payment-panel {
  padding: 24px 20px 21px; border: 1px solid rgba(27,36,33,.12); border-radius: 22px;
  background: var(--surface); box-shadow: 0 24px 54px -40px rgba(21,58,47,.55);
}
.panel-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.panel-heading h2, .principles h2 { margin: 8px 0 0; font-size: 20px; line-height: 1.15; letter-spacing: -.035em; }
.route-mark { width: 40px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.amount-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 25px; }
.amount-option {
  height: 64px; border: 1px solid var(--line); border-radius: 14px; background: transparent;
  font-size: 25px; font-weight: 710; letter-spacing: -.04em; cursor: pointer;
  transition: transform .2s cubic-bezier(.16,1,.3,1), border-color .2s, background .2s, color .2s;
}
.amount-option span { margin-right: 3px; font-size: 13px; font-weight: 650; }
.amount-option.selected { border-color: var(--accent-dark); background: var(--accent-dark); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.13); }
.amount-option:active { transform: scale(.975); }

.custom-field { display: grid; gap: 7px; margin-top: 22px; }
.custom-field label { color: var(--muted); font-size: 11px; font-weight: 650; }
.input-wrap { height: 51px; display: grid; grid-template-columns: 28px 1fr; align-items: center; border-bottom: 1px solid var(--line); }
.input-wrap:focus-within { border-color: var(--accent); }
.input-wrap span { color: var(--muted); font-size: 15px; }
.input-wrap input { width: 100%; border: 0; outline: none; background: transparent; color: var(--ink); font-size: 21px; font-weight: 680; }
.input-wrap input::placeholder { color: #a0a8a3; font-size: 14px; font-weight: 450; }
.custom-field > p { margin: 0; color: #8a938e; font-size: 10px; }
.payment-error { margin: 14px 0 -5px; color: var(--danger); font-size: 12px; line-height: 1.5; }

.pay-button {
  width: 100%; height: 54px; margin-top: 22px; padding: 0 17px; display: flex; align-items: center; justify-content: space-between;
  border: 0; border-radius: 14px; background: var(--accent-dark); color: #fff; font-weight: 700; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14); transition: transform .2s cubic-bezier(.16,1,.3,1), opacity .2s;
}
.pay-button svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pay-button:active:not(:disabled) { transform: translateY(1px) scale(.99); }
.pay-button:disabled { cursor: not-allowed; opacity: .48; }
.pay-button.loading .button-label::after { content: ""; display: inline-block; width: 14px; height: 8px; margin-left: 8px; border-radius: 5px; background: rgba(255,255,255,.38); animation: pulse 1s ease-in-out infinite; }
.payment-helper { margin: 10px 0 0; color: #89918d; text-align: center; font-size: 10px; }

.principles { margin: 30px 4px 0; padding: 28px 1px 4px; border-top: 1px solid var(--line); }
.principle-list { margin-top: 21px; border-top: 1px solid var(--line); }
.principle-list p { margin: 0; padding: 14px 0; display: grid; grid-template-columns: 34px 1fr; gap: 8px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.55; }
.principle-list span { color: var(--accent); font-variant-numeric: tabular-nums; font-weight: 700; }
.contact { margin: 18px 0 0; color: var(--accent-dark); font-size: 11px; font-weight: 680; }

.native-view {
  position: fixed; inset: 0; padding: 20px; display: grid; place-items: center;
  background: rgba(27,36,33,.58); z-index: 4; animation: reveal .25s cubic-bezier(.16,1,.3,1) both;
}
.native-view[hidden] { display: none; }
.native-dialog {
  position: relative; width: min(100%, 370px); padding: 30px; border: 1px solid rgba(255,255,255,.3);
  border-radius: 22px; background: var(--surface); box-shadow: 0 30px 70px -30px rgba(10,24,19,.65);
}
.native-dialog h2 { margin: 9px 0 0; font-size: 26px; letter-spacing: -.045em; }
.native-close {
  position: absolute; top: 17px; right: 17px; width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%; background: transparent; cursor: pointer;
  transition: transform .2s cubic-bezier(.16,1,.3,1), background .2s;
}
.native-close:active { transform: scale(.96); }
.native-close svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.native-amount { margin: 7px 0 18px; color: var(--muted); font-size: 13px; }
.native-qr-frame { width: 238px; max-width: 100%; margin: 0 auto; padding: 12px; border: 1px solid var(--line); background: #fff; }
.native-qr-frame img { width: 100%; display: block; }
.native-status { margin: 17px 0 0; color: var(--muted); text-align: center; font-size: 11px; line-height: 1.6; }

.success-view {
  position: fixed; inset: 0; padding: 24px; display: grid; place-content: center; justify-items: start;
  background: var(--paper); z-index: 5; animation: reveal .45s cubic-bezier(.16,1,.3,1) both;
}
.success-view[hidden] { display: none; }
.success-mark { width: 58px; height: 58px; margin-bottom: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-dark); color: #fff; }
.success-mark svg { width: 34px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.success-view h2 { margin: 10px 0 0; font-size: 34px; letter-spacing: -.055em; }
.success-view > p:not(.eyebrow) { max-width: 27em; margin: 14px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.success-view a { margin-top: 30px; padding-bottom: 3px; border-bottom: 1px solid var(--accent); color: var(--accent-dark); font-size: 13px; font-weight: 720; text-decoration: none; }

footer { padding: 0 20px max(30px, env(safe-area-inset-bottom)); color: #89918d; text-align: center; font-size: 10px; line-height: 1.55; }
footer p { margin: 2px; }
footer a { color: inherit; text-decoration: none; }

@keyframes breathe { 50% { opacity: .35; transform: scale(.72); } }
@keyframes pulse { 50% { opacity: .35; transform: scaleX(.65); } }
@keyframes reveal { from { opacity: 0; transform: translateY(8px); } }

@media (min-width: 700px) {
  .support-header { padding-inline: max(28px, calc((100vw - 1040px) / 2)); }
  main { padding-top: 24px; }
  .support-intro { padding-top: 64px; }
  .payment-panel { padding: 30px; }
  .amount-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
