/* Type: Oswald for titles and headline numbers, Golos Text for everything else.
   Both files are Latin + Cyrillic subsets with the ruble sign. "Symbols" is a
   fallback for the few glyphs they lack (star, check mark, arrows); the file behind
   it is the Inter subset the site used before. */
@font-face {
  font-family: "Oswald";
  src: url("../assets/font/Oswald-subset.woff") format("woff");
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
}
@font-face {
  font-family: "Golos Text";
  src: url("../assets/font/GolosText-subset.woff") format("woff");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}
@font-face {
  font-family: "Symbols";
  src: url("../assets/font/Inter-subset.woff") format("woff");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+2190-2193, U+2605, U+2713;
}

:root {
  color-scheme: dark;

  /* Palette "Brass": warm graphite surfaces and a brass accent taken from the key.
     Steam keeps its own blue in the chart. Generated and contrast-checked as a set;
     change the values here and every page follows.

     Surfaces, darkest to lightest */
  --bg-deep: #0d0b09;
  --bg: #13110e;
  --panel: #1c1a17;
  --panel-2: #26231f;
  --panel-3: #2f2c28;
  --border-soft: #33302b;
  --border: #413c37;
  --border-strong: #5d5750;

  /* Text: every step keeps at least 4.5:1 on all five surfaces. */
  --text: #f6f3ec;
  --text-2: #d8d2c7;
  --muted: #afa89d;
  --muted-2: #a19a8f;

  /* Accent: --accent for borders and selection; --accent-fill is the bright button
     fill and always carries --on-accent text; --accent-text is the tint for links. */
  --accent: #e6b557;
  --accent-fill: #e3ad4b;
  --accent-hover: #ecbc5e;
  --accent-text: #edc97b;
  --on-accent: #1f1303;

  /* Meaning: green buys, red sells, amber warns. Fills pair with an ink that stays readable. */
  --green: #46c976;
  --green-ink: #04200d;
  --red: #f4545b;
  --red-fill: #ca3037;
  --red-text: #fa8486;
  --amber: #f38c48;
  --amber-text: #ffba85;

  /* Chart series: one lightness band, so neither line outweighs the other. */
  --chart-steam: #419fd2;
  --chart-buy: #33af63;
  --chart-sell: #ee4f56;

  /* The same colours as channels, for translucent tints: rgb(var(--accent-rgb) / .2) */
  --bg-rgb: 19 17 14;
  --bg-deep-rgb: 13 11 9;
  --panel-rgb: 28 26 23;
  --text-rgb: 246 243 236;
  --accent-rgb: 230 181 87;
  --green-rgb: 70 201 118;
  --red-rgb: 244 84 91;
  --amber-rgb: 243 140 72;

  --font-display: "Oswald", "Arial Narrow", "Golos Text", "Symbols", sans-serif;
  --font-text: "Golos Text", "Symbols", Arial, sans-serif;

  --radius: 12px;
  --radius-sm: 8px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --header-height: 68px;

  /* Frosted glass, for layers that float above other content: the pinned
     header, the phone menu, the chart readout and notifications. Cards stay
     solid: they sit on a flat background, so there is nothing to blur. */
  --glass-filter: blur(22px) saturate(170%);
  --glass-edge: rgb(var(--text-rgb) / 0.1);

  /* Main page: change these two values to adjust the control heights. */
  --home-quantity-height: 51px;
  --home-mode-switch-height: 44px;

  /* Order details: former 44px fields increased by approximately 15%. */
  --order-input-height: 51px;
}

@supports (interpolate-size: allow-keywords) {
  :root { interpolate-size: allow-keywords; }
}

* { box-sizing: border-box; }
html {
  min-width: 320px;
  scroll-padding-top: calc(var(--header-height) + 20px);
  scrollbar-color: var(--border-strong) var(--bg-deep);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  accent-color: var(--accent);
  caret-color: var(--accent-text);
}
body.modal-open { overflow: hidden; }
::selection { background: rgb(var(--accent-rgb) / 0.45); color: #fff; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { color: inherit; }
h1, h2, h3 { text-wrap: balance; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* One focus treatment for every control. Fields draw their own ring on the wrapper. */
:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 2px;
}
.floating-field > input:focus-visible { outline: none; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 60;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--accent-fill);
  color: var(--on-accent);
  font-weight: 650;
  transition: top 150ms var(--ease-out);
}
.skip-link:focus { top: 12px; }

/* Prices and counters keep their width while values change. */
.rate-value,
.chart-axis-label,
.chart-tooltip,
.total-row strong,
.price-box strong,
.floating-field > input {
  font-variant-numeric: tabular-nums;
}

.section-shell {
  width: min(1380px, calc(100% - 48px));
  margin-inline: auto;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
/* The header is injected into the #site-header wrapper. The wrapper is what
   has to stick: the header fills it completely, so on its own it has no room
   to stay pinned in. Order pages keep a header that scrolls away. */
body:not([data-page="payment"]) #site-header {
  position: sticky;
  top: 0;
  z-index: 30;
}
.site-header {
  position: relative;
  z-index: 30;
  height: var(--header-height);
  border-bottom: 1px solid var(--glass-edge);
}
/* The glass is a layer of its own: a filter on the header itself would stop
   the phone menu inside it from blurring the page. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgb(var(--bg-rgb) / 0.66);
  -webkit-backdrop-filter: var(--glass-filter);
  backdrop-filter: var(--glass-filter);
}
.header-inner {
  height: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 56px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--accent);
  font-size: 16px;
  font-weight: 850;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.brand-logo {
  width: 26px;
  height: 36px;
  flex: 0 0 auto;
  object-fit: contain;
}
.top-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.top-nav a {
  padding: 8px 14px;
  border-radius: 7px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  transition: color 150ms ease, background-color 150ms ease;
}
.top-nav a:hover { color: #fff; background: var(--panel-2); }
.steam-button {
  height: 40px;
  min-width: 190px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid rgb(var(--accent-rgb) / 0.35);
  border-radius: 8px;
  background: var(--accent-fill);
  color: var(--on-accent);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 150ms ease, transform 150ms ease;
}
.steam-button:hover { background: var(--accent-hover); transform: translateY(-1px); }
.steam-button:active { transform: translateY(0); }
.steam-button img, .steam-button .icon { width: 16px; height: 16px; flex: 0 0 16px; }
.mobile-nav-toggle { display: none; }
.top-nav-logout {
  display: none;
  width: 100%;
  margin-top: 4px;
  padding: 14px 12px 12px;
  border: 0;
  border-top: 1px solid var(--glass-edge);
  background: transparent;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.top-nav-logout:hover { color: #fff; }

/* --------------------------------------------------------------------------
   Home: intro
   -------------------------------------------------------------------------- */
.site-main { padding-bottom: 104px; }
.page-intro { padding-top: 34px; padding-bottom: 28px; }
.page-intro h1 {
  margin: 0;
  font-size: clamp(30px, 3vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.035em;
  font-weight: 820;
}
.page-intro p { margin: 12px 0 0; color: var(--muted); font-size: 16px; }

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}

/* --------------------------------------------------------------------------
   Home: chart + exchange form
   -------------------------------------------------------------------------- */
.exchange {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(340px, 0.78fr);
  gap: 24px;
  align-items: stretch;
}
.chart-card { min-height: 500px; padding: 24px 28px 20px; display: flex; flex-direction: column; }
.chart-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 16px 22px; }
.chart-heading h2 { margin: 0; color: var(--muted); font-size: 14px; font-weight: 600; }
.chart-quote { margin-top: 4px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.chart-quote strong { font-size: 28px; line-height: 1.15; font-weight: 760; letter-spacing: -0.02em; }
.chart-change { color: var(--muted); font-size: 14px; }
.chart-change b { font-weight: 700; font-variant-numeric: tabular-nums; }
.positive, .buy-color { color: var(--green); }
.negative, .sell-color { color: var(--red-text); }

.period-switch {
  --period-index: 0;
  position: relative;
  isolation: isolate;
  display: inline-grid;
  grid-template-columns: repeat(4, minmax(62px, 1fr));
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg-deep);
}
.period-switch[data-active="month"] { --period-index: 1; }
.period-switch[data-active="year"] { --period-index: 2; }
.period-switch[data-active="all"] { --period-index: 3; }
/* The selection is one thumb that slides between the periods. */
.period-switch::before {
  content: "";
  position: absolute;
  inset: 3px auto 3px 3px;
  z-index: 0;
  width: calc((100% - 12px) / 4);
  border-radius: 6px;
  background: var(--accent-fill);
  transform: translateX(calc(var(--period-index) * (100% + 2px)));
  transition: transform 460ms var(--ease-out);
  pointer-events: none;
}
.period-button {
  position: relative;
  z-index: 1;
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition: color 140ms ease, background-color 150ms ease;
}
.period-button:not(.is-active):hover { color: var(--text); background: var(--panel-3); }
.period-button.is-active { color: var(--on-accent); }

.chart-stage {
  position: relative;
  flex: 1;
  min-height: 320px;
  margin-top: 16px;
}
.price-chart {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  /* Vertical swipes still scroll the page; horizontal drags scrub the chart. */
  touch-action: pan-y;
  cursor: crosshair;
}
.chart-grid { stroke: var(--border-soft); stroke-width: 1; shape-rendering: crispEdges; }
.chart-axis-label { fill: var(--muted-2); font-size: 12px; font-family: var(--font-text); pointer-events: none; }
.chart-line-steam, .chart-line-site {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 260ms ease;
}
.chart-line-steam { stroke: var(--chart-steam); }
.chart-line-site { stroke: var(--chart-buy); }
.chart-area-stop { stop-color: var(--chart-steam); }
.chart-dot-steam { fill: var(--chart-steam); }
.chart-dot-site { fill: var(--chart-buy); transition: fill 260ms ease; }
.price-chart.is-sell .chart-line-site { stroke: var(--chart-sell); }
.price-chart.is-sell .chart-dot-site { fill: var(--chart-sell); }
.chart-hover-dot { stroke: var(--text); stroke-width: 2; }
/* A period that is still on its way: the old line steps back until it arrives. */
.price-chart { transition: opacity 200ms ease; }
.chart-stage.is-loading .price-chart { opacity: .55; }
.price-chart.is-dense .chart-line-steam,
.price-chart.is-dense .chart-line-site { stroke-width: 1.5; }
.chart-hover-line { stroke: var(--muted-2); stroke-width: 1; stroke-dasharray: 4 4; }
.chart-status {
  position: absolute;
  inset: 0;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  pointer-events: none;
}
.chart-tooltip {
  position: absolute;
  left: 0;
  top: 6px;
  z-index: 4;
  min-width: 190px;
  padding: 10px 12px;
  display: grid;
  gap: 5px;
  transform: translateX(-50%);
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius-sm);
  background: rgb(var(--bg-deep-rgb) / 0.62);
  -webkit-backdrop-filter: var(--glass-filter);
  backdrop-filter: var(--glass-filter);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .3);
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.35;
  pointer-events: none;
}
.chart-tooltip strong { color: var(--text); font-weight: 650; }
.chart-tooltip span { display: flex; align-items: center; gap: 8px; }
.chart-tooltip span b { margin-left: auto; padding-left: 14px; color: var(--text); font-weight: 650; }
.chart-tooltip i,
.legend-swatch {
  width: 14px;
  height: 3px;
  flex: 0 0 14px;
  border-radius: 2px;
  background: var(--chart-steam);
}
.chart-tooltip i.is-buy, .legend-swatch--buy { background: var(--chart-buy); }
.chart-tooltip i.is-sell, .legend-swatch--sell { background: var(--chart-sell); }

.chart-footer { margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--border-soft); }
.chart-legend {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  color: var(--muted);
  font-size: 13px;
}
.chart-legend li { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.chart-legend strong { color: var(--text); font-weight: 650; }
.legend-note { color: var(--muted-2); }

/* Live values wait for the first /api/rates answer instead of flashing defaults. */
.rates-pending .rate-value {
  color: transparent !important;
  border-radius: 6px;
  background: var(--panel-3);
  animation: rate-pulse 1.1s ease-in-out infinite alternate;
}
@keyframes rate-pulse { to { opacity: .45; } }

.exchange-card { min-height: 500px; padding: 22px 24px 20px; display: flex; flex-direction: column; }
.mode-switch {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: var(--home-mode-switch-height);
  height: var(--home-mode-switch-height);
  padding: 3px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--panel-2);
}
.mode-switch::before {
  content: "";
  position: absolute;
  inset: 3px auto 3px 3px;
  z-index: 0;
  width: calc(50% - 3px);
  border-radius: 6px;
  background: var(--panel-3);
  background: color-mix(in srgb, var(--green) 20%, var(--panel-2));
  box-shadow: inset 0 0 0 1px rgb(var(--green-rgb) / 0.45);
  transform: translateX(0);
  transition:
    transform 280ms var(--ease-out),
    background-color 220ms ease,
    box-shadow 220ms ease;
  pointer-events: none;
}
.mode-switch.is-sell::before {
  transform: translateX(100%);
  background: var(--panel-3);
  background: color-mix(in srgb, var(--red) 22%, var(--panel-2));
  box-shadow: inset 0 0 0 1px rgb(var(--red-rgb) / 0.5);
}
.mode-button {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 0;
  height: 100%;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: color 220ms ease;
}
.mode-button:hover { color: var(--text); }
.mode-button:focus-visible { outline-offset: -3px; }
.mode-button--buy.is-active { color: var(--green); }
.mode-button--sell.is-active { color: var(--red-text); }

.product-row { display: flex; align-items: center; gap: 14px; margin-top: 24px; }
.product-details { min-width: 0; }
.product-image {
  width: 64px;
  height: 58px;
  flex: 0 0 64px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--panel-2);
}
.product-image img { width: 58px; max-height: 44px; object-fit: contain; }
.product-row h2 { margin: 0; font-size: 15px; font-weight: 700; }
.product-row p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.divider { height: 1px; margin: 20px 0; background: var(--border-soft); }

.field-block { display: grid; gap: 6px; margin-bottom: 18px; color: var(--muted); font-size: 13px; line-height: 1.2; }
.field-block--floating { display: block; margin-bottom: 0; }
.home-product-availability {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 16px;
  font-weight: 400;
}
.price-box {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
}
.price-box strong { color: #fff; font-size: 20px; line-height: 1; font-weight: 700; }
.price-box small { color: var(--muted); font-size: 13px; line-height: 1; }

.total-row { margin-top: auto; padding: 18px 0 14px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.total-row span { color: var(--muted); font-size: 14px; }
.total-row strong { font-size: 22px; font-weight: 760; letter-spacing: -0.01em; }

.primary-button {
  min-height: 48px;
  width: 100%;
  border: 0;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 150ms ease, filter 150ms ease;
}
.primary-button:hover { transform: translateY(-1px); filter: brightness(1.07); }
.primary-button:active { transform: translateY(0); filter: brightness(.96); }
.primary-button--buy { background: var(--green); color: var(--green-ink); }
.primary-button--sell { background: var(--red-fill); }
.primary-button--accent { background: var(--accent-fill); color: var(--on-accent); }
.card-note { margin: 14px 0 0; color: var(--muted-2); text-align: center; font-size: 12px; }
.card-note--security {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 7px;
  line-height: 1.4;
}
.card-note--security span { text-align: left; }
.card-note--security img {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  margin-top: 1px;
}

/* --------------------------------------------------------------------------
   Home: sections below the fold
   -------------------------------------------------------------------------- */
.content-section { padding-top: 96px; }
.section-title { margin: 0 0 28px; font-size: 26px; line-height: 1.2; letter-spacing: -0.025em; font-weight: 760; }

/* Steps are a real sequence, so they read as one connected line, not four cards. */
.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  counter-reset: step;
}
.step { position: relative; padding-top: 56px; counter-increment: step; }
.step::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--panel);
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
}
.step::after {
  content: "";
  position: absolute;
  left: 50px;
  right: -20px;
  top: 19px;
  height: 1px;
  background: var(--border);
}
.step:last-child::after { display: none; }
.step h3 { margin: 0; font-size: 17px; line-height: 1.3; font-weight: 680; }
.step p { margin: 8px 0 0; max-width: 34ch; color: var(--muted); font-size: 14px; line-height: 1.55; }

.faq-section {
  display: grid;
  grid-template-columns: minmax(0, .75fr) minmax(0, 1.55fr);
  gap: 24px 56px;
  align-items: start;
}
.faq-intro .section-title { margin-bottom: 14px; }
.faq-intro p { margin: 0; max-width: 34ch; color: var(--muted); font-size: 15px; }
.faq-intro a,
.legal-card a {
  color: var(--accent-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.faq-intro a:hover { color: #fff; }
/* FAQ: one answer is always open. The panel unfolds by animating its grid row
   (works in every browser, unlike animating <details>); the icon is two bars
   that fold from a chevron into an orange cross. */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:first-child { border-top: 1px solid var(--border); }
.faq-question { margin: 0; font: inherit; }
.faq-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  padding: 14px 4px 14px 4px;
  border: 0;
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-size: 16px;
  font-weight: 620;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition: color 240ms ease;
}
.faq-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.faq-item:not(.is-open) .faq-toggle:hover { color: #fff; }
.faq-item.is-open .faq-toggle { color: #fff; cursor: default; }

.faq-icon {
  position: relative;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: 50%;
  transition: border-color 280ms ease, background-color 280ms ease;
}
.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 2px;
  margin: -1px 0 0 -5px;
  border-radius: 2px;
  background: var(--muted);
  transition:
    transform 460ms var(--ease-out),
    width 460ms var(--ease-out),
    margin 460ms var(--ease-out),
    background-color 280ms ease;
}
/* Closed: a chevron pointing down. */
.faq-icon::before { transform: translate(-3.4px, 0) rotate(45deg); }
.faq-icon::after { transform: translate(3.4px, 0) rotate(-45deg); }
.faq-item:not(.is-open) .faq-toggle:hover .faq-icon {
  border-color: rgb(var(--accent-rgb) / .45);
  background: rgb(var(--accent-rgb) / .08);
}
.faq-item:not(.is-open) .faq-toggle:hover .faq-icon::before,
.faq-item:not(.is-open) .faq-toggle:hover .faq-icon::after { background: var(--accent-text); }
/* Open: the bars meet in an orange cross, with no hover change. */
.faq-item.is-open .faq-icon { background: rgb(var(--accent-rgb) / .14); }
.faq-item.is-open .faq-icon::before,
.faq-item.is-open .faq-icon::after {
  width: 14px;
  margin-left: -7px;
  background: var(--accent);
}
.faq-item.is-open .faq-icon::before { transform: translate(0, 0) rotate(45deg); }
.faq-item.is-open .faq-icon::after { transform: translate(0, 0) rotate(-45deg); }

.faq-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 520ms var(--ease-out);
}
.faq-item.is-open .faq-panel { grid-template-rows: 1fr; }
.faq-panel-inner { min-height: 0; overflow: hidden; }
.faq-panel-inner p {
  margin: 0;
  padding: 0 52px 20px 4px;
  max-width: 68ch;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.6;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 220ms ease, transform 520ms var(--ease-out);
}
.faq-item.is-open .faq-panel-inner p {
  opacity: 1;
  transform: none;
  transition: opacity 380ms ease 120ms, transform 520ms var(--ease-out);
}
.faq-panel-inner a { color: var(--accent-text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .faq-panel, .faq-panel-inner p, .faq-icon, .faq-icon::before, .faq-icon::after { transition: none; }
}

.section-heading-row { margin-bottom: 26px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.section-heading-row .section-title { margin: 0; }
.reviews-summary { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.all-reviews-link {
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color 120ms ease;
}
.all-reviews-link span { color: inherit; margin-left: 5px; }
.all-reviews-link:hover,
.all-reviews-link:focus-visible { color: var(--accent-text); text-decoration-line: underline; }
.review-preview-grid, .reviews-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.review-card {
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
}
.review-author { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 13px; }
.review-author h3 { margin: 0; overflow: hidden; color: var(--text); font-size: 15px; line-height: 1.25; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.review-author time { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; line-height: 1.2; }
.review-rating { color: var(--green); font-size: 14px; line-height: 1; font-weight: 750; white-space: nowrap; font-variant-numeric: tabular-nums; }
.review-card p { margin: 14px 0 0; color: var(--text-2); font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.review-preview-grid .review-card p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--border-soft); background: var(--bg-deep); }
.footer-grid { padding-top: 44px; padding-bottom: 38px; display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; }
.footer-brand .brand { color: var(--accent); font-size: 15px; }
.footer-brand p { margin: 10px 0 0; max-width: 34ch; color: var(--muted); font-size: 14px; }
.footer-grid h2 { margin: 0 0 14px; color: var(--text); font-size: 13px; font-weight: 650; }
.footer-links, .footer-contact { display: grid; justify-items: start; gap: 10px; color: var(--muted); font-size: 14px; }
.footer-links a, .footer-contact a { transition: color 120ms ease; }
.footer-links a:hover, .footer-contact a:hover { color: #fff; }
.footer-contact > * { display: inline-flex; align-items: center; gap: 9px; }
.footer-contact .icon { width: 15px; height: 15px; flex: 0 0 15px; color: var(--accent-text); }
.footer-bottom {
  padding-top: 18px;
  padding-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  border-top: 1px solid var(--border-soft);
  color: var(--muted-2);
  font-size: 12px;
}

/* --------------------------------------------------------------------------
   Inner pages
   -------------------------------------------------------------------------- */
.inner-page { min-height: calc(100vh - var(--header-height)); padding-top: 34px; padding-bottom: 96px; }
.inner-heading { margin-bottom: 26px; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.inner-heading h1 { margin: 0; font-size: 32px; line-height: 1.15; letter-spacing: -0.03em; }
.inner-heading p { margin: 8px 0 0; color: var(--muted); }
.text-link { color: var(--text-2); font-size: 14px; white-space: nowrap; }
.text-link:hover { color: #fff; }
.pagination { margin-top: 30px; display: flex; justify-content: center; gap: 7px; }
.pagination button {
  width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 6px; background: var(--panel); color: var(--muted); cursor: pointer;
}
.pagination button:hover, .pagination button.is-active { color: var(--on-accent); background: var(--accent-fill); border-color: var(--accent-fill); }
.pagination button:disabled { opacity: .35; cursor: default; }
.checkout-grid { display: grid; grid-template-columns: .86fr 1.14fr; gap: 24px; }
.success-panel { margin-top: 24px; padding: 24px; display: flex; align-items: center; gap: 18px; border: 1px solid rgb(var(--green-rgb) / 0.35); border-radius: 10px; background: rgb(var(--green-rgb) / 0.08); }
.success-icon { width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center; border-radius: 50%; background: var(--green); color: var(--green-ink); font-size: 21px; font-weight: 800; }
.success-panel h2 { margin: 0; font-size: 17px; }
.success-panel p { margin: 5px 0 0; color: var(--text-2); }
.secondary-button { margin-left: auto; padding: 11px 15px; border: 1px solid var(--border-strong); border-radius: 6px; white-space: nowrap; transition: background-color 150ms ease; }
.secondary-button:hover { background: var(--panel-3); }
.legal-content { max-width: 920px; margin-inline: auto; }
.legal-card { padding: 34px; }
.legal-card h1 { margin: 0 0 20px; font-size: 31px; }
.legal-card h2 { margin: 28px 0 8px; font-size: 18px; }
.legal-card > :first-child { margin-top: 0; }
.legal-card p, .legal-card li { max-width: 72ch; color: var(--text-2); font-size: 15px; line-height: 1.65; }
.legal-card ul { padding-left: 20px; }
.legal-back { margin-top: 22px; display: inline-flex; width: auto; padding: 0 22px; align-items: center; justify-content: center; }

.toast-root { position: fixed; right: 24px; bottom: 24px; z-index: 1100; display: grid; gap: 10px; }
.toast {
  max-width: 360px;
  padding: 13px 16px;
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius-sm);
  background: rgb(var(--panel-rgb) / 0.7);
  -webkit-backdrop-filter: var(--glass-filter);
  backdrop-filter: var(--glass-filter);
  box-shadow: 0 16px 40px rgba(0,0,0,.3);
  font-size: 14px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .exchange { grid-template-columns: 1fr; }
  .chart-card, .exchange-card { min-height: 0; }
  .chart-stage { min-height: 300px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 32px; }
  .step:nth-child(2n)::after { display: none; }
  .faq-section { grid-template-columns: 1fr; }
  .faq-intro p { max-width: none; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
  .review-preview-grid, .reviews-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  :root { --header-height: 62px; }
  .section-shell { width: min(100% - 28px, 1380px); }
  .header-inner { grid-template-columns: 1fr auto auto; gap: 10px; }
  .brand { font-size: 14px; }
  .brand-logo { width: 23px; height: 32px; }
  .steam-button { min-width: 44px; width: 44px; padding: 0; }
  .steam-button span { display: none; }
  .header-actions { gap: 6px; }
  .mobile-nav-toggle {
    width: 44px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--panel);
    color: var(--text-2);
    cursor: pointer;
  }
  .mobile-nav-toggle svg { width: 20px; height: 20px; }
  .top-nav {
    position: absolute;
    left: 14px;
    right: 14px;
    top: calc(var(--header-height) + 8px);
    display: none;
    padding: 8px;
    border: 1px solid var(--glass-edge);
    border-radius: 10px;
    background: rgb(var(--panel-rgb) / 0.8);
    -webkit-backdrop-filter: var(--glass-filter);
    backdrop-filter: var(--glass-filter);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .34);
  }
  .top-nav.is-open { display: grid; gap: 2px; }
  .top-nav a { padding: 12px; font-size: 15px; }
  .page-intro { padding-top: 24px; padding-bottom: 22px; }
  .page-intro h1 { font-size: 36px; }
  .page-intro p { font-size: 15px; }
  .chart-card, .exchange-card { padding: 18px; }
  .chart-quote strong { font-size: 32px; }
  .period-switch { display: grid; width: 100%; grid-template-columns: repeat(4, 1fr); }
  .period-button { height: 38px; padding: 0 4px; }
  .chart-stage { min-height: 260px; }
  .content-section { padding-top: 64px; }
  .section-title { font-size: 26px; margin-bottom: 22px; }
  .steps { grid-template-columns: 1fr; gap: 0; }
  .step { padding: 0 0 26px 56px; }
  .step:last-child { padding-bottom: 0; }
  .step::after,
  .step:nth-child(2n)::after { display: block; left: 19px; right: auto; top: 46px; bottom: 8px; width: 1px; height: auto; }
  .step:last-child::after { display: none; }
  .step h3 { padding-top: 7px; }
  .step p { max-width: none; }
  .review-preview-grid, .reviews-grid, .checkout-grid { grid-template-columns: 1fr; }
  .inner-heading { align-items: flex-start; flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { align-items: flex-start; flex-direction: column; }
  .success-panel { flex-wrap: wrap; }
  .secondary-button { margin-left: 0; }
  .legal-card { padding: 22px 18px; }
  .toast-root { left: 14px; right: 14px; bottom: 14px; }
  .toast { max-width: none; }
}

@media (max-width: 480px) {
  .page-intro h1 { font-size: 32px; }
  .chart-legend { flex-direction: column; gap: 8px; }
}

/* Without backdrop blur, or when the visitor asks for less transparency,
   the same layers are solid. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header::before { background: rgb(var(--bg-rgb) / 0.97); }
  .chart-tooltip { background: var(--bg-deep); }
  .toast { background: var(--panel-2); }
  .top-nav { background: var(--panel); }
}
@media (prefers-reduced-transparency: reduce) {
  .site-header::before { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .chart-tooltip { background: var(--bg-deep); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .toast { background: var(--panel-2); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .top-nav { background: var(--panel); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

@media (prefers-reduced-motion: reduce) {
  *:not(.order-status-spinner), *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Reviews page — fixed-height database-driven layout */
.reviews-page {
  --reviews-block-height: 570px; /* Change the reviews block height here */
  --reviews-column-gap: 20px;
  --reviews-card-gap: 16px;
  --reviews-pagination-gap: 4px;
  background: var(--bg);
}

.reviews-page-main {
  width: min(1280px, calc(100% - 80px));
}

.reviews-page-main {
  min-height: 540px;
  padding-top: 22px;
  padding-bottom: 24px;
  display: grid;
  grid-template-rows: auto var(--reviews-block-height) 42px;
  gap: 18px;
}

.reviews-page-title {
  margin: 0;
  color: #fff;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.025em;
  text-align: center;
}

.reviews-list-shell {
  position: relative;
  width: 100%;
  height: var(--reviews-block-height);
  min-height: var(--reviews-block-height);
  max-height: var(--reviews-block-height);
  overflow: hidden;
}

.reviews-columns {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--reviews-column-gap);
  align-items: start;
  overflow: hidden;
}

.review-column {
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--reviews-card-gap);
  overflow: hidden;
}

.reviews-page .review-card {
  width: 100%;
  min-height: 0;
  max-height: var(--reviews-block-height);
  padding: 20px 22px;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg-deep) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.015);
}

.reviews-page .review-author {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
}

.review-avatar {
  position: relative;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--panel-3), var(--panel-2));
}

.review-avatar img,
.review-avatar-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.review-avatar img {
  z-index: 2;
  object-fit: cover;
  opacity: 0;
  transition: opacity 120ms ease;
}

.review-avatar.has-image img {
  opacity: 1;
}

.review-avatar-fallback {
  display: grid;
  place-items: center;
  color: var(--accent-text);
  font-size: 13px;
  font-weight: 800;
}

.review-author-copy {
  min-width: 0;
}

.reviews-page .review-author h3 {
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  line-height: 1.25;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reviews-page .review-author time {
  display: block;
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.2;
}

.reviews-page .review-rating {
  color: var(--green);
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
  white-space: nowrap;
}

.reviews-page .review-card p {
  margin: 15px 0 0;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.48;
  overflow-wrap: anywhere;
}

.reviews-measure {
  position: fixed;
  left: -10000px;
  top: 0;
  z-index: -1;
  visibility: hidden;
  pointer-events: none;
}

.reviews-status {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 30px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  color: var(--muted);
  text-align: center;
}

.reviews-status--error {
  color: var(--red-text);
  border-color: rgb(var(--red-rgb) / 0.45);
  background: rgb(var(--red-rgb) / 0.05);
}

.review-card--skeleton {
  height: 140px;
  display: grid;
  align-content: start;
  gap: 12px;
  overflow: hidden;
}

.review-card--skeleton span {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--panel-2) 25%, var(--panel-3) 50%, var(--panel-2) 75%);
  background-size: 200% 100%;
  animation: review-skeleton 1.2s linear infinite;
}

.review-card--skeleton span:first-child { width: 62%; }
.review-card--skeleton span:nth-child(2) { width: 92%; }
.review-card--skeleton span:nth-child(3) { width: 78%; }

@keyframes review-skeleton {
  to { background-position: -200% 0; }
}

.reviews-pagination-shell {
  width: 100%;
  height: 42px;
  margin-inline: auto;
  display: grid;
  place-items: center;
}

.reviews-pagination {
  /* On computers the pagination is as wide as one review column. */
  width: calc((100% - (var(--reviews-column-gap) * 2)) / 3);
  min-width: calc((100% - (var(--reviews-column-gap) * 2)) / 3);
  max-width: calc((100% - (var(--reviews-column-gap) * 2)) / 3);
  min-height: 30px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(11, minmax(0, 1fr));
  align-items: center;
  gap: var(--reviews-pagination-gap);
  overflow: visible;
}

.reviews-pagination .pagination-button,
.reviews-pagination .pagination-ellipsis {
  width: 100%;
  min-width: 0;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  font-size: 10px;
}

.reviews-pagination .pagination-button {
  border: 1px solid var(--border);
  background: var(--bg-deep);
  color: var(--muted);
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
}

.reviews-pagination .pagination-button:hover:not(:disabled) {
  border-color: var(--accent-hover);
  background: var(--panel-3);
  color: #fff;
}

.reviews-pagination .pagination-button.is-active {
  position: relative;
  z-index: 1;
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}

.reviews-pagination .pagination-button:disabled {
  opacity: 0.32;
  cursor: default;
}

.reviews-pagination .pagination-ellipsis {
  color: var(--muted-2);
  cursor: default;
  opacity: 1 !important;
}

.reviews-pagination .pagination-placeholder {
  visibility: hidden;
  pointer-events: none;
}


/* The current page does not react to hover or a second click. */
.reviews-pagination .pagination-button.is-active,
.reviews-pagination .pagination-button.is-active:hover,
.reviews-pagination .pagination-button.is-active:disabled {
  opacity: 1;
  pointer-events: none;
  cursor: default;
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}

/* The ellipsis only marks skipped pages. */
.reviews-pagination .pagination-ellipsis,
.reviews-pagination .pagination-ellipsis:hover,
.reviews-pagination .pagination-ellipsis:disabled {
  opacity: 1 !important;
  pointer-events: none;
  cursor: default;
  border-color: var(--border);
  background: var(--bg-deep);
  color: var(--muted-2);
  box-shadow: none;
}

@media (max-width: 980px) {
  .reviews-page-main {
    width: min(100% - 40px, 1280px);
  }

  .reviews-page-main {
    min-height: calc(100svh - 68px);
  }

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

  .reviews-pagination {
    width: calc((100% - var(--reviews-column-gap)) / 2);
    min-width: calc((100% - var(--reviews-column-gap)) / 2);
    max-width: calc((100% - var(--reviews-column-gap)) / 2);
  }
}

@media (max-width: 620px) {
  .reviews-page {
    --reviews-block-height: 620px;
  }

  .reviews-page-main {
    width: min(100% - 28px, 1280px);
  }

  .reviews-page-main {
    padding-top: 18px;
    gap: 14px;
  }

  .reviews-page-title {
    font-size: 24px;
  }

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

  .reviews-pagination-shell {
    overflow: visible;
  }

  .reviews-pagination {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    margin-inline: 0;
    gap: 2px;
  }

  .reviews-pagination .pagination-button,
  .reviews-pagination .pagination-ellipsis {
    height: 27px;
    font-size: 9px;
    border-radius: 3px;
  }
}

/* Reviews pagination corners: square inside, rounded only on the outer edge */
.reviews-pagination > * {
  border-radius: 0 !important;
}

.reviews-pagination > :first-child {
  border-radius: 4px 0 0 4px !important;
}

.reviews-pagination > :last-child {
  border-radius: 0 4px 4px 0 !important;
}

/* Disabled edge arrows keep their normal appearance on the first/last page. */
.reviews-pagination > .pagination-button:first-child:disabled,
.reviews-pagination > .pagination-button:first-child:disabled:hover,
.reviews-pagination > .pagination-button:last-child:disabled,
.reviews-pagination > .pagination-button:last-child:disabled:hover {
  pointer-events: none;
  cursor: default;
  opacity: 0.32;
  border-color: var(--border);
  background: var(--bg-deep);
  color: var(--muted);
  box-shadow: none;
}

/* --------------------------------------------------------------------------
   Order details page — matched to the supplied PDF layout
   -------------------------------------------------------------------------- */
body[data-page="payment"] {
  background: var(--bg);
}

.order-details-shell {
  width: min(1280px, calc(100% - 48px));
  margin-inline: auto;
}

.order-details-main {
  min-height: 659px;
  padding: 0;
  background: var(--bg);
}

.order-details-shell {
  padding-top: 49px;
}

.order-details-heading {
  width: min(821px, 100%);
  display: grid;
  gap: 8px;
}

.order-details-title {
  margin: 0;
  color: #fff;
  font-size: 30px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: 0;
}

.order-details-subtitle {
  margin: 0 0 0 15%;
  color: var(--text-2);
  font-size: 20px;
  line-height: 1.3;
  font-weight: 500;
}

.checkout-grid--reference {
  margin-top: 25px;
  display: grid;
  grid-template-columns: minmax(0, 821px) minmax(0, 421px);
  gap: 38px;
  align-items: stretch;
}

.checkout-reference-card {
  height: 470px;
  padding: 28px 24px;
  overflow: hidden;
  border: 2px solid var(--border);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, .2) 100%),
    var(--panel);
  box-shadow: none;
}

.checkout-reference-card--product {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.order-product-row {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 72px;
}

.order-product-image {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: var(--panel-2);
}

.order-product-image img {
  width: 66px;
  height: 52px;
  object-fit: contain;
}

.order-product-copy {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 4px;
}

.order-product-copy h2 {
  margin: 0;
  color: #fff;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 600;
}

.order-product-copy p {
  margin: 0;
  font-size: 13px;
  line-height: 1.2;
}

.order-product-game {
  color: var(--muted);
}

.order-product-availability {
  color: var(--green);
}

body[data-order-mode="sell"] .order-product-availability {
  color: var(--red);
}

.order-divider,
.order-payment-divider {
  width: 100%;
  height: 1px;
  flex: 0 0 1px;
  background: var(--border);
}

.order-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.2;
}

.order-price-box,
.order-quantity-control {
  width: 100%;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
}

.order-price-box {
  padding: 0 16px;
}

.order-price-box strong {
  color: #fff;
  font-size: 20px;
  line-height: 1;
  font-weight: 700;
}

.order-price-box small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
}

.order-quantity-control {
  padding: 0 14px;
}

.order-quantity-control button {
  width: 30px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: var(--border);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 140ms ease;
}

.order-quantity-control button:hover {
  background: var(--border-strong);
}

.order-quantity-control output {
  color: #fff;
  font-size: 18px;
  line-height: 1;
  font-weight: 700;
}

.checkout-reference-card--payment {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.payment-methods--reference {
  height: 207px;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 94px;
  align-content: start;
  gap: 8px 4px;
}

.payment-method--reference {
  position: relative;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 94px;
  padding: 9px 10px 8px;
  display: block;
  overflow: hidden;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--border);
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}

.payment-method--reference:hover {
  border-color: var(--border-strong);
}

.payment-method--reference img {
  position: absolute;
  left: 10px;
  top: 9px;
  width: 42px;
  height: 42px;
  object-fit: contain;
  opacity: 1;
  filter: none;
  transition: none;
}

.payment-method--reference span {
  position: absolute;
  left: 10px;
  right: 8px;
  bottom: 9px;
  overflow: hidden;
  color: inherit;
  font-size: 17px;
  line-height: 1.1;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: clip;
}

.payment-method--reference i {
  display: none;
}

.payment-method--reference.is-selected {
  border-color: var(--accent);
  background: rgb(var(--accent-rgb) / 0.02);
  color: var(--accent);
}

.payment-method--reference.is-selected:hover {
  border-color: var(--accent);
}

.payment-method--reference.is-selected img {
  transform: none;
}

.payment-method--reference.is-selected i {
  position: absolute;
  right: 10px;
  top: 9px;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: transparent;
  color: var(--accent);
  font-size: 15px;
  line-height: 1;
  font-style: normal;
  font-weight: 800;
}

.order-payment-divider {
  margin-top: 0;
}

.order-total-row {
  width: 100%;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.order-total-row span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.2;
}

.order-total-row strong {
  color: #fff;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 800;
}

.order-buy-button {
  width: 100%;
  height: 52px;
  flex: 0 0 52px;
  border: 0;
  border-radius: 10px;
  background: var(--green);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  transition: filter 140ms ease;
}

.order-buy-button:hover {
  filter: brightness(1.06);
}

body[data-order-mode="sell"] .order-buy-button {
  background: var(--red);
}

.order-security-note {
  width: 100%;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  white-space: nowrap;
}

.order-security-note img {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
}

@media (max-width: 1200px) {
  .checkout-grid--reference {
    grid-template-columns: minmax(0, 1fr) 421px;
    gap: 24px;
  }
}

@media (max-width: 920px) {
  .order-details-main {
    min-height: auto;
    padding-bottom: 48px;
  }

  .checkout-grid--reference {
    grid-template-columns: 1fr;
  }

  .checkout-reference-card {
    height: auto;
    min-height: 470px;
  }

  .checkout-reference-card--payment {
    width: min(421px, 100%);
  }
}

@media (max-width: 520px) {
  .order-details-shell {
    width: min(100% - 28px, 1280px);
  }

  .order-details-title {
    font-size: 25px;
  }

  .order-details-subtitle {
    font-size: 18px;
  }

  .checkout-reference-card {
    padding: 20px 16px;
  }

  .payment-methods--reference {
    width: 100%;
    height: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 88px;
  }

  .payment-method--reference {
    width: 100%;
    height: 88px;
  }

  .order-security-note {
    white-space: normal;
  }
}


/* Unified quantity input on the home, purchase and sale pages. */
.order-quantity-control.quantity-control {
  width: 100%;
  height: 46px;
  min-height: 46px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 6px;
  background: var(--panel-2);
}
.order-quantity-control.quantity-control button {
  width: 45px;
  height: 46px;
  flex: 0 0 45px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--panel-3);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 140ms ease;
}
.order-quantity-control.quantity-control button:hover {
  background: var(--panel-3);
}
.order-quantity-control.quantity-control input {
  height: 46px;
  font-size: 15px;
}

/* --------------------------------------------------------------------------
   Floating labels for editable fields
   -------------------------------------------------------------------------- */
.floating-field {
  position: relative;
  display: block;
  width: 100%;
  height: 44px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: text;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.floating-field:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgb(var(--accent-rgb) / 0.10);
}

.floating-field > input {
  width: 100%;
  height: 100%;
  padding: 14px 14px 2px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  font-weight: 700;
  appearance: textfield;
  -moz-appearance: textfield;
}

.floating-field > input::-webkit-outer-spin-button,
.floating-field > input::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}

.floating-field > span {
  position: absolute;
  left: 14px;
  top: 50%;
  z-index: 2;
  max-width: calc(100% - 28px);
  overflow: hidden;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
  font-weight: 400;
  white-space: nowrap;
  text-overflow: ellipsis;
  pointer-events: none;
  transition: top 150ms ease, transform 150ms ease, font-size 150ms ease;
}

.floating-field:focus-within > span,
.floating-field.has-value > span {
  top: 7px;
  transform: none;
  font-size: 11px;
}

/* Floating quantity field on the main page keeps the +/- buttons. */
.field-block--floating {
  display: block;
  margin-bottom: 18px;
}

.home-quantity-field {
  position: relative;
  display: block;
  width: 100%;
  height: var(--home-quantity-height);
  overflow: hidden;
  border: 0;
  border-radius: 6px;
  background: var(--panel-2);
}

.home-quantity-field:focus-within {
  border-color: transparent;
  box-shadow: none;
}

.home-quantity-field .quantity-control {
  width: 100%;
  height: var(--home-quantity-height);
  min-height: var(--home-quantity-height);
  border-radius: 6px;
  background: transparent;
}

.home-quantity-field .quantity-control button,
.home-quantity-field .quantity-control input {
  height: var(--home-quantity-height);
}

.home-quantity-field .quantity-control input {
  padding: 0 10px;
  box-shadow: none !important;
}

.home-quantity-field .quantity-control input:focus,
.home-quantity-field .quantity-control input:focus-visible {
  outline: none;
  box-shadow: none !important;
}

/* --------------------------------------------------------------------------
   Order details page — exact layout from the supplied Pixso/PDF reference
   -------------------------------------------------------------------------- */
body[data-page="payment"] {
  min-height: 100vh;
  background: var(--bg);
}

body[data-page="payment"] .order-site-header {
  position: relative;
  top: auto;
  height: 68px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
/* The order header scrolls away with the page, so it stays solid. */
body[data-page="payment"] .order-site-header::before { content: none; }

body[data-page="payment"] .order-header-inner {
  width: 100%;
  height: 100%;
  padding: 0 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

body[data-page="payment"] .order-header-inner .brand {
  gap: 6px;
  color: var(--accent);
  font-size: 22px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0;
}

body[data-page="payment"] .order-header-inner .brand-logo {
  width: 30px;
  height: 70px;
}

body[data-page="payment"] .order-header-inner .steam-button {
  width: auto;
  min-width: 203px;
  height: 40px;
  padding: 0 22px;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  box-shadow: none;
  font-size: 14px;
  font-weight: 600;
}

body[data-page="payment"] .order-header-inner .steam-button:hover {
  background: var(--accent);
  transform: none;
  filter: brightness(1.05);
}

.order-details-main {
  min-height: 669px;
  padding: 0;
  overflow: hidden;
  background: var(--bg);
}

.order-details-shell {
  width: min(1280px, calc(100% - 160px));
  margin-inline: auto;
  padding-top: 31px;
}

.order-details-heading {
  width: 100%;
  display: block;
}

.order-details-title {
  margin: 0 0 0 15px;
  color: #fff;
  font-size: 38px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -1px;
}

.order-details-subtitle {
  margin: 15px 0 0 97px;
  color: var(--text-2);
  font-size: 30px;
  line-height: 1.5;
  font-weight: 500;
}

.checkout-grid--reference {
  width: 1113px;
  margin: 12px 0 0 97px;
  display: grid;
  grid-template-columns: 659px 421px;
  gap: 33px;
  align-items: stretch;
}

.checkout-reference-card {
  width: 100%;
  height: 560px;
  overflow: hidden;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
}

.checkout-reference-card--product {
  padding: 28px 24px 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.order-product-row {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.order-product-image {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  overflow: hidden;
  border-radius: 8px;
  background: transparent;
}

.order-product-image img {
  width: 72px;
  height: 72px;
  object-fit: cover;
}

.order-product-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.order-product-copy h2 {
  margin: 0;
  color: #fff;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 600;
}

.order-product-copy p {
  margin: 0;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 400;
}

.order-product-game { color: var(--muted); }
.order-product-availability { color: var(--green); }
body[data-order-mode="sell"] .order-product-availability { color: var(--red); }

.order-divider,
.order-payment-divider {
  width: 100%;
  height: 1px;
  flex: 0 0 1px;
  background: var(--border);
}

.order-floating-field {
  height: var(--order-input-height);
  flex: 0 0 var(--order-input-height);
}

.order-floating-field > input[type="url"],
.order-floating-field > input[type="email"] {
  font-size: 14px;
  font-weight: 500;
}

.order-quantity-field > input {
  font-size: 18px;
  font-weight: 700;
}

.checkout-reference-card--payment {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.payment-methods--reference {
  width: 373px;
  height: 207px;
  flex: 0 0 207px;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 122px);
  grid-template-rows: repeat(2, 94px);
  align-content: start;
  gap: 8px 4px;
}

.payment-method--reference {
  position: relative;
  width: 122px;
  height: 94px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  display: block;
  overflow: hidden;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--border);
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms ease, color 140ms ease;
}

.payment-method--reference:hover {
  border-color: var(--border-strong);
}

.payment-method--reference img {
  display: none;
  position: absolute;
  left: 11px;
  top: 9px;
  width: 30px;
  height: 30px;
  object-fit: contain;
  opacity: 1;
  filter: none;
  transform: none;
  transition: none;
}

.payment-method--reference span {
  position: absolute;
  left: 11px;
  right: 6px;
  bottom: 8px;
  overflow: visible;
  color: inherit;
  font-size: 20px;
  line-height: 1.5;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: clip;
}

.payment-method--reference small {
  position: absolute;
  right: 8px;
  top: 10px;
  color: inherit;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 600;
  white-space: nowrap;
}

.payment-method--reference[data-method^="USDT"] span,
.payment-method--reference[data-method^="USDC"] span {
  bottom: 25px;
  font-size: 16px;
  line-height: 1.15;
}

.payment-method-minimum {
  position: absolute;
  left: 11px;
  right: 6px;
  bottom: 8px;
  overflow: hidden;
  color: inherit;
  font-size: 10px;
  line-height: 1.15;
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.payment-method--reference:disabled,
.payment-method--reference.is-disabled {
  border-color: var(--panel-3);
  color: var(--muted-2);
  cursor: not-allowed;
  opacity: 0.58;
}

.payment-method--reference:disabled:hover,
.payment-method--reference.is-disabled:hover {
  border-color: var(--panel-3);
}

.payment-method--reference i {
  display: none;
}

.payment-method--reference.is-selected {
  border-color: var(--accent);
  background: transparent;
  color: var(--accent);
}

.payment-method--reference.is-selected:hover {
  border-color: var(--accent);
}

.payment-method--reference.is-selected img {
  display: block;
}

.payment-method--reference.is-selected small {
  display: none;
}

.payment-method--reference.is-selected i {
  position: absolute;
  right: 11px;
  top: 9px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 3px solid var(--accent);
  border-radius: 50%;
  background: transparent;
  color: var(--accent);
  font-size: 16px;
  line-height: 1;
  font-style: normal;
  font-weight: 800;
}

.order-payment-divider {
  margin: 0;
}

.order-email-field {
  height: var(--order-input-height);
  flex: 0 0 var(--order-input-height);
}

.order-total-row {
  width: 100%;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.order-total-row span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.2;
  font-weight: 400;
}

.order-total-row strong {
  color: #fff;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 800;
}

.order-buy-button {
  width: 100%;
  height: 52px;
  min-height: 52px;
  flex: 0 0 52px;
  border: 0;
  border-radius: 10px;
  background: var(--green);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  transition: filter 140ms ease;
}

.order-buy-button:hover {
  filter: brightness(1.06);
}

body[data-order-mode="sell"] .order-buy-button {
  background: var(--red);
}

.order-security-note {
  width: 100%;
  min-height: 15px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 400;
  white-space: nowrap;
}

.order-security-note img {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
}

body[data-page="payment"] .order-site-footer {
  min-height: 57px;
  margin: 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.order-footer-inner {
  width: 100%;
  min-height: 56px;
  padding: 0 80px;
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 400;
}

body[data-page="payment"] .success-panel {
  position: relative;
  z-index: 5;
  width: 1113px;
  margin: 18px 0 30px 97px;
}

@media (max-width: 1280px) {
  body[data-page="payment"] .order-header-inner { padding-inline: 40px; }

  .order-details-main {
    min-height: auto;
    padding-bottom: 40px;
    overflow: visible;
  }

  .order-details-shell {
    width: min(100% - 80px, 1280px);
  }

  .checkout-grid--reference {
    width: calc(100% - 97px);
    grid-template-columns: minmax(0, 1fr) 421px;
    gap: 24px;
  }

  body[data-page="payment"] .success-panel {
    width: calc(100% - 97px);
  }
}

@media (max-width: 980px) {
  .order-details-shell {
    width: min(100% - 48px, 820px);
  }

  .order-details-title,
  .order-details-subtitle,
  .checkout-grid--reference,
  body[data-page="payment"] .success-panel {
    margin-left: 0;
  }

  .checkout-grid--reference,
  body[data-page="payment"] .success-panel {
    width: 100%;
  }

  .checkout-grid--reference {
    grid-template-columns: 1fr;
  }

  .checkout-reference-card--payment {
    width: min(421px, 100%);
  }
}

@media (max-width: 560px) {
  body[data-page="payment"] .order-header-inner {
    padding-inline: 14px;
  }

  body[data-page="payment"] .order-header-inner .brand {
    font-size: 15px;
  }

  body[data-page="payment"] .order-header-inner .brand-logo {
    width: 24px;
    height: 56px;
  }

  body[data-page="payment"] .order-header-inner .steam-button {
    width: 42px;
    min-width: 42px;
    height: 38px;
    padding: 0;
  }

  body[data-page="payment"] .order-header-inner .steam-button span {
    display: none;
  }

  .order-details-shell {
    width: min(100% - 28px, 820px);
    padding-top: 24px;
  }

  .order-details-title {
    font-size: 27px;
  }

  .order-details-subtitle {
    margin-top: 10px;
    font-size: 21px;
  }

  .checkout-grid--reference {
    margin-top: 14px;
  }

  .checkout-reference-card {
    height: auto;
    min-height: 493px;
  }

  .checkout-reference-card--product,
  .checkout-reference-card--payment {
    padding: 20px 16px;
  }

  .payment-methods--reference {
    width: 100%;
    height: auto;
    flex-basis: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(3, 94px);
  }

  .payment-method--reference {
    width: 100%;
  }

  .order-security-note {
    white-space: normal;
  }

  .order-footer-inner {
    padding: 18px 14px;
  }
}

/* CSS fallback: keep a label raised whenever its input already has a value. */
.floating-field:has(> input:not(:placeholder-shown)) > span,
.home-quantity-field:has(input:not(:placeholder-shown)) > span {
  top: 7px;
  transform: none;
  font-size: 11px;
}

.home-quantity-field:has(input:not(:placeholder-shown)) > span {
  top: 6px;
}

/* --------------------------------------------------------------------------
   Order details refinements from the latest supplied reference
   -------------------------------------------------------------------------- */
body[data-page="payment"] .order-auth-slot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

body[data-page="payment"] .order-account-area {
  display: flex;
  align-items: center;
  gap: 14px;
}

body[data-page="payment"] .order-account-pill {
  height: 48px;
  padding: 5px 12px 5px 7px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: #fff;
  font-size: 15px;
  line-height: 1;
  font-weight: 600;
}

body[data-page="payment"] .order-account-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 50%;
  object-fit: cover;
}

body[data-page="payment"] .order-logout-button {
  width: 28px;
  height: 40px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  opacity: .34;
  cursor: pointer;
  transition: opacity 140ms ease;
}

body[data-page="payment"] .order-logout-button:hover {
  opacity: .72;
}

body[data-page="payment"] .order-logout-button img {
  width: 20px;
  height: 20px;
  transform: rotate(180deg);
}

/* Product information order: item, divider, trade-link helper, input, stock, quantity. */
.checkout-reference-card--product {
  gap: 0;
}

.checkout-reference-card--product > .order-divider {
  margin-top: 20px;
}

.order-trade-block {
  width: 100%;
  margin-top: 17px;
}

.order-trade-help {
  width: max-content;
  max-width: 100%;
  min-height: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 16px;
  font-weight: 400;
  text-decoration: none;
  transition: color 140ms ease;
}

.order-trade-help:hover {
  color: var(--text-2);
}

.order-trade-help img {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}

.order-trade-block .order-floating-field {
  margin-top: 7px;
}

.order-stock-line {
  margin: 18px 0 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 16px;
  font-weight: 400;
}

/* Keep every supplied payment SVG visible and keep its existing 30px rendered size. */
.payment-method--reference img,
.payment-method--reference.is-selected img {
  display: block;
  width: 30px;
  height: 30px;
  transform: none;
  transition: none;
}

/* Floating labels start vertically centered, then slide upward on click/focus. */
.floating-field > input {
  padding: 17px 14px 3px;
}

.floating-field > span {
  top: 50%;
  transform: translateY(-50%);
  transform-origin: left center;
  transition:
    top 180ms ease,
    transform 180ms ease,
    font-size 180ms ease,
    color 180ms ease;
}

.floating-field:focus-within > span,
.floating-field.is-focused > span,
.floating-field.has-value > span {
  top: 6px;
  transform: translateY(0);
  font-size: 11px;
}

.floating-field:focus-within > span,
.floating-field.is-focused > span {
  color: var(--muted);
}

@media (max-width: 560px) {
  body[data-page="payment"] .order-account-area {
    gap: 4px;
  }

  body[data-page="payment"] .order-account-pill {
    height: 40px;
    padding: 3px 7px 3px 3px;
    font-size: 12px;
  }

  body[data-page="payment"] .order-account-avatar {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }

  body[data-page="payment"] .order-logout-button {
    width: 24px;
  }
}

/* Pixel-alignment corrections for the 1440 x 794 reference canvas. */
body[data-page="payment"] .order-header-inner {
  padding-inline: 80px;
}

.order-details-title {
  margin-left: 0;
}

.checkout-reference-card {
  background: var(--panel);
}

.checkout-reference-card--product {
  padding: 26px 22px 26px 18px;
}

.checkout-reference-card--product > .order-divider {
  margin-top: 19px;
}

.checkout-reference-card--payment {
  padding: 26px 22px;
}

.payment-methods--reference {
  gap: 10px 4px;
}

@media (max-width: 1280px) {
  body[data-page="payment"] .order-header-inner {
    padding-inline: 40px;
  }
}

@media (max-width: 560px) {
  body[data-page="payment"] .order-header-inner {
    padding-inline: 14px;
  }

  .checkout-reference-card--product,
  .checkout-reference-card--payment {
    padding: 20px 16px;
  }
}

/* Final alignment with the latest reference. */
body[data-page="payment"] .order-header-inner {
  padding: 0 60px 0 80px;
}

body[data-page="payment"] .order-account-area {
  gap: 15px;
}

body[data-page="payment"] .order-account-pill {
  padding-right: 15px;
}

.order-trade-block .order-floating-field {
  margin-top: 3px;
}

@media (max-width: 1280px) {
  body[data-page="payment"] .order-header-inner {
    padding-inline: 40px;
  }
}

@media (max-width: 560px) {
  body[data-page="payment"] .order-header-inner {
    padding-inline: 14px;
  }
}


/* --------------------------------------------------------------------------
   Requested form refinements
   -------------------------------------------------------------------------- */

body[data-page="payment"] .order-floating-field {
  height: var(--order-input-height);
  min-height: var(--order-input-height);
  flex-basis: var(--order-input-height);
}

body[data-page="payment"] .order-floating-field > input {
  padding: 20px 14px 4px;
}

body[data-page="payment"] .order-floating-field:focus-within > span,
body[data-page="payment"] .order-floating-field.is-focused > span,
body[data-page="payment"] .order-floating-field.has-value > span,
body[data-page="payment"] .order-floating-field:has(> input:not(:placeholder-shown)) > span {
  top: 7px;
}

.order-policy-checkbox {
  width: 100%;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  color: var(--text-2);
  font-size: 11px;
  line-height: 1.45;
  cursor: pointer;
}

.order-policy-checkbox input {
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.order-policy-checkbox a {
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.registration-modal--steam-only {
  max-width: 610px;
}

@media (max-width: 820px) {
  .checkout-reference-card {
    min-height: 560px;
  }
}

/* --------------------------------------------------------------------------
   Final layout refinements: order footer/header and compact home checkout
   -------------------------------------------------------------------------- */

/* Order pages: keep the header dimensions identical to the main page. */
body[data-page="payment"] .order-site-header {
  height: 68px;
}

body[data-page="payment"] .order-header-inner {
  width: min(1380px, calc(100% - 48px));
  height: 100%;
  margin-inline: auto;
  padding: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 56px;
}

body[data-page="payment"] .order-header-inner .brand {
  gap: 9px;
  font-size: 16px;
  font-weight: 850;
  letter-spacing: 0.01em;
}

body[data-page="payment"] .order-header-inner .brand-logo {
  width: 26px;
  height: 36px;
}

body[data-page="payment"] .order-header-actions {
  grid-column: 3;
}

body[data-page="payment"] .order-auth-slot {
  grid-column: auto;
}

body[data-page="payment"] .order-header-inner .steam-button {
  width: auto;
  min-width: 190px;
  height: 38px;
  padding: 0 18px;
  gap: 9px;
  border: 1px solid rgb(var(--accent-rgb) / 0.35);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 750;
}

body[data-page="payment"] .order-account-pill {
  height: 38px;
  padding: 4px 10px 4px 5px;
  gap: 7px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
}

body[data-page="payment"] .order-account-avatar {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
}

body[data-page="payment"] .order-logout-button {
  height: 38px;
}

/* Leave a clear space between the order cards and the footer. */
body[data-page="payment"] .order-details-main {
  min-height: auto;
  padding-bottom: 48px;
  overflow: visible;
}


@media (max-width: 560px) {
  body[data-page="payment"] .order-site-header {
    height: 62px;
  }

  body[data-page="payment"] .order-header-inner {
    width: min(1380px, calc(100% - 28px));
    gap: 10px;
  }

  body[data-page="payment"] .order-header-inner .brand {
    font-size: 15px;
  }

  body[data-page="payment"] .order-header-inner .brand-logo {
    width: 24px;
    height: 34px;
  }

  body[data-page="payment"] .order-header-inner .steam-button {
    width: 40px;
    min-width: 40px;
    height: 38px;
    padding: 0;
  }

  body[data-page="payment"] .order-details-main {
    padding-bottom: 32px;
  }
}


/* --------------------------------------------------------------------------
   Targeted corrections requested after the homepage reference update
   -------------------------------------------------------------------------- */

/* The line between payment methods and the email field is intentionally removed. */
body[data-page="payment"] .order-payment-divider {
  display: none;
}

/* Align only the order-page H1 with the logo in the shared navigation header. */
@media (min-width: 1281px) {
  body[data-page="payment"] .order-details-title {
    margin-left: clamp(-56px, calc((100vw - 1540px) / 2), -50px);
  }
}

@media (min-width: 981px) and (max-width: 1280px) {
  body[data-page="payment"] .order-details-title {
    margin-left: -16px;
  }
}

/* --------------------------------------------------------------------------
   Display currency switch + real Steam account state in the main navigation
   -------------------------------------------------------------------------- */
.header-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.currency-switch {
  height: 34px;
  padding: 3px;
  display: grid;
  grid-template-columns: repeat(2, 30px);
  gap: 2px;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg-deep);
}

.currency-button {
  width: 30px;
  height: 28px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted-2);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.currency-button:hover {
  color: var(--text-2);
  background: var(--panel-2);
}

.currency-button.is-active {
  color: var(--on-accent);
  background: var(--accent);
}
.header-auth-slot,
.header-account-area {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.header-account-area {
  gap: 10px;
}

.header-account-pill {
  height: 38px;
  max-width: 210px;
  padding: 4px 11px 4px 5px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--panel);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.header-account-pill span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-account-avatar {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 50%;
  object-fit: cover;
}

.header-logout-button {
  width: 28px;
  height: 38px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  opacity: .42;
  cursor: pointer;
  transition: opacity 140ms ease;
}

.header-logout-button:hover {
  opacity: .8;
}

.header-logout-button img {
  width: 18px;
  height: 18px;
  transform: rotate(180deg);
}

.order-account-pill {
  text-decoration: none;
}

@media (max-width: 720px) {
  .header-account-pill {
    width: 38px;
    padding: 4px;
  }

  .header-account-pill span,
  .header-logout-button {
    display: none;
  }
}



/* --------------------------------------------------------------------------
   Dynamic payment / payout page
   -------------------------------------------------------------------------- */
.payment-flow-main {
  min-height: calc(100vh - 68px);
  padding: 46px 0 64px;
  background: var(--bg);
}

.payment-flow-shell {
  width: min(1184px, calc(100% - 120px));
  margin: 0 auto;
}

.payment-flow-heading {
  margin-bottom: 24px;
}

.payment-flow-grid {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.payment-flow-card {
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: none;
}

.payment-flow-card--summary {
  padding: 24px;
}

.payment-flow-card--instructions {
  padding: 28px;
}

.payment-flow-badge {
  width: fit-content;
  margin-bottom: 16px;
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  font-weight: 600;
}

.payment-flow-card h2 {
  margin: 0 0 18px;
  color: #fff;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 700;
}

.payment-summary-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.payment-summary-list div {
  display: grid;
  gap: 5px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.payment-summary-list div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.payment-summary-list dt {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.payment-summary-list dd {
  margin: 0;
  color: #fff;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 650;
  word-break: break-word;
}

.payment-flow-note {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  margin-top: 22px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.payment-flow-note img {
  width: 16px;
  height: 16px;
  margin-top: 1px;
}

.payment-method-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.payment-method-heading img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 10px;
  background: var(--bg);
}

.payment-method-heading span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
}

.payment-method-heading h2 {
  margin: 0;
  color: #fff;
  font-size: 26px;
  line-height: 1.1;
  font-weight: 800;
}

.method-content {
  display: grid;
  gap: 18px;
}

.method-lead {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.payment-detail-box {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
}

.payment-detail-row {
  display: grid;
  grid-template-columns: minmax(120px, 160px) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 54px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.payment-detail-row:last-child {
  border-bottom: 0;
}

.payment-detail-row span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.payment-detail-row strong {
  color: #fff;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 700;
  word-break: break-word;
}

.copy-button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--accent);
  border-radius: 7px;
  background: transparent;
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.copy-button:hover {
  background: rgb(var(--accent-rgb) / 0.12);
}

.method-steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: method-step;
}

.method-steps li {
  position: relative;
  min-height: 34px;
  padding-left: 44px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  counter-increment: method-step;
}

.method-steps li::before {
  content: counter(method-step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
}

.payment-warning {
  padding: 13px 14px;
  border: 1px solid rgb(var(--amber-rgb) / 0.35);
  border-radius: 8px;
  background: rgb(var(--amber-rgb) / 0.08);
  color: var(--amber-text);
  font-size: 13px;
  line-height: 1.45;
}

.payment-flow-input {
  height: var(--order-input-height);
  min-height: var(--order-input-height);
}

.payment-flow-input > input {
  padding: 20px 14px 4px;
}

.payment-flow-actions {
  display: grid;
  gap: 14px;
  margin-top: 26px;
}

.payment-secondary-link,
.payment-back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.payment-secondary-link:hover {
  color: #fff;
}

.payment-flow-result {
  margin-top: 32px;
}

@media (max-width: 920px) {
  .payment-flow-shell {
    width: min(100% - 32px, 640px);
  }

  .payment-flow-grid {
    grid-template-columns: 1fr;
  }

  .payment-detail-row {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .copy-button {
    width: fit-content;
  }
}


.sbp-qr-box {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.sbp-qr-image-wrap {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
}

.sbp-qr-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.card-payment-demo {
  padding: 10px 0 4px;
}

.card-payment-panel {
  padding: 18px 18px 16px;
  border-radius: 12px;
  background: var(--bg-deep);
}

.card-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.card-form-row {
  display: grid;
  gap: 8px;
}

.card-form-row--single {
  margin-bottom: 14px;
}

.card-form-row--owner {
  margin-bottom: 0;
}

.card-form-label {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.2;
  font-weight: 700;
  text-align: center;
}

.card-form-label--owner {
  color: var(--muted-2);
}

.card-input-wrap {
  position: relative;
}

.card-input-wrap--icon .card-demo-input {
  padding-right: 64px;
}

.card-demo-input {
  width: 100%;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  color: var(--muted-2);
  font-size: 18px;
  line-height: 1;
  font-weight: 400;
  outline: 0;
}

.card-demo-input::placeholder {
  color: var(--muted);
}

.card-demo-input:focus {
  border-color: var(--border);
  box-shadow: 0 0 0 1px rgb(var(--accent-rgb) / 0.22);
}

.card-demo-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  width: 40px;
  height: 30px;
  transform: translateY(-50%);
  border-radius: 4px;
  background:
    linear-gradient(to bottom, transparent 0, transparent 6px, var(--muted-2) 6px, var(--muted-2) 13px, transparent 13px),
    linear-gradient(var(--muted-2), var(--muted-2));
  background-size: 100% 100%, 40px 30px;
  background-repeat: no-repeat;
}

.card-field-note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.2;
  font-weight: 500;
  text-align: center;
}

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

@media (max-width: 640px) {
  .card-form-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .card-payment-panel {
    padding: 16px 14px 14px;
  }

  .card-demo-input {
    font-size: 16px;
  }
}


/* --------------------------------------------------------------------------
   Exact crypto checkout layouts from the supplied references
   -------------------------------------------------------------------------- */

body.is-crypto-checkout {
  background: var(--bg);
}

body.is-crypto-checkout .payment-flow-main {
  min-height: calc(100vh - 68px);
  padding: 0 0 96px;
  background: var(--bg);
}

body.is-crypto-checkout .payment-flow-shell {
  width: 793px;
  max-width: calc(100% - 40px);
  margin: 0 auto;
  padding-top: 38px;
}

.crypto-reference-section {
  width: 100%;
}

.crypto-reference-title {
  margin: 0 0 8px;
  color: var(--text-2);
  font-size: 32px;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.crypto-reference-grid {
  display: grid;
  grid-template-columns: 469px 300px;
  gap: 26px;
  align-items: start;
}

.crypto-reference-card {
  min-height: 476px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: none;
}

.crypto-reference-card--left {
  padding: 24px 12px 22px;
}

.crypto-reference-card--right {
  padding: 34px 16px 0;
}

.crypto-reference-order {
  margin: 0 0 25px;
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 400;
}

.crypto-reference-steps {
  display: grid;
  gap: 25px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.crypto-reference-steps li {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-height: 23px;
}

.crypto-reference-steps span {
  color: var(--border);
  font-size: 24px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.crypto-reference-steps strong {
  color: #fff;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 700;
}

.crypto-reference-help {
  margin-top: 26px;
}

.crypto-reference-help p {
  margin: 0 0 17px;
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.2;
}

.crypto-reference-help a,
.crypto-reference-help img {
  display: block;
  width: 30px;
  height: 30px;
}

.crypto-reference-policy {
  width: 375px;
  max-width: 100%;
  margin: 34px 0 0;
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 400;
}

.crypto-reference-policy a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.crypto-reference-method-title {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 0 0 24px;
}

.crypto-reference-method-title img {
  width: 31px;
  height: 31px;
  object-fit: contain;
}

.crypto-reference-method-title h2 {
  margin: 0;
  color: var(--text-2);
  font-size: 22px;
  line-height: 1;
  font-weight: 700;
}

.crypto-reference-kicker {
  margin: 0 0 15px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
}

.crypto-reference-input-group {
  display: grid;
  gap: 7px;
  margin: 0 0 14px;
}

.crypto-reference-input-group span,
.crypto-reference-qr-block > span {
  display: block;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.crypto-reference-input-group input {
  width: 100%;
  height: 43px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: #fff;
  font-size: 12px;
  outline: 0;
}

.crypto-reference-input-group input::placeholder {
  color: var(--muted-2);
}

.crypto-reference-input-group input:focus {
  border-color: var(--accent);
}

.crypto-reference-warning {
  height: 37px;
  margin: 0 0 23px;
  padding: 0 11px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--amber);
  border-radius: 6px;
  background: rgb(var(--amber-rgb) / 0.08);
  color: var(--amber-text);
  font-size: 11px;
  line-height: 1.2;
}

.crypto-reference-warning img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.crypto-reference-qr-block {
  margin: 0 0 13px;
}

.crypto-reference-qr-card {
  width: 100%;
  height: 184px;
  padding: 15px 10px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  text-align: center;
}

.crypto-reference-qr {
  display: block;
  width: 135px;
  height: 135px;
  margin: 0 auto 6px;
  object-fit: contain;
}

.crypto-reference-qr-card p {
  margin: 0;
  color: var(--text-2);
  font-size: 11px;
  line-height: 1.2;
  word-break: break-all;
}

.crypto-reference-total {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 15px;
}

.crypto-reference-total span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
}

.crypto-reference-total strong {
  color: #fff;
  font-size: 25px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.crypto-reference-button {
  width: 100%;
  height: 51px;
  border: 0;
  border-radius: 6px;
  background: var(--green);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  font-weight: 800;
  cursor: pointer;
}

.crypto-reference-button--sell {
  background: var(--red-fill);
}

.crypto-reference-button:hover {
  filter: brightness(1.05);
}

.crypto-reference-security {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 17px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
}

.crypto-reference-security img {
  width: 13px;
  height: 13px;
}

body[data-page="payment"].is-crypto-checkout .crypto-reference-result {
  width: 100%;
  margin: 32px auto 0;
}

@media (max-width: 880px) {
  body.is-crypto-checkout .payment-flow-shell {
    width: min(100% - 32px, 520px);
    padding-top: 28px;
  }

  .crypto-reference-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .crypto-reference-card {
    min-height: auto;
  }

  .crypto-reference-card--left,
  .crypto-reference-card--right {
    padding: 22px 16px;
  }

  .crypto-reference-title {
    font-size: 28px;
  }
}

/* Steam bot trade link shown on sell checkout pages. */
.bot-trade-box {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgb(var(--accent-rgb) / 0.28);
  border-radius: 14px;
  background: var(--bg-deep);
}

.bot-trade-box > span {
  font-size: 13px;
  opacity: 0.75;
}

.bot-trade-box > a {
  font-weight: 700;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bot-trade-box > small {
  line-height: 1.45;
  opacity: 0.72;
}

.bot-trade-box--warning {
  border-color: rgb(var(--amber-rgb) / 0.42);
}

/* ==========================================================================
   2026-10 refinement layer
   One place that brings the order, checkout, status and reviews pages onto
   the same tokens, type scale and alignment as the home page. It sits last
   on purpose: everything above it is the earlier pixel-matched layout.
   ========================================================================== */

/* --- Shared form fields --------------------------------------------------- */
.floating-field,
body[data-page="home"] .home-order-quantity-field {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.floating-field:hover { border-color: var(--border-strong); }
.floating-field:focus-within,
body[data-page="home"] .home-order-quantity-field:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / 0.22);
}
.floating-field > input,
body[data-page="payment"] .order-floating-field > input { padding: 21px 14px 5px; }
.floating-field > span { color: var(--muted); font-size: 14px; }
.floating-field:focus-within > span,
.floating-field.is-focused > span,
.floating-field.has-value > span,
.floating-field:has(> input:not(:placeholder-shown)) > span,
body[data-page="payment"] .order-floating-field:focus-within > span,
body[data-page="payment"] .order-floating-field.is-focused > span,
body[data-page="payment"] .order-floating-field.has-value > span,
body[data-page="payment"] .order-floating-field:has(> input:not(:placeholder-shown)) > span {
  top: 8px;
  font-size: 12px;
  color: var(--muted);
}
.order-floating-field > input[type="url"],
.order-floating-field > input[type="email"] { font-size: 15px; }
.home-order-quantity-field,
.order-floating-field {
  height: var(--order-input-height);
  min-height: var(--order-input-height);
}

/* --- Header on order pages ------------------------------------------------ */
/* The header shares the content column, so the logo, the title and both cards
   start on one left edge. */
body[data-page="payment"] { background: var(--bg); }
body[data-page="payment"] .order-site-header { border-bottom-color: var(--border-soft); }
body[data-page="payment"] .order-header-inner {
  width: min(1180px, calc(100% - 48px));
  gap: 20px;
}
body[data-page="payment"] .order-header-inner .steam-button {
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--accent-fill);
  box-shadow: none;
  font-size: 13px;
  font-weight: 700;
}
body[data-page="payment"] .order-header-inner .steam-button:hover { background: var(--accent-hover); filter: none; }
.header-account-pill,
body[data-page="payment"] .order-account-pill {
  height: 40px;
  border-color: var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-deep);
  font-size: 13px;
  transition: border-color 150ms ease;
}
.header-account-pill:hover,
body[data-page="payment"] .order-account-pill:hover { border-color: var(--border-strong); }

.header-logout-button,
body[data-page="payment"] .order-logout-button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-deep);
  color: #fff;
  opacity: 1;
  transition:
    color 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease;
}
.header-logout-button:hover,
body[data-page="payment"] .order-logout-button:hover {
  border-color: var(--border-strong);
  background: var(--bg-deep);
  color: var(--accent);
  opacity: 1;
}

.header-account-area,
body[data-page="payment"] .order-account-area { gap: 4px; }

.currency-switch {
  --currency-index: 0;
  position: relative;
  isolation: isolate;
  height: 40px;
  border-color: var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-deep);
  grid-template-columns: repeat(2, 34px);
}
body[data-display-currency="USD"] .currency-switch { --currency-index: 1; }

.currency-switch::before {
  content: "";
  position: absolute;
  inset: 3px auto 3px 3px;
  z-index: 0;
  width: 34px;
  border-radius: calc(var(--radius-sm) - 2px);
  background: var(--accent-fill);
  transform: translateX(calc(var(--currency-index) * 36px));
  transition: transform 460ms var(--ease-out);
  pointer-events: none;
}

.currency-button {
  position: relative;
  z-index: 1;
  width: 34px;
  height: 32px;
  color: var(--muted);
  font-size: 13px;
  background: transparent;
}
.currency-button:not(.is-active):hover { color: var(--text); background: var(--panel-3); }
.currency-button.is-active { background: transparent; color: var(--on-accent); box-shadow: none; }

/* --- Order details (payment.html, sell.html) ------------------------------ */
.order-details-main,
body[data-page="payment"] .order-details-main,
.payment-flow-main,
body.is-crypto-checkout .payment-flow-main {
  background: var(--bg);
}
body[data-page="payment"] .order-details-main { padding-bottom: 72px; }
body[data-page="payment"] .order-details-shell {
  width: min(1180px, calc(100% - 48px));
  padding-top: 34px;
}
body[data-page="payment"] .order-details-title {
  margin: 0;
  font-size: 32px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.03em;
}
body[data-page="payment"] .order-details-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
  font-weight: 400;
}
body[data-page="payment"] .checkout-grid--reference {
  width: 100%;
  margin: 24px 0 0;
  grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
  gap: 24px;
  align-items: start;
}
body[data-page="payment"] .checkout-reference-card {
  width: 100%;
  height: auto;
  min-height: 0;
  padding: 24px;
  overflow: visible;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}
body[data-page="payment"] .checkout-reference-card--payment { gap: 18px; }
.order-product-image { background: var(--panel-2); }
.order-product-image img { width: 64px; height: 50px; object-fit: contain; margin: 11px auto; }
.order-product-copy h2 { font-size: 16px; font-weight: 700; }
.order-product-copy p { font-size: 14px; }
.order-product-game, .order-stock-line { color: var(--muted); }
.order-divider, .order-payment-divider { background: var(--border-soft); }
.order-trade-help { color: var(--accent-text); font-size: 14px; }
.order-trade-help:hover { color: #fff; }
.order-trade-help span { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.order-trade-block .order-floating-field { margin-top: 8px; }
.order-stock-line { margin: 20px 0 8px; font-size: 14px; }
.order-email-block { margin-top: 20px; }
/* Optional promo code under the e-mail: same field, typed in capitals. */
.order-promo-field { margin-top: 12px; }
.order-promo-field input { text-transform: uppercase; letter-spacing: .04em; }
.order-promo-field input:placeholder-shown { letter-spacing: normal; }
.order-field-hint { margin: 8px 0 0; color: var(--muted-2); font-size: 13px; line-height: 1.4; }

/* Payment method tiles: every option is readable before it is selected. */
body[data-page="payment"] .payment-methods--reference {
  width: 100%;
  height: auto;
  flex: 0 0 auto;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: none;
  grid-auto-rows: 96px;
  gap: 8px;
}
body[data-page="payment"] .payment-method--reference {
  width: 100%;
  height: 96px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--text-2);
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}
body[data-page="payment"] .payment-method--reference:hover { border-color: var(--border-strong); color: var(--text); }
body[data-page="payment"] .payment-method--reference img,
body[data-page="payment"] .payment-method--reference.is-selected img {
  left: 12px;
  top: 12px;
  width: 28px;
  height: 28px;
}
body[data-page="payment"] .payment-method--reference span,
body[data-page="payment"] .payment-method--reference[data-method^="USDT"] span,
body[data-page="payment"] .payment-method--reference[data-method^="USDC"] span {
  left: 12px;
  right: 8px;
  bottom: 28px;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 700;
}
body[data-page="payment"] .payment-method--reference:not([data-method^="USD"]) span { bottom: 12px; font-size: 16px; }
body[data-page="payment"] .payment-method-minimum {
  left: 12px;
  right: 8px;
  bottom: 11px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
body[data-page="payment"] .payment-method--reference small,
body[data-page="payment"] .payment-method--reference.is-selected small {
  display: block;
  right: 10px;
  top: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
body[data-page="payment"] .payment-method--reference.is-selected,
body[data-page="payment"] .payment-method--reference.is-selected:hover {
  border-color: var(--accent);
  background: rgb(var(--accent-rgb) / 0.14);
  box-shadow: inset 0 0 0 1px var(--accent);
  color: #fff;
}
body[data-page="payment"] .payment-method--reference.is-selected small,
body[data-page="payment"] .payment-method--reference.is-selected .payment-method-minimum { color: var(--accent-text); }
/* The check mark is drawn, so the selected fee stays visible beside it. */
body[data-page="payment"] .payment-method--reference i { display: none; }
body[data-page="payment"] .payment-method--reference.is-selected i {
  position: absolute;
  right: 10px;
  top: auto;
  bottom: 10px;
  width: 18px;
  height: 18px;
  display: block;
  border: 0;
  border-radius: 50%;
  background: var(--accent-fill);
  color: transparent;
  font-size: 0;
}
body[data-page="payment"] .payment-method--reference.is-selected i::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 3px;
  width: 4px;
  height: 8px;
  border-right: 2px solid var(--on-accent);
  border-bottom: 2px solid var(--on-accent);
  transform: rotate(45deg);
}
body[data-page="payment"] .payment-method--reference:disabled,
body[data-page="payment"] .payment-method--reference.is-disabled {
  border-color: var(--border-soft);
  background: transparent;
  color: var(--muted-2);
  opacity: .55;
  cursor: not-allowed;
}

/* Payment method tiles (crypto); the coin is chosen in the pill below. */
body[data-page="payment"] .payment-methods--pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body[data-page="payment"] .payment-method--reference.payment-method--crypto:not([data-method^="USD"]) span { bottom: 28px; font-size: 16px; }

/* Coin and network. Closed, the two tabs are one quiet two-part button that
   shows the choice. Open, they are folder tabs: the active one runs into the
   list, the other sits behind it, and the list's free top corner is round. */
.crypto-picker { display: none; gap: 8px; }
.crypto-picker.is-shown { display: grid; }
.coin-net { --tab-h: 50px; --r: var(--radius); position: relative; }
.coin-net-row {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  border: 1px solid var(--border); border-radius: var(--r); background: var(--panel-2);
  transition: border-color 140ms ease;
}
.coin-net:not(.is-open) .coin-net-row { z-index: 3; }
.coin-net:not(.is-open) .coin-net-row:hover { border-color: var(--border-strong); }
.coin-net-button {
  position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; height: var(--tab-h); padding: 0 14px;
  border: 0; border-radius: 0; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease, border-radius 200ms ease;
}
.coin-net:not(.is-open) .coin-net-button:first-child { border-radius: calc(var(--r) - 1px) 0 0 calc(var(--r) - 1px); }
.coin-net:not(.is-open) .coin-net-button:last-child { border-radius: 0 calc(var(--r) - 1px) calc(var(--r) - 1px) 0; box-shadow: inset 1px 0 0 var(--border); }
.coin-net-button:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--accent-text) !important; }

/* Open: a folder. The active tab and the list are one outline: the tab's
   inner side curves into the list's top edge (an inward round corner), and
   the list's other top corner is round. The tab at the back is drawn in a
   softer line, tucked under the active tab, its outer side running down
   into the list's round corner. */
.coin-net.is-open .coin-net-row { border-color: transparent; background: transparent; }
.coin-net.is-open .coin-net-button {
  margin: -1px -1px 0; border: 1px solid var(--border); border-bottom: 0; border-radius: var(--r) var(--r) 0 0;
}
.coin-net.is-open .coin-net-button[aria-expanded="false"] {
  z-index: 1; height: calc(var(--tab-h) + var(--r)); margin-bottom: calc(-1 * var(--r)); padding-bottom: var(--r);
  border-color: var(--border-soft); background: var(--panel); color: var(--muted);
}
.coin-net.is-open .coin-net-button[aria-expanded="false"]:hover { background: var(--panel-2); color: var(--text); }
.coin-net.is-open .coin-net-button[aria-expanded="true"] {
  z-index: 3; height: calc(var(--tab-h) + 2px); margin-bottom: -2px; background: var(--bg); color: var(--text); cursor: default;
}
.coin-net.is-open .coin-net-button[aria-expanded="true"] small { color: var(--accent-text); }
/* The back tab reaches under the active one, so there is no gap where they meet. */
.coin-net.is-open[data-view="coin"] .coin-net-button:last-child {
  margin-left: calc(-1 * var(--r)); padding-left: calc(14px + var(--r)); border-left: 0; border-top-left-radius: 0;
}
.coin-net.is-open[data-view="net"] .coin-net-button:first-child {
  margin-right: calc(-1 * var(--r)); padding-right: calc(14px + var(--r)); border-right: 0; border-top-right-radius: 0;
}
/* The inward round corner where the active tab meets the list's top edge. */
.coin-net.is-open .coin-net-button[aria-expanded="true"]::after {
  content: ""; position: absolute; bottom: 0; width: var(--r); height: var(--r); pointer-events: none;
}
.coin-net.is-open[data-view="coin"] .coin-net-button[aria-expanded="true"]::after {
  left: 100%;
  background: radial-gradient(circle at 100% 0, transparent calc(var(--r) - 1px), var(--border) calc(var(--r) - 1px), var(--border) var(--r), var(--bg) var(--r));
}
.coin-net.is-open[data-view="net"] .coin-net-button[aria-expanded="true"]::after {
  right: 100%;
  background: radial-gradient(circle at 0 0, transparent calc(var(--r) - 1px), var(--border) calc(var(--r) - 1px), var(--border) var(--r), var(--bg) var(--r));
}

.coin-net-icon { display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 30px; }
.coin-net-icon img { display: block; width: 30px; height: 30px; }
.coin-net-text { display: flex; flex: 1 1 auto; flex-direction: column; gap: 1px; min-width: 0; }
.coin-net-text small { color: var(--muted); font-size: 11px; font-weight: 600; line-height: 1.2; letter-spacing: .02em; transition: color 200ms ease; }
.coin-net-text b { overflow: hidden; font-size: 15px; font-weight: 700; line-height: 1.25; white-space: nowrap; text-overflow: ellipsis; }
.coin-net-button.is-empty b { color: var(--accent-text); }
.coin-net.is-open .coin-net-button[aria-expanded="false"].is-empty b { color: var(--muted); }

/* The list. The outer box only changes height (and clips while it does); the
   inner one draws the outline, so the frame keeps its shape while it folds.
   Its corner under the active tab is square, the other one round. */
.crypto-panel { position: relative; z-index: 2; }
.crypto-panel[hidden] { display: none; }
.crypto-panel.is-animating { overflow: hidden; transition: height 240ms var(--ease-out); }
.crypto-panel-inner {
  padding: 10px; border: 1px solid var(--border); border-radius: var(--r); background: var(--bg);
  transition: border-radius 220ms ease, opacity 200ms ease, transform 240ms var(--ease-out);
}
.coin-net[data-view="coin"] .crypto-panel-inner { border-top-left-radius: 0; }
.coin-net[data-view="net"] .crypto-panel-inner { border-top-right-radius: 0; }
.crypto-panel.is-folding .crypto-panel-inner { border-radius: var(--r); opacity: 0; transform: translateY(-10px); transition: opacity 160ms ease, transform 240ms var(--ease-out); }
.crypto-panel.is-unfolding .crypto-panel-inner { animation: crypto-panel-in 240ms var(--ease-out); }
@keyframes crypto-panel-in { from { opacity: 0; transform: translateY(-6px); } }
/* The terms tick shows only once the list is closed. */
.checkout-reference-card--payment:has(.coin-net.is-open) .order-policy-checkbox { display: none; }
.order-policy-checkbox { animation: crypto-panel-in 240ms var(--ease-out); }
.crypto-view[hidden] { display: none; }
.crypto-view.is-entering-right { animation: crypto-view-right 240ms var(--ease-out); }
.crypto-view.is-entering-left { animation: crypto-view-left 240ms var(--ease-out); }
@keyframes crypto-view-right { from { opacity: 0; transform: translateX(18px); } }
@keyframes crypto-view-left { from { opacity: 0; transform: translateX(-18px); } }

.coin-search {
  display: flex; align-items: center; gap: 8px; height: 36px; margin-bottom: 8px; padding: 0 12px;
  border: 1px solid transparent; border-radius: 10px; background: var(--panel-2); color: var(--muted);
}
.coin-search:focus-within { border-color: var(--accent); }
.coin-search svg { flex: 0 0 16px; width: 16px; height: 16px; }
.coin-search input {
  flex: 1 1 auto; min-width: 0; height: 100%; padding: 0; border: 0; background: transparent; color: var(--text);
  font: inherit; font-size: 13.5px; outline: none;
}
.coin-search input::placeholder { color: var(--muted-2); }
.coin-search input::-webkit-search-cancel-button { filter: invert(.7); }
.coin-empty { margin: 18px 4px; color: var(--muted); font-size: 13px; text-align: center; }

/* Both tabs show a list of the same height; longer lists scroll inside it,
   with the edges fading where there is more to see. */
.coin-net { --list-h: 188px; }
.crypto-scroll {
  position: relative; height: var(--list-h); margin-right: -6px; padding-right: 6px; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent;
  --fade-top: 0px; --fade-bottom: 0px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 var(--fade-top), #000 calc(100% - var(--fade-bottom)), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 var(--fade-top), #000 calc(100% - var(--fade-bottom)), transparent 100%);
}
.crypto-scroll.can-scroll-up { --fade-top: 18px; }
.crypto-scroll.can-scroll-down { --fade-bottom: 22px; }
.crypto-scroll::-webkit-scrollbar { width: 6px; }
.crypto-scroll::-webkit-scrollbar-thumb { border-radius: 3px; background: var(--border-strong); }
.crypto-scroll::-webkit-scrollbar-track { background: transparent; }

/* Rows: icon on the left, the name to its right; networks add the fee on the far right. */
.coin-list,
.crypto-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
.crypto-list[hidden] { display: none; }
.coin-option,
.net-option,
.crypto-option {
  position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; column-gap: 10px; min-width: 0; min-height: 44px; padding: 4px 10px;
  border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--text);
  font: inherit; font-size: 13.5px; font-weight: 700; line-height: 1.2; text-align: left; cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease;
}
.coin-option[hidden],
.net-option[hidden],
.crypto-option[hidden] { display: none; }
.coin-option img,
.net-option img,
.crypto-option img { width: 28px; height: 28px; }
.coin-option-text { display: flex; flex-direction: column; min-width: 0; }
.coin-option-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.coin-option-full { overflow: hidden; color: var(--muted); font-size: 11px; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.coin-option-meta:empty { display: none; }
.coin-option-text:has(.coin-option-meta:not(:empty)) .coin-option-full { display: none; }
.coin-option-meta { overflow: hidden; color: var(--muted-2); font-size: 11px; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
/* Network rows: the name, and under it the standard (TRC20, BEP20) and the fee —
   or why the row is off. */
.crypto-option-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.crypto-option-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.crypto-option-sub { display: flex; align-items: baseline; gap: 4px; min-width: 0; overflow: hidden; color: var(--muted); font-size: 11px; font-weight: 500; white-space: nowrap; }
.crypto-option-sub:empty { display: none; }
.crypto-option-sub em { color: var(--muted-2); font-size: 10.5px; font-style: normal; }
.crypto-option-fee { color: var(--muted); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.crypto-option-fee:empty { display: none; }
.crypto-option-minimum:not([hidden]) { overflow: hidden; color: var(--muted-2); font-size: 11px; font-weight: 500; text-overflow: ellipsis; }
.crypto-option-sub:has(.crypto-option-minimum:not([hidden])) .crypto-option-fee,
.crypto-option-sub:has(.crypto-option-minimum:not([hidden])) em { display: none; }

@media (hover: hover) {
  .coin-option:hover,
  .net-option:hover,
  .crypto-option:hover { background: var(--panel-2); }
}
.coin-option:focus-visible,
.net-option:focus-visible,
.crypto-option:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--accent-text); }
.coin-option[aria-pressed="true"],
.net-option[aria-pressed="true"],
.crypto-option[aria-pressed="true"] { border-color: rgb(var(--accent-rgb) / 0.55); background: rgb(var(--accent-rgb) / 0.1); }
.coin-option.is-disabled,
.net-option.is-disabled,
.crypto-option.is-disabled { color: var(--muted-2); cursor: not-allowed; }
.coin-option.is-disabled:hover,
.net-option.is-disabled:hover,
.crypto-option.is-disabled:hover { background: transparent; }
.coin-option.is-disabled img,
.net-option.is-disabled img,
.crypto-option.is-disabled img { opacity: .4; }

/* One quiet line under the choice. */
.crypto-network-warning {
  display: flex; gap: 8px; margin: 0; padding: 0 2px; color: var(--amber-text); font-size: 12px; line-height: 1.4;
}
.crypto-network-warning::before { content: ""; flex: 0 0 6px; height: 6px; margin-top: 5px; border-radius: 50%; background: var(--amber); }
.crypto-network-warning[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  .crypto-view.is-entering-right, .crypto-view.is-entering-left { animation: none; }
  .crypto-panel, .crypto-panel.is-animating, .crypto-panel-inner, .coin-net-button, .order-policy-checkbox { transition: none; animation: none; }
}
@media (max-width: 560px) {
  .coin-net { --tab-h: 50px; }
  .coin-net-button { gap: 8px; padding: 0 10px; }
  .coin-net-icon, .coin-net-icon img { flex-basis: 28px; width: 28px; height: 28px; }
  .coin-net-text b { font-size: 14px; }
  .crypto-panel-inner { padding: 8px; }
  /* Phone: coins and networks in two columns, so nothing is cut. */
  .net-option, .crypto-option { grid-template-columns: 24px minmax(0, 1fr); column-gap: 8px; font-size: 13.5px; }
  .net-option img, .crypto-option img { width: 24px; height: 24px; }
  .coin-net { --list-h: 236px; }
}

.order-policy-checkbox { grid-template-columns: 20px minmax(0, 1fr); gap: 10px; color: var(--text-2); font-size: 13px; line-height: 1.5; }
.order-policy-checkbox input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); }
.order-policy-checkbox a,
.crypto-reference-policy a { color: var(--accent-text); text-underline-offset: 3px; }
.order-total-row { align-items: baseline; padding-top: 16px; border-top: 1px solid var(--border-soft); }
.order-total-row span { color: var(--muted); }
.order-total-row strong { font-size: 24px; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }

.order-buy-button,
.crypto-reference-button {
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--green);
  color: var(--green-ink);
  font-size: 16px;
  font-weight: 700;
  transition: filter 140ms ease, transform 140ms ease;
}
.order-buy-button:hover,
.crypto-reference-button:hover { filter: brightness(1.07); transform: translateY(-1px); }
.order-buy-button:active,
.crypto-reference-button:active { filter: brightness(.96); transform: translateY(0); }
.order-buy-button:disabled,
.crypto-reference-button:disabled { opacity: .6; cursor: progress; transform: none; }
body[data-order-mode="sell"] .order-buy-button,
.crypto-reference-button--sell { background: var(--red-fill); color: #fff; }
.order-security-note,
.crypto-reference-security { align-items: flex-start; color: var(--muted-2); font-size: 13px; line-height: 1.4; white-space: normal; }
.order-security-note img,
.crypto-reference-security img { width: 14px; height: 14px; flex: 0 0 14px; margin-top: 2px; }

body[data-page="payment"] .order-site-footer { border-top-color: var(--border-soft); background: var(--bg-deep); }
.order-footer-inner {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
  padding: 0;
  color: var(--muted-2);
  font-size: 13px;
}
body[data-page="payment"] .success-panel { width: 100%; margin: 24px 0 0; }

/* --- Payment flow (checkout.html) ----------------------------------------- */
.payment-flow-main { padding: 0 0 72px; }
.payment-flow-shell { width: min(1180px, calc(100% - 48px)); padding-top: 34px; }
.payment-flow-heading { margin-bottom: 24px; }
.payment-flow-grid { grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 24px; }
.payment-flow-card,
.crypto-reference-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}
.payment-flow-card--summary { padding: 24px; }
.payment-flow-card--instructions { padding: 24px; }
.payment-flow-badge { border-color: var(--border); background: var(--panel-2); color: var(--text-2); font-size: 13px; }
.payment-flow-card h2 { font-size: 20px; }
.payment-summary-list div { border-bottom-color: var(--border-soft); }
.payment-summary-list dt, .payment-detail-row span, .payment-method-heading span { color: var(--muted); font-size: 13px; }
.payment-summary-list dd { font-size: 15px; overflow-wrap: anywhere; word-break: normal; }
.payment-flow-note { border-color: var(--border-soft); background: var(--bg-deep); color: var(--muted); font-size: 13px; }
.payment-method-heading img { background: var(--panel-2); }
.payment-method-heading h2 { font-size: 24px; }
.method-lead { max-width: 65ch; color: var(--text-2); }
.method-steps li { color: var(--text-2); padding-top: 4px; }
.method-steps li::before { background: var(--panel-2); color: var(--accent-text); font-size: 12px; font-variant-numeric: tabular-nums; }
.payment-detail-box { border-color: var(--border); background: var(--bg-deep); }
/* Label above value, copy button beside both: the value keeps the full row width. */
.payment-detail-row {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "label action" "value action";
  gap: 3px 14px;
  min-height: 0;
  padding: 12px 14px;
  border-bottom-color: var(--border-soft);
}
.payment-detail-row span { grid-area: label; }
.payment-detail-row strong { grid-area: value; font-size: 15px; overflow-wrap: anywhere; word-break: normal; font-variant-numeric: tabular-nums; }
.payment-detail-row .copy-button { grid-area: action; align-self: center; }
.copy-button {
  min-height: 36px;
  padding: 0 12px;
  border-color: var(--border-strong);
  border-radius: 7px;
  color: var(--accent-text);
  font-size: 13px;
  white-space: nowrap;
  transition: background-color 140ms ease, border-color 140ms ease;
}
.copy-button:hover { border-color: var(--accent); background: rgb(var(--accent-rgb) / 0.14); }
.sbp-qr-box { grid-template-columns: minmax(200px, 240px) minmax(0, 1fr); }
.sbp-qr-image-wrap { border-color: var(--border); background: var(--bg-deep); }
.payment-secondary-link, .payment-back-button { color: var(--text-2); }

/* Card form: same dark field vocabulary as the rest of the flow. */
.card-payment-panel { padding: 18px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-deep); }
.card-form-label,
.card-form-label--owner { color: var(--muted); font-size: 13px; font-weight: 500; text-align: left; }
.card-demo-input {
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--text);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.card-demo-input::placeholder { color: var(--muted-2); }
.card-demo-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / 0.22); }
.card-demo-icon { opacity: .5; }
.card-field-note { color: var(--muted-2); font-size: 12px; font-weight: 400; text-align: left; }
.card-form-grid { margin-bottom: 14px; }
.card-payment-demo + .bot-trade-box, .payment-detail-box + .card-payment-demo { margin-top: 0; }

.bot-trade-box { border-color: var(--border); border-radius: 10px; background: var(--bg-deep); }
.bot-trade-box > span { color: var(--muted); opacity: 1; }
.bot-trade-box > a { color: var(--accent-text); }
.bot-trade-box > small { color: var(--text-2); font-size: 13px; opacity: 1; }
.bot-trade-box .copy-button { width: fit-content; }

/* Crypto checkout: same column as the other steps, readable sizes. */
body.is-crypto-checkout .payment-flow-main { padding: 0 0 72px; }
body.is-crypto-checkout .payment-flow-shell { width: min(1180px, calc(100% - 48px)); max-width: none; padding-top: 34px; }
.crypto-reference-title { margin: 0 0 20px; color: var(--text); font-size: 32px; font-weight: 800; }
.crypto-reference-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 24px; }
.crypto-reference-card { min-width: 0; min-height: 0; }
.crypto-reference-card--left { padding: 24px; }
.crypto-reference-card--right { padding: 24px; }
.crypto-reference-order { color: var(--muted); font-size: 13px; }
.crypto-reference-steps { gap: 18px; }
.crypto-reference-steps li { gap: 12px; }
.crypto-reference-steps span { color: var(--muted-2); font-size: 20px; font-variant-numeric: tabular-nums; }
.crypto-reference-steps strong { font-size: 15px; line-height: 1.4; font-weight: 600; }
.crypto-reference-help p { margin-bottom: 10px; color: var(--muted); font-size: 13px; }
.crypto-reference-policy { width: auto; max-width: 52ch; color: var(--muted); font-size: 13px; line-height: 1.5; }
.crypto-reference-method-title { justify-content: flex-start; margin-bottom: 6px; }
.crypto-reference-method-title h2 { color: var(--text); }
.crypto-reference-kicker { margin-bottom: 18px; color: var(--muted); font-size: 13px; text-align: left; }
.crypto-reference-input-group span,
.crypto-reference-qr-block > span { color: var(--muted); font-size: 13px; }
.crypto-reference-input-group input {
  height: 48px;
  border-color: var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
}
.crypto-reference-input-group input::placeholder { color: var(--muted-2); }
.crypto-reference-input-group input:focus { box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / 0.22); }
.crypto-reference-warning { height: auto; min-height: 40px; padding: 8px 12px; font-size: 13px; line-height: 1.35; }
.crypto-reference-qr-card { height: auto; padding: 16px 12px 12px; border-color: var(--border); border-radius: var(--radius-sm); }
.crypto-reference-qr { width: 150px; height: 150px; margin-bottom: 10px; }
.crypto-reference-qr-card p { color: var(--text-2); font-size: 13px; overflow-wrap: anywhere; }
.crypto-reference-total { height: auto; align-items: baseline; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border-soft); }
.crypto-reference-total span { color: var(--muted); font-size: 14px; }
.crypto-reference-total strong { font-size: 24px; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.crypto-reference-security { margin-top: 14px; }

/* --- Reviews page --------------------------------------------------------- */
.reviews-page { background: var(--bg); }
.reviews-page-main { width: min(1380px, calc(100% - 48px)); padding-top: 34px; padding-bottom: 48px; grid-template-rows: auto var(--reviews-block-height) 44px; align-content: start; gap: 22px; }
.reviews-page-title { font-size: 32px; letter-spacing: -0.03em; text-align: left; }
.reviews-page .review-card { border-color: var(--border); background: var(--panel); box-shadow: none; }
.reviews-page .review-author h3 { color: var(--text); font-size: 15px; font-weight: 680; }
.reviews-page .review-author time { color: var(--muted); font-size: 13px; }
.reviews-page .review-rating { color: var(--green); font-size: 14px; font-weight: 750; }
.reviews-page .review-card p { margin-top: 14px; color: var(--text-2); font-size: 14px; line-height: 1.55; }
.review-avatar { border-color: var(--border-strong); background: var(--panel-3); }
.review-avatar-fallback { color: var(--accent-text); font-size: 14px; }
/* An empty or failed list does not need the full paginated block. */
.reviews-page:has(.reviews-status:not([hidden])) { --reviews-block-height: 240px; }
.reviews-page:has(.reviews-status:not([hidden])) .reviews-pagination-shell { visibility: hidden; }
.reviews-status { border-color: var(--border-strong); color: var(--text-2); font-size: 15px; line-height: 1.5; }
.reviews-status--error { color: var(--red-text); }

.reviews-pagination-shell { height: 44px; }
.reviews-pagination,
.reviews-page .reviews-pagination {
  width: auto;
  min-width: 0;
  max-width: 100%;
  min-height: 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
.reviews-pagination .pagination-placeholder { display: none; }
.reviews-pagination > *,
.reviews-pagination > :first-child,
.reviews-pagination > :last-child { border-radius: 8px !important; }
.reviews-pagination .pagination-button,
.reviews-pagination .pagination-ellipsis {
  width: 40px;
  min-width: 40px;
  height: 40px;
  border-color: var(--border);
  background: var(--panel);
  color: var(--text-2);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.reviews-pagination .pagination-button:hover:not(:disabled) { border-color: var(--border-strong); background: var(--panel-3); }
.reviews-pagination .pagination-button.is-active,
.reviews-pagination .pagination-button.is-active:hover,
.reviews-pagination .pagination-button.is-active:disabled {
  border-color: var(--accent-fill);
  background: var(--accent-fill);
  box-shadow: none;
}
.reviews-pagination .pagination-ellipsis,
.reviews-pagination .pagination-ellipsis:hover,
.reviews-pagination .pagination-ellipsis:disabled { border-color: transparent; background: transparent; color: var(--muted); }
.reviews-pagination > .pagination-button:first-child:disabled,
.reviews-pagination > .pagination-button:first-child:disabled:hover,
.reviews-pagination > .pagination-button:last-child:disabled,
.reviews-pagination > .pagination-button:last-child:disabled:hover { border-color: var(--border); background: var(--panel); color: var(--text-2); opacity: .35; }

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 980px) {
  body[data-page="payment"] .checkout-grid--reference,
  .payment-flow-grid,
  .crypto-reference-grid { grid-template-columns: minmax(0, 1fr); }
  body[data-page="payment"] .checkout-reference-card--payment { width: 100%; }
  body.is-crypto-checkout .payment-flow-shell { width: min(560px, calc(100% - 48px)); }
  .reviews-page-main { width: min(1380px, calc(100% - 40px)); }
}

@media (max-width: 720px) {
  .header-account-pill,
  body[data-page="payment"] .order-account-pill { width: 40px; padding: 4px; justify-content: center; }
  .header-account-pill span,
  body[data-page="payment"] .order-account-pill span { display: none; }
  .header-account-avatar,
  body[data-page="payment"] .order-account-avatar { width: 30px; height: 30px; flex-basis: 30px; }
  /* On a phone the header has no room for a separate sign-out button next to
     the menu, so signing out lives in the menu. */
  .header-logout-button { display: none; }
  .top-nav-logout:not([hidden]) { display: block; }
  .currency-switch { height: 40px; padding: 3px; grid-template-columns: repeat(2, 30px); }
  .currency-button { width: 30px; height: 32px; font-size: 13px; }
}

@media (max-width: 560px) {
  body[data-page="payment"] .order-header-inner,
  body[data-page="payment"] .order-details-shell,
  .payment-flow-shell,
  body.is-crypto-checkout .payment-flow-shell,
  .order-footer-inner { width: min(100% - 28px, 1180px); }
  body[data-page="payment"] .order-header-inner .brand { font-size: 14px; }
  body[data-page="payment"] .order-header-inner .steam-button { width: 44px; min-width: 44px; height: 40px; padding: 0; }
  body[data-page="payment"] .order-details-shell,
  .payment-flow-shell,
  body.is-crypto-checkout .payment-flow-shell { padding-top: 24px; }
  body[data-page="payment"] .order-details-title,
  .crypto-reference-title,
  .reviews-page-title { font-size: 30px; }
  body[data-page="payment"] .order-details-subtitle { font-size: 15px; }
  body[data-page="payment"] .checkout-grid--reference { margin-top: 18px; gap: 16px; }
  body[data-page="payment"] .checkout-reference-card,
  body[data-page="payment"] .checkout-reference-card--product,
  body[data-page="payment"] .checkout-reference-card--payment,
  .payment-flow-card--summary,
  .payment-flow-card--instructions,
  .crypto-reference-card--left,
  .crypto-reference-card--right { min-height: 0; padding: 18px 16px; }
  body[data-page="payment"] .payment-methods--reference { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; grid-auto-rows: 92px; }
  body[data-page="payment"] .payment-method--reference { height: 92px; }
  .order-footer-inner { padding: 16px 0; }
  .sbp-qr-box { grid-template-columns: minmax(0, 1fr); }
  .sbp-qr-image-wrap { max-width: 260px; }
  .reviews-page-main { width: min(100% - 28px, 1380px); padding-top: 24px; }
  .reviews-pagination .pagination-button,
  .reviews-pagination .pagination-ellipsis { width: 36px; min-width: 36px; height: 36px; font-size: 13px; }
  .reviews-pagination { gap: 4px; }
}

/* --- Type roles ----------------------------------------------------------
   Display face: brand, page and section titles, headline prices.
   Text face: everything people read or operate. */
.brand,
.footer-brand .brand,
body[data-page="payment"] .order-header-inner .brand {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .045em;
}
.page-intro h1,
.inner-heading h1,
.reviews-page-title,
.crypto-reference-title,
.legal-card h1,
body[data-page="payment"] .order-details-title,
body[data-page="order-status"] .order-status-card h1 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: .012em;
  text-transform: uppercase;
}
.page-intro h1 { font-size: clamp(36px, 4.1vw, 58px); }
.inner-heading h1,
.reviews-page-title,
.crypto-reference-title,
body[data-page="payment"] .order-details-title { font-size: 38px; }
.section-title,
.payment-flow-card h2,
.payment-method-heading h2,
.crypto-reference-method-title h2,
.review-popup h2 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: .018em;
  text-transform: uppercase;
}
.section-title { font-size: 30px; }
.payment-flow-card h2 { font-size: 22px; }
.payment-method-heading h2,
.crypto-reference-method-title h2 { font-size: 26px; }
.chart-quote strong,
.price-box strong,
.total-row strong,
.order-total-row strong,
.crypto-reference-total strong,
.step::before {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: .012em;
}
.chart-quote strong { font-size: 38px; line-height: 1.1; }
.price-box strong { font-size: 24px; }
.total-row strong { font-size: 28px; }
.order-total-row strong,
.crypto-reference-total strong { font-size: 30px; }
.step::before { font-size: 17px; }

/* --- Sign-in is a quiet control; buying and selling stay the loud fills --- */
.steam-button,
body[data-page="payment"] .order-header-inner .steam-button {
  border: 1px solid var(--border-strong);
  background: var(--panel-2);
  color: var(--text);
}
.steam-button:hover,
body[data-page="payment"] .order-header-inner .steam-button:hover {
  border-color: var(--accent);
  background: var(--panel-3);
}
.steam-button .icon { color: var(--accent-text); }

/* --- Inline icons follow the text colour of their button ----------------- */
.icon { display: block; }
.header-logout-button .icon,
body[data-page="payment"] .order-logout-button .icon { width: 18px; height: 18px; transform: rotate(180deg); }
.header-logout-button,
body[data-page="payment"] .order-logout-button { color: var(--text); }

/* --- Header fit ----------------------------------------------------------
   Just above the phone layout the full header has to share the row with the
   navigation; on narrow phones the wordmark tightens, then gives way to the
   logo alone. */
@media (min-width: 761px) and (max-width: 960px) {
  .header-inner { gap: 20px; }
  .top-nav { gap: 0; }
  .top-nav a { padding-inline: 10px; }
  .steam-button { min-width: 0; }
  .header-account-pill { max-width: 150px; }
}
@media (max-width: 389px) {
  .header-inner { gap: 8px; }
  .site-header .brand { gap: 7px; font-size: 14px; letter-spacing: 0; }
}
@media (max-width: 359px) {
  .site-header .brand span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* --- Brand ----------------------------------------------------------------
   Wordmark in two tones: UNCRATE in the text colour, TRADE in brass.
   The mark is square. */
.brand,
.footer-brand .brand,
body[data-page="payment"] .order-header-inner .brand { color: var(--text); }
.brand b { color: var(--accent); font-weight: inherit; }
.brand-logo,
body[data-page="payment"] .order-header-inner .brand-logo { width: 30px; height: 30px; }
@media (max-width: 760px) {
  .brand-logo,
  body[data-page="payment"] .order-header-inner .brand-logo { width: 26px; height: 26px; }
}

/* --- Uploaded UncrateTrade brand assets ------------------------------- */
.brand--wordmark {
  gap: 0;
  line-height: 0;
}

.brand-wordmark {
  display: block;
  width: 184px;
  height: auto;
  flex: 0 0 auto;
}

.footer-brand-wordmark {
  display: block;
  width: 176px;
  height: auto;
}

@media (max-width: 760px) {
  .brand-wordmark {
    width: 142px;
  }

  .footer-brand-wordmark {
    width: 156px;
  }
}

@media (max-width: 390px) {
  .brand-wordmark {
    width: 130px;
  }
}

/* --- Final header account + currency polish (2026-10-06) ----------------- */
.header-account-pill,
body[data-page="payment"] .order-account-pill {
  background: var(--bg-deep);
}

.header-logout-button,
body[data-page="payment"] .order-logout-button {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-deep);
  color: #fff;
  opacity: 1;
  transition:
    color 220ms ease,
    border-color 220ms ease,
    background-color 220ms ease,
    transform 220ms var(--ease-out);
}

.header-logout-button:hover,
body[data-page="payment"] .order-logout-button:hover {
  color: var(--accent);
  border-color: var(--border-strong);
  background: var(--bg-deep);
  opacity: 1;
}

.header-logout-button .icon,
body[data-page="payment"] .order-logout-button .icon {
  color: currentColor;
  transition: color 220ms ease;
}

.currency-switch {
  --currency-index: 0;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

body[data-display-currency="USD"] .currency-switch {
  --currency-index: 1;
}

.currency-switch::before {
  transform: translateX(calc(var(--currency-index) * 36px));
  transition: transform 460ms var(--ease-out);
}

.currency-button {
  transition:
    color 280ms ease,
    background-color 280ms ease,
    transform 460ms var(--ease-out);
}

.currency-button.is-active {
  background: transparent;
  box-shadow: none;
}

/* --- Forms: our own required-field messages --------------------------------
   The browser bubble ("Please fill out this field") is replaced by a red
   outline on the field and a line of text under it. */
.floating-field.is-invalid,
.floating-field.is-invalid:focus-within {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgb(var(--red-rgb) / .16);
}
.floating-field.is-invalid > span { color: var(--red-text); }
.order-policy-checkbox.is-invalid input { outline: 2px solid var(--red); outline-offset: 2px; border-radius: 3px; }
.order-policy-checkbox.is-invalid { color: var(--text); }
.field-error,
.form-error {
  margin: 6px 2px 0;
  color: var(--red-text);
  font-size: 13px;
  line-height: 1.4;
}
.form-error { margin-top: 10px; text-align: center; }

.order-trade-help-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  color: var(--accent-text);
}

/* Returning customers: the e-mail from the last order, one tap to fill. */
.saved-email-chip {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px;
  max-width: 100%;
  margin-top: 8px;
  padding: 6px 12px;
  border: 1px solid rgb(var(--accent-rgb) / .38);
  border-radius: 999px;
  background: rgb(var(--accent-rgb) / .10);
  color: var(--text-2);
  font: 500 13px/1.3 var(--font-text);
  text-align: left;
  cursor: pointer;
  transition: background-color .15s, border-color .15s;
}
.saved-email-chip b { color: var(--accent-text); font-weight: 600; overflow-wrap: anywhere; }
.saved-email-chip:hover { background: rgb(var(--accent-rgb) / .18); border-color: rgb(var(--accent-rgb) / .6); }

.order-field-hint { margin: 6px 2px 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.order-field-hint a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; }

/* --- Stable layout: errors and hints never add lines ----------------------- */
.floating-field.is-invalid > span {
  max-width: calc(100% - 28px);
  overflow: hidden;
  color: var(--red-text) !important;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.order-policy-checkbox.is-invalid > span { color: var(--red-text); }
.order-policy-checkbox.is-invalid > span a { color: var(--red-text); }

.floating-field.has-saved-tag > input { padding-right: 150px; }
.saved-email-tag {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  padding: 3px 9px;
  border-radius: 999px;
  background: rgb(var(--accent-rgb) / .14);
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 600;
  pointer-events: none;
  white-space: nowrap;
}

.toast--error { border-color: rgb(var(--red-rgb) / .55); }

@media (max-width: 760px) {
  /* The site price line always takes two lines, in roubles and in dollars alike. */
  .chart-legend li .legend-note { flex-basis: 100%; padding-left: 22px; }
}

/* --------------------------------------------------------------------------
   Buy / sell: crypto only for now (no other method tiles), and on computers the
   whole form fits the screen without scrolling.
   -------------------------------------------------------------------------- */
.payment-picker-label { margin: 0; color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .01em; }
.order-field-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; width: 100%; }
.order-field-pair .order-promo-field { margin-top: 0; }
@media (max-width: 560px) {
  .order-field-pair { grid-template-columns: minmax(0, 1fr); gap: 10px; }
}

@media (min-width: 1024px) {
  /* Header, form and footer share one screen; the footer sits at the bottom. */
  body[data-page="payment"] { display: flex; flex-direction: column; min-height: 100vh; }
  body[data-page="payment"] .order-details-main { flex: 1 0 auto; padding-bottom: 20px; }
  /* Tall screens get more air above the form, short ones keep it tight. */
  body[data-page="payment"] .order-details-shell { padding-top: clamp(18px, 6vh - 20px, 64px); }
  body[data-page="payment"] .order-details-heading { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
  body[data-page="payment"] .order-details-title { font-size: 30px; line-height: 1.1; }
  body[data-page="payment"] .order-details-subtitle { margin: 0; font-size: 15px; }
  body[data-page="payment"] .checkout-grid--reference { margin-top: 14px; gap: 20px; }
  body[data-page="payment"] .checkout-reference-card,
  body[data-page="payment"] .checkout-reference-card--product,
  body[data-page="payment"] .checkout-reference-card--payment { padding: 18px 20px; }
  body[data-page="payment"] .checkout-reference-card--payment { gap: 14px; }
  body[data-page="payment"] .order-product-row { min-height: 52px; gap: 14px; }
  body[data-page="payment"] .order-product-image { width: 52px; height: 52px; flex-basis: 52px; }
  body[data-page="payment"] .order-product-image img { width: 46px; height: 36px; margin: 8px auto; }
  body[data-page="payment"] .checkout-reference-card--product > .order-divider { margin-top: 14px; }
  body[data-page="payment"] .order-trade-block { margin-top: 12px; }
  body[data-page="payment"] .order-trade-block .order-floating-field { margin-top: 6px; }
  body[data-page="payment"] .order-stock-line { margin: 12px 0 6px; font-size: 13px; }
  body[data-page="payment"] .order-field-hint { margin-top: 6px; }
  body[data-page="payment"] .order-email-block { margin-top: 12px; }
  body[data-page="payment"] .order-total-row { padding-top: 12px; }
  body[data-page="payment"] .order-total-row strong { font-size: 22px; }
  body[data-page="payment"] .order-site-footer .order-footer-inner,
  body[data-page="payment"] .order-footer-inner { padding-top: 14px; padding-bottom: 14px; }
}
/* Short laptop screens (768 px and less, minus the browser's own bars). */
@media (min-width: 1024px) and (max-height: 700px) {
  body[data-page="payment"] .order-details-shell { padding-top: 12px; }
  body[data-page="payment"] .order-details-title { font-size: 26px; }
  body[data-page="payment"] .checkout-grid--reference { margin-top: 10px; }
  body[data-page="payment"] .checkout-reference-card,
  body[data-page="payment"] .checkout-reference-card--product,
  body[data-page="payment"] .checkout-reference-card--payment { padding-top: 14px; padding-bottom: 14px; }
  body[data-page="payment"] .order-field-hint { display: none; }
  body[data-page="payment"] .order-policy-checkbox { line-height: 1.4; }
}

/* Payment method tiles: one for now (crypto); more join the row later and
   share its width. Icon, name and what it covers, a check when selected. */
.method-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.method-tile {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 10px 44px 10px 12px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--panel-2); color: var(--text);
  font: inherit; text-align: left; cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}
.method-tile:hover { border-color: var(--border-strong); }
.method-tile.is-selected {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgb(var(--accent-rgb) / 0.16), rgb(var(--accent-rgb) / 0.05));
  box-shadow: inset 0 0 0 1px rgb(var(--accent-rgb) / 0.55);
}
.method-tile-icon { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 9px; background: var(--panel); }
.method-tile.is-selected .method-tile-icon { background: rgb(0 0 0 / 0.25); }
.method-tile-icon img { width: 28px; height: 28px; }
.method-tile-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.method-tile-text b { font-size: 15px; font-weight: 700; line-height: 1.2; }
.method-tile-text small { overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.25; white-space: nowrap; text-overflow: ellipsis; }
.method-tile.is-selected .method-tile-text small { color: var(--accent-text); }
.method-tile-check {
  position: absolute; right: 14px; top: 50%; width: 20px; height: 20px; margin-top: -10px;
  border: 1.5px solid var(--border-strong); border-radius: 50%;
}
.method-tile.is-selected.is-complete .method-tile-check { border-color: var(--accent-fill); background: var(--accent-fill); }
.method-tile-check { transition: background-color 200ms ease, border-color 200ms ease; }
.method-tile.is-selected.is-complete .method-tile-check::after {
  content: ""; position: absolute; left: 6px; top: 2.5px; width: 4px; height: 9px;
  border-right: 2px solid var(--on-accent); border-bottom: 2px solid var(--on-accent); transform: rotate(45deg);
}

/* Live stock under the trade link; red when the quantity is more than there is. */
body[data-page="payment"] .order-stock-line.is-short { color: var(--red-text); }
/* Promo code is hidden until discounts are on: the quantity takes the row. */
.order-field-pair:has(> .order-promo-field[hidden]) { grid-template-columns: minmax(0, 1fr); }
.crypto-option-fee[title] { cursor: help; }

/* Payment countdown on the checkout page. */
.co-deadline { font-variant-numeric: tabular-nums; white-space: nowrap; }
.co-deadline.is-first { display: inline-block; }
.co-deadline.is-first::first-letter { text-transform: uppercase; }
.co-deadline.is-ending { color: var(--red-text); }

/* Short laptop screens: rows get denser and the payment card tightens, so the page and its footer fit. */
@media (min-width: 1024px) and (max-height: 760px) {
  .coin-net { --tab-h: 46px; }
  .crypto-panel-inner { padding: 8px; }
  .coin-search { height: 32px; margin-bottom: 6px; }
  .coin-net { --list-h: 150px; }
  .coin-list, .crypto-list { gap: 2px; }
  .coin-option, .net-option, .crypto-option { grid-template-columns: 24px minmax(0, 1fr); column-gap: 8px; min-height: 42px; padding-top: 3px; padding-bottom: 3px; }
  .coin-option img, .net-option img, .crypto-option img { width: 24px; height: 24px; }
  body[data-page="payment"] .checkout-reference-card--payment { gap: 10px; padding-top: 14px; padding-bottom: 14px; }
  body[data-page="payment"] .method-tile { min-height: 46px; padding-top: 6px; padding-bottom: 6px; }
  body[data-page="payment"] .method-tile-icon { flex-basis: 32px; width: 32px; height: 32px; }
  body[data-page="payment"] .order-total-row { padding-top: 8px; }
  body[data-page="payment"] .order-buy-button { height: 46px; }
  body[data-page="payment"] .order-details-main { padding-bottom: 12px; }
}
@media (min-width: 1024px) and (max-height: 700px) {
  body[data-page="payment"] .order-security-note { display: none; }
  .crypto-panel-inner { padding: 6px; }
  .coin-search { height: 30px; margin-bottom: 4px; }
  .coin-net { --list-h: 128px; }
  .coin-option, .net-option, .crypto-option { min-height: 40px; padding-top: 1px; padding-bottom: 1px; line-height: 1.12; }
}
