:root {
  color-scheme: light;
  --ink: #0b2039;
  --muted: #4f6277;
  --blue: #0958d9;
  --blue-hover: #064bbd;
  --canvas: #f4f6f8;
  --line: #d9e1e8;
  --error: #a92336;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--canvas); color: var(--ink); font: 16px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .58; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid #65a4ff; outline-offset: 3px; }
img { max-width: 100%; }
.checkout-header { background: #fff; border-bottom: 1px solid var(--line); }
.checkout-header-inner { width: min(1160px, calc(100% - 48px)); min-height: 80px; margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; min-height: 44px; align-items: center; gap: 13px; }
.brand-logo { display: block; width: 150px; height: auto; }
.brand-label { border-left: 1px solid var(--line); padding-left: 13px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .16em; }
.checkout-header-actions { display: flex; align-items: center; gap: 22px; color: var(--muted); font-size: 13px; font-weight: 600; }
.checkout-header-actions a { display: inline-flex; min-height: 44px; align-items: center; color: var(--ink); }
.checkout-header-actions a:hover { color: var(--blue); }
.checkout-context { padding-left: 14px; border-left: 1px solid var(--line); }
.checkout-shell { width: min(920px, calc(100% - 48px)); margin: 0 auto; padding: 34px 0 70px; }
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.stepper-item { display: flex; min-width: 0; align-items: center; gap: 8px; color: #6c7c8c; font-size: 12px; font-weight: 600; white-space: nowrap; }
.stepper-item i { display: grid; width: 28px; height: 28px; flex: none; place-items: center; border: 1px solid #bdcbd9; border-radius: 50%; background: #fff; font-size: 12px; font-style: normal; }
.stepper-item.active { color: var(--ink); }
.stepper-item.active i { border-color: var(--blue); background: var(--blue); color: #fff; }
.stepper-item.done i { border-color: #23734b; background: #e7f5ed; color: #175b38; }
.stepper-item:not(:last-child)::after { content: ""; width: clamp(10px, 3vw, 38px); height: 1px; margin-left: 5px; background: #bdcbd9; }
.checkout-panel { min-height: 300px; padding: clamp(22px, 4vw, 43px); border: 1px solid #cdd9e4; border-radius: 12px; background: #fff; box-shadow: 0 18px 38px rgba(21, 46, 77, .045); }
.panel-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 29px; }
.panel-head h1 { margin: 0 0 8px; font-size: clamp(27px, 3vw, 34px); line-height: 1.18; letter-spacing: -.04em; }
.panel-head h1:focus { outline: none; }
.panel-head p { max-width: 620px; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.step-label { flex: none; color: var(--muted); font-size: 12px; font-weight: 700; }
.service-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.choice { display: flex; min-height: 132px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 13px; padding: 21px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); text-align: left; transition: border-color .18s ease, background-color .18s ease; }
.choice:hover, .choice.selected { border-color: var(--blue); background: #f3f7ff; }
.choice svg { display: block; width: 22px; height: 22px; fill: none; stroke: var(--blue); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.choice strong { display: block; font-size: 17px; line-height: 1.25; }
.choice small { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 23px; }
.field { display: flex; min-width: 0; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label { color: var(--ink); font-size: 14px; font-weight: 700; }
.input, .select { width: 100%; min-height: 50px; padding: 11px 14px; border: 1px solid #b6c7d8; border-radius: 8px; background: #fff; color: var(--ink); font-size: 16px; }
.input:focus, .select:focus { border-color: var(--blue); outline: 3px solid #b7d1fb; outline-offset: 1px; }
.input::placeholder { color: #708195; }
.network-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.network-choice { display: flex; min-width: 0; min-height: 76px; align-items: center; gap: 11px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); text-align: left; transition: border-color .18s ease, background-color .18s ease; }
.network-choice:hover, .network-choice.selected { border-color: var(--blue); background: #f3f7ff; }
.network-logo { display: block; width: 40px; height: 40px; flex: none; padding: 4px; border: 1px solid var(--line); border-radius: 7px; background: #fff; object-fit: contain; }
.network-choice b { display: block; font-size: 15px; line-height: 1.2; }
.network-choice small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; max-height: 440px; overflow: auto; padding: 2px; }
.product-grid > .info-note { grid-column: 1 / -1; margin-top: 0; }
.product-card { min-width: 0; min-height: 74px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); text-align: left; transition: border-color .18s ease, background-color .18s ease; }
.product-card:hover:not(:disabled), .product-card.selected { border-color: var(--blue); background: #f3f7ff; }
.product-card b { display: block; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.product-card span { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; }
.product-card.sold-out { background: #f3f5f7; }
.info-note, .review-note { margin-top: 19px; padding: 13px 16px; border-left: 3px solid #6ca1f4; background: #f4f8ff; color: #324e6f; font-size: 13px; line-height: 1.55; }
.form-error { display: none; margin-top: 18px; padding: 13px 15px; border-left: 3px solid var(--error); background: #fff1f2; color: #852030; font-size: 14px; }
.form-error.show { display: block; }
.form-error:focus { outline: none; }
.panel-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }
.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: 10px 20px; border: 1px solid var(--blue); border-radius: 8px; background: var(--blue); color: #fff; font-size: 14px; font-weight: 700; text-align: center; }
.button:hover:not(:disabled) { border-color: var(--blue-hover); background: var(--blue-hover); }
.button:disabled { border-color: #9badbf; background: #9badbf; opacity: 1; }
.button.secondary { border-color: #b6c7d8; background: #fff; color: var(--ink); }
.button.secondary:hover { border-color: var(--blue); background: #f3f7ff; }
.summary { overflow: hidden; border: 1px solid var(--line); border-radius: 9px; }
.summary-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 18px; border-bottom: 1px solid var(--line); font-size: 14px; }
.summary-row:last-child { border-bottom: 0; }
.summary-row span { color: var(--muted); }
.summary-row b { text-align: right; overflow-wrap: anywhere; font-weight: 700; }
.summary-row.total { background: #f4f8ff; font-size: 17px; }
.summary-row.total span { color: var(--ink); font-weight: 700; }
.summary-network { display: inline-flex; align-items: center; gap: 9px; }
.summary-network .network-logo { width: 30px; height: 30px; }
.amount-lock { display: flex; min-height: 70px; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 18px; border: 1px solid var(--line); border-radius: 8px; background: #f4f8ff; }
.amount-lock span { color: var(--muted); font-size: 14px; }
.amount-lock b { font-size: 22px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.otp-wrap { max-width: 500px; margin-inline: auto; }
.otp-shield { display: grid; width: 54px; height: 54px; place-items: center; margin-bottom: 20px; border: 1px solid #c9dbf7; border-radius: 9px; background: #eef5ff; }
.otp-shield svg { width: 26px; height: 26px; fill: none; stroke: var(--blue); stroke-width: 1.8; }
.otp-input { max-width: 300px; font-size: 24px; letter-spacing: .25em; text-align: center; }
.result { max-width: 640px; margin-inline: auto; text-align: center; }
.result-icon { display: grid; width: 62px; height: 62px; place-items: center; margin: 0 auto 18px; border-radius: 50%; background: #e7f5ed; color: #17613b; font-size: 28px; }
.result-icon.pending { background: #edf4ff; color: var(--blue); }
.status-badge { display: inline-flex; align-items: center; gap: 8px; color: #3b5f89; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.status-badge i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.result h1 { margin: 12px 0 9px; font-size: clamp(27px, 3vw, 34px); line-height: 1.2; letter-spacing: -.04em; }
.result > p { margin: 0 auto; color: var(--muted); font-size: 15px; line-height: 1.6; }
.result .summary { margin-top: 26px; text-align: left; }
.loader { display: flex; min-height: 230px; flex-direction: column; align-items: center; justify-content: center; gap: 15px; color: var(--muted); font-size: 14px; text-align: center; }
.loader i { width: 30px; height: 30px; border: 3px solid #d7e5f7; border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
.checkout-help { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 5px 8px; margin-top: 19px; color: var(--muted); font-size: 13px; }
.checkout-help a { display: inline-flex; min-height: 44px; align-items: center; color: var(--blue); font-weight: 700; }
.checkout-help a:hover { text-decoration: underline; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 680px) {
  .checkout-header-inner, .checkout-shell { width: calc(100% - 32px); }
  .checkout-header-inner { min-height: 70px; }
  .brand-logo { width: 123px; }
  .brand-label { padding-left: 8px; font-size: 10px; }
  .checkout-context { display: none; }
  .checkout-shell { padding-top: 25px; }
  .stepper { gap: 4px; }
  .stepper-item { gap: 5px; font-size: 11px; }
  .stepper-item span { display: none; }
  .stepper-item.active span { display: inline; }
  .stepper-item:not(:last-child)::after { width: clamp(7px, 3vw, 17px); margin-left: 3px; }
  .checkout-panel { padding: 22px 18px; }
  .panel-head { gap: 10px; margin-bottom: 23px; }
  .step-label { display: none; }
  .service-tabs, .form-grid, .network-choices, .product-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .choice { min-height: 82px; flex-direction: row; align-items: center; gap: 17px; padding: 15px; }
  .choice svg { flex: none; }
  .network-choice { min-height: 68px; }
  .product-grid { max-height: 450px; }
  .panel-actions { flex-direction: column-reverse; }
  .panel-actions .button { width: 100%; }
  .summary-row { align-items: flex-start; gap: 12px; padding: 13px 14px; }
  .summary-row b { max-width: 62%; }
  .amount-lock { align-items: flex-start; flex-direction: column; gap: 3px; }
}

@media (max-width: 360px) {
  .brand-logo { width: 108px; }
  .stepper-item.active span { font-size: 10px; }
  .stepper-item:not(:last-child)::after { width: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .loader i { animation: none; }
  .choice, .network-choice, .product-card { transition: none; }
}
