/* ════════════════════════════════════════════════════════════
   NICO’S DOMAIN — CHRISTMAS AREA (/christmas/)
   Night sky → string lights → village → calendar board → gift card
   ════════════════════════════════════════════════════════════ */

@font-face { font-family: "Great Vibes"; src: url("/assets/fonts/great-vibes.woff2") format("woff2"); font-display: swap; }

.theme-xmas {
  --x-night: #0a0b1f;
  --x-night-2: #140f2e;
  --x-wine: #3a0a22;
  --x-red: #c8102e;
  --x-red-hi: #ff3b5c;
  --x-green: #1b6b45;
  --x-gold: #ffd23f;
  --x-gold-2: #f2b33d;
  --x-cream: #fff8ee;
  --x-snow: #f4f7ff;
  --f-script: "Great Vibes", "Brush Script MT", cursive;
}
.theme-xmas main { background: var(--x-night); }

/* ── shared buttons ───────────────────────────────────────── */
.xbtn { display: inline-flex; align-items: center; justify-content: center; gap: .6em; min-height: 52px; padding: 0 1.5em; border-radius: 999px; border: 0; cursor: pointer; text-decoration: none;
  font: 800 1rem/1 var(--f-display); font-stretch: 92%; letter-spacing: .02em; transition: transform .15s, box-shadow .2s, background .2s; }
.xbtn:active { transform: translateY(1px) scale(.99); }
.xbtn:focus-visible { outline: 3px solid var(--x-gold); outline-offset: 3px; }
.xbtn--gold { color: #3a1606; background: linear-gradient(180deg, #ffe58a, #ffc93a 45%, #e79a1c); box-shadow: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 -2px 0 rgba(0, 0, 0, .15) inset, 0 12px 30px -10px rgba(255, 190, 60, .8); }
.xbtn--gold:hover { color: #3a1606; transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 16px 40px -10px rgba(255, 190, 60, .95); }
.xbtn--glass { color: #fff; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .28); backdrop-filter: blur(6px); }
.xbtn--glass:hover { color: #fff; background: rgba(255, 255, 255, .14); }
.xbtn--ghost { color: var(--x-red); background: transparent; box-shadow: inset 0 0 0 1.5px rgba(200, 16, 46, .4); }
.xbtn--ghost:hover { color: var(--x-red); background: rgba(200, 16, 46, .06); }
.xbtn--red { color: #fff; background: linear-gradient(180deg, #ff4a68, #c8102e); box-shadow: 0 10px 24px -10px rgba(200, 16, 46, .8); }
.xbtn--red:hover { color: #fff; transform: translateY(-2px); }

/* ════════ NIGHT SKY HERO ════════ */
.xsky { position: relative; overflow: hidden; isolation: isolate; min-height: min(920px, 100vh); padding: 92px 0 230px;
  background:
    radial-gradient(60% 50% at 75% 20%, rgba(88, 60, 180, .35), transparent 70%),
    radial-gradient(50% 40% at 15% 30%, rgba(200, 16, 46, .22), transparent 70%),
    linear-gradient(180deg, #060716 0%, var(--x-night) 35%, var(--x-night-2) 70%, #2a1240 100%); }
.xsky__aurora { position: absolute; inset: -10% -20% 40% -20%; z-index: -1; filter: blur(40px); opacity: .55;
  background: conic-gradient(from 200deg at 50% 60%, transparent 0 20%, rgba(61, 220, 151, .45) 28%, rgba(88, 180, 255, .35) 36%, transparent 46%, rgba(255, 111, 163, .3) 60%, transparent 70%); }
html.fx .xsky__aurora { animation: aurora 18s ease-in-out infinite alternate; }
@keyframes aurora { to { transform: translateX(8%) skewX(-8deg); opacity: .75; } }
.xsky__stars { position: absolute; inset: 0; z-index: -1; opacity: .9;
  background-image: radial-gradient(1px 1px at 10% 20%, #fff, transparent), radial-gradient(1.5px 1.5px at 30% 8%, #fff, transparent), radial-gradient(1px 1px at 52% 30%, #fff, transparent), radial-gradient(1.5px 1.5px at 70% 12%, #fff, transparent), radial-gradient(1px 1px at 88% 26%, #fff, transparent), radial-gradient(1px 1px at 40% 44%, #fff, transparent), radial-gradient(1.5px 1.5px at 18% 50%, #fff, transparent), radial-gradient(1px 1px at 94% 48%, #fff, transparent);
  background-size: 520px 420px; }
html.fx .xsky__stars { animation: twinkle-stars 4s ease-in-out infinite alternate; }
@keyframes twinkle-stars { to { opacity: .5; } }
.xsky__snow { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; }

/* string lights */
.xlights { position: absolute; top: 0; left: 0; width: 100%; height: 90px; z-index: 4; pointer-events: none; }
.xlights svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.bulb { position: absolute; width: 12px; height: 18px; margin-left: -6px; border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%; background: radial-gradient(circle at 40% 35%, #fff 0 12%, var(--c) 45%); box-shadow: 0 0 8px var(--c), 0 0 18px var(--c); }
.bulb::before { content: ""; position: absolute; left: 3px; top: -5px; width: 6px; height: 6px; border-radius: 1px; background: #2b2b2b; }
@media (max-width: 640px) { .bulb:nth-child(odd) { display: none; } }
html.fx .bulb { animation: bulb 2s ease-in-out infinite; animation-delay: var(--t); }
@keyframes bulb { 0%, 100% { opacity: 1; } 50% { opacity: .4; box-shadow: none; } }

.xsky__grid { position: relative; z-index: 5; display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.xsky .crumbs ol { margin-bottom: var(--s4); }
.xsky .crumbs a, .xsky .crumbs ol { color: rgba(255, 255, 255, .6); }
.xsky .crumbs [aria-current] { color: #fff; }
.xsky__kick { margin: 0 0 var(--s3); font: 400 1.15rem/1 var(--f-term); color: var(--x-gold); letter-spacing: .04em; }

.xtitle { display: flex; flex-direction: column; margin: 0 0 var(--s4); line-height: .9; }
.xtitle__script { font: 400 clamp(3rem, 2rem + 4.5vw, 6rem)/1 var(--f-script); color: #ffe9a3; margin-bottom: -.12em; margin-left: .05em; text-shadow: 0 0 30px rgba(255, 210, 63, .45); transform: rotate(-4deg); transform-origin: left bottom; }
.xtitle__main { font: 900 clamp(2.8rem, 1.6rem + 5.4vw, 6.6rem)/.92 var(--f-display); font-stretch: 72%; text-transform: uppercase; letter-spacing: -.01em;
  background: linear-gradient(180deg, #fff 0%, #fff4d6 40%, #ffd76a 62%, #e39a20 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 0 #7a1020) drop-shadow(0 10px 30px rgba(255, 190, 60, .35)); }
.xsky__lede { font-size: var(--t-lg); color: rgba(255, 255, 255, .86); max-width: 46ch; margin-bottom: var(--s5); }

/* countdown clock */
.xclock { margin-bottom: var(--s4); }
.xclock__label { margin: 0 0 var(--s3); font: 400 1.4rem/1.2 var(--f-term); color: var(--x-gold); letter-spacing: .03em; }
.xclock__cells { display: flex; gap: 10px; }
.xclock__cell { min-width: 74px; padding: 10px 10px 8px; border-radius: 12px; text-align: center; position: relative; overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .04)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18), 0 10px 24px -14px #000; backdrop-filter: blur(6px); }
.xclock__cell::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0, 0, 0, .35); }
.xclock__cell b { display: block; font: 800 2.2rem/1 var(--f-display); font-stretch: 80%; color: #fff; font-variant-numeric: tabular-nums; }
.xclock__cell span { display: block; margin-top: 4px; font: 400 .95rem/1 var(--f-term); color: rgba(255, 255, 255, .65); letter-spacing: .06em; text-transform: uppercase; }
.xclock__cell b.is-tick { animation: tick .35s ease-out; }
@keyframes tick { 0% { transform: translateY(-30%); opacity: .2; } 100% { transform: none; opacity: 1; } }

/* candy-cane progress */
.xprog { margin-bottom: var(--s5); max-width: 420px; }
.xprog__bar { height: 16px; border-radius: 999px; background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); overflow: hidden; }
.xprog__bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: repeating-linear-gradient(-45deg, #fff 0 10px, var(--x-red) 10px 20px); box-shadow: 0 0 14px rgba(255, 59, 92, .6); transition: width 1.2s cubic-bezier(.2, .8, .2, 1); }
html.fx .xprog__bar span { animation: cane 1.2s linear infinite; background-size: 28.28px 28.28px; }
@keyframes cane { to { background-position: 28.28px 0; } }
.xprog__txt { margin: 8px 0 0; font: 400 1.1rem/1.2 var(--f-term); color: rgba(255, 255, 255, .78); }

.xsky__cta { display: flex; flex-wrap: wrap; gap: var(--s3); }
.xmusic__disc { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: repeating-radial-gradient(circle, #111 0 2px, #2a2a2a 2px 3px); box-shadow: 0 0 0 2px rgba(255, 255, 255, .3); }
.xmusic__disc i { width: 7px; height: 7px; border-radius: 50%; background: var(--x-red); }
.xmusic.is-on { box-shadow: inset 0 0 0 1.5px var(--x-gold), 0 0 24px -4px rgba(255, 210, 63, .6); }
html.fx .xmusic.is-on .xmusic__disc { animation: spin 2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ornament with Nico */
.xsky__art { position: relative; display: grid; justify-items: center; }
.xorn { position: relative; width: min(360px, 74vw); aspect-ratio: 1; }
html.fx .xorn { animation: swing 6s ease-in-out infinite; transform-origin: 50% -40px; }
@keyframes swing { 0%, 100% { transform: rotate(-2.5deg); } 50% { transform: rotate(2.5deg); } }
.xorn::before { content: ""; position: absolute; left: 50%; top: -160px; width: 2px; height: 150px; background: linear-gradient(transparent, #d9b25a); transform: translateX(-50%); }
.xorn__cap { position: absolute; left: 50%; top: -14px; width: 54px; height: 30px; transform: translateX(-50%); border-radius: 6px 6px 3px 3px; z-index: 2;
  background: linear-gradient(90deg, #8a6418, #ffe08a 40%, #c48a1a 70%, #7a560f); box-shadow: 0 2px 0 rgba(0, 0, 0, .3); }
.xorn__cap::after { content: ""; position: absolute; left: 50%; top: -14px; width: 18px; height: 18px; border: 3px solid #e2b54e; border-radius: 50%; transform: translateX(-50%); }
.xorn__ball { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 35% 30%, #ff6b85, var(--x-red) 45%, #5a0716);
  box-shadow: inset -20px -30px 60px rgba(0, 0, 0, .45), inset 18px 18px 40px rgba(255, 255, 255, .18), 0 30px 80px -20px rgba(200, 16, 46, .8), 0 0 0 6px rgba(255, 210, 63, .85), 0 0 0 10px rgba(122, 16, 32, .9); }
.xorn__ball img { width: 100%; height: 100%; object-fit: cover; }
.xorn__ball::after { content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 30% 24%, rgba(255, 255, 255, .55) 0 6%, rgba(255, 255, 255, .12) 14%, transparent 30%), radial-gradient(circle at 70% 80%, transparent 50%, rgba(0, 0, 0, .35)); }
.xorn__tree { width: 60%; margin: 20% auto; display: block; }
.xorn__wreath { position: absolute; inset: -30px; border-radius: 50%; pointer-events: none;
  background:
    radial-gradient(circle at 50% 0, #ff3b5c 0 7px, transparent 8px), radial-gradient(circle at 93% 30%, #ff3b5c 0 6px, transparent 7px), radial-gradient(circle at 7% 30%, #ffd23f 0 6px, transparent 7px), radial-gradient(circle at 85% 85%, #ffd23f 0 6px, transparent 7px), radial-gradient(circle at 15% 85%, #ff3b5c 0 6px, transparent 7px), radial-gradient(circle at 50% 100%, #ffd23f 0 7px, transparent 8px),
    repeating-conic-gradient(from 0deg, #1b6b45 0 4deg, #0f4a2e 4deg 9deg, #2a8a5a 9deg 13deg);
  -webkit-mask: radial-gradient(circle closest-side, transparent calc(100% - 20px), #000 calc(100% - 19px) calc(100% - 1px), transparent 100%);
  mask: radial-gradient(circle closest-side, transparent calc(100% - 20px), #000 calc(100% - 19px) calc(100% - 1px), transparent 100%);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .5)); }
.xsky__gifts { position: relative; z-index: 2; display: flex; align-items: flex-end; gap: 4px; margin-top: 18px; }
.xgift { width: 62px; } .xgift--b { width: 46px; } .xbyte { width: 52px; } .xtree { width: 90px; }

/* village */
.xvillage { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 260px; z-index: 2; }
.win-lit { fill: #ffcf6b; filter: drop-shadow(0 0 6px rgba(255, 190, 80, .9)); }
.win-dark { fill: #2a1f3a; }
html.fx .win-lit { animation: windows 7s steps(1) infinite; animation-delay: var(--t); }
@keyframes windows { 0%, 88%, 100% { fill: #ffcf6b; } 90% { fill: #2a1f3a; } 94% { fill: #ffe39c; } }

@media (max-width: 900px) {
  .xsky { padding: 80px 0 200px; min-height: 0; }
  .xsky__grid { grid-template-columns: 1fr; }
  .xsky__art { order: -1; }
  .xorn { width: min(200px, 54vw); }
  .xgift { width: 44px; } .xgift--b { width: 34px; } .xbyte { width: 38px; } .xtree { width: 64px; }
  .xorn::before { top: -90px; height: 80px; }
  .xvillage { height: 180px; }
  .xclock__cell { min-width: 0; flex: 1; }
  .xclock__cell b { font-size: 1.7rem; }
}

/* ════════ CALENDAR BOARD ════════ */
.xcal { position: relative; padding: 0 0 clamp(56px, 8vw, 104px); background: linear-gradient(180deg, #dfe7f7 0, #c9d4ea 60px, #1a1030 61px, #0e0a1c 100%); }
.xcal::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 60px; background: linear-gradient(#dfe7f7, #c9d4ea); }
.xboard { position: relative; top: -10px; margin-top: 0; padding: clamp(28px, 4vw, 52px) clamp(14px, 3vw, 40px) clamp(20px, 3vw, 36px); border-radius: 22px;
  background:
    radial-gradient(70% 50% at 50% 0, rgba(255, 210, 63, .12), transparent 70%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .025) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, #5a0f22, #3a0816);
  box-shadow: 0 0 0 8px #2a0510, 0 0 0 11px #d9a93a, 0 0 0 14px #2a0510, 0 40px 90px -30px rgba(0, 0, 0, .9), inset 0 2px 30px rgba(0, 0, 0, .5); }
.xboard__garland { position: absolute; left: -14px; right: -14px; top: -26px; height: 52px; border-radius: 26px; z-index: 3;
  background:
    radial-gradient(circle at 6% 50%, #ff3b5c 0 7px, transparent 8px), radial-gradient(circle at 18% 60%, #ffd23f 0 6px, transparent 7px), radial-gradient(circle at 31% 45%, #58b4ff 0 7px, transparent 8px), radial-gradient(circle at 44% 58%, #ff3b5c 0 6px, transparent 7px), radial-gradient(circle at 57% 46%, #ffd23f 0 7px, transparent 8px), radial-gradient(circle at 70% 60%, #ff9ec4 0 6px, transparent 7px), radial-gradient(circle at 83% 46%, #ff3b5c 0 7px, transparent 8px), radial-gradient(circle at 95% 56%, #ffd23f 0 6px, transparent 7px),
    repeating-linear-gradient(115deg, #1b6b45 0 6px, #0f4a2e 6px 11px, #2a8a5a 11px 15px);
  box-shadow: 0 8px 18px -6px rgba(0, 0, 0, .6); }
.xboard__head { text-align: center; margin-bottom: var(--s5); }
.xboard__title { margin: 0; font: 400 clamp(2.2rem, 1.6rem + 2.4vw, 3.4rem)/1 var(--f-script); color: #ffe9a3; text-shadow: 0 2px 0 rgba(0, 0, 0, .4), 0 0 24px rgba(255, 210, 63, .35); }
.xboard__sub { margin: 6px 0 0; color: rgba(255, 255, 255, .62); font-size: var(--t-sm); }

.advent { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: clamp(10px, 1.4vw, 18px); grid-auto-flow: dense; }
.door { aspect-ratio: 1; }
.door--big { grid-column: span 2; grid-row: span 2; }

.door__btn { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 12px; background: none; cursor: pointer; perspective: 900px; color: #fff; }
.door__btn:focus-visible { outline: 3px solid var(--x-gold); outline-offset: 4px; }

/* behind the door */
.door__inside { position: absolute; inset: 0; border-radius: 12px; overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 45%, #fff3c4 0, #ffcf6b 22%, #b5651d 55%, #3a1606 100%); box-shadow: inset 0 0 0 3px #2a0510, inset 0 6px 20px rgba(0, 0, 0, .6); }
.door__glow { position: absolute; inset: 0; background: radial-gradient(circle, rgba(255, 255, 255, .7), transparent 60%); opacity: .6; }
.door__peek { position: relative; width: 46%; color: #fff; filter: drop-shadow(0 0 10px #fff) drop-shadow(0 2px 0 rgba(0, 0, 0, .25)); }
.door__peek svg { width: 100%; height: auto; display: block; }
.door__star { color: #fff8d6; }

/* the door itself */
.door__leaf { position: absolute; inset: 0; border-radius: 12px; overflow: visible; transform-origin: left center; transform-style: preserve-3d;
  transition: transform .9s cubic-bezier(.3, 1.4, .5, 1), box-shadow .3s; box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .8), inset 0 0 0 1px rgba(255, 255, 255, .15); backface-visibility: hidden; }
.door__leaf > * { backface-visibility: hidden; }
.door__paper { position: absolute; inset: 0; border-radius: 12px; background-color: var(--paper); overflow: hidden; }
.door__paper::after { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255, 255, 255, .22), transparent 40%, rgba(0, 0, 0, .18)); }
.door__paper--stripe { background-image: repeating-linear-gradient(45deg, var(--accent) 0 7px, transparent 7px 18px); }
.door__paper--dots { background-image: radial-gradient(circle, var(--accent) 0 3px, transparent 3.5px), radial-gradient(circle, var(--accent) 0 3px, transparent 3.5px); background-size: 18px 18px; background-position: 0 0, 9px 9px; }
.door__paper--plaid { background-image: repeating-linear-gradient(0deg, rgba(0, 0, 0, .25) 0 6px, transparent 6px 22px), repeating-linear-gradient(90deg, rgba(0, 0, 0, .25) 0 6px, transparent 6px 22px), repeating-linear-gradient(90deg, transparent 0 10px, var(--accent) 10px 12px, transparent 12px 22px); }
.door__paper--stars { background-image: radial-gradient(circle at 25% 30%, var(--accent) 0 2px, transparent 2.5px), radial-gradient(circle at 70% 65%, var(--accent) 0 1.5px, transparent 2px), radial-gradient(circle at 80% 20%, var(--accent) 0 2.5px, transparent 3px), radial-gradient(circle at 35% 80%, var(--accent) 0 1.5px, transparent 2px); background-size: 34px 34px; }
.door__paper--snow { background-image: radial-gradient(circle at 20% 20%, var(--accent) 0 2px, transparent 2.5px), radial-gradient(circle at 70% 50%, var(--accent) 0 3px, transparent 3.5px), radial-gradient(circle at 40% 80%, var(--accent) 0 2px, transparent 2.5px); background-size: 28px 28px; }
.door__paper--foil { background-image: linear-gradient(120deg, #7a560f, #ffe08a 25%, #c48a1a 45%, #fff2bf 60%, #b8860b 80%, #6b4a0c); background-size: 200% 200%; }
html.fx .door__paper--foil { animation: foil 5s ease-in-out infinite alternate; }
@keyframes foil { to { background-position: 100% 100%; } }

.door__ribbon { position: absolute; inset: 0; border-radius: 12px; pointer-events: none;
  background: linear-gradient(90deg, transparent calc(50% - 7px), var(--ribbon) calc(50% - 7px) calc(50% + 7px), transparent calc(50% + 7px)), linear-gradient(0deg, transparent calc(50% - 7px), var(--ribbon) calc(50% - 7px) calc(50% + 7px), transparent calc(50% + 7px)); filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .3)); }
.door--big .door__ribbon { background: linear-gradient(90deg, transparent calc(50% - 13px), var(--ribbon) calc(50% - 13px) calc(50% + 13px), transparent calc(50% + 13px)), linear-gradient(0deg, transparent calc(50% - 13px), var(--ribbon) calc(50% - 13px) calc(50% + 13px), transparent calc(50% + 13px)); }
.door__bow { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.door__bow i { position: absolute; top: -11px; width: 22px; height: 18px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: var(--ribbon); box-shadow: inset -3px -3px 0 rgba(0, 0, 0, .18), 0 1px 2px rgba(0, 0, 0, .3); }
.door__bow i:first-child { right: 1px; transform: rotate(-24deg); }
.door__bow i:last-child { left: 1px; transform: rotate(24deg); }
.door__bow::after { content: ""; position: absolute; left: -6px; top: -7px; width: 12px; height: 12px; border-radius: 4px; background: var(--ribbon); filter: brightness(.85); }
.door--big .door__bow i { width: 44px; height: 34px; top: -21px; }
.door--big .door__bow::after { width: 22px; height: 22px; left: -11px; top: -12px; }

.door__tag { position: absolute; left: 8px; top: 8px; z-index: 2; display: grid; place-items: center; min-width: 38px; height: 30px; padding: 0 7px; border-radius: 6px 14px 14px 6px;
  background: var(--x-cream); color: #5a0f22; box-shadow: 0 3px 6px rgba(0, 0, 0, .35); transform: rotate(-6deg); }
.door__tag::before { content: ""; position: absolute; left: 6px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: rgba(90, 15, 34, .35); }
.door__tag b { font: 900 1.25rem/1 var(--f-display); font-stretch: 80%; padding-left: 8px; }
.door--big .door__tag { min-width: 70px; height: 52px; left: 14px; top: 14px; }
.door--big .door__tag b { font-size: 2.4rem; padding-left: 10px; }

.door__snowcap { position: absolute; left: -2px; right: -2px; top: -7px; height: 16px; border-radius: 10px 10px 50% 50% / 10px 10px 100% 100%; pointer-events: none;
  background: radial-gradient(circle at 15% 100%, #fff 0 8px, transparent 9px), radial-gradient(circle at 45% 100%, #fff 0 10px, transparent 11px), radial-gradient(circle at 78% 100%, #fff 0 8px, transparent 9px), linear-gradient(#fff, #e6eefc);
  -webkit-mask: linear-gradient(#000 0 55%, transparent 55%), radial-gradient(circle at 15% 55%, #000 0 6px, transparent 7px), radial-gradient(circle at 45% 55%, #000 0 8px, transparent 9px), radial-gradient(circle at 78% 55%, #000 0 6px, transparent 7px);
  mask: linear-gradient(#000 0 55%, transparent 55%), radial-gradient(circle at 15% 55%, #000 0 6px, transparent 7px), radial-gradient(circle at 45% 55%, #000 0 8px, transparent 9px), radial-gradient(circle at 78% 55%, #000 0 6px, transparent 7px);
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .25)); }

.door__frost { position: absolute; inset: 0; border-radius: 12px; opacity: 0; transition: opacity .3s; pointer-events: none;
  background: linear-gradient(180deg, rgba(220, 230, 255, .14), rgba(14, 10, 28, .32)); box-shadow: inset 0 0 18px rgba(220, 230, 255, .35); }
.door__lock { position: absolute; right: 8px; bottom: 8px; z-index: 2; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: rgba(10, 6, 20, .7); color: #fff; opacity: 0; box-shadow: 0 0 0 1px rgba(255, 255, 255, .25); }
.door__lock .icon { width: 14px; height: 14px; }
.door--big .door__lock { width: 36px; height: 36px; right: 14px; bottom: 14px; }

.door__state { position: absolute; left: 0; right: 0; bottom: -4px; transform: translateY(100%); padding-top: 6px; text-align: center; font: 400 1rem/1 var(--f-term); color: rgba(255, 255, 255, .55); letter-spacing: .03em; white-space: nowrap; }
.advent { row-gap: clamp(30px, 3vw, 40px); }

/* states */
.door.is-locked .door__btn { cursor: not-allowed; }
.door.is-locked .door__frost, .door.is-locked .door__lock { opacity: 1; }
.door.is-locked .door__leaf { filter: saturate(.85) brightness(.92); }
.door:not(.is-locked) .door__btn:hover .door__leaf { transform: rotateY(-14deg); box-shadow: 8px 12px 24px -8px rgba(0, 0, 0, .9); }
.door.is-ready .door__state { color: var(--x-gold); }
.door.is-today .door__state { color: var(--x-gold); font-size: 1.1rem; }
.door.is-today .door__leaf { box-shadow: 0 0 0 3px var(--x-gold), 0 0 30px 4px rgba(255, 210, 63, .55), 0 8px 18px -8px rgba(0, 0, 0, .8); }
html.fx .door.is-today .door__leaf { animation: knock 2.6s ease-in-out infinite; }
@keyframes knock { 0%, 70%, 100% { transform: rotateY(0); } 74% { transform: rotateY(-10deg); } 78% { transform: rotateY(0); } 82% { transform: rotateY(-6deg); } 86% { transform: rotateY(0); } }
.door.is-today .door__btn::before { content: ""; position: absolute; inset: -12px; border-radius: 18px; z-index: -1; pointer-events: none;
  background: radial-gradient(circle at 10% 20%, #fff 0 2px, transparent 3px), radial-gradient(circle at 90% 10%, #ffe9a3 0 2px, transparent 3px), radial-gradient(circle at 85% 90%, #fff 0 1.5px, transparent 2.5px), radial-gradient(circle at 5% 85%, #ffe9a3 0 2px, transparent 3px); }
html.fx .door.is-today .door__btn::before { animation: sparkle 1.6s ease-in-out infinite alternate; }
@keyframes sparkle { to { opacity: .2; transform: scale(1.04) rotate(3deg); } }

.door.is-opened .door__leaf { transform: rotateY(-108deg); box-shadow: -10px 0 20px -8px rgba(0, 0, 0, .7); }
.door.is-opened .door__btn:hover .door__leaf { transform: rotateY(-100deg); }
.door.is-opened .door__state { color: #7fe0a8; }
html.fx .door.is-opened .door__peek { animation: float 3s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-6%) scale(1.04); } }

/* program (.exe) doors */
.door.is-exe .door__paper { background-color: #1a0a1f; background-image: radial-gradient(circle at 50% 50%, rgba(255, 79, 139, .35), transparent 65%), linear-gradient(rgba(255, 79, 139, .28) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 79, 139, .28) 1px, transparent 1px); background-size: 100% 100%, 12px 12px, 12px 12px; }
html.fx .door.is-exe .door__paper { animation: scan 3s linear infinite; }
@keyframes scan { to { background-position: 0 0, 0 12px, 0 0; } }
.door.is-exe .door__leaf { box-shadow: 0 0 0 1px rgba(255, 79, 139, .6), 0 0 22px -4px rgba(255, 79, 139, .7), 0 8px 18px -8px rgba(0, 0, 0, .8); }
.door.is-exe.is-locked .door__frost { background: linear-gradient(180deg, rgba(14, 10, 28, .1), rgba(14, 10, 28, .35)); }
.door.is-exe.is-locked .door__leaf { filter: none; }
.door.is-exe .door__inside { background: radial-gradient(circle at 50% 45%, #ffd1e3 0, #ff6fa3 30%, #7a0f3a 70%, #1a0510 100%); }
.door__ext { position: absolute; right: 8px; top: 8px; z-index: 2; padding: 3px 6px; border-radius: 4px; background: #ff4f8b; color: #fff; font: 400 .95rem/1 var(--f-term); letter-spacing: .05em; box-shadow: 0 0 12px rgba(255, 79, 139, .7); }
.door--big .door__ext { font-size: 1.3rem; right: 14px; top: 16px; }
.door__exe { image-rendering: pixelated; }

/* confetti */
.xconf { position: fixed; z-index: 120; width: 8px; height: 12px; pointer-events: none; border-radius: 2px; animation: conf 1.3s cubic-bezier(.2, .7, .3, 1) forwards; }
.xconf--snow { width: 8px; height: 8px; border-radius: 50%; background: #fff !important; }
@keyframes conf { to { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0; } }

@media (max-width: 900px) {
  .advent { grid-template-columns: repeat(4, 1fr); column-gap: 10px; }
  .door__tag { min-width: 28px; height: 22px; left: 5px; top: 5px; padding: 0 5px; }
  .door__tag b { font-size: .95rem; padding-left: 6px; }
  .door__tag::before { left: 4px; width: 4px; height: 4px; margin-top: -2px; }
  .door__bow i { width: 14px; height: 11px; top: -7px; }
  .door__bow::after { width: 8px; height: 8px; left: -4px; top: -5px; }
  .door__ribbon { background: linear-gradient(90deg, transparent calc(50% - 4px), var(--ribbon) calc(50% - 4px) calc(50% + 4px), transparent calc(50% + 4px)), linear-gradient(0deg, transparent calc(50% - 4px), var(--ribbon) calc(50% - 4px) calc(50% + 4px), transparent calc(50% + 4px)); }
  .door__lock { width: 20px; height: 20px; right: 4px; bottom: 4px; }
  .door__state { font-size: .8rem; }
  .door.is-locked .door__state { font-size: 0; }
  .door--big.is-locked .door__state { font-size: .9rem; }
  .door__ext { font-size: .7rem; right: 4px; top: 5px; padding: 2px 4px; }
  .xboard { padding-left: 12px; padding-right: 12px; }
}

/* ════════ GIFT CARD (door contents) ════════ */
.xcard { width: min(560px, calc(100vw - 24px)); padding: 0; border: 0; border-radius: 18px; overflow: visible; color: #3a1220;
  background: radial-gradient(80% 60% at 100% 0, rgba(255, 210, 63, .18), transparent 60%), var(--x-cream);
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, .8), 0 0 0 6px #fff, 0 0 0 9px #d9a93a; }
.xcard::backdrop { background: radial-gradient(circle at 50% 40%, rgba(40, 10, 30, .55), rgba(5, 3, 15, .88)); backdrop-filter: blur(6px); }
.xcard[open] { animation: cardin .55s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes cardin { from { transform: translateY(30px) scale(.9) rotate(-2deg); opacity: 0; } }
.xcard__ribbon { position: absolute; left: 34px; top: -9px; bottom: -9px; width: 26px; background: linear-gradient(90deg, #8f0b22, #e0213f 40%, #ff5a74 50%, #e0213f 60%, #8f0b22); box-shadow: 2px 0 6px rgba(0, 0, 0, .2); }
.xcard__seal { position: absolute; left: 22px; top: 26px; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; color: #ffd6df; font-size: 1.4rem;
  background: radial-gradient(circle at 35% 30%, #ff5a74, #a30d26 60%, #6a0717); box-shadow: 0 3px 8px rgba(0, 0, 0, .35), inset 0 0 0 3px rgba(0, 0, 0, .15); }
.xcard__in { padding: 34px 32px 26px 92px; }
.xcard__day { margin: 0 0 4px; font: 400 1.1rem/1 var(--f-term); color: #a30d26; letter-spacing: .05em; }
.xcard__title { margin: 0 0 12px; font: 400 clamp(2rem, 1.6rem + 1.6vw, 2.8rem)/1.05 var(--f-script); color: #6a0717; }
.xcard__body p { color: #4a1b2d; font-size: var(--t-md); }
.xcard__body img { width: 100%; border-radius: 10px; margin-bottom: 14px; box-shadow: 0 8px 20px -10px rgba(0, 0, 0, .5); }
.xcard__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.xcard__actions a.btn { border-radius: 999px; clip-path: none; min-height: 48px; padding: 0 1.4em; background: linear-gradient(180deg, #ff4a68, #c8102e); }
.xcard__sign { margin: 16px 0 0; text-align: right; font: 400 1.7rem/1 var(--f-script); color: #a30d26; }
@media (max-width: 520px) { .xcard__in { padding: 76px 22px 22px; } .xcard__ribbon { left: 0; right: 0; top: 30px; bottom: auto; width: auto; height: 22px; background: linear-gradient(180deg, #8f0b22, #e0213f 40%, #ff5a74 50%, #e0213f 60%, #8f0b22); } .xcard__seal { left: 50%; top: 16px; transform: translateX(-50%); } }

/* ════════ FOOTER STRIP ════════ */
.xfoot { padding: clamp(40px, 6vw, 72px) 0; background: linear-gradient(180deg, #0e0a1c, var(--x-night)); text-align: center; }
.xfoot .comm { margin-top: var(--s5); text-align: left; }
.theme-xmas .comm__card { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .12); }
.theme-xmas .comm__card--discord { background: linear-gradient(160deg, rgba(200, 16, 46, .25), rgba(255, 255, 255, .03) 70%); border-color: rgba(255, 59, 92, .45); }
.theme-xmas .ftr { margin-top: 0; }

/* ════════ switches ════════ */
html[data-effects="off"] .xsky__snow, html[data-effects="off"] .xconf { display: none; }
@media (prefers-reduced-motion: reduce) {
  .xsky__snow, .xconf { display: none; }
  .door__leaf { transition: none; }
}

/* ════════ COUNTDOWN TEASER (/christmas/ before the calendar opens) ════════ */
.xsky--teaser { min-height: min(960px, 100vh); }
.xcount { margin: 6px 0 var(--s5); }
.xcount__label { margin: 0 0 12px; font: 400 1.5rem/1.2 var(--f-term); color: var(--x-gold); letter-spacing: .03em; }
.xcount__cells { display: flex; gap: 12px; }
.xcount__cell { position: relative; min-width: 104px; padding: 16px 12px 12px; border-radius: 16px; text-align: center; overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .04)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2), 0 18px 40px -18px #000, 0 0 40px -18px rgba(255, 210, 63, .5); backdrop-filter: blur(6px); }
.xcount__cell::before { content: ""; position: absolute; left: -2px; right: -2px; top: -6px; height: 14px; border-radius: 10px 10px 50% 50%; background: #fff; opacity: .9; }
.xcount__cell::after { content: ""; position: absolute; left: 0; right: 0; top: 52%; height: 1px; background: rgba(0, 0, 0, .35); }
.xcount__cell b { display: block; font: 900 3.6rem/1 var(--f-display); font-stretch: 78%; color: #fff; font-variant-numeric: tabular-nums; text-shadow: 0 0 24px rgba(255, 210, 63, .35); }
.xcount__cell b.is-tick { animation: tick .35s ease-out; }
.xcount__cell span { display: block; margin-top: 6px; font: 400 1rem/1 var(--f-term); color: rgba(255, 255, 255, .7); letter-spacing: .08em; text-transform: uppercase; }
.xcount__date { margin: 12px 0 0; color: rgba(255, 255, 255, .62); font-size: var(--t-sm); }
.xsky--teaser.is-open .xcount__cells { display: none; }
.xsky--teaser.is-open .xcount__label { font-size: 2rem; }
html.fx .xsky--teaser.is-open .xcount__label { animation: twinkle-stars 1.2s ease-in-out infinite alternate; }

.xnow { display: flex; align-items: center; gap: 10px; margin: 14px 0 0; color: rgba(255, 255, 255, .8); font-size: var(--t-sm); }
.xnow__eq { display: inline-flex; align-items: flex-end; gap: 3px; height: 16px; }
.xnow__eq i { width: 4px; height: 40%; border-radius: 2px; background: var(--x-gold); }
html.fx .xnow__eq i { animation: eq .9s ease-in-out infinite alternate; }
html.fx .xnow__eq i:nth-child(2) { animation-delay: -.3s; } html.fx .xnow__eq i:nth-child(3) { animation-delay: -.6s; } html.fx .xnow__eq i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { to { height: 100%; } }
.xhint { margin: 14px 0 0; display: inline-block; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); color: #fff; font-size: var(--t-sm); }
html.fx .xhint { animation: bob 2s ease-in-out infinite; }

.advent--peek { grid-template-columns: repeat(7, 1fr); }
.advent--peek .door__btn { cursor: default; }
.xfacts { list-style: none; margin: clamp(28px, 4vw, 44px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.xfacts li { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 14px; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(255, 210, 63, .25); color: rgba(255, 255, 255, .85); }
.xfacts b { flex: none; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ff6b85, var(--x-red) 60%, #5a0716); color: #fff; font: 900 1.4rem/1 var(--f-display); box-shadow: 0 0 0 3px rgba(255, 210, 63, .7); }

@media (max-width: 900px) {
  .xcount__cells { gap: 8px; }
  .xcount__cell { min-width: 0; flex: 1; padding: 12px 6px 10px; }
  .xcount__cell b { font-size: 2.4rem; }
  .advent--peek { grid-template-columns: repeat(4, 1fr); }
  .advent--peek .door:nth-child(n+5) { display: none; }
  .xfacts { grid-template-columns: 1fr; }
}
.xsky--teaser { padding-bottom: 290px; }
.xsky--teaser.is-open [data-ics] { display: none; }
@media (max-width: 900px) { .xsky--teaser { padding-bottom: 200px; } }

/* ════════ LIVE CALENDAR (doors + task cards) ════════ */
.advent[data-advent] { row-gap: 40px; padding-bottom: 18px; }
.door .door__btn:disabled { opacity: 1; }
.door__inside { background: radial-gradient(circle at 50% 45%, #fff3c4 0, #ffd23f 30%, #b3122f 75%, #4a0716 100%); }
.door.is-task .door__inside { background: radial-gradient(circle at 50% 45%, #ffe3ee 0, #ff9ec4 32%, #c8102e 75%, #4a0716 100%); }
.door.is-task .door__ext { font-size: .85rem; }
.door--big .door__peek { width: 38%; }
.xprog--board { margin: 26px auto 0; text-align: center; }
.xprog--board .xprog__txt { color: rgba(255, 255, 255, .7); }
@media (max-width: 900px) {
  .advent[data-advent] { grid-template-columns: repeat(4, 1fr); row-gap: 32px; }
}
@media (max-width: 520px) {
  .advent[data-advent] { row-gap: 26px; }
  .door.is-task .door__ext { font-size: .62rem; }
}

.xcard[open] { max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain; }
.xcard__img { position: relative; margin: 0 0 14px; border-radius: 10px; overflow: hidden; }
.xcard__img img { display: block; margin: 0; transition: filter .4s; }
.xcard__img.is-blurred img { filter: blur(26px) saturate(.8); transform: scale(1.08); }
.xcard__reveal { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: rgba(40, 8, 24, .55); }
.xcard__steps { margin: 4px 0 0; padding-left: 1.5em; color: #4a1b2d; font-size: var(--t-md); }
.xcard__steps li { margin: 0 0 8px; padding-left: 4px; }
.xcard__steps li::marker { color: #c8102e; font-weight: 800; }


/* ── picture puzzle ── */
.xpz { margin: 0 0 14px; }
.xpz__board { display: grid; grid-template-columns: repeat(var(--n), 1fr); grid-template-rows: repeat(var(--n), 1fr); gap: 2px; aspect-ratio: 1; padding: 2px; border-radius: 10px; background: #6a0717; box-shadow: 0 8px 20px -10px rgba(0, 0, 0, .5); }
.xpz__tile { padding: 0; border: 0; border-radius: 3px; background-repeat: no-repeat; cursor: pointer; transition: transform .15s, box-shadow .15s, filter .15s; }
.xpz__tile:hover { filter: brightness(1.08); }
.xpz__tile:focus-visible { outline: 3px solid var(--x-gold); outline-offset: -3px; position: relative; z-index: 1; }
.xpz__tile.is-picked { box-shadow: inset 0 0 0 3px var(--x-gold), 0 0 14px rgba(255, 210, 63, .8); transform: scale(.94); position: relative; z-index: 1; }
.xpz__full { display: none; width: 100%; border-radius: 10px; box-shadow: 0 8px 20px -10px rgba(0, 0, 0, .5); }
.xpz.is-solved .xpz__board { display: none; }
.xpz.is-solved .xpz__full { display: block; }
html.fx .xpz.is-solved .xpz__full { animation: cardin .6s cubic-bezier(.2, 1.4, .4, 1); }
.xpz__status { margin: 10px 0 6px; font: 400 1.15rem/1.2 var(--f-term); color: #a30d26; }
.xpz.is-solved .xpz__status { color: #1b6b45; }
.xpz__shuffle { padding: 0; border: 0; background: none; color: #a30d26; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; font: 600 .9rem/1 var(--f-body); }
.xcard__full { color: #6a0717; background: rgba(106, 7, 23, .07); box-shadow: inset 0 0 0 1.5px rgba(106, 7, 23, .3); }
@media (max-width: 520px) { .door__extw { display: none; } }
.door__ext { white-space: nowrap; max-width: calc(100% - 52px); overflow: hidden; text-overflow: ellipsis; }
