body { font-family: "Huninn", "Microsoft JhengHei", "PingFang TC", sans-serif; overflow-x: hidden; }
.button, .stickers button, dialog button { font-family: inherit; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.letters span { display: inline-block; animation: hop 2.4s ease-in-out infinite; animation-delay: calc(var(--i) * .12s); }
@keyframes hop {
  0%, 40%, 100% { transform: translateY(0) rotate(0); }
  20% { transform: translateY(-.28em) rotate(-8deg); }
}

/* 立體泡泡字 */
h2 { font-size: 2.8rem; font-weight: 400; letter-spacing: .1em; }
h2 .letters span {
  color: #fff;
  -webkit-text-stroke: .16em #ff6fa5;
  paint-order: stroke fill;
  text-shadow: 0 .05em #e0558a, 0 .1em #c94477, 0 .15em #b23766, 0 .24em .2em rgba(130, 30, 80, .35);
}
h2 .letters span:nth-child(even) { -webkit-text-stroke-color: #5b6bff; text-shadow: 0 .05em #4653d6, 0 .1em #3944b8, 0 .15em #2d379c, 0 .24em .2em rgba(30, 30, 130, .35); }
h2 img { animation: coin 5s linear infinite; }
@keyframes coin { to { transform: rotateY(360deg); } }

.brand, .tag, .button { font-family: "Cherry Bomb One", "Huninn", sans-serif; font-weight: 400; }
.brand { font-size: 1.5rem; }
.tag { font-size: 1.2rem; box-shadow: 0 5px 0 #0f1a8f; }
.button {
  font-size: 1.3rem;
  background: linear-gradient(100deg, #ff7fae, #ffc15c, #6fd0d0, #9aa6ff, #ff7fae);
  background-size: 300% 100%;
  text-shadow: 0 2px 0 rgba(110, 30, 70, .45);
  animation: rainbow 6s linear infinite;
}
@keyframes rainbow { to { background-position: 300% 0; } }

/* 首頁立體傾斜 */
.scene3d { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero h1, .hero .face {
  transform: perspective(700px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .15s ease-out;
}
.hero h1 img {
  filter: drop-shadow(0 3px 0 #f0729f) drop-shadow(0 3px 0 #d95b8a) drop-shadow(0 3px 0 #c04777)
          drop-shadow(0 12px 10px rgba(130, 30, 80, .3));
  animation: breathe 3.2s ease-in-out infinite;
}
@keyframes breathe { 50% { transform: scale(1.04); } }
.face { box-shadow: 0 10px 0 #e56a96, 0 22px 30px rgba(130, 30, 80, .25); }

/* 卡片厚度與進場 */
.card { box-shadow: 0 10px 0 #f0729f, 0 22px 28px rgba(130, 30, 80, .18); }
figure {
  box-shadow: 0 10px 0 #8f9b5c, 0 22px 28px rgba(60, 70, 20, .2);
  transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .15s ease-out;
}
.reveal { opacity: 0; transform: perspective(900px) rotateX(18deg) translateY(50px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .7s, transform .7s cubic-bezier(.2, 1.4, .4, 1); }

.spark { position: fixed; z-index: 20; pointer-events: none; font-size: 18px; animation: spark .8s ease-out forwards; }
@keyframes spark {
  from { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  to { transform: translate(-50%, 40px) scale(.2) rotate(180deg); opacity: 0; }
}

@media (max-width: 640px) { h2 { font-size: 2.2rem; } }

@media (prefers-reduced-motion: reduce) {
  .letters span, h2 img, .button, .hero h1 img { animation: none; }
}
