:root {
  color-scheme: light;
  --background: #f4f6fa;
  --glow: #dce9ff;
  --tint: #e4e5fb;
  --surface: rgb(255 255 255 / 72%);
  --surface-hover: rgb(255 255 255 / 94%);
  --text: #182231;
  --secondary: #46546a;
  --border: rgb(99 123 164 / 23%);
  --highlight: rgb(255 255 255 / 88%);
  --focus: #2359cd;
  --accent: #2458c6;
  --icon-bg: #eaf1ff;
  --crypto-bg: #e3f6ed;
  --crypto: #146a4b;
  --shadow: 0 12px 32px rgb(32 54 93 / 8%), inset 0 1px 0 var(--highlight);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #10141d;
  --glow: #1c2a46;
  --tint: #21233d;
  --surface: rgb(32 41 59 / 72%);
  --surface-hover: rgb(44 55 80 / 94%);
  --text: #f0f4ff;
  --secondary: #aebbd2;
  --border: rgb(159 180 222 / 20%);
  --highlight: rgb(226 236 255 / 8%);
  --focus: #9ab9ff;
  --accent: #9ab9ff;
  --icon-bg: #25395e;
  --crypto-bg: #1a3a35;
  --crypto: #8be0bc;
  --shadow: 0 14px 34px rgb(0 0 0 / 23%), inset 0 1px 0 var(--highlight);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  background:
    radial-gradient(ellipse 630px 450px at 27% 0%, var(--glow), transparent 100%),
    radial-gradient(ellipse 540px 420px at 90% 36%, var(--tint), transparent 100%),
    var(--background);
  color: var(--text);
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.45;
}
.layout {
  width: min(100% - 40px, 484px);
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 0 max(32px, env(safe-area-inset-bottom));
}
.checkout-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}
.support-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 4px 8px;
  border-radius: 10px;
  color: var(--secondary);
  font-size: 14px;
  text-decoration: none;
}
.support-link:hover { text-decoration: underline; }
.language {
  display: flex;
  gap: 2px;
  margin-inline-start: auto;
  width: max-content;
  background: var(--surface);
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 var(--highlight);
}
.language button {
  border: 0;
  background: transparent;
  color: var(--secondary);
  border-radius: 999px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .03em;
}
.language button[aria-pressed="true"] { background: var(--icon-bg); color: var(--accent); }
.summary { margin: clamp(38px, 8vh, 64px) 0 40px; text-align: center; }
.amount-label { font-size: 14px; font-weight: 550; color: var(--secondary); }
.amount {
  margin-top: 7px;
  font-size: clamp(39px, 9vw, 66px);
  font-weight: 720;
  letter-spacing: -.06em;
  line-height: 1.12;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
h1, h2 { font-size: 18px; letter-spacing: -.025em; margin: 0 0 14px; }
.payment-methods { display: grid; gap: 12px; }
button, select { font: inherit; }
button, select, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .65; }
:where(button, select, a):focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.method {
  display: grid;
  width: 100%;
  grid-template-columns: 44px minmax(0, 1fr) 16px;
  gap: 13px;
  align-items: center;
  padding: 15px 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
  text-align: start;
  transition: background-color .18s ease, border-color .18s ease;
}
.method:hover:enabled, .secondary:hover { background: var(--surface-hover); border-color: var(--focus); }
.method-name { display: block; font-size: 16px; font-weight: 730; }
.method-note { display: block; color: var(--secondary); font-size: 13px; margin-top: 2px; }
.method-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: var(--icon-bg);
  color: var(--accent);
}
.method-icon::before { content: ""; display: block; }
.card-icon::before { width: 18px; height: 12px; border: 2px solid; border-radius: 3px; background: linear-gradient(transparent 3px, currentColor 3px 5px, transparent 5px); }
.coin-icon { background: var(--crypto-bg); color: var(--crypto); }
.coin-icon::before { width: 12px; height: 12px; border: 2px solid; transform: rotate(45deg); border-radius: 3px; }
.arrow { width: 8px; height: 8px; border-top: 2px solid; border-right: 2px solid; color: var(--secondary); transform: rotate(45deg); }
.panel { padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); }
.language, .method, .panel {
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.back {
  margin: 0 0 10px;
  background: none;
  border: 0;
  color: var(--accent);
  padding: 10px 4px 10px 0;
  font-size: 14px;
  min-height: 44px;
}
label { display: block; font-size: 14px; color: var(--secondary); margin: 6px 0; }
select {
  display: block;
  width: 100%;
  min-height: 48px;
  color: var(--text);
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px 12px;
  margin-bottom: 14px;
}
.action, .secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  background: var(--surface);
  color: var(--accent);
  font-weight: 650;
}
.action { width: 100%; border-color: #2153bf; background: #2153bf; color: #fff; }
.action:hover:enabled { background: #17439f; }
.status { margin: 12px 0; color: var(--secondary); font-size: 14px; }
.panel .status:first-child { margin-top: 0; }
.panel .status:last-child { margin-bottom: 0; }
.center { text-align: center; }
.details { display: grid; gap: 12px; }
.detail { display: flex; gap: 8px; flex-wrap: wrap; justify-content: space-between; align-items: center; }
.detail-value { min-width: 0; flex: 1 1 76%; display: grid; }
.detail-label { color: var(--secondary); font-size: 13px; }
.detail-value strong { overflow-wrap: anywhere; font-weight: 600; }
.receipt-picker {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 6px;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 14px;
}
.receipt-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.receipt-pick { margin: 0; cursor: pointer; }
.receipt-input:focus-visible + .receipt-pick { outline: 3px solid var(--focus); outline-offset: 3px; }
.receipt-hint, .receipt-filename { font-size: 13px; color: var(--secondary); overflow-wrap: anywhere; }
.receipt-hint { margin: 6px 0 12px; }
.receipt-filename { flex: 1 1 120px; min-width: 0; }
.qr { display: block; width: 148px; height: 148px; object-fit: contain; background: #fff; border: 7px solid #fff; border-radius: 8px; margin: 7px auto; }
@media (max-width: 420px) {
  .layout { width: calc(100% - 30px); }
  .summary { margin: 34px 0 32px; }
  .panel { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .method { transition: none; }
}
