/* ===== 蛋仔派对主播粉丝抽奖 · 前台样式 v2（糖果游乐园风） ===== */
:root {
  --sun: #ffd24a;
  --sun-deep: #ff9d00;
  --sky: #6fd2ff;
  --pink: #ff7fb0;
  --grape: #8f6cff;
  --grape-deep: #6a4de0;
  --mint: #3fbe83;
  --ink: #2b2440;
  --ink-2: #4a4066;
  --muted: #7d74a0;
  --line: #ece7fb;
  --card: #ffffff;
  --radius-lg: 28px;
  --radius: 24px;
  --radius-sm: 16px;
  --shadow-card: 0 14px 34px rgba(88, 52, 150, 0.12), 0 3px 10px rgba(88, 52, 150, 0.05);
  --shadow-pop: 0 18px 44px rgba(88, 52, 150, 0.18);
  --font: "MiSans", "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  background:
    radial-gradient(760px 420px at 88% -60px, rgba(255, 210, 74, 0.5), transparent 62%),
    radial-gradient(620px 380px at -90px 26%, rgba(110, 240, 205, 0.42), transparent 62%),
    radial-gradient(700px 420px at 110% 78%, rgba(255, 143, 205, 0.35), transparent 62%),
    linear-gradient(180deg, #8fd3ff 0%, #a9b9ff 32%, #d3b5ff 62%, #ffc3e1 100%);
  background-attachment: fixed;
}

img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea { font-family: inherit; font-size: 16px; color: inherit; }
a { color: inherit; }

.app { width: 100%; max-width: 520px; margin: 0 auto; padding: 12px 14px 46px; }

/* ---------- 通用卡 ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 18px 16px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  position: relative;
}
.card-title {
  display: flex; align-items: center; gap: 9px;
  font-size: 17px; font-weight: 900; letter-spacing: 0.4px;
  margin: 0 0 6px; color: var(--ink);
}
.card-title .dot {
  width: 10px; height: 10px; border-radius: 4px; flex: none;
  background: linear-gradient(140deg, var(--sun), var(--pink));
  transform: rotate(45deg);
  box-shadow: 0 0 0 4px rgba(255, 157, 0, 0.14);
}
.card-sub { font-size: 12px; color: var(--muted); margin: 0 0 12px; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 6px 12px; }
.section-head h2 {
  font-size: 20px; margin: 0; font-weight: 900; letter-spacing: 0.5px; color: var(--ink);
  background: linear-gradient(transparent 66%, rgba(255, 210, 74, 0.75) 66%);
  padding: 0 2px;
}
.section-head span { font-size: 12px; color: #5d5382; font-weight: 700; }

/* ---------- 头图（舞台场景） ---------- */
.hero {
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 20px 18px 16px;
  color: #fff;
  background: linear-gradient(163deg, #7b6cff 0%, #b15cff 48%, #ff7fb0 100%);
  box-shadow: 0 20px 44px rgba(104, 60, 190, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.hero::before {
  content: ""; position: absolute; left: 50%; top: -140px; width: 460px; height: 460px;
  transform: translateX(-50%);
  background: conic-gradient(from 0deg, rgba(255, 255, 255, 0.16) 0 10deg, transparent 10deg 32deg);
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 62%);
  mask-image: radial-gradient(circle, #000 0%, transparent 62%);
  animation: heroSpin 24s linear infinite;
  pointer-events: none;
}
@keyframes heroSpin { to { transform: translateX(-50%) rotate(360deg); } }
.hero::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.55) 1px, transparent 1px);
  background-size: 22px 22px; opacity: 0.35; pointer-events: none;
}
.hero > * { position: relative; z-index: 2; }
.cloud {
  position: absolute; z-index: 1; background: rgba(255, 255, 255, 0.85);
  border-radius: 999px; pointer-events: none;
}
.cloud.c1 { width: 150px; height: 44px; left: -34px; top: 108px; animation: drift 9s ease-in-out infinite; }
.cloud.c2 { width: 110px; height: 34px; right: -26px; top: 56px; animation: drift 11s ease-in-out infinite reverse; }
.cloud.c3 { width: 84px; height: 26px; left: 42%; bottom: 64px; opacity: 0.65; animation: drift 13s ease-in-out infinite; }
@keyframes drift { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(14px); } }
.spark {
  position: absolute; z-index: 1; width: 10px; height: 10px; pointer-events: none;
  background: #ffe27a; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: twinkle 2.6s ease-in-out infinite;
}
.spark.s1 { left: 18px; top: 190px; }
.spark.s2 { right: 30px; top: 150px; animation-delay: 0.9s; width: 7px; height: 7px; }
.spark.s3 { right: 96px; bottom: 120px; animation-delay: 1.6s; width: 8px; height: 8px; }
.spark.s4 { left: 44%; top: 40px; animation-delay: 0.4s; width: 7px; height: 7px; }
@keyframes twinkle { 0%, 100% { opacity: 0.15; transform: scale(0.6) rotate(0deg); } 50% { opacity: 1; transform: scale(1.15) rotate(24deg); } }
.mascot { position: absolute; z-index: 1; pointer-events: none; filter: drop-shadow(0 6px 10px rgba(80, 30, 120, 0.25)); }
.mascot.m1 { right: 10px; top: 116px; width: 52px; animation: bob 3.4s ease-in-out infinite; }
.mascot.m2 { left: 14px; top: 64px; width: 40px; animation: bob 4.2s ease-in-out infinite reverse; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-9px) rotate(5deg); } }
.stk { right: 14px; top: 70px; }

.hero-top { display: flex; align-items: center; gap: 11px; }
.avatar {
  width: 54px; height: 54px; border-radius: 20px; flex: none;
  background: linear-gradient(150deg, #ffe7ae, #ffc0d4);
  display: grid; place-items: center;
  font-size: 22px; font-weight: 900; color: #7a4a12;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9), 0 8px 18px rgba(70, 20, 110, 0.35);
  overflow: hidden;
}
.who { flex: 1; min-width: 0; }
.who-name { display: flex; align-items: center; gap: 7px; font-weight: 900; font-size: 15.5px; text-shadow: 0 1px 6px rgba(70, 20, 110, 0.35); }
.who-name .tag {
  font-size: 10px; font-weight: 900; padding: 2px 7px; border-radius: 8px;
  background: linear-gradient(140deg, #ffd24a, #ff9d00); color: #5c3200;
  box-shadow: 0 2px 6px rgba(70, 20, 110, 0.3); letter-spacing: 1px;
}
.who-sub { font-size: 11.5px; color: rgba(255, 255, 255, 0.8); margin-top: 1px; }
.status-pill {
  flex: none; font-size: 11px; font-weight: 900; padding: 5px 11px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.2); color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: inline-flex; align-items: center; gap: 5px;
}
.status-pill i { width: 7px; height: 7px; border-radius: 50%; background: #7dffb8; box-shadow: 0 0 8px #7dffb8; }
.status-pill.paused i { background: #ffd24a; box-shadow: 0 0 8px #ffd24a; }
.status-pill.ended i, .status-pill.draft i, .status-pill.not_started i { background: rgba(255, 255, 255, 0.6); box-shadow: none; }

.stk {
  position: absolute; z-index: 2; right: -6px; top: 74px;
  font-size: 11px; font-weight: 900; letter-spacing: 1px; color: #5c3200;
  background: linear-gradient(140deg, #ffe27a, #ffb300);
  padding: 5px 12px 5px 10px; border-radius: 12px 4px 12px 4px;
  transform: rotate(3deg);
  box-shadow: 0 6px 14px rgba(70, 20, 110, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.hero h1 {
  font-size: 27px; line-height: 1.24; margin: 16px 0 9px;
  font-weight: 900; letter-spacing: 0.5px;
  text-shadow: 0 2px 0 rgba(90, 30, 130, 0.3), 0 8px 22px rgba(70, 20, 110, 0.3);
}
.hero .sub {
  font-size: 12.5px; color: #fff; margin: 0 0 18px; font-weight: 700;
  text-shadow: 0 1px 5px rgba(70, 20, 110, .55);
}

.countdown {
  display: flex; gap: 7px; align-items: center;
  padding: 9px 10px; border-radius: 18px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.countdown .label { font-size: 11px; color: rgba(255, 255, 255, 0.85); margin-right: 2px; font-weight: 700; }
.cd-cell {
  flex: 1; text-align: center; border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.12));
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 3px 0 4px; position: relative; overflow: hidden;
}
.cd-cell b {
  display: block; font-size: 19px; font-weight: 900; letter-spacing: 0.5px;
  font-variant-numeric: tabular-nums; color: #fff;
  text-shadow: 0 2px 6px rgba(70, 20, 110, 0.35);
}
.cd-cell span { font-size: 9.5px; color: rgba(255, 255, 255, 0.75); letter-spacing: 2px; }
.countdown.done .cd-cell b { color: rgba(255, 255, 255, 0.6); text-shadow: none; }

.hero-note {
  display: flex; gap: 6px; align-items: flex-start;
  margin-top: 13px; font-size: 10.5px; line-height: 1.5; color: rgba(255, 255, 255, 0.88);
}
.hero-note svg { flex: none; margin-top: 1px; opacity: 0.9; }

/* ---------- 公告 ---------- */
.notice {
  display: flex; gap: 10px; align-items: flex-start;
  background: linear-gradient(120deg, #fff6dc, #ffeede);
  border: 1.5px solid #ffd666;
  border-radius: var(--radius-sm);
  padding: 11px 13px; margin-bottom: 16px;
  font-size: 12.5px; color: #7a5a1a; line-height: 1.55; font-weight: 600;
  box-shadow: 0 8px 20px rgba(214, 148, 70, 0.14);
}
.notice svg { flex: none; margin-top: 1px; color: #e09a00; }

/* ---------- 邀请码 ---------- */
.invite-card { overflow: hidden; }
.invite-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.invite-state {
  font-size: 11px; font-weight: 900; padding: 4px 10px; border-radius: 999px;
  background: #f1edff; color: #7d74a0; letter-spacing: 0.5px;
}
.invite-state.ok { background: linear-gradient(140deg, #d9ffe9, #b8f4d4); color: #157a52; }
.invite-desc { font-size: 12.5px; color: var(--muted); margin: 2px 0 12px; }
.invite-row { display: flex; gap: 9px; }
.input-wrap {
  flex: 1; position: relative; display: flex; align-items: center;
  background: #f6f3ff; border: 2px solid #e2d9ff; border-radius: 16px;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
.input-wrap:focus-within { border-color: var(--grape); background: #fff; box-shadow: 0 0 0 4px rgba(143, 108, 255, 0.18); }
.input-wrap.error { border-color: #ff6b8a; background: #fff5f7; box-shadow: 0 0 0 4px rgba(255, 107, 138, 0.14); }
.input-wrap input {
  width: 100%; border: 0; background: none; outline: none;
  padding: 13px 14px; letter-spacing: 3px; font-weight: 900; text-transform: uppercase; color: var(--ink);
}
.input-wrap input::placeholder { letter-spacing: 0.5px; font-weight: 600; color: #b3aacd; text-transform: none; }
.btn {
  border-radius: 16px; font-weight: 900; font-size: 14.5px; letter-spacing: 1px;
  padding: 13px 18px; transition: transform 0.1s, box-shadow 0.15s, opacity 0.18s, filter 0.15s;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap;
}
.btn:active { transform: scale(0.96); }
.btn-primary {
  background: linear-gradient(180deg, #ffe27a 0%, #ffc93d 52%, #ff9d00 100%);
  color: #5c3200;
  box-shadow: 0 8px 0 -2px #e07800, 0 12px 22px rgba(255, 140, 0, 0.35), inset 0 2px 0 rgba(255, 255, 255, 0.75);
}
.btn-primary:disabled { background: #edeaf6; color: #a9a3c4; box-shadow: 0 6px 0 -2px #d5d0ea; cursor: not-allowed; }
.btn-ghost { background: #f6f3ff; color: var(--ink-2); border: 2px solid #e2d9ff; }
.btn-soft { background: linear-gradient(140deg, #fff2cf, #ffe3ae); color: #8a5a00; }
.btn-block { width: 100%; }
.btn-lg { padding: 16px 20px; font-size: 16.5px; border-radius: 18px; }

.hint { font-size: 11.5px; color: var(--muted); margin: 10px 0 0; }
.field-error {
  display: none; align-items: center; gap: 6px;
  font-size: 12.5px; color: #e23a63; margin-top: 9px; font-weight: 800;
}
.field-error.show { display: flex; }
.shake { animation: shake 0.34s; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  22% { transform: translateX(-6px); }
  44% { transform: translateX(5px); }
  66% { transform: translateX(-3px); }
  88% { transform: translateX(2px); }
}

.invite-ok {
  display: none; align-items: center; gap: 11px;
  background: linear-gradient(120deg, #e9fbf1, #f2fff8);
  border: 2px solid #9fe6c3; border-radius: 18px; padding: 13px 15px;
}
.invite-ok.show { display: flex; animation: pop 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.4); }
.invite-ok .ico {
  width: 38px; height: 38px; border-radius: 14px; flex: none;
  background: linear-gradient(140deg, #57e39c, #1fae6e); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 6px 14px rgba(31, 174, 110, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.invite-ok b { display: block; font-size: 13.5px; color: #116244; font-weight: 900; }
.invite-ok small { font-size: 11.5px; color: #3f8a6c; font-weight: 600; }
@keyframes pop { from { transform: scale(0.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- 奖品 ---------- */
.prize-note {
  display: flex; gap: 8px; align-items: flex-start;
  font-size: 11.5px; color: #6b5b9e; line-height: 1.55; font-weight: 600;
  background: #f6f3ff; border-radius: 14px; padding: 10px 12px; margin-bottom: 14px;
  border: 1.5px dashed #d8ccff;
}
.prize-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.prize-card {
  position: relative;
  background: #fff; border-radius: 20px; padding: 9px 9px 11px;
  border: 2px solid #f0ecfb;
  box-shadow: 0 10px 24px rgba(88, 52, 150, 0.1);
  text-align: left; transition: transform 0.16s, box-shadow 0.2s;
  overflow: hidden;
}
.prize-card:active { transform: scale(0.97); }
.prize-card.q1 { border-color: #ffd24a; box-shadow: 0 12px 28px rgba(255, 157, 0, 0.22); }
.prize-card.q2 { border-color: #c9b0ff; box-shadow: 0 12px 28px rgba(124, 77, 255, 0.2); }
.prize-card.q3 { border-color: #a8dcff; box-shadow: 0 12px 28px rgba(46, 155, 255, 0.2); }
.prize-card.q4 { border-color: #a8ecc9; box-shadow: 0 12px 28px rgba(47, 190, 131, 0.2); }
.prize-card.q5 { border-color: #e4e0f2; }
.prize-media {
  position: relative; width: 100%; aspect-ratio: 1 / 1; border-radius: 14px;
  background: radial-gradient(120% 90% at 50% 0%, #fffdf8 0%, #f4f0ff 100%);
  overflow: hidden; display: grid; place-items: center;
}
.prize-card.q1 .prize-media { background: radial-gradient(120% 90% at 50% 0%, #fffbe8 0%, #ffedbe 100%); }
.prize-card.q2 .prize-media { background: radial-gradient(120% 90% at 50% 0%, #f8f4ff 0%, #e7dbff 100%); }
.prize-card.q3 .prize-media { background: radial-gradient(120% 90% at 50% 0%, #f0f9ff 0%, #d9efff 100%); }
.prize-card.q4 .prize-media { background: radial-gradient(120% 90% at 50% 0%, #f1fdf6 0%, #d9f6e7 100%); }
.prize-media::after {
  content: ""; position: absolute; top: -30%; left: -70%; width: 46%; height: 160%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.65), transparent);
  transform: skewX(-18deg);
}
.prize-card.q1 .prize-media::after { animation: sheen 3.2s ease-in-out infinite; }
@keyframes sheen { 0% { left: -70%; } 55% { left: 130%; } 100% { left: 130%; } }
/* 绝对定位同理：横屏/矮屏会把 .prize-media 压到 max-height:180px，
   宽度仍随栅格变宽，grid 居中的 img 会撑成正方形被切。 */
.prize-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; z-index: 1; }
.media-fallback { position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0; display: none; z-index: 2; }
.prize-media.failed > img { display: none; }
.prize-media.failed .media-fallback { display: block; }
.media-fallback .ph { width: 100%; height: 100%; object-fit: contain; }
.media-fallback .retry {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%);
  font-size: 10.5px; font-weight: 900; color: #6b4a00; white-space: nowrap;
  background: rgba(255, 255, 255, 0.95); border: 1.5px solid #ffd666;
  padding: 4px 10px; border-radius: 999px;
  box-shadow: 0 3px 10px rgba(150, 110, 40, 0.2);
}
.q-chip {
  position: absolute; left: 0; top: 8px; z-index: 3;
  font-size: 10px; font-weight: 900; padding: 3px 9px 3px 8px;
  border-radius: 0 10px 10px 0; color: #fff; letter-spacing: 1px;
  background: linear-gradient(140deg, #ffb300, #ff7a00);
  box-shadow: 0 3px 8px rgba(160, 90, 0, 0.35);
}
.q-chip.q2 { background: linear-gradient(140deg, #b78cff, #7c4dff); box-shadow: 0 3px 8px rgba(90, 50, 190, 0.35); }
.q-chip.q3 { background: linear-gradient(140deg, #6fd2ff, #2e9bff); box-shadow: 0 3px 8px rgba(30, 110, 200, 0.35); }
.q-chip.q4 { background: linear-gradient(140deg, #7fe6b0, #2fbe83); box-shadow: 0 3px 8px rgba(30, 140, 90, 0.35); }
.q-chip.q5 { background: linear-gradient(140deg, #cfc9e6, #9a93bd); box-shadow: 0 3px 8px rgba(90, 80, 130, 0.3); }
.mode-chip {
  position: absolute; right: 6px; top: 6px; z-index: 3;
  font-size: 9.5px; font-weight: 900; padding: 2px 7px; border-radius: 8px;
  background: rgba(43, 36, 64, 0.6); color: #fff; backdrop-filter: blur(4px);
  letter-spacing: 1px;
}
.prize-name {
  font-size: 14.5px; font-weight: 900; margin: 9px 2px 3px; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: 0.3px;
}
.prize-meta { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 0 2px; }
.prize-meta span { font-size: 10.5px; color: var(--muted); font-weight: 600; }
.prize-meta .stock { color: #c47715; font-weight: 900; }
.prize-meta .stock.out { color: #b0a9c9; }

/* ---------- 抽奖 ---------- */
.draw-card { overflow: hidden; }
.draw-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 13px; }
.chance {
  font-size: 11.5px; font-weight: 900; color: #8a5a00;
  background: linear-gradient(140deg, #fff2cf, #ffe3ae);
  border: 1.5px solid #ffd666;
  padding: 4px 12px; border-radius: 999px;
}
.chance.zero { background: #f1edff; color: #7d74a0; border-color: #e2d9ff; }

.locked-panel {
  display: grid; justify-items: center; gap: 6px; text-align: center;
  padding: 24px 12px 26px;
  background: linear-gradient(180deg, #f8f5ff, #f2edff);
  border: 2px dashed #cfc2ff; border-radius: 20px;
}
.locked-panel .lock-ico {
  width: 56px; height: 56px; border-radius: 20px; display: grid; place-items: center;
  background: linear-gradient(140deg, #b9a5ff, #8f6cff); color: #fff; margin-bottom: 2px;
  box-shadow: 0 8px 18px rgba(106, 77, 224, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.locked-panel b { font-size: 15px; font-weight: 900; }
.locked-panel p { font-size: 12px; color: var(--muted); margin: 0; max-width: 270px; }

.agree-row {
  display: flex; gap: 10px; align-items: flex-start;
  background: #f8f5ff; border: 1.5px solid #e6dfff; border-radius: 16px;
  padding: 11px 13px; margin-bottom: 13px; font-size: 12px; color: #5d5382;
  line-height: 1.55; font-weight: 600;
}
.agree-row.invalid { border-color: #ff6b8a; background: #fff5f7; animation: shake 0.34s; }
.checkbox {
  flex: none; width: 21px; height: 21px; border-radius: 8px; margin-top: 1px;
  border: 2px solid #cfc2ff; background: #fff; display: grid; place-items: center;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.checkbox.checked { background: linear-gradient(140deg, #b78cff, #7c4dff); border-color: #7c4dff; transform: scale(1.05); }
.checkbox svg { opacity: 0; transition: opacity 0.15s; }
.checkbox.checked svg { opacity: 1; }
.agree-row a { color: #7c4dff; font-weight: 900; text-decoration: underline; text-underline-offset: 2px; }

.draw-btn-wrap { position: relative; }
.draw-btn-wrap::before {
  content: ""; position: absolute; top: -4px; right: -4px; bottom: -4px; left: -4px; inset: -4px; border-radius: 999px;
  border: 2px solid rgba(255, 174, 32, 0.55);
  animation: pulseRing 1.9s ease-out infinite; pointer-events: none;
}
@keyframes pulseRing {
  0% { transform: scale(0.96); opacity: 0.9; }
  70% { transform: scale(1.08); opacity: 0; }
  100% { transform: scale(1.08); opacity: 0; }
}
.draw-btn {
  width: 100%; position: relative; overflow: hidden;
  background: linear-gradient(180deg, #ffea8a 0%, #ffc93d 48%, #ff9d00 100%);
  color: #5c3200; font-size: 19px; font-weight: 900; letter-spacing: 3px;
  padding: 17px; border-radius: 999px;
  box-shadow: 0 9px 0 -1px #e07800, 0 18px 34px rgba(255, 140, 0, 0.4), inset 0 2px 0 rgba(255, 255, 255, 0.8);
  transition: transform 0.1s, box-shadow 0.12s;
}
.draw-btn::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.7), transparent);
  transform: skewX(-18deg); animation: shine 3s infinite;
}
@keyframes shine { 0% { left: -60%; } 45% { left: 130%; } 100% { left: 130%; } }
.draw-btn:active { transform: translateY(7px); box-shadow: 0 2px 0 -1px #e07800, 0 8px 16px rgba(255, 140, 0, 0.3), inset 0 2px 0 rgba(255, 255, 255, 0.8); }
.draw-btn:disabled { background: #edeaf6; color: #a9a3c4; box-shadow: 0 6px 0 -1px #d5d0ea; }
.draw-btn:disabled::after { display: none; }

.draw-stage {
  display: none; position: relative; overflow: hidden;
  border-radius: 22px; padding: 28px 16px 28px;
  background: linear-gradient(165deg, #5a48e8 0%, #8f5cff 55%, #c86dff 100%);
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 14px 30px rgba(106, 77, 224, 0.3);
}
.draw-stage.show { display: block; animation: pop 0.3s ease-out; }
.stage-egg {
  width: 94px; height: 102px; margin: 0 auto 15px; position: relative;
  border-radius: 50% 50% 48% 48% / 56% 56% 44% 44%;
  background: linear-gradient(160deg, #ffffff 0%, #fff3cf 50%, #ffd24a 100%);
  box-shadow: inset -8px -10px 0 rgba(214, 150, 0, 0.16), 0 14px 26px rgba(40, 15, 90, 0.4);
  animation: wobble 1.05s ease-in-out infinite;
  z-index: 1;
}
.stage-egg::before, .stage-egg::after {
  content: ""; position: absolute; top: 42%; width: 9px; height: 11px; border-radius: 50%;
  background: #4a3a1a; opacity: 0.8;
}
.stage-egg::before { left: 28%; }
.stage-egg::after { right: 28%; }
.stage-egg .mouth {
  position: absolute; left: 50%; top: 58%; width: 17px; height: 8px;
  transform: translateX(-50%);
  border-bottom: 3px solid #4a3a1a; border-radius: 0 0 12px 12px; opacity: 0.72;
}
@keyframes wobble {
  0%, 100% { transform: rotate(-5deg) translateY(0); }
  35% { transform: rotate(6deg) translateY(-9px); }
  70% { transform: rotate(-3deg) translateY(2px); }
}
.stage-rays {
  position: absolute; left: 50%; top: 44%; width: 320px; height: 320px;
  transform: translate(-50%, -50%);
  background: conic-gradient(from 0deg, rgba(255, 210, 74, 0.6) 0 9deg, transparent 9deg 30deg);
  animation: spin 6s linear infinite; opacity: 0.55; z-index: 0;
  -webkit-mask-image: radial-gradient(circle, #000 30%, transparent 68%);
  mask-image: radial-gradient(circle, #000 30%, transparent 68%);
}
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.stage-text { position: relative; z-index: 1; font-size: 15.5px; font-weight: 900; color: #fff; letter-spacing: 2px; text-shadow: 0 2px 8px rgba(40, 15, 90, 0.4); }
.stage-sub { position: relative; z-index: 1; font-size: 11.5px; color: rgba(255, 255, 255, 0.78); margin-top: 3px; font-weight: 600; }
.stage-dots { display: flex; gap: 6px; justify-content: center; margin-top: 11px; position: relative; z-index: 1; }
.stage-dots i { width: 7px; height: 7px; border-radius: 50%; background: #ffd24a; opacity: 0.4; animation: blink 1.2s infinite; }
.stage-dots i:nth-child(2) { animation-delay: 0.18s; }
.stage-dots i:nth-child(3) { animation-delay: 0.36s; }
@keyframes blink { 0%, 100% { opacity: 0.25; transform: scale(0.85); } 50% { opacity: 1; transform: scale(1.1); } }

.result-bar {
  display: none; align-items: center; gap: 10px; margin-top: 13px;
  background: linear-gradient(120deg, #f8f5ff, #fdf3ff); border: 1.5px solid #e2d9ff;
  border-radius: 16px; padding: 11px 13px;
}
.result-bar.show { display: flex; animation: pop 0.3s ease-out; }
.result-bar .txt { flex: 1; font-size: 12px; color: #5d5382; font-weight: 600; }
.result-bar .txt b { display: block; color: var(--ink); font-size: 13px; font-weight: 900; }
.result-bar button { font-size: 12.5px; font-weight: 900; color: #7c4dff; flex: none; }

.state-banner {
  display: none; gap: 9px; align-items: flex-start;
  border-radius: 16px; padding: 12px 13px; font-size: 12.5px; line-height: 1.55; font-weight: 600;
  margin-bottom: 13px;
}
.state-banner.show { display: flex; }
.state-banner.warn { background: #fff6df; border: 1.5px solid #ffd666; color: #8a6114; }
.state-banner.danger { background: #fff0f3; border: 1.5px solid #ffb7c9; color: #b03358; }
.state-banner.info { background: #eef4ff; border: 1.5px solid #bcd6ff; color: #2b5c8c; }

/* ---------- 规则 ---------- */
.rule-list { display: grid; margin-top: 4px; }
.rule-item {
  display: grid; grid-template-columns: 78px 1fr; gap: 10px;
  padding: 11px 0; border-bottom: 1px dashed #e6dfff; font-size: 12.5px;
}
.rule-item:last-child { border-bottom: 0; }
.rule-item dt { color: #7c4dff; font-weight: 900; font-size: 12px; }
.rule-item dd { margin: 0; color: #4a4066; line-height: 1.65; font-weight: 500; }

.prob-table { margin-top: 14px; border-radius: 16px; overflow: hidden; border: 1.5px solid #e6dfff; }
.prob-head, .prob-row { display: grid; grid-template-columns: 1fr 64px 64px; align-items: center; }
.prob-head { background: #f6f3ff; font-size: 11px; color: #7d74a0; padding: 8px 12px; font-weight: 900; }
.prob-row { padding: 9px 12px; font-size: 12px; border-top: 1px solid #f0ecfb; background: #fff; font-weight: 600; }
.prob-row span:last-child, .prob-head span:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.prob-row .bar { height: 6px; border-radius: 4px; background: #efeafd; margin-top: 5px; overflow: hidden; }
.prob-row .bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #ffd24a, #ff7fb0); }
.prob-row em { font-style: normal; font-weight: 900; color: #c47715; }

.disclaimer {
  margin-top: 14px; background: linear-gradient(120deg, #fff1f6, #fff8f0);
  border: 1.5px solid #ffc4d8; border-radius: 16px; padding: 12px 13px;
  font-size: 11.5px; color: #9c4a68; line-height: 1.62; font-weight: 600;
}
.disclaimer b { display: block; color: #d6336c; margin-bottom: 3px; font-size: 12.5px; font-weight: 900; }
.privacy { margin-top: 11px; font-size: 11px; color: #8d84ad; line-height: 1.6; font-weight: 500; }

/* ---------- 页脚 ---------- */
.foot {
  text-align: center; font-size: 11px; color: #4f4478; line-height: 1.8;
  padding: 12px 16px; font-weight: 600;
  background: rgba(255, 255, 255, 0.55); border-radius: 20px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.foot b { color: #b03358; font-weight: 900; }
.foot .links { display: flex; gap: 16px; justify-content: center; margin-top: 6px; }
.foot .links button { font-size: 11px; color: #7c4dff; font-weight: 900; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- 弹层 ---------- */
.overlay {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; inset: 0; z-index: 60;
  background: rgba(38, 28, 66, 0.5);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: none; align-items: flex-end; justify-content: center;
}
.overlay.show { display: flex; animation: fade 0.2s; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.sheet {
  width: 100%; max-width: 520px; max-height: 88vh; overflow: auto;
  background: #fff; border-radius: 28px 28px 0 0;
  padding: 8px 18px 28px;
  animation: slideUp 0.28s cubic-bezier(0.2, 0.8, 0.3, 1);
  -webkit-overflow-scrolling: touch;
}
@keyframes slideUp { from { transform: translateY(30px); opacity: 0.6; } to { transform: translateY(0); opacity: 1; } }
.sheet-handle { width: 44px; height: 5px; border-radius: 3px; background: #e6dfff; margin: 6px auto 14px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sheet-head h3 { margin: 0; font-size: 17px; font-weight: 900; letter-spacing: 0.3px; }
.icon-btn { width: 32px; height: 32px; border-radius: 12px; display: grid; place-items: center; background: #f4f1ff; color: #6b6191; }
.sheet-media {
  width: 100%; aspect-ratio: 1/1; max-height: 300px; border-radius: 20px; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, #fffdf8, #f4f0ff);
  display: grid; place-items: center; margin-bottom: 13px; position: relative;
  border: 2px solid #f0ecfb;
}
/* 图片必须绝对定位：容器是 aspect-ratio 1/1 + max-height，
   宽度大于 max-height 时容器变宽不变高，而 grid 居中的 img 用 height:100%
   解析不到容器高度，会按宽度撑成正方形、被 overflow:hidden 切掉下半截
   （660 宽实测切掉 174px，角色看起来像被拦腰截断）。 */
.sheet-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.ph-chip {
  position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 2;
  font-size: 10.5px; font-weight: 900; color: #8a6a3e; white-space: nowrap;
  background: rgba(255, 255, 255, 0.94); border: 1.5px solid #ffd666;
  padding: 3px 10px; border-radius: 999px;
}
.sheet-title-row { display: flex; align-items: center; gap: 9px; margin-bottom: 4px; }
.sheet-title-row h4 { margin: 0; font-size: 20px; font-weight: 900; letter-spacing: 0.3px; }
.badge {
  font-size: 11px; font-weight: 900; padding: 3px 9px; border-radius: 9px;
  background: linear-gradient(140deg, #ffd24a, #ff9d00); color: #fff; letter-spacing: 1px;
  box-shadow: 0 3px 8px rgba(200, 120, 0, 0.3);
}
.badge.gray { background: linear-gradient(140deg, #cfc9e6, #9a93bd); box-shadow: none; }
.sheet-desc { font-size: 13px; color: #4a4066; line-height: 1.68; margin: 8px 0 0; font-weight: 500; }
.kv-list { margin-top: 14px; border-top: 1.5px dashed #e6dfff; }
.kv { display: grid; grid-template-columns: 84px 1fr; gap: 8px; padding: 10px 0; border-bottom: 1px dashed #efeafd; font-size: 12.5px; }
.kv:last-child { border-bottom: 0; }
.kv dt { color: #8d84ad; font-weight: 700; }
.kv dd { margin: 0; color: #2b2440; word-break: break-word; font-weight: 700; }
.sheet-actions { display: flex; gap: 10px; margin-top: 16px; }
.sheet-actions .btn { flex: 1; }

.overlay.center { align-items: center; padding: 18px; }
.modal {
  width: 100%; max-width: 400px; background: #fff; border-radius: 28px;
  padding: 0 20px 20px; position: relative; overflow: hidden;
  box-shadow: 0 30px 70px rgba(40, 20, 80, 0.4);
  animation: modalIn 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2);
  max-height: 90vh; overflow-y: auto;
}
@keyframes modalIn { from { transform: scale(0.9) translateY(16px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }
.modal .close {
  position: absolute; right: 12px; top: 12px; z-index: 5;
  width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, 0.9);
  display: grid; place-items: center; color: #6b6191;
  box-shadow: 0 3px 10px rgba(40, 20, 80, 0.2);
}
.win-head {
  text-align: center; margin: 0 -20px 16px; padding: 22px 20px 18px;
  background: linear-gradient(163deg, #7b6cff 0%, #b15cff 52%, #ff7fb0 100%);
  position: relative; overflow: hidden;
}
.win-head::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.5) 1px, transparent 1px);
  background-size: 20px 20px; opacity: 0.4; pointer-events: none;
}
.win-head > * { position: relative; z-index: 1; }
.win-kicker {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 900; letter-spacing: 3px;
  color: #5c3200; background: linear-gradient(140deg, #ffe27a, #ffb300);
  padding: 4px 12px; border-radius: 999px;
  box-shadow: 0 4px 12px rgba(70, 20, 110, 0.35);
}
.win-head h3 { margin: 9px 0 3px; font-size: 24px; font-weight: 900; letter-spacing: 1px; color: #fff; text-shadow: 0 2px 0 rgba(90, 30, 130, 0.3); }
.win-head p { margin: 0; font-size: 12px; color: rgba(255, 255, 255, 0.88); font-weight: 600; }
.win-head.lose { background: linear-gradient(163deg, #8d84ad 0%, #6b6191 100%); }
.win-head.lose .win-kicker { background: rgba(255, 255, 255, 0.22); color: #fff; box-shadow: none; }
.win-media {
  /* 居中：显式给宽度（否则 auto 宽度会填满，margin:auto 不起作用），
     max-height 只在小屏/横屏时把方框压扁，图片仍由 contain 兜住。 */
  width: min(100%, 218px); aspect-ratio: 1/1; max-height: 218px; border-radius: 22px; overflow: hidden; margin: 0 auto 12px;
  background: radial-gradient(120% 90% at 50% 0%, #fffbe8, #ffedbe);
  display: grid; place-items: center; position: relative;
  border: 3px solid #ffd24a;
  box-shadow: 0 10px 26px rgba(255, 157, 0, 0.3), inset 0 0 0 2px rgba(255, 255, 255, 0.8);
}
/* 同上：中奖弹窗宽度大于 218px 时，不绝对定位就会把立绘上下切掉 */
.win-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.win-name { text-align: center; font-size: 20px; font-weight: 900; margin-bottom: 3px; letter-spacing: 0.5px; }
.win-quality { text-align: center; font-size: 11.5px; color: var(--muted); font-weight: 700; }

.code-box {
  display: flex; align-items: center; gap: 8px;
  background: linear-gradient(120deg, #fdf8ec, #fffdf6); border: 1.5px dashed #e8c98a;
  border-radius: 16px; padding: 11px 13px; margin-top: 14px;
}
.code-box .k { font-size: 10.5px; color: #b09877; letter-spacing: 0.5px; font-weight: 700; }
.code-box .v { font-size: 17px; font-weight: 900; letter-spacing: 1.5px; color: #7a4a12; font-variant-numeric: tabular-nums; }
.code-box .copy { font-size: 11px; font-weight: 900; color: #c47715; flex: none; padding: 6px 8px; background: #fff; border-radius: 9px; border: 1.5px solid #f0dcae; }
.code-box.q { background: linear-gradient(120deg, #f2f9ff, #fbfdff); border-color: #a8dcff; }
.code-box.q .v { color: #1d6fa8; }
.code-box.q .copy { color: #2b7ba5; border-color: #bfe3f7; }

.deadline {
  display: flex; align-items: center; gap: 6px; justify-content: center;
  font-size: 11.5px; color: #c2567a; margin-top: 12px; font-weight: 800;
}
.state-tag {
  display: inline-block; font-size: 11px; font-weight: 900; padding: 3px 9px;
  border-radius: 8px; background: #f1edff; color: #7d74a0; letter-spacing: 0.5px;
}
.state-tag.ok { background: linear-gradient(140deg, #d9ffe9, #b8f4d4); color: #116244; }
.state-tag.wait { background: linear-gradient(140deg, #fff2cf, #ffe3ae); color: #8a5a00; }
.state-tag.bad { background: #ffe4ea; color: #c22850; }

.lose-egg {
  width: 86px; height: 94px; margin: 8px auto 12px;
  border-radius: 50% 50% 48% 48% / 56% 56% 44% 44%;
  background: linear-gradient(160deg, #fdfaf4, #ece7f5 60%, #d9d2ec);
  position: relative;
  box-shadow: inset -6px -8px 0 rgba(120, 100, 160, 0.14);
}
.lose-egg::before, .lose-egg::after {
  content: ""; position: absolute; top: 44%; width: 8px; height: 8px; border-radius: 50%; background: #8d84ad;
}
.lose-egg::before { left: 30%; }
.lose-egg::after { right: 30%; }
.lose-egg .mouth { position: absolute; left: 50%; top: 60%; width: 18px; height: 3px; border-radius: 2px; background: #9a93bd; transform: translateX(-50%); }

.confetti { position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.confetti i {
  position: absolute; top: -12px; width: 8px; height: 12px; border-radius: 3px;
  opacity: 0.9; animation: fall 2.6s linear infinite;
}
.confetti i:nth-child(1) { left: 8%; background: #ffd24a; }
.confetti i:nth-child(2) { left: 20%; background: #ff7fb0; animation-delay: 0.4s; }
.confetti i:nth-child(3) { left: 33%; background: #6fd2ff; animation-delay: 0.8s; }
.confetti i:nth-child(4) { left: 47%; background: #b78cff; animation-delay: 0.2s; }
.confetti i:nth-child(5) { left: 60%; background: #7fe6b0; animation-delay: 0.6s; }
.confetti i:nth-child(6) { left: 72%; background: #ffd24a; animation-delay: 1s; }
.confetti i:nth-child(7) { left: 85%; background: #ff7fb0; animation-delay: 0.3s; }
.confetti i:nth-child(8) { left: 93%; background: #6fd2ff; animation-delay: 0.7s; }
@keyframes fall {
  0% { transform: translateY(-10px) rotate(0); opacity: 0; }
  12% { opacity: 0.95; }
  100% { transform: translateY(430px) rotate(320deg); opacity: 0; }
}

/* 表单 */
.field { margin-bottom: 13px; }
.field label { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 900; color: #4a4066; margin-bottom: 6px; }
.field label em { font-style: normal; font-size: 10.5px; color: #a49bc4; font-weight: 700; }
.field input, .field textarea {
  width: 100%; border: 2px solid #e6dfff; background: #faf8ff; border-radius: 15px;
  padding: 12px 13px; outline: none; transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
  font-weight: 600;
}
.field input:focus, .field textarea:focus { border-color: #8f6cff; background: #fff; box-shadow: 0 0 0 4px rgba(143, 108, 255, 0.16); }
.field input::placeholder, .field textarea::placeholder { color: #b3aacd; font-size: 14px; font-weight: 500; }
.field .err { font-size: 11.5px; color: #e23a63; margin-top: 5px; display: none; font-weight: 700; }
.field.invalid input { border-color: #ff6b8a; background: #fff8fa; }
.field.invalid .err { display: block; }
.form-note {
  font-size: 11px; color: #6b6191; line-height: 1.6; font-weight: 600;
  background: #f8f5ff; border-radius: 14px; padding: 10px 12px; margin: 12px 0;
  border: 1.5px dashed #d8ccff;
}

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 86px; transform: translate(-50%, 12px);
  z-index: 90; max-width: 88vw;
  background: rgba(43, 36, 64, 0.94); color: #fff;
  font-size: 13px; font-weight: 600; padding: 12px 17px; border-radius: 16px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
  opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s;
  text-align: center; line-height: 1.5;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { background: rgba(22, 118, 82, 0.95); }
.toast.err { background: rgba(178, 40, 80, 0.95); }

/* skeleton */
.skeleton {
  background: linear-gradient(90deg, #efeafd 25%, #f8f5ff 37%, #efeafd 63%);
  background-size: 400% 100%; animation: sk 1.3s infinite; border-radius: 12px;
}
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

@media (min-width: 560px) {
  .app { padding: 20px 0 60px; }
  .hero { padding: 24px 22px 18px; }
  .hero h1 { font-size: 30px; }
  .prize-grid { gap: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ============ 幸运转盘 ============ */
.wheel-wrap {
  --slot-r: 98px;
  --bulb-r: 145px;
  --slot-w: 62px;
  --slot-h: 64px;
  --slot-img: 33px;
  --slot-font: 10px;
  position: relative;
  /* 不用 min()/aspect-ratio 作为唯一来源，老内核也有高度 */
  width: 300px; max-width: 82vw;
  height: 300px; max-height: 82vw;
  aspect-ratio: 1 / 1;
  margin: 8px auto 16px;
  display: grid;
  place-items: center;
  transition: filter .25s ease;
}
/* 旧内核不支持 conic-gradient 时，外圈至少是彩色渐变而不是纯白 */
@supports not (background: conic-gradient(red, blue)) {
  .wheel-rim { background: linear-gradient(135deg, #ffd24a, #ff8fc0, #a98bff, #6fd2ff, #7ce0b0); }
}
.wheel-wrap.locked { filter: saturate(.82) brightness(.99); }
.wheel-rim {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, #ffd24a, #ff8fc0, #a98bff, #6fd2ff, #7ce0b0, #ffd24a);
  box-shadow: 0 16px 34px rgba(88, 52, 150, .28), inset 0 0 0 3px rgba(255, 255, 255, .5);
}
.wheel-rim .bulb {
  position: absolute; left: 50%; top: 50%;
  width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px;
  border-radius: 50%; background: #fff; box-shadow: 0 0 7px 2px rgba(255, 255, 255, .75);
  /* 先给不依赖 CSS 变量的回退，再由 JS 写入精确像素 transform */
  transform: rotate(0deg) translateY(-145px);
  transform: rotate(var(--a)) translateY(calc(-1 * var(--bulb-r)));
  animation: bulbBlink 1.4s infinite alternate;
}
.wheel-rim .bulb:nth-child(even) { animation-delay: .7s; }
@keyframes bulbBlink { from { opacity: .45; } to { opacity: 1; } }

.wheel {
  position: absolute; top: 10px; right: 10px; bottom: 10px; left: 10px; inset: 10px; border-radius: 50%;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .92), 0 6px 18px rgba(60, 30, 110, .2);
  transform: rotate(0deg); transform-origin: 50% 50%;
  will-change: transform; overflow: hidden;
}
.wheel.spinning { animation: wheelSpin .55s linear infinite; }
@keyframes wheelSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.wheel-slots { position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0; }
.wheel-slot {
  position: absolute; left: 50%; top: 50%;
  width: 62px; width: var(--slot-w, 62px);
  height: 64px; height: var(--slot-h, 64px);
  margin: -32px 0 0 -31px;
  display: block; text-align: center;
  transform: rotate(0deg) translateY(-98px);
  transform: rotate(var(--a)) translateY(calc(-1 * var(--slot-r)));
}
.wheel-slot-inner {
  display: block; text-align: center;
  transform: rotate(0deg);
  transform: rotate(var(--neg-a, 0deg));
}
.wheel-slot img {
  display: block; margin: 0 auto 1px;
  width: 33px; width: var(--slot-img, 33px);
  height: 33px; height: var(--slot-img, 33px);
  object-fit: contain;
  border-radius: 50%; background: rgba(255, 255, 255, .78);
  box-shadow: 0 2px 6px rgba(80, 50, 120, .18);
}
.wheel-slot span {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 10px; font-size: var(--slot-font, 10px);
  font-weight: 900; color: #5b4479; letter-spacing: .2px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .85);
}
.wheel-pointer {
  position: absolute; top: -9px; left: 50%; z-index: 5;
  width: 0; height: 0; transform: translateX(-50%);
  border-left: 13px solid transparent; border-right: 13px solid transparent;
  border-top: 27px solid #ff4f7e;
  filter: drop-shadow(0 3px 5px rgba(170, 30, 80, .4));
}
.wheel-pointer::before {
  content: ''; position: absolute; left: -9px; top: -31px;
  width: 18px; height: 18px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #ffc7dc);
  box-shadow: 0 2px 6px rgba(170, 30, 80, .35);
}
.wheel-go {
  position: absolute; left: 50%; top: 50%; z-index: 4;
  width: 88px; height: 88px; border-radius: 50%; border: 5px solid #fff;
  transform: translate(-50%, -50%);
  background: linear-gradient(145deg, #ffdc63, #ff9d00);
  color: #fff; font-family: var(--font); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  box-shadow: 0 8px 0 #d97900, 0 14px 26px rgba(210, 110, 0, .4), inset 0 2px 0 rgba(255, 255, 255, .7);
  transition: transform .12s ease, box-shadow .12s ease;
}
.wheel-go b { font-size: 17px; font-weight: 900; letter-spacing: 1px; text-shadow: 0 1px 3px rgba(120, 60, 0, .4); }
.wheel-go small { font-size: 9.5px; font-weight: 800; opacity: .92; }
.wheel-go:active:not(:disabled) {
  transform: translate(-50%, calc(-50% + 5px));
  box-shadow: 0 3px 0 #d97900, 0 8px 16px rgba(210, 110, 0, .35), inset 0 2px 0 rgba(255, 255, 255, .7);
}
.wheel-go:disabled {
  background: linear-gradient(145deg, #cfc8ec, #a99fd0);
  box-shadow: 0 8px 0 #8d84b5, 0 14px 26px rgba(88, 52, 150, .22);
  cursor: not-allowed;
}
.wheel-go.spinning b { animation: goPulse .7s ease-in-out infinite alternate; }
@keyframes goPulse { from { transform: scale(1); } to { transform: scale(1.09); } }

.wheel-lock {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0; z-index: 6; border-radius: 50%;
  display: grid; place-items: center; align-content: center; gap: 7px;
  background: radial-gradient(circle at 50% 50%, rgba(43, 36, 64, .55) 0 28%, rgba(43, 36, 64, .18) 78%);
  color: #fff; text-align: center;
}
.wheel-lock .lock-ico {
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255, 255, 255, .94); color: #7c4dff;
  display: grid; place-items: center;
  box-shadow: 0 6px 16px rgba(30, 15, 70, .3);
}
.wheel-lock b { font-size: 13px; font-weight: 900; text-shadow: 0 2px 6px rgba(30, 15, 70, .5); }

/* 规则区：动态条目 */
.rule-list:empty::after {
  content: '主播暂未配置活动规则。'; display: block;
  padding: 10px 2px; font-size: 13px; color: var(--muted);
}
.statement-box {
  margin-top: 14px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: #f7f4ff; border: 1px solid #e7dfff;
  font-size: 12px; line-height: 1.75; color: #6b6088;
}
.statement-box b { display: block; font-size: 12.5px; color: #574a7d; margin-bottom: 3px; }
.statement-box .privacy { margin: 8px 0 0; }

/* ===== 音效开关 / 非转盘模式 / 多尺寸与安全区 ===== */
.draw-top-right { display: flex; align-items: center; gap: 8px; }
.sound-btn {
  width: 32px; height: 32px; padding: 0; border-radius: 50%;
  border: 1.5px solid #e2d9ff; background: #f8f5ff; color: #7c4dff;
  display: grid; place-items: center; cursor: pointer; flex: none;
}
.sound-btn .ic-on { display: none; }
.sound-btn .ic-off { display: block; }
.sound-btn.on .ic-on { display: block; }
.sound-btn.on .ic-off { display: none; }
.sound-btn:active { transform: scale(.94); }

/* 后台关闭「转盘模式」：隐藏扇区，只保留普通开奖按钮 */
.wheel-wrap.legacy {
  height: auto; max-height: none; min-height: 118px;
  display: flex; align-items: center; justify-content: center;
}
.wheel-wrap.legacy .wheel-rim,
.wheel-wrap.legacy .wheel,
.wheel-wrap.legacy .wheel-slots,
.wheel-wrap.legacy .wheel-pointer { display: none; }
.wheel-wrap.legacy .wheel-lock {
  border-radius: 20px; background: rgba(43, 36, 64, .16);
}
.wheel-wrap.legacy .wheel-go {
  position: relative; left: auto; top: auto; transform: none;
  width: 220px; height: 62px; border-radius: 999px;
  flex-direction: row; gap: 8px;
}
.wheel-wrap.legacy .wheel-go:active:not(:disabled) { transform: translateY(4px); }
.wheel-wrap.legacy .wheel-go small { font-size: 11px; }

/* 刘海屏 / Home 条安全区 */
.app { padding-bottom: calc(30px + env(safe-area-inset-bottom, 0px)); }
.foot { padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
.toast { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
.overlay .sheet { padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }

/* 横屏 / 矮屏：弹层高度收敛并可滚动，避免提交按钮被遮 */
@media (max-height: 520px), (orientation: landscape) and (max-width: 900px) {
  .hero { padding-top: 14px; padding-bottom: 12px; }
  .countdown { padding: 8px 10px; }
  .wheel-wrap { width: 220px; max-width: 60vw; }
  .sheet, .modal { max-height: 92vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .prize-media, .sheet-media, .win-media { max-height: 180px; }
}

/* 320px 及以下：概率表改两行，避免首列被挤没 */
@media (max-width: 340px) {
  .prize-grid { gap: 9px; }
  .prize-name { font-size: 12.5px; }
  .prob-row { grid-template-columns: 1fr 48px 44px; font-size: 11.5px; }
  .wheel-go { width: 76px; height: 76px; }
  .wheel-go b { font-size: 15px; }
}
