:root {
  --ink: #4d2034;
  --berry: #8b2854;
  --rose: #ac3c65;
  --pink: #f9dce5;
  --paper: #fffaf5;
  --line: #d890aa;
  font-family: Georgia, serif;
  color: var(--ink);
  background: #fcebf1;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; line-height: 1.55; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--berry); outline-offset: 4px; }
h1, h2, p, figure { margin: 0; }
h1, h2 { line-height: 1.05; text-wrap: balance; }
h1 { font-size: clamp(2.8rem, 9vw, 6.5rem); font-weight: 500; letter-spacing: -.065em; }
h2 { font-size: clamp(2rem, 6vw, 3.8rem); font-weight: 500; letter-spacing: -.04em; }
em { color: var(--rose); }

.entrance {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
  background-color: #fff0ec;
  background-image: repeating-linear-gradient(0deg, #d963892e 0 21px, transparent 21px 42px),
                    repeating-linear-gradient(90deg, #d963892e 0 21px, transparent 21px 42px);
}
.stationery {
  width: min(100%, 35rem);
  padding: clamp(1.3rem, 6vw, 3rem);
  background: var(--paper);
  border: 1px solid var(--line);
  outline: 1px dashed var(--line);
  outline-offset: -8px;
  border-radius: 1.2rem;
  box-shadow: 0 18px 45px #6f204329;
  text-align: center;
}
.stationery h1 { font-size: clamp(2.65rem, 7vw, 4.3rem); }
.stationery > p, .intro > p { margin: .7rem auto 1.5rem; }
.stamp {
  display: inline-grid;
  place-items: center;
  width: 3.1rem;
  aspect-ratio: 1;
  margin-bottom: .9rem;
  transform: rotate(-9deg);
  border: 2px dashed currentColor;
  border-radius: .35rem;
  color: var(--berry);
  background: var(--pink);
  font-size: 1.5rem;
}
#lock { width: min(100%, 16rem); margin: auto; }
#lock label { display: block; margin-bottom: .45rem; }
#code {
  width: 100%;
  padding: .45rem .25rem .45rem .75rem;
  border: 1px solid var(--line);
  border-radius: .55rem;
  color: var(--ink);
  background: #fff;
  text-align: center;
  letter-spacing: .5rem;
  font-size: 1.45rem;
}
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; margin: .7rem 0; }
.keypad button {
  min-height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: .55rem;
  background: var(--pink);
  color: var(--berry);
  font-weight: 700;
}
.keypad .unlock, .pill { background: var(--berry); color: white; }
.keypad button:hover, .gift-grid button:hover { box-shadow: inset 0 0 0 2px var(--rose); }
summary { cursor: pointer; color: var(--berry); }
#hint p { margin: .35rem 0; }
#feedback { color: var(--berry); }
#feedback:empty { display: none; }

.top { display: flex; justify-content: space-between; align-items: center; gap: .7rem; flex-wrap: wrap; padding: .85rem clamp(1rem, 6vw, 5rem); border-bottom: 1px solid var(--line); background: var(--paper); }
.top > a { font-style: italic; font-weight: bold; }
.top a { text-decoration-thickness: 1px; text-underline-offset: .25em; }
.top nav { display: flex; flex-wrap: wrap; gap: .4rem 1rem; }
.top nav a { white-space: nowrap; }
.intro { text-align: center; padding: clamp(3rem, 10vw, 7rem) 1rem; background: radial-gradient(ellipse at center, var(--paper), var(--pink)); border-bottom: 1px dashed var(--line); }
.intro > p { max-width: 26rem; }
.pill { display: inline-block; border: 0; border-radius: 999px; padding: .7rem 1.25rem; text-decoration: none; }
.pill:hover { background: #6d1e42; }
.section { max-width: 64rem; margin: auto; padding: clamp(2.6rem, 7vw, 5rem) 1.35rem; text-align: center; }
.section h2 { margin-bottom: 1.4rem; }
.polaroid {
  position: relative;
  padding: .65rem .65rem .8rem;
  background: var(--paper);
  border: 1px solid #e5b6c6;
  box-shadow: 0 9px 24px #5d244721;
}
.polaroid::before { content: ''; position: absolute; top: -.45rem; left: 35%; width: 30%; height: .95rem; background: #d88ca39e; transform: rotate(-7deg); }
.polaroid img { display: block; width: 100%; height: auto; }
.polaroid figcaption { padding-top: .65rem; font-style: italic; }
.feature { width: min(100%, 23rem); margin: 2rem auto; transform: rotate(-2deg); }
.kiss { transform: rotate(2deg); }
.collage { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: clamp(.65rem, 4vw, 2.5rem); max-width: 45rem; margin: 3rem auto; }
.collage figure:nth-child(even) { margin-top: 1.5rem; transform: rotate(2deg); }
.collage figure:nth-child(odd) { transform: rotate(-2deg); }
.last { display: block; width: min(100%, 18rem); margin-bottom: 0; }
.gifts { border-top: 1px dashed var(--line); }
.gifts h2 { margin-bottom: .35rem; }
.gift-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; margin: 1.6rem auto 0; }
.gift-grid button { min-height: 8rem; padding: .7rem .4rem; border-radius: .8rem; border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.gift-grid span { display: block; font-size: 2.4rem; }
footer { padding: 1.5rem; text-align: center; color: var(--berry); }
dialog { width: min(30rem, calc(100% - 2rem)); max-height: 85svh; padding: 2.6rem 1.15rem 1.5rem; border: 1px solid var(--line); border-radius: 1rem; background: var(--paper); color: var(--ink); text-align: center; }
dialog::backdrop { background: #41152d91; }
dialog h2 { font-size: clamp(1.8rem, 7vw, 2.6rem); }
.close { position: absolute; right: .65rem; top: .55rem; width: 2.3rem; aspect-ratio: 1; border: 0; border-radius: 50%; background: var(--pink); color: var(--berry); font-size: 1.45rem; line-height: 1; }
.bouquet, .cake-art { font-size: 5.5rem; line-height: 1.3; margin: .6rem 0; }
.tag { margin-top: .65rem; font-style: italic; color: var(--berry); }
.mail summary { margin: 1rem auto; list-style: none; text-decoration: underline; }
.mail summary::-webkit-details-marker { display: none; }
.mail summary span { display: block; font-size: 4rem; }
.letter { text-align: left; background: #fce8ed; padding: 1.15rem; border-left: 2px solid var(--line); }
.letter p + p { margin-top: .75rem; }
.flame { display: block; font-size: 1.6rem; }
.flame.out { visibility: hidden; }
.wish-message, .heart-note { margin-top: .8rem; }
.jar { width: 7rem; margin: 1.4rem auto 1rem; padding: 1.05rem .2rem; border: 2px solid var(--line); border-top: .55rem solid var(--rose); border-radius: .4rem .4rem 1.45rem 1.45rem; background: var(--pink); color: var(--berry); }
.jar span { color: var(--rose); }
.final-photo { width: min(100%, 16rem); margin: 1.5rem auto .5rem; }
@media (max-width: 35rem) { .gift-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  #keepsake:not([hidden]), dialog[open] #gift-body, .letter, .final-photo:not([hidden]), .heart-note.pop { animation: appear .32s ease-out both; }
  .flame:not(.out) { animation: flicker .85s ease-in-out infinite alternate; }
  @keyframes appear { from { opacity: 0; transform: translateY(.5rem); } to { opacity: 1; transform: translateY(0); } }
  @keyframes flicker { to { transform: translateY(-.18rem) scale(.83); } }
}

#back { margin-top: .85rem; padding: .35rem .75rem; border: 0; background: transparent; color: var(--berry); text-decoration: underline; text-underline-offset: .2em; }
#effects { position: fixed; z-index: 10; inset: 0; pointer-events: none; overflow: hidden; }
.particle { position: fixed; z-index: 10; pointer-events: none; color: #b72b65; font-size: 1.2rem; text-shadow: 0 0 8px white; animation: scatter var(--life) cubic-bezier(.16,.7,.31,1) both; }
.particle:nth-of-type(3n) { color: #a55d13; }
@keyframes scatter {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.35); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--spin)) scale(.75); }
}
.welcome-card { padding-block: clamp(3rem, 10vw, 6rem); }
.closing-photos { max-width: 38rem; }
.heart-finale { margin: 1rem auto .25rem; border: 1px dashed var(--line); background: var(--pink); border-radius: 1rem; padding: .75rem 1rem 1.2rem; font-size: 1.2rem; }
.heart-finale > span { display: block; font-size: 4rem; color: var(--rose); line-height: 1.2; }
.jar { display: flex; justify-content: center; gap: .2rem; background: linear-gradient(110deg,#fff9 13%,#fff2 15% 21%,transparent 23%), var(--pink); }
.jar span { display: inline-block; }
.jar span.released { opacity: 0; transform: translateY(-2rem) rotate(-18deg); }
.bouquet { position: relative; width: fit-content; margin: 1rem auto; padding-bottom: 1.5rem; font-size: 2.7rem; }
.bouquet span { display: inline-block; }
.bouquet span:first-child { transform: rotate(-24deg); }
.bouquet span:last-of-type { transform: rotate(24deg); }
.bouquet i { position: absolute; bottom: 0; left: 25%; width: 50%; background: #f1bfd0; color: var(--berry); clip-path: polygon(0 0,100% 0,65% 100%,35% 100%); font-size: 1rem; padding-bottom: .75rem; }
.mail summary .envelope-art { display: grid; place-items: center; position: relative; width: 9rem; height: 5.5rem; margin: 0 auto .6rem; border: 1px solid var(--line); background: #f4c6d5; border-radius: .45rem; }
.envelope-art::before { content: ''; position: absolute; inset: 0; background: #fbe3e9; clip-path: polygon(0 0,100% 0,50% 68%); transform-origin: top; }
.mail[open] .envelope-art::before { transform: rotateX(165deg); }
.envelope-art i { z-index: 1; font-size: 1.7rem; color: var(--berry); }
.mail[open] .envelope-art i { opacity: 0; }
.cake-art { display: grid; justify-items: center; margin: 1rem auto; }
.cake-art .flame { width: .75rem; height: 1.05rem; background: radial-gradient(at bottom,#fff9b9 15%,#ffbb58 55%,#dc6345); border-radius: 65% 45% 55% 55%; box-shadow: 0 0 12px 4px #ffbc5870; }
.candle { width: .45rem; height: 1.55rem; border-radius: .15rem; background: repeating-linear-gradient(-35deg,#a2436c 0 3px,#fac5d6 3px 6px); }
.icing { width: 8.5rem; height: .7rem; border-radius: 1rem 1rem .25rem .25rem; background: #c8608a; }
.cake-base { width: 8.3rem; border-radius: 0 0 .75rem .75rem; background: linear-gradient(#ffe6ee 46%,#da8da9 47% 53%,#f6c1d0 54%); color: var(--berry); font-size: 1.25rem; padding: .85rem 0; }
@media (prefers-reduced-motion: no-preference) {
  .stationery, .heart-finale:not([hidden]) { animation: appear .48s cubic-bezier(.2,.75,.35,1) both; }
  .jar span, .envelope-art::before, .envelope-art i { transition: transform .45s ease, opacity .3s ease; }
  .gift-grid button { transition: transform .25s, box-shadow .25s, background .25s; }
  .gift-grid button:hover { transform: translateY(-.25rem); background: #fff0f4; }
}

#wrong-code { width: min(11rem, calc(100% - 2rem)); padding: .75rem .55rem; border: 2px solid #a94c69; border-radius: .55rem; background: #fff7f2; box-shadow: 0 4px 0 #80375175, 0 12px 28px #62142b44; }
#wrong-code::backdrop { background: #d6406573; }
#wrong-code h2 { font-size: 1.2rem; font-weight: bold; color: var(--berry); letter-spacing: -.02em; }
#wrong-code .pill { padding: .22rem .7rem; border-radius: .35rem; font-size: .9rem; }
.sad-panda { position: relative; isolation: isolate; width: 5rem; height: 4.9rem; margin: .4rem auto; }
.sad-panda span { position: absolute; display: block; }
.panda-body { left: 22%; right: 22%; top: 48%; bottom: 3%; border-radius: 46%; background: #fcf9f2; border: .15rem solid #3b2932; box-shadow: inset .4rem -.3rem #e5d7dc; }
.panda-ear { top: 2%; width: 32%; aspect-ratio: 1; border-radius: 50%; background: #3b2932; }
.panda-ear.left { left: 5%; }
.panda-ear.right { right: 5%; }
.panda-face { inset: 12% 4% 24%; border: .15rem solid #3b2932; border-radius: 48% 48% 44% 44%; background: #fffdf8; }
.panda-eye { top: 36%; width: 27%; height: 32%; border-radius: 50%; background: #3b2932; }
.panda-eye.left { left: 12%; rotate: 25deg; }
.panda-eye.right { right: 12%; rotate: -25deg; }
.panda-eye::after { content: ''; position: absolute; width: 43%; height: 39%; top: 27%; left: 31%; border-top: 2px solid white; border-radius: 50%; }
.panda-nose { top: 57%; left: 44%; width: 12%; height: 9%; border-radius: 50%; background: #3b2932; }
.panda-mouth { top: 72%; left: 42%; width: 16%; height: 13%; border-top: 2px solid #3b2932; border-radius: 50%; }
.panda-tear { top: 60%; right: 15%; width: 10%; height: 17%; border-radius: 0 70% 70% 70%; background: #8dd9f4; border: 1px solid #4c9cbf; rotate: 25deg; }
@media (prefers-reduced-motion: no-preference) {
  #wrong-code[open] { animation: panda-pop .3s cubic-bezier(.2,.85,.4,1.25) both; }
  #wrong-code[open]::backdrop { animation: panda-tint .2s ease-out both; }
  #wrong-code[open] .panda-tear { animation: panda-cry 1.25s .25s ease-in infinite; }
  @keyframes panda-pop { from { opacity: 0; transform: translateY(.35rem) scale(.75); } to { opacity: 1; transform: none; } }
  @keyframes panda-tint { from { opacity: 0; } to { opacity: 1; } }
  @keyframes panda-cry { from { opacity: 0; translate: 0 -.1rem; } 25% { opacity: 1; } to { opacity: 0; translate: 0 .45rem; } }
}

:root { --teal: #367e79; --soft-teal: #c2ebe3; --paper: #fffdfb; }
body { background: radial-gradient(ellipse at 50% 0%, #fffdf9, #fff1f6 58%, #fcebf1); }
.entrance { background-color: #fff8f7; background-image: radial-gradient(ellipse at 50% 45%,#fffefadb,transparent 76%), repeating-linear-gradient(0deg,#e582a32b 0 21px,transparent 21px 42px), repeating-linear-gradient(90deg,#e582a32b 0 21px,transparent 21px 42px); }
.stationery, .polaroid { box-shadow: 0 12px 34px #bf628128, 0 0 30px #fff9; }
.intro { background: radial-gradient(ellipse at center,#fffefa,#fde5ed 77%,#f9dce5); }
.stamp { box-shadow: 0 0 18px #fbb8d98c; }
.intro .stamp, .book-ribbon { color: var(--teal); background: var(--soft-teal); }
.particle { text-shadow: 0 0 4px #fff, 0 0 12px currentColor; }
.particle:nth-of-type(7n) { color: var(--teal); }
#book-cover {
  position: relative;
  display: grid;
  justify-items: center;
  place-content: center;
  gap: .5rem;
  width: min(15rem, 100%);
  aspect-ratio: .86;
  margin: 2rem auto;
  padding: 1.5rem;
  border: 2px solid #cf87a6;
  border-left: .7rem solid #a94e76;
  border-radius: .35rem 1.25rem 1.25rem .35rem;
  outline: 1px dashed #cf87a6;
  outline-offset: -11px;
  background: radial-gradient(ellipse at 62% 33%,#fff9f8,#f8cbdf);
  box-shadow: 5px 5px #fffdfb, 7px 7px #e8b7ca, 0 16px 38px #ab4c763e;
  color: var(--berry);
  transform-origin: left center;
}
#book-cover strong { font-size: 1.5rem; }
.book-heart { font-size: 3.6rem; line-height: 1; text-shadow: 0 0 16px #fff; }
.book-ribbon { position: absolute; top: -2px; right: 1.45rem; padding: .25rem .5rem .75rem; clip-path: polygon(0 0,100% 0,100% 100%,50% 78%,0 100%); }
#book-pages { scroll-margin-top: 1rem; }
.photo-open { display: block; width: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
#photo-dialog { width: min(34rem,calc(100% - 2rem)); }
#photo-dialog img { display: block; width: 100%; max-height: 65svh; object-fit: contain; }
#photo-caption { padding-top: .5rem; font-style: italic; }
.gift-grid button { background: radial-gradient(ellipse at top,#fff,#fff0f6); box-shadow: 0 .5rem 1.6rem #b2638c1a; }
@media (prefers-reduced-motion: no-preference) {
  #book-cover { transition: box-shadow .25s; }
  #book-cover:hover { box-shadow: 5px 5px #fffdfb, 7px 7px #e8b7ca, 0 0 35px #f4a1cadb; }
  #book-cover.unfolding { animation: turn-cover .5s cubic-bezier(.35,.05,.25,1) both; }
  #book-pages:not([hidden]) { animation: appear .55s .15s ease-out both; }
  #photo-dialog[open], #gift-dialog[open] { animation: panda-pop .33s cubic-bezier(.2,.85,.4,1.12) both; }
  .intro .stamp, .welcome-card .stamp { animation: drift 3.5s ease-in-out infinite; }
  .bouquet span { animation: bloom .55s cubic-bezier(.2,.85,.4,1.25) both; }
  .bouquet span:nth-child(2) { animation-delay: .12s; }
  .bouquet span:nth-child(3) { animation-delay: .2s; }
  @keyframes turn-cover { to { transform: perspective(42rem) rotateY(-78deg) translateX(-.4rem); opacity: 0; } }
  @keyframes drift { 50% { translate: 0 -.35rem; box-shadow: 0 0 25px #fab7dd; } }
  @keyframes bloom { from { opacity: 0; scale: .4; translate: 0 .7rem; } to { opacity: 1; scale: 1; translate: 0; } }
}

/* Candy-colored wallpaper and sticker illustrations. */
#wallpaper { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: -1; background: #ffe1eb; }
#wallpaper span { position: absolute; left: var(--x); top: var(--y); color: #ee8eb5; opacity: .43; font: 900 var(--size)/1 Georgia,serif; rotate: var(--tilt); text-shadow: 0 0 14px #ffb8d4; }
#wallpaper span:nth-child(13n) { color: #5ca8a1; opacity: .26; }
body { position: relative; isolation: isolate; background: transparent; }
.intro { background: radial-gradient(ellipse at center,#fffefaed,#fde5ed78 74%,#f9dce55c); }
.entrance { background-color: #fff1f2b5; background-image: repeating-linear-gradient(0deg,#d844782f 0 30px,transparent 30px 60px),repeating-linear-gradient(90deg,#d844782f 0 30px,transparent 30px 60px); }
.stationery { border: 2px solid #b55578; box-shadow: .35rem .45rem #b9547855,0 0 50px #fff8; }
.gifts h2, #gift-title { color: #a92149; font-family: Georgia,serif; font-weight: 900; text-shadow: 1px 2px #fff,2px 3px #e99fb9; }
.gifts h2 { text-transform: uppercase; }
.gift-grid button { border: 2px solid #a83e64; background: linear-gradient(#f8bfda,#f6aaca); box-shadow: 0 .3rem #aa456a44, inset 0 0 0 2px #fff8; font-weight: bold; }
.gift-grid button:hover { background: #ffd6e6; box-shadow: 0 0 22px #fff,0 .35rem #aa456a55; }
.critter, .gift-grid .critter { display: block; position: relative; isolation: isolate; width: 5rem; height: 5.7rem; margin: .35rem auto .6rem; font-size: 1rem; filter: drop-shadow(0 .26rem 0 #9c3f6444); color: #312437; }
.critter::before, .critter::after { content: ''; position: absolute; top: .45rem; width: 1.6rem; height: 1.65rem; border: 2px solid #322231; border-radius: 50%; background: #3e2b3c; }
.critter::before { left: .15rem; rotate: -17deg; }
.critter::after { right: .15rem; rotate: 17deg; }
.critter i { position: absolute; z-index: 1; inset: 1.1rem .3rem 1.35rem; border: 2px solid #322231; border-radius: 49% 49% 45% 45%; background: radial-gradient(circle at 35% 53%,#312437 0 5%,transparent 6%),radial-gradient(circle at 65% 53%,#312437 0 5%,transparent 6%),radial-gradient(ellipse at 24% 69%,#f8a8bc 0 8%,transparent 10%),radial-gradient(ellipse at 76% 69%,#f8a8bc 0 8%,transparent 10%),#fff9f6; }
.critter i::after { content: ''; position: absolute; left: 43%; top: 62%; width: 14%; height: 17%; border-bottom: 2px solid currentColor; border-radius: 0 0 50% 50%; }
.critter b { position: absolute; z-index: 2; bottom: .23rem; left: 28%; width: 44%; border: 2px solid #472e41; border-radius: 48%; background: #fff2f5; color: #af315c; font-size: 1.2rem; line-height: 1.4; }
.critter.panda i { background: radial-gradient(ellipse at 32% 53%,#fff 0 2%,#312437 3% 9%,transparent 10%),radial-gradient(ellipse at 68% 53%,#fff 0 2%,#312437 3% 9%,transparent 10%),#fff9f6; }
.critter.penguin::before { left: -.05rem; top: 2rem; }
.critter.penguin::after { right: -.05rem; top: 2rem; }
.critter.penguin i { box-shadow: inset 0 .32rem #3e2b3c; }
.critter.penguin i::after { background: #fdbb60; border: 1px solid #8f5315; }
.critter.bunny::before,.critter.bunny::after { height: 2.35rem; width: 1.13rem; top: 0; background: radial-gradient(ellipse,#f399b9 38%,#fff9f6 42%); }
.critter.cat::before,.critter.cat::after { height: 1.85rem; width: 1.7rem; top: .3rem; background: #e7a876; border-radius: .25rem .9rem .15rem; }
.critter.cat i { background-color: #ffdab9; }
#access-granted { width: min(12rem,calc(100% - 2rem)); padding: .75rem .55rem; border: 2px solid #a94c69; border-radius: .55rem; background: #fff9f5; box-shadow: 0 4px 0 #80375175,0 12px 28px #62142b44; }
#access-granted::backdrop { background: #d6406573; }
#access-granted h2 { font-size: 1.2rem; font-weight: bold; }
#access-granted form { margin-top: .4rem; }
#access-granted .pill { padding: .22rem .7rem; border-radius: .35rem; }
#gift-dialog { width: min(39rem,calc(100% - 1rem)); background-color: #ffe2ed; background-image: radial-gradient(ellipse at 50% 45%,#fff4f7f0,transparent 77%),radial-gradient(circle at 12% 15%,#f4a1c448 0 11%,transparent 11.5%),radial-gradient(circle at 90% 84%,#f4a1c456 0 13%,transparent 13.5%); background-size: auto,12rem 10rem,13rem 11rem; border: 2px solid #bd6284; box-shadow: 0 0 38px #fab7d37a; }
.flower-scene { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.6fr) minmax(0,1fr); align-items: center; gap: .2rem; margin: 1rem auto; }
.flower-notes { display: grid; gap: clamp(.4rem,2vw,.9rem); }
.flower-notes button { border: 1px solid #661b36; border-radius: .4rem .4rem .75rem .4rem; box-shadow: 2px 3px #cd7198; background: #fffaf7; color: #661b36; padding: .35rem .12rem; font: 700 clamp(.69rem,2.1vw,.95rem)/1.2 system-ui,sans-serif; text-transform: uppercase; }
.rose-bunch { position: relative; width: 100%; min-height: 9rem; aspect-ratio: .92; }
.rose-heads { position: absolute; inset: 0 2% 36%; }
.rose-heads i { position: absolute; display: block; width: 24%; aspect-ratio: 1; transform: translate(-50%,-50%); border-radius: 46% 52% 47% 55%; background: repeating-radial-gradient(ellipse at 52% 47%,#a83c60 0 8%,#e789a7 10% 17%,#ffd4df 20% 25%); box-shadow: inset 0 0 .55rem #a24b6b50,0 .15rem .26rem #7f25434f; }
.stems { position: absolute; inset: 40% 25% 1%; clip-path: polygon(0 0,100% 0,57% 56%,74% 100%,29% 98%,43% 57%); background: repeating-linear-gradient(84deg,#6c7634 0 3px,#a5a759 4px 6px,#525b2e 7px 9px); }
.bouquet-tie { position: absolute; inset: 67% auto auto 50%; translate: -50%; color: #9a2048; background: #ffd1e0; border: 1px solid #bd6a8a; border-radius: .35rem; padding: 0 .45rem; }
.mail summary .envelope-art { width: min(16rem,100%); height: 8.75rem; background: linear-gradient(34deg,#dc829a 49%,transparent 50%),linear-gradient(-34deg,#d98098 49%,#eea3b5 50%); box-shadow: 0 .35rem 1rem #99335344; }
.envelope-art::before { background: linear-gradient(#f4b1c3,#ba5e7b); }
.envelope-art i { border: 2px solid #9b3157; border-radius: 45%; padding: 0 .4rem; background: #ffd4e2; box-shadow: 0 0 12px #fff9; }
.cake-tier { display: grid; place-items: end center; height: 3.25rem; padding-bottom: .2rem; border: 2px solid #7b3c34; border-top: .75rem solid #71372b; border-radius: 20% 20% .75rem .75rem; background: radial-gradient(circle at 10% 0,#71372b 0 7%,transparent 8%) 0 0/2rem 2rem repeat-x,linear-gradient(#ffebf1 40%,#e294af 42% 65%,#cd966b 66%); font-size: 1rem; }
.tier-top { width: 6.4rem; }.tier-middle { width: 8.1rem; }.tier-bottom { width: 10rem; }
@media (prefers-reduced-motion: no-preference) {
  #access-granted[open] { animation: panda-pop .35s cubic-bezier(.2,.85,.4,1.25) both; }
  #wallpaper span { animation: wallpaper-drift 9s var(--delay) ease-in-out infinite; }
  .critter { animation: sticker-bob 3s ease-in-out infinite; }
  .gift-grid button:nth-child(even) .critter { animation-delay: -1.5s; }
  .gift-grid button:hover .critter { animation: sticker-hop .5s ease-out; }
  .rose-heads i { animation: rose-open .55s var(--delay) cubic-bezier(.19,.9,.4,1.2) both; }
  .cake-tier { animation: appear .5s ease-out both; }
  .tier-middle { animation-delay: .09s; }.tier-top { animation-delay: .16s; }
  @keyframes wallpaper-drift { 50% { translate: 0 -.6rem; opacity: .32; } }
  @keyframes sticker-bob { 50% { translate: 0 -.28rem; rotate: -3deg; } }
  @keyframes sticker-hop { 40% { translate: 0 -.75rem; rotate: 7deg; } 75% { scale: 1.08 .9; } }
  @keyframes rose-open { from { opacity: 0; scale: .2; } to { opacity: 1; scale: 1; } }
}

.particle { position: absolute; }
dialog { overflow-x: hidden; }

#book-close { margin-top: 2.5rem; }
.discoveries { margin: 1.4rem auto .3rem; padding: .9rem .7rem; border: 2px dashed #cb7598; border-radius: 1rem; background: #fff7f5c9; }
.discoveries h3 { margin: 0; color: var(--berry); font-size: clamp(1.3rem,5vw,2rem); }
.discovery-progress { color: #73405b; }
.discovery-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: .45rem; margin-top: .65rem; }
.discovery-grid button { min-height: 2.9rem; padding: .1rem; border: 2px solid #b55b83; border-radius: .55rem; background: linear-gradient(#fff8fa,#f6bad3); color: var(--berry); box-shadow: 0 2px #aa517946; font-size: 1.48rem; }
.discovery-grid button:hover { background: #fff; box-shadow: 0 0 13px #ed83b0; }
.discovery-grid button.opened { background: #e4f6ef; border-color: #4c938a; color: #327c73; }
[data-scene="flowers"] .discovery-grid button { border-radius: 50% 50% 45% 45%; }
[data-scene="mail"] .discovery-grid button { background-image: linear-gradient(153deg,transparent 49%,#d482a45e 50%,transparent 52%),linear-gradient(27deg,#f8c2d8 49%,#fff4f7 50%); }
[data-scene="cake"] .discovery-grid button { background-image: linear-gradient(#744034 0 17%,#ffe5ec 18% 57%,#e9a3b9 58% 64%,#fff5ef 65%); }
#big-reveal { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; border: 0; border-radius: 0; padding: clamp(1rem,7vw,4rem); color: #77163e; background: radial-gradient(circle at 50% 48%,#fffdf5 0%,#ffebf4 37%,#f5a6cb 100%); }
#big-reveal[open] { display: grid; place-content: center; justify-items: center; gap: clamp(.5rem,3vh,1.35rem); }
#big-reveal::backdrop { background: #ae416875; }
#big-title { font: 900 clamp(3.3rem,12vw,10rem)/.95 Georgia,serif; letter-spacing: -.06em; text-shadow: 0 2px white,0 0 14px white,0 0 42px #ec70a8; }
#big-message { max-width: 24ch; font-size: clamp(1.55rem,5vw,3.5rem); line-height: 1.15; text-wrap: balance; text-shadow: 0 2px white,0 0 23px #fff; }
.reveal-kicker { color: #7a3959; font: 700 .9rem system-ui,sans-serif; }
.reveal-stars { color: #ab3c77; font-size: clamp(1.8rem,6vw,4rem); text-shadow: 0 0 24px white; }
#big-reveal .pill { margin-top: .65rem; }
.critter { width: 5.8rem; height: 6.25rem; }
.critter i { box-shadow: inset 0 -.3rem #f0dce6, inset 0 .2rem #fff; }
.critter i::before { content: ''; position: absolute; top: 39%; left: 26%; width: 13%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 30%,white 0 18%,transparent 22%),linear-gradient(#2e2435 35%,#4d9aa8 82%); box-shadow: 1.55rem .02rem 0 -.03rem #493049; }
.critter.penguin i { background-color: #fff9f3; box-shadow: inset 0 .42rem #3e2b3c,inset 0 -.27rem #dfd4ed; }
.critter.penguin b::after { content: ''; position: absolute; left: -22%; bottom: -.22rem; width: 40%; height: .45rem; background: #ffc779; border: 1px solid #7c4940; border-radius: 50%; box-shadow: 1.5rem 0 #ffc779; }
.critter.bunny b::after,.critter.cat b::after,.critter.panda b::after { content: ''; position:absolute; inset: 30% -23%; pointer-events:none; background: radial-gradient(circle at 11% 52%,#f9dce5 0 13%,transparent 16%),radial-gradient(circle at 89% 52%,#f9dce5 0 13%,transparent 16%); }
.panda-face { background: radial-gradient(ellipse at 15% 68%,#fcaac233 0 12%,transparent 15%),radial-gradient(ellipse at 85% 68%,#fcaac263 0 12%,transparent 15%),#fffdf8; box-shadow: inset 0 -.22rem #eaddE5; }
.panda-eye::after { inset: 20% 23% auto; width: 55%; height: 53%; border: 0; background: radial-gradient(circle at 35% 27%,#fff 0 17%,transparent 22%),linear-gradient(#292638 40%,#73b9e1 75%,#9fddfa); }
.sad-panda::after { content: ''; position: absolute; bottom: .28rem; left: 28%; width: 23%; height: 18%; border: 2px solid #3b2932; border-radius: 50%; background: #fff9f6; box-shadow: .98rem 0 0 -.11rem #fff9f6,.98rem 0 #3b2932; }
@media (prefers-reduced-motion: no-preference) {
  #big-reveal[open] #big-title { animation: big-glow .65s cubic-bezier(.15,.82,.32,1.2) both; }
  #big-reveal[open] #big-message { animation: appear .45s .18s ease-out both; }
  #big-reveal[open] .reveal-stars { animation: drift 2s ease-in-out infinite; }
  @keyframes big-glow { from { opacity: 0; scale: .62; filter: brightness(1.8); } to { opacity: 1; scale: 1; filter: brightness(1); } }
}

/* Sticker-book arcade and animated popup controls. */
.bottom-close { display: grid; justify-items: center; margin: 1.35rem auto .1rem; }
.bottom-close button { display: grid; justify-items: center; gap: .1rem; min-width: 5.4rem; padding: .3rem .8rem .55rem; border: 2px solid #ad5279; border-radius: .9rem; color: #741e48; background: #ffe2ee; box-shadow: 0 .24rem #a93c6942; }
.bottom-close button span { display: grid; place-items: center; width: 2rem; aspect-ratio: 1; border-radius: 50%; background: #fff4f8; font-size: 1.4rem; line-height: 1; }
.bottom-close button:hover { background: #fff3f9; box-shadow: 0 .24rem #a93c6942,0 0 1.15rem #f783ba9c; }
#book-close { display: grid; margin-inline: auto; }
.arcade { position: relative; margin-block: 2rem; padding-top: 2rem; border: 2px solid #b96188; border-radius: 2.3rem 2.3rem 1rem 1rem; background: linear-gradient(180deg,#e4e3ff 0,#fbe2f0 36%,#fff1e9 75%); box-shadow: inset 0 0 0 6px #fff9,0 .85rem 2.2rem #74355325; }
.arcade h2 { color: #892750; text-shadow: 2px 2px #fff8f7,4px 4px #eaa5c7; margin-bottom: .65rem; }
.date-scene { position: relative; display: flex; align-items: end; justify-content: center; isolation: isolate; gap: clamp(.2rem,3vw,2rem); width: min(100%,31rem); min-height: 9.5rem; margin: 0 auto 1.5rem; overflow: hidden; border: 2px solid #bd729d; border-radius: 50% 50% 1rem 1rem / 30% 30% 1rem 1rem; background: linear-gradient(#c6bdf8,#ffdaed 70%,#c9e7d5 71%); box-shadow: inset 0 0 0 4px #fff8,0 .35rem #cc84a85c; color: #fffaf1; }
.date-scene::before { content: ''; position: absolute; z-index: -1; inset: 0; background: radial-gradient(circle at 22% 23%,#fff 0 1%,transparent 2%),radial-gradient(circle at 75% 13%,#fffbdf 0 1.4%,transparent 2%),radial-gradient(ellipse at 50% 100%,#ffe6e8 0 16%,transparent 17%); }
.date-scene > span:not(.critter) { align-self: start; padding-top: .85rem; font-size: clamp(.9rem,5vw,2.8rem); text-shadow: 0 0 .7rem white; }
.date-scene .critter { flex: 0 0 5rem; margin-inline: 0; }
#game-menu { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: clamp(.45rem,2vw,1rem); margin: 1.3rem auto 0; }
.game-tile { min-height: 6.8rem; border: 2px solid #a55179; border-radius: 1rem; padding: .45rem .2rem; background: radial-gradient(circle at 50% 20%,#fff4ed,#ffd5ec 65%); color: #57203b; box-shadow: inset 0 0 0 3px #fff9,0 .28rem #b6658c64; font-weight: bold; }
.game-tile:nth-child(3n) { background: radial-gradient(circle at 50% 20%,#fff6e3,#f7ddad 95%); }
.game-tile:nth-child(4n) { background: radial-gradient(circle at 50% 20%,#f8fff8,#cfe7df 95%); }
.game-tile span { display: block; font-size: 2rem; line-height: 1.35; filter: drop-shadow(0 .15rem .12rem #9e577449); }
#game-dialog { width: min(34rem,calc(100% - 1rem)); border: 2px solid #b96188; background: radial-gradient(circle at 50% 25%,#fffdf6,#ffe4ef 75%); padding: 1.3rem .85rem; }
#game-title { color: #8d214e; font-weight: bold; text-shadow: 2px 2px white; }
#game-instructions { margin: .6rem auto; max-width: 31ch; }
.game-pad { display: grid; grid-template-columns: repeat(var(--columns),minmax(0,1fr)); gap: .32rem; width: min(100%,22rem); margin: .85rem auto; }
.game-pad button { min-width: 0; min-height: 2.8rem; padding: .12rem; font-size: clamp(1.05rem,5vw,1.75rem); border: 2px solid #b35b84; border-radius: .65rem; color: #7c2b50; background: #fff6f9; box-shadow: 0 2px #bd699d66; }
.game-pad button.lit { background: #fff0a8; box-shadow: 0 0 1rem #ffb650; color: #653231; }
.game-pad button:disabled { opacity: .7; cursor: default; }
#game-status { min-height: 1.6em; margin: .35rem 0 .7rem; color: #79294f; font-weight: bold; }
.critter i::before { left: 24%; width: 16%; box-shadow: 1.52rem 0 0 -.025rem #493049,1.47rem -.03rem 0 .035rem #fff; }
.critter b::before { content: ''; position: absolute; inset: 31% -21% 22%; z-index: -1; background: #ffeff4; border: 1px solid #654159; border-radius: 50%; }
.critter.cat i::after { width: 26%; left: 37%; box-shadow: -.43rem -.05rem 0 -.14rem #604059,.43rem -.05rem 0 -.14rem #604059; }
@media (max-width: 36rem) { #game-menu { grid-template-columns: repeat(2,minmax(0,1fr)); } .arcade { margin-inline: .45rem; } }
@media (prefers-reduced-motion: no-preference) {
  #game-dialog[open] { animation: panda-pop .38s cubic-bezier(.2,.85,.4,1.12) both; }
  dialog[open].leaving { pointer-events: none; animation: sticker-exit .225s ease-in both !important; }
  dialog[open].leaving::backdrop { animation: curtain-out .225s ease-in both; }
  .bottom-close button,.game-tile,.game-pad button { transition: transform .22s,box-shadow .22s,background .22s; }
  .bottom-close button:hover,.game-tile:hover,.game-pad button:not(:disabled):hover { transform: translateY(-.2rem) rotate(-1deg); }
  .bottom-close button:active,.game-tile:active,.game-pad button:not(:disabled):active { transform: translateY(.1rem) scale(.95); }
  .game-tile:hover span { animation: sticker-hop .5s ease-out; }
  .date-scene > span:not(.critter) { animation: drift 4s ease-in-out infinite alternate; }
  .date-scene > span:nth-child(even) { animation-delay: -2s; }
  .game-pad button.lit { animation: lantern-glow 1.2s ease-in-out infinite alternate; }
  @keyframes sticker-exit { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(.8rem) rotate(-2deg) scale(.86); } }
  @keyframes curtain-out { to { opacity: 0; } }
  @keyframes lantern-glow { to { box-shadow: 0 0 1.2rem #ffb650, inset 0 0 .6rem #fff; } }
}

@media (prefers-reduced-motion: no-preference) {
  #book-pages.folding { animation: scrapbook-fold .24s ease-in both; }
  @keyframes scrapbook-fold { to { opacity: 0; scale: .98; } }
}

/* The scrapbook and gifts share a single illustrated spread. */
.keepsake-spread {
  display: grid; grid-template-columns: minmax(12rem,.72fr) minmax(0,1.28fr); gap: .85rem;
  max-width: 68rem; margin: 1.05rem auto 2rem; padding: .75rem;
  border: 1px solid #cc7a9e; border-radius: 1.5rem;
  background: repeating-linear-gradient(45deg,#fff4f87a 0 8px,#ffe6ef7a 8px 16px),#fff4f8;
  box-shadow: inset 0 0 0 4px #fff, 0 .5rem #bc729640, 0 0 2rem #ffbade;
}
.keepsake-spread > .section { width: 100%; margin: 0; padding: .9rem .55rem 1rem; border: 0; }
.keepsake-spread #scrapbook { border-right: 1px dashed #ce80a2; }
.keepsake-spread h2 { font-size: clamp(1.55rem,4.2vw,3rem); margin-bottom: .4rem; }
.keepsake-spread .gift-grid { margin: .65rem auto 0; gap: .45rem; }
.keepsake-spread #book-cover { width: min(12rem,100%); min-height: 9rem; aspect-ratio: 1.22; margin: .65rem auto .15rem; }
.keepsake-spread #book-pages { grid-column: 1 / -1; padding: .5rem .65rem 1.25rem; }
.keepsake-spread #book-cover .book-heart { font-size: 2.5rem; }
@media (max-width: 45rem) { .keepsake-spread .gift-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 36rem) {
  .keepsake-spread { grid-template-columns: 1fr; gap: .25rem; margin-inline: .45rem; }
  .keepsake-spread #scrapbook { border-right: 0; border-bottom: 1px dashed #ce80a2; }
  .keepsake-spread #book-cover { width: 10rem; min-height: 7rem; padding: .75rem; }
  .keepsake-spread .gift-grid button { min-height: 7rem; }
}

#big-reveal.victory-letter[open] { display: block; padding: clamp(.9rem,4vw,2rem); }
#big-reveal.victory-letter #big-title { font-size: clamp(2.35rem,7vw,5.8rem); }
#big-reveal.victory-letter #big-message { width: min(100%,62ch); max-width: none; margin: .9rem auto; padding: clamp(.85rem,3vw,1.7rem); font-size: clamp(1.05rem,2.4vw,1.45rem); line-height: 1.6; text-align: left; text-wrap: pretty; background: #fff8f1c4; border: 2px solid #ce7ca2; box-shadow: 0 0 1.2rem #f496c7, inset 0 0 0 4px #fff; border-radius: .8rem; }
.intro { isolation: isolate; position: relative; overflow: hidden; padding-block: clamp(2rem,7vw,4.8rem); }
.intro::before,.intro::after { content: ''; position: absolute; z-index: -1; inset: 5% auto auto -2rem; width: 18rem; aspect-ratio: 1; background: radial-gradient(ellipse,#ffbad3a8,transparent 70%); }
.intro::after { inset: auto -3rem -6rem auto; background: radial-gradient(ellipse,#ffc6e9c8,transparent 68%); }
.hero-stickers { position: absolute; inset: 0; pointer-events: none; }
.hero-stickers .critter { position: absolute; transform: scale(1.14); transform-origin: center bottom; }
.hero-stickers .panda { left: max(3%,calc(50% - 29rem)); bottom: 4%; rotate: -13deg; }
.hero-stickers .penguin { right: max(3%,calc(50% - 29rem)); bottom: 12%; rotate: 12deg; }
.hero-sparkle { position: absolute; text-shadow: 0 0 .55rem white,0 0 1.4rem currentColor; font-size: clamp(1.3rem,5vw,3.65rem); }
.hero-sparkle.berry { top: 13%; left: 17%; color: #df75ae; }
.hero-sparkle.mint { top: 20%; right: 19%; color: #3c968c; }
.hero-sparkle.flame-light { bottom: 14%; right: 22%; color: #ed7ead; }
.intro-actions { display: flex; justify-content: center; gap: .65rem; flex-wrap: wrap; position: relative; }
.intro-actions .hero-keepsakes { color: #77294d; outline: 1px solid #bd7094; background: #fff4fa; }
.intro-actions .hero-keepsakes:hover { background: white; }
@media (max-width: 40rem) {
  .hero-stickers .critter { transform: scale(.72); bottom: 1.4rem; }
  .hero-stickers .panda { left: 0; }.hero-stickers .penguin { right: 0; }
  .intro-actions { padding-bottom: 3.7rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-sparkle { animation: garden-twinkle 2.4s ease-in-out infinite alternate; }
  .hero-sparkle.mint { animation-delay: -1.7s; }.hero-sparkle.flame-light { animation-delay: -.85s; }
  .intro-actions .pill { transition: translate .25s,box-shadow .25s; }
  .intro-actions .pill:hover { translate: 0 -.2rem; box-shadow: 0 0 1.2rem #e887b3b5; }
}

/* Illustrated animals and the sunset garden. */
.drawn-sticker::before,.drawn-sticker::after,.drawn-sticker > :not(canvas) { display: none; }
.drawn-sticker canvas { display: block; width: 100%; height: 100%; object-fit: contain; }
.critter.drawn-sticker,.gift-grid .critter.drawn-sticker { width: min(100%,6.3rem); height: 6.5rem; filter: drop-shadow(0 .18rem .1rem #7d3c6a40); }
.sad-panda.drawn-sticker { width: 6.8rem; height: 6.5rem; margin: 0 auto .1rem; }
.gift-grid button { position: relative; isolation: isolate; overflow: hidden; }
.gift-grid button::after { content: ''; position: absolute; inset: -30% 0; z-index: -1; background: linear-gradient(110deg, transparent 34%,#fff9 50%,transparent 66%); transform: translateX(-115%); }
#effects .particle,#garden-dialog .particle { text-shadow: 0 0 .3rem white, 0 0 .8rem currentColor, 0 0 1.2rem #ffaad4; }
.heart-garden {
  position: relative; max-width: 62rem; margin: 2rem auto 1rem; padding: clamp(.8rem,3vw,1.65rem);
  border: 2px solid #b86c93; border-radius: 2.1rem 2.1rem 1.15rem 1.15rem;
  background: radial-gradient(ellipse at 10% 0%,#fff4bf 0%,transparent 50%),radial-gradient(ellipse at 96% 0%,#cef0df 0%,transparent 46%),linear-gradient(#fff6e7,#ffe3eb);
  color: #682949; box-shadow: inset 0 0 0 5px #fff9,0 .45rem #b56b9750,0 0 2rem #f8a8c784;
}
.heart-garden h2 { margin: .65rem 0 1rem; color: #83234d; text-shadow: 1px 2px #fff,0 0 1.2rem #ffbdce; }
.garden-illustration {
  position: relative; isolation: isolate; overflow: hidden; width: min(100%,46rem); height: clamp(11rem,26vw,16rem);
  margin: 0 auto; border: 2px solid #a76f99; border-radius: 4rem 4rem 1rem 1rem;
  background: radial-gradient(ellipse at 70% 22%,#fff2afe8,transparent 35%),linear-gradient(#dfbff5 0%,#f5c6dc 54%,#ffdeb8 82%);
  box-shadow: inset 0 0 0 4px #fff7,0 .4rem #c482a858,0 0 1.4rem #efacd8;
}
.garden-sun { position: absolute; right: 24%; top: 9%; width: 4.45rem; aspect-ratio: 1; border-radius: 50%; background: #fff4bc; box-shadow: 0 0 1rem #fff,0 0 3rem #ffe39d; }
.garden-cloud { position: absolute; top: 33%; width: 8rem; height: 1.2rem; border-radius: 2rem; background: #fff7eea0; box-shadow: 1.3rem -.35rem #fffb; }
.garden-cloud.first { left: 8%; }.garden-cloud.second { right: 3%; top: 45%; scale: .7; }
.garden-cloud::before { content: ''; position: absolute; left: 1rem; bottom: .35rem; width: 3rem; height: 1.65rem; border-radius: 50%; background: #fff4f6c0; }
.garden-hill { position: absolute; inset: 71% -17% -70%; transform: rotate(-6deg); border-radius: 50% 58% 0 0; background: #80b89e; border-top: 2px solid #6c9a8a; }
.garden-hill.front { inset: 76% -20% -50% 23%; transform: rotate(8deg); background: repeating-linear-gradient(125deg,#f6ffcf22 0 4px,transparent 4px 11px),#9dc7a1; }
.garden-blooms { position: absolute; bottom: 4%; left: 5%; color: #fffbcc; text-shadow: .1rem .12rem #7fa986,0 0 .8rem #fff; font-size: 1.2rem; }
.garden-sparkles { position: absolute; top: 12%; left: 10%; color: #fff3ae; font-size: 1.6rem; text-shadow: 0 0 .7rem #fff; }
.garden-illustration .critter { position: absolute; bottom: 3%; left: 37%; }
.garden-illustration .cat { left: 53%; bottom: 1%; }
.garden-kite { position: absolute; right: 12%; top: 22%; width: 2.15rem; aspect-ratio: 1; border: 1px solid #af5f91; background: linear-gradient(135deg,#ff9ebe,#f9c3c6 49%,#e58db4 50%,#facce9); rotate: 42deg; display: grid; place-items: center; color: #8d3c68; box-shadow: 0 0 .75rem #ffcbe6; }
.garden-kite i { rotate: -42deg; font-style: normal; }
.garden-kite::after { content: ''; position: absolute; top: 90%; left: 81%; width: .75rem; height: 2.6rem; border-end-start-radius: 90%; border-left: 1px dashed #934973; }
.garden-firefly { position: absolute; bottom: 30%; left: 20%; width: .4rem; aspect-ratio: 1; border-radius: 50%; background: #fff3a0; box-shadow: 0 0 .7rem .18rem #fff7ae; }
.garden-menu { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .5rem; }
.garden-menu button {
  min-height: 5.9rem; padding: .45rem .3rem; border: 2px solid #bc7599; border-radius: 1rem;
  color: #652c50; background: radial-gradient(ellipse at 48% 17%,#fff8eb,#ffd9e4 74%);
  box-shadow: inset 0 0 0 3px #fff9,0 .25rem #b068914b; font-weight: bold;
}
.garden-menu button:nth-child(2) { background: radial-gradient(#fff8fb,#e8dcf6); }
.garden-menu button:nth-child(3) { background: radial-gradient(#fff9e3,#ffe0af); }
.garden-menu button:nth-child(4) { background: radial-gradient(#faffec,#d4ebdf); }
.garden-menu button span { display: block; font-size: 1.9rem; filter: drop-shadow(0 0 .38rem #fff); }
#garden-dialog { width: min(36rem,calc(100% - 1rem)); padding: 1.1rem .8rem; border: 2px solid #b76b99; background: radial-gradient(ellipse at 50% 8%,#fff7df,#ffe6ee 75%); box-shadow: 0 0 2.1rem #ffa7d4; }
#garden-title { color: #8d2857; font-weight: 700; text-shadow: 1px 2px #fff,0 0 .95rem #ffd0e7; }
#garden-body { margin-top: .65rem; }
.garden-message { width: min(100%,33ch); min-height: 2em; margin: .6rem auto 0; font-size: clamp(1.08rem,3.5vw,1.45rem); color: #702348; text-wrap: balance; }
.wish-sky,.firework-sky {
  position: relative; isolation: isolate; overflow: hidden; width: min(100%,30rem); height: 11.6rem; margin: .65rem auto;
  border: 2px solid #a16e9b; border-radius: 2rem 2rem .85rem .85rem;
  background: radial-gradient(circle at 73% 18%,#a366ac7f,transparent 38%),linear-gradient(#312346,#693d69 70%,#cb8c9c);
  box-shadow: inset 0 0 0 3px #fff3,0 0 1rem #e6a1ce;
}
.wish-sky::before,.firework-sky::before { content: '·  ✦     ·   ✧   ·       ✦    ·'; position: absolute; inset: 12% 7% auto; color: #fffabe; text-shadow: 0 0 .5rem #ffbfe8; font-size: 1.4rem; letter-spacing: .28rem; }
.firework-sky { cursor: crosshair; }
.scene-moon { position: absolute; top: 4%; right: 13%; color: #ffefb2; font-size: 3.3rem; line-height: 1; text-shadow: 0 0 1rem #ffe2a1; }
.wish-form { display: grid; gap: .4rem; justify-items: center; }
.wish-form input { width: min(22rem,100%); padding: .45rem .7rem; border: 1px solid #b26891; border-radius: .6rem; color: #57223f; background: #fffdf8; }
.lantern-orbit,.firework-stars { position: absolute; inset: 0; pointer-events: none; }
.wish-lantern { position: absolute; left: var(--lantern-x); bottom: 1.25rem; background: radial-gradient(#fffba7,#ffba68 65%,#f0788d); border: 1px solid #ffcbd0; border-bottom: .28rem solid #d98476; border-radius: .65rem .65rem .33rem .33rem; padding: .15rem .42rem; color: #833857; box-shadow: 0 0 1.5rem #ffca96; }
.snow-globe { display: grid; place-items: center; width: min(12rem,100%); margin: 0 auto .85rem; transform-origin: center 92%; }
.globe-glass { position: relative; display: grid; place-items: end center; overflow: hidden; isolation: isolate; width: 100%; aspect-ratio: 1.02; border: 3px solid #a28ab5; border-radius: 50%; background: radial-gradient(ellipse at 28% 19%,#fffc 0 6%,transparent 10%),radial-gradient(ellipse at 50% 98%,#fff3df 0 20%,transparent 39%),linear-gradient(#b6b4ef,#d5e9ef 72%,#b1d5ca); box-shadow: inset 0 0 1.1rem #fff,0 0 1.4rem #ddafe5; }
.globe-glass .critter { margin-bottom: .8rem; }
.globe-heart { position: absolute; top: 13%; left: 44%; color: #a23771; text-shadow: 0 0 .9rem white; font-size: 1.6rem; }
.globe-base { width: 85%; margin-top: -.45rem; z-index: 1; padding: .22rem; border: 2px solid #a45a85; border-radius: .7rem; background: linear-gradient(#ffe3ea,#d89abb); color: #6c3151; font-weight: bold; box-shadow: 0 .3rem #93496c47; }
.globe-flurry { position: absolute; left: var(--x); top: var(--y); color: #fff9f4; font-size: 1.1rem; text-shadow: 0 0 .25rem #784392,0 0 .6rem #fff; z-index: 3; }
.globe-flurry:nth-of-type(5n) { color: #b24182; }
.coupon { position: relative; display: grid; place-items: center; overflow: hidden; width: min(100%,26.25rem); min-height: 7.35rem; aspect-ratio: 2.47; margin: .75rem auto; border: 2px solid #a75a88; border-radius: .75rem; background: repeating-linear-gradient(125deg,#ffe6eb 0 10px,#fff5ea 10px 20px); }
.coupon-message { max-width: 22ch; padding: .5rem; color: #6e2950; font-size: clamp(1.13rem,4.5vw,1.65rem); font-weight: bold; text-wrap: balance; }
.scratch-cover { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: cell; }
.garden-reset { padding: .35rem .65rem; border: 1px solid #b46a9a; border-radius: 1rem; color: #672544; background: #fffaef; }
#garden-dialog[data-scene="coupon"] .garden-message { position: absolute; width: 1px; height: 1px; min-height: 0; overflow: hidden; clip-path: inset(50%); }
.sky-message { position: absolute; inset: auto 0 10%; color: #fff2ce; font-size: 1.8rem; text-shadow: 0 0 1rem #ffb7e5; }
.firework-point,.firework-point i { position: absolute; width: .24rem; aspect-ratio: 1; border-radius: 50%; }
.firework-point i { background: var(--fire-color); box-shadow: 0 0 .38rem .1rem var(--fire-color); transform: translate(var(--x),var(--y)); }
@media (max-width: 38rem) { .heart-garden { margin-inline: .45rem; }.garden-menu { grid-template-columns: repeat(2,minmax(0,1fr)); }.garden-illustration .critter { left: 28%; }.garden-illustration .cat { left: 52%; } }
@media (prefers-reduced-motion: no-preference) {
  #garden-dialog[open] { animation: panda-pop .42s cubic-bezier(.2,.85,.4,1.12) backwards; }
  .gift-grid button:hover::after { animation: sweep-sticker .7s ease-out; }
  .gift-grid button,.garden-menu button,.pill { transition: transform .23s,background .23s,box-shadow .23s; }
  .garden-menu button:hover,.pill:hover { transform: translateY(-.18rem); box-shadow: 0 0 1.15rem #f68dc3a3; }
  .garden-menu button:active,.pill:active { transform: scale(.95); }
  .garden-menu button span { animation: sticker-bob 3.6s ease-in-out infinite; }
  .garden-menu button:nth-child(2n) span { animation-delay: -1.8s; }
  .garden-cloud { animation: garden-cloud-drift 9s ease-in-out infinite alternate; }
  .garden-cloud.second { animation-delay: -5s; }
  .garden-kite { animation: kite-drift 3.8s ease-in-out infinite alternate; }
  .garden-firefly { animation: firefly-flight 5s ease-in-out infinite alternate; }
  .garden-sparkles,.globe-heart,.scene-moon { animation: garden-twinkle 2.4s ease-in-out infinite alternate; }
  .wish-lantern { animation: lantern-rise 4.4s cubic-bezier(.18,.7,.42,1) both; }
  .globe-flurry { animation: globe-swirl var(--fall) ease-out both; }
  .firework-point i { animation: starburst 1.15s cubic-bezier(.08,.66,.33,1) both; }
  @keyframes sweep-sticker { to { transform: translateX(115%); } }
  @keyframes garden-cloud-drift { to { translate: 2rem -.35rem; } }
  @keyframes kite-drift { to { translate: .75rem -1.15rem; rotate: 58deg; } }
  @keyframes firefly-flight { 40% { translate: 2rem -1.9rem; scale: .65; } to { translate: 4rem .65rem; scale: 1.1; } }
  @keyframes garden-twinkle { to { scale: 1.06; filter: brightness(1.27); } }
  @keyframes lantern-rise { 0% { opacity: .5; transform: translate(0,12px) scale(.58); } 33% { opacity: 1; } 100% { opacity: .68; transform: translate(15px,-6.4rem) rotate(8deg) scale(.58); } }
  @keyframes globe-swirl { 0% { opacity: 0; transform: translate(0,20px); } 20% { opacity: 1; transform: translate(calc(var(--sway) * -.25),-28px); } 100% { opacity: 0; transform: translate(var(--sway),45px); } }
  @keyframes starburst { from { opacity: 1; transform: translate(0,0) scale(.48); } 35% { opacity: 1; } to { opacity: 0; transform: translate(var(--x),var(--y)) scale(.23); } }
}

.garden-menu .garden-badge { display: grid; position: relative; isolation: isolate; place-items: center; width: 2.75rem; height: 2.75rem; margin: .1rem auto .3rem; color: #8f365f; font-size: 1.06rem; }
.garden-badge i { font-style: normal; margin: 0; }
.lantern-badge { background: radial-gradient(#fff1a6,#ff9b82 75%); border: 2px solid #9a4f74; border-radius: .84rem .84rem .55rem .55rem; box-shadow: inset 0 0 0 3px #fff6,0 0 .65rem #ffba8b; }
.lantern-badge::after { content: ''; position: absolute; left: 27%; right: 27%; bottom: -.22rem; height: .24rem; background: #c17495; border-radius: .5rem; }
.globe-badge { border-radius: 50%; border: 2px solid #8775a8; background: radial-gradient(circle at 24% 26%,#fff 0 7%,transparent 9%),radial-gradient(circle,#eee3ff,#b4daf0); box-shadow: inset 0 0 .5rem #fff,0 0 .55rem #a9d6ef; }
.globe-badge::after { content: ''; position: absolute; bottom: -.2rem; left: 14%; right: 14%; height: .38rem; background: #ed94bd; border: 1px solid #8d598a; border-radius: .45rem; }
.garden-menu .coupon-badge { width: 3.2rem; height: 1.8rem; margin-block: .55rem .8rem; rotate: -12deg; border: 2px dashed #ac6681; border-radius: .45rem; background: linear-gradient(120deg,#fff3b9,#ffcaba); box-shadow: 0 0 .7rem #ffdb9e; }
.sky-badge { border: 2px solid #6f5c89; border-radius: 38%; background: radial-gradient(#a4749c,#54426e); color: #ffe5a3 !important; text-shadow: 0 0 .45rem #ffdb97; box-shadow: 0 0 .75rem #b6e7d9; }
.sky-badge::before,.sky-badge::after { content: '✦'; position: absolute; top: 12%; left: 13%; color: #c7f4df; font-size: .53rem; }
.sky-badge::after { top: auto; left: auto; right: 16%; bottom: 13%; color: #ffc6e6; }
.garden-illustration::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 18% 67%,#fff9bb 0 1px,transparent 3px),radial-gradient(circle at 75% 64%,#fff9bb 0 2px,transparent 4px),radial-gradient(circle at 81% 72%,#d1ffeb 0 1px,transparent 3px),radial-gradient(circle at 24% 78%,#fff7be 0 1px,transparent 3px),radial-gradient(circle at 12% 58%,#fbd4f0 0 1px,transparent 3px); }
@media (prefers-reduced-motion: no-preference) {
  .garden-illustration::after { animation: garden-lights 4s ease-in-out infinite alternate; }
  .garden-menu button:hover .garden-badge i { animation: badge-beat .6s cubic-bezier(.2,.7,.3,1); }
  @keyframes garden-lights { from { opacity: .33; } to { opacity: 1; translate: 0 -.45rem; filter: drop-shadow(0 0 .12rem #fff); } }
  @keyframes badge-beat { 38% { scale: 1.5; filter: brightness(1.35); } 70% { scale: .91; } }
}

/* A luminous layer behind the stationery, with a deliberately visible sweep. */
#wallpaper { background: linear-gradient(145deg,#ffcee4 0%,#fff0e1 43%,#f0d1fb 77%,#ffdfeb); }
.aurora { position: absolute; inset: auto; width: 72vw; height: 68vh; border-radius: 50%; filter: blur(clamp(24px,6vw,72px)); opacity: .69; will-change: transform; }
.aurora-rose { left: -20%; top: -15%; background: #ff8abf; }
.aurora-peach { right: -13%; top: 20%; background: #ffdf9b; }
.aurora-mint { bottom: -37%; left: 27%; background: #a9eada; opacity: .45; }
#wallpaper span { z-index: 1; opacity: .53; color: #d76fa4; text-shadow: 0 0 .52rem #fff,0 0 1.2rem #ff92ba; }
.comet { position: absolute; z-index: 2; height: 2px; width: clamp(2rem,11vw,8rem); background: linear-gradient(90deg,transparent,#fffbcf 80%,#fff); transform: rotate(-27deg); box-shadow: 0 0 .62rem #fff8cc; opacity: 0; }
.comet::after { content: ''; position: absolute; right: -2px; top: -2px; width: 6px; aspect-ratio: 1; border-radius: 50%; background: #fff; box-shadow: 0 0 .8rem .19rem #fff8ce; }
.comet-one { left: 3%; top: 28%; }.comet-two { left: 55%; top: 64%; }.comet-three { left: 12%; top: 81%; }
.entrance { background-color: #ffe6ed91; }
.stationery { background: radial-gradient(ellipse at 18% 0%,#fff7db,transparent 43%),radial-gradient(ellipse at 100% 100%,#ffd6e9,transparent 60%),#fff8fb; box-shadow: .35rem .45rem #ad436c66,0 0 1.9rem #ff80b8,0 0 5rem #fff4; }
.stationery h1, .intro h1 { text-shadow: 0 2px #fff7f4,0 0 1.5rem #f899c9ad; }
.stationery .stamp,.intro .stamp { box-shadow: 0 0 .9rem #fff,0 0 1.5rem #f299cc8f; }
#code:focus { box-shadow: 0 0 .95rem #ff92beaa; }
.keypad button { background: linear-gradient(#fff5f8,#ffc7df); box-shadow: 0 .16rem #cf6a99a6,inset 0 0 0 2px #fff9; }
.keypad .unlock { background: linear-gradient(#be4b82,#81224f); }
.intro { background: radial-gradient(ellipse at 50% 44%,#fff8edcf 0%,#ffe1ed8f 47%,#f6b0d36b 100%); }
.hero-ribbons { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.hero-ribbons i { position: absolute; left: -9%; top: 17%; width: 120%; height: 43%; rotate: -13deg; border-radius: 50%; border-top: 2px solid #fff7cb; box-shadow: 0 -.35rem .85rem #fff4cb80; }
.hero-ribbons i:nth-child(2) { rotate: 15deg; top: 28%; border-color: #fffb; box-shadow: 0 -.35rem 1.3rem #fb93cf; }
.hero-ribbons i:nth-child(3) { rotate: -7deg; top: 75%; border-color: #eda0c4; box-shadow: 0 -.22rem 1.16rem #fdc5df; }
.hero-stickers .critter { filter: drop-shadow(0 0 .55rem #fffb) drop-shadow(0 .28rem 0 #8a3b652b); }
.gifts h2,.heart-garden h2,.arcade h2 { text-shadow: 2px 2px #fff5f5,0 0 1.15rem #ff7cb5a0; }
.keepsake-spread { background: repeating-linear-gradient(45deg,#fff5f988 0 8px,#ffcde386 8px 16px),linear-gradient(115deg,#fff0d7,#ffe2f2 70%,#e8f6ed); box-shadow: inset 0 0 0 4px #fff,0 .45rem #bd5c8b55,0 0 1.4rem #ff92c0aa; }
.gift-grid button { box-shadow: inset 0 0 0 2px #fff9,0 .32rem #b04c775e,0 0 .65rem #ff9bc968; }
.gift-grid button:nth-child(2) { background: radial-gradient(at top,#fff3f7,#efbff3); }.gift-grid button:nth-child(3) { background: radial-gradient(at top,#fff7db,#ffc9ac); }.gift-grid button:nth-child(4) { background: radial-gradient(at top,#fff9ee,#f8bbd8); }
.garden-floaters { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.garden-floaters i { position: absolute; left: 18%; top: 56%; color: #fff0cf; text-shadow: 0 0 .3rem #fff,0 0 .75rem #fbd8a0; font: bold 1.45rem Georgia,serif; }
.garden-floaters i:nth-child(2) { left: 30%; top: 38%; color: #ffe9a0; }
.garden-floaters i:nth-child(3) { left: 70%; top: 62%; color: #ffeadd; }
.garden-floaters i:nth-child(4) { left: 80%; top: 52%; color: #faffef; }
.garden-floaters i:nth-child(5) { left: 62%; top: 30%; color: #fef1e8; }
.garden-floaters i:nth-child(6) { left: 11%; top: 24%; color: #e0fff7; }
.particle,#effects .particle,#garden-dialog .particle { font-size: var(--size,1.15rem); color: var(--shade,#b93675); text-shadow: 0 0 .24rem white,0 0 .5rem white,0 0 .78rem currentColor; }
.light-ring { position: absolute; z-index: 12; width: 19px; aspect-ratio: 1; border: 2px solid #fff8d7; border-radius: 50%; pointer-events: none; box-shadow: 0 0 .25rem #fff,0 0 .65rem #e950aa,inset 0 0 .41rem #ff80c6; transform: translate(-50%,-50%); animation: light-ring .68s ease-out both; }
.light-ring::after { content: ''; position: absolute; inset: 15%; border: 1px dashed #fff; border-radius: 50%; box-shadow: 0 0 .26rem #fff; }
#big-reveal { background: radial-gradient(ellipse at 50% 44%,#fff9d9 0%,#ffeef5 34%,#f7add4 70%,#c88edb 100%); }
#big-title { text-shadow: 0 2px white,0 0 .35rem white,0 0 1.6rem #ff93c5,0 0 3rem #f467a7; }
#garden-dialog { background: radial-gradient(ellipse at 5% 0%,#fff2b7 0%,transparent 43%),radial-gradient(ellipse at 100% 20%,#d4f2de,transparent 52%),linear-gradient(#fff3ec,#f9d3ef); }
@media (prefers-reduced-motion: no-preference) {
  .aurora-rose { animation: rose-tide 12s ease-in-out infinite alternate; }
  .aurora-peach { animation: peach-tide 14s -4s ease-in-out infinite alternate; }
  .aurora-mint { animation: rose-tide 15s -5s ease-in-out infinite alternate-reverse; }
  .comet { animation: comet-flight 6.8s linear infinite; }
  .comet-two { animation-delay: -2.2s; }.comet-three { animation-delay: -4.4s; }
  .hero-ribbons i { animation: ribbon-light 5s ease-in-out infinite alternate; }
  .hero-ribbons i:nth-child(2) { animation-delay: -2s; }.hero-ribbons i:nth-child(3) { animation-delay: -3s; }
  .hero-stickers .critter { animation: mascot-skip 3.2s ease-in-out infinite; }.hero-stickers .penguin { animation-delay: -1.35s; }
  .hero-sparkle { animation: sparkle-pop 2.4s ease-in-out infinite; }
  .garden-floaters i { animation: float-glow 3.2s ease-in-out infinite; }
  .garden-floaters i:nth-child(2n) { animation-delay: -1.3s; }.garden-floaters i:nth-child(3n) { animation-delay: -2.3s; }
  .garden-kite { animation: kite-show 3.9s ease-in-out infinite alternate; }
  .keepsake-spread.arrived .gift-grid > button,.arcade.arrived .game-tile,.heart-garden.arrived .garden-menu > button { animation: card-arrival .75s cubic-bezier(.18,.76,.32,1.16) both; }
  .keepsake-spread.arrived .gift-grid > button:nth-child(2),.arcade.arrived .game-tile:nth-child(2n),.heart-garden.arrived .garden-menu > button:nth-child(2) { animation-delay: .09s; }
  .keepsake-spread.arrived .gift-grid > button:nth-child(3),.arcade.arrived .game-tile:nth-child(3n),.heart-garden.arrived .garden-menu > button:nth-child(3) { animation-delay: .18s; }
  .keepsake-spread.arrived .gift-grid > button:nth-child(4),.arcade.arrived .game-tile:nth-child(4n),.heart-garden.arrived .garden-menu > button:nth-child(4) { animation-delay: .27s; }
  #book-cover.unfolding { animation: cover-opening .88s cubic-bezier(.35,.08,.25,1) both; }
  #book-pages:not([hidden]):not(.folding) { animation: spread-opening .9s cubic-bezier(.18,.76,.34,1.12) both; transform-origin: center top; }
  #book-pages.folding { animation: spread-closing .46s cubic-bezier(.5,0,.9,.8) both; transform-origin: center top; }
  dialog[open].leaving { animation: sticker-exit .42s cubic-bezier(.5,0,.85,.65) both !important; }
  dialog[open].leaving::backdrop { animation: curtain-out .42s ease-in both; }
  #wrong-code[open],#access-granted[open],#gift-dialog[open],#photo-dialog[open],#game-dialog[open],#garden-dialog[open] { animation: popup-bounce .57s cubic-bezier(.22,.79,.32,1.12) backwards; }
  #big-reveal[open] #big-title { animation: reveal-swell .87s cubic-bezier(.13,.8,.27,1.16) both; }
  #big-reveal[open] .reveal-stars { animation: sparkle-pop 2s ease-in-out infinite; }
  .wish-lantern { animation: lantern-rise 5.5s cubic-bezier(.16,.68,.31,1) both; }
  .globe-flurry { animation-duration: calc(var(--fall) * 1.3); }
  @keyframes rose-tide { to { transform: translate(42vw,23vh) scale(1.33); } }
  @keyframes peach-tide { to { transform: translate(-37vw,-21vh) scale(1.25); } }
  @keyframes comet-flight { 0%,70% { opacity: 0; translate: -20vw 11vh; } 74% { opacity: 1; } 92%,100% { opacity: 0; translate: 55vw -20vh; } }
  @keyframes ribbon-light { to { translate: 1rem 2.5rem; scale: 1.15; opacity: .37; } }
  @keyframes mascot-skip { 30% { translate: 0 -.85rem; rotate: 4deg; } 53% { translate: 0 .12rem; scale: 1.11 .91; } 68% { translate: 0 -.27rem; } }
  @keyframes sparkle-pop { 0%, 100% { opacity: .51; scale: .72; } 44% { opacity: 1; scale: 1.23; filter: brightness(1.24); rotate: 11deg; } }
  @keyframes float-glow { 38% { translate: .8rem -1.65rem; rotate: -14deg; scale: 1.2; } 71% { translate: -.4rem -.65rem; scale: .76; opacity: .65; } }
  @keyframes kite-show { to { translate: 1.4rem -1.65rem; rotate: 65deg; scale: 1.1; } }
  @keyframes card-arrival { from { opacity: .25; translate: 0 1.3rem; rotate: -5deg; scale: .87; } to { opacity: 1; translate: 0 0; rotate: 0deg; scale: 1; } }
  @keyframes light-ring { 0% { opacity: 1; scale: .65; } 72% { opacity: .78; } to { opacity: 0; scale: 4.8; } }
  @keyframes cover-opening { 20% { transform: scale(1.11) rotate(-3deg); box-shadow: 0 0 2rem #ee78be,inset 0 0 1rem #fff; } to { transform: perspective(42rem) rotateY(-85deg) translateX(-.65rem) scale(.91); opacity: 0; } }
  @keyframes spread-opening { from { opacity: 0; transform: perspective(58rem) rotateX(-32deg) scale(.9); } to { opacity: 1; transform: none; } }
  @keyframes spread-closing { to { opacity: 0; transform: perspective(58rem) rotateX(13deg) scale(.85); } }
  @keyframes popup-bounce { from { opacity: 0; transform: translateY(1.55rem) rotate(-4deg) scale(.76); } 66% { opacity: 1; transform: translateY(-.35rem) rotate(1deg) scale(1.035); } to { opacity: 1; transform: none; } }
  @keyframes reveal-swell { from { opacity: 0; scale: .48; translate: 0 .9rem; } 55% { opacity: 1; scale: 1.1; filter: brightness(1.18); } to { opacity: 1; scale: 1; filter: brightness(1); } }
}

.firework-point::before { content: ''; position: absolute; left: -.26rem; top: -.26rem; width: .75rem; aspect-ratio: 1; border: 1px solid #fffbe5; border-radius: 50%; box-shadow: 0 0 .7rem .3rem #ffecb7; opacity: 0; }
.firework-point::after { content: ''; position: absolute; left: .07rem; top: .12rem; width: .19rem; height: 3rem; border-radius: 100%; background: linear-gradient(#fff,#ffd5a1 15%,transparent); box-shadow: 0 -.4rem .55rem #fff3b8; opacity: 0; }
.wish-lantern::after { content: '✦'; position: absolute; top: 100%; left: 50%; color: #ffe08d; text-shadow: 0 0 .6rem currentColor; }
@media (prefers-reduced-motion: no-preference) {
  .firework-point::after { animation: firework-rocket .36s ease-in both; }
  .firework-point::before { animation: firework-halo .65s .31s ease-out both; }
  .firework-point i { animation: starburst 1.05s .32s cubic-bezier(.08,.66,.33,1) both; }
  .wish-lantern::after { animation: lantern-embers .9s ease-out infinite; }
  @keyframes firework-rocket { from { translate: 0 6.9rem; opacity: 0; } 37% { opacity: .9; } 88% { opacity: 1; } to { translate: 0 -.15rem; opacity: 0; } }
  @keyframes firework-halo { 0% { opacity: .95; scale: .65; } to { opacity: 0; scale: 11; } }
  @keyframes lantern-embers { from { opacity: .9; transform: translate(-50%,0) scale(.8); } to { opacity: 0; transform: translate(-72%,1rem) scale(.35); } }
}

/* The welcome, love lock, and keepsake menu are three different illustrated scenes. */
#arrival.entrance,#entrance.entrance {
  background-color: #c97dba43;
  background-image: radial-gradient(ellipse at center,#fff0c36e 0%,#f4a8d54d 45%,#4c214280),repeating-linear-gradient(0deg,#a4438525 0 27px,transparent 27px 54px),repeating-linear-gradient(90deg,#a4438525 0 27px,transparent 27px 54px);
}
.stationery.delivery,.stationery.code-card {
  display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1fr); align-items: stretch;
  width: min(100%,57rem); padding: .55rem; border: 2px solid #f4bbd0; border-radius: 1.85rem; outline: 0;
  background: #ffedf7; box-shadow: 0 .6rem #88466e73,0 1.45rem 3.6rem #72305c63,0 0 2.3rem #fff4;
}
.delivery-art,.code-illustration {
  position: relative; isolation: isolate; overflow: hidden; min-height: clamp(19rem,49vw,29rem);
  border: 1px solid #8f588e; border-radius: 1.25rem; box-shadow: inset 0 0 0 3px #fbd8ea39,inset 0 0 2.1rem #1c1434ac;
  background: radial-gradient(ellipse at 56% 42%,#bc71bb 0%,#75417d 43%,#382546 85%);
}
.delivery-art::before,.code-illustration::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(circle,#fff0d3 0 1px,transparent 2px) 0 0/53px 47px,radial-gradient(circle,#ffc3ed 0 1px,transparent 2px) 13px 9px/83px 62px;
  opacity: .76; mask-image: radial-gradient(ellipse,#0000 18%,#000 64%);
}
.delivery-art::after,.code-illustration::after {
  content: ''; position: absolute; inset: 7% 7%; z-index: -1; border: 1px solid #ffd7e155;
  border-radius: 45% 45% 36% 36%; box-shadow: inset 0 0 1.4rem #fad6eb34;
}
.delivery-halo,.lock-aura { position: absolute; inset: 13% 15%; z-index: -1; border-radius: 50%; background: radial-gradient(ellipse,#fff6d1b8 0%,#ffc6eadb 22%,#ff78be4c 52%,transparent 72%); }
.delivery-star { position: absolute; color: #fff1b2; text-shadow: 0 0 .68rem #fff,0 0 1.4rem #ffbd7f; font: bold clamp(1.2rem,4vw,2.5rem) Georgia,serif; }
.delivery-star.one { top: 12%; left: 19%; }.delivery-star.two { top: 20%; right: 14%; color: #cbffee; }.delivery-star.three { right: 18%; bottom: 15%; color: #ffd3ed; }
.delivery-envelope {
  position: absolute; inset: 31% auto auto 50%; translate: -50%; z-index: 1; display: grid; place-items: center;
  width: min(52%,15rem); aspect-ratio: 1.45; rotate: -10deg; border: 2px solid #914c7c; border-radius: .7rem;
  background: linear-gradient(140deg,#f7bdcc 0 49%,transparent 50%),linear-gradient(220deg,#fc9dbb 0 49%,#ffe6d9 50%);
  box-shadow: inset 0 0 0 3px #fff9,0 .5rem 0 #5c2b6580,0 0 1.5rem #ffbac9;
}
.delivery-envelope::before { content: ''; position: absolute; inset: 0; background: linear-gradient(#fff2ca,#ed9bb7); clip-path: polygon(0 0,100% 0,50% 67%); border-radius: .55rem; }
.delivery-envelope::after { content: ''; position: absolute; inset: 7%; border: 1px dashed #ad66807b; border-radius: .35rem; pointer-events: none; }
.delivery-envelope i { position: relative; z-index: 1; display: grid; place-items: center; width: 2.65rem; aspect-ratio: 1; border-radius: 45%; background: radial-gradient(#fba3c7,#9c3d75); color: #ffefcd; font: normal 1.45rem Georgia,serif; box-shadow: inset 0 0 0 2px #ffc2dc,0 0 .65rem #ffd1ef; }
.delivery-art .critter,.code-illustration .critter { position: absolute; z-index: 2; bottom: 5%; width: clamp(6rem,24%,8.5rem); height: clamp(6rem,25%,8.5rem); filter: drop-shadow(0 0 .8rem #ffd4e8a0); }
.delivery-art .panda { left: 14%; rotate: 10deg; }.delivery-art .penguin { right: 14%; rotate: -10deg; }
.delivery-copy,.code-controls { display: grid; align-content: center; justify-items: center; gap: .75rem; padding: clamp(.75rem,4vw,2.55rem); }
.delivery-copy h1,.code-controls h1 { font-size: clamp(2.5rem,5vw,4.7rem); line-height: .98; color: #582249; }
.delivery-copy p { max-width: 23ch; }
#begin { margin-top: .7rem; background: linear-gradient(155deg,#c84989,#851e5d); border: 1px solid #d974aa; box-shadow: 0 0 1rem #e68bb98a,inset 0 1px #ffffff81,0 .22rem #8a376763; }
#begin span { color: #ffedb2; text-shadow: 0 0 .4rem white; }
.code-illustration { background: radial-gradient(ellipse at 55% 46%,#ad7ec6 0%,#65468d 43%,#2f254a 85%); }
.lock-heart {
  position: absolute; display: grid; place-items: center; left: 50%; top: 34%; translate: -50%; width: min(47%,11rem); aspect-ratio: 1.12;
  border-radius: 35% 35% 43% 43%; border: 2px solid #773c77;
  color: #ae437c; background: radial-gradient(at 35% 14%,#fff5d9,#f8bfd7 50%,#c47fbd); text-shadow: 0 0 .65rem #fff; font-size: clamp(2.6rem,8vw,6rem);
  box-shadow: inset 0 0 0 4px #fff6,0 .4rem #60376f8a,0 0 2.5rem #fba9e1;
}
.lock-heart::before { content: ''; position: absolute; left: 23%; right: 23%; bottom: 87%; height: 57%; z-index: -1; border: clamp(4px,1vw,11px) solid #ffe0ab; border-bottom: 0; border-radius: 48% 48% 0 0; box-shadow: 0 0 .55rem #ffd886; }
.lock-heart i { position: absolute; top: 26%; right: 15%; width: .4rem; height: 1.15rem; rotate: -30deg; border-radius: 2rem; background: #fff8; }
.lock-stars { position: absolute; inset: 0; pointer-events: none; }
.lock-stars span { position: absolute; top: 19%; left: 19%; font-size: 1.9rem; color: #fff0b7; text-shadow: 0 0 .7rem white; }
.lock-stars span:nth-child(2) { top: 34%; left: auto; right: 16%; color: #d9fff0; }.lock-stars span:nth-child(3) { top: 67%; left: 19%; color: #fcaed6; }
.code-illustration .bunny { bottom: 4%; left: 55%; rotate: 11deg; }
.code-controls { gap: .25rem; padding-block: 1.2rem; }
.code-controls h1 { font-size: clamp(2.35rem,4.8vw,4.05rem); }
#lock { width: min(100%,17rem); margin-top: .4rem; }
.code-display { position: relative; width: 100%; min-height: 3rem; }
.code-display #code { position: absolute; z-index: 1; inset: 0; height: 100%; opacity: 0; cursor: text; }
.code-jewels { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .45rem; }
.code-jewels span {
  display: grid; place-items: center; height: 3rem; border: 1px solid #c681ad; border-radius: .62rem;
  color: #b35c92; background: linear-gradient(#fff,#f9dfed); font-size: 1.25rem; box-shadow: inset 0 0 0 2px #fff,0 .15rem #c182b367;
}
.code-display:focus-within .code-jewels { border-radius: .5rem; outline: 2px solid #8b3d72; outline-offset: 3px; }
.code-jewels .filled { background: radial-gradient(#fff5d2,#ffc6e6); color: #9e2e6a; box-shadow: inset 0 0 0 2px #fff,0 0 .8rem #f479bb; }
#lock .keypad button { min-height: 2.7rem; }
#lock.code-ready .unlock { box-shadow: inset 0 0 0 2px #fff7,0 0 1rem #fc80bc; }
#lock details[open] { border-radius: .5rem; padding: .25rem; background: #fff7e7; box-shadow: 0 0 .45rem #edb8d4; }

.top { position: sticky; top: 0; z-index: 4; background: #fff5f8ec; box-shadow: 0 .18rem .8rem #a44e7852; }
#scrapbook,#gifts,#arcade,#heart-garden { scroll-margin-top: 5.25rem; }
.intro { padding: clamp(1.6rem,5vw,3.75rem) 1rem clamp(1.2rem,6vw,3.1rem); }
.intro h1 { font-size: clamp(3rem,8vw,6.3rem); position: relative; }
.intro p { position: relative; }
.intro .hero-stickers .panda { left: max(2%,calc(50% - 31rem)); bottom: auto; top: 12%; }
.intro .hero-stickers .penguin { right: max(2%,calc(50% - 31rem)); bottom: auto; top: 15%; }
.menu-portals { position: relative; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .65rem; width: min(100%,58rem); margin: 1.15rem auto 0; }
.portal {
  display: grid; align-content: start; justify-items: center; gap: .26rem; min-height: 10.5rem; padding: .7rem .28rem .55rem;
  text-decoration: none; color: #61274d; border: 1px solid #bc719e; border-radius: 1rem;
  box-shadow: inset 0 0 0 3px #fff8,0 .27rem #aa4d7757,0 0 .95rem #ffaa9e75;
  background: radial-gradient(ellipse at top,#fff6e3,#fbd1e9);
}
.portal:nth-child(2) { background: radial-gradient(ellipse at top,#fff6d7,#ffcbd1); }
.portal:nth-child(3) { background: radial-gradient(ellipse at top,#fff0f3,#e3c8f4); }
.portal:nth-child(4) { background: radial-gradient(ellipse at top,#ffffdf,#cae8da); }
.portal > strong { line-height: 1.15; font-size: clamp(1.03rem,2.3vw,1.31rem); }
.portal > span:last-child { font-size: .84rem; line-height: 1.15; }
.portal-art { position: relative; isolation: isolate; display: grid; place-items: center; width: 4rem; height: 3.4rem; margin: .18rem 0 .35rem; color: #923269; }
.portal-art i { z-index: 1; font: normal 1.55rem Georgia,serif; text-shadow: 0 0 .45rem white; }
.portal-art::before,.portal-art::after { content: ''; position: absolute; }
.portal-book .portal-art::before { inset: .15rem .55rem .1rem; rotate: -10deg; background: linear-gradient(90deg,#a9588a 0 16%,#f0a2c3 17%,#ffdae3); border: 1px solid #93466e; border-radius: .34rem .5rem .48rem .26rem; box-shadow: .16rem .14rem #fff6e4,.27rem .26rem #b0758d; }
.portal-gift .portal-art::before { inset: 1rem .36rem .08rem; background: linear-gradient(90deg,#f8949d 0 41%,#fff4b8 42% 58%,#fca3ab 59%); border: 1px solid #ac628f; border-radius: .25rem; }
.portal-gift .portal-art::after { inset: .7rem .18rem auto; height: .54rem; border-radius: .2rem; background: #f8a9b9; border: 1px solid #a65b83; box-shadow: 0 -.43rem 0 -.11rem #ea83af; }
.portal-play .portal-art::before { inset: .65rem .25rem .3rem; rotate: -8deg; background: radial-gradient(circle at 18% 51%,#986bc3 0 12%,transparent 14%),radial-gradient(circle at 84% 36%,#fff5b7 0 6%,transparent 8%),radial-gradient(circle at 76% 67%,#ef91bd 0 7%,transparent 9%),#ead5f8; border: 1px solid #9160aa; border-radius: .75rem .75rem 1.1rem 1.1rem; box-shadow: 0 .16rem #c08ac9; }
.portal-garden .portal-art::before { inset: .1rem .4rem; background: radial-gradient(circle at 23% 28%,#fffbc4 0 8%,transparent 9%),linear-gradient(#bcd4ed 0 53%,#c1e3a8 54% 68%,#96c49b 69%); border: 1px solid #659973; border-radius: 50% 50% .4rem .4rem; box-shadow: 0 0 .58rem #9ce6cd; }
.portal:hover { box-shadow: inset 0 0 0 3px #fff9,0 .32rem #aa4d7757,0 0 1.6rem #e873b7; }

.keepsake-spread #book-pages { background: repeating-linear-gradient(#fff8ef 0 21px,#edc9dc73 22px 23px,#fff8ef 24px); border: 2px double #c181a6; border-radius: .9rem; box-shadow: inset 0 0 0 4px #fff; }
.polaroid { box-shadow: 0 .5rem 1.3rem #9c4b7d51,0 0 .45rem #ffcbde; }
.photo-open { overflow: hidden; }
.arcade { background: radial-gradient(ellipse at 12% 0%,#efd5ff 0%,transparent 45%),radial-gradient(ellipse at 91% 13%,#ffd7e3 0%,transparent 38%),linear-gradient(#fff4df,#ffe9f5); }
#gift-dialog,#game-dialog,#photo-dialog { box-shadow: 0 0 2.65rem #ff89c6,0 .65rem 1.7rem #692e5a80; }
#gift-title,#game-title,#garden-title { text-shadow: 1px 2px white,0 0 .9rem #ff8fbead; }
@media (max-width: 42rem) {
  .stationery.delivery,.stationery.code-card { grid-template-columns: 1fr; max-width: 28rem; }
  .delivery-art,.code-illustration { min-height: clamp(10rem,42vw,14rem); }
  .delivery-copy { gap: .55rem; padding: 1.1rem .4rem 1.3rem; }
  .code-controls { padding: .8rem .4rem 1rem; }
  .code-illustration .bunny { width: 23%; height: 45%; left: 66%; }
  .delivery-art .critter { width: 25%; height: 49%; }
  .delivery-envelope { top: 21%; max-width: 9.2rem; }
  .lock-heart { width: 27%; top: 33%; font-size: 2.5rem; }
  .menu-portals { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .5rem; }
  .portal { min-height: 8.35rem; }
  .intro .hero-stickers .critter { top: .4rem; transform: scale(.62); }
  #scrapbook,#gifts,#arcade,#heart-garden { scroll-margin-top: 6.5rem; }
}
@media (prefers-reduced-motion: no-preference) {
  #arrival:not([hidden]) .delivery-envelope { animation: envelope-flight 4.4s ease-in-out infinite; }
  .delivery-halo,.lock-aura { animation: beacon-bloom 2.9s ease-in-out infinite alternate; }
  .delivery-star,.lock-stars span { animation: sparkle-pop 2.45s ease-in-out infinite; }
  .delivery-star.two,.lock-stars span:nth-child(2) { animation-delay: -1.1s; }.delivery-star.three,.lock-stars span:nth-child(3) { animation-delay: -1.75s; }
  .delivery-art .critter,.code-illustration .critter { animation: mascot-skip 3.05s ease-in-out infinite; }.delivery-art .penguin { animation-delay: -1.5s; }
  .lock-heart { animation: lock-bounce 3.4s ease-in-out infinite; }
  .code-card:has(.code-ready) .lock-heart { animation: lock-bounce .8s ease-in-out infinite; }
  .code-jewels .filled { animation: jewel-lock .55s cubic-bezier(.18,.78,.42,1.18) both; }
  .keypad button,.portal,.photo-open img { transition: transform .26s,box-shadow .26s,filter .26s; }
  .keypad button:active { transform: translateY(.18rem) scale(.87); }
  #keepsake:not([hidden]) .portal { animation: portal-spring .83s cubic-bezier(.18,.77,.33,1.14) backwards; }
  #keepsake:not([hidden]) .portal:nth-child(2) { animation-delay: .12s; }#keepsake:not([hidden]) .portal:nth-child(3) { animation-delay: .24s; }#keepsake:not([hidden]) .portal:nth-child(4) { animation-delay: .36s; }
  .portal:hover { transform: translateY(-.4rem) rotate(-2deg); }
  .portal:hover .portal-art { animation: sticker-hop .65s ease-out; }
  #book-pages:not([hidden]) .polaroid { animation: pin-photo .63s .12s cubic-bezier(.18,.78,.33,1.13) backwards; }
  #book-pages:not([hidden]) .polaroid:nth-child(2n) { animation-delay: .26s; }
  .photo-open:hover img { transform: scale(1.065); filter: saturate(1.12); }
  .game-tile:active,.gift-grid button:active,.garden-menu button:active { transform: scale(.92); }
  @keyframes envelope-flight { 37% { translate: -50% -1.35rem; rotate: 5deg; scale: 1.09; } 73% { translate: -50% .3rem; rotate: -13deg; } }
  @keyframes beacon-bloom { to { scale: 1.27; opacity: .6; rotate: 12deg; } }
  @keyframes lock-bounce { 40% { translate: -50% -.8rem; rotate: 8deg; scale: 1.07; } 70% { translate: -50% .2rem; rotate: -4deg; } }
  @keyframes jewel-lock { from { opacity: .56; transform: scale(.62) rotate(-13deg); } 58% { opacity: 1; transform: scale(1.22) rotate(6deg); } to { opacity: 1; transform: none; } }
  @keyframes portal-spring { from { opacity: .15; translate: 0 2.3rem; rotate: -7deg; scale: .8; } to { opacity: 1; translate: 0 0; rotate: 0deg; scale: 1; } }
  @keyframes pin-photo { from { opacity: .2; translate: 0 1.6rem; scale: .89; } to { opacity: 1; translate: 0 0; scale: 1; } }
}

@media (prefers-reduced-motion: no-preference) {
  #arrival.turning-page .delivery-envelope { animation: envelope-unseal .42s ease-in-out both; }
  #arrival.turning-page .delivery-envelope::before { transform-origin: top; animation: flap-lift .42s ease-in-out both; }
  #arrival.turning-page .delivery-envelope i { animation: seal-release .42s ease-in both; }
  #entrance.turning-page .lock-heart { animation: seal-release .42s ease-in both; }
  .entrance.turning-page .stationery { animation: pages-swap .42s ease-in both; pointer-events: none; }
  @keyframes envelope-unseal { 55% { rotate: 0deg; scale: 1.14; } to { rotate: 5deg; scale: 1.3; } }
  @keyframes flap-lift { from { transform: none; } to { transform: perspective(14rem) rotateX(158deg); } }
  @keyframes seal-release { to { opacity: 0; scale: 1.65; translate: 0 -1.2rem; } }
  @keyframes pages-swap { 32% { opacity: 1; } to { opacity: 0; filter: brightness(1.16); transform: translateY(-.65rem) scale(1.04); } }
}

/* The sky continues behind every screen. */
.skyfall,.stardust { position: absolute; z-index: 2; inset: 0; overflow: hidden; pointer-events: none; }
.skyfall i { position: absolute; top: -3.25rem; left: var(--left); opacity: 0; font: normal var(--size)/1 Georgia,serif; }
.skyfall .fall-star { color: #fffbda; text-shadow: 0 0 .25rem white,0 0 .7rem #d78832,0 0 1.1rem #ffe2a2; }
.skyfall .fall-heart { color: #b84481; text-shadow: 0 0 .4rem #ffebfa,0 0 1rem #f978ba; }
.skyfall .fall-star:nth-child(3n) { color: #f3fff8; text-shadow: 0 0 .23rem white,0 0 .7rem #459e89; }
.stardust b {
  position: absolute; left: var(--x); top: var(--y); width: .26rem; aspect-ratio: 1; border-radius: 50%;
  background: #fffced; box-shadow: 0 0 .25rem #fff,0 0 .8rem .19rem #ffd4a2; opacity: .57;
}
#arrival.entrance,#entrance.entrance {
  background-color: #db8dc33a;
  background-image: radial-gradient(ellipse at 50% 45%,#fff0c34d 0%,#f4a8d538 45%,#4c214261),
    repeating-linear-gradient(0deg,#a443851e 0 27px,transparent 27px 54px),
    repeating-linear-gradient(90deg,#a443851e 0 27px,transparent 27px 54px);
}

@media (prefers-reduced-motion: no-preference) {
  .skyfall i { animation: sky-descent var(--fall-time) var(--fall-delay) linear infinite; }
  .stardust b { animation: dust-lantern 4.1s var(--delay) ease-in-out infinite alternate; }
  .comet { animation: comet-flight 5.9s linear infinite; }
  .comet-two { animation-delay: -1.95s; }.comet-three { animation-delay: -3.9s; }
  .aurora-rose { animation-duration: 10s; }.aurora-peach { animation-duration: 12s; }.aurora-mint { animation-duration: 13s; }
  .hero-ribbons i { animation-duration: 6.3s; }
  #arrival:not([hidden]) .stationery,#entrance:not([hidden]) .stationery { animation: page-arrival .98s cubic-bezier(.17,.72,.28,1) backwards; }
  #arrival.turning-page .delivery-envelope,#arrival.turning-page .delivery-envelope::before,#arrival.turning-page .delivery-envelope i,#entrance.turning-page .lock-heart { animation-duration: .78s; }
  #arrival.turning-page .stationery,#entrance.turning-page .stationery { animation: pages-swap .78s cubic-bezier(.5,.09,.83,.47) both; }
  .code-jewels .filled { animation-duration: .81s; }
  #keepsake:not([hidden]) .intro { animation: page-arrival 1.12s ease-out backwards; }
  #keepsake:not([hidden]) .portal { animation-duration: 1.06s; }
  #book-cover.unfolding { animation-duration: 1.23s; }
  #book-pages:not([hidden]):not(.folding) { animation-duration: 1.28s; }
  #book-pages.folding { animation-duration: .8s; }
  #book-pages:not([hidden]) .polaroid { animation-duration: .9s; }
  #big-reveal[open] #big-title { animation-duration: 1.22s; }
  #big-reveal[open] #big-message { animation-duration: .72s; animation-delay: .34s; }
  .wish-lantern { animation-duration: 7s; }
  .globe-flurry { animation-duration: calc(var(--fall) * 1.65); }
  .firework-point i { animation-duration: 1.33s; }
  .firework-point::before { animation-duration: .85s; }
  .cake-tier { animation-duration: .77s; }
  .rose-heads i { animation-duration: .92s; }
  .mail .envelope-art::before,.mail .envelope-art i { transition-duration: .86s; }
  .jar span { transition-duration: .82s; }
  .heart-finale:not([hidden]) { animation-duration: .87s; }
  @supports (interpolate-size: allow-keywords) {
    details::details-content {
      height: 0; overflow: clip; opacity: 0; interpolate-size: allow-keywords;
      transition: height .72s cubic-bezier(.18,.74,.31,1),opacity .55s ease,content-visibility .72s allow-discrete;
    }
    details[open]::details-content { height: auto; opacity: 1; }
  }
  @keyframes page-arrival {
    from { opacity: 0; transform: translateY(1.45rem) scale(.962); }
    62% { opacity: 1; transform: translateY(-.18rem) scale(1.008); }
    to { opacity: 1; transform: none; }
  }
  @keyframes sky-descent {
    0% { opacity: 0; transform: translate(0,-7vh) rotate(-32deg) scale(.73); }
    11% { opacity: .85; }
    41% { transform: translate(var(--sway),43vh) rotate(23deg) scale(1); }
    74% { opacity: .69; }
    100% { opacity: 0; transform: translate(calc(var(--sway) * -.65),116vh) rotate(85deg) scale(.84); }
  }
  @keyframes dust-lantern {
    from { opacity: .16; scale: .64; translate: 0 .3rem; }
    to { opacity: .8; scale: 1.45; translate: .75rem -.9rem; }
  }
}

/* Foreground light stays transparent through the reading area. */
.cinematic-sky {
  position: fixed; inset: 0; z-index: 3; width: 100%; height: 100%; pointer-events: none;
  mask-image: radial-gradient(ellipse at center,#0002 0%,#0005 38%,#000c 68%,#000 93%);
}
.scene-light-sweep,.reveal-wave { position: absolute; z-index: 6; pointer-events: none; }
.scene-light-sweep { inset: 0; overflow: hidden; border-radius: inherit; opacity: 0; }
.scene-light-sweep::before {
  content: ''; position: absolute; inset: -15%; rotate: -15deg; translate: -89% 0;
  background: linear-gradient(90deg,transparent 34%,#fff3dd 49%,#f7a9dc 52%,transparent 64%);
}
.scene-light-sweep[data-style="gold"]::before,
.scene-light-sweep[data-style="finale"]::before {
  background: linear-gradient(90deg,transparent 34%,#fff8d0 48%,#ffda9d 50%,#ffe1f1 54%,transparent 65%);
}
.scene-light-sweep[data-style="rain"]::before {
  background: linear-gradient(90deg,transparent 34%,#e9ebff 47%,#b6d5ff 52%,transparent 62%);
}
.reveal-wave {
  top: 48%; left: 50%; width: min(17rem,48%); aspect-ratio: 1;
  border: 2px solid #fff5da; border-radius: 50%;
  box-shadow: inset 0 0 1rem #fff3df,0 0 1.4rem #ffb1d7,0 0 2.3rem #ffb17a;
  translate: -50% -50%; opacity: 0;
}
.reveal-wave::after {
  content: ''; position: absolute; inset: .6rem; border: 1px dashed #ffe5ba;
  border-radius: inherit; box-shadow: 0 0 .52rem #fff5da;
}
@media (prefers-reduced-motion: no-preference) {
  .scene-light-sweep { animation: scene-glint 1.32s ease-out both; }
  .scene-light-sweep::before { animation: scene-shine 1.32s cubic-bezier(.16,.69,.32,1) both; }
  .reveal-wave { animation: reveal-ripple 1.35s cubic-bezier(.14,.7,.27,1) both; }
  #arrival .delivery-halo,#entrance .lock-aura { animation: stage-beacon 4.5s ease-in-out infinite alternate; }
  .hero-ribbons i { animation-duration: 4.8s; }
  #wallpaper .aurora-rose { animation-duration: 8s; opacity: .87; }
  #wallpaper .aurora-peach { animation-duration: 9.6s; opacity: .84; }
  #wallpaper .aurora-mint { animation-duration: 11s; opacity: .65; }
  @keyframes scene-glint { 29% { opacity: .46; } 70% { opacity: .21; } to { opacity: 0; } }
  @keyframes scene-shine { to { translate: 88% 0; } }
  @keyframes reveal-ripple {
    0% { opacity: 0; scale: .18; }
    26% { opacity: .92; }
    65% { opacity: .53; }
    to { opacity: 0; scale: 2.25; }
  }
  @keyframes stage-beacon {
    from { scale: .83; opacity: .5; }
    to { scale: 1.52; opacity: .98; translate: .7rem -.55rem; rotate: 20deg; }
  }
}
@media (max-width: 38rem) {
  .cinematic-sky { mask-image: radial-gradient(ellipse at center,#0002 0%,#0004 42%,#000b 74%,#000 95%); }
}
@media (prefers-reduced-motion: reduce) { .cinematic-sky { display: none; } }
