:root {
  --gift-gold: #efbd46;
  --gift-deep-gold: #9d5b1f;
  --gift-ink: #2e2017;
  --gift-cream: #fff9ea;
}

.membership-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid rgba(239, 189, 70, .52);
  border-radius: 999px;
  color: #fff8d0;
  background: linear-gradient(135deg, rgba(82, 43, 19, .96), rgba(172, 106, 35, .94));
  padding: 7px 12px;
  font-size: .74rem;
  font-weight: 900;
  letter-spacing: .08em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 7px 18px rgba(86, 48, 21, .16);
}

.gift-broadcast {
  position: sticky;
  top: calc(var(--sticky-header-height, 76px) + var(--sticky-ribbon-height, 38px));
  z-index: 18;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-height: 37px;
  border-bottom: 1px solid rgba(153, 93, 35, .18);
  color: #5a351f;
  background: linear-gradient(90deg, rgba(255, 248, 225, .97), rgba(246, 224, 170, .96), rgba(255, 249, 231, .97));
  box-shadow: 0 7px 18px rgba(78, 44, 19, .07);
  overflow: hidden;
}

.gift-broadcast[hidden] { display: none !important; }
.gift-broadcast > span {
  align-self: stretch;
  display: grid;
  place-items: center;
  min-width: 122px;
  color: #fff8d7;
  background: linear-gradient(120deg, #7d311f, #c28432);
  padding: 0 14px;
  font-size: .73rem;
  font-weight: 900;
  letter-spacing: .12em;
}

.gift-broadcast p {
  min-width: 0;
  margin: 0;
  padding: 7px 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .82rem;
  font-weight: 800;
}

.gift-broadcast b { color: #8f3e24; }

.gift-dock {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(180, 130, 61, .24);
  border-radius: 16px;
  background:
    radial-gradient(circle at 87% 0%, rgba(245, 204, 107, .2), transparent 38%),
    linear-gradient(145deg, rgba(255, 253, 246, .98), rgba(249, 239, 217, .94));
  padding: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .82);
}

.gift-dock[hidden] { display: none !important; }
.gift-dock-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gift-dock-heading > div { min-width: 0; display: grid; gap: 2px; }
.gift-dock-heading span { color: #9a6b30; font-size: .67rem; font-weight: 900; letter-spacing: .12em; }
.gift-dock-heading strong { color: #392419; font-family: var(--serif, serif); font-size: 1rem; }
.gift-dock-toggle { flex: 0 0 auto; min-height: 38px; border: 1px solid rgba(164, 111, 48, .32); border-radius: 10px; color: #7c4b25; background: rgba(255, 250, 237, .86); padding: 7px 11px; font-size: .75rem; font-weight: 900; white-space: nowrap; }
.gift-dock-toggle:hover, .gift-dock-toggle:focus-visible { border-color: rgba(164, 111, 48, .7); background: #fff8e8; outline: 2px solid rgba(164, 111, 48, .2); outline-offset: 2px; }
.gift-dock-details { display: grid; gap: 10px; min-width: 0; }
.gift-dock-details[hidden] { display: none !important; }
.gift-balance { color: #7c4b25; font-size: .75rem; font-weight: 900; }

.gift-catalog-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(88px, 1fr));
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding: 2px 1px 4px;
}

.gift-option {
  min-width: 88px;
  display: grid;
  justify-items: center;
  gap: 4px;
  border: 1px solid rgba(164, 111, 48, .22);
  border-radius: 13px;
  color: #43291b;
  background: rgba(255, 254, 249, .9);
  padding: 9px 6px 8px;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background-color .18s ease;
}

.gift-option:hover:not(:disabled), .gift-option:focus-visible:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(177, 112, 33, .56);
  background: #fffaf0;
  outline: none;
}

.gift-option:disabled { cursor: not-allowed; opacity: .58; }
.gift-option.is-sending { border-color: #a56c2c; background: #fff1cd; opacity: 1; }
.gift-option b { font-size: .78rem; line-height: 1.2; }
.gift-option small { color: #9b622c; font-size: .65rem; font-weight: 800; }

.gift-symbol {
  position: relative;
  min-width: 0;
  min-height: 0;
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(185, 128, 52, .22);
  border-radius: 12px;
  color: #b34d3d;
  background: linear-gradient(145deg, #fffdf6, #f4dfae);
  font-size: 1.35rem;
  font-weight: 900;
}

.gift-symbol[data-gift-symbol="glasses"] { color: #3a526b; }
.gift-symbol[data-gift-symbol="balloon"] { color: #c04f45; }
.gift-symbol[data-gift-symbol="sports_car"],
.gift-symbol[data-gift-symbol="supercar_fleet"] { color: #8d2d28; }
.gift-symbol[data-gift-symbol="golden_dragon"] { color: #a7661f; }
.gift-symbol-image {
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  filter: drop-shadow(0 4px 7px rgba(76, 34, 22, .22));
  /* Keep the complete artwork inside the fixed symbol box.  The previous
     1.08 scale clipped transparent/vertical gift art at the rounded edge on
     narrow cards, making the gallery look like it had a cut border. */
  transform: none;
  user-select: none;
  -webkit-user-drag: none;
}

.gift-send-status {
  min-height: 1.25em;
  margin: 0;
  color: #7a5d45;
  font-size: .72rem;
}

.gift-send-status.is-error { color: #a2392e; font-weight: 800; }
.gift-send-status.is-success { color: #387044; font-weight: 800; }

.gift-confirm-dialog { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); }
.gift-confirm-dialog .dialog-card { display: grid; gap: 12px; max-height: calc(100dvh - 24px); overflow-y: auto; }
.gift-confirm-dialog h2 { margin-bottom: 0; overflow-wrap: anywhere; }
.gift-confirm-description { margin: 0; color: #725d4b; line-height: 1.6; }
.gift-confirm-summary { display: grid; gap: 8px; margin: 0; border: 1px solid rgba(164, 111, 48, .2); border-radius: 12px; background: rgba(255, 250, 237, .72); padding: 12px; }
.gift-confirm-summary div { display: grid; grid-template-columns: minmax(92px, .7fr) minmax(0, 1.3fr); align-items: baseline; gap: 10px; }
.gift-confirm-summary dt { color: #8a6a4b; font-size: .76rem; font-weight: 800; }
.gift-confirm-summary dd { min-width: 0; margin: 0; color: #392419; font-weight: 900; overflow-wrap: anywhere; text-align: right; }
.gift-confirm-shortfall { margin: 0; border-left: 3px solid #b34d3d; color: #8f3027; background: rgba(179, 77, 61, .08); padding: 9px 11px; line-height: 1.55; }
.gift-confirm-shortfall[hidden], .gift-confirm-recharge[hidden] { display: none !important; }
.gift-confirm-recharge { display: block; border: 1px solid rgba(164, 111, 48, .4); border-radius: 10px; color: #7c4b25; background: #fff8e8; padding: 10px 12px; font-size: .8rem; font-weight: 900; text-align: center; text-decoration: none; }
.gift-confirm-recharge:hover, .gift-confirm-recharge:focus-visible { border-color: rgba(164, 111, 48, .8); outline: 2px solid rgba(164, 111, 48, .2); outline-offset: 2px; }
.gift-confirm-footer { display: grid; gap: 9px; min-width: 0; }
.gift-confirm-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.gift-confirm-actions button { min-height: 44px; }
.gift-confirm-actions .gold-button { margin-top: 0; }

.gift-gallery {
  display: grid;
  gap: 8px;
  border-top: 1px dashed rgba(151, 99, 42, .26);
  padding-top: 10px;
}

.gift-gallery-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gift-gallery-heading b { color: #704422; font-size: .75rem; }
.gift-gallery-heading small { color: #8a7562; font-size: .67rem; }
.gift-gallery-items { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; }
.gift-gallery-item {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 2px;
  border-radius: 10px;
  background: rgba(239, 224, 193, .44);
  padding: 5px 2px;
}

.gift-gallery-item .gift-symbol { width: 28px; height: 28px; border-radius: 9px; font-size: .96rem; }
.gift-gallery-item b { font-size: .65rem; }
.gift-gallery-item small { max-width: 100%; overflow: hidden; color: #8a7562; font-size: .58rem; text-overflow: ellipsis; white-space: nowrap; }
.gift-gallery.is-loading, .gift-gallery.is-error { color: #8a7562; font-size: .7rem; }

.worker-profile-button { white-space: nowrap; }
.gift-profile-dialog .dialog-card { width: min(620px, calc(100vw - 32px)); }
.gift-profile-overview { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 14px; margin: 12px 0 16px; }
.gift-profile-overview .worker-avatar { width: 70px; height: 70px; }
.gift-profile-copy { min-width: 0; display: grid; gap: 4px; }
.gift-profile-copy h3 { margin: 0; color: #3c271a; font-family: var(--serif, serif); font-size: 1.3rem; }
.gift-profile-copy p { margin: 0; color: #75604e; font-size: .8rem; overflow-wrap: anywhere; }
.gift-profile-bio { min-width: 0; display: grid; gap: 2px; }
.gift-profile-bio .worker-bio-label { color: #8a7562; font-size: .67rem; font-weight: 800; letter-spacing: .04em; }
.gift-profile-bio .worker-bio-text { max-height: calc(1.5em * 4); line-height: 1.5; overflow: hidden; }
.gift-profile-dialog .gift-gallery { border: 1px solid rgba(180, 130, 61, .22); border-radius: 15px; padding: 13px; }

/* The profile dialog exposes service quality and the gift gallery as two
   small, explicit views.  Keep both views inside the dialog at every width;
   long hand-curated voice/device labels must wrap instead of pushing the
   card wider or clipping the text. */
.gift-profile-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 10px;
  min-width: 0;
}

.gift-profile-tabs [role="tab"] {
  min-width: 0;
  flex: 1 1 150px;
}

.gift-profile-tabs [role="tab"].is-active {
  border-color: rgba(164, 111, 48, .75);
  color: #5f371d;
  background: rgba(238, 218, 177, .58);
  box-shadow: inset 0 0 0 1px rgba(164, 111, 48, .12);
}

.worker-service-profile {
  display: grid;
  gap: 9px;
  min-width: 0;
  border: 1px solid rgba(180, 130, 61, .22);
  border-radius: 15px;
  background: rgba(255, 250, 237, .55);
  padding: 13px;
}

.worker-service-profile-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.worker-service-profile-heading b,
.worker-service-profile-heading small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.worker-service-profile-heading b { color: #704422; font-size: .78rem; }
.worker-service-profile-heading small { color: #8a7562; font-size: .67rem; }

.worker-service-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.worker-service-profile-cell {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid rgba(180, 130, 61, .16);
  border-radius: 11px;
  background: rgba(255, 255, 255, .48);
  padding: 9px 10px;
}

.worker-service-profile-cell > span {
  color: #8a7562;
  font-size: .67rem;
  font-weight: 800;
}

.worker-service-profile-cell > strong {
  min-width: 0;
  color: #392419;
  font-size: .8rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.worker-level-guide {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.worker-level-guide-label {
  color: #8a7562;
  font-size: .64rem;
  font-weight: 800;
}

.worker-level-track {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px;
  min-width: 0;
}

.worker-level-step {
  min-width: 0;
  color: #8a7562;
  font-size: .72rem;
  font-weight: 800;
  line-height: 1.25;
}

.worker-level-step.is-current {
  color: #111;
  font-size: .92rem;
  font-weight: 950;
}

.worker-level-separator {
  color: #b49a79;
  font-size: .68rem;
  font-style: normal;
  line-height: 1;
}

.worker-level-guide-current {
  color: #5f5145;
  font-size: .64rem;
  line-height: 1.35;
}

.worker-level-guide.is-compact {
  gap: 2px;
}

.worker-level-guide.is-compact .worker-level-guide-label {
  font-size: .58rem;
}

.worker-level-guide.is-compact .worker-level-step {
  font-size: .61rem;
}

.worker-level-guide.is-compact .worker-level-step.is-current {
  font-size: .76rem;
}

.worker-level-guide.is-compact .worker-level-guide-current {
  font-size: .58rem;
}

.worker-service-profile-loading {
  margin: 0;
  color: #8a7562;
  font-size: .72rem;
  line-height: 1.5;
}

.service-stars {
  color: #b47a23;
  letter-spacing: .06em;
  white-space: nowrap;
}

.worker-service-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  margin-top: 8px;
  color: #704422;
}

.worker-service-summary span,
.worker-service-summary small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.worker-service-summary span { font-size: .7rem; font-weight: 900; }
.worker-service-summary small { color: #8a7562; font-size: .64rem; text-align: right; }

.gift-effect-stage {
  position: fixed;
  inset: 0;
  z-index: 88;
  display: grid;
  place-items: center;
  pointer-events: none;
  overflow: hidden;
  contain: layout paint style;
}

.gift-effect-stage[hidden] { display: none !important; }
.gift-effect-stage.is-leaving { animation: gift-stage-leave .26s ease both; }
.gift-effect-backdrop { position: absolute; inset: 0; background: transparent; }
.gift-effect-stage.is-supercar-fleet .gift-effect-backdrop {
  background: linear-gradient(180deg, rgba(15, 12, 12, .04), rgba(15, 10, 8, .2));
}
.gift-effect-stage.is-golden-dragon .gift-effect-backdrop {
  background:
    radial-gradient(circle at 56% 46%, rgba(173, 105, 24, .16), transparent 48%);
  /* Keep the page text readable while the dragon artwork supplies its own atmosphere. */
  backdrop-filter: none;
}
.giftfx-dragon-impact { box-shadow: 0 0 34px 14px rgba(255,222,102,.84), 0 0 110px 48px rgba(255,83,16,.28), 0 0 180px 70px rgba(255,166,30,.16); }
@keyframes giftfx-dragon-impact-blockbuster { 0%, 54% { opacity: 0; transform: translate(-50%, -50%) scale(.1); } 60% { opacity: .86; transform: translate(-50%, -50%) scale(.65); } 72% { opacity: .58; transform: translate(-50%, -50%) scale(5.5); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(10); } }

.gift-scene {
  position: relative;
  width: min(980px, 96vw);
  height: min(620px, 78vh);
  isolation: isolate;
}

.gift-effect-copy {
  position: absolute;
  left: 50%;
  bottom: max(4vh, 18px);
  z-index: 12;
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: min(430px, calc(100vw - 36px));
  border: 1px solid rgba(255, 226, 149, .54);
  border-radius: 999px;
  color: #fffbe5;
  background: linear-gradient(120deg, rgba(64, 27, 16, .9), rgba(158, 87, 28, .88), rgba(65, 28, 16, .9));
  padding: 9px 22px 10px;
  box-shadow: 0 16px 44px rgba(48, 23, 12, .24), inset 0 1px 0 rgba(255, 255, 255, .24);
  transform: translateX(-50%);
  animation: gift-copy-enter .58s .16s cubic-bezier(.2, .8, .2, 1) both;
}

.gift-effect-kicker { font-size: .72rem; font-weight: 800; letter-spacing: .07em; }
.gift-effect-name { color: #ffe68b; font-family: var(--serif, serif); font-size: 1.12rem; letter-spacing: .09em; }

.gift-scene--love { display: grid; place-items: center; }
.love-orbit { position: relative; width: min(490px, 86vw); height: min(390px, 54vh); }
.love-heart {
  --angle: calc(var(--i) * 25.7deg);
  position: absolute;
  left: var(--x);
  bottom: 11%;
  color: hsl(calc(345 + var(--i) * 2) 77% calc(58% + var(--i) * .65%));
  font-style: normal;
  font-size: calc(24px + (var(--i) % 4) * 8px);
  text-shadow: 0 5px 16px rgba(133, 42, 51, .22);
  animation: love-rise calc(1.6s + (var(--i) % 4) * .18s) calc(var(--i) * .055s) cubic-bezier(.2, .76, .22, 1) both;
}

.gift-scene--glasses { display: grid; place-items: center; }
.gift-glasses {
  position: relative;
  width: min(430px, 78vw);
  height: 185px;
  transform: translateY(-4vh) rotate(-3deg);
  animation: glasses-arrive .85s cubic-bezier(.18, .82, .22, 1.18) both, glasses-float 2.1s .9s ease-in-out infinite alternate;
}

.gift-lens {
  position: absolute;
  top: 22px;
  width: 166px;
  height: 126px;
  border: 16px solid #263b51;
  border-radius: 46% 46% 52% 52%;
  background: linear-gradient(145deg, rgba(155, 220, 231, .68), rgba(43, 73, 108, .5));
  box-shadow: inset 18px 12px 0 rgba(255, 255, 255, .22), 0 16px 32px rgba(24, 43, 63, .18);
}
.gift-lens--left { left: 8px; }
.gift-lens--right { right: 8px; }
.gift-bridge { position: absolute; left: 50%; top: 66px; width: 78px; height: 24px; border-top: 15px solid #263b51; border-radius: 50%; transform: translateX(-50%); }
.glasses-sparks { position: absolute; inset: 12% 10%; }
.glasses-spark {
  position: absolute;
  left: calc((var(--i) * 29) % 92 * 1%);
  top: calc((var(--i) * 47) % 78 * 1%);
  width: calc(6px + (var(--i) % 3) * 4px);
  height: calc(6px + (var(--i) % 3) * 4px);
  background: #ffe291;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: glasses-spark 1.25s calc(var(--i) * .09s) ease-in-out infinite;
}

.gift-scene--balloon { overflow: hidden; }
.balloon-sky { position: absolute; inset: 0; }
.balloon-cloud {
  position: absolute;
  left: calc(-12% + var(--i) * 22%);
  top: calc(16% + (var(--i) % 3) * 20%);
  width: calc(88px + (var(--i) % 3) * 35px);
  height: 30px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  filter: blur(.4px);
  animation: cloud-drift calc(5s + var(--i) * .5s) linear infinite;
}
.balloon-cloud::before, .balloon-cloud::after { content: ""; position: absolute; bottom: 0; border-radius: 50%; background: inherit; }
.balloon-cloud::before { left: 18%; width: 44px; height: 44px; }
.balloon-cloud::after { right: 18%; width: 55px; height: 55px; }
.gift-balloon {
  position: absolute;
  left: 50%;
  bottom: -46%;
  width: min(285px, 58vw);
  height: 430px;
  transform: translateX(-50%);
  animation: balloon-lift 6.2s cubic-bezier(.22, .72, .18, 1) both;
}
.gift-balloon-canopy { position: relative; display: flex; justify-content: center; width: 100%; height: 270px; border-radius: 50% 50% 45% 45%; overflow: hidden; box-shadow: inset 0 -24px 35px rgba(91, 43, 30, .18), 0 18px 44px rgba(105, 57, 32, .18); }
.gift-balloon-canopy i { flex: 1; transform-origin: top center; }
.gift-balloon-canopy i:nth-child(odd) { background: linear-gradient(#f5c95f, #bd5d41); }
.gift-balloon-canopy i:nth-child(even) { background: linear-gradient(#fff3c5, #e99964); }
.gift-balloon-rigging i { position: absolute; top: 264px; width: 2px; height: 85px; background: #79513b; }
.gift-balloon-rigging i:first-child { left: 26%; transform: rotate(-7deg); }
.gift-balloon-rigging i:last-child { right: 26%; transform: rotate(7deg); }
.gift-balloon-basket { position: absolute; left: 50%; top: 338px; width: 72px; height: 55px; border-radius: 8px 8px 18px 18px; background: repeating-linear-gradient(90deg, #9a6338 0 8px, #c68d52 8px 16px); transform: translateX(-50%); box-shadow: inset 0 8px 0 rgba(68, 35, 18, .2); }
.balloon-chimes { position: absolute; left: 50%; top: 35%; display: flex; gap: 12px; transform: translateX(-50%); }
.balloon-chimes i { width: 10px; height: 30px; border-radius: 8px; background: linear-gradient(#fff5b4, #d69b35); transform-origin: top center; animation: chime-sway .62s ease-in-out infinite alternate; }
.balloon-chimes i:nth-child(2) { height: 38px; animation-delay: -.18s; }
.balloon-chimes i:nth-child(3) { animation-delay: -.31s; }

.gift-scene--sports-car, .gift-scene--fleet { perspective: 1000px; overflow: hidden; }
.gift-horn-text { position: absolute; left: 50%; top: 15%; color: #6b271e; font-family: var(--serif, serif); font-size: clamp(1.35rem, 4vw, 2.3rem); font-weight: 900; letter-spacing: .24em; opacity: 0; transform: translateX(-50%); animation: horn-text 1.1s 1s ease both; }

.fleet-title { position: absolute; left: 50%; top: 7%; color: #fff1be; font-family: var(--serif, serif); font-size: clamp(1.4rem, 5vw, 3.3rem); font-weight: 900; letter-spacing: .15em; text-shadow: 0 6px 26px rgba(46, 16, 14, .5); opacity: 0; transform: translateX(-50%); animation: fleet-title 1.2s 3.1s ease forwards; white-space: nowrap; }

.gift-scene--dragon { width: min(1100px, 100vw); height: min(680px, 86vh); }
.golden-dragon { position: absolute; inset: 4% 1% 12%; width: 98%; height: 84%; overflow: visible; }
.dragon-trail { fill: none; stroke: rgba(255, 216, 103, .3); stroke-width: 58; stroke-linecap: round; filter: blur(12px); stroke-dasharray: 1500; stroke-dashoffset: 1500; animation: dragon-draw 5.4s .2s cubic-bezier(.19, .7, .19, 1) forwards; }
.dragon-body { fill: none; stroke: url(#dragonGold); stroke-width: 42; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1500; stroke-dashoffset: 1500; filter: drop-shadow(0 13px 18px rgba(55, 26, 5, .46)); animation: dragon-draw 5.2s .3s cubic-bezier(.18, .72, .16, 1) forwards, dragon-breathe 2.2s 5.6s ease-in-out infinite alternate; }
.dragon-belly { fill: none; stroke: rgba(255, 244, 164, .74); stroke-width: 8; stroke-linecap: round; stroke-dasharray: 12 18; stroke-dashoffset: 900; animation: dragon-draw 5.5s .62s ease forwards; }
.dragon-head, .dragon-claws, .dragon-scales { fill: url(#dragonGold); stroke: #754018; stroke-width: 4; opacity: 0; transform-origin: 900px 205px; animation: dragon-head-enter 1.4s 3.7s cubic-bezier(.16, .82, .18, 1.13) forwards; }
.dragon-horn, .dragon-whisker { fill: none; stroke: #ffe9a1; stroke-width: 10; stroke-linecap: round; }
.dragon-whisker { stroke-width: 5; }
.dragon-eye { fill: #fffbd3; stroke: #9f2616; stroke-width: 6; animation: dragon-eye 1.4s 5.2s ease-in-out infinite alternate; }
.dragon-scales { stroke-width: 2; animation-delay: 3.1s; }
.dragon-claws { fill: none; stroke: #f3bf4d; stroke-width: 13; stroke-linecap: round; animation-delay: 3.4s; }
.dragon-mist { position: absolute; inset: 0; }
.dragon-particle { position: absolute; left: calc((var(--i) * 31) % 100 * 1%); top: calc(20% + (var(--i) * 23) % 67 * 1%); width: calc(4px + (var(--i) % 4) * 3px); height: calc(4px + (var(--i) % 4) * 3px); border-radius: 50%; background: #ffd96b; opacity: 0; animation: dragon-particle calc(2.8s + (var(--i) % 4) * .5s) calc(1.2s + var(--i) * .18s) ease-out infinite; }
.dragon-title { position: absolute; left: 50%; top: 8%; color: #ffe58b; font-family: var(--serif, serif); font-size: clamp(1.8rem, 6vw, 4.5rem); font-weight: 900; letter-spacing: .22em; text-shadow: 0 6px 28px rgba(56, 26, 4, .8); opacity: 0; transform: translateX(-50%) translateY(20px); animation: dragon-title 1.7s 5.1s cubic-bezier(.18, .8, .18, 1) forwards; white-space: nowrap; }

@keyframes gift-stage-leave { to { opacity: 0; transform: scale(1.015); } }
@keyframes gift-copy-enter { from { opacity: 0; transform: translate(-50%, 18px) scale(.94); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
@keyframes love-rise { 0% { opacity: 0; transform: translateY(100px) scale(.45) rotate(-12deg); } 32% { opacity: 1; } 100% { opacity: 0; transform: translate(calc((var(--i) % 3 - 1) * 58px), -310px) scale(1.28) rotate(16deg); } }
@keyframes glasses-arrive { from { opacity: 0; transform: translateY(-4vh) scale(.28) rotate(-13deg); } to { opacity: 1; transform: translateY(-4vh) scale(1) rotate(-3deg); } }
@keyframes glasses-float { to { transform: translateY(calc(-4vh - 13px)) rotate(3deg); } }
@keyframes glasses-spark { 0%, 100% { opacity: .2; transform: scale(.5) rotate(0); } 50% { opacity: 1; transform: scale(1.25) rotate(90deg); } }
@keyframes cloud-drift { from { transform: translateX(-80px); } to { transform: translateX(120px); } }
@keyframes balloon-lift { 0% { bottom: -48%; transform: translateX(-50%) rotate(-4deg) scale(.78); } 28% { transform: translateX(-50%) rotate(3deg) scale(.92); } 66% { transform: translateX(-50%) rotate(-2deg) scale(1); } 100% { bottom: 50%; transform: translateX(-50%) rotate(1deg) scale(.86); } }
@keyframes chime-sway { to { transform: rotate(17deg); } }
@keyframes horn-text { 0%, 100% { opacity: 0; transform: translateX(-50%) scale(.8); } 25%, 72% { opacity: 1; transform: translateX(-50%) scale(1); } }
@keyframes fleet-title { to { opacity: 1; transform: translateX(-50%) translateY(-4px); } }
@keyframes dragon-draw { to { stroke-dashoffset: 0; } }
@keyframes dragon-head-enter { 0% { opacity: 0; transform: scale(.28) rotate(-18deg); } 100% { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes dragon-breathe { to { stroke-width: 47; } }
@keyframes dragon-eye { to { fill: #fff; stroke-width: 9; } }
@keyframes dragon-particle { 0% { opacity: 0; transform: translateY(24px) scale(.4); } 30% { opacity: .85; } 100% { opacity: 0; transform: translate(calc((var(--i) % 3 - 1) * 48px), -110px) scale(1.2); } }
@keyframes dragon-title { to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* Production gift scenes restored from the approved V4 review. The artwork is
   intentionally image based; the former CSS geometry remains only for older
   cached markup and is not created by the current renderer. */
.giftfx-main,
.giftfx-dragon-palace,
.giftfx-dragon-body,
.giftfx-dragon-head,
.giftfx-dragon-finale {
  position: absolute;
  display: block;
  max-width: none;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.giftfx-romance-aura,
.giftfx-crystal-aura,
.giftfx-balloon-aura {
  position: absolute;
  left: 50%;
  top: 47%;
  width: min(680px, 82vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 88, 171, .38), rgba(140, 62, 193, .12) 46%, transparent 71%);
  filter: blur(9px);
  transform: translate(-50%, -50%);
  animation: giftfx-aura-breathe 1.2s ease-in-out infinite alternate;
}

.giftfx-love-main {
  left: 50%;
  top: 48%;
  z-index: 4;
  width: clamp(270px, 43vw, 560px);
  height: min(72vh, 620px);
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 22px 36px rgba(117, 27, 94, .48));
  animation: giftfx-love-arrive 2.6s cubic-bezier(.16, .82, .16, 1) both;
}
.giftfx-love-orbit { position: absolute; inset: 3% 8% 12%; z-index: 5; }
.giftfx-love-heart {
  position: absolute;
  left: var(--x);
  bottom: calc(4% + var(--i) * 1.7%);
  color: hsl(calc(334 + var(--i) * 2.2) 94% 72%);
  font-size: calc(14px + var(--i) * .7px);
  font-style: normal;
  text-shadow: 0 0 16px rgba(255, 94, 185, .82);
  opacity: 0;
  animation: giftfx-heart-bloom calc(1.45s + var(--i) * .035s) calc(var(--i) * .055s) cubic-bezier(.2, .72, .2, 1) both;
}
.giftfx-love-rings { position: absolute; inset: 0; z-index: 2; }
.giftfx-love-rings i {
  position: absolute;
  left: 50%;
  top: 49%;
  width: min(330px, 46vw);
  aspect-ratio: 1;
  border: 2px solid rgba(255, 178, 231, .64);
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.35);
  animation: giftfx-ring-bloom 1.7s .25s ease-out both;
}
.giftfx-love-rings i:nth-child(2) { animation-delay: .52s; }
.giftfx-love-rings i:nth-child(3) { animation-delay: .8s; }

.giftfx-glasses-main {
  left: 50%;
  top: 48%;
  z-index: 5;
  width: clamp(390px, 65vw, 790px);
  height: min(70vh, 590px);
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 25px 42px rgba(66, 45, 177, .58));
  animation: giftfx-glasses-arrive 5.2s cubic-bezier(.15, .78, .17, 1) both;
}
.giftfx-crystal-aura { background: radial-gradient(circle, rgba(130, 91, 255, .42), rgba(255, 68, 213, .16) 48%, transparent 72%); }
.giftfx-glasses-sparks,
.giftfx-glasses-rays { position: absolute; inset: 3% 5% 11%; z-index: 4; }
.giftfx-crystal-spark {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  aspect-ratio: 1;
  background: #fff;
  clip-path: polygon(50% 0, 60% 39%, 100% 50%, 60% 61%, 50% 100%, 40% 61%, 0 50%, 40% 39%);
  box-shadow: 0 0 14px #bba6ff;
  opacity: 0;
  animation: giftfx-crystal-twinkle 1.15s calc(var(--i) * .073s) ease-in-out infinite;
}
.giftfx-glasses-rays i {
  position: absolute;
  left: 50%;
  top: 49%;
  width: min(310px, 34vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(221, 210, 255, .72), transparent);
  transform-origin: left center;
  transform: rotate(calc(var(--i) * 18deg));
  opacity: 0;
  animation: giftfx-ray-bloom 1.6s calc(.48s + var(--i) * .026s) ease-out both;
}
.giftfx-glasses-sweep {
  position: absolute;
  left: 19%;
  top: 12%;
  z-index: 7;
  width: 9%;
  height: 72%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.72), transparent);
  filter: blur(4px);
  opacity: 0;
  transform: skewX(-18deg);
  animation: giftfx-glass-sweep 1.15s 1.05s ease-in-out both;
}

.gift-scene--balloon { width: 100vw; height: min(760px, 88vh); overflow: hidden; }
.giftfx-balloon-sky { position: absolute; inset: 0; background: radial-gradient(circle at 50% 32%, rgba(255, 120, 184, .34), transparent 44%), linear-gradient(180deg, rgba(69, 25, 83, .16), rgba(211, 76, 124, .15)); }
.giftfx-balloon-skyline { position: absolute; left: 0; right: 0; bottom: 0; height: 21%; background: repeating-linear-gradient(90deg, rgba(43, 20, 40, .58) 0 22px, transparent 22px 31px); clip-path: polygon(0 53%, 4% 53%, 4% 24%, 8% 24%, 8% 64%, 12% 64%, 12% 38%, 16% 38%, 16% 72%, 20% 72%, 20% 17%, 25% 17%, 25% 58%, 30% 58%, 30% 35%, 36% 35%, 36% 68%, 43% 68%, 43% 28%, 49% 28%, 49% 63%, 55% 63%, 55% 15%, 61% 15%, 61% 60%, 68% 60%, 68% 35%, 74% 35%, 74% 67%, 80% 67%, 80% 25%, 87% 25%, 87% 55%, 93% 55%, 93% 38%, 100% 38%, 100% 100%, 0 100%); }
.giftfx-balloon-aura { top: 55%; width: min(620px, 80vw); background: radial-gradient(circle, rgba(255, 84, 140, .4), rgba(248, 139, 111, .17) 52%, transparent 71%); }
.giftfx-balloon-main {
  left: 50%;
  bottom: -58%;
  z-index: 5;
  width: clamp(235px, 36vw, 440px);
  height: min(78vh, 690px);
  filter: drop-shadow(0 24px 38px rgba(112, 28, 70, .48));
  transform: translateX(-50%) rotate(-4deg) scale(.72);
  animation: giftfx-balloon-lift 7.4s cubic-bezier(.2, .73, .16, 1) both;
}
.giftfx-balloon-petals { position: absolute; inset: 0; z-index: 6; }
.giftfx-balloon-petals i {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--width);
  height: var(--height);
  border-radius: 80% 15% 70% 25%;
  background: hsl(var(--hue) 86% 73%);
  opacity: 0;
  animation: giftfx-petal-fall var(--duration) calc(var(--i) * .09s) linear infinite;
}
.giftfx-balloon-finale { position: absolute; left: 50%; top: 48%; z-index: 7; width: 18px; aspect-ratio: 1; border-radius: 50%; box-shadow: 0 0 35px 18px rgba(255, 213, 133, .82); opacity: 0; transform: translate(-50%, -50%); animation: giftfx-balloon-finale 1.55s 5.65s ease-out both; }

.gift-scene--sports-car,
.gift-scene--fleet { width: 100vw; height: min(760px, 88vh); overflow: hidden; perspective: 1200px; }
.giftfx-road-haze { position: absolute; left: -10%; right: -10%; bottom: -3%; height: 52%; background: radial-gradient(ellipse at 50% 100%, rgba(190, 20, 39, .25), rgba(18, 12, 19, .72) 63%, transparent 72%); transform: perspective(700px) rotateX(58deg); transform-origin: bottom; }
.giftfx-road-haze--fleet { background: radial-gradient(ellipse at 50% 100%, rgba(236, 168, 55, .27), rgba(20, 15, 18, .76) 64%, transparent 73%); }
.giftfx-speed-lines { position: absolute; inset: 0; z-index: 2; overflow: hidden; }
.giftfx-speed-lines i {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--width);
  height: var(--height);
  background: linear-gradient(90deg, transparent, rgba(255, 54, 81, .82));
  opacity: 0;
  transform: translateX(75vw);
  animation: giftfx-speed-pass var(--duration) calc(var(--i) * .055s) linear infinite;
}
.giftfx-speed-lines--fleet i { background: linear-gradient(90deg, transparent, hsl(var(--hue) 90% 64%)); }
.giftfx-car-wrap { position: absolute; left: 50%; bottom: 14%; z-index: 5; width: clamp(390px, 76vw, 980px); transform: translate(110vw, 26%) scale(.46) rotate(-4deg); animation: giftfx-car-arrive 11.5s cubic-bezier(.15, .77, .16, 1) both; }
.giftfx-car-main { position: relative; inset: auto; width: 100%; height: auto; filter: drop-shadow(0 30px 34px rgba(0,0,0,.72)) drop-shadow(0 0 20px rgba(220,29,49,.42)); }
.giftfx-car-lamps { position: absolute; inset: 0; z-index: 2; }
.giftfx-car-lamp { position: absolute; top: 53%; width: clamp(20px, 4vw, 52px); aspect-ratio: 1.7; border-radius: 50%; background: radial-gradient(ellipse, rgba(255,255,232,.98) 0 20%, rgba(255,214,123,.72) 38%, transparent 72%); filter: blur(1.3px) drop-shadow(0 0 12px rgba(255,226,164,.92)); opacity: 0; animation: giftfx-lamp-on .34s .72s ease-out forwards, giftfx-lamp-pulse .78s 1.1s ease-in-out infinite alternate; }
.giftfx-car-lamp--left { left: 21.5%; transform: rotate(5deg); }
.giftfx-car-lamp--right { right: 21.5%; transform: rotate(-5deg); }
.giftfx-car-smoke { position: absolute; left: 18%; bottom: 12%; z-index: 3; width: 34%; height: 20%; border-radius: 50%; background: radial-gradient(ellipse, rgba(216,212,218,.38), transparent 70%); filter: blur(17px); opacity: 0; animation: giftfx-smoke-pass 3.4s 2.1s ease-out both; }
.gift-horn-text { z-index: 8; color: #ffd9a3; text-shadow: 0 0 16px rgba(255,64,72,.8); animation: giftfx-horn-text 2.1s .56s ease both; }
.giftfx-fleet-main { left: 50%; bottom: 12%; z-index: 5; width: clamp(540px, 92vw, 1180px); height: min(72vh, 650px); transform: translate(-50%, 0); filter: drop-shadow(0 34px 38px rgba(0,0,0,.74)); animation: giftfx-fleet-depart 1.5s 12.5s ease both; }
.giftfx-fleet-car { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; animation: giftfx-fleet-car-enter var(--fleet-duration) var(--fleet-at) cubic-bezier(.2,.65,.3,1) both; }
.giftfx-fleet-car--red { --fleet-x: -110vw; --fleet-y: 0px; z-index: 1; }
.giftfx-fleet-car--blue { --fleet-x: 110vw; --fleet-y: 0px; z-index: 2; }
.giftfx-fleet-car--gold { --fleet-x: 0px; --fleet-y: 100vh; z-index: 3; }
@keyframes giftfx-fleet-car-enter { 0% { opacity: 0; transform: translate(var(--fleet-x),var(--fleet-y)); } 3% { opacity: 1; } 100% { opacity: 1; transform: translate(0,0); } }
@keyframes giftfx-fleet-depart { from { opacity: 1; } to { opacity: 0; } }
.giftfx-fleet-stars { position: absolute; inset: 0; z-index: 6; }
.giftfx-fleet-stars i { position: absolute; left: var(--x); top: var(--y); width: var(--size); aspect-ratio: 1; background: hsl(var(--hue) 92% 67%); clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); opacity: 0; animation: giftfx-fleet-star 1.4s calc(2.2s + var(--i) * .09s) ease-out infinite; }
.fleet-title { z-index: 8; animation: giftfx-fleet-title 1.15s 5.8s ease forwards; }

.gift-scene--dragon { width: 100vw; height: 100vh; overflow: hidden; }
.giftfx-dragon-palace { inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; opacity: 0; filter: saturate(.84) brightness(.72); animation: giftfx-palace-reveal 20s ease both; }
.giftfx-dragon-shadow { position: absolute; left: -20%; top: 26%; z-index: 2; width: 88%; height: 48%; border-radius: 50%; background: radial-gradient(ellipse, rgba(0,0,0,.77), transparent 67%); filter: blur(26px); opacity: 0; animation: giftfx-dragon-shadow 3.7s .45s ease both; }
.giftfx-dragon-mist { position: absolute; inset: 0; z-index: 8; background: radial-gradient(ellipse at 20% 78%, rgba(245,239,217,.42), transparent 38%), radial-gradient(ellipse at 83% 22%, rgba(232,220,190,.28), transparent 35%); mix-blend-mode: screen; opacity: .65; animation: giftfx-mist-breathe 3.8s ease-in-out infinite alternate; }
.giftfx-dragon-particle { position: absolute; left: var(--x); top: var(--y); width: var(--size); aspect-ratio: 1; border-radius: 50%; background: #ffd968; box-shadow: 0 0 12px rgba(255,194,51,.8); opacity: 0; animation: giftfx-dragon-particle var(--duration) calc(.7s + var(--i) * .13s) ease-out infinite; }
.giftfx-dragon-trails { position: absolute; inset: 0; z-index: 4; }
.giftfx-dragon-body { left: 50%; top: 50%; width: min(1420px, 142vw); height: min(82vh, 820px); transform-origin: 52% 54%; }
.giftfx-dragon-body--trail { filter: blur(11px) brightness(1.12); opacity: 0; animation: giftfx-dragon-flight 20s calc(var(--i) * .085s) cubic-bezier(.17,.7,.15,1) both; }
.giftfx-dragon-body--main { z-index: 5; filter: drop-shadow(0 0 34px rgba(255,153,28,.72)) drop-shadow(0 24px 36px rgba(43,20,4,.68)); animation: giftfx-dragon-flight 20s cubic-bezier(.17,.7,.15,1) both; }
.giftfx-dragon-head { left: 50%; top: 48%; z-index: 7; width: min(940px, 92vw); height: min(85vh, 850px); opacity: 0; transform: translate(68vw, -34%) scale(.42) rotate(8deg); filter: drop-shadow(0 0 45px rgba(255,150,24,.82)); animation: giftfx-dragon-head-pass 9.8s 7.6s cubic-bezier(.14,.7,.16,1) both; }
.giftfx-dragon-finale { left: 50%; top: 51%; z-index: 9; width: min(760px, 82vw); height: min(92vh, 900px); opacity: 0; transform: translate(-50%, -42%) scale(.58); filter: drop-shadow(0 0 55px rgba(255,173,33,.9)); animation: giftfx-dragon-finale 5.1s 13.2s cubic-bezier(.16,.78,.14,1) both; }
.giftfx-dragon-impact { position: absolute; left: 50%; top: 48%; z-index: 10; width: 20px; aspect-ratio: 1; border-radius: 50%; background: #fff6be; box-shadow: 0 0 85px 42px rgba(255,191,54,.9), 0 0 180px 100px rgba(255,95,20,.42); opacity: 0; transform: translate(-50%, -50%) scale(.1); animation: giftfx-dragon-impact 1.55s 16.35s ease-out both; }
.dragon-title { z-index: 12; top: 8%; animation: giftfx-dragon-title 1.4s 14.8s ease forwards; }

@keyframes giftfx-aura-breathe { to { opacity: .76; transform: translate(-50%, -50%) scale(1.11); } }
@keyframes giftfx-love-arrive { 0% { opacity: 0; transform: translate(-50%, -34%) scale(.32) rotate(-10deg); } 42% { opacity: 1; transform: translate(-50%, -50%) scale(1.08) rotate(2deg); } 68%, 90% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -54%) scale(1.08); } }
@keyframes giftfx-heart-bloom { 0% { opacity: 0; transform: translateY(90px) scale(.3) rotate(-12deg); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(-330px) scale(1.35) rotate(18deg); } }
@keyframes giftfx-ring-bloom { 0% { opacity: .8; transform: translate(-50%, -50%) scale(.25); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(2.2); } }
@keyframes giftfx-glasses-arrive { 0% { opacity: 0; transform: translate(-50%, -46%) scale(.28) rotate(-12deg); } 24% { opacity: 1; transform: translate(-50%, -50%) scale(1.1) rotate(2deg); } 53%, 84% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -54%) scale(1.16) rotate(2deg); } }
@keyframes giftfx-crystal-twinkle { 0%, 100% { opacity: .12; transform: scale(.45) rotate(0); } 52% { opacity: 1; transform: scale(1.5) rotate(120deg); } }
@keyframes giftfx-ray-bloom { 0% { opacity: 0; transform: rotate(calc(var(--i) * 18deg)) scaleX(.1); } 42% { opacity: .8; } 100% { opacity: 0; transform: rotate(calc(var(--i) * 18deg)) scaleX(1.6); } }
@keyframes giftfx-glass-sweep { 0% { opacity: 0; transform: translateX(-80px) skewX(-18deg); } 30% { opacity: .8; } 100% { opacity: 0; transform: translateX(520px) skewX(-18deg); } }
@keyframes giftfx-balloon-lift { 0% { bottom: -58%; opacity: 0; transform: translateX(-50%) rotate(-5deg) scale(.68); } 12% { opacity: 1; } 34% { transform: translateX(-50%) rotate(3deg) scale(.93); } 68% { bottom: 9%; transform: translateX(-50%) rotate(-2deg) scale(1); } 92% { opacity: 1; bottom: 42%; transform: translateX(-50%) rotate(1deg) scale(.86); } 100% { opacity: 0; bottom: 55%; transform: translateX(-50%) rotate(2deg) scale(.8); } }
@keyframes giftfx-petal-fall { 0% { opacity: 0; transform: translate(0,-40px) rotate(0); } 18% { opacity: .9; } 100% { opacity: 0; transform: translate(var(--drift), 78vh) rotate(520deg); } }
@keyframes giftfx-balloon-finale { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.1); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(13); } }
@keyframes giftfx-speed-pass { 0% { opacity: 0; transform: translateX(70vw) scaleX(.35); } 18% { opacity: .86; } 100% { opacity: 0; transform: translateX(-90vw) scaleX(1.8); } }
@keyframes giftfx-car-arrive { 0% { opacity: 0; transform: translate(105vw, 28%) scale(.42) rotate(-5deg); } 11% { opacity: 1; } 32% { transform: translate(-42%, 7%) scale(.82) rotate(1deg); } 52% { transform: translate(-50%, 0) scale(1.02); } 72%, 85% { opacity: 1; transform: translate(-50%, 0) scale(1); } 100% { opacity: 0; transform: translate(-145vw, -8%) scale(1.08) rotate(-4deg); } }
@keyframes giftfx-lamp-on { to { opacity: 1; } }
@keyframes giftfx-lamp-pulse { to { opacity: .66; filter: blur(1.7px) drop-shadow(0 0 19px rgba(255,226,164,.95)); } }
@keyframes giftfx-smoke-pass { 0% { opacity: 0; transform: translateX(40%) scale(.4); } 35% { opacity: .7; } 100% { opacity: 0; transform: translateX(-180%) scale(1.7); } }
@keyframes giftfx-horn-text { 0%, 100% { opacity: 0; transform: translateX(-50%) scale(.76); } 14%, 25%, 40%, 52%, 66%, 78% { opacity: 1; transform: translateX(-50%) scale(1); } 20%, 33%, 47%, 60%, 72% { opacity: .18; } }
@keyframes giftfx-fleet-arrive { 0% { opacity: 0; transform: translate(-50%, 130%) scale(.48); } 11% { opacity: 1; } 32% { transform: translate(-50%, 22%) scale(.76); } 55% { transform: translate(-50%, 0) scale(1.03); } 74%, 90% { opacity: 1; transform: translate(-50%, 0) scale(1); } 100% { opacity: 0; transform: translate(-50%, -18%) scale(1.12); } }
@keyframes giftfx-fleet-star { 0% { opacity: 0; transform: scale(.2) rotate(0); } 42% { opacity: 1; } 100% { opacity: 0; transform: scale(1.8) rotate(145deg); } }
@keyframes giftfx-fleet-title { to { opacity: 1; transform: translateX(-50%) translateY(-4px); text-shadow: 0 0 30px rgba(255,190,68,.8); } }
@keyframes giftfx-palace-reveal { 0% { opacity: 0; transform: scale(1.07); } 10% { opacity: .42; } 42%, 86% { opacity: .52; transform: scale(1); } 100% { opacity: 0; transform: scale(1.04); } }
@keyframes giftfx-dragon-shadow { 0% { opacity: 0; transform: translate(-30%, 22%) scale(.45); } 48% { opacity: .78; } 100% { opacity: 0; transform: translate(120%, -18%) scale(1.35); } }
@keyframes giftfx-mist-breathe { to { opacity: .88; transform: translateY(-2%) scale(1.04); } }
@keyframes giftfx-dragon-particle { 0% { opacity: 0; transform: translateY(36px) scale(.3); } 32% { opacity: .9; } 100% { opacity: 0; transform: translateY(-150px) scale(1.35); } }
@keyframes giftfx-dragon-flight { 0% { opacity: 0; transform: translate(-122%, 36%) scale(.52) rotate(-10deg); } 7% { opacity: .9; } 24% { opacity: 1; transform: translate(-56%, -42%) scale(.91) rotate(-4deg); } 39% { opacity: 1; transform: translate(-2%, -64%) scale(1.16) rotate(2deg); } 47% { opacity: 0; transform: translate(78%, -82%) scale(1.42) rotate(7deg); } 48% { opacity: 0; transform: translate(-118%, 12%) scale(.78) rotate(-8deg); } 56% { opacity: .95; } 73% { opacity: 1; transform: translate(-58%, -51%) scale(1.12) rotate(-2deg); } 86% { opacity: .95; transform: translate(-34%, -58%) scale(1.42) rotate(3deg); } 100% { opacity: 0; transform: translate(44%, -72%) scale(1.72) rotate(8deg); } }
@keyframes giftfx-dragon-head-pass { 0% { opacity: 0; transform: translate(68vw, -34%) scale(.42) rotate(8deg); } 16% { opacity: .9; } 48% { opacity: 1; transform: translate(-22%, -48%) scale(1.05) rotate(-2deg); } 72% { opacity: 1; transform: translate(-54%, -50%) scale(1.44) rotate(1deg); } 100% { opacity: 0; transform: translate(-72%, -52%) scale(2.08) rotate(3deg); } }
@keyframes giftfx-dragon-finale { 0% { opacity: 0; transform: translate(-50%, -42%) scale(.48); } 24% { opacity: .88; } 54%, 78% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); } 100% { opacity: 0; transform: translate(-50%, -54%) scale(1.38); } }
@keyframes giftfx-dragon-impact { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.1); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(12); } }
@keyframes giftfx-dragon-title { to { opacity: 1; transform: translateX(-50%) translateY(0); text-shadow: 0 0 32px rgba(255,184,44,.94), 0 8px 30px rgba(37,15,3,.88); } }

.gift-scene--pearl-milk-tea { display: grid; place-items: center; overflow: hidden; }
.giftfx-pearl-aura { position: absolute; left: 50%; top: 48%; width: min(440px, 75vw); aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); background: radial-gradient(circle, rgba(255, 217, 150, .5), rgba(255, 171, 105, .14) 48%, transparent 72%); filter: blur(5px); animation: pearl-aura 6.2s ease both; }
.giftfx-pearl-cup { position: absolute; left: 50%; top: 48%; z-index: 5; width: min(230px, 48vw); height: min(330px, 52vh); transform: translate(-50%, -50%); filter: drop-shadow(0 22px 28px rgba(92, 45, 28, .34)); animation: pearl-cup-arrive 6.2s cubic-bezier(.2,.8,.15,1) both; }
.giftfx-pearl-liquid { position: absolute; inset: 18% 7% 5%; border-radius: 18% 18% 28% 28%; background: linear-gradient(105deg, rgba(255, 241, 203, .92), rgba(224, 160, 103, .94) 44%, rgba(171, 101, 67, .96)); border: 4px solid rgba(255, 249, 220, .65); box-shadow: inset 10px 0 18px rgba(255,255,255,.3), inset -13px 0 20px rgba(105,49,28,.19); }
.giftfx-pearl-lid { position: absolute; left: 3%; top: 12%; z-index: 8; width: 94%; height: 32px; border-radius: 50%; background: linear-gradient(#fff4d4, #eeb782 65%, #b86e4d); border: 3px solid rgba(255,255,255,.7); box-shadow: 0 5px 0 rgba(135, 65, 42, .28); }
.giftfx-pearl-straw { position: absolute; left: 59%; top: -1%; z-index: 9; width: 18px; height: 200px; border-radius: 999px; background: repeating-linear-gradient(145deg, #ffd26b 0 15px, #f49b67 15px 28px); transform: rotate(8deg); transform-origin: bottom center; box-shadow: 0 0 9px rgba(255,194,94,.68); }
.giftfx-pearl-ice { position: absolute; inset: 22% 15% 31%; z-index: 7; }
.giftfx-pearl-ice i { position: absolute; width: 32px; height: 27px; border-radius: 7px; background: linear-gradient(135deg, rgba(255,255,255,.76), rgba(187,224,255,.36)); border: 1px solid rgba(255,255,255,.7); transform: rotate(calc(var(--i) * 19deg)); animation: pearl-ice-bob 1.5s calc(var(--i) * -.18s) ease-in-out infinite alternate; }
.giftfx-pearl-ice i:nth-child(1) { left: 10%; top: 10%; } .giftfx-pearl-ice i:nth-child(2) { left: 52%; top: 5%; } .giftfx-pearl-ice i:nth-child(3) { left: 30%; top: 42%; } .giftfx-pearl-ice i:nth-child(4) { left: 68%; top: 45%; } .giftfx-pearl-ice i:nth-child(5) { left: 4%; top: 62%; }
.giftfx-pearl-pearls { position: absolute; inset: 56% 11% 4%; z-index: 8; }
.giftfx-pearl-pearls i { position: absolute; left: calc(7% + var(--i) * 10%); bottom: calc((var(--i) % 3) * 8%); width: 25px; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 34% 25%, #9c5a37, #4b211b 62%, #24100e); box-shadow: inset 2px 2px 4px rgba(255,216,151,.3), 0 3px 5px rgba(54,22,16,.4); animation: pearl-bounce 1.12s calc(var(--i) * -.12s) ease-in-out infinite alternate; }
.giftfx-pearl-sparkles { position: absolute; inset: 12% 18%; z-index: 10; background: radial-gradient(circle at 24% 38%, #fff5bd 0 3px, transparent 4px), radial-gradient(circle at 76% 30%, #fff5bd 0 2px, transparent 3px), radial-gradient(circle at 80% 70%, #ffe49b 0 3px, transparent 4px); animation: pearl-sparkle 1.1s ease-in-out infinite alternate; }
.pearl-title { position: absolute; top: 10%; left: 50%; z-index: 12; transform: translateX(-50%); color: #fff0b7; font-family: var(--serif, serif); font-size: clamp(1.5rem, 5vw, 3.2rem); font-weight: 900; letter-spacing: .15em; text-shadow: 0 5px 22px rgba(80, 32, 11, .75); white-space: nowrap; animation: pearl-title-in .75s .8s ease both; }
@keyframes pearl-aura { from { opacity: 0; transform: translate(-50%, -50%) scale(.5); } 25%, 85% { opacity: 1; } to { opacity: 0; transform: translate(-50%, -50%) scale(1.18); } }
@keyframes pearl-cup-arrive { from { opacity: 0; transform: translate(-50%, 72%) rotate(-8deg) scale(.55); } 18% { opacity: 1; } 35%, 78% { transform: translate(-50%, -50%) rotate(2deg) scale(1); } to { opacity: 0; transform: translate(-50%, -56%) rotate(-2deg) scale(1.08); } }
@keyframes pearl-ice-bob { to { transform: translateY(-7px) rotate(8deg); } }
@keyframes pearl-bounce { to { transform: translateY(-12px) scale(1.06); } }
@keyframes pearl-sparkle { to { opacity: .42; transform: scale(1.12); } }
@keyframes pearl-title-in { from { opacity: 0; transform: translate(-50%, -12px); } to { opacity: 1; transform: translate(-50%, 0); } }

@media (max-width: 900px) {
  .gift-broadcast > span { min-width: 92px; padding-inline: 9px; letter-spacing: .06em; }
  .gift-catalog-grid { grid-template-columns: repeat(6, minmax(82px, 1fr)); }
  .gift-scene { height: min(570px, 76vh); }
}

@media (max-width: 780px) {
  .gift-broadcast { top: calc(var(--sticky-header-height, 66px) + var(--sticky-ribbon-height, 38px)); }
}

@media (max-width: 620px) {
  .gift-profile-dialog .dialog-card { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); padding: 18px 14px 14px; }
  .gift-profile-overview { grid-template-columns: auto minmax(0, 1fr); gap: 10px; margin: 9px 0 12px; }
  .gift-profile-overview .worker-avatar { width: 58px; height: 58px; }
  .gift-profile-copy h3 { font-size: 1.08rem; }
  .gift-profile-copy p { font-size: .74rem; }
  .gift-profile-tabs { gap: 6px; margin-bottom: 8px; }
  .gift-profile-tabs [role="tab"] { flex-basis: 120px; min-height: 38px; padding-inline: 9px; }
  .worker-service-profile { padding: 10px; }
  .worker-service-profile-grid { grid-template-columns: minmax(0, 1fr); gap: 7px; }
  .worker-service-profile-cell { padding: 8px 9px; }
  .worker-service-summary { align-items: flex-start; flex-direction: column; gap: 2px; }
  .worker-service-summary small { text-align: left; }
  .membership-badge { min-height: 30px; padding: 5px 9px; font-size: .66rem; }
  .gift-broadcast { position: relative; top: auto; min-height: 34px; }
  .gift-broadcast > span { min-width: 78px; font-size: .62rem; }
  .gift-broadcast p { padding: 7px 9px; overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; font-size: .72rem; line-height: 1.45; }
  .gift-dock { border-radius: 13px; padding: 10px; }
  .gift-dock-heading { align-items: flex-start; }
  .gift-dock-heading strong { font-size: .9rem; }
  .gift-dock-toggle { min-height: 36px; padding-inline: 9px; }
  .gift-catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; }
  .gift-option { min-width: 0; }
  .gift-gallery-items { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gift-gallery-item { grid-template-columns: auto 1fr auto; justify-items: start; align-items: center; padding: 5px 7px; }
  .gift-gallery-item small {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .gift-confirm-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); }
  .gift-confirm-dialog .dialog-card { max-height: calc(100dvh - 20px); padding: 20px 16px 16px; }
  .gift-confirm-summary div { grid-template-columns: minmax(82px, .8fr) minmax(0, 1.2fr); gap: 7px; }
  .gift-confirm-footer { position: sticky; z-index: 3; bottom: -16px; margin: 0 -16px -16px; border-top: 1px solid rgba(164, 111, 48, .2); background: linear-gradient(180deg, rgba(255,253,249,.96), #fffdf9 28%); box-shadow: 0 -10px 22px rgba(74, 48, 25, .08); padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); }
  .gift-effect-copy { bottom: max(9vh, 62px); min-width: calc(100vw - 28px); border-radius: 18px; padding-inline: 14px; }
  .gift-effect-name { font-size: 1rem; }
  .gift-scene { width: 100vw; height: 76vh; }
  /* Keep the new giftfx artwork inside narrow phone stages; the previous
     minimum widths clipped the glasses/car/fleet at 320–360px. */
  .giftfx-glasses-main { width: min(92vw, 790px); height: min(70vh, 590px); }
  .giftfx-car-wrap { width: min(92vw, 980px); }
  .giftfx-fleet-main { width: min(96vw, 1180px); height: min(72vh, 650px); }
  .gift-glasses { width: 310px; height: 145px; }
  .gift-lens { width: 124px; height: 96px; border-width: 12px; }
  .gift-bridge { top: 54px; width: 64px; border-top-width: 12px; }
  .gift-balloon { width: 220px; height: 360px; }
  .gift-balloon-canopy { height: 220px; }
  .gift-balloon-rigging i { top: 216px; height: 72px; }
  .gift-balloon-basket { top: 279px; width: 61px; height: 48px; }
  .fleet-title { top: 10%; font-size: 1.35rem; letter-spacing: .08em; }
  .gift-scene--dragon { height: 78vh; }
  .golden-dragon { inset: 10% -28% 18%; width: 156%; height: 72%; }
  .dragon-title { top: 14%; font-size: 1.8rem; }
}

@media (max-width: 360px) {
  .gift-catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) and (max-height: 620px) {
  .gift-confirm-dialog .dialog-card { gap: 7px; padding: 14px 12px 12px; }
  .gift-confirm-dialog .dialog-close { right: 8px; top: 6px; }
  .gift-confirm-description { font-size: .77rem; line-height: 1.4; }
  .gift-confirm-summary { gap: 4px; padding: 7px 9px; }
  .gift-confirm-summary div { gap: 5px; }
  .gift-confirm-shortfall { padding: 6px 8px; font-size: .75rem; line-height: 1.4; }
  .gift-confirm-recharge { padding: 7px 9px; }
  .gift-confirm-footer { bottom: -12px; margin: 0 -12px -12px; padding: 8px 12px calc(9px + env(safe-area-inset-bottom)); }
  .gift-confirm-actions button { min-height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .gift-effect-stage *, .gift-effect-stage *::before, .gift-effect-stage *::after {
    animation-duration: .01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
  }
  .gift-option { transition: none; }
}

/* 2026-09-05 visual refinement: one coherent 3D-like dragon hero instead of
   separately moving 2D body/head/finale cut-outs. */
.gift-scene--dragon { perspective: 1100px; perspective-origin: 50% 48%; }
.giftfx-dragon-trails,
.giftfx-dragon-body,
.giftfx-dragon-head,
.giftfx-dragon-finale { display: none !important; }
.giftfx-dragon-hero {
  position: absolute;
  left: 50%;
  top: 52%;
  z-index: 7;
  width: min(780px, 86vw);
  height: min(92vh, 900px);
  object-fit: contain;
  transform-origin: 50% 52%;
  transform-style: preserve-3d;
  backface-visibility: visible;
  filter: drop-shadow(0 0 42px rgba(255,173,33,.92)) drop-shadow(0 28px 34px rgba(43,20,4,.7));
  animation: giftfx-dragon-3d 20s cubic-bezier(.18,.72,.14,1) both;
}
@keyframes giftfx-dragon-3d {
  0% { opacity: 0; transform: translate(-50%, -46%) scale(.48) rotateY(-72deg) rotateZ(-8deg); }
  10% { opacity: 1; transform: translate(-50%, -50%) scale(.78) rotateY(-28deg) rotateZ(-4deg); }
  25% { opacity: 1; transform: translate(-50%, -50%) scale(.96) rotateY(35deg) rotateZ(2deg); }
  42% { opacity: 1; transform: translate(-50%, -50%) scale(1.04) rotateY(128deg) rotateZ(-2deg); }
  58% { opacity: 1; transform: translate(-50%, -50%) scale(.98) rotateY(214deg) rotateZ(3deg); }
  76% { opacity: 1; transform: translate(-50%, -50%) scale(1.07) rotateY(302deg) rotateZ(-1deg); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1.02) rotateY(360deg) rotateZ(0deg); }
}

/* Keep the cup present for the whole scene; only the stage itself is removed
   at the end.  Pearls are scattered in the cup rather than arranged as a
   caterpillar-like row. */
.giftfx-pearl-cup { animation-name: pearl-cup-arrive-stable; }
@keyframes pearl-cup-arrive-stable {
  from { opacity: 0; transform: translate(-50%, 72%) rotate(-8deg) scale(.55); }
  18% { opacity: 1; }
  35%, 78% { opacity: 1; transform: translate(-50%, -50%) rotate(2deg) scale(1); }
  100% { opacity: 1; transform: translate(-50%, -50%) rotate(-1deg) scale(1.03); }
}
.giftfx-pearl-pearls { inset: 54% 16% 9%; }
.giftfx-pearl-pearls i { left: auto; top: auto; bottom: auto; animation-name: pearl-bounce-natural; }
.giftfx-pearl-pearls i:nth-child(1) { left: 13%; top: 18%; width: 23px; }
.giftfx-pearl-pearls i:nth-child(2) { left: 43%; top: 7%; width: 27px; }
.giftfx-pearl-pearls i:nth-child(3) { left: 72%; top: 18%; width: 21px; }
.giftfx-pearl-pearls i:nth-child(4) { left: 27%; top: 37%; width: 26px; }
.giftfx-pearl-pearls i:nth-child(5) { left: 57%; top: 40%; width: 22px; }
.giftfx-pearl-pearls i:nth-child(6) { left: 6%; top: 55%; width: 24px; }
.giftfx-pearl-pearls i:nth-child(7) { left: 40%; top: 61%; width: 21px; }
.giftfx-pearl-pearls i:nth-child(8) { left: 75%; top: 64%; width: 25px; }
.giftfx-pearl-pearls i:nth-child(9) { left: 20%; top: 77%; width: 20px; }
@keyframes pearl-bounce-natural {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
  50% { transform: translateY(-8px) rotate(16deg) scale(1.06); }
}
.pearl-title { letter-spacing: .08em; text-align: center; }

/* V5 single-artwork gift heroes: the depth comes from the artwork while the
   stage supplies camera motion, bloom and a restrained livestream-style beat. */
.giftfx-dragon-hero {
  mix-blend-mode: normal;
  animation-name: giftfx-dragon-3d-premium;
}
@keyframes giftfx-dragon-3d-premium {
  0% { opacity: 0; transform: translate(-50%, -46%) scale(.48) rotateY(-70deg) rotateX(7deg) rotateZ(-7deg); filter: drop-shadow(0 0 14px rgba(255,198,64,.3)) drop-shadow(0 24px 28px rgba(43,20,4,.45)); }
  9% { opacity: 1; transform: translate(-50%, -50%) scale(.78) rotateY(-28deg) rotateX(2deg) rotateZ(-3deg); }
  24% { transform: translate(-50%, -50%) scale(.98) rotateY(32deg) rotateX(-2deg) rotateZ(2deg); filter: drop-shadow(0 0 44px rgba(255,185,36,.95)) drop-shadow(0 28px 34px rgba(43,20,4,.75)); }
  41% { transform: translate(-50%, -50%) scale(1.05) rotateY(122deg) rotateX(3deg) rotateZ(-2deg); filter: drop-shadow(0 0 70px rgba(255,215,88,1)) drop-shadow(0 30px 38px rgba(43,20,4,.8)); }
  58% { transform: translate(-50%, -50%) scale(.99) rotateY(210deg) rotateX(-2deg) rotateZ(3deg); filter: drop-shadow(0 0 38px rgba(255,176,34,.9)) drop-shadow(0 28px 34px rgba(43,20,4,.72)); }
  77% { transform: translate(-50%, -50%) scale(1.08) rotateY(302deg) rotateX(2deg) rotateZ(-1deg); filter: drop-shadow(0 0 76px rgba(255,225,112,1)) drop-shadow(0 30px 40px rgba(43,20,4,.82)); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1.03) rotateY(360deg) rotateX(0deg) rotateZ(0deg); filter: drop-shadow(0 0 46px rgba(255,190,48,.94)) drop-shadow(0 28px 36px rgba(43,20,4,.76)); }
}
.giftfx-pearl-hero {
  position: absolute;
  left: 50%;
  top: 51%;
  z-index: 7;
  width: min(430px, 72vw);
  height: min(620px, 78vh);
  object-fit: contain;
  transform-origin: 50% 58%;
  filter: drop-shadow(0 22px 30px rgba(102, 45, 20, .34)) drop-shadow(0 0 30px rgba(255, 196, 93, .4));
  animation: giftfx-pearl-hero-arrive 6.2s cubic-bezier(.2,.8,.15,1) both;
}
@keyframes giftfx-pearl-hero-arrive {
  0% { opacity: 0; transform: translate(-50%, 70%) rotate(-7deg) scale(.58); }
  18% { opacity: 1; transform: translate(-50%, -50%) rotate(2deg) scale(1); }
  36% { transform: translate(-50%, -50%) rotate(-1deg) scale(1.02); }
  55% { transform: translate(-50%, -50%) rotate(1deg) scale(1); }
  78%, 100% { opacity: 1; transform: translate(-50%, -50%) rotate(0deg) scale(1.01); }
}
@media (max-width: 620px) {
  .giftfx-pearl-hero { width: min(360px, 86vw); height: min(540px, 70vh); }
  .giftfx-dragon-hero { width: min(620px, 96vw); height: min(78vh, 760px); }
}

/* V6 blockbuster pass: cinematic lighting, camera push and impact beats are
   layered behind the single dragon artwork.  The backdrop stays low-alpha so
   other page text remains readable during a gift broadcast. */
.gift-scene--dragon {
  animation: giftfx-dragon-camera 20s cubic-bezier(.2,.7,.15,1) both;
}
.gift-scene--dragon::before {
  content: "";
  position: absolute;
  inset: -16%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 52% 42%, rgba(255, 222, 103, .30), transparent 26%),
    radial-gradient(ellipse at 50% 74%, rgba(255, 82, 25, .20), transparent 48%),
    conic-gradient(from 208deg at 50% 50%, transparent 0 26%, rgba(255, 184, 38, .13) 31%, transparent 39% 67%, rgba(255, 104, 25, .11) 73%, transparent 80%);
  filter: blur(16px) saturate(1.3);
  mix-blend-mode: screen;
  animation: giftfx-dragon-bloom 3.1s ease-in-out infinite alternate;
}
.gift-effect-stage.is-golden-dragon .gift-effect-backdrop {
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 190, 45, .13), transparent 38%),
    radial-gradient(circle at 50% 80%, rgba(235, 65, 18, .08), transparent 52%);
  background-color: rgba(173, 105, 24, .12);
  backdrop-filter: none;
}
@media (min-width: 621px) and (max-width: 780px) {
  /* Tablet header uses a 92px shell plus the 38px activity ribbon.  Keep a
     concrete fallback because the standalone QA/demo page has no shell vars. */
  .gift-broadcast { top: 130px; }
}
.giftfx-dragon-hero {
  animation-name: giftfx-dragon-blockbuster;
}
@keyframes giftfx-dragon-camera {
  0%, 100% { transform: scale(1); }
  18% { transform: scale(1.02) translate3d(0, 0, 0); }
  43% { transform: scale(1.045) translate3d(-.35%, .2%, 0); }
  58% { transform: scale(1.035) translate3d(.3%, -.2%, 0); }
  82% { transform: scale(1.06) translate3d(-.2%, .15%, 0); }
}
@keyframes giftfx-dragon-bloom {
  from { opacity: .42; transform: scale(.96) rotate(-1deg); }
  to { opacity: .92; transform: scale(1.08) rotate(1deg); }
}
@keyframes giftfx-dragon-blockbuster {
  0% { opacity: 0; transform: translate(-50%, -46%) scale(.40) rotateY(-72deg) rotateX(8deg) rotateZ(-8deg); filter: drop-shadow(0 0 10px rgba(255,184,30,.25)) drop-shadow(0 24px 28px rgba(43,20,4,.42)); }
  8% { opacity: 1; transform: translate(-50%, -50%) scale(.72) rotateY(-34deg) rotateX(4deg) rotateZ(-4deg); }
  19% { transform: translate(-50%, -50%) scale(.94) rotateY(24deg) rotateX(-3deg) rotateZ(2deg); filter: drop-shadow(0 0 48px rgba(255,194,38,.98)) drop-shadow(0 30px 34px rgba(43,20,4,.78)); }
  31% { transform: translate(-50%, -50%) scale(1.08) rotateY(86deg) rotateX(4deg) rotateZ(-2deg); filter: drop-shadow(0 0 82px rgba(255,231,120,1)) drop-shadow(0 34px 42px rgba(43,20,4,.86)); }
  46% { transform: translate(-50%, -50%) scale(1.01) rotateY(150deg) rotateX(-4deg) rotateZ(3deg); filter: drop-shadow(0 0 42px rgba(255,169,27,.92)) drop-shadow(0 28px 36px rgba(43,20,4,.75)); }
  62% { transform: translate(-50%, -50%) scale(1.10) rotateY(225deg) rotateX(3deg) rotateZ(-2deg); filter: drop-shadow(0 0 90px rgba(255,221,96,1)) drop-shadow(0 35px 42px rgba(43,20,4,.86)); }
  78% { transform: translate(-50%, -50%) scale(1.04) rotateY(304deg) rotateX(-2deg) rotateZ(2deg); filter: drop-shadow(0 0 54px rgba(255,187,37,.96)) drop-shadow(0 30px 38px rgba(43,20,4,.8)); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1.08) rotateY(360deg) rotateX(0deg) rotateZ(0deg); filter: drop-shadow(0 0 68px rgba(255,205,64,1)) drop-shadow(0 32px 42px rgba(43,20,4,.82)); }
}
.giftfx-dragon-impact {
  width: clamp(20px, 3vw, 42px);
  border: 2px solid rgba(255, 243, 171, .95);
  box-shadow: 0 0 45px 18px rgba(255, 222, 102, .95), 0 0 150px 74px rgba(255, 83, 16, .38), 0 0 260px 110px rgba(255, 166, 30, .22);
  animation-name: giftfx-dragon-impact-blockbuster;
}
@keyframes giftfx-dragon-impact-blockbuster {
  0%, 54% { opacity: 0; transform: translate(-50%, -50%) scale(.1); }
  60% { opacity: 1; transform: translate(-50%, -50%) scale(.8); }
  72% { opacity: .82; transform: translate(-50%, -50%) scale(8); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(18); }
}

/* 2026-09-05 cinematic motion pass.  The artwork remains a single asset,
   while the hero, camera, shockwaves, lightning and embers move on separate
   depth planes so the scene reads as an animated creature rather than a
   flat image being rotated in place. */
.gift-scene--dragon { perspective: 900px; perspective-origin: 50% 46%; transform-style: preserve-3d; }
.gift-scene--dragon::after {
  content: ""; position: absolute; inset: -10%; z-index: 3; pointer-events: none;
  background: radial-gradient(ellipse at 52% 47%, transparent 24%, rgba(255,118,24,.18) 48%, transparent 70%);
  mix-blend-mode: screen; opacity: 0; animation: dragon-heat-haze 20s ease both;
}
.giftfx-dragon-hero-wrap {
  position: absolute; left: 50%; top: 50%; z-index: 7;
  width: min(820px, 90vw); height: min(94vh, 920px);
  transform-style: preserve-3d; transform-origin: 50% 55%;
  animation: dragon-flight-path 20s cubic-bezier(.18,.72,.12,1) both;
}
.giftfx-dragon-hero {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  transform-origin: 52% 56%; backface-visibility: visible;
  filter: drop-shadow(0 0 28px rgba(255,153,24,.66)) drop-shadow(0 26px 36px rgba(37,15,2,.72));
  animation: dragon-body-breath 20s ease both;
}
.giftfx-dragon-embers { position: absolute; inset: 0; z-index: 8; pointer-events: none; transform-style: preserve-3d; }
.giftfx-dragon-embers i {
  position: absolute; left: var(--x); top: var(--y); width: var(--size); aspect-ratio: 1; border-radius: 50%;
  background: #ffd968; box-shadow: 0 0 10px 3px rgba(255,122,22,.72); opacity: 0;
  animation: dragon-ember-flight calc(1.4s + (var(--i) % 5) * .22s) calc(.15s + var(--i) * .17s) ease-out infinite;
}
.giftfx-dragon-roar { position: absolute; left: 55%; top: 41%; z-index: 9; width: 18%; aspect-ratio: 1; pointer-events: none; }
.giftfx-dragon-roar i {
  position: absolute; inset: 0; border: 2px solid rgba(255,226,119,.9); border-radius: 50%; opacity: 0;
  transform: translate(-50%, -50%) scale(.1); transform-origin: 0 0;
  animation: dragon-roar-ring 2.7s 3.5s cubic-bezier(.18,.7,.12,1) infinite;
}
.giftfx-dragon-roar i:nth-child(2) { animation-delay: 3.82s; border-color: rgba(255,146,53,.74); }
.giftfx-dragon-roar i:nth-child(3) { animation-delay: 4.14s; border-color: rgba(255,239,175,.68); }
.giftfx-dragon-shockwaves { position: absolute; left: 50%; top: 57%; z-index: 6; width: 10px; height: 10px; pointer-events: none; }
.giftfx-dragon-shockwaves i {
  position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; border: 3px solid rgba(255,210,91,.88); border-radius: 50%; opacity: 0;
  animation: dragon-shockwave 2.2s 1.1s cubic-bezier(.14,.76,.13,1) infinite;
}
.giftfx-dragon-shockwaves i:nth-child(2) { animation-delay: 8.8s; border-color: rgba(255,116,29,.82); }
.giftfx-dragon-shockwaves i:nth-child(3) { animation-delay: 15.5s; border-color: rgba(255,242,164,.9); }
.giftfx-dragon-lightning { position: absolute; inset: 0; z-index: 5; pointer-events: none; opacity: 0; mix-blend-mode: screen; animation: dragon-lightning-flash 20s ease both; }
.giftfx-dragon-lightning i { position: absolute; width: 4px; height: 72%; top: 10%; background: linear-gradient(180deg, transparent, #fff6b5 42%, #ffb52c 68%, transparent); filter: blur(1px) drop-shadow(0 0 12px #ffd451); transform: rotate(19deg) skewX(-18deg); }
.giftfx-dragon-lightning i:first-child { left: 22%; } .giftfx-dragon-lightning i:last-child { right: 18%; transform: rotate(-24deg) skewX(16deg); }
@keyframes dragon-flight-path {
  0% { opacity: 0; transform: translate3d(-18%, 4%, -260px) rotateX(16deg) rotateY(-22deg) rotateZ(-8deg) scale(.56); }
  6% { opacity: 1; transform: translate3d(-10%, 1%, -120px) rotateX(9deg) rotateY(-12deg) rotateZ(-4deg) scale(.76); }
  14% { opacity: 1; transform: translate3d(-2%, -1%, 10px) rotateX(-4deg) rotateY(8deg) rotateZ(2deg) scale(.96); }
  22% { transform: translate3d(2%, 0, 90px) rotateX(6deg) rotateY(20deg) rotateZ(-2deg) scale(1.03); }
  34% { transform: translate3d(-2%, 1%, 60px) rotateX(-7deg) rotateY(28deg) rotateZ(3deg) scale(1.06); }
  48% { opacity: 1; transform: translate3d(3%, -1%, 20px) rotateX(7deg) rotateY(-20deg) rotateZ(-4deg) scale(1.01); }
  62% { transform: translate3d(-3%, 1%, 80px) rotateX(-6deg) rotateY(-30deg) rotateZ(3deg) scale(1.05); }
  76% { transform: translate3d(2%, -1%, 40px) rotateX(5deg) rotateY(23deg) rotateZ(-2deg) scale(1.04); }
  90% { opacity: 1; transform: translate3d(-1%, 0, -20px) rotateX(-3deg) rotateY(-10deg) rotateZ(1deg) scale(1); }
  100% { opacity: 0; transform: translate3d(12%, -8%, -220px) rotateX(-12deg) rotateY(18deg) rotateZ(8deg) scale(.66); }
}
@keyframes dragon-body-breath {
  0%, 100% { transform: scaleX(1) skewX(0deg); }
  23% { transform: scaleX(1.04) skewX(-1deg); }
  42% { transform: scaleX(.95) skewX(2deg); }
  63% { transform: scaleX(1.06) skewX(-2deg); }
  82% { transform: scaleX(.98) skewX(1deg); }
}
@keyframes dragon-roar-ring { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.08); } 16% { opacity: .82; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(2.55); } }
@keyframes dragon-shockwave { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.3); } 18% { opacity: .72; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(18); } }
@keyframes dragon-ember-flight { 0% { opacity: 0; transform: translate3d(0, 28px, 0) scale(.4); } 18% { opacity: .95; } 100% { opacity: 0; transform: translate3d(calc((var(--i) % 5 - 2) * 50px), -170px, calc((var(--i) % 3) * 90px)) scale(1.4); } }
@keyframes dragon-lightning-flash { 0%, 11%, 26%, 100% { opacity: 0; } 12%, 13%, 27%, 28% { opacity: .82; } }
@keyframes dragon-heat-haze { 0%, 100% { opacity: 0; transform: scale(.96); } 30%, 70% { opacity: .66; transform: scale(1.08); } }
.gift-effect-stage.is-golden-dragon .gift-effect-backdrop {
  background:
    radial-gradient(ellipse at 50% 44%, rgba(255,186,54,.20), transparent 34%),
    linear-gradient(180deg, rgba(14,12,23,.32), rgba(55,20,10,.18));
  background-color: rgba(173, 105, 24, .12);
}

/* Pearl milk tea gets a hand animated “落杯 → 晃液 → 吸管吸取” rhythm. */
.gift-scene--pearl-milk-tea { perspective: 800px; perspective-origin: 50% 52%; }
.giftfx-pearl-hero { transform-style: preserve-3d; animation-name: pearl-cup-cinematic; filter: drop-shadow(0 28px 34px rgba(82,32,18,.44)) drop-shadow(0 0 34px rgba(255,184,79,.5)); }
.giftfx-pearl-motion { position: absolute; inset: 0; z-index: 8; pointer-events: none; }
.giftfx-pearl-motion i { position: absolute; left: var(--x); top: var(--y); width: var(--size); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 30% 25%, #a86743, #321512 70%); box-shadow: 0 2px 6px rgba(47,18,11,.5); opacity: 0; animation: pearl-pop calc(1.15s + (var(--i) % 4) * .12s) calc(1.2s + var(--i) * .08s) ease-out infinite; }
.giftfx-pearl-tea-wave { position: absolute; left: 50%; top: 38%; z-index: 9; width: min(340px, 62vw); height: 80px; transform: translateX(-50%); pointer-events: none; }
.giftfx-pearl-tea-wave i { position: absolute; inset: 18px 0; border: 3px solid rgba(255,229,177,.72); border-radius: 50%; opacity: 0; animation: tea-wave 2.4s 1.55s ease-out infinite; }
.giftfx-pearl-tea-wave i:nth-child(2) { animation-delay: 2.05s; }
.giftfx-pearl-sip-pulse { position: absolute; left: 58%; top: 23%; z-index: 10; width: 18px; height: 18px; border-radius: 50%; background: #fff5c4; box-shadow: 0 0 26px 11px rgba(255,190,90,.65); opacity: 0; animation: sip-pulse 6.2s ease both; }
.giftfx-pearl-cup-glint { position: absolute; left: 36%; top: 39%; z-index: 10; width: 8%; height: 42%; border-radius: 50%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.76), transparent); filter: blur(4px); opacity: 0; transform: rotate(12deg); animation: cup-glint 6.2s 1.25s ease both; }
@keyframes pearl-cup-cinematic { 0% { opacity: 0; transform: translate(-50%, 76%) translateZ(-240px) rotateX(28deg) rotateZ(-12deg) scale(.48); } 12% { opacity: 1; } 24% { transform: translate(-50%, -50%) translateZ(90px) rotateX(-8deg) rotateZ(4deg) scale(1.05); } 33% { transform: translate(-50%, -50%) translateZ(0) rotateX(5deg) rotateZ(-2deg) scale(.98); } 44% { transform: translate(-50%, -50%) translateZ(55px) rotateX(-4deg) rotateZ(2deg) scale(1.02); } 57% { transform: translate(-50%, -50%) translateZ(10px) rotateX(4deg) rotateZ(-1deg) scale(1); } 70% { transform: translate(-50%, -50%) translateZ(80px) rotateX(-3deg) rotateZ(1deg) scale(1.04); } 84% { opacity: 1; transform: translate(-50%, -50%) translateZ(20px) rotateX(2deg) rotateZ(0) scale(1.01); } 100% { opacity: 0; transform: translate(-50%, -57%) translateZ(-80px) rotateX(-8deg) rotateZ(-2deg) scale(.94); } }
@keyframes pearl-pop { 0% { opacity: 0; transform: translateY(18px) scale(.4); } 28% { opacity: .95; } 100% { opacity: 0; transform: translate(calc((var(--i) % 3 - 1) * 34px), -56px) scale(1.15); } }
@keyframes tea-wave { 0% { opacity: 0; transform: scale(.4) rotate(-3deg); } 22% { opacity: .75; } 100% { opacity: 0; transform: scale(1.25) rotate(3deg); } }
@keyframes sip-pulse { 0%, 28% { opacity: 0; transform: scale(.2); } 34% { opacity: .9; transform: scale(1); } 44% { opacity: 0; transform: scale(3.6); } 55% { opacity: .72; transform: scale(.65); } 65% { opacity: 0; transform: scale(2.8); } 100% { opacity: 0; } }
@keyframes cup-glint { 0%, 20% { opacity: 0; transform: translateX(-90px) rotate(12deg); } 42% { opacity: .72; } 72%, 100% { opacity: 0; transform: translateX(170px) rotate(12deg); } }

/* WebGL mesh renderer: the PNG is a texture only.  The visible canvas bends
   its vertices from a spine chain and applies a real depth/yaw projection. */
.giftfx-dragon-mesh {
  position: absolute; left: 50%; top: 50%; z-index: 7;
  width: min(520px, 72vw); height: min(680px, 88vh);
  margin: 0;
  transform: translate(-50%, -50%);
  display: block; pointer-events: none; opacity: 0;
  filter: drop-shadow(0 0 30px rgba(255, 166, 28, .76)) drop-shadow(0 24px 30px rgba(38, 12, 2, .62));
  animation: dragon-mesh-opacity 20s ease both;
}
.giftfx-dragon-source { display: none !important; }
.giftfx-dragon-source-fallback {
  display: block !important; position: absolute; left: 50%; top: 50%; z-index: 7;
  width: min(520px, 72vw); height: min(680px, 88vh); object-fit: contain;
  transform: translate(-50%, -50%); filter: drop-shadow(0 0 30px rgba(255,166,28,.76));
}
@keyframes dragon-mesh-opacity {
  0% { opacity: 0; }
  6% { opacity: 1; }
  90% { opacity: 1; }
  100% { opacity: 0; }
}
@media (max-width: 620px) {
  .giftfx-dragon-mesh { width: min(430px, 100vw); height: min(620px, 78vh); }
  .giftfx-dragon-source-fallback { width: min(430px, 100vw); height: min(620px, 78vh); }
}

/* Final review pass: the pearl artwork is the only pearl visual.  The old
   aura, glint, sparkle and free-floating procedural pearls made the cup look
   cheap and allowed particles to escape the container. */
.gift-scene--pearl-milk-tea .giftfx-pearl-aura,
.gift-scene--pearl-milk-tea .giftfx-pearl-motion,
.gift-scene--pearl-milk-tea .giftfx-pearl-tea-wave,
.gift-scene--pearl-milk-tea .giftfx-pearl-sip-pulse,
.gift-scene--pearl-milk-tea .giftfx-pearl-cup-glint,
.gift-scene--pearl-milk-tea .giftfx-pearl-sparkles { display: none !important; }
.gift-scene--pearl-milk-tea .giftfx-pearl-hero {
  top: 52%;
  width: min(360px, 62vw);
  height: min(500px, 70vh);
  filter: drop-shadow(0 22px 30px rgba(77, 36, 22, .46));
  animation-name: pearl-cup-contained;
}
@keyframes pearl-cup-contained {
  0% { opacity: 0; transform: translate(-50%, 58%) rotate(-3deg); }
  16% { opacity: 1; transform: translate(-50%, -50%) rotate(1deg); }
  32% { transform: translate(-50%, -50%) rotate(-1deg); }
  52% { transform: translate(-50%, -50%) rotate(.6deg); }
  76%, 100% { opacity: 1; transform: translate(-50%, -50%) rotate(0); }
}
.gift-scene--pearl-milk-tea .pearl-title {
  top: 8%;
  color: #8e4f24;
  letter-spacing: .08em;
  text-shadow: 0 2px 10px rgba(255, 239, 190, .9);
}
@media (max-width: 620px) {
  .gift-scene--pearl-milk-tea .giftfx-pearl-hero {
    width: min(310px, 82vw);
    height: min(450px, 60vh);
    top: 53%;
  }
}

/* Owner-approved V4 rollback: the active dragon scene uses the original
   three-artwork composition. Later V5/V6/WebGL/video selectors stay in the
   historical source tree but cannot hide or replace this active scene. */
.gift-scene--dragon {
  animation: none !important;
  perspective: none !important;
  transform-style: initial !important;
}
.gift-scene--dragon::before,
.gift-scene--dragon::after { display: none !important; }
.gift-scene--dragon .giftfx-dragon-trails,
.gift-scene--dragon .giftfx-dragon-body,
.gift-scene--dragon .giftfx-dragon-head,
.gift-scene--dragon .giftfx-dragon-finale {
  display: block !important;
}
.gift-scene--dragon .giftfx-dragon-body--trail {
  animation-name: giftfx-dragon-flight !important;
  animation-duration: 20s !important;
}
.gift-scene--dragon .giftfx-dragon-body--main {
  animation-name: giftfx-dragon-flight !important;
  animation-duration: 20s !important;
}
.gift-scene--dragon .giftfx-dragon-palace {
  animation-name: giftfx-palace-reveal !important;
  animation-duration: 20s !important;
}
.gift-scene--dragon .giftfx-dragon-impact {
  width: 20px;
  border: 0;
  animation-name: giftfx-dragon-impact !important;
  animation-duration: 1.55s !important;
  animation-delay: 16.35s !important;
}

/* Articulated dragon rig: five aligned cut planes share one source artwork,
   then follow separate joints so the creature has a spine wave, head nod and
   tail follow-through instead of one flat image being dragged around. */
.giftfx-dragon-rig {
  position: absolute; left: 50%; top: 50%; z-index: 7;
  width: min(520px, 72vw); height: min(680px, 88vh);
  margin-left: -50%; margin-top: -50%;
  transform-style: preserve-3d; transform-origin: 50% 55%;
  animation: dragon-flight-path 20s cubic-bezier(.18,.72,.12,1) both;
}
.giftfx-dragon-bone {
  position: absolute; inset: 0; transform-style: preserve-3d;
  pointer-events: none; will-change: transform;
}
.giftfx-dragon-segment {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; clip-path: var(--dragon-clip); -webkit-clip-path: var(--dragon-clip);
  transform-origin: 50% 50%; backface-visibility: visible;
  filter: drop-shadow(0 0 25px rgba(255, 167, 31, .62));
}
.giftfx-dragon-rig .giftfx-dragon-hero { animation: none; }

/* 2026-09-06 mobile QA: keep the milk-tea hero inside a phone viewport.
   The desktop artwork remains unchanged; on narrow screens the original
   transparent cutout is reduced so the lid, straw, pearls and caption can
   be seen together without clipping the bottom of the stage. */
@media (max-width: 620px) {
  .gift-scene--pearl-milk-tea .giftfx-pearl-hero {
    top: 50%;
    width: min(260px, 70vw);
    height: min(380px, 54vh);
  }
  .gift-scene--pearl-milk-tea .pearl-title {
    top: 5%;
    max-width: calc(100vw - 28px);
    font-size: clamp(1.05rem, 6vw, 1.65rem);
    white-space: normal;
  }
}
.giftfx-dragon-bone--head { z-index: 5; transform-origin: 64% 29%; animation: dragon-bone-head-live 3.8s .72s ease-in-out infinite; }
.giftfx-dragon-bone--neck { z-index: 4; transform-origin: 48% 43%; animation: dragon-bone-neck-live 4.6s .46s ease-in-out infinite; }
.giftfx-dragon-bone--torso { z-index: 3; transform-origin: 52% 57%; animation: dragon-bone-torso-live 3.25s .16s ease-in-out infinite; }
.giftfx-dragon-bone--tail { z-index: 2; transform-origin: 50% 71%; animation: dragon-bone-tail-live 5.4s ease-in-out infinite; }
.giftfx-dragon-bone--claw { z-index: 6; transform-origin: 31% 48%; animation: dragon-bone-claw-live 2.8s .9s ease-in-out infinite; }
.giftfx-dragon-bone--head .giftfx-dragon-segment { filter: drop-shadow(0 0 38px rgba(255, 205, 67, .92)) drop-shadow(0 14px 20px rgba(39, 12, 2, .72)); }
.giftfx-dragon-bone--tail .giftfx-dragon-segment { filter: drop-shadow(0 0 30px rgba(255, 146, 25, .78)) drop-shadow(0 24px 30px rgba(39, 12, 2, .68)); }
@keyframes dragon-bone-head-live {
  0%, 100% { transform: rotate(0deg) translate3d(0, 0, 0) scale(1); }
  18% { transform: rotate(-4deg) translate3d(-4px, 3px, 12px) scale(1.01); }
  38% { transform: rotate(5deg) translate3d(5px, -3px, 26px) scale(1.035); }
  52% { transform: rotate(1deg) translate3d(1px, 1px, 8px) scale(1.01); }
  68% { transform: rotate(-3deg) translate3d(-3px, 2px, 20px) scale(1.025); }
  84% { transform: rotate(2deg) translate3d(2px, 0, 8px) scale(1.01); }
}
@keyframes dragon-bone-neck-live {
  0%, 100% { transform: rotate(0deg) translate3d(0, 0, 0); }
  22% { transform: rotate(2.5deg) translate3d(4px, -2px, 8px); }
  46% { transform: rotate(-3.5deg) translate3d(-5px, 3px, 18px); }
  72% { transform: rotate(2deg) translate3d(3px, -2px, 10px); }
}
@keyframes dragon-bone-torso-live {
  0%, 100% { transform: rotate(0deg) scaleX(1) scaleY(1); }
  24% { transform: rotate(-1.6deg) scaleX(1.018) scaleY(1.012); }
  52% { transform: rotate(1.9deg) scaleX(.982) scaleY(.99); }
  78% { transform: rotate(-1deg) scaleX(1.012) scaleY(1.008); }
}
@keyframes dragon-bone-tail-live {
  0%, 100% { transform: rotate(0deg) translate3d(0, 0, 0); }
  20% { transform: rotate(3deg) translate3d(7px, -1px, 6px); }
  48% { transform: rotate(-5deg) translate3d(-9px, 3px, 16px); }
  74% { transform: rotate(4deg) translate3d(7px, -2px, 9px); }
}
@keyframes dragon-bone-claw-live {
  0%, 100% { transform: rotate(0deg) translate3d(0, 0, 0); }
  28% { transform: rotate(-5deg) translate3d(-6px, 5px, 12px); }
  56% { transform: rotate(6deg) translate3d(8px, -4px, 20px); }
  82% { transform: rotate(-2deg) translate3d(-3px, 2px, 8px); }
}
@media (max-width: 620px) {
  .giftfx-dragon-rig { width: min(430px, 100vw); height: min(620px, 78vh); }
  .giftfx-dragon-bone--head { transform-origin: 64% 29%; }
}

/* 2026-09-06 video cut: the owner supplied real moving footage for the
   dragon. Keep the video itself clean and let captions sit below centre,
   without the old procedural halo/particle layers. */
.gift-scene--dragon {
  width: min(100vw, 1280px);
  height: min(100vh, 720px);
  overflow: hidden;
  background: transparent;
}
.gift-scene--dragon .giftfx-dragon-video {
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: 7;
  /* Match the painted contain rectangle, not its surrounding letterbox.
     Keep the scene/caption geometry and the original media scale unchanged. */
  --dragon-video-ratio: calc(16 / 9);
  width: min(100vw, 1280px, calc(min(100vh, 720px) * var(--dragon-video-ratio)));
  height: auto;
  aspect-ratio: var(--dragon-video-ratio);
  transform: translate(-50%, -50%);
  object-fit: contain;
  display: block;
  background: transparent;
  pointer-events: none;
}
@media (orientation: portrait) {
  .gift-scene--dragon .giftfx-dragon-video { --dragon-video-ratio: calc(9 / 16); }
}
.gift-scene--dragon .giftfx-dragon-video-fallback {
  display: none !important;
}
.gift-scene--dragon.is-video-error .giftfx-dragon-video {
  display: none;
}
.gift-scene--dragon.is-video-error .giftfx-dragon-video-fallback {
  display: block !important;
  position: absolute;
  inset: 8% 12%;
  z-index: 7;
  width: 76%;
  height: 84%;
  object-fit: contain;
}
.gift-scene--dragon .dragon-video-title,
.gift-scene--dragon .dragon-video-finale {
  position: absolute;
  left: 50%;
  top: 80%;
  z-index: 12;
  max-width: calc(100vw - 32px);
  color: #fff4c6;
  font-family: var(--serif, serif);
  font-size: clamp(1.25rem, 3.3vw, 2.8rem);
  font-weight: 900;
  letter-spacing: .12em;
  line-height: 1.25;
  text-align: center;
  text-shadow: 0 3px 18px rgba(29, 11, 2, .88), 0 0 12px rgba(255, 206, 78, .55);
  transform: translate(-50%, -50%);
  white-space: nowrap;
  pointer-events: none;
  transition: opacity .28s ease, transform .28s ease;
}
.gift-scene--dragon .dragon-video-finale {
  opacity: 0;
  transform: translate(-50%, -50%) translateY(10px);
}
.gift-scene--dragon.is-video-finished .dragon-video-title {
  opacity: 0;
  transform: translate(-50%, -50%) translateY(-8px);
}
.gift-scene--dragon.is-video-finished .dragon-video-finale {
  opacity: 1;
  transform: translate(-50%, -50%);
}
.gift-scene--dragon .gift-effect-copy { z-index: 13; }
@media (max-width: 620px) {
  .gift-scene--dragon {
    width: 100vw;
    height: 78vh;
  }
  .gift-scene--dragon .dragon-video-title,
  .gift-scene--dragon .dragon-video-finale {
    top: 78%;
    max-width: calc(100vw - 20px);
    font-size: clamp(1.08rem, 6vw, 1.9rem);
    letter-spacing: .08em;
    white-space: normal;
  }
}

/* The supplied video carries its own dragon roar/music.  At the end of the
   clip the video disappears first; only then does the final caption settle in
   the exact centre of the stage. */
.gift-scene--dragon .giftfx-dragon-video {
  opacity: 1;
  visibility: visible;
  --dragon-edge-fade: 20px;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0, #000 var(--dragon-edge-fade), #000 calc(100% - var(--dragon-edge-fade)), transparent 100%),
    linear-gradient(to bottom, transparent 0, #000 var(--dragon-edge-fade), #000 calc(100% - var(--dragon-edge-fade)), transparent 100%);
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent 0, #000 var(--dragon-edge-fade), #000 calc(100% - var(--dragon-edge-fade)), transparent 100%),
    linear-gradient(to bottom, transparent 0, #000 var(--dragon-edge-fade), #000 calc(100% - var(--dragon-edge-fade)), transparent 100%);
  mask-repeat: no-repeat;
  mask-composite: intersect;
  transition: opacity .28s ease, visibility 0s linear 0s;
}
.gift-scene--dragon.is-video-ended .giftfx-dragon-video {
  opacity: 0;
  visibility: hidden;
  transition: opacity .28s ease, visibility 0s linear .28s;
}
.gift-scene--dragon .dragon-video-finale {
  top: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) translateY(10px);
}
.gift-scene--dragon.is-video-finished .dragon-video-finale {
  top: 50%;
  opacity: 1;
  transform: translate(-50%, -50%);
}
.gift-scene--dragon.is-video-finished .dragon-video-title {
  opacity: 0;
  transform: translate(-50%, -50%) translateY(-8px);
}
@media (max-width: 620px) {
  .gift-scene--dragon {
    /* Follow the actual fixed stage, including a shortened visual viewport.
       A 100vh minimum can put the bottom 20px mask below the visible screen. */
    width: 100%;
    height: 100%;
    min-height: 0;
    max-width: none;
    max-height: none;
  }
  .gift-scene--dragon .giftfx-dragon-video {
    /* Fill the phone viewport completely; the portrait source is selected by
       gift-effects.js, and cover prevents white/transparent letterboxing. */
    object-fit: cover;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: none;
  }
  .gift-scene--dragon .dragon-video-finale,
  .gift-scene--dragon.is-video-finished .dragon-video-finale {
    top: 50%;
  }
}

/* End card: a single restrained light wave closes the supplied footage.
   The clip is hidden first; the caption then rises from translucent to a
   high-contrast, fully readable state and remains on screen for the linger
   period controlled by gift-effects.js. */
.gift-scene--dragon .giftfx-dragon-outro {
  position: absolute;
  inset: -22%;
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 229, 145, .72) 0%, rgba(255, 174, 34, .32) 23%, rgba(255, 103, 18, .12) 44%, transparent 71%);
  mix-blend-mode: screen;
  filter: blur(14px);
  transform: scale(.42);
}
.gift-scene--dragon.is-video-ended .giftfx-dragon-outro {
  animation: dragon-light-wave 1.12s ease-out both;
}
.gift-scene--dragon.is-video-finished .dragon-video-finale {
  color: #fff9dc;
  font-size: clamp(1.5rem, 4.3vw, 3.4rem);
  letter-spacing: .14em;
  text-shadow: 0 4px 22px rgba(34, 10, 0, .96), 0 0 16px rgba(255, 207, 83, .78), 0 0 42px rgba(255, 165, 23, .5);
  animation: dragon-final-caption 1.08s ease-out .14s both;
}
@keyframes dragon-light-wave {
  0% { opacity: 0; transform: scale(.42); filter: blur(18px); }
  24% { opacity: .78; transform: scale(.74); filter: blur(10px); }
  58% { opacity: .42; transform: scale(1.06); filter: blur(7px); }
  100% { opacity: 0; transform: scale(1.34); filter: blur(3px); }
}
@keyframes dragon-final-caption {
  0% { opacity: .18; transform: translate(-50%, -50%) translateY(12px); }
  58% { opacity: .72; transform: translate(-50%, -50%) translateY(2px); }
  100% { opacity: 1; transform: translate(-50%, -50%); }
}
@media (max-width: 620px) {
  .gift-scene--dragon .dragon-video-finale,
  .gift-scene--dragon.is-video-finished .dragon-video-finale {
    /* Absolute left:50% plus auto width shrinks to half the screen and wraps
       the owner's eight-character end card. Give it the full safe line. */
    width: calc(100% - 24px);
    max-width: calc(100% - 24px);
    white-space: nowrap;
    font-size: clamp(1.2rem, 5.5vw, 1.6rem);
    letter-spacing: .08em;
  }
}
