:root {
  --ink: #17211d;
  --muted: #758078;
  --green: #e29528;
  --green-dark: #c96f13;
  --gold: #c77a1b;
  --cream: #f4f1e9;
  --card: #ffffff;
  --line: #e7e8e3;
  --danger: #a33b32;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 95% 0%, rgba(199,154,74,.2), transparent 28%),
    radial-gradient(circle at 0% 38%, rgba(226,149,40,.1), transparent 25%),
    linear-gradient(180deg, #faf8f2 0%, #edf2ed 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.page-shell { width: min(100%, 520px); margin: 0 auto; padding: max(26px, env(safe-area-inset-top)) 18px calc(30px + env(safe-area-inset-bottom)); }
.brand-header { display: flex; align-items: center; gap: 13px; margin: 3px 4px 25px; }
.brand-copy { min-width: 0; }
.eyebrow { margin: 0 0 3px; color: var(--gold); font-size: 10px; font-weight: 800; letter-spacing: .18em; }
h1 { margin: 0; font-size: 24px; letter-spacing: .04em; }
.secure-badge { margin-left: auto; padding: 6px 9px; color: var(--green-dark); background: rgba(255,255,255,.72); border: 1px solid rgba(201,111,19,.16); border-radius: 999px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.secure-badge::before { content: "✓"; margin-right: 4px; }
.card { padding: 25px 21px; background: rgba(255,255,255,.94); border: 1px solid rgba(255,255,255,.86); border-radius: 24px; box-shadow: 0 20px 52px rgba(39,54,46,.1); backdrop-filter: blur(12px); }
.section-heading { display: flex; gap: 13px; margin-bottom: 24px; }
.section-heading h2 { margin: 0 0 7px; font-size: 19px; }
.section-heading p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.step { flex: 0 0 auto; color: var(--gold); font: 700 12px Georgia, serif; padding-top: 4px; }
.field-label { display: block; margin: 16px 2px 8px; font-size: 13px; font-weight: 700; }
.field { width: 100%; height: 52px; padding: 0 15px; color: var(--ink); background: #f8f9f6; border: 1px solid var(--line); border-radius: 13px; outline: none; transition: .2s; appearance: none; }
.field:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(226,149,40,.12); }
.code-row { display: grid; grid-template-columns: 1fr 116px; gap: 10px; }
.primary-button { width: 100%; min-height: 54px; margin-top: 24px; color: white; background: linear-gradient(135deg, var(--green), var(--green-dark)); border: 0; border-radius: 14px; font-weight: 800; letter-spacing: .06em; box-shadow: 0 12px 26px rgba(201,111,19,.25); }
.primary-button:active, .secondary-button:active, .stepper button:active { transform: scale(.98); }
.primary-button:disabled { opacity: .48; box-shadow: none; }
.secondary-button { color: var(--green-dark); background: #fff5e8; border: 1px solid #f1d6b5; border-radius: 12px; font-size: 13px; font-weight: 700; }
.secondary-button:disabled { color: var(--muted); }
.member-row, .quantity-row, .summary-row { display: flex; align-items: center; justify-content: space-between; }
.member-row { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.member-row div { display: flex; align-items: baseline; gap: 10px; }
.member-row strong { color: var(--green); font-size: 20px; }
.muted { color: var(--muted); font-size: 13px; }
.text-button { padding: 8px 0; color: var(--muted); background: none; border: 0; font-size: 13px; }
.balance-block { padding: 24px 2px 20px; }
.balance-block span { display: block; color: var(--muted); font-size: 13px; }
.balance-block strong {
  display: block;
  margin-top: 5px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 42px;
  font-weight: 750;
  line-height: 1.12;
  letter-spacing: -.025em;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
}
.offer-block { padding: 18px; color: white; background: linear-gradient(135deg, var(--green-dark), var(--green)); border-radius: 17px; }
.offer-block p { margin: 0 0 13px; color: rgba(255,255,255,.68); font-size: 12px; }
.offer-equation { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.offer-equation strong { font-size: 22px; }
.offer-equation strong em { color: #fff0c5; font: inherit; font-style: normal; }
.offer-equation span { color: rgba(255,255,255,.72); font-size: 12px; }
.offer-equation b { margin: 0 7px; color: #fff0c5; }
.quantity-row { padding: 24px 2px 18px; }
.quantity-row p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.stepper { display: grid; grid-template-columns: 38px 44px 38px; align-items: center; text-align: center; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.stepper button { height: 38px; color: var(--green); background: #f5f8f5; border: 0; font-size: 20px; }
.stepper button:disabled { color: #c5c9c6; }
.stepper output { font-weight: 800; }
.summary-row { align-items: flex-start; gap: 12px; padding: 14px 2px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.summary-row span:last-child { text-align: right; }
.summary-row b { color: var(--ink); }
.offer-equation strong, .stepper output, .summary-row b {
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
}
.notice { margin: 10px 0 0; padding: 11px 13px; color: var(--danger); background: #fff1ef; border-radius: 10px; font-size: 13px; }
.result-card { padding: 38px 24px; text-align: center; background: white; border-radius: 22px; box-shadow: 0 18px 44px rgba(39,54,46,.09); }
.result-icon { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 18px; color: white; background: var(--green); border-radius: 50%; font-size: 28px; font-weight: 800; }
.result-card h2 { margin: 0 0 10px; }
.result-card p { margin: 0; color: var(--muted); line-height: 1.7; white-space: pre-line; }
.secondary-wide-button { width: 100%; min-height: 48px; margin-top: 24px; color: var(--green-dark); background: #fff5e8; border: 1px solid #f1d6b5; border-radius: 12px; font-weight: 800; }
.footer-note { margin: 20px 8px 0; color: #89918b; text-align: center; font-size: 11px; line-height: 1.6; }
.modal { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 22px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(13,24,19,.56); backdrop-filter: blur(4px); }
.confirm-dialog { position: relative; width: min(100%, 390px); padding: 28px 22px 22px; background: #fff; border-radius: 22px; box-shadow: 0 24px 70px rgba(5,22,15,.3); text-align: center; animation: dialog-in .2s ease-out; }
.confirm-icon { display: grid; place-items: center; width: 44px; height: 44px; margin: 0 auto 14px; color: #8b6122; background: #fbf1dc; border-radius: 50%; font-size: 22px; font-weight: 800; }
.confirm-dialog h2 { margin: 0; color: var(--ink); font-size: 21px; }
.confirm-description { margin: 7px 0 19px; color: var(--muted); font-size: 13px; }
.confirm-summary { padding: 4px 15px; background: #f7f8f5; border-radius: 14px; text-align: left; }
.confirm-summary div { display: flex; align-items: center; justify-content: space-between; min-height: 43px; border-bottom: 1px solid var(--line); }
.confirm-summary div:last-child { border-bottom: 0; }
.confirm-summary span { color: var(--muted); font-size: 13px; }
.confirm-summary strong { color: var(--ink); font-size: 15px; font-variant-numeric: lining-nums tabular-nums; }
.confirm-warning { display: flex; align-items: flex-start; gap: 9px; margin: 16px 0 19px; padding: 12px; color: #8a4e24; background: #fff5e9; border: 1px solid #f5dfc6; border-radius: 11px; text-align: left; font-size: 13px; font-weight: 700; line-height: 1.5; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.confirm-warning input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.check-mark { flex: 0 0 auto; display: grid; place-items: center; width: 20px; height: 20px; margin-top: 1px; background: #fff; border: 1.5px solid #d3ad7b; border-radius: 6px; transition: .16s ease; }
.confirm-warning input:checked + .check-mark { background: var(--green); border-color: var(--green); }
.confirm-warning input:checked + .check-mark::after { content: "✓"; color: #fff; font-size: 14px; font-weight: 900; line-height: 1; }
.confirm-warning input:focus-visible + .check-mark { outline: 3px solid rgba(226,149,40,.22); outline-offset: 2px; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1.35fr; gap: 10px; }
.confirm-actions button { min-height: 48px; border-radius: 12px; font-weight: 800; }
.cancel-button { color: var(--muted); background: #f3f4f1; border: 1px solid var(--line); }
.confirm-button { color: #fff; background: var(--green-dark); border: 0; box-shadow: 0 9px 20px rgba(201,111,19,.22); }
.confirm-button:disabled { color: rgba(255,255,255,.82); background: #9eb2a9; box-shadow: none; cursor: not-allowed; }
.modal-open { overflow: hidden; }
.toast { position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom)); z-index: 20; max-width: calc(100% - 40px); padding: 11px 16px; color: white; background: rgba(18,27,22,.92); border-radius: 10px; transform: translateX(-50%); font-size: 13px; box-shadow: 0 8px 28px rgba(0,0,0,.2); }
.hidden { display: none !important; }
@media (max-width: 360px) { .page-shell { padding-left: 13px; padding-right: 13px; } .card { padding-left: 16px; padding-right: 16px; } .secure-badge { display: none; } }
@media (prefers-reduced-motion: no-preference) { .card, .result-card { animation: rise .38s ease-out; } @keyframes rise { from { opacity: 0; transform: translateY(8px); } } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
