.grid-cols-wrapper:has(.ythb-journal-host),
.grid-cols-wrapper:has(> .grid-cols .ythb-home),
.ythb-host-wrapper {
  box-sizing: border-box;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

@media (max-width: 430px) {
  .ythb-type-selection .ythb-grid,
  .ythb-type-announcement .ythb-announcements {
    grid-template-columns: 1fr 1fr;
  }

  .ythb-type-comparison .ythb-comparison-card img {
    height: 160px;
    aspect-ratio: auto;
  }
}

/* Journal reserves a white margin below the whole page for its fixed bottom
 * menu. On the homepage that margin appeared after the footer as a detached
 * blank strip. Keep the same safe space inside the real footer instead, so the
 * final surface stays continuous and footer content is never covered. */
@media (max-width: 1024px) {
  html.has-bottom-menu.route-common-home body {
    padding-bottom: 0 !important;
  }

  html.has-bottom-menu.route-common-home .global-wrapper {
    margin-bottom: 0 !important;
  }

  html.has-bottom-menu.route-common-home footer {
    padding-bottom: calc(
      var(--bottom-menu-height, 55px) +
      var(--bottom-menu-margin, 0px) +
      env(safe-area-inset-bottom, 0px)
    );
  }
}
