/* Case's Christmas Dash info page (/christmas-dash) */
.xd-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Hero: a snowy night */
.xd-hero {
  position: relative; overflow: hidden; color: var(--snow); border-bottom: var(--ink);
  background: radial-gradient(120% 90% at 80% 10%, #3a4fb8 0%, #1d2a78 45%, #121a4f 100%);
  padding-top: var(--header-space, 90px);
}
.xd-snow { position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(3px 3px at 20px 30px, #fff 50%, transparent 52%), radial-gradient(2px 2px at 80px 120px, #fff 50%, transparent 52%), radial-gradient(3px 3px at 150px 60px, rgba(255,255,255,.8) 50%, transparent 52%), radial-gradient(2px 2px at 200px 170px, #fff 50%, transparent 52%);
  background-size: 230px 200px; animation: xd-snow 14s linear infinite; opacity: .8; }
@keyframes xd-snow { to { background-position: 40px 400px; } }
.xd-hero__inner { position: relative; z-index: 1; display: grid; gap: var(--s6); align-items: center; padding: var(--s6) 0 var(--s7); }
.xd-kicker { display: inline-block; margin: 0 0 var(--s3); padding: 6px 14px; border-radius: 999px; background: var(--tie); border: 3px solid #fff; font-family: var(--font-display); font-size: 1.05rem; letter-spacing: .04em; text-transform: uppercase; transform: rotate(-2deg); }
.xd-hero h1 { margin: 0; font-size: clamp(2.5rem, 1.4rem + 4.6vw, 4.6rem); line-height: .95; color: var(--snow); text-shadow: 0 5px 0 var(--tie-dark); -webkit-text-stroke: 2px var(--navy); paint-order: stroke fill; }
.xd-tag { margin: var(--s2) 0 var(--s4); font-family: var(--font-display); font-size: clamp(1.4rem, 1rem + 1.6vw, 2rem); color: var(--sun); }
.xd-lead { font-size: var(--text-lg); line-height: 1.5; max-width: 46ch; margin: 0 0 var(--s5); }
.xd-actions { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; }
.xd-actions--center { justify-content: center; margin-top: var(--s6); }
.xd-play.is-off { opacity: .85; cursor: default; box-shadow: none; }
.xd-play.is-off:hover { transform: none; }
.xd-note { margin: var(--s4) 0 0; font-weight: 700; color: #dfe6ff; }
.xd-hero__art { position: relative; justify-self: center; width: min(100%, 520px); }
.xd-hero__pic { display: block; width: 100%; height: auto; border-radius: 26px; border: 5px solid #fff; box-shadow: 0 10px 0 var(--navy), 0 18px 40px rgba(0,0,0,.35); transform: rotate(2deg); }
.xd-star { position: absolute; font-size: 2.4rem; filter: drop-shadow(0 3px 0 rgba(0,0,0,.25)); animation: xd-bob 3s ease-in-out infinite; }
.xd-star--a { top: -18px; left: -14px; } .xd-star--b { bottom: -10px; right: -12px; font-size: 2.8rem; animation-delay: .8s; } .xd-star--c { top: 30%; right: -20px; font-size: 1.8rem; animation-delay: 1.6s; }
@keyframes xd-bob { 50% { transform: translateY(-10px) rotate(10deg); } }
@media (min-width: 900px) { .xd-hero__inner { grid-template-columns: 1.1fr 1fr; } }

/* Sign in prompt */
.xd-join { margin-top: var(--s6); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s4); padding: var(--s4) var(--s5); border: var(--ink); border-radius: 22px; background: #fff7d6; box-shadow: 0 6px 0 var(--navy); }
.xd-join p { display: flex; gap: var(--s3); align-items: center; margin: 0; font-weight: 700; color: var(--navy); }
.xd-join__icon { font-size: 1.8rem; }
.xd-join__btns { display: flex; gap: var(--s3); flex-wrap: wrap; }

/* Sections */
.xd-section { padding: var(--s7) 0 0; }
.xd-section .section-title { margin-bottom: var(--s4); }
.xd-intro { font-size: 1.1rem; max-width: 60ch; margin: 0 0 var(--s5); }
.xd-small { font-size: .98rem; color: #4a5488; }

.xd-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); counter-reset: xd; }
.xd-steps li { position: relative; padding: var(--s5) var(--s4) var(--s4); border: var(--ink); border-radius: 22px; background: #fff; box-shadow: 0 6px 0 var(--navy); counter-increment: xd; }
.xd-steps li::before { content: counter(xd); position: absolute; top: -14px; left: 16px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--tie); color: #fff; border: 3px solid var(--navy); font-family: var(--font-display); }
.xd-steps__icon { font-size: 2.2rem; display: block; }
.xd-steps h3 { margin: var(--s2) 0 var(--s2); font-size: 1.35rem; color: var(--navy); }
.xd-steps p { margin: 0; line-height: 1.45; }

/* Stars band */
.xd-band { margin-top: var(--s7); padding: var(--s7) 0; background: #e9f3ff; border-block: var(--ink); }
.xd-band__inner { display: grid; gap: var(--s6); align-items: start; }
@media (min-width: 860px) { .xd-band__inner { grid-template-columns: 1.4fr 1fr; } }
.xd-points { list-style: none; margin: 0 0 var(--s3); padding: 0; display: grid; gap: var(--s2); }
.xd-points li { display: flex; align-items: center; gap: var(--s3); font-size: 1.1rem; font-weight: 700; }
.xd-points b { flex: none; min-width: 64px; text-align: center; padding: 6px 10px; border-radius: 999px; background: var(--sun); border: 3px solid var(--navy); font-family: var(--font-display); font-weight: 400; font-size: 1.15rem; }
.xd-points li.is-minus b { background: #ffd9d9; }
.xd-day { text-align: center; padding: var(--s5); border: var(--ink); border-radius: 26px; background: #fff; box-shadow: 0 6px 0 var(--navy); }
.xd-day__big { margin: 0; font-family: var(--font-display); font-size: 5rem; line-height: 1; color: var(--tie); -webkit-text-stroke: 2px var(--navy); paint-order: stroke fill; }
.xd-day__label { margin: 0 0 var(--s3); font-family: var(--font-display); font-size: 1.5rem; color: var(--navy); }

/* Prizes */
.xd-prizes { list-style: none; margin: 0 0 var(--s3); padding: 0; display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.xd-prize { display: grid; grid-template-rows: auto 1fr auto; border: var(--ink); border-radius: 22px; background: #fff; box-shadow: 0 6px 0 var(--navy); overflow: hidden; }
.xd-prize__pic { display: grid; place-items: center; aspect-ratio: 16 / 10; background: linear-gradient(160deg, #d8263b, #8f1424); border-bottom: var(--ink); font-size: 3.6rem; }
.xd-prize__pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.xd-prize__body { display: grid; gap: 4px; padding: var(--s4) var(--s4) var(--s2); }
.xd-prize__title { font-family: var(--font-display); font-size: 1.25rem; color: var(--navy); line-height: 1.15; }
.xd-prize__blurb { line-height: 1.4; }
.xd-prize__price { justify-self: start; margin: var(--s2) var(--s4) var(--s4); padding: 6px 14px; border-radius: 999px; background: var(--sun); border: 3px solid var(--navy); font-family: var(--font-display); font-size: 1.1rem; color: var(--navy); }
.xd-prize.is-soon .xd-prize__pic { background: linear-gradient(160deg, #5f6fb8, #2a3680); }
.xd-prize.is-soon .xd-prize__price { background: #e6e9f3; }

/* Leaderboard */
.xd-board { display: grid; gap: var(--s5); align-items: center; }
.xd-board p { font-size: 1.1rem; line-height: 1.5; max-width: 60ch; }
.xd-board__art { display: flex; justify-content: center; align-items: flex-end; }
.xd-board__art img { height: 170px; width: auto; margin-inline: -14px; filter: drop-shadow(0 5px 0 rgba(24,33,88,.25)); }
.xd-board__art img:nth-child(2) { height: 195px; z-index: 1; }
@media (min-width: 860px) { .xd-board { grid-template-columns: 1fr 1.6fr; } .xd-board__art { order: 2; } }

/* Rules and grown ups */
.xd-rules { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.xd-rules li { position: relative; padding: var(--s3) var(--s4) var(--s3) 3.2rem; border: 2px solid #c9d3ee; border-radius: 16px; background: #fff; font-size: 1.08rem; line-height: 1.45; }
.xd-rules li::before { content: "❄"; position: absolute; left: 1rem; top: .65rem; font-size: 1.3rem; color: var(--lake); }
.xd-grown { padding-bottom: var(--s8); }
.xd-grown ul { margin: 0; padding-left: 1.2em; display: grid; gap: var(--s2); line-height: 1.5; max-width: 72ch; }

@media (prefers-reduced-motion: reduce) { .xd-snow, .xd-star { animation: none; } }

/* Weekly draws and grand prize */
.xd-draws { display: grid; gap: var(--s5); margin-bottom: var(--s3); }
@media (min-width: 860px) { .xd-draws { grid-template-columns: 1fr 1.3fr; } }
.xd-draw { position: relative; padding: var(--s5); border: var(--ink); border-radius: 26px; background: #fff; box-shadow: 0 6px 0 var(--navy); }
.xd-draw h3 { margin: 0 0 var(--s2); font-size: 1.6rem; line-height: 1.1; color: var(--navy); }
.xd-draw p { margin: 0; font-size: 1.08rem; line-height: 1.5; }
.xd-draw__icon { font-size: 2.6rem; display: block; margin-bottom: var(--s2); }
.xd-draw__label { display: inline-block; margin: 0 0 var(--s2) !important; padding: 4px 12px; border-radius: 999px; background: var(--lake-pale); border: 2px solid var(--navy); font-family: var(--font-display); font-size: .95rem !important; text-transform: uppercase; letter-spacing: .04em; }
.xd-draw--grand { background: linear-gradient(150deg, #fff6cf, #ffe08a); overflow: hidden; }
.xd-draw--grand .xd-draw__label { background: var(--tie); color: #fff; border-color: #fff; }
.xd-draw--grand h3 { font-size: 1.9rem; color: var(--tie-dark); }
.xd-draw--grand::after { content: "⭐"; position: absolute; right: 18px; top: 14px; font-size: 2.4rem; animation: xd-bob 3s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .xd-draw--grand::after { animation: none; } }

/* Live leaderboard (top of the page, refreshes every 15 seconds) */
.xd-live { max-width: 760px; }
.xd-live__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s2) var(--s4); }
.xd-live__head .section-title { margin-bottom: var(--s2); }
.xd-live__status { margin: 0; display: inline-flex; align-items: center; gap: .45em; font-weight: 700; color: var(--navy); opacity: .8; font-size: .95rem; }
.xd-live__dot { width: .7em; height: .7em; border-radius: 50%; background: var(--meadow); box-shadow: 0 0 0 0 rgba(46, 160, 90, .55); animation: xd-live-pulse 2s ease-out infinite; }
@keyframes xd-live-pulse { 70% { box-shadow: 0 0 0 .55em rgba(46, 160, 90, 0); } 100% { box-shadow: 0 0 0 0 rgba(46, 160, 90, 0); } }
.xd-live__tabs { display: flex; gap: var(--s2); margin: var(--s2) 0 var(--s3); }
.xd-live__tabs button { font: inherit; font-family: var(--font-display); font-size: 1.05rem; cursor: pointer; padding: .45em 1.1em; border-radius: var(--r-pill); border: 3px solid var(--navy); background: var(--snow); color: var(--navy); }
.xd-live__tabs button[aria-selected="true"] { background: var(--navy); color: var(--snow); }
.xd-live__tabs button:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.xd-live__list { list-style: none; margin: 0; padding: var(--s2); display: grid; gap: var(--s2); background: var(--snow); border: 3px solid var(--navy); border-radius: var(--r-tile); box-shadow: var(--lift); }
.xd-live__row { display: grid; grid-template-columns: 2.6em 1fr auto; align-items: center; gap: var(--s3); padding: .55em .8em; border-radius: calc(var(--r-tile) - 6px); background: var(--lake-pale); }
.xd-live__row.is-top { background: #fff4cf; }
.xd-live__row.is-crew { background: #ffe9c2; }
.xd-live__row.is-new { animation: xd-live-flash 1.6s ease-out; }
@keyframes xd-live-flash { 0% { box-shadow: 0 0 0 3px var(--sun); transform: scale(1.02); } 100% { box-shadow: 0 0 0 0 transparent; transform: none; } }
.xd-live__rank { font-family: var(--font-display); font-size: 1.35rem; text-align: center; color: var(--navy); }
.xd-live__who { display: flex; align-items: center; flex-wrap: wrap; gap: .25em .6em; min-width: 0; }
.xd-live__pic { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: #fff; border: 2px solid var(--navy); }
.xd-live__name { font-weight: 800; color: var(--navy); overflow-wrap: anywhere; }
.xd-live__tag { font-size: .78rem; font-weight: 800; color: #8a5300; background: #fff; border: 2px solid #f0b24a; border-radius: var(--r-pill); padding: .05em .6em; white-space: nowrap; }
.xd-live__stars { font-family: var(--font-display); font-size: 1.2rem; color: var(--navy); white-space: nowrap; }
.xd-live__empty { padding: var(--s4); text-align: center; font-weight: 700; color: var(--navy); }
.xd-live__note { margin-top: var(--s3); max-width: 60ch; }
@media (max-width: 420px) { .xd-live__row { grid-template-columns: 2.1em 1fr auto; gap: var(--s2); padding: .5em .55em; } .xd-live__stars { font-size: 1.05rem; } }
@media (prefers-reduced-motion: reduce) { .xd-live__dot, .xd-live__row.is-new { animation: none; } }
