/* wood-pattern by Atle Mo, https://www.transparenttextures.com/patterns/wood-pattern.png */
body:has(#gift.active){--scene-grain:url("backgrounds/wood-pattern.png");--scene-edge:#e4bf91;--scene-paper:#fff1d5}
/* argyle by Will Monson, https://www.transparenttextures.com/patterns/argyle.png */
body:has(#parcel.active){--scene-grain:url("backgrounds/argyle.png");--scene-edge:#efc1ad;--scene-paper:#fff1dc}
/* billie-holiday by Thomas Myrman, https://www.transparenttextures.com/patterns/billie-holiday.png */
body:has(#welcome.active){--scene-grain:url("backgrounds/billie-holiday.png");--scene-edge:#eed1cc;--scene-paper:#fff1eb}
/* checkered-pattern by Radosław Rzepecki, https://www.transparenttextures.com/patterns/checkered-pattern.png */
body:has(#cake.active){--scene-grain:url("backgrounds/checkered-pattern.png");--scene-edge:#f4d5ae;--scene-paper:#ffeed9}
/* cloth-alike by Peax Webdesign, https://www.transparenttextures.com/patterns/cloth-alike.png */
body:has(#cards.active){--scene-grain:url("backgrounds/cloth-alike.png");--scene-edge:#d9c7a8;--scene-paper:#f8ecd7}
/* bright-squares by Waseem Dahman, https://www.transparenttextures.com/patterns/bright-squares.png */
body:has(#chests.active){--scene-grain:url("backgrounds/bright-squares.png");--scene-edge:#eac79b;--scene-paper:#ffebc9}
/* beige-paper by Konstantin Ivanov, https://www.transparenttextures.com/patterns/beige-paper.png */
body:has(#letter.active){--scene-grain:url("backgrounds/beige-paper.png");--scene-edge:#e3ccb0;--scene-paper:#fff2d7}
/* blizzard by Alexandre Naud, https://www.transparenttextures.com/patterns/blizzard.png */
body:has(#finale.active){--scene-grain:url("backgrounds/blizzard.png");--scene-edge:#edccbd;--scene-paper:#fff0d9}

body:has(.scene.active){background-color:var(--scene-edge);background-image:var(--scene-grain);background-size:auto}
main:has(.scene.active){background-color:var(--scene-paper);background-image:radial-gradient(ellipse at 50% 40%,transparent 35%,#fff5 95%),var(--scene-grain)}
body:has(#cake.active:is([data-phase=wish],[data-phase=blowing],[data-phase=smoke])){background:#302533}
main:has(#cake.active:is([data-phase=wish],[data-phase=blowing],[data-phase=smoke])){background:#392c38}
.room-pan{overflow-x:auto;scrollbar-width:thin;scrollbar-color:#b4866b #f2d2ab}
@media(min-width:721px){#gift{max-width:1440px;padding-inline:18px}.opening{grid-template-columns:minmax(210px,.48fr) minmax(0,2.2fr);gap:24px}}
@media(max-width:720px){#gift{padding:10px 5px 26px}.opening{gap:12px}.room-frame{border-width:4px}.room-stage{width:max(100%,min(162vw,780px))}.room-caption{font-size:14px}.door-note h1{font-size:clamp(28px,7.3vw,42px)}}
.room-frame{transform:none}.room-stage .room-felt{z-index:8}.opening{min-width:0}.room-pan{position:relative}


body:has(#welcome.active){--scene-edge:#eac9af;--scene-paper:#f9e5c5;--scene-grain:url(backgrounds/wood-pattern.png)}
#welcome{border:6px solid #94664f;border-radius:14px;max-width:870px;margin:auto;align-content:center;min-height:min(650px,75svh);background:linear-gradient(0deg,#b78262 0 8px,#d3a27f 8px 14px,transparent 14px),linear-gradient(90deg,#c09a742c 1px,transparent 2px) 0 0/30px 100%,#ffebcdab;box-shadow:inset 0 0 0 3px #f9d8a4}
#welcome .portrait{position:relative;align-self:center;width:min(100%,275px);background:#f9d8aa;border:6px solid #875c4a;border-radius:2px;padding:6px;transform:rotate(-2deg);box-shadow:3px 5px #b68869}
#welcome .portrait img{width:100%;height:auto;max-height:none;background:none}
#welcome .portrait:before{content:"";position:absolute;width:48px;height:18px;background:repeating-linear-gradient(90deg,#e8a6a0bb 0 6px,#ffdbbccc 6px 12px);top:-13px;left:calc(50% - 24px);rotate:5deg}
#welcome .eyebrow{letter-spacing:.14em;color:#825749}
#welcome h1{font-size:clamp(28px,4vw,48px)}
@media(max-width:720px){#welcome{gap:10px;padding:24px 12px}#welcome .portrait{width:min(55vw,235px)}#welcome h1{margin:8px auto}#welcome .intro{margin:8px auto}#welcome .primary{margin-top:12px}}

body:has(#parcel.active){background-color:#eed9c5;background-image:linear-gradient(#ffeddcce,#ffeddcce),url(backgrounds/argyle.png);background-size:auto,80px}
main:has(#parcel.active){background:#fff3df}
.birthday-wall-picture{transform-origin:200px 32px}
[data-gift-phase=spring] .birthday-wall-picture{animation:picture-rock .8s ease-out}
@keyframes picture-rock{20%{transform:rotate(3deg)}55%{transform:rotate(-2deg)}80%{transform:rotate(1deg)}}
[data-gift-phase=tied] .gift-tail-right{transform-origin:195px 250px;animation:tail-invite .6s 1.5s ease-in-out 1}
@keyframes tail-invite{48%{transform:rotate(-7deg)}}
@media(max-width:720px){#welcome .portrait{width:min(61vw,260px)}main:has(#welcome.active){min-height:auto}#welcome{min-height:auto;padding-bottom:20px}}
