/*
 * Daily path series, Christmas trees look (trees.php, trees.js): the night
 * hero (class dsmb-hero on the Avada container) and its lettering, the four
 * weeks with their color bands, trees, ornaments, scenes and gifts, the side
 * panel, and the drawer's teal accent (the drawer itself is path.css's).
 *
 * Colours come from the token file through local --dsmb-* variables with
 * literal fallbacks (design-system/core/principles.md). The art's own colours
 * (trees, fireplace, gifts) live with the drawings in trees.js.
 *
 * Avada's global p/h rules reach in, so type here sets size and line-height
 * with !important where it has to.
 *
 * Doc: design-system/ds/components/ds-series.md → "Christmas trees look"
 */

.dsmb, .dsmb-hero, .dsmb-ed, .dsrp-drawer.dsmb-theme, .dsrp-toast.dsmb-theme, .dsrp-scrim.dsmb-theme, .dsmb-flake {
    --dsmb-base: var(--ds-base, #121212);
    --dsmb-band: var(--ds-band, #181A1E);
    --dsmb-card: var(--ds-card, #23262D);
    --dsmb-hover: var(--ds-hover, #2C2F35);
    --dsmb-border: var(--ds-border, rgba(255,255,255,0.11));
    --dsmb-border-emph: var(--ds-border-emph, rgba(255,255,255,0.18));
    --dsmb-t1: var(--ds-text-1, #F2F2F2);
    --dsmb-t2: var(--ds-text-2, #E0E0E0);
    --dsmb-t3: var(--ds-text-3, #A0A0A0);
    --dsmb-t4: var(--ds-text-4, #7A7A7A);
    --dsmb-teal: var(--ds-tw-teal-300, #5EEAD4);
    --dsmb-teal-200: var(--ds-tw-teal-200, #99F6E4);
    --dsmb-on-teal: var(--ds-tw-teal-950, #042F2E);
    --dsmb-gold: var(--ds-tw-amber-300, #FFD230);
    --dsmb-red: var(--ds-tw-red-500, #EF4444);
    --dsmb-blue: var(--ds-tw-blue-400, #60A5FA);
    --dsmb-snow: var(--ds-snow, #E6ECF6);
    --dsmb-ice: var(--ds-ice, #C8D3E8);
    --dsmb-night: var(--ds-night, #0C1630);
    --dsmb-night-deep: var(--ds-night-deep, #070D1F);
    --dsmb-glass: var(--ds-night-glass, rgba(8,12,28,.82));
    --dsmb-zone-1a: var(--ds-night, #0C1630);      --dsmb-zone-1b: var(--ds-night-2, #18315E);
    --dsmb-zone-2a: var(--ds-cranberry, #3B1430);  --dsmb-zone-2b: var(--ds-cranberry-2, #4E1D3E);
    --dsmb-zone-3a: var(--ds-pine, #0C2F38);       --dsmb-zone-3b: var(--ds-pine-2, #12454D);
    --dsmb-zone-4a: var(--ds-violet, #2A2459);     --dsmb-zone-4b: var(--ds-violet-2, #4A3266);
    --dsmb-serif: var(--ds-heading-serif, 'GT Sectra', Georgia, 'Times New Roman', serif);
    --dsmb-body: var(--ds-body-font, 'source-serif-4', Georgia, 'Times New Roman', serif);
    --dsmb-ui: var(--ds-ui-font, 'neue-haas-grotesk-text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif);
    --dsmb-radius: var(--ds-radius, 8px);
    --dsmb-radius-card: var(--ds-radius-card, 16px);
}

/* The bands run edge to edge (100vw) behind the column. Avada already clips
   sideways overflow on body and #boxed-wrapper; don't set overflow on html: it
   takes the clipping off body, and iPhones then lay the page out wider than
   the screen (the drawer got cut off on the right). */

/* ================= hero (Avada container: dsr-avhero dsr-hero--center dsmb-hero) ================= */
.dsmb-hero {
    position: relative; overflow: hidden;
    background: radial-gradient(ellipse 80% 70% at 50% 100%, color-mix(in srgb, var(--dsmb-zone-1b) 70%, var(--dsmb-blue) 8%) 0, transparent 70%),
                linear-gradient(180deg, var(--dsmb-night-deep), var(--dsmb-night) 60%, color-mix(in srgb, var(--dsmb-night) 70%, var(--dsmb-zone-1b))) !important;
}
/* With a photo (container class dsmb-hero--photo, the image set as the Avada
   container's Background Image): the picture fills the hero under a night
   scrim that keeps the eyebrow, subtitle and buttons readable, and Avada's own
   fade (in --awb-background-image) runs it into the page. No drawn hills or lights. */
.dsmb-hero.dsmb-hero--photo {
    background: linear-gradient(180deg, color-mix(in srgb, var(--dsmb-night-deep) 70%, transparent) 0, color-mix(in srgb, var(--dsmb-night-deep) 25%, transparent) 30%, color-mix(in srgb, var(--dsmb-night-deep) 35%, transparent) 70%, var(--dsmb-base) 100%),
                var(--awb-background-image, none),
                var(--dsmb-night) !important;
    background-size: cover !important;
    background-position: center 65% !important;
    background-repeat: no-repeat !important;
}
.dsmb-hero--photo .dsmb-hero-hills { display: none; }
/* The photo hero has no string of lights and is spaced like Spiritual Stuffing's.
   Its hero centres a short logo in the min height, which leaves the eyebrow about
   20px under the header; our lettering fills that height, so set the same top
   (102px desktop, 78px phone) instead of letting it ride up under the header. */
.dsmb-hero--photo .dsmb-hero-lights { display: none; }
.dsmb-hero.dsmb-hero--photo { --awb-padding-top: 102px !important; --awb-padding-top-small: 78px !important; }
.dsmb-hero::after { display: none !important; } /* the night sky has its own fade (the hills) */
.dsmb-hero-lights { position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 110px; z-index: 0; pointer-events: none; }
.dsmb-hero-hills { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 150px; z-index: 0; pointer-events: none; }
.dsmb-hills-base { fill: var(--dsmb-base); }
.dsmb-hero > .fusion-builder-row { position: relative; z-index: 1; }
.dsmb-hero .dsmb-status { color: var(--dsmb-gold); }
@keyframes dsmb-shimmer { 50% { opacity: .72; } }
/* A finished week's tree (trees.js bulb, o.tw): quicker, deeper, uneven twinkle. */
@keyframes dsmb-twinkle-full { 0%, 100% { opacity: 1; } 22% { opacity: .2; } 38% { opacity: 1; } 62% { opacity: .55; } 74% { opacity: 1; } }
@media (max-width: 600px) { .dsmb-hero-hills { height: 110px; } }

/* The lettering ([ds_series_art name="wordmark"]): Merry and the ribbon, then Bright in neon that flickers now and then. */
.dsmb-wordmark { display: block; width: min(640px, 100%); height: auto; margin: 0 auto; overflow: visible; }
.dsmb-wordmark--img { width: min(560px, 100%); filter: drop-shadow(0 10px 30px rgba(0,0,0,.45)); }
h1.dsmb-h1 { margin: 0 !important; padding: 0 !important; font-size: 0 !important; line-height: 0 !important; }
.dsmbw-glow { animation: dsmbw-flick 6s infinite; }
@keyframes dsmbw-flick { 0%, 92%, 100% { opacity: 1; } 93% { opacity: .55; } 94% { opacity: 1; } 96% { opacity: .7; } 97% { opacity: 1; } }

/* ================= the page section ================= */
/* The page's dark ground. Avada sets it per post in its cached dynamic CSS; when
   that file is stale or missing, #main falls back to white and the light text
   under the hero all but vanishes. This keeps it dark either way. */
body:has(.dsmb) #main, body:has(.dsmb) #wrapper { background-color: var(--ds-base, #121212); }

.dsmb { position: relative; z-index: 0; color: var(--dsmb-t1); font-family: var(--dsmb-ui); font-size: 16px; line-height: 1.5; text-align: left; }
.dsmb *, .dsmb *::before, .dsmb *::after { box-sizing: border-box; }
.dsmb :focus-visible { outline: 2px solid var(--dsmb-teal); outline-offset: 3px; }
.dsmb .dsmb-kicker { display: block; font-family: var(--dsmb-ui); font-size: 12px; font-weight: 500; line-height: 1.4; letter-spacing: .12em; text-transform: uppercase; color: var(--dsmb-t3); }

.dsmb-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; }
.dsmb-main { min-width: 0; }

/* Start here cards */
.dsmb-start { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 28px; }
.dsmb a.dsmb-mini { display: flex; gap: 14px; align-items: center; padding: 12px; color: var(--dsmb-t1) !important; text-decoration: none !important; background: var(--dsmb-card); border: 1px solid var(--dsmb-border); border-radius: var(--dsmb-radius-card); }
.dsmb a.dsmb-mini:hover { background: var(--dsmb-hover); }
.dsmb-mini img { flex: none; width: 96px; height: 54px; object-fit: cover; border-radius: var(--dsmb-radius); }
.dsmb-mini b { display: block; font-size: 15px; font-weight: 500; line-height: 1.3; }

/* Without JavaScript: a plain list of the days. */
.dsmb .dsmb-plain { margin: 12px 0 32px; padding-left: 1.2em; }
.dsmb.is-js .dsmb-plain { display: none; }

/* ---- full-width color bands, one per week, with falling snow ---- */
.dsmb-bleed { position: absolute; left: calc(50% - 50vw); width: 100vw; top: 0; height: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.dsmb-band { position: absolute; left: 0; right: 0; overflow: hidden; }
.dsmb-band[data-w="1"] { background: linear-gradient(180deg, var(--dsmb-base), var(--dsmb-zone-1a) 90px, var(--dsmb-zone-1b)); }
.dsmb-band[data-w="2"] { background: linear-gradient(180deg, var(--dsmb-zone-2a), var(--dsmb-zone-2b)); }
.dsmb-band[data-w="3"] { background: linear-gradient(180deg, var(--dsmb-zone-3a), var(--dsmb-zone-3b)); }
.dsmb-band[data-w="4"] { background: radial-gradient(ellipse 60% 30% at 50% calc(100% - 180px), color-mix(in srgb, var(--dsmb-gold) 16%, transparent), transparent 70%), linear-gradient(180deg, var(--dsmb-zone-4a), var(--dsmb-zone-4b) calc(100% - 90px), var(--dsmb-base)); }
.dsmb-wave { position: absolute; left: 0; top: 0; width: 100%; height: 56px; display: block; }
.dsmb-band[data-w="2"] .dsmb-wave-fill { fill: var(--dsmb-zone-1b); }
.dsmb-band[data-w="3"] .dsmb-wave-fill { fill: var(--dsmb-zone-2b); }
.dsmb-band[data-w="4"] .dsmb-wave-fill { fill: var(--dsmb-zone-3b); }
.dsmb-snowfall { position: absolute; left: 0; top: 0; width: 100%; z-index: 3; pointer-events: none; display: block; }

/* ---- a week ---- */
.dsmb-wk { position: relative; padding: 20px 0 8px; }
.dsmb-wk + .dsmb-wk { padding-top: 110px; }
.dsmb-thead { position: relative; z-index: 2; width: min(100%, 520px); margin: 0 auto; padding: 16px 18px; background: color-mix(in srgb, var(--dsmb-night-deep) 55%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.12); border-radius: var(--dsmb-radius-card); }
.dsmb-thead.is-on { border-color: color-mix(in srgb, var(--dsmb-teal) 50%, transparent); }
.dsmb .dsmb-thead .dsmb-kicker { color: var(--dsmb-ice); }
.dsmb .dsmb-thead h3 { margin: 4px 0 !important; font-family: var(--dsmb-serif) !important; font-weight: 500 !important; font-size: clamp(24px, 3vw, 30px) !important; line-height: 1.1 !important; letter-spacing: 0 !important; color: var(--dsmb-t1) !important; text-wrap: balance; }
.dsmb .dsmb-thead p { margin: 0 !important; color: var(--dsmb-ice) !important; font-family: var(--dsmb-ui) !important; font-size: 15px !important; line-height: 1.4 !important; }
/* The course's Image, when it has one: to the right of the words (like the
   path layout's banner), the meta row running under both; on phones, a
   banner across the top. No image: the card is unchanged. */
.dsmb-thead.has-img { display: grid; grid-template-columns: minmax(0, 1fr) 140px; column-gap: 16px; align-items: center; }
.dsmb-thead.has-img .dsmb-thead__txt { grid-row: 1; grid-column: 1; min-width: 0; }
.dsmb-thead.has-img .dsmb-meta { grid-column: 1 / -1; }
.dsmb .dsmb-thead__img { grid-row: 1; grid-column: 2; display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--dsmb-radius); box-shadow: 0 0 0 1px var(--dsmb-border); }
/* One height for the bar, “Week N finished” and the locked chip, so finishing
   a day or a week never changes the card's height (it would move the tree). */
.dsmb-meta { display: flex; align-items: center; gap: 12px; min-height: 28px; margin-top: 12px; }
.dsmb-meta small { font-size: 13px; color: var(--dsmb-ice); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* The week's progress bar. Its track was white at 12% on the dark glass, so at
   0 of 5 it didn't read as a bar at all; now an ice track with a hairline edge,
   and a teal fill with a soft glow. */
.dsmb-bar { flex: 1; height: 8px; background: color-mix(in srgb, var(--dsmb-ice) 22%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--dsmb-ice) 18%, transparent); border-radius: 999px; overflow: hidden; }
.dsmb-bar i { display: block; height: 100%; background: var(--dsmb-teal); box-shadow: 0 0 8px color-mix(in srgb, var(--dsmb-teal) 70%, transparent); border-radius: 999px; transition: width .5s; }
.dsmb-goal { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--dsmb-gold); }
.dsmb-chiplock { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--dsmb-ice); background: rgba(255,255,255,.08); border-radius: 999px; }
.dsmb-goal svg, .dsmb-chiplock svg { width: 14px; height: 14px; }

/* ---- the tree, with the days as ornaments ---- */
.dsmb-treebox { position: relative; container-type: inline-size; margin-top: 18px; padding-bottom: 34px; }
.dsmb-tree { position: absolute; left: 0; top: 0; z-index: 0; overflow: visible; pointer-events: none; transition: filter .6s; }
.dsmb-wk.is-locked .dsmb-tree { filter: brightness(.5) saturate(.55); }
.dsmb-topper { position: relative; z-index: 2; width: 60px; height: 60px; margin: 0 auto; visibility: hidden; } /* keeps the tree's tip in place */
.dsmb ol.dsmb-steps { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 14px; margin: 0 !important; padding: 26px 0 0 !important; list-style: none !important; }
.dsmb ol.dsmb-steps li { position: relative; display: flex; flex-direction: column; align-items: center; margin: 0 !important; padding: 0 !important; transform: translateX(calc(var(--xf) * 1cqw)) translateY(var(--yf, 0px)); }
.dsmb ol.dsmb-steps li::before { content: none !important; }
.dsmb a.dsmb-node { --c: var(--dsmb-teal); position: relative; display: block; width: 92px; height: 92px; border-radius: 50%; color: var(--c); text-decoration: none !important; transition: transform .15s; }
.dsmb a.dsmb-node:hover { transform: translateY(-2px); }
.dsmb a.dsmb-node:active { transform: translateY(2px); }
.dsmb-orn { position: absolute; left: -1.04%; top: -26%; width: 102.1%; height: 127%; overflow: visible; pointer-events: none; }
.dsmb-orn .o-ball { fill: #1F2738; fill-opacity: .88; transition: fill .5s; }
.dsmb-orn .o-shine { opacity: 0; transition: opacity .5s; }
.dsmb-orn .o-ink { fill: var(--dsmb-ice); transition: fill .5s; }
.dsmb-orn .o-num { fill: var(--dsmb-ice); font: 700 300px var(--dsmb-ui); }
.dsmb-orn .o-hang { fill: var(--dsmb-ice); }
.dsmb-orn .o-cap { fill: #C9A74A; }
.dsmb-node.is-done .o-ball { fill: var(--c); fill-opacity: 1; }
.dsmb-node.is-done .o-shine { opacity: 1; }
.dsmb-node.is-done .o-ink { fill: color-mix(in srgb, var(--c) 25%, #0B0D12); }
.dsmb-node.is-done .dsmb-orn { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--c) 70%, transparent)) drop-shadow(0 0 18px color-mix(in srgb, var(--c) 45%, transparent)); }
.dsmb-node.is-next { box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 22%, transparent), 0 0 48px 14px color-mix(in srgb, var(--c) 28%, transparent); }
.dsmb-node.is-next .o-ink { fill: var(--c); }
.dsmb-node.is-locked .dsmb-orn { opacity: .5; }
.dsmb-node.pop { animation: dsmb-pop .6s ease; }
@keyframes dsmb-pop { 40% { transform: scale(1.15); } }
.dsmb-olock { position: absolute; right: -4px; bottom: -4px; display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; color: var(--dsmb-ice); background: #0B0F1C; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; }
.dsmb-olock svg { width: 13px; height: 13px; }
/* Hangs in the space above the ornament. No extra margin on the next day's li:
   that margin moved with “Up next”, so each finished ornament jumped up 26px. */
.dsmb-bubble { position: absolute; bottom: calc(100% + 26px); left: 50%; z-index: 2; padding: 6px 10px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; color: var(--dsmb-base); background: var(--dsmb-t1); border-radius: var(--dsmb-radius); --bx: -50%; --by: 0px; transform: translate(var(--bx), var(--by)); animation: dsmb-bob 1.6s ease-in-out infinite; }
.dsmb-bubble::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -6px; border: 6px solid transparent; border-top-color: var(--dsmb-t1); }
@keyframes dsmb-bob { 50% { transform: translate(var(--bx), calc(var(--by) - 4px)); } }

/* ---- under the tree: two gifts and a scene ---- */
.dsmb-base { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px) minmax(0, 1fr); align-items: end; gap: 4px; margin-top: -8px; }
.dsmb-gslot { display: flex; min-width: 0; }
.dsmb-gslot.is-l { justify-content: flex-end; }
.dsmb-gslot.is-r { justify-content: flex-start; }
.dsmb-scene { display: block; width: 100%; height: auto; overflow: visible; transition: opacity .6s, filter .6s; }
.dsmb-wk.just-lit .dsmb-scene { animation: dsmb-glowup 1.2s ease; }
@keyframes dsmb-glowup { 40% { filter: brightness(1.6); } }
.dsmb .dsmb-cap { grid-column: 1 / -1; margin: 6px 0 0 !important; text-align: center; font-family: var(--dsmb-ui) !important; font-size: 14px !important; line-height: 1.4 !important; color: var(--dsmb-ice) !important; }
.dsmb-wk.is-lit .dsmb-cap { color: var(--dsmb-gold) !important; font-weight: 500; }
/* fireplace: the five fire drawings play as frames; unlit, logs and coals */
.dsmb-scene .fire, .dsmb-scene .glow { opacity: 0; transition: opacity .8s; }
.dsmb-wk.is-lit .dsmb-scene .fire { opacity: 1; }
.dsmb-wk.is-lit .dsmb-scene .glow { opacity: .85; }
.dsmb-scene .fpf { opacity: 0; }
.dsmb-scene .fpf0 { opacity: 1; }
.dsmb-wk.is-lit .dsmb-scene .fpf { animation: dsmb-fpframe 1.2s infinite; }
.dsmb-wk.is-lit .dsmb-scene .fpf1 { animation-delay: -.96s; }
.dsmb-wk.is-lit .dsmb-scene .fpf2 { animation-delay: -.72s; }
.dsmb-wk.is-lit .dsmb-scene .fpf3 { animation-delay: -.48s; }
.dsmb-wk.is-lit .dsmb-scene .fpf4 { animation-delay: -.24s; }
@keyframes dsmb-fpframe { 0%, 19.9% { opacity: 1; } 20%, 100% { opacity: 0; } }
.dsmb-wk.is-lit .dsmb-scene .fp-sock { animation: dsmb-swaystep 2s steps(12, end) infinite; }
.dsmb-wk.is-lit .dsmb-scene .fp-sock-R { animation-delay: -1s; }
@keyframes dsmb-swaystep { 0%, 100% { transform: rotate(3deg); } 50% { transform: rotate(-3deg); } }
.dsmb-scene .ember { transition: opacity .6s; }
.dsmb-wk.is-lit .dsmb-scene .ember { opacity: 0; }
/* train */
.dsmb-scene .puff circle { fill: rgba(230,236,246,.55); opacity: 0; transform-box: fill-box; transform-origin: center; }
.dsmb-wk.is-lit .dsmb-scene .puff circle { animation: dsmb-rise 1.8s ease-out infinite; }
.dsmb-wk.is-lit .dsmb-scene .puff circle:nth-child(2) { animation-delay: .6s; }
.dsmb-wk.is-lit .dsmb-scene .puff circle:nth-child(3) { animation-delay: 1.2s; }
@keyframes dsmb-rise { 0% { transform: translateY(4px) scale(.5); opacity: 0; } 25% { opacity: 1; } 100% { transform: translateY(-16px) scale(1.4); opacity: 0; } }
.dsmb-scene .headlamp { opacity: .15; transition: opacity .6s; }
.dsmb-wk.is-lit .dsmb-scene .headlamp { opacity: 1; }
/* toys */
.dsmb-scene .jack { transform-box: view-box; transform: translateY(34px); transition: transform .7s cubic-bezier(.3, 1.6, .5, 1); }
.dsmb-wk.is-lit .dsmb-scene .jack { transform: translateY(0); animation: dsmb-boing 1.6s ease-in-out .7s infinite; }
@keyframes dsmb-boing { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(7px); } }
.dsmb-scene .jlid { transform-box: fill-box; transform-origin: 0% 100%; transition: transform .5s; }
.dsmb-wk.is-lit .dsmb-scene .jlid { transform: rotate(-115deg); }
.dsmb-scene .arm { transform-box: fill-box; transform-origin: 80% 80%; }
.dsmb-wk.is-lit .dsmb-scene .arm { animation: dsmb-wave 1.4s ease-in-out infinite; }
@keyframes dsmb-wave { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-38deg); } }
.dsmb-scene .mnotes { opacity: 0; transition: opacity .6s; }
.dsmb-wk.is-lit .dsmb-scene .mnotes { opacity: 1; }
.dsmb-scene .note { fill: var(--dsmb-gold); stroke: var(--dsmb-gold); transform-box: fill-box; animation: dsmb-float 3s ease-out infinite; }
.dsmb-scene g:nth-of-type(2) > .note { animation-delay: 1s; }
.dsmb-scene g:nth-of-type(3) > .note { animation-delay: 2s; }
@keyframes dsmb-float { 0% { transform: translate(0, 6px); opacity: 0; } 25% { opacity: 1; } 100% { transform: translate(8px, -18px); opacity: 0; } }
.dsmb-scene .doll { transform-box: fill-box; transform-origin: 50% 100%; }
.dsmb-wk.is-lit .dsmb-scene .doll { animation: dsmb-hop 2.2s ease-in-out infinite; }
@keyframes dsmb-hop { 0%, 60%, 100% { transform: translateY(0); } 70% { transform: translateY(-6px); } 80% { transform: translateY(0); } }
/* new year sign */
.dsmb-scene .marq { stroke: #4E4C66; transition: stroke .6s; }
.dsmb-wk.is-lit .dsmb-scene .marq { stroke: var(--dsmb-gold); filter: drop-shadow(0 0 4px rgba(255,210,48,.9)); animation: dsmb-chase .5s steps(2) infinite; }
@keyframes dsmb-chase { to { stroke-dashoffset: -9; } }
.dsmb-scene .lan { fill: #2E2B45; transition: fill .6s; }
.dsmb-wk.is-lit .dsmb-scene .lan { fill: #FFD98A; filter: drop-shadow(0 0 8px rgba(255,200,90,.9)); }
.dsmb-scene .fw { opacity: 0; transition: opacity .8s; }
.dsmb-wk.is-lit .dsmb-scene .fw { opacity: 1; }
.dsmb-scene .burst { transform-box: fill-box; transform-origin: center; opacity: 0; }
.dsmb-wk.is-lit .dsmb-scene .burst { animation: dsmb-burst 2.6s ease-out infinite; }
.dsmb-scene .fw:nth-of-type(2) .burst { animation-delay: .9s; }
.dsmb-scene .fw:nth-of-type(3) .burst { animation-delay: 1.7s; }
@keyframes dsmb-burst { 0% { transform: scale(.2); opacity: 0; } 15% { opacity: 1; } 60% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.08); opacity: 0; } }

/* gifts */
.dsmb a.dsmb-gift { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; color: inherit !important; text-align: center; text-decoration: none !important; cursor: pointer; }
.dsmb-gift svg { width: min(112px, 100%); height: auto; overflow: visible; transition: filter .3s; }
.dsmb-gift.g-1 svg { width: min(96px, 86%); }
.dsmb-gift:hover svg { filter: brightness(1.12); }
.dsmb-gift .spark, .dsmb-ghero .spark { opacity: 0; }
.dsmb-gift .padlock, .dsmb-ghero .padlock { opacity: 0; }
.dsmb-gift.is-locked svg { opacity: .55; filter: saturate(.45); }
.dsmb-gift.is-locked .padlock, .dsmb-gift.is-wrapped .padlock, .dsmb-ghero.is-closed .padlock { opacity: 1; }
.dsmb-gift.is-ready svg { animation: dsmb-wiggle 2.4s ease-in-out infinite; transform-origin: 50% 100%; }
.dsmb-gift.is-ready .spark { opacity: 1; animation: dsmb-twinkle 1.4s ease-in-out infinite; }
@keyframes dsmb-twinkle { 50% { opacity: .15; } }
@keyframes dsmb-wiggle { 0%, 62%, 100% { transform: rotate(0); } 68% { transform: rotate(-2.5deg); } 74% { transform: rotate(2deg); } 80% { transform: rotate(-1deg); } 86% { transform: rotate(0); } }
.dg-ready-glow { opacity: 0; transition: opacity .4s; }
.dsmb-gift.is-ready .dg-ready-glow { opacity: 1; animation: dsmb-readyglow 2.4s ease-in-out infinite; }
@keyframes dsmb-readyglow { 50% { opacity: .5; } }
.dg-open { display: none; }
.dsmb-gift.is-opened .dg-closed, .dsmb-ghero:not(.is-closed) .dg-closed { display: none; }
.dsmb-gift.is-opened .dg-open, .dsmb-ghero:not(.is-closed) .dg-open { display: inline; }
.dsmb-gtag { display: flex; flex-direction: column; align-items: center; max-width: 100%; padding: 4px 9px; background: var(--dsmb-glass); border-radius: 10px; }
.dsmb-gtag b { font-size: 13px; font-weight: 500; line-height: 1.25; white-space: nowrap; color: var(--dsmb-t1); }
.dsmb-gtag small { font-size: 12px; line-height: 1.25; color: var(--dsmb-ice); }
.dsmb-gift.is-ready .dsmb-gtag { background: var(--dsmb-gold); box-shadow: 0 0 18px color-mix(in srgb, var(--dsmb-gold) 50%, transparent); }
.dsmb-gift.is-ready .dsmb-gtag b, .dsmb-gift.is-ready .dsmb-gtag small { color: #241A00; }
.dsmb-gift.is-opened .dsmb-gtag b { color: var(--dsmb-gold); }

/* ---- side panel: a string of lights per week ---- */
.dsmb-side { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 16px; }
.dsmb-panel { padding: 20px; background: var(--dsmb-card); border: 1px solid var(--dsmb-border); border-radius: var(--dsmb-radius-card); }
.dsmb .dsmb-panel p { margin: 0 !important; font-size: 14px !important; line-height: 1.45 !important; color: var(--dsmb-t3); }
.dsmb .dsmb-side-line { margin-top: 8px !important; }
.dsmb .dsmb-side-line strong { color: var(--dsmb-gold); font-weight: 500; }
.dsmb-lights-panel { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.dsmb-lights { width: 100%; max-width: 260px; height: auto; overflow: visible; }
.dsmb-lights .pop { animation: dsmb-pop .6s ease; transform-box: fill-box; transform-origin: 50% 0; }
.dsmb-lights text { fill: var(--dsmb-t4); font: 500 10px var(--dsmb-ui); letter-spacing: .1em; }
.dsmb-lights .tg { cursor: pointer; }
.dsmb-lights .tg .box, .dsmb-lights .tg .lidp { fill: #262A33; stroke: rgba(255,255,255,.2); stroke-width: 1; }
.dsmb-lights .tg .rib { stroke: rgba(255,255,255,.2); }
.dsmb-lights .tg:is(.is-ready, .is-opened) :is(.box, .lidp) { fill: var(--gc); stroke: none; }
.dsmb-lights .tg:is(.is-ready, .is-opened) .rib { stroke: var(--gr); }
.dsmb-lights .tg.is-ready :is(.box, .lidp) { stroke: var(--dsmb-gold); stroke-width: 1.6; }
.dsmb-lights .tg .twk { fill: var(--dsmb-gold); opacity: 0; }
.dsmb-lights .tg.is-ready .twk { opacity: 1; animation: dsmb-twinkle 1.2s ease-in-out infinite; }
.dsmb-lights .tg.is-ready .art { animation: dsmb-wiggle 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.dsmb-lights .tg.is-opened .lidp { transform: translate(-2px, -4px) rotate(-16deg); transform-box: fill-box; transform-origin: 0 100%; }
.dsmb-count { font-family: var(--dsmb-serif); font-weight: 500; font-size: 28px; line-height: 1; font-variant-numeric: tabular-nums; }
.dsmb-count small { display: block; margin-top: 6px; font-family: var(--dsmb-ui); font-size: 13px; color: var(--dsmb-t3); }
.dsmb-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.dsmb-stat { padding: 12px; text-align: left; background: var(--dsmb-band); border-radius: var(--dsmb-radius); }
.dsmb-stat b { display: block; font-family: var(--dsmb-serif); font-weight: 500; font-size: 26px; line-height: 1; font-variant-numeric: tabular-nums; }
.dsmb-stat span { font-size: 12px; color: var(--dsmb-t3); }
.dsmb-stat[hidden] { display: none; }
.dsmb-note { background: transparent; border-style: dashed; border-color: var(--dsmb-border-emph); }

/* ================= the drawer: path.css's, with a teal accent ================= */
.dsrp-drawer.dsmb-theme, .dsrp-toast.dsmb-theme {
    --dsrp-amber: var(--dsmb-teal);
    --dsrp-on-amber: var(--dsmb-on-teal);
    --dsrp-gold: var(--dsmb-teal-200);
    --dsrp-amber-soft: color-mix(in srgb, var(--dsmb-teal) 14%, transparent);
}
.dsrp-drawer.dsmb-theme :focus-visible { outline-color: var(--dsmb-teal); }
.dsrp-drawer.dsmb-theme .dsrp-steps li:nth-child(2) .dsrp-ic { color: #FF8A8A; background: color-mix(in srgb, var(--dsmb-red) 16%, transparent); }
.dsrp-drawer.dsmb-theme p.dsmb-byline { margin: 8px 0 0 !important; font-family: var(--dsmb-ui); font-size: 14px !important; line-height: 1.4 !important; color: var(--dsmb-t3); }
/* The name: semibold is 500 (neue-haas ships 400/500/700, no 600), brighter
   than "By", and linked to the author's page when the name matches a user. */
.dsrp-drawer.dsmb-theme .dsmb-byline__name { font-weight: 500; color: var(--dsmb-t1) !important; text-decoration: none !important; }
.dsrp-drawer.dsmb-theme a.dsmb-byline__name:hover { color: var(--dsmb-teal-200) !important; text-decoration: underline !important; text-underline-offset: 3px; }
.dsmb-ghero { display: flex; justify-content: center; padding-top: 6px; }
.dsmb-ghero svg { width: 150px; height: auto; overflow: visible; }
.dsmb-ghero.is-unwrap svg { animation: dsmb-unwrap .9s ease; }
@keyframes dsmb-unwrap { 30% { transform: scale(1.12) rotate(-4deg); } 60% { transform: scale(.96) rotate(3deg); } }
.dsmb-dots { display: flex; gap: 6px; }
.dsmb-dots i { width: 22px; height: 8px; background: rgba(255,255,255,.12); border-radius: 99px; }
.dsmb-dots i.on { background: var(--dsmb-teal); }
.dsmb-wall { display: block; width: min(240px, 70%); height: auto; margin: 0 auto; border-radius: 22px; box-shadow: 0 0 0 1px var(--dsmb-border-emph), 0 20px 40px rgba(0,0,0,.45); }
.dsmb-pray { display: flex; flex-direction: column; gap: 10px; }
.dsrp-drawer .dsmb-pray ol { margin: 0 !important; padding-left: 20px !important; list-style: decimal !important; }
.dsrp-drawer .dsmb-pray li { margin: 0 0 6px !important; font-family: var(--dsmb-body) !important; font-size: 17px !important; line-height: 1.5 !important; color: var(--dsmb-t2) !important; }
.dsrp-drawer .dsrp-btn svg { width: 18px; height: 18px; }
.dsrp-drawer.dsmb-theme p.dsmb-gnote { margin: 0 !important; font-family: var(--dsmb-body); font-style: italic; font-size: 17px !important; line-height: 1.5 !important; color: var(--dsmb-t2); }
/* A gift's poll ([ds_poll], content-picker styles): no hero art, sized for the drawer. */
.dsmb-poll .dscp-hero__bg, .dsmb-poll .dspl-pill { display: none !important; }
.dsmb-poll .dscp { min-height: 0 !important; padding: 0 !important; background: none !important; } /* a poll page fills the screen; in the drawer it's just the answers */
.dsmb-poll .dscp-hero, .dsmb-poll .dspl-hero { min-height: 0 !important; padding: 0 !important; margin: 0 !important; background: none !important; border: 0 !important; }
.dsmb-poll .dspl-inner { padding: 0 !important; max-width: none !important; }
.dsmb-poll .dscp-h1 { margin: 0 0 8px !important; font-family: var(--dsmb-serif) !important; font-weight: 500 !important; font-size: 24px !important; line-height: 1.2 !important; text-align: left !important; }
.dsmb-poll .dspl-leads, .dsmb-poll .dspl-foot { text-align: left !important; }

/* falling snow when a day is finished */
.dsmb-flake { position: fixed; top: -40px; z-index: 99995; pointer-events: none; color: #fff; animation: dsmb-fall var(--d, 2.6s) cubic-bezier(.3, .1, .5, 1) forwards; }
.dsmb-flake svg { width: 100%; height: 100%; animation: dsmb-spin 3s linear infinite; }
@keyframes dsmb-fall { to { transform: translate(var(--dx, 0), calc(100vh + 80px)); } }
@keyframes dsmb-spin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
    .dsmb-grid { grid-template-columns: minmax(0, 1fr); }
    .dsmb-side { position: static; order: -1; }
    .dsmb-lights-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; text-align: left; }
    .dsmb-lights-panel .dsmb-lights { max-width: 220px; }
    .dsmb-lights-panel .dsmb-stats { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
    .dsmb-start { grid-template-columns: minmax(0, 1fr); }
    .dsmb-thead.has-img { grid-template-columns: minmax(0, 1fr); }
    .dsmb-thead.has-img .dsmb-thead__txt { grid-row: 2; }
    .dsmb .dsmb-thead__img { grid-column: 1; aspect-ratio: 2 / 1; margin-bottom: 14px; }
    .dsmb ol.dsmb-steps li { transform: translateX(calc(var(--xf) * 1cqw)) translateY(var(--yf, 0px)); }
    .dsmb a.dsmb-node { width: 60px; height: 60px; }
    /* Phones: the ornaments sit too close for "Up next" to fit above one
       without covering the ornament over it, so it points in from the side
       nearer the trunk (data-side: which way the ornament hangs). */
    .dsmb-bubble { bottom: auto; top: 50%; --by: -50%; --bx: 0px; padding: 5px 8px; font-size: 11px; }
    .dsmb li[data-side="1"] .dsmb-bubble { left: auto; right: calc(100% + 10px); }
    .dsmb li[data-side="-1"] .dsmb-bubble { left: calc(100% + 10px); }
    .dsmb-bubble::after { top: 50%; margin: -6px 0 0; }
    .dsmb li[data-side="1"] .dsmb-bubble::after { left: 100%; border-top-color: transparent; border-left-color: var(--dsmb-t1); }
    .dsmb li[data-side="-1"] .dsmb-bubble::after { left: auto; right: 100%; border-top-color: transparent; border-right-color: var(--dsmb-t1); }
    .dsmb-base { grid-template-columns: minmax(0, 1fr) minmax(0, 190px) minmax(0, 1fr); gap: 2px; }
    .dsmb-gtag b { font-size: 12px; }
    .dsmb-gtag small { font-size: 11px; }
    .dsmb-lights-panel { grid-template-columns: minmax(0, 1fr); }
    .dsmb-lights-panel .dsmb-lights { max-width: 240px; justify-self: center; }
}
/* Off screen (trees.js pauseOffscreen): hold every animation where it is, to save battery. */
.is-offscreen, .is-offscreen * { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) {
    .dsmb *, .dsmb *::before, .dsmb *::after, .dsmb-hero *, .dsmb-ghero svg, .dsmbw-glow { animation: none !important; transition: none !important; }
}

/* The gift's title already asks the question; keep the poll's own heading for screen readers only. */
.dsmb-poll .dscp-h1 { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dsmb-poll .dspl-lead--ask { display: none !important; }

/* ================= editor bar (logged-in editors only) ================= */
.dsmb-ed { position: fixed; left: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 99980; max-width: calc(100vw - 24px); font-family: var(--dsmb-ui); font-size: 14px; line-height: 1.4; color: var(--dsmb-t1); }
.dsmb-ed button { font-family: inherit; }
.dsmb-ed__toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 14px; font-size: 13px; font-weight: 500; color: var(--dsmb-t1); background: var(--dsmb-card); border: 1px solid var(--dsmb-border-emph); border-radius: 999px; box-shadow: 0 8px 24px rgba(0,0,0,.45); cursor: pointer; }
.dsmb-ed__toggle svg { width: 16px; height: 16px; color: var(--dsmb-teal); }
.dsmb-ed__toggle b { font-weight: 500; color: var(--dsmb-gold); }
.dsmb-ed__panel { width: min(380px, calc(100vw - 24px)); max-height: min(70vh, 560px); overflow-y: auto; margin-bottom: 8px; padding: 16px; background: var(--dsmb-band); border: 1px solid var(--dsmb-border-emph); border-radius: var(--dsmb-radius-card); box-shadow: 0 16px 40px rgba(0,0,0,.55); }
.dsmb-ed__panel[hidden] { display: none; }
.dsmb-ed__h { margin: 0 0 6px; font-size: 11px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--dsmb-t3); }
.dsmb-ed__row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.dsmb-ed__row button, .dsmb-ed__row a { display: inline-flex; align-items: center; min-height: 34px; padding: 6px 11px; font-size: 13px; font-weight: 500; color: var(--dsmb-t1) !important; text-decoration: none !important; background: var(--dsmb-card); border: 1px solid var(--dsmb-border); border-radius: 999px; cursor: pointer; }
.dsmb-ed__row button:hover, .dsmb-ed__row a:hover { background: var(--dsmb-hover); }
.dsmb-ed__row button[aria-pressed="true"] { color: var(--dsmb-on-teal) !important; background: var(--dsmb-teal); border-color: var(--dsmb-teal); }
.dsmb-ed__note { margin: 0; font-size: 12px; color: var(--dsmb-t3); }

/* The strand of lights between the hero and the verse (trees.js verseLights): laid
   over the dark where the hero fades out, 40px up into it, taking no room. The hero
   container has z-index 2000 (Avada) and the verse section isolates its own stacking,
   so the verse section goes just above the hero (its background is transparent and the
   two only overlap where the strand is). */
body:has(.dsmb-strand) .dsr-avabout { position: relative; z-index: 2001; }
.dsmb-strand { position: absolute; left: 0; right: 0; top: -40px; z-index: 1; height: 110px; overflow: hidden; pointer-events: none; }
.dsmb-strand__svg { display: block; width: 100%; height: 110px; }

/* The verse strand's easter egg (trees.js lightEgg): click a bulb to switch it off and
   on; flick it a lot and it strains, then pops (cracked glass, smoke, falling shards). */
.dsmb-strand .dsmb-tb { pointer-events: auto; cursor: pointer; }
.dsmb-tb .b-on { transition: opacity .12s; }
.dsmb-tb.is-off .b-on { opacity: 0; }
.dsmb-tb .b-crack { display: none; }
.dsmb-tb.is-strained .b-on { animation: dsmb-strain .5s steps(2, jump-none) infinite; }
.dsmb-tb.is-popping .b-on { animation: dsmb-bulb-pop .14s ease-out forwards; }
.dsmb-tb.is-broken { cursor: default; }
.dsmb-tb.is-broken .b-on { display: none; }
.dsmb-tb.is-broken .b-crack { display: inline; }
@keyframes dsmb-strain { 0% { opacity: 1; } 50% { opacity: .35; } 100% { opacity: .9; } }
@keyframes dsmb-bulb-pop { 0% { opacity: 1; filter: brightness(1); } 50% { opacity: 1; filter: brightness(2.2); } 100% { opacity: 0; filter: brightness(2.2); } }
.dsmb-pop { position: fixed; inset: 0; z-index: 99996; pointer-events: none; overflow: hidden; }
.dsmb-pop__smoke { position: absolute; width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle, rgba(200,205,215,.7), rgba(200,205,215,0) 70%); filter: blur(2px); }
.dsmb-pop__shard { position: absolute; overflow: visible; }
@media (prefers-reduced-motion: reduce) { .dsmb-tb.is-strained .b-on, .dsmb-tb.is-popping .b-on { animation: none; } }

/* The scripture reference above the intro: its Title asks for 2rem below, but Avada
   writes a separate phone margin (--awb-margin-bottom-small) of 0px inline, so on
   phones the reference sat on the intro. !important beats the inline variable. */
.fusion-title:has(+ .dsmb-intro) { --awb-margin-bottom-small: 2rem !important; }
