html:has(.pay-intro[open]) { overflow: hidden; }

.pay-intro {
  --intro-safe-top: max(env(safe-area-inset-top, 0px), calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px)));
  --intro-safe-bottom: max(env(safe-area-inset-bottom, 0px), calc(var(--tg-safe-area-inset-bottom, 0px) + var(--tg-content-safe-area-inset-bottom, 0px)));
  --intro-safe-left: max(env(safe-area-inset-left, 0px), calc(var(--tg-safe-area-inset-left, 0px) + var(--tg-content-safe-area-inset-left, 0px)));
  --intro-safe-right: max(env(safe-area-inset-right, 0px), calc(var(--tg-safe-area-inset-right, 0px) + var(--tg-content-safe-area-inset-right, 0px)));
  position: fixed;
  inset: 0;
  width: min(924px, calc(100% - 44px));
  max-width: none;
  max-height: calc(100dvh - 34px);
  margin: auto;
  padding: clamp(24px, 3.2vw, 42px);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #3b4557;
  border-radius: 21px;
  color: var(--ink);
  background: #171b22;
}

.pay-intro::backdrop { background: #090b11db; }
.intro-header, .intro-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px 20px;
}
.intro-header .wordmark img { width: clamp(120px, 16vw, 163px); }

.intro-subtle, .intro-primary { font: inherit; font-weight: 750; cursor: pointer; }
.intro-subtle {
  min-height: 44px;
  padding: 5px 8px;
  border: 0;
  border-radius: 5px;
  color: #b6c4df;
  background: transparent;
}
.intro-subtle:hover { color: #f3f5fc; text-decoration: underline; text-underline-offset: .25em; }
.pay-intro :is(button, a):focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.intro-stage { margin-top: 21px; touch-action: pan-y pinch-zoom; }
.intro-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(20px, 4vw, 53px);
  animation: intro-reveal .2s ease-out;
}
.intro-art {
  position: relative;
  display: grid;
  min-height: 326px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #35435d;
  border-radius: 12px;
  background: radial-gradient(ellipse at 48% 64%, #293e70 0, #1d2c49 57%, #192234 100%);
}
.intro-card-art { padding: clamp(22px, 3.4vw, 45px); }
.intro-card-art .product-card {
  width: min(100%, 335px);
  min-width: 0;
  padding: clamp(15px, 2.2vw, 23px);
  border-color: #758bca;
  background:
    repeating-linear-gradient(3deg, #f3f6ff07 0 1px, transparent 1px 5px),
    linear-gradient(127deg, #11234d 10%, #123d9b 50%, #2558ba 73%, #112c64 100%);
  box-shadow: 0 15px 25px #070d27a0, inset 0 1px 1px #ecf1ff75;
}
.intro-card-art .product-card .wordmark img { width: clamp(107px, 13vw, 150px); }
.intro-card-art .product-card .wordmark span { font-size: 13px; }
.intro-card-art .card-chip { right: 12%; width: clamp(25px, 4vw, 36px); }
.intro-card-art .card-caption { font-size: clamp(11px, 1.2vw, 14px); }

.intro-currencies {
  display: grid;
  grid-template-columns: repeat(3, auto);
  align-items: center;
  gap: clamp(20px, 2.7vw, 42px);
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .06em;
}
.intro-currencies > span { display: grid; justify-items: center; gap: 9px; }
.intro-currencies b {
  display: grid;
  width: 68px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid #788ebc;
  border-radius: 50%;
  color: var(--ink);
  background: #172e59;
  font-size: 32px;
  line-height: 1;
}
.intro-currencies .nav-icon { width: 24px; height: 24px; color: var(--gold); }

.intro-account-summary {
  width: min(75%, 250px);
  border: 1px solid #52668a;
  border-radius: 9px;
  overflow: hidden;
  background: #19253d;
  font-weight: 750;
}
.intro-account-summary > span { display: flex; align-items: center; gap: 12px; padding: 10px 14px; }
.intro-account-summary > span + span { border-top: 1px solid #3c4c67; }
.intro-account-summary > span:first-child { color: #fff; background: #234695; }
.intro-account-summary .nav-icon { color: #c3d2ee; }
.intro-account-summary > span:first-child .nav-icon { color: var(--gold); }

.intro-ready-art { background: radial-gradient(ellipse at 54% 54%, #26365a 0, #1c2639 61%, #192131 100%); }
.intro-ready-art img { display: block; width: min(42%, 162px); height: auto; }

.intro-copy { min-width: 0; }
.intro-copy h2 {
  max-width: 14ch;
  color: var(--ink);
  font: 400 clamp(24px, 3.1vw, 42px)/1.17 Unbounded, Manrope, sans-serif;
  letter-spacing: -.055em;
  outline: none;
}
.intro-copy p { margin-top: 14px; color: #c1ccdf; font-size: 15px; overflow-wrap: anywhere; }
.intro-copy .intro-cabinet { margin: 4px 0 -7px -8px; color: #bdcdf3; }

.intro-footer { margin-top: 28px; padding-top: 19px; border-top: 1px solid #384254; }
.intro-position { display: grid; flex-shrink: 0; gap: 7px; color: #c1ccdf; font-size: 13px; }
.intro-meter { display: flex; gap: 4px; }
.intro-meter i { width: 13px; height: 3px; border-radius: 2px; background: #56627a; }
.intro-meter i.is-current { width: 23px; background: var(--gold); }
.intro-controls { display: flex; justify-content: end; align-items: center; gap: 8px; min-width: 0; }
.intro-primary {
  min-height: 46px;
  padding: 8px 17px;
  border-color: #6984e3;
  color: #fff;
  background: #2348b6;
  line-height: 1.3;
}
.intro-primary:hover { background: #3158cb; }

@keyframes intro-reveal { from { opacity: .63; } to { opacity: 1; } }

@media (max-width: 700px) {
  .pay-intro {
    display: none;
    width: 100%;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: calc(9px + var(--intro-safe-top)) max(17px, var(--intro-safe-right)) max(16px, calc(9px + var(--intro-safe-bottom))) max(17px, var(--intro-safe-left));
    border: 0;
    border-radius: 0;
  }
  .pay-intro[open] { display: flex; flex-direction: column; }
  .intro-header, .intro-stage, .intro-footer { width: min(100%, 488px); align-self: center; }
  .intro-header .wordmark img { width: clamp(112px, 33vw, 150px); }
  .intro-stage { margin-top: clamp(15px, 4.5dvh, 34px); }
  .intro-panel { grid-template-columns: minmax(0, 1fr); gap: 17px; }
  .intro-art { min-height: clamp(152px, 36dvh, 304px); }
  .intro-card-art { padding: clamp(12px, 4.2vw, 25px); }
  .intro-card-art .product-card { width: min(85%, 316px); }
  .intro-copy h2 { max-width: 19ch; }
  .intro-copy p { margin-top: 9px; }
  .intro-copy .intro-cabinet { margin-bottom: -10px; }
  .intro-footer { margin-top: auto; padding: 17px 0 0; border-top: 0; }
  .intro-controls, .intro-primary { flex: 1; }
  .intro-ready-art img { width: min(31%, 125px); }
  .intro-account-summary { line-height: 1.3; }
}

@media (max-width: 370px) {
  .intro-stage { margin-top: 10px; }
  .intro-panel { gap: 14px; }
  .intro-position { gap: 4px; font-size: 12px; }
  .intro-meter i { width: 9px; }
  .intro-meter i.is-current { width: 15px; }
  .intro-footer { gap: 7px; }
  .intro-controls { gap: 4px; }
  .intro-primary { padding-inline: 9px; font-size: 13px; }
  .intro-previous { padding-inline: 5px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) { .intro-panel { animation: none; } }
