/* Friday Telegram Mini App — product card based on the supplied T-Bank layout. */
body.landing-rebuild .telegram-app-section {
  padding: clamp(38px, 5vw, 68px) 0;
  background: #050608;
}

body.landing-rebuild .telegram-app-card {
  position: relative;
  isolation: isolate;
  display: grid;
  min-width: 0;
  min-height: 650px;
  grid-template-columns: minmax(0, 1.08fr) minmax(350px, 0.92fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  background: #e7ebf2;
  color: #171a20;
  box-shadow: 0 28px 76px rgba(0, 0, 0, 0.28);
}

body.landing-rebuild .telegram-app-copy {
  position: relative;
  z-index: 2;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(50px, 5.8vw, 74px);
}

body.landing-rebuild .telegram-app-icon-lockup,
body.landing-rebuild .telegram-app-brand-icon {
  display: block;
  width: 96px;
  height: 96px;
}

body.landing-rebuild .telegram-app-icon-lockup { margin-bottom: 34px; }

body.landing-rebuild .telegram-app-brand-icon {
  object-fit: contain;
  filter: drop-shadow(0 14px 20px rgba(21, 27, 37, 0.18));
}

html[lang] body.landing-rebuild main section#telegram-app.telegram-app-section[aria-labelledby="telegramAppTitle"] .telegram-app-card .telegram-app-copy h2#telegramAppTitle.proof-modern-title[data-i18n="telegramApp.title"] {
  max-width: 10em;
  margin: 0;
  color: #171a20;
  font-family: var(--ff-nonbrand-heading, "Friday Inter", Inter, "Helvetica Neue", Arial, sans-serif) !important;
  font-size: clamp(2.7rem, 3.8vw, 3.5rem) !important;
  font-style: normal !important;
  font-weight: 700 !important;
  font-synthesis: weight !important;
  letter-spacing: -0.055em !important;
  line-height: 1.02 !important;
  text-align: left !important;
  text-transform: none !important;
  text-wrap: balance;
}

body.landing-rebuild .telegram-app-copy > p {
  max-width: 34rem;
  margin: 22px 0 0;
  color: rgba(23, 26, 32, 0.7);
  font-family: var(--ff-nonbrand-heading, "Friday Inter", Inter, Arial, sans-serif);
  font-size: clamp(1rem, 1.3vw, 1.12rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.48;
}

body.landing-rebuild .telegram-app-store-badge {
  display: inline-flex;
  min-width: 238px;
  min-height: 64px;
  align-items: center;
  justify-content: center;
  gap: 13px;
  margin-top: 32px;
  padding: 10px 20px 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 13px;
  background: #090b0f;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 14px 28px rgba(17, 23, 32, 0.2);
  transition: transform 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

body.landing-rebuild .telegram-app-store-badge:hover {
  background: #171b22;
  box-shadow: 0 18px 34px rgba(17, 23, 32, 0.26);
  transform: translateY(-2px);
}

body.landing-rebuild .telegram-app-store-badge:focus-visible {
  outline: 3px solid #229ed9;
  outline-offset: 4px;
}

body.landing-rebuild .telegram-app-store-badge > img {
  display: block;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  transform: translate(-1px, -1px);
}

body.landing-rebuild .telegram-app-store-badge strong {
  font-family: var(--ff-nonbrand-heading, "Friday Inter", Inter, Arial, sans-serif);
  font-size: 1.12rem;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1;
  white-space: nowrap;
}

body.landing-rebuild .telegram-app-device {
  position: relative;
  z-index: 1;
  min-width: 0;
  min-height: 650px;
}

body.landing-rebuild .telegram-app-phone {
  position: absolute;
  top: 24px;
  left: 50%;
  display: block;
  width: 380px;
  max-width: calc(100% - 28px);
  height: auto;
  object-fit: contain;
  user-select: none;
  /* The phone artwork already contains its own edge shading. A CSS filter here
     makes iOS Safari composite the transparent PNG as a visible rectangle. */
  filter: none;
  transform: translateX(-50%);
}

@media (max-width: 900px) {
  body.landing-rebuild .telegram-app-card {
    min-height: 610px;
    grid-template-columns: minmax(0, 1fr) minmax(290px, 0.82fr);
  }

  body.landing-rebuild .telegram-app-copy { padding: 44px 32px; }

  body.landing-rebuild .telegram-app-icon-lockup,
  body.landing-rebuild .telegram-app-brand-icon {
    width: 82px;
    height: 82px;
  }

  body.landing-rebuild .telegram-app-icon-lockup { margin-bottom: 28px; }

  html[lang] body.landing-rebuild main section#telegram-app.telegram-app-section[aria-labelledby="telegramAppTitle"] .telegram-app-card .telegram-app-copy h2#telegramAppTitle.proof-modern-title[data-i18n="telegramApp.title"] {
    font-size: clamp(2.35rem, 5vw, 3rem) !important;
  }

  body.landing-rebuild .telegram-app-device { min-height: 610px; }
  body.landing-rebuild .telegram-app-phone { top: 30px; width: 326px; }
}

@media (max-width: 760px) {
  body.landing-rebuild .telegram-app-section { padding: 28px 0 40px; }

  body.landing-rebuild .telegram-app-card {
    display: flex;
    min-height: 640px;
    flex-direction: column;
    border-radius: 22px;
  }

  body.landing-rebuild .telegram-app-copy {
    max-width: none;
    align-items: center;
    justify-content: flex-start;
    padding: 24px 20px 0;
    text-align: center;
  }

  body.landing-rebuild .telegram-app-icon-lockup,
  body.landing-rebuild .telegram-app-brand-icon {
    width: 60px;
    height: 60px;
  }

  body.landing-rebuild .telegram-app-icon-lockup { margin-bottom: 18px; }

  html[lang] body.landing-rebuild main section#telegram-app.telegram-app-section[aria-labelledby="telegramAppTitle"] .telegram-app-card .telegram-app-copy h2#telegramAppTitle.proof-modern-title[data-i18n="telegramApp.title"] {
    max-width: 10.5em;
    margin-inline: auto;
    font-size: clamp(1.75rem, 7.6vw, 2rem) !important;
    letter-spacing: -0.045em !important;
    line-height: 1.04 !important;
    text-align: center !important;
  }

  body.landing-rebuild .telegram-app-copy > p {
    max-width: 31ch;
    margin-top: 14px;
    font-size: 0.92rem;
    line-height: 1.4;
    text-align: center;
  }

  body.landing-rebuild .telegram-app-store-badge {
    min-width: 252px;
    min-height: 54px;
    gap: 12px;
    margin-top: 20px;
    padding: 9px 18px 9px 12px;
    border-radius: 12px;
  }

  body.landing-rebuild .telegram-app-store-badge > img { width: 32px; height: 32px; }
  body.landing-rebuild .telegram-app-store-badge strong { font-size: 1.02rem; }

  body.landing-rebuild .telegram-app-device {
    position: relative;
    inset: auto;
    width: 100%;
    min-height: 330px;
    flex: 0 0 330px;
    margin-top: 20px;
  }

  body.landing-rebuild .telegram-app-phone {
    top: 0;
    width: min(280px, calc(100% - 48px));
    max-width: none;
  }
}

@media (max-width: 420px) {
  body.landing-rebuild .telegram-app-card { min-height: 656px; }
  body.landing-rebuild .telegram-app-copy { padding: 22px 18px 0; }
  body.landing-rebuild .telegram-app-device {
    min-height: 330px;
    flex-basis: 330px;
    margin-top: 32px;
  }
  body.landing-rebuild .telegram-app-phone { top: 0; width: min(280px, calc(100% - 44px)); }
}

@media (prefers-reduced-motion: reduce) {
  body.landing-rebuild .telegram-app-store-badge { transition: none; }
}
