/* ============================================================================
   天天领券 · CPS 领券页
   移动优先（375–430px），桌面 430px 居中展示
   ========================================================================== */

/* ---------- Design Tokens ---------- */
:root {
  --brand-1: #FF5000;
  --brand-2: #FF8A00;
  --brand-3: #FFC300;

  --dark: #17110F;
  --dark-2: #2A1811;
  --bg: #FFF9F5;
  --card: #FFFFFF;

  --ink: #141414;
  --ink-2: #6E6E73;
  --ink-3: #A8A8AD;
  --line: rgba(23, 17, 15, .07);

  --danger: #FF3B30;
  --green: #00B578;

  --shell: 430px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);

  --r-lg: 20px;
  --r-md: 16px;
  --r-sm: 12px;

  --shadow-card: 0 4px 16px rgba(23, 17, 15, .05);
  --shadow-lift: 0 12px 30px -10px rgba(255, 80, 0, .55);

  --ease: cubic-bezier(.22, 1, .36, 1);

  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

h1, h2, h3, h4, p { margin: 0; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---------- Shell ---------- */
.app {
  position: relative;
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  background: var(--bg);
  overflow-x: clip;
}

/* ---------- Top Nav ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 50;
  width: min(var(--shell), 100%);
  padding: calc(8px + var(--safe-t)) 14px 8px;
  transform: translateX(-50%);
  transition: background .3s var(--ease), box-shadow .3s var(--ease);
}

.nav.is-scrolled {
  background: rgba(20, 20, 26, .78);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .07);
}

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

.nav__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.nav__logo {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 9px;
  background: linear-gradient(140deg, #FF5000, #FFB020);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 12px -3px rgba(255, 80, 0, .8);
}

.nav__name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .02em;
  color: #fff;
}

.nav__tag {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .08);
  font-size: 11px;
  letter-spacing: .02em;
  color: rgba(255, 255, 255, .72);
  white-space: nowrap;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 0;
  overflow: hidden;
}



/* 细噪点，避免大色块发灰 */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .035;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hero__inner {
  position: relative;
  z-index: 2;
}

/* ---------- Carousel ---------- */
.carousel {
  position: relative;
  overflow: hidden;
}

/* 顶部压暗，保证导航文字在亮色 banner 上可读 */
.carousel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: calc(56px + var(--safe-t));
  z-index: 3;
  background: linear-gradient(180deg, rgba(0, 0, 0, .38) 0%, transparent 100%);
  pointer-events: none;
}

.carousel__track {
  display: flex;
  /* 宽度与单卡宽度由 JS 按张数写入 */
  /* 纵向手势交给页面滚动，横向由 JS 接管，触摸和鼠标都能拖 */
  touch-action: pan-y;
  will-change: transform;
}

.slide {
  position: relative;
  flex: 0 0 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: calc(200px + var(--safe-t));
  padding: calc(56px + var(--safe-t)) 24px 24px;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  cursor: pointer;
  text-align: center;
  -webkit-user-select: none;
  user-select: none;
}

.slide[data-theme="blue"] { background: linear-gradient(140deg, #1E4BD8 0%, #2E6BFF 55%, #4C8DFF 100%); }
.slide[data-theme="orange"] { background: linear-gradient(140deg, #FF3D00 0%, #FF6A00 52%, #FFA51F 100%); }
.slide[data-theme="yellow"] { background: linear-gradient(130deg, #FFD52E 0%, #FFB300 55%, #FF9500 100%); color: #3A2600; }
.slide[data-theme="amber"] { background: linear-gradient(130deg, #FFB020 0%, #FF8A00 55%, #FF5A00 100%); }

/* 右上光斑 */
.slide::before {
  content: "";
  position: absolute;
  top: -46%;
  right: -14%;
  z-index: -1;
  width: 64%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .32) 0%, rgba(255, 255, 255, 0) 70%);
}

/* 左下圆环 */
.slide::after {
  content: "";
  position: absolute;
  left: -14%;
  bottom: -58%;
  z-index: -1;
  width: 56%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .2);
}

.slide__shine {
  position: absolute;
  inset: -40% -10%;
  z-index: -1;
  background: linear-gradient(100deg,
    transparent 44%, rgba(255, 255, 255, .2) 50%, transparent 56%);
  transform: skewX(-14deg);
  animation: sheen 6s ease-in-out infinite;
  pointer-events: none;
}

.slide__badge {
  padding: 2px 9px;
  border-radius: 999px;
  background: #fff;
  color: #E03A00;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .16);
}

.slide[data-theme="yellow"] .slide__badge {
  color: #8A5A00;
}

.slide__title {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.01em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .16);
}

.slide__sub {
  font-size: 10.5px;
  line-height: 1.4;
  opacity: .84;
}

.slide__cta {
  margin-top: 2px;
  padding: 6px 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, #FFE68A 0%, #FFC02E 55%, #FFA51F 100%);
  color: #D62B00;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .04em;
  box-shadow:
    0 6px 14px rgba(0, 0, 0, .18),
    inset 0 1px 0 rgba(255, 255, 255, .7);
}

.slide[data-theme="yellow"] .slide__cta {
  background: #3A2600;
  color: #FFD98A;
}

/* 指示点 */
.carousel__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(14px + var(--safe-b));
  z-index: 4;
  display: flex;
  justify-content: center;
  gap: 5px;
}

.dot {
  width: 6px;
  height: 6px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .55);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
  transition: width .25s var(--ease), background .25s var(--ease);
}

.dot.is-active {
  width: 16px;
  background: #fff;
}

/* ---------- Section ---------- */
.section {
  padding: 24px 16px 4px;
}

/* 锚点跳转时避开固定导航 */
section[id],
.group { scroll-margin-top: 72px; }

.section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .01em;
}

.section__bar {
  width: 3px;
  height: 15px;
  border-radius: 2px;
  background: linear-gradient(180deg, #FF5000, #FFB020);
}

.section__hint {
  font-size: 11px;
  color: var(--ink-3);
}

/* ---------- Groups ---------- */
.groups {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.group__head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}

.group__title {
  flex: none;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--ink);
}

.group__hint {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.group__more {
  flex: none;
  margin-left: auto;
  font-size: 12px;
  font-weight: 500;
  color: var(--brand-1);
}

.group__grid {
  display: grid;
  gap: 10px;
}

.group__grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.group__grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.group__grid--one { grid-template-columns: 1fr; }

/* ---------- Poster ---------- */
.poster {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px;
  border-radius: 16px;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  box-shadow: 0 12px 26px -14px rgba(23, 17, 15, .55);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}

.poster:active { transform: scale(.978); }

.poster--square { aspect-ratio: 1 / 1; }
.poster--wide { aspect-ratio: 2.5 / 1; }

.poster[data-theme="orange"] { background: linear-gradient(140deg, #FF3D00 0%, #FF6A00 52%, #FFA51F 100%); }
.poster[data-theme="blue"] { background: linear-gradient(140deg, #0057FF 0%, #0091FF 58%, #38C6FF 100%); }
.poster[data-theme="yellow"] { background: linear-gradient(120deg, #FFD52E 0%, #FFB300 52%, #FF9500 100%); color: #3A2600; }
.poster[data-theme="red"] { background: linear-gradient(140deg, #C8102E 0%, #E1251B 52%, #FF5A3C 100%); }
.poster[data-theme="crimson"] { background: linear-gradient(140deg, #D91E18 0%, #E22E1F 55%, #FF6B3D 100%); }
.poster[data-theme="dark"] { background: linear-gradient(140deg, #161823 0%, #2B2B3A 60%, #45455A 100%); }

/* 右上角光斑 */
.poster::before {
  content: "";
  position: absolute;
  top: -34%;
  right: -18%;
  z-index: -1;
  width: 72%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .34) 0%, rgba(255, 255, 255, 0) 70%);
}

/* 左下装饰圆环 */
.poster::after {
  content: "";
  position: absolute;
  left: -18%;
  bottom: -46%;
  z-index: -1;
  width: 68%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .2);
}

.poster__shine {
  position: absolute;
  inset: -40% -10%;
  z-index: -1;
  background: linear-gradient(100deg,
    transparent 44%, rgba(255, 255, 255, .2) 50%, transparent 56%);
  transform: skewX(-14deg);
  animation: sheen 6s ease-in-out infinite;
  pointer-events: none;
}

.poster__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #fff;
  color: #E03A00;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .14);
}

.poster[data-theme="yellow"] .poster__badge {
  color: #8A5A00;
}

.poster__amount {
  position: absolute;
  top: 34px;
  left: 11px;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 4px 16px rgba(0, 0, 0, .16);
}

.poster__amount i {
  font-style: normal;
  font-size: 13px;
  font-weight: 700;
  margin-right: 1px;
}

/* 三列小卡空间不足，只保留标题 */
.group__grid--three .poster__amount { display: none; }

.poster__title {
  font-size: 19px;
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -.01em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .16);
}

.poster--wide .poster__title { font-size: 21px; }

/* 宽卡金额挪到右上角，与左上角平台标签对称，不压标题 */
.poster--wide .poster__amount {
  top: 10px;
  right: 16px;
  left: auto;
  font-size: 26px;
}

.group__grid--three .poster__title {
  font-size: 15px;
  line-height: 1.25;
}

.poster__sub {
  margin-top: 5px;
  padding-right: 18px;
  font-size: 10.5px;
  line-height: 1.4;
  opacity: .84;
}

.poster--wide .poster__sub { padding-right: 0; }

.poster__go {
  position: absolute;
  right: 11px;
  bottom: 6px;
  font-size: 20px;
  line-height: 1;
  opacity: .6;
}

/* 复制淘口令按钮 */
.poster__copy {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .22);
  border: 1px solid rgba(255, 255, 255, .42);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.poster__copy:active { opacity: .8; }

.poster__cta {
  align-self: flex-start;
  margin-top: 10px;
  padding: 7px 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, #FFE68A 0%, #FFC02E 55%, #FFA51F 100%);
  color: #D62B00;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  box-shadow:
    0 6px 14px rgba(0, 0, 0, .18),
    inset 0 1px 0 rgba(255, 255, 255, .6);
}

.poster[data-theme="yellow"] .poster__cta {
  background: #3A2600;
  color: #FFD98A;
  box-shadow: 0 6px 14px rgba(58, 38, 0, .28);
}

/* ---------- Footer ---------- */
.footer {
  padding: 30px 22px calc(30px + var(--safe-b));
  text-align: center;
}

.footer__notice {
  font-size: 11px;
  line-height: 1.7;
  color: var(--ink-3);
}

.footer__copy {
  margin-top: 8px;
  font-size: 10px;
  color: rgba(168, 168, 173, .7);
}

/* ---------- WeChat / QQ Guide ---------- */
.guide {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
}

.guide[hidden] { display: none; }

.guide__mask {
  position: absolute;
  inset: 0;
  background: rgba(10, 8, 7, .74);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: fadeIn .25s ease;
}

.guide__tip {
  position: absolute;
  top: calc(14px + var(--safe-t));
  right: 22px;
  z-index: 2;
  color: #fff;
  opacity: .92;
  transform: rotate(45deg);
  animation: tipBob 1.5s ease-in-out infinite;
}

.guide__card {
  position: relative;
  z-index: 2;
  width: min(320px, 82vw);
  margin: auto;
  padding: 24px 20px 18px;
  border-radius: var(--r-lg);
  background: #fff;
  text-align: center;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .4);
  animation: cardIn .32s var(--ease);
}

.guide__title {
  font-size: 17px;
  font-weight: 600;
}

.guide__desc {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--ink-2);
}

.guide__dots {
  display: inline-block;
  padding: 0 3px;
  font-weight: 700;
  color: var(--ink);
}

.guide__link {
  margin-top: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #F7F2EE;
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--ink-2);
  word-break: break-all;
  -webkit-user-select: all;
  user-select: all;
}

.guide__actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.guide__btn {
  flex: 1;
  height: 42px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  transition: opacity .2s ease;
}

.guide__btn:active { opacity: .8; }

.guide__btn--ghost {
  background: #F4EFEB;
  color: var(--ink-2);
}

.guide__btn--primary {
  background: linear-gradient(118deg, #FF5000, #FF8A00);
  color: #fff;
  box-shadow: 0 8px 18px -10px rgba(255, 80, 0, .9);
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: calc(36px + var(--safe-b));
  left: 50%;
  z-index: 120;
  max-width: 82vw;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(23, 17, 15, .92);
  color: #fff;
  font-size: 12.5px;
  line-height: 1.4;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 10px);
  transition: opacity .22s ease, transform .22s var(--ease);
  pointer-events: none;
}

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

/* ---------- Reveal ----------
   默认可见，进入视口时才播放动画：IO 失效或截图场景不会出现空白 */
.reveal.is-in {
  animation: revealIn .55s var(--ease) backwards;
}

@keyframes revealIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Keyframes ---------- */
@keyframes glowBreath {
  0%, 100% { opacity: .78; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

@keyframes sheen {
  0%, 62% { transform: translateX(-70%) skewX(-14deg); }
  100% { transform: translateX(90%) skewX(-14deg); }
}

@keyframes tipBob {
  0%, 100% { transform: rotate(45deg) translate(0, 0); }
  50% { transform: rotate(45deg) translate(4px, -4px); }
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px) scale(.96); }
  to { opacity: 1; transform: none; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------- Desktop ---------- */
@media (min-width: 560px) {
  body {
    background:
      radial-gradient(90% 60% at 50% 0%, #24242C 0%, #121216 55%, #08080A 100%);
  }

  .app {
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, .07),
      0 40px 120px rgba(0, 0, 0, .65);
  }
}

/* ---------- Desktop Aside ---------- */
.desktop-aside {
  display: none;
}

@media (min-width: 1000px) {
  .desktop-aside {
    position: fixed;
    top: 50%;
    right: clamp(20px, 4vw, 72px);
    z-index: 10;
    display: flex;
    flex-direction: column;
    width: 220px;
    padding: 22px 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .1);
    transform: translateY(-50%);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }

  .desktop-aside__eyebrow {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .22em;
    color: rgba(255, 255, 255, .36);
  }

  .desktop-aside__title {
    margin-top: 8px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    color: #fff;
  }

  .desktop-aside__desc {
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.65;
    color: rgba(255, 255, 255, .48);
  }

  .desktop-aside__btn {
    margin-top: 18px;
    padding: 10px 0;
    border-radius: 999px;
    background: linear-gradient(120deg, #FF5000, #FF8A00);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 8px 20px -10px rgba(255, 80, 0, .9);
    transition: transform .2s var(--ease);
  }

  .desktop-aside__btn:active { transform: scale(.98); }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  .reveal { opacity: 1; transform: none; }
}
