:root {
  --stage-width: 600px;
  --ink: #2b0b0b;
  --paper: #f5f5f5;
  --accent: #ff2b2b;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family:
    "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Hiragino Sans GB",
    system-ui, sans-serif;
}

body {
  display: flex;
  justify-content: center;
}

.stage {
  position: relative;
  width: min(var(--stage-width), 100vw);
  margin: 0 auto;
  background: #ff0036;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.08);
}

.banner {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.claim {
  position: absolute;
  top: 75%;
  left: 50%;
  width: 47.33%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transform: translateX(-50%);
  transform-origin: 50% 50%;
  -webkit-animation: heartbeat 1s infinite;
  animation: heartbeat 1s infinite;
  -webkit-tap-highlight-color: transparent;
}

.claim:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 5px;
  border-radius: 10px;
}

.claim:active {
  transform: translateX(-50%) scale(0.96);
}

.claim-image {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  z-index: 20;
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 11px 18px;
  border-radius: 999px;
  background: rgba(25, 15, 15, 0.88);
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.fallback {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.56);
}

.fallback[hidden] {
  display: none;
}

.fallback-card {
  width: min(420px, 100%);
  padding: 22px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
}

.fallback-card h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.fallback-card p {
  margin: 0 0 12px;
  color: #665;
  font-size: 13px;
  line-height: 1.6;
}

.fallback-card textarea {
  display: block;
  width: 100%;
  min-height: 86px;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 9px;
  background: #fafafa;
  color: #222;
  font: inherit;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
}

.fallback-close {
  display: block;
  width: 100%;
  min-height: 42px;
  margin-top: 12px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

/* 与原站 xintiaozhong 一致：1s 一轮，两次放大到 1.3 */
@keyframes heartbeat {
  from {
    transform: translateX(-50%) scale(1);
  }

  14% {
    transform: translateX(-50%) scale(1.3);
  }

  28% {
    transform: translateX(-50%) scale(1);
  }

  43% {
    transform: translateX(-50%) scale(1.3);
  }

  70% {
    transform: translateX(-50%) scale(1);
  }

  100% {
    transform: translateX(-50%) scale(1);
  }
}

@media (max-width: 620px) {
  html,
  body {
    background: #ff0036;
  }

  .stage {
    box-shadow: none;
  }

  .toast {
    bottom: 22px;
    font-size: 13px;
  }
}

/* 刻意不加 prefers-reduced-motion 覆盖：原站也没有，
   iOS 开启「减弱动态效果」时仍要保持按钮心跳。 */
