:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  background: #eef8f2;
  color: #17221d;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background:
    radial-gradient(circle at 8% 0%, rgba(61, 180, 119, 0.2), transparent 36%),
    radial-gradient(circle at 92% 12%, rgba(255, 210, 133, 0.22), transparent 30%),
    #eef8f2;
}

.shell {
  width: min(100%, 620px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 16px max(32px, env(safe-area-inset-bottom));
  display: grid;
  align-items: center;
}

.install-card,
.launch-card {
  padding: 28px 22px 24px;
  border: 1px solid rgba(21, 117, 73, 0.1);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 54px rgba(20, 75, 50, 0.14);
  backdrop-filter: blur(12px);
}

.app-mark {
  width: 86px;
  height: 86px;
  margin-bottom: 20px;
}

.app-mark img,
.launch-card img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 22%;
  box-shadow: 0 10px 26px rgba(17, 105, 64, 0.24);
}

.eyebrow {
  margin: 0 0 8px;
  color: #168755;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(30px, 8vw, 44px);
  line-height: 1.06;
  letter-spacing: -0.035em;
}

.lead {
  margin: 16px 0 22px;
  color: #5c6862;
  font-size: 17px;
  line-height: 1.48;
}

.telegram-note {
  display: flex;
  gap: 12px;
  margin: 0 0 22px;
  padding: 14px;
  border: 1px solid #d6e4ff;
  border-radius: 18px;
  background: #f2f6ff;
  color: #365173;
}

.telegram-note p {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
}

.telegram-note__icon {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #dce8ff;
  font-size: 19px;
  font-weight: 800;
}

.steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 62px;
  padding: 10px 12px;
  border-radius: 18px;
  background: #f5f8f6;
  font-size: 16px;
  line-height: 1.35;
}

.step-number {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #168755;
  color: white;
  font-weight: 800;
}

.share-symbol {
  width: 26px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 4px;
  color: #147ac6;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
}

.primary-button {
  width: 100%;
  min-height: 56px;
  margin-top: 20px;
  padding: 14px 18px;
  display: inline-grid;
  place-items: center;
  border-radius: 17px;
  background: #168755;
  color: white;
  font-size: 17px;
  font-weight: 750;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(22, 135, 85, 0.23);
}

.primary-button:active {
  transform: translateY(1px);
  background: #107247;
}

.privacy-note {
  margin: 16px 8px 0;
  color: #87918c;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}

.shell--compact {
  width: min(100%, 460px);
}

.launch-card {
  text-align: center;
}

.launch-card img {
  width: 96px;
  height: 96px;
  margin: 0 auto 22px;
}

.launch-card h1 {
  font-size: 30px;
}

.launch-card p {
  color: #65716b;
  line-height: 1.45;
}

.safari-card .spinner {
  width: 30px;
  height: 30px;
  margin: -10px auto 14px;
  border: 3px solid #d5e9df;
  border-top-color: #168755;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.safari-card .primary-button {
  margin-top: 24px;
}

.secondary-link {
  margin-top: 16px;
  display: inline-block;
  color: #52635b;
  font-weight: 650;
}

.safari-fallback {
  margin-top: 24px;
  text-align: left;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.install-document,
.install-page {
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

.install-page {
  position: fixed;
  inset: 0;
  height: 100dvh;
}

.install-page .shell {
  height: 100dvh;
  min-height: 0;
  padding:
    max(10px, env(safe-area-inset-top))
    max(12px, env(safe-area-inset-right))
    max(10px, env(safe-area-inset-bottom))
    max(12px, env(safe-area-inset-left));
  overflow: hidden;
}

.install-page .install-card {
  width: 100%;
  max-height: 100%;
  padding: clamp(14px, 2.7dvh, 24px) clamp(16px, 4vw, 22px);
}

.install-page .app-mark {
  width: clamp(52px, 9dvh, 76px);
  height: clamp(52px, 9dvh, 76px);
  margin-bottom: clamp(8px, 1.5dvh, 16px);
}

.install-page h1 {
  font-size: clamp(25px, 4.8dvh, 40px);
}

.install-page .lead {
  margin: clamp(7px, 1.5dvh, 14px) 0 clamp(8px, 1.7dvh, 18px);
  font-size: clamp(14px, 2.2dvh, 17px);
}

.install-page .steps {
  gap: clamp(5px, 1dvh, 9px);
}

.install-page .steps li {
  min-height: 0;
  padding: clamp(6px, 1.2dvh, 10px) 10px;
  font-size: clamp(13px, 2.15dvh, 16px);
}

.install-page .step-number {
  width: clamp(30px, 4.8dvh, 36px);
  height: clamp(30px, 4.8dvh, 36px);
}

.install-page .share-symbol {
  width: 18px;
  height: 19px;
  border-width: 0 1.5px 1.5px;
  border-radius: 3px;
  font-size: 14px;
  line-height: 1;
  vertical-align: -2px;
  margin-inline: 1px;
}

.install-page .share-action {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  white-space: nowrap;
  line-height: 1.1;
  vertical-align: -3px;
}

.install-page .share-action .share-symbol {
  flex: 0 0 auto;
  margin-inline: 0;
}

.install-page .privacy-note {
  margin-top: clamp(7px, 1.4dvh, 14px);
  font-size: clamp(10px, 1.7dvh, 12px);
}

@media (max-height: 700px) {
  .install-page .shell {
    padding:
      max(8px, env(safe-area-inset-top))
      max(12px, env(safe-area-inset-right))
      max(8px, env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-left));
  }

  .install-page .install-card {
    padding: 14px 16px;
    border-radius: 22px;
  }

  .install-page .app-mark {
    width: 56px;
    height: 56px;
    margin-bottom: 8px;
  }

  .install-page .eyebrow {
    font-size: 11px;
    margin-bottom: 4px;
  }

  .install-page h1 {
    font-size: clamp(25px, 7vw, 32px);
    line-height: 1.02;
  }

  .install-page .lead {
    margin: 8px 0 10px;
    font-size: 14px;
    line-height: 1.28;
  }

  .install-page .steps {
    gap: 6px;
  }

  .install-page .steps li {
    grid-template-columns: 28px 1fr;
    gap: 8px;
    padding: 7px 9px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.22;
  }

  .install-page .step-number {
    width: 28px;
    height: 28px;
  }

  .install-page .share-symbol {
    width: 18px;
    height: 19px;
    font-size: 14px;
  }

  .install-page .privacy-note {
    margin: 8px 4px 0;
    font-size: 10px;
    line-height: 1.2;
  }
}

@media (orientation: landscape) and (max-height: 500px) {
  .install-page .install-card {
    display: grid;
    grid-template-columns: minmax(150px, 0.8fr) minmax(260px, 1.35fr);
    grid-template-rows: auto auto auto 1fr;
    column-gap: 16px;
    align-items: center;
  }

  .install-page .app-mark {
    width: 44px;
    height: 44px;
    margin-bottom: 5px;
  }

  .install-page h1 {
    font-size: 22px;
  }

  .install-page .lead {
    margin: 5px 0;
  }

  .install-page .steps {
    grid-column: 2;
    grid-row: 1 / span 4;
  }

  .install-page .privacy-note {
    grid-column: 1;
    margin-inline: 0;
    text-align: left;
  }
}

@media (max-width: 380px) {
  .install-card,
  .launch-card {
    padding-inline: 16px;
    border-radius: 24px;
  }

  .steps li {
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .install-card,
  .launch-card {
    animation: appear 300ms ease-out both;
  }

  @keyframes appear {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
  }
}
