:root {
  color-scheme: dark;
  --bg: #0d0f0e;
  --surface: #151816;
  --surface-2: #1b1e1c;
  --line: #2b302d;
  --text: #f3f5f3;
  --muted: #9ca49f;
  --accent: #a9ffbb;
  --accent-strong: #65dc82;
  --amber: #f7c66a;
  --danger: #ff7f78;
  --purple: #b6adff;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--bg); color: var(--text); letter-spacing: 0; }
button, input { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
svg { width: 18px; height: 18px; flex: 0 0 auto; }
.hidden { display: none !important; }

.topbar {
  height: 68px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(20px, calc((100vw - 1120px) / 2));
  background: rgba(13, 15, 14, .95);
}

.brand { display: flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; }
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #4a544e;
  border-radius: 6px;
  background: #202622;
  color: var(--accent);
  font-weight: 800;
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; }
.brand small { color: var(--muted); font-size: 11px; margin-top: 1px; }
.secure-state { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; }

main { width: min(1120px, calc(100% - 40px)); margin: 24px auto 56px; }
.product-band {
  height: 170px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px 6px 0 0;
}
.product-band img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; filter: saturate(.72) contrast(1.04); }
.product-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,10,9,.96) 0%, rgba(8,10,9,.75) 43%, rgba(8,10,9,.22) 100%); }
.product-copy { position: absolute; left: 34px; top: 50%; transform: translateY(-50%); }
.product-copy p, .eyebrow { color: var(--accent); text-transform: uppercase; font-size: 11px; font-weight: 700; margin: 0 0 8px; }
.product-copy h1 { font-size: 32px; line-height: 1.1; margin: 0 0 8px; }
.product-copy span { color: #c7ccc9; font-size: 14px; }

.checkout-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  border: 1px solid var(--line);
  border-top: 0;
  min-height: 540px;
  background: var(--surface);
}
.checkout-main { padding: 30px 34px 36px; }
.checkout-summary { padding: 32px 28px; border-left: 1px solid var(--line); background: #111412; }

.steps { margin: 0 0 34px; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.steps li { color: #69706c; display: flex; align-items: center; gap: 8px; font-size: 12px; white-space: nowrap; }
.steps li::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.steps li:last-child::after { display: none; }
.steps span { width: 24px; height: 24px; border: 1px solid #3d433f; border-radius: 50%; display: grid; place-items: center; font-size: 11px; }
.steps li.active { color: var(--text); }
.steps li.active span { border-color: var(--accent-strong); color: var(--accent); background: #1a2b1e; }

.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.section-heading h2, .summary-title h2 { margin: 0; font-size: 20px; line-height: 1.3; }
.section-heading > svg { color: var(--accent); width: 24px; height: 24px; }
form label { display: block; margin-bottom: 9px; color: #cfd4d1; font-size: 13px; font-weight: 600; }
.input-wrap { position: relative; }
.input-wrap > svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #717a74; }
.input-wrap input {
  width: 100%;
  height: 50px;
  border: 1px solid #343a36;
  border-radius: 6px;
  background: #0f1210;
  color: var(--text);
  padding: 0 48px 0 44px;
  outline: none;
}
.input-wrap input:focus { border-color: #69b97c; box-shadow: 0 0 0 3px rgba(101,220,130,.12); }
.icon-button { position: absolute; right: 7px; top: 7px; width: 36px; height: 36px; border: 0; background: transparent; color: #909994; display: grid; place-items: center; border-radius: 4px; }
.icon-button:hover { background: #202521; color: var(--text); }
.field-note { margin: 9px 0 18px; color: var(--muted); font-size: 12px; }
.turnstile { min-height: 0; margin-bottom: 14px; }
.consent-row { display: flex; gap: 10px; align-items: flex-start; margin: 15px 0 22px; font-weight: 400; color: var(--muted); line-height: 1.55; }
.consent-row input { margin-top: 4px; accent-color: var(--accent-strong); }

.primary-button, .secondary-button {
  min-height: 46px;
  border-radius: 6px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-weight: 700;
  border: 1px solid transparent;
}
.primary-button { width: 100%; background: var(--accent); color: #102015; }
.primary-button:hover:not(:disabled) { background: #c0ffcd; }
.secondary-button { background: transparent; border-color: #39403b; color: var(--text); }
.secondary-button:hover { background: #202421; }
.action-row { display: grid; grid-template-columns: 140px 1fr; gap: 12px; }

.service-notice { border: 1px solid #654e29; background: #241d12; color: #f5d598; padding: 13px 15px; border-radius: 6px; margin-bottom: 24px; font-size: 13px; }
.service-notice.error { border-color: #61332f; background: #251514; color: #ffaaa5; }
.order-lines { margin: 0 0 28px; border-top: 1px solid var(--line); }
.order-lines > div { min-height: 58px; display: flex; justify-content: space-between; align-items: center; gap: 20px; border-bottom: 1px solid var(--line); }
.order-lines dt { color: var(--muted); font-size: 13px; }
.order-lines dd { margin: 0; text-align: right; font-size: 14px; }
.order-lines .amount { font-size: 26px; color: var(--amber); font-weight: 800; }
.status-chip { font-size: 12px; padding: 7px 10px; border-radius: 999px; font-weight: 700; }
.status-chip.pending { color: var(--amber); background: #2a2112; }
.status-chip.success { color: var(--accent); background: #17291c; }
.payment-layout { display: grid; grid-template-columns: 244px 1fr; gap: 30px; align-items: center; }
.qr-frame { width: 244px; height: 244px; padding: 12px; background: white; border-radius: 6px; }
.qr-frame canvas { display: block; width: 220px; height: 220px; }
.payment-meta span, .payment-meta small { display: block; color: var(--muted); }
.payment-meta strong { display: block; font-size: 36px; color: var(--amber); margin: 6px 0 14px; }
.payment-meta small { font-family: Consolas, monospace; word-break: break-all; }
.payment-meta p { color: var(--muted); line-height: 1.65; font-size: 13px; margin: 22px 0 0; }
.complete-view { text-align: center; padding: 42px 20px; }
.complete-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 20px; background: #19331f; color: var(--accent); }
.complete-icon svg { width: 34px; height: 34px; }
.complete-view h2 { margin: 0 0 10px; font-size: 24px; }
.complete-view > p:last-child { color: var(--muted); }

.summary-title { display: flex; align-items: center; gap: 10px; }
.summary-title svg { color: var(--purple); }
.summary-title h2 { font-size: 16px; }
.price-list { margin: 25px 0 0; }
.price-list > div { display: flex; justify-content: space-between; gap: 16px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.price-list dt { color: #c4cac6; font-size: 13px; }
.price-list dd { margin: 0; font-weight: 800; color: var(--amber); }
.summary-divider { height: 1px; background: var(--line); margin: 27px 0; }
.assurances { list-style: none; margin: 0; padding: 0; display: grid; gap: 15px; }
.assurances li { display: flex; gap: 9px; align-items: center; color: var(--muted); font-size: 13px; }
.assurances svg { width: 16px; height: 16px; color: var(--accent-strong); }
.summary-foot { margin: 30px 0 0; padding-top: 22px; border-top: 1px solid var(--line); color: #747c77; font-size: 12px; line-height: 1.65; }

.toast { position: fixed; left: 22px; bottom: 22px; max-width: min(380px, calc(100vw - 44px)); padding: 13px 16px; border: 1px solid #4e302d; border-radius: 6px; background: #211413; color: #ffb2ad; box-shadow: 0 14px 50px rgba(0,0,0,.42); z-index: 30; font-size: 13px; line-height: 1.45; }

@media (max-width: 820px) {
  main { width: min(100% - 24px, 680px); margin-top: 14px; }
  .checkout-shell { grid-template-columns: 1fr; }
  .checkout-summary { border-left: 0; border-top: 1px solid var(--line); }
  .product-band { height: 150px; }
  .product-copy { left: 22px; }
  .product-copy h1 { font-size: 27px; }
}

@media (max-width: 560px) {
  .topbar { padding: 0 14px; }
  .secure-state { font-size: 0; }
  .checkout-main, .checkout-summary { padding: 24px 18px 28px; }
  .steps { gap: 2px; }
  .steps li { font-size: 0; }
  .steps li span { font-size: 11px; }
  .payment-layout { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .action-row { grid-template-columns: 1fr; }
  .product-shade { background: rgba(8,10,9,.72); }
  .product-copy span { display: block; max-width: 240px; }
}
