/* ==========================================================================
   Eckersley Family Lightshow — Christmas Wonderland   (xmas.css)
   Standalone: does not depend on the shared /style.css.

   QUICK CUSTOMIZING
   - Colors ........ the :root tokens just below (page UI) and BULB in xmas-lights.js (the bulbs)
   - Light patterns  MODES in xmas-lights.js (palette + playlist of [pattern, seconds])
   - Turn effects off  see "How to switch things off" in the handoff notes, or the
                       Light controls panel on the page (Animation: Full / Calm / Off)
   ========================================================================== */

:root {
    --red: #D62828;        --evergreen: #124734;   --green: #27AE60;
    --gold: #FFD166;       --snow: #FFF9EF;        --night: #081B33;     --glow: #FFE6A0;
    --bulb-red: #F2383A;   --bulb-orange: #FF8A1F; --bulb-gold: #FFC94A; --bulb-green: #1FCB6B;
    --bulb-ice: #7FD6FF;   --bulb-blue: #3B82F6;   --bulb-pink: #FF74B8; --bulb-purple: #A862FF;

    --bg: #081B33;         --bg-2: #0B2447;        --bg-nav: rgba(6, 20, 40, .93);
    --card: rgba(18, 44, 82, .78);                 --card-solid: #102a4f;
    --card-edge: rgba(255, 230, 160, .20);         --card-edge-hot: rgba(255, 209, 102, .62);
    --text: #FFF9EF;       --muted: #BCCBE6;       --accent: #FFD166;    --link: #FFE6A0;
    --shadow: 0 14px 34px -16px rgba(0, 0, 0, .7);
    --lift: 0 22px 44px -14px rgba(255, 190, 70, .34);
    --focus: #FFD166;

    --font-display: "Mountains of Christmas", "Fredoka", "Trebuchet MS", cursive;
    --font-accent: "Great Vibes", "Segoe Script", cursive;
    --font-body: "Nunito", "Fredoka", "Segoe UI", system-ui, sans-serif;
    --font-ui: "Fredoka", "Nunito", "Segoe UI", system-ui, sans-serif;
}

/* Daytime / "snow day" theme (the sun/moon button). The hero stays a night scene on purpose. */
:root[data-theme="light"] {
    --bg: #FFF9EF;         --bg-2: #F5EAD4;        --bg-nav: rgba(255, 249, 239, .95);
    --card: rgba(255, 255, 255, .92);              --card-solid: #ffffff;
    --card-edge: rgba(18, 71, 52, .18);            --card-edge-hot: rgba(179, 23, 31, .55);
    --text: #14263F;       --muted: #465873;       --accent: #B3171F;    --link: #124734;
    --shadow: 0 12px 28px -16px rgba(20, 38, 63, .35);
    --lift: 0 20px 40px -16px rgba(179, 23, 31, .35);
    --focus: #B3171F;
}

* { box-sizing: border-box; }
html { background: var(--bg); overflow-x: clip; }
html:not([data-motion="off"]) { scroll-behavior: smooth; }
[hidden] { display: none !important; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text);
    background:
        radial-gradient(1100px 520px at 50% -140px, rgba(40, 90, 170, .30), transparent 70%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 46%, var(--bg) 100%);
    background-color: var(--bg);
    overflow-x: hidden;
    transition: background-color .3s, color .3s;
}
:root[data-theme="light"] body {
    background: radial-gradient(900px 420px at 50% -120px, rgba(214, 40, 40, .07), transparent 70%), linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 60%, var(--bg) 100%);
}

img { max-width: 100%; }
a { color: var(--link); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 8px; }
.hero :focus-visible, .scene :focus-visible { outline-color: #FFD166; }   /* the hero is always a night scene, so its focus ring stays gold in both themes */

.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 12px; top: -80px; z-index: 400; background: var(--gold); color: #1d1300; padding: .7rem 1rem; border-radius: 12px; font-weight: 700; text-decoration: none; transition: top .2s; }
.skip-link:focus { top: 12px; }

/* The overlay canvas (snow + sparkles) */
#xmas-fx-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 40; }

/* ---------------------------------------------------------------------------
   Light strings (canvases are created by xmas-lights.js)
   --------------------------------------------------------------------------- */
.lights { position: relative; display: block; pointer-events: none; }
.lights--header, .lights--divider, .lights--footer { overflow-x: clip; }
.lights__canvas { position: absolute; display: block; pointer-events: none; }
.lights__canvas.is-interactive { pointer-events: auto; }
.lights--header { height: 64px; margin-bottom: -2px; }
.lights--divider { height: 46px; max-width: 1100px; margin: 0 auto; }
.lights--footer { height: 62px; max-width: none; margin-top: 1.5rem; }
.lights--frame { position: absolute; inset: 0; }
.lights--tree { position: absolute; inset: 0; }
.lights--arches {
    position: absolute; left: 50%; bottom: 54px; width: min(1120px, 94%); height: clamp(110px, 17vw, 210px);
    transform: translateX(-50%); z-index: 2;
}
.framed { position: relative; }

/* ---------------------------------------------------------------------------
   Navigation
   --------------------------------------------------------------------------- */
.site-nav {
    position: sticky; top: 0; z-index: 100;
    display: flex; align-items: center; gap: .75rem;
    padding: .5rem clamp(.75rem, 2vw, 1.4rem);
    background: var(--bg-nav);
    border-bottom: 1px solid var(--card-edge);
    box-shadow: 0 12px 28px -20px rgba(0, 0, 0, .8);
}
.site-nav::after {          /* a tiny string of colored bulbs along the bottom edge */
    content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; pointer-events: none;
    background: repeating-linear-gradient(90deg, var(--bulb-red) 0 14px, var(--bulb-gold) 14px 28px, var(--bulb-green) 28px 42px, var(--bulb-ice) 42px 56px, var(--bulb-purple) 56px 70px);
    opacity: .75; border-radius: 0 0 3px 3px;
}
.brand { display: flex; align-items: center; gap: .5rem; min-height: 44px; font: 600 1.05rem var(--font-ui); color: var(--text); text-decoration: none; white-space: nowrap; }
.brand img { height: 31px; width: auto; }
.site-nav nav { margin-left: auto; display: flex; gap: .15rem; flex-wrap: wrap; }
.site-nav nav a {
    display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; padding: .35rem .85rem; border-radius: 999px;
    font: 600 .98rem var(--font-ui); transition: color .2s, background .2s, box-shadow .2s;
}
.site-nav nav a:hover, .site-nav nav a:focus-visible { color: var(--text); background: rgba(255, 209, 102, .14); box-shadow: 0 0 14px rgba(255, 209, 102, .25); }
.nav-tools { display: flex; gap: .4rem; }
.tool-btn {
    min-width: 44px; min-height: 44px; padding: 0; border-radius: 999px; cursor: pointer;
    font-size: 1.15rem; line-height: 1; color: var(--text);
    background: rgba(255, 255, 255, .07); border: 1px solid var(--card-edge);
    transition: transform .15s, background .2s, box-shadow .2s;
}
:root[data-theme="light"] .tool-btn { background: rgba(20, 38, 63, .06); }
.tool-btn:hover { transform: scale(1.1); box-shadow: 0 0 16px rgba(255, 209, 102, .35); }
.tool-btn[aria-expanded="true"], .tool-btn[aria-pressed="true"] { background: rgba(255, 209, 102, .22); border-color: var(--card-edge-hot); }

/* ---------------------------------------------------------------------------
   Buttons — candy-cane borders, warm glow, a little bounce
   --------------------------------------------------------------------------- */
.btn {
    --fill: #b81e1e; --stripe: var(--red);
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    min-height: 48px; padding: .7rem 1.6rem; border: 3px solid transparent; border-radius: 999px;
    font: 600 1.02rem/1.2 var(--font-ui); color: #fff; text-decoration: none; cursor: pointer; overflow: hidden;
    background: linear-gradient(var(--fill), var(--fill)) padding-box, repeating-linear-gradient(135deg, #fff 0 8px, var(--stripe) 8px 16px) border-box;
    box-shadow: 0 0 0 1px rgba(255, 230, 160, .25), 0 8px 22px -6px rgba(214, 40, 40, .55), 0 0 22px rgba(255, 209, 102, .16);
    transition: transform .18s, box-shadow .25s, filter .6s;
    -webkit-tap-highlight-color: transparent;
}
.btn:hover, .btn:focus-visible { transform: translateY(-2px) scale(1.04); box-shadow: 0 0 0 1px rgba(255, 230, 160, .5), 0 12px 28px -6px rgba(214, 40, 40, .7), 0 0 30px rgba(255, 209, 102, .4); animation: btnPop .42s ease-out; }
.btn:active { transform: scale(.97); }
.btn-primary { --fill: #b81e1e; --stripe: var(--red); }
.btn-ghost { --fill: #0d2c52; --stripe: var(--green); color: var(--text); box-shadow: 0 0 0 1px rgba(255, 230, 160, .2), 0 8px 22px -8px rgba(0, 0, 0, .6); }
.btn-ghost:hover, .btn-ghost:focus-visible { box-shadow: 0 0 0 1px rgba(255, 230, 160, .5), 0 12px 26px -8px rgba(0, 0, 0, .6), 0 0 28px rgba(39, 174, 96, .4); }
.btn-gold { --fill: #6b4a08; --stripe: #d9a21c; color: #fff4c9; box-shadow: 0 0 0 1px rgba(255, 230, 160, .3), 0 8px 22px -6px rgba(217, 162, 28, .55), 0 0 22px rgba(255, 209, 102, .25); }
.btn-small { min-height: 44px; padding: .5rem 1.15rem; font-size: .96rem; }
:root[data-theme="light"] .btn-ghost { --fill: #ffffff; color: #14263F; }
@keyframes btnPop { 0% { transform: scale(1); } 55% { transform: translateY(-3px) scale(1.08); } 100% { transform: translateY(-2px) scale(1.04); } }
.ripple { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; pointer-events: none; opacity: .5;
    background: repeating-conic-gradient(#fff 0 20deg, var(--red) 20deg 40deg); transform: scale(0); animation: ripple .7s ease-out forwards; }
@keyframes ripple { to { transform: scale(24); opacity: 0; } }

/* ---------------------------------------------------------------------------
   Hero
   --------------------------------------------------------------------------- */
.hero {
    position: relative; isolation: isolate; overflow: hidden; text-align: center;
    display: flex; flex-direction: column; align-items: center;
    min-height: clamp(600px, calc(100svh - 120px), 880px);
    padding: clamp(2.6rem, 6vw, 4.2rem) 1.25rem clamp(14rem, 27vw, 19rem);
}
.hero::after {              /* melt the snowy ground into the page */
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 90px; z-index: 5; pointer-events: none;
    background: linear-gradient(to bottom, transparent, var(--bg));
}
.scene { position: absolute; inset: 0; z-index: 0; }
.scene__sky {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, #040b1f 0%, #07173a 22%, #0b2a5c 46%, #15417f 66%, #2a5d9a 82%, #4a7db8 100%);
}
.scene__sky::before, .scene__sky::after { content: ""; position: absolute; inset: 0 0 38% 0; }
.scene__sky::before { background-image:
        radial-gradient(1.6px 1.6px at 45.3% 54.6%, rgba(255,255,255,0.68) 0, rgba(255,255,255,0.68) 55%, transparent 100%),
        radial-gradient(1.0px 1.0px at 50.8% 57.2%, rgba(255,255,255,0.71) 0, rgba(255,255,255,0.71) 55%, transparent 100%),
        radial-gradient(1.0px 1.0px at 62.7% 76.5%, rgba(255,255,255,0.60) 0, rgba(255,255,255,0.60) 55%, transparent 100%),
        radial-gradient(1.5px 1.5px at 9.9% 78.1%, rgba(255,255,255,0.47) 0, rgba(255,255,255,0.47) 55%, transparent 100%),
        radial-gradient(1.4px 1.4px at 97.3% 92.7%, rgba(255,255,255,0.76) 0, rgba(255,255,255,0.76) 55%, transparent 100%),
        radial-gradient(1.3px 1.3px at 16.4% 3.4%, rgba(255,255,255,0.48) 0, rgba(255,255,255,0.48) 55%, transparent 100%),
        radial-gradient(0.9px 0.9px at 19.6% 24.7%, rgba(255,255,255,0.68) 0, rgba(255,255,255,0.68) 55%, transparent 100%),
        radial-gradient(1.3px 1.3px at 44.2% 81.2%, rgba(255,255,255,0.77) 0, rgba(255,255,255,0.77) 55%, transparent 100%),
        radial-gradient(1.3px 1.3px at 50.0% 64.3%, rgba(255,255,255,0.59) 0, rgba(255,255,255,0.59) 55%, transparent 100%),
        radial-gradient(1.6px 1.6px at 98.8% 95.6%, rgba(255,255,255,0.80) 0, rgba(255,255,255,0.80) 55%, transparent 100%),
        radial-gradient(1.1px 1.1px at 31.9% 23.6%, rgba(255,255,255,0.49) 0, rgba(255,255,255,0.49) 55%, transparent 100%),
        radial-gradient(1.6px 1.6px at 76.1% 39.6%, rgba(255,255,255,0.64) 0, rgba(255,255,255,0.64) 55%, transparent 100%),
        radial-gradient(0.9px 0.9px at 94.9% 81.6%, rgba(255,255,255,0.55) 0, rgba(255,255,255,0.55) 55%, transparent 100%),
        radial-gradient(1.7px 1.7px at 90.2% 46.2%, rgba(255,255,255,0.65) 0, rgba(255,255,255,0.65) 55%, transparent 100%),
        radial-gradient(1.5px 1.5px at 8.2% 61.2%, rgba(255,255,255,0.58) 0, rgba(255,255,255,0.58) 55%, transparent 100%),
        radial-gradient(1.7px 1.7px at 9.5% 33.3%, rgba(255,255,255,0.83) 0, rgba(255,255,255,0.83) 55%, transparent 100%),
        radial-gradient(1.0px 1.0px at 12.6% 25.2%, rgba(255,255,255,0.48) 0, rgba(255,255,255,0.48) 55%, transparent 100%),
        radial-gradient(1.3px 1.3px at 79.1% 18.7%, rgba(255,255,255,0.67) 0, rgba(255,255,255,0.67) 55%, transparent 100%),
        radial-gradient(1.0px 1.0px at 19.7% 70.8%, rgba(255,255,255,0.77) 0, rgba(255,255,255,0.77) 55%, transparent 100%),
        radial-gradient(1.1px 1.1px at 12.4% 41.6%, rgba(255,255,255,0.58) 0, rgba(255,255,255,0.58) 55%, transparent 100%),
        radial-gradient(1.1px 1.1px at 96.2% 77.5%, rgba(255,255,255,0.89) 0, rgba(255,255,255,0.89) 55%, transparent 100%),
        radial-gradient(1.6px 1.6px at 21.6% 39.1%, rgba(255,255,255,0.77) 0, rgba(255,255,255,0.77) 55%, transparent 100%),
        radial-gradient(1.1px 1.1px at 10.8% 95.0%, rgba(255,255,255,0.58) 0, rgba(255,255,255,0.58) 55%, transparent 100%),
        radial-gradient(1.1px 1.1px at 76.7% 32.9%, rgba(255,255,255,0.49) 0, rgba(255,255,255,0.49) 55%, transparent 100%),
        radial-gradient(1.1px 1.1px at 9.8% 56.8%, rgba(255,255,255,0.75) 0, rgba(255,255,255,0.75) 55%, transparent 100%),
        radial-gradient(1.7px 1.7px at 37.4% 44.6%, rgba(255,255,255,0.69) 0, rgba(255,255,255,0.69) 55%, transparent 100%),
        radial-gradient(1.0px 1.0px at 57.3% 83.5%, rgba(255,255,255,0.53) 0, rgba(255,255,255,0.53) 55%, transparent 100%),
        radial-gradient(1.1px 1.1px at 90.0% 78.9%, rgba(255,255,255,0.54) 0, rgba(255,255,255,0.54) 55%, transparent 100%),
        radial-gradient(1.1px 1.1px at 73.5% 90.4%, rgba(255,255,255,0.93) 0, rgba(255,255,255,0.93) 55%, transparent 100%),
        radial-gradient(1.2px 1.2px at 87.5% 58.7%, rgba(255,255,255,0.50) 0, rgba(255,255,255,0.50) 55%, transparent 100%),
        radial-gradient(1.1px 1.1px at 4.8% 92.5%, rgba(255,255,255,0.80) 0, rgba(255,255,255,0.80) 55%, transparent 100%),
        radial-gradient(1.4px 1.4px at 26.2% 79.4%, rgba(255,255,255,0.60) 0, rgba(255,255,255,0.60) 55%, transparent 100%),
        radial-gradient(1.0px 1.0px at 18.2% 69.7%, rgba(255,255,255,0.56) 0, rgba(255,255,255,0.56) 55%, transparent 100%),
        radial-gradient(1.4px 1.4px at 55.8% 82.1%, rgba(255,255,255,0.59) 0, rgba(255,255,255,0.59) 55%, transparent 100%),
        radial-gradient(0.9px 0.9px at 90.9% 21.2%, rgba(255,255,255,0.58) 0, rgba(255,255,255,0.58) 55%, transparent 100%),
        radial-gradient(1.0px 1.0px at 44.7% 7.7%, rgba(255,255,255,0.63) 0, rgba(255,255,255,0.63) 55%, transparent 100%),
        radial-gradient(1.2px 1.2px at 57.1% 14.4%, rgba(255,255,255,0.90) 0, rgba(255,255,255,0.90) 55%, transparent 100%),
        radial-gradient(1.5px 1.5px at 97.1% 63.8%, rgba(255,255,255,0.74) 0, rgba(255,255,255,0.74) 55%, transparent 100%),
        radial-gradient(0.9px 0.9px at 14.8% 5.3%, rgba(255,255,255,0.91) 0, rgba(255,255,255,0.91) 55%, transparent 100%),
        radial-gradient(0.9px 0.9px at 69.7% 92.5%, rgba(255,255,255,0.77) 0, rgba(255,255,255,0.77) 55%, transparent 100%),
        radial-gradient(1.2px 1.2px at 48.3% 70.7%, rgba(255,255,255,0.95) 0, rgba(255,255,255,0.95) 55%, transparent 100%),
        radial-gradient(1.5px 1.5px at 8.4% 53.3%, rgba(255,255,255,0.90) 0, rgba(255,255,255,0.90) 55%, transparent 100%),
        radial-gradient(1.5px 1.5px at 73.2% 68.1%, rgba(255,255,255,0.91) 0, rgba(255,255,255,0.91) 55%, transparent 100%),
        radial-gradient(1.6px 1.6px at 35.5% 66.4%, rgba(255,255,255,0.89) 0, rgba(255,255,255,0.89) 55%, transparent 100%),
        radial-gradient(1.6px 1.6px at 41.9% 76.3%, rgba(255,255,255,0.74) 0, rgba(255,255,255,0.74) 55%, transparent 100%),
        radial-gradient(1.4px 1.4px at 62.2% 37.9%, rgba(255,255,255,0.75) 0, rgba(255,255,255,0.75) 55%, transparent 100%); }
.scene__sky::after { background-image:
        radial-gradient(2.2px 2.2px at 8.9% 62.1%, rgba(255,255,255,0.98) 0, rgba(255,255,255,0.98) 55%, transparent 100%),
        radial-gradient(1.9px 1.9px at 72.4% 38.5%, rgba(255,255,255,0.92) 0, rgba(255,255,255,0.92) 55%, transparent 100%),
        radial-gradient(1.3px 1.3px at 44.2% 80.8%, rgba(255,255,255,0.95) 0, rgba(255,255,255,0.95) 55%, transparent 100%),
        radial-gradient(1.7px 1.7px at 3.9% 58.5%, rgba(255,255,255,0.85) 0, rgba(255,255,255,0.85) 55%, transparent 100%),
        radial-gradient(1.8px 1.8px at 69.4% 48.7%, rgba(255,255,255,0.98) 0, rgba(255,255,255,0.98) 55%, transparent 100%),
        radial-gradient(1.5px 1.5px at 26.1% 3.1%, rgba(255,255,255,0.94) 0, rgba(255,255,255,0.94) 55%, transparent 100%),
        radial-gradient(2.1px 2.1px at 20.9% 17.9%, rgba(255,255,255,0.93) 0, rgba(255,255,255,0.93) 55%, transparent 100%),
        radial-gradient(1.5px 1.5px at 44.3% 85.8%, rgba(255,255,255,0.93) 0, rgba(255,255,255,0.93) 55%, transparent 100%),
        radial-gradient(2.0px 2.0px at 20.5% 42.5%, rgba(255,255,255,0.98) 0, rgba(255,255,255,0.98) 55%, transparent 100%),
        radial-gradient(1.8px 1.8px at 87.3% 38.1%, rgba(255,255,255,0.86) 0, rgba(255,255,255,0.86) 55%, transparent 100%),
        radial-gradient(2.0px 2.0px at 14.3% 48.7%, rgba(255,255,255,0.97) 0, rgba(255,255,255,0.97) 55%, transparent 100%),
        radial-gradient(1.5px 1.5px at 70.7% 91.3%, rgba(255,255,255,0.83) 0, rgba(255,255,255,0.83) 55%, transparent 100%),
        radial-gradient(1.4px 1.4px at 45.2% 27.9%, rgba(255,255,255,0.88) 0, rgba(255,255,255,0.88) 55%, transparent 100%),
        radial-gradient(1.5px 1.5px at 62.3% 48.4%, rgba(255,255,255,0.97) 0, rgba(255,255,255,0.97) 55%, transparent 100%),
        radial-gradient(1.3px 1.3px at 97.2% 44.5%, rgba(255,255,255,0.81) 0, rgba(255,255,255,0.81) 55%, transparent 100%),
        radial-gradient(1.9px 1.9px at 86.5% 5.9%, rgba(255,255,255,0.91) 0, rgba(255,255,255,0.91) 55%, transparent 100%); animation: skyTwinkle 4.5s ease-in-out infinite alternate; }
@keyframes skyTwinkle { from { opacity: .25; } to { opacity: 1; } }
.scene__moon {
    position: absolute; top: 7%; right: 11%; width: clamp(64px, 8vw, 116px); aspect-ratio: 1; border-radius: 50%;
    background: radial-gradient(circle at 36% 34%, #fffdf2 0%, #f6efd2 52%, #d6cda8 100%);
    box-shadow: 0 0 36px 8px rgba(255, 248, 214, .33), 0 0 120px 44px rgba(150, 190, 255, .16);
}
.scene__moon::before { content: ""; position: absolute; inset: 0; border-radius: 50%;
    background: radial-gradient(circle at 62% 30%, rgba(150, 140, 100, .22) 0 9%, transparent 10%), radial-gradient(circle at 34% 62%, rgba(150, 140, 100, .18) 0 12%, transparent 13%), radial-gradient(circle at 70% 70%, rgba(150, 140, 100, .15) 0 7%, transparent 8%); }
.scene__art { position: absolute; left: 0; right: 0; bottom: 0; aspect-ratio: 1600 / 310; min-height: 190px; }
.scene__art svg { display: block; width: 100%; height: 100%; }
.spk { position: absolute; width: var(--sz); height: var(--sz); border-radius: 50%; pointer-events: none; opacity: 0;
    background: radial-gradient(circle, #fff 0%, rgba(255, 230, 160, .7) 38%, transparent 70%); animation: spk 6s ease-in-out infinite; }
@keyframes spk { 0%, 100% { opacity: 0; transform: translateY(0) scale(.6); } 50% { opacity: .9; transform: translateY(-16px) scale(1); } }

/* twinkling things inside the SVG scene */
.scene .tl { fill: var(--c); opacity: .4; animation: tlA 2.8s ease-in-out infinite; }
.scene .tl.b { animation-name: tlB; animation-duration: 3.4s; } .scene .tl.c { animation-name: tlC; animation-duration: 2.3s; }
@keyframes tlA { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
@keyframes tlB { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@keyframes tlC { 0%, 100% { opacity: .5; } 33% { opacity: 1; } 66% { opacity: .25; } }
.scene .win { animation: winGlow 5s ease-in-out infinite alternate; }
@keyframes winGlow { from { opacity: .82; } to { opacity: 1; } }

.hero__decor { position: absolute; inset: 0; z-index: 4; pointer-events: none; transition: opacity 1.4s ease; }
.hero__inner { position: relative; z-index: 3; max-width: 920px; width: 100%; }
.hero__inner::before { content: ""; position: absolute; inset: -4% -10% -6% -10%; z-index: -1; pointer-events: none;
    background: radial-gradient(ellipse 60% 55% at 50% 48%, rgba(4, 11, 31, .62), transparent 72%); }
.hero-logo { width: min(210px, 46vw); height: auto; filter: drop-shadow(0 0 26px rgba(255, 199, 44, .42)); }
.hero h1 {
    margin: .7rem 0 .4rem; font: 700 clamp(2.5rem, 8.2vw, 5.4rem)/1.02 var(--font-display); color: #fff;
    text-shadow: 0 0 18px rgba(255, 230, 160, .55), 0 3px 0 rgba(0, 0, 0, .25);
}
.glow { display: inline-block; }
.glow__letters span { display: inline-block; text-shadow: 0 0 .22em currentColor, 0 0 .6em currentColor; animation: letterColor 6s linear infinite; animation-delay: calc(var(--i) * -.42s); color: var(--bulb-gold); }
.glow__letters span:nth-child(5n+1) { color: var(--bulb-red); } .glow__letters span:nth-child(5n+2) { color: var(--bulb-gold); }
.glow__letters span:nth-child(5n+3) { color: var(--bulb-green); } .glow__letters span:nth-child(5n+4) { color: var(--bulb-ice); }
.glow__letters span:nth-child(5n) { color: var(--bulb-pink); }
@keyframes letterColor {
    0%, 100% { color: #ff5a5a; } 20% { color: #ffc94a; } 40% { color: #3df08c; } 60% { color: #7fd6ff; } 80% { color: #c18bff; }
}
.tagline { font: 400 clamp(1.7rem, 4.6vw, 2.5rem)/1.2 var(--font-accent); color: var(--glow); max-width: 24em; margin: 0 auto 1.8rem; text-shadow: 0 0 14px rgba(255, 209, 102, .45); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; justify-content: center; }

.drift { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: clamp(40px, 6vw, 80px); z-index: 4; pointer-events: none; }
.drift path { fill: #e6efff; }

/* The entrance sequence (only while html.intro-pending; the failsafe removes it after 6 s) */
.intro-pending .scene { animation: fadeIn 1.6s ease both; }
.intro-pending [data-intro] { opacity: 0; transform: translateY(14px); }
.intro-pending [data-intro].on { opacity: 1; transform: none; transition: opacity .9s ease, transform .9s ease; }
.intro-pending h1[data-intro].on { animation: titleIn 1.2s ease both; }
.intro-pending .hero__decor, .intro-pending .lights--arches { opacity: 0; }
.intro-pending.intro-lit .hero__decor, .intro-pending.intro-lit .lights--arches { opacity: 1; }
.intro-pending .hero-actions .btn { filter: brightness(.55) saturate(.7); }
.intro-pending.intro-lit .hero-actions .btn { filter: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes titleIn { 0% { filter: blur(10px) brightness(2); letter-spacing: .08em; } 100% { filter: none; letter-spacing: 0; } }

.hero.is-away *, .hero.is-away *::before, .hero.is-away *::after { animation-play-state: paused !important; }

/* ---------------------------------------------------------------------------
   Decorations (all are real <button>s: keyboard + screen-reader friendly)
   --------------------------------------------------------------------------- */
.deco {
    pointer-events: auto; display: block; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer;
    line-height: 0; -webkit-tap-highlight-color: transparent; transform-origin: 50% 0;
}
.deco svg { display: block; width: 100%; height: auto; overflow: visible; pointer-events: none; }
.deco:focus-visible { outline: 3px solid var(--focus); outline-offset: 5px; border-radius: 14px; }

.deco--ornament { position: absolute; top: -2px; width: clamp(42px, 5vw, 62px); animation: sway 6s ease-in-out infinite alternate; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .35)); }
.deco--ornament:hover { filter: drop-shadow(0 6px 14px rgba(255, 209, 102, .55)); }
.deco--o1 { left: 7%; animation-duration: 6.4s; } .deco--o2 { right: 25%; animation-duration: 7.6s; animation-delay: -2s; }
.deco--o3 { left: 22%; animation-duration: 5.4s; animation-delay: -1s; }
@keyframes sway { from { transform: rotate(-2.6deg); } to { transform: rotate(2.6deg); } }
.deco--ornament.swing { animation: swing 2.6s ease-out; }
@keyframes swing { 0% { transform: rotate(0); } 10% { transform: rotate(17deg); } 26% { transform: rotate(-12deg); } 42% { transform: rotate(8deg); } 58% { transform: rotate(-5deg); } 74% { transform: rotate(2.5deg); } 100% { transform: rotate(0); } }

.deco--bell { position: absolute; top: -26px; right: 14px; width: 58px; z-index: 3; transform-origin: 50% 16%; animation: sway 7s ease-in-out infinite alternate; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .4)); }
.deco--bell.ring { animation: bellRing 1.7s ease-out; }
@keyframes bellRing { 0% { transform: rotate(0); } 8% { transform: rotate(24deg); } 22% { transform: rotate(-20deg); } 38% { transform: rotate(14deg); } 54% { transform: rotate(-9deg); } 70% { transform: rotate(5deg); } 100% { transform: rotate(0); } }

.deco--tree { position: absolute; left: clamp(.3rem, 5vw, 5.5rem); bottom: clamp(2.6rem, 5.5vw, 4.4rem); width: clamp(84px, 13vw, 176px); transform-origin: 50% 100%; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .4)); z-index: 3; transition: transform .25s; }
.deco--tree:hover { transform: scale(1.04); }
.deco--tree .tl { fill: var(--c); opacity: .2; transition: opacity .35s; }
.deco--tree .tl.on { opacity: 1; filter: drop-shadow(0 0 3.5px var(--c)); animation: lamp 2.4s ease-in-out infinite; }
.deco--tree .tl.on:nth-child(3n) { animation-delay: -.8s; } .deco--tree .tl.on:nth-child(3n+1) { animation-delay: -1.5s; }
@keyframes lamp { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
.tree__halo { opacity: .12; transition: opacity .8s; } .tree__star { transition: filter .8s; transform-box: fill-box; transform-origin: center; }
.deco--tree.is-lit .tree__halo { opacity: 1; animation: starPulse 2.6s ease-in-out infinite; }
.deco--tree.is-lit .tree__star { filter: drop-shadow(0 0 7px #ffd166) drop-shadow(0 0 14px #ffb300); }
@keyframes starPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
.tree__halo { transform-box: fill-box; transform-origin: center; }

.deco--sleigh { position: absolute; top: 5%; left: 0; width: clamp(290px, 38vw, 480px); opacity: 0; pointer-events: none; transform-origin: 50% 50%; will-change: transform; }
/* a tight dark edge first (keeps it readable over the bright logo), then the warm glow */
.deco--sleigh svg { filter: drop-shadow(0 0 1.5px rgba(4, 11, 31, .95)) drop-shadow(0 0 2px rgba(4, 11, 31, .8)) drop-shadow(0 0 12px rgba(255, 220, 140, .5)); }
.deco--sleigh.fly { opacity: 1; pointer-events: auto; animation: sleighFly 20s linear forwards; }
@keyframes sleighFly {
    0%   { transform: translate3d(calc(-100% - 30px), 50px, 0) rotate(5deg); }
    35%  { transform: translate3d(32vw, 0, 0) rotate(-2deg); }
    70%  { transform: translate3d(70vw, -24px, 0) rotate(-3deg); }
    100% { transform: translate3d(calc(100vw + 30px), 22px, 0) rotate(3deg); }
}

/* Kids' friends */
.kids__friends { position: relative; display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: clamp(.5rem, 3vw, 2.4rem); margin-top: 3rem; padding: 0 0 .6rem; }
.kids__friends::after { content: ""; position: absolute; left: -4%; right: -4%; bottom: -10px; height: 58px; z-index: -1; border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    background: linear-gradient(#e6efff, #9db9e6); opacity: .92; }
.kids__friends .deco { transform-origin: 50% 100%; transition: transform .2s; }
.kids__friends .deco:hover { transform: translateY(-4px) scale(1.04); }
.deco--snowman { width: clamp(96px, 16vw, 150px); } .deco--reindeer { width: clamp(100px, 17vw, 156px); }
.deco--ginger { width: clamp(78px, 12vw, 112px); } .deco--present { width: clamp(88px, 14vw, 128px); }
.snowman__head { transform-box: fill-box; transform-origin: 50% 100%; }
.deco--snowman.wave .snowman__head { animation: tipHat 1.3s ease-in-out; }
@keyframes tipHat { 0%, 100% { transform: rotate(0); } 18% { transform: rotate(-14deg) translateY(-3px); } 40% { transform: rotate(10deg); } 62% { transform: rotate(-8deg); } 82% { transform: rotate(4deg); } }
.deco--snowman.wave { animation: hop .6s ease-out; }
@keyframes hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-14px); } }
.deco--ginger.run { animation: gingerRun 1.5s ease-in-out; }
@keyframes gingerRun { 0% { transform: translateX(0) rotate(0); } 15% { transform: translate(-26px, -22px) rotate(-14deg); } 30% { transform: translate(-52px, 0) rotate(8deg); } 45% { transform: translate(-26px, -20px) rotate(-10deg); } 60% { transform: translate(8px, 0) rotate(6deg); } 78% { transform: translate(24px, -14px) rotate(-6deg); } 100% { transform: translate(0, 0) rotate(0); } }
.nose__glow { opacity: 0; transition: opacity .3s; } .nose { transition: fill .3s, filter .3s; }
.deco--reindeer.is-lit .nose__glow { opacity: 1; animation: nosePulse 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.deco--reindeer.is-lit .nose { fill: #ff3b2a; filter: drop-shadow(0 0 6px #ff3b2a); }
@keyframes nosePulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.22); } }
.present__glow { opacity: 0; transition: opacity .4s; transform-box: fill-box; transform-origin: center; }
.present__lid { transform-box: fill-box; transform-origin: 14% 100%; transition: transform .55s cubic-bezier(.3, 1.4, .5, 1); }
.deco--present.is-open .present__lid { transform: translate(14px, -30px) rotate(24deg); }
.deco--present.is-open .present__glow { opacity: 1; animation: starPulse 2s ease-in-out infinite; }
.deco--present.shake { animation: shake .52s ease-in-out; }
@keyframes shake { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(-7deg) translateX(-3px); } 30% { transform: rotate(6deg) translateX(3px); } 45% { transform: rotate(-5deg); } 60% { transform: rotate(4deg); } 80% { transform: rotate(-2deg); } }
.kids__friends .deco.shake, .kids__friends .deco.run, .kids__friends .deco.wave { transform-origin: 50% 100%; }

/* ---------------------------------------------------------------------------
   Sections
   --------------------------------------------------------------------------- */
.container { max-width: 1040px; margin: 0 auto; padding: clamp(2.2rem, 5vw, 3.6rem) 1.4rem; position: relative; z-index: 1; }
h2 { display: flex; align-items: center; gap: .7rem; margin: 0 0 .6rem; font: 700 clamp(1.9rem, 4.4vw, 2.7rem)/1.15 var(--font-display); color: var(--text); text-shadow: 0 0 20px rgba(255, 209, 102, .22); }
:root[data-theme="light"] h2 { text-shadow: none; }
.section-sub { color: var(--muted); margin: 0 0 1.4rem; }
.mini-bulb { position: relative; display: inline-block; flex-shrink: 0; width: 17px; height: 27px; margin-top: 8px; border-radius: 50% 50% 46% 46% / 40% 40% 60% 60%; background: radial-gradient(circle at 38% 30%, #fff 0, var(--c, #fff) 38%, var(--c, #fff) 100%); box-shadow: 0 0 14px var(--c), 0 0 28px var(--c); animation: miniGlow 3s ease-in-out infinite; }
.mini-bulb::before { content: ""; position: absolute; left: 50%; top: -8px; width: 11px; height: 10px; margin-left: -5.5px; border-radius: 2px 2px 1px 1px; background: linear-gradient(90deg, #0f4a2c, #2f9a60, #0c3a22); }
.mini-bulb.red { --c: var(--bulb-red); } .mini-bulb.green { --c: var(--bulb-green); } .mini-bulb.blue { --c: var(--bulb-blue); }
.mini-bulb.purple { --c: var(--bulb-purple); } .mini-bulb.gold { --c: var(--bulb-gold); }
@keyframes miniGlow { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(.78); } }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 1.3rem; margin-top: 1.6rem; }
.card {
    position: relative; padding: 1.6rem; border-radius: 22px; background: var(--card); border: 1px solid var(--card-edge);
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .06);
    transition: transform .25s cubic-bezier(.2, .8, .3, 1.2), box-shadow .25s, border-color .25s;
}
.card:hover { transform: translateY(-6px); border-color: var(--card-edge-hot); box-shadow: var(--lift), inset 0 1px 0 rgba(255, 255, 255, .08); }
.card-icon { font-size: 2.1rem; line-height: 1; margin-bottom: .5rem; filter: drop-shadow(0 0 10px rgba(255, 209, 102, .35)); }
.card h3 { margin: 0 0 .4rem; font: 700 1.25rem var(--font-ui); }
.card p { margin: 0; color: var(--muted); }
.card strong { color: var(--text); }
.card .map-link { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.card .map-link:hover strong { color: var(--accent); }
.card .fm { color: var(--accent); font-size: 1.2em; white-space: nowrap; text-shadow: 0 0 12px rgba(255, 209, 102, .4); }
:root[data-theme="light"] .card .fm { text-shadow: none; }
.card--radio { overflow: visible; }

/* scroll reveal: only armed by JS (html.reveal-ready), so no JS = everything simply visible */
.reveal-ready .reveal:not(.in) { opacity: 0; }
.reveal-ready .reveal.in { animation: rise .8s cubic-bezier(.2, .7, .2, 1) backwards; }
.reveal-ready .card-grid .reveal.in:nth-child(2) { animation-delay: .1s; } .reveal-ready .card-grid .reveal.in:nth-child(3) { animation-delay: .2s; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------------------
   Countdown
   --------------------------------------------------------------------------- */
.cd-panel { margin: 26px 8px 8px; padding: clamp(1.6rem, 4vw, 2.5rem) clamp(1rem, 3vw, 2rem); text-align: center; border-radius: 28px;
    background: radial-gradient(ellipse 70% 90% at 50% 0%, rgba(255, 209, 102, .12), transparent 70%), var(--card); border: 1px solid var(--card-edge); box-shadow: var(--shadow); }
.cd-title { justify-content: center; font-size: clamp(1.8rem, 4.6vw, 2.6rem); }
.cd-sub { margin: 0 auto .4rem; max-width: 36em; color: var(--text); font-weight: 600; }
.cd-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.5rem, 2vw, 1rem); max-width: 620px; margin: 1.3rem auto 1rem; }
.cd-tile { position: relative; padding: 1.15rem .3rem .7rem; border-radius: 18px; background: linear-gradient(180deg, #0a1f40, #0d2a52); border: 1px solid rgba(255, 209, 102, .35); box-shadow: inset 0 0 22px rgba(255, 209, 102, .08), 0 8px 18px -10px rgba(0, 0, 0, .7); }
.cd-tile::before { content: ""; position: absolute; top: 7px; left: 50%; width: 46px; height: 6px; margin-left: -23px; border-radius: 3px; opacity: .9;
    background: radial-gradient(circle at 6px 3px, var(--bulb-red) 0 3px, transparent 3.6px), radial-gradient(circle at 23px 3px, var(--bulb-gold) 0 3px, transparent 3.6px), radial-gradient(circle at 40px 3px, var(--bulb-green) 0 3px, transparent 3.6px); filter: drop-shadow(0 0 4px rgba(255, 220, 140, .8)); }
.cd-num { display: block; font: 700 clamp(1.8rem, 6.2vw, 3rem)/1.1 var(--font-ui); color: var(--glow); text-shadow: 0 0 14px rgba(255, 209, 102, .6); font-variant-numeric: tabular-nums; }
.cd-lab { display: block; color: #BCCBE6; font: 600 .78rem var(--font-ui); letter-spacing: .1em; text-transform: uppercase; }
.cd-note { margin: .6rem auto 0; max-width: 40em; color: var(--muted); font-size: .96rem; }

/* ---------------------------------------------------------------------------
   Jukebox playlist
   --------------------------------------------------------------------------- */
.jukebox { margin: 34px 12px 26px; padding: clamp(1.8rem, 4vw, 2.6rem) clamp(1rem, 2.5vw, 1.8rem) 1.6rem; border-radius: 70px 70px 24px 24px;
    background: radial-gradient(ellipse 90% 60% at 50% 0%, rgba(168, 98, 255, .16), transparent 70%), linear-gradient(180deg, rgba(34, 22, 66, .66), rgba(10, 30, 62, .86)); box-shadow: var(--shadow); }
:root[data-theme="light"] .jukebox { background: radial-gradient(ellipse 90% 60% at 50% 0%, rgba(168, 98, 255, .10), transparent 70%), linear-gradient(180deg, #fff, #f7ecd9); }
.jukebox__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .9rem; margin-bottom: .4rem; padding-top: .6rem; }
.jukebox__top .section-sub { margin: 0; flex: 1 1 260px; }
/* The candy canes hang over the top corners and reach ~60 px in from each edge, so keep the opening line clear of both
   (it used to start underneath the left one). Below 720 px the canes are hidden and this is not needed. */
@media (min-width: 721px) {
    .jukebox__top { padding-left: calc(4.4rem - clamp(1rem, 2.5vw, 1.8rem)); padding-right: calc(4.4rem - clamp(1rem, 2.5vw, 1.8rem)); }
    .jukebox__top .section-sub { text-align: center; }
}
.cane { position: absolute; top: -22px; width: 46px; height: 92px; pointer-events: none; background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 120'%3E%3Cpath d='M24 118 V42 A20 20 0 0 1 64 42' fill='none' stroke='%23fff' stroke-width='14' stroke-linecap='round'/%3E%3Cpath d='M24 118 V42 A20 20 0 0 1 64 42' fill='none' stroke='%23d62828' stroke-width='14' stroke-dasharray='9 10'/%3E%3Cpath d='M18 112 V44' stroke='rgba(255,255,255,.55)' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E"); filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .35)); }
.cane--l { left: 8px; transform: rotate(-8deg); } .cane--r { right: 8px; transform: scaleX(-1) rotate(-8deg); }

.playlist { list-style: none; counter-reset: track; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: .65rem; }
.playlist li {
    --c: var(--bulb-red); counter-increment: track; position: relative;
    display: grid; grid-template-columns: 2.2rem minmax(0, 1fr); column-gap: .8rem; row-gap: .05rem; align-items: center;
    padding: .7rem 1rem .7rem .8rem; border-radius: 16px;
    background: rgba(255, 255, 255, .045); border: 1px solid var(--card-edge); box-shadow: inset 4px 0 0 var(--c);
    transition: transform .2s, border-color .2s, box-shadow .25s, background .25s;
}
:root[data-theme="light"] .playlist li { background: #fff; }
.playlist li:nth-child(5n+2) { --c: var(--bulb-green); } .playlist li:nth-child(5n+3) { --c: var(--bulb-gold); }
.playlist li:nth-child(5n+4) { --c: var(--bulb-ice); } .playlist li:nth-child(5n) { --c: var(--bulb-purple); }
.playlist li::before { content: counter(track, decimal-leading-zero); grid-row: 1 / span 2; display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%;
    font: 700 .82rem var(--font-ui); color: #0b1530; background: radial-gradient(circle at 35% 30%, #fff, var(--c) 62%); box-shadow: 0 0 12px var(--c); }
.playlist li:hover, .playlist li:focus-within { transform: translateY(-2px) translateX(3px); border-color: var(--c); box-shadow: inset 4px 0 0 var(--c), 0 10px 22px -10px var(--c); background: rgba(255, 255, 255, .08); }
.playlist .song { grid-column: 2; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.playlist .artist { grid-column: 2; color: var(--muted); font-size: .88rem; line-height: 1.25; }

/* ---------------------------------------------------------------------------
   Gallery
   --------------------------------------------------------------------------- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2.4rem 2rem; margin-top: 1.8rem; padding: 0 12px; }
.media-card { margin: 18px 0; background: var(--card-solid); border-radius: 22px; box-shadow: var(--shadow); }
.media-card__inner { position: relative; overflow: hidden; border-radius: 20px; height: 100%; }
.media-card img { display: block; width: 100%; height: 100%; object-fit: cover; background: #000; aspect-ratio: 1488 / 716; }
.media-card-full { cursor: pointer; }
.badge { display: inline-block; vertical-align: middle; padding: .22rem .65rem; border-radius: 999px; background: var(--bulb-gold); color: #3a2b00; font: 700 .72rem var(--font-ui); letter-spacing: .06em; text-transform: uppercase; }
.badge--corner { position: absolute; left: 10px; bottom: 10px; box-shadow: 0 4px 12px rgba(0, 0, 0, .45); }
.badge-big { font-size: .88rem; padding: .45rem 1.1rem; }
.stream-placeholder { display: flex; align-items: center; justify-content: center; min-height: 240px; background: radial-gradient(ellipse 80% 80% at 50% 40%, rgba(59, 130, 246, .16), transparent 70%), var(--card-solid); }
.stream-box { text-align: center; padding: 2.4rem 1.6rem; }
.stream-icon { display: block; font-size: 3.2rem; margin-bottom: .8rem; animation: camBlink 3s ease-in-out infinite; }
@keyframes camBlink { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.stream-box p { margin: .9rem 0 0; color: var(--muted); }

/* ---------------------------------------------------------------------------
   Mini light show
   --------------------------------------------------------------------------- */
.mini__stage { display: grid; grid-template-columns: minmax(220px, 330px) 1fr; gap: clamp(1rem, 4vw, 3rem); align-items: center; margin-top: 1.4rem; padding: clamp(1rem, 3vw, 2rem); border-radius: 28px;
    background: radial-gradient(ellipse 50% 90% at 20% 60%, rgba(31, 203, 107, .09), transparent 70%), var(--card); border: 1px solid var(--card-edge); box-shadow: var(--shadow); }
.mini__tree { position: relative; width: 100%; max-width: 330px; margin: 0 auto; aspect-ratio: 4 / 5; }
.mini__label { margin: 0 0 .7rem; font: 700 1.1rem var(--font-ui); }
.mini__modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.mini__modes button, .modes button, .seg button {
    min-height: 48px; padding: .55rem .9rem; border-radius: 16px; cursor: pointer; font: 600 1rem var(--font-ui); color: var(--text);
    background: rgba(255, 255, 255, .06); border: 2px solid var(--card-edge); transition: transform .15s, border-color .2s, box-shadow .2s, background .2s;
}
:root[data-theme="light"] .mini__modes button, :root[data-theme="light"] .modes button, :root[data-theme="light"] .seg button { background: #fff; }
.mini__modes button:hover, .modes button:hover, .seg button:hover { transform: translateY(-2px); border-color: var(--card-edge-hot); }
.mini__modes button[aria-checked="true"], .modes button[aria-checked="true"], .seg button[aria-checked="true"] { border-color: var(--accent); background: rgba(255, 209, 102, .16); box-shadow: 0 0 20px rgba(255, 209, 102, .28); }
.mini__now { margin: .9rem 0 0; color: var(--muted); }

/* ---------------------------------------------------------------------------
   Kids' corner + coloring pages
   --------------------------------------------------------------------------- */
.kids .card-grid { margin-top: 1.4rem; }
.download-card { overflow: hidden; }
.download-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 7px; background: repeating-linear-gradient(135deg, #fff 0 8px, var(--red) 8px 16px); opacity: .9; }
.download-card:hover { animation: cardBounce .5s ease-out; box-shadow: var(--lift), 0 0 0 2px rgba(255, 209, 102, .45); }
@keyframes cardBounce { 0% { transform: translateY(0); } 40% { transform: translateY(-11px); } 70% { transform: translateY(-4px); } 100% { transform: translateY(-6px); } }
.download-card .card-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.2rem; }

/* Coloring pages: ONE sideways-scrolling row (16 sets). xmas-coloring.js puts the current season first. */
.cp { position: relative; margin-top: 1.2rem; }
.cp__track { list-style: none; margin: 0; padding: 20px 6px 30px; display: flex; gap: 1.1rem; overflow-x: auto; overflow-y: hidden;
    overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding-inline: 6px; -webkit-overflow-scrolling: touch;
    scrollbar-width: thin; scrollbar-color: var(--accent) transparent; }
.cp__track::-webkit-scrollbar { height: 9px; }
.cp__track::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 9px; }
.cp__track::-webkit-scrollbar-track { background: rgba(255, 255, 255, .06); border-radius: 9px; }
:root[data-theme="light"] .cp__track::-webkit-scrollbar-track { background: rgba(20, 38, 63, .08); }
.cp__track:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 18px; }
.cp__card { flex: 0 0 clamp(200px, 22vw, 244px); scroll-snap-align: start; display: flex; flex-direction: column; padding: 1.15rem 1.1rem 1.15rem; }
.cp__thumb { display: block; margin: .35rem 0 .85rem; border-radius: 10px; background: #fff; overflow: hidden; aspect-ratio: 17 / 22;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .38), 0 0 0 1px rgba(255, 255, 255, .5); }
.cp__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cp__card h3 { font-size: 1.12rem; margin-bottom: .3rem; }
.cp__card p { font-size: .9rem; line-height: 1.4; }
.cp__card .cp__pages { margin-top: .5rem; font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); flex: 1 1 auto; }
.cp__card .card-actions { margin-top: .85rem; gap: .5rem; }
.cp__card .btn { flex: 1 1 auto; justify-content: center; padding-inline: .8rem; }
.cp__badge { position: absolute; z-index: 2; top: 1.05rem; right: 1.05rem; padding: .22rem .6rem; border-radius: 999px; background: var(--accent); color: #2a1a00;
    font: 700 .74rem var(--font-ui); letter-spacing: .03em; box-shadow: 0 4px 12px rgba(0, 0, 0, .4); }
:root[data-theme="light"] .cp__badge { background: var(--red); color: #fff; }
.cp__nav { position: absolute; z-index: 3; top: 36%; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; padding: 0; cursor: pointer;
    background: var(--card-solid); color: var(--text); border: 1px solid var(--card-edge-hot); font: 700 1.7rem/1 var(--font-ui);
    box-shadow: 0 8px 22px rgba(0, 0, 0, .5); transition: transform .2s, opacity .2s; }
.cp__nav--prev { left: -14px; } .cp__nav--next { right: -14px; }
.cp__nav:hover:not(:disabled), .cp__nav:focus-visible { transform: scale(1.1); border-color: var(--accent); }
.cp__nav:disabled { opacity: 0; pointer-events: none; }
@media (hover: none) { .cp__nav { display: none; } }
@media (max-width: 600px) { .cp__card { flex-basis: 62vw; } .cp__nav { display: none; } }
html[data-motion="off"] .cp__nav { transition: none; }

/* ---------------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------------- */
footer { text-align: center; padding: 2rem 1.5rem 2.6rem; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .25)); }
:root[data-theme="light"] footer { background: linear-gradient(180deg, transparent, rgba(18, 71, 52, .08)); }
footer p { margin: .3rem 0; }
.footer-note { color: var(--muted); font-size: .95rem; }
footer img { height: 27px; width: auto; }

/* ---------------------------------------------------------------------------
   Light-control panel + toast
   --------------------------------------------------------------------------- */
.panel { position: fixed; top: 72px; right: 12px; z-index: 200; width: min(390px, calc(100vw - 24px)); max-height: calc(100vh - 90px); overflow: auto; padding: 1rem 1.15rem 1.2rem;
    background: rgba(7, 22, 44, .97); color: #FFF9EF; border: 1px solid rgba(255, 230, 160, .3); border-radius: 22px; box-shadow: 0 26px 60px rgba(0, 0, 0, .6); animation: panelIn .22s ease-out; }
:root[data-theme="light"] .panel { background: rgba(255, 252, 245, .98); color: #14263F; border-color: rgba(18, 71, 52, .25); box-shadow: 0 26px 60px rgba(20, 38, 63, .3); }
@keyframes panelIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.panel__head { display: flex; align-items: center; justify-content: space-between; }
.panel h2 { font-size: 1.7rem; margin: 0; }
.panel__close { min-width: 44px; min-height: 44px; border-radius: 50%; border: 1px solid var(--card-edge); background: transparent; color: inherit; font-size: 1.1rem; cursor: pointer; }
.panel__note { margin: .2rem 0 .9rem; color: var(--muted); font-size: .94rem; }
.panel__group { margin: 0 0 1rem; padding: 0; border: 0; min-width: 0; }
.panel__group legend { padding: 0; margin-bottom: .5rem; font: 700 .85rem var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.modes button { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; text-align: left; padding: .6rem .75rem; font-size: .93rem; }
.swatch { display: flex; gap: 4px; } .swatch i { display: block; width: 11px; height: 11px; border-radius: 50%; background: var(--c); box-shadow: 0 0 7px var(--c); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; }
.panel__switches { display: grid; gap: .3rem; margin-bottom: 1rem; }
.switch { display: flex; align-items: center; gap: .8rem; min-height: 46px; cursor: pointer; font-weight: 600; }
.switch small { font-weight: 400; color: var(--muted); }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__ui { position: relative; flex: none; width: 48px; height: 28px; border-radius: 999px; background: #44506b; transition: background .2s; }
.switch__ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 2px 5px rgba(0, 0, 0, .4); }
.switch input:checked + .switch__ui { background: var(--green); } .switch input:checked + .switch__ui::after { transform: translateX(20px); }
.switch input:focus-visible + .switch__ui { outline: 3px solid var(--focus); outline-offset: 3px; }
.switch input:disabled + .switch__ui { opacity: .4; }

.toast { position: fixed; left: 50%; bottom: 22px; z-index: 300; max-width: min(92vw, 520px); padding: .8rem 1.3rem; border-radius: 999px; text-align: center; font: 600 1rem var(--font-ui);
    background: rgba(8, 27, 51, .96); color: #FFF9EF; border: 1px solid rgba(255, 209, 102, .55); box-shadow: 0 12px 30px rgba(0, 0, 0, .5), 0 0 24px rgba(255, 209, 102, .22);
    opacity: 0; transform: translate(-50%, 16px); pointer-events: none; transition: opacity .3s, transform .3s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
:root[data-theme="light"] .toast { background: #fff; color: #14263F; }

/* ---------------------------------------------------------------------------
   Animation levels.  data-motion on <html> is "full", "calm" or "off".
   --------------------------------------------------------------------------- */
html[data-motion="off"] *, html[data-motion="off"] *::before, html[data-motion="off"] *::after { animation: none !important; transition-duration: .01ms !important; }
html[data-motion="off"] .reveal { opacity: 1 !important; }
html[data-motion="off"] .btn:hover { transform: none; }
html[data-motion="off"] .ripple { display: none; }
html[data-motion="calm"] .glow__letters span, html[data-motion="calm"] .mini-bulb, html[data-motion="calm"] .scene .tl, html[data-motion="calm"] .spk { animation-duration: 12s !important; }
html[data-motion="calm"] .deco--ornament, html[data-motion="calm"] .deco--bell, html[data-motion="calm"] .stream-icon, html[data-motion="calm"] .scene .win { animation: none; }
html[data-motion="calm"] .scene__sky::after { animation: none; }

/* ---------------------------------------------------------------------------
   Phones & tablets — designed for, not just shrunk
   --------------------------------------------------------------------------- */
@media (max-width: 960px) {
    .brand span { display: none; }
    .site-nav nav a { padding: .35rem .65rem; font-size: .93rem; }
}
@media (max-width: 860px) {
    .mini__stage { grid-template-columns: 1fr; }
    .mini__tree { max-width: 280px; }
}
@media (max-width: 720px) {
    body { font-size: 1.02rem; }
    .lights--header { height: 54px; }
    .site-nav { flex-wrap: wrap; row-gap: .15rem; padding-bottom: .3rem; }
    .brand span { display: none; }
    .nav-tools { margin-left: auto; }
    .site-nav nav { order: 3; width: 100%; margin-left: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: .1rem; }
    .site-nav nav::-webkit-scrollbar { display: none; }
    .site-nav nav a { white-space: nowrap; padding: .55rem .8rem; }
    .hero { min-height: 0; padding-top: 2.2rem; padding-bottom: 11.5rem; }
    .hero-actions .btn { flex: 1 1 100%; max-width: 330px; }
    .lights--arches { bottom: 42px; width: 100%; height: 108px; }
    .deco--o2 { right: 14%; } .deco--o3 { display: none; }
    .deco--tree { width: 76px; left: 2px; bottom: 34px; }
    .scene__art { min-height: 160px; }
    .scene__moon { top: 27%; right: 5%; width: 54px; }
    .deco--bell { right: 8px; }
    .playlist { grid-template-columns: 1fr; }
    .jukebox { margin-left: 6px; margin-right: 6px; border-radius: 50px 50px 22px 22px; }
    .cane { display: none; }
    .gallery-grid { padding: 0 6px; }
    .cd-tiles { gap: .4rem; }
    .panel { top: auto; bottom: 0; left: 0; right: 0; width: auto; max-height: 82vh; border-radius: 22px 22px 0 0; }
    .toast { bottom: 14px; border-radius: 22px; }
}
@media (max-width: 560px) {
    .kids__friends { flex-wrap: nowrap; gap: .3rem; margin-top: 2.2rem; }
    .deco--snowman { width: 23vw; } .deco--reindeer { width: 24vw; } .deco--ginger { width: 17vw; } .deco--present { width: 19vw; }
}
@media (hover: none) { .card:hover, .btn:hover, .playlist li:hover { transform: none; } }

/* If JavaScript never runs, the inline script cannot read the visitor's saved/system motion preference, so honour the system one here. */
@media (prefers-reduced-motion: reduce) {
    html:not(.js) { scroll-behavior: auto; }
    html:not(.js) *, html:not(.js) *::before, html:not(.js) *::after { animation: none !important; transition-duration: .01ms !important; }
}

@media print {
    .lights, .deco, #xmas-fx-canvas, .panel, .toast, .scene, .hero__decor, .nav-tools, .drift, .skip-link { display: none !important; }
    body { background: #fff; color: #000; } .hero { min-height: 0; padding: 1rem; } .hero h1, h2, .tagline { color: #000; text-shadow: none; }
    .card { box-shadow: none; border: 1px solid #999; }
}

/* ---------------------------------------------------------------------------
   Snowball Showdown (the game) — see xmas-game.js
   --------------------------------------------------------------------------- */
.container.game { max-width: 1200px; }
.game__layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 1.8rem; align-items: start; margin-top: 1rem; }
.game__main { margin: 24px 12px; }
.game__stage {
    position: relative; width: 100%; overflow: hidden; border-radius: 20px; background: #0b2a5c; box-shadow: var(--shadow);
    user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
}
/* centre when there is room, scroll from the top (never clip the title) when there is not */
.game__overlay > :first-child { margin-top: auto; }
.game__overlay > :last-child { margin-bottom: auto; }
/* the shape is decided here first (same breakpoint the script uses), so nothing jumps when the game script arrives */
.game__stage, .game__stage.is-wide { aspect-ratio: 960 / 540; }
@media (max-width: 580px) { .game__stage { aspect-ratio: 640 / 800; } }
.game__stage.is-tall { aspect-ratio: 640 / 800; }
.game__stage canvas { display: block; width: 100%; height: 100%; touch-action: manipulation; }
.game__stage.is-playing canvas { cursor: crosshair; }
.game__stage canvas:focus-visible { outline: 4px solid #FFD166; outline-offset: -4px; border-radius: 20px; }
html:not(.js) .game__layout { display: none; }

.game__hud { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 3; display: flex; justify-content: space-between; gap: 8px; pointer-events: none; }
.hud-chip { min-width: 78px; padding: .3rem .75rem; border-radius: 14px; text-align: center; color: #fff; background: rgba(6, 16, 40, .74); border: 1px solid rgba(255, 230, 160, .35); }
.hud-lab { display: block; font: 600 .68rem var(--font-ui); letter-spacing: .1em; text-transform: uppercase; color: #BCCBE6; }
.hud-num { display: block; font: 700 1.5rem/1.1 var(--font-ui); font-variant-numeric: tabular-nums; color: var(--glow); text-shadow: 0 0 10px rgba(255, 209, 102, .5); }
.hud-time.is-low .hud-num { color: #ff9a9a; animation: lowPulse 1s ease-in-out infinite; }
.hud-combo.is-hot { border-color: #7fe3ff; box-shadow: 0 0 16px rgba(127, 227, 255, .5); }
.hud-combo.is-hot .hud-num { color: #7fe3ff; }
@keyframes lowPulse { 50% { transform: scale(1.14); } }
.game__pause { position: absolute; right: 10px; bottom: 10px; z-index: 4; min-width: 44px; min-height: 44px; border-radius: 50%; border: 1px solid rgba(255, 230, 160, .45); background: rgba(6, 16, 40, .74); color: #fff; font-size: 1.1rem; cursor: pointer; }
.game__pause:hover { background: rgba(255, 209, 102, .25); }

.game__overlay {
    position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column; align-items: center; gap: .6rem;
    padding: 1rem; text-align: center; color: #FFF9EF; overflow: auto; overscroll-behavior: contain;
    background: radial-gradient(ellipse 75% 85% at 50% 40%, rgba(11, 42, 92, .82), rgba(4, 10, 31, .94));
}
.game__title { margin: 0; font: 700 clamp(1.7rem, 4.4vw, 2.4rem)/1.1 var(--font-display); text-shadow: 0 0 18px rgba(255, 209, 102, .4); }
.game__rules { list-style: none; margin: 0 0 .3rem; padding: 0; display: grid; gap: .35rem; max-width: 34em; text-align: left; font-size: .98rem; }
.game__rules b { color: var(--glow); }
.over__score { margin: 0; font: 700 clamp(2.1rem, 6vw, 3rem)/1 var(--font-ui); color: var(--glow); text-shadow: 0 0 16px rgba(255, 209, 102, .55); }
.over__score small { font-size: .4em; color: #BCCBE6; letter-spacing: .06em; }
.over__stats { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; justify-content: center; color: #BCCBE6; }
.over__stats b { color: #fff; }
.over__msg { min-height: 1.4em; margin: 0; max-width: 28em; color: #FFF9EF; font-weight: 600; }
.over__buttons { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }

.game__overlay form { display: grid; gap: .4rem; justify-items: center; }
.game__overlay--end { gap: .45rem; }
.name__row { display: flex; gap: .7rem; justify-content: center; }
.game__overlay form label { display: grid; gap: .2rem; font: 600 .85rem var(--font-ui); text-align: left; color: #FFF9EF; }
.game__overlay form input {
    min-height: 46px; width: 11rem; padding: .4rem .75rem; border-radius: 12px; border: 2px solid rgba(255, 230, 160, .55);
    background: #fff; color: #14263F; font: 600 1.1rem var(--font-ui);
}
.game__overlay form input.nm-initial { width: 4.4rem; text-transform: uppercase; text-align: center; }
.game__overlay form input:focus-visible { outline: 3px solid #FFD166; outline-offset: 2px; }
.name__hint { margin: 0; max-width: 30em; font-size: .8rem; line-height: 1.35; color: #BCCBE6; }
.name__error { min-height: 0; margin: 0; color: #ffb3b3; font-weight: 700; font-size: .92rem; }

.game__board { padding: 1.1rem 1.1rem 1.2rem; border-radius: 22px; background: var(--card); border: 1px solid var(--card-edge); box-shadow: var(--shadow); }
.game__board h3 { margin: 0 0 .7rem; font: 700 1.25rem var(--font-ui); }
.board { list-style: none; margin: 0 0 .7rem; padding: 0; display: grid; gap: .3rem; }
.board__row { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; align-items: center; gap: .5rem; padding: .35rem .6rem; border-radius: 12px; background: rgba(255, 255, 255, .06); }
:root[data-theme="light"] .board__row { background: #f4efe3; }
.board__row.is-mine { background: rgba(255, 209, 102, .26); box-shadow: 0 0 0 2px var(--accent); }
.board__row.is-empty { opacity: .55; }
.board__rank { text-align: center; font-weight: 700; }
.board__name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board__score { font: 700 1rem var(--font-ui); font-variant-numeric: tabular-nums; color: var(--accent); }
.board__status { min-height: 1.3em; margin: .2rem 0 .4rem; color: var(--muted); font-size: .92rem; }
.board__best, .board__note { margin: .6rem 0 0; font-size: .9rem; color: var(--muted); }

@media (max-width: 960px) {
    .game__layout { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .hud-chip { min-width: 62px; padding: .25rem .5rem; } .hud-num { font-size: 1.2rem; }
    .game__rules { font-size: .86rem; } .game__overlay { gap: .5rem; padding: .7rem; }
    .game__title { font-size: 1.7rem; }
    .game__overlay form input { width: 9rem; }
}

/* ---------------------------------------------------------------------------
   Light Chase (the memory game) — see xmas-chase.js.  Reuses the game stage, HUD, overlay and board styles above.
   --------------------------------------------------------------------------- */
.chase__stage { container-type: inline-size; background: #07173a; }
.chase__scene .scene__moon { top: 7%; right: 6%; width: clamp(36px, 7cqw, 86px); }
.chase__string { position: absolute; left: 0; right: 0; top: 17%; z-index: 2; display: flex; justify-content: center; align-items: flex-start; gap: 4cqw; }
.chase__wire { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 0; }
.bulb {
    --c: #f2383a; --cd: #8f1b1c;
    position: relative; z-index: 1; width: clamp(54px, 15cqw, 140px); aspect-ratio: 80 / 150; padding: 0; border: 0; background: none; cursor: pointer;
    transform-origin: 50% 0; transition: transform .12s; -webkit-tap-highlight-color: transparent; touch-action: manipulation; user-select: none;
}
.bulb svg { display: block; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.bulb .lit, .bulb .halo { opacity: 0; transition: opacity .09s; }
.bulb.on .lit { opacity: 1; } .bulb.on .halo { opacity: .95; }
.bulb.on { transform: scale(1.07); filter: drop-shadow(0 0 1.8cqw var(--c)); }
.bulb:focus-visible { outline: 4px solid #FFD166; outline-offset: 6px; border-radius: 18px; }
.chase__string.is-watching .bulb { cursor: default; }
.chase__msg { position: absolute; left: 0; right: 0; bottom: 15%; z-index: 2; margin: 0; padding: 0 1rem; text-align: center; pointer-events: none;
    font: 700 clamp(1.3rem, 4.4cqw, 2.3rem)/1.1 var(--font-display); color: #fff; text-shadow: 0 0 14px rgba(255, 209, 102, .5), 0 2px 0 rgba(0, 0, 0, .4); }
.chase__stage.is-wrong { animation: chaseShake .4s ease-in-out; }
@keyframes chaseShake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@media (max-width: 580px) {
    .chase__string { top: 23%; gap: 1.6cqw; }
    .bulb { width: clamp(56px, 21.5cqw, 120px); }
    .chase__msg { bottom: 19%; }
    .chase__scene .scene__moon { top: 15%; right: 5%; }          /* keep the moon clear of the HUD chips */
}

/* ---------------------------------------------------------------------------
   The games menu — three cards; the one you pick opens in place (see initGame in xmas-ui.js)
   --------------------------------------------------------------------------- */
.container.games { max-width: 1200px; scroll-margin-top: 84px; }
html:not(.js) .game-cards, html:not(.js) .games__panels { display: none; }
.game-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.3rem; margin: 1rem 0 0; }
.game-card {
    position: relative; display: flex; flex-direction: column; padding: 0; overflow: hidden; text-align: left; cursor: pointer;
    font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--card-edge); border-radius: 22px; box-shadow: var(--shadow);
    transition: transform .18s, box-shadow .18s, border-color .18s, background .18s; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.game-card:hover, .game-card:focus-visible { transform: translateY(-4px); border-color: rgba(255, 209, 102, .65); box-shadow: 0 18px 38px -14px rgba(0, 0, 0, .65), 0 0 28px rgba(255, 209, 102, .25); }
.game-card:focus-visible { outline: 3px solid #FFD166; outline-offset: 3px; }
.game-card__art { display: block; aspect-ratio: 2 / 1; background: #0b2a5c; overflow: hidden; }
.game-card__art svg { display: block; width: 100%; height: 100%; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.game-card:hover .game-card__art svg, .game-card:focus-visible .game-card__art svg { transform: scale(1.06); }
.game-card__text { display: grid; gap: .35rem; align-content: start; padding: .95rem 1.15rem .3rem; flex: 1; }
.game-card__name { font: 700 1.4rem/1.15 var(--font-display); }
.game-card__desc { color: var(--muted); font-size: .97rem; line-height: 1.4; }
.game-card__tag { font: 600 .84rem var(--font-ui); letter-spacing: .02em; color: var(--accent); }
.game-card__go { align-self: flex-start; margin: .5rem 1.15rem 1.1rem; padding: .42rem 1.1rem; border-radius: 999px; background: #b81e1e; color: #fff; font: 700 .95rem var(--font-ui); box-shadow: inset 0 0 0 1px rgba(255, 230, 160, .35); }
.game-card__badge { position: absolute; top: 10px; right: 10px; z-index: 1; padding: .15rem .65rem; border-radius: 999px; background: #FFD166; color: #4a2a00; font: 800 .72rem var(--font-ui); letter-spacing: .08em; box-shadow: 0 0 14px rgba(255, 209, 102, .6); }
/* once a game is open the cards shrink to a row of tabs, so the game stays in view */
.games.is-open .game-cards { gap: .6rem; margin-top: .4rem; }
.games.is-open .game-card { flex-direction: row; align-items: center; border-radius: 16px; }
.games.is-open .game-card:hover, .games.is-open .game-card:focus-visible { transform: none; }
.games.is-open .game-card__art, .games.is-open .game-card__desc, .games.is-open .game-card__tag, .games.is-open .game-card__go, .games.is-open .game-card__badge { display: none; }
.games.is-open .game-card__text { padding: .7rem 1rem; }
.games.is-open .game-card__name { font-size: 1.1rem; }
.games.is-open .game-card[aria-expanded="true"] { border-color: #FFD166; background: rgba(255, 209, 102, .16); box-shadow: 0 0 0 2px #FFD166, var(--shadow); }
.games.is-open #games-sub { display: none; }
.games__panels { margin-top: 1.1rem; }
.game-panel[hidden] { display: none; }
.game-panel { animation: panelIn .35s ease-out; }
@keyframes panelIn { from { opacity: 0; transform: translateY(10px); } }
html[data-motion="off"] .game-panel { animation: none; }
.game-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 0 .3rem; }
.game-panel__title { display: flex; align-items: center; gap: .7rem; margin: 0; font: 700 clamp(1.5rem, 3.6vw, 2.1rem)/1.15 var(--font-display); color: var(--text); text-shadow: 0 0 20px rgba(255, 209, 102, .22); }
.game-panel__title:focus { outline: none; }
:root[data-theme="light"] .game-panel__title { text-shadow: none; }
@media (max-width: 720px) {
    .game-cards { grid-template-columns: 1fr; gap: .8rem; }
    .game-card { flex-direction: row; align-items: stretch; }
    .game-card__art { width: 34%; flex: none; aspect-ratio: auto; }
    .game-card__text { padding: .75rem .9rem; gap: .25rem; }
    .game-card__name { font-size: 1.2rem; }
    .game-card__desc { font-size: .88rem; }
    .game-card__tag { font-size: .78rem; }
    .game-card__go { display: none; }
    .game-card__badge { top: 8px; left: 8px; right: auto; }
    .games.is-open .game-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }
    .games.is-open .game-card { justify-content: center; text-align: center; }
    .games.is-open .game-card__text { padding: .55rem .35rem; }
    .games.is-open .game-card__name { font-size: .92rem; }
}

/* ---------------------------------------------------------------------------
   Workshop Defense (the tower-defense game) — see xmas-td.js.  Reuses the game stage, HUD, overlay and board styles.
   --------------------------------------------------------------------------- */
.td__stage canvas { touch-action: manipulation; }
.td__pads { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.td__pads[hidden] { display: none; }
.td__pad { position: absolute; transform: translate(-50%, -50%); aspect-ratio: 1 / 1; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; pointer-events: auto; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.td__pad[hidden] { display: none; }
.td__pad:hover { background: rgba(255, 255, 255, .16); }
.td__pad:focus-visible { outline: 3px solid #FFD166; outline-offset: 2px; }
.td__pad[aria-pressed="true"] { background: rgba(255, 255, 255, .2); }
.td__paused { position: absolute; top: 76px; left: 50%; z-index: 4; transform: translateX(-50%); margin: 0; padding: .3rem .95rem; border-radius: 999px; background: rgba(6, 16, 40, .84); border: 1px solid rgba(255, 230, 160, .45); color: #fff; font: 700 .95rem var(--font-ui); white-space: nowrap; pointer-events: none; }
.td__paused[hidden] { display: none; }
.hud-chip.is-boss .hud-num { color: #ff9a9a; }
.td__bar { display: grid; gap: .6rem; margin-top: .75rem; }
.td__panel { min-height: 6.2rem; padding: .65rem .8rem; border-radius: 16px; background: var(--card); border: 1px solid var(--card-edge); }
.td__hint { margin: 0; padding: .55rem .25rem; }
.td__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .8rem; margin: 0 0 .25rem; font: 700 1.1rem var(--font-ui); }
.td__lv { font-weight: 600; font-size: .85rem; color: var(--accent); }
.td__stats { margin: 0 0 .5rem; font-size: .88rem; color: var(--muted); }
.td__acts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .5rem; }
.td__act { display: grid; gap: .1rem; align-content: center; justify-items: start; min-height: 52px; padding: .45rem .8rem; border-radius: 14px; border: 1px solid rgba(255, 230, 160, .3); background: #0d2c52; color: #fff; font: inherit; text-align: left; cursor: pointer; touch-action: manipulation; transition: transform .12s, box-shadow .12s, opacity .12s; }
.td__act:hover { transform: translateY(-2px); box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 209, 102, .5); }
.td__act:focus-visible { outline: 3px solid #FFD166; outline-offset: 2px; }
.td__act-main { font: 700 1rem/1.2 var(--font-ui); }
.td__act-sub { font-size: .8rem; line-height: 1.25; color: #BCCBE6; }
.td__act.is-poor { opacity: .5; }
.td__act.is-max { opacity: .8; cursor: default; }
.td__act.is-max:hover { transform: none; box-shadow: none; }
.td__act[data-act="close"] { justify-items: center; background: transparent; }
.td__act--x { display: inline-flex; min-height: 34px; margin-left: auto; padding: .2rem .8rem; border-radius: 10px; font: 700 .95rem var(--font-ui); }
.td__ctl { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .6rem; }
.td__next { margin-right: auto; font: 700 .95rem var(--font-ui); color: var(--accent); }
.td__ctl .btn[disabled] { opacity: .55; cursor: default; }
@media (max-width: 560px) {
    .td__acts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }
    .td__act { padding: .4rem .45rem; min-height: 56px; }
    .td__act-main { font-size: .86rem; }
    .td__blurb { display: none; }
    .td__act.td__act--x { min-height: 36px; padding: .15rem .7rem; }
    .td__head { margin-bottom: .35rem; }
    .td__panel { min-height: 5.6rem; padding: .55rem .6rem; }
    .td__paused { top: 64px; font-size: .85rem; }
    .td__ctl { flex-wrap: nowrap; gap: .4rem; }
    .td__ctl .btn { min-height: 44px; padding: .4rem .7rem; font-size: .85rem; white-space: nowrap; }
    .td__next { font-size: .8rem; }
}

/* ================================================================ NOW PLAYING (the show feed) */
/* Hidden until the feed says a show is on (or starts later today). Nothing here is ever faked:
   xmas-now.js only shows the card while the feed is fresh. */
.now { margin: 1.4rem 0 0; }
.now__inner { position: relative; display: grid; grid-template-columns: auto 1fr; gap: .9rem 1.1rem; align-items: start; padding: 1.1rem 1.25rem 1.15rem; cursor: default; }
.now__inner:hover { transform: none; }
.now.is-live .now__inner { border-color: rgba(255, 209, 102, .55); box-shadow: 0 0 0 1px rgba(255, 209, 102, .15), 0 18px 40px -22px rgba(255, 209, 102, .55); }
.now__badge { display: inline-flex; align-items: center; gap: .5rem; font: 700 .82rem var(--font-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); white-space: nowrap; padding-top: .2rem; }
.now__dot { width: .62rem; height: .62rem; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red); flex: none; }
.now.is-live .now__dot { animation: nowpulse 1.6s ease-in-out infinite; }
.now.is-paused .now__dot { background: var(--gold); box-shadow: 0 0 10px var(--gold); animation: none; }
.now.is-idle .now__dot { background: var(--muted); box-shadow: none; animation: none; }
.now__body { min-width: 0; }
.now__song { margin: 0; line-height: 1.25; overflow-wrap: anywhere; }
.now__title { font: 700 1.3rem var(--font-ui); color: var(--text); }
.now__artist { display: block; color: var(--muted); font-size: .95rem; margin-top: .15rem; }
.now__bar { position: relative; height: .55rem; margin: .7rem 0 .35rem; border-radius: 999px; background: rgba(255, 255, 255, .12); overflow: hidden; }
:root[data-theme="light"] .now__bar { background: rgba(20, 38, 63, .12); }
.now__fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--red), var(--gold)); transition: width .9s linear; }
.now__meta { display: flex; flex-wrap: wrap; gap: .25rem 1.2rem; margin: 0; color: var(--muted); font-size: .92rem; font-variant-numeric: tabular-nums; }
.now__next { overflow-wrap: anywhere; }
.now__show { margin: .45rem 0 0; color: var(--muted); font-size: .92rem; }
.now.is-idle .now__show { color: var(--text); }
@keyframes nowpulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.35); opacity: .55; } }
@media (max-width: 560px) {
    .now__inner { grid-template-columns: 1fr; gap: .5rem; }
}
@media (prefers-reduced-motion: reduce) {
    .now.is-live .now__dot { animation: none; }
    .now__fill { transition: none; }
}
:root[data-motion="off"] .now.is-live .now__dot { animation: none; }
:root[data-motion="off"] .now__fill { transition: none; }

/* ================================================================ PLAYLIST FOLLOWS THE FEED */
/* xmas-now.js marks the song on now (.is-playing + aria-current) and the one after it (.is-next);
   each gets a small tag as a third row, so the track number spans all three. */
.playlist li.is-playing::before, .playlist li.is-next::before { grid-row: 1 / span 3; }
.playlist li.is-playing { --c: var(--gold); border-color: var(--c); background: rgba(255, 209, 102, .12); box-shadow: inset 4px 0 0 var(--c), 0 0 28px rgba(255, 209, 102, .4); }
:root[data-theme="light"] .playlist li.is-playing { background: #fff6dc; }
.playlist li.is-playing::before { animation: trackpulse 1.6s ease-in-out infinite; }
.playlist li.is-next { border-color: rgba(255, 209, 102, .5); }
.playlist__tag { grid-column: 2; justify-self: start; display: inline-flex; align-items: center; gap: .45rem; margin-top: .3rem; padding: .18rem .6rem; border-radius: 999px; font: 700 .68rem var(--font-ui); letter-spacing: .12em; text-transform: uppercase; line-height: 1.2; }
.playlist__tag--now { color: #1a1200; background: var(--gold); box-shadow: 0 0 12px rgba(255, 209, 102, .5); }
.playlist__tag--next { color: var(--accent); border: 1px solid rgba(255, 209, 102, .5); }
.playlist__tag .eq { display: inline-flex; align-items: flex-end; gap: 2px; height: .7rem; }
.playlist__tag .eq i { display: block; width: 3px; height: 100%; background: currentColor; border-radius: 1px; transform-origin: bottom; animation: eq 1s ease-in-out infinite; }
.playlist__tag .eq i:nth-child(2) { animation-delay: .2s; } .playlist__tag .eq i:nth-child(3) { animation-delay: .4s; }
@keyframes trackpulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@keyframes eq { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .playlist li.is-playing::before, .playlist__tag .eq i { animation: none; } }
:root[data-motion="off"] .playlist li.is-playing::before, :root[data-motion="off"] .playlist__tag .eq i { animation: none; }
