/* seasonal layer for every board page. season.js sets data-season="holiday" on <html> (Dec 1 - Jan 2, or ?season=holiday to preview).
   Nothing here touches layout: colours, a light string along the top edge, and a snow canvas that ignores the pointer. */
html[data-season="holiday"] {
  --xm-red: #b3202f; --xm-red-d: #8c1823; --xm-pine: #1f6b45; --xm-gold: #f2c94c; --xm-snow: #ffffff;
}

/* masthead: cranberry with a candy-cane edge */
html[data-season="holiday"] .masthead {
  background: var(--xm-red); color: #fff; position: relative;
  padding-bottom: calc(.5rem + 6px);
}
html[data-season="holiday"] header.masthead { padding-bottom: 20px; }
html[data-season="holiday"] .masthead a,
html[data-season="holiday"] .masthead button,
html[data-season="holiday"] .masthead .place { color: #fff; }
html[data-season="holiday"] .masthead::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px;
  background: repeating-linear-gradient(-45deg, #fff 0 6px, var(--xm-red-d) 6px 12px);
}
html[data-season="holiday"] .masthead .brand { display: inline-flex; align-items: center; }
html[data-season="holiday"] .masthead .xm-tree { width: 1.05em; height: 1.2em; margin-right: .5em; flex: none; }
html[data-season="holiday"] .masthead .xm-count { margin-left: 1.1em; padding-left: 1.1em; border-left: 1px solid rgba(255,255,255,.4); opacity: .95; letter-spacing: .04em; }
html[data-season="holiday"] .masthead .xm-count b { color: var(--xm-gold); font-weight: 700; }

/* full screen: masthead is hidden, so a candy-cane stripe tops the title row instead */
html[data-season="holiday"] body.kiosk .top { padding-top: calc(.45rem + 12px); background: repeating-linear-gradient(-45deg, #fff 0 6px, var(--xm-red-d) 6px 12px) top left / 100% 6px no-repeat, linear-gradient(90deg, var(--xm-red-t), transparent 42%, transparent 58%, var(--xm-pine-t)); }
html[data-season="holiday"][data-theme="dark"] body.kiosk .top { background: repeating-linear-gradient(-45deg, #f4f4f4 0 6px, var(--xm-red) 6px 12px) top left / 100% 6px no-repeat, linear-gradient(90deg, var(--xm-red-t), transparent 42%, transparent 58%, var(--xm-pine-t)); }
html[data-season="holiday"] body.kiosk #xm-lights { top: 6px; }

/* red and green through the rest of the page */
html[data-season="holiday"] { --xm-red-t: rgba(179,32,47,.17); --xm-pine-t: rgba(31,107,69,.18); }
html[data-season="holiday"][data-theme="dark"] { --xm-red-t: rgba(224,69,58,.30); --xm-pine-t: rgba(63,191,127,.28); }
/* title row: red-to-green rule underneath, soft wash behind */
html[data-season="holiday"] .top { border-bottom: 2px solid transparent; border-image: linear-gradient(90deg, var(--xm-red), var(--xm-pine) 50%, var(--xm-red)) 1; }
html[data-season="holiday"] body:not(.kiosk) .top { background: linear-gradient(90deg, var(--xm-red-t), transparent 42%, transparent 58%, var(--xm-pine-t)); }
html[data-season="holiday"] .allfree { border-color: var(--xm-pine); background: var(--xm-pine-t); }
html[data-season="holiday"] .allfree.none, html[data-season="holiday"] .allfree.quiet { border-color: var(--xm-red); background: var(--xm-red-t); }
/* side column: cards alternate green and red down the left edge, headings follow */
html[data-season="holiday"] aside .card { border-bottom: 1px solid var(--border); }
html[data-season="holiday"] aside .card:nth-child(odd) { box-shadow: inset 4px 0 0 var(--xm-pine); background: linear-gradient(90deg, var(--xm-pine-t), transparent 75%); }
html[data-season="holiday"] aside .card:nth-child(even) { box-shadow: inset 4px 0 0 var(--xm-red); background: linear-gradient(90deg, var(--xm-red-t), transparent 75%); }
html[data-season="holiday"] aside .card:nth-child(odd) .lab { color: var(--xm-pine); }
html[data-season="holiday"] aside .card:nth-child(even) .lab { color: var(--xm-red); }
html[data-season="holiday"][data-theme="dark"] aside .card:nth-child(odd) .lab { color: #4fc88a; }
html[data-season="holiday"][data-theme="dark"] aside .card:nth-child(even) .lab { color: #ff6b78; }
html[data-season="holiday"] #tl { border-right: 3px solid var(--xm-pine); }
/* timeline: hour labels and the everyone-free column */
html[data-season="holiday"] .colh.all { color: var(--xm-pine); }
html[data-season="holiday"][data-theme="dark"] .colh.all { color: #4fc88a; }
html[data-season="holiday"] .col.all::before { background: var(--xm-pine-t); border-left-color: var(--xm-pine); border-right-color: var(--xm-pine); }
html[data-season="holiday"] .hl:nth-child(4n+1) { border-top-color: var(--xm-red-t); }
html[data-season="holiday"] .hl:nth-child(4n+3) { border-top-color: var(--xm-pine-t); }
html[data-season="holiday"] .nowline { border-top-color: var(--xm-red); }
/* ticker: a pine band with white text, like a ribbon */
html[data-season="holiday"] footer { background: var(--xm-pine); border-top: 2px solid var(--xm-red); color: #fff; }
html[data-season="holiday"][data-theme="dark"] footer { background: #123d29; }
html[data-season="holiday"] footer .tk { color: #fff; }
html[data-season="holiday"] footer .tk em { color: rgba(255,255,255,.75); }
html[data-season="holiday"] footer .tk::after { color: rgba(255,255,255,.5); }
html[data-season="holiday"] .tk .g { box-shadow: 0 0 0 1px rgba(255,255,255,.35); }
html[data-season="holiday"] .tk .g.hol { background: var(--xm-red); color: #fff; }
html[data-season="holiday"] .panel { border-top-color: var(--xm-red); }
html[data-season="holiday"] .lab { color: var(--xm-pine); }
html[data-season="holiday"][data-theme="dark"] .lab { color: #4fc88a; }
html[data-season="holiday"] .date .dd { color: var(--xm-red); }
html[data-season="holiday"][data-theme="dark"] .date .dd { color: #ff6b78; }

/* string of lights along the very top, above everything, never intercepts a tap */
#xm-lights { position: fixed; top: 0; left: 0; right: 0; height: 26px; z-index: 40; pointer-events: none; overflow: hidden; display: none; }
html[data-season="holiday"] #xm-lights { display: block; }
#xm-lights svg { position: absolute; top: 0; left: 0; width: 100%; height: 26px; }
#xm-lights .bulb { animation: xm-twinkle 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 0; }
#xm-lights .bulb:nth-child(4n+1) { animation-delay: -.3s; }
#xm-lights .bulb:nth-child(4n+2) { animation-delay: -1.1s; }
#xm-lights .bulb:nth-child(4n+3) { animation-delay: -1.8s; }
@keyframes xm-twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

#xm-snow { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 14; pointer-events: none; display: none; }
html[data-season="holiday"] #xm-snow { display: block; }

@media (prefers-reduced-motion: reduce) {
  #xm-lights .bulb { animation: none; }
  #xm-snow { display: none !important; }
}
