.android-install {
  --bg: transparent;
  --frame: #afc1d3;
  --screen: #f5f8fb;
  --line: rgba(122, 145, 168, 0.22);
  --title: #1e4f84;
  --text: #315b87;
  --muted: #7c96b2;
  --accent: #7fa83e;
  --accent-soft: #b7cc91;
  --click-main: #2d5e8f;
  --click-ring: #7da3c7;
  --side-btn: #cfd9e4;
  --phone-w: 184px;
  --phone-h: 310px;
  --gap: 40px;

  background: transparent;
  border-radius: 12px;
  padding: 56px 24px 32px;
  font-family: Arial, sans-serif;
  color: var(--text);
}

.android-install__title {
  margin: 0 0 34px;
  text-align: center;
  font-size: 38px;
  line-height: 1.1;
  font-weight: 700;
  color: var(--title);
}

.ais-shell {
  position: relative;
  max-width: 980px;
  margin: 0 auto;
}

.ais-viewport {
  width: calc(var(--phone-w) * 3 + var(--gap) * 2);
  margin: 0 auto;
  overflow: hidden;
}

.ais-track {
  display: flex;
  gap: var(--gap);
  transition: transform 0.35s ease;
  will-change: transform;
}

.ais-slide {
  flex: 0 0 var(--phone-w);
}

.ais-phone {
  position: relative;
  width: var(--phone-w);
  height: var(--phone-h);
  border: 7px solid var(--frame);
  border-radius: 20px;
  background: var(--screen);
  overflow: hidden;
  box-sizing: border-box;
}

.ais-ui-lines {
  position: absolute;
  left: 14px;
  right: 14px;
}

.ais-ui-lines span {
  display: block;
  height: 24px;
  margin-bottom: 12px;
  border-radius: 4px;
  background: var(--line);
}

.ais-step-1 .ais-ui-lines,
.ais-step-2 .ais-ui-lines {
  top: 36px;
}

.ais-step-1 .ais-modal {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fbfcfd;
  padding: 14px 14px 12px;
}

.ais-modal__title {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  color: #2f689f;
}

.ais-modal__text {
  margin: 0;
  font-size: 10px;
  line-height: 1.35;
  color: var(--muted);
}

.ais-actions {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 14px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.ais-actions::before {
  content: "";
  position: absolute;
  width: 1px;
  height: 14px;
  left: 50%;
  top: 50%;
  transform: translate(-0.5px, -50%);
  background: #d6dde6;
}

.ais-actions span {
  color: #7f9ab8;
}

.ais-actions .is-accent {
  color: var(--accent);
}

.ais-header {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #84a0ba;
}

.ais-header .ais-back {
  font-size: 14px;
  line-height: 1;
}

.ais-focus-label {
  position: absolute;
  left: 14px;
  top: 145px;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 600;
  color: var(--accent);
  max-width: 116px;
}

.ais-step-2 .ais-tap {
  right: 34px;
  top: 176px;
}

.ais-step-3 .ais-focus-row {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 42px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.ais-step-3 .ais-focus-text {
  margin: 0;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 600;
  color: var(--accent);
  max-width: 112px;
}

.ais-step-3 .ais-header {
  font-size: 10px;
}

.ais-switch {
  margin-left: auto;
  width: 34px;
  height: 16px;
  border-radius: 16px;
  background: rgba(127, 168, 62, 0.35);
  position: relative;
}

.ais-switch::after {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  position: absolute;
  right: 0;
  top: 0;
}

.ais-step-3 .ais-tap {
  right: 22px;
  top: 65px;
}

.ais-step-4 {
  background: #c4d0dc;
}

.ais-step-4 .ais-download-banner {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 56px;
  background: #f8fbfd;
  border-bottom: 1px solid #dde5ed;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  box-sizing: border-box;
}

.ais-file-ico {
  width: 14px;
  height: 14px;
  display: inline-block;
  border-radius: 3px;
  background: var(--accent);
  position: relative;
}

.ais-file-ico::after {
  content: "\2193";
  position: absolute;
  font-size: 10px;
  line-height: 1;
  color: #fff;
  left: 3px;
  top: 1px;
}

.ais-download-title {
  margin: 0;
  font-size: 12px;
  line-height: 1.2;
  color: var(--accent);
  font-weight: 700;
}

.ais-download-sub {
  margin: 0;
  font-size: 10px;
  line-height: 1.2;
  color: var(--accent);
}

.ais-step-4 .ais-ui-lines {
  top: 88px;
}

.ais-step-4 .ais-tap {
  right: 34px;
  top: 36px;
}

.ais-step-5 .ais-header,
.ais-step-6 .ais-header {
  gap: 0;
  font-weight: 700;
  color: #7ea0c0;
}

.ais-step-5 .ais-footer-actions,
.ais-step-6 .ais-footer-actions {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  padding: 0 14px;
}

.ais-step-5 .ais-tap,
.ais-step-6 .ais-tap {
  right: 12px;
  bottom: 4px;
}

.ais-step-6 .ais-link {
  color: #2c8de7;
  text-decoration: underline;
}

.ais-step-text {
  margin: 12px 0 0;
  color: var(--title);
  font-size: 15px;
  line-height: 1.28;
  font-weight: 400;
}

.ais-step-text::before {
  counter-increment: android-step;
  content: counter(android-step) ". ";
  font-weight: 700;
}

.ais-track {
  counter-reset: android-step;
}

.ais-tap {
  position: absolute;
  width: 24px;
  height: 26px;
}

.ais-tap circle,
.ais-tap path[fill-rule="evenodd"] {
  fill: var(--click-ring);
}

.ais-tap path:last-child {
  fill: var(--click-main);
}

.ais-nav {
  position: absolute;
  top: 128px;
  width: 34px;
  height: 80px;
  border: 0;
  border-radius: 10px;
  background: var(--side-btn);
  color: #5688b7;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.ais-nav:disabled {
  opacity: 0.55;
  cursor: default;
}

.ais-nav--prev {
  left: 10px;
}

.ais-nav--next {
  right: 10px;
}

.ais-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.ais-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 50%;
  background: var(--accent-soft);
  cursor: pointer;
  padding: 0;
}

.ais-dot.is-active {
  background: var(--accent);
}

@media (max-width: 1024px) {
  .android-install__title {
    font-size: 32px;
  }

  .ais-nav--prev {
    left: -4px;
  }

  .ais-nav--next {
    right: -4px;
  }
}

@media (max-width: 820px) {
  .android-install {
    padding: 36px 10px 24px;
  }

  .android-install__title {
    margin-bottom: 22px;
    font-size: 28px;
  }

  .ais-viewport {
    width: var(--phone-w);
  }

  .ais-nav {
    top: 112px;
    width: 30px;
    height: 66px;
    font-size: 28px;
  }

  .ais-nav--prev {
    left: 0;
  }

  .ais-nav--next {
    right: 0;
  }

  .ais-step-text {
    font-size: 14px;
  }
}

/* ===== Astra conflict fix (frontend) ===== */
.android-install,
.android-install * {
  box-sizing: border-box;
}

.android-install .ais-track {
  align-items: flex-start;
}

.android-install .ais-slide {
  margin: 0 !important;
}

.android-install .ais-phone {
  position: relative;
  overflow: hidden;
}

/* Стабильный верх 4-го экрана */
.android-install .ais-step-4 .ais-download-banner {
  height: 56px !important;
  padding: 0 12px !important;
  display: flex !important;
  align-items: center !important;
}
.android-install .ais-step-4 .ais-download-title,
.android-install .ais-step-4 .ais-download-sub {
  margin: 0 !important;
  line-height: 1.2 !important;
}

/* Стабильные стрелки (без all: unset) */
.android-install .ais-nav {
  position: absolute !important;
  top: 128px !important;
  width: 34px !important;
  height: 80px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: #cfd9e4 !important;
  color: #5688b7 !important;
  font-family: Arial, sans-serif !important;
  font-size: 34px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  text-transform: none !important;
  text-decoration: none !important;
  display: grid !important;
  place-items: center !important;
  cursor: pointer !important;
  z-index: 5 !important;
}
.android-install .ais-nav--prev { left: 10px !important; }
.android-install .ais-nav--next { right: 10px !important; }
.android-install .ais-nav:disabled { opacity: .55 !important; cursor: default !important; }

/* Иконка "тап" не растягивается темой */
.android-install .ais-tap {
  width: 24px !important;
  height: 26px !important;
  min-width: 24px !important;
  max-width: none !important;
  display: block !important;
}
.android-install svg { max-width: none !important; }
