/* Keep link positions stable while the shared header and first ads are loading. */
html {
  scrollbar-gutter: stable;
}

@media (scripting: enabled) {
  #header-container:empty::before {
    content: "スイカゲーム 推し活手帳";
    display: block;
    visibility: hidden;
    padding: 16px 126px 20px;
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-align: center;
  }

  @media (max-width: 850px) {
    #header-container:empty::before {
      font-size: 1.05rem;
      line-height: 1.25;
      letter-spacing: 0;
    }

    /* Match the space used by the first text ad and the following 60px image. */
    body:has(#affiliate-sidebar-container:empty) .mobile-ad-slot:empty:is([data-mobile-ad-slot="top"], [data-mobile-ad-slot="after-hero"]) {
      display: block;
      min-block-size: calc(2.581rem + 8px);
    }

    body:has(#affiliate-sidebar-container:empty) .mobile-ad-slot:empty[data-mobile-ad-slot="before-list"] {
      display: block;
      min-block-size: calc(1.45rem + 68px);
    }
  }

  @media (max-width: 600px) {
    #header-container:empty::before {
      padding: 12px 66px 16px;
      overflow-wrap: anywhere;
      word-break: keep-all;
    }
  }
}
