:root {
  color-scheme: light;
  --page: #f6efe4;
  --paper: #fffaf2;
  --paper-bright: #fffdf8;
  --ink: #3c2e26;
  --muted: #766456;
  --line: #dfcbb3;
  --orange: #ce6734;
  --orange-dark: #b9572d;
  --gold: #dfa23b;
  --olive: #718258;
  --olive-soft: #e9eddf;
  --error: #a8473e;
  --error-bg: #fcece6;
  --shadow: 0 16px 42px rgba(89, 61, 38, .09);
  font-family: "PingFang SC", "Microsoft YaHei UI", "Segoe UI", system-ui, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--page); font-size: 16px; line-height: 1.6; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(circle at 12% 4%, rgba(227,168,59,.16), transparent 35%), radial-gradient(circle at 90% 7%, rgba(206,103,52,.11), transparent 31%), linear-gradient(#fff9f0, #f6efe4 70%); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--olive); outline-offset: 3px; }
a { color: #9b5436; text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, p { margin-top: 0; }
.site-shell { min-height: 100vh; display: flex; flex-direction: column; }
.site-header { position: sticky; top: 0; z-index: 10; width: 100%; min-height: 72px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 10px clamp(18px, 3vw, 40px); border-bottom: 1px solid var(--line); background: rgba(255,249,240,.94); box-shadow: 0 5px 23px rgba(89,61,38,.07); backdrop-filter: blur(12px); }
.brand { display: inline-flex; align-items: center; gap: 10px; justify-self: start; }
.brand-mark, .hero-mark, .modal-mark, .footer-mark { display: grid; place-items: center; flex: 0 0 auto; color: #fff; background: linear-gradient(145deg, #e5a644, #cf7040 57%, #718258); font-family: Georgia, "Songti SC", serif; font-weight: 750; box-shadow: 0 5px 14px rgba(151,91,47,.17); }
.brand-mark { width: 40px; height: 40px; border-radius: 13px; font-size: 23px; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.25; white-space: nowrap; }
.brand-name { font-family: Georgia, "Songti SC", serif; font-size: 17px; font-weight: 750; }
.brand-copy small { margin-top: 3px; color: var(--muted); font-size: 11px; letter-spacing: .09em; }
.site-nav { display: flex; justify-content: center; gap: 5px; }
.nav-button { min-height: 37px; padding: 8px 15px; border: 1px solid transparent; border-radius: 100px; color: var(--muted); background: transparent; font-size: 13px; font-weight: 700; white-space: nowrap; }
.nav-button:hover { background: #f0e3d1; color: var(--ink); }
.nav-button.is-active { border-color: rgba(206,103,52,.38); background: #fdf0e5; color: var(--orange-dark); }
.store-link { justify-self: end; font-size: 13px; font-weight: 700; }
main { flex: 1; width: min(680px, calc(100% - 32px)); margin: 0 auto; padding: 50px 0 70px; }
.view:not(.is-active) { display: none; }
.hero { display: flex; align-items: center; justify-content: center; gap: 20px; margin: 0 0 28px; }
.hero-mark { width: 72px; height: 72px; border-radius: 21px; font-size: 40px; }
.hero-copy { min-width: 0; }
.eyebrow, .panel-kicker { display: inline-block; color: var(--gold); font-size: 12px; font-weight: 800; letter-spacing: .11em; }
.hero h1, .simple-hero h1 { margin: 6px 0 5px; font-family: Georgia, "Noto Serif SC", "Songti SC", serif; font-size: clamp(27px, 3vw, 35px); line-height: 1.35; letter-spacing: -.02em; }
.hero p, .simple-hero p { margin: 0; color: var(--muted); font-size: 14px; }
.workspace { display: flex; flex-direction: column; gap: 25px; }
.steps-card { padding: 0 14px; }
.step-list { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.step-list li { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-height: 62px; border-radius: 11px; color: #998b7d; text-align: center; }
.step-list li:not(:last-child)::after { content: ""; position: absolute; top: 18px; left: calc(50% + 29px); width: calc(100% - 48px); border-top: 1px solid #d9cbb8; }
.step-number { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid #dccbb6; border-radius: 50%; color: #978673; background: #fcf5e9; font-size: 12px; font-weight: 750; }
.step-list strong { font-size: 12px; font-weight: 750; }
.step-list li.is-active { color: var(--orange-dark); }
.step-list li.is-active .step-number { border-color: var(--orange); color: white; background: var(--orange); box-shadow: 0 0 0 5px rgba(206,103,52,.13); }
.step-list li.is-done { color: var(--olive); }
.step-list li.is-done .step-number { border-color: var(--olive); color: white; background: var(--olive); }
.flow-card, .single-card, .help-card, .help-note { border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: var(--shadow); }
.flow-card { min-height: 300px; padding: clamp(22px, 4vw, 31px); }
.panel-step:not(.is-active) { display: none; }
.panel-kicker { margin-bottom: 6px; color: var(--olive); }
.panel-step h2, .help-note h2 { margin: 0 0 5px; font-size: 19px; line-height: 1.4; }
.panel-intro { margin-bottom: 20px; color: var(--muted); font-size: 14px; }
.panel-intro strong { color: var(--orange-dark); }
label:not(.confirm-check):not(.modal-check) { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 750; }
label small { color: var(--muted); font-size: 12px; font-weight: 500; }
input[type="text"], textarea { width: 100%; min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; outline: none; background: var(--paper-bright); color: var(--ink); font-size: 14px; transition: border-color .15s, box-shadow .15s; }
input[type="text"]:focus, textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(206,103,52,.13); }
input::placeholder, textarea::placeholder { color: #9e8e7f; }
textarea { min-height: 125px; resize: vertical; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 10px 18px; border: 1px solid transparent; border-radius: 11px; font-size: 14px; font-weight: 750; text-align: center; text-decoration: none; transition: background .15s, transform .15s, border-color .15s; }
.button:not(:disabled):hover { transform: translateY(-1px); text-decoration: none; }
.button-primary { color: white; background: linear-gradient(115deg, #e68647, var(--orange)); box-shadow: 0 7px 16px rgba(206,103,52,.16); }
.button-primary:not(:disabled):hover { background: linear-gradient(115deg, #d9773e, var(--orange-dark)); }
.button-secondary, .button-quiet { border-color: #bdc7a9; color: var(--olive); background: var(--paper-bright); }
.button-secondary:not(:disabled):hover, .button-quiet:not(:disabled):hover { background: var(--olive-soft); }
#preview-form { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px; align-items: end; }
#preview-form label, #preview-form .field-error { grid-column: 1 / -1; }
#preview-form .button { min-width: 128px; margin: 0; }
#preflight-form .button-primary, #btn-redeem { width: 100%; margin-top: 12px; }
.back-button { width: 100%; margin-top: 10px; }
.field-hint { margin: 16px 0 0; color: var(--muted); font-size: 12px; }
.field-error { margin: 6px 0 0; color: var(--error); font-size: 13px; }
.notice { margin-bottom: 14px; padding: 11px 13px; border-radius: 10px; font-size: 13px; }
.notice-info { color: #53633f; background: var(--olive-soft); }
.notice-error { color: var(--error); background: var(--error-bg); }
#site-error { margin-bottom: 20px; }
.helper-actions { display: flex; gap: 9px; flex-wrap: wrap; margin: 0 0 16px; }
.helper-actions .button { flex: 1 1 180px; }
.mini-tag { display: inline-block; margin-left: 8px; padding: 3px 8px; border-radius: 6px; color: var(--olive); background: var(--olive-soft); font-size: 12px; }
.mini-tag:empty { display: none; }
.summary-list { margin: 0 0 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; }
.summary-list > div { display: flex; justify-content: space-between; gap: 14px; padding: 12px 14px; }
.summary-list > div + div { border-top: 1px solid #e9d9c5; }
.summary-list dt { color: var(--muted); font-size: 13px; }
.summary-list dd { margin: 0; overflow-wrap: anywhere; text-align: right; font-size: 13px; font-weight: 750; }
.target-plan { color: var(--orange-dark); }
.confirm-check { display: flex; align-items: flex-start; gap: 9px; font-size: 14px; cursor: pointer; }
.confirm-check input, .modal-check input { width: 16px; height: 16px; margin: 3px 0 0; accent-color: var(--olive); }
.result-head { display: flex; align-items: center; gap: 12px; margin: 15px 0; }
.status-pill { display: inline-block; padding: 7px 12px; border-radius: 100px; font-size: 13px; font-weight: 750; }
.status-pill.is-pending { color: #8f5d20; background: #fceacb; }
.status-pill.is-success { color: #4a7350; background: #e5f0df; }
.status-pill.is-failure { color: var(--error); background: var(--error-bg); }
.elapsed { color: var(--muted); font-size: 12px; }
.result-message { color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.timeline { margin: 15px 0 0; padding: 0 0 0 16px; list-style: none; border-left: 1px solid var(--line); }
.timeline li { position: relative; padding: 0 0 18px 16px; }
.timeline li::before { content: ""; position: absolute; top: 5px; left: -21px; width: 10px; height: 10px; border: 3px solid var(--paper); border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 1px var(--orange); }
.timeline strong, .timeline time { display: block; }
.timeline strong { overflow-wrap: anywhere; font-size: 13px; }
.timeline time { color: var(--muted); font-size: 11px; }
.result-actions .button { width: 100%; margin-top: 12px; }
.simple-hero { margin: 0 0 26px; }
.simple-hero h1 { margin: 7px 0 5px; }
.single-card { padding: clamp(22px, 4vw, 31px); }
.query-row { display: flex; gap: 9px; }
.query-row .button { flex: 0 0 auto; }
.query-result { margin-top: 22px; padding-top: 7px; border-top: 1px solid var(--line); }
.help-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 13px; }
.help-card { padding: 22px; }
.help-card > span { color: var(--orange); font-size: 13px; font-weight: 800; }
.help-card h2 { margin: 9px 0 7px; font-size: 17px; }
.help-card p, .help-note p { margin: 0; color: var(--muted); font-size: 13px; }
.help-note { margin-top: 14px; padding: 22px; }
.help-note .button { margin-top: 15px; }
.site-footer { width: 100%; display: flex; align-items: center; justify-content: center; gap: 15px; min-height: 108px; padding: 25px; border-top: 1px solid var(--line); color: var(--muted); background: #ecdbc6; font-size: 12px; }
.footer-mark { width: 33px; height: 33px; border-radius: 10px; font-size: 19px; }
.modal-mask { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 16px; background: rgba(63,42,29,.42); backdrop-filter: blur(5px); }
.modal-card { position: relative; width: min(520px,100%); max-height: min(94vh,760px); overflow: auto; padding: 28px 24px 22px; border-radius: 19px; background: var(--paper-bright); box-shadow: 0 24px 80px rgba(60,38,24,.24); }
.modal-close { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 10px; background: #f0e3d1; color: var(--muted); font-size: 22px; }
.modal-heading { display: flex; align-items: center; gap: 13px; padding-right: 38px; }
.modal-mark { width: 50px; height: 50px; border-radius: 15px; font-size: 29px; }
.modal-heading h2 { margin: 0 0 2px; font-family: Georgia, "Songti SC", serif; font-size: 22px; }
.modal-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.modal-steps { margin: 20px 0; padding-left: 20px; color: var(--muted); font-size: 14px; }
.modal-steps li { padding-left: 2px; margin-bottom: 8px; }
.modal-action { display: flex; width: 100%; margin-top: 9px; }
.modal-check { display: flex; align-items: center; gap: 7px; margin-top: 16px; color: var(--muted); font-size: 13px; cursor: pointer; }

@media (max-width: 680px) {
  .site-header { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 11px 15px; }
  .brand { width: 100%; justify-content: center; }
  .site-nav { width: 100%; }
  .nav-button { flex: 1; padding: 7px 10px; }
  .store-link { margin-left: auto; }
  main { padding-top: 34px; }
  .hero { flex-direction: column; gap: 9px; text-align: center; }
  .hero-mark { width: 64px; height: 64px; border-radius: 18px; font-size: 35px; }
  .hero h1 { font-size: 29px; }
  .hero p { font-size: 13px; }
  .step-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .step-list li:not(:last-child)::after { display: none; }
  .workspace { gap: 15px; }
  .steps-card { padding: 0 5px; }
  .site-footer { flex-wrap: wrap; gap: 10px; }
}

@media (max-width: 460px) {
  .site-nav { gap: 2px; }
  .nav-button { padding-inline: 5px; font-size: 12px; }
  .flow-card, .single-card { padding: 21px 18px; }
  #preview-form { grid-template-columns: 1fr; }
  #preview-form .button { width: 100%; }
  .query-row { flex-direction: column; }
  .query-row .button { width: 100%; }
  .help-grid { grid-template-columns: 1fr; }
  .modal-card { padding: 25px 20px 20px; }
  .modal-heading h2 { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0s !important; animation-duration: 0s !important; }
}
