/* Advent calendar (/christmas) and its door pages. Loaded after site.css (and games.css on door pages). */
.xm-page { background: var(--night); --gold: #e0b052; --gold-2: #f3c75f; --frost: #dfe9ef; --sky: #0e1430; }
.xm { position: relative; }
.xm-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.xm-snow { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 4; }

/* ---------- hero ---------- */
.xm-hero {
  --p: 0; position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden; isolation: isolate;
  background: radial-gradient(120% 90% at 50% 0%, #1d2a52 0%, var(--sky) 48%, var(--night) 100%);
}
.xm-sky { position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 18%, #fff 50%, transparent 52%), radial-gradient(1px 1px at 28% 8%, #fff 50%, transparent 52%),
    radial-gradient(1.4px 1.4px at 44% 22%, #fff 50%, transparent 52%), radial-gradient(1px 1px at 63% 12%, #fff 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 78% 26%, #fff 50%, transparent 52%), radial-gradient(1px 1px at 88% 6%, #fff 50%, transparent 52%),
    radial-gradient(1px 1px at 6% 36%, #fff 50%, transparent 52%), radial-gradient(1.3px 1.3px at 54% 38%, #fff 50%, transparent 52%),
    radial-gradient(1px 1px at 36% 44%, #fff 50%, transparent 52%), radial-gradient(1px 1px at 94% 40%, #fff 50%, transparent 52%);
  animation: xm-twinkle 5s ease-in-out infinite alternate;
}
@keyframes xm-twinkle { from { opacity: .55; } to { opacity: 1; } }
.xm-aurora {
  position: absolute; left: -10%; right: -10%; top: 6%; height: 46%;
  background: radial-gradient(60% 40% at 30% 60%, rgb(124 195 162 / .32), transparent 70%), radial-gradient(50% 36% at 70% 40%, rgb(31 92 69 / .5), transparent 70%);
  filter: blur(30px); opacity: calc(.55 + var(--p) * .45);
  animation: xm-aurora 16s ease-in-out infinite alternate;
}
@keyframes xm-aurora { from { transform: translateX(-4%) skewY(-2deg); } to { transform: translateX(4%) skewY(2deg); } }
.xm-moon {
  position: absolute; right: 12%; top: 16%; width: clamp(56px, 7vw, 96px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 38% 36%, #fffaf0, #efe6cf 60%, #d9cfb5);
  box-shadow: 0 0 60px 18px rgb(243 241 236 / .18), 0 0 160px 60px rgb(124 195 162 / .08);
  transform: translateY(calc(var(--p) * 90px));
}
.xm-layer { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 64%; will-change: transform; pointer-events: none; }
.xm-far { z-index: 1; }
.xm-mid { z-index: 2; }
.xm-near { z-index: 5; height: 52%; }
.xm-mtn { fill: #1a2244; }
.xm-peak-snow { fill: rgb(223 233 239 / .8); }
.xm-hill { fill: #121a36; }
.xm-pine { fill: #0f2a25; }
.xm-near .xm-pine { fill: #123a2e; }
.xm-ground { fill: var(--frost); }
.xm-wall { fill: #1b2340; }
.xm-roof { fill: #0d1226; }
.xm-snowline { fill: none; stroke: var(--frost); stroke-width: 6; stroke-linejoin: round; }
.xm-door-shape { fill: #0d1226; }
.xm-window { fill: #2b3356; transition: fill .6s, filter .6s; }
.xm-hero.is-warm .xm-window { fill: var(--gold-2); filter: drop-shadow(0 0 8px rgb(243 199 95 / .85)); }
.xm-hero.is-warm .xm-cabin:nth-child(3) .xm-window { transition-delay: .15s; }
.xm-hero.is-warm .xm-cabin:nth-child(5) .xm-window { transition-delay: .3s; }
.xm-hero.is-warm .xm-cabin:nth-child(7) .xm-window { transition-delay: .45s; }

/* strings of lights */
.xm-lights { position: absolute; left: 0; top: 64px; z-index: 6; width: 100%; height: clamp(34px, 5vw, 56px); overflow: visible; pointer-events: none; }
.xm-wire { fill: none; stroke: rgb(243 241 236 / .4); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.xm-bulb rect { fill: #4a5070; }
.xm-bulb ellipse { fill: #3a3f5c; transition: fill .35s, filter .35s; }
.xm-bulb.is-on.b0 ellipse { fill: var(--gold-2); filter: drop-shadow(0 0 6px var(--gold-2)); }
.xm-bulb.is-on.b1 ellipse { fill: var(--mint); filter: drop-shadow(0 0 6px var(--mint)); }
.xm-bulb.is-on.b2 ellipse { fill: #fff6df; filter: drop-shadow(0 0 6px #fff6df); }
.xm-bulb.is-on.b3 ellipse { fill: #f2b8a8; filter: drop-shadow(0 0 6px #f2b8a8); }
.is-all .xm-bulb.is-on ellipse { animation: xm-glow 2.4s calc(var(--i) * -.37s) ease-in-out infinite alternate; }
@keyframes xm-glow { from { opacity: 1; } to { opacity: .55; } }

.xm-hero-copy { position: relative; z-index: 7; padding-top: clamp(150px, 20vh, 220px); padding-bottom: 34vh; will-change: transform; }
.xm-hero-copy .pf-label { color: var(--gold-2); opacity: 1; }
.xm-hero-copy .pf-label span::before { content: '★'; }
.xm-title { max-width: 11ch; text-shadow: 0 6px 40px rgb(10 12 23 / .6); }
.xm-sub { max-width: 44ch; margin-top: 22px; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; color: #c3c7d8; }
.xm-count {
  display: inline-grid; gap: 4px; margin-top: 30px; padding: 18px 22px 20px; border-radius: 20px;
  background: rgb(14 20 48 / .6); border: 1px solid rgb(224 176 82 / .35); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.xm-count-label { font-size: 12.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #c3c7d8; max-width: 34ch; line-height: 1.45; }
.xm-count-time { font-family: var(--serif); font-size: clamp(42px, 6vw, 68px); line-height: 1; letter-spacing: -0.01em; color: var(--gold-2); font-variant-numeric: tabular-nums; }
.xm-count-go { margin-top: 12px; justify-self: start; background: var(--paper); color: var(--night); border-color: var(--paper); }
.xm-count-go:hover { background: var(--gold-2); border-color: var(--gold-2); }
.xm-cue { position: absolute; left: 50%; bottom: 22px; z-index: 8; transform: translateX(-50%); font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--night); text-decoration: none; opacity: calc(1 - var(--p) * 3); }
.xm-cue::after { content: ''; display: block; width: 1px; height: 22px; margin: 8px auto 0; background: currentColor; animation: pf-cue 1.8s cubic-bezier(.6, 0, .3, 1) infinite; transform-origin: top; }

/* ---------- calendar ---------- */
.xm-cal { position: relative; padding: clamp(80px, 10vw, 140px) 0; background: linear-gradient(180deg, var(--frost) 0, #c9d6de 70px, var(--sky) 70px, var(--night) 100%); overflow: hidden; }
.xm-cal .pf-wrap { position: relative; z-index: 5; }
.xm-cal-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 48px; align-items: end; margin-bottom: clamp(36px, 5vw, 60px); }
.xm-cal-title { margin: 0; font-family: var(--serif); font-size: clamp(52px, 8vw, 110px); line-height: .92; letter-spacing: -0.035em; }
.xm-cal-sub { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; padding-bottom: 10px; font-size: 15px; color: #c3c7d8; }
.xm-cal-stars { color: var(--gold-2); font-weight: 600; }
.xm-doors { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(10px, 1.6vw, 20px); perspective: 1400px; }
.xm-door {
  position: relative; display: block; aspect-ratio: 3 / 4; border-radius: 18px; text-decoration: none; color: inherit;
  transform-style: preserve-3d;
}
.js .xm-door { opacity: 0; transform: translateY(26px) scale(.97); transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--d) * 70ms); }
.js .xm-door.is-in { opacity: 1; transform: none; }
.xm-door:nth-child(4n + 1), .xm-door:nth-child(6n + 4) { border-radius: 999px 999px 18px 18px / 46% 46% 18px 18px; }
.xm-door-inside {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px;
  padding: 12% 10% 10%; border-radius: inherit; overflow: hidden; text-align: center;
  background: linear-gradient(180deg, #fbf8f1, var(--paper)); color: var(--ink);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / .06), inset 0 -40px 60px -40px rgb(224 176 82 / .25);
}
.xm-door-art.pf-gm-art { flex: 1; display: grid; place-items: center; width: 100%; min-height: 0; aspect-ratio: auto; margin: 0; border-radius: 0; background: none; overflow: visible; }
.xm-door-art.pf-gm-art svg { width: 82%; max-height: 100%; transform: none; }
.xm-door-name { font-family: var(--serif); font-size: clamp(17px, 1.7vw, 24px); line-height: 1; letter-spacing: -0.01em; }
.xm-door-status { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-light); }
.xm-door.is-solved .xm-door-status { color: var(--green); }
.xm-door.is-star .xm-door-status { color: #b8862a; }
.xm-door.is-star .xm-door-inside::after { content: '★'; position: absolute; right: 10px; top: 8px; font-size: 20px; color: var(--gold); text-shadow: 0 0 12px rgb(243 199 95 / .7); }
.xm-door-front {
  position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border-radius: inherit; transform-origin: left center; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  background:
    radial-gradient(120% 70% at 50% 0%, rgb(255 255 255 / .1), transparent 60%),
    linear-gradient(160deg, #24694f, var(--green) 45%, #143d2e);
  border: 1px solid rgb(224 176 82 / .45);
  box-shadow: inset 0 0 0 5px rgb(10 12 23 / .18), 0 18px 40px -20px rgb(0 0 0 / .8);
  transition: transform 1.1s cubic-bezier(.3, .9, .25, 1), box-shadow .3s;
}
.xm-door-front::before { content: ''; position: absolute; inset: 9px; border-radius: inherit; border: 1px dashed rgb(243 199 95 / .45); }
.xm-door-no { font-family: var(--serif); font-size: clamp(40px, 4.6vw, 66px); line-height: 1; color: var(--gold-2); text-shadow: 0 2px 0 rgb(10 12 23 / .35); }
.xm-door-when { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: rgb(243 241 236 / .75); font-variant-numeric: tabular-nums; }
.xm-door-knob { position: absolute; right: 12%; top: 54%; width: 9px; height: 9px; border-radius: 50%; background: var(--gold-2); box-shadow: 0 0 8px rgb(243 199 95 / .6); }
/* opened: the front swings away on its hinge */
.xm-door.is-open .xm-door-front { transform: rotateY(-108deg); box-shadow: none; }
.xm-door.is-open:hover .xm-door-front { transform: rotateY(-118deg); }
.xm-door.is-open:hover .xm-door-inside { box-shadow: inset 0 0 0 2px var(--gold), inset 0 -40px 60px -40px rgb(224 176 82 / .35); }
.xm-door.is-pending:hover .xm-door-front { transform: rotateY(-18deg); }
.xm-door.is-opening .xm-door-front { transition-duration: 1.4s; }
/* locked: frosted shut */
.xm-door.is-locked { cursor: not-allowed; }
.xm-door.is-locked .xm-door-front {
  background:
    radial-gradient(80% 60% at 30% 20%, rgb(255 255 255 / .16), transparent 70%),
    linear-gradient(160deg, #26304f, #161d38 60%, #10162d);
  border-color: rgb(223 233 239 / .22);
}
.xm-door.is-locked .xm-door-front::before { border-color: rgb(223 233 239 / .18); }
.xm-door.is-locked .xm-door-no { color: rgb(223 233 239 / .55); text-shadow: none; }
.xm-door.is-locked .xm-door-knob { background: #5a6283; box-shadow: none; }
.xm-door.is-locked .xm-door-inside { visibility: hidden; }
.xm-door.is-shake .xm-door-front { animation: xm-rattle .45s; }
@keyframes xm-rattle { 20%, 60% { transform: rotateY(-6deg); } 40%, 80% { transform: rotateY(3deg); } }
/* today's door glows */
.xm-door.is-today { z-index: 1; }
.xm-door.is-today::before {
  content: ''; position: absolute; inset: -6px; border-radius: inherit; z-index: -1;
  background: radial-gradient(closest-side, rgb(243 199 95 / .5), transparent); filter: blur(8px);
  animation: xm-halo 2.6s ease-in-out infinite alternate;
}
@keyframes xm-halo { from { opacity: .5; } to { opacity: 1; } }
.xm-door.is-today .xm-door-inside { box-shadow: inset 0 0 0 2px var(--gold), inset 0 -40px 60px -40px rgb(224 176 82 / .4); }

/* ---------- how it works ---------- */
.xm-how { padding: clamp(80px, 10vw, 130px) 0; }
.xm-how-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.xm-how-grid > div { padding-top: 18px; border-top: 1px solid var(--ink); }
.xm-how-no { font-family: var(--serif); font-size: 44px; line-height: 1; color: var(--green); }
.xm-how-grid h3 { margin: 12px 0 8px; font-family: var(--serif); font-size: 32px; line-height: 1.05; letter-spacing: -0.02em; }
.xm-how-grid p:not(.xm-how-no) { font-size: 16px; line-height: 1.55; color: var(--muted-light); }
.xm-how-more { margin-top: 44px; }
.xm-how .pf-pill { color: var(--ink); background: #fff; }

/* ---------- door pages ---------- */
.xm-strip {
  position: relative; overflow: hidden; padding: 128px var(--gutter) 64px; text-align: center;
  background: radial-gradient(120% 120% at 50% 0%, #1d2a52 0%, var(--sky) 55%, var(--night) 100%);
}
.xm-strip::after { content: ''; position: absolute; left: -5%; right: -5%; bottom: -1px; height: 38px; background: var(--paper); border-radius: 50% 50% 0 0 / 100% 100% 0 0; }
.xm-strip .xm-lights { top: 60px; }
.xm-strip-copy { position: relative; z-index: 5; max-width: 620px; margin: 0 auto; }
.xm-back { display: inline-flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--mint); text-decoration: none; }
.xm-back::before { content: '←'; letter-spacing: 0; }
.xm-back:hover { color: var(--paper); }
.xm-strip-day { margin-top: 18px; font-size: 13px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-2); }
.xm-strip h1 { margin: 6px 0 12px; font-family: var(--serif); font-size: clamp(56px, 10vw, 96px); line-height: .9; letter-spacing: -0.04em; }
.xm-strip-line { font-size: 17px; line-height: 1.5; color: #c3c7d8; text-wrap: balance; }
.xm-game { padding-top: 24px; min-height: 0; }
.xm-game .gm-bar { margin-top: 8px; }
.xm-door-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--paper-line); font-size: 14.5px; font-weight: 500; }
.xm-door-nav a { color: var(--ink); text-decoration: none; }
.xm-door-nav a:hover { color: var(--green); }
.xm-locked { background: var(--paper); color: var(--ink); color-scheme: light; padding: 40px var(--gutter) 96px; text-align: center; }
.xm-locked .xm-door-nav { max-width: 540px; margin: 48px auto 0; }
.xm-locked-door {
  display: grid; place-items: center; width: 150px; aspect-ratio: 3 / 4; margin: 0 auto 26px; border-radius: 999px 999px 18px 18px / 46% 46% 18px 18px;
  background: radial-gradient(80% 60% at 30% 20%, rgb(255 255 255 / .16), transparent 70%), linear-gradient(160deg, #26304f, #10162d);
  box-shadow: 0 30px 60px -30px rgb(10 12 23 / .6);
}
.xm-locked-door span { font-family: var(--serif); font-size: 64px; color: rgb(223 233 239 / .6); }
.xm-locked-when { font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-light); }
.xm-locked-time { margin-top: 8px; font-family: var(--serif); font-size: clamp(48px, 9vw, 80px); line-height: 1; font-variant-numeric: tabular-nums; }

/* ---------- Christmas skins on the game boards ---------- */
.gm-gift-box { fill: var(--green); }
.gm-gift-ribbon { fill: none; stroke: var(--gold-2); stroke-width: .05; }
.gm-gift-bow { fill: none; stroke: var(--gold-2); stroke-width: .045; stroke-linejoin: round; }
.is-xmas .gm-bi-aid-ring { fill: #fff; stroke: var(--gold); }
.is-xmas .gm-bi-aid.is-got .gm-bi-aid-ring { fill: #fbe9b5; stroke: var(--gold); }
.is-xmas .gm-bi-trail { stroke: var(--gold); }
.is-xmas .gm-bi-dot { fill: var(--night); stroke: var(--gold-2); }
.gm-orn-ball { fill: #3a3f5c; stroke: rgb(243 241 236 / .35); stroke-width: .02; transition: fill .2s; }
.gm-orn-cap { fill: #c9ced6; }
.gm-orn-shine { fill: none; stroke: rgb(255 255 255 / .55); stroke-width: .03; stroke-linecap: round; }
.gm-hl-mark.is-lit .gm-orn-ball { fill: var(--gold-2); }
.is-xmas .gm-hl-mark.is-lit path { fill: none; }
.is-xmas .gm-hl-mark.is-lit .gm-orn-cap { fill: #fff6df; }
.is-xmas .gm-hl-tree path { fill: #2c6a51; }
.is-xmas .gm-sb-ground { fill: #e7edf1; }
.is-xmas .gm-sb-cell.is-lit .gm-sb-trail { stroke: #1d3a30; }
.is-xmas .gm-sb-knot { fill: #b9c0cc; }
.is-xmas .gm-sb-cell.is-lit .gm-sb-knot.b0 { fill: var(--gold-2); filter: drop-shadow(0 0 .08px var(--gold-2)); }
.is-xmas .gm-sb-cell.is-lit .gm-sb-knot.b1 { fill: var(--mint); filter: drop-shadow(0 0 .08px var(--mint)); }
.is-xmas .gm-sb-cell.is-lit .gm-sb-knot.b2 { fill: #fff6df; filter: drop-shadow(0 0 .08px #fff6df); }
.is-xmas .gm-sb-cell.is-lit .gm-sb-knot.b3 { fill: #f2b8a8; filter: drop-shadow(0 0 .08px #f2b8a8); }
.is-xmas .gm-sb-summit.is-lit .gm-sb-flag { fill: var(--gold); }
.is-xmas .gm-dr { --c0: #1f5c45; --c1: #e0b052; --c2: #c9d6de; --c3: #8e3b46; --c4: #2c3e66; --c5: #7cc3a2; }
.is-xmas .gm-dr-swatch .c0 { background: #1f5c45; } .is-xmas .gm-dr-swatch .c1 { background: #e0b052; } .is-xmas .gm-dr-swatch .c2 { background: #c9d6de; }
.is-xmas .gm-dr-swatch .c3 { background: #8e3b46; } .is-xmas .gm-dr-swatch .c4 { background: #2c3e66; } .is-xmas .gm-dr-swatch .c5 { background: #7cc3a2; }
.gm-dr-flag .gm-star { fill: var(--gold); stroke: none; }
.is-xmas .gm-ba-piece.c0 .gm-ba-body { fill: #2b5f49; }
.is-xmas .gm-ba-piece.c1 .gm-ba-body { fill: #d9a943; }
.is-xmas .gm-ba-piece.c2 .gm-ba-body { fill: #e3d8c4; }
.is-xmas .gm-ba-piece.c3 .gm-ba-body { fill: #34497a; }
.gm-ba-ribbon { fill: none; stroke: rgb(255 255 255 / .85); stroke-width: .09; pointer-events: none; }
.gm-ba-bow { fill: none; stroke: #fff; stroke-width: .07; stroke-linejoin: round; pointer-events: none; }
.is-xmas .gm-ba-piece.c2 .gm-ba-ribbon, .is-xmas .gm-ba-piece.c2 .gm-ba-bow { stroke: #8e3b46; }
.is-xmas .gm-ba-piece.is-you .gm-ba-body { fill: var(--night); stroke: var(--gold-2); }
.is-xmas .gm-ba-tape-b { fill: var(--gold); }
.is-xmas .gm-hu-floor { fill: #ece3d1; }
.is-xmas .gm-hu-mark { fill: rgb(224 176 82 / .2); stroke: var(--gold); }
.is-xmas .gm-hu-hurdle.is-set .gm-gift-box { fill: #2b7a5b; }

/* ---------- signed in: the "Viewing as" bar ---------- */
.xm-admin {
  position: fixed; left: 50%; bottom: 16px; z-index: 60; transform: translateX(-50%);
  display: flex; align-items: center; gap: 14px; width: min(calc(100% - 24px), 880px); padding: 10px 10px 10px 18px; border-radius: 20px;
  background: rgb(10 12 23 / .86); border: 1px solid rgb(224 176 82 / .4); color: var(--paper);
  backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); box-shadow: 0 20px 50px -20px rgb(0 0 0 / .7);
}
.xm-admin.is-busy { opacity: .7; }
.xm-admin-label { flex-shrink: 0; display: flex; flex-direction: column; gap: 1px; font-size: 13px; font-weight: 600; color: var(--gold-2); white-space: nowrap; }
.xm-admin-label span { font-size: 11px; font-weight: 500; color: #9a9cb0; }
.xm-admin-days { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent); }
.xm-admin-days::-webkit-scrollbar { display: none; }
.xm-admin-days button {
  flex-shrink: 0; min-width: 36px; height: 34px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--night-line);
  background: var(--night-2); color: var(--paper); font: 500 13px var(--sans); font-variant-numeric: tabular-nums; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.xm-admin-days button:hover:not(:disabled) { border-color: var(--gold); }
.xm-admin-days button.is-on { background: var(--gold-2); border-color: var(--gold-2); color: var(--night); }
.xm-admin-days button:disabled { cursor: default; }
.has-admin .pf-foot-only { padding-bottom: 80px; }

/* a door that hasn't reached this visitor's midnight */
.gm-board.xm-shut { padding: 28px 0 8px; text-align: center; }

/* ---------- smaller screens ---------- */
@media (max-width: 1000px) {
  .xm-doors { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .xm-how-grid { grid-template-columns: minmax(0, 1fr); }
  .xm-cal-head { grid-template-columns: minmax(0, 1fr); }
  .xm-cal-sub { align-items: flex-start; }
}
@media (max-width: 640px) {
  .xm-doors { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .xm-door { border-radius: 14px; }
  .xm-door-inside { padding: 10% 6% 8%; }
  .xm-door-status { font-size: 9.5px; letter-spacing: .03em; }
  .xm-door-when { font-size: 9.5px; letter-spacing: .06em; }
  .xm-door-front::before { inset: 6px; }
  .xm-lights { top: 58px; }
  .xm-hero-copy { padding-top: 132px; padding-bottom: 30vh; }
  .xm-moon { right: 8%; top: 13%; }
  .xm-count { padding: 14px 16px 16px; }
  .xm-strip { padding-top: 112px; }
  .xm-admin { gap: 10px; padding: 8px 8px 8px 12px; bottom: 10px; }
  .xm-admin-label span { display: none; }
}

/* ---------- reduced motion: no drifting, parallax or swinging ---------- */
@media (prefers-reduced-motion: reduce) {
  .xm-sky, .xm-aurora, .is-all .xm-bulb.is-on ellipse, .xm-door.is-today::before, .xm-cue::after { animation: none; }
  .js .xm-door { opacity: 1; transform: none; transition: none; }
  .xm-door-front, .xm-window, .xm-bulb ellipse { transition: none; }
}
