/* ===== 食品安全宣传周有奖竞答 · 全局样式（天蓝主题，适配微信 H5） ===== */
:root {
  --red: #0c9cf4;
  --red-dark: #0a7fd0;
  --red-deep: #065a9e;
  --gold: #ffd66b;
  --gold-deep: #f7b733;
  --gold-text: #ffe9b0;
  --ink: #173a5e;
  --paper: #f7fbff;
  --line: #d8e8f8;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #cae4fa;
  min-height: 100vh;
}
.page {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(130% 70% at 50% -12%, #ffffff 0%, #e4f2fe 36%, #c6e3fb 68%, #a9d6f7 100%);
  padding: calc(env(safe-area-inset-top) + 18px) 20px calc(env(safe-area-inset-bottom) + 18px);
  display: flex;
  flex-direction: column;
}
.deco { position: absolute; border-radius: 50%; pointer-events: none; }
.deco-1 { width: 300px; height: 300px; right: -110px; top: -90px; background: radial-gradient(circle, rgba(255, 255, 255, .55), transparent 65%); }
.deco-2 { width: 280px; height: 280px; left: -120px; top: 38%; background: radial-gradient(circle, rgba(255, 255, 255, .35), transparent 65%); }
.deco-3 { width: 360px; height: 360px; right: -140px; bottom: -130px; background: radial-gradient(circle, rgba(255, 255, 255, .45), transparent 65%); }

/* ---------- 首页 ---------- */
.index-head { text-align: center; margin-top: 14px; position: relative; z-index: 1; }
.badge-2026 {
  display: inline-block;
  font-size: .72rem; letter-spacing: .35em; padding: 5px 15px 5px 19px;
  color: #0a6cc4; border: 1px solid rgba(10, 108, 196, .35); border-radius: 999px;
  background: rgba(255, 255, 255, .65);
  margin-bottom: 14px;
}
.index-head h1 {
  font-size: 1.8rem; line-height: 1.38; font-weight: 800; letter-spacing: .05em;
  background: linear-gradient(180deg, #2b8ce0 6%, #0a6cc4 46%, #06477f 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .95)) drop-shadow(0 6px 16px rgba(20, 110, 190, .28));
}
.index-head h1::after {
  content: ""; display: block; width: 130px; height: 3px; margin: 14px auto 0; border-radius: 99px;
  background: linear-gradient(90deg, transparent, rgba(12, 156, 244, .8) 50%, transparent);
}
.subtitle { margin-top: 10px; color: #2e6bb0; font-size: .92rem; letter-spacing: .22em; }
.act-time { margin-top: 10px; color: rgba(23, 58, 94, .7); font-size: .84rem; }
.act-time b { color: #0a7fd0; font-weight: 600; }

.prize-box { margin-top: 26px; position: relative; z-index: 1; }
.prize-title {
  text-align: center; color: #2e6bb0; font-size: .86rem; letter-spacing: .12em; margin-bottom: 12px;
}
.prize-title::before, .prize-title::after { content: "·"; margin: 0 8px; color: #0c9cf4; }
.prize-list { display: flex; gap: 10px; }
.prize-item {
  flex: 1; position: relative; overflow: hidden; text-align: center;
  border-radius: 16px; padding: 16px 6px 13px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .99), rgba(240, 249, 255, .95));
  box-shadow: 0 10px 22px rgba(20, 90, 160, .16), inset 0 0 0 1.5px rgba(247, 183, 51, .55), inset 0 1.5px 0 rgba(255, 255, 255, .95);
}
.prize-item::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 52%; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .8), transparent);
}
.prize-name { position: relative; font-size: .82rem; color: #2e6bb0; font-weight: 600; }
.prize-amount {
  position: relative; margin-top: 6px; font-size: 1.6rem; font-weight: 800;
  background: linear-gradient(180deg, #15a8f8 12%, #0a7fd0 58%, #065a9e 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .8));
}
.prize-amount small { font-size: .68rem; font-weight: 600; margin-left: 2px; color: #3f74b5; -webkit-text-fill-color: #3f74b5; }
.prize-tag { position: relative; margin-top: 6px; font-size: .68rem; color: #6d93c4; }

.rule-brief {
  margin-top: 20px; position: relative; z-index: 1;
  background: rgba(255, 255, 255, .68); border: 1px solid rgba(130, 185, 240, .5);
  border-radius: 12px; padding: 12px 14px; color: #2c4a6e; font-size: .8rem; line-height: 1.9;
}
.rule-brief .rule-link { float: right; color: #0a7fd0; text-decoration: underline; cursor: pointer; }

.btn-group { margin-top: auto; padding-top: 26px; display: flex; flex-direction: column; gap: 12px; position: relative; z-index: 1; }
.btn-main {
  display: block; width: 100%; border: none; cursor: pointer; position: relative; overflow: hidden;
  font-size: 1.12rem; font-weight: 700; letter-spacing: .18em; color: #065a9e;
  padding: 15px 0; border-radius: 999px;
  background: linear-gradient(180deg, #fff3c6 0%, #ffd66b 46%, #f0a92c 100%);
  box-shadow: 0 12px 26px rgba(5, 70, 125, .42), inset 0 -2px 0 rgba(176, 116, 12, .5), inset 0 2px 0 rgba(255, 255, 255, .75);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn-main::after {
  content: ""; position: absolute; top: 0; left: -70%; width: 45%; height: 100%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .7), transparent);
  transform: skewX(-20deg); animation: shine 3.4s ease-in-out infinite;
}
@keyframes shine { 0%, 55% { left: -70%; } 100% { left: 140%; } }
.btn-main:active { transform: translateY(2px) scale(.99); box-shadow: 0 4px 10px rgba(16, 64, 118, .4); }
.btn-main:disabled { opacity: .6; }
.btn-sub {
  display: block; width: 100%; cursor: pointer;
  font-size: 1rem; font-weight: 600; letter-spacing: .18em; color: #0a5fa8;
  padding: 13px 0; border-radius: 999px;
  background: rgba(255, 255, 255, .6); border: 1.5px solid rgba(10, 127, 208, .4);
  box-shadow: 0 6px 16px rgba(20, 90, 160, .1);
}
.btn-sub:active { background: rgba(255, 255, 255, .92); }
.btn-plain { background: none; border: none; color: rgba(23, 58, 94, .6); font-size: .88rem; cursor: pointer; padding: 8px; }

.index-foot { margin-top: 18px; text-align: center; color: rgba(23, 58, 94, .5); font-size: .74rem; line-height: 1.9; position: relative; z-index: 1; }
.index-foot .organizer { font-size: .8rem; color: #2e6bb0; }
.dev-tip { margin-top: 4px; color: #5b8fc7; }

/* ---------- 新版活动首页（设计稿比例 375 × 727） ---------- */
.home-body {
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: hidden;
  background: #e8f4ff;
}
.home-stage {
  position: relative;
  width: min(100vw, 480px);
  height: 100vh;
  height: 100svh;
  min-height: 620px;
  margin: 0 auto;
  overflow: hidden;
  background: #1687ed url("/images/home/home-bg-hd.png?v=202609241752") center / 100% 100% no-repeat;
  box-shadow: 0 0 36px rgba(0, 84, 177, .18);
}
.home-stage button {
  position: absolute;
  z-index: 2;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.home-stage button:active { transform: scale(.96); }
.home-stage button:focus-visible { outline: 2px solid rgba(255, 255, 255, .95); outline-offset: 4px; }
.home-tip {
  left: 5.2%;
  top: 74.3%;
  width: 19%;
  color: #0755c5;
  font-size: clamp(13px, 3.2vw, 16px);
  text-align: center;
}
.home-tip img {
  display: block;
  width: 68%;
  height: auto;
  margin: 0 auto 4px;
  animation: home-tip-jump 1.15s ease-in-out infinite;
  transform-origin: 50% 100%;
}
.home-tip span { display: block; line-height: 1.2; }
@keyframes home-tip-jump {
  0%, 100% { transform: translateY(0) scale(1); }
  38% { transform: translateY(-8px) scale(1.04, .96); }
  58% { transform: translateY(0) scale(.96, 1.04); }
  72% { transform: translateY(-3px) scale(1.01); }
}
.home-start {
  left: 50%;
  top: 73.1%;
  width: 38.4%;
  transform: translateX(-50%);
  filter: drop-shadow(0 7px 5px rgba(4, 68, 190, .25));
  animation: home-breathe 1.8s ease-in-out infinite;
}
.home-start:active { transform: translateX(-50%) scale(.96) !important; }
.home-start img { display: block; width: 100%; height: auto; }
.home-start:disabled {
  cursor: not-allowed;
  filter: grayscale(.25) opacity(.72) drop-shadow(0 5px 4px rgba(4, 68, 190, .15));
  animation: none;
}
@keyframes home-breathe {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.035); }
}
.home-music {
  top: 74.5%;
  right: 5.8%;
  width: 11.7%;
  opacity: .94;
}
.home-music img { display: block; width: 100%; height: auto; }
.home-music.music-on { opacity: 1; filter: drop-shadow(0 0 8px rgba(255, 255, 255, .9)); }
.home-music.music-on img { animation: home-music-rotate 2.8s linear infinite; }
@keyframes home-music-rotate { to { transform: rotate(360deg); } }
.home-complaint {
  top: 82.7%;
  right: 5.4%;
  width: 10.7%;
}
.home-complaint img { display: block; width: 100%; height: auto; }
.home-organizer {
  position: absolute;
  z-index: 2;
  left: 8%;
  width: 84%;
  color: #0755c5;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
}
.home-organizer { top: 86.5%; font-size: clamp(15px, 4vw, 20px); font-weight: 700; }
.home-status,
.home-dev-tip {
  position: absolute;
  z-index: 2;
  left: 50%;
  width: 64%;
  transform: translateX(-50%);
  text-align: center;
  line-height: 1.45;
}
.home-status {
  top: 86%;
  color: #0755c5;
  font-size: clamp(11px, 2.8vw, 14px);
}
.home-dev-tip {
  bottom: calc(env(safe-area-inset-bottom) + 5px);
  color: rgba(0, 69, 158, .76);
  font-size: 10px;
}
@media (min-width: 481px) {
  .home-tip { font-size: 16px; }
  .home-organizer { font-size: 20px; }
}

/* ---------- 弹窗 ---------- */
.modal {
  position: fixed; inset: 0; z-index: 80; display: none;
  align-items: center; justify-content: center; padding: 26px;
  background: rgba(8, 30, 62, .66); backdrop-filter: blur(2px);
}
.modal.active { display: flex; }
.modal-card {
  width: 100%; max-width: 400px; max-height: 82vh; overflow-y: auto;
  background: var(--paper); border-radius: 20px; padding: 24px 20px 22px;
  box-shadow: 0 24px 60px rgba(5, 60, 110, .5), inset 0 1px 0 rgba(255, 255, 255, .9);
  animation: pop-in .22s ease;
}
.modal-card::before {
  content: ""; display: block; width: 46px; height: 4px; margin: -4px auto 14px; border-radius: 99px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold), var(--gold-deep));
}
@keyframes pop-in { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-title { text-align: center; font-size: 1.08rem; font-weight: 700; color: var(--red); margin-bottom: 6px; }
.modal-tip { text-align: center; font-size: .76rem; color: #6d93c4; margin-bottom: 16px; }
.form-item { margin-bottom: 14px; }
.form-item label { display: block; font-size: .82rem; color: #3f74b5; margin-bottom: 6px; }
.form-item input {
  width: 100%; border: 1px solid var(--line); background: #fff;
  border-radius: 10px; padding: 12px 14px; font-size: .95rem; color: var(--ink); outline: none;
}
.form-item input:focus { border-color: var(--gold-deep); box-shadow: 0 0 0 3px rgba(247, 183, 51, .18); }
.modal .btn-main { margin-top: 8px; font-size: 1rem; padding: 13px 0; }
.rules-list { font-size: .85rem; line-height: 2.05; color: #2c4a6e; }
.rules-list li { margin-left: 1.1em; }
.rules-score-btn { margin-top: 10px; }

/* 成绩查询结果 */
.record-block { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 12px; }
.record-block h4 { font-size: .88rem; color: var(--red); margin-bottom: 8px; }
.record-row { display: flex; justify-content: space-between; font-size: .8rem; color: #365a85; padding: 7px 10px; border-radius: 8px; }
.record-row:nth-child(odd) { background: #eef6ff; }
.record-row .hl { color: var(--red); font-weight: 700; }
.empty-tip { text-align: center; color: #7d9dc7; font-size: .84rem; padding: 18px 0; }

/* ---------- 答题页 ---------- */
.page-quiz { background: linear-gradient(180deg, #eef8ff 0%, #d4ebfb 58%, #b6dcf9 100%); }
.quiz-head { position: relative; z-index: 1; }
.quiz-meta { display: flex; justify-content: space-between; align-items: center; color: #2e6bb0; font-size: .85rem; margin-bottom: 10px; }
.quiz-meta .total-time { color: rgba(23, 58, 94, .55); font-size: .76rem; }
.progress-track { height: 7px; border-radius: 99px; background: rgba(10, 80, 160, .12); overflow: hidden; }
.progress-bar { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #45b6f8, #0a7fd0); transition: width .3s ease; box-shadow: 0 0 10px rgba(12, 156, 244, .4); }
.timer-ring {
  margin: 26px auto 0; width: 78px; height: 78px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; position: relative;
  background: conic-gradient(var(--red) calc(var(--p, 1) * 360deg), rgba(10, 80, 160, .12) 0);
  box-shadow: 0 10px 26px rgba(20, 90, 160, .2), 0 0 0 6px rgba(255, 255, 255, .5);
  transition: background .2s linear;
}
.timer-ring::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #fff; }
.timer-ring span { position: relative; font-size: 1.5rem; font-weight: 800; color: #0a5aa8; font-variant-numeric: tabular-nums; }
.timer-ring.hurry span { color: #e5483c; }
.timer-ring.hurry { background: conic-gradient(#ff7b6b calc(var(--p, 1) * 360deg), rgba(10, 80, 160, .12) 0); }

.quiz-main { flex: 1; position: relative; z-index: 1; margin-top: 22px; }
.q-card { background: var(--paper); border-radius: 18px; padding: 20px 18px; box-shadow: 0 14px 32px rgba(20, 90, 160, .18); animation: card-in .25s ease; }
@keyframes card-in { from { transform: translateX(16px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.q-type { display: inline-block; font-size: .7rem; color: #2e6bb0; background: #e3f2ff; border: 1px solid #b8dcff; padding: 3px 10px; border-radius: 99px; margin-bottom: 12px; }
.q-text { font-size: 1.04rem; font-weight: 600; line-height: 1.75; color: var(--ink); margin-bottom: 16px; }
.q-options { display: flex; flex-direction: column; gap: 11px; }
.option {
  display: flex; align-items: flex-start; gap: 11px; cursor: pointer;
  border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 13px 14px;
  font-size: .93rem; line-height: 1.55; color: #22405e; transition: all .14s ease;
  box-shadow: 0 2px 6px rgba(5, 70, 125, .06);
}
.option:active { transform: scale(.985); }
.option .opt-key {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 700; color: #3f74b5; background: #e3f2ff; border: 1px solid #b8dcff; margin-top: 1px;
}
.option.selected { border-color: #5aa8ea; background: #eef6ff; box-shadow: 0 0 0 3px rgba(90, 168, 234, .18); }
.option.selected .opt-key { background: #5aa8ea; border-color: #4a98dd; color: #fff; }
.quiz-foot { position: relative; z-index: 1; padding-top: 20px; }
.multiple-tip { font-size: .74rem; color: #3f74b5; margin-bottom: 8px; }

/* ---------- 成绩页 ---------- */
.page-result { background: radial-gradient(130% 70% at 50% -8%, #ffffff 0%, #e4f2fe 40%, #c2e1fa 72%, #a9d6f7 100%); }
.result-card {
  margin-top: 30px; background: var(--paper); border-radius: 22px; padding: 34px 22px 26px;
  text-align: center; box-shadow: 0 20px 48px rgba(20, 90, 160, .2), inset 0 1px 0 rgba(255, 255, 255, .9);
  position: relative; z-index: 1;
}
.result-card::after {
  content: ""; position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  width: 44px; height: 4px; border-radius: 99px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold), var(--gold-deep));
}
.score-big {
  font-size: 3.8rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #18aaf8 0%, #0a7fd0 55%, #065a9e 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 10px rgba(10, 127, 208, .3));
}
.score-big small { font-size: 1.1rem; font-weight: 600; margin-left: 4px; color: #3f74b5; -webkit-text-fill-color: #3f74b5; }
.score-sub { margin-top: 8px; color: #6d93c4; font-size: .84rem; }
.tier-text {
  margin-top: 18px; display: inline-block; font-size: 1.24rem; font-weight: 800; color: #065a9e;
  background: linear-gradient(180deg, #fff3c6, #ffd66b 70%, #f7c14d); padding: 10px 32px; border-radius: 999px;
  box-shadow: inset 0 -2px 0 rgba(176, 116, 12, .4), inset 0 2px 0 rgba(255, 255, 255, .7), 0 8px 20px rgba(5, 70, 125, .3);
}
.lottery-area { margin-top: 24px; }
.btn-lottery {
  width: 82%; border: none; cursor: pointer; font-size: 1.18rem; font-weight: 800; letter-spacing: .2em; color: #065a9e;
  padding: 16px 0; border-radius: 999px;
  background: linear-gradient(180deg, #fff3c6 0%, #ffd66b 46%, #f0a92c 100%);
  box-shadow: 0 14px 30px rgba(20, 90, 160, .32), inset 0 -2px 0 rgba(176, 116, 12, .5), inset 0 2px 0 rgba(255, 255, 255, .75);
  animation: breathe 1.6s ease-in-out infinite;
}
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.035); } }
.btn-lottery:disabled { animation: none; opacity: .62; }
.lottery-hint { margin-top: 12px; font-size: .8rem; color: #6d93c4; line-height: 1.8; }
.win-info { margin-top: 20px; background: #eef6ff; border: 1px dashed #7fb8ea; border-radius: 14px; padding: 16px; font-size: .88rem; color: #3f74b5; line-height: 1.9; }
.win-info b { color: var(--red); }
.result .btn-group { padding-top: 22px; }
.result-links { display: flex; align-items: center; justify-content: center; color: rgba(23, 58, 94, .6); }
.result-links .btn-plain { padding: 8px 5px; }

/* 红包弹窗 */
.modal-redpacket .rp-stage { width: 100%; max-width: 330px; text-align: center; animation: rp-pop .45s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes rp-pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.rp-envelope {
  position: relative; margin: 0 auto; width: 172px; height: 216px; border-radius: 16px;
  background: linear-gradient(180deg, #e2372b, #bf1e2a 70%);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .4);
}
.rp-envelope::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 62px;
  border-radius: 16px 16px 60% 60%; background: linear-gradient(180deg, #f2b04c, #e08a2a);
}
.rp-coin {
  position: absolute; left: 50%; top: 58px; transform: translateX(-50%);
  width: 74px; height: 74px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe9a8, var(--gold-deep) 70%); border: 3px solid #ffe9a8;
  display: flex; align-items: center; justify-content: center; font-size: 1.7rem; font-weight: 800; color: #8a1a08;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .3);
}
.rp-amount { margin-top: 18px; font-size: 2.6rem; font-weight: 800; color: var(--gold); text-shadow: 0 3px 14px rgba(0, 0, 0, .35), 0 0 22px rgba(255, 214, 107, .55); }
.rp-amount small { font-size: 1rem; margin-left: 4px; }
.rp-name { margin-top: 6px; color: var(--gold-text); font-size: .95rem; letter-spacing: .1em; }
.rp-status { margin-top: 10px; color: rgba(255, 236, 205, .88); font-size: .78rem; line-height: 1.8; padding: 0 10px; }
.rp-close { margin-top: 18px; }
.rp-ready-title { margin-bottom: 18px; color: #fff3c6; font-size: 1.2rem; font-weight: 800; letter-spacing: .06em; text-shadow: 0 3px 12px rgba(0, 0, 0, .35); }
.wheel-wrap { position: relative; width: 230px; height: 230px; margin: 0 auto; filter: drop-shadow(0 15px 24px rgba(0, 0, 0, .35)); }
.wheel-pointer {
  position: absolute; z-index: 3; left: 50%; top: -10px; transform: translateX(-50%);
  width: 0; height: 0; border-left: 15px solid transparent; border-right: 15px solid transparent;
  border-top: 38px solid #fff0a8; filter: drop-shadow(0 3px 2px rgba(90, 25, 5, .4));
}
.packet-wheel {
  position: relative; width: 230px; height: 230px; border-radius: 50%; overflow: hidden;
  border: 8px solid #ffd66b; box-shadow: inset 0 0 0 4px rgba(139, 25, 8, .35);
  background: conic-gradient(from -45deg, #e94b35 0 90deg, #f29a2e 90deg 180deg, #d52e45 180deg 270deg, #6b78a8 270deg 360deg);
  transform: rotate(-45deg);
  transition: transform 3.2s cubic-bezier(.12, .7, .16, 1);
}
.packet-wheel::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: repeating-conic-gradient(from -45deg, transparent 0 88deg, rgba(255,245,190,.9) 88deg 90deg); }
.wheel-label { position: absolute; z-index: 1; color: #fff8d7; font-size: 1.05rem; font-weight: 800; text-shadow: 0 2px 4px rgba(96, 20, 8, .55); }
.wheel-label-5 { left: 50%; top: 24px; transform: translateX(-50%); }
.wheel-label-3 { right: 18px; top: 50%; transform: translateY(-50%) rotate(90deg); }
.wheel-label-1 { left: 50%; bottom: 24px; transform: translateX(-50%) rotate(180deg); }
.wheel-label-thanks { left: 10px; top: 50%; width: 78px; transform: translateY(-50%) rotate(-90deg); font-size: .9rem; }
.wheel-center {
  position: absolute; z-index: 4; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 66px; height: 66px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 25%, #fff1ae, #eab33f 68%); border: 4px solid #fff0a8;
  color: #9b2414; font-size: 1.6rem; font-weight: 900; box-shadow: 0 4px 12px rgba(80, 15, 5, .4);
}
.rp-ready-tip { margin: 18px auto 0; max-width: 280px; color: rgba(255, 244, 222, .92); font-size: .82rem; line-height: 1.8; }
.btn-open-packet {
  display: block; width: 210px; margin: 18px auto 0; border: none; border-radius: 999px; padding: 14px 0;
  background: linear-gradient(180deg, #fff2b8, #ffd064 55%, #e9a72e); color: #8a1a08;
  font-size: 1.1rem; font-weight: 800; letter-spacing: .14em; cursor: pointer;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .28), inset 0 2px 0 rgba(255, 255, 255, .72);
  animation: breathe 1.4s ease-in-out infinite;
}
.btn-open-packet:disabled { animation: none; opacity: .7; }
.rp-later { margin-top: 12px; border: none; background: none; color: rgba(255, 244, 222, .72); font-size: .78rem; cursor: pointer; }

/* toast */
#toast {
  position: fixed; left: 50%; bottom: 16%; transform: translateX(-50%) translateY(10px);
  max-width: 76vw; padding: 11px 18px; border-radius: 10px;
  background: rgba(10, 28, 52, .88); color: #dbeafe; font-size: .85rem; line-height: 1.5;
  opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 999;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.loading-mask { position: fixed; inset: 0; z-index: 90; display: none; align-items: center; justify-content: center; background: rgba(8, 30, 62, .55); }
.loading-mask.active { display: flex; }
.spinner { width: 40px; height: 40px; border-radius: 50%; border: 3px solid rgba(255, 214, 107, .3); border-top-color: var(--gold); animation: spin .8s linear infinite; box-shadow: 0 0 16px rgba(255, 214, 107, .35); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 视觉增强：背景光效 / 漂浮 / 入场 ---------- */
.page::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(2px 2px at 12% 8%, rgba(96, 170, 240, .5), transparent 100%),
    radial-gradient(1.6px 1.6px at 82% 5%, rgba(96, 170, 240, .42), transparent 100%),
    radial-gradient(1.4px 1.4px at 64% 13%, rgba(96, 170, 240, .35), transparent 100%),
    radial-gradient(1.8px 1.8px at 30% 20%, rgba(96, 170, 240, .32), transparent 100%),
    radial-gradient(1.4px 1.4px at 90% 28%, rgba(96, 170, 240, .3), transparent 100%),
    radial-gradient(1.6px 1.6px at 7% 40%, rgba(96, 170, 240, .26), transparent 100%),
    linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, .5) 50%, transparent 58%);
}
.page::after {
  content: ""; position: absolute; top: -150px; left: 50%; z-index: 0; transform: translateX(-50%);
  width: 620px; height: 320px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, .65), transparent 62%);
}
@keyframes float-slow { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(0, -16px, 0); } }
.deco-1 { animation: float-slow 7s ease-in-out infinite; }
.deco-3 { animation: float-slow 9s ease-in-out infinite reverse; }
@keyframes fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.index-head { animation: fade-up .5s ease both; }
.prize-box { animation: fade-up .5s ease .08s both; }
.rule-brief { animation: fade-up .5s ease .16s both; }
.btn-group { animation: fade-up .5s ease .24s both; }
.index-foot { animation: fade-up .5s ease .3s both; }
.result-card { animation: fade-up .45s ease both; }

/* ---------- 成绩与抽奖页：红色庆典参考样式 ---------- */
.page.page-result {
  overflow: visible;
  padding: calc(env(safe-area-inset-top) + 16px) 14px calc(env(safe-area-inset-bottom) + 22px);
  background: linear-gradient(180deg, #d30b20 0%, #b80017 48%, #a90014 100%);
  color: #fff;
}
.page-result::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 520px;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 16%, rgba(255, 213, 70, .4), transparent 22%),
    repeating-conic-gradient(from -10deg at 50% 12%, rgba(255, 112, 76, .38) 0 12deg, transparent 12deg 25deg);
  opacity: 1;
}
.page-result::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 480px;
  height: 540px;
  z-index: 0;
  pointer-events: none;
  transform: translateX(-50%);
  border-radius: 0;
  background: radial-gradient(ellipse at 50% 22%, rgba(255, 190, 60, .25), transparent 58%);
}
.result-home {
  position: relative;
  z-index: 3;
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255,255,255,.65);
  border-radius: 50%;
  background: linear-gradient(180deg, #ffc63c, #f39a13);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  box-shadow: 0 5px 12px rgba(90, 0, 0, .25);
}
.result-home span { font-size: 1.2rem; line-height: 1; }
.result-hero {
  position: relative;
  z-index: 1;
  margin-top: -36px;
  padding: 8px 8px 16px;
  text-align: center;
}
.result-trophy {
  width: 118px;
  height: 96px;
  margin: 0 auto -17px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4.7rem;
  filter: drop-shadow(0 8px 9px rgba(70, 0, 25, .35));
}
.result-success {
  width: min(78vw, 300px);
  margin: 0 auto 17px;
  padding: 11px 12px 13px;
  border: 5px solid #ffdb35;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffbf32, #f47c18);
  color: #fff;
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-shadow: 0 3px 2px rgba(138, 42, 4, .4);
  box-shadow: 0 8px 0 rgba(111, 22, 24, .22), inset 0 2px 0 rgba(255,255,255,.45);
}
.score-line { font-size: 1.55rem; line-height: 1.4; text-shadow: 0 2px 5px rgba(70,0,0,.28); }
.score-line strong { color: #fff1a0; font-size: 2.1rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.score-line strong small { margin-left: 2px; font-size: 1rem; }
.score-duration { margin-top: 4px; font-size: .96rem; color: rgba(255,255,255,.92); }
.page-result .lottery-area { margin-top: 15px; }
.page-result .btn-lottery {
  width: min(72vw, 270px);
  padding: 12px 0;
  color: #9d2013;
  font-size: 1.25rem;
  background: linear-gradient(180deg, #ffe875 0%, #ffc738 52%, #efa21f 100%);
  border: 2px solid rgba(255,239,159,.85);
  box-shadow: 0 8px 18px rgba(70, 0, 0, .28), inset 0 2px 0 rgba(255,255,255,.62);
}
.page-result .lottery-hint { color: rgba(255,255,255,.85); }
.page-result .result-card.draw-card {
  position: relative;
  z-index: 1;
  width: 100%;
  margin-top: 4px;
  padding: 34px 14px 28px;
  border: 7px solid #7677d6;
  border-top-width: 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff 0%, #fff9f5 100%);
  box-shadow: 0 12px 30px rgba(75, 0, 12, .32), inset 0 0 0 1px #eee;
  color: #772a25;
}
.page-result .result-card.draw-card::before {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: -20px;
  height: 16px;
  border-radius: 9px;
  background: #6769cf;
  box-shadow: 0 0 0 5px #55b6ee;
}
.page-result .result-card.draw-card::after { display: none; }
.draw-card h2 { color: #6d6bc9; font-size: 1.12rem; letter-spacing: .04em; }
.draw-card .score-sub { color: #a37d74; }
.draw-card .tier-text {
  margin-top: 10px;
  padding: 6px 20px;
  color: #bd3325;
  font-size: .9rem;
  background: #fff2db;
  box-shadow: none;
}
.inline-lottery { margin-top: 30px; }
.page-result .wheel-wrap {
  width: min(78vw, 320px);
  height: min(78vw, 320px);
  max-width: 320px;
  max-height: 320px;
  filter: drop-shadow(0 14px 12px rgba(107, 34, 22, .2));
}
.page-result .packet-wheel {
  width: 100%;
  height: 100%;
  border: 13px solid #ffb51f;
  box-shadow: inset 0 0 0 5px rgba(255,255,255,.55), 0 0 0 5px #ffd647;
  background: conic-gradient(from -45deg, #fff1dd 0 90deg, #ffd9c9 90deg 180deg, #fff1dd 180deg 270deg, #ffd9c9 270deg 360deg);
}
.page-result .packet-wheel::after {
  background: repeating-conic-gradient(from -45deg, transparent 0 88.5deg, rgba(209,65,39,.2) 88.5deg 90deg);
}
.page-result .wheel-pointer {
  top: -11px;
  border-left-width: 17px;
  border-right-width: 17px;
  border-top: 43px solid #e31d24;
  filter: drop-shadow(0 3px 2px rgba(90,25,5,.32));
}
.page-result .wheel-label { color: #8f2c22; font-size: 1.02rem; text-shadow: none; }
.page-result .wheel-label-5 { top: 12%; }
.page-result .wheel-label-3 { right: 7%; }
.page-result .wheel-label-1 { bottom: 12%; }
.page-result .wheel-label-thanks { left: 3%; width: 31%; font-size: .9rem; }
.page-result .wheel-center {
  width: 82px;
  height: 82px;
  padding: 0;
  border: 7px solid #f7352e;
  background: linear-gradient(180deg, #ed201e, #be0714);
  color: #ffef86;
  font-size: 2rem;
  line-height: 1.18;
  cursor: pointer;
  box-shadow: 0 4px 0 #8f0710, 0 7px 14px rgba(90,0,0,.28);
  animation: breathe 1.4s ease-in-out infinite;
}
.page-result .wheel-center:disabled { opacity: .72; animation: none; }
.page-result .rp-ready-tip { max-width: 310px; color: #a66b60; }
.page-result .win-info { color: #9d4238; background: #fff4e9; border-color: #efaa64; }
.page-result .btn-group { margin-top: 18px; padding-top: 0; }
.page-result .btn-sub {
  color: #9d2013;
  border-color: #ffdf75;
  background: linear-gradient(180deg, #fff09a, #ffc83d);
  box-shadow: 0 7px 15px rgba(75,0,12,.25);
}
.page-result .result-links, .page-result .btn-plain { color: rgba(255,255,255,.82); }

@media (max-width: 360px) {
  .result-hero { margin-top: -32px; }
  .result-trophy { transform: scale(.88); margin-bottom: -22px; }
  .result-success { font-size: 1.3rem; }
  .score-line { font-size: 1.3rem; }
  .page-result .wheel-label { font-size: .9rem; }
}

/* ---------- 成绩页切图精确版 ---------- */
.page.page-result {
  padding: calc(env(safe-area-inset-top) + 10px) 10px calc(env(safe-area-inset-bottom) + 20px);
  background: #c9000d url("/images/result/bg.png") top center / 100% 100% no-repeat;
}
.page-result::before,
.page-result::after { display: none; }
.page-result .result-home {
  width: 48px;
  height: 48px;
  border: 0;
  background: none;
  box-shadow: none;
}
.page-result .result-home img { display: block; width: 100%; height: 100%; }
.page-result .result-hero { margin-top: -42px; padding: 0 8px 10px; }
.result-badge {
  display: block;
  width: min(62vw, 250px);
  height: auto;
  margin: 0 auto 2px;
  filter: drop-shadow(0 7px 8px rgba(82,0,12,.25));
}
.page-result .score-line { margin-top: -2px; font-size: 1.5rem; }
.page-result .score-line strong { font-size: 2.15rem; color: #fff; }
.page-result .score-duration { margin-top: 2px; font-size: .96rem; }
.page-result .btn-lottery {
  display: block;
  width: min(54vw, 220px);
  margin-left: auto;
  margin-right: auto;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  animation: result-button-breathe 1.7s ease-in-out infinite;
}
@keyframes result-button-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.035); }
}
.page-result .btn-lottery img { display: block; width: 100%; height: auto; }
.page-result .btn-lottery.is-confirm {
  min-height: 44px;
  border: 2px solid rgba(255,239,159,.85);
  border-radius: 24px;
  background: linear-gradient(180deg, #ffe875 0%, #ffc738 52%, #efa21f 100%);
  color: #9d2013;
  font-size: 1.08rem;
  font-weight: 800;
  box-shadow: 0 7px 15px rgba(70,0,0,.25), inset 0 2px 0 rgba(255,255,255,.55);
}
.page-result .lottery-hint { margin-top: 7px; font-size: .72rem; line-height: 1.45; }
.page-result .result-card.draw-card {
  min-height: 500px;
  margin-top: 2px;
  padding: 46px 20px 32px;
  border: 0;
  border-radius: 0;
  background: transparent url("/images/result/board.png") center / 100% 100% no-repeat;
  box-shadow: none;
}
.page-result .result-card.draw-card::before,
.page-result .result-card.draw-card::after { display: none; }
.page-result .draw-card h2 { color: #6867c8; font-size: 1.08rem; }
.page-result .draw-card .score-sub { margin-top: 6px; color: #a5796f; }
.page-result .draw-card .tier-text { display: none; }
.fail-illustration { display: block; width: 82%; height: auto; margin: 28px auto 0; }
.fail-illustration[hidden] { display: none; }
.page-result .inline-lottery { margin-top: 25px; }
.page-result .wheel-wrap {
  width: min(75vw, 315px);
  height: min(75vw, 315px);
  max-width: 315px;
  max-height: 315px;
  filter: none;
}
.page-result .packet-wheel {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: visible;
  border: 0;
  background: none;
  box-shadow: none;
  transform: rotate(0deg);
}
.page-result .packet-wheel::after { display: none; }
.wheel-art { display: block; width: 100%; height: 100%; }
.page-result .wheel-pointer {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 18%;
  width: 34px;
  height: 34%;
  border: 0;
  background: linear-gradient(180deg, #ff2430, #c90d16);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  transform: translateX(-50%);
  filter: drop-shadow(0 2px 2px rgba(90,0,0,.25));
}
.page-result .wheel-center {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
  width: 76px;
  height: 76px;
  border: 8px solid #ff2630;
  background: #d60816;
  color: #ffef6f;
  font-size: 1rem;
  line-height: 1.08;
  letter-spacing: .04em;
  box-shadow: 0 4px 0 #9a0610, 0 6px 12px rgba(90,0,0,.25);
  animation: wheel-center-breathe 1.4s ease-in-out infinite;
}
@keyframes wheel-center-breathe {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.035); }
}
.wheel-shadow {
  position: absolute;
  z-index: 0;
  left: 50%;
  bottom: -28px;
  width: 96%;
  height: auto;
  transform: translateX(-50%);
}
.page-result .rp-ready-tip { margin-top: 36px; color: #9e6f65; }
.page-result .win-info { position: relative; z-index: 2; }

@media (max-width: 360px) {
  .page-result .result-hero { margin-top: -40px; }
  .result-badge { width: 60vw; }
  .page-result .result-card.draw-card { min-height: 470px; padding-top: 42px; }
  .page-result .wheel-center { width: 68px; height: 68px; font-size: .9rem; }
}

