/* Keep the scene selector and its task film on the same visual edges.
   Only this chapter fits the viewport; the rest of the homepage keeps its width. */
@media (min-width:761px) {
  body.rle-gallery-fit main > :is(#scene-showcase, #tasks) {
    width:min(var(--gallery-fit-width,1240px),calc(100% - 96px))!important;
    max-width:none;
    margin-inline:auto;
  }
  body.rle-gallery-fit main > #scene-showcase { padding-bottom:0!important; }
  body.rle-gallery-fit #scene-gallery-window { scroll-margin-top:calc(var(--gallery-fit-header,74px) + 14px); }
  body.rle-gallery-fit #scene-showcase .object-media {
    height:var(--gallery-fit-strip-height,110px);
    aspect-ratio:auto;
  }
  body.rle-gallery-fit #scene-showcase .object-media :is(video,img):not(:fullscreen) { object-fit:cover; }
  body.rle-gallery-fit #scene-showcase .physics-copy { padding-top:8px; }
  body.rle-gallery-fit #scene-showcase .physics-copy h3 {
    font-size:18px!important;line-height:1.25!important;margin:0!important;
  }
  body.rle-gallery-fit main > #tasks { padding-top:18px!important; padding-bottom:18px; }
  body.rle-gallery-fit main > #tasks > .section-heading {
    display:flex;width:100%;justify-content:space-between;align-items:baseline;
    margin:0 0 10px!important;gap:20px;
  }
  body.rle-gallery-fit #tasks .task-layout:not([hidden]) { display:block; }
  body.rle-gallery-fit #tasks .task-screen { width:100%;margin:0;aspect-ratio:16/9; }
  body.rle-gallery-fit #tasks .task-screen video { width:100%;height:100%;object-fit:contain; }
}
/* The compact thumbnail crop must never carry into native fullscreen. */
body.rle-gallery-fit #scene-showcase video:fullscreen,
body.rle-gallery-fit #tasks video:fullscreen {width:100vw!important;height:100vh!important;object-fit:contain!important;background:#000;}
