.app-download {
  display: none;
}

.app-install-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px;
  padding: 12px;
  border: 1px solid #e2e7e1;
  border-radius: 12px;
  background: #f2f4f1;
  color: #1a2925;
  text-align: left;
}
.app-install-banner > img {
  flex: 0 0 40px;
  border-radius: 10px;
}
.app-install-banner__copy {
  display: grid;
  gap: 4px;
  flex: 1;
  min-width: 0;
  line-height: 1.4;
}
.app-install-banner__copy strong { font-size: 12px; }
.app-install-banner__copy > span { font-size: 10px; color: #65726b; }
.app-install-banner__button {
  flex-shrink: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #1a2925;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.app-install-banner__close {
  flex: 0 0 24px;
  height: 32px;
  border: 0;
  background: transparent;
  color: #65726b;
  font-size: 24px;
  cursor: pointer;
}

@media (max-width: 1199px), (max-height: 639px) {
  body:has(.app-install-banner) > .main-wrap {
    padding-top: var(--header-real-h, 197px);
  }
}

@media (min-width: 1200px) and (min-height: 640px) {
  /* Reveal both initial HTML regions together, even across response chunks. */
  body[data-desktop-shell]:not(:has(#heroDots)) > :is(
    .app-download, .header, .main-wrap, .tabbar, .footer, .bottom-cta-band
  ) {
    visibility: hidden;
  }

  .app-install-banner { display: none; }
  .app-splash {
    display: none;
  }

  :root:has(.app-download) {
    --app-w: 630px;
    --container: 630px;
    --app-panel-w: 630px;
  }
  body:has(.app-download) > :is(
    .main-wrap, .header, .tabbar, .footer, .bottom-cta-band,
    .product-page, .checkout, .cp-page, .search-page,
    .cq-page, .cqd-overlay, .auc-admin, .auc-cust,
    #myPageModal, #ordersModal, .install-toast, .wish-toast, .float-kakao
  ) {
    translate: 200px 0;
  }

  body:has(.app-download)::before {
    translate: 200px 0;
  }

  body:has(.app-download) :is(.auth-shell, .signup-shell, .social-complete-shell, .app-tabbar) {
    width: min(100%, var(--app-w));
    max-width: var(--app-w);
    translate: 200px 0;
  }

  body:has(.app-download) .sell-method__sheet {
    translate: 200px 0;
  }

  /* Keep viewport backdrops full-screen; move only their app-owned card. */
  body:has(.app-download) :is(
    .bizinfo-sheet, .post-modal-content, .areg-sheet,
    .pay-result-box, .auc-sheet-card,
    .condition-guide-sheet, .shipping-address-popup__sheet,
    .sell-service-action__panel, .hq-settings-sheet, .hrow-settings-sheet
  ) {
    translate: 200px 0;
  }

  body:has(.app-download) .condition-guide-sheet {
    width: min(100%, var(--app-w));
  }

  body:has(.app-download) > .login-modal:not(#myPageModal, #ordersModal) > .login-content {
    translate: 200px 0;
  }

  .app-download {
    position: fixed;
    inset-block-start: 0;
    inset-inline-start: calc(50% - 515px);
    padding-top: clamp(190px, 28vh, 320px);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 360px;
    color: var(--wanted-blue, #1a2925);
    text-align: center;
    z-index: 5;
  }

  .app-download__title {
    margin: 0;
    font-size: 40px;
    font-weight: 750;
    line-height: 1.35;
    letter-spacing: -1.4px;
    white-space: pre-line;
  }

  .app-download__description {
    margin: 24px 0 48px;
    color: var(--wanted-sub, #6b6b6f);
    font-size: 16px;
    line-height: 1.7;
    white-space: pre-line;
  }

  .app-download__link {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    justify-content: center;
    width: 100%;
    padding: 16px;
    background: var(--wanted-blue, #1a2925);
    color: #fff;
    text-decoration: none;
    border-radius: 20px;
  }

  .app-download__link:focus-visible {
    outline: 2px solid var(--wanted-blue, #1a2925);
    outline-offset: 6px;
  }

  .app-download__qr {
    display: block;
    width: 112px;
    height: 112px;
    flex: 0 0 112px;
    border-radius: 10px;
  }

  .app-download__label {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.5;
    white-space: pre-line;
  }

  .app-download__hint {
    margin: 12px 0 0;
    color: #d6dfda;
    font-size: 12px;
    line-height: 1.7;
    white-space: pre-line;
  }
}
