/* Стили 15 открытий. .scene — сцена (полный экран или мини-превью), .obj — предмет внутри. */
.scene {
  position: relative; width: 100%; height: 100%; container-type: size; overflow: hidden; display: grid; place-items: center;
  background: var(--introbg, radial-gradient(120% 80% at 50% 40%, var(--paper), color-mix(in srgb, var(--paper) 72%, #000)));
  color: var(--ink); font-family: var(--serif), 'Cormorant Garamond', serif; -webkit-tap-highlight-color: transparent; cursor: pointer;
}
.scene.mini { cursor: inherit; pointer-events: none; }
.scene.mini:not(.is-scene) { background: none; overflow: visible; }
.scene.mini.is-scene { border-radius: 14px; box-shadow: 0 18px 36px -18px rgba(30, 15, 10, .55), 0 0 0 1px rgba(0, 0, 0, .05); }
.obj { position: relative; container-type: inline-size; }
.scene :is(b, small, span, em, p) { font-style: normal; }
.l-rule { width: 22cqw; height: 1px; background: linear-gradient(90deg, transparent, var(--acc), transparent); margin: 3cqw auto; opacity: .7; }

/* ---------- сургучная печать (фото) ---------- */
.seal { position: absolute; border: 0; padding: 0; background: none; cursor: pointer; aspect-ratio: 646 / 660; transform: translate(-50%, -50%); z-index: 6;
  filter: drop-shadow(0 9px 9px rgba(70, 30, 22, .32)) drop-shadow(0 2px 2px rgba(70, 30, 22, .3)); -webkit-tap-highlight-color: transparent; }
.sp { position: absolute; inset: 0; background: url(../img/seal.webp) center / 100% 100% no-repeat;
  -webkit-mask: url(../img/seal.webp) center / 100% 100% no-repeat; mask: url(../img/seal.webp) center / 100% 100% no-repeat; }
.seal-tint .sp { background-color: var(--sc); background-blend-mode: multiply; }
.seal-silver .sp { filter: grayscale(1) brightness(1.18) contrast(1.05); }
.sp.half { visibility: hidden; }
.sp.h-l { clip-path: polygon(0 0, 53% 0, 47% 17%, 55% 32%, 45.5% 49%, 54% 65%, 46.5% 82%, 51% 100%, 0 100%); }
.sp.h-r { clip-path: polygon(53% 0, 100% 0, 100% 100%, 51% 100%, 46.5% 82%, 54% 65%, 45.5% 49%, 55% 32%, 47% 17%); }
.sp.whole { animation: breathe 3.2s ease-in-out infinite; }
.mini .sp.whole, .opening .sp.whole { animation: none; }
@keyframes breathe { 50% { transform: scale(1.03); } }

/* ---------- 1–2. конверт ---------- */
.env2 {
  width: min(84cqw, 56cqh); aspect-ratio: 853 / 1280; perspective: 1900px; perspective-origin: 50% 0;
  --flap: polygon(0 0, 0% 58.25%, 9.38% 66.5%, 18.76% 74.75%, 28.14% 83%, 37.51% 91.25%, 43.03% 95.98%, 45.88% 97.58%, 48.77% 98.32%, 51.7% 98.2%, 54.67% 97.21%, 57.68% 95.36%, 63.89% 89.94%, 73.27% 81.58%, 82.65% 73.22%, 92.03% 64.86%, 100% 57.75%, 100% 0);
  --flap-m: polygon(0 100%, 0% 41.75%, 9.38% 33.5%, 18.76% 25.25%, 28.14% 17%, 37.51% 8.75%, 43.03% 4.02%, 45.88% 2.42%, 48.77% 1.68%, 51.7% 1.8%, 54.67% 2.79%, 57.68% 4.64%, 63.89% 10.06%, 73.27% 18.42%, 82.65% 26.78%, 92.03% 35.14%, 100% 42.25%, 100% 100%);
  --pocket: polygon(0% 36.25%, 9.38% 41.41%, 18.76% 46.56%, 28.14% 51.72%, 37.51% 56.88%, 43.03% 59.83%, 45.88% 60.83%, 48.77% 61.3%, 51.7% 61.22%, 54.67% 60.6%, 57.68% 59.45%, 63.89% 56.05%, 73.27% 50.83%, 82.65% 45.6%, 92.03% 40.38%, 100% 35.94%, 100% 100%, 0 100%);
  filter: drop-shadow(0 30px 40px rgba(20, 5, 5, .35));
}
.e-in { position: absolute; inset: 0; z-index: 1; background: var(--liner) 0 0 / 7cqw 7cqw, var(--linerbg); }
.e-in::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .3), rgba(0, 0, 0, .02) 40%, rgba(0, 0, 0, .2)); }
.e-letter {
  position: absolute; left: 9%; width: 82%; top: 26%; height: 70%; z-index: 3; container-type: inline-size;
  background: #f7f1e7 url(../img/paper.webp) 0 0 / 120% auto; box-shadow: 0 -1px 0 rgba(255, 255, 255, .6) inset, 0 10px 30px rgba(20, 0, 6, .35);
  display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 10cqw; color: #4a2a24;
}
.l-eye { font: 500 2.7cqw/1.4 'Manrope', sans-serif; letter-spacing: .3em; text-transform: uppercase; opacity: .75; padding: 0 8cqw; }
.l-names { font: 400 calc(15cqw * var(--ns, 1))/1.05 var(--script), cursive; color: var(--acc); margin: 4cqw 0 1cqw; display: flex; flex-direction: column; }
.l-names i { font: italic 300 .5em var(--serif), serif; opacity: .8; }
.l-date { font: 500 6cqw/1 var(--serif), serif; letter-spacing: .18em; }
.e-pocket-w { position: absolute; inset: 0; z-index: 4; pointer-events: none; filter: drop-shadow(0 -4px 6px rgba(40, 8, 14, .22)); }
.e-pocket { position: absolute; inset: 0; background: url(../img/envelope.webp) 0 0 / 100% 100% no-repeat; background-color: var(--envc); background-blend-mode: multiply; clip-path: var(--pocket); }
.e-flap { position: absolute; left: 0; top: 0; width: 100%; height: 62.5%; z-index: 5; transform-origin: 50% 0; transform-style: preserve-3d; pointer-events: none; }
.ff { position: absolute; inset: 0; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.ff-front { background: url(../img/envelope.webp) 0 0 / 100% 160% no-repeat; background-color: var(--envc); background-blend-mode: multiply; clip-path: var(--flap); }
.ff-shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(60, 25, 20, .35), rgba(60, 25, 20, .05)); opacity: 0; }
.ff-back { transform: rotateX(180deg); background: color-mix(in srgb, var(--envc) 80%, #fff) url(../img/paper.webp) 0 0 / 120% auto; background-blend-mode: multiply; clip-path: var(--flap-m); }
.e-seal { left: 50.9%; top: 58.6%; width: 36%; }
.e-emb {
  position: absolute; left: 50%; top: 70%; transform: translate(-50%, -50%); width: 24cqw; aspect-ratio: .78; border-radius: 50%; display: grid; place-items: center;
  font: 400 11cqw/1 'Great Vibes', cursive; color: transparent; white-space: nowrap;
  text-shadow: 1px 1px 1px rgba(255, 255, 255, .5), -1px -1px 1px rgba(0, 0, 0, .22);
  box-shadow: inset 1px 1px 1px rgba(255, 255, 255, .45), inset -1px -1px 1px rgba(0, 0, 0, .16), 1px 1px 1px rgba(255, 255, 255, .35), -1px -1px 1px rgba(0, 0, 0, .12);
}

/* ---------- 3. лента с бантом ---------- */
.rb { width: min(80cqw, 54cqh); aspect-ratio: .7; }
.rb-card {
  position: absolute; inset: 0; container-type: inline-size; text-align: center; border-radius: 2px; color: var(--ink);
  background: var(--cardc) url(../img/paper.webp) 0 0 / 140% auto; background-blend-mode: multiply;
  box-shadow: 0 30px 50px -24px rgba(0, 0, 0, .45), 0 2px 6px rgba(0, 0, 0, .08);
}
.rb-frame { position: absolute; inset: 5%; border: 1px solid color-mix(in srgb, var(--acc) 45%, transparent); }
.rb-frame::after { content: ''; position: absolute; inset: 1.4cqw; border: .5px solid color-mix(in srgb, var(--acc) 30%, transparent); }
.rb-top { position: absolute; top: 13%; left: 8%; right: 8%; }
.rb-top small { display: block; font: 500 2.7cqw/1.5 'Manrope', sans-serif; letter-spacing: .3em; text-transform: uppercase; opacity: .7; }
.rb-top b { display: flex; flex-direction: column; font: 400 calc(14cqw * var(--ns, 1))/1.02 var(--script), cursive; color: var(--acc); margin-top: 4cqw; }
.rb-top b i { font: italic 400 .45em var(--serif), serif; opacity: .8; }
.rb-bot { position: absolute; bottom: 9%; left: 0; right: 0; font-size: 5cqw; letter-spacing: .22em; font-weight: 500; }
.rb-bot small { display: block; font-size: 2.8cqw; letter-spacing: .32em; text-transform: uppercase; opacity: .7; margin-top: 1.5cqw; }
.rb-band { position: absolute; left: -1.5%; right: -1.5%; top: 64%; height: 8.5%; z-index: 2; }
.rb-band i { position: absolute; top: 0; bottom: 0; width: 50.5%; background: linear-gradient(180deg, var(--rib3), var(--rib) 35%, var(--rib2) 75%, var(--rib)); box-shadow: 0 3px 6px rgba(0, 0, 0, .22); }
.rb-band .l { left: 0; } .rb-band .r { right: 0; }
.rb-bow { position: absolute; left: 50%; top: 71.4%; width: 50%; transform: translate(-50%, -50%); z-index: 3; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .28)); }
.bow { display: block; width: 100%; }

/* ---------- 4. створки ---------- */
.gf { width: min(80cqw, 52cqh); aspect-ratio: .66; perspective: 1600px; }
.gf-in {
  position: absolute; inset: 2.5%; background: #f8f2e6 url(../img/paper.webp) 0 0 / 160% auto; color: #3b2f22; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: inset 0 0 30px rgba(0, 0, 0, .12);
}
.gf-in small { font: 500 2.6cqw/1.5 'Manrope', sans-serif; letter-spacing: .3em; text-transform: uppercase; opacity: .7; padding: 0 10cqw; }
.gf-in b { display: flex; flex-direction: column; font: 400 calc(14cqw * var(--ns, 1))/1.02 var(--script), cursive; color: var(--acc); margin: 4cqw 0; }
.gf-in b i { font: italic 400 .45em var(--serif), serif; }
.gf-in span { font-size: 5cqw; letter-spacing: .2em; }
.gf-d { position: absolute; top: 0; bottom: 0; width: 50%; overflow: hidden; z-index: 2; box-shadow: 0 24px 40px -20px rgba(0, 0, 0, .5); }
.gf-d.l { left: 0; transform-origin: 0 50%; }
.gf-d.r { right: 0; transform-origin: 100% 50%; }
.gf-d::after { content: ''; position: absolute; top: 0; bottom: 0; width: 8%; }
.gf-d.l::after { right: 0; background: linear-gradient(90deg, transparent, rgba(0, 0, 0, .22)); }
.gf-d.r::after { left: 0; background: linear-gradient(270deg, transparent, rgba(0, 0, 0, .22)); }
.gf-face { position: absolute; top: 0; bottom: 0; width: 200%; background: var(--doorc) url(../img/paper.webp) 0 0 / 160% auto; background-blend-mode: multiply; }
.gf-d.l .gf-face { left: 0; } .gf-d.r .gf-face { left: -100%; }
.gf-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.gf-emb {
  position: absolute; left: 50%; top: 50%; width: 30%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--gold) 40%, #fff), var(--gold) 55%, color-mix(in srgb, var(--gold) 60%, #000));
  box-shadow: 0 4px 12px rgba(0, 0, 0, .4), inset 0 0 0 1.2cqw rgba(255, 255, 255, .12), inset 0 0 0 1.5cqw rgba(0, 0, 0, .15);
}
.gf-emb b { font: 400 10cqw/1 'Great Vibes', cursive; color: color-mix(in srgb, var(--gold) 45%, #000); text-shadow: 1px 1px 0 rgba(255, 255, 255, .35); white-space: nowrap; }

/* ---------- 5. занавес ---------- */
.ct { position: absolute; inset: 0; --cd: color-mix(in srgb, var(--cc) 50%, #000); --cm: var(--cc); --cl: color-mix(in srgb, var(--cc) 72%, #fff); }
.ct-stage { position: absolute; inset: 0; background: radial-gradient(70% 55% at 50% 45%, #3a2a20, #0d0806); }
.ct-light { position: absolute; inset: 0; background: radial-gradient(45% 50% at 50% 42%, rgba(255, 228, 175, .4), transparent 70%); opacity: .2; }
.mini .ct-light { opacity: 1; }
.ct-txt { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #f3e6cc; padding: 0 12cqw; }
.ct-txt small { font: 500 2.8cqmin/1.5 'Manrope', sans-serif; letter-spacing: .3em; text-transform: uppercase; color: #d8b46a; }
.ct-txt b { display: flex; flex-direction: column; font: 400 calc(15cqmin * var(--ns, 1))/1.02 var(--script), cursive; color: #f6e6c4; margin: 4cqmin 0; text-shadow: 0 0 30px rgba(255, 210, 140, .35); }
.ct-txt b i { font: italic 400 .45em var(--serif), serif; color: #d8b46a; }
.ct-txt span { font-size: 5cqmin; letter-spacing: .2em; }
.ct-c {
  position: absolute; top: 0; bottom: 0; width: 51%; z-index: 2;
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(0, 0, 0, .5)), repeating-linear-gradient(90deg, var(--cd) 0, var(--cm) 3cqw, var(--cl) 4.6cqw, var(--cm) 6.2cqw, var(--cd) 9cqw);
  box-shadow: 0 0 40px rgba(0, 0, 0, .6);
}
.ct-c.l { left: 0; transform-origin: 0 50%; } .ct-c.r { right: 0; transform-origin: 100% 50%; }
.mini .ct-c { transform: scaleX(.42); }
.ct-val { position: absolute; left: 0; right: 0; top: 0; height: 11%; z-index: 3; background: linear-gradient(180deg, var(--cd), var(--cm) 55%, var(--cd)); box-shadow: 0 6px 16px rgba(0, 0, 0, .5); }
.ct-val::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1.2cqh; background: repeating-linear-gradient(90deg, #e7c77a 0 2px, #9a7630 2px 4px); }
.ct-val::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 3.4cqh; background: radial-gradient(ellipse at 50% 0, var(--cd) 62%, transparent 64%) 0 0 / 12.5% 100% repeat-x; }

/* ---------- 6. книга ---------- */
.bk { width: min(74cqw, 52cqh); aspect-ratio: .74; perspective: 2200px; }
.bk-page {
  position: absolute; inset: 0; background: #f8f2e6 url(../img/paper.webp) 0 0 / 160% auto; border-radius: 1cqw 2cqw 2cqw 1cqw; color: #3b2f22; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: .8cqw 0 0 #ece3d1, 1.6cqw 0 0 #e0d5bf, 2.2cqw .4cqw 0 #d2c5ab, 0 30px 50px -20px rgba(0, 0, 0, .5);
}
.bk-page small { font: 500 2.6cqw/1.5 'Manrope', sans-serif; letter-spacing: .3em; text-transform: uppercase; opacity: .7; padding: 0 10cqw; }
.bk-page b { display: flex; flex-direction: column; font: 400 calc(14cqw * var(--ns, 1))/1.02 var(--script), cursive; color: var(--acc); margin: 4cqw 0 1cqw; }
.bk-page b i { font: italic 400 .45em var(--serif), serif; }
.bk-page span { font-size: 5.4cqw; letter-spacing: .2em; }
.bk-page em { font-size: 3cqw; letter-spacing: .32em; text-transform: uppercase; margin-top: 2cqw; opacity: .7; }
.bk-cover { position: absolute; inset: 0; transform-origin: 0 50%; transform-style: preserve-3d; z-index: 2; }
.bk-front, .bk-back { position: absolute; inset: 0; -webkit-backface-visibility: hidden; backface-visibility: hidden; border-radius: 1cqw 2cqw 2cqw 1cqw; }
.bk-front {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  background: linear-gradient(90deg, rgba(0, 0, 0, .4), rgba(0, 0, 0, .05) 5%, rgba(255, 255, 255, .1) 6.5%, transparent 9%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 3px), repeating-linear-gradient(90deg, rgba(0, 0, 0, .05) 0 1px, transparent 1px 3px),
    url(../img/paper.webp) 0 0 / 200% auto, var(--bkc);
  background-blend-mode: normal, normal, normal, multiply, normal;
  box-shadow: 0 30px 50px -20px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.bk-frame { position: absolute; inset: 8% 8% 8% 12%; border: 1.5px solid var(--foil); opacity: .85; }
.bk-frame::after { content: ''; position: absolute; inset: 1.6cqw; border: .6px solid var(--foil); }
.bk-mono, .bk-title, .bk-year { background: linear-gradient(120deg, color-mix(in srgb, var(--foil) 70%, #000), color-mix(in srgb, var(--foil) 40%, #fff) 35%, var(--foil) 55%, color-mix(in srgb, var(--foil) 30%, #fff) 75%, color-mix(in srgb, var(--foil) 70%, #000)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bk-mono { font: 400 22cqw/1 'Great Vibes', cursive; padding: 0 3cqw; margin-left: 4%; }
.bk-title { font: 500 3.6cqw/1 var(--serif), serif; letter-spacing: .3em; text-transform: uppercase; margin: 5cqw 0 2cqw 4%; }
.bk-year { font: 500 3.2cqw/1 var(--serif), serif; letter-spacing: .4em; margin-left: 4%; }
.bk-back { transform: rotateY(180deg); background: var(--liner) 0 0 / 7cqw 7cqw, color-mix(in srgb, var(--bkc) 85%, #000); }

/* ---------- 7. стереть фольгу ---------- */
.sc { width: min(86cqw, 58cqh); aspect-ratio: .78; }
.sc-card {
  position: absolute; inset: 0; background: var(--paper) url(../img/paper.webp) 0 0 / 160% auto; background-blend-mode: multiply; color: var(--ink); text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 8cqw; border-radius: 3cqw;
  box-shadow: 0 30px 50px -24px rgba(0, 0, 0, .45), inset 0 0 0 2cqw var(--paper), inset 0 0 0 2.3cqw color-mix(in srgb, var(--acc) 50%, transparent);
}
.sc-card > small { font: 500 2.8cqw/1.5 'Manrope', sans-serif; letter-spacing: .3em; text-transform: uppercase; opacity: .75; }
.sc-card > b { display: flex; flex-direction: column; font: 400 calc(13cqw * var(--ns, 1))/1.02 var(--script), cursive; color: var(--acc); margin: 3cqw 0 0; }
.sc-card > b i { font: italic 400 .5em var(--serif), serif; color: var(--ink); }
.sc-row { display: flex; gap: 4cqw; margin: 7cqw 0 5cqw; align-items: center; }
.sc-c { position: relative; width: 20cqw; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; border: 1px dashed color-mix(in srgb, var(--acc) 60%, transparent); }
.sc-c:last-child { width: 25cqw; }
.sc-c span { font: 700 8cqw/1 var(--serif), serif; color: var(--acc); }
.sc-c:last-child span { font-size: 7cqw; }
.sc-c .foil, .sc-c canvas { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; touch-action: none; cursor: crosshair; }
.sc-c .foil { background: linear-gradient(135deg, #b8893a, #f4dc9a 35%, #c99b48 55%, #f1d48a 80%, #a87a2e); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); }
.sc-c.done span { animation: popin .5s cubic-bezier(.3, 1.6, .5, 1); }
.sc-note { font-size: 4cqw; font-style: italic; opacity: .7; }
.confetti { position: absolute; left: 50%; top: 55%; width: 2cqw; height: 3cqw; border-radius: 1px; animation: conf 1.5s cubic-bezier(.2, .6, .4, 1) forwards; }
@keyframes conf { to { transform: translate(var(--x), var(--y)) rotate(var(--r)); opacity: 0; } }
@keyframes popin { from { transform: scale(.6); } }

/* ---------- 8. цветок ---------- */
.bl { width: min(92cqw, 62cqh); aspect-ratio: 1; }
.bl-f { position: absolute; left: 50%; top: 52%; width: 0; height: 0; }
.pt {
  position: absolute; left: -10cqw; bottom: 0; width: 20cqw; height: 34cqw; transform-origin: 50% 100%;
  border-radius: 50% 50% 46% 46% / 64% 64% 36% 36%;
  background: radial-gradient(ellipse at 50% 100%, var(--c1) 8%, var(--c2) 70%, var(--c1));
  box-shadow: inset 0 -2px 6px rgba(0, 0, 0, .08), 0 1px 3px rgba(120, 40, 50, .2);
  transform: rotate(calc(var(--a) * .1)) scale(calc(var(--s) * .34));
  transition: transform 1.7s cubic-bezier(.2, .8, .2, 1) var(--d), opacity 1s;
}
.pt.sun { left: -4.5cqw; width: 9cqw; height: 27cqw; border-radius: 50% / 80% 80% 22% 22%; }
.bl.open .pt, .mini .pt { transform: rotate(var(--a)) scale(var(--s)); }
.bl.fly .pt { transform: rotate(var(--a)) translateY(-130%) scale(calc(var(--s) * 1.15)); opacity: 0; transition: transform 1.1s cubic-bezier(.4, 0, .6, 1) calc(var(--d) * .25), opacity .9s calc(var(--d) * .25); }
.bl-core { position: absolute; left: -6cqw; top: -6cqw; width: 12cqw; height: 12cqw; border-radius: 50%; background: radial-gradient(circle, #fbe9a0 0 25%, #f3c75a 50%, #e0a53a); transform: scale(.4); transition: transform 1.4s .6s; }
.bl-core.sun { left: -14cqw; top: -14cqw; width: 28cqw; height: 28cqw; background: repeating-conic-gradient(from 0deg, #5a3a1c 0 6deg, #3e2712 6deg 12deg), #3e2712; box-shadow: inset 0 0 0 2cqw rgba(90, 58, 28, .6), 0 0 0 .8cqw #6b4a22; }
.bl.open .bl-core, .mini .bl-core { transform: scale(1); }
.bl.fly .bl-core { transform: scale(0); transition: transform .8s; }
.bl-leaves i { position: absolute; left: 50%; top: 52%; width: 16cqw; height: 34cqw; margin-left: -8cqw; transform-origin: 50% 0; border-radius: 50% / 70% 70% 30% 30%; background: linear-gradient(#6e9a5a, #3f6b35); }
.bl-leaves i:nth-child(1) { transform: rotate(150deg); } .bl-leaves i:nth-child(2) { transform: rotate(205deg); } .bl-leaves i:nth-child(3) { transform: rotate(180deg) scale(.8); }
.bl.fly .bl-leaves { opacity: 0; transition: opacity .8s; }
.bl-txt { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; opacity: 0; transform: scale(.9); transition: 1s .4s; }
.bl-txt b { display: flex; flex-direction: column; font: 400 calc(14cqw * var(--ns, 1))/1.02 var(--script), cursive; color: var(--acc); }
.bl-txt b i { font: italic 400 .45em var(--serif), serif; }
.bl-txt span { font-size: 5cqw; letter-spacing: .2em; margin-top: 3cqw; }
.bl.fly .bl-txt { opacity: 1; transform: none; }

/* ---------- 9. звёздная ночь ---------- */
.nt { position: absolute; inset: 0; background: radial-gradient(ellipse at 70% 10%, #2d3d72, #141c3d 55%, #0b1027); }
.mini .nt { background-image: radial-gradient(1px 1px at 12% 18%, #fff, transparent), radial-gradient(1px 1px at 30% 70%, #fff, transparent), radial-gradient(1.5px 1.5px at 74% 24%, #fff, transparent), radial-gradient(1px 1px at 86% 62%, #fff, transparent), radial-gradient(1px 1px at 50% 88%, #fff, transparent), radial-gradient(1px 1px at 20% 48%, #fff, transparent), radial-gradient(1.5px 1.5px at 62% 80%, #fff, transparent), radial-gradient(1px 1px at 92% 12%, #fff, transparent), radial-gradient(ellipse at 70% 10%, #2d3d72, #141c3d 55%, #0b1027); }
.nt-cv { position: absolute; inset: 0; width: 100%; height: 100%; }
.nt-moon {
  position: absolute; left: 50%; top: 40%; width: min(34cqw, 24cqh); aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; cursor: pointer;
  background: radial-gradient(circle at 30% 30%, rgba(200, 185, 140, .35) 0 6%, transparent 7%), radial-gradient(circle at 62% 58%, rgba(200, 185, 140, .3) 0 9%, transparent 10%), radial-gradient(circle at 45% 70%, rgba(200, 185, 140, .25) 0 5%, transparent 6%), radial-gradient(circle at 38% 35%, #fffaf0, #f3e7c4 55%, #d8c896);
  box-shadow: 0 0 40px 10px rgba(243, 231, 196, .35), 0 0 120px 40px rgba(243, 231, 196, .14);
  animation: moonGlow 4s ease-in-out infinite;
}
.mini .nt-moon { animation: none; }
@keyframes moonGlow { 50% { box-shadow: 0 0 50px 14px rgba(243, 231, 196, .45), 0 0 140px 50px rgba(243, 231, 196, .2); } }
.nt-txt { position: absolute; left: 0; right: 0; top: 60%; text-align: center; color: #ece6f6; padding: 0 10cqw; }
.nt-txt small { font: 500 2.8cqmin/1.5 'Manrope', sans-serif; letter-spacing: .3em; text-transform: uppercase; color: #c0c6dd; }
.nt-txt b { display: flex; flex-direction: column; font: 400 calc(13cqmin * var(--ns, 1))/1.02 var(--script), cursive; color: #f3e3a6; margin-top: 3cqmin; }
.nt-txt b i { font: italic 400 .45em var(--serif), serif; color: #c0c6dd; }
.nt-flash { position: absolute; inset: 0; background: #fff8ea; opacity: 0; pointer-events: none; }

/* ---------- 10. рассвет ---------- */
.sn { position: absolute; inset: 0; }
.sn-sky { position: absolute; inset: 0; }
.sn-sky.night { background: linear-gradient(#0e1530, #2a2b55 55%, #5b3d5a); }
.sn-sky.dawn { background: var(--dawn, linear-gradient(#8fb2da, #f2cfa6 58%, #ffdcae)); opacity: 0; }
.sn-sun { position: absolute; left: 50%; top: 76%; width: 30cqmin; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, 0);
  background: radial-gradient(circle, #fff8e0 0 38%, #ffd780 62%, #ffb24a); box-shadow: 0 0 60px 20px rgba(255, 200, 110, .45), 0 0 180px 70px rgba(255, 170, 90, .25); }
.sn-land { position: absolute; left: 0; bottom: 0; width: 100%; height: 42%; filter: brightness(.35); }
.sn-txt { position: absolute; left: 0; right: 0; top: 34%; text-align: center; color: #3a2a2a; opacity: 0; padding: 0 10cqw; }
.sn-txt small { font: 500 2.8cqmin/1.5 'Manrope', sans-serif; letter-spacing: .3em; text-transform: uppercase; }
.sn-txt b { display: flex; flex-direction: column; font: 400 calc(14cqmin * var(--ns, 1))/1.02 var(--script), cursive; color: var(--acc); margin: 3cqmin 0; }
.sn-txt b i { font: italic 400 .45em var(--serif), serif; }
.sn-txt span { font-size: 5cqmin; letter-spacing: .2em; }
.mini .sn-sun { transform: translate(-50%, -58cqh); }
.mini .sn-sky.dawn, .mini .sn-txt { opacity: 1; }
.mini .sn-land { filter: none; }

/* ---------- 11. вышивка ---------- */
.st { position: absolute; inset: 0; }
.st-half { position: absolute; inset: 0; }
.st-half.top { clip-path: inset(0 0 50% 0); }
.st-half.bot { clip-path: inset(50% 0 0 0); }
.st-cloth {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4cqh;
  background: repeating-linear-gradient(0deg, rgba(120, 100, 70, .07) 0 1px, transparent 1px 3px), repeating-linear-gradient(90deg, rgba(120, 100, 70, .07) 0 1px, transparent 1px 3px), #f4ede0;
  box-shadow: inset 0 0 80px rgba(120, 90, 50, .18);
}
.st-ros { width: min(62cqw, 36cqh); }
.st-ros path { stroke-width: 1.25; stroke-linecap: round; opacity: 0; transform-box: fill-box; transform-origin: center; animation: stitchIn .3s ease-out var(--d) forwards; }
.mini .st-ros path { animation: none; opacity: 1; }
@keyframes stitchIn { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: none; } }
.st-band { position: absolute; left: 0; right: 0; height: 4.4cqh;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='18'%3E%3Cg stroke-width='1.3' stroke-linecap='round'%3E%3Cpath d='M0 9l9-7 9 7-9 7z' fill='none' stroke='%23b3121b'/%3E%3Cpath d='M18 9l9-7 9 7-9 7z' fill='none' stroke='%231d1a1a'/%3E%3Cpath d='M7 7l4 4M11 7l-4 4M25 7l4 4M29 7l-4 4' stroke='%23b3121b'/%3E%3C/g%3E%3C/svg%3E") 0 50% / auto 100% repeat-x; }
.st-band.t { top: 7%; } .st-band.b { bottom: 19%; }
.intro .st-cloth { justify-content: flex-start; padding-top: 16cqh; }
.st-txt { text-align: center; color: #1d1a1a; }
.st-txt b { display: flex; flex-direction: column; font: 400 calc(12cqmin * var(--ns, 1))/1.02 var(--script), cursive; color: #b3121b; }
.st-txt b i { font: italic 400 .45em var(--serif), serif; color: #1d1a1a; }
.st-txt span { display: block; font-size: 4.6cqmin; letter-spacing: .2em; margin-top: 2cqmin; }

/* ---------- 12. чернила ---------- */
.ink { width: min(84cqw, 58cqh); aspect-ratio: .72; }
.ink-paper {
  position: absolute; inset: 0; container-type: inline-size; text-align: center; display: flex; flex-direction: column; align-items: center; padding-top: 6cqw;
  background: #fbf7ef url(../img/paper.webp) 0 0 / 130% auto; color: #3b2a24; box-shadow: 0 30px 50px -24px rgba(0, 0, 0, .4), 0 1px 3px rgba(0, 0, 0, .08);
}
.ink-br { width: 92%; }
.ink-p { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.8s cubic-bezier(.5, 0, .3, 1) .3s forwards; }
.ink-fl { transform-box: fill-box; transform-origin: center; opacity: 0; transform: scale(0); animation: pop .55s cubic-bezier(.3, 1.6, .5, 1) var(--d) forwards; }
.ink small { font: 500 2.7cqw/1.5 'Manrope', sans-serif; letter-spacing: .3em; text-transform: uppercase; opacity: .7; margin-top: 4cqw; padding: 0 10cqw; }
.ink-names {
  display: flex; flex-direction: column; font: 400 calc(15cqw * var(--ns, 1))/1.05 var(--script), cursive; color: var(--acc); margin: 3cqw 0; padding: 0 4cqw;
  -webkit-mask-image: linear-gradient(90deg, #000 44%, transparent 56%); mask-image: linear-gradient(90deg, #000 44%, transparent 56%);
  -webkit-mask-size: 260% 100%; mask-size: 260% 100%; -webkit-mask-position: 100% 0; mask-position: 100% 0; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  animation: write 2.4s cubic-bezier(.45, .05, .3, 1) 1.6s forwards;
}
.ink-names i { font: italic 400 .45em var(--serif), serif; color: #3b2a24; }
.ink-date { font-size: 5.4cqw; letter-spacing: .2em; opacity: 0; animation: fadeIn 1s 3.6s forwards; }
.mini .ink-p { animation: none; stroke-dashoffset: 0; }
.mini .ink-fl { animation: none; opacity: 1; transform: none; }
.mini .ink-names { animation: none; -webkit-mask-position: 0 0; mask-position: 0 0; }
.mini .ink-date { animation: none; opacity: 1; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { to { opacity: 1; transform: none; } }
@keyframes write { to { -webkit-mask-position: 0 0; mask-position: 0 0; } }
@keyframes fadeIn { to { opacity: 1; } }

/* ---------- 13. посадочный талон ---------- */
.tk { width: min(68cqw, 31cqh); aspect-ratio: .44; display: flex; flex-direction: column; filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .3)); color: #1f3b5a; font-family: 'Manrope', sans-serif; }
.tk-main { flex: 1; position: relative; background: #fffaf0; border-radius: 5cqw 5cqw 0 0; padding: 0 8cqw 6cqw; display: flex; flex-direction: column;
  -webkit-mask: radial-gradient(circle at 0 100%, transparent 4.5cqw, #000 4.7cqw) left / 51% 100% no-repeat, radial-gradient(circle at 100% 100%, transparent 4.5cqw, #000 4.7cqw) right / 51% 100% no-repeat;
  mask: radial-gradient(circle at 0 100%, transparent 4.5cqw, #000 4.7cqw) left / 51% 100% no-repeat, radial-gradient(circle at 100% 100%, transparent 4.5cqw, #000 4.7cqw) right / 51% 100% no-repeat; }
.tk-head { display: flex; justify-content: space-between; align-items: center; margin: 0 -8cqw 7cqw; padding: 6cqw 8cqw 5cqw; background: var(--acc); color: #fff8ee; border-radius: 5cqw 5cqw 0 0; font-size: 3.4cqw; font-weight: 700; letter-spacing: .22em; }
.tk-route { display: flex; align-items: center; justify-content: space-between; }
.tk-route small, .tk-grid small { display: block; font-size: 2.8cqw; letter-spacing: .2em; text-transform: uppercase; opacity: .6; }
.tk-route b { font: 600 11cqw/1.1 var(--serif), serif; }
.tk-route svg { width: 14cqw; color: var(--acc); }
.tk-names { display: flex; flex-direction: column; align-items: center; font: 400 calc(13cqw * var(--ns, 1))/1.02 var(--script), cursive; color: var(--acc); margin: auto 0; text-align: center; }
.tk-names i { font: italic 400 .45em var(--serif), serif; color: #1f3b5a; }
.tk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5cqw 4cqw; }
.tk-grid b { font: 600 5cqw/1.2 var(--serif), serif; }
.tk-stub { height: 22%; background: #fffaf0; border-radius: 0 0 5cqw 5cqw; border-top: 2px dashed rgba(31, 59, 90, .25); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3cqw; transform-origin: 0 0;
  -webkit-mask: radial-gradient(circle at 0 0, transparent 4.5cqw, #000 4.7cqw) left / 51% 100% no-repeat, radial-gradient(circle at 100% 0, transparent 4.5cqw, #000 4.7cqw) right / 51% 100% no-repeat;
  mask: radial-gradient(circle at 0 0, transparent 4.5cqw, #000 4.7cqw) left / 51% 100% no-repeat, radial-gradient(circle at 100% 0, transparent 4.5cqw, #000 4.7cqw) right / 51% 100% no-repeat; }
.tk-bar { display: flex; gap: .9cqw; height: 13cqw; }
.tk-bar i { background: #1f3b5a; }
.tk-stub small { font-size: 2.8cqw; letter-spacing: .24em; text-transform: uppercase; opacity: .6; }

/* ---------- 14. подарок ---------- */
.bx { width: min(70cqw, 46cqh); aspect-ratio: 1 / 1.25; }
.bx-body { position: absolute; left: 0; right: 0; bottom: 0; height: 72%; z-index: 2;
  background: linear-gradient(90deg, rgba(0, 0, 0, .14), transparent 25%, transparent 75%, rgba(0, 0, 0, .14)), url(../img/paper.webp) 0 0 / 200% auto, var(--boxc); background-blend-mode: normal, multiply, normal;
  box-shadow: 0 30px 40px -20px rgba(0, 0, 0, .45); border-radius: 0 0 1.5cqw 1.5cqw; }
.bx-rv { position: absolute; left: 50%; top: 0; bottom: 0; width: 14%; transform: translateX(-50%); background: linear-gradient(90deg, var(--rib2), var(--rib) 40%, var(--rib2)); }
.bx-lid { position: absolute; left: -5%; right: -5%; top: 18%; height: 16%; z-index: 3; border-radius: 1.5cqw;
  background: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(0, 0, 0, .12)), url(../img/paper.webp) 0 0 / 200% auto, var(--boxc); background-blend-mode: normal, multiply, normal;
  box-shadow: 0 8px 12px -4px rgba(0, 0, 0, .35); }
.bx-lid .bx-rv { width: 13%; }
.bx-bow { position: absolute; left: 50%; top: 22%; width: 70%; transform: translate(-50%, -55%); z-index: 4; filter: drop-shadow(0 5px 5px rgba(0, 0, 0, .25)); }
.bx-tag { position: absolute; right: 10%; bottom: 14%; width: 22%; aspect-ratio: 1.5; display: grid; place-items: center; background: #fbf6ea; border-radius: 1cqw; transform: rotate(-8deg); font: 400 6cqw/1 'Great Vibes', cursive; color: #6b5a3a; box-shadow: 0 2px 4px rgba(0, 0, 0, .2); white-space: nowrap; }
.bx-glow { position: absolute; left: 50%; top: -34%; width: 140%; height: 90%; transform: translateX(-50%); opacity: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 244, 210, .95), rgba(255, 215, 140, .35) 55%, transparent), repeating-conic-gradient(from 0deg at 50% 100%, rgba(255, 230, 170, .3) 0 4deg, transparent 4deg 12deg); }
.bx-sparks { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.bx-sparks i { position: absolute; left: 50%; top: 30%; width: 1.8cqw; height: 1.8cqw; border-radius: 50%; background: #ffe9a8; box-shadow: 0 0 6px 1px #ffd36a; opacity: 0; }
.popped .bx-sparks i { animation: spark 1.6s ease-out var(--d) forwards; }
@keyframes spark { 0% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translate(var(--x), var(--y)); } }
.bx-txt { position: absolute; left: 50%; top: 28%; z-index: 4; text-align: center; white-space: nowrap; opacity: 0; transform: translate(-50%, 10%); }
.bx-txt b { display: flex; flex-direction: column; font: 400 calc(17cqw * var(--ns, 1))/1.02 var(--script), cursive; color: var(--acc); text-shadow: 0 0 20px rgba(255, 255, 255, .8); }
.bx-txt b i { font: italic 400 .45em var(--serif), serif; }
.bx-txt span { font-size: 6cqw; letter-spacing: .2em; }

/* ---------- 15. письмо втрое ---------- */
.fd { width: min(92cqw, 64cqh); aspect-ratio: .7; perspective: 1800px; }
.fd-p { position: absolute; left: 0; right: 0; height: 33.4%; transform-style: preserve-3d; }
.fd-p.p1 { top: 0; transform-origin: 50% 100%; transform: rotateX(-180deg); z-index: 3; }
.fd-p.p2 { top: 33.3%; z-index: 1; }
.fd-p.p3 { top: 66.6%; transform-origin: 50% 0; transform: rotateX(180deg); z-index: 2; }
.fd-f, .fd-b { position: absolute; inset: 0; -webkit-backface-visibility: hidden; backface-visibility: hidden; overflow: hidden;
  background: var(--fpaper) url(../img/paper.webp) 0 0 / 200% auto; background-blend-mode: multiply; }
.fd-b { transform: rotateX(180deg); background-color: color-mix(in srgb, var(--fpaper) 94%, #000); box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .45); overflow: visible; }
.fd-p.p2 .fd-f { box-shadow: 0 30px 50px -24px rgba(0, 0, 0, .4); }
.fd-c { position: absolute; left: 0; right: 0; height: 300%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 11cqw; color: var(--ink); }
.p1 .fd-c { top: 0; } .p2 .fd-c { top: -100%; } .p3 .fd-c { top: -200%; }
.fd-c small { font: 500 2.7cqw/1.5 'Manrope', sans-serif; letter-spacing: .3em; text-transform: uppercase; opacity: .7; }
.fd-c b { display: flex; flex-direction: column; font: 400 calc(14cqw * var(--ns, 1))/1.02 var(--script), cursive; color: var(--acc); margin: 4cqw 0 1cqw; }
.fd-c b i { font: italic 400 .45em var(--serif), serif; color: var(--ink); }
.fd-c span { font-size: 5.4cqw; letter-spacing: .2em; }
.fd-c p { font-size: 4.2cqw; line-height: 1.5; margin: 5cqw 0 3cqw; font-style: italic; }
.fd-c em { font-size: 2.8cqw; letter-spacing: .32em; text-transform: uppercase; opacity: .7; }
.fd-seal { left: 50%; top: 50%; width: 30%; }

/* ---------- без интро: карточка ---------- */
.nn { width: min(82cqw, 56cqh); aspect-ratio: .7; }
.nn-card { position: absolute; inset: 0; background: var(--paper) url(../img/paper.webp) 0 0 / 160% auto; background-blend-mode: multiply; color: var(--ink); text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 30px 50px -24px rgba(0, 0, 0, .4), inset 0 0 0 3cqw var(--paper), inset 0 0 0 3.3cqw color-mix(in srgb, var(--ink) 30%, transparent); }
.nn-mono { font: 400 20cqw/1 'Great Vibes', cursive; color: var(--acc); }
.nn-card b { display: flex; flex-direction: column; font: 600 8cqw/1.1 var(--serif), serif; text-transform: uppercase; letter-spacing: .08em; }
.nn-card b i { font: italic 400 .8em var(--serif), serif; text-transform: none; color: var(--acc); }
.nn-date { font-size: 4.4cqw; letter-spacing: .24em; margin-top: 4cqw; }

/* ---------- полноэкранный режим ---------- */
.intro { position: fixed; inset: 0; z-index: 100; }
.intro > .scene { width: 100vw; height: 100vh; height: 100svh; }
.intro-hint { position: absolute; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom, 0px) + 5vh); z-index: 20; text-align: center; pointer-events: none; transition: opacity .5s; color: var(--hintc, var(--ink)); padding: 0 16px; }
.intro-hint b { display: block; font: 400 clamp(30px, 8.4vw, 42px)/1.1 var(--script), 'Great Vibes', cursive; color: var(--hintb, var(--acc)); }
.intro-hint span { display: inline-block; margin-top: 8px; font: 500 10.5px/1 'Manrope', sans-serif; letter-spacing: .34em; text-transform: uppercase; opacity: .75; animation: hintPulse 2.4s ease-in-out infinite; }
.intro.opening .intro-hint, .intro:has(.opening) .intro-hint { opacity: 0; }
@keyframes hintPulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .scene *, .scene *::before { animation-duration: .001s !important; } }
