/* Not My Event: the look of "One More Christmas Eve" (public/templates/one-more-christmas-eve.html). One page that scrolls DOWN through five scenes. Each scene is a section
   with a pinned picture behind it (.stage, drawn by onemore-art.js for the size of the screen) and its words and toys in front (.flow), which simply scroll: nothing is clipped
   on a small phone and nothing has to be finished to go on. The scroll frame in onemore.js writes only transform and opacity on a few layers.
   Amber lamp light, pine green, burgundy, ivory paper, worn wood. */
:root { --ac: #E6B95A; --ac2: #FFE9A8; --night: #1E100E; --dusk: #5A1E26; --plum: #3A1A1E; --cran: #C8414E; --cream: #FFF8EA; --ink: #241A2E; --ed: 'Cormorant Garamond', Georgia, serif; --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--night); color: var(--cream); font-family: var(--sans); line-height: 1.45; overflow-x: clip; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, p, dl, dd, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
[hidden] { display: none !important; }
.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: 8px; }
.skip:focus { top: 8px; }
:focus-visible { outline: 3px solid #7FD4F5; outline-offset: 3px; }

/* ---------- the two controls at the top, the details pill, the sound hint ---------- */
#menu-wrap { position: fixed; left: 10px; top: 10px; z-index: 9040; }
#b-menu { min-height: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid rgba(255, 248, 234, .4); background: rgba(30, 16, 14, .92); color: #fff; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; font-size: 13px; }
#menu { margin-top: 8px; display: grid; gap: 6px; padding: 8px; border-radius: 14px; background: rgba(30, 16, 14, .98); border: 1px solid rgba(255, 248, 234, .25); min-width: 230px; }
#menu button { min-height: 44px; text-align: left; padding: 0 12px; border-radius: 9px; border: 0; background: rgba(255, 255, 255, .1); color: #fff; font-size: 15px; }
#menu button[aria-pressed="true"] { background: var(--ac); color: var(--ink); }
#ev-pill { position: fixed; left: 50%; bottom: max(10px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 9030; min-height: 40px; padding: 0 16px; border-radius: 20px; border: 1px solid rgba(255, 248, 234, .45); background: rgba(30, 16, 14, .94); color: #fff; font-size: 13px; letter-spacing: .04em; }
#snd-hint { position: fixed; left: 50%; bottom: calc(max(10px, env(safe-area-inset-bottom)) + 48px); transform: translateX(-50%); z-index: 9030; padding: 6px 12px; border-radius: 14px; background: rgba(30, 16, 14, .94); color: #fff; font-size: 12px; white-space: nowrap; transition: opacity .4s; pointer-events: none; }
#snd-hint.gone { opacity: 0; }

/* ---------- a scene: a pinned picture, and the words in front ---------- */
.sc { position: relative; background: var(--night); }
.stage { position: sticky; top: 0; height: 100vh; height: 100lvh; overflow: hidden; z-index: 0; }
.flow { position: relative; z-index: 1; margin-top: -100vh; margin-top: -100lvh; }
.flow, .beat { pointer-events: none; }
.beat > * { pointer-events: auto; }
.ly, .ov { position: absolute; inset: 0; pointer-events: none; }
.ly svg { display: block; width: 100%; height: 100%; overflow: visible; }
.ov { opacity: 0; z-index: 4; }
.beat { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 76px 16px 96px; text-align: center; }
.beat.tall { min-height: 120vh; justify-content: flex-start; padding-top: 15vh; }
.beat.top { justify-content: flex-start; padding-top: 84px; }
.beat.out { min-height: 70vh; justify-content: flex-end; padding-bottom: 24vh; }
.cue { font-weight: 900; font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; padding: 7px 14px; border-radius: 16px; background: rgba(30, 16, 14, .9); color: #fff; }
.cue::after { content: '  ↓'; }
.linkish { background: none; border: 0; padding: 10px 8px; min-height: 44px; text-decoration: underline; text-underline-offset: 3px; font-size: 14px; color: inherit; opacity: .9; }
.linkish.light { color: #fff; background: rgba(30, 16, 14, .85); border-radius: 12px; }
.minor { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 14px; }
.fine { font-size: 12.5px; opacity: .85; }
.fine.light { padding: 4px 12px; border-radius: 12px; background: rgba(30, 16, 14, .8); }
.plate { font-weight: 900; letter-spacing: .16em; font-size: clamp(11px, 3.1vw, 14px); padding: 8px 16px; border-radius: 20px; background: rgba(30, 16, 14, .9); color: var(--ac2); border: 1px solid var(--ac); }
.pre { font-family: var(--ed); font-weight: 600; letter-spacing: .5em; font-size: clamp(14px, 4vw, 20px); color: var(--ac2); margin-bottom: -10px; padding-left: .5em; }
.order { font-family: var(--ed); font-weight: 700; font-size: clamp(44px, 13vw, 104px); line-height: .98; max-width: 8em; color: var(--ac2); text-shadow: 0 3px 0 rgba(0, 0, 0, .35), 0 0 34px rgba(255, 217, 138, .55); overflow-wrap: anywhere; }
/* the storyteller's lines */
.narr { font-family: var(--ed); font-style: italic; font-weight: 500; font-size: clamp(19px, 5.2vw, 26px); line-height: 1.25; max-width: 24em; padding: 9px 16px; border-radius: 14px; background: rgba(30, 16, 14, .8); color: var(--cream); overflow-wrap: anywhere; }
.narr.big { font-size: clamp(24px, 6.8vw, 40px); font-weight: 600; line-height: 1.15; max-width: 16em; }
.narr:empty { display: none; }
body.nonarr .narr:not(.key) { display: none; }
.btn-big { min-height: 56px; padding: 10px 26px; border-radius: 30px; border: 2px solid var(--ac2); background: linear-gradient(180deg, #8A3A40, #5A1E26); color: #fff; font-weight: 900; font-size: clamp(15px, 4.2vw, 19px); line-height: 1.2; letter-spacing: .05em; box-shadow: 0 5px 0 #1E100E, 0 0 24px rgba(255, 217, 138, .35); touch-action: manipulation; max-width: 100%; }
.btn-big:active { transform: translateY(3px); box-shadow: 0 2px 0 #1E100E; }
.btn-big.champ { background: linear-gradient(180deg, #FFE9A8, #E6B95A); color: var(--ink); border-color: var(--ink); box-shadow: 0 5px 0 #7A5A2A; }
.unit { width: 100%; max-width: 520px; padding: 20px 14px 14px; border-radius: 20px; display: grid; gap: 12px; justify-items: center; }
.unit h2 { font-family: var(--ed); font-weight: 700; font-size: clamp(25px, 6.6vw, 34px); line-height: 1.1; color: var(--ac2); }
.unit.glass { background: linear-gradient(180deg, rgba(42, 36, 96, .92), rgba(30, 16, 14, .96)); border: 1px solid rgba(255, 233, 168, .5); box-shadow: 0 16px 44px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .12); }

/* ---------- 5. the invitation ---------- */
#s5 .beat { padding-top: 120px; }
.invite { position: relative; width: 100%; max-width: 600px; padding: clamp(50px, 11vw, 62px) clamp(16px, 5vw, 40px) clamp(20px, 5vw, 34px); display: grid; gap: 11px; justify-items: center; color: var(--ink); background: linear-gradient(180deg, #FFFDF6, #F4E8CE); border-radius: 8px; box-shadow: inset 0 0 0 2px #FFFDF6, inset 0 0 0 4px #E6B95A, inset 0 0 0 7px #FFFDF6, inset 0 0 0 8px #C8414E, 0 26px 50px rgba(0, 0, 0, .55); }
.s-seal { position: absolute; left: 50%; top: -62px; width: 92px; margin-left: -46px; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .4)); transform-origin: 50% 0; } .s-seal svg { display: block; width: 100%; height: auto; }
#s5.open .s-seal { animation: hang 1.8s cubic-bezier(.3, 1.4, .5, 1) both; }
@keyframes hang { from { transform: translateY(-120px) rotate(-18deg); opacity: 0; } 55% { transform: rotate(8deg); opacity: 1; } 80% { transform: rotate(-4deg); } to { transform: none; } }
#s5.open .invite { animation: bloom 1.1s ease .2s both; }
@keyframes bloom { from { opacity: 0; transform: scale(.94); } }
.s-top { font-weight: 900; font-size: clamp(11px, 3.1vw, 13px); letter-spacing: .22em; color: var(--cran); }
#t-title { font-family: var(--ed); font-style: italic; font-weight: 700; font-size: clamp(27px, 7.6vw, 42px); line-height: 1.08; overflow-wrap: anywhere; }
.invite .rule { width: 60%; height: 3px; background: linear-gradient(90deg, transparent, #E6B95A, transparent); }
.invite .event { font-family: var(--ed); font-weight: 700; font-size: clamp(22px, 6vw, 30px); line-height: 1.15; overflow-wrap: anywhere; min-height: 1.1em; }
.invite .when { font-weight: 900; font-size: clamp(16px, 4.6vw, 20px); }
.invite .where { font-size: clamp(15px, 4.3vw, 18px); overflow-wrap: anywhere; }
.invite .dress, .invite .with { font-size: 15px; overflow-wrap: anywhere; }
.invite .note { font-family: var(--ed); font-style: italic; font-size: clamp(17px, 4.6vw, 20px); line-height: 1.3; max-width: 26em; overflow-wrap: anywhere; }
.invite .closing { font-family: var(--ed); font-style: italic; font-weight: 600; font-size: clamp(18px, 5vw, 22px); color: var(--cran); overflow-wrap: anywhere; }
.acts, .row-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 8px 22px; border-radius: 24px; border: 2px solid var(--ac); background: var(--ac); color: var(--ink); font-weight: 900; font-size: 15px; letter-spacing: .03em; }
.btn.ghost { background: transparent; color: var(--ac); }
.invite .btn { border-color: var(--plum); background: var(--plum); color: var(--cream); } .invite .btn.ghost { background: transparent; color: var(--plum); }
.btn:disabled { opacity: .5; }

/* ---------- the details, the reply, the card to share ---------- */
.after { position: relative; z-index: 2; background: #2A1614; color: var(--cream); padding: 30px 16px calc(96px + env(safe-area-inset-bottom)); display: grid; gap: 34px; justify-items: center; }
.after section { width: 100%; max-width: 560px; display: grid; gap: 14px; }
.after h2 { font-family: var(--ed); font-weight: 700; font-size: 30px; color: var(--ac); }
.det { display: grid; gap: 11px; }
.det div { display: grid; gap: 1px; padding-bottom: 10px; border-bottom: 1px solid rgba(255, 248, 234, .2); }
.det dt { font-weight: 900; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ac); }
.det dd { font-size: 17px; overflow-wrap: anywhere; }
.row-acts { justify-content: flex-start; }
.going { font-size: 14px; color: var(--ac2); }
#rsvp-form { display: grid; gap: 14px; }
.f { display: grid; gap: 6px; font-size: 14px; color: #F0DCCB; }
.f input[type="text"], .f textarea { width: 100%; min-height: 48px; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(255, 248, 234, .5); background: var(--night); color: #fff; font: inherit; font-size: 16px; }
.ans { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.ans label { display: flex; gap: 10px; align-items: center; min-height: 54px; padding: 8px 12px; border-radius: 14px; border: 1px solid rgba(255, 248, 234, .35); background: var(--night); font-size: 15px; cursor: pointer; overflow-wrap: anywhere; }
.ans label:has(input:checked) { border-color: var(--ac); background: #5A1E26; box-shadow: inset 0 0 0 1px var(--ac); }
.ans input { width: 20px; height: 20px; accent-color: var(--ac); flex: none; }
.ans b { color: var(--ac2); }
.step { display: flex; align-items: center; gap: 14px; }
.step button { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--ac); background: transparent; color: var(--ac); font-size: 22px; }
.step output { min-width: 1.5em; text-align: center; font-size: 20px; color: #fff; }
#err { min-height: 1.3em; font-size: 14px; color: #F0DCCB; } #err.err { color: #FFB0B8; }
#done { display: grid; gap: 8px; padding: 18px; border-radius: 14px; border: 1px solid var(--ac); background: var(--night); justify-items: start; }
#done-t { font-family: var(--ed); font-weight: 700; font-size: 28px; color: var(--ac2); } #done-t:focus { outline: none; }
#r-closed { padding: 14px; border-radius: 10px; background: var(--night); }
#card { text-align: center; justify-items: center; padding: 24px 16px; border-radius: 22px; background: var(--night); border: 1px solid var(--ac); }
#card .c-top { font-weight: 900; letter-spacing: .2em; font-size: 12.5px; color: var(--ac); }
.after .c-h { font-family: var(--ed); font-style: italic; font-weight: 700; font-size: clamp(28px, 8vw, 40px); line-height: 1.1; color: #fff; max-width: 12em; overflow-wrap: anywhere; }
#card-cv { display: block; width: min(100%, 300px); height: auto; border-radius: 14px; box-shadow: 0 10px 24px rgba(0, 0, 0, .5); }
.c-acts { justify-content: center; }
.foot { font-size: 12px; opacity: .65; text-align: center; max-width: 30em; }


/* ---------- the opening of a scene: its heading and its toy are on the first screen, over the whole picture (never inside a small window) ---------- */
.beat.first { justify-content: flex-start; padding-top: 72px; gap: 10px; }
.beat.first .order { font-size: clamp(38px, 11vw, 84px); }
.beat.first .narr.big { font-size: clamp(20px, 5.6vw, 32px); }
.beat.short { min-height: 60vh; }
.btn-big:disabled { opacity: .5; cursor: default; }
a.linkish { display: inline-flex; align-items: center; }

/* ---------- 1. the clock, and the room that changes with it ---------- */
#s1 .era { opacity: 0; transition: opacity 1.1s ease; }
#s1[data-era="0"] .e0, #s1[data-era="1"] .e1, #s1[data-era="2"] .e2, #s1[data-era="3"] .e3 { opacity: 1; }
#s1 .glow { opacity: .2; transition: opacity 1.1s ease; }
#s1[data-era="1"] .glow { opacity: .45; } #s1[data-era="2"] .glow { opacity: .7; } #s1[data-era="3"] .glow { opacity: 1; }
.notebtn { display: grid; gap: 4px; justify-items: center; min-height: 64px; padding: 14px 24px; border: 0; border-radius: 4px; background: linear-gradient(180deg, #FFF8E8, #F0DFC0); color: var(--ink); font-family: 'Caveat', var(--ed); font-size: clamp(22px, 6vw, 28px); line-height: 1.1; transform: rotate(-2deg); box-shadow: 0 10px 22px rgba(0, 0, 0, .5); touch-action: manipulation; }
.notebtn b { font-family: var(--sans); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--cran); }
/* the note under the tree is itself what you tap (there is no "Open it" button): a real button laid over the room, exactly where the note lies */
.notel { pointer-events: none; transition: opacity 1.1s ease; }
.note-hit { position: absolute; width: clamp(88px, 13vw, 136px); transform: translate(-50%, -62%); padding: 0; border: 0; background: transparent; pointer-events: auto; cursor: pointer; touch-action: manipulation; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .5)); }
.note-hit svg { display: block; width: 100%; height: auto; overflow: visible; }
.note-hit .n-open { opacity: 0; transition: opacity .6s ease; } .note-hit .n-shut { transition: opacity .4s ease; } .note-hit .n-glow { animation: beacon 2.2s ease-in-out infinite alternate; }
.note-hit.open { pointer-events: none; cursor: default; } .note-hit.open .n-open { opacity: 1; } .note-hit.open .n-shut { opacity: 0; } .note-hit.open .n-glow { display: none; }
#s1:not([data-era="0"]) .notel { opacity: 0; } #s1:not([data-era="0"]) .note-hit { pointer-events: none; }
.clockbox { width: 100%; display: grid; justify-items: center; gap: 10px; }
.clockrow { width: 100%; display: flex; align-items: center; justify-content: center; gap: clamp(6px, 2.4vw, 22px); }
.clock { flex: none; width: clamp(168px, 48vw, 270px); aspect-ratio: 1; border-radius: 50%; touch-action: none; cursor: grab; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .55)); }
.clock:active { cursor: grabbing; }
.clock svg { display: block; width: 100%; height: 100%; }
.clock .hand { transform: rotate(calc(var(--era, 0) * -90deg)); transition: transform .9s cubic-bezier(.4, 1.3, .5, 1); }
.clock .stop { opacity: .5; transition: opacity .4s ease; }
.clock[data-era="0"] .p0, .clock[data-era="1"] .p1, .clock[data-era="2"] .p2, .clock[data-era="3"] .p3 { opacity: 1; }
.rnd { flex: none; width: clamp(66px, 19vw, 104px); min-height: 66px; padding: 6px; border-radius: 18px; border: 1px solid var(--ac2); background: rgba(30, 16, 14, .9); color: #fff; font-weight: 900; font-size: clamp(12px, 3.3vw, 14px); line-height: 1.15; touch-action: manipulation; }
.rnd:disabled { opacity: .4; cursor: default; }
#era-cap { min-height: 2.7em; display: grid; align-items: center; }

/* ---------- 2 and 3: the whole screen is the picture, and what can be touched or is said is laid over it, exactly where it belongs ---------- */
.full { position: relative; width: 100%; height: max(100vh, 620px); overflow: hidden; pointer-events: auto; }
@supports (height: 100svh) { .full { height: max(100svh, 620px); } }
.full-art, .full-art svg { display: block; position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.full-head { position: absolute; left: 0; right: 0; top: 72px; z-index: 4; display: grid; justify-items: center; gap: 7px; padding: 0 14px; pointer-events: none; text-align: center; }
.progress { font-weight: 900; font-size: 14px; color: var(--ac2); padding: 4px 12px; border-radius: 12px; background: rgba(30, 16, 14, .82); }

/* the ornament box: each ornament is a button. In the box it waits; pressed, it travels to its place on the tree and its tag is written beside it */
#trim .tl { opacity: 0; transition: opacity 2s ease .6s; } #trim.lit .tl { opacity: 1; }
.orn { position: absolute; z-index: 3; padding: 0; border: 0; background: transparent; cursor: pointer; touch-action: manipulation; transform: translate(-50%, -50%); transition: left 1.1s cubic-bezier(.4, 0, .2, 1), top 1.1s cubic-bezier(.3, -.3, .3, 1); filter: drop-shadow(0 5px 6px rgba(0, 0, 0, .45)); }
.orn svg { display: block; width: 100%; height: auto; overflow: visible; }
.orn:not(.hung) svg { animation: nudge 3.4s ease-in-out infinite; } .orn:nth-of-type(2n):not(.hung) svg { animation-delay: -1.7s; }
@keyframes nudge { 0%, 86%, 100% { transform: rotate(0); } 90% { transform: rotate(-7deg); } 95% { transform: rotate(6deg); } }
.orn.hung { transform: translate(-50%, -8%); }
.tag { position: absolute; z-index: 5; width: max-content; max-width: min(46vw, 250px); padding: 8px 12px 9px; border-radius: 3px; background: linear-gradient(180deg, #FFF8E8, #F0DFC0); color: var(--ink); font-family: 'Caveat', var(--ed); font-size: clamp(19px, 5vw, 24px); line-height: 1.08; text-align: left; box-shadow: 0 8px 16px rgba(0, 0, 0, .45); pointer-events: none; overflow-wrap: anywhere; animation: tagin .5s ease 1s both; }
.tag::before { content: ''; position: absolute; top: 50%; width: 22px; border-top: 2px solid #E6B95A; }
.tag.r { transform: translate(34px, -30%) rotate(2deg); } .tag.r::before { right: 100%; }
.tag.l { transform: translate(calc(-100% - 34px), -30%) rotate(-2deg); } .tag.l::before { left: 100%; }
@keyframes tagin { from { opacity: 0; } }

/* the three moments: what somebody says is a bubble right at them */
.mo + .mo { border-top: 10px solid #2A1A10; }
.bub { position: absolute; z-index: 4; width: max-content; max-width: min(58vw, 300px); padding: 9px 14px 10px; border-radius: 18px; background: #FFFDF6; color: var(--ink); font-weight: 700; font-size: clamp(15px, 4.1vw, 19px); line-height: 1.2; text-align: center; transform: translate(-50%, calc(-100% - 12px)); box-shadow: 0 8px 18px rgba(0, 0, 0, .4); pointer-events: none; overflow-wrap: anywhere; opacity: 0; transition: opacity .6s ease; }
.bub::after { content: ''; position: absolute; left: 50%; top: 100%; margin-left: -9px; border: 9px solid transparent; border-top-color: #FFFDF6; border-bottom: 0; }
.bub.low { transform: translate(-30%, -100%); font-style: italic; } .bub.low::after { left: 22%; }
.bub:empty { display: none; }
.mo.seen .bub.on { opacity: 1; } .mo.seen .bub.on[data-b="1"] { transition-delay: 1.4s; } .mo.seen .bub.on[data-b="2"] { transition-delay: .9s; }
.doorbtn { position: absolute; z-index: 3; padding: 0; border: 0; border-radius: 6px; background: transparent; cursor: pointer; touch-action: manipulation; }
#mo-2 .d-open { opacity: 0; transition: opacity .9s ease; } #mo-2.open .d-open { opacity: 1; } #mo-2.open .d-shut { opacity: 0; transition: opacity .6s ease .3s; }
#mo-2:not(.open) .d-shut { animation: knock 2.6s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes knock { 0%, 80%, 100% { transform: none; } 84% { transform: translateX(-2px); } 88% { transform: translateX(2px); } 92% { transform: translateX(-1px); } }
#mo-2.open .doorbtn { cursor: default; }


/* ---------- 4. the same room, tonight ---------- */
#s4 .then { transition: opacity 2.2s ease; } #s4.now .then { opacity: 0; }
#s4 .tonight, #s4 .door, #s4 .folk, #s4 .arrivals { opacity: 0; transition: opacity 1.5s ease; }
#s4.now .tonight { opacity: 1; transition-delay: .9s; } #s4.now .door { opacity: 1; transition-delay: 2.8s; } #s4.now .arrivals { opacity: 1; transition-delay: 3.8s; } #s4.now .folk { opacity: 1; transition-delay: 4.8s; }
#s4 .ring { opacity: 0; transform-box: fill-box; transform-origin: center; }
#s4.now .ring { animation: ring 2.6s ease-out 6s infinite; } #s4.now .ring.r1 { animation-delay: 6.5s; } #s4.now .ring.r2 { animation-delay: 7s; }
@keyframes ring { from { opacity: .6; transform: scale(.8); } to { opacity: 0; transform: scale(1.35); } }
#s4 .dark { background: var(--night); }
#l-back, #l-pay, #l-make, #b-reveal { display: none; }
#s4.now #b-now { display: none; }
#s4.now #l-back { display: block; animation: fadeup 1s ease 2.2s both; }
#s4.now #l-pay { display: block; animation: fadeup 1.2s ease 6s both; }
#s4.now #l-make { display: block; animation: fadeup 1s ease 8.4s both; }
#s4.now #b-reveal { display: inline-block; animation: fadeup .8s ease 9.8s both; }
@keyframes fadeup { from { opacity: 0; transform: translateY(16px); } }
/* shown without the performance: a reload, reduced motion, the editor, or a guest who scrolled past */
#s4.quiet *, #s4.quiet { transition: none !important; } #s4.quiet #l-back, #s4.quiet #l-pay, #s4.quiet #l-make, #s4.quiet #b-reveal { animation: none !important; }

/* ---------- 5. the note: handwriting, and it unfolds once ---------- */
#t-title { font-family: 'Caveat', var(--ed); font-style: normal; font-size: clamp(32px, 9vw, 52px); line-height: 1.02; }
.invite { background-image: linear-gradient(180deg, #FFF8E8, #F4E6C8); }
#s5.open .invite { transform-origin: 50% 0; animation: unfold 1.3s cubic-bezier(.3, 1.2, .5, 1) .2s both; }
@keyframes unfold { from { opacity: 0; transform: perspective(900px) rotateX(-78deg); } }
.s-seal { color: #E6B95A; }

/* ---------- the small motion in the pictures (slow, and never a strobe) ---------- */
.tw { animation: shimmer 2.8s ease-in-out infinite alternate; } .tw.t1 { animation-delay: -.7s; } .tw.t2 { animation-delay: -1.4s; } .tw.t3 { animation-delay: -2.1s; }
.wf { animation: shimmer 4s ease-in-out infinite alternate; } .wf.w1 { animation-delay: -1.3s; } .wf.w2 { animation-delay: -2.6s; }
@keyframes shimmer { from { opacity: 1; } to { opacity: .5; } }
.steam { animation: steam 4s ease-in-out infinite; } .steam.s1 { animation-delay: -2s; }
@keyframes steam { from { opacity: 0; transform: translateY(4px); } 40% { opacity: .9; } to { opacity: 0; transform: translateY(-8px); } }
.note { animation: note 3.6s ease-in-out infinite; } .note.n1 { animation-delay: -1.8s; }
@keyframes note { from { opacity: 0; transform: translateY(8px); } 40% { opacity: 1; } to { opacity: 0; transform: translateY(-14px); } }
/* a scene off the screen rests */
.sc.off .stage *, .sc.off .flow * { animation-play-state: paused !important; }

/* ---------- reduced motion: every word and control stays; the camera and the performances go ---------- */
body.rm *, body.rm *::before, body.rm *::after { animation: none !important; transition: none !important; }
body.rm .ov { display: none; }
body.rm .bub.on { opacity: 1; }
@media (max-width: 420px) { .beat { padding-left: 10px; padding-right: 10px; } .unit { padding: 16px 10px 12px; } .full-head { top: 64px; } }
