/* Stellar lab: experiments. Loaded last on every cloned page.
   Everything under html.dz is the DUST REQUIEM pass (colours themselves come from dust.js,
   which converts term.css + the scripts; this file does what a colour swap can't). */

/* ── lab tag (bottom right) */

/* ── DUST REQUIEM ───────────────────────────────────────────────────────── */
html.dz { --dz-void: #281A15; --dz-night: #17100E; --dz-cocoa: #604035; --dz-bg: none; }

/* one scene per page, all from the Broken Soul set */
html.dz:has(body.sa-tpl-products)    { --dz-bg: url(dz-bg-6042f3-page.webp); }  /* the station platform (city direction) */

/* the space video goes; the scene is a still painting behind everything */
html.dz .t-space, html.dz .t-space-fx { display: none !important; }
html.dz { background: var(--dz-void) var(--dz-bg) center / cover no-repeat fixed !important; }
html.dz body.t-body { background: transparent !important; }
/* haze over the scene: the light stays at the top (where the sun / rays are), dust settles at the bottom */
html.dz body.t-body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 0%, transparent 0 40%, color-mix(in srgb, var(--dz-void) 55%, transparent) 100%),
    linear-gradient(180deg, color-mix(in srgb, #E7C8BE 6%, transparent), transparent 35%, color-mix(in srgb, var(--dz-void) 35%, transparent));
}

/* the window: dusty glass over the scene instead of a black slab */
@media (min-width: 860px) {
  html.dz .t-space-tint {
    background: color-mix(in srgb, var(--dz-void) 84%, transparent) !important;
  }
  html.dz body.t-body .t-space-tint { -webkit-backdrop-filter: blur(3px) sepia(.2) !important; backdrop-filter: blur(3px) sepia(.2) !important; }
}
/* phones: no window, the whole page sits on a heavier veil */
@media (max-width: 859px) {
  html.dz body.t-body::before { background: color-mix(in srgb, var(--dz-void) 86%, transparent); }
}

/* sidebar: one colour for "this page" everywhere (was green / pink / cyan / yellow per page) */
html.dz .t-slot { --hc: #D3AD9F !important; --hd: #966E61 !important; --hl: #E7C8BE !important; --hs: #281A15 !important; }

/* selection + focus in the palette */
html.dz ::selection { background: #AC8476; color: #281A15; }
html.dz :focus-visible { outline-color: #D3AD9F; }

/* product media
   · the black hole (its video + pictures): M cycles natural → warm → duotone; duotone is the default.
     Duotone = a gradient map onto the ramp (svg filter #dz-duo, built in base.js).
   · every other image (contact sheet, product pictures): raw colours, softened so they sit in the dust
     instead of shouting: less saturation, less contrast, a breath of warmth. */
html.dz.dz-media-duo .ehx-stage canvas { filter: url(#dz-duo); }
html.dz .t-content img:not([src*="favicon"]) { filter: saturate(.6) contrast(.86) brightness(.94) sepia(.1); }
html.dz .ehx-shot__img { filter: saturate(.6) contrast(.86) sepia(.1) brightness(.45); }
html.dz .ehx-shot:is(:hover, :focus-visible) .ehx-shot__img { filter: saturate(.6) contrast(.86) sepia(.1) brightness(.8); }
html.dz .ehx-shot.is-on .ehx-shot__img { filter: saturate(.6) contrast(.86) sepia(.1) brightness(.94); }

/* ── A + B: THE SUN (W toggles; on by default) ─────────────────────────────
   A · PAPER #F7EDE8, a warm white above BONE, the colour of the sun in the paintings:
       only for what must be read first (titles, product names, prices, the selected item).
   B · inversion: the one action per screen is a PAPER plate with VOID ink.
   Text moves up a level: PAPER titles · BONE body · HAZE labels (solid, no alpha over the painting). */
html.dz.dz-sun {
  --dz-paper: #F7EDE8;
  --fg: #F7EDE8;
  --fg-text: #E7C8BE;
  --fg-dim: #D3AD9F;
  --accent: #F7EDE8;
}
/* the glow of the sun: soft, warm, only on PAPER text */
html.dz.dz-sun body.t-body :is(.ehx-name h1, .pix-bh__nm, .pix-game[aria-pressed="true"], .t-slot.is-active .t-slot__label, .sz-page .sz-find) {
  color: var(--dz-paper) !important; text-shadow: 0 0 22px rgba(247, 237, 232, .28) !important;
}
/* first read: names + prices */
html.dz.dz-sun .pix-row .pix-name { color: var(--dz-paper); }
html.dz.dz-sun .pix-row .pix-price { color: #E7C8BE; }
html.dz.dz-sun .ehx-plan:not(.is-off) .v { color: var(--dz-paper); }
html.dz.dz-sun .ehx-plan .t { color: #D3AD9F; }
html.dz.dz-sun .nb .nb-text { color: var(--dz-paper); }

/* B · plates. Product page: the plan you point at becomes the plate (clicking it buys) */
html.dz.dz-sun .ehx-plan { transition: background-color .25s, border-color .25s; }
html.dz.dz-sun .ehx-plan:not(.is-off):is(:hover, :focus-within) { background: var(--dz-paper); border-color: var(--dz-paper); }
html.dz.dz-sun body.t-body .ehx-plan:not(.is-off):is(:hover, :focus-within) { box-shadow: 0 0 34px rgba(247, 237, 232, .22) !important; }
html.dz.dz-sun .ehx-plan:not(.is-off):is(:hover, :focus-within) :is(.t, .v) { color: #281A15 !important; }
html.dz.dz-sun .ehx-plan:not(.is-off):is(:hover, :focus-within) .ehx-buy { color: #281A15 !important; font-weight: 600; }
html.dz.dz-sun .ehx-plan:not(.is-off):is(:hover, :focus-within) .ehx-add { color: #7C574B !important; }
html.dz.dz-sun .ehx-plan:not(.is-off):is(:hover, :focus-within) .ehx-add:hover { color: #281A15 !important; }
/* home: BROWSE PRODUCTS is the plate, JOIN DISCORD stays a line */
html.dz.dz-sun #orb-browse .orb-label { background: var(--dz-paper); color: #281A15; padding: 9px 16px; }
html.dz.dz-sun #orb-browse .orb-label b { color: #7C574B; }
html.dz.dz-sun body.t-body #orb-browse:is(:hover, :focus-visible) .orb-label { box-shadow: 0 0 30px rgba(247, 237, 232, .3) !important; }
/* cart: checkout is the plate */
html.dz.dz-sun body.t-body :is(.sc-checkout, .cpl-checkout) { background: var(--dz-paper) !important; color: #281A15 !important; border-color: var(--dz-paper) !important; }
html.dz.dz-sun .cpl-checkout { padding-right: .5em !important; }
html.dz.dz-sun .sc-checkout canvas { opacity: .25; mix-blend-mode: multiply; }
/* FAQ / docs: the Discord box gets the sun on its border + text, its pixel animation stays */
html.dz.dz-sun .cm-cta { border-color: #AC8476; color: var(--dz-paper); }

/* readability: calmer glass where there is a lot of text */
@media (min-width: 860px) {
  html.dz.dz-sun:has(body:is(.sa-tpl-products, .sa-tpl-faq, .sa-tpl-cart, [class*="sa-tpl-custom-page"])) .t-space-tint { background: color-mix(in srgb, var(--dz-void) 91%, transparent) !important; }
  html.dz.dz-sun .t-space-tint { background: color-mix(in srgb, var(--dz-void) 87%, transparent) !important; }
}

/* ALWAYS DARK, WHATEVER THE VISITOR'S SYSTEM SAYS (user, 2026-11-21). The theme's head script already sets dark and ignores the
   system; this is the lock on top of it: the browser's own parts (scroll bars, check boxes, form fields, the page's canvas) are told
   to stay dark too, and a stray light marker on <html> changes nothing. `only` also asks browsers not to restyle the page themselves. */
html.dz, html.dz[data-theme], html.dz[data-scheme] { color-scheme: only dark !important; }