:root {
  --brand: #1268e8;
  --brand-dark: #0b4eaf;
  --brand-soft: #edf5ff;
  --ink: #10233f;
  --muted: #607087;
  --page: #f5f8fc;
  --surface: #ffffff;
  --line: #d8e2ee;
  --line-strong: #b9c8da;
  --success: #087c6a;
  --success-soft: #e8f7f3;
  --warning: #9b5b08;
  --warning-soft: #fff6df;
  --danger: #b42318;
  --danger-soft: #fff0ef;
  --shadow: 0 16px 42px rgba(16, 35, 63, 0.09);
  --radius: 8px;
  --header-height: 72px;
  color-scheme: light;
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--page);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
a {
  font: inherit;
  letter-spacing: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(18, 104, 232, 0.26);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  padding: 9px 14px;
  color: #fff;
  background: var(--ink);
  border-radius: 4px;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  min-height: var(--header-height);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.header-inner,
.footer-inner,
.content-width {
  width: min(100% - 40px, 1120px);
  margin-inline: auto;
}

.header-inner {
  min-height: var(--header-height);
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(190px, 1fr);
  align-items: center;
  gap: 24px;
}

.brand-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 10px;
  padding: 4px;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.brand-button img {
  width: 40px;
  height: 40px;
  display: block;
  object-fit: cover;
  border-radius: 7px;
  box-shadow: 0 4px 12px rgba(16, 35, 63, 0.12);
}

.brand-copy {
  display: grid;
  line-height: 1.25;
}

.brand-copy strong {
  font-size: 15px;
  font-weight: 700;
}

.brand-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.main-nav {
  height: var(--header-height);
  display: flex;
  align-items: stretch;
  gap: 28px;
}

.nav-button {
  appearance: none;
  position: relative;
  padding: 0 2px;
  color: var(--muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.nav-button::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 160ms ease;
}

.nav-button:hover,
.nav-button.is-active {
  color: var(--ink);
}

.nav-button.is-active::after {
  transform: scaleX(1);
}

.channel-summary {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 8px;
  min-width: 124px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warning);
  box-shadow: 0 0 0 4px var(--warning-soft);
}

.channel-summary.is-ready .status-dot {
  background: var(--success);
  box-shadow: 0 0 0 4px var(--success-soft);
}

.channel-summary.is-error .status-dot {
  background: var(--danger);
  box-shadow: 0 0 0 4px var(--danger-soft);
}

main {
  flex: 1;
}

.view {
  min-height: calc(100vh - var(--header-height) - 70px);
  padding: 38px 0 64px;
}

.compact-width {
  max-width: 1000px;
}

.result-width {
  max-width: 720px;
}

.lookup-width {
  max-width: 820px;
}

.credit-panel {
  min-height: 230px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  overflow: hidden;
  color: #fff;
  background: var(--brand);
  border: 1px solid #0f5fcf;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.credit-copy {
  align-self: center;
  padding: 36px 42px;
}

.eyebrow {
  margin: 0;
  color: var(--success);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.credit-copy .eyebrow {
  color: #dceaff;
}

.credit-copy h1 {
  max-width: 560px;
  margin: 8px 0 0;
  font-size: 32px;
  line-height: 1.25;
}

.credit-note {
  max-width: 560px;
  margin: 12px 0 0;
  color: #edf5ff;
  font-size: 15px;
}

.credit-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 24px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

.credit-facts span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.credit-mark {
  position: relative;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #ccdef7;
  background: #102f59;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  line-height: 1.15;
}

.credit-mark::before,
.credit-mark::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 50%;
}

.credit-mark::before {
  width: 210px;
  height: 210px;
}

.credit-mark::after {
  width: 150px;
  height: 150px;
}

.credit-mark img {
  z-index: 1;
  width: 80px;
  height: 80px;
  margin-bottom: 12px;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
}

.credit-mark span,
.credit-mark strong {
  z-index: 1;
  font-size: 11px;
  letter-spacing: 0;
}

.credit-mark strong {
  color: #fff;
  font-size: 16px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin: 34px 0 16px;
}

.section-heading h2,
.page-heading h1 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 23px;
  line-height: 1.35;
}

.section-heading > p,
.page-heading > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.product-card {
  appearance: none;
  position: relative;
  min-width: 0;
  min-height: 144px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  padding: 20px;
  overflow: hidden;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 5px 18px rgba(16, 35, 63, 0.045);
  cursor: pointer;
  text-align: left;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.product-card:hover {
  border-color: #8ab7f5;
  box-shadow: 0 10px 24px rgba(18, 104, 232, 0.1);
  transform: translateY(-2px);
}

.product-card.is-selected {
  background: var(--brand-soft);
  border: 2px solid var(--brand);
  padding: 19px;
  box-shadow: 0 10px 26px rgba(18, 104, 232, 0.13);
}

.product-card.is-selected::after {
  content: "✓";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--brand);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 800;
}

.product-card-label {
  display: block;
  padding-right: 24px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.product-card-points {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin: 8px 0 18px;
  color: var(--ink);
  font-size: 13px;
  white-space: nowrap;
}

.product-card-points strong {
  font-size: 28px;
  line-height: 1;
}

.product-card-price {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.product-card-price strong {
  color: var(--brand-dark);
  font-size: 18px;
}

.product-card-badge {
  color: var(--success);
  font-weight: 700;
}

.selection-bar {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 20px;
  padding: 14px 16px 14px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.selection-summary {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  column-gap: 10px;
}

.selection-summary > span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
}

.selection-summary strong {
  font-size: 18px;
}

.selection-summary small {
  color: var(--brand-dark);
  font-size: 14px;
  font-weight: 700;
}

.button {
  appearance: none;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.button:not(:disabled):hover {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.button-primary {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 6px 16px rgba(18, 104, 232, 0.2);
}

.button-primary:not(:disabled):hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
}

.button-secondary {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line-strong);
}

.button-secondary:not(:disabled):hover {
  color: var(--brand-dark);
  border-color: #77a9ec;
}

.button-small {
  min-height: 38px;
  padding: 7px 12px;
  font-size: 12px;
}

.state-panel {
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 22px;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}

.state-panel strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
}

.state-panel p {
  margin: 2px 0 0;
  font-size: 12px;
}

.state-panel-error {
  justify-content: flex-start;
  color: var(--danger);
  background: var(--danger-soft);
  border-color: #f1b9b4;
}

.state-panel-error .button {
  margin-left: auto;
}

.state-icon {
  width: 24px;
  height: 24px;
}

.spinner {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  display: inline-block;
  border: 3px solid #cddbef;
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 720ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.back-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  margin-bottom: 18px;
  padding: 4px 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.back-button:hover {
  color: var(--brand-dark);
}

.page-heading {
  margin-bottom: 22px;
}

.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: start;
  gap: 24px;
}

.checkout-form {
  min-width: 0;
  display: grid;
  gap: 16px;
}

.form-section,
.order-summary {
  margin: 0;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(16, 35, 63, 0.05);
}

.payment-section {
  min-width: 0;
}

.form-section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.step-number {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  background: var(--ink);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
}

.form-section-heading h2,
.form-section-heading p {
  margin: 0;
}

.form-section-heading h2,
.summary-heading h2 {
  font-size: 16px;
  line-height: 1.3;
}

.form-section-heading p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.field {
  display: grid;
  gap: 7px;
}

.field > span {
  font-size: 13px;
  font-weight: 700;
}

.field input {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 10px 13px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  outline: none;
  font-size: 16px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.field input:hover {
  border-color: #8ba4c1;
}

.field input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(18, 104, 232, 0.12);
}

.field input[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.09);
}

.field small {
  color: var(--muted);
  font-size: 11px;
}

.field-error {
  color: var(--danger) !important;
  font-weight: 600;
}

.payment-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.payment-option {
  appearance: none;
  position: relative;
  min-width: 0;
  min-height: 72px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 10px;
  padding: 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
}

.payment-option:not(:disabled):hover {
  border-color: #8ab7f5;
}

.payment-option.is-selected {
  background: var(--brand-soft);
  border: 2px solid var(--brand);
  padding: 11px;
}

.payment-option:disabled {
  color: #7e8a9b;
  background: #f3f5f8;
  cursor: not-allowed;
}

.payment-symbol {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 800;
}

.payment-symbol.alipay {
  background: #1677ff;
}

.payment-symbol.wxpay {
  background: #07a45a;
}

.payment-option-copy {
  min-width: 0;
  display: grid;
  line-height: 1.35;
}

.payment-option-copy strong {
  font-size: 13px;
}

.payment-option-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  overflow-wrap: anywhere;
}

.payment-check {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--brand);
  border-radius: 50%;
}

.payment-lock {
  color: var(--muted);
}

.payment-error {
  display: block;
  margin: 10px 0 0;
  font-size: 12px;
}

.notice-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px 14px;
  color: var(--success);
  background: var(--success-soft);
  border: 1px solid #b8e3d8;
  border-radius: 6px;
  font-size: 11px;
}

.notice-row .icon {
  width: 18px;
  height: 18px;
  margin-top: 1px;
}

.notice-row p {
  margin: 0;
  color: #315c54;
}

.form-error {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 14px;
  color: var(--danger);
  background: var(--danger-soft);
  border: 1px solid #f1b9b4;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.pay-button {
  width: 100%;
  justify-content: space-between;
  min-height: 52px;
  padding-inline: 20px;
}

.button-price {
  padding-left: 18px;
  border-left: 1px solid rgba(255, 255, 255, 0.35);
}

.order-summary {
  position: sticky;
  top: calc(var(--header-height) + 20px);
}

.summary-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.summary-heading h2 {
  margin: 0;
}

.summary-heading span {
  color: var(--muted);
  font-size: 11px;
}

.summary-product {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 13px;
  padding: 20px 0;
}

.summary-product img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 7px;
}

.summary-product > div {
  min-width: 0;
  display: grid;
  line-height: 1.35;
}

.summary-product span,
.summary-product small {
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.summary-product strong {
  margin: 3px 0;
  font-size: 18px;
}

.summary-product strong #checkout-points {
  color: inherit;
  font-size: inherit;
}

.summary-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.summary-total strong {
  color: var(--brand-dark);
  font-size: 24px;
}

.summary-total-label {
  display: grid;
  gap: 3px;
}

.summary-total-label small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.order-state-card {
  padding: 42px 48px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}

.result-mark {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 50%;
}

.result-mark .icon {
  width: 32px;
  height: 32px;
}

.result-mark .spinner {
  width: 30px;
  height: 30px;
}

.result-mark.is-success {
  color: var(--success);
  background: var(--success-soft);
}

.result-mark.is-warning {
  color: var(--warning);
  background: var(--warning-soft);
}

.result-mark.is-error {
  color: var(--danger);
  background: var(--danger-soft);
}

.order-state-card h1 {
  margin: 6px 0 0;
  font-size: 26px;
  line-height: 1.35;
}

.result-description {
  max-width: 520px;
  margin: 10px auto 0;
  color: var(--muted);
  font-size: 13px;
}

.code-panel {
  position: relative;
  display: grid;
  gap: 5px;
  margin-top: 26px;
  padding: 18px 54px;
  color: #fff;
  background: var(--ink);
  border-radius: 7px;
}

.code-panel > span {
  color: #b9cce3;
  font-size: 11px;
}

.code-panel strong {
  overflow-wrap: anywhere;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 20px;
  letter-spacing: 0;
}

.icon-button,
.text-icon-button {
  appearance: none;
  display: inline-grid;
  place-items: center;
  border: 0;
  cursor: pointer;
}

.icon-button {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 38px;
  height: 38px;
  color: #dceaff;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  transform: translateY(-50%);
}

.icon-button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

.order-meta {
  margin: 26px 0 0;
  border-top: 1px solid var(--line);
}

.order-meta > div,
.lookup-meta > div {
  min-width: 0;
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr);
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.order-meta dt,
.lookup-meta dt {
  color: var(--muted);
  font-size: 12px;
}

.order-meta dd,
.lookup-meta dd {
  min-width: 0;
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.order-meta dd {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  text-align: right;
}

.text-icon-button {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  color: var(--muted);
  background: transparent;
  border-radius: 4px;
}

.text-icon-button:hover {
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.status-pending {
  color: var(--warning);
  background: var(--warning-soft);
}

.status-success {
  color: var(--success);
  background: var(--success-soft);
}

.status-error {
  color: var(--danger);
  background: var(--danger-soft);
}

.order-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}

.polling-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.polling-note:empty {
  display: none;
}

.lookup-heading {
  text-align: center;
}

.lookup-heading > p:last-child {
  margin-top: 8px;
}

.lookup-form {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.lookup-form .button {
  min-width: 128px;
  height: 48px;
}

.lookup-error {
  grid-column: 1 / -1;
}

.lookup-loading {
  margin-top: 16px;
}

.lookup-result {
  margin-top: 16px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(16, 35, 63, 0.05);
}

.lookup-result-head {
  min-width: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.lookup-status-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--warning);
  background: var(--warning-soft);
  border-radius: 50%;
}

.lookup-status-icon.is-success {
  color: var(--success);
  background: var(--success-soft);
}

.lookup-status-icon.is-error {
  color: var(--danger);
  background: var(--danger-soft);
}

.lookup-status-icon .icon {
  width: 22px;
  height: 22px;
}

.lookup-result-head strong,
.lookup-result-head p {
  margin: 0;
}

.lookup-result-head strong {
  font-size: 14px;
}

.lookup-result-head p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.lookup-meta {
  margin: 0;
  border-top: 1px solid var(--line);
}

.lookup-code {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 14px;
  background: var(--brand-soft);
  border: 1px solid #c7dcfa;
  border-radius: 6px;
}

.lookup-code > span {
  color: var(--muted);
  font-size: 11px;
}

.lookup-code strong {
  overflow-wrap: anywhere;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 14px;
  letter-spacing: 0;
}

.lookup-refresh {
  margin-top: 16px;
}

.site-footer {
  min-height: 70px;
  color: var(--muted);
  background: #fff;
  border-top: 1px solid var(--line);
}

.footer-inner {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 11px;
}

.footer-inner span:first-child {
  color: var(--ink);
  font-weight: 800;
}

.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  max-width: calc(100vw - 32px);
  padding: 10px 16px;
  color: #fff;
  background: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  box-shadow: 0 12px 30px rgba(16, 35, 63, 0.2);
  font-size: 12px;
  font-weight: 700;
  transform: translateX(-50%);
}

.noscript {
  position: fixed;
  z-index: 200;
  right: 16px;
  bottom: 16px;
  left: 16px;
  padding: 12px;
  color: #fff;
  background: var(--danger);
  border-radius: 6px;
  text-align: center;
}

@media (max-width: 900px) {
  :root {
    --header-height: 118px;
  }

  .header-inner {
    grid-template-columns: 1fr auto;
  }

  .main-nav {
    grid-row: 2;
    grid-column: 1 / -1;
    width: 100%;
    height: 46px;
    justify-content: center;
    border-top: 1px solid var(--line);
  }

  .channel-summary {
    grid-column: 2;
  }

  .credit-panel {
    grid-template-columns: minmax(0, 1.25fr) minmax(230px, 0.75fr);
  }

  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .checkout-layout {
    grid-template-columns: minmax(0, 1fr) 290px;
  }
}

@media (max-width: 720px) {
  :root {
    --header-height: 110px;
  }

  .header-inner,
  .footer-inner,
  .content-width {
    width: min(100% - 28px, 1120px);
  }

  .header-inner {
    min-height: 64px;
    gap: 10px;
  }

  .site-header {
    min-height: var(--header-height);
  }

  .brand-button img {
    width: 36px;
    height: 36px;
  }

  .brand-copy small {
    display: none;
  }

  .channel-summary {
    min-width: 0;
    font-size: 11px;
  }

  .main-nav {
    height: 46px;
    gap: 40px;
  }

  .view {
    min-height: calc(100vh - var(--header-height) - 70px);
    padding: 22px 0 44px;
  }

  .credit-panel {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) 132px;
  }

  .credit-copy {
    padding: 24px;
  }

  .credit-copy h1 {
    font-size: 25px;
  }

  .credit-note {
    font-size: 13px;
  }

  .credit-facts {
    gap: 12px;
    margin-top: 18px;
    font-size: 11px;
  }

  .credit-mark {
    min-height: 210px;
  }

  .credit-mark::before {
    width: 150px;
    height: 150px;
  }

  .credit-mark::after {
    width: 105px;
    height: 105px;
  }

  .credit-mark img {
    width: 60px;
    height: 60px;
  }

  .credit-mark span,
  .credit-mark strong {
    display: none;
  }

  .section-heading {
    margin-top: 26px;
  }

  .section-heading h2,
  .page-heading h1 {
    font-size: 21px;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-card {
    min-height: 132px;
  }

  .selection-bar {
    position: sticky;
    z-index: 20;
    bottom: max(10px, env(safe-area-inset-bottom));
  }

  .checkout-layout {
    display: flex;
    flex-direction: column-reverse;
    gap: 14px;
  }

  .checkout-form,
  .order-summary {
    width: 100%;
  }

  .order-summary {
    position: static;
  }

  .summary-product {
    padding: 14px 0;
  }

  .form-section,
  .order-summary {
    padding: 20px;
  }

  .order-state-card {
    padding: 34px 24px;
  }

  .order-state-card h1 {
    font-size: 23px;
  }
}

@media (max-width: 480px) {
  .header-inner,
  .footer-inner,
  .content-width {
    width: min(100% - 24px, 1120px);
  }

  .brand-copy strong {
    font-size: 14px;
  }

  .channel-summary > span:last-child {
    max-width: 190px;
    white-space: normal;
    text-align: right;
    line-height: 1.25;
  }

  .credit-panel {
    grid-template-columns: minmax(0, 1fr) 96px;
  }

  .credit-copy {
    padding: 22px 18px;
  }

  .credit-copy h1 {
    font-size: 22px;
  }

  .credit-note {
    max-width: 220px;
  }

  .credit-facts {
    display: grid;
    gap: 4px;
  }

  .credit-mark {
    min-height: 220px;
  }

  .credit-mark::before {
    width: 116px;
    height: 116px;
  }

  .credit-mark::after {
    width: 82px;
    height: 82px;
  }

  .credit-mark img {
    width: 50px;
    height: 50px;
  }

  .section-heading {
    align-items: flex-start;
  }

  .section-heading > p {
    max-width: 128px;
    text-align: right;
  }

  .product-grid {
    gap: 10px;
  }

  .product-card {
    min-height: 126px;
    padding: 16px;
  }

  .product-card.is-selected {
    padding: 15px;
  }

  .product-card-points strong {
    font-size: 24px;
  }

  .selection-bar {
    gap: 10px;
    padding: 11px 11px 11px 15px;
  }

  .selection-summary strong {
    font-size: 15px;
  }

  .selection-summary small {
    font-size: 12px;
  }

  .selection-bar .button {
    min-width: 128px;
    padding-inline: 13px;
  }

  .payment-options {
    grid-template-columns: 1fr;
  }

  .order-meta > div,
  .lookup-meta > div {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 10px;
  }

  .order-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .code-panel {
    padding-left: 14px;
    text-align: left;
  }

  .code-panel strong {
    padding-right: 38px;
    font-size: 16px;
  }

  .lookup-form {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .lookup-form .button {
    width: 100%;
  }

  .lookup-result {
    padding: 18px;
  }

  .lookup-result-head {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .lookup-result-head .status-pill {
    grid-column: 2;
    justify-self: start;
  }

  .lookup-code {
    grid-template-columns: 1fr auto;
  }

  .lookup-code > span {
    grid-column: 1 / -1;
  }

  .lookup-code strong {
    font-size: 12px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;
  }

  .toast {
    width: max-content;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* shop auto-credit: 用户 ID 回显与自动到账提示 */
.field-ok {
  display: block;
  margin-top: 4px;
  color: #15803d;
  font-size: 13px;
  line-height: 1.5;
}

.auto-credit-note {
  margin: 4px 0 2px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.6;
  text-align: left;
}

.auto-credit-note.is-credited {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
}

.auto-credit-note.is-pending {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
}

.auto-credit-note.is-failed {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #b45309;
}

/* 第 4 步支付卡片（与前 3 步同格式） */
.pay-step-section {
  min-width: 0;
}
