/* The community worktable borrows the paper grain from the original Play foldout.
   Its colour runs down the whole sheet, including the space between projects. */
.ec-page.cw-page,
.ec-page.ec-community,
body.playground-page:has(.pg-projects),
body.playground-page:has(.pg-hero-print) {
  --maker-fibre: url('https://dcts99982ui0s.cloudfront.net/images/cab7800f-14ea-4d7c-bc15-9e324b937e4d.webp');
  --maker-stock: linear-gradient(163deg, #dce6e9 0%, #f7faf8 32%, #fff0ef 69%, #e8d3d3 100%);
  background-color: #efe9e1;
  background-image: var(--maker-fibre), var(--maker-stock);
  background-size: 680px auto, 100% 100%;
  background-repeat: repeat, no-repeat;
  background-blend-mode: multiply, normal;
}

.ec-page.cw-page {
  --cw-rule: rgb(74 57 59 / .24);
  position: relative;
  isolation: isolate;
}

/* A broad silver diagonal follows the awning in the lapel photograph. Only the
   imprint fades; the portrait, text and controls are always on their own plane. */
.cw-page:not(.cw-detail)::before,
.ec-page.ec-community::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: min(100%, clamp(28rem, 64vw, 65rem));
  z-index: -1;
  pointer-events: none;
  mask-image: linear-gradient(black 0 46%, transparent 100%);
}
.cw-page:not(.cw-detail)::before {
  background: linear-gradient(158deg,
    rgb(76 84 91 / .10), rgb(76 84 91 / .065) 20%, transparent 23% 29%,
    rgb(255 255 255 / .46) 30% 36%, transparent 38%);
}

.ec-page.cw-detail {
  --maker-stock: linear-gradient(151deg, #e4dbd0, #fff9f0 27%, #edd5d4 57%, #fff4ec 83%, #e9d3cb);
}
.cw-detail .cw-screen,
.ec-community .ec-developer {
  position: relative;
  isolation: isolate;
  background: transparent;
}
.cw-detail .cw-screen::before,
.ec-community .ec-developer::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  /* Both hems fade within the section's padding, away from its content. */
  mask-image: linear-gradient(to bottom, transparent, black 22px, black calc(100% - 22px), transparent);
}
.cw-detail .cw-screen::before {
  background-color: #232735;
  /* The upper-left corner of the original Star Stitch cover is blank blue twill. */
  background-image: linear-gradient(110deg, rgb(31 37 50 / .54), rgb(50 42 53 / .84)),
    url('https://dcts99982ui0s.cloudfront.net/images/3ab14834-491e-4c35-b577-4b1d9fc5b168.webp');
  background-repeat: no-repeat;
  background-position: center, left top;
  background-size: cover, max(250%, 1600px) auto;
}

.ec-page.ec-community {
  --maker-stock: linear-gradient(165deg, #deedf4, #f7fbff 30%, #c8d9e9 66%, #f0f2ec 100%);
  position: relative;
  isolation: isolate;
}
.ec-page.ec-community::before {
  /* The light registration grid alludes to the stitch chart and desktop editor. */
  background-image: linear-gradient(90deg, rgb(41 80 105 / .07) 1px, transparent 1px),
    linear-gradient(rgb(41 80 105 / .07) 1px, transparent 1px);
  background-size: 34px 34px;
}
.ec-page.ec-community :is(.hp-subnav, .ec-releases) {background: transparent}
.ec-community .ec-developer::before {
  background-color: #314456;
  background-image: linear-gradient(130deg, rgb(32 45 60 / .76), rgb(48 55 75 / .71)),
    url('https://dcts99982ui0s.cloudfront.net/images/b5399d9c-56df-4388-a22c-84d6bacc5f50.webp');
  background-size: cover;
  background-position: center;
  background-blend-mode: normal, luminosity;
}

/* The directory shares the featured ribbon project's stock. The practice
   library keeps its original poster and carries its ink into the surrounding paper. */
body.playground-page:has(.pg-projects) {
  --maker-stock: linear-gradient(161deg, #e9dedb, #fffbf2 33%, #f0e3e0 72%, #e0dddf 100%);
}
body.playground-page:has(.pg-hero-print) {
  --maker-stock: linear-gradient(159deg, #d7e5ea, #fcfbec 33%, #eef0df 71%, #d4dfdf);
}
body.playground-page:has(:is(.pg-projects, .pg-hero-print)) .sa-play-nav,
body.playground-page:has(.pg-hero-print) .pg-hero {background: transparent}

@media (forced-colors: active) {
  .cw-page:not(.cw-detail)::before, .ec-page.ec-community::before,
  .cw-detail .cw-screen::before, .ec-community .ec-developer::before {display:none}
}
