/* The Night Before Christmas: a two-panel Christmas Eve invitation. Panel 1: a sealed envelope on a table, the letter that slides out of it. Panel 2: the gathering,
   a place card and the reply. Lettering from the font library: Gilda Display (titles), Marcellus SC (small capitals), Sorts Mill Goudy (reading text),
   Petit Formal Script (the host's signature only). No paper textures: smooth surfaces, light, bevels and shadows. */
:root {
  --ivory: #F7F1E7; --parch: #E9DFCE; --green: #18372D; --gold: #C4A36B; --soft: #D9C398; --ox: #6E2028; --ink: #29251F; --mute: #5A4C38;
  --accent: var(--green);
  --disp: 'Gilda Display', Georgia, 'Times New Roman', serif; --caps: 'Marcellus SC', Georgia, serif; --text: 'Sorts Mill Goudy', Georgia, 'Times New Roman', serif; --hand: 'Petit Formal Script', 'Snell Roundhand', cursive;
  /* the card's width decides every size: the card, the envelope (86% of it, a 5 by 7 portrait) and the lettering */
  --cw: max(272px, min(92vw, 460px, calc((100svh - 150px) / 1.4)));
  --ew: calc(var(--cw) * .86); --eh: calc(var(--ew) * 1.4);
}
body.p-oxblood { --accent: var(--ox); }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--parch); color: var(--ink); font-family: var(--text); font-size: 17px; line-height: 1.5; overflow-x: clip; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 8px; top: -60px; z-index: 9100; background: #fff; color: #000; padding: 10px 14px; border-radius: 4px; }
.skip:focus { top: 8px; }
.pic { display: block; } .pic svg { display: block; width: 100%; height: 100%; }
[hidden] { display: none !important; }

/* ---------- the room ---------- */
#bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--parch); }
.bg-art { position: absolute; inset: 0; opacity: 0; transition: opacity .9s ease; }
.bg-art svg { display: block; width: 100%; height: 100%; }
body[data-panel="1"] #bg1, body[data-panel="2"] #bg2 { opacity: 1; }
/* the candle's warm light over the table, and two far lights out of focus; it all goes with the flame */
#glow { position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease; pointer-events: none;
  background: radial-gradient(circle at calc(var(--cdl) + var(--cdw) / 2) calc(100svh - var(--cdb) - var(--cdw) * 2.1), rgba(255, 210, 130, .5), rgba(255, 210, 130, .15) 20%, transparent 46%),
    radial-gradient(circle at 14% 7%, rgba(255, 226, 170, .34), rgba(255, 226, 170, .2) 5%, transparent 9%),
    radial-gradient(circle at 27% 3%, rgba(255, 226, 170, .26), rgba(255, 226, 170, .14) 4%, transparent 7%); }
body.lit #glow { opacity: 1; }
.candle { position: fixed; z-index: 1; right: clamp(2px, 5vw, 90px); top: clamp(58px, 9svh, 110px); width: clamp(54px, 10vw, 118px); aspect-ratio: 120 / 300; padding: 0; border: 0; background: none; }
.candle .flame, .candle .halo { opacity: 0; transition: opacity .5s ease; transform-box: fill-box; transform-origin: 50% 80%; }
body.lit .candle .flame, body.lit .candle .halo { opacity: 1; }
body.lit .candle .flame { animation: flick 2.6s ease-in-out infinite; }
@keyframes flick { 0%, 100% { transform: scale(1, 1) rotate(0deg); } 30% { transform: scale(.96, 1.05) rotate(-1.5deg); } 62% { transform: scale(1.03, .96) rotate(1.4deg); } }

/* ---------- the two controls at the top ---------- */
#menu-wrap { position: fixed; left: 10px; top: 10px; z-index: 9040; }
#b-menu { min-height: 44px; padding: 0 16px; border: 1px solid rgba(41, 37, 31, .25); border-radius: 2px; background: rgba(251, 247, 239, .94); font-family: var(--caps); letter-spacing: .14em; font-size: 14px; }
#menu { margin-top: 8px; display: grid; gap: 2px; padding: 8px; min-width: 250px; background: #FBF7EF; border: 1px solid var(--gold); box-shadow: 0 14px 34px rgba(58, 38, 20, .25); }
#menu button { min-height: 46px; text-align: left; padding: 0 12px; border: 0; background: none; font-size: 16px; }
#menu button:hover { background: var(--parch); }
#menu button[aria-pressed="true"] { background: var(--accent); color: #fff; }
#snd-hint { position: fixed; left: 50%; top: 18px; transform: translateX(-50%); z-index: 9030; margin: 0; padding: 5px 12px; background: rgba(251, 247, 239, .92); border: 1px solid rgba(41, 37, 31, .18); font-family: var(--caps); letter-spacing: .12em; font-size: 11px; white-space: nowrap; transition: opacity .4s; pointer-events: none; }
#snd-hint.gone { opacity: 0; }

/* ---------- a panel: one focused composition, centred; it may be taller than the screen and then simply scrolls ---------- */
/* the story lies over the room but only its own things take a tap: the candle behind it stays a control */
#story { position: relative; z-index: 2; pointer-events: none; }
.panel > * { pointer-events: auto; }
.panel { min-height: 100svh; display: grid; align-content: center; justify-items: center; gap: 12px; padding: 66px 16px 46px; }
.await { margin: 0; font-family: var(--caps); letter-spacing: .3em; font-size: max(11px, calc(var(--cw) * .03)); color: var(--mute); text-align: center; transition: opacity .4s ease; }
.panel.opened .await { opacity: 0; }
.envwrap { display: grid; place-items: center; isolation: isolate; position: relative; }
.envwrap > * { grid-area: 1 / 1; }

/* ---------- the envelope: under (the liner), [the card], front (the pocket), the flap, the seal ---------- */
.envframe { position: relative; width: var(--ew); height: var(--eh); transition: opacity .7s ease, transform .9s cubic-bezier(.4, 0, .2, 1); }
.ev { position: absolute; display: block; }
.ev svg { display: block; width: 100%; height: 100%; }
.env-under { inset: 0; z-index: 1; border-radius: 1.4%; box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 2px 3px rgba(58, 38, 20, .3), 0 calc(var(--ew) * .05) calc(var(--ew) * .09) rgba(58, 38, 20, .3), 0 calc(var(--ew) * .012) calc(var(--ew) * .02) rgba(58, 38, 20, .22); }
.env-front { inset: 0; z-index: 3; }
/* where the wax held the flap down: a faint ring left on the pocket, seen once the flap has lifted */
.env-front::after { content: ''; position: absolute; left: 50%; top: 42.86%; width: 17%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, rgba(110, 60, 40, .0) 52%, rgba(110, 60, 40, .16) 60%, rgba(110, 60, 40, 0) 70%); }
.env-flapbox { left: 0; top: 0; width: 100%; height: 44%; z-index: 4; perspective: 1600px; perspective-origin: 50% 0; }
.flap { position: absolute; inset: 0; transform-origin: 50% 0; transform-style: preserve-3d; transition: transform .9s cubic-bezier(.45, .05, .3, 1); }
.ff, .fb { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.ff { filter: drop-shadow(0 calc(var(--ew) * .008) calc(var(--ew) * .008) rgba(58, 38, 20, .3)); }
.fb { transform: rotateX(180deg) scaleY(-1); }
.seal { position: absolute; left: 50%; top: 97.4%; width: 27%; aspect-ratio: 1; transform: translate(-50%, -50%) translateZ(1px); backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: transform .4s ease, filter .4s ease; }
.seal svg { display: block; width: 100%; height: 100%; }
.seal .glint { transition: opacity .4s ease; }
.open { inset: 0; z-index: 6; padding: 0; border: 0; background: none; }
.cue { position: absolute; left: 50%; top: calc(100% + 12px); transform: translateX(-50%); white-space: nowrap; font-family: var(--caps); letter-spacing: .26em; font-size: max(12px, calc(var(--cw) * .031)); color: var(--ink); padding-bottom: 5px; border-bottom: 1px solid var(--gold); }
/* nothing on the sealed envelope moves or changes under the pointer (the user, 2026-11-17: the seal shrank and grew on hover, because the flap it sits on tilted) */
/* opening, one step after another (the script adds the classes): the seal lets go, the flap lifts and falls back, the card slides up */
.s-release .seal { transform: translate(-50%, -54%) translateZ(1px) scale(1.07); filter: drop-shadow(0 6px 5px rgba(58, 38, 20, .35)); }
.s-flap .flap { transform: rotateX(178deg); }
.s-back .env-flapbox { z-index: 1; }
.envwrap:not(.sealed) .open { display: none; }

/* ---------- the card: heavy ivory stock, a hairline of foil and a blind-embossed line inside it ---------- */
.card { position: relative; z-index: 2; width: var(--cw); min-height: calc(var(--cw) * 1.4); background: linear-gradient(158deg, #FDFAF4, #F4EDE0); color: var(--ink); text-align: center;
  box-shadow: 0 1px 0 #fff inset, 0 2px 0 #D5C8B0, 0 22px 46px rgba(58, 38, 20, .3), 0 5px 12px rgba(58, 38, 20, .18); }
.frame { position: absolute; inset: calc(var(--cw) * .035); border: 1px solid var(--gold); pointer-events: none; }
.frame::after { content: ''; position: absolute; inset: 5px; border: 1px solid rgba(255, 255, 255, .95); box-shadow: 1px 1px 0 rgba(138, 118, 90, .28), -1px -1px 0 rgba(138, 118, 90, .1) inset; }
.in { position: relative; padding: calc(var(--cw) * .12) calc(var(--cw) * .11) calc(var(--cw) * .1); }
/* inside the envelope the card is the same card, held at the envelope's size, blank until it is out */
.envwrap:not(.letter) > .card { height: calc(var(--cw) * 1.4); overflow: hidden; box-shadow: none; transform: scale(.808); transition: transform .8s cubic-bezier(.3, 0, .2, 1); }
.envwrap:not(.letter) > .card .in { opacity: 0; }
.envwrap.sealed > .card { visibility: hidden; }
/* The envelope steps down as its flap opens, so the open flap and the rising card stay on the screen. The WHOLE group moves (envelope and card together): moving the envelope alone
   would put its layers in a group of their own, and the card, which lies between the liner and the pocket, would be drawn on top of the whole envelope. */
.envwrap:not(.letter) { transition: transform .9s cubic-bezier(.4, 0, .2, 1); }
.envwrap.s-flap:not(.letter) { transform: translateY(calc(var(--eh) * .28)); }
.envwrap.s-out:not(.letter) > .card { transform: translateY(calc(var(--eh) * -.6)) scale(.808); }
/* once the card is the letter the envelope sinks away from where it stood (the step down is kept, so it does not jump) */
.envwrap.letter > .envframe { animation: envgo .8s ease both; }
@keyframes envgo { from { opacity: 1; transform: translateY(calc(var(--eh) * .28)); } to { opacity: 0; transform: translateY(calc(var(--eh) * .42)) scale(.96); } }
body.rm .envwrap.letter > .envframe, body.editing .envwrap.letter > .envframe { animation: none; }
.skipanim { position: relative; z-index: 7; }
.envwrap.letter > .card { z-index: 5; }
.envwrap.letter > .envframe { position: absolute; opacity: 0; transform: translateY(14%) scale(.96); pointer-events: none; }
.envwrap.letter.gone > .envframe { visibility: hidden; }
.envwrap.letter > .card .in > * { animation: rise .7s ease both; }
.envwrap.letter > .card .in > :nth-child(2) { animation-delay: .07s; } .envwrap.letter > .card .in > :nth-child(3) { animation-delay: .14s; } .envwrap.letter > .card .in > :nth-child(4) { animation-delay: .21s; }
.envwrap.letter > .card .in > :nth-child(5) { animation-delay: .28s; } .envwrap.letter > .card .in > :nth-child(6) { animation-delay: .35s; } .envwrap.letter > .card .in > :nth-child(n+7) { animation-delay: .42s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
body.editing .envwrap.letter > .card .in > *, body.editing .card.det { animation: none; }

.eyebrow { margin: 0; font-family: var(--caps); letter-spacing: .3em; font-size: max(11px, calc(var(--cw) * .028)); color: var(--mute); text-wrap: balance; }
.motif { width: 62%; margin: calc(var(--cw) * .045) auto calc(var(--cw) * .02); aspect-ratio: 240 / 84; }
.motif svg { display: block; width: 100%; height: 100%; }
.card h1, .card h2 { margin: 0; font-family: var(--disp); font-weight: 400; line-height: 1.12; letter-spacing: .01em; text-wrap: balance; }
.card h1 { font-size: max(30px, calc(var(--cw) * .098)); }
.card h2 { font-size: max(27px, calc(var(--cw) * .082)); }
.sub { margin: .7em 0 0; font-style: italic; font-size: max(16px, calc(var(--cw) * .042)); color: var(--mute); text-wrap: balance; }
.rule { height: 1px; width: 38%; margin: 1.3em auto; background: linear-gradient(90deg, transparent, var(--gold), transparent); position: relative; }
.rule i { position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; background: var(--gold); transform: translate(-50%, -50%) rotate(45deg); }
.body { margin: 0; font-size: max(16px, calc(var(--cw) * .04)); line-height: 1.62; text-wrap: pretty; }
.when1 { margin: 1.2em 0 0; font-family: var(--caps); letter-spacing: .16em; font-size: max(12px, calc(var(--cw) * .03)); color: var(--mute); }
.when1:empty { display: none; }

/* the two actions on the letter */
.notetab { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 1.5em auto 0; min-height: 46px; padding: 0 10px; border: 0; background: none; font-style: italic; font-size: max(16px, calc(var(--cw) * .039)); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 5px; }
.notetab .fold { width: 22px; height: 28px; flex: none; background: linear-gradient(180deg, #fff 0 32%, #EDE3D2 32% 34%, #FBF7EF 34% 66%, #E4D8C3 66% 68%, #F7F1E7 68%); box-shadow: 0 2px 4px rgba(58, 38, 20, .28); border: 1px solid #D5C8B0; }
.go, .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 26px; border: 1px solid var(--accent); border-radius: 1px; background: var(--accent); color: #FBF7EF; font-family: var(--caps); letter-spacing: .18em; font-size: 14px; box-shadow: 0 0 0 3px #FBF7EF inset, 0 0 0 4px rgba(217, 195, 152, .7) inset; transition: filter .2s ease; }
.go:hover, .btn:hover { filter: brightness(1.15); }
.go { margin-top: 1.1em; }
.btn.ghost { background: none; color: var(--accent); box-shadow: none; }
.btn[disabled] { opacity: .55; }
.linkish { background: none; border: 0; padding: 8px; min-height: 44px; display: inline-flex; align-items: center; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--gold); font-style: italic; font-size: 16px; color: var(--ink); }
.skipanim { justify-self: center; background: rgba(251, 247, 239, .88); padding: 8px 16px; }

/* ---------- panel 2: the gathering ---------- */
.card.det { width: min(92vw, 540px); --cw: min(92vw, 540px); min-height: 0; animation: settle .8s cubic-bezier(.3, 0, .2, 1) both; }
@keyframes settle { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }
.card.det .in { padding-top: calc(var(--cw) * .07); }
.back { margin: 0 auto .6em; font-size: 15px; }
.event { margin: 0; font-family: var(--caps); letter-spacing: .2em; font-size: 14px; color: var(--mute); }
.when { margin: .5em 0 0; font-family: var(--disp); font-size: max(20px, calc(var(--cw) * .046)); line-height: 1.3; text-wrap: balance; }
.where { margin: .5em 0 0; font-size: 17px; text-wrap: balance; }
.with { margin: .7em 0 0; font-style: italic; color: var(--mute); }
.more { margin: 1.3em auto 0; display: grid; gap: .8em; max-width: 400px; }
.more:empty { display: none; }
.more div { display: grid; gap: 2px; }
.more dt { font-family: var(--caps); letter-spacing: .2em; font-size: 12px; color: var(--mute); }
.more dd { margin: 0; font-size: 17px; text-wrap: pretty; }
.acts { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 1.4em; }

/* the place card: a folded tent card on the table. Its front lifts on the fold along its top edge and the words inside show. */
.place { display: block; position: relative; width: min(100%, 300px); height: 132px; margin: 78px auto 6px; padding: 0; border: 0; background: none; perspective: 900px; perspective-origin: 50% 0; }
.pc-in, .pc-front { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; gap: 4px; padding: 12px 18px; }
.pc-in { background: linear-gradient(180deg, #E9DFCE, #FBF7EF 26%); box-shadow: 0 10px 18px rgba(58, 38, 20, .26), 0 2px 4px rgba(58, 38, 20, .2); }
.pc-for { font-family: var(--caps); letter-spacing: .2em; font-size: 12px; color: var(--mute); }
.pc-for:empty { display: none; }
.pc-line { font-style: italic; font-size: 17px; line-height: 1.35; text-wrap: balance; }
.pc-front { background: linear-gradient(170deg, #FFFDF8, #F4EDE0); border: 1px solid #E0D3BB; box-shadow: 0 0 0 5px #FBF7EF inset, 0 0 0 6px var(--gold) inset; transform-origin: 50% 0; transition: transform .8s cubic-bezier(.4, 0, .2, 1), box-shadow .8s ease; }
.pc-front .pic { width: 26px; height: 26px; }
.pc-name { font-family: var(--disp); font-size: 21px; line-height: 1.2; text-wrap: balance; }
.place[aria-expanded="true"] .pc-front { transform: rotateX(112deg); box-shadow: 0 0 0 5px #F1E9DA inset, 0 0 0 6px var(--gold) inset, 0 -14px 20px rgba(58, 38, 20, .16); }

#rsvp { margin-top: 2em; padding-top: 1.6em; border-top: 1px solid rgba(196, 163, 107, .6); }
#rsvp h3 { margin: 0; font-family: var(--caps); font-weight: 400; letter-spacing: .3em; font-size: 16px; }
.by { margin: .4em 0 0; font-style: italic; color: var(--mute); }
#rsvp-form { display: grid; gap: 14px; margin-top: 1.2em; text-align: left; }
.f { display: grid; gap: 6px; font-family: var(--caps); letter-spacing: .12em; font-size: 13px; color: var(--mute); }
.f input, .f textarea { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid #CBBBA0; border-radius: 1px; background: #FFFDF8; font-family: var(--text); letter-spacing: 0; font-size: 17px; color: var(--ink); }
.ans { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
.ans label { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 14px; border: 1px solid #CBBBA0; background: #FFFDF8; font-size: 17px; }
.ans label:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.ans input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.step { display: flex; align-items: center; gap: 14px; }
.step button { width: 48px; height: 48px; border: 1px solid #CBBBA0; background: #FFFDF8; font-size: 22px; color: var(--ink); }
.step output { min-width: 26px; text-align: center; font-family: var(--disp); font-size: 22px; color: var(--ink); }
#err { margin: 0; min-height: 1.3em; font-size: 16px; color: var(--mute); }
#err.err { color: #8A1F1F; }
#r-send { justify-self: center; }
#r-closed { font-style: italic; }
#done { margin-top: 1.2em; }
#done h3 { font-family: var(--disp); letter-spacing: 0; font-size: 26px; }
#done p { margin: .5em 0; }
.closing { margin: 1.8em 0 0; font-style: italic; font-size: 18px; color: var(--mute); }

/* ---------- the host's note: a sheet folded in three that opens over the card ---------- */
#note { position: fixed; inset: 0; z-index: 9050; display: grid; place-items: center; padding: 16px; background: rgba(41, 37, 31, .5); overflow: auto; }
.sheet { position: relative; width: min(92vw, 440px); padding: 44px 34px 34px; text-align: center; color: var(--ink);
  background: linear-gradient(180deg, transparent calc(33.3% - 1px), rgba(138, 118, 90, .22) calc(33.3% - 1px) 33.3%, rgba(255, 255, 255, .9) 33.3% calc(33.3% + 1px), transparent calc(33.3% + 1px)),
    linear-gradient(180deg, transparent calc(66.6% - 1px), rgba(138, 118, 90, .22) calc(66.6% - 1px) 66.6%, rgba(255, 255, 255, .9) 66.6% calc(66.6% + 1px), transparent calc(66.6% + 1px)),
    linear-gradient(180deg, #FFFDF8, #F6EFE2 33%, #FDFAF4 34%, #F4EDE0 66%, #FCF8F0 67%, #F3EBDD);
  box-shadow: 0 30px 60px rgba(30, 20, 10, .45), 0 2px 0 #D5C8B0; transform-origin: 50% 0; animation: unfold .7s cubic-bezier(.3, 0, .2, 1) both; }
@keyframes unfold { from { opacity: 0; transform: perspective(900px) rotateX(-58deg) scaleY(.5); } to { opacity: 1; transform: none; } }
.sheet .pic { width: 34px; height: 34px; margin: 0 auto 10px; }
.sheet h2 { margin: 0; font-family: var(--caps); font-weight: 400; letter-spacing: .26em; font-size: 13px; color: var(--mute); }
.notetext { margin: 1.3em 0 0; font-style: italic; font-size: 20px; line-height: 1.6; text-wrap: pretty; white-space: pre-line; }
.sign { margin: 1.1em 0 0; font-family: var(--hand); font-size: 25px; line-height: 1.4; }
.sign:empty { display: none; }
.sheet .btn { margin-top: 1.6em; }

@media (max-width: 520px) {
  .panel { padding: 62px 12px 40px; }
  .in { padding-left: calc(var(--cw) * .085); padding-right: calc(var(--cw) * .085); }
  .acts .btn { flex: 1 1 100%; }
}
/* a phone on its side: the envelope is sized by the short height, and the candle steps down so it never crowds the card */
@media (max-height: 520px) { .candle { width: 46px; top: 54px; } .panel { padding-top: 58px; } }

body.rm *, body.rm *::before, body.rm *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- the table, dressed for Christmas night ----------
   The candle stands ON the table right beside the envelope, its foot level with the envelope's lower edge (on a phone, where there is no room at the side, at the table's near
   right corner). --cdw is its width, --cdl its left edge, --cdb its foot above the bottom of the screen: the warm light (#glow) and the baubles at its foot follow the same three. */
body { --cdw: clamp(50px, calc(var(--ew) * .2), 96px); --cdl: calc(50% + var(--cw) / 2 + clamp(10px, 2.4vw, 44px)); --cdb: max(14px, calc(50svh - var(--eh) / 2 - 30px)); }
.candle { left: var(--cdl); right: auto; top: auto; bottom: var(--cdb); width: var(--cdw); }
/* pictures from our own library (public/assets/clipart, licences in its LICENSES.md). They lie still; only the first page wears them. */
.deco { position: absolute; pointer-events: none; transition: opacity .9s ease; }
body[data-panel="2"] .deco { opacity: 0; }
/* a fir garland hung with gold ornaments along the top edge: the top strip of the picture, toned down to the room's deep evergreen */
.garland { left: 50%; top: 0; width: max(100vw, 760px); aspect-ratio: 1600 / 250; transform: translate(-50%, -34%); background: url(/assets/clipart/fir-garland-gold.webp) top center / 100% auto no-repeat; filter: saturate(.72) brightness(.84); }
/* two pinecones lying by the fir sprig at the lower left */
.cone { aspect-ratio: 650 / 900; background: url(/assets/clipart/pinecone.webp) center / contain no-repeat; filter: drop-shadow(6px 10px 8px rgba(58, 38, 20, .36)); }
.cone.c1 { left: clamp(96px, 16vw, 310px); bottom: 3.5svh; width: clamp(44px, 5.4vw, 92px); transform: rotate(-62deg); }
.cone.c2 { left: clamp(150px, 21vw, 400px); bottom: 1.2svh; width: clamp(34px, 4.2vw, 72px); transform: rotate(38deg); }
/* three red baubles, each cut from the sheet of nine: two at the foot of the candle, one by the pinecones. They lie on the table, so their hangers point sideways. */
.bauble { aspect-ratio: 382 / 400; background: url(/assets/clipart/red-baubles.webp) no-repeat; background-size: 300% 300%; filter: drop-shadow(5px 9px 7px rgba(58, 38, 20, .4)); }
.bauble.b1 { background-position: 100% 100%; left: calc(var(--cdl) + var(--cdw) * 1.05); bottom: calc(var(--cdb) - 6px); width: calc(var(--cdw) * .8); transform: rotate(72deg); }
.bauble.b2 { background-position: 50% 0; left: calc(var(--cdl) + var(--cdw) * 1.8); bottom: calc(var(--cdb) - 24px); width: calc(var(--cdw) * .62); transform: rotate(-52deg); }
.bauble.b3 { background-position: 0 0; left: clamp(200px, 26vw, 480px); bottom: 2svh; width: clamp(36px, 4.4vw, 74px); transform: rotate(112deg); }
@media (max-width: 759px) {
  body { --cdw: 46px; --cdl: calc(100vw - 46px - 3vw); --cdb: max(10px, 2svh); }
  /* on the second page a phone has no free corner: the card runs the whole width, so the candle is put away */
  body[data-panel="2"] .candle { display: none; }
  .bauble.b1 { left: calc(var(--cdl) - 44px); bottom: 1.2svh; width: 40px; }
  .bauble.b2 { display: none; }
  .bauble.b3 { left: 46vw; bottom: 1svh; width: 34px; }
}
