:root {
  --cream: #fbf3e6;
  --ink: #4a3a44;
  --text: var(--cream);
  --wax: #a8596a;
  --serif: Fraunces, Georgia, 'Times New Roman', serif;
  --hand: 'La Belle Aurore', 'Bradley Hand', cursive;
  --top: max(env(safe-area-inset-top), 0px);
  --bot: max(env(safe-area-inset-bottom), 0px);
}
* { box-sizing: border-box; margin: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow: hidden; background: #1c2138; overscroll-behavior: none; }
body { font-family: var(--serif); color: var(--text); -webkit-font-smoothing: antialiased; user-select: none; -webkit-user-select: none; }
body.ink { --text: var(--ink); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
button:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.vignette { position: fixed; inset: 0; pointer-events: none; background: radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(30, 24, 40, .22)); }

/* captions */
#cap {
  position: fixed; left: 0; right: 0; top: calc(var(--top) + clamp(30px, 7dvh, 76px));
  padding: 0 24px; text-align: center; pointer-events: none;
  opacity: 0; transform: translateY(10px); transition: opacity .9s, transform .9s, color .8s;
}
#cap.on { opacity: 1; transform: none; transition-delay: .2s; }
#cap h2 { font-weight: 300; font-style: italic; font-size: clamp(30px, 5.2vw, 56px); line-height: 1.08; letter-spacing: -.01em; text-wrap: balance; text-shadow: 0 1px 3px rgba(8, 10, 40, .55), 0 2px 26px rgba(8, 10, 40, .75); }
#cap p { margin: 12px auto 0; max-width: 31em; font-size: clamp(16px, 2vw, 20px); line-height: 1.45; text-wrap: pretty; text-shadow: 0 1px 2px rgba(8, 10, 40, .8), 0 0 18px rgba(8, 10, 40, .85); }
body.ink #cap h2, body.ink #cap p { text-shadow: 0 0 18px rgba(255, 235, 200, .7); }

/* the big moment */
#big { position: fixed; inset: 0; display: grid; align-content: start; justify-content: center; text-align: center; padding: calc(var(--top) + clamp(40px, 9dvh, 96px)) 22px 0; pointer-events: none; opacity: 0; transition: opacity .8s; }
#big.on { opacity: 1; }
#big { z-index: 3; }
#big h1 { font-weight: 300; font-style: italic; font-size: clamp(50px, min(10.5vw, 15dvh), 128px); line-height: 1; letter-spacing: -.02em; color: var(--ink); text-wrap: balance; }
#big h1 { opacity: 0; }
#big.on h1 { animation: fade 1.4s .2s forwards; }
#big p { margin-top: 20px; font-size: clamp(17px, 2.1vw, 22px); color: var(--ink); opacity: 0; }
#big.on p { animation: fade 1.4s 1.8s forwards; }
@keyframes fade { to { opacity: 1; } }

/* a slip of paper with a reason on it */
#reason {
  position: fixed; left: 50%; bottom: calc(var(--bot) + 92px); width: min(86vw, 440px);
  padding: 16px 22px 18px; text-align: center; color: var(--ink); background: var(--cream);
  transform: translate(-50%, 24px) rotate(-1.2deg); opacity: 0; pointer-events: none;
  box-shadow: 0 1px 0 #fff inset, 0 14px 30px -10px rgba(90, 20, 50, .5);
  clip-path: polygon(0 3%, 12% 0, 31% 2%, 56% 0, 80% 2%, 100% 0, 99% 97%, 84% 100%, 60% 98%, 33% 100%, 13% 98%, 1% 100%);
}
#reason.on { animation: slip .7s cubic-bezier(.2, 1.3, .4, 1) forwards; }
@keyframes slip { to { transform: translate(-50%, 0) rotate(-1.2deg); opacity: 1; } }
#reason small { display: block; font-size: 12px; letter-spacing: .08em; opacity: .62; margin-bottom: 4px; }
#reason p { font-family: var(--hand); font-size: clamp(24px, 3.2vw, 29px); line-height: 1.22; text-wrap: balance; }

/* next */
#next {
  position: fixed; left: 50%; bottom: calc(var(--bot) + 22px); translate: -50% 0;
  display: flex; flex-direction: column; align-items: center; gap: 0; min-height: 56px; padding: 6px 20px;
  font-style: italic; font-size: 18px; color: var(--text); white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .7s;
}
#next.on { opacity: 1; pointer-events: auto; }
#next svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; animation: bob 1.7s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(5px); } }
#next.over-dark { color: var(--cream); text-shadow: 0 1px 10px rgba(30, 5, 15, .8); }
body:not(.ink) #next { text-shadow: 0 1px 10px rgba(5, 5, 25, .7); }

/* countdown gate */
#gate { position: fixed; left: 0; right: 0; bottom: calc(var(--bot) + 6dvh); text-align: center; padding: 0 20px; display: none; animation: rise 1.2s both; text-shadow: 0 1px 12px #000; }
#gate.on { display: block; }
#gate h2 { font-weight: 300; font-style: italic; font-size: 34px; }
#gate p { margin: 6px 0 16px; font-size: 16px; opacity: .86; }
.clock { display: flex; gap: clamp(14px, 4vw, 28px); justify-content: center; }
.clock b { display: block; font-weight: 300; font-size: clamp(30px, 8vw, 44px); font-variant-numeric: tabular-nums; }
.clock small { font-size: 12px; opacity: .7; }

/* mic */
#mic { position: fixed; left: 0; right: 0; bottom: calc(var(--bot) + 26px); display: grid; justify-items: center; gap: 8px; opacity: 0; pointer-events: none; transition: opacity .7s; text-align: center; padding: 0 20px; }
#mic.on { opacity: 1; pointer-events: auto; }
#mic button { min-height: 46px; padding: 0 24px; border-radius: 3px; color: var(--ink); background: var(--cream); font-style: italic; font-size: 17px; box-shadow: 0 8px 20px -6px rgba(0, 0, 0, .6); }
#mic.listening button { background: #ffc877; animation: breathe 1.2s infinite; pointer-events: none; }
#mic small { font-size: 14px; opacity: .8; }

/* envelope */
#envelope {
  --w: min(78vw, 340px); --h: calc(var(--w) * .64);
  position: fixed; left: 50%; bottom: calc(var(--bot) + 11dvh); width: var(--w); height: var(--h); margin-left: calc(var(--w) / -2);
  perspective: 900px; opacity: 0; pointer-events: none; transform: translateY(46px) rotate(-3deg); transition: opacity .9s, transform 1s cubic-bezier(.2, 1.2, .4, 1);
}
#envelope.on { opacity: 1; pointer-events: auto; transform: rotate(-2deg); }
#envelope span { position: absolute; }
#envelope .back { inset: 0; background: #dcc3a0 var(--leopard) 0 0 / 130px; }
#envelope .sheet { left: 6%; right: 6%; top: 7%; bottom: 7%; background: var(--cream); transition: transform 1s .45s cubic-bezier(.3, .8, .3, 1); box-shadow: 0 -2px 8px rgba(100, 50, 0, .22); }
#envelope .front { inset: 0; background: #efe0c8; clip-path: polygon(0 0, 50% 54%, 100% 0, 100% 100%, 0 100%); filter: drop-shadow(0 -1px 2px rgba(100, 50, 0, .3)); }
#envelope .flap { left: 0; right: 0; top: 0; height: 62%; background: #e6d4b8; clip-path: polygon(0 0, 100% 0, 50% 100%); transform-origin: top; transition: transform .7s cubic-bezier(.4, 0, .3, 1); z-index: 3; }
#envelope .seal { z-index: 4; left: calc(50% - 30px); top: calc(62% - 34px); width: 60px; height: 60px; display: grid; place-items: center; }
#envelope .half { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 36% 30%, #c98090, var(--wax) 55%, #7c3d4c); box-shadow: 0 3px 8px rgba(70, 30, 30, .4), inset 0 0 0 5px rgba(0, 0, 0, .08); transition: transform .9s cubic-bezier(.3, .6, .4, 1), opacity .9s; }
#envelope .a { clip-path: polygon(-20% -20%, 54% -20%, 44% 38%, 58% 62%, 47% 120%, -20% 120%); }
#envelope .b { clip-path: polygon(54% -20%, 120% -20%, 120% 120%, 47% 120%, 58% 62%, 44% 38%); }
#envelope .seal b { position: relative; font-style: italic; font-weight: 400; font-size: 26px; color: #f6dcd4; transition: opacity .4s; }
#envelope em { position: absolute; left: 0; right: 0; bottom: -32px; font-size: 16px; color: var(--ink); transition: opacity .3s; }
#envelope.open .flap { transform: rotateX(178deg); z-index: 0; }
#envelope.open em, #envelope.open .seal b { opacity: 0; }
#envelope.open .a { transform: translate(-30px, 56px) rotate(-50deg); opacity: 0; }
#envelope.open .b { transform: translate(28px, 64px) rotate(40deg); opacity: 0; }
#envelope.open .sheet { transform: translateY(-74%); }
#envelope.open { pointer-events: none; }

/* letter */
#letter {
  position: fixed; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: calc(var(--top) + 34px) 16px calc(var(--bot) + 44px);
  background: rgba(90, 70, 60, .26); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
  opacity: 0; pointer-events: none; transition: opacity .9s;
}
#letter.on { opacity: 1; pointer-events: auto; }
#letter article {
  max-width: 600px; margin: 0 auto; padding: clamp(30px, 7vw, 62px) clamp(24px, 7vw, 66px) 42px; color: #372046; background-color: #fff8ea;
  background-image: linear-gradient(transparent 97%, rgba(92, 60, 130, .1) 97%); background-size: 100% 42px;
  box-shadow: 0 30px 60px -22px rgba(80, 30, 10, .65); transform: translateY(40px) rotate(.4deg); transition: transform 1.1s cubic-bezier(.2, 1, .3, 1); user-select: text; -webkit-user-select: text;
}
#letter.on article { transform: rotate(.4deg); }
#letter .body p { font-family: var(--hand); font-size: clamp(25px, 5.4vw, 30px); line-height: 42px; margin-bottom: 42px; opacity: 0; transform: translateY(8px); transition: opacity 1.1s, transform 1.1s; }
#letter .body p.seen, #letter .after.seen { opacity: 1; transform: none; }
#letter .body .sign { margin: 0; }
#letter .body .name { font-size: clamp(36px, 8vw, 46px); margin: 0; }
#letter .after { margin-top: 34px; text-align: center; opacity: 0; transition: opacity 1s; }
#toCoupons { min-height: 46px; padding: 0 6px; font-style: italic; font-size: 17px; border-bottom: 1px solid currentColor; }

/* coupons */
#coupons { position: fixed; inset: 0; overflow-y: auto; padding: calc(var(--top) + 38px) 18px calc(var(--bot) + 30px); text-align: center; color: var(--ink); background: rgba(248, 236, 212, .72); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity .9s; }
#coupons.on { opacity: 1; pointer-events: auto; }
#coupons h2 { font-weight: 300; font-style: italic; font-size: clamp(34px, 6vw, 52px); }
#coupons > p { margin: 8px 0 24px; }
.list { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); max-width: 640px; margin: 0 auto 26px; }
.ticket {
  position: relative; padding: 20px 22px; text-align: left; overflow: hidden; color: var(--ink); background: var(--cream);
  -webkit-mask: radial-gradient(circle 11px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 11px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat;
  mask: radial-gradient(circle 11px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 11px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat;
  transition: transform .2s;
}
.ticket:active { transform: scale(.98); }
.ticket b { display: block; font-weight: 400; font-style: italic; font-size: 24px; }
.ticket span { font-size: 15px; opacity: .78; }
.ticket i { position: absolute; right: 18px; top: 50%; padding: 2px 8px; font-style: normal; font-size: 13px; letter-spacing: .1em; color: var(--wax); border: 2px solid var(--wax); transform: translateY(-50%) rotate(-12deg) scale(1.8); opacity: 0; transition: transform .28s cubic-bezier(.3, 1.6, .5, 1), opacity .2s; }
.ticket.used i { transform: translateY(-50%) rotate(-12deg); opacity: .88; }
#replay { min-height: 44px; font-style: italic; border-bottom: 1px solid currentColor; }

/* lightbox */
#lightbox { position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 20px; background: rgba(15, 5, 25, .78); opacity: 0; pointer-events: none; transition: opacity .35s; cursor: zoom-out; }
#lightbox.on { opacity: 1; pointer-events: auto; }
#lightbox img { max-width: min(90vw, 680px); max-height: 74dvh; background: #fff; padding: 12px; transform: scale(.9) rotate(-2deg); transition: transform .5s cubic-bezier(.2, 1.3, .4, 1); }
#lightbox.on img { transform: rotate(-1deg); }
#lightbox figcaption { font-family: var(--hand); font-size: 30px; color: var(--cream); text-align: center; }

/* sound */
#sound { position: fixed; right: calc(10px + env(safe-area-inset-right)); top: calc(var(--top) + 10px); width: 44px; height: 44px; display: grid; place-items: center; color: var(--text); opacity: .78; }
#sound svg { width: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
#sound .x { display: none; }
#sound.off .x { display: block; }
#sound.off .wave { display: none; }

/* loader */
#load { position: fixed; inset: 0; display: grid; place-items: center; background: #1c2138; color: var(--cream); font-style: italic; font-size: 18px; transition: opacity 1.1s; }
#load.gone { opacity: 0; pointer-events: none; }
#load span { animation: breatheText 1.6s ease-in-out infinite; }
@keyframes breatheText { 50% { opacity: .45; } }

.no-gl #gl, .no-gl #sound, .no-gl .vignette { display: none; }
.no-gl #letter .body p, .no-gl #letter .after { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01s !important; animation-iteration-count: 1 !important; transition-duration: .2s !important; }
}

/* fx layer */
#fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }

/* strike the match */
#strike { position: fixed; left: 0; right: 0; bottom: calc(var(--bot) + 5dvh); display: none; justify-items: center; gap: 10px; padding: 0 20px; text-align: center; text-shadow: 0 1px 10px rgba(10, 10, 30, .9); }
#strike.on { display: grid; animation: rise 1.1s both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
#strike h2 { font-weight: 300; font-style: italic; font-size: 26px; }
.matchbox { width: min(330px, 86vw); padding: 10px 12px 12px; border-radius: 7px; background: linear-gradient(180deg, #8c5a5c, #6d4348); box-shadow: 0 16px 30px rgba(10, 10, 25, .5); }
.box-label { display: flex; justify-content: space-between; align-items: baseline; color: #f4e2d2; text-shadow: none; }
.box-label b { font-style: italic; font-weight: 400; font-size: 15px; }
.box-label small { font-size: 11px; opacity: .8; }
.striker { position: relative; height: 34px; margin-top: 8px; border-radius: 4px; background-color: #4a3a36; background-image: radial-gradient(rgba(0, 0, 0, .35) 1px, transparent 1.6px); background-size: 5px 5px; box-shadow: inset 0 2px 4px rgba(0, 0, 0, .45); }
.match { position: absolute; left: 4px; top: 50%; width: 132px; height: 44px; transform: translate(var(--x, 0px), -50%); touch-action: none; cursor: grab; }
.match::before { content: ""; position: absolute; left: 0; right: 14px; top: 50%; height: 7px; margin-top: -3.5px; border-radius: 2px; background: linear-gradient(180deg, #f1dcb6, #c8a678); box-shadow: 0 2px 3px rgba(0, 0, 0, .35); }
.match .head { position: absolute; right: 0; top: 50%; width: 19px; height: 14px; margin-top: -7px; border-radius: 50% 62% 62% 50%; background: radial-gradient(circle at 40% 35%, #cf7c78, #8a4044 72%); }
.match.lit .head { background: radial-gradient(circle at 40% 35%, #4a3a36, #221a18 72%); }
.mflame { position: absolute; right: 1px; bottom: 24px; width: 15px; height: 30px; border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; background: radial-gradient(ellipse at 50% 84%, #fff 0 16%, #fff0c4 30%, #f8c878 56%, rgba(250, 170, 90, 0) 76%); opacity: 0; transform-origin: 50% 90%; filter: drop-shadow(0 0 10px rgba(255, 200, 130, .9)); pointer-events: none; }
.match.lit .mflame { opacity: 1; animation: flick 1.6s ease-in-out infinite; }
@keyframes flick { 25% { transform: scale(1.05, .95) rotate(1.5deg); } 50% { transform: scale(.96, 1.06) rotate(-2deg); } 75% { transform: scale(1.02, .98) rotate(1deg); } }
.match.jiggle { animation: jig .3s; }
@keyframes jig { 30% { transform: translate(calc(var(--x, 0px) + 8px), -50%) rotate(-3deg); } 70% { transform: translate(calc(var(--x, 0px) - 3px), -50%); } }
#strikeHint { font-style: italic; font-size: 15px; }
.sound-note { font-size: 13px; opacity: .72; }

/* the facebook story card */
#fb {
  position: fixed; left: 50%; bottom: calc(var(--bot) + 18px); width: min(92vw, 380px); max-height: 50dvh; margin-left: calc(min(92vw, 380px) / -2);
  display: none; padding: 16px; color: var(--ink); background: var(--cream); border-radius: 16px; box-shadow: 0 18px 40px -14px rgba(30, 30, 60, .55);
}
#fb.on { display: block; }
#fb.in { animation: card .6s cubic-bezier(.2, 1.2, .4, 1) both; }
@keyframes card { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.fb-row { display: flex; align-items: center; gap: 12px; font-size: 16px; line-height: 1.3; }
.fb-row b { font-weight: 500; }
.fb-av { flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; color: #fff; font-style: italic; font-size: 21px; background: #8fa6bd; }
.fb-av.her { background: #dcc3a0 var(--leopard) center / 90px; text-shadow: 0 1px 4px rgba(60, 40, 30, .9); }
.fb-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.fb-actions button { min-height: 44px; border-radius: 10px; font-size: 15px; transition: transform .25s, opacity .4s; }
.fb-yes { color: #fff; background: #7d9bb2; animation: nudge 2.2s ease-in-out infinite; }
@keyframes nudge { 50% { transform: scale(1.03); } }
.fb-no { background: #ece2d2; }
.fb-no.gone { opacity: 0; pointer-events: none; }
.fb-soft { margin-top: 10px; font-size: 14px; opacity: .68; text-align: center; }
.cal { text-align: center; }
.cal small { display: block; font-size: 13px; opacity: .7; }
.cal b { display: inline-block; font-weight: 300; font-style: italic; font-size: 34px; }
.cal b.flip { animation: flip .5s; }
@keyframes flip { from { transform: rotateX(80deg); opacity: 0; } }
.zero { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding: 10px 14px; border-radius: 10px; background: #ece2d2; font-size: 15px; }
.zero b { font-weight: 500; font-size: 20px; }
.ring-btn { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; text-align: left; font-size: 16px; line-height: 1.3; }
.ring-btn b { font-weight: 500; }
.ring-btn small { display: block; font-size: 13px; font-style: italic; opacity: .7; }
.ring { flex: none; padding: 3px; border-radius: 50%; background: conic-gradient(#e9b4bd, #f1d8a8, #b9cfc2, #e9b4bd); animation: spin 5s linear infinite; }
.ring .fb-av { border: 3px solid var(--cream); }
@keyframes spin { to { rotate: 360deg; } }
.ring .fb-av { animation: spin 5s linear infinite reverse; }
.story { position: relative; height: min(24dvh, 190px); display: grid; place-items: center; padding: 18px; border-radius: 10px; overflow: hidden; background: #dcc3a0 var(--leopard) center / 150px; }
.story.photo { background-size: cover; }
.story .bar { position: absolute; left: 10px; right: 10px; top: 8px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .85); transform-origin: left; animation: bar 6s linear both; }
@keyframes bar { from { transform: scaleX(0); } }
.story p { padding: 6px 12px; font-style: italic; font-size: 17px; background: rgba(253, 247, 236, .92); border-radius: 6px; }
.reply { display: flex; align-items: center; gap: 2px; min-height: 46px; margin-top: 10px; padding: 0 4px 0 14px; border-radius: 23px; background: #ece2d2; font-size: 15px; }
.reply span { overflow: hidden; white-space: nowrap; }
.caret { width: 1.5px; height: 18px; background: var(--ink); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
#send { margin-left: auto; flex: none; width: 40px; height: 40px; border-radius: 50%; opacity: .3; font-size: 16px; }
#send.ready { opacity: 1; color: #fff; background: #7d9bb2; animation: nudge 1.6s ease-in-out infinite; }
.thread { display: flex; flex-direction: column; gap: 7px; height: min(36dvh, 280px); overflow: hidden; justify-content: flex-end; }
.thread .b { max-width: 82%; padding: 8px 13px; border-radius: 17px; font-size: 15px; line-height: 1.3; animation: card .35s both; flex: none; }
.thread .b.me { align-self: flex-end; color: #fff; background: #7d9bb2; border-bottom-right-radius: 5px; }
.thread .b.her { align-self: flex-start; background: #ece2d2; border-bottom-left-radius: 5px; }
.thread .b.blur { height: 32px; padding: 0; opacity: .75; }
.thread .seen { align-self: flex-end; font-size: 12px; opacity: .6; }
.dots { display: flex; gap: 4px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); opacity: .4; animation: dot 1s infinite; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 40% { transform: translateY(-4px); opacity: .8; } }

/* meme deck */
#memes { position: fixed; left: 0; right: 0; top: calc(var(--top) + clamp(165px, 24dvh, 205px)); bottom: calc(var(--bot) + 86px); display: none; flex-direction: column; align-items: center; gap: 12px; padding: 0 16px; pointer-events: none; }
#memes.on { display: flex; animation: rise .8s both; }
.deck { position: relative; flex: 1; width: min(360px, 100%); min-height: 0; max-height: 440px; touch-action: pan-y; pointer-events: auto; }
.meme { position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden; border-radius: 16px; color: #2c2632; background: #fffdf8; box-shadow: 0 16px 36px -12px rgba(90, 70, 50, .55); transition: transform .45s cubic-bezier(.2, .8, .2, 1), opacity .45s; font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; font-size: 16px; line-height: 1.35; }
.meme.top { cursor: grab; }
.meme.drag { transition: none; cursor: grabbing; }
.m-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.m-foot { display: flex; justify-content: space-between; padding: 9px 16px; border-top: 1px solid #eee4d6; font-size: 12px; color: #8a8090; }
.impact { font-family: Anton, Impact, 'Arial Black', sans-serif; text-transform: uppercase; color: #fff; font-size: 30px; line-height: 1.05; text-align: center; text-shadow: 2px 2px 0 #000, -2px 2px 0 #000, 2px -2px 0 #000, -2px -2px 0 #000; }
.m-pad { display: grid; gap: 5px; padding: 16px 18px 12px; }
.m-line { font-size: 16px; font-weight: 500; }
.m-leo { flex: 1; display: grid; place-items: center; padding: 16px; background: #dcc3a0 var(--leopard) center / 150px; }
.m-choice { flex: 1; display: grid; grid-template-columns: 38% 1fr; grid-template-rows: 1fr 1fr; }
.m-face { display: grid; place-items: center; font-size: 56px; }
.m-face.no { background: #f7e4dc; border-bottom: 2px solid #2c2632; }
.m-face.yes { background: #e2efe2; }
.m-opt { display: flex; align-items: center; padding: 14px; font-size: 18px; font-weight: 650; border-left: 2px solid #2c2632; }
.m-opt.first { border-bottom: 2px solid #2c2632; }
.m-chat { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 14px; }
.m-chat-head { align-self: center; margin-bottom: 6px; font-size: 12px; font-weight: 600; color: #8a8090; }
.meme .b { max-width: 82%; padding: 9px 14px; border-radius: 19px; font-size: 15px; }
.meme .b.me { align-self: flex-end; color: #fff; background: #7d9bb2; border-bottom-right-radius: 6px; }
.meme .b.her { align-self: flex-start; background: #ece6dc; border-bottom-left-radius: 6px; }
.meme .b.act { font-style: italic; font-weight: 600; }
.m-brain { flex: 1; display: grid; grid-template-rows: repeat(4, 1fr); }
.m-brow { display: grid; grid-template-columns: 1fr 34%; border-bottom: 2px solid #2c2632; }
.m-brow:last-child { border-bottom: 0; }
.m-btxt { display: flex; align-items: center; padding: 6px 12px; font-size: 14px; font-weight: 650; }
.m-bimg { display: grid; place-items: center; border-left: 2px solid #2c2632; font-size: 30px; background: radial-gradient(circle, hsl(calc(210 + var(--g) * 30) 45% calc(30% + var(--g) * 15%)), #2a2838 82%); }
.m-bimg span { filter: drop-shadow(0 0 calc(var(--g) * 6px + 1px) #fff); }
.m-update { flex: 1; display: grid; justify-items: center; align-content: center; gap: 8px; padding: 18px; background: #f6f2ea; text-align: center; }
.m-ico { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 15px; background: #dcc3a0 var(--leopard) center / 90px; font-family: var(--serif); font-style: italic; font-size: 30px; color: #fff; text-shadow: 0 2px 6px rgba(60, 40, 30, .8); }
.m-update h4 { font-size: 17px; }
.m-sub { font-size: 13px; color: #7a7080; }
.m-update ul { display: grid; gap: 5px; padding: 0; list-style: none; text-align: left; font-size: 14px; }
.m-update li::before { content: "✓  "; color: #6f9a78; font-weight: 700; }
.m-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 4px; }
.m-btns span { padding: 7px 12px; border-radius: 8px; background: #fff; border: 1px solid #ddd5c8; font-size: 13px; }
.m-btns .pri { color: #fff; background: #7d9bb2; border-color: #7d9bb2; }
.m-vs { flex: 1; display: grid; grid-template-rows: 1fr 1fr; }
.m-vs-p { position: relative; display: grid; place-items: center; padding: 32px 20px 16px; text-align: center; font-size: 19px; font-weight: 650; }
.m-vs-p.exp { background: linear-gradient(135deg, #f7e4e6, #fbf1e0); }
.m-vs-p.real { color: #fff; background: #4c4556; border-top: 3px solid #2c2632; }
.m-tag { position: absolute; top: 9px; left: 11px; padding: 2px 8px; border-radius: 4px; color: #fff; background: #2c2632; font-family: Anton, Impact, sans-serif; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; }
.m-vs-p.real .m-tag { color: #2c2632; background: #fff; }
.m-pov, .m-img { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: space-between; align-items: center; padding: 16px; }
.m-pov { background: linear-gradient(160deg, #e9b4bd, #d9a0ac 45%, #f1d8a8); }
.m-big { font-size: 96px; line-height: 1; }
.m-img { background: #333; }
.m-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.m-img .impact { position: relative; }
.react { display: flex; align-items: center; gap: 6px; pointer-events: auto; }
.chip { width: 44px; height: 44px; border-radius: 50%; font-size: 20px; background: rgba(255, 252, 245, .78); transition: transform .2s; }
.chip:active { transform: scale(.9); }
.react .count { margin-left: 8px; font-size: 13px; color: var(--ink); }
.react .count b { font-weight: 500; }
.emo { position: fixed; z-index: 5; font-size: 26px; pointer-events: none; }

/* cake extras */
#mic { gap: 7px; }
#wish { width: min(320px, 84vw); padding: 8px 4px; font: italic 16px var(--serif); text-align: center; color: var(--cream); background: transparent; border: 0; border-bottom: 1px solid rgba(251, 243, 230, .4); border-radius: 0; user-select: text; -webkit-user-select: text; }
#wish::placeholder { color: rgba(251, 243, 230, .6); }
#wish:focus { outline: none; border-bottom-color: var(--cream); }
.floatwish { position: fixed; left: 50%; top: 56dvh; z-index: 3; max-width: 86vw; font-style: italic; font-size: 21px; color: var(--cream); text-align: center; pointer-events: none; }

/* lily counter */
#lilies { position: fixed; left: 50%; translate: -50% 0; bottom: calc(var(--bot) + 84px); width: max-content; max-width: 88vw; padding: 6px 14px; text-align: center; font-size: 14px; color: var(--ink); background: rgba(251, 243, 230, .9); border-radius: 4px; opacity: 0; pointer-events: none; transition: opacity .7s; }
#lilies.on { opacity: 1; }
#lilies b { font-weight: 500; }
#lilyLine { display: block; font-style: italic; font-size: 19px; }

/* scratch gift */
#coupons h2 { font-size: clamp(28px, 6vw, 44px); }
.gift { position: relative; width: min(100%, 460px); min-height: 210px; margin: 0 auto 26px; border-radius: 14px; overflow: hidden; text-align: left; background: var(--cream); box-shadow: 0 16px 34px -14px rgba(100, 70, 40, .5); }
.gift-in { display: grid; gap: 7px; padding: 24px; }
.gift-in small { font-size: 13px; opacity: .7; }
.gift-in h3 { font-weight: 300; font-style: italic; font-size: 26px; line-height: 1.12; }
.gift-in p { font-size: 15px; line-height: 1.45; }
#scratch { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; transition: opacity 1.2s; }
#scratch.done { opacity: 0; pointer-events: none; }
#afterGift { display: none; }
#afterGift.on { display: block; animation: rise 1.1s both; }
.end { margin: 10px 0 4px; font-weight: 300; font-style: italic; font-size: clamp(30px, 7vw, 44px); line-height: 1.08; }
.end em { font-style: italic; }
.made { margin-bottom: 14px; font-size: 14px; opacity: .72; }

/* the leopard lining shows when the flap folds back */
#envelope .flap::after { content: ""; position: absolute; inset: 0; background: #dcc3a0 var(--leopard) 0 0 / 130px; opacity: 0; transition: opacity .15s .3s; }
#envelope.open .flap::after { opacity: 1; }

/* small phones */
@media (max-height: 620px) {
  #cap { top: calc(var(--top) + 18px); }
  #cap h2 { font-size: 26px; }
  #cap p { margin-top: 6px; font-size: 15px; }
  #memes { top: calc(var(--top) + 128px); bottom: calc(var(--bot) + 84px); }
  .story { height: 20dvh; }
  .thread { height: 32dvh; }
  #strike { gap: 6px; bottom: calc(var(--bot) + 10px); }
  .sound-note { display: none; }
  #envelope { --w: min(68vw, 300px); bottom: calc(var(--bot) + 56px); }
}

/* a phone turned sideways */
@media (max-height: 460px) and (orientation: landscape) {
  #cap { top: calc(var(--top) + 8px); padding-right: 56px; padding-left: 56px; }
  #cap h2 { font-size: 22px; }
  #cap p { margin-top: 2px; font-size: 14px; }
  #memes { top: calc(var(--top) + 66px); bottom: 8px; flex-direction: row; justify-content: center; align-items: stretch; }
  .react { flex-direction: column; justify-content: center; }
  .react .count { margin: 0; }
  #next { bottom: 0; min-height: 44px; right: 12px; left: auto; translate: 0 0; flex-direction: row; gap: 4px; }
  #fb { left: auto; right: 14px; bottom: 10px; width: min(44vw, 340px); margin-left: 0; max-height: 72dvh; }
  .story { height: 26dvh; }
  .thread { height: 54dvh; }
  #strike { grid-template-columns: auto auto; align-items: center; column-gap: 16px; justify-content: center; }
  #strike h2 { grid-column: 1 / -1; font-size: 18px; }
  #mic { bottom: 8px; grid-template-columns: auto auto; justify-content: center; align-items: center; column-gap: 12px; }
  #mic small { grid-column: 1 / -1; }
  #big { padding-top: 12px; }
  #big h1 { font-size: clamp(34px, 14dvh, 60px); }
  #big p { margin-top: 6px; font-size: 15px; }
  #envelope { --w: 230px; bottom: 34px; }
  #reason { bottom: 8px; }
  #lilies { bottom: 40px; }
}


/* ================= the starry night ================= */
:root { --night: #0d0b1c; --dusk: #191531; --haze: #2a2350; --candle: #ffc070; --blush: #f3a6b9; --cream: #f7efe2; --wax: #8e1f33; --muted: #a59dc3; --hair: rgba(239, 233, 248, .14); --text: #efe9f8; }
html, body { background: var(--night); }
.vignette { background: radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(7, 6, 15, .5)); }
#fx { z-index: 30; }
#sound { z-index: 31; }
#cap h2 em { color: var(--blush); }
#big h1 { color: var(--candle); text-shadow: 0 0 30px rgba(255, 192, 112, .35); }
#big p { color: var(--text); }
#next, #next.over-dark { color: var(--candle); text-shadow: 0 1px 10px rgba(5, 5, 20, .9); }
#lilies { color: var(--text); background: rgba(13, 11, 28, .66); }
#lilyLine { color: var(--candle); }
#envelope em { color: var(--blush); }
#letter { background: rgba(7, 6, 15, .62); }
#coupons { color: var(--text); background: rgba(13, 11, 28, .86); }
#coupons h2 { color: var(--candle); }
.end { color: var(--candle); }
#replay { color: var(--blush); }
.react .count { color: var(--muted); }
.chip { background: rgba(42, 35, 80, .75); }
#wish { color: var(--text); }
#mic button { color: #2a1b10; background: var(--candle); }
.gift { box-shadow: 0 16px 34px -14px rgba(0, 0, 0, .7); }

/* the facebook card, at night */
#fb { color: var(--text); background: rgba(25, 21, 49, .94); border: 1px solid var(--hair); box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .8); }
.fb-av { background: #4a3f8a; }
.fb-yes { color: #2a1b10; background: var(--candle); }
.fb-no, .zero, .reply, .thread .b.her { color: var(--text); background: var(--haze); }
.cal b { color: var(--candle); }
.ring { background: conic-gradient(var(--blush), var(--candle), #cdb8ff, var(--blush)); }
.ring .fb-av { border-color: var(--dusk); }
.story p { color: #2c2234; }
.caret, .dots i { background: var(--text); }
#send.ready, .thread .b.me { color: #2a1b10; background: var(--candle); }
.meme .b.me, .m-btns .pri { background: #0a84ff; border-color: #0a84ff; }

/* the opening: one candle, one match */
#gatebox { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; overflow: hidden; padding: 24px 16px; background: radial-gradient(120% 90% at 50% 38%, #17132d 0%, #07060f 72%); transition: opacity 1.5s ease; }
#gatebox.gone { opacity: 0; pointer-events: none; }
.gate-inner { position: relative; display: grid; justify-items: center; gap: 22px; text-align: center; }
.eyebrow { font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
#gateTitle { font-style: italic; font-weight: 300; font-size: clamp(28px, 5vw, 40px); line-height: 1.1; transition: color 1s; }
#gatebox.lit #gateTitle { color: var(--candle); }
.candle-wrap { position: relative; width: 200px; height: 190px; display: flex; align-items: flex-end; justify-content: center; }
.glow { position: absolute; left: 50%; top: 40px; width: 24px; height: 24px; margin-left: -12px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 192, 112, .5), rgba(255, 139, 61, .14) 40%, transparent 70%); transform: scale(0); transition: transform 2.4s cubic-bezier(.2, .7, .1, 1); pointer-events: none; }
#gatebox.lit .glow { transform: scale(70); }
.g-candle { position: relative; width: 30px; height: 118px; border-radius: 5px 5px 3px 3px; background: linear-gradient(90deg, #cfc2ab, #fbf4e6 40%, #e8dcc6 78%, #c4b79f); }
.g-candle::before { content: ""; position: absolute; left: -2px; right: -2px; top: -4px; height: 10px; border-radius: 50%; background: #f3eadb; }
.wick { position: absolute; left: 50%; top: -12px; width: 2px; height: 12px; margin-left: -1px; background: #2a2018; border-radius: 1px; }
.flame { position: absolute; left: 50%; bottom: 100%; width: 16px; height: 34px; margin-left: -8px; margin-bottom: 4px; border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; background: radial-gradient(ellipse at 50% 84%, #fff 0 16%, #fff2b8 30%, #ffb347 56%, rgba(255, 120, 40, 0) 76%); transform-origin: 50% 90%; opacity: 0; transform: scale(.2); transition: opacity .4s, transform .6s cubic-bezier(.3, 1.6, .5, 1); filter: drop-shadow(0 0 10px rgba(255, 170, 70, .9)); pointer-events: none; }
#gatebox.lit .flame { opacity: 1; transform: scale(1); animation: flick 1.6s ease-in-out infinite; }
.strike { display: grid; justify-items: center; gap: 14px; }
#gatebox.lit .strike .hint { opacity: 0; }
.matchbox { background: linear-gradient(180deg, #8f2d2c, #6a1d21); box-shadow: 0 22px 40px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .14); }
.box-label { color: #f6dcc0; }
.striker { background-color: #4b2b1f; }
.match .head { background: radial-gradient(circle at 40% 35%, #d64b3f, #7a1313 72%); }
.hint { font-size: 14px; color: var(--muted); transition: opacity .6s; }
.hint span { display: block; font-family: var(--hand); font-size: 24px; color: var(--blush); }
.lockbox { display: grid; gap: 8px; justify-items: center; }
.lockbox .t { font-size: clamp(30px, 7vw, 46px); font-weight: 300; font-variant-numeric: tabular-nums; color: var(--candle); }
[hidden] { display: none !important; }

/* the constellation */
#stars { position: fixed; left: 0; right: 0; top: calc(var(--top) + clamp(128px, 19dvh, 170px)); bottom: calc(var(--bot) + 84px); display: none; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 0 12px; pointer-events: none; }
#stars.on { display: flex; animation: rise .9s both; }
#heart { flex: 1 1 auto; min-height: 0; width: 100%; max-width: 520px; overflow: visible; pointer-events: none; }
.seg { stroke: var(--candle); stroke-width: 1.3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: .8; transition: stroke-dashoffset 1.2s ease; }
.seg.on { stroke-dashoffset: 0; }
#heartFill { fill: var(--blush); opacity: 0; transition: opacity 2.5s; }
#heart.complete #heartFill { opacity: .16; }
#heart.complete .seg { stroke: var(--blush); opacity: 1; }
.star { cursor: pointer; outline: none; pointer-events: auto; }
.star .hit { fill: transparent; }
.star .halo { fill: var(--candle); opacity: 0; transition: opacity .8s, transform .8s; transform-box: fill-box; transform-origin: center; transform: scale(.4); }
.star .core { fill: #d5cdec; transform-box: fill-box; transform-origin: center; transition: fill .5s, transform .6s cubic-bezier(.3, 1.7, .5, 1); animation: pulse 2.6s ease-in-out var(--d, 0s) infinite; }
.star.lit .core { fill: var(--candle); transform: scale(1.6); animation: none; }
.star.lit .halo { opacity: .28; transform: scale(1); }
.star:focus-visible .halo { opacity: .4; transform: scale(1); }
@keyframes pulse { 50% { transform: scale(.6); opacity: .5; } }
.reason { flex: none; display: grid; gap: 6px; justify-items: center; width: min(100%, 520px); min-height: 122px; align-content: start; text-align: center; }
.reason .label { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.reason .text { font-style: italic; font-weight: 300; font-size: clamp(19px, 3.4vw, 26px); line-height: 1.26; text-wrap: balance; text-shadow: 0 1px 10px rgba(5, 5, 20, .9); }
.reason .text.swap { animation: rise .7s both; }
#stars .dots { flex-wrap: wrap; justify-content: center; gap: 7px; }
#stars .dots i { width: 6px; height: 6px; background: var(--hair); opacity: 1; animation: none; transition: background .4s; }
#stars .dots i.on { background: var(--candle); }

@media (max-height: 620px) {
  .gate-inner { gap: 12px; }
  .candle-wrap { height: 150px; }
  .g-candle { height: 84px; }
  #stars { top: calc(var(--top) + 112px); }
  .reason { min-height: 104px; }
}
@media (max-height: 460px) and (orientation: landscape) {
  .gate-inner { grid-template-columns: auto auto; column-gap: 26px; align-items: center; gap: 8px 26px; }
  .gate-inner .eyebrow, #gateTitle { grid-column: 1 / -1; }
  #gateTitle { font-size: 22px; }
  .candle-wrap { height: 130px; width: 120px; }
  .g-candle { height: 70px; }
  #stars { top: calc(var(--top) + 54px); bottom: 42px; flex-direction: row; gap: 18px; }
  #heart { flex: 0 1 44%; height: 100%; }
  .reason { width: 44%; }
}

/* the matchbox lives inside the candle screen */
#strike { position: static; display: grid; justify-items: center; gap: 14px; padding: 0; text-shadow: none; animation: none; }
@media (max-height: 460px) and (orientation: landscape) { #strike { grid-template-columns: 1fr; gap: 8px; } }


/* words stay readable whatever is behind them */
.gift, .gift-in { color: #2c2234; }
.gift-in small { color: #6a5a72; opacity: 1; }
.ticket { color: #2c2234; }
#next { border-radius: 22px; }
#next.on { background: rgba(13, 11, 28, .55); }
#big h1 { text-shadow: 0 1px 3px rgba(7, 6, 15, .8), 0 0 26px rgba(7, 6, 15, .75); }
#big p { justify-self: center; max-width: 30em; margin-top: 12px; padding: 7px 14px; border-radius: 10px; color: var(--text); background: rgba(13, 11, 28, .62); text-wrap: balance; }
#cap p, #cap h2 { text-shadow: 0 1px 3px rgba(7, 6, 15, .9), 0 0 16px rgba(7, 6, 15, .9); }

@media (max-height: 460px) and (orientation: landscape) { #envelope { --w: 205px; bottom: 44px; } }

/* the dua, as he sent it */
.thread .b.dua { max-width: 90%; display: grid; gap: 6px; padding: 10px 14px; }
.thread .b.dua .ar { font-family: 'Amiri', 'Geeza Pro', 'Noto Naskh Arabic', serif; font-size: 18px; line-height: 1.7; text-align: right; }
.thread .b.dua .tr { font-size: 12.5px; font-style: italic; line-height: 1.35; opacity: .85; }
.deck.done { pointer-events: none; }

#send.pressed { transform: scale(.82); transition: transform .12s; }

/* the chat, as she sees it on her own phone */
.thread .b.in { align-self: flex-start; color: var(--text); background: var(--haze); border-bottom-left-radius: 5px; }
.thread .b.out { align-self: flex-end; color: #2a1b10; background: var(--candle); border-bottom-right-radius: 5px; }
.thread-head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; margin-bottom: 8px; border-bottom: 1px solid var(--hair); font-size: 15px; }
.thread-head .fb-av { width: 32px; height: 32px; font-size: 15px; }
.thread-head b { font-weight: 500; }
.replied-to { align-self: flex-start; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); flex: none; }
.mini { width: 22px; height: 36px; border-radius: 4px; background: #d9a25c var(--leopard) center / 60px; flex: none; }
.mini[style] { background-size: cover; }
.story-who { position: absolute; left: 12px; top: 18px; font-size: 12px; color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .7); }
.notif { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--haze); font-size: 14px; line-height: 1.3; animation: card .5s cubic-bezier(.2, 1.2, .4, 1) both; }
.notif .fb-av { width: 34px; height: 34px; font-size: 16px; }
.notif b { font-weight: 500; }
.notif small { display: block; margin-top: 2px; font-style: italic; color: var(--candle); }
#stars .dots { margin-top: 14px; }

/* the letter, in his own hand */
#letter .body .hw { margin-bottom: 26px; }
#letter .body .hw.sign { margin-bottom: 0; }
#letter .body .hw canvas { display: block; }

/* ================= the final page: gift, coupons, goodbye ================= */
#coupons { padding: calc(var(--top) + 44px) 20px calc(var(--bot) + 48px); }
#coupons > h2 { line-height: 1.1; text-wrap: balance; }
#coupons > p { margin: 10px auto 26px; max-width: 30ch; color: var(--muted); }
.gift { margin-bottom: 0; }
#afterGift { width: min(100%, 460px); margin: 48px auto 0; padding-top: 36px; border-top: 1px solid var(--hair); }
#afterGift > h2 { margin: 0; line-height: 1.1; }
#afterGift > p:first-of-type { margin: 10px auto 26px; max-width: 30ch; font-size: 15px; line-height: 1.5; color: var(--muted); }
.list { gap: 14px; margin: 0 auto 52px; grid-template-columns: 1fr; }
.ticket { padding: 20px 24px; border-radius: 4px; }
.ticket b { margin-bottom: 4px; line-height: 1.15; }
.ticket span { display: block; line-height: 1.4; }
.end { margin: 0 0 12px; }
.made { max-width: 32ch; margin: 0 auto 26px; line-height: 1.5; color: var(--muted); opacity: 1; }
#replay { margin-bottom: 8px; }

/* stars she can actually see and want to tap on a small screen */
.star .aura { fill: #efe9f8; opacity: .14; transform-box: fill-box; transform-origin: center; animation: pulse 2.6s ease-in-out var(--d, 0s) infinite; }
.star.lit .aura { fill: var(--candle); opacity: .3; animation: none; }
.star .core { fill: #ece6fb; filter: drop-shadow(0 0 4px rgba(236, 230, 251, .7)); }
.star.lit .core { filter: drop-shadow(0 0 6px rgba(255, 192, 112, .9)); }

/* the sound button keeps its own little backdrop when content scrolls under it */
#sound { border-radius: 50%; background: rgba(13, 11, 28, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

/* small phones: keep the words clear of the sound button */
@media (max-height: 620px) and (orientation: portrait) {
  #cap { top: calc(var(--top) + 52px); }
  #memes { top: calc(var(--top) + 166px); }
  #stars { top: calc(var(--top) + 150px); }
}
@media (max-width: 400px) and (min-height: 621px) {
  #cap { top: calc(var(--top) + 58px); }
}

/* sideways phones: the meme card keeps its shape, reactions sit beside it */
@media (max-height: 460px) and (orientation: landscape) {
  #memes { justify-content: center; gap: 14px; }
  .deck { flex: 0 1 340px; width: 340px; max-height: none; }
  .react { flex: none; }
}
@media (max-height: 460px) and (orientation: landscape) { #memes { bottom: 50px; align-items: center; } .deck { align-self: stretch; } }
