.tf-jp-ad {
  --tf-creative-height: 250px;
  box-sizing: border-box;
  width: min(100% - 32px, 960px);
  margin: 48px auto;
  clear: both;
  text-align: center;
}
.article-body > .tf-jp-ad {
  width: 100%;
  margin: 48px auto;
}
.tf-jp-ad .tf-jp-ad-label {
  margin: 0 0 6px;
  color: #898b8e;
  font: 400 11px/16px system-ui, sans-serif;
  text-align: center;
}
.tf-jp-ad-space {
  width: 100%;
  max-width: 728px;
  min-height: var(--tf-creative-height);
  margin-inline: auto;
}
.tf-jp-ad .adsbygoogle { display: block; }
[data-tf-jp-ad="tfjp_a_body"] .tf-jp-ad-space,
[data-tf-jp-ad="tfjp_article_end"] .tf-jp-ad-space { max-width: 300px; }
[data-tf-jp-ad="tfjp_guide_mid"] { --tf-creative-height: 280px; }
[data-tf-jp-ad="tfjp_multiplex_bottom"] { --tf-creative-height: 420px; }
.tf-jp-ad[data-tf-jp-ad="tfjp_home_feed"] { --tf-creative-height: 110px; }
.tf-jp-ad[hidden] { display: none; }
html:not([data-tf-jp-site]) .tf-jp-ad { display: none; }

/* Text-only guide recommendations form the editorial break between two units. */
.tf-jp-ad + .related:has(+ [data-tf-jp-ad="tfjp_multiplex_bottom"]) {
  content-visibility: visible;
  max-width: 920px;
  margin-inline: auto;
}
.tf-jp-ad + .related:has(+ [data-tf-jp-ad="tfjp_multiplex_bottom"]) .related-grid {
  grid-template-columns: 1fr;
}
footer.footer { padding-bottom: max(96px, env(safe-area-inset-bottom)); }

@media (min-width: 768px) {
  .tf-jp-ad { --tf-creative-height: 280px; }
  [data-tf-jp-ad="tfjp_multiplex_bottom"] { --tf-creative-height: 320px; }
  [data-tf-jp-ad="tfjp_a_body"] .tf-jp-ad-space,
  [data-tf-jp-ad="tfjp_article_end"] .tf-jp-ad-space { max-width: 336px; }
}
@media (width < 1024px) {
  [data-tf-jp-ad="tfjp_home_feed"]:not([data-tf-pushed]) { display: none; }
}
