/* T4b｜黑色沙漠 — bg pack v1 (網藝 full-bleed canvas + ash-seamless, approved 2026-10-09).
   Loaded only with Sink:MaterialT4b on public pages, AFTER t4b-black-desert.css + t4b-retina.css. Admin / R3 never link it.
   Enhances the CSS dark canvas from the BG fix (e17b359): that gradient stays on <html> as the fallback base.
   Layers (root stacking context, all behind content):
     html            #090808 + BG-fix gradients (unchanged fallback if images fail)
     body::after  -2 page-bg-fullbleed-1920x2400 (desktop: fixed, bottom rock field; ≤768: scrolls, top scene → rock), dimmed for card legibility; side-haze ≥1600px
     body::before -1 ash-seamless repeat, grayscale, 8% (supersedes the BG-fix rock-seamless 6% layer)
   Remove this file's <link> in _Layout to revert to the pure-CSS canvas. See docs/T4B-BG-PACK.md. */
html:has(>body.sink-t4b){background-color:#090808}

/* Full-bleed canvas. Desktop (>768): fixed viewport layer, cover, anchored to the art's BOTTOM (the mirrored dark-rock
   extension). Anchoring top (README sample) parks the hero figure + the scene/rock seam behind every scroll position
   and duplicates the hero / sub-page band art; bottom keeps a calm continuous rock field behind the floating cards. */
body.sink-t4b::after{content:"";position:fixed;inset:0;z-index:-2;pointer-events:none;
  background:
    linear-gradient(180deg,rgba(9,8,8,.18) 0%,rgba(9,8,8,.30) 55%,rgba(9,8,8,.50) 100%),
    url(/assets/t4b/bg/page-bg-fullbleed-1920x2400.webp) center bottom/cover no-repeat,
    #090808}

/* Ash-seamless texture (544×320 tile, @2x on HiDPI). Overrides the BG-fix rock layer in place. */
body.sink-t4b::before{background-image:url(/assets/t4b/bg/ash-seamless.webp);
  background-image:image-set(url(/assets/t4b/bg/ash-seamless.webp) type("image/webp") 1x,url(/assets/t4b/bg/ash-seamless@2x.webp) type("image/webp") 2x);
  background-repeat:repeat;background-size:544px 320px;opacity:.08;filter:grayscale(1)}

/* Ultra-wide: soft side haze on the viewport edges (64px RGBA strips, stretched to viewport height). */
@media (min-width:1600px){
  body.sink-t4b::after{background:
    url(/assets/t4b/bg/side-haze-left-64x2400.png) left top/64px 100% no-repeat,
    url(/assets/t4b/bg/side-haze-right-64x2400.png) right top/64px 100% no-repeat,
    linear-gradient(180deg,rgba(9,8,8,.18) 0%,rgba(9,8,8,.30) 55%,rgba(9,8,8,.50) 100%),
    url(/assets/t4b/bg/page-bg-fullbleed-1920x2400.webp) center bottom/cover no-repeat,
    #090808}
}

/* ≤768: no fixed canvas (mobile repaint/URL-bar jank). The layer scrolls with the document instead:
   absolute over the whole body, art scaled to ≥1280px wide (≈1600px tall) so the dark rock continues
   well below the hero; past that the #090808 base + ash texture carry on seamlessly (art bottom ≈ #040403). */
@media (max-width:768px){
  body.sink-t4b::after{position:absolute;
    background:
      linear-gradient(180deg,rgba(9,8,8,.30) 0%,rgba(9,8,8,.55) 40%,rgba(9,8,8,.75) 1600px,#090808 100%),
      url(/assets/t4b/bg/page-bg-fullbleed-1920x2400.webp) center top/max(100%,1280px) auto no-repeat,
      #090808}
}
