/* KGHL Countdown to Christmas. Loaded inside the calendar's shadow root, so theme CSS can't reach it and it can't leak out.
   Layout: a North Pole night — aurora and moon above, a lit village along the bottom, garland and lights on top, 5×5 grid of wrapped-present doors in date order under it, a prize card that opens over everything. Single dark world by choice. */
:host {
  all: initial; display: block; contain: layout style;
  --night: #0b1530;
  --night-2: #13224a;
  --ink: #f6f1e4;
  --muted: #a9b4d0;
  --gold: #f6c56a;
  --berry: #9b1c1f;
  --pine: #1f6b4f;
  --frost: #dfe8ff;
  --panel: #fdf9ef;
  --panel-ink: #1b2236;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
.kc-root {
  position: relative; overflow: hidden; overflow: clip; isolation: isolate; min-height: 640px;
  background: radial-gradient(120% 60% at 50% 0%, var(--night-2) 0%, var(--night) 60%), var(--night);
  -webkit-font-smoothing: antialiased;
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  text-align: left;
}
.kc-root[hidden] { display: none; }
button, input { font-family: inherit; }
img { max-width: 100%; }
a { color: inherit; }
/* Snow canvas sticks to the viewport while the calendar scrolls, so it never has to be page-tall */
.snow { position: sticky; top: 0; display: block; width: 100%; height: 100vh; margin-bottom: -100vh; pointer-events: none; z-index: 1; }

/* ---------- Light strand ---------- */
.strand { position: relative; z-index: 3; height: 64px; overflow: hidden; }
.strand svg { position: absolute; left: 0; top: 0; width: 100%; height: 64px; }
.bulbs { position: absolute; inset: 0; display: flex; justify-content: space-around; padding-inline: max(8px, env(safe-area-inset-left, 0px)); }
.bulb {
  width: 14px; height: 22px; border-radius: 50% 50% 46% 46% / 60% 60% 40% 40%;
  margin-top: var(--y, 14px); position: relative;
  background: var(--c); box-shadow: 0 0 14px 4px var(--c);
  animation: twinkle 2.4s ease-in-out infinite; animation-delay: var(--d, 0s);
}
.bulb::before { content: ""; position: absolute; left: 3px; top: -6px; width: 8px; height: 7px; border-radius: 2px; background: #2c3550; }
@keyframes twinkle { 0%,100% { opacity: 1; filter: brightness(1.15); } 50% { opacity: .35; box-shadow: 0 0 4px 1px var(--c); filter: brightness(.7); } }

/* ---------- Header ---------- */
.wrap {
  position: relative; z-index: 2; max-width: 880px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 8px clamp(190px, 26vw, 320px);
}
header { text-align: center; display: grid; gap: 6px; justify-items: center; }
.plaque {
  position: relative; background: var(--panel); border-radius: 14px; padding: 12px 18px 10px;
  width: min(300px, 72vw); box-shadow: 0 10px 30px rgba(0,0,0,.45), 0 0 0 3px var(--gold), 0 0 0 7px var(--berry);
  transform: rotate(-1.5deg); margin: 6px 0 14px;
}
.plaque img { display: block; width: 100%; height: auto; }
.logo-wrap { position: relative; display: block; }
.santa-hat { position: absolute; left: 47.5%; top: -12%; width: 11%; transform: rotate(18deg); filter: drop-shadow(0 1px 1px rgba(0,0,0,.3)); }
.plaque::before { content: ""; position: absolute; left: -10px; right: -10px; top: -8px; height: 14px; border-radius: 10px;
  background: radial-gradient(circle at 10% 30%, #fff 0 4px, transparent 5px), radial-gradient(circle at 35% 50%, #fff 0 5px, transparent 6px),
  radial-gradient(circle at 60% 25%, #fff 0 4px, transparent 5px), radial-gradient(circle at 85% 45%, #fff 0 5px, transparent 6px), #f4f7ff;
  box-shadow: 0 2px 4px rgba(0,0,0,.25); }
.station {
  font-weight: 700; font-size: .78rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold);
  display: inline-flex; gap: 10px; align-items: center;
}
.station span { display: inline-block; width: 28px; height: 1px; background: currentColor; opacity: .6; }
h1 {
  font-family: var(--display); font-weight: 800; margin: 0; line-height: .95;
  font-size: clamp(2.3rem, 8vw, 4.4rem); text-wrap: balance; letter-spacing: -.01em;
  text-shadow: 0 2px 30px rgba(242,193,78,.25);
}
h1 em { font-style: italic; font-weight: 600; color: var(--gold); }
.intro { position: relative; z-index: 3; max-width: 64ch; margin: 16px auto 0; padding: 16px 20px; border-radius: 14px; background: rgba(11,21,48,.72); backdrop-filter: blur(4px); display: grid; gap: 10px; font-size: clamp(1rem, 2.2vw, 1.12rem); line-height: 1.6; color: var(--frost); text-wrap: pretty; text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.intro p { margin: 0; }
.intro .missed {
  justify-self: center; display: inline-flex; align-items: center; gap: 8px; margin-top: 4px;
  font-size: .95em; font-weight: 600; color: var(--ink); background: rgba(155,28,31,.55);
  border: 1px solid rgba(246,197,106,.45); border-radius: 99px; padding: 6px 16px; text-shadow: none;
}
.intro .missed::before { content: "🔒"; font-size: .9em; }
/* Countdown clock: peppermint-stick seven-segment digits in snow-capped evergreen frames */
.clock { display: flex; align-items: center; justify-content: center; gap: clamp(10px, 2.4vw, 20px); margin: 18px auto 6px; }
.clock .unit {
  position: relative; display: grid; justify-items: center; gap: 6px; padding: 16px clamp(8px, 1.6vw, 14px) 8px;
  background: linear-gradient(180deg, #1f5a3c, #113a27); border: 2px solid var(--gold); border-radius: 14px;
  box-shadow: 0 10px 26px rgba(0,0,0,.45), inset 0 0 0 4px rgba(0,0,0,.18);
}
.clock .unit::before { /* snow cap */
  content: ""; position: absolute; left: -6px; right: -6px; top: -9px; height: 16px; border-radius: 10px;
  background: radial-gradient(circle at 15% 30%, #fff 0 5px, transparent 6px), radial-gradient(circle at 45% 55%, #fff 0 6px, transparent 7px),
    radial-gradient(circle at 78% 35%, #fff 0 5px, transparent 6px), #f4f7ff;
  box-shadow: 0 2px 4px rgba(0,0,0,.3);
}
.clock .unit > span { font-size: clamp(.6rem, 1.4vw, .78rem); font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.clock .digits { display: flex; gap: clamp(3px, .8vw, 6px); }
.clock .digits svg { width: clamp(26px, 5.4vw, 54px); height: auto; display: block; filter: drop-shadow(0 2px 2px rgba(0,0,0,.45)); }
/* Peppermint fills are set as SVG attributes so the url(#id) resolves inside the shadow root */
.clock .seg:not(.on) { fill: rgba(255,255,255,.07); }
.clock .gl { pointer-events: none; }
.until { margin: 6px 0 0; font-family: var(--display); font-style: italic; font-weight: 700; font-size: clamp(1.25rem, 3.4vw, 1.9rem); line-height: 1.2; color: var(--gold); text-shadow: 0 2px 12px rgba(0,0,0,.5); }
.until[hidden] { display: none; }
.presented {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 10px; padding: 8px 14px 8px 16px;
  background: var(--panel); border-radius: 12px; text-decoration: none;
  box-shadow: 0 8px 24px rgba(0,0,0,.4), 0 0 0 2px rgba(246,197,106,.6); transition: transform .2s, box-shadow .2s;
}
.presented span { font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--berry); white-space: nowrap; }
.presented img { display: block; width: clamp(110px, 18vw, 150px); height: auto; }
.presented:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,.45), 0 0 0 2px var(--gold); }
.presented:focus-visible { outline: 3px solid var(--frost); outline-offset: 3px; }
.countdown { color: var(--frost); font-size: clamp(1.2rem, 3.2vw, 1.65rem); font-weight: 600; line-height: 1.35; margin: 10px 0 0; text-wrap: balance; text-shadow: 0 2px 12px rgba(0,0,0,.5); }
.countdown b { color: var(--gold); font-family: var(--display); font-weight: 800; font-size: 1.35em; font-variant-numeric: tabular-nums; }

/* ---------- Doors ---------- */
.grid {
  margin-top: 28px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(8px, 2vw, 16px);
  perspective: 1200px;
}
.cell { position: relative; aspect-ratio: 4 / 5; max-width: 100%; }
.inside {
  position: absolute; inset: 0; border-radius: 10px; overflow: hidden; border: 0; font: inherit; cursor: pointer;
  background: radial-gradient(circle at 50% 35%, #fffaf0 0%, #fbe9bf 65%, #efcf86 100%);
  display: grid; place-items: center; text-align: center; color: var(--panel-ink);
  box-shadow: inset 0 0 0 3px rgba(0,0,0,.15), inset 0 6px 16px rgba(0,0,0,.25);
  padding: 6px;
}
.inside > div { display: grid; gap: 6px; justify-items: center; width: 100%; }
.inside .logo { width: 82%; }
.inside:focus-visible { outline: 3px solid var(--frost); outline-offset: 3px; }
.inside::after { /* opened stamp */
  content: "✓ Opened"; position: absolute; top: 6%; left: 50%; transform: translateX(-50%) rotate(-3deg);
  background: var(--pine); color: #fff; font-size: clamp(.5rem, 1.4vw, .68rem); font-weight: 700; letter-spacing: .06em;
  padding: 2px 7px; border-radius: 99px; white-space: nowrap; opacity: 0; transition: opacity .3s .6s;
}
.inside.shown::after { opacity: 1; }
.inside.done::after { content: var(--done); background: var(--berry); }
.cell.split .inside::after { content: "✓"; padding: 1px 6px; }
.cell.split .inside.done::after { content: "✓"; }
.inside .kind { font-size: clamp(.55rem, 1.6vw, .7rem); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-top: 4px; }
.door {
  position: absolute; inset: 0; border: 0; padding: 0; cursor: pointer; border-radius: 10px;
  background: var(--dc); color: var(--ink); font: inherit;
  transform-origin: left center; transform-style: preserve-3d;
  transition: transform .9s cubic-bezier(.2,.8,.2,1), box-shadow .3s;
  box-shadow: 0 6px 18px rgba(0,0,0,.35), inset 0 0 0 2px rgba(255,255,255,.08);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7%; overflow: hidden;
  padding-top: 14%;
  /* wrapping paper: soft diagonal stripes over the base color */
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.07) 0 6px, transparent 6px 16px);
}
.door::before, .door::after { /* ribbon cross */
  content: ""; position: absolute; background: var(--rib); box-shadow: 0 0 0 1px rgba(0,0,0,.08);
}
.door::before { left: 50%; top: 0; bottom: 0; width: 12%; transform: translateX(-50%); }
.door::after { left: 0; right: 0; top: 42%; height: 10%; }
.bow { position: absolute; top: -1%; left: 50%; width: 60%; transform: translateX(-50%); z-index: 2; color: var(--rib); filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)); }
.bow svg { display: block; width: 100%; height: auto; overflow: visible; }
.cell > .bow { top: -7%; width: 58%; }
.sash {
  position: absolute; z-index: 3; top: 12%; right: -18%; width: 80%; transform: rotate(45deg);
  text-align: center; font: 800 clamp(.42rem, 1.2vw, .64rem)/1.9 var(--body); letter-spacing: .14em; text-transform: uppercase;
  box-shadow: 0 2px 5px rgba(0,0,0,.4); pointer-events: none;
}
.sash.left { right: auto; left: -18%; transform: rotate(-45deg); }
.sash.s-coupon { background: #fbf6ea; color: var(--pine); border-block: 1.5px dashed var(--pine); }
.sash.s-contest { background: var(--gold); color: #6b1215; }
.door.half .sash { top: 6%; right: -30%; width: 110%; font-size: clamp(.36rem, .95vw, .52rem); letter-spacing: .08em; }
.door.half .sash.left { right: auto; left: -30%; }
.zoom .big .sash { font-size: .9rem; }
.door .logo { position: relative; z-index: 1; width: 70%; filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
.logo svg { display: block; width: 100%; height: auto; }
.num { /* hanging gift tag: string, punched hole, notched top, each at its own angle */
  position: relative; z-index: 0; margin-top: 8%;
  font-family: var(--display); font-weight: 800; font-size: clamp(.95rem, 3.4vw, 1.7rem); line-height: 1;
  transform-origin: 50% -1.1em; transform: rotate(var(--tilt, -4deg));
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.4));
}
.num .string {
  position: absolute; left: 50%; bottom: calc(100% - .55em); width: 2px; height: 1.6em; margin-left: -1px;
  background: linear-gradient(var(--rib), #efe6d2); border-radius: 1px;
}
.num .tag {
  display: block; position: relative; padding: .62em .5em .24em; min-width: 1.9em; text-align: center;
  font-variant-numeric: tabular-nums; color: var(--tagink, #9b1c1f);
  background:
    radial-gradient(circle at 50% .36em, #2b1d10 0 .1em, #b8955a .11em .17em, transparent .18em),
    linear-gradient(170deg, var(--tagbg, #f3e3bf), color-mix(in srgb, var(--tagbg, #f3e3bf) 82%, #8a6a35));
  clip-path: polygon(24% 0, 76% 0, 100% 20%, 100% 100%, 0 100%, 0 20%);
  outline: 1px dashed color-mix(in srgb, var(--tagink, #9b1c1f) 40%, transparent); outline-offset: -.18em;
}
.door:hover .num { animation: swing 1.4s ease-in-out; }
@keyframes swing {
  0%, 100% { transform: rotate(var(--tilt, -4deg)); }
  25% { transform: rotate(calc(var(--tilt, -4deg) + 9deg)); }
  55% { transform: rotate(calc(var(--tilt, -4deg) - 6deg)); }
  80% { transform: rotate(calc(var(--tilt, -4deg) + 2deg)); }
}
.door:hover, .door:focus-visible { box-shadow: 0 10px 26px rgba(0,0,0,.45), 0 0 0 2px var(--gold); }
.door:focus-visible { outline: 3px solid var(--frost); outline-offset: 3px; }
.door.is-open {
  transform: rotateY(-100deg); opacity: 0; visibility: hidden; pointer-events: none;
  transition: transform .8s cubic-bezier(.2,.8,.2,1), opacity .35s ease .5s, visibility 0s linear .9s;
}
.door.is-open > *, .door.is-open::before, .door.is-open::after { opacity: 0; transition: opacity .3s .3s; }
.door.locked { cursor: not-allowed; filter: saturate(.2) brightness(.42); }
.door.ended { cursor: not-allowed; filter: saturate(.2) brightness(.42); }
.cell.inactive > .bow, .cell.inactive > .num { filter: saturate(.2) brightness(.42); }
.cell.inactive .inside.shown { filter: saturate(.6) brightness(.8); }
.door.locked .lock { filter: brightness(2.2); }
.door .lock { position: relative; z-index: 1; margin-top: -2%; text-shadow: 0 1px 2px rgba(0,0,0,.6); font-size: clamp(.55rem, 1.5vw, .72rem); color: var(--frost); letter-spacing: .06em; font-weight: 600; }
.cell.today .door { animation: glow 1.8s ease-in-out infinite; }
.door .lock:empty { display: none; }

/* Split days: two half doors that open outward like a cabinet */
.cell.split .inside { right: 50%; border-radius: 10px 0 0 10px; }
.cell.split .inside.r { left: 50%; right: 0; border-radius: 0 10px 10px 0; }
.cell.split .inside .logo { width: 92%; }
.door.half { right: 50%; border-radius: 10px 0 0 10px; padding-top: 30%; gap: 4%; justify-content: flex-start; }
.door.half.r { left: 50%; right: 0; border-radius: 0 10px 10px 0; transform-origin: right center; }
.door.half.r.is-open { transform: rotateY(100deg); }
.door.half::before { left: auto; right: 0; width: 12%; transform: none; }
.door.half.r::before { left: 0; right: auto; }
.door.half .logo { width: 88%; }
.door.half .lock { margin-top: 0; }
.slot {
  position: relative; z-index: 1; font-size: clamp(.45rem, 1.3vw, .66rem); font-weight: 700; letter-spacing: .02em;
  background: rgba(11,21,48,.72); color: var(--frost); padding: 1px 5px; border-radius: 99px; white-space: nowrap;
}
.cell > .bow, .cell > .num { pointer-events: none; z-index: 3; transition: opacity .3s; }
/* split days: the shared tag hangs low, below both halves' logo and hours */
.cell > .num { position: absolute; left: 50%; bottom: 2%; margin: 0 0 0 -1.05em; font-size: clamp(.85rem, 2.8vw, 1.35rem); }
.cell > .num .string { height: 1.1em; }
.cell.any-open > .bow, .cell.any-open > .num { opacity: 0; }
.cell.today::after {
  content: "Today"; position: absolute; left: 50%; top: -9px; transform: translateX(-50%); z-index: 4;
  background: var(--berry); color: #fff; font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 99px; box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
@keyframes glow { 0%,100% { box-shadow: 0 6px 18px rgba(0,0,0,.35), 0 0 0 2px var(--gold), 0 0 18px 2px rgba(242,193,78,.35); } 50% { box-shadow: 0 6px 18px rgba(0,0,0,.35), 0 0 0 2px var(--gold), 0 0 34px 8px rgba(242,193,78,.6); } }
.shake { animation: shake .45s; }
@keyframes shake { 20%,60% { transform: translateX(-4px); } 40%,80% { transform: translateX(4px); } }

.legend { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: center; color: var(--muted); font-size: .85rem; }
.legend .split-key { display: inline-block; width: 14px; height: 10px; margin-right: 6px; vertical-align: -1px; border-radius: 3px; background: linear-gradient(90deg, var(--berry) 0 46%, transparent 46% 54%, var(--pine) 54%); }
.legend .sash-key { display: inline-block; font: 800 .62rem/1.7 var(--body); letter-spacing: .12em; text-transform: uppercase; padding: 0 8px; margin-right: 6px; border-radius: 3px; }
.legend .sash-key.s-coupon { background: #fbf6ea; color: var(--pine); border: 1.5px dashed var(--pine); }
.legend .sash-key.s-contest { background: var(--gold); color: #6b1215; }
.rules-link { margin: 18px 0 0; text-align: center; font-size: .85rem; }
.rules-link a { color: var(--frost); text-decoration: underline; text-underline-offset: 3px; }
.rules-link a:hover, .rules-link a:focus-visible { color: var(--gold); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* ---------- Mountains ---------- */
/* ---------- North Pole scene ---------- */
.aurora { position: absolute; left: -20%; right: -20%; top: -120px; height: 620px; z-index: 0; pointer-events: none; opacity: .32; filter: blur(38px); }
.aurora span { position: absolute; inset: 0; border-radius: 50%; animation: drift 22s ease-in-out infinite alternate; }
.aurora span:nth-child(1) { background: linear-gradient(100deg, transparent 10%, #2ee59d 30%, #20c9c0 45%, transparent 60%); transform: skewY(-6deg); }
.aurora span:nth-child(2) { background: linear-gradient(80deg, transparent 35%, #7d5cff 55%, #2ee59d 70%, transparent 85%); top: 12%; animation-duration: 30s; animation-delay: -8s; opacity: .8; }
@keyframes drift { from { transform: translateX(-6%) skewY(-6deg) scaleY(.9); } to { transform: translateX(6%) skewY(4deg) scaleY(1.15); } }
.moon {
  position: absolute; z-index: 0; pointer-events: none; top: 86px; right: max(5vw, 16px); width: clamp(52px, 8vw, 92px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 38% 36%, #fffdf3, #f4ecd0 55%, #d9cfae 100%);
  box-shadow: 0 0 40px 10px rgba(255,248,220,.25), 0 0 120px 40px rgba(255,248,220,.08);
}
.moon::after { content: ""; position: absolute; width: 18%; aspect-ratio: 1; border-radius: 50%; left: 52%; top: 50%; background: rgba(170,160,130,.35); box-shadow: -18px -14px 0 -2px rgba(170,160,130,.25); }
.village { position: absolute; left: 0; right: 0; bottom: 0; height: max(clamp(150px, 24vh, 280px), 10.5vw); z-index: 0; pointer-events: none; }
.village svg { width: 100%; height: 100%; display: block; }
.win { animation: flicker var(--t, 4s) ease-in-out infinite; animation-delay: var(--d, 0s); }
.win.blink { animation: lightsout var(--t, 9s) steps(1) infinite; animation-delay: var(--d, 0s); }
@keyframes flicker { 0%,100% { opacity: 1; } 40% { opacity: .78; } 55% { opacity: .95; } 70% { opacity: .7; } }
@keyframes lightsout { 0%,62% { opacity: 1; } 63%,85% { opacity: .12; } 86% { opacity: 1; } }
.rl { animation: chase 1.6s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes chase { 0%,100% { opacity: 1; } 50% { opacity: .2; } }
.smoke { animation: puff 5s ease-out infinite; animation-delay: var(--d, 0s); transform-box: fill-box; transform-origin: center; }
@keyframes puff { 0% { transform: translate(0,0) scale(.5); opacity: 0; } 15% { opacity: .5; } 100% { transform: translate(18px,-60px) scale(2.2); opacity: 0; } }
.holly { position: absolute; width: 64px; left: -22px; top: -26px; z-index: 2; transform: rotate(-14deg); filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)); }
.holly.r { left: auto; right: -22px; top: auto; bottom: -22px; transform: rotate(160deg); }

/* ---------- Prize card ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 2147483000; background: rgba(5,10,25,.72); backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 16px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.overlay[hidden], [hidden] { display: none !important; }
.card {
  width: min(460px, 100%); max-height: calc(100vh - 32px); overflow-y: auto;
  background: var(--panel); color: var(--panel-ink); border-radius: 18px; position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
  animation: pop .5s cubic-bezier(.2,1.3,.4,1);
}
@keyframes pop { from { transform: scale(.8) translateY(20px); opacity: 0; } }
.card-top {
  background: linear-gradient(135deg, var(--berry), #8f1f2b); color: #fff; padding: 22px 24px 20px; border-radius: 18px 18px 0 0; position: relative;
}
.card-top .client-logo { width: 120px; margin-bottom: 12px; background: #fff; border-radius: 10px; padding: 4px; }
.card-top .day { font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 700; opacity: .85; }
.card-top h2 { font-family: var(--display); font-weight: 800; font-size: 1.7rem; line-height: 1.1; margin: 4px 0 2px; text-wrap: balance; }
.card-top .from { font-size: .95rem; opacity: .92; }
.close {
  position: absolute; right: 12px; top: 12px; width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.18); color: #fff; font-size: 1.2rem; line-height: 1;
}
.close:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.card-body { padding: 20px 24px 24px; display: grid; gap: 14px; }
.card-body p { margin: 0; }

.coupon {
  border: 2px dashed var(--pine); border-radius: 12px; padding: 16px; text-align: center; background: #eef6f1; display: grid; gap: 6px;
}
.coupon .offer { font-family: var(--display); font-size: 1.35rem; font-weight: 800; color: var(--pine); }
.coupon code { font-size: 1.15rem; font-weight: 700; letter-spacing: .14em; background: #fff; padding: 6px 12px; border-radius: 8px; justify-self: center; }
.coupon small { color: #4b5568; }

.btn {
  border: 0; border-radius: 10px; padding: 12px 18px; font: 700 1rem var(--body); cursor: pointer;
  background: var(--pine); color: #fff; transition: transform .15s, filter .15s;
}
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.btn.ghost { background: transparent; color: var(--pine); box-shadow: inset 0 0 0 2px var(--pine); }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row .btn { flex: 1 1 140px; }
.note { font-size: .82rem; color: #5a6274; }

form { display: grid; gap: 10px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fields .full { grid-column: 1 / -1; }
label { display: grid; gap: 4px; font-size: .8rem; font-weight: 600; color: #3a4258; min-width: 0; }
input[type=text], input[type=email], input[type=tel] {
  font: 400 1rem var(--body); padding: 10px 12px; border-radius: 9px; border: 1.5px solid #cfd4e0; background: #fff; color: var(--panel-ink); width: 100%;
}
input:focus-visible { outline: none; border-color: var(--pine); box-shadow: 0 0 0 3px rgba(31,107,79,.2); }
.consent { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; font-size: .8rem; color: #4b5568; }
.consent input { margin-top: 3px; accent-color: var(--pine); }
.error { color: var(--berry); font-size: .85rem; font-weight: 600; }
.success { text-align: center; display: grid; gap: 8px; padding: 6px 0; }
.success .big { font-family: var(--display); font-size: 1.5rem; font-weight: 800; color: var(--pine); }
.closed { background: #eef0f5; border-radius: 10px; padding: 12px 14px; font-size: .9rem; color: #3a4258; }

/* Phone close-up: tapping a door first shows a big version of it */
.zoom { width: min(340px, 100%); display: grid; gap: 14px; justify-items: center; text-align: center; animation: pop .45s cubic-bezier(.2,1.3,.4,1); }
.zoom .big { position: relative; width: min(280px, 72vw); aspect-ratio: 4 / 5; perspective: 1200px; }
.zoom .big .door { cursor: default; }
.zoom .big .door .logo { width: 74%; }
.zoom .big .bow { width: 58%; }
.zoom .big .num { font-size: 2.4rem; margin-top: 10%; }
.zoom .big .inside .logo { width: 70%; }
.zoom .big .door.locked .lock, .zoom .big .door .lock { display: none; }
.zoom .big .door.locked, .zoom .big .door.ended { filter: saturate(.45) brightness(.7); }
.zoom-info { display: grid; gap: 4px; color: var(--ink); }
.zoom-info .when { font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.zoom-info h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 1.6rem; line-height: 1.1; text-wrap: balance; }
.zoom-info .from { color: var(--frost); font-size: 1rem; }
.zoom-info .status { margin-top: 6px; color: var(--frost); font-size: .95rem; }
.zoom .actions { display: flex; gap: 10px; width: 100%; }
.zoom .actions .btn { flex: 1; }
.zoom .btn.gold { background: var(--gold); color: var(--night); }
.zoom .btn.ghost { color: var(--frost); box-shadow: inset 0 0 0 2px rgba(223,232,255,.5); }

/* Phones: 3 across, with Christmas Day as a wide grand-prize door across the last row */
@media (max-width: 600px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 12px; }
  .cell.xmas { grid-column: 1 / -1; aspect-ratio: 12 / 5; }
  .door:not(.half) .sash { top: 7%; right: -24%; font-size: .5rem; letter-spacing: .1em; }
  .door:not(.half) .sash.left { right: auto; left: -24%; }
  .cell.xmas .door .sash { top: 14%; right: -8%; width: 30%; }
  .zoom .big .door .sash { top: 12%; right: -18%; font-size: .9rem; }
  .cell.xmas .door { padding-top: 7%; }
  .cell.xmas .door .logo { width: 30%; }
  .cell.xmas .bow { width: 22%; }
  .cell.xmas .num { margin-top: 3%; }
  .cell.xmas .inside .logo { width: 34%; }
  .door .lock { font-size: .58rem; }
  .door:not(.half) { padding-top: 18%; gap: 2%; }
  .bow { width: 54%; }
  .door .logo { width: 80%; }
  .num { margin-top: 10%; font-size: 1.35rem; }
  .cell > .num { font-size: 1.1rem; }
  .door.half .slot { font-size: .6rem; padding: 0 4px; }
  .door.half .lock { display: none; }  /* the hours chip and dimming say it; the close-up spells it out */
  .cell.today::after { font-size: .58rem; padding: 1px 7px; }
}
@media (max-width: 420px) {
  .fields { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .zoom, .bulb, .cell.today .door, .door:hover .num, .win, .rl, .smoke, .aurora span { animation: none; }
  .smoke { display: none; }
  .door { transition-duration: .01s; }
  .card { animation: none; }
}

/* ---------- Plugin additions ---------- */
.logo img { display: block; width: 100%; height: auto; max-height: 100%; object-fit: contain; background: #fff; border-radius: 10px; padding: 4%; box-sizing: border-box; aspect-ratio: 120 / 64; }
.card-top .client-logo img { padding: 2px; border-radius: 6px; aspect-ratio: auto; max-height: 72px; }
.card-top .client-logo { width: auto; max-width: 160px; display: inline-block; }
.card-top .client-logo svg { width: 120px; }
.details { white-space: pre-line; }
.visit { font-weight: 700; color: var(--pine); text-decoration: underline; text-underline-offset: 3px; justify-self: start; }
.loading { display: flex; align-items: center; gap: 10px; color: #4b5568; font-size: .95rem; }
.loading::before { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 3px solid #cfd4e0; border-top-color: var(--pine); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn[disabled] { opacity: .6; cursor: progress; }
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; text-align: center; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.consent a { color: var(--pine); font-weight: 600; }
.ts { min-height: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.empty-note { text-align: center; color: var(--frost); margin-top: 24px; }
/* Calm mode (setting) and reduced motion: no snow, no looping animations */
.kc-root.calm .bulb, .kc-root.calm .cell.today .door, .kc-root.calm .win, .kc-root.calm .rl, .kc-root.calm .aurora span { animation: none; }
.kc-root.calm .smoke { display: none; }

/* Prize photos: a polaroid tucked under the ribbon (wide logos keep the white box above) */
.logo.photo { padding: 0; border-radius: 3px; box-shadow: 0 6px 14px rgba(0,0,0,.5); filter: none; transform: rotate(-4deg); }
.cell:nth-child(even) .logo.photo { transform: rotate(3deg); }
.logo.photo img { aspect-ratio: 1 / 1.17; object-fit: cover; object-position: 50% 72%; padding: 8% 8% 26%; box-sizing: border-box; border-radius: 3px; background: #fffdf6; } /* the padding is the white polaroid border */
.door .logo.photo, .inside .logo.photo { width: 54%; margin-bottom: -16%; }
.door.half .logo.photo, .cell.split .inside .logo.photo { width: 78%; margin-bottom: -6%; }
.zoom .big .door .logo.photo, .zoom .big .inside .logo.photo { width: 60%; }
.door .num { position: relative; z-index: 2; }
.card-top .client-logo.photo { width: 96px; max-width: none; padding: 0; border-radius: 3px; background: none; transform: rotate(-3deg); box-shadow: 0 4px 10px rgba(0,0,0,.35); }
.card-top .client-logo.photo img { width: 100%; max-height: none; aspect-ratio: 1 / 1.17; object-fit: cover; object-position: 50% 72%; padding: 6% 6% 22%; box-sizing: border-box; border-radius: 3px; background: #fffdf6; }
@media (max-width: 600px) {
  .door .logo.photo, .inside .logo.photo { width: 54%; margin-bottom: -18%; }
  .cell.xmas .door .logo.photo, .cell.xmas .inside .logo.photo { width: 20%; margin-bottom: -6%; }
}
