/* Botanical stationery shared by the builder and the recipient preview. */
.ys-garden-floral { position:absolute; display:block; object-fit:contain; pointer-events:none; user-select:none; z-index:2; }
.ys-garden-envelope { overflow-y:auto; overflow-x:hidden; padding:28px 20px; }
.ys-invitation { position:relative; isolation:isolate; width:min(100%,620px); margin:auto; padding:64px 100px 46px; text-align:center; background:var(--dc-card); border:1px solid var(--dc-cardBorder); border-radius:220px 220px 24px 24px; box-shadow:0 28px 85px -45px color-mix(in srgb,var(--dc-heading) 35%,transparent); }
.ys-invitation::before { content:''; position:absolute; inset:13px; border:1px solid var(--dc-cardBorder); border-radius:210px 210px 16px 16px; pointer-events:none; }
.ys-invitation-core { position:relative; z-index:3; }
.ys-invitation > .ys-garden-floral--left { width:300px; height:450px; left:-105px; bottom:-36px; transform:rotate(-12deg); }
.ys-invitation > .ys-garden-floral--right { width:238px; height:357px; right:-91px; top:-25px; transform:rotate(164deg); }
.ys-sealed-letter { position:relative; width:214px; height:152px; margin:4px auto 30px; perspective:900px; transform:rotate(-5deg); animation:ys-letter-arrive 1.1s cubic-bezier(.2,.7,.2,1) both; }
.ys-letter-monogram { color:var(--dc-onAccent); font-family:var(--garden-display,'Cormorant Garamond',serif); font-size:23px; font-weight:600; }
.ys-garden-envelope h2 { overflow-wrap:anywhere; }
.ys-garden-envelope [data-trust-line] { font-size:12px!important; line-height:1.6!important; }
.ys-garden-envelope button { min-height:50px; transition:box-shadow .2s,transform .2s; }
.ys-garden-envelope button:hover { box-shadow:0 8px 28px -10px var(--dc-accent)!important; transform:translateY(-2px); }

/* A finite shower of petals follows the envelope opening. */
.ys-garden-petals { position:fixed; inset:0; z-index:3; overflow:hidden; pointer-events:none; }
.ys-garden-petal { position:absolute; top:-25px; left:var(--petal-x); width:12px; height:19px; border-radius:80% 12% 75% 20%; background:linear-gradient(135deg,var(--dc-accent),var(--dc-bg1)); opacity:0; }
.ys-garden[data-garden-open="true"] .ys-garden-petal { animation:ys-petal-fall var(--petal-time) var(--petal-delay) ease-in-out 2; }
.ys-garden[data-garden-open="true"] .ys-garden-petal:nth-child(even) { width:9px; height:14px; background:linear-gradient(135deg,var(--dc-accent2),var(--dc-bg1)); }

.ys-garden-greeting { padding:80px 40px!important; overflow:hidden; }
.ys-garden-titlecard { position:relative; width:min(100%,740px); min-height:560px; padding:110px 110px 90px; border:1px solid var(--dc-cardBorder); border-radius:280px 280px 26px 26px; background:var(--dc-card); box-shadow:0 24px 75px -50px color-mix(in srgb,var(--dc-heading) 32%,transparent); }
.ys-garden-titlecard::before { content:''; position:absolute; inset:15px; border:1px solid var(--dc-cardBorder); border-radius:270px 270px 18px 18px; pointer-events:none; }
.ys-garden-titlecard > .ys-garden-floral--left { width:310px; height:465px; bottom:-55px; left:-94px; transform:rotate(-16deg); }
.ys-garden-titlecard > .ys-garden-floral--right { width:230px; height:345px; top:-36px; right:-65px; transform:rotate(164deg); }
.ys-garden-titlecard > :not(img) { position:relative; z-index:3; }
.ys-garden-titlecard h1 { max-width:100%; overflow-wrap:anywhere; text-wrap:balance; }
.ys-garden-dedication { margin:0 0 30px; font-size:12px; line-height:1.6; color:var(--dc-muted); }
.ys-garden-signature { font-family:'Caveat',cursive; font-size:28px; line-height:1.2; color:var(--dc-accent); margin:28px 0 0; }
.ys-garden[data-garden-open="true"] .ys-garden-titlecard { animation:ys-garden-unfold 1.2s cubic-bezier(.16,.8,.3,1) both; }
.ys-garden[data-garden-open="true"] .ys-garden-titlecard .ys-garden-floral { animation:ys-floral-bloom 1.4s .15s ease both; }
.ys-garden-letter { padding:58px 56px 44px!important; border-radius:8px 8px 38px 8px!important; }
.ys-garden-letter::before { content:''; display:block; width:42px; height:1px; background:var(--dc-accent); margin:0 0 28px; }
.ys-garden-letter .ys-garden-floral { width:145px; height:218px; right:-52px; top:-45px; transform:rotate(165deg); opacity:.7; }
.ys-garden-letter > p { position:relative; z-index:3; }
.ys-garden-question-wrap { padding-top:80px; }
.ys-garden-question-card { position:relative; padding-top:58px!important; border-radius:130px 130px 26px 26px!important; }
.ys-garden-question-floral { width:180px; height:270px; top:-92px; left:-62px; transform:rotate(-18deg); }
.ys-garden-question-card > :not(img) { position:relative; z-index:3; }
.ys-garden-success-floral { width:105px; height:95px; object-fit:contain; margin:-14px auto 10px; transform:rotate(34deg); pointer-events:none; }
.ys-garden-answer-card { padding:32px 28px!important; }

/* A small piece of the same stationery, rather than a colour-block phone. */
.ys-builder-preview-inner { width:min(100%,340px); }
.ys-preview-phone { --dc-heading:var(--garden-heading); --dc-accent:var(--garden-accent); --dc-accent2:var(--garden-accent2); --dc-bg1:var(--garden-bg1); --dc-onAccent:var(--garden-onAccent); }
.ys-preview-phone { position:relative; isolation:isolate; width:300px; max-width:100%; height:610px; margin:0 auto; border:6px solid #302B31; border-radius:40px; box-shadow:0 25px 55px -30px #34243177,inset 0 0 0 1px #ffffff55; overflow:hidden; display:flex; flex-direction:column; }
.ys-preview-phone::before { content:''; position:absolute; top:9px; left:50%; transform:translateX(-50%); width:60px; height:5px; border-radius:8px; background:#302B31; opacity:.65; z-index:5; }
.ys-preview-phone > .ys-garden-floral--left { width:120px; height:180px; left:-45px; top:45px; transform:rotate(-12deg); }
.ys-preview-phone > .ys-garden-floral--right { width:115px; height:173px; right:-34px; top:16px; transform:rotate(165deg); }
.ys-preview-phone > .ys-garden-floral--bottom { width:115px; height:173px; right:-52px; bottom:-45px; transform:rotate(20deg); opacity:.85; }
.ys-preview-phone > .ys-preview-floral-extra { width:105px; height:158px; left:-42px; bottom:-55px; transform:scaleX(-1) rotate(-35deg); }
.ys-preview-header { text-align:center; flex-shrink:0; z-index:3; }
.ys-preview-header h3 { overflow-wrap:anywhere; max-width:100%; }
.ys-preview-header p { font-family:'Caveat',cursive; font-size:20px; margin:0 0 5px; color:var(--garden-accent); }
.ys-preview-body { min-height:0; overflow-y:auto; position:relative; z-index:3; scrollbar-width:thin; }
.ys-preview-letter { flex:1; display:flex; flex-direction:column; padding:20px 16px 16px; border:1px solid var(--garden-border); border-radius:15px 15px 30px 15px; background:var(--garden-card); text-align:center; }
.ys-preview-letter::before { content:''; width:28px; height:1px; background:var(--garden-accent2); margin:0 auto 16px; }
.ys-preview-question { padding-top:18px; }
.ys-preview-answers { display:flex; flex-wrap:wrap; gap:8px; justify-content:center; align-items:center; }
.ys-preview-signature { font-family:'Caveat',cursive; color:var(--garden-accent); font-size:22px; line-height:1.2; margin:12px 0 0; }
.ys-preview-photos { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:18px 0 0; }
.ys-preview-photos > figure:only-child { grid-column:1/-1; }
.ys-preview-success { min-height:330px; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:20px 10px; animation:ys-garden-unfold .7s ease both; }
.ys-preview-success img { width:125px; height:140px; object-fit:contain; transform:rotate(30deg); margin:-20px auto 0; }
.ys-preview-success-mark { display:grid; place-items:center; width:56px; height:56px; border-radius:50%; background:var(--garden-accent); color:var(--garden-onAccent); margin:0 auto 18px; }
.ys-preview-accepted-answer { margin:6px 0 16px; color:var(--garden-accent); font-size:14px; line-height:1.5; font-weight:700; overflow-wrap:anywhere; }
.ys-preview-accepted-question { width:100%; margin:18px 0 0; padding-top:16px; border-top:1px solid var(--garden-border); color:var(--garden-heading); font-size:12px; line-height:1.55; overflow-wrap:anywhere; }
.ys-preview-question .ys-selected-ask-art { max-width:170px; margin:0 auto 16px; }
.ys-preview-question .ys-selected-ask-art img { display:block; width:100%; height:auto; }
.ys-preview-full { display:block; width:100%; min-height:48px; margin:16px 0 0; padding:12px 18px; border:1px solid var(--ys-accent); border-radius:14px; background:var(--ys-surface); color:var(--ys-accent); font-size:13px; font-weight:700; cursor:pointer; }
.ys-preview-full:hover { background:var(--ys-surface-2); }
.ys-proposal-preview-bar { position:fixed; bottom:16px; left:50%; transform:translateX(-50%); width:min(620px,calc(100% - 32px)); z-index:200; display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px 18px; border:1px solid var(--ys-rule); border-radius:18px; background:var(--ys-surface); color:var(--ys-ink); box-shadow:0 12px 40px -20px #24242455; }
/* One mark, centred and fixed, so it stays on screen as the page scrolls. A dark
   fill with a pale outline reads on light and night themes alike. */
.ys-preview-watermark, .ys-preview-phone::after { content:''; pointer-events:none; background-repeat:no-repeat; background-position:center; background-size:min(94vw,640px) auto; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 280 200'%3E%3Ctext x='140' y='108' transform='rotate(-28 140 100)' text-anchor='middle' font-family='Arial,sans-serif' font-size='30' font-weight='800' letter-spacing='6' fill='%235A1E12' fill-opacity='.2' stroke='%23fff' stroke-opacity='.35' stroke-width='1'%3EPREVIEW%3C/text%3E%3C/svg%3E"); }
.ys-preview-watermark { position:fixed; inset:0; z-index:190; }
.ys-preview-phone::after { position:absolute; inset:0; z-index:4; background-size:94% auto; }
.ys-preview-end { animation:ys-garden-unfold .7s ease both; }
.ys-proposal-preview-bar strong { font-size:13px; font-weight:700; }
.ys-proposal-preview-bar p { font-size:12px; line-height:1.5; color:var(--ys-body); margin:3px 0 0; }
.ys-proposal-preview-bar button { min-height:44px; flex-shrink:0; padding:10px 16px; border:0; border-radius:12px; background:var(--ys-accent); color:white; font:700 12px 'Plus Jakarta Sans',sans-serif; cursor:pointer; }

@keyframes ys-letter-arrive { from { opacity:0; transform:translateY(18px) rotate(-9deg); } to { opacity:1; transform:translateY(0) rotate(-5deg); } }
@keyframes ys-garden-unfold { from { opacity:0; translate:0 26px; scale:.97; } to { opacity:1; translate:0 0; scale:1; } }
@keyframes ys-floral-bloom { from { opacity:0; scale:.86; } to { opacity:1; scale:1; } }
@keyframes ys-petal-fall { 0% { opacity:0; transform:translate3d(0,-15px,0) rotate(0); } 12% { opacity:.5; } 85% { opacity:.35; } 100% { opacity:0; transform:translate3d(var(--petal-drift),105vh,0) rotate(220deg); } }
@keyframes ys-celebration-petal { 0% { opacity:0; transform:translate3d(0,-5vh,0) rotate(0); } 12% { opacity:.65; } 100% { opacity:0; transform:translate3d(20px,115vh,0) rotate(240deg); } }

@media (max-width:600px) {
  .ys-garden-envelope { padding:20px 18px; align-items:flex-start!important; }
  .ys-invitation { padding:62px 38px 34px; border-radius:160px 160px 22px 22px; }
  .ys-invitation::before { inset:10px; border-radius:150px 150px 16px 16px; }
  .ys-invitation > .ys-garden-floral--left { width:164px; height:246px; left:-69px; bottom:-14px; }
  .ys-invitation > .ys-garden-floral--right { width:145px; height:218px; right:-52px; top:-12px; }
  .ys-sealed-letter { width:180px; height:129px; margin-bottom:30px; }
  .ys-garden-greeting { padding:72px 26px!important; }
  .ys-garden-titlecard { min-height:500px; padding:104px 34px 85px; border-radius:180px 180px 22px 22px; }
  .ys-garden-titlecard::before { inset:11px; border-radius:170px 170px 16px 16px; }
  .ys-garden-titlecard > .ys-garden-floral--left { width:177px; height:266px; left:-62px; bottom:-25px; }
  .ys-garden-titlecard > .ys-garden-floral--right { width:148px; height:222px; right:-48px; top:-20px; }
  .ys-garden-titlecard h1 { font-size:clamp(2.8rem,13vw,4rem)!important; }
  .ys-garden-letter { padding:44px 28px 32px!important; }
  .ys-garden-letter .ys-garden-floral { width:106px; height:159px; right:-44px; top:-25px; }
  .ys-garden-question-floral { width:120px; height:180px; left:-28px; top:-135px; }
  .ys-garden-question-card { padding:58px 24px 32px!important; border-radius:90px 90px 24px 24px!important; }
  .ys-preview-phone { width:290px; }
  .ys-proposal-preview-bar { bottom:10px; width:calc(100% - 20px); padding:10px 12px; gap:10px; border-radius:14px; }
  .ys-proposal-preview-bar p { font-size:12px; }
  .ys-proposal-preview-bar button { max-width:112px; }
}
@media (prefers-reduced-motion:reduce) {
  .ys-garden-petals { display:none; }
  .ys-garden *, .ys-garden *::before, .ys-preview-phone *, .ys-preview-phone *::before { animation:none!important; transition:none!important; scroll-behavior:auto!important; }
}
