:root {
  color-scheme: light;
  --bg: #f6f8f5;
  --ink: #19201d;
  --muted: #65706b;
  --line: #dfe7df;
  --panel: #ffffff;
  --panel-strong: #f1f5f1;
  --teal: #006a67;
  --teal-dark: #004b49;
  --rose: #b4234f;
  --amber: #b7791f;
  --blue: #1e5da8;
  --shadow: 0 18px 55px rgba(22, 35, 31, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(16px, 4vw, 40px);
  border-bottom: 1px solid rgba(223, 231, 223, 0.85);
  background: rgba(246, 248, 245, 0.92);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
}

.brand strong,
.brand span {
  display: block;
  white-space: nowrap;
}

.brand span {
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  padding: 8px 10px;
}

.nav a:hover {
  color: var(--ink);
}

.language-toggle {
  width: 60px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 1px 4px rgba(22, 35, 31, 0.06);
}

.language-toggle:hover {
  border-color: color-mix(in srgb, var(--teal), #ffffff 45%);
  background: #f8fbf8;
}

.shell {
  width: min(1220px, calc(100% - 28px));
  margin: 26px auto 60px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  align-items: start;
  gap: 18px;
}

.catalog-pane,
.checkout-pane,
.orders-band {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.catalog-pane {
  padding: clamp(18px, 3vw, 28px);
}

.checkout-pane {
  position: sticky;
  top: 82px;
  padding: 18px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-head.tight {
  margin-bottom: 12px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 0;
  font-size: clamp(32px, 5vw, 60px);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 22px;
  line-height: 1.15;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.product-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 272px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.product-card:hover,
.product-card.active {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent), #ffffff 35%);
  box-shadow: 0 14px 38px rgba(22, 35, 31, 0.12);
}

.product-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.product-icon {
  width: 44px;
  height: 44px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.product-card h3 {
  margin: 16px 0 8px;
  font-size: 22px;
  line-height: 1.1;
}

.product-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.plan-list {
  display: grid;
  gap: 7px;
  margin-top: 16px;
}

.plan-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.select-product {
  height: 40px;
  margin-top: 14px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
}

.checkout-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.status-pill {
  min-width: 72px;
  padding: 6px 8px;
  border-radius: 999px;
  background: #e7f5ef;
  color: var(--teal-dark);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.step-tabs,
.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.segmented {
  grid-template-columns: repeat(2, 1fr);
  margin: 12px 0;
}

.step-tab,
.segmented button {
  height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.step-tab.active,
.segmented button.active {
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(22, 35, 31, 0.08);
}

.step-panel {
  display: none;
  padding-top: 14px;
}

.step-panel.active {
  display: block;
}

.field,
.checkline {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
}

.field span,
.checkline span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.checkline {
  grid-template-columns: 18px 1fr;
  align-items: start;
  gap: 9px;
  margin-top: 2px;
}

input,
select {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 11px;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0, 106, 103, 0.13);
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--teal);
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  border-radius: 8px;
  font-weight: 900;
}

.primary-action {
  border: 0;
  background: var(--teal);
  color: #fff;
}

.primary-action:hover {
  background: var(--teal-dark);
}

.secondary-action {
  border: 1px solid rgba(180, 35, 79, 0.28);
  background: #fff3f6;
  color: var(--rose);
}

.pay-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.pay-summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.pay-summary strong {
  font-size: 24px;
}

.network-picker,
.token-section {
  margin-top: 12px;
}

.chooser-label {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.network-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.network-option {
  display: grid;
  place-items: center;
  min-height: 82px;
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-weight: 900;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.network-option:hover,
.network-option.active {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--teal), #ffffff 35%);
  background: #dff6f4;
  color: var(--ink);
  box-shadow: 0 10px 26px rgba(0, 106, 103, 0.12);
}

.network-icon {
  width: 34px;
  height: 34px;
  margin-bottom: 6px;
  object-fit: contain;
}

.network-fallback {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: 14px;
}

.network-name {
  line-height: 1.1;
  text-align: center;
}

.helper-text {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.token-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.token-option {
  min-width: 86px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-weight: 900;
}

.token-option:hover,
.token-option.active {
  border-color: color-mix(in srgb, var(--teal), #ffffff 35%);
  background: #dff6f4;
  color: var(--ink);
}

.manual-pay-box {
  display: grid;
  gap: 12px;
}

.manual-copy,
.wallet-copy {
  margin: 0;
  font-size: 13px;
}

.wallet-connect-box {
  display: grid;
  gap: 12px;
  background:
    linear-gradient(135deg, rgba(0, 106, 103, 0.10), transparent 48%),
    #fff;
}

.wallet-channel-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.wallet-channel {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.wallet-channel.active {
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(22, 35, 31, 0.08);
}

.wallet-action {
  min-height: 50px;
}

.hidden-select {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  overflow: hidden;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 0.72fr;
  gap: 10px;
}

.field.compact {
  margin-bottom: 12px;
}

.payment-box {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.address-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

code {
  display: block;
  min-height: 42px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf8;
  color: #24312d;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.icon-button {
  width: 56px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.mini-list {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
}

.mini-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mini-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.mini-list dd {
  margin: 0;
  font-size: 13px;
  font-weight: 900;
  text-align: right;
}

.receipt {
  min-height: 210px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(0, 106, 103, 0.10), transparent 45%),
    linear-gradient(315deg, rgba(180, 35, 79, 0.08), transparent 48%),
    #fff;
}

.receipt h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

.muted {
  color: var(--muted);
}

.toast {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.toast.error {
  color: var(--rose);
}

.toast.success {
  color: var(--teal-dark);
}

.orders-band {
  margin-top: 18px;
  padding: 18px;
}

.orders-list {
  display: grid;
  gap: 8px;
}

.order-row {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.order-row strong,
.order-row span {
  display: block;
}

.order-row span {
  color: var(--muted);
  font-size: 12px;
}

.order-status {
  padding: 5px 8px;
  border-radius: 999px;
  background: #e8f3ff;
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.hidden {
  display: none !important;
}

@media (max-width: 920px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .checkout-pane {
    position: static;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .topbar {
    align-items: start;
    flex-direction: column;
  }

  .nav {
    justify-content: space-between;
  }

  .top-actions {
    width: 100%;
    justify-content: space-between;
  }

  h1 {
    font-size: 36px;
  }

  .field-row,
  .order-row {
    grid-template-columns: 1fr;
  }

  .network-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .address-row {
    grid-template-columns: 1fr;
  }

  .icon-button {
    width: 100%;
  }
}
