/* Christmas event 2026 (xmas.py). Loaded only on Christmas pages and on the home page during the season. */
:root { --x-red: #c8102e; --x-red-d: #8e0b20; --x-green: #1f7a4a; --x-green-d: #0f4d2e; --x-gold: #e7b94a;
  --x-cream: #fff8ec; --x-snow: #ffffff; }
body.xmas { background: linear-gradient(180deg, #fdf1e7 0, #fff8ec 320px); }
body.xmas .btn.primary, .xh .btn.primary { background: var(--x-red); border-color: var(--x-red); }
body.xmas .top .brand { color: var(--x-red-d); }
.ok { color: #145c36; background: #e5f6ec; border-radius: 10px; padding: 10px 12px; }
.small-text { font-size: 13px; }

/* falling snow */
.x-snowfall { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.x-snowfall i { position: absolute; top: -20px; color: #c9d8e8; font-style: normal; animation: x-fall linear infinite; }
body.xmas .x-snowfall i { color: #d6e2ee; }
@keyframes x-fall { to { transform: translate3d(30px, 105vh, 0) rotate(200deg); } }
main, .foot, .top { position: relative; z-index: 1; }

/* ------------------------------------------------------------ hub */
.xh { margin: 0 0 28px; }
.xh-hero { position: relative; overflow: hidden; text-align: center; color: #fff; border-radius: 24px; padding: 30px 18px 24px;
  background: radial-gradient(circle at 20% 15%, rgba(255,255,255,.18) 0 2px, transparent 3px) 0 0 / 34px 34px,
    radial-gradient(circle at 70% 60%, rgba(255,255,255,.14) 0 1.5px, transparent 2.5px) 0 0 / 26px 26px,
    linear-gradient(160deg, var(--x-red) 0%, var(--x-red-d) 70%); box-shadow: 0 14px 30px rgba(142,11,32,.25); }
.xh-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 26px;
  background: radial-gradient(circle at 15px 0, transparent 14px, #fff8ec 15px) 0 0 / 30px 26px; opacity: .9; }
.xh-hero h1 { color: #fff; margin: .2em 0 .3em; font-family: var(--font-head); font-size: clamp(26px, 7vw, 40px); }
.xh-kicker { display: inline-block; margin: 0; padding: 4px 12px; border-radius: 999px; background: rgba(255,255,255,.18);
  font-size: 13px; font-weight: 600; letter-spacing: .02em; }
.xh-lead { margin: 0 auto 10px; max-width: 30em; opacity: .95; }
.xh-count { margin: 6px 0 14px; font-size: 15px; }
.xh-count b { font-size: 30px; font-family: var(--font-head); color: var(--x-gold); margin: 0 4px; }
.xh-group { margin: 22px 4px 8px; font-size: 19px; }
.xh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 10px; }
@media (max-width: 420px) { .xh-card { padding: 12px 11px 10px; } .xh-blurb { font-size: 12.5px; } .xh-emoji { font-size: 30px; } }
.xh-card { position: relative; display: grid; gap: 4px; align-content: start; padding: 14px 14px 12px; border-radius: 18px;
  text-decoration: none; color: var(--ink); background: #fff; border: 1px solid #f1dcc8;
  box-shadow: 0 3px 0 #f1dcc8; transition: transform .15s ease, box-shadow .15s ease; }
.xh-card:hover, .xh-card:focus-visible { transform: translateY(-2px); box-shadow: 0 6px 0 #ead0b8; }
.xh-card b { font-size: 16px; }
.xh-emoji { font-size: 34px; line-height: 1.1; }
.xh-blurb { color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.xh-stat { margin-top: 4px; font-size: 12px; color: var(--x-green); font-weight: 600; }
.xh-tree, .xh-gingerbread { background: linear-gradient(160deg, #fff, #eaf7ef); }
.xh-mistletoe, .xh-advent { background: linear-gradient(160deg, #fff, #fdeaf0); }
.xh-santa, .xh-stocking { background: linear-gradient(160deg, #fff, #fdecec); }
.yr-title { margin: 30px 4px 0; font-size: 19px; text-align: center; color: var(--muted); }

/* ------------------------------------------------------------ forms and cards */
.xc { position: relative; }
.xc h1 { font-family: var(--font-head); }
.xc-back { margin: 0 0 4px; font-size: 14px; }
.xc-culture { background: #fff6e2; border-left: 4px solid var(--x-gold); border-radius: 8px; padding: 8px 12px; font-size: 14px; color: #6b5427; }
.xc-by { color: var(--muted); margin-top: 0; }
.xc-picks { display: flex !important; flex-wrap: wrap; gap: 6px; }
.xc-pick { position: relative; }
.xc-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.xc-pick span, .xc-pick-btn { display: grid; place-items: center; width: 46px; height: 46px; font-size: 24px; border-radius: 12px;
  border: 2px solid var(--line); background: #fff; cursor: pointer; }
.xc-pick input:checked + span, .xc-pick-btn.on { border-color: var(--x-red); background: #fff0f0; transform: scale(1.06); }
.xc-pick input:focus-visible + span { outline: 3px solid var(--x-gold); }
.xc-doors { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.xc-door { grid-template-columns: auto 1fr; align-items: center; padding: 6px 8px 8px; }
.xc-door legend { font-size: 13px; }
.xc-door select { font-size: 20px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 4px; }
select { font: inherit; }
.xb-add { margin-top: 18px; padding-top: 14px; border-top: 2px dashed #f1dcc8; }
.xb-add h2 { margin: 0; font-size: 19px; }
.xb-more { text-align: center; margin: 18px 0; display: grid; gap: 8px; justify-items: center; }
.xb-more p { margin: 0; }
.xm-keep { background: #fff6e2; border-radius: 12px; padding: 10px 12px; font-size: 14px; display: grid; gap: 8px; }
.xm-posts { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.xm-posts li { display: flex; justify-content: space-between; gap: 10px; align-items: center; border-bottom: 1px solid var(--line); padding: 6px 0; }
.xm-posts form { margin: 0; }
.xm-giftee { font-size: 20px; text-align: center; }
.xm-giftee b { font-size: 28px; color: var(--x-red); font-family: var(--font-head); }
.xm-reveal { text-align: center; padding: 16px 0; }
.share-buttons { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 12px 0; }

/* ------------------------------------------------------------ scenes */
.xs-lock { background: #eef3fb; border-radius: 12px; padding: 10px 12px; text-align: center; }
.xs-notes { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 8px; }
.xs-notes li { display: flex; gap: 10px; align-items: flex-start; background: #fffdf8; border: 1px solid #f1dcc8; border-radius: 12px; padding: 8px 10px; }
.xs-ic { font-size: 24px; line-height: 1.2; }
.xs-text { display: block; white-space: pre-wrap; font-family: var(--font-letter); font-size: 17px; }
.xs-sign { text-align: right; font-family: var(--font-letter); font-size: 18px; }

/* tree */
.xs-tree { position: relative; width: min(100%, 420px); aspect-ratio: 4 / 5; margin: 14px auto 6px;
  background: radial-gradient(ellipse at 50% 100%, #fff 0 30%, transparent 31%); }
.xs-tree svg { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 6px 8px rgba(15,77,46,.25)); }
.xs-star { position: absolute; left: 50%; top: 1%; transform: translate(-50%, -30%); font-size: 40px; filter: grayscale(.6) brightness(.9); }
.xs-star.lit { filter: drop-shadow(0 0 12px #ffd166); animation: x-twinkle 1.6s ease-in-out infinite; }
@keyframes x-twinkle { 50% { transform: translate(-50%, -30%) scale(1.15); } }
.xs-orn { position: absolute; transform: translate(-50%, -50%); font-size: clamp(20px, 6vw, 28px); line-height: 1; padding: 2px;
  border: 0; background: none; cursor: pointer; filter: drop-shadow(0 2px 2px rgba(0,0,0,.25)); animation: x-sway 3s ease-in-out infinite; }
.xs-orn:nth-child(odd) { animation-delay: -1.5s; }
.xs-orn:hover, .xs-orn:focus-visible { transform: translate(-50%, -50%) scale(1.3); outline: none; }
@keyframes x-sway { 50% { rotate: 8deg; } }

/* stocking */
.xs-fire { position: relative; height: 270px; margin: 14px auto; width: min(100%, 360px); border-radius: 14px;
  background: linear-gradient(#7a3f2a, #5b2c1c); box-shadow: inset 0 -40px 0 #3b1d12; display: grid; place-items: center; }
.xs-sock { position: relative; width: 120px; height: 170px; margin-top: 30px; background: var(--x-red);
  border-radius: 10px 10px 60px 14px; box-shadow: inset -10px 0 0 rgba(0,0,0,.12); }
.xs-sock::after { content: ""; position: absolute; right: -52px; bottom: 0; width: 90px; height: 62px; background: var(--x-red); border-radius: 0 40px 40px 0; }
.xs-cuff { position: absolute; left: -8px; right: -8px; top: -14px; height: 44px; border-radius: 12px; background: #fff;
  display: grid; place-items: center; font-family: var(--font-letter); font-size: 18px; color: var(--x-red-d); overflow: hidden; z-index: 1; }
.xs-peek { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); width: 150px; display: flex; flex-wrap: wrap;
  justify-content: center; gap: 0 2px; font-size: 26px; z-index: 2; }

/* card */
.xs-card { margin: 14px 0; border-radius: 16px; padding: 18px; background: #fff; border: 8px solid var(--x-green);
  outline: 3px dashed var(--x-red); outline-offset: -16px; }
.xs-card-head { text-align: center; font-family: var(--font-head); color: var(--x-red); font-size: 30px; line-height: 1.2; margin: 6px 0 14px; }
.xs-card-head small { font-family: var(--font-letter); color: var(--ink); font-size: 18px; }
.xs-sigs { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.xs-sig { background: #fffaf0; border-radius: 12px; padding: 8px 10px; rotate: -1deg; }
.xs-sig:nth-child(even) { rotate: 1.2deg; background: #f3fbf6; }
.xs-sig p { margin: 2px 0; font-family: var(--font-letter); font-size: 17px; white-space: pre-wrap; }
.xs-sig b { font-size: 13px; color: var(--muted); }

/* gingerbread */
.xs-house { position: relative; width: min(100%, 460px); aspect-ratio: 1; margin: 14px auto; border-radius: 16px; overflow: hidden;
  touch-action: manipulation; user-select: none; }
.xs-house svg { width: 100%; height: 100%; display: block; }
.xs-candies { position: absolute; inset: 0; pointer-events: none; }
.xs-candy { position: absolute; transform: translate(-50%, -50%); font-size: clamp(18px, 5vw, 26px); line-height: 1; }
.xs-candy.pop { animation: x-pop .35s ease-out; }
@keyframes x-pop { from { transform: translate(-50%, -50%) scale(2); opacity: .2; } }
.xb-candy-bar .xc-picks { margin: 8px 0; }
.xb-name { display: grid; gap: 4px; font-weight: 600; max-width: 260px; }

/* letter */
.xs-letter { margin: 14px 0; padding: 20px 22px; border-radius: 6px; font-family: var(--font-letter); font-size: 18px;
  background: repeating-linear-gradient(#fffdf5 0 31px, #e8dcc2 31px 32px); box-shadow: 0 6px 16px rgba(80,50,20,.12); }
.xs-letter-head { font-size: 20px; color: var(--x-red-d); margin-top: 0; }
.xs-elf { display: inline-block; font-family: "Bai Jamjuree", sans-serif; font-size: 12px; background: #e5f6ec; color: #145c36;
  border-radius: 999px; padding: 1px 8px; }
.xb-wishes label { font-weight: 400 !important; }

/* advent */
.xs-advent { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 14px 0; padding: 10px; border-radius: 16px;
  background: var(--x-green); }
.xs-door { aspect-ratio: 1; border: 0; border-radius: 10px; font: 700 18px var(--font-head); color: #fff; cursor: pointer;
  background: var(--x-green-d); opacity: .7; }
.xs-door.can { background: var(--x-red); opacity: 1; box-shadow: inset 0 0 0 2px var(--x-gold); }
.xs-door.can:nth-child(3n) { background: #b8860b; }
.xs-door.opened { background: #fff; color: var(--x-red); }
.xs-door.nope { animation: x-shake .4s; }
@keyframes x-shake { 25% { translate: -4px 0; } 75% { translate: 4px 0; } }
.xs-door-open { text-align: center; background: #fffaf0; border: 2px solid var(--x-gold); border-radius: 16px; padding: 14px; }
.xs-door-open p { font-family: var(--font-letter); font-size: 20px; margin: 4px 0 0; white-space: pre-wrap; }
.xs-big { font-size: 46px; }
@media (max-width: 420px) { .xs-advent { grid-template-columns: repeat(4, 1fr); } }

/* snow globe */
.xs-globe-wrap { text-align: center; margin: 14px 0; }
.xs-globe { position: relative; width: min(78vw, 300px); aspect-ratio: 1; margin: 0 auto; border-radius: 50%; overflow: hidden; cursor: pointer;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.75) 0 6%, transparent 7%), linear-gradient(180deg, #9bd0ff, #dff1ff 70%, #fff 71%);
  box-shadow: inset 0 0 0 6px rgba(255,255,255,.6), inset -20px -20px 40px rgba(30,80,140,.25), 0 10px 20px rgba(0,0,0,.15); }
.xs-globe canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; }
.xs-scene { position: absolute; left: 50%; bottom: 14%; transform: translateX(-50%); font-size: min(26vw, 110px); line-height: 1; }
.xs-globe.shook { animation: x-shake .45s; }
.xs-base { width: min(60vw, 230px); margin: -10px auto 0; height: 46px; border-radius: 0 0 20px 20px; background: linear-gradient(#a0522d, #6b3018);
  color: #ffe9c7; display: grid; place-items: center; font-family: var(--font-letter); position: relative; z-index: 3; }
.xs-globe-msg { font-family: var(--font-letter); font-size: 22px; margin: 14px 0 0; white-space: pre-wrap; }

/* mistletoe */
.xb-mist { text-align: center; padding: 10px 0; }
.xb-mist-sprig { font-size: 60px; animation: x-sway 3s ease-in-out infinite; }
.xb-hold { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: none; min-width: 240px; }
.xb-hold.holding { transform: scale(.96); box-shadow: 0 0 0 8px rgba(200,16,46,.2); }
.xb-mist-msg { font-family: var(--font-letter); font-size: 24px; color: var(--x-red-d); white-space: pre-wrap; }
.x-heart { position: fixed; bottom: -40px; font-size: 32px; font-style: normal; z-index: 50; pointer-events: none; animation: x-rise 3s ease-out forwards; }
@keyframes x-rise { to { transform: translateY(-110vh) rotate(20deg); opacity: 0; } }

/* pop-up and live notice */
.xs-pop { position: fixed; inset: 0; z-index: 60; background: rgba(20,10,20,.45); display: grid; place-items: center; padding: 16px; }
.xs-pop[hidden] { display: none; }
.xs-pop > div { background: #fff; border-radius: 18px; padding: 20px; max-width: 380px; width: 100%; text-align: center; display: grid; gap: 8px; }
.xs-pop p { font-family: var(--font-letter); font-size: 20px; margin: 0; white-space: pre-wrap; }
.x-fresh { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 40; box-shadow: 0 6px 16px rgba(0,0,0,.2); }
@media (prefers-reduced-motion: reduce) { .xs-orn, .xb-mist-sprig, .xs-star.lit { animation: none; } }

/* language switch in Christmas colours (home page during the season and every Christmas page) */
body.xmas .lang-switch, body.xmas-home .lang-switch { border-color: #f1dcc8; box-shadow: 0 2px 0 #f1dcc8; }
body.xmas .lang-switch::before, body.xmas-home .lang-switch::before { content: "🎄"; }
body.xmas .lang-switch a.on, body.xmas-home .lang-switch a.on { background: var(--x-red); }
body.xmas .lang-switch a:not(.on):hover, body.xmas-home .lang-switch a:not(.on):hover { background: #fdecec; color: var(--x-red-d); }
