:root {
  color-scheme: light;
  --canvas: #edf2fb;
  --surface: #fff;
  --text: #132342;
  --muted: #4a5b74;
  --edge: #cdd8e9;
  --accent: #204dac;
  --soft: #edf2ff;
  --web: #15664f;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #101a2d;
  --surface: #172640;
  --text: #edf3ff;
  --muted: #bbcae0;
  --edge: #405573;
  --accent: #a9c5ff;
  --soft: #243856;
  --web: #9fdbc7;
}
*, *::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: linear-gradient(160deg, var(--canvas), var(--soft));
  color: var(--text);
  font: 16px/1.5 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, footer { 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; gap: 10px; font-size: 19px; font-weight: 750; color: var(--text); text-decoration: none }
.brand img { border-radius: 50% }
.theme, .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;
}
.theme:hover, .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 { font-size: 18px; font-weight: 650; color: var(--muted) }
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 }
.content { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: start; gap: 16px }
.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 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; max-height: 426px; overflow-y: auto; overscroll-behavior: contain }
.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?v=203') 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(--surface) }
.more:hover { filter: brightness(.92) }
.payment-details { margin-top: 16px; padding: 0 clamp(16px, 3vw, 28px) }
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 }
footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-block: 16px }
footer a { display: flex; align-items: center; min-height: 44px }
@media (max-width: 650px) {
  .content { grid-template-columns: minmax(0,1fr); gap: 12px }
  .top { padding-block: 12px }
  .brand { gap: 8px; font-size: 16px; white-space: nowrap }
  .brand img { width: 30px; height: 30px }
  .qr { width: min(184px, 57vw) }
  .theme { padding-inline: 8px; font-size: 13px; white-space: nowrap }
}
