:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --night: #081324;
  --white: #f2f7ff;
  --muted: #abc1da;
  --cyan: #6ce3f3;
  --line: #365777;
  --safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--tg-content-safe-area-inset-bottom, 0px));
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  min-height: 100vh;
  margin: 0;
  background: radial-gradient(ellipse 620px 700px at 50% 42%, #102c4a 0, #091828 57%, var(--night) 100%);
  color: var(--white);
  -webkit-tap-highlight-color: transparent;
}
button, a { touch-action: manipulation; }
button { color: inherit; font: inherit; cursor: pointer; }
button:disabled { opacity: .62; cursor: wait; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }
h1:focus, h2:focus { outline: none; }
h1, h2, p { margin: 0; }
.icon { display: inline-block; flex: none; vertical-align: middle; }
.shell { width: min(100% - 40px, 510px); margin-inline: auto; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar {
  display: flex;
  min-height: calc(67px + var(--tg-content-safe-area-inset-top, 0px));
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: var(--tg-content-safe-area-inset-top, 0px);
  border-bottom: 1px solid #294463;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 18px;
  font-weight: 730;
  white-space: nowrap;
}
.brand > span:last-child { margin-left: -3px; color: #a7c7e7; font-weight: 500; }
.brand-icon {
  display: inline-grid;
  width: 31px;
  height: 31px;
  margin-right: 3px;
  place-items: center;
  border: 1px solid #4279a7;
  border-radius: 10px;
  background: linear-gradient(145deg, #214d75, #112a48 72%);
}
.brand-icon::after {
  width: 19px;
  height: 11px;
  border: 1.5px solid #8cf3fa;
  border-bottom-color: #4898df;
  border-radius: 50%;
  transform: rotate(-36deg);
  content: "";
}
main { padding-block: clamp(23px, 4.5vw, 44px) calc(24px + var(--safe-bottom)); }

.intro { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.intro h1 { font-size: clamp(42px, 7.4vw, 64px); font-weight: 750; line-height: .98; letter-spacing: -.056em; }
.intro h1 span { color: var(--cyan); }
.intro p { margin-top: 10px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.intro-icon {
  display: grid;
  flex: none;
  width: clamp(58px, 16vw, 78px);
  height: clamp(58px, 16vw, 78px);
  margin: 0 5px 0 0;
  place-items: center;
  border: 1px solid #4f83a8;
  border-radius: 23px;
  background: linear-gradient(142deg, #39739d, #18395c 49%, #102742 100%);
  color: #c5f6ff;
  box-shadow: inset 0 1px 0 #b6f9ff4a, 0 8px 30px #05132572;
  transform: rotate(8deg);
}

.plan-list { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.plan-card {
  position: relative;
  display: grid;
  min-height: 77px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: linear-gradient(115deg, #173858, #142b46 82%);
  cursor: pointer;
}
.plan-card:hover { border-color: #6296ba; }
.plan-card:has(input:checked) {
  border-color: #7bdff0;
  background: linear-gradient(113deg, #245674, #184166 75%, #193853);
  box-shadow: inset 0 0 0 1px #71cbde40, 0 3px 21px #46c0ef17;
}
.plan-card:has(input:focus-visible) { outline: 2px solid var(--cyan); outline-offset: 2px; }
.plan-card input {
  position: absolute;
  width: 19px;
  height: 19px;
  margin: 0;
  opacity: 0;
}
.plan-control { display: grid; width: 19px; height: 19px; place-items: center; border: 1px solid #82a8ca; border-radius: 50%; }
input:checked + .plan-control { border-color: var(--cyan); }
input:checked + .plan-control::before { width: 9px; height: 9px; border-radius: 50%; background: var(--cyan); content: ""; }
.plan-info, .plan-rate { min-width: 0; display: grid; gap: 4px; }
.plan-info strong { font-size: 17px; font-weight: 680; letter-spacing: -.025em; }
.plan-info > span, .plan-rate > span { color: #b9d0e7; font-size: 12px; }
.plan-rate { justify-items: end; text-align: right; white-space: nowrap; }
.plan-rate strong { font-size: 23px; font-weight: 730; letter-spacing: -.045em; line-height: 1; }

.action { margin-top: 15px; text-align: center; }
.button {
  position: relative;
  display: inline-flex;
  width: 100%;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 38px;
  border: 1px solid transparent;
  border-radius: 16px;
  text-align: center;
  font-size: 16px;
  font-weight: 740;
  line-height: 1.2;
  text-decoration: none;
}
.button .icon { position: absolute; right: 15px; }
.button.white { border-color: #fff; background: #f6fbff; color: #0b2942; }
@media (hover: hover) {
  .button.white:hover:not(:disabled) { background: #d6f6ff; }
}
.error { margin-top: 9px; color: #ffd3db; font-size: 13px; line-height: 1.45; }
.footer { margin-top: 14px; text-align: center; }
.text-button { padding: 7px 0; border: 0; background: transparent; color: #bbd6eb; font-size: 13px; }
.text-button:hover { color: #f2fbff; text-decoration: underline; }
.back { display: flex; align-items: center; gap: 7px; margin-bottom: 13px; }
.help-intro { margin-bottom: 18px; }
.faq { display: grid; gap: 8px; }
.faq details { padding: 0 14px; border: 1px solid var(--line); border-radius: 14px; background: #152d48; }
.faq summary { display: flex; min-height: 52px; align-items: center; justify-content: space-between; gap: 8px; list-style: none; cursor: pointer; font-size: 15px; font-weight: 650; }
.faq summary::-webkit-details-marker { display: none; }
.faq details[open] summary .icon { transform: rotate(180deg); }
.faq p { padding: 0 15px 13px 0; color: var(--muted); font-size: 14px; line-height: 1.45; }

.sheet {
  position: fixed;
  inset: auto 0 0;
  width: min(100% - 24px, 465px);
  max-height: calc(100% - 16px);
  margin: 0 auto 14px;
  padding: 15px 20px 21px;
  border: 1px solid #4c7697;
  border-radius: 24px;
  background: radial-gradient(ellipse at 5% 0%, #254e6d 0, #162f4a 50%, #10253b 100%);
  color: var(--white);
  box-shadow: 0 20px 65px #010b15c0;
}
.sheet::backdrop { background: #060f1cbb; }
.sheet-handle { width: 35px; height: 3px; margin: 0 auto 14px; border-radius: 10px; background: #7193ab; }
.close {
  position: absolute;
  top: 17px;
  right: 16px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  border: 1px solid #4b6a86;
  border-radius: 11px;
  background: #17334d;
  color: #d8effa;
}
.close:hover { background: #264763; }
.sheet-icon {
  display: grid;
  width: 49px;
  height: 49px;
  margin-bottom: 10px;
  place-items: center;
  border: 1px solid #5490b9;
  border-radius: 15px;
  background: #245071;
  color: #bbf5ff;
}
.sheet-body h2 { font-size: clamp(29px, 6vw, 37px); line-height: 1.03; letter-spacing: -.048em; }
.thanks { padding-top: 6px; text-align: center; }
.thanks h2 { text-wrap: balance; }
.thanks p { max-width: 300px; margin: 9px auto 16px; color: #c7dcef; font-size: 14px; line-height: 1.5; }
.thanks .thanks-plan { margin: 13px auto 0; color: var(--white); font-weight: 650; }
.success-icon { margin-inline: auto; border-color: #549e92; background: #204e53; color: #b5f9dd; }
.loading { padding-block: 32px; color: var(--muted); }
.startup-error { display: block; }
.startup-error .button { margin-top: 15px; }

@media (min-width: 680px) {
  .sheet { inset: 0; margin: auto; }
}
@media (max-width: 480px) {
  .topbar { min-height: calc(59px + var(--tg-content-safe-area-inset-top, 0px)); }
  .intro { margin-bottom: 19px; }
  .sheet { width: 100%; max-width: none; margin-bottom: 0; padding-bottom: calc(20px + var(--safe-bottom)); border-radius: 25px 25px 0 0; }
}
@media (max-width: 340px) {
  .shell { width: calc(100% - 28px); }
  .intro h1 { font-size: 38px; }
  .intro-icon { width: 51px; height: 51px; border-radius: 15px; }
  .plan-card { gap: 8px; padding-inline: 10px; }
}
