/* =====================================================================
   hub-backgrounds.css: the hub's six wallpapers and three solids, each in light and dark.
   Unified-Hub/backgrounds (Oct 2026). Pure CSS: gradients and blur on the five shapes of the
   approved prototype's wallpaper. No images; the same five layers and blur values on every preset.

     1 coral       Coral       Coral   (default; sidebar-prototype.html's own .bg)
     2 dune        Dune        Duna
     3 eucalyptus  Eucalyptus  Eucalipto
     4 lagoon      Lagoon      Laguna
     5 harbor      Harbor      Bahía
     6 lavender    Lavender    Lavanda

   Markup (fixed behind everything, first child of <body>):
     <div class="bg" aria-hidden="true"><i class="b1"></i><i class="b2"></i><i class="b3"></i><i class="b4"></i><i class="b5"></i></div>
   Choose with <html data-theme="light|dark" data-bg="<id>">.
   - Light is the default: <html> with no data-theme (or any value but "dark") shows the light version.
     A page with no data-theme that sets the Studio's html.bg-dark shows the dark version.
   - Coral is written as the base rules, so html:not([data-bg]), data-bg="coral" and any unknown value
     (the Studio's old "greige", a photo id) all show Coral. Every other preset matches html[data-bg=<id>],
     which is more specific, and restates every position, size, transform, colour and blur of all five
     shapes, so nothing carries over from Coral.
   Crossfades (400ms, ease-in-out) come from hub-backgrounds.js: HubBg.apply(id) and HubBg.crossfade(fn).
   ===================================================================== */

/* ---- 1. Coral (Coral): the declarations of sidebar-prototype.html's wallpaper, verbatim ---- */
.bg{position:fixed;inset:0;z-index:0;overflow:hidden;pointer-events:none;background:var(--bg-base)}
.bg i{position:absolute;display:block;border-radius:50%}
/* soft diagonal sweeps, like the file's wallpaper, in navy / coral / sage */
:root .bg{--bg-base:linear-gradient(160deg,#eee4d6 0%,#e6d9c6 55%,#dfcfb8 100%)}
:root .bg .b1{right:-34%;top:-20%;width:120%;height:72%;transform:rotate(-34deg);
  background:linear-gradient(90deg,rgba(241,91,79,0) 0%,rgba(241,91,79,.28) 46%,rgba(241,91,79,.46) 100%);filter:blur(70px)}
:root .bg .b2{left:-36%;top:30%;width:150%;height:46%;transform:rotate(-34deg);
  background:linear-gradient(90deg,rgba(250,246,240,.95),rgba(244,236,226,.9) 60%,rgba(236,226,212,.85));filter:blur(46px)}
:root .bg .b3{left:-22%;bottom:-30%;width:70%;height:70%;background:rgba(126,152,152,.42);filter:blur(120px)}
:root .bg .b4{right:-34%;bottom:-26%;width:110%;height:44%;transform:rotate(-34deg);background:rgba(196,170,138,.55);filter:blur(56px)}
:root .bg .b5{left:-12%;top:-26%;width:62%;height:58%;transform:rotate(-34deg);background:rgba(241,91,79,.16);filter:blur(110px)}
:root[data-theme=dark] .bg,
:root.bg-dark:not([data-theme]) .bg{--bg-base:linear-gradient(160deg,#0f2a3b 0%,#133042 45%,#0a1c28 100%)}
:root[data-theme=dark] .bg .b1,
:root.bg-dark:not([data-theme]) .bg .b1{right:-34%;top:-20%;width:120%;height:72%;transform:rotate(-34deg);
  background:linear-gradient(90deg,rgba(241,91,79,0) 0%,rgba(241,91,79,.62) 46%,rgba(214,78,68,.92) 100%);filter:blur(70px)}
:root[data-theme=dark] .bg .b2,
:root.bg-dark:not([data-theme]) .bg .b2{left:-36%;top:30%;width:150%;height:46%;transform:rotate(-34deg);
  background:linear-gradient(90deg,rgba(34,82,108,.95),rgba(21,54,74,.9) 60%,rgba(12,34,48,.85));filter:blur(46px)}
:root[data-theme=dark] .bg .b3,
:root.bg-dark:not([data-theme]) .bg .b3{left:-22%;bottom:-30%;width:70%;height:70%;background:rgba(126,152,152,.42);filter:blur(120px)}
:root[data-theme=dark] .bg .b4,
:root.bg-dark:not([data-theme]) .bg .b4{right:-34%;bottom:-26%;width:110%;height:44%;transform:rotate(-34deg);background:rgba(5,15,23,.85);filter:blur(56px)}
:root[data-theme=dark] .bg .b5,
:root.bg-dark:not([data-theme]) .bg .b5{left:-12%;top:-26%;width:62%;height:58%;transform:rotate(-34deg);background:rgba(241,91,79,.30);filter:blur(110px)}
/* Coral at about 30% (owner 2026-11-08: "bájale la opacidad como al 30%"; dark had a strong red glow): the wallpaper is drawn as it
   always was and a veil of the page's neutral at 70% lies over it, which is the wallpaper at 30% opacity over that neutral, in
   both modes (a warm white in light, a near-black graphite in dark). Only Coral (the base rules, so also html:not([data-bg]) and an
   unknown value): every other preset turns the veil off below. The canvas and the Coral swatch are the veiled colours. */
.bg::after{content:'';position:absolute;inset:0;background:#fdfbf8;opacity:.7}
:root[data-theme=dark] .bg::after,:root.bg-dark:not([data-theme]) .bg::after{background:#101315}
html:is([data-bg=dune],[data-bg=eucalyptus],[data-bg=lagoon],[data-bg=harbor],[data-bg=lavender],[data-bg=white],[data-bg=offwhite],[data-bg=bone]) .bg::after{display:none}

/* ---- 2. Dune (Duna): gold over espresso; butter cream, ochre and warm stone in light ---- */
html[data-bg=dune] .bg{--bg-base:linear-gradient(160deg,#f7eed6 0%,#f1e3c0 55%,#e8d4a8 100%)}
html[data-bg=dune] .bg .b1{left:auto;right:-34%;top:-20%;bottom:auto;width:120%;height:72%;transform:rotate(-34deg);
  background:linear-gradient(90deg,rgba(224,170,66,0) 0%,rgba(224,170,66,.42) 46%,rgba(212,154,50,.6) 100%);filter:blur(70px)}
html[data-bg=dune] .bg .b2{left:-36%;right:auto;top:30%;bottom:auto;width:150%;height:46%;transform:rotate(-34deg);
  background:linear-gradient(90deg,rgba(252,245,222,.95),rgba(249,238,206,.9) 60%,rgba(242,227,190,.85));filter:blur(46px)}
html[data-bg=dune] .bg .b3{left:-22%;right:auto;top:auto;bottom:-30%;width:70%;height:70%;transform:none;
  background:rgba(206,188,160,.5);filter:blur(120px)}
html[data-bg=dune] .bg .b4{left:auto;right:-34%;top:auto;bottom:-26%;width:110%;height:44%;transform:rotate(-34deg);
  background:rgba(200,152,72,.46);filter:blur(56px)}
html[data-bg=dune] .bg .b5{left:-12%;right:auto;top:-26%;bottom:auto;width:62%;height:58%;transform:rotate(-34deg);
  background:rgba(222,170,70,.18);filter:blur(110px)}
html[data-bg=dune][data-theme=dark] .bg,
html[data-bg=dune].bg-dark:not([data-theme]) .bg{--bg-base:linear-gradient(160deg,#1c1610 0%,#231b13 45%,#0f0b08 100%)}
html[data-bg=dune][data-theme=dark] .bg .b1,
html[data-bg=dune].bg-dark:not([data-theme]) .bg .b1{left:auto;right:-34%;top:-20%;bottom:auto;width:120%;height:72%;transform:rotate(-34deg);
  background:linear-gradient(90deg,rgba(226,170,76,0) 0%,rgba(226,170,76,.44) 46%,rgba(212,150,56,.72) 100%);filter:blur(70px)}
html[data-bg=dune][data-theme=dark] .bg .b2,
html[data-bg=dune].bg-dark:not([data-theme]) .bg .b2{left:-36%;right:auto;top:30%;bottom:auto;width:150%;height:46%;transform:rotate(-34deg);
  background:linear-gradient(90deg,rgba(60,44,30,.95),rgba(40,30,21,.9) 60%,rgba(24,18,12,.85));filter:blur(46px)}
html[data-bg=dune][data-theme=dark] .bg .b3,
html[data-bg=dune].bg-dark:not([data-theme]) .bg .b3{left:-22%;right:auto;top:auto;bottom:-30%;width:70%;height:70%;transform:none;
  background:rgba(150,128,108,.28);filter:blur(120px)}
html[data-bg=dune][data-theme=dark] .bg .b4,
html[data-bg=dune].bg-dark:not([data-theme]) .bg .b4{left:auto;right:-34%;top:auto;bottom:-26%;width:110%;height:44%;transform:rotate(-34deg);
  background:rgba(10,7,4,.86);filter:blur(56px)}
html[data-bg=dune][data-theme=dark] .bg .b5,
html[data-bg=dune].bg-dark:not([data-theme]) .bg .b5{left:-12%;right:auto;top:-26%;bottom:auto;width:62%;height:58%;transform:rotate(-34deg);
  background:rgba(214,150,80,.14);filter:blur(110px)}

/* ---- 3. Eucalyptus (Eucalipto): sage-olive over moss and navy; a sage-olive wash in light ---- */
html[data-bg=eucalyptus] .bg{--bg-base:linear-gradient(160deg,#eef1e3 0%,#e2e9d2 55%,#d4dfbf 100%)}
html[data-bg=eucalyptus] .bg .b1{left:auto;right:-34%;top:-20%;bottom:auto;width:120%;height:72%;transform:rotate(-34deg);
  background:linear-gradient(90deg,rgba(134,168,98,0) 0%,rgba(134,168,98,.44) 46%,rgba(116,152,82,.64) 100%);filter:blur(70px)}
html[data-bg=eucalyptus] .bg .b2{left:-36%;right:auto;top:30%;bottom:auto;width:150%;height:46%;transform:rotate(-34deg);
  background:linear-gradient(90deg,rgba(250,251,244,.95),rgba(243,246,234,.9) 60%,rgba(232,237,220,.85));filter:blur(46px)}
html[data-bg=eucalyptus] .bg .b3{left:-22%;right:auto;top:auto;bottom:-30%;width:70%;height:70%;transform:none;
  background:rgba(150,172,140,.42);filter:blur(120px)}
html[data-bg=eucalyptus] .bg .b4{left:auto;right:-34%;top:auto;bottom:-26%;width:110%;height:44%;transform:rotate(-34deg);
  background:rgba(138,162,100,.42);filter:blur(56px)}
html[data-bg=eucalyptus] .bg .b5{left:-12%;right:auto;top:-26%;bottom:auto;width:62%;height:58%;transform:rotate(-34deg);
  background:rgba(130,164,100,.16);filter:blur(110px)}
html[data-bg=eucalyptus][data-theme=dark] .bg,
html[data-bg=eucalyptus].bg-dark:not([data-theme]) .bg{--bg-base:linear-gradient(160deg,#18241f 0%,#1d2b24 45%,#0d1511 100%)}
html[data-bg=eucalyptus][data-theme=dark] .bg .b1,
html[data-bg=eucalyptus].bg-dark:not([data-theme]) .bg .b1{left:auto;right:-34%;top:-20%;bottom:auto;width:120%;height:72%;transform:rotate(-34deg);
  background:linear-gradient(90deg,rgba(150,176,110,0) 16%,rgba(150,176,110,.42) 46%,rgba(128,158,92,.7) 100%);filter:blur(70px)}
html[data-bg=eucalyptus][data-theme=dark] .bg .b2,
html[data-bg=eucalyptus].bg-dark:not([data-theme]) .bg .b2{left:-36%;right:auto;top:30%;bottom:auto;width:150%;height:46%;transform:rotate(-34deg);
  background:linear-gradient(90deg,rgba(34,54,52,.95),rgba(26,40,38,.9) 60%,rgba(14,24,22,.85));filter:blur(46px)}
html[data-bg=eucalyptus][data-theme=dark] .bg .b3,
html[data-bg=eucalyptus].bg-dark:not([data-theme]) .bg .b3{left:-22%;right:auto;top:auto;bottom:-30%;width:70%;height:70%;transform:none;
  background:rgba(172,180,150,.3);filter:blur(120px)}
html[data-bg=eucalyptus][data-theme=dark] .bg .b4,
html[data-bg=eucalyptus].bg-dark:not([data-theme]) .bg .b4{left:auto;right:-34%;top:auto;bottom:-26%;width:110%;height:44%;transform:rotate(-34deg);
  background:rgba(5,12,10,.85);filter:blur(56px)}
html[data-bg=eucalyptus][data-theme=dark] .bg .b5,
html[data-bg=eucalyptus].bg-dark:not([data-theme]) .bg .b5{left:-12%;right:auto;top:-26%;bottom:auto;width:62%;height:58%;transform:rotate(-34deg);
  background:rgba(150,176,110,.1);filter:blur(110px)}

/* ---- 4. Lagoon (Laguna): blue-teal over deep teal and navy; pale aqua in light ---- */
html[data-bg=lagoon] .bg{--bg-base:linear-gradient(160deg,#e1f2f1 0%,#d0eaea 55%,#bbdfe0 100%)}
html[data-bg=lagoon] .bg .b1{left:auto;right:-34%;top:-20%;bottom:auto;width:120%;height:72%;transform:rotate(-34deg);
  background:linear-gradient(90deg,rgba(64,172,180,0) 0%,rgba(64,172,180,.48) 46%,rgba(48,156,168,.7) 100%);filter:blur(70px)}
html[data-bg=lagoon] .bg .b2{left:-36%;right:auto;top:30%;bottom:auto;width:150%;height:46%;transform:rotate(-34deg);
  background:linear-gradient(90deg,rgba(248,252,252,.95),rgba(238,247,248,.9) 60%,rgba(224,239,241,.85));filter:blur(46px)}
html[data-bg=lagoon] .bg .b3{left:-22%;right:auto;top:auto;bottom:-30%;width:70%;height:70%;transform:none;
  background:rgba(140,196,200,.44);filter:blur(120px)}
html[data-bg=lagoon] .bg .b4{left:auto;right:-34%;top:auto;bottom:-26%;width:110%;height:44%;transform:rotate(-34deg);
  background:rgba(96,166,180,.42);filter:blur(56px)}
html[data-bg=lagoon] .bg .b5{left:-12%;right:auto;top:-26%;bottom:auto;width:62%;height:58%;transform:rotate(-34deg);
  background:rgba(80,170,190,.16);filter:blur(110px)}
html[data-bg=lagoon][data-theme=dark] .bg,
html[data-bg=lagoon].bg-dark:not([data-theme]) .bg{--bg-base:linear-gradient(160deg,#082a32 0%,#0b333c 45%,#051c22 100%)}
html[data-bg=lagoon][data-theme=dark] .bg .b1,
html[data-bg=lagoon].bg-dark:not([data-theme]) .bg .b1{left:auto;right:-34%;top:-20%;bottom:auto;width:120%;height:72%;transform:rotate(-34deg);
  background:linear-gradient(90deg,rgba(76,176,176,0) 22%,rgba(76,176,176,.42) 46%,rgba(60,158,160,.74) 100%);filter:blur(70px)}
html[data-bg=lagoon][data-theme=dark] .bg .b2,
html[data-bg=lagoon].bg-dark:not([data-theme]) .bg .b2{left:-36%;right:auto;top:30%;bottom:auto;width:150%;height:46%;transform:rotate(-34deg);
  background:linear-gradient(90deg,rgba(20,66,76,.95),rgba(14,48,56,.9) 60%,rgba(8,30,36,.85));filter:blur(46px)}
html[data-bg=lagoon][data-theme=dark] .bg .b3,
html[data-bg=lagoon].bg-dark:not([data-theme]) .bg .b3{left:-22%;right:auto;top:auto;bottom:-30%;width:70%;height:70%;transform:none;
  background:rgba(130,180,176,.34);filter:blur(120px)}
html[data-bg=lagoon][data-theme=dark] .bg .b4,
html[data-bg=lagoon].bg-dark:not([data-theme]) .bg .b4{left:auto;right:-34%;top:auto;bottom:-26%;width:110%;height:44%;transform:rotate(-34deg);
  background:rgba(3,14,20,.85);filter:blur(56px)}
html[data-bg=lagoon][data-theme=dark] .bg .b5,
html[data-bg=lagoon].bg-dark:not([data-theme]) .bg .b5{left:-12%;right:auto;top:-26%;bottom:auto;width:62%;height:58%;transform:rotate(-34deg);
  background:rgba(72,164,184,.14);filter:blur(110px)}

/* ---- 5. Harbor (Bahía): steel blue over the brand navy; blue-grey with a warm sand glow in light ---- */
html[data-bg=harbor] .bg{--bg-base:linear-gradient(160deg,#e5eaf3 0%,#d7dfee 55%,#c8d3e9 100%)}
html[data-bg=harbor] .bg .b1{left:auto;right:-34%;top:-20%;bottom:auto;width:120%;height:72%;transform:rotate(-34deg);
  background:linear-gradient(90deg,rgba(100,146,206,0) 0%,rgba(100,146,206,.42) 46%,rgba(88,134,200,.56) 100%);filter:blur(70px)}
html[data-bg=harbor] .bg .b2{left:-36%;right:auto;top:30%;bottom:auto;width:150%;height:46%;transform:rotate(-34deg);
  background:linear-gradient(90deg,rgba(248,250,253,.95),rgba(238,242,248,.9) 60%,rgba(224,230,241,.85));filter:blur(46px)}
html[data-bg=harbor] .bg .b3{left:-22%;right:auto;top:auto;bottom:-30%;width:70%;height:70%;transform:none;
  background:rgba(214,196,170,.55);filter:blur(120px)}
html[data-bg=harbor] .bg .b4{left:auto;right:-34%;top:auto;bottom:-26%;width:110%;height:44%;transform:rotate(-34deg);
  background:rgba(156,176,208,.4);filter:blur(56px)}
html[data-bg=harbor] .bg .b5{left:-12%;right:auto;top:-26%;bottom:auto;width:62%;height:58%;transform:rotate(-34deg);
  background:rgba(100,140,204,.14);filter:blur(110px)}
html[data-bg=harbor][data-theme=dark] .bg,
html[data-bg=harbor].bg-dark:not([data-theme]) .bg{--bg-base:linear-gradient(160deg,#0e2240 0%,#12294a 45%,#08162c 100%)}
html[data-bg=harbor][data-theme=dark] .bg .b1,
html[data-bg=harbor].bg-dark:not([data-theme]) .bg .b1{left:auto;right:-34%;top:-20%;bottom:auto;width:120%;height:72%;transform:rotate(-34deg);
  background:linear-gradient(90deg,rgba(96,140,196,0) 0%,rgba(96,140,196,.56) 46%,rgba(86,128,186,.82) 100%);filter:blur(70px)}
html[data-bg=harbor][data-theme=dark] .bg .b2,
html[data-bg=harbor].bg-dark:not([data-theme]) .bg .b2{left:-36%;right:auto;top:30%;bottom:auto;width:150%;height:46%;transform:rotate(-34deg);
  background:linear-gradient(90deg,rgba(28,62,96,.95),rgba(19,46,72,.9) 60%,rgba(10,28,46,.85));filter:blur(46px)}
html[data-bg=harbor][data-theme=dark] .bg .b3,
html[data-bg=harbor].bg-dark:not([data-theme]) .bg .b3{left:-22%;right:auto;top:auto;bottom:-30%;width:70%;height:70%;transform:none;
  background:rgba(110,140,172,.36);filter:blur(120px)}
html[data-bg=harbor][data-theme=dark] .bg .b4,
html[data-bg=harbor].bg-dark:not([data-theme]) .bg .b4{left:auto;right:-34%;top:auto;bottom:-26%;width:110%;height:44%;transform:rotate(-34deg);
  background:rgba(4,11,22,.86);filter:blur(56px)}
html[data-bg=harbor][data-theme=dark] .bg .b5,
html[data-bg=harbor].bg-dark:not([data-theme]) .bg .b5{left:-12%;right:auto;top:-26%;bottom:auto;width:62%;height:58%;transform:rotate(-34deg);
  background:rgba(84,128,166,.3);filter:blur(110px)}

/* ---- 6. Lavender (Lavanda): muted lavender over indigo and navy; pale lilac in light ---- */
html[data-bg=lavender] .bg{--bg-base:linear-gradient(160deg,#f4edf4 0%,#ece0ee 55%,#e1cfe4 100%)}
html[data-bg=lavender] .bg .b1{left:auto;right:-34%;top:-20%;bottom:auto;width:120%;height:72%;transform:rotate(-34deg);
  background:linear-gradient(90deg,rgba(190,136,206,0) 0%,rgba(190,136,206,.42) 46%,rgba(174,116,196,.6) 100%);filter:blur(70px)}
html[data-bg=lavender] .bg .b2{left:-36%;right:auto;top:30%;bottom:auto;width:150%;height:46%;transform:rotate(-34deg);
  background:linear-gradient(90deg,rgba(252,250,254,.95),rgba(246,241,250,.9) 60%,rgba(236,229,244,.85));filter:blur(46px)}
html[data-bg=lavender] .bg .b3{left:-22%;right:auto;top:auto;bottom:-30%;width:70%;height:70%;transform:none;
  background:rgba(196,184,204,.42);filter:blur(120px)}
html[data-bg=lavender] .bg .b4{left:auto;right:-34%;top:auto;bottom:-26%;width:110%;height:44%;transform:rotate(-34deg);
  background:rgba(190,150,206,.42);filter:blur(56px)}
html[data-bg=lavender] .bg .b5{left:-12%;right:auto;top:-26%;bottom:auto;width:62%;height:58%;transform:rotate(-34deg);
  background:rgba(160,116,204,.14);filter:blur(110px)}
html[data-bg=lavender][data-theme=dark] .bg,
html[data-bg=lavender].bg-dark:not([data-theme]) .bg{--bg-base:linear-gradient(160deg,#1e1834 0%,#241d3c 45%,#100c1e 100%)}
html[data-bg=lavender][data-theme=dark] .bg .b1,
html[data-bg=lavender].bg-dark:not([data-theme]) .bg .b1{left:auto;right:-34%;top:-20%;bottom:auto;width:120%;height:72%;transform:rotate(-34deg);
  background:linear-gradient(90deg,rgba(170,122,206,0) 16%,rgba(170,122,206,.54) 46%,rgba(150,102,190,.84) 100%);filter:blur(70px)}
html[data-bg=lavender][data-theme=dark] .bg .b2,
html[data-bg=lavender].bg-dark:not([data-theme]) .bg .b2{left:-36%;right:auto;top:30%;bottom:auto;width:150%;height:46%;transform:rotate(-34deg);
  background:linear-gradient(90deg,rgba(46,44,86,.95),rgba(32,30,64,.9) 60%,rgba(18,16,38,.85));filter:blur(46px)}
html[data-bg=lavender][data-theme=dark] .bg .b3,
html[data-bg=lavender].bg-dark:not([data-theme]) .bg .b3{left:-22%;right:auto;top:auto;bottom:-30%;width:70%;height:70%;transform:none;
  background:rgba(140,136,170,.3);filter:blur(120px)}
html[data-bg=lavender][data-theme=dark] .bg .b4,
html[data-bg=lavender].bg-dark:not([data-theme]) .bg .b4{left:auto;right:-34%;top:auto;bottom:-26%;width:110%;height:44%;transform:rotate(-34deg);
  background:rgba(8,7,16,.85);filter:blur(56px)}
html[data-bg=lavender][data-theme=dark] .bg .b5,
html[data-bg=lavender].bg-dark:not([data-theme]) .bg .b5{left:-12%;right:auto;top:-26%;bottom:auto;width:62%;height:58%;transform:rotate(-34deg);
  background:rgba(160,112,196,.22);filter:blur(110px)}

/* ---- 7-9. the solids (owner 2026-10-16): White / Blanco, Off white / Blanco roto, Bone / Hueso. One flat colour in each mode, no shapes
   and no blur (the five layers are not drawn at all). Dark: a near-black charcoal, a soft graphite, a deep warm brown-black. The cards
   over a flat colour have nothing to be glass against, so hub-theme.css (2b) gives them a hairline and a soft shadow instead. ---- */
html[data-bg=white] .bg{--bg-base:#ffffff}
html[data-bg=offwhite] .bg{--bg-base:#f7f6f2}
html[data-bg=bone] .bg{--bg-base:#ece5d8}
html[data-bg=white][data-theme=dark] .bg,html[data-bg=white].bg-dark:not([data-theme]) .bg{--bg-base:#131416}
html[data-bg=offwhite][data-theme=dark] .bg,html[data-bg=offwhite].bg-dark:not([data-theme]) .bg{--bg-base:#1c1d1f}
html[data-bg=bone][data-theme=dark] .bg,html[data-bg=bone].bg-dark:not([data-theme]) .bg{--bg-base:#201c18}
html:is([data-bg=white],[data-bg=offwhite],[data-bg=bone]) .bg i{display:none}

/* ---- the canvas: the first stop of each preset's base gradient, light and dark. hub-theme.css paints <html> with it (the wallpaper
   is position:fixed, so the root canvas is what shows in the first frames and when a trackpad bounce pulls the page past its
   top or bottom). Coral is the base rule, with its veil (above) taken into account; the retired
   html.bg-dark mode (no data-theme) gets the same dark colours as data-theme=dark. ---- */
html{--hub-canvas:#f8f4ee}
html[data-theme=dark],html.bg-dark:not([data-theme]){--hub-canvas:#101a20}
html[data-bg=dune]{--hub-canvas:#f7eed6}
html[data-bg=dune][data-theme=dark],html[data-bg=dune].bg-dark:not([data-theme]){--hub-canvas:#1c1610}
html[data-bg=eucalyptus]{--hub-canvas:#eef1e3}
html[data-bg=eucalyptus][data-theme=dark],html[data-bg=eucalyptus].bg-dark:not([data-theme]){--hub-canvas:#18241f}
html[data-bg=lagoon]{--hub-canvas:#e1f2f1}
html[data-bg=lagoon][data-theme=dark],html[data-bg=lagoon].bg-dark:not([data-theme]){--hub-canvas:#082a32}
html[data-bg=harbor]{--hub-canvas:#e5eaf3}
html[data-bg=harbor][data-theme=dark],html[data-bg=harbor].bg-dark:not([data-theme]){--hub-canvas:#0e2240}
html[data-bg=lavender]{--hub-canvas:#f4edf4}
html[data-bg=lavender][data-theme=dark],html[data-bg=lavender].bg-dark:not([data-theme]){--hub-canvas:#1e1834}
html[data-bg=white]{--hub-canvas:#ffffff}
html[data-bg=white][data-theme=dark],html[data-bg=white].bg-dark:not([data-theme]){--hub-canvas:#131416}
html[data-bg=offwhite]{--hub-canvas:#f7f6f2}
html[data-bg=offwhite][data-theme=dark],html[data-bg=offwhite].bg-dark:not([data-theme]){--hub-canvas:#1c1d1f}
html[data-bg=bone]{--hub-canvas:#ece5d8}
html[data-bg=bone][data-theme=dark],html[data-bg=bone].bg-dark:not([data-theme]){--hub-canvas:#201c18}

/* ---- crossfade: HubBg.crossfade() wraps a theme or wallpaper change in a View Transition and sets
   html.hub-xfade for its length. The new page fades in over the old one (no dip, no blend tricks), 400ms
   ease-in-out. Scoped to the class so a page's own view-transition rules are left alone otherwise. ---- */
@keyframes hub-xfade-in{from{opacity:0}}
html.hub-xfade::view-transition-group(root){animation:none}
html.hub-xfade::view-transition-old(root){animation:none;mix-blend-mode:normal}
html.hub-xfade::view-transition-new(root){animation:hub-xfade-in .4s cubic-bezier(.42,0,.58,1) both;mix-blend-mode:normal}
@media (prefers-reduced-motion:reduce){html.hub-xfade::view-transition-new(root){animation:none}}

/* ---- picker swatches: <button class="bg-swatch" data-swatch="<id>">, a 28px circle that shows the
   current mode's version (data-mode="light|dark" pins one). Colours sampled from each rendered wallpaper:
   the sweep at the top right (the upper 40% of the disc), the page's own tint in the middle, the glow at
   the bottom left. ---- */
.bg-swatch{display:block;width:28px;height:28px;border-radius:50%;background:var(--sw-light);
  box-shadow:inset 0 0 0 1px rgba(128,128,128,.28)}
html[data-theme=dark] .bg-swatch,html.bg-dark:not([data-theme]) .bg-swatch{background:var(--sw-dark)}
html .bg-swatch[data-mode=light]{background:var(--sw-light)}
html .bg-swatch[data-mode=dark]{background:var(--sw-dark)}
.bg-swatch[data-swatch=coral]{--sw-light:linear-gradient(225deg,#f9e5dd 0%,#f9e5dd 40%,#f5ece2 78%,#ecede8 100%);
  --sw-dark:linear-gradient(225deg,#3b2324 0%,#3b2324 40%,#1c2126 78%,#1e2c32 100%)}
.bg-swatch[data-swatch=dune]{--sw-light:linear-gradient(225deg,#eac77f 0%,#eac77f 40%,#edd28d 78%,#e8d6ae 100%);
  --sw-dark:linear-gradient(225deg,#7f5d2a 0%,#7f5d2a 40%,#3c2e1e 78%,#4e3e2e 100%)}
.bg-swatch[data-swatch=eucalyptus]{--sw-light:linear-gradient(225deg,#b3c997 0%,#b3c997 40%,#cbdbb1 78%,#cbd9bf 100%);
  --sw-dark:linear-gradient(225deg,#516643 0%,#516643 40%,#2b3b30 78%,#47564a 100%)}
.bg-swatch[data-swatch=lagoon]{--sw-light:linear-gradient(225deg,#7dc8ce 0%,#7dc8ce 40%,#a9dee4 78%,#b9e4e7 100%);
  --sw-dark:linear-gradient(225deg,#276c70 0%,#276c70 40%,#17424a 78%,#316268 100%)}
.bg-swatch[data-swatch=harbor]{--sw-light:linear-gradient(225deg,#a1bce4 0%,#a1bce4 40%,#c7d3e9 78%,#e4dbca 100%);
  --sw-dark:linear-gradient(225deg,#3e6190 0%,#3e6190 40%,#213d5e 78%,#315475 100%)}
.bg-swatch[data-swatch=lavender]{--sw-light:linear-gradient(225deg,#d7b5e2 0%,#d7b5e2 40%,#e5cdee 78%,#e4daec 100%);
  --sw-dark:linear-gradient(225deg,#6e4e8e 0%,#6e4e8e 40%,#362d53 78%,#434269 100%)}
.bg-swatch[data-swatch=white]{--sw-light:#ffffff;--sw-dark:#131416}
.bg-swatch[data-swatch=offwhite]{--sw-light:#f7f6f2;--sw-dark:#1c1d1f}
.bg-swatch[data-swatch=bone]{--sw-light:#ece5d8;--sw-dark:#201c18}
