:root {
  color-scheme: dark;
  font: 16px/1.5 Inter, system-ui, -apple-system, sans-serif;
  color: #f2f3f5;
  background: #151618;
  --muted: #b6b8bf;
  --edge: #ffffff19;
  --link: #92cafa;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  margin: 0;
  background: radial-gradient(ellipse at 50% -16%, #4d4f58 0, transparent 55%),
    radial-gradient(ellipse at 100% 54%, #292b32 0, transparent 50%);
}
a { color: var(--link); text-underline-offset: .18em; }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid #a9caff; outline-offset: 3px; }
.top, footer {
  width: min(100% - 40px, 1040px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.top { min-height: 76px; border-bottom: 1px solid var(--edge); }
.top a, footer { font-size: .82rem; }
.top .brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-size: 1rem; font-weight: 750; letter-spacing: -.02em; }
.brand img { display: block; }
main { flex: 1; width: min(100% - 32px, 484px); margin: 42px auto; }
.card {
  background: linear-gradient(145deg, #ffffff12, #ffffff04 63%), #26272ba8;
  backdrop-filter: blur(18px);
  border: 1px solid var(--edge);
  border-radius: 26px;
  padding: clamp(20px, 6vw, 34px);
  box-shadow: 0 26px 75px #0005, inset 0 1px #ffffff0d;
  animation: card-enter .38s cubic-bezier(.2, .85, .35, 1) both;
}
.payment-mark, .state-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: #ffffff12;
  color: var(--link);
  font-size: 1.45rem;
  font-weight: 750;
  margin-bottom: 18px;
}
.payment-mark { width: 62px; height: 62px; border-radius: 19px; background: linear-gradient(145deg, #ff3151, #e30631); box-shadow: inset 0 1px #ffffff40, 0 8px 24px #ff164522; }
.payment-mark img { display: block; }
.state-mark[data-state="creating"], .state-mark[data-state="review"] { animation: waiting 1.5s ease-in-out infinite; }
.state-mark[data-state="paid"] { background: #24554b77; color: #9ff0cb; animation: check-enter .36s cubic-bezier(.22, .8, .48, 1.35) both; }
.state-mark[data-state="closed"], .state-mark[data-state="unknown"] { background: #473626; color: #ffd6a2; }
h1 { font-size: clamp(1.65rem, 7vw, 2.15rem); line-height: 1.13; margin: 0 0 10px; letter-spacing: -.045em; }
.lead { color: var(--muted); margin: 0; }
form, .details { margin-top: 24px; }
.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 650; margin: 0 0 8px; }
.field input { display: block; width: 100%; min-height: 49px; border-radius: 13px; border: 1px solid var(--edge); background: #10111353; padding: 10px 13px; color: inherit; transition: border-color .16s, background .16s; }
.field input:focus { border-color: #88c7ff85; background: #10111387; }
.field input::placeholder { color: #a7aab3; }
.hint { color: var(--muted); font-size: .82rem; margin: 8px 0 0; }
.account-input { position: relative; }
.account-input input { padding-right: 49px; }
.account-clear {
  position: absolute;
  inset: 2px 2px 2px auto;
  display: grid;
  place-items: center;
  width: 44px;
  padding: 0;
  background: transparent;
  color: var(--muted);
  border: 0;
  border-radius: 11px;
  animation: clear-enter .18s ease-out both;
  transition: color .18s, background .18s, transform .18s;
}
.account-clear:hover { color: #fff; background: #ffffff0d; }
.account-clear:active { transform: scale(.9); }
.account-reveal {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transform: translateY(-4px);
  transition: grid-template-rows .3s cubic-bezier(.2,.8,.3,1), opacity .19s, transform .27s;
}
.account-reveal[data-open="true"] { grid-template-rows: 1fr; opacity: 1; transform: translateY(0); }
.account-reveal-body { min-height: 0; overflow: hidden; }
.profile-chip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  margin-top: 8px;
  padding: 10px;
  background: linear-gradient(120deg, #91c7ff15, #ffffff06 70%);
  border: 1px solid #a3caff29;
  border-radius: 14px;
}
.profile-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  overflow: hidden;
  color: #e4f4ff;
  background: linear-gradient(145deg, #476b93, #294868);
  font-weight: 700;
  box-shadow: 0 0 0 1px #b2d7ff39;
}
.profile-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: avatar-enter .25s ease-out both; }
.profile-info { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; line-height: 1.4; }
.profile-info strong, .profile-username { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.profile-info strong { font-size: .92rem; }
.profile-username { color: var(--link); font-size: .78rem; }
.profile-id { color: var(--muted); font-size: .73rem; font-variant-numeric: tabular-nums; }
.profile-tick { color: #93d9bc; }
.amount { position: relative; }
.amount input { padding-right: 35px; }
.amount span { position: absolute; right: 14px; top: 12px; color: var(--muted); }
.presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.presets button { min-height: 44px; padding: 6px 2px; color: var(--muted); background: #ffffff0a; border: 1px solid var(--edge); border-radius: 11px; font-size: .83rem; white-space: nowrap; transition: background .18s, border-color .18s, color .18s, transform .18s; }
.presets button[aria-pressed="true"] { background: #77baff24; border-color: #77baff73; color: #dceeff; }
.agreement { display: flex; align-items: center; gap: 8px; min-height: 44px; margin: 0 0 8px; color: var(--muted); font-size: .88rem; }
.agreement input { width: 18px; height: 18px; flex: none; accent-color: #84b2ff; }
.primary, .secondary { display: flex; min-height: 48px; align-items: center; justify-content: center; width: 100%; border-radius: 12px; font-weight: 700; text-align: center; text-decoration: none; padding: 10px; }
.primary { background: #82c6fb; color: #102131; border: 1px solid #a3d7ff; transition: background .17s, transform .17s; }
.primary:hover { background: #a7d8ff; }
.primary:active, .presets button:active { transform: scale(.98); }
.primary:disabled { opacity: .68; cursor: wait; }
.secondary { color: var(--link); border: 1px solid var(--edge); background: transparent; margin-top: 10px; }
.secondary:hover { background: #ffffff0d; }
.error { color: #ffb6bd; font-size: .9rem; margin: 0 0 11px; }
.details { background: #10111353; border: 1px solid var(--edge); border-radius: 14px; padding: 6px 12px; }
.details div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; justify-content: space-between; padding: 8px 0; }
.details div + div { border-top: 1px solid var(--edge); }
.details dt { color: var(--muted); font-size: .85rem; }
.details dd { margin: 0; overflow-wrap: anywhere; min-width: 0; }
.details code { color: #cfddf4; font-size: .78rem; }
footer { border-top: 1px solid var(--edge); min-height: 66px; color: var(--muted); padding-block: 12px; flex-wrap: wrap; }
@keyframes card-enter { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
@keyframes check-enter { from { opacity: .5; transform: scale(.78); } to { opacity: 1; transform: scale(1); } }
@keyframes waiting { 50% { opacity: .56; } }
@keyframes clear-enter { from { opacity: 0; scale: .85; } to { opacity: 1; scale: 1; } }
@keyframes avatar-enter { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 480px) {
  main { margin-block: 24px 30px; }
  .top { min-height: 63px; }
  footer { gap: 6px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .card, .state-mark[data-state], .account-clear, .profile-avatar img { animation: none; }
  .primary, .presets button, .field input, .account-clear, .account-reveal { transition: none; }
}
