:root {
  --background: #09070b;
  --surface: #171219;
  --text: #fff9fc;
  --muted: #aea4af;
  --pink: #f50a91;
  --coral: #ff765d;
  --line: rgba(255, 255, 255, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--background);
}

body {
  display: grid;
  min-width: 320px;
  min-height: 100svh;
  margin: 0;
  place-items: center;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 24%, rgba(245, 10, 145, 0.18), transparent 23rem),
    var(--background);
  font-family: "Montserrat", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.install {
  display: flex;
  width: min(100%, 440px);
  min-height: 100svh;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding:
    max(32px, env(safe-area-inset-top))
    24px
    max(32px, env(safe-area-inset-bottom));
  text-align: center;
}

.install[hidden] {
  display: none;
}

.back-link {
  display: inline-flex;
  align-self: center;
  align-items: center;
  gap: 9px;
  margin-bottom: 38px;
  color: #d8cfd9;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 160ms ease, transform 160ms ease;
  -webkit-tap-highlight-color: transparent;
}

.back-link:hover {
  color: #fff;
  transform: translateX(-2px);
}

.back-link:focus-visible {
  outline: 3px solid rgba(255, 84, 183, 0.6);
  outline-offset: 4px;
}

.back-link svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.app-icon {
  width: 132px;
  height: 132px;
  border: 1px solid var(--line);
  border-radius: 29px;
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.45),
    0 12px 38px rgba(245, 10, 145, 0.2);
}

.eyebrow {
  margin: 28px 0 10px;
  color: #ff9bd0;
  font-size: 0.72rem;
  font-weight: 760;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2.6rem, 12vw, 4.1rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1;
}

.message {
  min-height: 24px;
  margin: 18px 0 26px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}

.install-button {
  display: flex;
  width: 100%;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 20px;
  border: 0;
  border-radius: 17px;
  color: #fff;
  background: linear-gradient(105deg, var(--pink), #ff277f 54%, var(--coral));
  box-shadow: 0 15px 42px rgba(245, 10, 145, 0.27);
  font: inherit;
  font-size: 1rem;
  font-weight: 760;
  cursor: pointer;
  transition: filter 160ms ease, opacity 160ms ease, transform 160ms ease;
  -webkit-tap-highlight-color: transparent;
}

.install-button:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.install-button:active {
  transform: translateY(1px) scale(0.995);
}

.install-button:focus-visible {
  outline: 3px solid rgba(255, 84, 183, 0.6);
  outline-offset: 4px;
}

.install-button:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

.install[data-platform="desktop"] .install-button {
  color: #aaa3ab;
  background: #3d383f;
  box-shadow: none;
  cursor: not-allowed;
  filter: none;
  opacity: 1;
}

.install[data-platform="desktop"] .install-button:hover,
.install[data-platform="desktop"] .install-button:active {
  filter: none;
  transform: none;
}

.install-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.requirement {
  margin: 16px 0 0;
  color: #776f79;
  font-size: 0.74rem;
  line-height: 1.45;
}

.setup-view {
  --header-to-steps: 28px;
  --between-steps: 22px;
  --steps-to-action: 26px;

  display: flex;
  width: min(100%, 440px);
  min-height: 100svh;
  align-self: start;
  flex-direction: column;
  margin: 0 auto;
  padding:
    max(26px, env(safe-area-inset-top))
    20px
    max(26px, env(safe-area-inset-bottom));
}

.setup-view[hidden] {
  display: none;
}

.setup-heading {
  margin-bottom: var(--header-to-steps);
  text-align: center;
}

.setup-kicker {
  margin: 0 0 5px;
  color: #ff9bd0;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.setup-title {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.guide-steps {
  display: grid;
  flex: 1 0 auto;
  align-content: space-evenly;
  gap: var(--between-steps);
  margin: 0 0 var(--steps-to-action);
  padding: 0;
  list-style: none;
}

.guide-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 5px 2px;
  color: #e7dee8;
  font-size: 0.76rem;
  font-weight: 700;
}

.guide-label > span {
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--pink);
  font-size: 0.63rem;
}

.guide-pair {
  display: grid;
  gap: 7px;
}

.guide-shot {
  display: block;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 13px;
  background: #f5f5f7;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
  text-decoration: none;
}

.guide-shot img {
  display: block;
  width: 100%;
  height: auto;
}

.guide-highlight {
  position: absolute;
  z-index: 2;
  border: 3px solid var(--pink);
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.9),
    0 0 18px rgba(245, 10, 145, 0.62);
  pointer-events: none;
}

.guide-allow {
  border-color: rgba(245, 10, 145, 0.36);
}

.allow-slice {
  position: relative;
  overflow: hidden;
}

.allow-slice img {
  position: absolute;
  right: 0;
  left: 0;
}

.allow-top {
  height: 72px;
}

.allow-top img {
  top: 0;
}

.allow-bottom {
  height: 48px;
  border-top: 1px solid #e8e7ea;
}

.allow-bottom img {
  bottom: 0;
}

.allow-bottom .guide-highlight {
  inset: 4px 5%;
  border-radius: 13px;
}

.guide-done .guide-highlight {
  top: 51%;
  right: 5%;
  bottom: 5%;
  left: 5%;
  border-radius: 14px;
}

.guide-back .guide-highlight {
  top: 12%;
  left: 3.2%;
  width: 9.6%;
  height: 76%;
  border-radius: 50%;
}

.android-setup-view {
  width: min(100%, 480px);
}

.android-guide-steps {
  gap: clamp(15px, 2.6vh, 24px);
}

.android-step-card {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(245, 10, 145, 0.1), transparent 58%),
    var(--surface);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}

.android-step-card p {
  margin: 0 0 13px;
  color: #c8bec9;
  font-size: 0.76rem;
  line-height: 1.48;
}

.android-action {
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 13px;
  font-size: 0.82rem;
  text-decoration: none;
}

.troubleshooting {
  padding: 13px 14px;
  border: 1px solid rgba(255, 155, 208, 0.25);
  border-radius: 14px;
  color: #a99faa;
  background: rgba(245, 10, 145, 0.07);
  font-size: 0.7rem;
  line-height: 1.5;
}

.troubleshooting strong {
  color: #f2e9f3;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.noscript {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: var(--surface);
  font-size: 0.82rem;
  text-align: center;
}

@media (max-height: 760px) {
  .setup-view {
    --header-to-steps: 17px;
    --between-steps: 13px;
    --steps-to-action: 17px;

    padding-top: max(18px, env(safe-area-inset-top));
    padding-bottom: max(18px, env(safe-area-inset-bottom));
  }

  .android-step-card {
    padding: 11px;
  }

  .android-step-card p {
    margin-bottom: 10px;
    font-size: 0.71rem;
  }

  .android-action {
    min-height: 44px;
    padding: 10px 14px;
  }

  .troubleshooting {
    padding: 10px 12px;
    font-size: 0.66rem;
  }
}

@media (max-height: 620px) {
  .back-link {
    margin-bottom: 22px;
  }

  .app-icon {
    width: 104px;
    height: 104px;
    border-radius: 23px;
  }

  .eyebrow {
    margin-top: 20px;
  }

  .setup-view {
    --header-to-steps: 10px;
    --between-steps: 8px;
    --steps-to-action: 11px;

    padding-top: max(12px, env(safe-area-inset-top));
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  .guide-steps {
    flex-grow: 0;
    align-content: normal;
  }

  .allow-top {
    height: 58px;
  }

  .allow-bottom {
    height: 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .install-button,
  .back-link {
    transition: none;
  }
}
