/* bs-world-guest — more neutral grey-white ground for the gongbi world.
   Peyton (t1252): the warm rice-paper is not truly black / white / grey.
   Applied when html is NOT .bs-world-color. Revert by removing this stylesheet.
   Does not change layout, radii, the nose logo, user media, or duvet assets. */

html:not(.bs-world-color) {
  --gh-paper: #F3F2F0;
  --gh-paper-2: #EEEDEA;
  --gh-sheet: #F7F7F5;
  --gh-wash: #E8E7E4;
  --gh-ink-mist: rgba(40, 40, 40, 0.05);
  --gh-ink-pool: rgba(40, 40, 40, 0.08);
  --wl-soft: #F6F6F4;
  --wl-grey: #EEEEEC;
  --wl-edge: #E4E3E0;
}

html:not(.bs-world-color),
html:not(.bs-world-color) body,
html:not(.bs-world-color) body[data-holiday],
html:not(.bs-world-color) #app,
html:not(.bs-world-color) body[data-holiday] #app {
  background-color: #F3F2F0 !important; /* bs-lineart-bg-v1: grey-white fallback; art is line-art V1 */
  background-image: none !important;
}
html:not(.bs-world-color) body,
html:not(.bs-world-color) body[data-holiday],
html:not(.bs-world-color) #app,
html:not(.bs-world-color) body[data-holiday] #app {
  background-color: transparent !important;
}
/* bs-lineart-bg-v1 (merge fix): the V1 plate sits on ONE fixed viewport layer, like the color world's #bsWorldPaint.
   Before, html + body + #app each painted it with background-size:cover against the full document height
   (Feed ~4000 px), so it was blown up ~1.7x, cropped, drawn three times, and scrolled with the page. */
html:not(.bs-world-color) body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: #F3F2F0;
  background-image: url("media/bg/lineart-V1.jpg"); /* fallback: browsers without image-set type() keep the JPG */
  background-image: -webkit-image-set(url("media/bg/lineart-V1.webp") type("image/webp"), url("media/bg/lineart-V1.jpg") type("image/jpeg"));
  background-image: image-set(url("media/bg/lineart-V1.webp") type("image/webp"), url("media/bg/lineart-V1.jpg") type("image/jpeg"));
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}
html:not(.bs-world-color):has(#bsDuvetStage) body::before { display: none; }

html:not(.bs-world-color) header,
html:not(.bs-world-color) body[data-holiday] header,
html:not(.bs-world-color).bs-white-layers header,
html:not(.bs-world-color).bs-white-layers body[data-holiday] header {
  background-color: #F4F3F1 !important;
  background-image: none !important;
}

html:not(.bs-world-color) nav,
html:not(.bs-world-color) html body nav.bs-nav5,
html:not(.bs-world-color) body nav.bs-nav5,
html:not(.bs-world-color) body[data-holiday] nav,
html:not(.bs-world-color).bs-white-layers nav,
html:not(.bs-world-color).bs-white-layers body nav.bs-nav5,
html:not(.bs-world-color).bs-white-layers body[data-holiday] nav {
  background-color: #F4F3F1 !important;
}

/* Cool the leftover warm washes from white-layers / rice-paper base */
html:not(.bs-world-color).bs-white-layers header,
html:not(.bs-world-color).bs-white-layers nav,
html:not(.bs-world-color).bs-white-layers body nav.bs-nav5 {
  background-color: #F4F3F1 !important;
}

html:not(.bs-world-color).bs-white-layers .home-post-row textarea,
html:not(.bs-world-color).bs-white-layers .home-post-row input,
html:not(.bs-world-color).bs-white-layers input:not([type=range]):not([type=checkbox]):not([type=radio]):not([type=hidden]),
html:not(.bs-world-color).bs-white-layers textarea,
html:not(.bs-world-color).bs-white-layers select,
html:not(.bs-world-color).bs-white-layers .irow,
html:not(.bs-world-color).bs-white-layers .offense-search-in {
  background: #F6F6F4 !important;
  border-color: #E4E3E0 !important;
  outline-color: #E4E3E0 !important;
}

html:not(.bs-world-color).bs-white-layers .pill:not(.on),
html:not(.bs-world-color).bs-white-layers .mpill:not(.on),
html:not(.bs-world-color).bs-white-layers .mcat-pill:not(.on),
html:not(.bs-world-color).bs-white-layers .btn.ghost,
html:not(.bs-world-color).bs-white-layers a.btn.ghost,
html:not(.bs-world-color).bs-white-layers button.btn.ghost,
html:not(.bs-world-color).bs-white-layers .btn.skip,
html:not(.bs-world-color).bs-white-layers .btn.soft,
html:not(.bs-world-color).bs-white-layers .e-earn,
html:not(.bs-world-color).bs-white-layers .me-pet-pill,
html:not(.bs-world-color).bs-white-layers .me-acc-btn,
html:not(.bs-world-color).bs-white-layers .vision-pill,
html:not(.bs-world-color).bs-white-layers .fnd-pill,
html:not(.bs-world-color).bs-white-layers .fnd-ban,
html:not(.bs-world-color).bs-white-layers .bs-ico-btn,
html:not(.bs-world-color).bs-white-layers a.bs-ico-btn,
html:not(.bs-world-color).bs-white-layers button.bs-ico-btn,
html:not(.bs-world-color).bs-white-layers .cat,
html:not(.bs-world-color).bs-white-layers button.cat {
  background: #EEEEEC !important;
}

html:not(.bs-world-color).bs-white-layers .me-row,
html:not(.bs-world-color).bs-white-layers .me-account,
html:not(.bs-world-color).bs-white-layers .me-acc-h,
html:not(.bs-world-color).bs-white-layers .home-post-opts {
  background-image: linear-gradient(90deg, transparent 0%, #E4E3E0 16%, #E4E3E0 84%, transparent 100%) !important;
}

html:not(.bs-world-color).bs-white-layers header::after,
html:not(.bs-world-color).bs-white-layers body[data-holiday] header::after {
  background: linear-gradient(90deg, transparent, #E4E3E0 18%, #E4E3E0 82%, transparent);
}

html:not(.bs-world-color).bs-white-layers body nav.bs-nav5::before {
  background: linear-gradient(90deg, transparent, #E4E3E0 18%, #E4E3E0 82%, transparent);
}

/* Duvet stage mist follows the cooler wall — assets themselves are untouched */
html:not(.bs-world-color).bs-white-layers #bsDuvetStage::after {
  background: radial-gradient(ellipse 90% 78% at 50% 48%,
    transparent 58%,
    rgba(243, 242, 240, 0.22) 82%,
    rgba(243, 242, 240, 0.55) 100%);
}

/* Never filter user media, the nose logo, or the color Corgi */
html:not(.bs-world-color) .bs-pup-color,
html:not(.bs-world-color) #bsPupColor,
html:not(.bs-world-color) img.bs-pup-color,
html:not(.bs-world-color) #headColor,
html:not(.bs-world-color) #headColor img,
html:not(.bs-world-color) video.bs-post-vid,
html:not(.bs-world-color) .funny-media img,
html:not(.bs-world-color) .funny-media video,
html:not(.bs-world-color) .home-post img:not(.dnose),
html:not(.bs-world-color) .home-post video,
html:not(.bs-world-color) .media-stage-wrap img:not(.dnose),
html:not(.bs-world-color) .media-stage-wrap video,
html:not(.bs-world-color) .av img {
  /* no extra filter */
}

/* bs-lineart-bg-v1: keep Friend Requests opaque over V1 pine / hut in the ink world too. */
html:not(.bs-world-color) #twoWayStatusCard {
  background-color: #F7F7F5 !important;
  background-image: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

/* bs-lineart-bg-v1: the signed-out duvet landing stays on the plain grey-white wall. */
html:not(.bs-world-color):has(#bsDuvetStage) body,
html:not(.bs-world-color):has(#bsDuvetStage) #app,
html:not(.bs-world-color):has(#bsDuvetStage) body[data-holiday],
html:not(.bs-world-color):has(#bsDuvetStage) body[data-holiday] #app {
  background-image: none !important;
  background-color: #F3F2F0 !important;
}
