* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  background: #f2a33c;
}

body {
  overflow-x: hidden;
}

.page {
  position: relative;
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  line-height: 0;
  container-type: inline-size;
  overflow-x: hidden;
}

.page-bg {
  display: block;
  width: 100%;
  height: auto;
}

.page-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  pointer-events: none;
}

/* ---------- Brush-stroke highlight sweep behind "最後珍藏機會/錯過不再！" ---------- */
.brush-highlight-group {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.brush-stroke {
  position: absolute;
  background-color: #00eaff;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  clip-path: inset(0 100% 0 0);
}

.brush-highlight-group.play .brush-stroke {
  animation: brushReveal 0.6s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

@keyframes brushReveal {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0% 0 0); }
}

/* ---------- 收藏價值 checklist: items reveal one by one ---------- */
.checklist-group {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.checklist-item {
  position: absolute;
  display: block;
  width: 100%;
  height: auto;
  opacity: 0;
  transform: translateY(-140%);
}

.checklist-group.play .checklist-item {
  animation: checklistDrop 0.85s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes checklistDrop {
  0% { opacity: 0; transform: translateY(-140%); }
  60% { opacity: 1; transform: translateY(8%); }
  80% { transform: translateY(-3%); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ---------- HOME RUN ribbon: a genuinely seamless flat (rotated-to-horizontal)
   320px tile, repeated via background-repeat, with the WHOLE strip (frame +
   texture) rotated together via CSS transform. No diagonal-vs-viewport drift
   is possible since nothing is clipped against a separately-positioned shape —
   the rotated rectangle IS the ribbon. ---------- */
.ribbon-diag {
  position: absolute;
  transform-origin: 0% 50%;
  background-repeat: repeat-x;
  background-position: 0 0;
  background-size: var(--ribbon-tile-size, 16.667cqw) 100%;
  clip-path: inset(3.75% 0 3.75% 0);
  pointer-events: none;
  box-shadow:
    inset 70px 0 45px -25px rgba(0, 0, 0, 0.55),
    inset -70px 0 45px -25px rgba(0, 0, 0, 0.55);
}

.footer-badge {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  pointer-events: none;
}

/* ---------- "700" count-up ---------- */
.count-up {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Arial, "PingFang TC", "Microsoft JhengHei", sans-serif;
  /* vw fallback for browsers without container query support; cqw (scales
     with .page's own width, capped at 1920px) overrides it where supported —
     so the number shrinks with the window on desktop, like everything else */
  font-size: 3.0208vw;
  font-size: 3.0208cqw;
  font-weight: 900;
  font-style: italic;
  color: #a95700;
  -webkit-text-stroke: 0.2083vw #fff;
  -webkit-text-stroke: 0.2083cqw #fff;
  paint-order: stroke fill;
  pointer-events: none;
  white-space: nowrap;
}

/* ---------- Hero character entrance animation ---------- */
.hero-characters {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-char-wrap {
  position: absolute;
  width: 100%;
  will-change: transform, opacity;
}

.hero-char {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0;
  animation-duration: 1.1s;
  animation-timing-function: ease-out;
  animation-fill-mode: both;
}

.hero-char.enter-left {
  animation-name: enterLeft;
}

.hero-char.enter-right {
  animation-name: enterRight;
}

.hero-char.enter-top {
  animation-name: enterTop;
}

@keyframes enterLeft {
  0% { opacity: 0; transform: translateX(-70%) scale(0.85); }
  55% { opacity: 1; transform: translateX(4%) scale(1.04); }
  78% { transform: translateX(-1.5%) scale(0.99); }
  100% { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes enterRight {
  0% { opacity: 0; transform: translateX(70%) scale(0.85); }
  55% { opacity: 1; transform: translateX(-4%) scale(1.04); }
  78% { transform: translateX(1.5%) scale(0.99); }
  100% { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes enterTop {
  0% { opacity: 0; transform: translateY(-85%) scale(0.85); }
  50% { opacity: 1; transform: translateY(3%) scale(1.06); }
  72% { transform: translateY(-1.5%) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-char {
    animation: none;
    opacity: 1;
  }

  .cta-btn {
    animation: none;
  }
}

/* ---------- CTA buttons (立即入手) ---------- */
.cta-btn {
  position: absolute;
  display: block;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  transform-origin: center;
  animation: heartbeat 1.6s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  14% { transform: scale(1.08); }
  28% { transform: scale(1); }
  42% { transform: scale(1.08); }
  70% { transform: scale(1); }
}

.cta-btn img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.35s ease;
}

.cta-btn .cta-off {
  position: relative;
}

.cta-btn .cta-on {
  position: absolute;
  top: 0;
  left: 0;
}

.cta-btn:active img {
  transform: scale(0.97);
}

/* Glow always plays (no hover needed) — same duration/start-time as
   .cta-btn's heartbeat scale, so they stay perfectly in sync. */
.cta-btn .cta-on {
  animation: heartbeatGlow 1.6s ease-in-out infinite;
}

@keyframes heartbeatGlow {
  0%, 100% { opacity: 0; }
  14% { opacity: 1; }
  28% { opacity: 0.15; }
  42% { opacity: 1; }
  70% { opacity: 0; }
}

/* ---------- Floating FB / TOP buttons ---------- */
.floating-actions {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  z-index: 1000;
}

.float-btn {
  display: block;
  width: 58px;
  height: 58px;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.25));
  transition: transform 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) and (pointer: fine) {
  .float-btn:hover {
    transform: scale(1.08);
  }
}

.float-btn img {
  display: block;
  width: 100%;
  height: 100%;
}

.fb-btn {
  opacity: 1;
}

.top-btn {
  position: relative;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.2s ease;
}

.top-btn.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.top-btn .top-on,
.top-btn .top-off {
  position: absolute;
  top: 0;
  left: 0;
  transition: opacity 0.25s ease;
}

.top-btn .top-on {
  opacity: 0;
}

@media (hover: hover) and (pointer: fine) {
  .top-btn:hover .top-off {
    opacity: 0;
  }

  .top-btn:hover .top-on {
    opacity: 1;
  }
}

@media (max-width: 640px) {
  .floating-actions {
    right: 12px;
    bottom: 12px;
    gap: 8px;
  }

  .float-btn {
    width: 44px;
    height: 44px;
  }
}
