/* The Martini — Christmas holiday theme decoration (branch holidays-tg-xmas). Applies only while html[data-holiday="christmas"]
   is set (the person said "Turn it on" in the two weeks before the holiday), plus the pop-up and its Settings row. Lightweight
   SVG (data URIs, made by scripts/make-holiday-art.py christmas) + CSS. Every decoration is a background or a pointer-events:none
   layer behind the controls, so nothing covers a button or shrinks a tap target. prefers-reduced-motion = all still. */
:root {
  --xm-snow-a: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 260 260'%3E%3Ccircle cx='231' cy='238' r='1.8' fill='%23fff' opacity='0.85'/%3E%3Ccircle cx='97' cy='94' r='2.3' fill='%23fff' opacity='0.71'/%3E%3Ccircle cx='95' cy='48' r='1.8' fill='%23fff' opacity='0.59'/%3E%3Ccircle cx='21' cy='202' r='2.6' fill='%23fff' opacity='0.78'/%3E%3Ccircle cx='80' cy='7' r='2.4' fill='%23fff' opacity='0.56'/%3E%3Ccircle cx='18' cy='97' r='2.4' fill='%23fff' opacity='0.76'/%3E%3Ccircle cx='237' cy='167' r='1.8' fill='%23fff' opacity='0.84'/%3E%3Ccircle cx='119' cy='150' r='1.9' fill='%23fff' opacity='0.78'/%3E%3Ccircle cx='234' cy='142' r='1.8' fill='%23fff' opacity='0.74'/%3E%3Ccircle cx='42' cy='130' r='1.6' fill='%23fff' opacity='0.62'/%3E%3Ccircle cx='147' cy='15' r='1.3' fill='%23fff' opacity='0.82'/%3E%3Ccircle cx='205' cy='55' r='2.4' fill='%23fff' opacity='0.68'/%3E%3Ccircle cx='8' cy='0' r='1.5' fill='%23fff' opacity='0.87'/%3E%3Ccircle cx='26' cy='240' r='1.7' fill='%23fff' opacity='0.80'/%3E%3Ccircle cx='214' cy='37' r='2.0' fill='%23fff' opacity='0.61'/%3E%3Ccircle cx='138' cy='172' r='1.3' fill='%23fff' opacity='0.66'/%3E%3Ccircle cx='209' cy='60' r='1.4' fill='%23fff' opacity='0.79'/%3E%3Ccircle cx='5' cy='30' r='1.9' fill='%23fff' opacity='0.72'/%3E%3Ccircle cx='96' cy='229' r='1.9' fill='%23fff' opacity='0.89'/%3E%3Ccircle cx='67' cy='214' r='2.1' fill='%23fff' opacity='0.58'/%3E%3Ccircle cx='215' cy='108' r='1.2' fill='%23fff' opacity='0.85'/%3E%3Ccircle cx='155' cy='10' r='1.5' fill='%23fff' opacity='0.68'/%3E%3Ccircle cx='51' cy='21' r='2.6' fill='%23fff' opacity='0.62'/%3E%3Ccircle cx='132' cy='4' r='2.3' fill='%23fff' opacity='0.66'/%3E%3Ccircle cx='151' cy='197' r='1.3' fill='%23fff' opacity='0.57'/%3E%3Ccircle cx='124' cy='7' r='2.0' fill='%23fff' opacity='0.67'/%3E%3C/svg%3E");
  --xm-snow-b: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 340 340'%3E%3Ccircle cx='232' cy='65' r='3.3' fill='%23fff' opacity='0.36'/%3E%3Ccircle cx='294' cy='69' r='3.2' fill='%23fff' opacity='0.30'/%3E%3Ccircle cx='78' cy='159' r='3.3' fill='%23fff' opacity='0.42'/%3E%3Ccircle cx='127' cy='97' r='2.2' fill='%23fff' opacity='0.38'/%3E%3Ccircle cx='283' cy='100' r='3.0' fill='%23fff' opacity='0.34'/%3E%3Ccircle cx='247' cy='309' r='2.1' fill='%23fff' opacity='0.28'/%3E%3Ccircle cx='55' cy='19' r='2.7' fill='%23fff' opacity='0.32'/%3E%3Ccircle cx='200' cy='131' r='2.6' fill='%23fff' opacity='0.43'/%3E%3Ccircle cx='251' cy='150' r='2.7' fill='%23fff' opacity='0.44'/%3E%3Ccircle cx='35' cy='64' r='2.3' fill='%23fff' opacity='0.37'/%3E%3Ccircle cx='315' cy='314' r='2.1' fill='%23fff' opacity='0.31'/%3E%3Ccircle cx='104' cy='8' r='2.1' fill='%23fff' opacity='0.34'/%3E%3Ccircle cx='127' cy='30' r='2.1' fill='%23fff' opacity='0.32'/%3E%3Ccircle cx='271' cy='292' r='3.4' fill='%23fff' opacity='0.29'/%3E%3C/svg%3E");
  --xm-lights: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 26'%3E%3Cpath d='M0 4Q30 16 60 6T120 4' stroke='%231B3A28' stroke-width='2' fill='none'/%3E%3Crect x='9.5' y='8.290067270632258' width='5' height='4' rx='1' fill='%232A2A2A'/%3E%3Cellipse cx='12' cy='17.290067270632257' rx='4.2' ry='6.4' fill='%23FF4D5E'/%3E%3Cellipse cx='10.8' cy='15.290067270632258' rx='1.2' ry='2.2' fill='%23fff' opacity='.55'/%3E%3Crect x='33.5' y='11.559508646656383' width='5' height='4' rx='1' fill='%232A2A2A'/%3E%3Cellipse cx='36' cy='20.559508646656383' rx='4.2' ry='6.4' fill='%23FFC94A'/%3E%3Cellipse cx='34.8' cy='18.559508646656383' rx='1.2' ry='2.2' fill='%23fff' opacity='.55'/%3E%3Crect x='57.5' y='3.0' width='5' height='4' rx='1' fill='%232A2A2A'/%3E%3Cellipse cx='60' cy='12.0' rx='4.2' ry='6.4' fill='%234FD37A'/%3E%3Cellipse cx='58.8' cy='10.0' rx='1.2' ry='2.2' fill='%23fff' opacity='.55'/%3E%3Crect x='81.5' y='13.559508646656381' width='5' height='4' rx='1' fill='%232A2A2A'/%3E%3Cellipse cx='84' cy='22.559508646656383' rx='4.2' ry='6.4' fill='%235AA9FF'/%3E%3Cellipse cx='82.8' cy='20.559508646656383' rx='1.2' ry='2.2' fill='%23fff' opacity='.55'/%3E%3Crect x='105.5' y='10.29006727063226' width='5' height='4' rx='1' fill='%232A2A2A'/%3E%3Cellipse cx='108' cy='19.29006727063226' rx='4.2' ry='6.4' fill='%23FF7BD0'/%3E%3Cellipse cx='106.8' cy='17.29006727063226' rx='1.2' ry='2.2' fill='%23fff' opacity='.55'/%3E%3C/svg%3E");
  --xm-glow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 26'%3E%3Ccircle cx='12' cy='17.290067270632257' r='10' fill='%23FF4D5E' opacity='.35'/%3E%3Ccircle cx='36' cy='20.559508646656383' r='10' fill='%23FFC94A' opacity='.35'/%3E%3Ccircle cx='60' cy='12.0' r='10' fill='%234FD37A' opacity='.35'/%3E%3Ccircle cx='84' cy='22.559508646656383' r='10' fill='%235AA9FF' opacity='.35'/%3E%3Ccircle cx='108' cy='19.29006727063226' r='10' fill='%23FF7BD0' opacity='.35'/%3E%3C/svg%3E");
  --xm-cap: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 14'%3E%3Cpath d='M0 0H80V5C74 5 72 9 66 8C60 7 58 12 52 11C48 10.5 47 6 42 7C36 8 34 13 27 12C21 11 20 6 14 7C9 7.6 6 10 0 8Z' fill='%23FFFDF7'/%3E%3Cpath d='M0 0H80V2H0Z' fill='%23EAF2F8'/%3E%3C/svg%3E");
  --xm-holly: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-20 -50 90 90'%3E%3Cg transform='translate(10 0) rotate(0) scale(1)'%3E%3Cpath d='M0 0C8 -6 14 -2 18 -10C20 -2 28 -2 30 -8C32 0 40 2 44 -2C40 6 46 12 52 12C44 16 44 22 48 28C40 24 34 28 30 34C28 26 20 24 14 28C14 20 6 16 0 18C4 12 2 6 0 0Z' fill='%232E7D46'/%3E%3Cpath d='M0 0C8 -6 14 -2 18 -10C20 -2 28 -2 30 -8C32 0 40 2 44 -2C40 6 46 12 52 12C44 16 44 22 48 28C40 24 34 28 30 34C28 26 20 24 14 28C14 20 6 16 0 18C4 12 2 6 0 0Z' fill='%233E9A57' transform='rotate(-62) scale(.92)'/%3E%3Cpath d='M4 4L40 8M4 4L26 -34' stroke='%231E5A30' stroke-width='1.4' fill='none' opacity='.6'/%3E%3Ccircle cx='2' cy='-2' r='6.5' fill='%23D7263D'/%3E%3Ccircle cx='11' cy='3' r='6' fill='%23E63946'/%3E%3Ccircle cx='-2' cy='8' r='5.6' fill='%23C1121F'/%3E%3Ccircle cx='0' cy='-4' r='1.8' fill='%23fff' opacity='.7'/%3E%3C/g%3E%3C/svg%3E");
  --xm-holly-r: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-70 -50 90 90'%3E%3Cg transform='translate(-10 0) rotate(0) scale(-1 1) scale(1)'%3E%3Cpath d='M0 0C8 -6 14 -2 18 -10C20 -2 28 -2 30 -8C32 0 40 2 44 -2C40 6 46 12 52 12C44 16 44 22 48 28C40 24 34 28 30 34C28 26 20 24 14 28C14 20 6 16 0 18C4 12 2 6 0 0Z' fill='%232E7D46'/%3E%3Cpath d='M0 0C8 -6 14 -2 18 -10C20 -2 28 -2 30 -8C32 0 40 2 44 -2C40 6 46 12 52 12C44 16 44 22 48 28C40 24 34 28 30 34C28 26 20 24 14 28C14 20 6 16 0 18C4 12 2 6 0 0Z' fill='%233E9A57' transform='rotate(-62) scale(.92)'/%3E%3Cpath d='M4 4L40 8M4 4L26 -34' stroke='%231E5A30' stroke-width='1.4' fill='none' opacity='.6'/%3E%3Ccircle cx='2' cy='-2' r='6.5' fill='%23D7263D'/%3E%3Ccircle cx='11' cy='3' r='6' fill='%23E63946'/%3E%3Ccircle cx='-2' cy='8' r='5.6' fill='%23C1121F'/%3E%3Ccircle cx='0' cy='-4' r='1.8' fill='%23fff' opacity='.7'/%3E%3C/g%3E%3C/svg%3E");
  --xm-star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-10 -10 20 20'%3E%3Cpath d='M0 -9L2.6 -2.8L9 -2.8L3.8 1.2L5.8 8L0 4L-5.8 8L-3.8 1.2L-9 -2.8L-2.6 -2.8Z' fill='%23F2C14E'/%3E%3C/svg%3E");
  --xm-flake: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-12 -12 24 24'%3E%3Cg stroke='%23FFF8EC' stroke-width='1.7' stroke-linecap='round' opacity='1'%3E%3Cpath d='M0 0L10.0 0.0' /%3E%3Cpath d='M5.5 0.0L7.8 -1.9' /%3E%3Cpath d='M5.5 0.0L7.8 1.9' /%3E%3Cpath d='M0 0L5.0 8.7' /%3E%3Cpath d='M2.8 4.8L5.6 5.8' /%3E%3Cpath d='M2.8 4.8L2.2 7.7' /%3E%3Cpath d='M0 0L-5.0 8.7' /%3E%3Cpath d='M-2.7 4.8L-2.2 7.7' /%3E%3Cpath d='M-2.7 4.8L-5.6 5.8' /%3E%3Cpath d='M0 0L-10.0 0.0' /%3E%3Cpath d='M-5.5 0.0L-7.8 1.9' /%3E%3Cpath d='M-5.5 0.0L-7.8 -1.9' /%3E%3Cpath d='M0 0L-5.0 -8.7' /%3E%3Cpath d='M-2.8 -4.8L-5.6 -5.8' /%3E%3Cpath d='M-2.8 -4.8L-2.2 -7.7' /%3E%3Cpath d='M0 0L5.0 -8.7' /%3E%3Cpath d='M2.8 -4.8L2.2 -7.7' /%3E%3Cpath d='M2.8 -4.8L5.6 -5.8' /%3E%3C/g%3E%3C/svg%3E");
  --xm-empty: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-30 -34 60 70'%3E%3Ccircle cx='0' cy='16' r='16' fill='%23FFF8EC'/%3E%3Ccircle cx='0' cy='-10' r='11' fill='%23FFF8EC'/%3E%3Crect x='-10' y='-28' width='20' height='10' rx='2' fill='%231A1A1A'/%3E%3Crect x='-14' y='-20' width='28' height='4' rx='2' fill='%231A1A1A'/%3E%3Ccircle cx='-4' cy='-12' r='1.6' fill='%231A1A1A'/%3E%3Ccircle cx='4' cy='-12' r='1.6' fill='%231A1A1A'/%3E%3Cpath d='M0 -9l8 2l-8 1z' fill='%23FF8A3D'/%3E%3Cpath d='M-11 0q11 6 22 0l2 5q-13 6 -26 0z' fill='%23FF6B72'/%3E%3Ccircle cx='0' cy='10' r='1.8' fill='%231A1A1A'/%3E%3Ccircle cx='0' cy='18' r='1.8' fill='%231A1A1A'/%3E%3C/svg%3E");
}

/* —— Berkshire Swash: headers only (body text stays the palette's UI font). Self-hosted, SIL OFL 1.1 (fonts/OFL.txt) —— */
@font-face { font-family: "Berkshire Swash"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/BerkshireSwash.woff2") format("woff2"); }
html[data-holiday="christmas"] { --xm-display: "Berkshire Swash", var(--font-display); }
html[data-holiday="christmas"] .scn-head h2,
html[data-holiday="christmas"] .sheet-head h2,
html[data-holiday="christmas"] .empty h2,
html[data-holiday="christmas"] .hol-ask-t { font-family: var(--xm-display); font-weight: 400; letter-spacing: 0.01em; color: var(--accent); }
html[data-holiday="christmas"] .scn-head h2 { font-size: 1.4rem; line-height: 1.1; }
html[data-holiday="christmas"] .sheet-head h2 { font-size: 1.35rem; }
/* a little snowflake after each section title */
html[data-holiday="christmas"] .scn-head h2::after { content: ""; display: inline-block; width: 14px; height: 14px; margin-left: 6px; vertical-align: 0.05em; background: var(--xm-flake) center / contain no-repeat; }

/* —— the page: an evergreen night, snow falling behind everything (never over a control, never takes a tap) —— */
html[data-holiday="christmas"] { background: radial-gradient(110% 55% at 100% -8%, rgba(242, 193, 78, .12), transparent 55%), radial-gradient(90% 50% at 0% 0%, rgba(255, 107, 114, .08), transparent 60%), var(--bg); background-attachment: fixed; }
html[data-holiday="christmas"] body { background: transparent; }
html[data-holiday="christmas"] body::before,
html[data-holiday="christmas"] body::after { content: ""; position: fixed; left: 0; right: 0; top: -340px; height: calc(100vh + 680px); z-index: -1; pointer-events: none; background: var(--xm-snow-a) 0 0 / 260px 260px repeat; animation: xm-snow 18s linear infinite; }
html[data-holiday="christmas"] body::after { background-image: var(--xm-snow-b); background-size: 340px 340px; background-position: 90px 40px; animation: xm-snow-b 30s linear infinite; }
@keyframes xm-snow { 0% { transform: translate(0, 0); } 50% { transform: translate(8px, 130px); } 100% { transform: translate(0, 260px); } }
@keyframes xm-snow-b { 0% { transform: translate(0, 0); } 50% { transform: translate(-10px, 170px); } 100% { transform: translate(0, 340px); } }

/* —— header: a string of colored lights across the top and a snow cap along its foot. The header grows a little so
      the lights and the cap sit above / below the buttons, never on them —— */
html[data-holiday="christmas"] .top { padding-top: calc(24px + env(safe-area-inset-top)); padding-bottom: 14px; background-image: var(--xm-cap); background-size: 80px 14px; background-position: left bottom; background-repeat: repeat-x; }
html[data-holiday="christmas"] .top::before,
html[data-holiday="christmas"] .top::after { content: ""; position: absolute; left: 0; right: 0; top: calc(-2px + env(safe-area-inset-top)); height: 26px; z-index: -1; pointer-events: none; background: var(--xm-lights) left top / 120px 26px repeat-x; }
html[data-holiday="christmas"] .top::after { background-image: var(--xm-glow); animation: xm-twinkle 2.4s ease-in-out infinite alternate; }
@keyframes xm-twinkle { from { opacity: .25; } to { opacity: 1; } }

/* —— holly sprigs in the day card's lower corners (backgrounds; nothing moves inside) —— */
html[data-holiday="christmas"] .day-card { padding-bottom: 22px; background-image: var(--holiday-stripe), var(--xm-holly), var(--xm-holly-r); background-size: 100% 4px, 54px 54px, 54px 54px; background-position: top, left -6px bottom -12px, right -6px bottom -12px; background-repeat: no-repeat; }

/* —— today's dot is a gold star; the Working card glows like a lantern —— */
html[data-holiday="christmas"] .day-dots i.is-today { width: 11px; height: 11px; border-radius: 0; box-shadow: none; background: var(--xm-star) center / contain no-repeat; }
html[data-holiday="christmas"] .scn-row.st-being .scn-card { box-shadow: inset 0 0 22px rgba(255, 107, 114, .22); } /* inset: the row clips outer shadows */

/* —— the User tab's avatar: a red-and-green festive ring (a ring only: same size, same tap) —— */
html[data-holiday="christmas"] .tab-user .tab-av { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--secondary) 45%, transparent); }

/* —— empty states: a snowman —— */
html[data-holiday="christmas"] .empty::before { content: ""; display: block; width: 46px; height: 56px; margin: 6px auto 8px; background: var(--xm-empty) center / contain no-repeat; }
html[data-holiday="christmas"] .empty { text-align: center; }

/* —— loading / sign-in glass: bigger, a gentle sway, snowflakes around it (static with reduced motion) —— */
html[data-holiday="christmas"] .login-card { position: relative; }
html[data-holiday="christmas"] .login-ic { width: 132px; height: 132px; border-radius: 30px; box-shadow: 0 0 0 1px var(--border), 0 0 34px rgba(242, 193, 78, .25); animation: xm-sway 4s ease-in-out infinite; transform-origin: 50% 80%; }
html[data-holiday="christmas"] .login-card::before { content: ""; position: absolute; left: 50%; top: -62px; width: 240px; height: 50px; margin-left: -120px; pointer-events: none; background: var(--xm-lights) left top / 120px 26px repeat-x; }
html[data-holiday="christmas"] .login-card::after { content: ""; position: absolute; left: 50%; top: -62px; width: 240px; height: 26px; margin-left: -120px; pointer-events: none; background: var(--xm-glow) left top / 120px 26px repeat-x; animation: xm-twinkle 2.4s ease-in-out infinite alternate; }
@keyframes xm-sway { 0%, 100% { transform: rotate(-2.5deg); } 50% { transform: rotate(2.5deg); } }

/* —— Settings: the Christmas row in Palette —— */
.hol-pal [data-hol-pal="christmas"] .swatch { background: var(--xm-holly) right -4px bottom -6px / 26px 26px no-repeat, var(--sw-bg); }

/* —— the pop-up: lights across the top, a holly sprig in the corner below the buttons, a festive title —— */
.hol-ask[data-hol="christmas"] .hol-ask-card { position: relative; overflow: hidden; padding-top: 30px; padding-bottom: 14px; background: radial-gradient(120% 80% at 100% 0%, rgba(242, 193, 78, .14), transparent 60%), #163624; color: #FFF8EC; border-color: #2C5A40; }
.hol-ask[data-hol="christmas"] .hol-ask-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 26px; pointer-events: none; background: var(--xm-glow) left top / 120px 26px repeat-x, var(--xm-lights) left top / 120px 26px repeat-x; }
.hol-ask[data-hol="christmas"] .hol-ask-card::after { content: ""; position: absolute; right: 4px; bottom: 2px; width: 36px; height: 36px; pointer-events: none; background: var(--xm-holly-r) center / contain no-repeat; }
.hol-ask[data-hol="christmas"] .hol-ask-t { font-family: "Berkshire Swash", var(--font-display); font-weight: 400; font-size: 1.55rem; color: #FF6B72; }
.hol-ask[data-hol="christmas"] .hol-ask-p, .hol-ask[data-hol="christmas"] .hol-ask-f { color: #C8D8C6; }
.hol-ask[data-hol="christmas"] .btn:not(.btn-primary) { background: #1E452F; color: #FFF8EC; border-color: #2C5A40; }
.hol-ask[data-hol="christmas"] .btn-primary { background: #FF6B72; color: #1A0508; border-color: #FF6B72; }

/* —— reduced motion: every Christmas decoration holds still —— */
@media (prefers-reduced-motion: reduce) {
  html[data-holiday="christmas"] *, html[data-holiday="christmas"] *::before, html[data-holiday="christmas"] *::after,
  html[data-holiday="christmas"] body::before, html[data-holiday="christmas"] body::after, .hol-ask[data-hol="christmas"] *, .hol-ask[data-hol="christmas"] *::before, .hol-ask[data-hol="christmas"] *::after { animation: none !important; }
}
