:root {
  color-scheme: dark;
  --gold: #dfc492;
  --muted: #9cafa3;
  --cream: #f8f0df;
  --sans: 'Noto Sans Arabic', Tahoma, sans-serif;
  --serif: 'Noto Naskh Arabic', Georgia, serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100svh;
  background: #102e28;
  color: var(--cream);
  font-family: var(--sans);
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
button:focus-visible, a:focus-visible { outline: 2px solid #efd8ae; outline-offset: 8px; }
.grain {
  position: fixed;
  inset: 0;
  opacity: .12;
  pointer-events: none;
  z-index: 20;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23fff' filter='url(%23n)' opacity='.45' d='M0 0h180v180H0z'/%3E%3C/svg%3E");
}
.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 53%, #2d574147, transparent 56%), radial-gradient(ellipse at 50% 0%, #1f40394d, transparent 50%);
}
.topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 7%;
  padding: 26px 0 20px;
  border-bottom: 1px solid #dfc49218;
}
.wordmark { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--gold); }
.wordmark svg { width: 26px; height: 30px; }
.wordmark span { font-family: var(--serif); font-size: 32px; line-height: 1; }
.topnote { color: #b4bfb0; font-size: 11px; }
main { position: relative; flex: 1; width: 100%; padding: 40px 18px 24px; text-align: center; }
.eyebrow { display: flex; align-items: center; justify-content: center; gap: 14px; font-size: 10px; color: var(--gold); margin: 0 0 14px; }
.eyebrow > span { width: 25px; height: 1px; background: #dfc49265; }
h1 { font-family: var(--serif); font-size: clamp(44px, 5vw, 62px); font-weight: 500; line-height: 1.35; margin: 0; }
.dots { color: var(--gold); }
.subtitle { color: #b5c1b4; font-size: 12px; margin: 10px 0 0; line-height: 1.9; }
.scene { position: relative; width: 390px; height: 360px; margin: 5px auto 0; direction: ltr; transition: height .8s cubic-bezier(.22, 1, .36, 1); }
.orbit { border: 1px solid #dac28e13; border-radius: 50%; position: absolute; pointer-events: none; }
.orbit-one { width: 320px; height: 320px; left: 35px; top: 10px; }
.orbit-two { width: 370px; height: 370px; left: 10px; top: -15px; border-style: dashed; opacity: .5; }
.floor-shadow { position: absolute; width: 300px; height: 38px; left: 45px; bottom: 8px; border-radius: 50%; background: #020f0cb3; filter: blur(12px); transition: transform 1s; }
.sparkle { position: absolute; color: var(--gold); font-size: 24px; font-family: Georgia, serif; animation: twinkle 4s ease-in-out infinite; }
.sparkle-one { left: 34px; top: 100px; font-size: 19px; }
.sparkle-two { right: 22px; top: 174px; font-size: 31px; animation-delay: 1s; }
.sparkle-three { right: 70px; top: 42px; font-size: 12px; animation-delay: 2s; }
.sparkle-four { left: 65px; bottom: 37px; font-size: 14px; animation-delay: .6s; }
.gift {
  position: absolute;
  bottom: 28px;
  left: 65px;
  width: 260px;
  height: 215px;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  animation: float 4.5s ease-in-out infinite;
  transition: transform 1s cubic-bezier(.22, 1, .36, 1);
  z-index: 5;
}
.gift:focus-visible { outline-offset: 20px; border-radius: 8px; }
.gift-body {
  display: block;
  position: absolute;
  bottom: 0;
  left: 9px;
  width: 242px;
  height: 184px;
  border-radius: 2px 2px 7px 7px;
  background: linear-gradient(110deg, #42765b 0%, #346149 35%, #264e3b 71%, #1c3b2e 100%);
  box-shadow: inset 1px 0 #83a58155, inset -4px 0 #132e2870, inset 0 -4px #102e2844, 0 12px 28px #061a164d;
}
.body-shine { position: absolute; inset: 0; opacity: .2; background: repeating-linear-gradient(90deg, transparent 0 2px, #e2dac910 3px 4px); }
.ribbon-vertical { position: absolute; width: 43px; height: 100%; left: 99px; background: linear-gradient(90deg, #af8d50, #e8d2a0 17%, #dac190 55%, #a58147 97%); box-shadow: 2px 0 4px #102e2844, inset 2px 0 #f5e4c566; }
.gift-lid {
  position: absolute;
  display: block;
  width: 260px;
  height: 46px;
  top: 18px;
  left: 0;
  border-radius: 4px;
  background: linear-gradient(105deg, #528263, #3d694f 42%, #264a37);
  box-shadow: 0 6px 8px #0c231e70, inset 0 -2px #244b39, inset 0 1px #76947080;
  transition: transform 1s cubic-bezier(.3, .05, .25, 1), opacity .6s;
  z-index: 4;
}
.lid-top { position: absolute; width: 100%; height: 13px; top: -10px; left: 0; background: linear-gradient(105deg, #618c6d, #497055); border-radius: 5px 5px 0 0; transform: skewX(-13deg); transform-origin: bottom; }
.lid-ribbon { position: absolute; width: 45px; height: 56px; top: -10px; left: 108px; background: linear-gradient(90deg, #b9995e, #ead7a9 30%, #d9bc85 70%, #a8864c); }
.bow { position: absolute; width: 92px; height: 51px; top: -52px; border: 13px solid #d8bd85; box-shadow: inset 0 3px 5px #163529aa, 0 3px 4px #17382a66; }
.bow-left { left: 42px; border-radius: 65% 75% 25% 80%; transform: rotate(23deg); background: linear-gradient(145deg, #254733, #112f20); border-bottom-color: #ae8a4b; border-top-color: #ecd7a6; }
.bow-right { right: 43px; border-radius: 75% 65% 80% 25%; transform: rotate(-23deg); background: linear-gradient(215deg, #254733, #112f20); border-bottom-color: #ae8a4b; border-top-color: #ecd7a6; }
.bow-knot { position: absolute; top: -27px; left: 111px; width: 38px; height: 30px; border-radius: 40%; background: linear-gradient(100deg, #b39153, #ead7a9 50%, #b19050); box-shadow: 0 4px 4px #18342855; }
.bow-tail { position: absolute; top: -4px; width: 29px; height: 58px; background: linear-gradient(90deg, #b49153, #ecd8aa, #c3a467); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 84%, 0 100%); }
.tail-left { left: 94px; transform: rotate(22deg); }
.tail-right { left: 139px; transform: rotate(-24deg); }
.gift-tag { position: absolute; right: 32px; top: 52px; width: 41px; height: 59px; background: #f1e3c7; color: #315641; transform: rotate(-14deg); box-shadow: 0 2px 5px #102e2855; border-radius: 2px; display: grid; place-items: center; font: 27px var(--serif); }
.gift-tag::before { content: ''; position: absolute; top: -25px; left: 20px; width: 1px; height: 31px; background: #bd9e69; }
.gift-tag::after { content: ''; width: 3px; height: 3px; border-radius: 50%; background: #9e854f; position: absolute; top: 6px; left: 19px; }
.actions { min-height: 98px; }
.primary-button { display: inline-flex; align-items: center; gap: 24px; justify-content: center; min-width: 188px; padding: 13px 25px; border: 1px solid #e8d2a777; border-radius: 3px; background: var(--gold); color: #1e392f; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .2s, transform .2s, box-shadow .2s; }
.primary-button svg { width: 19px; height: 19px; }
.primary-button:hover { background: #efdbb4; transform: translateY(-2px); box-shadow: 0 5px 24px #dfc4921a; }
.primary-button:disabled { cursor: default; opacity: .7; }
.hint { font-size: 10px; color: #9aac9c; margin: 13px 0 0; }
.reset-button { display: inline-flex; align-items: center; gap: 10px; background: transparent; border: 1px solid #dfc49265; color: var(--gold); padding: 12px 23px; border-radius: 3px; font-size: 12px; cursor: pointer; transition: background .2s; }
.reset-button svg { width: 17px; height: 17px; }
.reset-button:hover { background: #dfc49212; }
footer { position: relative; display: flex; justify-content: center; align-items: center; gap: 17px; padding: 24px 20px 27px; font-size: 9px; color: #91a58f; }
.footer-line { height: 1px; width: 34px; background: #dfc49233; }
.message-card { position: absolute; z-index: 6; left: 20px; top: 17px; width: 350px; min-height: 390px; padding: 27px 22px 30px; background: linear-gradient(130deg, #fffbef, #efe3c9); color: #204738; border-radius: 5px; box-shadow: 0 10px 45px #061b1559; direction: rtl; opacity: 0; transform: translateY(125px) scale(.62); }
.card-border { position: absolute; inset: 10px; border: 1px solid #b19c6b88; pointer-events: none; }
.card-star { width: 18px; height: 18px; color: #a68b51; }
.salutation { font: 600 29px/1.6 var(--serif); margin: 11px 0 8px; }
.invitation-lines { font: 500 23px/1.85 var(--serif); margin: 0; }
.invitation-lines span { display: block; }
.message-card h2 { font: 600 37px/1.4 var(--serif); margin: 0; outline: none; }
.meeting-edition { font: 500 27px/1.4 var(--serif); color: #96773d; margin: 2px 0 0; }
.card-ornament { display: flex; align-items: center; justify-content: center; gap: 10px; color: #ae945b; font-size: 8px; margin: 17px 0; }
.card-ornament i { height: 1px; width: 37px; background: #b19c6b77; }
.opening .gift { animation: shake .48s ease-in-out both; }
.opened .scene { height: 545px; }
.opened .gift { animation: none; transform: translateY(16px) scale(.6); cursor: default; }
.opened .gift-lid { transform: translate(150px, -245px) rotate(32deg); opacity: 0; pointer-events: none; }
.opened .message-card { animation: reveal .95s .18s cubic-bezier(.22, 1, .36, 1) both; }
.opened .floor-shadow { transform: scale(.83); }
.confetti-piece { position: fixed; width: 7px; height: 12px; top: 46%; left: 50%; z-index: 30; pointer-events: none; animation: confetti-fall 2.6s cubic-bezier(.17, .67, .37, .99) forwards; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.noscript { color: var(--gold); font-size: 14px; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes twinkle { 0%, 100% { opacity: .35; transform: scale(.85); } 50% { opacity: .85; transform: scale(1); } }
@keyframes shake { 0%, 100% { transform: rotate(0); } 20%, 60% { transform: rotate(-4deg); } 40%, 80% { transform: rotate(4deg); } }
@keyframes reveal { from { opacity: 0; transform: translateY(125px) scale(.62); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes confetti-fall { 0% { opacity: 0; transform: translate(0, 0) rotate(0); } 12% { opacity: 1; } 40% { opacity: 1; transform: translate(var(--x), var(--y)) rotate(var(--r)); } 100% { opacity: 0; transform: translate(var(--end-x), 57vh) rotate(var(--end-r)); } }
@media (min-height: 850px) { main { padding-top: 66px; } .scene { margin-top: 28px; height: 385px; } .message-card { top: 42px; } }
@media (max-width: 450px) {
  .topbar { margin: 0 6%; padding: 21px 0 16px; }
  .topnote { font-size: 9px; }
  main { padding-top: 34px; }
  .subtitle { font-size: 10px; }
  .scene { width: 330px; height: 330px; margin-top: 12px; }
  .gift { left: 35px; bottom: 26px; transform: scale(.9); }
  .orbit-one { left: 15px; width: 300px; height: 300px; }
  .orbit-two { left: 0; width: 330px; height: 330px; top: -5px; }
  .floor-shadow { width: 250px; left: 40px; }
  .message-card { width: 300px; left: 15px; min-height: 360px; padding: 23px 17px 25px; top: 0; }
  .message-card h2 { font-size: 33px; }
  .salutation { font-size: 27px; }
  .invitation-lines { font-size: 20px; line-height: 1.85; }
  .meeting-edition { font-size: 25px; }
  .opened .scene { height: 490px; }
  .sparkle-one { left: 14px; }
  .sparkle-two { right: 4px; }
  footer { font-size: 8px; gap: 10px; }
}
@media (max-width: 359px) {
  .scene { width: 290px; transform: scale(.86); transform-origin: center; margin-top: -6px; margin-bottom: -26px; }
  .gift { left: 15px; }
  .orbit-one { left: -5px; }
  .orbit-two { left: -20px; }
  .message-card { left: -5px; }
  .floor-shadow { left: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
  .confetti-piece { display: none; }
}

/* Account details supplied by the invitation owner. */
.account-panel {
  width: min(350px, 100%);
  margin: 4px auto 28px;
  padding: 21px 23px 23px;
  border: 1px solid #dfc49255;
  border-radius: 5px;
  background: #193b31;
  text-align: center;
}
.account-panel h3 { font: 500 12px/1.8 var(--sans); color: var(--gold); margin: 0 0 6px; }
.account-holder { font: 600 27px/1.5 var(--serif); margin: 0 0 16px; color: var(--cream); }
.account-row + .account-row { border-top: 1px solid #dfc49225; margin-top: 15px; padding-top: 14px; }
.account-label { display: block; color: #bbc7b8; font-size: 10px; margin-bottom: 7px; }
.account-number, .account-iban { display: block; color: #f4e8d0; font-family: Arial, sans-serif; font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.account-number { font-size: 19px; }
.account-iban { font-size: 14px; white-space: nowrap; }
@media (max-width: 359px) {
  .account-panel { padding-inline: 16px; }
  .account-iban { font-size: 12px; letter-spacing: .25px; }
}

.save-gift { display: inline-block; margin-top: 21px; padding: 9px 19px; border: 1px solid #dfc49277; border-radius: 3px; color: var(--gold); font-size: 11px; text-decoration: none; }
.save-gift:hover { background: #dfc49212; }

/* Reveal the owner's exact supplied image, in normal document flow. */
.gift-result { width: min(480px, 100%); margin: 27px auto 25px; }
.reveal-image { display: block; width: 100%; height: auto; object-fit: contain; border-radius: 5px; box-shadow: 0 12px 40px #061b1566; }
.gift-result .save-gift { margin-top: 17px; }
.gift-result #message-title:focus { outline: none; }
.opened .scene { height: 360px; }
.revealed .scene { height: 0; margin: 0 auto; opacity: 0; overflow: hidden; pointer-events: none; transition: height .6s ease, opacity .3s ease, margin .6s ease; }
.revealed .gift-result { animation: image-reveal .6s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes image-reveal { from { opacity: 0; transform: translateY(35px) scale(.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (min-height: 850px) and (min-width: 451px) { .opened .scene { height: 385px; } }
@media (max-width: 450px) { .opened .scene { height: 330px; } .gift-result { margin-top: 23px; } }
.revealed .scene { height: 0; }
