/* Only public landing pages on phone-size, touch-first viewports. */
@layer ar-public-phone-spacing {
  @media (max-width: 600px) and (pointer: coarse) {
    body[data-ar-document="studio"] #main-content-studio .story-copy .text-actions > a {
      font-size: 13px !important;
      line-height: 1.2 !important;
      letter-spacing: .028em !important;
      min-height: 44px !important;
    }
    body[data-ar-document="contact"] .cs-thanks h2 {
      font-size: clamp(20px,5.4vw,24px) !important;
      line-height: 1.38 !important;
      text-wrap: balance;
    }
  }
  /* Keep the fitted Home layout and its showcase scroll/arrow behavior. */
  @media (max-width: 1024px) and (orientation: portrait) and (pointer: coarse) {
    html[data-unified-phone-layout] body[data-ar-document="home"] {
      --home-footer-unit: var(--home-physical-px, 2.5px);
    }
    html[data-unified-phone-layout] body[data-ar-document="home"] #site-information > summary {
      min-height: calc(44 * var(--home-footer-unit)) !important;
      font-size: calc(12 * var(--home-footer-unit)) !important;
      line-height: 1.3 !important;
    }
    html[data-unified-phone-layout] body[data-ar-document="home"] #ar-site-header #ar-phone-menu :is(summary,.ar-site-nav-item) {
      min-height: calc(44 * var(--home-footer-unit)) !important;
      font-size: calc(13 * var(--home-footer-unit)) !important;
      line-height: 1.18 !important;
    }
    html[data-unified-phone-layout] body[data-ar-document="home"] .socials .ar-section-subtitle {
      font-size: calc(12 * var(--home-footer-unit)) !important;
    }
  }
}

/* Keep the existing seven-link footer rhythm, also on the native-width Contact page. */
@layer ar-public-phone-spacing {
  @media (max-width: 600px) and (pointer: coarse) {
    body[data-ar-document="contact"] :is(.bottom-nav,.ar-bottom-nav,.bottom-nav-wrap) nav[data-marketplace-nav] {
      grid-template-columns: minmax(0,.72fr) minmax(0,.87fr) minmax(0,1.18fr) minmax(0,.74fr) minmax(0,1.33fr) minmax(0,.83fr) minmax(0,1.33fr) !important;
      gap: 2px !important;
    }
    body[data-ar-document="contact"] :is(.bottom-nav,.ar-bottom-nav,.bottom-nav-wrap) nav[data-marketplace-nav] > :is(a,span):nth-child(n) {
      grid-column: auto !important;
      min-width: 0 !important;
      min-height: 25px !important;
      padding: 2px 1px !important;
      font-size: clamp(7px, 2.35vw, 11px) !important;
      line-height: 1.08 !important;
      letter-spacing: 0 !important;
      text-align: center !important;
      white-space: normal !important;
      overflow-wrap: normal !important;
    }
    body[data-ar-document="contact"] nav[data-marketplace-nav] .cs-thanks-label {font-size: inherit !important}
  }
}
