:root {
  color-scheme: dark;
  color: #fff;
  background: #000;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --surface: linear-gradient(160deg, #1b1b1b, #151515);
  --surface-border: rgba(255,255,255,.13);
  --accent: linear-gradient(168deg, #4899f5, #327eeb);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; }
main { width: min(100%, 520px); margin: 0 auto; padding: 18px 20px max(24px, env(safe-area-inset-bottom)); }
header, .dialog-head { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 8px; min-height: 44px; }
h1, h2 { grid-column: 2; margin: 0; font-size: 19px; line-height: 1.24; font-weight: 700; text-align: center; }
.close {
  grid-column: 3; display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--surface-border); background: var(--surface);
  color: #e7e7e7; text-decoration: none; font-size: 29px; line-height: 1;
  cursor: pointer; font-family: inherit;
}
.close span { display: block; margin-top: -3px; }
.intro { margin: 22px 4px 22px; }
.intro p { margin: 0; font-size: 16px; line-height: 1.47; overflow-wrap: anywhere; }
.intro .question { margin-bottom: 10px; font-size: 18px; font-weight: 650; }
.intro .muted { margin-top: 8px; font-size: 14px; }
.muted, .balance { color: #b6b6bd; }
.packs { display: grid; gap: 8px; }
.pack {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px;
  align-items: center; width: 100%; min-height: 54px; padding: 8px 12px 8px 20px;
  font: inherit; color: inherit; text-align: left; cursor: pointer;
  border: 1px solid var(--surface-border); border-radius: 999px; background: var(--surface);
}
.pack-units { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; font-size: 14px; }
.pack-units strong { font-size: 20px; font-weight: 650; letter-spacing: -.4px; }
.discount {
  align-self: center; margin-left: 2px; padding: 2px 7px; border-radius: 999px;
  font-size: 13px; font-weight: 600; line-height: 17px; color: #7ee596;
  background: #163021; border: 1px solid #22472b; white-space: nowrap;
}
.price, .pay {
  display: grid; place-items: center; min-width: 84px; min-height: 34px;
  padding: 6px 12px; color: #fff; white-space: nowrap;
  font-size: 16px; font-weight: 650; line-height: 20px;
  background: var(--accent); border: 1px solid #75b8ff; border-radius: 999px;
  box-shadow: inset 0 1px 1px #fff3;
}
button, .close { -webkit-tap-highlight-color: transparent; touch-action: pan-y pinch-zoom; }
button:hover, .close:hover { border-color: #ffffff3d; }
:focus-visible { outline: 2px solid #89c4ff; outline-offset: 3px; }
[data-elastic-pressed] { border-color: #ffffff38; }
.status, .balance { margin: 17px 4px 0; font-size: 14px; line-height: 1.42; }
.status:empty { display: none; }
.return-link { display: inline-block; margin: 20px 4px 0; color: #7cbdff; font-size: 14px; text-underline-offset: 3px; }
dialog {
  width: min(calc(100% - 24px), 480px); max-height: calc(100dvh - 24px);
  margin: auto auto max(12px,env(safe-area-inset-bottom)); padding: 0;
  border: 1px solid var(--surface-border); border-radius: 25px; background: #1b1b1b;
  color: #fff; overflow: auto;
}
dialog::backdrop { background: #000a; }
.dialog-body { padding: 14px 16px 18px; }
.summary {
  display: flex; align-items: center; justify-content: space-between;
  margin: 16px 0; min-height: 58px; padding: 10px 14px;
  border: 1px solid var(--surface-border); border-radius: 18px; background: #232323;
  font-weight: 650;
}
.summary strong { font-size: 20px; }
label { display: block; margin: 0 0 7px; font-size: 14px; }
input {
  width: 100%; min-height: 46px; padding: 10px 12px; font: inherit; color: inherit;
  background: #101010; border: 1px solid var(--surface-border); border-radius: 11px;
}
.note, .error { margin: 12px 0; font-size: 14px; line-height: 1.5; }
.error { color: #ffc0ba; }
.pay { width: 100%; min-height: 46px; margin-top: 16px; font-family: inherit; cursor: pointer; }
button:disabled { opacity: .63; cursor: default; }
[hidden] { display: none; }
@media (max-width: 355px) {
  main { padding-inline: 16px; }
  .pack { padding-left: 14px; gap: 8px; }
  .price { min-width: 72px; }
}
