:root {
  color-scheme: dark;
  background: #000;
}

.blessing-overlay {
  top: 48%;
  width: min(92%, 900px);
}

.blessing-heart {
  display: none;
  margin: 0 auto 10px;
  color: #fff4fb;
  font-family: "ZCOOL KuaiLe Local", "Arial Rounded MT Bold", system-ui, sans-serif;
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 900;
  line-height: 1;
  -webkit-text-stroke: 2px rgba(255, 116, 188, 0.86);
  text-shadow:
    0 0 8px rgba(255, 255, 255, 0.96),
    0 0 22px rgba(255, 148, 211, 0.84),
    0 0 48px rgba(255, 75, 169, 0.58);
}

.blessing-card {
  display: grid;
  width: min(86vw, 760px);
  margin: 0 auto;
  gap: clamp(6px, 1.1vw, 13px);
  justify-items: start;
}

.blessing-line {
  max-width: 100%;
  font-family: "ZCOOL KuaiLe Local", "YouYuan", "Microsoft YaHei UI", system-ui, sans-serif;
  font-size: clamp(17px, 3.05vw, 34px);
  line-height: 1.16;
  white-space: nowrap;
  transform: scaleX(1.04);
  -webkit-text-stroke: 1px rgba(255, 126, 198, 0.95);
  filter:
    drop-shadow(0 3px 0 rgba(211, 76, 153, 0.5))
    drop-shadow(0 9px 14px rgba(255, 87, 176, 0.36));
  text-shadow:
    0 0 4px rgba(255, 255, 255, 1),
    0 0 14px rgba(255, 174, 223, 0.78),
    0 0 32px rgba(255, 92, 181, 0.38);
}

.blessing-left {
  justify-self: start;
  margin-left: min(4vw, 34px);
}

.blessing-center {
  justify-self: center;
  margin-top: clamp(8px, 1.7vw, 20px);
}

.blessing-mid {
  justify-self: center;
  margin-top: clamp(4px, 1.2vw, 14px);
}

.blessing-left-soft {
  justify-self: start;
  margin-left: min(7vw, 64px);
  margin-top: clamp(12px, 2vw, 24px);
}

.blessing-right {
  justify-self: start;
  margin-left: min(34vw, 286px);
}

.blessing-end {
  justify-self: start;
  margin-left: min(8vw, 70px);
  margin-top: clamp(12px, 2vw, 24px);
  font-size: clamp(14px, 2.45vw, 27px);
  -webkit-text-stroke-color: rgba(120, 202, 255, 0.72);
  background: linear-gradient(180deg, #f6fcff 0%, #cdefff 38%, #8fd4ff 70%, #58a9f7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter:
    drop-shadow(0 3px 0 rgba(39, 98, 158, 0.32))
    drop-shadow(0 7px 10px rgba(80, 176, 255, 0.18));
  text-shadow:
    0 0 3px rgba(235, 250, 255, 0.6),
    0 0 10px rgba(124, 208, 255, 0.36),
    0 0 20px rgba(74, 154, 255, 0.18);
}

.blessing-end::before {
  -webkit-text-stroke-color: rgba(210, 241, 255, 0.52);
}

.blessing-end::after {
  -webkit-text-stroke-color: rgba(74, 154, 255, 0.22);
}

.blessing-line::before {
  -webkit-text-stroke: 7px rgba(255, 232, 248, 0.94);
  filter:
    blur(0.2px)
    drop-shadow(0 0 8px rgba(255, 255, 255, 0.9))
    drop-shadow(0 0 18px rgba(255, 145, 208, 0.56));
}

.blessing-line::after {
  -webkit-text-stroke: 11px rgba(255, 99, 181, 0.48);
  filter: blur(0.9px);
}

.blessing-to,
.blessing-title {
  font-size: clamp(20px, 3.55vw, 40px);
}

.blessing-to {
  -webkit-text-stroke-color: rgba(255, 155, 132, 0.98);
  background: linear-gradient(180deg, #ffffff 0%, #fff8d8 32%, #ffd98f 66%, #ffad75 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter:
    drop-shadow(0 3px 0 rgba(214, 99, 87, 0.46))
    drop-shadow(0 9px 14px rgba(255, 127, 156, 0.32));
  text-shadow:
    0 0 4px rgba(255, 255, 255, 1),
    0 0 16px rgba(255, 225, 148, 0.78),
    0 0 34px rgba(255, 119, 164, 0.38);
}

.blessing-to::before {
  -webkit-text-stroke-color: rgba(255, 243, 213, 0.98);
}

.blessing-to::after {
  -webkit-text-stroke-color: rgba(255, 145, 117, 0.58);
}

.blessing-small {
  font-size: clamp(15px, 2.5vw, 29px);
}

.blessing-indent {
  padding-left: min(20vw, 180px);
}

.blessing-icon {
  -webkit-text-fill-color: currentColor;
  -webkit-text-stroke: 0;
  background: none;
  filter: none;
}

@media (orientation: landscape) and (max-height: 480px) {
  .stage {
    width: 100vw;
    height: 100svh;
    max-height: none;
    aspect-ratio: auto;
  }

  .gift-title {
    top: 76%;
    font-size: clamp(25px, 4.2vw, 36px);
    -webkit-text-stroke-width: 1.3px;
    letter-spacing: 0;
  }

  .gesture-status {
    top: max(8px, env(safe-area-inset-top));
    min-width: 86px;
    padding: 6px 12px;
    font-size: 12px;
  }

  .camera-btn {
    right: max(12px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    min-height: 32px;
    padding: 0 12px;
    font-size: 12px;
  }

  .blessing-overlay {
    top: 51%;
    width: 100%;
    padding: 0 max(18px, env(safe-area-inset-left)) 0 max(18px, env(safe-area-inset-right));
  }

  .blessing-card {
    width: min(720px, calc(100vw - 80px));
    gap: 10px;
    justify-items: start;
  }

  .blessing-line {
    font-size: clamp(17px, 2.55vw, 23px);
    line-height: 1.06;
    transform: none;
    -webkit-text-stroke-width: 0.75px;
    filter:
      drop-shadow(0 2px 0 rgba(166, 48, 118, 0.3))
      drop-shadow(0 5px 8px rgba(255, 87, 176, 0.14));
    text-shadow:
      0 0 2px rgba(255, 244, 250, 0.48),
      0 0 7px rgba(255, 151, 210, 0.26),
      0 0 13px rgba(255, 92, 181, 0.12);
  }

  .blessing-line::before {
    -webkit-text-stroke-width: 4px;
    filter:
      blur(0.15px)
      drop-shadow(0 0 4px rgba(255, 230, 245, 0.3))
      drop-shadow(0 0 8px rgba(255, 145, 208, 0.18));
  }

  .blessing-line::after {
    -webkit-text-stroke-width: 7px;
    filter: blur(0.5px);
  }

  .blessing-to,
  .blessing-title {
    font-size: clamp(20px, 3.1vw, 28px);
  }

  .blessing-small {
    font-size: clamp(15px, 2.25vw, 20px);
  }

  .blessing-left {
    margin-left: 84px;
  }

  .blessing-center {
    justify-self: start;
    margin-top: 8px;
    margin-left: 280px;
  }

  .blessing-mid {
    justify-self: start;
    margin-top: 2px;
    margin-left: 210px;
  }

  .blessing-left-soft {
    margin-top: 10px;
    margin-left: 112px;
  }

  .blessing-right {
    justify-self: start;
    margin-left: 355px;
    margin-right: 0;
  }

  .blessing-end {
    margin-top: 11px;
    margin-left: 130px;
    font-size: clamp(14px, 2.05vw, 18px);
  }
}

.gesture-status,
#cameraFeed,
.stage.camera-on .camera-btn {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.blessing-card {
  position: relative;
}

.blessing-line {
  -webkit-text-stroke-color: rgba(255, 122, 190, 0.58);
  filter:
    drop-shadow(0 2px 0 rgba(134, 36, 98, 0.3))
    drop-shadow(0 5px 8px rgba(255, 84, 174, 0.12));
  text-shadow:
    0 0 2px rgba(255, 234, 246, 0.42),
    0 0 7px rgba(255, 135, 200, 0.24),
    0 0 14px rgba(255, 74, 169, 0.1);
}

.blessing-line::before {
  -webkit-text-stroke-color: rgba(255, 201, 232, 0.42);
  filter:
    blur(0.15px)
    drop-shadow(0 0 4px rgba(255, 220, 240, 0.24))
    drop-shadow(0 0 8px rgba(255, 120, 200, 0.16));
}

.blessing-line::after {
  -webkit-text-stroke-color: rgba(255, 82, 174, 0.14);
  filter: blur(0.5px);
}

.blessing-end {
  color: #b9e8ff;
  -webkit-text-stroke-color: rgba(92, 190, 255, 0.58);
  background: linear-gradient(180deg, #f5fcff 0%, #bfeeff 42%, #78ceff 72%, #4fa5f4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  font-size: clamp(14px, 2.35vw, 25px);
  filter:
    drop-shadow(0 2px 0 rgba(40, 92, 142, 0.28))
    drop-shadow(0 5px 8px rgba(88, 190, 255, 0.12));
  text-shadow:
    0 0 2px rgba(230, 250, 255, 0.42),
    0 0 7px rgba(110, 210, 255, 0.26),
    0 0 14px rgba(78, 150, 255, 0.12);
}

.blessing-end::before {
  -webkit-text-stroke-color: rgba(205, 240, 255, 0.38);
}

.blessing-end::after {
  -webkit-text-stroke-color: rgba(68, 150, 255, 0.14);
}

.blessing-deco {
  position: absolute;
  z-index: 2;
  font-family: "ZCOOL KuaiLe Local", "Arial Rounded MT Bold", system-ui, sans-serif;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
  opacity: 0.92;
}

.deco-heart {
  color: #ff9fcf;
  -webkit-text-stroke: 2px rgba(255, 237, 246, 0.78);
  text-shadow:
    0 0 6px rgba(255, 232, 244, 0.62),
    0 0 14px rgba(255, 108, 184, 0.32);
}

.deco-star {
  color: #ffe7a9;
  -webkit-text-stroke: 1px rgba(255, 248, 220, 0.68);
  text-shadow:
    0 0 5px rgba(255, 247, 220, 0.58),
    0 0 12px rgba(255, 196, 88, 0.28);
}

.deco-heart-a {
  left: 30px;
  top: 118px;
  font-size: 24px;
  transform: rotate(-12deg);
}

.deco-heart-b {
  right: 40px;
  top: 18px;
  font-size: 28px;
  transform: rotate(10deg);
}

.deco-star-a {
  left: 236px;
  top: 6px;
  font-size: 24px;
}

.deco-star-b {
  right: 88px;
  bottom: 34px;
  font-size: 18px;
}

@media (orientation: landscape) and (max-height: 480px) {
  .blessing-line {
    filter:
      drop-shadow(0 2px 0 rgba(134, 36, 98, 0.26))
      drop-shadow(0 4px 7px rgba(255, 84, 174, 0.1));
    text-shadow:
      0 0 2px rgba(255, 234, 246, 0.36),
      0 0 6px rgba(255, 135, 200, 0.2),
      0 0 11px rgba(255, 74, 169, 0.08);
  }

  .blessing-end {
    font-size: clamp(14px, 2.05vw, 18px);
  }

  .deco-heart-a {
    left: 64px;
    top: 110px;
    font-size: 19px;
  }

  .deco-heart-b {
    right: 92px;
    top: 20px;
    font-size: 22px;
  }

  .deco-star-a {
    left: 236px;
    top: 0;
    font-size: 20px;
  }

  .deco-star-b {
    right: 148px;
    bottom: 30px;
    font-size: 15px;
  }
}

.stage.blessing-scene .gesture-status,
.stage.blessing-scene .camera-btn,
.stage.blessing-scene #cameraFeed {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@media (orientation: landscape) and (max-height: 480px) {
  .stage {
    width: 100vw;
    height: 100svh;
    max-height: none;
    aspect-ratio: auto;
  }

  .gift-title {
    top: 76%;
    font-size: clamp(25px, 4.2vw, 36px);
    -webkit-text-stroke-width: 1.3px;
    letter-spacing: 0;
  }

  .gesture-status {
    top: max(8px, env(safe-area-inset-top));
    min-width: 86px;
    padding: 6px 12px;
    font-size: 12px;
  }

  .camera-btn {
    right: max(12px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    min-height: 32px;
    padding: 0 12px;
    font-size: 12px;
  }

  .blessing-overlay {
    top: 51%;
    width: 100%;
    padding: 0 max(18px, env(safe-area-inset-left)) 0 max(18px, env(safe-area-inset-right));
  }

  .blessing-card {
    width: min(720px, calc(100vw - 80px));
    gap: 10px;
    justify-items: start;
  }

  .blessing-line {
    font-size: clamp(17px, 2.55vw, 23px);
    line-height: 1.06;
    transform: none;
    -webkit-text-stroke-width: 0.75px;
    filter:
      drop-shadow(0 2px 0 rgba(166, 48, 118, 0.3))
      drop-shadow(0 5px 8px rgba(255, 87, 176, 0.14));
    text-shadow:
      0 0 2px rgba(255, 244, 250, 0.48),
      0 0 7px rgba(255, 151, 210, 0.26),
      0 0 13px rgba(255, 92, 181, 0.12);
  }

  .blessing-line::before {
    -webkit-text-stroke-width: 4px;
    filter:
      blur(0.15px)
      drop-shadow(0 0 4px rgba(255, 230, 245, 0.3))
      drop-shadow(0 0 8px rgba(255, 145, 208, 0.18));
  }

  .blessing-line::after {
    -webkit-text-stroke-width: 7px;
    filter: blur(0.5px);
  }

  .blessing-to,
  .blessing-title {
    font-size: clamp(20px, 3.1vw, 28px);
  }

  .blessing-small {
    font-size: clamp(15px, 2.25vw, 20px);
  }

  .blessing-left {
    margin-left: 84px;
  }

  .blessing-center {
    justify-self: start;
    margin-top: 8px;
    margin-left: 280px;
  }

  .blessing-mid {
    justify-self: start;
    margin-top: 2px;
    margin-left: 210px;
  }

  .blessing-left-soft {
    margin-top: 10px;
    margin-left: 112px;
  }

  .blessing-right {
    justify-self: start;
    margin-left: 355px;
    margin-right: 0;
  }

  .blessing-end {
    margin-top: 11px;
    margin-left: 130px;
    font-size: clamp(14px, 2.05vw, 18px);
  }
}

@media (max-width: 759px), (hover: none) and (pointer: coarse) {
  .gift-title {
    top: 77%;
    font-size: clamp(28px, 8.4vw, 36px);
    -webkit-text-stroke-width: 1.4px;
    letter-spacing: 0;
    filter:
      drop-shadow(0 3px 0 rgba(166, 88, 56, 0.28))
      drop-shadow(0 0 10px rgba(255, 185, 54, 0.22));
  }

  .blessing-overlay {
    top: 50%;
    width: 100%;
    padding: 0 14px;
  }

  .blessing-card {
    width: min(350px, calc(100vw - 28px));
    gap: 15px;
    justify-items: start;
  }

  .blessing-line {
    font-size: 18px;
    line-height: 1.12;
    transform: none;
    -webkit-text-stroke-width: 0.8px;
    filter:
      drop-shadow(0 2px 0 rgba(166, 48, 118, 0.34))
      drop-shadow(0 5px 8px rgba(255, 87, 176, 0.15));
    text-shadow:
      0 0 2px rgba(255, 244, 250, 0.52),
      0 0 7px rgba(255, 151, 210, 0.3),
      0 0 14px rgba(255, 92, 181, 0.13);
  }

  .blessing-line::before {
    -webkit-text-stroke-width: 4px;
    filter:
      blur(0.2px)
      drop-shadow(0 0 4px rgba(255, 230, 245, 0.34))
      drop-shadow(0 0 8px rgba(255, 145, 208, 0.2));
  }

  .blessing-line::after {
    -webkit-text-stroke-width: 7px;
    filter: blur(0.55px);
  }

  .blessing-to,
  .blessing-title {
    font-size: 23px;
  }

  .blessing-small {
    font-size: 16px;
  }

  .blessing-left {
    justify-self: start;
    margin-left: 10px;
  }

  .blessing-center {
    justify-self: start;
    margin-top: 11px;
    margin-left: 112px;
  }

  .blessing-mid {
    justify-self: start;
    margin-top: 2px;
    margin-left: 50px;
  }

  .blessing-left-soft {
    justify-self: start;
    margin-top: 15px;
    margin-left: 0;
  }

  .blessing-right {
    justify-self: start;
    margin-left: 190px;
    margin-right: 0;
  }

  .blessing-end {
    justify-self: start;
    margin-top: 16px;
    margin-left: 14px;
    font-size: 15px;
  }
}

@font-face {
  font-family: "ZCOOL KuaiLe Local";
  src: url("./assets/fonts/ZCOOLKuaiLe-Regular.ttf") format("truetype");
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: #000;
}

body {
  display: grid;
  place-items: center;
  min-height: 100svh;
}

.stage {
  position: relative;
  width: min(100vw, 1180px, calc(100svh * 2388 / 1668));
  aspect-ratio: 2388 / 1668;
  max-height: 100svh;
  overflow: hidden;
  background: #000;
}

#sceneCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  pointer-events: none;
}

.gift-title {
  position: absolute;
  left: 50%;
  top: 79%;
  z-index: 2;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  color: #fff1b8;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 2px rgba(255, 154, 100, 0.72);
  background: linear-gradient(180deg, #fffdf1 0%, #ffe9a8 40%, #ffbd72 100%);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow:
    0 0 4px rgba(255, 246, 210, 0.72),
    0 0 14px rgba(255, 187, 82, 0.48),
    0 0 28px rgba(255, 126, 22, 0.22);
  font-family: "ZCOOL KuaiLe Local", "YouYuan", "Microsoft YaHei UI", system-ui, sans-serif;
  font-size: clamp(34px, 5.6vw, 62px);
  font-weight: 900;
  letter-spacing: 0.05em;
  pointer-events: none;
  opacity: 1;
  filter:
    drop-shadow(0 4px 0 rgba(166, 88, 56, 0.34))
    drop-shadow(0 0 12px rgba(255, 185, 54, 0.28));
  transition: opacity 460ms ease, transform 460ms ease, filter 460ms ease;
  animation: titleBreath 2.2s ease-in-out infinite;
}

.stage.gift-opened .gift-title {
  opacity: 0;
  transform: translate(-50%, -50%) scale(1.18);
  filter: blur(8px) drop-shadow(0 0 24px rgba(255, 156, 42, 0.2));
}

.birthday-overlay {
  position: absolute;
  left: 50%;
  top: 13%;
  z-index: 2;
  transform: translateX(-50%);
  width: min(86%, 760px);
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 520ms ease, transform 520ms ease, filter 520ms ease;
  filter: blur(8px);
}

.stage.birthday-scene .birthday-overlay {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  filter: blur(0);
}

.blessing-overlay {
  position: absolute;
  left: 50%;
  top: 43%;
  z-index: 3;
  width: min(88%, 860px);
  transform: translate(-50%, -50%) scale(0.96);
  text-align: center;
  opacity: 0;
  filter: blur(10px);
  pointer-events: none;
  transition: opacity 680ms ease, transform 680ms ease, filter 680ms ease;
}

.stage.blessing-scene .blessing-overlay {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  filter: blur(0);
}

.blessing-line {
  position: relative;
  display: block;
  color: #fff8fc;
  font-family: "ZCOOL KuaiLe Local", "华文琥珀", "STHupo", "华文彩云", "STCaiyun", "YouYuan", "Microsoft YaHei UI", system-ui, sans-serif;
  font-size: clamp(30px, 4.9vw, 62px);
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: 0;
  transform: scaleX(1.08);
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 2px rgba(255, 126, 198, 0.96);
  background: linear-gradient(180deg, #ffffff 0%, #fff7fd 30%, #ffd5ef 62%, #ff9cda 100%);
  -webkit-background-clip: text;
  background-clip: text;
  paint-order: stroke fill;
  filter:
    drop-shadow(0 5px 0 rgba(211, 76, 153, 0.58))
    drop-shadow(0 12px 18px rgba(255, 87, 176, 0.46));
  text-shadow:
    0 0 4px rgba(255, 255, 255, 1),
    0 0 18px rgba(255, 174, 223, 0.86),
    0 0 42px rgba(255, 92, 181, 0.48);
}

.blessing-line::before {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  z-index: -1;
  color: #fff9fe;
  -webkit-text-fill-color: #fff9fe;
  -webkit-text-stroke: 12px rgba(255, 232, 248, 0.96);
  filter:
    blur(0.3px)
    drop-shadow(0 0 12px rgba(255, 255, 255, 0.95))
    drop-shadow(0 0 30px rgba(255, 145, 208, 0.68));
}

.blessing-line::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  z-index: -2;
  color: #ff87cc;
  -webkit-text-fill-color: #ff87cc;
  -webkit-text-stroke: 18px rgba(255, 99, 181, 0.64);
  filter: blur(1.2px);
}

.blessing-name {
  color: #fff5c8;
  font-size: clamp(32px, 5.15vw, 66px);
  -webkit-text-stroke-color: rgba(255, 155, 132, 0.98);
  background: linear-gradient(180deg, #ffffff 0%, #fff8d8 32%, #ffd98f 66%, #ffad75 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter:
    drop-shadow(0 5px 0 rgba(214, 99, 87, 0.52))
    drop-shadow(0 12px 18px rgba(255, 127, 156, 0.38));
  text-shadow:
    0 0 4px rgba(255, 255, 255, 1),
    0 0 18px rgba(255, 225, 148, 0.86),
    0 0 44px rgba(255, 119, 164, 0.44);
}

.blessing-name::before {
  -webkit-text-stroke-color: rgba(255, 243, 213, 0.98);
}

.blessing-name::after {
  -webkit-text-stroke-color: rgba(255, 145, 117, 0.62);
}

.birthday-main {
  color: #ffd7df;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(46px, 8vw, 98px);
  font-style: italic;
  line-height: 0.95;
  text-shadow:
    0 0 8px rgba(255, 236, 245, 0.96),
    0 0 22px rgba(255, 133, 190, 0.74),
    0 0 42px rgba(160, 92, 255, 0.45);
}

.birthday-sub {
  margin-top: 12px;
  color: rgba(255, 244, 248, 0.86);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(13px, 2vw, 22px);
  font-weight: 800;
  letter-spacing: 0.18em;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.72);
}

@keyframes titleBreath {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }

  50% {
    transform: translate(-50%, -51%) scale(1.045);
  }
}

#cameraFeed {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 3;
  width: 132px;
  height: 94px;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  transform: scaleX(-1);
}

.camera-btn {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 4;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: #101014;
  background: linear-gradient(90deg, #ffd4ef, #ff65c8);
  font: 800 13px Inter, system-ui, sans-serif;
}

.camera-btn:disabled {
  opacity: 1;
}

.gesture-status {
  position: absolute;
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
  z-index: 4;
  min-width: 150px;
  padding: 9px 18px;
  border: 1px solid rgba(255, 146, 215, 0.5);
  border-radius: 999px;
  color: #ffe4f5;
  background: rgba(0, 0, 0, 0.68);
  box-shadow: 0 0 22px rgba(255, 101, 200, 0.28);
  font: 900 16px Inter, system-ui, sans-serif;
  text-align: center;
  letter-spacing: 0.06em;
  pointer-events: none;
}

.stage.heart-scene .gesture-status {
  opacity: 0;
}

.stage.blessing-scene .gesture-status,
.stage.blessing-scene .camera-btn,
.stage.blessing-scene #cameraFeed {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.stage.camera-on #cameraFeed {
  opacity: 0.72;
}

@media (max-width: 759px), (hover: none) and (pointer: coarse) {
  .stage {
    width: 100vw;
    height: 100svh;
    min-height: 100svh;
    max-height: none;
    aspect-ratio: auto;
  }

  .gift-title {
    top: 78%;
    font-size: clamp(32px, 11vw, 54px);
  }

  .gesture-status {
    top: max(12px, env(safe-area-inset-top));
    min-width: 136px;
    padding: 8px 14px;
    font-size: 14px;
  }

  .birthday-overlay {
    top: 10%;
    width: 94%;
  }

  .birthday-main {
    font-size: clamp(42px, 13vw, 76px);
  }

  .birthday-sub {
    margin-top: 8px;
    font-size: clamp(11px, 3vw, 15px);
  }
}

.blessing-overlay {
  top: 48%;
  width: min(92%, 900px);
}

.blessing-heart {
  display: none;
  margin: 0 auto 10px;
  color: #fff4fb;
  font-family: "ZCOOL KuaiLe Local", "Arial Rounded MT Bold", system-ui, sans-serif;
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 900;
  line-height: 1;
  -webkit-text-stroke: 2px rgba(255, 116, 188, 0.86);
  text-shadow:
    0 0 8px rgba(255, 255, 255, 0.96),
    0 0 22px rgba(255, 148, 211, 0.84),
    0 0 48px rgba(255, 75, 169, 0.58);
}

.blessing-card {
  display: grid;
  width: min(86vw, 760px);
  margin: 0 auto;
  gap: clamp(6px, 1.1vw, 13px);
  justify-items: start;
}

.blessing-line {
  max-width: 100%;
  font-family: "ZCOOL KuaiLe Local", "YouYuan", "Microsoft YaHei UI", system-ui, sans-serif;
  font-size: clamp(17px, 3.05vw, 34px);
  line-height: 1.16;
  white-space: nowrap;
  transform: scaleX(1.04);
  -webkit-text-stroke: 1px rgba(255, 126, 198, 0.72);
  filter:
    drop-shadow(0 3px 0 rgba(166, 48, 118, 0.42))
    drop-shadow(0 7px 10px rgba(255, 87, 176, 0.2));
  text-shadow:
    0 0 3px rgba(255, 244, 250, 0.68),
    0 0 10px rgba(255, 151, 210, 0.42),
    0 0 22px rgba(255, 92, 181, 0.2);
}

.blessing-left {
  justify-self: start;
  margin-left: min(4vw, 34px);
}

.blessing-center {
  justify-self: center;
  margin-top: clamp(8px, 1.7vw, 20px);
}

.blessing-mid {
  justify-self: center;
  margin-top: clamp(4px, 1.2vw, 14px);
}

.blessing-left-soft {
  justify-self: start;
  margin-left: min(7vw, 64px);
  margin-top: clamp(12px, 2vw, 24px);
}

.blessing-right {
  justify-self: end;
  margin-right: min(5vw, 42px);
}

.blessing-end {
  justify-self: start;
  margin-left: min(8vw, 70px);
  margin-top: clamp(12px, 2vw, 24px);
}

.blessing-line::before {
  -webkit-text-stroke: 6px rgba(255, 214, 238, 0.58);
  filter:
    blur(0.2px)
    drop-shadow(0 0 5px rgba(255, 230, 245, 0.48))
    drop-shadow(0 0 12px rgba(255, 145, 208, 0.28));
}

.blessing-line::after {
  -webkit-text-stroke: 10px rgba(255, 99, 181, 0.24);
  filter: blur(0.7px);
}

.blessing-to,
.blessing-title {
  font-size: clamp(20px, 3.55vw, 40px);
}

.blessing-to {
  -webkit-text-stroke-color: rgba(255, 155, 132, 0.74);
  background: linear-gradient(180deg, #fff6df 0%, #ffe7aa 36%, #ffc072 70%, #ef8d64 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter:
    drop-shadow(0 3px 0 rgba(157, 74, 63, 0.34))
    drop-shadow(0 7px 10px rgba(255, 127, 156, 0.18));
  text-shadow:
    0 0 3px rgba(255, 246, 224, 0.62),
    0 0 10px rgba(255, 210, 135, 0.4),
    0 0 22px rgba(255, 119, 164, 0.18);
}

.blessing-to::before {
  -webkit-text-stroke-color: rgba(255, 234, 197, 0.58);
}

.blessing-to::after {
  -webkit-text-stroke-color: rgba(255, 145, 117, 0.24);
}

.blessing-small {
  font-size: clamp(15px, 2.5vw, 29px);
}

.blessing-indent {
  padding-left: min(20vw, 180px);
}

.blessing-icon {
  -webkit-text-fill-color: currentColor;
  -webkit-text-stroke: 0;
  background: none;
  filter: none;
}

@media (orientation: landscape) and (max-height: 480px) {
  .stage {
    width: 100vw;
    height: 100svh;
    max-height: none;
    aspect-ratio: auto;
  }

  .gift-title {
    top: 76%;
    font-size: clamp(25px, 4.2vw, 36px);
    -webkit-text-stroke-width: 1.3px;
    letter-spacing: 0;
  }

  .gesture-status {
    top: max(8px, env(safe-area-inset-top));
    min-width: 86px;
    padding: 6px 12px;
    font-size: 12px;
  }

  .camera-btn {
    right: max(12px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    min-height: 32px;
    padding: 0 12px;
    font-size: 12px;
  }

  .blessing-overlay {
    top: 51%;
    width: 100%;
    padding: 0 max(18px, env(safe-area-inset-left)) 0 max(18px, env(safe-area-inset-right));
  }

  .blessing-card {
    width: min(720px, calc(100vw - 80px));
    gap: 10px;
    justify-items: start;
  }

  .blessing-line {
    font-size: clamp(17px, 2.55vw, 23px);
    line-height: 1.06;
    transform: none;
    -webkit-text-stroke-width: 0.75px;
    filter:
      drop-shadow(0 2px 0 rgba(166, 48, 118, 0.3))
      drop-shadow(0 5px 8px rgba(255, 87, 176, 0.14));
    text-shadow:
      0 0 2px rgba(255, 244, 250, 0.48),
      0 0 7px rgba(255, 151, 210, 0.26),
      0 0 13px rgba(255, 92, 181, 0.12);
  }

  .blessing-line::before {
    -webkit-text-stroke-width: 4px;
    filter:
      blur(0.15px)
      drop-shadow(0 0 4px rgba(255, 230, 245, 0.3))
      drop-shadow(0 0 8px rgba(255, 145, 208, 0.18));
  }

  .blessing-line::after {
    -webkit-text-stroke-width: 7px;
    filter: blur(0.5px);
  }

  .blessing-to,
  .blessing-title {
    font-size: clamp(20px, 3.1vw, 28px);
  }

  .blessing-small {
    font-size: clamp(15px, 2.25vw, 20px);
  }

  .blessing-left {
    margin-left: 84px;
  }

  .blessing-center {
    justify-self: start;
    margin-top: 8px;
    margin-left: 280px;
  }

  .blessing-mid {
    justify-self: start;
    margin-top: 2px;
    margin-left: 210px;
  }

  .blessing-left-soft {
    margin-top: 10px;
    margin-left: 112px;
  }

  .blessing-right {
    justify-self: start;
    margin-left: 355px;
    margin-right: 0;
  }

  .blessing-end {
    margin-top: 11px;
    margin-left: 130px;
    font-size: clamp(14px, 2.05vw, 18px);
  }
}
