

.gifts__head {
  margin: 0 0 var(--sp-1);
  font-size: var(--fs-small);
  line-height: 1.35;
  color: var(--c-graphite-soft);
}

.gifts__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(8px, 1.2vw, 16px);
}

.gift {
  --gift-bg: #D9DCDA;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  background: var(--gift-bg);
  border: 1px dashed var(--c-gold-soft);
  border-radius: clamp(8px, .8vw, 12px);
  transition: border-color .3s ease, background-color .3s ease;
}

.gift__pic {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
}

.gift__pic picture {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: 50% 100%;
}
.gift__pic img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: grayscale(1) contrast(1.25);
  opacity: .75;
  transition: filter .35s ease, opacity .35s ease, transform .35s cubic-bezier(.34, 1.56, .64, 1);
}

.gifts:not(.is-open) .gift__pic picture { animation: gift-hop 4s ease-in-out infinite; }
.gifts:not(.is-open) .gift + .gift .gift__pic picture { animation-delay: .18s; }
@keyframes gift-hop {
  0%, 76%, 100% { transform: translateY(0) scale(1, 1); }
  80%           { transform: translateY(0) scale(1.07, .9); }
  85%           { transform: translateY(-16%) scale(.96, 1.05); }
  90%           { transform: translateY(0) scale(1.05, .94); }
  94%           { transform: translateY(-5%) scale(1, 1); }
  97%           { transform: translateY(0) scale(1, 1); }
}

@media (hover: hover) and (pointer: fine) {
  .gifts:not(.is-open) .gift:hover .gift__pic picture { animation: none; }
  .gifts:not(.is-open) .gift:hover .gift__pic img {
    filter: none;
    opacity: 1;
    transform: scale(1.14);
  }
}

.gift__lock {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--c-graphite);
  color: var(--c-gold-soft);
  transition: background-color .3s ease, color .3s ease, box-shadow .3s ease;
}

.gift__lock svg { width: 20px; height: 20px; overflow: visible; stroke-width: 2.1; }

.gift__pic .gift__lock {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 24px;
  height: 24px;
  box-shadow: 0 0 0 2px var(--gift-bg);
}
.gift__pic .gift__lock svg { width: 15px; height: 15px; }

.gift__shackle {
  transform-box: view-box;
  transform-origin: 15.5px 11px;
  transition: transform .5s cubic-bezier(.34, 1.56, .64, 1);
}

.gift__text { display: grid; gap: 2px; min-width: 0; }
.gift__title {
  font-size: var(--fs-small);
  font-weight: 600;
  line-height: 1.25;
  color: var(--c-graphite);

  overflow-wrap: anywhere;
}
.gift__note {
  font-size: .8125rem;
  line-height: 1.35;
  color: var(--c-graphite-soft);
}

.gifts.is-open .gift {
  --gift-bg: #F9F3EA;
  border-style: solid;
  border-color: var(--c-gold);
}
.gifts.is-open .gift__pic img { filter: none; opacity: 1; }
.gifts.is-open .gift__lock { background: var(--c-green); color: var(--c-on-dark); }
.gifts.is-open .gift__shackle { transform: rotate(32deg); }

.gifts.is-opening .gift { animation: gift-open .7s ease both; }
.gifts.is-opening .gift + .gift { animation-delay: .14s; }
@keyframes gift-open {
  0%   { transform: scale(1);    box-shadow: 0 0 0 0 rgba(198, 147, 75, .5); }
  35%  { transform: scale(1.03); }
  100% { transform: scale(1);    box-shadow: 0 0 0 14px rgba(198, 147, 75, 0); }
}

.gifts.is-nudge .gift__lock { animation: gift-nudge .6s ease; }
.gifts.is-nudge .gift + .gift .gift__lock { animation-delay: .1s; }
@keyframes gift-nudge {
  0%, 100% { transform: rotate(0); }
  20%      { transform: rotate(-14deg); }
  40%      { transform: rotate(11deg); }
  60%      { transform: rotate(-7deg); }
  80%      { transform: rotate(3deg); }
}

@media (prefers-reduced-motion: reduce) {
  .gift,
  .gift__lock,
  .gift__pic img,
  .gift__shackle { transition: none; }
  .gifts.is-opening .gift,
  .gifts.is-nudge .gift__lock,
  .gifts:not(.is-open) .gift__pic picture { animation: none; }
  .gifts:not(.is-open) .gift:hover .gift__pic img { transform: none; }
}
