/* =========================================================
   ANGLE 安格尔门窗 · 国补助力 H5
   轻盈红金视觉 / Mobile-first / 100dvh
   ========================================================= */

:root {
  --wine-950: #3f0302;
  --wine-900: #570604;
  --wine-800: #711009;
  --wine-700: #8a1710;
  --wine-600: #a32116;
  --ivory: #fffaf1;
  --ivory-2: #fff5e3;
  --cream: #ffedcf;
  --sand: #f2e2c6;
  --line: rgba(222, 186, 133, 0.62);
  --gold: #ffd46f;
  --gold-2: #ffbf3f;
  --gold-deep: #d78b18;
  --red: #b51f15;
  --red-dark: #8f160d;
  --ink: #37211a;
  --muted: #8c6c55;
  --pad: clamp(14px, 4vw, 18px);
  --radius: 20px;
  --shadow: 0 10px 26px rgba(48, 4, 0, 0.16);
  --ease: cubic-bezier(0.22, 1, 0.28, 1);
  --font: "PingFang SC", "Hiragino Sans GB", "HarmonyOS Sans SC",
    "Source Han Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
}

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

html {
  height: 100%;
  background: #260201;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--font);
  background:
    radial-gradient(56% 42% at 16% 0%, #69100a 0%, transparent 70%),
    radial-gradient(52% 42% at 90% 100%, #4b0503 0%, transparent 68%),
    #230101;
  -webkit-tap-highlight-color: transparent;
}

html.is-locked,
body.is-locked {
  overflow: hidden;
  overscroll-behavior: none;
}

button {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

svg {
  display: block;
}

.stage {
  display: flex;
  justify-content: center;
  width: 100%;
  min-height: 100%;
  min-height: 100dvh;
}

.app {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 480px;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(100% 55% at 18% 0%, rgba(198, 46, 28, 0.46) 0%, transparent 62%),
    radial-gradient(70% 40% at 94% 30%, rgba(255, 171, 86, 0.1) 0%, transparent 66%),
    linear-gradient(180deg, #5e0906 0%, #7c100a 34%, #8e1810 64%, #5e0604 100%);
  box-shadow: 0 0 90px rgba(0, 0, 0, 0.6);
}

/* =========================
   顶部
   ========================= */
.brandbar {
  position: relative;
  z-index: 12;
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  height: calc(44px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 16px 0;
  background: #0d0c0b;
}

.logo {
  display: flex;
  align-items: center;
  min-width: 0;
  color: #fff;
}

.logo__img {
  width: auto;
  height: clamp(21px, 6.5vw, 25px);
  max-width: 100%;
}

.brandbar__slogan {
  flex: none;
  color: rgba(255, 255, 255, 0.44);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

/* =========================
   头图
   ========================= */
.hero {
  position: relative;
  z-index: 5;
  flex: none;
  padding: clamp(14px, 2.4vh, 22px) var(--pad) 0;
}

.hero__halo {
  position: absolute;
  top: -110px;
  left: -100px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 192, 104, 0.24) 0%, transparent 64%);
  pointer-events: none;
}

.hero__grid {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: clamp(10px, 3vw, 16px);
}

.portrait {
  position: relative;
  flex: 0 0 clamp(102px, 33vw, 142px);
}

.portrait__ring {
  width: 100%;
  aspect-ratio: 1;
  padding: 3px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffe8b2 0%, #c78b31 48%, #ffe9b8 100%);
  box-shadow:
    0 14px 30px rgba(32, 0, 0, 0.32),
    0 0 0 1px rgba(255, 232, 180, 0.18);
}

.portrait__inner {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 2px solid #7f0e09;
  border-radius: 50%;
  background: #d8dde1;
}

.portrait__inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
}

.hero__copy {
  flex: 1;
  min-width: 0;
  padding-left: clamp(10px, 3vw, 14px);
  border-left: 1px solid rgba(255, 222, 166, 0.18);
}

.hero__kicker {
  margin: 0 0 clamp(6px, 1.1vh, 10px);
  color: rgba(255, 236, 210, 0.7);
  font-size: clamp(9px, 2.7vw, 11px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.16em;
  white-space: nowrap;
}

.hero__title {
  margin: 0;
  color: #fff;
  font-size: clamp(23px, 7vw, 34px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 12px rgba(50, 0, 0, 0.26);
}

.hero__title span {
  display: inline-block;
  margin-top: 1px;
  color: #ffdc8c;
  font-size: clamp(35px, 10.3vw, 48px);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, #fff6d2 0%, #ffd777 52%, #ffb93d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 3px 8px rgba(92, 22, 0, 0.2));
}

.hero__note {
  margin: clamp(6px, 1vh, 9px) 0 0;
  color: #ffd9a8;
  font-size: clamp(12px, 3.8vw, 15px);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.04em;
}

/* 轻量装饰 */
.coin {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  width: clamp(20px, 6vw, 28px);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 238, 176, 0.72);
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #fff6c8 0%, #ffd45e 44%, #e59a1e 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 248, 202, 0.42);
  color: #a65b00;
  font-size: 12px;
  font-weight: 900;
  opacity: 0.78;
  animation: coinFloat 5.2s ease-in-out infinite;
  pointer-events: none;
}

.coin--a {
  top: 14%;
  right: 3%;
  animation-delay: -1.2s;
}

.spark {
  position: absolute;
  top: 55%;
  right: 5%;
  z-index: 1;
  width: 9px;
  height: 9px;
  background: #ffe2a0;
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  opacity: 0.55;
  animation: twinkle 3.4s ease-in-out infinite;
  pointer-events: none;
}

/* 福利条 */
.banner {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: min(78%, 320px);
  margin: clamp(12px, 1.9vh, 17px) auto calc(-1 * clamp(16px, 2.5vh, 22px));
  padding: clamp(9px, 1.35vh, 13px) 14px;
  border: 1px solid rgba(255, 217, 152, 0.48);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(164, 30, 20, 0.4) 0%, rgba(104, 11, 7, 0.62) 100%);
  box-shadow:
    0 10px 26px rgba(40, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.banner__content {
  display: block;
  text-align: center;
}

.banner__label {
  display: block;
  color: #ffe1a0;
  font-size: clamp(22px, 6.5vw, 28px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: 0.1em;
  text-indent: 0.1em;
  text-shadow: 0 2px 8px rgba(53, 0, 0, 0.28);
}

.banner__sub {
  display: block;
  margin-top: 3px;
  color: rgba(255, 235, 198, 0.58);
  font-size: clamp(8px, 2.3vw, 9px);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
}

.banner__line {
  flex: 0 0 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 216, 146, 0.55));
}

.banner__line--right {
  background: linear-gradient(90deg, rgba(255, 216, 146, 0.55), transparent);
}

/* =========================
   主内容
   ========================= */
.content {
  position: relative;
  z-index: 3;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: clamp(8px, 1.3vh, 11px);
  min-height: 0;
  padding: clamp(22px, 3vh, 28px) var(--pad) 0;
}

.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fffdf8 0%, #fff8ea 100%);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.panel > * {
  position: relative;
  z-index: 1;
}

/* 进度 */
.progress-card {
  padding: clamp(23px, 3.4vh, 29px) clamp(14px, 3.8vw, 18px) clamp(12px, 1.8vh, 15px);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: clamp(8px, 1.1vh, 10px);
}

.card-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(16px, 4.7vw, 19px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--red);
  box-shadow: 0 3px 8px rgba(156, 30, 15, 0.18);
  color: #fff8ea;
  font-size: clamp(10px, 3.1vw, 12px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.04em;
}

.badge i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ffdf8a;
}

.progress {
  position: relative;
}

.track {
  position: relative;
  height: clamp(9px, 1.3vh, 11px);
  border-radius: 999px;
  background: #f2e3c7;
  box-shadow: inset 0 1px 2px rgba(119, 72, 25, 0.13);
}

.track__fill {
  position: relative;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffb45d 0%, #f56c24 48%, #e83d18 100%);
  box-shadow: 0 0 10px rgba(240, 84, 24, 0.28);
  transition: width 2.9s var(--ease);
  will-change: width;
}

.track__gloss {
  position: absolute;
  top: 1px;
  left: 2px;
  right: 2px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.1));
  opacity: 0.8;
}

.runner {
  position: absolute;
  top: 50%;
  right: -11px;
  z-index: 4;
  width: clamp(20px, 5.7vw, 23px);
  aspect-ratio: 1;
  transform: translateY(-50%);
  animation: runnerBob 1.05s ease-in-out infinite alternate;
  filter: drop-shadow(0 2px 4px rgba(75, 16, 0, 0.28));
}

.runner__pic {
  display: block;
  width: 100%;
  height: 100%;
  padding: 1.5px;
  overflow: hidden;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(255, 228, 167, 0.85),
    0 0 0 3px rgba(255, 255, 255, 0.55);
}

.runner__pic img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.runner__speed {
  position: absolute;
  top: 50%;
  right: 86%;
  width: 16px;
  height: 12px;
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 246, 215, 0.85) 0 1.5px,
    transparent 1.5px 5px
  );
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 80%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 80%);
  transform: translateY(-50%);
  opacity: 0.55;
}

.track__foot {
  position: relative;
  height: clamp(16px, 2.1vh, 19px);
  margin-top: clamp(9px, 1.5vh, 13px);
}

.mile {
  position: absolute;
  top: 0;
  color: var(--muted);
  font-size: clamp(10px, 3vw, 11px);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  transform: translateX(-50%);
}

.amount {
  position: absolute;
  top: -1px;
  right: 0;
  color: var(--red);
  font-size: clamp(13px, 3.9vw, 16px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

/* 倒计时 */
.countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: clamp(5px, 1vh, 8px);
}

.countdown__label {
  color: #8a6449;
  font-size: clamp(10px, 3vw, 11px);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.digits {
  display: flex;
  align-items: center;
  gap: 2px;
}

.digit {
  display: grid;
  place-items: center;
  min-width: clamp(18px, 5.2vw, 22px);
  height: clamp(20px, 2.8vh, 24px);
  padding: 0 3px;
  border: 1px solid #e4caa3;
  border-radius: 5px;
  background: #fffaf1;
  color: #4b2b1e;
  font-size: clamp(12px, 3.5vw, 14px);
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.digit.flip {
  animation: digitFlip 0.34s ease-out;
}

.colon {
  padding: 0 1px;
  color: #a37a57;
  font-size: clamp(11px, 3.2vw, 13px);
  font-style: normal;
  font-weight: 800;
}

/* 商品 */
.product {
  display: flex;
  align-items: center;
  gap: clamp(9px, 2.6vw, 12px);
  margin-top: clamp(9px, 1.4vh, 12px);
  padding: 7px;
  border: 1px solid #f1dfc2;
  border-radius: 12px;
  background: #fffdf8;
}

.product__art {
  flex: 0 0 42%;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 1.45;
  background: #e9eef2;
}

.product__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product__copy {
  flex: 1;
  min-width: 0;
}

.product__copy h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(15px, 4.5vw, 19px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.price-line {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin-top: 2px;
  white-space: nowrap;
}

.price-line em {
  color: #79452b;
  font-size: clamp(10px, 3.1vw, 12px);
  font-style: normal;
  font-weight: 700;
}

.price-line b {
  color: var(--red);
  font-size: clamp(23px, 7vw, 29px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
}

.product__old {
  margin: 3px 0 0;
  overflow: hidden;
  color: #9b7a61;
  font-size: clamp(9px, 2.6vw, 10px);
  font-weight: 400;
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* 好友 */
.fans {
  display: flex;
  align-items: center;
  gap: clamp(4px, 1.3vw, 8px);
  padding: clamp(9px, 1.35vh, 12px) clamp(10px, 3vw, 15px);
}

.fan {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: clamp(5px, 0.8vh, 7px);
  min-width: 0;
}

.fan__pic {
  position: relative;
  display: block;
  width: clamp(40px, 11.6vw, 46px);
  aspect-ratio: 1;
  padding: 2px;
  border: 1px solid #efd8b6;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 9px rgba(83, 39, 9, 0.1);
}

.fan__pic img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #e7e2da;
}

.fan__pic.is-swapping {
  animation: avatarSwap 0.55s var(--ease);
}

.fan__label {
  display: block;
  max-width: 100%;
  padding: 2px 8px;
  overflow: hidden;
  border: 1px solid #f0d8b7;
  border-radius: 999px;
  background: #fff4e4;
  color: #a84729;
  font-size: clamp(9px, 2.6vw, 10px);
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.fan--more {
  flex: 0 0 clamp(40px, 11.6vw, 46px);
  width: clamp(40px, 11.6vw, 46px);
  cursor: pointer;
}

.fan__label--more {
  max-width: none;
  padding: 2px 4px;
  border-color: #f0d8b7;
  background: #fff8e9;
  color: #b37826;
}

.more {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  border: 1px dashed #dfb273;
  border-radius: 50%;
  background: #fff8ea;
  color: #b64d22;
  font-size: clamp(18px, 5.2vw, 22px);
  font-weight: 800;
  line-height: 1;
  animation: morePulse 2.8s ease-in-out infinite;
}

.more__spark {
  position: absolute;
  top: 3px;
  right: 4px;
  width: 7px;
  height: 7px;
  background: #ffc94b;
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
}

/* CTA */
.cta-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: auto;
  padding-top: clamp(3px, 0.9vh, 8px);
}

.cta-halo {
  position: absolute;
  top: 10px;
  left: 50%;
  width: 92%;
  height: 76%;
  border-radius: 999px;
  background: radial-gradient(closest-side, rgba(255, 208, 86, 0.38), transparent 72%);
  filter: blur(10px);
  transform: translateX(-50%);
  animation: haloPulse 3.2s ease-in-out infinite;
  pointer-events: none;
}

.cta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  height: clamp(56px, 8vh, 64px);
  overflow: hidden;
  border: 1px solid #ffe9ab;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62) 0%, transparent 28%),
    linear-gradient(180deg, #ffeaa2 0%, #ffd05c 48%, #ffb62b 100%);
  box-shadow:
    0 3px 0 #cf7d10,
    0 10px 24px rgba(115, 54, 0, 0.26),
    inset 0 2px 0 rgba(255, 255, 255, 0.7);
  color: #8d1a0c;
  font-size: clamp(21px, 6.2vw, 26px);
  font-weight: 900;
  letter-spacing: 0.035em;
  transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease);
}

.cta:active,
.cta.is-pressed {
  transform: translateY(2px) scale(0.992);
  box-shadow:
    0 1px 0 #cf7d10,
    0 5px 14px rgba(115, 54, 0, 0.22),
    inset 0 2px 0 rgba(255, 255, 255, 0.6);
}

.cta__shine {
  position: absolute;
  top: -40%;
  left: -45%;
  width: 32%;
  height: 180%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.85), transparent);
  transform: skewX(-18deg);
  animation: ctaShine 3.2s cubic-bezier(0.42, 0, 0.24, 1) infinite;
  pointer-events: none;
}

.cta__text {
  position: relative;
  z-index: 1;
}

.cta__arrow {
  position: relative;
  z-index: 1;
  font-size: 0.78em;
  font-weight: 900;
  line-height: 1;
  animation: arrowNudge 1.4s ease-in-out infinite;
}

.cta__note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: clamp(5px, 0.9vh, 8px) 0 0;
  color: rgba(255, 236, 202, 0.6);
  font-size: clamp(9px, 2.6vw, 10px);
  font-weight: 400;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.cta__note b {
  color: #ffe0a0;
  font-weight: 700;
}

.live-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ffd875;
  animation: livePulse 1.8s ease-out infinite;
}

/* =========================
   底部
   ========================= */
.footer {
  display: flex;
  flex: none;
  align-items: center;
  gap: clamp(9px, 2.6vw, 13px);
  margin-top: clamp(7px, 1.2vh, 11px);
  padding: clamp(9px, 1.3vh, 11px) var(--pad) calc(clamp(9px, 1.3vh, 11px) + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: #0f0c0b;
  color: #fff;
}

.footer__phone {
  display: flex;
  flex: none;
  align-items: center;
  gap: 5px;
  padding-right: clamp(8px, 2.4vw, 12px);
  border-right: 1px solid rgba(255, 255, 255, 0.16);
}

.footer__phone b {
  font-size: clamp(17px, 5.2vw, 20px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.icon-phone {
  width: clamp(14px, 4vw, 17px);
  height: auto;
  color: rgba(255, 255, 255, 0.86);
}

.footer__info {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  gap: 1px;
  color: #a89a8b;
  font-size: clamp(8px, 2.4vw, 9px);
  font-weight: 400;
  line-height: 1.35;
}

.footer__info strong {
  overflow: hidden;
  color: #e8dfd3;
  font-size: clamp(9px, 2.7vw, 10px);
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.footer__picc {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.footer__picc b {
  color: #fff;
  font-size: clamp(9px, 2.8vw, 10px);
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* =========================
   弹窗
   ========================= */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
}

.modal[hidden] {
  display: none;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 3, 1, 0.68);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.modal__card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100%, 366px);
  max-height: calc(100vh - 36px);
  max-height: calc(100dvh - 36px);
  overflow: hidden;
  border: 1px solid #eed8b4;
  border-radius: 22px;
  outline: none;
  background: #fffaf1;
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.46),
    inset 0 1px 0 #fff;
  opacity: 0;
  transform: translateY(20px) scale(0.94);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.modal__card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #d12b1c, #f3a52e 50%, #d12b1c);
  z-index: 2;
}

.modal.is-open .modal__backdrop {
  opacity: 1;
}

.modal.is-open .modal__card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid #edd8b8;
  border-radius: 50%;
  background: #fff7e8;
  color: #a08164;
  font-size: 19px;
  font-weight: 300;
  line-height: 1;
  transition: transform 0.18s ease;
}

.modal__close:active {
  transform: scale(0.92);
}

.modal__head {
  flex: none;
  padding: 20px 18px 12px;
  text-align: center;
}

.modal__gift {
  width: 46px;
  height: 46px;
  margin: 0 auto 8px;
  padding: 6px;
  border-radius: 50%;
  background: linear-gradient(180deg, #fff4cd, #ffe3a1);
  box-shadow:
    0 5px 14px rgba(164, 105, 12, 0.16),
    inset 0 1px 0 #fffdf4;
}

.modal__gift svg {
  width: 100%;
  height: 100%;
}

.modal__head h2 {
  margin: 0;
  color: #3a2016;
  font-size: clamp(19px, 5.3vw, 21px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.03em;
}

.modal__head p {
  margin: 4px 0 0;
  color: #a08164;
  font-size: clamp(10px, 2.8vw, 11px);
  font-weight: 400;
  letter-spacing: 0.03em;
}

.modal__body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0 16px 6px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.modal__body::-webkit-scrollbar {
  display: none;
}

.invite {
  position: relative;
  padding: 11px 13px 10px;
  overflow: hidden;
  border: 1px dashed #e6bd76;
  border-radius: 13px;
  background: linear-gradient(180deg, #fffdf8 0%, #fff4df 100%);
}

.invite__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.invite__label {
  color: #8e6b49;
  font-size: clamp(9px, 2.6vw, 10px);
  font-weight: 600;
  letter-spacing: 0.08em;
}

.copy {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid #ecd0a3;
  border-radius: 999px;
  background: #fff;
  color: #a4611e;
  font-size: 10px;
  font-weight: 600;
  transition: transform 0.15s ease;
}

.copy:active {
  transform: scale(0.95);
}

.copy svg {
  width: 12px;
  height: 12px;
}

.invite__value {
  margin-top: 1px;
  color: var(--red);
  font-size: clamp(26px, 7.4vw, 30px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: 0.15em;
  text-indent: 0.15em;
  font-variant-numeric: tabular-nums;
}

.modal__desc {
  margin: 12px 2px 0;
  color: #6d4e3b;
  font-size: clamp(12.5px, 3.4vw, 13.5px);
  font-weight: 400;
  line-height: 1.72;
  text-align: justify;
  word-break: break-all;
}

.modal__callout {
  margin: 12px 0 0;
  padding: 9px 11px;
  border-left: 3px solid #f0a52a;
  border-radius: 0 8px 8px 0;
  background: #fff1d4;
  color: #ad170e;
  font-size: clamp(15.5px, 4.2vw, 17px);
  font-weight: 800;
  line-height: 1.45;
  letter-spacing: 0.01em;
}

.modal__safe {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 10px 0 0;
  color: #a18367;
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.modal__safe svg {
  width: 11px;
  height: 11px;
  color: #a18367;
}

.modal__actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 10px;
  padding: 12px 16px calc(15px + env(safe-area-inset-bottom));
  border-top: 1px solid #f2e2ca;
  background: #fffaf1;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.04em;
  transition: transform 0.15s var(--ease), opacity 0.2s ease;
}

.btn:active {
  transform: translateY(2px) scale(0.99);
}

.btn:disabled {
  cursor: default;
  opacity: 0.55;
}

.btn--cancel {
  flex: 0 0 34%;
  height: 44px;
  border: 1px solid #e3cba8;
  background: #fff;
  color: #8a6a4a;
  font-size: 14px;
  font-weight: 600;
}

.btn--allow {
  position: relative;
  flex: 1;
  height: 58px;
  overflow: hidden;
  border: 1px solid #ffe8a7;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.58) 0%, transparent 30%),
    linear-gradient(180deg, #ffeaa2 0%, #ffd05c 50%, #ffb62b 100%);
  box-shadow:
    0 3px 0 #cf7d10,
    0 8px 18px rgba(128, 61, 0, 0.2),
    inset 0 2px 0 rgba(255, 255, 255, 0.72);
  color: #8d1a0c;
  font-size: clamp(21px, 6.2vw, 23px);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-indent: 0.08em;
}

.btn--allow::after {
  content: "";
  position: absolute;
  top: -40%;
  left: -55%;
  width: 36%;
  height: 180%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
  transform: skewX(-18deg);
  animation: ctaShine 3.4s ease-in-out infinite;
}

.btn--allow .btn__label {
  position: relative;
  z-index: 1;
}

.spinner {
  display: none;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(141, 26, 12, 0.2);
  border-top-color: #8d1a0c;
  border-radius: 50%;
  animation: spin 0.68s linear infinite;
}

.btn--allow.is-loading .spinner {
  display: block;
}

.btn--allow.is-loading::after {
  display: none;
}

.btn--allow.is-loading {
  pointer-events: none;
  opacity: 0.88;
}

.btn--allow.is-loading .btn__label {
  font-size: 15px;
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(16vh + env(safe-area-inset-bottom));
  z-index: 200;
  padding: 9px 18px;
  border: 1px solid rgba(255, 219, 136, 0.55);
  border-radius: 999px;
  background: rgba(37, 7, 2, 0.9);
  color: #ffe9b2;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 0.25s ease, transform 0.25s var(--ease);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

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

/* 冲刺粒子 */
.boost {
  position: absolute;
  z-index: 8;
  color: #ffdf94;
  font-size: 12px;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(117, 38, 0, 0.28);
  pointer-events: none;
  animation: boostUp 1.1s ease-out forwards;
}

.boost--coin {
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border: 1px solid #fff0b0;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff8c6, #ffd85b 60%, #d98b13);
  color: #a05a00;
  font-size: 8px;
  text-shadow: none;
}

/* =========================
   关键帧
   ========================= */
@keyframes coinFloat {
  0%, 100% {
    transform: translateY(0) rotate(-6deg);
  }
  50% {
    transform: translateY(-7px) rotate(5deg);
  }
}

@keyframes twinkle {
  0%, 100% {
    opacity: 0.25;
    transform: scale(0.8);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.05);
  }
}

@keyframes runnerBob {
  from {
    transform: translateY(-54%);
  }
  to {
    transform: translateY(-46%);
  }
}

@keyframes digitFlip {
  0% {
    transform: translateY(-24%);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes avatarSwap {
  0% {
    transform: scale(0.82);
    opacity: 0.45;
  }
  55% {
    transform: scale(1.05);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}

@keyframes morePulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.045);
  }
}

@keyframes ctaShine {
  0%, 16% {
    left: -55%;
  }
  54%, 100% {
    left: 122%;
  }
}

@keyframes haloPulse {
  0%, 100% {
    opacity: 0.55;
    transform: translateX(-50%) scale(0.97);
  }
  50% {
    opacity: 0.9;
    transform: translateX(-50%) scale(1.02);
  }
}

@keyframes arrowNudge {
  0%, 100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(3px);
  }
}

@keyframes livePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 216, 100, 0.5);
  }
  75%, 100% {
    box-shadow: 0 0 0 5px rgba(255, 216, 100, 0);
  }
}

@keyframes boostUp {
  0% {
    opacity: 0;
    transform: translate(-50%, 4px) scale(0.7);
  }
  18% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -42px) scale(1.08);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* =========================
   短屏
   ========================= */
@media (max-height: 760px) {
  .hero {
    padding-top: 12px;
  }

  .portrait {
    flex-basis: clamp(94px, 30vw, 122px);
  }

  .hero__title {
    font-size: clamp(21px, 6.5vw, 30px);
  }

  .hero__title span {
    font-size: clamp(31px, 9.3vw, 43px);
  }

  .hero__kicker {
    margin-bottom: 5px;
  }

  .banner {
    margin-top: 10px;
    margin-bottom: -16px;
    padding-top: 8px;
    padding-bottom: 9px;
  }

  .content {
    gap: 8px;
    padding-top: 20px;
  }

  .progress-card {
    padding-top: 21px;
    padding-bottom: 11px;
  }

  .product {
    margin-top: 8px;
  }

  .fans {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .cta {
    height: 56px;
  }

  .footer {
    margin-top: 7px;
    padding-top: 8px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
  }
}

@media (max-height: 700px) {
  .hero {
    padding-top: 10px;
  }

  .hero__title {
    font-size: clamp(20px, 6vw, 27px);
  }

  .hero__title span {
    font-size: clamp(28px, 8.6vw, 38px);
  }

  .hero__note {
    font-size: 12px;
  }

  .banner {
    margin-top: 8px;
    margin-bottom: -14px;
    padding-top: 7px;
    padding-bottom: 8px;
  }

  .banner__label {
    font-size: clamp(20px, 6vw, 25px);
  }

  .content {
    gap: 7px;
    padding-top: 17px;
  }

  .progress-card {
    padding-top: 19px;
    padding-bottom: 10px;
  }

  .product {
    margin-top: 7px;
  }

  .product__art {
    flex-basis: 40%;
  }

  .cta {
    height: 53px;
  }

  .cta__note {
    margin-top: 4px;
  }

  .footer {
    margin-top: 5px;
    padding-top: 7px;
    padding-bottom: calc(7px + env(safe-area-inset-bottom));
  }
}

@media (max-height: 650px) {
  .hero__kicker {
    font-size: 9px;
  }

  .portrait {
    flex-basis: clamp(86px, 27vw, 110px);
  }

  .hero__title {
    font-size: 19px;
  }

  .hero__title span {
    font-size: 27px;
  }

  .banner__label {
    font-size: 19px;
  }

  .banner__sub {
    display: none;
  }

  .content {
    gap: 6px;
    padding-top: 14px;
  }

  .progress-card {
    padding: 17px 12px 9px;
  }

  .card-head h2 {
    font-size: 15px;
  }

  .track {
    height: 8px;
  }

  .countdown {
    margin-top: 4px;
  }

  .digit {
    min-width: 17px;
    height: 18px;
    font-size: 11px;
  }

  .product {
    margin-top: 6px;
    padding: 5px;
  }

  .product__copy h3 {
    font-size: 14px;
  }

  .price-line b {
    font-size: 21px;
  }

  .product__old {
    font-size: 8.5px;
  }

  .fan__pic,
  .fan--more {
    width: 34px;
    flex-basis: 34px;
  }

  .fan__label {
    font-size: 8px;
    padding: 1px 5px;
  }

  .fan__label--more {
    padding: 1px 3px;
  }

  .cta {
    height: 50px;
    font-size: 20px;
  }

  .cta__note {
    font-size: 9px;
  }

  .footer__phone b {
    font-size: 15px;
  }
}

@media (max-height: 590px) {
  html,
  body {
    overflow-y: auto;
    overflow-x: hidden;
  }

  .app {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-y: auto;
    scrollbar-width: none;
  }

  .app::-webkit-scrollbar {
    display: none;
  }

  .content {
    flex: 0 0 auto;
  }

  .cta-wrap {
    margin-top: 8px;
  }
}

@supports not (height: 100dvh) {
  html,
  body {
    overflow-y: auto;
    overflow-x: hidden;
  }

  .app {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .content {
    flex: 0 0 auto;
  }

  .cta-wrap {
    margin-top: 10px;
  }
}

@media (min-width: 520px) and (min-height: 760px) {
  .stage {
    align-items: center;
    padding: 18px 0;
  }

  .app {
    height: min(calc(100dvh - 36px), 940px);
    border: 1px solid rgba(255, 214, 140, 0.14);
    border-radius: 30px;
  }
}

@media (max-width: 350px) {
  .brandbar__slogan {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
