@font-face {
  font-family: Rubik;
  src: url("/assets/rubik-regular.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Rubik;
  src: url("/assets/rubik-bold.woff") format("woff");
  font-weight: 700;
  font-display: swap;
}
:root {
  font-family: Rubik, Arial, sans-serif;
  color: #22211d;
  background: #f8f6ef;
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, a { font: inherit; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #98600a; outline-offset: 4px; }
[hidden], dialog:not([open]), .mobile { display: none !important; }
.desktop {
  width: min(1120px, calc(100% - 88px));
  margin: 0 auto;
  padding-block: clamp(24px, 5.8vh, 68px) 48px;
}
.payment-panel {
  display: grid;
  grid-template-columns: 1.15fr minmax(305px, .85fr);
  align-items: stretch;
  overflow: hidden;
  border: 1px solid #dedbcf;
  border-radius: 32px;
  background: white;
}
.instructions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(32px, 5.1vw, 78px);
}
h1, h2, p { margin: 0; }
.instructions h1 {
  font-size: clamp(47px, 5.45vw, 84px);
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: 1.03;
}
.no-wrap { white-space: nowrap; }
.instructions p {
  margin-top: 28px;
  color: #525048;
  font-size: clamp(17px, 1.55vw, 22px);
  line-height: 1.52;
  max-width: 36ch;
}
.code-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 21px;
  padding: clamp(38px, 5.7vw, 82px) 16px;
  background: #ffb523;
  background-image: linear-gradient(130deg, #ffc74e 0%, #ffb523 72%);
}
.qr-frame {
  width: min(84%, 298px);
  padding: 8px;
  aspect-ratio: 1;
  border-radius: 19px;
  background: white;
  box-shadow: 0 4px 14px #85540020;
}
.qr-code { display: block; width: 100%; height: auto; }
.qr-domain { font-size: 16px; letter-spacing: .008em; }

:root[data-device="mobile"] { color-scheme: light; }
[data-device="mobile"] .desktop { display: none; }
[data-device="mobile"] .mobile { display: block !important; }
.mobile {
  width: min(100%, 570px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(19px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(32px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  color: #22211d;
}
.mobile-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 13px;
  border-bottom: 1px solid #dedbcf;
}
.mobile-etalon { object-fit: contain; }
.payment-method { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.mobile-heading h1 {
  width: min(100%, 15.5ch);
  margin-top: 23px;
  font-size: clamp(32px, 8vw, 47px);
  line-height: 1.09;
  font-weight: 700;
  letter-spacing: -.045em;
}
.bank-search {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 50px;
  padding: 0 15px;
  margin-block: 22px 16px;
  color: #787467;
  border: 1px solid #d8d3c4;
  border-radius: 13px;
  background: #f0ede3;
}
.bank-search:focus-within { outline: 2px solid #9f670f; outline-offset: 2px; }
.bank-search input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  background: transparent;
  border: 0;
  color: #22211d;
  outline: 0;
  font-size: 16px;
}
.bank-search input::placeholder { color: #686659; opacity: 1; }
.bank-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.bank {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
  min-height: 60px;
  padding: 9px 13px;
  gap: 8px;
  border: 1px solid #e2dfd4;
  border-radius: 14px;
  background: #fff;
  color: #22211d;
  text-decoration: none;
  transition: background-color .15s, border-color .15s;
}
.bank:active { background: #fff1d3; border-color: #d09b42; }
.bank-name {
  text-align: center;
  font-size: 16px;
  line-height: 1.26;
  overflow-wrap: anywhere;
}
.bank-mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  overflow: hidden;
  border-radius: 10px;
  color: #665d49; background: #f0eee7;
  font-size: 18px;
  font-weight: 700;
  grid-template: 1fr / 1fr;
}
.bank-mark > * { grid-area: 1 / 1; }
.bank-mark img { width: 100%; height: 100%; object-fit: contain; background: white; }
#status:not(:empty), noscript p {
  margin: 12px 2px;
  color: #625f55;
  font-size: 15px;
  line-height: 1.45;
}
.retry, .close, .choose-other, .web-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border: none;
  text-decoration: none;
  font-size: 16px;
}
.retry { min-height: 44px; border-radius: 10px; padding: 8px 18px; background: #ffb323; color: #22211d; }
#options {
  position: fixed;
  inset: auto 0 0;
  margin: 0 auto;
  width: min(100%, 570px);
  max-width: 100%;
  max-height: 92vh;
  border: 0;
  border-radius: 25px 25px 0 0;
  padding: 0;
  color: #22211d;
  background: #fff;
  box-shadow: 0 -12px 50px #332c1c2a;
  color-scheme: light;
}
#options::backdrop { background: #29231788; }
.sheet {
  position: relative;
  padding: 26px max(22px, env(safe-area-inset-right)) max(22px, env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left));
}
.close {
  position: absolute;
  top: 10px; right: 10px;
  width: 44px; height: 44px;
  border-radius: 50%;
  color: #4f4b40; background: #f2f0e9;
}
.selected-name { margin-right: 45px; font-size: 14px; color: #6c6556; }
.sheet h2 { margin: 14px 32px 10px 0; font-size: 25px; letter-spacing: -.03em; line-height: 1.18; }
.options-body { margin-bottom: 20px; font-size: 16px; line-height: 1.45; color: #5b574d; }
.web-button, .choose-other {
  width: 100%; min-height: 48px;
  padding: 10px; border-radius: 12px;
}
.web-button { margin-bottom: 8px; color: #22211d; background: #ffb323; font-weight: 700; }
.choose-other { background: #f2f0e9; color: #302d26; }
@media (prefers-reduced-motion: no-preference) {
  .bank-list.ready { animation: appear .2s ease-out; }
  @keyframes appear { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
}
@media (max-width: 740px) {
  .desktop { width: min(100% - 32px, 510px); padding-block: 18px; }
  .payment-panel { grid-template-columns: 1fr; border-radius: 22px; }
  .instructions { padding: 26px; }
  .instructions p { margin-top: 14px; }
  .code-panel { padding-block: 28px; }
}
