@font-face{font-family:Asylum;src:url('/uzatuu/asylum.ttf')}@font-face{font-family:Bodega;src:url('/uzatuu/bodega.ttf')}@font-face{font-family:Antique;src:url('/uzatuu/antique.ttf')}@font-face{font-family:Florisel;src:url('/uzatuu/florisel.ttf')}
body.guest-view{background:#eeede9}
.guest-view>header,.guest-view>footer{display:none}
.guest-view main{margin:0 auto;width:min(550px,100%);min-height:100svh}
.story,.letter-gate{container-type:inline-size;max-width:550px;margin:auto;background:#f7f4ec;color:#302e29;text-align:center;overflow:hidden}
.story{--back:url('/art/sage-decor.svg');--band:#294a3e;--orn:#f6f3e8;--letter:var(--back);--details:var(--back);--closing:var(--back)}
.story-rose{--back:url('/art/rose-decor.svg');--band:#81505d}
.story-night{--back:url('/art/night-decor.svg');--band:#333952}
.story-uzatuu{--back:url('/uzatuu/cover.webp');--letter:url('/uzatuu/letter.webp');--details:url('/uzatuu/details.webp');--closing:url('/uzatuu/closing.jpg');--band:#22463a}
.story-blank{--back:none;--band:var(--ink);background:#fcfaf4}
.story-cover,.story-sheet{background-size:cover;background-position:center;position:relative;overflow:hidden}
.story-cover{min-height:177cqw;display:grid;align-content:center;background-image:var(--back)}
.story-band{position:relative;width:87%;margin:auto;padding:4cqw 2cqw;background:color-mix(in srgb,var(--band) 90%,transparent);color:#fff;z-index:1}
.story-band:before,.story-band:after{content:'';position:absolute;left:5%;width:90%;height:37cqw;background:#ffffffe0;clip-path:polygon(0 0,100% 0,50% 100%);pointer-events:none;z-index:-1}
.story-band:before{bottom:100%}.story-band:after{top:100%;transform:rotate(180deg)}
.story h1,.story h2,.story h3,.story p{margin:0;letter-spacing:normal;overflow-wrap:anywhere;white-space:pre-line}
.story h1{font:400 clamp(28px,11cqw,62px)/1.25 Georgia,serif}
.story-uzatuu h1{font:400 14.5cqw/1.15 Asylum,Georgia,serif}
.story-motif{display:block;margin:1.5cqw auto;width:52%;height:6.5cqw;background:var(--orn);mask:url('/uzatuu/ornament.png') center/100% 100% no-repeat;transform:rotate(0);mask-image:none;background:none}
.story-motif:before{content:'';display:block;margin:auto;width:6.5cqw;height:48cqw;background:var(--orn);mask:url('/uzatuu/ornament.png') center/contain no-repeat;transform:translateY(-43%) rotate(90deg)}
.story-sheet{padding:5.5cqw;background-image:var(--letter)}
.story-inset{background:#ffffffe0;min-height:166cqw;padding:7cqw 5cqw;display:flex;flex-direction:column;justify-content:space-evenly;align-items:center;gap:4cqw}
.story-letter{--orn:var(--ink)}.story-letter .story-inset{padding-bottom:15cqw}
.story-verse,.story-message,.story-letter h2,.hosts-names{font:400 6.4cqw/1.3 Georgia,serif}
.story-uzatuu .story-verse,.story-uzatuu .story-message,.story-uzatuu .story-letter h2,.story-uzatuu .hosts-names{font:400 7.25cqw/1.28 Asylum,Georgia,serif}
.story-verse,.story-signature,.hosts-names{color:var(--ink)}
.story-signature{font:400 15cqw/1.1 Bodega,Georgia,serif}
.story-custom{background:#fffaf1;padding:10cqw 6cqw}.story-custom h3{font-size:8cqw;color:var(--ink)}.story-custom p{margin:3cqw auto;font:400 4.5cqw/1.5 Georgia,serif}
.story-details{background-image:var(--details)}.story-detail{display:flex;align-items:center;justify-content:space-between;gap:4cqw;width:100%;font:400 7.4cqw/1.15 Asylum,Georgia,serif;white-space:pre-line;overflow-wrap:anywhere}
.story-detail time{flex:auto;font:400 12cqw/1.2 Antique,Georgia,serif;color:var(--ink)}
.story-detail img{width:13cqw;height:14cqw;object-fit:contain;filter:brightness(0) saturate(100%) invert(22%) sepia(52%) saturate(1951%) hue-rotate(328deg)}
.map-icon{font:500 7cqw Arial;color:white;background:#4b833e;border-radius:25%;padding:1cqw 2cqw}
.story-count{display:flex;justify-content:center;gap:4cqw;width:100%;padding:2.5cqw;color:white;background:var(--band);font:500 2.8cqw Arial,sans-serif}
.story-count b{display:block;font:400 6cqw Georgia;margin-bottom:1cqw}
.story-closing{background-image:var(--closing)}.story-closing .story-inset{padding:4cqw 1.5cqw;gap:3cqw}
.hosts-label{font:400 10cqw/1.1 Florisel,Georgia,serif}.hosts-photo{width:94%;max-height:70cqw;object-fit:contain}
.story-album{width:100%;position:relative}.story-slides{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none}.story-slides img{flex:0 0 100%;width:100%;height:64cqw;object-fit:contain;scroll-snap-align:start}.album-nav{display:flex;align-items:center;gap:1em;justify-content:center;margin-top:1cqw}.album-nav button{padding:0 10px;font:26px Georgia}
.response{width:100%;padding:3cqw;color:#333;background:#fffc}.response h2{font:500 5cqw/1.4 Georgia}.response label{font-size:clamp(13px,3.1cqw,16px);text-align:left}.response button{background:var(--band);color:white}.response select,.response input{font-size:16px}.response p{font-size:14px}
.sound-toggle{position:absolute;right:5cqw;top:5cqw;z-index:2;background:#213e32d9;color:#fff;border-radius:50%;height:48px;width:48px;font-size:22px}
.letter-gate{min-height:100svh;display:grid;place-items:center;padding:7%;background:linear-gradient(#182a2185,#17261ec4),var(--gate-art) center/cover;font-family:Georgia,serif;color:#fff}
.gate-content{width:100%;text-align:center}.gate-content h1{margin:0 0 32px;font:400 clamp(35px,10cqw,55px)/1.1 Georgia,serif}.gate-content p{font-size:17px}
.gate-envelope{position:relative;width:90%;aspect-ratio:1.5;height:auto;margin:auto;padding:0;border:0;background:none;cursor:pointer;perspective:1200px;transition:transform .5s ease;filter:drop-shadow(0 22px 40px #101a1580);animation:envFloat 4.5s ease-in-out infinite}
.env-back{position:absolute;inset:0;border-radius:5px;background:linear-gradient(#f1e8d2,#dccfab);transition:opacity .5s ease .55s}
.env-letter{position:absolute;left:7%;top:9%;width:86%;height:82%;border-radius:3px;overflow:hidden;background:linear-gradient(#fffdf7,#f3ebd6);box-shadow:0 6px 16px #0003;z-index:2;display:grid;place-items:center;transform-origin:center top;transition:left .9s cubic-bezier(.22,.7,.18,1) .45s,top .9s cubic-bezier(.22,.7,.18,1) .45s,width .9s cubic-bezier(.22,.7,.18,1) .45s,height .9s cubic-bezier(.22,.7,.18,1) .45s,transform .9s cubic-bezier(.22,.7,.18,1) .45s,box-shadow .9s ease .45s}
.env-cover{display:grid;gap:12px;justify-items:center;padding:16px 20px;background:#44513c;color:#f1e7cd;border-radius:2px;max-width:88%;opacity:0;transition:transform .9s ease .45s,opacity .5s ease .45s}
.env-cover b{font:400 clamp(15px,6.5cqw,30px)/1.15 Georgia,serif}
.env-orn{width:min(66%,120px);height:12px;background:repeating-linear-gradient(90deg,transparent 0 4px,#c6a564 4px 8px);opacity:.75}
.env-front{position:absolute;inset:0;z-index:3;border-radius:5px;background:linear-gradient(#efe6cd,#e1d5b2);box-shadow:inset 0 1px 0 #ffffff66,inset 0 -24px 34px #00000008;transition:opacity .5s ease .55s}
.env-flap{position:absolute;left:0;top:0;width:100%;height:60%;background:linear-gradient(#fffbee,#e6dbbc);clip-path:polygon(0 0,100% 0,50% 100%);transform-origin:top center;transform:rotateX(0);transition:transform .65s cubic-bezier(.4,.1,.3,1),filter .65s ease;z-index:5;backface-visibility:hidden}
.gate-seal{position:absolute;left:50%;top:44%;transform:translate(-50%,-50%);width:48px;height:48px;display:grid;place-items:center;border-radius:50%;background:#81504c;border:3px double #d6aba2;color:#fbf1d1;font:22px Georgia;box-shadow:0 2px 6px #58302455;z-index:6;transition:transform .4s ease,opacity .4s ease}
.letter-gate.opening .env-flap{transform:rotateX(-165deg);filter:brightness(.9);z-index:1}
.letter-gate.opening .gate-seal{opacity:0;transform:translate(-50%,-50%) scale(.3) rotate(-18deg)}
.letter-gate.opening .env-back,.letter-gate.opening .env-front{opacity:0}
.letter-gate.opening .env-letter{left:0;top:0;width:100%;height:100%;transform:translateY(-3%);box-shadow:0 30px 70px #0006;z-index:7}
.letter-gate.opening .env-cover{transform:scale(1.4);opacity:1}
.letter-gate.leaving{transition:opacity .5s ease,transform .5s ease;opacity:0;transform:scale(1.03)}
.story-enter{animation:storyIn .6s ease both}
@keyframes storyIn{from{opacity:0;transform:scale(.985) translateY(10px)}to{opacity:1;transform:none}}
#pv .story{max-height:76vh;overflow-y:auto}
@media(prefers-reduced-motion:no-preference){.story-cover .story-band{animation:unfold .65s ease-out}.gate-envelope:hover{transform:translateY(-3px)}@keyframes unfold{from{opacity:.1;transform:translateY(16px)}to{opacity:1;transform:translateY(0)}}}

.story-uzatuu .story-cover {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  isolation: isolate;
}
.story-uzatuu .story-cover::before,
.story-uzatuu .story-cover::after {
  content: '';
  position: absolute;
  left: 13%;
  width: 77%;
  height: 74cqw;
  top: 9.6cqw;
  background: rgb(255 255 255 / 80%);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.story-uzatuu .story-cover::after { top: 91cqw; transform: rotate(180deg) }
.story-uzatuu .story-band {
  margin: 68cqw auto 0;
  min-height: 35.5cqw;
  padding: 1cqw 2cqw;
  display: grid;
  align-content: space-between;
}
.story-uzatuu .story-band::before,.story-uzatuu .story-band::after{display:none}
.story-uzatuu .sound-toggle {top:8.5%;left:50%;right:auto;transform:translateX(-50%);background:#2942359e}
#photo-settings {margin:20px 0}#photo-settings summary{cursor:pointer;font-weight:600}

/* Парение конверта и падающие лепестки */
@keyframes envFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-9px)}}
.letter-gate.opening .gate-envelope{animation:none}
.petals{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:1}
.petal{position:absolute;top:0;left:var(--x);width:calc(12px * var(--sc));height:calc(12px * var(--sc));background:radial-gradient(circle at 32% 28%,#fff6e4,#e5d3a6);border-radius:60% 0 60% 0;opacity:.8;will-change:transform;animation:petalFall var(--d) linear var(--delay) infinite}
@keyframes petalFall{0%{transform:translate(0,-12vh) rotate(0);opacity:0}12%{opacity:.85}50%{transform:translate(16px,48vh) rotate(200deg)}100%{transform:translate(-14px,114vh) rotate(460deg);opacity:.45}}
.letter-gate.leaving .petals{opacity:0;transition:opacity .4s ease}
