:root {
  --ink: #070504;
  --cream: #f3e9d7;
  --gold: #e6b566;
  --red: #c21f30;
  --dim: rgba(243, 233, 215, 0.62);
  --serif: "Cormorant Garamond", Georgia, serif;
  --bn: "Tiro Bangla", "Cormorant Garamond", serif;
  --hi: "Tiro Devanagari Hindi", "Cormorant Garamond", serif;
  --sans: "Jost", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; background: #000; overflow: hidden; overscroll-behavior: none; }
body {
  display: grid; place-items: center;
  color: var(--cream); font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

#stage {
  position: relative;
  width: min(100vw, calc(100vh * 0.6)); height: 100vh;
  width: min(100vw, calc(100dvh * 0.6)); height: 100dvh;
  background: var(--ink); overflow: hidden;
  container-type: size;
  touch-action: manipulation; cursor: pointer;
}
#scene, .shot { position: absolute; inset: 0; }
.shot { opacity: 0; transition: opacity 0.9s ease; overflow: hidden; }
.shot.on { opacity: 1; }

#fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }
.vignette {
  position: absolute; inset: 0; pointer-events: none; z-index: 6;
  background: radial-gradient(ellipse at 50% 45%, transparent 55%, rgba(0, 0, 0, 0.5) 100%);
}
.grain {
  position: absolute; inset: -50%; pointer-events: none; z-index: 6; opacity: 0.1; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 0.9s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-4%, 3%); } 40% { transform: translate(3%, -5%); }
  60% { transform: translate(-6%, -2%); } 80% { transform: translate(5%, 4%); } 100% { transform: translate(0, 0); }
}

/* ---------- chrome ---------- */
#progress {
  position: absolute; z-index: 8; left: 4cqw; right: 4cqw; top: calc(1.4cqh + env(safe-area-inset-top));
  display: flex; gap: 1.2cqw; opacity: 0; transition: opacity 0.6s;
}
#progress.on { opacity: 1; }
#progress i { flex: 1; height: 2px; background: rgba(243, 233, 215, 0.22); border-radius: 2px; overflow: hidden; }
#progress i b { display: block; height: 100%; width: 0; background: var(--gold); transition: width 0.6s ease; }

#mute {
  position: absolute; z-index: 9; right: 4cqw; top: calc(3.2cqh + env(safe-area-inset-top));
  font: 500 10px/1 var(--sans); letter-spacing: 0.22em; text-transform: uppercase; color: var(--dim);
  padding: 8px 4px; opacity: 0; transition: opacity 0.6s;
}
#mute.on { opacity: 1; }
#next, #prev {
  position: absolute; z-index: 9; bottom: calc(3.4cqh + env(safe-area-inset-bottom));
  width: 46px; height: 46px; border-radius: 50%;
  font: 400 26px/1 var(--serif); padding-bottom: 4px;
  opacity: 0; pointer-events: none; transition: opacity 0.5s, transform 0.3s;
}
#next { right: 5cqw; border: 1px solid rgba(230, 181, 102, 0.7); color: var(--gold); background: rgba(7, 5, 4, 0.45); }
#prev { left: 5cqw; color: var(--dim); }
#next.on { opacity: 1; pointer-events: auto; animation: breathe 2.4s ease-in-out infinite; }
#prev.on { opacity: 0.55; pointer-events: auto; }
#next.nudge { animation: nudge 0.4s; }
@keyframes breathe { 50% { box-shadow: 0 0 0 7px rgba(230, 181, 102, 0.12); } }
@keyframes nudge { 30% { transform: translateX(-5px); } 60% { transform: translateX(4px); } }

/* ---------- type ---------- */
.date, .hint, .lbl, .kicker {
  font: 500 11px/1.3 var(--sans); letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold);
}
.date.bn { font: 400 19px/1.3 var(--bn); letter-spacing: 0.02em; text-transform: none; }
.line { font-size: clamp(20px, 6.1cqw, 28px); line-height: 1.24; font-weight: 500; text-wrap: balance; }
.line.bn { font-family: var(--bn); font-weight: 400; font-size: clamp(17px, 5.2cqw, 24px); line-height: 1.5; }
.line.hi { font-family: var(--hi); font-weight: 400; font-size: clamp(17px, 5.2cqw, 24px); line-height: 1.55; }
.line.en { font-style: italic; }
.fade { opacity: 0; transform: translateY(8px); transition: opacity 1.1s ease, transform 1.1s ease; }
.fade.in { opacity: 1; transform: none; }
.big { font-size: clamp(54px, 19cqw, 92px); line-height: 0.95; font-weight: 500; letter-spacing: -0.01em; }
.big.hi { font-family: var(--hi); font-weight: 400; line-height: 1.25; }
.big.bn { font-family: var(--bn); font-weight: 400; line-height: 1.25; }
.counter { display: flex; align-items: baseline; gap: 2.4cqw; }
.counter .num { font-size: clamp(34px, 11cqw, 52px); line-height: 1; font-weight: 500; color: var(--gold); font-variant-numeric: tabular-nums lining-nums; }
.hint { color: var(--dim); letter-spacing: 0.2em; font-size: 10px; }
.hint::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); margin-right: 8px; animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: 0.2; } }

/* ---------- photo shots ---------- */
.frame { position: absolute; overflow: hidden; background: #000; }
.full .frame { inset: 0; }
.band .frame { left: 0; right: 0; top: 9%; height: 52%; }
.frame img, .frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--p0, 50% 50%); }
.frame img.kb { animation: kb 18s ease-out both; }
.frame img.kb.out { animation-name: kbout; }
@keyframes kb { from { transform: scale(1.02); object-position: var(--p0, 50% 50%); } to { transform: scale(1.1); object-position: var(--p1, var(--p0, 50% 50%)); } }
@keyframes kbout { from { transform: scale(1.12); object-position: var(--p0, 50% 50%); } to { transform: scale(1.02); object-position: var(--p1, var(--p0, 50% 50%)); } }
.scrim { position: absolute; inset: 0; pointer-events: none; }
.full .scrim {
  background:
    linear-gradient(to top, rgba(7, 5, 4, 0.94) 0%, rgba(7, 5, 4, 0.72) 22%, rgba(7, 5, 4, 0) 54%),
    linear-gradient(to bottom, rgba(7, 5, 4, 0.55), rgba(7, 5, 4, 0) 14%);
}
.copy { position: absolute; left: 0; right: 0; padding: 0 7cqw; display: flex; flex-direction: column; gap: 2.6cqw; pointer-events: none; }
.full .copy { bottom: calc(12cqh + env(safe-area-inset-bottom)); }
.band .copy { top: 64.5%; }
.band .big { font-size: clamp(44px, 15cqw, 72px); }
.inset {
  position: absolute; right: 6cqw; top: 12cqh; width: 27cqw; aspect-ratio: 3 / 4; object-fit: cover;
  border: 4px solid var(--cream); border-bottom-width: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  transform: rotate(5deg) scale(0.6); opacity: 0; transition: opacity 0.8s 1.8s, transform 0.8s 1.8s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.on .inset { opacity: 1; transform: rotate(5deg) scale(1); }
canvas.smear { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; mix-blend-mode: multiply; }

/* ---------- poster ---------- */
.poster .scrim { background: linear-gradient(to top, rgba(7, 5, 4, 0.97) 4%, rgba(7, 5, 4, 0.5) 30%, rgba(7, 5, 4, 0.05) 48%, rgba(7, 5, 4, 0.1) 62%, rgba(7, 5, 4, 0.78) 100%); }
.poster .copy { bottom: calc(6cqh + env(safe-area-inset-bottom)); align-items: center; text-align: center; gap: 2cqw; pointer-events: auto; }
.poster .head { position: absolute; top: calc(5cqh + env(safe-area-inset-top)); left: 0; right: 0; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 1cqw; }
.poster h1 { font: italic 500 clamp(72px, 27cqw, 130px)/1 var(--serif); letter-spacing: -0.01em; color: var(--cream); text-shadow: 0 2px 30px rgba(0, 0, 0, 0.7); margin-top: 1cqw; }
.poster .tagline { font-style: italic; font-size: clamp(18px, 5.4cqw, 24px); color: var(--gold); text-shadow: 0 1px 12px rgba(0, 0, 0, 0.8); }
.poster .billing { font: 400 10px/1.7 var(--sans); letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim); max-width: 78cqw; margin-top: 2cqw; }
.clock { display: flex; gap: 4.5cqw; margin-top: 4cqw; }
.clock div { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.clock b { font: 500 clamp(26px, 8.6cqw, 40px)/1 var(--serif); font-variant-numeric: tabular-nums lining-nums; }
.clock span { font: 500 9px/1 var(--sans); letter-spacing: 0.24em; text-transform: uppercase; color: var(--dim); }
.poster .lockmsg { font-size: 16px; color: var(--dim); margin-top: 2cqw; }
.poster .lockmsg.shake { animation: nudge 0.4s; color: var(--cream); }
.pill {
  margin-top: 4cqw; padding: 13px 28px; border: 1px solid var(--gold); border-radius: 40px; color: var(--gold);
  font: 500 12px/1 var(--sans); letter-spacing: 0.26em; text-transform: uppercase; background: rgba(7, 5, 4, 0.4);
  animation: breathe 2.4s ease-in-out infinite;
}

/* ---------- certificate ---------- */
.certificate { display: grid; place-items: center; background: #050403; }
.cert {
  width: 86cqw; padding: 7cqw 6cqw; background: #efe6d2; color: #1c1611;
  outline: 1px solid #1c1611; outline-offset: -8px; box-shadow: 0 0 80px rgba(230, 181, 102, 0.16);
  display: flex; flex-direction: column; gap: 4cqw; text-align: center;
}
.cert h2 { font: 500 11px/1.6 var(--sans); letter-spacing: 0.24em; text-transform: uppercase; }
.cert hr { border: 0; border-top: 1px solid #1c1611; }
.cert dl { display: grid; grid-template-columns: auto 1fr; gap: 2.4cqw 4cqw; text-align: left; align-items: baseline; }
.cert dt { font: 500 9px/1.4 var(--sans); letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.6; }
.cert dd { font-size: clamp(16px, 4.8cqw, 21px); font-weight: 600; line-height: 1.3; }
.cert .ua { align-self: center; width: 62px; height: 62px; border: 2px solid #1c1611; display: grid; place-items: center; font: 600 22px/1 var(--serif); }
.cert .notice { font: italic 500 16px/1.4 var(--serif); opacity: 0.85; }
.certificate .begin { position: absolute; bottom: calc(7cqh + env(safe-area-inset-bottom)); left: 0; right: 0; text-align: center; }

/* ---------- title + card ---------- */
.title, .card { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 0 8cqw; gap: 4cqw; }
.title h1 { font: italic 500 clamp(84px, 30cqw, 150px)/1.05 var(--serif); letter-spacing: -0.01em; display: flex; }
.title h1 span { opacity: 0; transform: translateY(18px) scale(0.92); transition: opacity 0.9s, transform 0.9s cubic-bezier(0.2, 1.2, 0.4, 1); text-shadow: 0 0 40px rgba(230, 181, 102, 0.35); }
.title h1 span.in { opacity: 1; transform: none; }
.title .rule { width: 0; height: 1px; background: var(--gold); transition: width 1.4s ease 1.6s; }
.title.on .rule { width: 30cqw; }
.title .line, .card .line { font-size: clamp(18px, 5.2cqw, 23px); }
.card .big { color: var(--cream); }

/* ---------- sparkler reveal ---------- */
canvas.mask { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; transition: opacity 1.8s ease; }
canvas.mask.gone { opacity: 0; pointer-events: none; }
.prompt { position: absolute; left: 0; right: 0; top: 40%; text-align: center; pointer-events: none; transition: opacity 0.8s; display: flex; flex-direction: column; gap: 3cqw; align-items: center; }
.prompt.gone { opacity: 0; }
.prompt .p1 { font: italic 500 clamp(34px, 11cqw, 50px)/1.2 var(--serif); }
.prompt .p1.en { font: italic 500 clamp(30px, 9cqw, 42px)/1.2 var(--serif); }

/* ---------- boop ---------- */
.boop .frame img.b { opacity: 0; }
.boop.done .frame img.b { opacity: 1; }
.boop.done .frame { animation: pop 0.45s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.05); } 100% { transform: scale(1); } }
.boop .prompt { top: auto; bottom: 46%; }
.boopword { position: absolute; z-index: 3; font: italic 600 34px/1 var(--serif); color: var(--gold); pointer-events: none; animation: boopword 1.1s ease-out forwards; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7); }
@keyframes boopword { from { opacity: 1; transform: translate(-50%, -50%) scale(0.5) rotate(-8deg); } to { opacity: 0; transform: translate(-50%, -190%) scale(1.3) rotate(-8deg); } }

/* ---------- pouts ---------- */
.pouts { display: flex; flex-direction: column; padding: calc(8cqh + env(safe-area-inset-top)) 6cqw calc(13cqh + env(safe-area-inset-bottom)); gap: 3cqw; }
.pouts header { text-align: center; display: flex; flex-direction: column; gap: 1.5cqw; }
.pouts h2 { font: italic 500 clamp(30px, 9.4cqw, 42px)/1.1 var(--serif); }
.pouts .grid { flex: 1; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 2.4cqw; min-height: 0; }
.tile { position: relative; overflow: hidden; background: #111; border: 1px solid rgba(243, 233, 215, 0.25); }
.tile img { position: absolute; max-width: none; }
.tile .num { position: absolute; left: 8px; top: 6px; font: 500 10px/1 var(--sans); letter-spacing: 0.2em; color: var(--cream); text-shadow: 0 1px 4px #000; }
.stamp {
  position: absolute; left: 50%; bottom: 10%; width: 82%; padding: 7px 6px; text-align: center;
  font: 500 10px/1.35 var(--sans); letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold); border: 2px solid var(--gold); background: rgba(7, 5, 4, 0.72);
  transform: translateX(-50%) rotate(-7deg) scale(2.2); opacity: 0;
}
.tile.done .stamp { animation: stamp 0.35s cubic-bezier(0.2, 1.3, 0.4, 1) forwards; }
@keyframes stamp { to { transform: translateX(-50%) rotate(-7deg) scale(1); opacity: 1; } }
.pouts footer { min-height: 9cqh; display: grid; place-items: center; text-align: center; }

/* ---------- leap ---------- */
.leap video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.7s; }
.leap video.show { opacity: 1; }
.leap .scrim { background: linear-gradient(to top, rgba(7, 5, 4, 0.9) 0%, rgba(7, 5, 4, 0.3) 40%, rgba(7, 5, 4, 0) 60%); transition: opacity 0.6s; }
.leap.falling .scrim { opacity: 0.35; }
.leap .copy { bottom: calc(13cqh + env(safe-area-inset-bottom)); transition: opacity 0.5s; }
.leap .copy.top { bottom: auto; top: calc(9cqh + env(safe-area-inset-top)); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75), 0 2px 18px rgba(0, 0, 0, 0.9); }
.leap .count { position: absolute; left: 0; right: 0; top: 30%; text-align: center; font: 500 clamp(70px, 26cqw, 120px)/1.2 var(--serif); color: var(--cream); text-shadow: 0 4px 30px rgba(0, 0, 0, 0.8); pointer-events: none; }
.leap .count span { display: inline-block; animation: countin 0.5s cubic-bezier(0.2, 1.4, 0.4, 1); }
@keyframes countin { from { transform: scale(0.4); opacity: 0; } }
.hold {
  position: absolute; left: 50%; bottom: calc(14cqh + env(safe-area-inset-bottom)); width: 132px; height: 132px; margin-left: -66px;
  border-radius: 50%; display: grid; place-items: center; touch-action: none;
  opacity: 0; pointer-events: none; transition: opacity 0.6s, transform 0.2s;
  background: rgba(7, 5, 4, 0.5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.hold.show { opacity: 1; pointer-events: auto; }
.hold.down { transform: scale(0.94); }
.hold svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.hold circle { fill: none; stroke-width: 3; }
.hold .trk { stroke: rgba(243, 233, 215, 0.3); }
.hold .prg { stroke: var(--gold); stroke-linecap: round; stroke-dasharray: 289; stroke-dashoffset: 289; }
.hold span { font: 500 11px/1.5 var(--sans); letter-spacing: 0.24em; text-transform: uppercase; text-align: center; }
.hold small { display: block; font: italic 500 15px/1.3 var(--serif); letter-spacing: 0; text-transform: none; color: var(--gold); margin-top: 4px; }
.leap.shake { animation: shake 0.5s linear 3; }
@keyframes shake { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(-3px, 2px); } 50% { transform: translate(3px, -2px); } 75% { transform: translate(-2px, -3px); } }

/* ---------- cake ---------- */
.cake { background: radial-gradient(ellipse at 50% 46%, #2a1a0c 0%, #0c0805 55%, #050403 100%); transition: background 1.2s; touch-action: none; }
.cake .glow { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 44%, rgba(255, 170, 60, 0.26), transparent 60%); transition: opacity 0.5s; pointer-events: none; }
.cake .pre { top: calc(9cqh + env(safe-area-inset-top)); text-align: center; align-items: center; transition: opacity 0.8s; }
.candles { position: absolute; left: 12cqw; right: 12cqw; top: 28%; height: 38%; }
.candle { position: absolute; width: 8px; height: 30px; margin: -15px 0 0 -4px; border-radius: 2px; background: linear-gradient(to right, #d9c7a3, #fff7e6 45%, #b89f77); }
.candle::before { content: ""; position: absolute; left: 3.5px; top: -5px; width: 1px; height: 5px; background: #2b2118; }
.flame {
  position: absolute; left: 50%; top: -22px; width: 11px; height: 18px; margin-left: -5.5px;
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  background: radial-gradient(ellipse at 50% 78%, #fff 0%, #ffe9a8 28%, #ffb23e 60%, rgba(255, 120, 20, 0) 78%);
  box-shadow: 0 0 14px 5px rgba(255, 170, 60, 0.42); transform-origin: 50% 100%;
  animation: flicker 0.9s ease-in-out infinite alternate; transition: opacity 0.2s, transform 0.25s;
}
@keyframes flicker { 0% { transform: scale(1, 1) rotate(-3deg); } 50% { transform: scale(0.9, 1.1) rotate(2deg); } 100% { transform: scale(1.05, 0.94) rotate(4deg); } }
.candle.out .flame { opacity: 0; transform: scale(0.2, 1.6) translateX(8px); animation: none; }
.cake .actions { position: absolute; left: 0; right: 0; bottom: calc(15cqh + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; gap: 3.4cqw; transition: opacity 0.6s; }
.cake .actions .pill { margin: 0; }
.meter { width: 44cqw; height: 4px; border-radius: 4px; background: rgba(243, 233, 215, 0.16); overflow: hidden; display: none; }
.meter.on { display: block; }
.meter b { display: block; height: 100%; width: 0; background: var(--dim); transition: width 0.08s linear; }
.meter.hot b { background: var(--gold); }
.cake .wish { top: 34%; text-align: center; align-items: center; gap: 4cqw; }
.cake .wish .line { font-size: clamp(26px, 8.4cqw, 38px); }
.cake.blown .pre, .cake.blown .actions, .cake.blown .glow { opacity: 0; pointer-events: none; }
.cake.blown .candles { opacity: 0.16; transition: opacity 1.4s; }
.gone { opacity: 0 !important; pointer-events: none !important; }

/* ---------- match cut ---------- */
.match .frame img { inset: auto; width: auto; height: auto; max-width: none; object-fit: fill; opacity: 0; transition: opacity 1.5s ease; }
.match .frame img.show { opacity: 1; }
.match .lblbox { position: relative; height: 16px; }
.match .lblbox .date { position: absolute; left: 0; top: 0; white-space: nowrap; opacity: 0; transition: opacity 0.9s; }
.match .lblbox .date.show { opacity: 1; }

/* ---------- letter ---------- */
.letter .frame { inset: 0; }
.letter .frame img { filter: blur(22px) brightness(0.28) saturate(0.8); transform: scale(1.2); }
.letter .page {
  position: absolute; inset: calc(9cqh + env(safe-area-inset-top)) 0 calc(12cqh + env(safe-area-inset-bottom));
  padding: 0 8cqw; overflow-y: auto; display: flex; flex-direction: column; gap: 4.2cqw; scrollbar-width: none;
}
.letter .page::-webkit-scrollbar { display: none; }
.letter .line { font-size: calc(clamp(17px, 5cqw, 22px) * var(--fit, 1)); line-height: 1.4; text-wrap: pretty; }
.letter .line.en { font-style: normal; }
.letter .line.bn, .letter .line.hi { font-size: calc(clamp(16px, 4.6cqw, 20px) * var(--fit, 1)); }
.letter .line:first-child { font-size: clamp(28px, 9cqw, 38px); font-style: italic; color: var(--gold); }
.letter .line:last-child { color: var(--gold); margin-top: 2cqw; }

/* ---------- credits ---------- */
.credits video, .end video, .end .still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.credits .scrim, .end .scrim { background: rgba(7, 5, 4, 0.5); }
.end .scrim { background: linear-gradient(to top, rgba(7, 5, 4, 0.9), rgba(7, 5, 4, 0.1) 55%); }
.roll { position: absolute; left: 0; right: 0; top: 100%; padding: 0 9cqw; text-align: center; display: flex; flex-direction: column; gap: 7cqw; animation: roll linear both; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.8); }
@keyframes roll { to { transform: translateY(calc(-100% - 100cqh)); } }
.roll h1 { font: italic 500 clamp(64px, 24cqw, 110px)/1.05 var(--serif); }
.roll .sub { font-style: italic; font-size: 20px; color: var(--gold); margin-top: -5cqw; margin-bottom: 8cqw; }
.roll dt { font: 500 10px/1.4 var(--sans); letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold); margin-bottom: 1.4cqw; }
.roll dd { font-size: clamp(19px, 5.6cqw, 25px); line-height: 1.3; font-weight: 500; }
.roll .note { font-style: italic; font-size: 17px; color: var(--dim); margin-top: 8cqw; }
.end .copy { bottom: calc(26cqh + env(safe-area-inset-bottom)); text-align: center; align-items: center; }
.end .copy .line { font-size: clamp(34px, 11cqw, 50px); }
.end .actions { position: absolute; left: 0; right: 0; bottom: calc(8cqh + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; gap: 4cqw; }
.end .again { font: 500 10px/1 var(--sans); letter-spacing: 0.24em; text-transform: uppercase; color: var(--dim); padding: 8px; }
.post { position: absolute; inset: 0; z-index: 4; background: rgba(5, 4, 3, 0.94); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5cqw; padding: 0 9cqw; text-align: center; opacity: 0; pointer-events: none; transition: opacity 0.9s; }
.post.show { opacity: 1; pointer-events: auto; }
.post h2 { font: italic 500 clamp(30px, 9cqw, 40px)/1.1 var(--serif); color: var(--gold); }
.post p { font-size: clamp(19px, 5.6cqw, 24px); line-height: 1.4; }

@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  .frame img.kb { animation: none; }
}

/* fade the credit roll in and out at the edges */
.credits::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(7, 5, 4, 0.92) 0%, rgba(7, 5, 4, 0) 15%, rgba(7, 5, 4, 0) 82%, rgba(7, 5, 4, 0.9) 100%);
}
