@media (orientation: landscape) and (max-height: 600px) and (any-pointer: coarse) {
  /* Let page backgrounds reach the screen edges while keeping content in the safe area. */
  html:root {
    --pg-landscape-content-inset: max(12px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
    --pg-landscape-right: max(12px, env(safe-area-inset-right, 0px));
  }

  html:root body > section,
  html:root body > main,
  html:root:root body.album-page > .hero,
  html:root body.album-page main > .section-band,
  html:root body.album-page .header-inner,
  html:root:root body > main > :is(.store-hero, .products-section, .donation-section, .contact-strip) {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box;
  }

  /* Keep the safe-area padding on the content sections only. The store's
     installed-app rules otherwise inset both main and its children. */
  html:root:root body > main:not(.newsletter-shell, #home-content) {
    width: 100% !important;
    max-width: none !important;
    margin-inline: 0 !important;
    padding-inline: 0 !important;
  }

  html:root:root body.album-page > .hero {
    margin-inline: 0 !important;
  }

  html:root:root body > .discography ul#album-list,
  html:root body > section > :is(.hero-text, .section-text, .youtube-frame-wrapper),
  html:root body > .about :is(.about-album-info, .section-text),
  html:root:root body.album-page > .hero > .hero-grid {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    box-sizing: border-box;
  }

  html:root:root body > :is(header.home-header, header#top.store-header),
  html:root body:not(.album-page) > section,
  html:root body.album-page > .hero,
  html:root body.album-page main > .section-band,
  html:root body.album-page .header-inner,
  html:root:root body > main > :is(.store-hero, .products-section, .donation-section, .contact-strip),
  html:root body.newsletter-page {
    padding-left: var(--pg-landscape-content-inset) !important;
    padding-right: var(--pg-landscape-content-inset) !important;
  }

  html:root:root body,
  html:root:root body > #home-content {
    box-sizing: border-box;
    width: 100% !important;
    margin-inline: 0 !important;
    padding-inline: 0 !important;
  }

  html:root:root body.newsletter-page {
    padding-inline: var(--pg-landscape-content-inset) !important;
  }

  html:root:root #home-content > section {
    box-sizing: border-box;
    width: 100%;
    margin-inline: 0;
    padding-inline: var(--pg-landscape-content-inset) !important;
  }

  html:root body.newsletter-page .newsletter-shell {
    width: 100% !important;
    max-width: none !important;
  }

  html:root body > header.home-header,
  html:root body > header.site-header,
  html:root body > header#top.store-header {
    inset-inline: 0 !important;
    width: 100% !important;
    max-width: none !important;
    overflow: visible !important;
    box-sizing: border-box;
  }

  /* The three columns keep navigation between the brand and the header tools.
     Links wrap on shorter landscape viewports and in longer translations. */
  html:root:root body > :is(header.home-header, header#top.store-header),
  html:root:root body > header.site-header .header-inner {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    grid-template-areas: "brand menu tools" !important;
    align-items: center !important;
    column-gap: clamp(6px, 1.2vw, 16px) !important;
    height: auto !important;
  }

  html:root:root body > header :is(.header-left, .header-inner > .logo) {
    grid-area: brand !important;
    justify-self: start !important;
  }

  html:root body > header :is(.header-right, .header-tools) {
    grid-area: tools !important;
    justify-self: end !important;
    position: relative;
    z-index: 5 !important;
    flex: 0 0 auto;
  }

  html:root:root body > :is(header.home-header, header.site-header, header#top.store-header) .menu-toggle {
    display: none !important;
  }

  html:root:root body > :is(header.home-header, header.site-header, header#top.store-header) nav:is(.header-nav, .nav, .store-nav) {
    grid-area: menu !important;
    position: static !important;
    inset: auto !important;
    transform: none !important;
    display: flex !important;
    flex-flow: row wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 2px clamp(4px, 1vw, 12px) !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    visibility: visible !important;
    pointer-events: auto !important;
    opacity: 1 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  html:root:root body > :is(header.home-header, header.site-header, header#top.store-header) nav:is(.header-nav, .nav, .store-nav) > a {
    flex: 0 0 auto !important;
    width: auto !important;
    min-height: 28px !important;
    display: inline-flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 3px 2px !important;
    font-size: clamp(.6rem, 1.2vw, .85rem) !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
  }

  html:root body > header .lang-dropdown.open .lang-menu-list {
    z-index: 10;
  }

  html:root:root body > header :is(.header-right, .header-tools) {
    z-index: 6 !important;
    margin-inline: 0 !important;
  }

  html:root:root body > header.home-header {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr) !important;
    transition: none !important;
  }

  html:root:root body > header.home-header .header-left {
    min-width: 0 !important;
    max-width: 100%;
  }

  html:root:root body > header.home-header .logo-text {
    min-width: 0;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  html:root:root body:has(> header.home-header) {
    transition-property: background-color, box-shadow;
  }

  html:root:root #home-content > section > :is(.hero-text, .section-text, .discography-title-row) {
    min-width: 0;
    max-width: 100%;
    margin-inline: auto;
  }

  html:root:root body > header :is(.discography-button, .store-link, .home-globe-button) {
    touch-action: manipulation;
    transform: none !important;
    transition: none !important;
  }

  html:root:root body > header :is(.discography-button, .store-link, .home-globe-button) svg {
    pointer-events: none;
  }
}
