.app-download {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-4);
  margin: var(--space-6) 0;
  padding: var(--space-6) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--rail-highlight);
  line-height: var(--leading-base);
}

.app-download__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.app-download .app-download__tip {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: 0 0 var(--space-2);
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: var(--leading-none);
  text-transform: uppercase;
}
.app-download .app-download__tip img { display: block; width: auto; height: 22px; border-radius: 0; }

.app-download .app-download__title {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: var(--leading-lg);
}

.app-download .app-download__ratings {
  display: none;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
  margin: 0;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
}

.app-download .app-download__store {
  justify-content: space-between;
  flex-wrap: wrap;
  min-height: 2.75rem;
  color: var(--on-brand);
  text-decoration: none;
}
.app-download__store small { font-size: var(--text-xs); font-weight: 400; opacity: 0.8; line-height: var(--leading-xs); }
.app-download .app-download__store:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }

.app-download .app-download__qr { display: none; flex: 0 0 auto; width: 120px; height: 120px; border-radius: 0; }
.app-download__title-qr { display: none; }

.app-download[data-device="iphone"] .app-download__store--android,
.app-download[data-device="android"] .app-download__store--ios,
.app-download[data-device="ipad"] .app-download__store--android,
.app-download[data-device="desktop"] .app-download__store { display: none; }

.app-download[data-device="ipad"] .app-download__qr,
.app-download[data-device="desktop"] .app-download__qr { display: block; }
.app-download[data-device="ipad"] .app-download__ratings,
.app-download[data-device="desktop"] .app-download__ratings { display: flex; }
.app-download[data-device="ipad"] .app-download__title-qr,
.app-download[data-device="desktop"] .app-download__title-qr { display: inline; }
.app-download[data-device="ipad"] .app-download__title-app,
.app-download[data-device="desktop"] .app-download__title-app { display: none; }

@media (max-width: 767px) {
  body .app-download {
    margin-inline: calc(var(--page-gutter) * -1);
    padding-inline: var(--page-gutter);
    border-radius: 0;
  }
}

@media (min-width: 994px) {
  .app-download {
    flex-direction: row;
    align-items: center;
    gap: var(--space-6);
    padding: var(--space-6);
  }
  .app-download .app-download__store,
  .app-download .app-download__tip { display: none; }
  .app-download:not([data-device]) .app-download__qr { display: block; }
  .app-download:not([data-device]) .app-download__ratings { display: flex; }
  .app-download:not([data-device]) .app-download__title-qr { display: inline; }
  .app-download:not([data-device]) .app-download__title-app { display: none; }
}
