.psg-gift-page { margin: 0; }
#psg-gift-preview { height: 100vh; height: 100dvh; }
.psg-gift-root {
  --psg-gift-script: STXingkai, "华文行楷", "Kaiti SC", STKaiti, KaiTi, "楷体", serif;
  position: relative; isolation: isolate; container-type: size;
  width: 100%; height: 100%; display: grid; place-items: center; overflow: hidden;
  color: #51342b; font-family: var(--psg-gift-script);
}
.psg-gift-root *, .psg-gift-root *::before { box-sizing: border-box; }
.psg-gift-root [hidden] { display: none !important; }
.psg-gift-background {
  position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%;
  object-fit: cover; pointer-events: none;
}
.psg-gift-stage {
  position: relative; display: grid; align-items: center;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); column-gap: 7%;
  width: min(100cqw, 177.778cqh); height: min(100cqh, 56.25cqw);
  padding: min(3cqw, 5.33cqh) min(8.5cqw, 15.11cqh) 0;
}
.psg-gift-flags {
  position: absolute; top: 0; right: 1.6%; width: 25.8%; height: auto; pointer-events: none;
}
.psg-gift-figure {
  position: relative; grid-area: 1 / 1; margin: 0; width: 100%; aspect-ratio: 785 / 724;
  transform-origin: 50% 78%;
  filter: drop-shadow(0 min(.48cqw, .86cqh) min(.49cqw, .88cqh) #6445313b);
}
.psg-gift-art {
  position: absolute; display: block; left: -17.58%; top: -18.37%; width: 213%;
  height: auto; max-width: none; pointer-events: none;
  /* The outline follows the artwork on the 1672 × 941 source, leaving the baked-in paper outside it. */
  clip-path: polygon(
    25.42% 14.03%, 27.09% 14.35%, 28.89% 16.15%, 30.56% 19.55%, 31.28% 22.00%, 31.70% 24.23%,
    35.35% 24.34%, 36.60% 20.51%, 37.68% 18.38%, 38.70% 16.90%, 40.79% 15.09%, 42.52% 14.98%,
    44.38% 16.68%, 47.01% 20.51%, 47.49% 22.42%, 47.49% 24.44%, 47.19% 25.93%, 47.25% 26.46%,
    54.25% 27.31%, 54.96% 27.74%, 55.20% 28.37%, 55.26% 60.89%, 55.14% 73.11%, 54.90% 74.60%,
    54.19% 75.56%, 54.13% 76.30%, 53.77% 76.73%, 53.53% 77.68%, 52.99% 78.00%, 52.63% 79.28%,
    52.39% 79.28%, 52.21% 79.91%, 51.73% 80.34%, 51.73% 80.87%, 51.38% 80.98%, 51.08% 81.51%,
    50.84% 82.57%, 50.06% 83.42%, 50.00% 83.95%, 49.22% 85.12%, 48.98% 86.18%, 48.50% 86.29%,
    48.50% 87.25%, 48.33% 87.57%, 47.97% 87.57%, 47.91% 88.31%, 47.73% 88.31%, 47.55% 88.95%,
    47.07% 89.16%, 46.53% 90.22%, 46.05% 90.44%, 45.93% 90.86%, 44.14% 91.18%, 43.78% 90.86%,
    43.12% 90.86%, 43.06% 91.07%, 42.40% 90.86%, 40.13% 90.97%, 40.07% 90.65%, 39.59% 90.65%,
    39.53% 91.07%, 39.23% 91.07%, 39.17% 90.65%, 38.76% 90.54%, 35.71% 90.33%, 35.47% 90.54%,
    32.78% 90.54%, 32.48% 90.22%, 32.12% 90.44%, 30.44% 90.22%, 30.38% 90.65%, 30.08% 90.65%,
    29.72% 90.01%, 24.10% 89.80%, 23.27% 89.48%, 22.67% 89.59%, 22.61% 89.16%, 22.13% 89.16%,
    22.01% 89.59%, 21.59% 89.59%, 20.39% 89.37%, 20.33% 89.05%, 19.80% 88.95%, 18.72% 89.27%,
    18.66% 89.05%, 18.06% 89.16%, 18.00% 88.95%, 16.21% 88.63%, 14.59% 88.84%, 14.29% 88.52%,
    13.28% 88.42%, 12.74% 88.63%, 10.65% 88.52%, 10.05% 88.10%, 9.15% 88.20%, 8.31% 86.93%,
    8.19% 48.35%, 8.37% 40.28%, 8.55% 39.64%, 9.69% 37.73%, 12.80% 33.69%, 13.28% 32.41%,
    16.33% 29.01%, 17.05% 28.69%, 19.08% 26.78%, 19.20% 26.04%, 19.02% 25.29%, 18.96% 22.85%,
    19.08% 22.00%, 19.74% 20.09%, 20.75% 18.49%, 22.55% 16.58%, 22.97% 15.83%, 24.22% 14.67%
  );
}
.psg-gift-message {
  position: relative; grid-area: 1 / 2; top: -5%; margin: 0;
  font-size: min(4.08cqw, 7.25cqh); line-height: 1.57; font-weight: 400; letter-spacing: .038em;
}
.psg-gift-message span { display: block; white-space: nowrap; }
.psg-gift-message:focus { outline: none; }
.psg-gift-notice {
  position: absolute; right: 5.1%; bottom: max(5.3%, env(safe-area-inset-bottom));
  padding: .45em .7em .5em; border: 1px solid #d1b59e; border-radius: 3px 5px 4px 5px;
  background-color: #fff2de; color: #634034; box-shadow: 2px 4px 9px #63433132;
  font: 400 clamp(17px, min(2.18cqw, 3.87cqh), 36px)/1.3 var(--psg-gift-script);
  transform: rotate(-1.6deg); cursor: pointer; touch-action: manipulation;
}
.psg-gift-notice:hover:enabled { transform: rotate(-.6deg) translateY(-2px); }
.psg-gift-notice:active:enabled { transform: rotate(-1deg) scale(.978); }
.psg-gift-notice:disabled { cursor: default; }
.psg-gift-notice:focus-visible { outline: 2px dashed #8b5542; outline-offset: 4px; }
@container (max-aspect-ratio: 1/1) {
  .psg-gift-stage {
    width: 100%; height: 100%; padding: 0 5%; grid-template-columns: minmax(0, 1.14fr) minmax(0, 1fr); column-gap: 4%;
  }
  .psg-gift-flags { width: 40%; right: 3%; top: max(1%, env(safe-area-inset-top)); }
  .psg-gift-message { top: -1%; font-size: clamp(14px, 5cqw, 42px); }
  .psg-gift-notice { bottom: max(9%, env(safe-area-inset-bottom)); right: 6%; }
}
