/*
 * UNUSUAL LASER 活动页：深紫底 + ab3 氛围；卡片为暗色半透明玻璃 + 浅色字（避免大白块）
 * 覆盖主图：?heroBg= 或内联 --reward-hero-image（首页已不再 postMessage 注入）
 */
:root {
  --event-kv: url("../assets/ab3.jpeg");
  /* 默认活动 KV；JS 可在 documentElement 上覆盖 */
  --reward-hero-image: var(--event-kv);

  --neon-magenta: #ff2d9a;
  --neon-magenta-glow: rgba(255, 45, 154, 0.5);
  --neon-cyan: #00f0ff;
  --neon-cyan-glow: rgba(0, 240, 255, 0.45);
  --neon-purple: #9d6cff;
  --neon-purple-soft: rgba(157, 108, 255, 0.28);

  --page-bg: #0a0614;
  --surface: #ffffff;
  /* 玻璃卡片上的正文（高对比浅色，勿用中灰糊在彩底上） */
  --text-glass: #f4f0ff;
  --text-glass-muted: #c4b8e6;
  --text: #0a0e12;
  --text-secondary: #5c6573;
  --muted: #6b7280;
  --line: rgba(255, 255, 255, 0.1);
  --blue: #2e86de;
  --blue-bright: #00b8d9;
  --blue-soft: rgba(157, 108, 255, 0.22);
  --accent-yellow: #ffe100;
  --accent-yellow-deep: #e6c800;
  --lime: #76d72f;
  --star: #ffb800;
  --amber: #f39c12;
  --amber-deep: #e67e22;
  --ember: #c0392b;
  --badge-orange: #ff8c00;
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  --overlay-module: rgba(14, 10, 30, 0.58);
  --overlay-module-soft: rgba(18, 12, 36, 0.52);

  font-family: "DM Sans", "Noto Sans SC", ui-sans-serif, sans-serif;
}

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

html {
  height: 100%;
  -webkit-tap-highlight-color: transparent;
  background: var(--page-bg);
}

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

:focus-visible {
  outline: 2px solid var(--neon-purple);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.2);
}

body {
  margin: 0;
  min-height: 100%;
  position: relative;
  background-color: transparent;
  background-image: repeating-linear-gradient(
      115deg,
      transparent,
      transparent 11px,
      rgba(157, 108, 255, 0.07) 11px,
      rgba(157, 108, 255, 0.07) 12px
    ),
    repeating-linear-gradient(
      -115deg,
      transparent,
      transparent 11px,
      rgba(255, 45, 154, 0.05) 11px,
      rgba(255, 45, 154, 0.05) 12px
    ),
    radial-gradient(ellipse 100% 70% at 50% -10%, rgba(157, 108, 255, 0.22), transparent 52%),
    radial-gradient(ellipse 80% 50% at 100% 50%, rgba(91, 47, 212, 0.18), transparent 45%);
  color: #d8d0ec;
  font-size: 14px;
  line-height: 1.5;
  padding-bottom: calc(20px + var(--safe-bottom));
}

/* 全页氛围：KV + 深紫压暗（竞品式暗底托霓虹） */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(
      185deg,
      rgba(8, 4, 18, 0.82) 0%,
      rgba(14, 8, 28, 0.55) 38%,
      rgba(10, 6, 22, 0.68) 68%,
      rgba(6, 3, 14, 0.9) 100%
    ),
    linear-gradient(90deg, rgba(91, 47, 212, 0.12), transparent 40%, transparent 60%, rgba(255, 45, 154, 0.08)),
    var(--event-kv);
  background-size: cover;
  background-position: center 18%;
  background-repeat: no-repeat;
}

a {
  color: #7ee8ff;
}

/* —— 底图 + 半透明罩 —— */
.reward-surface {
  position: relative;
  z-index: 0;
  overflow: hidden;
  isolation: isolate;
  background-color: transparent;
  color: var(--text-glass);
}
.reward-surface::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: var(--surface-image);
  background-size: cover;
  background-position: center;
  pointer-events: none;
}
.reward-surface::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--surface-overlay);
  pointer-events: none;
}

.page {
  max-width: 480px;
  margin: 0 auto;
  padding: 14px 14px 0;
  background: linear-gradient(180deg, #0c0618 0%, #100a22 24%, #0a0614 52%, #0e081c 100%);
}

#rules {
  scroll-margin-top: 12px;
}

/* 任务 + 规则：单层 KV、统一霓虹外框（内层不再各自 cover） */
.activity-bundle.reward-surface {
  margin-top: 16px;
  border-radius: 16px;
  border: 1px solid rgba(157, 108, 255, 0.45);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.48), 0 0 44px rgba(157, 108, 255, 0.18),
    0 0 1px rgba(255, 45, 154, 0.22);
  --surface-image: var(--event-kv);
  --surface-overlay: var(--overlay-module-soft);
  color: var(--text-glass);
}
.activity-bundle.reward-surface > .block.block-tasks {
  margin-top: 0;
  border: none;
  box-shadow: none;
  border-radius: 0;
}
.activity-bundle.reward-surface > .rules-sheet {
  margin-top: 0;
  border: none;
  box-shadow: none;
  border-radius: 0;
  border-top: 1px solid var(--line);
}

/* 故障风标题（静态双层阴影，不增第三种字体） */
.spectrum-title {
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--text-glass);
  text-shadow: 0 0 1px rgba(0, 0, 0, 0.9), 0 0 20px rgba(0, 0, 0, 0.65),
    0.06em 0 0 rgba(255, 45, 154, 0.55), -0.05em 0 0 rgba(157, 108, 255, 0.6),
    0 0 28px rgba(157, 108, 255, 0.35);
}

.spectrum-sub {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #dfd6ff;
  text-shadow: 0 0 12px rgba(0, 0, 0, 0.85), 0.12em 0 0 rgba(255, 45, 154, 0.35),
    -0.1em 0 0 rgba(157, 108, 255, 0.4);
}

/* 弹窗标题揭晓强调 */
#modalTitle.is-reveal {
  text-shadow: 0.08em 0 0 rgba(255, 45, 154, 0.5), -0.06em 0 0 rgba(0, 240, 255, 0.5),
    0 0 20px var(--neon-purple-soft);
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes modal-title-pulse {
    0%,
    100% {
      text-shadow: 0.06em 0 0 rgba(255, 45, 154, 0.4), -0.05em 0 0 rgba(0, 240, 255, 0.4);
    }
    50% {
      text-shadow: 0.1em 0 0 rgba(255, 45, 154, 0.55), -0.08em 0 0 rgba(0, 240, 255, 0.55),
        0 0 24px var(--neon-magenta-glow);
    }
  }
  #modalTitle.is-reveal {
    animation: modal-title-pulse 0.28s ease-out 1;
  }
}

.stats-pill {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.pill {
  position: relative;
  z-index: 0;
  border-radius: 12px;
  padding: 12px 14px;
  text-align: center;
  min-width: 80px;
  border: 1px solid rgba(157, 108, 255, 0.45);
  box-shadow: 0 0 22px rgba(157, 108, 255, 0.18), 0 6px 18px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  background: rgba(14, 10, 28, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.pill b {
  display: block;
  font-size: clamp(1.38rem, 4.5vw, 1.72rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  color: #c2186d;
  background: linear-gradient(90deg, var(--neon-magenta), var(--neon-purple), var(--neon-cyan));
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.85));
}
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .pill b {
    color: transparent;
  }
}
.pill span {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--text-glass);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.9);
}

/* 顶 KV + 叙事流 */
.kv-hero {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
}
.kv-hero--top {
  border: 1px solid rgba(157, 108, 255, 0.5);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55), 0 0 56px rgba(157, 108, 255, 0.28),
    0 0 1px rgba(0, 240, 255, 0.3);
  --surface-image: var(--reward-hero-image);
}
.kv-hero--top.reward-surface::before {
  background-position: center top;
}
.kv-hero--top.reward-surface::after {
  background: linear-gradient(
    180deg,
    rgba(10, 6, 24, 0.82) 0%,
    rgba(10, 6, 24, 0.72) 18%,
    rgba(6, 4, 18, 0.22) 40%,
    rgba(6, 4, 18, 0.14) 52%,
    rgba(6, 4, 18, 0.28) 72%,
    rgba(10, 6, 24, 0.75) 90%,
    rgba(10, 6, 24, 0.82) 100%
  );
}
.kv-hero__inner {
  position: relative;
  z-index: 1;
  padding: 20px 16px 24px;
  min-height: min(220px, 38vh);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-align: center;
}
.kv-hero__rules-link {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-decoration: none;
  color: var(--text-glass);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(12, 8, 28, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}
.kv-hero__rules-link:focus-visible {
  outline: 2px solid var(--neon-cyan);
  outline-offset: 2px;
}
.kv-hero__eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-glass-muted);
  letter-spacing: 0.06em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
}
.kv-hero__subline {
  margin: 0 0 12px;
  font-size: 10px;
  font-weight: 700;
  color: #bcb0e0;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.85);
}
.kv-hero__inner .spectrum-title {
  margin: 0 0 8px;
  font-size: 1.2rem;
}
.kv-hero__inner .spectrum-sub {
  margin: 0 0 8px;
}
.kv-hero__en {
  margin: 0;
  font-size: 12px;
  color: var(--text-glass-muted);
}

/* 主视觉下方内联日志（不写控制台） */
.reward-page-log {
  margin-top: 10px;
  margin-bottom: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 120, 200, 0.38);
  background: rgba(6, 4, 18, 0.82);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.reward-page-log__head {
  padding: 6px 10px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 190, 230, 0.95);
  background: rgba(48, 14, 40, 0.88);
  border-bottom: 1px solid rgba(255, 120, 200, 0.28);
}

.reward-page-log__body {
  min-height: 2.75rem;
  max-height: min(32vh, 220px);
  overflow: auto;
  padding: 8px 10px 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10px;
  line-height: 1.45;
  -webkit-overflow-scrolling: touch;
}

.reward-page-log-line {
  margin: 0 0 5px;
  padding: 4px 7px;
  border-radius: 5px;
  word-break: break-word;
  border-left: 3px solid rgba(120, 220, 255, 0.55);
  background: rgba(255, 255, 255, 0.06);
  color: #ebe6f5;
}

.reward-page-log-line--warn {
  border-left-color: rgba(255, 200, 80, 0.95);
  background: rgba(255, 160, 40, 0.1);
  color: #fff0d8;
}

.reward-page-log-line--error {
  border-left-color: rgba(255, 90, 110, 0.98);
  background: rgba(255, 60, 80, 0.12);
  color: #ffd8de;
}

.reward-page-log-line--iframe {
  border-left-color: rgba(180, 140, 255, 0.85);
  background: rgba(140, 100, 255, 0.08);
}

.stats-strip {
  margin-top: 12px;
  display: flex;
  justify-content: center;
}
.stats-strip .stats-pill {
  display: flex;
  gap: 8px;
}

.topup-showcase {
  margin-top: 16px;
  padding: 12px 6px 14px;
  border-radius: 16px;
  background: linear-gradient(165deg, rgba(36, 12, 28, 0.55) 0%, rgba(14, 6, 22, 0.72) 100%);
  border: 1px solid rgba(200, 70, 90, 0.22);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.topup-showcase__chrome {
  display: flex;
  align-items: center;
  gap: 4px;
}

.topup-showcase__nav {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid rgba(232, 74, 95, 0.55);
  background: rgba(30, 8, 18, 0.9);
  color: #ff6b6b;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 0 16px rgba(232, 74, 95, 0.25);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.topup-showcase__nav:active {
  transform: scale(0.96);
}

.topup-showcase__nav:focus-visible {
  outline: 2px solid var(--neon-cyan);
  outline-offset: 2px;
}

.topup-showcase__viewport {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  padding: 16px 0 20px;
  touch-action: pan-y;
}

.topup-showcase__track {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0;
  width: 100%;
  min-width: 0;
}

.topup-showcase__slide + .topup-showcase__slide {
  margin-left: -16px;
}

.topup-showcase__slide {
  flex: 0 0 min(17vw, 98px);
  width: min(17vw, 98px);
  border-radius: 12px;
  border: 1px solid rgba(120, 40, 55, 0.65);
  background-color: rgba(24, 8, 16, 0.92);
  background-image: repeating-linear-gradient(
      90deg,
      transparent,
      transparent 8px,
      rgba(255, 255, 255, 0.035) 8px,
      rgba(255, 255, 255, 0.035) 9px
    ),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 8px,
      rgba(255, 255, 255, 0.035) 8px,
      rgba(255, 255, 255, 0.035) 9px
    ),
    linear-gradient(165deg, rgba(55, 18, 32, 0.9) 0%, rgba(18, 6, 14, 0.98) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 6px 20px rgba(0, 0, 0, 0.5);
  overflow: visible;
  position: relative;
  cursor: pointer;
  transform: scale(0.5);
  opacity: 0.42;
  transition: transform 0.28s ease, opacity 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
  transform-origin: center center;
  z-index: 1;
}

/* 离中心第 4–5 近：外侧一档（约中心的 55% 视觉体量） */
.topup-showcase__slide--tier2 {
  transform: scale(0.56);
  opacity: 0.62;
  border-color: rgba(160, 55, 72, 0.82);
  z-index: 2;
}

/* 紧邻中心两侧（约相对中心的 72% 体量） */
.topup-showcase__slide--tier1 {
  transform: scale(0.76);
  opacity: 0.8;
  border-color: rgba(200, 75, 88, 0.88);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.42);
  z-index: 3;
}

/* 正中：明显放大 + 叠在最前 + 橙光 */
.topup-showcase__slide--tier0 {
  transform: scale(1.32);
  opacity: 1;
  border-color: rgba(255, 150, 72, 0.98);
  box-shadow: 0 0 0 2px rgba(255, 110, 55, 0.42), 0 0 32px rgba(255, 130, 65, 0.5),
    0 0 52px rgba(255, 45, 90, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  z-index: 4;
}

.topup-showcase__slide--tier0 .topup-showcase__slide-img-wrap {
  border-radius: 10px;
  overflow: hidden;
}

.topup-showcase__slide--tier0::before,
.topup-showcase__slide--tier0::after {
  content: "";
  position: absolute;
  width: 13px;
  height: 13px;
  z-index: 5;
  pointer-events: none;
  border-color: rgba(255, 210, 130, 0.9);
  border-style: solid;
  border-width: 0;
}
.topup-showcase__slide--tier0::before {
  top: 6px;
  left: 6px;
  border-top-width: 2px;
  border-left-width: 2px;
}
.topup-showcase__slide--tier0::after {
  bottom: 6px;
  right: 6px;
  border-bottom-width: 2px;
  border-right-width: 2px;
}

.topup-showcase__slide-img-wrap {
  aspect-ratio: 1;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
}

.topup-showcase__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.topup-showcase__badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #fff;
  background: linear-gradient(135deg, var(--neon-magenta), #c2186d);
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(255, 45, 154, 0.45);
  transform: rotate(-6deg);
}

.topup-showcase__progress {
  height: 3px;
  margin: 2px 14px 10px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.topup-showcase__progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  background: linear-gradient(90deg, #c93a4a, #ff5c6a, #ff8a6e);
  box-shadow: 0 0 12px rgba(255, 80, 90, 0.45);
  transition: width 0.12s ease-out;
}

.topup-showcase__title {
  margin: 0 8px 10px;
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  color: var(--text-glass);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.75);
  min-height: 1.4em;
  letter-spacing: 0.02em;
}

.topup-showcase__cta {
  margin-top: 2px;
}

.panel-checkin {
  margin-top: 16px;
  border-radius: 16px;
  padding: 16px;
  text-align: center;
  border: 1px solid rgba(157, 108, 255, 0.45);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.48), 0 0 40px rgba(157, 108, 255, 0.16);
  --surface-image: none;
  --surface-overlay: rgba(14, 10, 32, 0.72);
}
.panel-checkin .countdown {
  margin-bottom: 14px;
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
  justify-content: center;
  background: rgba(14, 10, 32, 0.75);
  --surface-image: none;
  --surface-overlay: transparent;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.page-purple-bridge {
  height: 64px;
  margin: 12px -14px 0;
  background: linear-gradient(
    180deg,
    rgba(10, 6, 18, 0) 0%,
    rgba(40, 22, 72, 0.35) 38%,
    rgba(20, 10, 42, 0.55) 72%,
    rgba(8, 4, 18, 0.68) 100%
  );
  pointer-events: none;
}

.kv-hero--bottom {
  margin: 0 0 calc(16px + var(--safe-bottom));
  min-height: min(160px, 28vh);
  border: 1px solid rgba(157, 108, 255, 0.4);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), inset 0 0 60px rgba(8, 4, 20, 0.4);
  --surface-image: var(--event-kv);
}
.kv-hero--bottom.reward-surface::before {
  background-position: center 60%;
}
.kv-hero--bottom.reward-surface::after {
  background: linear-gradient(
    180deg,
    rgba(8, 4, 20, 0.55) 0%,
    rgba(12, 6, 28, 0.72) 45%,
    rgba(6, 2, 14, 0.88) 100%
  );
}
.kv-hero__bottom-inner {
  position: relative;
  z-index: 1;
  min-height: min(120px, 24vh);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
}
.kv-hero__bottom-tag {
  margin: 0;
  font-size: 12px;
  opacity: 0.95;
}

/* 内容卡 */
.block {
  margin-top: 16px;
  border: 1px solid rgba(157, 108, 255, 0.45);
  border-radius: 16px;
  padding: 14px 14px 16px;
  color: var(--text-glass);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.48), 0 0 44px rgba(157, 108, 255, 0.18),
    0 0 1px rgba(255, 45, 154, 0.22);
  --surface-image: var(--event-kv);
  --surface-overlay: var(--overlay-module);
}
/* 转盘区不重复铺 KV，避免与首屏主视觉抢戏 */
.block.block-roulette {
  --surface-image: none;
  --surface-overlay: rgba(14, 10, 32, 0.72);
}
.block.block-roulette .block-h {
  --surface-image: none;
  --surface-overlay: rgba(18, 12, 38, 0.68);
}
.block-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: -6px -6px 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 3px solid var(--neon-purple);
  box-shadow: 0 0 18px rgba(157, 108, 255, 0.12), inset 0 0 0 1px rgba(0, 240, 255, 0.08);
  --surface-image: var(--event-kv);
  --surface-overlay: rgba(12, 8, 28, 0.62);
}
.block-h h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--text-glass);
  display: flex;
  align-items: center;
  gap: 8px;
}
.block-h h3::before {
  content: "";
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 2px;
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-magenta));
  box-shadow: 0 0 12px rgba(157, 108, 255, 0.55);
}
.block-h small {
  color: var(--text-glass-muted);
  font-size: 11px;
  font-weight: 600;
}

.countdown {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  color: var(--text-glass-muted);
  margin-bottom: 14px;
  box-shadow: 0 0 0 1px rgba(157, 108, 255, 0.25), 0 0 20px rgba(157, 108, 255, 0.12),
    0 4px 12px rgba(0, 0, 0, 0.35);
  --surface-image: var(--event-kv);
  --surface-overlay: rgba(12, 8, 28, 0.65);
}
.countdown strong {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  color: #0097a8;
  background: linear-gradient(90deg, var(--neon-magenta), var(--neon-purple), var(--neon-cyan));
  -webkit-background-clip: text;
  background-clip: text;
}
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .countdown strong {
    color: transparent;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 16px;
  padding: 13px 22px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  width: 100%;
  transition: transform 0.1s ease, filter 0.1s ease, box-shadow 0.15s ease;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -18deg,
    transparent,
    transparent 3px,
    rgba(255, 255, 255, 0.08) 3px,
    rgba(255, 255, 255, 0.08) 4px
  );
  pointer-events: none;
  border-radius: inherit;
}
.btn:active {
  transform: scale(0.98);
}

.btn-gold {
  background: linear-gradient(
    105deg,
    var(--neon-magenta) 0%,
    var(--neon-purple) 22%,
    var(--neon-purple) 58%,
    var(--neon-cyan) 100%
  );
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 28px var(--neon-magenta-glow), 0 0 32px rgba(157, 108, 255, 0.35);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.btn-gold:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn-cta-blue {
  background: linear-gradient(
    105deg,
    var(--neon-cyan) 0%,
    var(--neon-purple) 32%,
    var(--neon-purple) 68%,
    var(--neon-magenta) 100%
  );
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 28px var(--neon-cyan-glow), 0 0 30px rgba(157, 108, 255, 0.32);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.btn-cta-blue:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-cta-amber {
  background: linear-gradient(
    105deg,
    var(--neon-purple) 0%,
    var(--neon-magenta) 34%,
    var(--neon-purple) 58%,
    var(--neon-cyan) 100%
  );
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 28px rgba(157, 108, 255, 0.38), 0 0 32px var(--neon-magenta-glow),
    0 0 1px rgba(0, 240, 255, 0.35);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.btn-cta-amber:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-glass);
  border: 1px solid rgba(0, 240, 255, 0.35);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35), 0 0 16px rgba(157, 108, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.roulette-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 8px 0 4px;
}

.luck-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 8px;
  width: min(300px, 88vw);
  aspect-ratio: 1;
  margin: 0 auto;
}

.luck-cell {
  position: relative;
  min-height: 0;
  border-radius: 12px;
  border: 1px solid rgba(157, 108, 255, 0.38);
  background: linear-gradient(165deg, rgba(28, 18, 48, 0.92) 0%, rgba(12, 8, 24, 0.96) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 4px 14px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6px 5px;
  transition: border-color 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.luck-cell::before,
.luck-cell::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  pointer-events: none;
  opacity: 0.55;
  border-color: rgba(0, 240, 255, 0.35);
  border-style: solid;
  border-width: 0;
}
.luck-cell::before {
  top: 5px;
  left: 5px;
  border-top-width: 2px;
  border-left-width: 2px;
  border-radius: 2px 0 0 0;
}
.luck-cell::after {
  bottom: 5px;
  right: 5px;
  border-bottom-width: 2px;
  border-right-width: 2px;
  border-radius: 0 0 2px 0;
}

.luck-cell.is-active {
  border-color: rgba(0, 240, 255, 0.75);
  background: linear-gradient(165deg, rgba(40, 24, 72, 0.95) 0%, rgba(18, 12, 42, 0.98) 100%);
  box-shadow: 0 0 22px var(--neon-cyan-glow), 0 0 36px rgba(157, 108, 255, 0.25),
    inset 0 0 24px rgba(0, 240, 255, 0.08);
  z-index: 1;
}

.luck-cell.is-active::before,
.luck-cell.is-active::after {
  opacity: 1;
  border-color: rgba(0, 240, 255, 0.65);
}

.luck-cell__label {
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--text-glass);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.75);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.luck-cell--center {
  padding: 5px;
  border: 1px solid rgba(255, 45, 154, 0.42);
  background: radial-gradient(ellipse at 50% 30%, rgba(60, 30, 90, 0.5) 0%, rgba(10, 6, 22, 0.98) 65%);
  box-shadow: 0 0 20px rgba(255, 45, 154, 0.15), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.luck-cell--center::before,
.luck-cell--center::after {
  display: none;
}

.luck-go {
  width: 100%;
  padding: 11px 6px;
  font-size: 13px;
  border-radius: 10px;
  min-height: 44px;
}
.chances {
  font-size: 13px;
  color: var(--text-glass-muted);
  text-align: center;
}
.chances strong {
  color: var(--neon-cyan);
  font-weight: 800;
  text-shadow: 0 0 12px var(--neon-cyan-glow);
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.task {
  display: block;
  padding: 14px 0;
  border: none;
  box-shadow: none;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
}
.task:last-child {
  border-bottom: none;
  padding-bottom: 4px;
}
.task p {
  margin: 0;
  font-size: 13px;
  color: var(--text-glass);
}
.task p strong {
  color: var(--text-glass);
}

/* 任务区 / 规则区：弱外框，标题仅底部分隔 */
.block.block-tasks {
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}
.block-tasks .block-h {
  margin: -6px -6px 0;
  padding: 10px 12px 12px;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  border-left: none;
  --surface-image: none;
  --surface-overlay: transparent;
  background: transparent;
}
.block-tasks .block-h h3::before {
  display: none;
}

.ref-box {
  position: relative;
  z-index: 1;
  border-radius: 12px;
  padding: 12px;
  border: 1px dashed rgba(157, 108, 255, 0.35);
  margin-bottom: 10px;
  background: rgba(14, 10, 30, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 0 20px rgba(157, 108, 255, 0.08);
}
.ref-url {
  font-size: 12px;
  word-break: break-all;
  color: #e0d8ff;
  margin-bottom: 10px;
}
.row-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.row-btns .btn {
  padding: 11px 10px;
  font-size: 13px;
}

details.rule-group {
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}
details.rule-group:last-child {
  border-bottom: none;
}
details.rule-group summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
  color: var(--text-glass);
}
details.rule-group summary::-webkit-details-marker {
  display: none;
}
details.rule-group ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--text-glass-muted);
  font-size: 12px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, var(--safe-bottom));
  transform: translateX(-50%) translateY(120px);
  background: rgba(18, 12, 38, 0.92);
  color: var(--text-glass);
  padding: 11px 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  z-index: 200;
  max-width: 90vw;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 32px rgba(157, 108, 255, 0.25);
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(4, 2, 12, 0.72);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 150;
  padding: 20px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal.open {
  display: flex;
}
.modal-card {
  border: 1px solid rgba(157, 108, 255, 0.32);
  border-radius: 24px;
  padding: 22px;
  max-width: 320px;
  width: 100%;
  text-align: center;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.14), 0 0 44px rgba(157, 108, 255, 0.16),
    0 0 1px rgba(255, 45, 154, 0.2);
  --surface-image: var(--event-kv);
  --surface-overlay: var(--overlay-module);
}
.modal-card h4 {
  margin: 0 0 10px;
  color: var(--text-glass);
  font-size: 1.1rem;
  font-weight: 900;
}
.modal-card p {
  margin: 0 0 18px;
  color: var(--text-glass-muted);
  font-size: 14px;
  font-weight: 500;
}

.toolbar-close {
  margin-top: 14px;
  display: flex;
  justify-content: center;
}
.toolbar-close button {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.3);
  color: var(--text-glass-muted);
  border-radius: 10px;
  padding: 8px 18px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hint-api {
  margin: 0;
  font-size: 12px;
  color: var(--text-glass-muted);
}

.hint-api code {
  font-size: 11px;
  background: rgba(0, 0, 0, 0.35);
  padding: 2px 6px;
  border-radius: 4px;
  color: #e8e0ff;
  border: 1px solid rgba(157, 108, 255, 0.25);
}

.rules-sheet {
  margin-top: 16px;
  padding: 18px 16px 20px;
  border-radius: 16px;
  color: var(--text-glass);
  --surface-image: var(--event-kv);
  --surface-overlay: var(--overlay-module-soft);
}
.rules-sheet:not(.rules-sheet--plain) {
  border: 1px solid rgba(157, 108, 255, 0.35);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 32px rgba(157, 108, 255, 0.14),
    0 0 1px rgba(0, 240, 255, 0.15);
}
.rules-sheet.rules-sheet--plain {
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}
.rules-sheet:not(.rules-sheet--plain) .block-h {
  border-left-color: var(--neon-magenta);
  box-shadow: 0 0 16px rgba(255, 45, 154, 0.1);
}
.rules-sheet.rules-sheet--plain .block-h {
  margin: -6px -6px 0;
  padding: 10px 12px 12px;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  border-left: none;
  --surface-image: none;
  --surface-overlay: transparent;
  background: transparent;
}
.rules-sheet.rules-sheet--plain .block-h h3::before {
  display: none;
}
.rules-sheet details.rule-group summary {
  color: #b8f6ff;
  font-size: 14px;
  text-shadow: 0 0 18px rgba(0, 240, 255, 0.25);
}
.rules-sheet details.rule-group ul {
  color: var(--text-glass-muted);
  font-size: 12px;
}
