/* Shared iOS H5 download prompt. It stays in document flow, never over content. */
.mobile-app-banner,
.mobile-app-banner[hidden] {
  display: none;
}

@media screen and (max-width: 767px) {
  .mobile-app-banner:not([hidden]) {
    display: block;
    position: relative;
    width: 100%;
    background: #f3f6ff;
    border-bottom: 1px solid #e0e7f3;
    color: #0f294d;
  }

  .mobile-app-banner-inner {
    position: relative;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    max-width: 560px;
    min-height: 64px;
    margin: 0 auto;
    padding: 8px max(10px, env(safe-area-inset-right)) 8px max(34px, calc(env(safe-area-inset-left) + 28px));
    box-sizing: border-box;
  }

  .mobile-app-banner-close {
    display: flex;
    position: absolute;
    top: 0;
    left: max(0px, env(safe-area-inset-left));
    align-items: flex-start;
    justify-content: flex-start;
    width: 36px;
    height: 36px;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    color: #ffffff;
    cursor: pointer;
    z-index: 10;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .mobile-app-banner-close::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 28px;
    height: 28px;
    background: #c2c6cf;
    clip-path: polygon(0 0, 100% 0, 0 100%);
    -webkit-clip-path: polygon(0 0, 100% 0, 0 100%);
    transition: background-color 0.15s ease;
    pointer-events: none;
  }

  .mobile-app-banner-close:hover::before,
  .mobile-app-banner-close:active::before {
    background: #aab0bc;
  }

  .mobile-app-banner-close-icon {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 10px;
    height: 10px;
    display: block;
    pointer-events: none;
    color: #ffffff;
  }

  .mobile-app-banner-icon {
    display: block;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
  }

  .mobile-app-banner-copy {
    min-width: 0;
  }

  .mobile-app-banner-message {
    margin: 0;
    color: #0f294d;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    overflow-wrap: break-word;
  }

  .mobile-app-banner-inner .mobile-app-banner-download,
  .mobile-app-banner-inner .mobile-app-banner-download:link,
  .mobile-app-banner-inner .mobile-app-banner-download:visited,
  .mobile-app-banner-inner .mobile-app-banner-download:hover,
  .mobile-app-banner-inner .mobile-app-banner-download:active,
  .mobile-app-banner-inner .mobile-app-banner-download:focus {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 76px;
    min-height: 44px;
    padding: 0 10px;
    border-radius: 6px;
    background: #2C61FE;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    line-height: 20px;
    text-decoration: none;
    white-space: nowrap;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-app-banner-close:focus-visible,
  .mobile-app-banner-download:focus-visible {
    outline: 3px solid #0f294d;
    outline-offset: 2px;
  }

  #header-placeholder.is-transparent .header {
    transition-property: background-color;
  }

  #header-placeholder.is-transparent.has-mobile-app-banner .header {
    top: var(--mobile-app-banner-height, 64px);
  }

  body.has-mobile-app-banner .header-content-result-tab-smart-pulldown {
    top: var(--mobile-app-menu-top, 124px);
    height: calc(100vh - var(--mobile-app-menu-top, 124px));
    height: calc(100dvh - var(--mobile-app-menu-top, 124px));
  }
}
