/* Mobile follows the document; only desktop uses the travelling camera. */
@media (max-width: 800px), (max-width: 1100px) and (max-height: 500px) {
  body.spatial-layout { --pad: 6vw; overflow-x: clip; }
  body.spatial-layout .spatial-viewport { position: relative !important; inset: auto; overflow: visible !important; }
  body.spatial-layout #story.spatial-world { position: relative !important; width: 100% !important; height: auto !important; transform: none !important; }
  body.spatial-layout .spatial-world > :is(.chapter,.closing) { position: relative !important; inset: auto !important; width: 100%; height: auto !important; min-height: 0 !important; }
  body.spatial-layout .spatial-scroll { display: none; }
  body.spatial-layout .chapter > .stage,
  body.spatial-layout:is(.motion-off,:not(.motion-ready)) .chapter > .stage { position: relative; height: auto !important; min-height: 0 !important; overflow: visible; padding: 96px var(--pad) 32px; }
  body.spatial-layout.composition-v9 .header { padding: 18px var(--pad); background: #fff; }
  body.spatial-layout.composition-v9 :is(.header,.story-nav,.world) { width: 100vw; max-width: 100vw; right: auto; }
  body.spatial-layout.composition-v9 .header-actions a { min-height: 40px; display: flex; align-items: center; gap: 10px; }
  body.spatial-layout.composition-v9 .chapter { scroll-margin-top: 0; }
  body.spatial-layout.composition-v9 .chapter .section-copy,
  body.spatial-layout.composition-v9 .chapter.connections .section-copy { position: relative; inset: auto; display: block; width: 100%; max-width: none; margin: 0; }
  body.spatial-layout.composition-v9 .chapter .eyebrow { font-size: 12px; margin-bottom: 16px; }
  body.spatial-layout.composition-v9 .chapter .section-copy > h2,
  body.spatial-layout.composition-v9 .marketplace-demo .intro h2 { font-size: clamp(30px,8.7vw,48px); line-height: 1.12; margin: 0; }
  body.spatial-layout.composition-v9 .chapter .section-copy > .body-copy { font-size: 18px; line-height: 1.45; margin: 24px 0 0; }
  body.spatial-layout.composition-v9 .chapter.connections .section-copy > h2 { font-size: clamp(28px,8.2vw,48px); }
  body.spatial-layout.composition-v9 .story-nav { position: fixed; inset: auto 0 0; padding: 9px var(--pad) max(9px,env(safe-area-inset-bottom)); min-height: 58px; border-top: 1px solid var(--line); background: #fffffff5; gap: 6px; align-items: center; }
  body.spatial-layout.composition-v9 .story-nav a { display: flex; align-items: center; min-height: 36px; font-size: 11px; }

  body.spatial-layout.composition-v9 .opening > .stage { display: flex; flex-direction: column; min-height: 0 !important; padding-top: 96px; padding-bottom: 28px; overflow-x: clip; }
  .hero-prepare body.spatial-layout.story-v7:not(.motion-off) .opening .word-left { transform: translate3d(-3.5vw,12px,0) rotate(-5deg); }
  .hero-prepare body.spatial-layout.story-v7:not(.motion-off) .opening .word-right { transform: translate3d(3.5vw,-12px,0) rotate(5deg); }
  .hero-prepare body.spatial-layout.story-v7:not(.motion-off) .opening-top { transform: translateY(-10px); }
  body.spatial-layout.composition-v9 .opening-top { position: relative; inset: auto; }
  body.spatial-layout.composition-v9 .opening-intro { font-size: clamp(27px,7.1vw,36px); line-height: 1.12; }
  body.spatial-layout.composition-v9 .giant-word { position: relative; inset: auto; width: 100%; font-size: 23vw; line-height: 1.12; margin: 22px 0 30px; }
  body.spatial-layout.composition-v9 .hero-task-cluster { display: grid; position: relative; inset: auto; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; margin-bottom: 28px; --drift-x: 4px; --drift-y: 3px; }
  body.spatial-layout.composition-v9 .opening .hero-directions { position: relative; inset: auto; width: auto; min-width: 0; gap: 24px; margin: 0; }
  body.spatial-layout.composition-v9 .opening .hero-task { gap: 10px; min-height: 48px; }
  body.spatial-layout.composition-v9 .opening .hero-task .process-object { width: 38px; height: 38px; }
  body.spatial-layout.composition-v9 .opening .hero-task .orbit-label { font-size: clamp(13px,3.6vw,19px); line-height: 1.2; }
  body.spatial-layout.composition-v9 .opening-bottom { position: relative; inset: auto; display: block; margin-top: 0; font-size: 17px; line-height: 1.45; }
  body.spatial-layout.composition-v9 .opening-bottom br { display: none; }
  body.spatial-layout.composition-v9 .opening-bottom .next { margin-top: 22px; font-size: 14px; min-height: 44px; }
  body.spatial-layout.composition-v9 .hero-rule { display: none; }

  body.spatial-layout.composition-v9 .marketing-shape-anchor { position: relative; inset: auto; width: 100px; height: 100px; margin: 40px auto 16px; }
  body.spatial-layout.composition-v9 .marketing-art { position: relative; inset: auto; width: 100%; height: auto; margin-top: 24px; overflow: visible; display: grid; gap: 32px; }
  body.spatial-layout.composition-v9 .direct-search,
  body.spatial-layout.composition-v9 .direct-network { position: relative; inset: auto; width: 100%; max-width: none; margin: 0; }
  body.spatial-layout.composition-v9 .direct-format { font-size: 14px; }
  body.spatial-layout.composition-v9 .direct-format > span { font-size: 10px; }

  body.spatial-layout.composition-v9 .chapter.connections .connection-art.system-demo { position: relative; inset: auto; width: 100%; margin: 36px 0 0; transform: none; }
  body.spatial-layout.composition-v9 .system-demo .backend { min-height: 320px; }
  body.spatial-layout.composition-v9 .chapter.connections .system-heart-anchor { left: 18%; top: 74%; width: 108px; }
  body.spatial-layout.composition-v9 .system-demo .product-card { width: 100%; margin-left: 0; grid-template-columns: 100px minmax(0,1fr); gap: 12px; padding: 12px; }
  body.spatial-layout.composition-v9 .system-demo .product-copy h3 { font-size: 18px; }
  body.spatial-layout.composition-v9 .system-demo .product-visual,
  body.spatial-layout.composition-v9 .system-demo .product-visual img { min-height: 132px; height: 132px; }
  body.spatial-layout.composition-v9 .system-demo .workspace { width: 100%; margin: 18px 0 0; padding: 16px; }
  body.spatial-layout.composition-v9 .system-demo .status-trail { grid-template-columns: 1fr; gap: 10px; }
  body.spatial-layout.composition-v9 .system-demo .order-event { min-height: 54px; }

  body.spatial-layout.composition-v9 .marketplace-demo { position: relative; inset: auto; overflow: visible; padding: 0; margin: 0; }
  body.spatial-layout.composition-v9 .marketplace-demo .market-main { display: flex; flex-direction: column; gap: 32px; height: auto; }
  body.spatial-layout.composition-v9 .marketplace-demo :is(.intro,.product,.supply,.documents,.market-economics,.parcel-anchor) { position: relative; inset: auto; width: 100%; max-width: none; margin: 0; translate: none; transform: none; }
  body.spatial-layout.composition-v9 .marketplace-demo .intro { order: 0; }
  body.spatial-layout.composition-v9 .marketplace-demo .intro-copy { font-size: 18px; margin-top: 24px; }
  body.spatial-layout.composition-v9 .marketplace-demo .product { order: 1; width: 72%; align-self: center; }
  body.spatial-layout.composition-v9 .marketplace-demo .parcel-anchor { order: 2; width: 116px; align-self: center; margin-top: -16px; }
  body.spatial-layout.composition-v9 .marketplace-demo .supply { order: 3; }
  body.spatial-layout.composition-v9 .marketplace-demo .documents { order: 4; padding: 22px; }
  body.spatial-layout.composition-v9 .marketplace-demo .market-economics { order: 5; padding: 22px; }
  body.spatial-layout.composition-v9 .marketplace-demo .scheme-options button { min-width: 44px; min-height: 40px; }
  body.spatial-layout.composition-v9 .marketplace-demo .product figcaption > strong { font-size: 17px; }

  body.spatial-layout.composition-v9 .content-factory .factory-roller-anchor { position: absolute; inset: -118px auto auto 50%; translate: -50% 0; width: 90px; height: 90px; margin: 0; }
  body.spatial-layout.composition-v9 .content-factory .factory-art { position: relative; inset: auto; width: calc(100% + var(--pad)*2); margin: 118px calc(var(--pad)*-1) 0; height: min(120vw,580px); overflow: visible; }
  body.spatial-layout.composition-v9 .content-factory > .stage { overflow-x: clip; }
  body.spatial-layout.composition-v9 .content-factory .factory-film { width: min(55vw,270px); }
  body.spatial-layout.composition-v9 .content-factory .factory-film figcaption { font-size: 16px; }

  body.spatial-layout.composition-v9 .closing { padding: 100px var(--pad) 100px; min-height: 0; }
  body.spatial-layout.composition-v9 .closing > .eyebrow { position: relative; inset: auto; }
  body.spatial-layout.composition-v9.story-v7 .closing h2 { position: relative; inset: auto; width: 100%; max-width: none; font-size: clamp(42px,12.5vw,70px); line-height: 1.03; margin: 24px 0 30px; }
  body.spatial-layout.composition-v9 .closing-intro { position: relative; inset: auto; width: 100%; display: block; font-size: 18px; line-height: 1.45; margin: 0; }
  body.spatial-layout.composition-v9 .closing-shape-anchor { position: absolute; width: 220px; height: 220px; left: 50%; top: 50%; translate: -50% -50%; }
  body.spatial-layout.composition-v9 .discussion { position: relative; inset: auto; display: grid; place-items: center; justify-content: center; height: 270px; padding: 0; margin: 30px 0; }
  body.spatial-layout.composition-v9 .discuss-button { position: relative; inset: auto; translate: none; width: 120px; height: 120px; align-self: auto; background: transparent; color: var(--ink); font-size: 18px; gap: 4px; }
  body.spatial-layout.composition-v9 .closing footer { position: relative; inset: auto; border: 0; padding: 0; font-size: 14px; }
  body.spatial-layout.composition-v9:is(.motion-off,:not(.has-3d)) :is(.marketing-shape-anchor,.factory-roller-anchor) { display: none; }
  body.spatial-layout.composition-v9:is(.motion-off,:not(.has-3d)) .factory-art { margin-top: 40px; }
  body.spatial-layout.composition-v9:is(.motion-off,:not(.has-3d)) .discuss-button { background: var(--blue); color: #fff; }
}
