/* Lighter encodings of the accepted artwork. Layout, framing and overlays stay in each page's stylesheet. */
:root {
  --scenery-workshop: url('./scenery-v1/workshop-1536.webp');
  --scenery-meadow: url('./scenery-v1/meadow-1536.webp');
}
@media (max-width: 900px) {
  :root {
    --scenery-workshop: image-set(url('./scenery-v1/workshop-960.webp') 1x, url('./scenery-v1/workshop-1536.webp') 2x);
    --scenery-meadow: image-set(url('./scenery-v1/meadow-960.webp') 1x, url('./scenery-v1/meadow-1536.webp') 2x);
  }
}
@media (max-width: 650px) {
  :root {
    --scenery-workshop: image-set(url('./scenery-v1/workshop-640.webp') 1x, url('./scenery-v1/workshop-960.webp') 2x, url('./scenery-v1/workshop-1280.webp') 3x);
    --scenery-meadow: image-set(url('./scenery-v1/meadow-640.webp') 1x, url('./scenery-v1/meadow-960.webp') 2x, url('./scenery-v1/meadow-1280.webp') 3x);
  }
}
html:root .family-entry-page .world-background,
html:root[data-role=parent] body.integration-page .world-background {
  background-image: var(--scenery-workshop);
}
html:root[data-role=student] body.integration-page .world-background {
  background-image: var(--scenery-meadow);
}
html:root .family-entry-page .choice-art {
  background-image: linear-gradient(#edf3e1aa, #f8f3e8aa), var(--scenery-workshop);
}
html:root .family-entry-page .family-choice--children .choice-art {
  background-image: linear-gradient(#f9f6ef40, #f9f6ef40), var(--scenery-meadow);
}
/* One persistent background outside the route view prevents changes on navigation. */
.portal-main-document { scrollbar-gutter: stable; }
body.portal-main {
  position: relative;
  isolation: isolate;
  background: var(--background);
}
body.portal-main .cover-page { background: none; }
body.portal-main .home-scenery { display: none; }
.portal-main > .portal-scenery {
  position: absolute;
  inset: 0 0 auto;
  height: 940px;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(ellipse at 4% 65%, #dfe9d580, transparent 35%), radial-gradient(ellipse at 97% 80%, #e9e0ed55, transparent 34%), radial-gradient(ellipse at 55% 24%, #fffdf8 0, transparent 62%);
}
.portal-main > .portal-scenery::before,
.portal-main > .portal-scenery::after {
  content: "";
  position: absolute;
  inset: 0;
}
.portal-main > .portal-scenery::before {
  background: var(--scenery-meadow) center top / cover no-repeat;
  opacity: .5;
  -webkit-mask-image: linear-gradient(black 0%, black 17%, transparent 48%);
  mask-image: linear-gradient(black 0%, black 17%, transparent 48%);
}
.portal-main > .portal-scenery::after {
  background: linear-gradient(90deg, #fff9ef55 0%, #fff9efd9 23%, #fff9eff2 61%, #fff9ef77 100%), linear-gradient(#fff9ef1a 0%, #fff9ef22 48%, #fff9ef 100%);
}
/* Only the tree fragment reaches the narrow-screen corner, with a soft fade. */
@media (max-width: 900px) {
  .portal-main > .portal-scenery {
    height: clamp(210px, 30vw, 240px);
    background: none;
  }
  .portal-main > .portal-scenery::before {
    width: clamp(240px, 65vw, 420px);
    background-position: left top;
    background-size: auto 800px;
    -webkit-mask-image: linear-gradient(to right, #000 0%, #000 15%, transparent 90%), linear-gradient(to bottom, #000 0%, #000 15%, transparent 75%);
    mask-image: linear-gradient(to right, #000 0%, #000 15%, transparent 90%), linear-gradient(to bottom, #000 0%, #000 15%, transparent 75%);
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
  }
  .portal-main > .portal-scenery::after {
    background: linear-gradient(90deg, #fff9ef33 0%, #fff9ef99 28%, #fff9ef 65%, #fff9ef 100%);
  }
}
@media print {
  body.portal-main { background: white; }
  .portal-main > .portal-scenery { display: none; }
}
