#live .theme-adaptation-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.86fr) minmax(0, 1fr);
  gap: 14px;
}

#live .theme-suite .theme-accessories {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: minmax(min-content, 1fr) auto;
  grid-template-areas:
    "envelope invite"
    "gifts gifts";
  gap: 10px;
  min-width: 0;
}

#live .theme-keepsake {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  padding: 11px 8px;
  border: 1px solid #c7a1714d;
  border-radius: 13px;
  background: linear-gradient(148deg, #fffaf1b8, #f4e1c78a);
  text-align: center;
}

#live .theme-keepsake h3 {
  margin: 0;
  color: #88392c;
  font-size: 14px;
  line-height: 1.45;
}

#live .theme-keepsake p {
  margin: 4px 0 0;
  color: #765a46;
  font-size: 11px;
  line-height: 1.5;
}

#live .theme-keepsake-envelope {
  grid-area: envelope;
  gap: 12px;
}

#live .theme-keepsake-gifts {
  grid-area: gifts;
}

#live .theme-keepsake-invite {
  grid-area: invite;
}

#live .theme-keepsake .theme-envelope:focus-visible {
  outline: 2px solid #b55a3b;
  outline-offset: 4px;
}

#live .theme-gift-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 5px;
  width: min(100%, 350px);
}

#live .theme-gift-list figure {
  position: relative;
  margin: 0;
}

#live .theme-gift-list img {
  display: block;
  width: min(100%, 78px);
  height: auto;
  margin-inline: auto;
  transform-origin: 50% 83%;
}

#live .theme-gift-list figcaption {
  margin-top: 3px;
  color: #694a38;
  font-size: 12px;
  line-height: 1.45;
}

#live .theme-invite-art {
  display: block;
  width: min(100%, 88px);
  height: auto;
  border: 1px solid #e3b97c;
  border-radius: 5px;
  box-shadow: 0 5px 12px #67150f22;
}

@media (min-width: 921px) {
  #live .theme-adaptation-shell {
    gap: 16px;
  }

  #live .theme-invite-art {
    width: min(100%, clamp(88px, 14svh, 104px));
  }

  #live .theme-gift-list img {
    width: min(100%, clamp(78px, 12svh, 92px));
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  #live .theme-invite-art {
    transition: transform .28s cubic-bezier(.2, .65, .3, 1);
  }

  #live .theme-keepsake-invite:hover .theme-invite-art {
    transform: scale(1.06);
  }
}

@media (max-width: 920px) {
  #live .theme-adaptation-shell {
    max-width: 720px;
    grid-template-columns: minmax(0, 1fr);
  }

  #live .theme-suite .theme-accessories {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.75fr) minmax(0, 1fr);
    grid-template-rows: auto;
    grid-template-areas: "envelope gifts invite";
  }
}

@media (max-width: 560px) {
  #live .theme-suite .theme-accessories {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "envelope invite"
      "gifts gifts";
  }
}

/* 保留图标的静止构图，悬停时取原版动画中最容易辨认的动作。 */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  #live .theme-gift-list [data-gift="fortune"]:hover img {
    animation: gift-hop .64s ease-out;
  }

  #live .theme-gift-list [data-gift="ingot"]:hover img {
    animation: gift-float .78s ease-in-out;
  }

  #live .theme-gift-list [data-gift="trio"]:hover img {
    animation: gift-rise .82s ease-in-out;
  }

  #live .theme-gift-list :is([data-gift="ingot"], [data-gift="trio"])::after,
  #live .theme-gift-list [data-gift="trio"]::before {
    content: "";
    position: absolute;
    z-index: 1;
    width: 13px;
    aspect-ratio: 1;
    top: 10px;
    right: 17%;
    background: #e8ad3f;
    clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
    opacity: 0;
    pointer-events: none;
  }

  #live .theme-gift-list [data-gift="trio"]::before {
    right: auto;
    left: 16%;
    top: 20px;
    width: 10px;
  }

  #live .theme-gift-list :is([data-gift="ingot"], [data-gift="trio"]):hover::after {
    animation: gift-spark .54s .14s ease-out;
  }

  #live .theme-gift-list [data-gift="trio"]:hover::before {
    animation: gift-spark .49s .27s ease-out;
  }
}

@keyframes gift-hop {

  0%,
  100% {
    transform: none;
  }

  16% {
    transform: scale(1.045, .95);
  }

  44% {
    transform: translateY(-10px) rotate(-4deg) scale(.99, 1.04);
  }

  74% {
    transform: scale(1.035, .96);
  }
}

@keyframes gift-float {

  0%,
  100% {
    transform: none;
  }

  48% {
    transform: translate(3px, -8px) rotate(5deg);
  }

  76% {
    transform: translate(-1px, -2px) rotate(-2deg);
  }
}

@keyframes gift-rise {

  0%,
  100% {
    transform: none;
  }

  42% {
    transform: translateY(-7px) scale(1.05);
  }

  70% {
    transform: translateY(-3px) scale(1.02);
  }
}

@keyframes gift-spark {

  0%,
  100% {
    opacity: 0;
    transform: translateY(4px) scale(.25);
  }

  35% {
    opacity: 1;
    transform: translateY(-2px) scale(1.12);
  }
}