/* Roomza advent calendar. Brand tokens mirror roomza-platform globals.css. */
:root {
  --navy: #102039;
  --paper: #EAF0F7;
  --paper-dim: #C6D3E4;
  --muted: #8E9CC4;
  --accent: #C9A866;
  --accent-light: #E4D09C;
  --accent-deep: #B38E48;
  --accent-ink: #7F6128;
  --paper-warm: #F6F2EB;
  --record-line: #E6DECF;
  --record-chip: #ECE5D8;
  --navy-soft: #4C586A;
  --navy-mute: #59657A;

  /* Scene colours, sampled from the tower photograph */
  --sky-top: #050D33;
  --sky: #06113E;
  --lamp: #FFD597;
  --lamp-hot: #FFF1D2;

  --r-in: 4px;
  --r-card: 18px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.7, 0, .2, 1);

  --tw: min(940px, 100vw);                 /* tower photo width */
  --th: calc(var(--tw) * 7270 / 3072);     /* and height */
  --pk: 1.2;                               /* plaque scale */
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* Phone browsers tint their address bar and toolbars from the root background, so html and body carry
   one colour: the top edge of the page (the sky), or the top of the photo while a day is open. */
html, body { margin: 0; background: var(--bar, var(--sky-top)); color: var(--paper); }
body {
  font-family: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px; line-height: 1.5; min-height: 100vh; overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.portal-open, body.intro { overflow: hidden; }
html.lock { overflow: hidden; }
button { font: inherit; color: inherit; }
.tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.display {
  font-family: "Fraunces", Georgia, serif; font-weight: 650;
  font-variation-settings: "opsz" 144; letter-spacing: -0.028em; line-height: 1.01;
}

/* ── Sky ──────────────────────────────────────────────────────────────── */
.sky { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.sky-grad { position: absolute; inset: 0; background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky) 45%, #07133F 100%); }
.stars { position: absolute; inset: 0; }
.star {
  position: absolute; border-radius: 50%; background: #fff;
  animation: twinkle var(--d, 4s) ease-in-out var(--delay, 0s) infinite;
}
@keyframes twinkle { 0%, 100% { opacity: var(--o, .7); } 50% { opacity: .1; } }

/* brighter stars with a four-point glint, each twinkling at its own pace */
.spark { position: absolute; width: var(--z, 16px); height: var(--z, 16px); margin: calc(var(--z, 16px) / -2) 0 0 calc(var(--z, 16px) / -2);
  background: radial-gradient(circle, #fff 0 9%, rgba(255,255,255,0) 12%), linear-gradient(90deg, transparent 46%, #fff 50%, transparent 54%), linear-gradient(0deg, transparent 46%, #fff 50%, transparent 54%);
  -webkit-mask-image: radial-gradient(circle, #000 0, transparent 70%); mask-image: radial-gradient(circle, #000 0, transparent 70%);
  filter: drop-shadow(0 0 4px rgba(255,244,214,.9));
  animation: sparkle var(--d, 3s) ease-in-out var(--delay, 0s) infinite; }
@keyframes sparkle { 0%, 100% { opacity: .12; transform: scale(.55) rotate(0deg); } 50% { opacity: var(--o, 1); transform: scale(1) rotate(8deg); } }
.shooter {
  position: absolute; top: 0; left: 0; width: 140px; height: 2px; border-radius: 2px; opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.9));
  filter: drop-shadow(0 0 4px rgba(255,255,255,.8));
}
.clouds { /* thin moonlit cloud, drifting */
  position: absolute; left: 0; right: 0; top: 0; height: 82vh; opacity: .5; mix-blend-mode: screen;
  background: url(img/clouds.webp) 0 0 / 3200px 100% repeat-x; animation: drift 260s linear infinite;
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent); mask-image: linear-gradient(180deg, #000 55%, transparent);
}
@keyframes drift { to { background-position-x: -3200px; } }

#snow { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 30; pointer-events: none; }
body.portal-open #snow { z-index: 62; }

/* Film bars for the opening shot */
.bars i { position: fixed; left: 0; right: 0; height: 11vh; background: #000; z-index: 45; transform: scaleY(0); transition: transform 1.1s var(--ease-io); }
.bars i:first-child { top: 0; transform-origin: top; }
.bars i:last-child { bottom: 0; transform-origin: bottom; }
body.intro .bars i, body.intro-pending .bars i { transform: scaleY(1); transition: none; }

/* ── Top bar ──────────────────────────────────────────────────────────── */
.top { position: fixed; top: 0; right: 0; z-index: 48; display: flex; gap: 8px; padding: calc(14px + var(--sat)) 16px 0 0; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1px solid rgba(228,208,156,.3); background: rgba(3,10,36,.6);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: var(--paper-dim); font-size: 13px; font-weight: 500; cursor: pointer;
  transition: color .2s, border-color .2s;
}
.pill[hidden] { display: none; }
.pill:hover { color: var(--paper); border-color: rgba(228,208,156,.55); }
.sound .wave { display: none; }
.sound[aria-pressed="true"] .wave { display: block; }
.sound[aria-pressed="true"] .mute { display: none; }
.sound[aria-pressed="true"] { color: var(--accent-light); }
body.portal-open .top { display: none; }

/* ── The world (the camera moves this) ────────────────────────────────── */
#world { position: relative; z-index: 10; transform-origin: 50% 0; }

.hero { position: relative; z-index: 4; text-align: center; padding: 0 20px 0; max-width: 780px; margin: 0 auto calc(var(--tw) * -0.022); }
/* The headline is on a gift tag that hangs from a navy ribbon running off the top of the page */
.hero h1.tag { --w: clamp(300px, 33vw, 465px); position: relative; width: var(--w); margin: calc(var(--w) * -0.2) auto 0; container-type: inline-size; transform-origin: 50% 0; filter: drop-shadow(0 14px 22px rgba(2,6,26,.55)); }
.hero h1.tag img { display: block; width: 100%; height: auto; }
/* The lettering: stamped in gold foil, the same gold as the tag's border. Soft, no moving glare. */
.tag-copy { position: absolute; left: var(--tl, 10%); right: var(--tr, 10%); top: var(--tt, 60%); bottom: var(--tb, 8%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; }
.foil {
  color: #A98330;
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 .92  0 0 0 0 .6  0 0 0 .3 -.08'/></filter><rect width='220' height='220' filter='url(%23n)'/></svg>"),
    linear-gradient(176deg, #94701F 0%, #BF9B46 22%, #DCC074 40%, #B48E3A 60%, #9C7825 78%, #C4A04E 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 .6px 0 rgba(255,255,255,.7)) drop-shadow(0 -.5px .2px rgba(86,58,8,.5));
}
/* Small spaced capitals over a generous Garamond italic, the year between fine rules */
.tag-copy .t1, .tag-copy .t2 { display: block; white-space: nowrap; font-family: "Cormorant Garamond", "Fraunces", Georgia, serif; font-kerning: normal; font-feature-settings: "kern", "liga"; line-height: 1; padding: 0 .08em; }
.tag-copy .t1 { font-size: 4.5cqw; font-weight: 600; letter-spacing: .32em; margin-right: -.32em; text-transform: uppercase; }
.tag-copy .t2 { font-size: 12.6cqw; font-style: italic; font-weight: 600; letter-spacing: -.012em; margin-top: .5cqw; padding-bottom: .12em; }
.tag-copy .yr { display: flex; align-items: center; gap: 2.4cqw; margin-top: .6cqw; font-family: "Cormorant Garamond", "Fraunces", Georgia, serif; font-size: 4.3cqw; font-weight: 600; letter-spacing: .26em; font-variant-numeric: lining-nums; line-height: 1; }
.tag-copy .yr b { font-weight: 600; padding-left: .26em; }
.tag-copy .yr::before, .tag-copy .yr::after { content: ""; width: 14cqw; height: 1.5px; background: #B48E3A; }
.hero h1, .lede, .progress, .hero-cta { opacity: 0; }
body.revealed .hero h1 { animation: tagIn 1.6s var(--ease-out) forwards, sway 8s ease-in-out 1.6s infinite; }
@keyframes tagIn { from { opacity: 0; transform: translateY(-30px) rotate(-5deg); } to { opacity: 1; transform: rotate(-1.1deg); } }
@keyframes sway { 0%, 100% { transform: rotate(-1.1deg); } 50% { transform: rotate(1deg); } }
body.revealed .lede { animation: fadeUp 1s var(--ease-out) .25s forwards; }
body.revealed .hero-cta { animation: fadeUp 1s var(--ease-out) .4s forwards; }
body.revealed .progress { animation: fadeUp 1s var(--ease-out) .55s forwards; }
.hero-cta { /* a line of brass text, not a button */
  display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; padding: 6px 2px; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: clamp(17px, 1.5vw, 20px); font-weight: 650; letter-spacing: -0.01em; color: #EBD79E;
}
.hero-cta span { background: linear-gradient(#EBD79E, #EBD79E) 0 100% / 100% 1.5px no-repeat; padding-bottom: 4px; transition: color .2s, background-size .3s var(--ease-out); }
.hero-cta svg { flex: none; animation: nudge 2.2s ease-in-out infinite; }
.hero-cta:hover { color: #FFF1C4; }
.hero-cta:hover span { background-size: 100% 2.5px; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
.hero-cta:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.lede { position: relative; margin: 16px auto 0; max-width: 34em; font-size: clamp(16px, 1.5vw, 19px); line-height: 1.5; color: #D5DDF0; text-wrap: balance; }
.progress { margin: 22px 0 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
/* the count is a row of 24 tiny arched windows: dark, then lamplit as each day opens */
.ticks { display: grid; grid-template-columns: repeat(24, 1fr); gap: 5px; width: min(430px, 86vw); }
.ticks i { aspect-ratio: 5 / 7; border-radius: 99px 99px 2px 2px; background: rgba(142,156,196,.16); box-shadow: inset 0 0 0 1px rgba(170,184,226,.28); }
.ticks i.lit { background: linear-gradient(180deg, #FFF3CF 0%, #FFCF7A 55%, #E9A94A 100%); box-shadow: 0 0 10px rgba(255,200,110,.55), inset 0 0 0 1px rgba(255,240,200,.6); }
.ticks i.now { animation: breathe 2.4s ease-in-out infinite; }
.progress-text { font-size: 13px; color: var(--muted); }
.progress-text .tnum { color: var(--accent-light); font-weight: 600; }

/* ── Scene ────────────────────────────────────────────────────────────── */
.scene { position: relative; display: flex; justify-content: center; overflow-x: clip; }
.street { /* snowy ground to either side of the photograph, with a soft top edge */
  position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--th) * 0.047);
  background: linear-gradient(180deg, rgba(172,170,206,0) 0%, rgba(172,170,206,.55) 16%, #ACAACE 42%, #ACAACE 100%);
  -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,.25), #000 32%, #000 68%, rgba(0,0,0,.25)); mask-image: linear-gradient(90deg, rgba(0,0,0,.25), #000 32%, #000 68%, rgba(0,0,0,.25));
}
.scene::after { /* the trodden snow smooths out into the footer's own snow colour */
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: calc(var(--th) * 0.04); z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, rgba(172,170,206,0) 0%, rgba(172,170,206,.3) 30%, rgba(172,170,206,.72) 62%, rgba(172,170,206,.94) 86%, #ACAACE 100%);
}
.tower { position: relative; flex: none; width: var(--tw); height: var(--th); container-type: inline-size; }
.tower-img {
  display: block; width: 100%; height: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 5.5%, #000 94.5%, transparent 100%), linear-gradient(180deg, transparent 0, #000 3.5%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0, #000 5.5%, #000 94.5%, transparent 100%), linear-gradient(180deg, transparent 0, #000 3.5%);
  mask-composite: intersect;
}


/* ── Windows ──────────────────────────────────────────────────────────── */
.wins { position: absolute; inset: 0; }
.win { position: absolute; padding: 0; margin: 0; border: 0; background: none; cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; }
.open {
  position: absolute; overflow: hidden;
  border-radius: 50% 50% 0 0 / 12% 12% 0 0;
}
.win:focus-visible .open { outline: 2px solid var(--accent-light); outline-offset: 4px; }

/* lights off, before the camera reaches the floor */
.shade { position: absolute; inset: 0; background: rgba(3,7,26,.84); transition: opacity .7s ease; pointer-events: none; }
.win.on .shade { opacity: 0; }
.win.on.dim .shade { opacity: .3; transition-duration: 1.6s; }
.win.flick .shade { animation: flick .55s steps(1, end); }
@keyframes flick { 0% { opacity: .84; } 22% { opacity: 0; } 34% { opacity: .6; } 52% { opacity: 0; } 64% { opacity: .35; } 100% { opacity: 0; } }
.win.blink .shade { animation: blink .5s steps(1, end); }
@keyframes blink { 0%, 100% { opacity: 0; } 15% { opacity: .55; } 45% { opacity: .1; } 60% { opacity: .5; } }

/* lamplight breathing around a window that is ready to open */
.halo {
  position: absolute; pointer-events: none; mix-blend-mode: screen; opacity: 0;
  background: radial-gradient(closest-side, rgba(255,200,120,.5), rgba(255,190,110,.18) 55%, transparent);
  transition: opacity .6s;
}
.win.on.ready .halo { opacity: .55; }
.win.on.today .halo { opacity: 1; animation: breathe 3.2s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@media (hover: hover) { .win.ready:hover .halo, .win.opened:hover .halo { opacity: 1; } }

/* somebody walks past the curtains */
.snowcaps { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.snowcaps i { position: absolute; left: 0; width: 100%; background-size: 100% 100%; }
/* fairy lights on the garlands and trees, twinkling over the ones in the photograph */
.lights { position: absolute; inset: 0; pointer-events: none; }
.lights i { position: absolute; width: .5cqw; height: .5cqw; margin: -.25cqw 0 0 -.25cqw; border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, rgba(255,226,160,.9) 30%, rgba(255,190,90,0) 70%);
  opacity: 0; animation: fairy var(--d, 3s) ease-in-out var(--delay, 0s) infinite; }
@keyframes fairy { 0%, 100% { opacity: 0; transform: scale(.6); } 45%, 55% { opacity: 1; transform: scale(1.5); } }

.lights i.fl { width: 1.1cqw; height: 1.5cqw; margin: -1cqw 0 0 -.55cqw; opacity: .5;
  background: radial-gradient(ellipse, rgba(255,244,200,.95) 0%, rgba(255,190,90,.5) 35%, rgba(255,160,60,0) 70%);
  animation: candle var(--d, 1s) ease-in-out var(--delay, 0s) infinite; }
@keyframes candle { 0%, 100% { opacity: .35; transform: scale(.9, .95); } 35% { opacity: .8; transform: scale(1.05, 1.2) translateX(3%); } 70% { opacity: .5; transform: scale(.95, 1.05) translateX(-3%); } }

.cat { position: absolute; right: 10%; bottom: 0; width: 34%; pointer-events: none; }
.cat .tail { transform-origin: 80% 90%; animation: tail 4.5s ease-in-out infinite; }
@keyframes tail { 0%, 70%, 100% { transform: rotate(0); } 80% { transform: rotate(12deg); } 90% { transform: rotate(-6deg); } }

/* the room showing through an opened window */
.peek {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  clip-path: inset(0 50% 0 50%); transition: clip-path .85s var(--ease-io);
}
.win.opening .peek, .win.opened .peek { clip-path: inset(0 0 0 0); }
.peek::before { /* bronze glazing bars, as in the photograph */
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, transparent calc(50% - 2.2%), #241a1c calc(50% - 2.2%) calc(50% + 2.2%), transparent calc(50% + 2.2%)),
    linear-gradient(180deg, transparent 27%, #241a1c 27% 29.6%, transparent 29.6%);
}
.peek::after { /* curtain edges and depth */
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(196,160,140,.92) 0, rgba(150,110,96,.8) 3.5%, rgba(20,8,0,.4) 7%, transparent 20%, transparent 80%, rgba(20,8,0,.4) 93%, rgba(150,110,96,.8) 96.5%, rgba(196,160,140,.92) 100%),
    linear-gradient(180deg, rgba(255,190,110,.10), rgba(60,24,0,.18));
  box-shadow: inset 0 0 calc(var(--tw) * 0.014) rgba(0,0,0,.8);
}

/* brass plaque with the day number */
.plq {
  position: absolute; display: grid; place-items: center;
  transform: scale(var(--pk)); border-radius: 2px;
  font-size: 13px; font-size: 1.5cqw; font-weight: 700; line-height: 1;
  font-variant-numeric: tabular-nums;
  color: rgba(34,26,22,.85); text-shadow: 0 1px 0 rgba(255,255,255,.22);
  background:
    radial-gradient(circle at 5% 50%, rgba(0,0,0,.45) 0 1.1px, transparent 1.6px),
    radial-gradient(circle at 95% 50%, rgba(0,0,0,.45) 0 1.1px, transparent 1.6px),
    linear-gradient(180deg, #A39686 0%, #8E8172 55%, #7C6F62 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), inset 0 -1px 0 rgba(0,0,0,.4), 0 1px 3px rgba(0,0,0,.55);
  transition: background .6s, color .6s;
  overflow: hidden;
}
.win.ready .plq, .win.opened .plq {
  color: #2A1F08; text-shadow: 0 1px 0 rgba(255,244,210,.6);
  background:
    radial-gradient(circle at 5% 50%, rgba(60,40,0,.6) 0 1.1px, transparent 1.6px),
    radial-gradient(circle at 95% 50%, rgba(60,40,0,.6) 0 1.1px, transparent 1.6px),
    linear-gradient(180deg, #F6E7B8 0%, #D9BC78 38%, #B8954C 70%, #CDAE6A 100%);
}
.win.today .plq::after { /* a polish catching the light */
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.75), transparent);
  animation: shine 3.4s ease-in-out infinite;
}
@keyframes shine { 0%, 55% { transform: translateX(0); } 100% { transform: translateX(420%); } }

.keytag {
  position: absolute; z-index: 4; left: 50%; top: 100%; margin-top: 6px;
  padding: 3px 9px; border-radius: 999px; white-space: nowrap;
  background: var(--accent); color: var(--navy); font-size: 11px; font-weight: 700; line-height: 1.3;
  transform: translateX(-50%); pointer-events: none;
  box-shadow: 0 3px 8px rgba(0,0,0,.45);
  animation: bob 2.6s ease-in-out infinite;
}
@keyframes bob { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(3px); } }

/* the front door */
.door-spot { position: absolute; padding: 0; border: 0; background: none; cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; }
.door-spot:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 2px; }
.door-bloom {
  position: absolute; inset: -12% -30% -30%; pointer-events: none; mix-blend-mode: screen; opacity: .0;
  background: radial-gradient(closest-side, rgba(255,214,150,.75), rgba(255,190,110,.25) 55%, transparent);
  transition: opacity .8s;
}
body.intro .door-bloom { opacity: .5; animation: breathe 2.4s ease-in-out infinite; }
@media (hover: hover) { .door-spot:hover .door-bloom { opacity: .7; } }
.door-spot.ring .door-bloom { animation: ring 1.2s ease-out; }
@keyframes ring { 0% { opacity: 1; } 100% { opacity: 0; } }

.foot { position: relative; z-index: 3; text-align: center; padding: 22px 16px calc(30px + var(--sab)); background: linear-gradient(180deg, #ACAACE 0%, #A3A3CA 100%); }
.foot-link { color: var(--navy); font-size: 15px; font-weight: 600; text-decoration: none; }
.foot-link:hover, .foot-legal a:hover { text-decoration: underline; }
.foot-legal { margin: 8px 0 0; font-size: 11px; color: rgba(16,32,57,.66); }
.foot-legal a { color: inherit; text-decoration: none; }
.foot-legal span { margin: 0 4px; }

/* ── Toast ────────────────────────────────────────────────────────────── */
.toast {
  position: fixed; z-index: 80; left: 0; top: 0;
  padding: 8px 14px; border-radius: 999px;
  background: var(--paper-warm); color: var(--navy);
  font-size: 13px; font-weight: 600; white-space: nowrap;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  opacity: 0; transform: translate(var(--tx, 0), calc(var(--ty, 0) + 6px));
  transition: opacity .25s, transform .35s var(--ease-out);
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(var(--tx, 0), var(--ty, 0)); }

/* ── The room behind the window ───────────────────────────────────────── */
.pmedia { position: fixed; inset: 0; z-index: 50; overflow: hidden; background: var(--bar, #0B1626); }
.pmedia[hidden], .portal[hidden] { display: none; }
.pmedia img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transform-origin: 50% 50%;
}
.pmedia img.alt { opacity: 0; transition: opacity 1s; }
.pmedia.show-alt img.alt { opacity: 1; }
.pmedia.kb img:not(.alt), .pmedia.kb img.alt { animation: kenburns 22s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1.06); } to { transform: scale(1.0) translate3d(-1%, -1%, 0); } }
.pmedia-shade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(10,24,37,0) 40%, rgba(10,24,37,.55) 100%), linear-gradient(0deg, rgba(10,24,37,.45), rgba(10,24,37,0) 30%);
}
/* lives in the dialog layer so it can be clicked; rides up as the snowbank grows */
.pmedia-pick { position: fixed; left: 24px; bottom: calc(20px + var(--bank, 0px) + var(--sab)); display: flex; gap: 8px; z-index: 76; }
.pmedia-pick button {
  width: 64px; height: 44px; padding: 0; border-radius: var(--r-in); cursor: pointer; overflow: hidden;
  border: 2px solid rgba(255,255,255,.4); background-size: cover; background-position: center;
  opacity: .8; transition: opacity .2s, border-color .2s, transform .2s;
  box-shadow: 0 2px 10px rgba(0,0,0,.4);
}
.pmedia-pick button:hover { opacity: 1; transform: translateY(-2px); }
.pmedia-pick button[aria-pressed="true"] { border-color: var(--accent-light); opacity: 1; }

.portal {
  position: fixed; inset: 0; z-index: 70;
  display: flex; align-items: center; justify-content: flex-end;
  padding: 32px clamp(24px, 4vw, 56px);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.pclose {
  position: fixed; z-index: 75; top: calc(16px + var(--sat)); left: 16px;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3);
  background: rgba(10,24,37,.55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: #fff; display: grid; place-items: center; cursor: pointer;
}
.pclose:hover { background: rgba(10,24,37,.75); }
.pcard {
  position: relative; width: min(470px, 100%); max-height: calc(100vh - 64px); overflow-y: auto;
  background: var(--paper-warm); color: var(--navy);
  border-radius: var(--r-card);
  padding: 30px 30px 22px;
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
}
.pcard > * { opacity: 0; transform: translateY(14px); }
.portal.in .pcard > * { opacity: 1; transform: none; transition: opacity .6s var(--ease-out), transform .8s var(--ease-out); transition-delay: calc(var(--i, 0) * 55ms + 120ms); }
.p-date { margin: 0; font-size: 13px; font-weight: 600; color: var(--accent-ink); }
.p-head { margin: 10px 0 0; font-size: clamp(32px, 3.2vw, 42px); color: var(--navy); }
.p-hotel { margin: 12px 0 0; font-size: 15px; font-weight: 600; color: var(--navy); }
.p-body { margin-top: 14px; color: var(--navy-soft); font-size: 16px; }
.p-body p { margin: 0 0 10px; }
.p-room { margin-top: 18px; padding: 16px; border-radius: 10px; background: #fff; border: 1px solid var(--record-line); }
.p-label { margin: 0; font-size: 12px; font-weight: 600; color: var(--accent-ink); }
.p-room-name { margin: 4px 0 10px; font-size: 17px; font-weight: 650; color: var(--navy); }
.p-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0; }
.p-facts div { padding-top: 10px; border-top: 1px solid var(--record-line); }
.p-facts dt { font-size: 12px; color: var(--navy-mute); }
.p-facts dd { margin: 2px 0 0; font-size: 14px; font-weight: 600; color: var(--navy); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 0; padding: 0; }
.chips li { padding: 5px 11px; border-radius: 999px; background: var(--record-chip); color: var(--navy-soft); font-size: 13px; font-weight: 500; }
.p-cta { display: flex; gap: 10px; margin-top: 20px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 22px;
  border-radius: 999px; font-size: 15px; font-weight: 650; text-decoration: none; cursor: pointer;
  transition: background .2s, color .2s, transform .15s;
}
.btn:active { transform: scale(.98); }
.btn.primary { flex: 1; background: var(--navy); color: var(--accent-light); border: 0; }
.btn.primary:hover { background: #1A3150; }
.btn.ghost { background: transparent; color: var(--navy); border: 1px solid #CFC4AE; }
.btn.ghost:hover { border-color: var(--navy-mute); }
.p-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--record-line); }
.navbtn { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; color: var(--navy); font-size: 14px; font-weight: 600; cursor: pointer; }
.navbtn:hover:not(:disabled) { background: var(--record-chip); }
.navbtn:disabled { opacity: .3; cursor: default; }
.p-count { font-size: 13px; color: var(--navy-mute); }


/* ── Share sheet ──────────────────────────────────────────────────────── */
.sheet { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px; background: rgba(3,8,28,.62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; transition: opacity .25s; }
.sheet[hidden] { display: none; }
.sheet.in { opacity: 1; }
.sheet-panel {
  width: min(860px, 100%); max-height: calc(100vh - 48px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--paper-warm); color: var(--navy); border-radius: var(--r-card); padding: 26px 28px 22px;
  transform: translateY(18px); transition: transform .45s var(--ease-out);
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
}
.sheet.in .sheet-panel { transform: none; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.sheet-head h3 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.sheet-head p { margin: 4px 0 0; font-size: 14px; color: var(--navy-soft); }
.sheet-close { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid #CFC4AE; background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--navy); }
.sheet-close:hover { border-color: var(--navy-mute); }
.kit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 20px; }
.kit-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--record-line); border-radius: 10px; padding: 14px; }
.kit-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 22px; }
.kit-head h4 { margin: 0; font-size: 14px; font-weight: 650; }
.kit-brands { display: flex; gap: 6px; color: var(--navy-mute); }
.kit-brands svg { width: 16px; height: 16px; fill: currentColor; }
.kit-preview { margin-top: 12px; border-radius: var(--r-in); overflow: hidden; background: var(--record-chip); display: grid; place-items: center; height: 300px; }
.kit-preview video, .kit-preview img { display: block; max-width: 100%; max-height: 100%; }
.kit-tip { margin: 10px 0 0; font-size: 13px; color: var(--navy-soft); flex: 1; }
.kit-actions { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }
.kit-actions .btn { height: 42px; font-size: 14px; flex: none; }
.text-btn { height: 34px; border: 0; background: none; color: var(--navy); font-size: 13px; font-weight: 600; cursor: pointer; border-radius: 999px; }
.text-btn:hover { background: var(--record-chip); }
.kit-minor { display: flex; justify-content: center; gap: 4px; }
a.text-btn { display: inline-flex; align-items: center; padding: 0 12px; text-decoration: none; }
.kit-minor .text-btn { padding: 0 12px; }
.sheet-panel.sub-open > .kit-grid, .sheet-panel.sub-open > .kit-links, .sheet-panel.sub-open > .kit-caption { display: none; }
.kit-sub { margin-top: 14px; }
.kit-sub[hidden] { display: none; }
.kit-back { display: inline-flex; align-items: center; gap: 4px; padding: 0 12px 0 6px; margin-left: -6px; }
.kit-sub-top { display: flex; align-items: center; gap: 16px; margin-top: 10px; }
.kit-sub-top h4, .kit-qr h4 { margin: 0; font-size: 16px; font-weight: 700; }
.kit-sub-thumb { flex: none; width: 84px; height: 112px; border-radius: var(--r-in); overflow: hidden; background: var(--record-chip); display: grid; place-items: center; }
.kit-sub-thumb img { display: block; max-width: 100%; max-height: 100%; }
.kit-sub .kit-link-grid { margin-top: 16px; }
.kit-qr { display: flex; align-items: center; gap: 16px; margin-top: 16px; padding: 14px; background: #fff; border: 1px solid var(--record-line); border-radius: 10px; }
.kit-qr[hidden] { display: none; }
.kit-qr-code { flex: none; width: 124px; height: 124px; }
.kit-qr-code svg { display: block; width: 100%; height: 100%; }
.kit-links { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--record-line); }
.kit-links h4 { margin: 0; font-size: 16px; font-weight: 700; }
.kit-muted { margin: 2px 0 0; font-size: 13px; color: var(--navy-soft); }
.kit-link-grid { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.kit-link {
  display: flex; align-items: center; gap: 8px; width: 100%; height: 42px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--record-line); background: #fff; color: var(--navy); font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer;
}
.kit-link:hover { border-color: var(--navy-mute); }
.kit-link svg { width: 16px; height: 16px; flex: none; fill: currentColor; }
.kit-caption { margin-top: 14px; font-size: 13px; color: var(--navy-soft); }
.kit-caption summary { cursor: pointer; font-weight: 600; color: var(--navy); }
.kit-caption pre { margin: 8px 0 0; padding: 12px; white-space: pre-wrap; font: inherit; background: #fff; border: 1px solid var(--record-line); border-radius: 10px; }
.kit-note { margin: 10px 0 0; min-height: 1.3em; font-size: 13px; font-weight: 600; color: var(--accent-ink); }

/* breath on the glass, clearing as you step in */
.frost {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  -webkit-backdrop-filter: blur(16px) brightness(1.18); backdrop-filter: blur(16px) brightness(1.18);
  background: radial-gradient(120% 120% at 50% 50%, rgba(226,236,255,0) 20%, rgba(226,236,255,.34) 100%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, transparent 0%, #000 70%);
  mask-image: radial-gradient(ellipse at 50% 50%, transparent 0%, #000 70%);
}

/* ── Phones ───────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  :root { --tw: 114vw; --pk: 1.5; }
  .sound span { display: none; }
  .sound { width: 40px; height: 40px; padding: 0; justify-content: center; }
  .hero { padding-top: 0; }
  .hero h1.tag { margin-top: calc(var(--w) * -0.12 + var(--sat)); }
  .keytag { font-size: 10px; padding: 2px 7px; margin-top: 5px; }
  .bars i { height: 8vh; }

  .sheet { padding: 0; place-items: end stretch; }
  .sheet-panel { width: 100%; max-height: 92vh; border-radius: var(--r-card) var(--r-card) 0 0; padding: 22px 16px calc(18px + var(--sab)); transform: translateY(40px); }
  .kit-grid { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 74%; overflow-x: auto; scroll-snap-type: x mandatory; margin: 18px -16px 0; padding: 0 16px 4px; -webkit-overflow-scrolling: touch; }
  .kit-card { scroll-snap-align: center; }
  .kit-preview { height: 320px; }
  .kit-link-grid { grid-template-columns: repeat(2, 1fr); }

  .portal { display: block; padding: 0; }
  .pcard {
    width: 100%; max-height: none; overflow: visible;
    margin-top: 52vh; min-height: 48vh;
    border-radius: var(--r-card) var(--r-card) 0 0;
    padding: 26px 20px calc(24px + var(--sab));
    box-shadow: 0 -20px 50px rgba(0,0,0,.35);
  }
  .pmedia img { height: 60vh; }
  .pmedia-shade { background: linear-gradient(0deg, rgba(10,24,37,.5), rgba(10,24,37,0) 40%); height: 60vh; }
  .frost { height: 60vh; }
  .pmedia-pick { left: auto; right: 16px; bottom: auto; top: calc(16px + var(--sat)); }
  .pmedia-pick button { width: 48px; height: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  .lights i { animation: none; opacity: .5; }
  .spark, .lights i.fl, .clouds { animation: none; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ── Build a snowman on the day screen ────────────────────────────────── */
#snowplay { position: fixed; inset: 0; z-index: 77; pointer-events: none; transition: opacity .55s, transform .7s cubic-bezier(.5,0,.8,.4), filter .55s; }
#snowplay[hidden] { display: none; }
#snowplay.leaving { opacity: 0; transform: translateX(16vw) skewX(-10deg); filter: blur(7px); }
.sp-zone { position: absolute; left: 0; right: 0; bottom: 0; pointer-events: auto; touch-action: none; cursor: grab; }
.sp-ball, .sp-piece, .sp-extra { position: absolute; left: 0; top: 0; will-change: transform; }
.sp-ball { border-radius: 50%; pointer-events: auto; touch-action: none; cursor: grab;
  background: radial-gradient(circle at 34% 27%, #fff 0%, #F5F8FD 36%, #DDE6F5 70%, #B6C6E2 100%);
  box-shadow: inset -5px -8px 14px rgba(110,132,186,.38), inset 3px 4px 8px rgba(255,255,255,.9), 0 7px 14px rgba(8,18,48,.38); }
.sp-ball i { position: absolute; inset: 0; border-radius: 50%; opacity: .55;
  background: radial-gradient(circle at 28% 62%, rgba(150,170,214,.5) 0 5%, transparent 7%), radial-gradient(circle at 66% 30%, rgba(150,170,214,.4) 0 4%, transparent 6%), radial-gradient(circle at 72% 72%, rgba(255,255,255,.9) 0 5%, transparent 7%), radial-gradient(circle at 44% 18%, rgba(150,170,214,.35) 0 3%, transparent 5%); }
.sp-piece { z-index: 6; pointer-events: auto; touch-action: none; cursor: grab; filter: drop-shadow(0 3px 4px rgba(8,18,48,.45)); }
/* generous invisible grab areas, larger again for fingers */
.sp-piece::before { content: ""; position: absolute; inset: -12px; border-radius: 50%; }
.sp-ball::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; }
@media (pointer: coarse) { .sp-piece::before { inset: -24px; } .sp-ball::after { inset: -14px; } }
#snowplay.built .sp-ball { cursor: move; }
.sp-piece svg, .sp-extra svg { display: block; width: 100%; height: 100%; overflow: visible; }
.sp-extra { z-index: 5; pointer-events: none; animation: spIn .5s var(--ease-out) both; }
.sp-arm { z-index: 0; }
.sp-arm.r svg { animation: spWave 1.1s ease-in-out .5s 3; transform-origin: 2% 87%; }
#snowplay.dragging, #snowplay.dragging .sp-ball, #snowplay.dragging .sp-piece { cursor: grabbing; }
.sp-hint { position: absolute; left: 50%; bottom: calc(var(--bank, 0px) + 30px + var(--sab)); margin: 0; transform: translateX(-50%); white-space: nowrap;
  padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: #fff; background: rgba(10,24,37,.6);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: opacity .5s; animation: spIn .8s var(--ease-out) 1.2s both; }
.sp-hint.gone { animation: none; opacity: 0; }
.sp-hop { animation: spHop .95s var(--ease-out); }
.sp-extra.sp-hop { animation: spIn .5s var(--ease-out) both, spHop .95s var(--ease-out); }
@keyframes spHop { 0%, 100% { translate: 0 0; } 28% { translate: 0 -24px; } 55% { translate: 0 0; } 72% { translate: 0 -9px; } }
@keyframes spIn { from { opacity: 0; scale: .6; } to { opacity: 1; scale: 1; } }
@keyframes spWave { 0%, 100% { rotate: 0deg; } 30% { rotate: -22deg; } 60% { rotate: 10deg; } }
@media (max-width: 720px) {
  /* on phones the card covers the lower half of the screen, so the snow has to lie on top of it */
  body.portal-open #snow { z-index: 76; }
  .portal { padding-bottom: calc(var(--bank, 0px) + 40px); }
  .sp-hint { font-size: 13px; bottom: calc(var(--bank, 0px) + 18px + var(--sab)); }
}
