body.gift-flow-open {
  overflow: hidden;
}

.form-shell {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: none;
  min-height: 0;
  overflow-y: auto;
  padding: 0;
  background: #fbfaf6;
  color: #1a1a1a;
}

.form-shell.is-active {
  display: block;
}

.form-shell .step-card {
  display: flex;
  width: min(100% - 2rem, 72rem);
  min-height: 100dvh;
  flex-direction: column;
  margin: 0 auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: calc(env(safe-area-inset-top, 0px) + 7.5rem) 0 env(safe-area-inset-bottom, 0px);
  box-shadow: none;
  backdrop-filter: none;
}

.form-shell .step-top {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .85rem;
  min-height: 5rem;
  margin: 0;
  border-bottom: 1px solid rgba(26, 26, 26, .08);
  background: #fbfaf6;
  padding: calc(env(safe-area-inset-top, 0px) + .55rem) max(1rem, calc((100vw - 72rem) / 2)) .55rem;
  box-shadow: 0 12px 32px rgba(26, 26, 26, .05);
}

.form-shell .back-button,
.form-shell .step-top .text-button {
  min-height: 2.75rem;
  border: 0;
  border-radius: .85rem;
  background: #f3f1ec;
  padding: 0 1rem;
  color: #454545;
  font-size: .84rem;
  font-weight: 700;
  text-decoration: none;
}

.form-shell .back-button:hover,
.form-shell .step-top .text-button:hover {
  background: #fdb8fb;
  color: #1a1a1a;
}

.form-shell .progress {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: .4rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.form-shell .progress-dot {
  display: flex;
  width: auto;
  min-width: 0;
  height: auto;
  min-height: 3.1rem;
  align-items: center;
  gap: .5rem;
  border-radius: .9rem;
  background: transparent;
  padding: .5rem .55rem;
  color: rgba(26, 26, 26, .55);
  transition: background .2s ease, color .2s ease;
}

.form-shell .progress-dot > span {
  display: grid;
  width: 1.85rem;
  height: 1.85rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #f0eee8;
  font-size: .72rem;
  font-weight: 800;
}

.form-shell .progress-dot strong {
  min-width: 0;
  overflow: hidden;
  font-size: .77rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.form-shell .progress-dot.is-active {
  background: #dfff6e;
  color: #1a1a1a;
}

.form-shell .progress-dot.is-active > span {
  background: #1a1a1a;
  color: #fff;
}

.form-shell .progress-dot.is-complete > span {
  background: #fdb8fb;
  color: #1a1a1a;
}

.form-shell .step {
  width: min(100%, 56rem);
  flex: 1;
  padding: 1.2rem 0 2rem;
}

.form-shell .step.is-active {
  display: block !important;
  animation: giftStepIn .25s ease both;
}

.form-shell .step-label {
  border-radius: 0;
  background: transparent;
  padding: 0;
  color: #444;
  font-size: .8rem;
  letter-spacing: 0;
}

.form-shell .step-title {
  max-width: none;
  margin: .55rem 0 0;
  font-size: clamp(2.15rem, 4vw, 3rem);
  font-weight: 850;
  line-height: 1.1;
}

.form-shell .step-subtitle {
  max-width: 42rem;
  margin: .8rem 0 0;
  color: #565656;
  font-size: 1rem;
}

.gift-design {
  max-width: 52rem;
  margin-top: 2rem;
}

.gift-design__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.gift-design__heading h3 { margin: 0; font-size: 1.12rem; font-weight: 800; }
.gift-design__count { color: #555; font-size: .88rem; font-weight: 800; white-space: nowrap; }

.gift-design__stage {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  width: min(100%, 35rem);
  margin: .55rem auto 0;
  overflow: hidden;
  outline: none;
  touch-action: pan-y;
}

.gift-design__stage:focus-visible { outline: 3px solid #fdb8fb; outline-offset: 2px; }
.gift-design__track { display: flex; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.gift-design__slide { flex: 0 0 100%; min-width: 0; padding: 1rem .7rem 1.3rem; }
.gift-design__float { animation: giftDesignFloat 5s ease-in-out infinite; }

.gift-design__card {
  position: relative;
  width: 100%;
  aspect-ratio: 1028 / 768;
  overflow: hidden;
  border: 2px solid #1a1a1a;
  border-radius: 1.25rem;
  background: #fff;
  box-shadow: .55rem .7rem 0 #fdb8fb, 0 18px 30px rgba(26, 26, 26, .1);
  transform: perspective(850px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transition: transform .4s cubic-bezier(.2, .8, .2, 1), box-shadow .25s ease;
  will-change: transform;
}

.gift-design__stage.is-tapped .gift-design__card { animation: giftDesignTap .6s ease; }
.gift-design__card img { display: block; width: 100%; height: 100%; object-fit: cover; user-select: none; pointer-events: none; }

.gift-design__shine {
  position: absolute;
  inset: -30%;
  background: linear-gradient(110deg, transparent 38%, rgba(255, 255, 255, .1) 46%, rgba(255, 255, 255, .72) 50%, rgba(255, 255, 255, .12) 54%, transparent 62%);
  mix-blend-mode: screen;
  pointer-events: none;
  transform: translateX(-120%) rotate(8deg);
  animation: giftDesignShine 4.5s ease-in-out infinite;
}

.gift-design__stamp,
.gift-design__brand {
  position: absolute;
  z-index: 1;
  border: 1px solid rgba(26, 26, 26, .15);
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
  padding: .4rem .65rem;
  color: #1a1a1a;
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: .04em;
  line-height: 1;
  box-shadow: 0 3px 12px rgba(26, 26, 26, .1);
  pointer-events: none;
}

.gift-design__stamp { top: .8rem; left: .8rem; }
.gift-design__brand { right: .8rem; bottom: .8rem; }
.gift-design__brand span { color: #a53691; }

.gift-design__controls {
  display: grid;
  width: min(100%, 26rem);
  grid-template-columns: 3.15rem minmax(0, 1fr) 3.15rem;
  gap: .65rem;
  margin: .1rem auto 0;
}

.gift-design__controls button {
  display: grid;
  min-height: 3.15rem;
  place-items: center;
  border: 2px solid #1a1a1a;
  border-radius: .85rem;
  background: #fff;
  color: #1a1a1a;
  font-weight: 850;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease;
}

.gift-design__controls button:hover { transform: translateY(-2px); }
.gift-design__controls button:focus-visible { outline: 3px solid #fdb8fb; outline-offset: 2px; }
.gift-design__controls .gift-design__arrow { font-size: 2rem; font-weight: 500; line-height: 1; }
.gift-design__controls .gift-design__choose { background: #dfff6e; font-size: .88rem; }
.gift-design__controls .gift-design__choose[aria-pressed="true"] { background: #fdb8fb; }
.gift-design__selected { min-height: 1.3rem; margin: .55rem 0 0; color: #444; font-size: .8rem; font-weight: 750; text-align: center; }
.gift-design > .field-error { margin-top: .6rem; text-align: center; }

@keyframes giftDesignFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes giftDesignShine {
  0%, 18% { transform: translateX(-120%) rotate(8deg); }
  46%, 100% { transform: translateX(120%) rotate(8deg); }
}

@keyframes giftDesignTap {
  0%, 100% { transform: perspective(850px) rotateX(0) rotateY(0) scale(1); }
  35% { transform: perspective(850px) rotateX(4deg) rotateY(-7deg) scale(.98); }
  65% { transform: perspective(850px) rotateX(-2deg) rotateY(5deg) scale(1.01); }
}

.form-shell .field-grid,
.form-shell .choice-grid {
  margin-top: 2rem;
}

.form-shell .field-grid {
  max-width: 52rem;
  gap: 1.35rem;
}

.form-shell .form-label {
  color: #1a1a1a;
  font-weight: 750;
}

.form-shell .field,
.form-shell .custom-select__trigger,
.form-shell .cc-country-trigger {
  min-height: 3.6rem;
  border: 2px solid rgba(26, 26, 26, .15);
  border-radius: .9rem;
  background: #fff;
}

.form-shell .cc-country-trigger { height: 3.6rem; }
.form-shell .field:focus,
.form-shell .custom-select.is-open .custom-select__trigger,
.form-shell .cc-country-picker.is-open .cc-country-trigger {
  border-color: #1a1a1a;
  box-shadow: 0 0 0 3px rgba(253, 184, 251, .55);
}

.form-shell textarea.field {
  min-height: 10rem;
  background: #fff;
}

.form-shell textarea.field:focus { min-height: 11rem; }

.form-shell .choice-grid {
  max-width: 52rem;
  gap: .7rem;
}

.form-shell .choice span {
  min-height: 4.9rem;
  border: 2px solid rgba(26, 26, 26, .13);
  border-radius: 1rem;
  box-shadow: none;
}

.form-shell .choice input:checked + span {
  border-color: #1a1a1a;
  transform: none;
}

.form-shell .choice:focus-within span {
  outline: 3px solid #fdb8fb;
  outline-offset: 2px;
}

.form-shell .payment-region-note {
  max-width: 52rem;
  border-radius: .8rem;
  background: #f3f1ec;
}

.form-shell .step-actions {
  position: sticky;
  bottom: 0;
  z-index: 15;
  width: 100%;
  justify-content: flex-end;
  margin-top: auto;
  border-top: 1px solid rgba(26, 26, 26, .1);
  background: #fbfaf6;
  padding: .85rem 0 calc(env(safe-area-inset-bottom, 0px) + .85rem);
}

.form-shell .step-actions .text-button {
  min-height: 3.5rem;
  padding: 0 1rem;
  color: #424242;
  text-decoration: none;
}

.form-shell .next-button,
.form-shell .submit-button {
  min-width: 13rem;
  min-height: 3.5rem;
  border-radius: 1rem;
  background: #dfff6e;
  color: #1a1a1a;
  box-shadow: none;
}

.form-shell .next-button:hover,
.form-shell .submit-button:hover {
  box-shadow: 0 8px 22px rgba(26, 26, 26, .12);
}

.form-shell .error-box {
  max-width: 52rem;
  border-radius: .8rem;
}

.gift-review {
  display: grid;
  max-width: 52rem;
  gap: 0;
  margin: 2rem 0 0;
  border-top: 1px solid #d4d2cc;
}

.gift-review > div {
  display: grid;
  grid-template-columns: minmax(11rem, .55fr) minmax(0, 1fr);
  gap: 1rem;
  border-bottom: 1px solid #d4d2cc;
  padding: .85rem 0;
}

.gift-review dt { color: #565656; font-size: .88rem; }
.gift-review dd { min-width: 0; margin: 0; overflow-wrap: anywhere; font-weight: 800; }
.gift-review__note { max-width: 46rem; margin: 1.4rem 0 0; color: #565656; font-size: .9rem; line-height: 1.55; }

@keyframes giftStepIn {
  from { opacity: 0; transform: translateX(.7rem); }
  to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 900px) {
  .form-shell .step-card { padding-top: calc(env(safe-area-inset-top, 0px) + 7.1rem); }
  .form-shell .step-top {
    grid-template-columns: auto 1fr auto;
    gap: .3rem .7rem;
    padding: calc(env(safe-area-inset-top, 0px) + .35rem) .75rem .45rem;
  }
  .form-shell .progress {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: center;
    gap: clamp(.25rem, 3vw, .8rem);
  }
  .form-shell .progress-dot { justify-content: center; min-height: 2.3rem; padding: 0; }
  .form-shell .progress-dot > span { width: 2.3rem; height: 2.3rem; font-size: .82rem; }
  .form-shell .progress-dot strong { display: none; }
  .form-shell .back-button { grid-column: 1; grid-row: 1; }
  .form-shell .step-top .text-button { grid-column: 3; grid-row: 1; }
}

@media (max-width: 680px) {
  .form-shell .step-card { width: min(100% - 2rem, 72rem); padding-top: calc(env(safe-area-inset-top, 0px) + 7.1rem); }
  .form-shell .back-button,
  .form-shell .step-top .text-button { min-height: 2rem; border-radius: 999px; background: transparent; padding: 0 .5rem; font-size: .74rem; }
  .form-shell .step { padding-top: .85rem; }
  .form-shell .step-title { font-size: clamp(2.1rem, 8vw, 2.7rem); }
  .form-shell .step-subtitle { font-size: .9rem; }
  .form-shell .field-grid.two { grid-template-columns: 1fr; }
  .form-shell .step-actions { flex-direction: row; align-items: center; gap: .5rem; }
  .form-shell .next-button,
  .form-shell .submit-button { width: auto; min-width: 0; flex: 1; }
  .gift-review > div { grid-template-columns: 1fr; gap: .15rem; }
  .form-shell .choice span { padding: .7rem; }
  .gift-design { margin-top: 1.5rem; }
  .gift-design__slide { padding: .75rem .5rem 1rem; }
  .gift-design__card { border-radius: .9rem; box-shadow: .3rem .4rem 0 #fdb8fb, 0 9px 18px rgba(26, 26, 26, .12); }
  .gift-design__stamp, .gift-design__brand { padding: .3rem .45rem; font-size: .5rem; }
  .gift-design__stamp { top: .5rem; left: .5rem; }
  .gift-design__brand { right: .5rem; bottom: .5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .form-shell .step.is-active { animation: none; }
  .gift-design__float, .gift-design__shine, .gift-design__stage.is-tapped .gift-design__card { animation: none; }
  .gift-design__track, .gift-design__card { transition: none; }
}
