/* Homepage only: desktop keeps the approved 1440 / 1392 geometry. */
html,
body {
  --mx-fixed-canvas-width: max(100vw, 1440px);
  --mx-frame-content-width: clamp(1392px, calc(100vw - 48px), 1440px);
  --mx-frame-side-gutter: max(24px, calc((100vw - var(--mx-frame-content-width)) / 2));
  min-width: 1440px;
}

.mx-desktop-viewport {
  position: fixed;
  inset: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}

.mx-desktop-viewport::-webkit-scrollbar {
  display: block !important;
  height: 12px !important;
}

.mx-desktop-viewport::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 6px;
}

.mx-desktop-viewport > .mx-assembled-scroll-shell {
  position: relative;
  inset: auto;
  width: max(100%, 1440px);
  min-width: 1440px;
  height: 100%;
  /* Bind fixed header, footer and model to the same horizontally scrollable
     canvas. No scale is applied. Embedded viewports keep desktop breakpoints. */
  transform: translateZ(0);
}

/* Mobile is a separate composition, not a squeezed desktop canvas. */
@media (max-width: 767px) and (hover: none) and (pointer: coarse) {
  html,
  body {
    --mx-fixed-canvas-width: 100vw;
    --mx-frame-content-width: calc(100vw - 40px);
    --mx-frame-side-gutter: 20px;
    min-width: 0;
  }

  .mx-desktop-viewport {
    overflow-x: hidden;
    scrollbar-width: none;
  }

  .mx-desktop-viewport::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }

  .mx-desktop-viewport > .mx-assembled-scroll-shell {
    width: 100%;
    min-width: 0;
  }
}
