:root {
  color-scheme: light;
  --ink: #1e1832;
  --muted: #666078;
  --accent: #c30a79;
  --paper: #fff3da;
  --blush: #ffacc7;
  --display: Georgia, "Times New Roman", serif;
  --app-height: var(--tg-viewport-stable-height, 100dvh);
  --safe-left: max(16px, env(safe-area-inset-left), var(--tg-safe-area-inset-left, 0px));
  --safe-right: max(16px, env(safe-area-inset-right), var(--tg-safe-area-inset-right, 0px));
  --safe-top: calc(max(env(safe-area-inset-top), var(--tg-safe-area-inset-top, 0px)) + var(--tg-content-safe-area-inset-top, 0px));
  --safe-bottom: calc(max(env(safe-area-inset-bottom), var(--tg-safe-area-inset-bottom, 0px)) + var(--tg-content-safe-area-inset-bottom, 0px));
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: #e8c3fa;
}
* { box-sizing: border-box }
body { margin: 0; height: 100dvh; overflow: hidden; overscroll-behavior: none }
[hidden] { display: none !important }
button { font: inherit; color: inherit; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation }
button:focus-visible, [tabindex]:focus-visible { outline: 3px solid #aa176d; outline-offset: 3px }
button:disabled { opacity: .58; cursor: default }
img { display: block; max-width: 100% }
h1, h2, p { margin: 0 }
#boot { position: fixed; inset: 0; display: grid; align-content: center; justify-items: center; gap: 16px; padding: 22px; background: #f7f4fd; text-align: center }
#world {
  position: fixed; inset: 0; pointer-events: none; overflow: hidden;
  background: radial-gradient(ellipse at 15% 28%,#aa355a66,transparent 51%),
    radial-gradient(ellipse at 95% 73%,#ad35646b,transparent 51%),
    radial-gradient(ellipse at 40% 115%,#c54873,transparent 55%),#381830;
}
#world::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle,#ffe4c648 .8px,transparent 1.3px),radial-gradient(circle,#fff6e63a .7px,transparent 1.2px);
  background-size: 87px 71px,133px 119px; background-position: 7px 4px,55px 28px;
}
#world::after {
  content: ""; position: absolute; inset: -45%; pointer-events: none; transform: rotate(-23deg);
  background: repeating-radial-gradient(ellipse at 25% 63%,transparent 0 165px,#f6bc9d1c 166px,transparent 167px 265px);
}
.cloud {
  position: absolute; width: 110px; height: 34px; background: #ffd1de; opacity: .18;
  clip-path: polygon(0 70%,10% 70%,10% 47%,21% 47%,21% 26%,35% 26%,35% 7%,52% 7%,52% 0,68% 0,68% 27%,78% 27%,78% 43%,87% 43%,87% 69%,96% 69%,96% 85%,100% 85%,100% 100%,0 100%);
  animation: drift 9s ease-in-out infinite alternate;
}
.c1 { left: 7%; top: 18%; scale: 1.24 }
.c2 { right: 9%; top: 28% }
.c3 { bottom: 19%; left: 18%; scale: .8 }
.c4 { right: 9%; bottom: 10%; scale: 1.35 }
.sky-cat { position: absolute; width: 105px; height: 80px; left: calc(50% + 180px); top: 16%; transform: rotate(7deg); animation: float 5s ease-in-out alternate infinite; opacity: .9 }
.sky-cat img { position: absolute; width: 65px; left: 20px; bottom: 16px; image-rendering: pixelated }
.sky-cat .cloud { bottom: 0; width: 100%; height: 27px; opacity: 1; animation: none }
.skybit { position: absolute; color: #e63d83; opacity: .66; animation: float 5s ease-in-out infinite alternate }
.skybit.star { font: 18px/1 sans-serif; color: #fff7bf }
#shell {
  position: relative; height: var(--app-height); overflow-y: auto; overflow-x: hidden;
  overscroll-behavior: contain; scrollbar-width: thin;
}
#screen {
  position: relative; width: 100%; min-height: 100%; display: flex; flex-direction: column;
  color: var(--paper);
}
.body, .story { flex: none; width: min(100%, 490px); margin: auto; padding: calc(var(--safe-top) + 60px) var(--safe-right) calc(var(--safe-bottom) + 28px) var(--safe-left); text-align: center }
#fullscreen { position: fixed; z-index: 6; top: calc(var(--safe-top) + 6px); right: var(--safe-right); width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: #442746; background: #fff9 }
#fullscreen svg { width: 19px; height: 19px }
.invitation { width: min(100%,440px); padding-top: calc(var(--safe-top) + clamp(24px,5vh,50px)); padding-bottom: calc(var(--safe-bottom) + 18px) }
.invite-cover { position: relative; margin-bottom: 12px }
.cover-art { position: relative; display: grid; place-items: center; height: clamp(110px,22vh,215px); isolation: isolate }
.cover-art::before { content: ""; position: absolute; inset: 8% 0 -5%; z-index: -1; background: radial-gradient(ellipse,#ff799641,transparent 65%) }
.cover-art i { position: absolute; width: 76%; height: 60%; border: 1px solid #ffc8a24d; border-radius: 50%; rotate: -13deg }
.cover-art i::after, .cover-art i::before { content: "✦"; position: absolute; font-style: normal; color: #fed0a0; line-height: 1; animation: twinkle 2.4s ease-in-out infinite alternate }
.cover-art i::after { top: 15%; right: 3%; font-size: 20px }
.cover-art i::before { bottom: 10%; left: 5%; font-size: 11px; animation-delay: -1.3s }
.cover-art img { height: 100%; width: 84%; object-fit: contain; filter: drop-shadow(0 11px 12px #200f294f); animation: paper-hover 5s ease-in-out infinite alternate }
.cover-caption { display: flex; justify-content: center; align-items: center; gap: 12px; color: #ffd2be; font: italic 17px/1.3 var(--display) }
.cover-caption::before,.cover-caption::after { content: ""; width: 32px; height: 1px; background: #f7c09d77 }
.invite-controls { margin-inline: auto; max-width: 325px }
@keyframes paper-hover { from { transform: translateY(3px) rotate(-2deg) } to { transform: translateY(-4px) rotate(1deg) } }
.lock-svg { width: 69%; height: 69%; overflow: visible }
h1 { font: 500 clamp(41px,8vw,60px)/1.02 var(--display); letter-spacing: -.052em; text-wrap: balance }
h1 em { font-weight: 400; color: var(--blush) }
h2 { font-size: 24px; letter-spacing: -.7px; line-height: 1.2 }
.sub { margin: 10px 0 0; font-size: 14px; color: #edd2de; line-height: 1.45 }
.code { display: flex; align-items: center; justify-content: center; gap: 12px; height: 38px; margin: 14px 0 17px }
.code span { width: 11px; height: 11px; overflow: hidden; rotate: 45deg; border-radius: 3px; border: 1px solid #efb1c2a8; color: transparent; font-size: 0; background: #633044; transition: background .16s, transform .16s }
.code span:not(:empty) { border-color: #ffb298; background: #ffbdab; box-shadow: 0 0 9px #ff8ea885; transform: scale(1.08) }
.code .current { border-color: #fff1d8 }
.keys { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; max-width: 310px; margin: 0 auto }
.key {
  height: 52px; border-radius: 17px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(165deg,#fff1ed1c,#ffd1dc0c); color: #fff2df; border: 1px solid #ffced436; border-radius: 11px;
  box-shadow: inset 0 1px 0 #ffffff0f; font-size: 23px; font-weight: 490; line-height: 1; font-variant-numeric: tabular-nums;
  transition: transform .12s, background .12s;
}
.key small { font-size: 8px; line-height: 1.15; margin-top: 3px; letter-spacing: 1.2px; font-weight: 650; color: #e0b2c7 }
.key small:empty { display: none }
.key.erase { background: transparent; border: 0; box-shadow: none; color: #f0c4d2 }
.key:active, .hintbtn:active, .primary:active { transform: scale(.95) }
.key:active { background: #b9577a }
.hintbtn { display: inline-flex; gap: 7px; align-items: center; justify-content: center; min-height: 44px; margin-top: 8px; padding: 6px 12px; background: transparent; color: #ffceda; font-size: 14px; font-weight: 570 }
.hintbtn svg { width: 17px; height: 17px }
.primary { display: inline-grid; place-items: center; width: 100%; min-height: 49px; border-radius: 24px; background: linear-gradient(110deg,#ffb1b8,#ffd6c1); color: #501b38; font-weight: 690; box-shadow: 0 5px 18px #3c132e29,inset 0 1px 0 #fff8; transition: transform .12s }
.code.wrong { animation: shake .35s }
.unseal { animation: shrink .35s forwards }
dialog { width: min(335px, calc(100% - 34px)); border: 0; border-radius: 25px; padding: 30px 24px 23px; background: #fffaff; color: var(--ink); text-align: center; box-shadow: 0 22px 65px #38204d44 }
dialog::backdrop { background: #211a38a3; backdrop-filter: blur(7px) }
dialog .close { position: absolute; top: 7px; right: 8px; width: 39px; height: 39px; background: transparent; font-size: 26px; color: #80748a }
dialog p { color: var(--muted); margin: 14px 0 22px }
#toast, #sync { position: fixed; z-index: 20; max-width: calc(100% - 28px); padding: 12px 16px; border-radius: 14px; color: white; background: #31273f; box-shadow: 0 4px 20px #21152b30; font-size: 14px }
#toast { left: 14px; top: calc(14px + var(--safe-top)) }
#sync { left: 50%; bottom: calc(12px + var(--safe-bottom)); transform: translateX(-50%); width: max-content }
#unlock {
  position: fixed; inset: 0; z-index: 12; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(ellipse at 50% 45%, #35132e 0%, #17101e 56%, #0c0a10 100%);
  color: white; animation: dim .30s ease-out both;
}
.unlock-content { position: relative; width: min(82vw, 460px); text-align: center; animation: exit-glow .42s 2.88s ease-in both }
.unlock-lock::before { content: ""; position: absolute; width: 78px; height: 78px; border: 1px solid #ff74bd; border-radius: 50%; pointer-events: none; animation: lock-ripple 1.15s .88s both }
.wordmark { display: block; width: 100%; height: auto; margin: 0 auto 34px; filter: drop-shadow(0 0 20px #ff13844a); animation: branding .40s .16s both }
.unlock-lock { display: grid; place-items: center; width: 74px; height: 74px; margin: auto; --keyhole: #25172e; color: #fff3ff; filter: drop-shadow(0 0 12px #fa7fcc70) }
.unlock-lock svg { width: 100%; height: 100% }
.unlock-lock .shackle { transform-origin: 24px 35px; animation: open-lock .56s .57s cubic-bezier(.16,.85,.3,1.15) both }
.unlock-content p { margin: 18px 0 0; font-size: 19px; font-weight: 570; letter-spacing: -.25px; animation: branding .36s .98s both }
.stage-art { position: relative; display: grid; place-items: center; min-height: 225px; isolation: isolate; margin: 16px 0; background: radial-gradient(ellipse closest-side, #ffc8e6, #ebdbff66 70%, transparent); overflow: hidden }
.envbtn { display: block; position: relative; width: 100%; padding: 0; border-radius: 20px; background: transparent; user-select: none; -webkit-user-select: none }
.envelope-scene { min-height: clamp(250px,44vh,420px); width: 100%; pointer-events: none; --charge: 0; background: radial-gradient(ellipse closest-side,#e37ba34d,transparent); border-radius: 50% }
.envelope-scene::before {
  content: ""; position: absolute; inset: 3%; border-radius: 50%; z-index: -1;
  background: radial-gradient(ellipse, #fff4bb 4%, #ffabcd 38%, #d186ff77 58%, transparent 72%);
  opacity: var(--charge); transition: opacity .25s;
}
.envelope-scene::after { content: ""; position: absolute; z-index: -1; width: 45%; bottom: 19%; height: 9px; border-radius: 50%; filter: blur(5px); background: #ba66a34d; animation: shadow .9s both }
.envelope-landing { display: grid; place-items: center; animation: land .94s both }
.envelope-hit { display: block; transform-origin: 50% 65% }
.envelope-hit.struck { animation: envelope-kick .38s cubic-bezier(.2,.72,.26,1) }
.envbtn img { width: 188px; filter: drop-shadow(0 8px 8px #ba559d29) }
.star-field, .star-spray { position: absolute; inset: 0; pointer-events: none }
.star-field { z-index: 1 }
.star-spray i {
  position: absolute; top: 50%; left: 50%; width: var(--size); height: var(--size);
  margin: calc(var(--size) / -2); clip-path: polygon(50% 0,62% 35%,100% 38%,70% 61%,81% 100%,50% 76%,19% 100%,30% 61%,0 38%,38% 35%);
  animation: envelope-stars .70s cubic-bezier(.13,.63,.24,1) both;
}
.star-spray i:nth-child(even) { clip-path: polygon(50% 0,64% 36%,100% 50%,64% 63%,50% 100%,37% 63%,0 50%,37% 36%) }
.tap-label { display: inline-block; padding: 10px 23px; border: 1px solid #e9b5b475; border-radius: 30px; color: #ffe0cc; font-size: 16px; font-weight: 570 }
.burst { position: absolute; pointer-events: none; font-style: normal; color: #df167e; animation: burst .65s ease-out forwards }
.story.birthday-party {
  position: relative; isolation: isolate; display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  width: 100%; min-height: var(--app-height); margin: 0; gap: 120px;
  padding: calc(var(--safe-top) + clamp(54px,8vh,96px)) var(--safe-right) calc(var(--safe-bottom) + clamp(15px,4vh,42px)) var(--safe-left);
}
.birthday-party h1 { color: #58203d; font: italic 500 clamp(38px,8vw,78px)/1.04 var(--display); letter-spacing: -.05em }
.birthday-party .primary, .delivery-page .primary { background: #75284d; color: #fff2e4 }
.birthday-party .primary { width: min(100%,380px) }
.celebrate {
  position: absolute; inset: 0; min-height: 0; margin: 0; z-index: -1;
  padding: calc(var(--safe-top) + clamp(100px,17vh,180px)) var(--safe-right) calc(var(--safe-bottom) + clamp(78px,11vh,116px)) var(--safe-left);
  grid-template: minmax(0,1fr) / minmax(0,1fr);
  background: radial-gradient(ellipse at 27% 32%,#fff5b9,transparent 55%),radial-gradient(ellipse at 83% 65%,#cda9ff,transparent 55%),linear-gradient(145deg,#ffafd8,#ffdcf0 48%,#c0beff);
}
.party-rays { position: absolute; width: 175%; aspect-ratio: 1; background: repeating-conic-gradient(from 2deg,#fffc 0deg,transparent 8deg,transparent 22deg); opacity: .46; mask-image: radial-gradient(closest-side,#000,transparent 96%); animation: party-turn 26s linear infinite }
.foil-age { position: relative; width: 100%; height: 100%; min-height: 0; object-fit: contain; filter: drop-shadow(0 8px 7px #953c8e36); animation: balloon-rise 1.7s cubic-bezier(.16,.75,.19,1) both }
.party-cat { position: absolute; width: min(25vw,19vh,190px); bottom: calc(var(--safe-bottom) + clamp(74px,13vh,124px)); right: max(5%,var(--safe-right)); filter: drop-shadow(0 4px 3px #8b699a30); animation: cat-peek .9s .45s both }
.party-glint { position: absolute; pointer-events: none; width: 12px; height: 16px; background: currentColor; clip-path: polygon(50% 0,60% 39%,100% 50%,60% 60%,50% 100%,39% 61%,0 50%,39% 39%); animation: twinkle 1.8s ease-in-out infinite alternate }
.party-glint:nth-of-type(even) { width: 7px; height: 9px }
.party-canvas { position: fixed; inset: 0; z-index: 4; width: 100%; height: 100%; pointer-events: none }
.letter { position: relative; margin: 0 0 21px; padding: 28px clamp(21px,6vw,42px); background: repeating-linear-gradient(0deg,#a5735610 0 1px,transparent 1px 4px),#fff1d9; color: #462937; box-shadow: -4px 5px 0 #d9bba5,0 15px 44px #1f0a2445; text-align: left; transform-origin: top center; animation: stationery-in .8s both }
.letter header { text-align: center; padding-bottom: 18px; margin-bottom: 22px; border-bottom: 1px solid #ab725649 }
.letter h1 { font-size: clamp(32px,7vw,48px) }
.letter h1 em,.final h1 em { color: #9e395e }
.letter-seal { display: block; margin-bottom: 8px; color: #b2375d }
.letter p { margin-bottom: 14px; font: 17px/1.55 var(--display); animation: ink-in .75s both }
.signature { color: #983454; font: italic 22px/1.3 var(--display) }
.folding .letter { animation: fold 1.18s both }
.flying { position: fixed; z-index: 4; top: 41%; left: 50%; translate: -50% 0; width: min(53vw,250px); pointer-events: none; filter: drop-shadow(0 7px 12px #fda7dc50); animation: fly 3.8s both }
@keyframes stationery-in { from { opacity: 0; transform: perspective(800px) rotateX(-15deg) translateY(24px) } }
@keyframes ink-in { from { opacity: 0; transform: translateY(6px) } }
body[data-scene="4"] #world { background: linear-gradient(180deg,var(--sky-top,#bca2cb),var(--sky-low,#ffdbc6) 65%,#f6dacf) }
body[data-scene="4"] #world::after, body[data-scene="4"] .sky-cat, body[data-scene="4"] #skybits { display: none }
.delivery-page { position: relative; width: min(100%,560px); color: #51243c; padding-top: calc(var(--safe-top) + clamp(48px,7vh,65px)); padding-bottom: calc(var(--safe-bottom) + 22px) }
.delivery-page h1 { margin: 0 auto 22px; color: var(--garden-ink,#471d36); font-size: clamp(37px,7vw,50px) }
.delivery-page h1 em { color: var(--garden-accent,#702146) }
.delivery-scene { position: relative; isolation: isolate; height: clamp(155px,29vh,300px); overflow: hidden; margin-inline: 5px; background: linear-gradient(var(--sky-top),var(--sky-low)); border-radius: 46% 46% 0 0 / 22% 22% 0 0; border: 1px solid #fff4e38c; border-bottom: 0; box-shadow: 0 4px 24px #42203c22 }
.garden-stars { position: absolute; inset: 0; background-image: radial-gradient(circle,#fffbd4 0 1px,transparent 1.6px),radial-gradient(circle,#ffdfb6 0 1.3px,transparent 2px); background-size: 41px 39px,67px 57px; background-position: 10px 6px,23px 16px; opacity: var(--starlight) }
.day-orb,.moon-orb { position: absolute; width: clamp(28px,8vw,46px); aspect-ratio: 1; border-radius: 50%; translate: -50% -50%; transition: left .12s,top .12s,opacity .12s }
.day-orb { top: var(--sun-y); left: var(--sun-x); opacity: var(--sun-alpha); background: #ffe28c; box-shadow: 0 0 0 7px #fff1bd59,0 0 26px 8px #fff2c998 }
.moon-orb { top: var(--moon-y); left: var(--moon-x); opacity: var(--moon-alpha); box-shadow: inset -10px -4px #fff5cd; rotate: -13deg; filter: drop-shadow(0 0 7px #f4e7be66) }
.delivery-scene .cloud { left: 19%; top: 24%; scale: .62; opacity: .44 }
.delivery-scene .meadow { position: absolute; bottom: -1px; left: 0; width: 100%; height: auto; filter: brightness(var(--garden-light,1)); pointer-events: none }
.day-phase { position: absolute; bottom: 8px; left: 50%; translate: -50% 0; color: #fff5df; background: #472740c9; border-radius: 20px; padding: 3px 13px; font: italic 15px/1.5 var(--display); white-space: nowrap }
.delivery-controls { padding: 18px clamp(15px,5vw,36px) 20px; background: #fff2dd; border-radius: 3px 3px 16px 16px; box-shadow: 0 10px 25px #592d4126 }
.day-track input { width: 100%; height: 26px; display: block; margin: 0; cursor: pointer; appearance: none; background: transparent; accent-color: #963c5e }
.day-track input::-webkit-slider-runnable-track { height: 6px; border-radius: 9px; background: linear-gradient(90deg,#423653,#bc8fba,#ffe2ae,#a5daea,#ffd993,#e896a3,#423653) }
.day-track input::-moz-range-track { height: 6px; border-radius: 9px; background: linear-gradient(90deg,#423653,#bc8fba,#ffe2ae,#a5daea,#ffd993,#e896a3,#423653) }
.day-track input::-webkit-slider-thumb { appearance: none; margin-top: -6px; width: 18px; height: 18px; border: 3px solid #772c52; border-radius: 50%; background: #fff2d6; box-shadow: 0 0 0 2px #fff2dd }
.day-track input::-moz-range-thumb { width: 13px; height: 13px; border: 3px solid #772c52; border-radius: 50%; background: #fff2d6 }
.day-track div { display: flex; justify-content: space-between; font: 11px/1.2 ui-monospace,monospace; color: #7d5963 }
.wheel { display: flex; position: relative; align-items: center; justify-content: center; overflow: hidden; margin: 8px 0 12px }
.wheel::before { content: ""; position: absolute; inset: 44px 10% auto; height: 44px; border-block: 1px solid #c786936b; background: linear-gradient(90deg,transparent,#efb8b840,transparent) }
.wheel strong { position: relative; font-size: 22px }
.roller { height: 132px; width: 80px; padding: 44px 0; position: relative; overflow: auto; scrollbar-width: none; scroll-snap-type: y mandatory; overscroll-behavior: contain; mask-image: linear-gradient(transparent,#000 38%,#000 62%,transparent) }
.roller::-webkit-scrollbar { display: none }
.roller div { display: grid; place-content: center; height: 44px; scroll-snap-align: center; cursor: pointer; font-size: 23px; font-variant-numeric: tabular-nums }
.final { width: min(100%,570px) }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; margin: 32px 5px 35px }
.gallery figure { position: relative; margin: 0; padding: 7px 7px 3px; background: #fff1d9; transform: rotate(-6deg); box-shadow: 1px 5px 12px #16071e65; animation: photo-arrive 1s both }
.gallery figure:nth-child(2) { transform: rotate(6deg) translateY(10px); animation-delay: .18s }
.gallery figure::before { content: ""; position: absolute; width: 36%; height: 14px; left: 33%; top: -6px; transform: rotate(-3deg); background: #ebc6a9c2; z-index: 1 }
.gallery img { width: 100%; aspect-ratio: 1.23; object-fit: cover }
.gallery figcaption { padding: 8px 3px; font: italic 15px/1.3 var(--display); color: #633d4b }
.final p { font: 21px/1.5 var(--display); text-wrap: pretty; animation: ink-in 1.1s both }
.final-decor { display: flex; justify-content: space-between; align-items: end; gap: 4px; margin-top: 12px }
.final-decor img { width: 25% }
.receipt { align-self: center; font-size: 14px; color: #ffd2be; font-weight: 600 }
@keyframes photo-arrive { from { opacity: 0; translate: 0 24px; rotate: -4deg } }
@media (min-width: 760px) and (min-height: 520px) {
  .invitation { display: grid; width: min(90%,920px); grid-template-columns: 1.2fr 1fr; align-items: center; gap: clamp(32px,7vw,96px) }
  .cover-art { height: clamp(245px,35vh,360px) }
  .cover-art img { width: 100% }
  .cover-caption { font-size: 25px }
  .invite-controls { width: 100% }
}
@keyframes dim { from { opacity: 0 } }
@keyframes lock-ripple { 0% { opacity: 0; transform: scale(.65) } 22% { opacity: .8 } 100% { opacity: 0; transform: scale(2) } }
@keyframes party-turn { to { transform: rotate(1turn) } }
@keyframes balloon-rise { 0% { opacity: 0; transform: translateY(100px) scale(.38) rotate(-8deg) } 62% { opacity: 1; transform: translateY(-10px) scale(1.035) rotate(2deg) } 82% { transform: translateY(4px) scale(.99) rotate(-1deg) } 100% { opacity: 1; transform: none } }
@keyframes cat-peek { from { opacity: 0; transform: translateY(30px) rotate(9deg) } to { opacity: 1; transform: none } }
@keyframes twinkle { from { opacity: .3; transform: scale(.55) rotate(-10deg) } to { opacity: 1; transform: scale(1.07) rotate(10deg) } }
@keyframes branding { from { opacity: 0; transform: translateY(8px) scale(.97) } }
@keyframes exit-glow { to { opacity: 0; transform: scale(1.025) } }
@keyframes open-lock { 45% { transform: translateY(-10px) } 100% { transform: translate(-2px,-8px) rotate(-35deg) } }
@keyframes drift { to { transform: translateX(14px) } }
@keyframes float { to { translate: 0 -7px } }
@keyframes shake { 20%,70% { transform: translateX(-5px) } 45%,85% { transform: translateX(5px) } }
@keyframes shrink { to { opacity: 0; transform: scale(.70) } }
@keyframes land { 0% { transform: translateY(-150%) rotate(-15deg) } 63% { transform: translateY(7px) rotate(7deg) } 82% { transform: translateY(-5px) rotate(-3deg) } }
@keyframes shadow { from { opacity: 0; transform: scale(.25) } }
@keyframes envelope-kick {
  0% { transform: scale(.94, .88) rotate(0) }
  23% { transform: translateY(var(--lift)) scale(1.05,1.08) rotate(var(--kick)) }
  52% { transform: translateY(-2px) rotate(calc(var(--kick) * -.70)) }
  77% { transform: rotate(calc(var(--kick) * .30)) }
  100% { transform: none }
}
@keyframes envelope-stars {
  0% { transform: translate(var(--from-x),var(--from-y)) scale(.5); opacity: .8 }
  20% { opacity: 1 }
  75% { opacity: 1 }
  100% { transform: translate(var(--to-x),var(--to-y)) rotate(var(--twist)) scale(.72); opacity: 0 }
}
@keyframes burst { to { opacity: 0; transform: translate(var(--dx),var(--dy)) rotate(36deg) } }
@keyframes rain { to { transform: translate(15px,280px) rotate(300deg); opacity: .1 } }
@keyframes pop { from { opacity: 0; transform: scale(.2) rotate(-12deg) } }
@keyframes fold { 35% { transform: perspective(500px) rotateX(-15deg) } to { opacity: 0; transform: perspective(500px) rotateX(-74deg) scale(.13) } }
@keyframes fly { 0%,22% { opacity: 0; transform: translate(0,8vh) scale(.24) } 34% { opacity: 1; transform: translate(-4vw,2vh) scale(.94) rotate(-5deg) } 54% { transform: translate(-10vw,-4vh) rotate(3deg) } 71% { transform: translate(3vw,-10vh) rotate(-8deg) } 100% { opacity: 0; transform: translate(64vw,-48vh) scale(.52) rotate(-17deg) } }
@media (max-width: 530px) {
  .sky-cat { left: auto; right: 5%; top: max(1%, calc(50% - 360px)); scale: .77 }
  .c1 { top: 9%; left: -7%; scale: .77 }
  .c2 { right: -14%; top: 44% }
  .c3 { left: -9%; bottom: 11% }
  .c4 { right: -6%; bottom: 3%; scale: .77 }
}
@media (max-height: 655px) {
  .body { padding-block: calc(46px + var(--safe-top)) calc(12px + var(--safe-bottom)) }
  .cover-art { height: 105px }
  .invite-cover { margin-bottom: 6px }
  .code { margin-block: 8px 10px }
  .key { height: 45px }
  .hintbtn { margin-top: 5px }
}
@media (max-width: 360px) {
  .code { gap: 10px }
  .keys { gap: 7px }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important }
  .unlock-content { animation: none }
  .star-spray i { animation: none; transform: translate(var(--to-x),var(--to-y)); opacity: .92 }
}
