:root {
  color-scheme: dark;
  --bg: #0d1014;
  --card: #171c22;
  --card-hi: #1c232b;
  --line: #2a333e;
  --text: #f5f7fa;
  --muted: #9ba8b8;
  --accent: #bbf5d2;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 15px;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}
button,
input,
a {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  color: inherit;
  border: 0;
  background: none;
}
svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.shell {
  max-width: 480px;
  margin: auto;
  min-height: 100dvh;
  padding-top: var(--tg-content-safe-area-inset-top, 0px);
}
.topbar {
  height: 83px;
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.7px;
}
.brand-mark {
  width: 38px;
  height: 38px;
  border: 1px solid #526359;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--accent);
  font-weight: 900;
  background: linear-gradient(140deg, #263e33, #14211c);
}
.brand-caption {
  display: block;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 2px;
  color: var(--muted);
  margin-top: 4px;
}
.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 20px;
}
main {
  padding: 12px 20px 118px;
  overflow-wrap: anywhere;
}
h1 {
  font-size: 29px;
  line-height: 1.12;
  letter-spacing: -1px;
  margin: 5px 0 10px;
}
h2 {
  font-size: 21px;
  letter-spacing: -0.5px;
  line-height: 1.25;
  margin: 0 0 12px;
}
h3 {
  font-size: 16px;
  margin: 0 0 6px;
}
p {
  line-height: 1.5;
  margin: 8px 0;
}
.muted,
small {
  color: var(--muted);
}
small {
  font-size: 12px;
  line-height: 1.5;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin: 24px 0 12px;
}
.eyebrow:first-child {
  margin-top: 0;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.between {
  justify-content: space-between;
}
.grow {
  flex: 1;
  min-width: 0;
}
.stack {
  display: grid;
  gap: 12px;
}
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
  margin-top: 14px;
}
.card.compact {
  padding: 16px;
  margin-top: 0;
}
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 105% -5%, #33534266, transparent 58%),
    linear-gradient(135deg, #1e2926, #151c21);
  border-color: #374a40;
  padding: 23px;
  margin-top: 22px;
}
.hero .orb {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  background: #bbf5d20e;
  border: 1px solid #bbf5d230;
  border-radius: 20px;
  color: var(--accent);
  margin: 20px 0;
}
.orb svg {
  width: 32px;
  height: 32px;
}
.hero h2 {
  font-size: 27px;
}
.pill {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  padding: 6px 10px;
  border-radius: 30px;
  background: #bbf5d215;
  color: var(--accent);
  font-size: 11px;
  font-weight: 650;
}
.pill:before {
  content: "";
  width: 5px;
  height: 5px;
  background: currentColor;
  border-radius: 50%;
}
.pill.warning {
  color: #ffd08e;
  background: #ffd08e15;
}
.pill.neutral {
  color: var(--muted);
  background: #ffffff08;
}
.button {
  min-height: 49px;
  padding: 12px 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  width: 100%;
  border-radius: 13px;
  font-size: 14px;
  font-weight: 700;
  background: var(--accent);
  color: #0e2117;
}
.button.secondary {
  background: #ffffff05;
  color: var(--text);
  border: 1px solid #3b4652;
}
.button.ghost {
  color: var(--accent);
  background: none;
}
.button + .button {
  margin-top: 10px;
}
.hero .button {
  margin-top: 20px;
}
.divider {
  height: 1px;
  background: var(--line);
  margin: 18px 0;
}
.metric {
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.7px;
  margin: 12px 0 4px;
}
.metric-icon {
  color: var(--accent);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.list-button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 13px;
  text-align: left;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}
.list-button:last-child {
  border-bottom: 0;
}
.list-button > svg:first-child {
  color: var(--accent);
}
.list-button > svg:last-child {
  width: 16px;
  color: var(--muted);
  margin-left: auto;
}
.list-button p {
  margin: 0;
}
.menu {
  padding: 2px 19px;
}
.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(480px, 100%);
  padding: 12px 9px
    calc(
      13px +
        max(var(--safe-bottom), var(--tg-content-safe-area-inset-bottom, 0px))
    );
  display: flex;
  justify-content: space-around;
  gap: 2px;
  background: #0d1014f5;
  border-top: 1px solid var(--line);
  backdrop-filter: blur(20px);
  z-index: 10;
}
.tabbar[hidden] {
  display: none;
}
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 49px;
  min-width: 54px;
  padding: 5px 8px;
  border-radius: 12px;
  font-size: 10px;
  color: var(--muted);
}
.tab.active {
  background: #bbf5d20b;
  color: var(--accent);
}
.tab svg {
  width: 21px;
  height: 21px;
}
.avatar {
  height: 52px;
  width: 52px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 18px;
  background: linear-gradient(140deg, #36453e, #242a32);
  color: var(--accent);
  font-size: 23px;
  font-weight: 750;
}
.welcome {
  margin: 4px 0 12px;
}
.welcome p {
  font-size: 12px;
  margin: 0;
}
.welcome h2 {
  font-size: 19px;
  margin: 4px 0;
}
.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 24px 0 18px;
}
.plan {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 15px;
  padding: 16px 9px;
  text-align: left;
  min-width: 0;
  min-height: 112px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}
.plan strong {
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: normal;
}
.plan small {
  font-size: 10px;
}
.plan.active,
.period.active {
  border-color: var(--accent);
  background: #bbf5d20b;
}
.plan svg {
  color: var(--accent);
}
.period {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 14px;
  padding: 15px;
  text-align: left;
  display: grid;
  gap: 8px;
  min-height: 80px;
}
.period strong {
  font-size: 15px;
}
.period small {
  font-size: 12px;
}
.stepper {
  display: flex;
  align-items: center;
  gap: 12px;
}
.stepper button {
  width: 36px;
  height: 36px;
  background: #ffffff05;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 22px;
}
.check-list {
  padding: 0;
  list-style: none;
  color: #cbd4de;
  line-height: 1.6;
  font-size: 13px;
}
.check-list li {
  margin: 12px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.check-list svg {
  width: 17px;
  color: var(--accent);
}
.checkout-bar {
  position: fixed;
  bottom: calc(
    86px +
      max(var(--safe-bottom), var(--tg-content-safe-area-inset-bottom, 0px))
  );
  left: 50%;
  transform: translateX(-50%);
  width: min(480px, 100%);
  padding: 14px 20px;
  background: #14191ff8;
  border-top: 1px solid var(--line);
  z-index: 9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.checkout-bar .button {
  width: auto;
  min-width: 150px;
}
.checkout-bar strong {
  display: block;
  font-size: 24px;
  letter-spacing: -1px;
}
.with-checkout {
  padding-bottom: 210px;
}
.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-size: 13px;
  line-height: 1.5;
  margin: 12px 0;
}
.detail-row span:first-child {
  color: var(--muted);
}
.detail-row span:last-child {
  text-align: right;
}
.empty {
  text-align: center;
  padding: 34px 18px;
  border: 1px dashed var(--line);
  border-radius: 20px;
  margin-top: 25px;
}
.empty svg {
  width: 36px;
  height: 36px;
  color: var(--accent);
  margin-bottom: 14px;
}
.empty p {
  font-size: 13px;
  color: var(--muted);
}
.empty .button {
  margin-top: 20px;
}
.center {
  text-align: center;
}
.skeleton {
  height: 86px;
  border-radius: 18px;
  margin: 16px 0;
  background: linear-gradient(100deg, #171c22 20%, #242c34 45%, #171c22 65%);
  background-size: 240% 100%;
  animation: shimmer 1.5s infinite;
}
.hero-skeleton {
  height: 270px;
}
@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}
.link-box {
  font-size: 12px;
  word-break: break-all;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.link-box span {
  flex: 1;
}
.link-box button {
  min-width: 38px;
  min-height: 38px;
}
.step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin: 21px 0;
  font-size: 13px;
  line-height: 1.5;
}
.step-number {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 1px solid #506157;
  border-radius: 50%;
  color: var(--accent);
}
.step p {
  margin: 0;
}
.notice {
  padding: 15px;
  border: 1px solid #544831;
  border-radius: 14px;
  background: #322a1c40;
  color: #e4c996;
  font-size: 13px;
  line-height: 1.5;
  margin: 16px 0;
}
.positive {
  color: var(--accent);
}
.negative {
  color: #f6a6a6;
}
.transaction {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.transaction:last-child {
  border-bottom: 0;
}
.transaction strong {
  font-size: 13px;
}
.transaction small {
  display: block;
  margin-top: 4px;
}
.transaction > strong {
  text-align: right;
  white-space: nowrap;
}
.back {
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 20px;
  font-size: 13px;
  min-height: 36px;
}
.back svg {
  width: 17px;
}
dialog {
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  position: fixed;
  top: auto;
  bottom: 0;
  width: min(480px, 100%);
  max-width: 100%;
  max-height: 90dvh;
  margin: 0 auto;
  padding: 30px 22px calc(24px + var(--safe-bottom));
  overflow: auto;
}
dialog::backdrop {
  background: #000a;
  backdrop-filter: blur(4px);
}
.sheet-handle {
  position: absolute;
  top: 10px;
  left: calc(50% - 18px);
  height: 4px;
  width: 36px;
  border-radius: 4px;
  background: #48515b;
}
.sheet-close {
  position: absolute;
  top: 22px;
  right: 16px;
  width: 32px;
  height: 32px;
  font-size: 22px;
  background: none;
}
.sheet-title {
  padding-right: 30px;
  margin: 14px 0 20px;
}
label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin: 20px 0 8px;
}
input,
select {
  width: 100%;
  min-height: 50px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px;
  font-size: 16px;
}
input::placeholder {
  color: #657282;
}
form .button {
  margin-top: 22px;
}
.form-error {
  color: #ffacac;
  font-size: 13px;
  line-height: 1.5;
  min-height: 20px;
  margin-top: 10px;
}
#toast {
  position: fixed;
  bottom: 125px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90%;
  background: var(--text);
  color: var(--bg);
  padding: 13px 19px;
  border-radius: 13px;
  box-shadow: 0 8px 30px #0006;
  font-size: 13px;
  z-index: 30;
}
.spinner {
  height: 32px;
  width: 32px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.connection-key {
  overflow-wrap: anywhere;
  font: 11px monospace;
  background: var(--bg);
  padding: 12px;
  border-radius: 10px;
  line-height: 1.5;
}
.quote-error {
  color: #ffb7a5;
  font-size: 12px;
}
.legal {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 16px;
}
.legal a {
  text-decoration: underline;
}
.section-heading {
  margin: 26px 0 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.section-heading h2 {
  font-size: 17px;
  margin: 0;
}
.section-heading button {
  font-size: 12px;
  color: var(--accent);
}
.network-banner {
  background: #3a2d1f;
  color: #f7ce99;
  padding: 10px 20px;
  text-align: center;
  font-size: 12px;
}
.badge {
  font-size: 10px;
  border-radius: 6px;
  padding: 3px 6px;
  background: #ffffff0b;
  color: var(--muted);
}
@media (min-width: 600px) {
  body {
    background: #080b0e;
  }
  .shell {
    border-inline: 1px solid #1c252d;
  }
  .topbar {
    height: 90px;
  }
  dialog {
    bottom: 20px;
    border-radius: 24px;
    border-bottom: 1px solid var(--line);
  }
  .tabbar {
    border-inline: 1px solid var(--line);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
@media (max-width: 350px) {
  main {
    padding-inline: 14px;
  }
  .topbar {
    padding-inline: 14px;
  }
  .tab {
    min-width: 48px;
    padding-inline: 5px;
  }
  .plan {
    padding-inline: 7px;
  }
  .checkout-bar {
    padding-inline: 14px;
  }
  .checkout-bar .button {
    min-width: 135px;
  }
}
.price-was {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-block: 6px;
  font-size: 12px;
  color: #a1aaa8;
}
.price-cut {
  color: #a7f3d0;
  background: #173b30;
  border-radius: 6px;
  padding: 2px 6px;
  font-weight: 700;
}
