@font-face { font-family: Tilda Sans; src: url(/pay/tilda-sans.woff2) format("woff2"); font-weight: 100 900; font-display: swap }
:root {
  color-scheme: light;
  --canvas: #f5faf8;
  --surface: #fff;
  --on-accent: #fff;
  --text: #142e2b;
  --muted: #435e59;
  --edge: #cddfd9;
  --accent: #146b55;
  --soft: #e6f3ed;
  --web: #286859;
  --brand-glow: #d5efdf;
  --brand-brightness: .75;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #101b1c;
  --surface: #192b2a;
  --on-accent: #10251e;
  --text: #effaf5;
  --muted: #adc8bf;
  --edge: #395751;
  --accent: #80dfb5;
  --soft: #203a34;
  --web: #a4ddc9;
  --brand-glow: #21443e;
  --brand-brightness: 1.35;
}
*, *::before, *::after { box-sizing: border-box }
[hidden] { display: none !important }
body {
  min-height: 100dvh;
  margin: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background:
    radial-gradient(ellipse at 18% 0%, var(--brand-glow), transparent 58%),
    linear-gradient(160deg, var(--canvas), var(--soft));
  color: var(--text);
  font: 16px/1.5 Tilda Sans, system-ui, sans-serif;
}
button, input { font: inherit }
a { color: var(--accent); text-underline-offset: .18em }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px }
.top, main { width: min(940px, calc(100% - 32px)); margin-inline: auto }
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block: 20px }
.brand {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  width: min(244px, 100%);
  padding: 8px 12px;
  border: 1px solid var(--edge);
  border-radius: 12px;
  background: var(--surface);
}
.brand img { display: block; width: 100%; height: auto; filter: brightness(var(--brand-brightness)) }
.brand:hover { border-color: var(--accent) }
.top-controls { display: flex; align-items: center; gap: 12px }
.switch {
  display: inline-flex;
  gap: 2px;
  padding-inline: 3px;
  border-radius: 11px;
  box-shadow: inset 0 0 0 1px var(--edge);
  background: var(--canvas);
  background: color-mix(in srgb, var(--canvas) 75%, var(--edge));
}
.switch button {
  display: inline-grid;
  position: relative;
  isolation: isolate;
  min-width: 44px;
  min-height: 44px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.switch button::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 4px 0;
  border-radius: inherit;
}
.switch button:hover { color: var(--text) }
.switch button:hover::before { background: var(--soft) }
.switch button[aria-pressed="true"] { color: var(--on-accent) }
.switch button[aria-pressed="true"]::before { background: var(--accent) }
.secondary, .more {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid var(--edge);
  border-radius: 10px;
  background: var(--surface);
  color: var(--accent);
  font-weight: 650;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.secondary:hover { background: var(--soft) }
main { align-self: start }
.summary { padding: clamp(16px, 5vw, 46px) 0 24px; text-align: center }
h1, h2, p { margin: 0 }
h1 { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 18px; font-weight: 650; color: var(--muted) }
h1 img { flex: none }
h2 { font-size: 19px; line-height: 1.3 }
.amount { margin-block: 4px 10px; font-size: clamp(42px, 9vw, 68px); font-weight: 750; line-height: 1.08; letter-spacing: -.03em }
.caption, .notice { color: var(--muted); text-align: center }
.caption strong { color: var(--text); font-variant-numeric: tabular-nums }
.reload { display: flex; margin: 16px auto }
.panel, .payment-details {
  border: 1px solid var(--edge);
  border-radius: 18px;
  background: var(--surface);
}
.panel { padding: clamp(16px, 3vw, 28px) }
.qr-panel { text-align: center }
.qr { width: min(210px, 60vw); margin: 14px auto; border: 1px solid #d5deeb; border-radius: 12px; overflow: hidden; background: #fff; line-height: 0 }
.qr svg { display: block; width: 100%; height: auto }
.qr-panel p { margin-inline: auto; max-width: 33ch; color: var(--muted); font-size: 14px }
summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; font-weight: 650 }
summary::after { content: '⌄'; margin-left: auto }
details[open] > summary::after { rotate: 180deg }
.bank-panel { margin-top: 12px }
.bank-panel label { display: block; margin: 16px 0 8px; font-weight: 650 }
input { width: 100%; min-height: 44px; border: 1px solid var(--edge); border-radius: 10px; padding: 8px 12px; background: var(--canvas); color: var(--text) }
input::placeholder { color: var(--muted) }
.bank-list { display: grid; gap: 8px; list-style: none; margin: 12px -4px 0; padding: 4px }
.bank-list a { touch-action: pan-y pinch-zoom }
.bank-list:empty { display: none }
.bank-list a {
  display: grid;
  grid-template-columns: 40px minmax(0,1fr) 12px;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 8px 12px;
  border: 1px solid var(--edge);
  border-radius: 12px;
  background: var(--canvas);
  color: var(--text);
  text-decoration: none;
}
.bank-list a:hover { background: var(--soft) }
.bank-list a:focus-visible { outline-offset: 0 }
.bank-list a::after { content: ''; width: 8px; height: 8px; border-top: 2px solid var(--muted); border-right: 2px solid var(--muted); rotate: 45deg }
.bank-list strong { display: block; font-size: 15px; line-height: 1.3; overflow-wrap: anywhere }
.bank-list small { display: block; margin-top: 3px; color: var(--web); font-size: 13px; line-height: 1.3 }
.bank-logo { width: 40px; height: 40px; border-radius: 9px; background: #fff url('/pay/bank-logos.webp') no-repeat; background-size: 560px 560px }
[data-bank-status] { margin-top: 12px; color: var(--muted) }
.bank-panel > .secondary, .bank-panel > .more { width: 100%; margin-top: 10px }
.more { border-color: var(--accent); background: var(--accent); color: var(--on-accent) }
.more:hover { filter: brightness(.92) }
.payment-details { margin-top: 16px; padding: 0 clamp(16px, 3vw, 28px) }
.steam-promo { display: none }
dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 18px; margin: 4px 0 16px }
dt { color: var(--muted) }
dd { margin: 0; overflow-wrap: anywhere }
@media (max-width: 650px) {
  .top { flex-direction: column; gap: 8px; padding-block: 12px }
  .top-controls { width: 100%; justify-content: space-between }
  .brand { width: min(218px, 100%) }
  .qr { width: min(184px, 57vw) }
}
@media (min-width: 761px) {
  :root:not([data-touch-payment]) main:has(.payment-details:not([hidden])) {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    grid-template-areas: "details payment" "ad payment";
    grid-template-rows: auto 1fr;
    gap: 16px 24px;
    max-width: 860px;
    align-self: center;
    padding-block: 24px;
  }
  :root:not([data-touch-payment]) .payment-main:has(~ .payment-details:not([hidden])) {
    grid-area: payment;
    display: grid;
    text-align: center;
    padding: 28px;
    border: 1px solid var(--edge);
    border-radius: 18px;
    background: var(--surface);
  }
  :root:not([data-touch-payment]) .payment-main:has(~ .payment-details:not([hidden])) .summary { display: contents }
  :root:not([data-touch-payment]) .payment-main h1 { margin-bottom: 8px }
  :root:not([data-touch-payment]) .qr-panel { order: 1; margin-top: 20px; padding: 0; border: 0; background: transparent }
  :root:not([data-touch-payment]) .qr { width: 224px; max-width: 100% }
  :root:not([data-touch-payment]) .payment-main .amount { order: 2; margin: 16px 0 0; font-size: 56px }
  :root:not([data-touch-payment]) .payment-main .notice { order: 3; margin-top: 14px }
  :root:not([data-touch-payment]) .payment-main .reload { order: 4 }
  :root:not([data-touch-payment]) .payment-details { grid-area: details; margin: 0 }
  :root:not([data-touch-payment]) .payment-details > summary { min-height: 56px }
  :root:not([data-touch-payment]) .payment-details:not([hidden]) + .steam-promo {
    display: grid;
    grid-area: ad;
    align-self: stretch;
    justify-items: start;
    align-content: space-between;
    gap: 7px;
    min-height: 220px;
    padding: 16px 18px;
    border-radius: 18px;
    background-color: #070e28;
    background-image: linear-gradient(0deg,#050d25 5%,#050d25cf 22%,transparent 62%), url('/pay/steam-promo.webp');
    background-position: center, right 30%;
    background-repeat: no-repeat;
    background-size: cover, auto 74%;
    color: #fff;
  }
  .steam-promo p { color: #c8dafb; font-size: 13px; font-weight: 650; margin-bottom: 8px }
  .steam-promo h2 { max-width: 13ch; line-height: 1.18 }
  .steam-promo a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 6px 12px;
    border-radius: 9px;
    background: #d7e8ff;
    color: #0c264f;
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
  }
  .steam-promo a:hover { background: #fff }
  .steam-promo a:focus-visible { outline-color: #fff }
}
